id int32 0 27.3k | func stringlengths 26 142k | target bool 2
classes | project stringclasses 2
values | commit_id stringlengths 40 40 | func_clean stringlengths 26 131k | vul_lines dict | normalized_func stringlengths 24 132k | lines listlengths 1 2.8k | label listlengths 1 2.8k | line_no listlengths 1 2.8k |
|---|---|---|---|---|---|---|---|---|---|---|
2,314 | static void handle_arg_log_filename(const char *arg)
{
qemu_set_log_filename(arg);
}
| true | qemu | daa76aa416b1e18ab1fac650ff53d966d8f21f68 | static void handle_arg_log_filename(const char *arg)
{
qemu_set_log_filename(arg);
}
| {
"code": [
" qemu_set_log_filename(arg);"
],
"line_no": [
5
]
} | static void FUNC_0(const char *VAR_0)
{
qemu_set_log_filename(VAR_0);
}
| [
"static void FUNC_0(const char *VAR_0)\n{",
"qemu_set_log_filename(VAR_0);",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
2,315 | static int32_t scsi_target_send_command(SCSIRequest *req, uint8_t *buf)
{
SCSITargetReq *r = DO_UPCAST(SCSITargetReq, req, req);
switch (buf[0]) {
case REPORT_LUNS:
if (!scsi_target_emulate_report_luns(r)) {
goto illegal_request;
}
break;
case INQUIRY:
... | true | qemu | 846424350b292f16b732b573273a5c1f195cd7a3 | static int32_t scsi_target_send_command(SCSIRequest *req, uint8_t *buf)
{
SCSITargetReq *r = DO_UPCAST(SCSITargetReq, req, req);
switch (buf[0]) {
case REPORT_LUNS:
if (!scsi_target_emulate_report_luns(r)) {
goto illegal_request;
}
break;
case INQUIRY:
... | {
"code": [
" MIN(req->cmd.xfer, sizeof r->buf),"
],
"line_no": [
35
]
} | static int32_t FUNC_0(SCSIRequest *req, uint8_t *buf)
{
SCSITargetReq *r = DO_UPCAST(SCSITargetReq, req, req);
switch (buf[0]) {
case REPORT_LUNS:
if (!scsi_target_emulate_report_luns(r)) {
goto illegal_request;
}
break;
case INQUIRY:
if (!scsi_tar... | [
"static int32_t FUNC_0(SCSIRequest *req, uint8_t *buf)\n{",
"SCSITargetReq *r = DO_UPCAST(SCSITargetReq, req, req);",
"switch (buf[0]) {",
"case REPORT_LUNS:\nif (!scsi_target_emulate_report_luns(r)) {",
"goto illegal_request;",
"}",
"break;",
"case INQUIRY:\nif (!scsi_target_emulate_inquiry(r)) {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31,
33,
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
... |
2,316 | static int CUDAAPI cuvid_handle_video_sequence(void *opaque, CUVIDEOFORMAT* format)
{
AVCodecContext *avctx = opaque;
CuvidContext *ctx = avctx->priv_data;
AVHWFramesContext *hwframe_ctx = (AVHWFramesContext*)ctx->hwframe->data;
CUVIDDECODECREATEINFO cuinfo;
av_log(avctx, AV_LOG_TRACE, "pfnSequenceC... | true | FFmpeg | ee88dcb2b0fefb42b0761ddb105c71daf604d791 | static int CUDAAPI cuvid_handle_video_sequence(void *opaque, CUVIDEOFORMAT* format)
{
AVCodecContext *avctx = opaque;
CuvidContext *ctx = avctx->priv_data;
AVHWFramesContext *hwframe_ctx = (AVHWFramesContext*)ctx->hwframe->data;
CUVIDDECODECREATEINFO cuinfo;
av_log(avctx, AV_LOG_TRACE, "pfnSequenceC... | {
"code": [],
"line_no": []
} | static int VAR_0 cuvid_handle_video_sequence(void *opaque, CUVIDEOFORMAT* format)
{
AVCodecContext *avctx = opaque;
CuvidContext *ctx = avctx->priv_data;
AVHWFramesContext *hwframe_ctx = (AVHWFramesContext*)ctx->hwframe->data;
CUVIDDECODECREATEINFO cuinfo;
av_log(avctx, AV_LOG_TRACE, "pfnSequenceCal... | [
"static int VAR_0 cuvid_handle_video_sequence(void *opaque, CUVIDEOFORMAT* format)\n{",
"AVCodecContext *avctx = opaque;",
"CuvidContext *ctx = avctx->priv_data;",
"AVHWFramesContext *hwframe_ctx = (AVHWFramesContext*)ctx->hwframe->data;",
"CUVIDDECODECREATEINFO cuinfo;",
"av_log(avctx, AV_LOG_TRACE, \"pf... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11,
12
],
[
13
],
[
14,
15
],
[
16,
17
],
[
18,
19
],
[
20,
21
],
[
22
],
[
23
],
[
... |
2,317 | static void test_leak_bucket(void)
{
throttle_config_init(&cfg);
bkt = cfg.buckets[THROTTLE_BPS_TOTAL];
/* set initial value */
bkt.avg = 150;
bkt.max = 15;
bkt.level = 1.5;
/* leak an op work of time */
throttle_leak_bucket(&bkt, NANOSECONDS_PER_SECOND / 150);
g_assert(bkt.avg == 15... | true | qemu | eb8a1a1cbda15d776d6d505f14f61c7852f6a51a | static void test_leak_bucket(void)
{
throttle_config_init(&cfg);
bkt = cfg.buckets[THROTTLE_BPS_TOTAL];
bkt.avg = 150;
bkt.max = 15;
bkt.level = 1.5;
throttle_leak_bucket(&bkt, NANOSECONDS_PER_SECOND / 150);
g_assert(bkt.avg == 150);
g_assert(bkt.max == 15);
g_assert(double... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
throttle_config_init(&cfg);
bkt = cfg.buckets[THROTTLE_BPS_TOTAL];
bkt.avg = 150;
bkt.max = 15;
bkt.level = 1.5;
throttle_leak_bucket(&bkt, NANOSECONDS_PER_SECOND / 150);
g_assert(bkt.avg == 150);
g_assert(bkt.max == 15);
g_assert(double_cmp(bkt.l... | [
"static void FUNC_0(void)\n{",
"throttle_config_init(&cfg);",
"bkt = cfg.buckets[THROTTLE_BPS_TOTAL];",
"bkt.avg = 150;",
"bkt.max = 15;",
"bkt.level = 1.5;",
"throttle_leak_bucket(&bkt, NANOSECONDS_PER_SECOND / 150);",
"g_assert(bkt.avg == 150);",
"g_assert(bkt.max == 15);",
"g_assert(double_cmp(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
6
],
[
7
],
[
8
],
[
10
],
[
11
],
[
12
],
[
13
],
[
15
],
[
16
],
[
17
],
[
18
],
[
20
],
[
21
],
[
22
],
[
23
],
[
24
]
] |
2,318 | static BlockAIOCB *blkverify_aio_readv(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockCompletionFunc *cb, void *opaque)
{
BDRVBlkverifyState *s = bs->opaque;
BlkverifyAIOCB *acb = blkverify_aio_get(bs, false, sector_num, qiov,
... | true | qemu | 44b6789299a8acca3f25331bc411055cafc7bb06 | static BlockAIOCB *blkverify_aio_readv(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockCompletionFunc *cb, void *opaque)
{
BDRVBlkverifyState *s = bs->opaque;
BlkverifyAIOCB *acb = blkverify_aio_get(bs, false, sector_num, qiov,
... | {
"code": [
"static BlockAIOCB *blkverify_aio_readv(BlockDriverState *bs,",
" int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,",
" BlockCompletionFunc *cb, void *opaque)",
" BDRVBlkverifyState *s = bs->opaque;",
" BlkverifyAIOCB *acb = blkverify_aio_get(bs, false, sector... | static BlockAIOCB *FUNC_0(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockCompletionFunc *cb, void *opaque)
{
BDRVBlkverifyState *s = bs->opaque;
BlkverifyAIOCB *acb = blkverify_aio_get(bs, false, sector_num, qiov,
... | [
"static BlockAIOCB *FUNC_0(BlockDriverState *bs,\nint64_t sector_num, QEMUIOVector *qiov, int nb_sectors,\nBlockCompletionFunc *cb, void *opaque)\n{",
"BDRVBlkverifyState *s = bs->opaque;",
"BlkverifyAIOCB *acb = blkverify_aio_get(bs, false, sector_num, qiov,\nnb_sectors, cb, opaque);",
"acb->verify = blkveri... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11,
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
31,
33
],
[
35
],
[
37
]
] |
2,319 | void ff_put_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels,
int line_size)
{
const DCTELEM *p;
uint8_t *pix;
/* read the pixels */
p = block;
pix = pixels;
/* unrolled loop */
__asm__ volatile (
"movq %3, %%mm0 \n... | true | FFmpeg | 845e92fd6abf749a960354becdc5a9bc498f1f96 | void ff_put_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels,
int line_size)
{
const DCTELEM *p;
uint8_t *pix;
p = block;
pix = pixels;
__asm__ volatile (
"movq %3, %%mm0 \n\t"
"movq 8%3, %%mm1 ... | {
"code": [
" \"movq %3, %%mm0 \\n\\t\"",
" \"movq 8%3, %%mm1 \\n\\t\"",
" \"movq 16%3, %%mm2 \\n\\t\"",
" \"movq 24%3, %%mm3 \\n\\t\"",
" \"movq 32%3, %%mm4 \\n\\t\"",
" \"movq ... | void FUNC_0(const DCTELEM *VAR_0, uint8_t *VAR_1,
int VAR_2)
{
const DCTELEM *VAR_3;
uint8_t *pix;
VAR_3 = VAR_0;
pix = VAR_1;
__asm__ volatile (
"movq %3, %%mm0 \n\t"
"movq 8%3, %%mm1 \n\t"
... | [
"void FUNC_0(const DCTELEM *VAR_0, uint8_t *VAR_1,\nint VAR_2)\n{",
"const DCTELEM *VAR_3;",
"uint8_t *pix;",
"VAR_3 = VAR_0;",
"pix = VAR_1;",
"__asm__ volatile (\n\"movq %3, %%mm0 \\n\\t\"\n\"movq 8%3, %%mm1 \\n\\t\"\n\"movq 16%3, %%mm2 \\n\\t\"\n\"movq ... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
15
],
[
17
],
[
21,
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59
],
[
61
],
[
63
],
[
73,
75,
77,... |
2,320 | static target_ulong h_enter(CPUPPCState *env, sPAPREnvironment *spapr,
target_ulong opcode, target_ulong *args)
{
target_ulong flags = args[0];
target_ulong pte_index = args[1];
target_ulong pteh = args[2];
target_ulong ptel = args[3];
target_ulong page_shift = 12;... | true | qemu | 35f9304d925a5423c51bd2c83a81fa3cc2b6e680 | static target_ulong h_enter(CPUPPCState *env, sPAPREnvironment *spapr,
target_ulong opcode, target_ulong *args)
{
target_ulong flags = args[0];
target_ulong pte_index = args[1];
target_ulong pteh = args[2];
target_ulong ptel = args[3];
target_ulong page_shift = 12;... | {
"code": [
" if (((ldq_p(hpte) & HPTE_V_VALID) == 0) &&",
" lock_hpte(hpte, HPTE_V_HVLOCK | HPTE_V_VALID)) {",
" if (!lock_hpte(hpte, HPTE_V_HVLOCK | HPTE_V_VALID)) {",
" assert(!(ldq_p(hpte) & HPTE_V_HVLOCK));",
" assert(!(ldq_p(hpte) & HPTE_V_HVLOCK));",
... | static target_ulong FUNC_0(CPUPPCState *env, sPAPREnvironment *spapr,
target_ulong opcode, target_ulong *args)
{
target_ulong flags = args[0];
target_ulong pte_index = args[1];
target_ulong pteh = args[2];
target_ulong ptel = args[3];
target_ulong page_shift = 12;
... | [
"static target_ulong FUNC_0(CPUPPCState *env, sPAPREnvironment *spapr,\ntarget_ulong opcode, target_ulong *args)\n{",
"target_ulong flags = args[0];",
"target_ulong pte_index = args[1];",
"target_ulong pteh = args[2];",
"target_ulong ptel = args[3];",
"target_ulong page_shift = 12;",
"target_ulong raddr... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
27
],
[
29,
31
],
[
35
],
[
37,
39
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[... |
2,321 | static void exynos4210_gic_init(Object *obj)
{
DeviceState *dev = DEVICE(obj);
Exynos4210GicState *s = EXYNOS4210_GIC(obj);
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
uint32_t i;
const char cpu_prefix[] = "exynos4210-gic-alias_cpu";
const char dist_prefix[] = "exynos4210-gic-alias_dist";
... | true | qemu | ee78356eba8df05043bac392c263450db5e7eed6 | static void exynos4210_gic_init(Object *obj)
{
DeviceState *dev = DEVICE(obj);
Exynos4210GicState *s = EXYNOS4210_GIC(obj);
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
uint32_t i;
const char cpu_prefix[] = "exynos4210-gic-alias_cpu";
const char dist_prefix[] = "exynos4210-gic-alias_dist";
... | {
"code": [
" uint32_t i;",
" SysBusDevice *busdev;",
" busdev = SYS_BUS_DEVICE(s->gic);",
" sysbus_pass_irq(sbd, busdev);",
" sysbus_mmio_get_region(busdev, 1),",
" sysbus_mmio_get_region(busdev, 0),"
],
"line_no"... | static void FUNC_0(Object *VAR_0)
{
DeviceState *dev = DEVICE(VAR_0);
Exynos4210GicState *s = EXYNOS4210_GIC(VAR_0);
SysBusDevice *sbd = SYS_BUS_DEVICE(VAR_0);
uint32_t i;
const char VAR_1[] = "exynos4210-gic-alias_cpu";
const char VAR_2[] = "exynos4210-gic-alias_dist";
char VAR_3[si... | [
"static void FUNC_0(Object *VAR_0)\n{",
"DeviceState *dev = DEVICE(VAR_0);",
"Exynos4210GicState *s = EXYNOS4210_GIC(VAR_0);",
"SysBusDevice *sbd = SYS_BUS_DEVICE(VAR_0);",
"uint32_t i;",
"const char VAR_1[] = \"exynos4210-gic-alias_cpu\";",
"const char VAR_2[] = \"exynos4210-gic-alias_dist\";",
"char... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
39
],
[
45,
47
],
[
51,
53
],
[
55,... |
2,322 | static av_cold void compute_alpha_vlcs(void)
{
uint16_t run_code[129], level_code[256];
uint8_t run_bits[129], level_bits[256];
int run, level;
for (run = 0; run < 128; run++) {
if (!run) {
/* 0 -> 0. */
run_code[run] = 0;
run_bits[run] = 1;
... | true | FFmpeg | 08b098169be079c4f124a351fda6764fbcd10e79 | static av_cold void compute_alpha_vlcs(void)
{
uint16_t run_code[129], level_code[256];
uint8_t run_bits[129], level_bits[256];
int run, level;
for (run = 0; run < 128; run++) {
if (!run) {
run_code[run] = 0;
run_bits[run] = 1;
} else if (... | {
"code": [
" uint16_t run_code[129], level_code[256];",
" uint8_t run_bits[129], level_bits[256];",
" int run, level;",
" for (run = 0; run < 128; run++) {",
" if (!run) {",
" run_code[run] = 0;",
" run_bits[run] = 1;",
" } else if (run ... | static av_cold void FUNC_0(void)
{
uint16_t run_code[129], level_code[256];
uint8_t run_bits[129], level_bits[256];
int VAR_0, VAR_1;
for (VAR_0 = 0; VAR_0 < 128; VAR_0++) {
if (!VAR_0) {
run_code[VAR_0] = 0;
run_bits[VAR_0] = 1;
} else if... | [
"static av_cold void FUNC_0(void)\n{",
"uint16_t run_code[129], level_code[256];",
"uint8_t run_bits[129], level_bits[256];",
"int VAR_0, VAR_1;",
"for (VAR_0 = 0; VAR_0 < 128; VAR_0++) {",
"if (!VAR_0) {",
"run_code[VAR_0] = 0;",
"run_bits[VAR_0] = 1;",
"} else if (VAR_0 <= 4) {",
"run_code[VAR_0... | [
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
47
],
[
49
],
[
53,
55,
57
... |
2,323 | static void pci_info_device(PCIBus *bus, PCIDevice *d)
{
Monitor *mon = cur_mon;
int i, class;
PCIIORegion *r;
const pci_class_desc *desc;
monitor_printf(mon, " Bus %2d, device %3d, function %d:\n",
pci_bus_num(d->bus),
PCI_SLOT(d->devfn), PCI_FUNC(d-... | true | qemu | f88d7509b444ffa289e5054b34bc6f4800f6b76d | static void pci_info_device(PCIBus *bus, PCIDevice *d)
{
Monitor *mon = cur_mon;
int i, class;
PCIIORegion *r;
const pci_class_desc *desc;
monitor_printf(mon, " Bus %2d, device %3d, function %d:\n",
pci_bus_num(d->bus),
PCI_SLOT(d->devfn), PCI_FUNC(d-... | {
"code": [
" limit= pci_config_get_memory_base(d, PCI_BASE_ADDRESS_SPACE_MEMORY);"
],
"line_no": [
89
]
} | static void FUNC_0(PCIBus *VAR_0, PCIDevice *VAR_1)
{
Monitor *mon = cur_mon;
int VAR_2, VAR_3;
PCIIORegion *r;
const pci_class_desc *VAR_4;
monitor_printf(mon, " Bus %2d, device %3d, function %VAR_1:\n",
pci_bus_num(VAR_1->VAR_0),
PCI_SLOT(VAR_1->dev... | [
"static void FUNC_0(PCIBus *VAR_0, PCIDevice *VAR_1)\n{",
"Monitor *mon = cur_mon;",
"int VAR_2, VAR_3;",
"PCIIORegion *r;",
"const pci_class_desc *VAR_4;",
"monitor_printf(mon, \" Bus %2d, device %3d, function %VAR_1:\\n\",\npci_bus_num(VAR_1->VAR_0),\nPCI_SLOT(VAR_1->devfn), PCI_FUNC(VAR_1->devfn));",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17,
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43,
45
],
[
49
],
[... |
2,324 | int av_write_frame(AVFormatContext *s, AVPacket *pkt)
{
int ret;
compute_pkt_fields2(s->streams[pkt->stream_index], pkt);
truncate_ts(s->streams[pkt->stream_index], pkt);
ret= s->oformat->write_packet(s, pkt);
if(!ret)
ret= url_ferror(&s->pb);
return ret;
}
| true | FFmpeg | 5edea431d0616737e5a5f58cefc07ba5b2e0875f | int av_write_frame(AVFormatContext *s, AVPacket *pkt)
{
int ret;
compute_pkt_fields2(s->streams[pkt->stream_index], pkt);
truncate_ts(s->streams[pkt->stream_index], pkt);
ret= s->oformat->write_packet(s, pkt);
if(!ret)
ret= url_ferror(&s->pb);
return ret;
}
| {
"code": [
" compute_pkt_fields2(s->streams[pkt->stream_index], pkt);"
],
"line_no": [
9
]
} | int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
int VAR_2;
compute_pkt_fields2(VAR_0->streams[VAR_1->stream_index], VAR_1);
truncate_ts(VAR_0->streams[VAR_1->stream_index], VAR_1);
VAR_2= VAR_0->oformat->write_packet(VAR_0, VAR_1);
if(!VAR_2)
VAR_2= url_ferror(&VAR_0->... | [
"int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"int VAR_2;",
"compute_pkt_fields2(VAR_0->streams[VAR_1->stream_index], VAR_1);",
"truncate_ts(VAR_0->streams[VAR_1->stream_index], VAR_1);",
"VAR_2= VAR_0->oformat->write_packet(VAR_0, VAR_1);",
"if(!VAR_2)\nVAR_2= url_ferror(&VAR_0->pb);",
"ret... | [
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
17
],
[
19,
21
],
[
23
],
[
25
]
] |
2,327 | static void revert_cdlms(WmallDecodeCtx *s, int tile_size)
{
int icoef, ich;
int32_t pred, channel_coeff;
int ilms, num_lms;
for (ich = 0; ich < s->num_channels; ich++) {
if (!s->is_channel_coded[ich])
continue;
for (icoef = 0; icoef < tile_size; icoef++) {
... | true | FFmpeg | 6cf31ef263d36f6b89d9b64f15ca81cef4f24901 | static void revert_cdlms(WmallDecodeCtx *s, int tile_size)
{
int icoef, ich;
int32_t pred, channel_coeff;
int ilms, num_lms;
for (ich = 0; ich < s->num_channels; ich++) {
if (!s->is_channel_coded[ich])
continue;
for (icoef = 0; icoef < tile_size; icoef++) {
... | {
"code": [
" for (ilms = num_lms; ilms >= 0; ilms--) {"
],
"line_no": [
33
]
} | static void FUNC_0(WmallDecodeCtx *VAR_0, int VAR_1)
{
int VAR_2, VAR_3;
int32_t pred, channel_coeff;
int VAR_4, VAR_5;
for (VAR_3 = 0; VAR_3 < VAR_0->num_channels; VAR_3++) {
if (!VAR_0->is_channel_coded[VAR_3])
continue;
for (VAR_2 = 0; VAR_2 < VAR_1; VAR_2++) {
... | [
"static void FUNC_0(WmallDecodeCtx *VAR_0, int VAR_1)\n{",
"int VAR_2, VAR_3;",
"int32_t pred, channel_coeff;",
"int VAR_4, VAR_5;",
"for (VAR_3 = 0; VAR_3 < VAR_0->num_channels; VAR_3++) {",
"if (!VAR_0->is_channel_coded[VAR_3])\ncontinue;",
"for (VAR_2 = 0; VAR_2 < VAR_1; VAR_2++) {",
"VAR_5 = VAR_0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
2,331 | static void decode_mb_b(AVSContext *h, enum cavs_mb mb_type) {
int block;
enum cavs_sub_mb sub_type[4];
int flags;
ff_cavs_init_mb(h);
/* reset all MVs */
h->mv[MV_FWD_X0] = ff_cavs_dir_mv;
set_mvs(&h->mv[MV_FWD_X0], BLK_16X16);
h->mv[MV_BWD_X0] = ff_cavs_dir_mv;
set_mvs... | true | FFmpeg | 7ea5dbcb83a502d8152d5c64d32f9a16e7e907c7 | static void decode_mb_b(AVSContext *h, enum cavs_mb mb_type) {
int block;
enum cavs_sub_mb sub_type[4];
int flags;
ff_cavs_init_mb(h);
h->mv[MV_FWD_X0] = ff_cavs_dir_mv;
set_mvs(&h->mv[MV_FWD_X0], BLK_16X16);
h->mv[MV_BWD_X0] = ff_cavs_dir_mv;
set_mvs(&h->mv[MV_BWD_X0],... | {
"code": [
" av_assert2((mb_type > B_SYM_16X16) && (mb_type < B_8X8));"
],
"line_no": [
143
]
} | static void FUNC_0(AVSContext *VAR_0, enum cavs_mb VAR_1) {
int VAR_2;
enum cavs_sub_mb VAR_3[4];
int VAR_4;
ff_cavs_init_mb(VAR_0);
VAR_0->mv[MV_FWD_X0] = ff_cavs_dir_mv;
set_mvs(&VAR_0->mv[MV_FWD_X0], BLK_16X16);
VAR_0->mv[MV_BWD_X0] = ff_cavs_dir_mv;
set_mvs(&VAR_0->... | [
"static void FUNC_0(AVSContext *VAR_0, enum cavs_mb VAR_1) {",
"int VAR_2;",
"enum cavs_sub_mb VAR_3[4];",
"int VAR_4;",
"ff_cavs_init_mb(VAR_0);",
"VAR_0->mv[MV_FWD_X0] = ff_cavs_dir_mv;",
"set_mvs(&VAR_0->mv[MV_FWD_X0], BLK_16X16);",
"VAR_0->mv[MV_BWD_X0] = ff_cavs_dir_mv;",
"set_mvs(&VAR_0->mv[MV... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1
],
[
3
],
[
5
],
[
7
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29,
31
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45,
47
],
[
49
],
[
51,
53
],
... |
2,332 | static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
{
AVFrame *decoded_frame;
AVCodecContext *avctx = ist->st->codec;
int bps = av_get_bytes_per_sample(ist->st->codec->sample_fmt);
int i, ret;
if (!ist->decoded_frame && !(ist->decoded_frame = avcodec_alloc_frame()))
... | true | FFmpeg | 369cb092ecbbaff20bb0a2a1d60536c3bc04a8f0 | static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
{
AVFrame *decoded_frame;
AVCodecContext *avctx = ist->st->codec;
int bps = av_get_bytes_per_sample(ist->st->codec->sample_fmt);
int i, ret;
if (!ist->decoded_frame && !(ist->decoded_frame = avcodec_alloc_frame()))
... | {
"code": [
" exit_program(1);",
" exit_program(1);",
" exit_program(1);",
" return AVERROR(ENOMEM);",
" exit_program(1);",
" int i, ret;",
" ist->next_dts += ((int64_t)AV_TIME_BASE * decoded_frame->nb_samples) /",
" ... | static int FUNC_0(InputStream *VAR_0, AVPacket *VAR_1, int *VAR_2)
{
AVFrame *decoded_frame;
AVCodecContext *avctx = VAR_0->st->codec;
int VAR_3 = av_get_bytes_per_sample(VAR_0->st->codec->sample_fmt);
int VAR_4, VAR_5;
if (!VAR_0->decoded_frame && !(VAR_0->decoded_frame = avcodec_alloc_fram... | [
"static int FUNC_0(InputStream *VAR_0, AVPacket *VAR_1, int *VAR_2)\n{",
"AVFrame *decoded_frame;",
"AVCodecContext *avctx = VAR_0->st->codec;",
"int VAR_3 = av_get_bytes_per_sample(VAR_0->st->codec->sample_fmt);",
"int VAR_4, VAR_5;",
"if (!VAR_0->decoded_frame && !(VAR_0->decoded_frame = avcodec_alloc_f... | [
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
19,
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
41
],
[
43
],
[
51,
53
],
[
61,
63
],
[
69
... |
2,333 | static inline void store_cpu_offset(TCGv var, int offset)
{
tcg_gen_st_i32(var, cpu_env, offset);
dead_tmp(var);
}
| true | qemu | 7d1b0095bff7157e856d1d0e6c4295641ced2752 | static inline void store_cpu_offset(TCGv var, int offset)
{
tcg_gen_st_i32(var, cpu_env, offset);
dead_tmp(var);
}
| {
"code": [
" dead_tmp(var);",
" dead_tmp(var);",
" dead_tmp(var);",
" dead_tmp(var);",
" dead_tmp(var);"
],
"line_no": [
7,
7,
7,
7,
7
]
} | static inline void FUNC_0(TCGv VAR_0, int VAR_1)
{
tcg_gen_st_i32(VAR_0, cpu_env, VAR_1);
dead_tmp(VAR_0);
}
| [
"static inline void FUNC_0(TCGv VAR_0, int VAR_1)\n{",
"tcg_gen_st_i32(VAR_0, cpu_env, VAR_1);",
"dead_tmp(VAR_0);",
"}"
] | [
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
2,337 | static void test_cipher_speed(const void *opaque)
{
QCryptoCipher *cipher;
Error *err = NULL;
double total = 0.0;
size_t chunk_size = (size_t)opaque;
uint8_t *key = NULL, *iv = NULL;
uint8_t *plaintext = NULL, *ciphertext = NULL;
size_t nkey = qcrypto_cipher_get_key_len(QCRYPTO_CIPHE... | true | qemu | 8c0a6dc96cd14c48da4a61fe35431f36d6e6e467 | static void test_cipher_speed(const void *opaque)
{
QCryptoCipher *cipher;
Error *err = NULL;
double total = 0.0;
size_t chunk_size = (size_t)opaque;
uint8_t *key = NULL, *iv = NULL;
uint8_t *plaintext = NULL, *ciphertext = NULL;
size_t nkey = qcrypto_cipher_get_key_len(QCRYPTO_CIPHE... | {
"code": [
" g_print(\"Testing chunk_size %ld bytes \", chunk_size);",
" g_print(\"Testing chunk_size %ld bytes \", chunk_size);",
" g_print(\"Testing chunk_size %ld bytes \", chunk_size);"
],
"line_no": [
91,
91,
91
]
} | static void FUNC_0(const void *VAR_0)
{
QCryptoCipher *cipher;
Error *err = NULL;
double VAR_1 = 0.0;
size_t chunk_size = (size_t)VAR_0;
uint8_t *key = NULL, *iv = NULL;
uint8_t *plaintext = NULL, *ciphertext = NULL;
size_t nkey = qcrypto_cipher_get_key_len(QCRYPTO_CIPHER_ALG_AES_128... | [
"static void FUNC_0(const void *VAR_0)\n{",
"QCryptoCipher *cipher;",
"Error *err = NULL;",
"double VAR_1 = 0.0;",
"size_t chunk_size = (size_t)VAR_0;",
"uint8_t *key = NULL, *iv = NULL;",
"uint8_t *plaintext = NULL, *ciphertext = NULL;",
"size_t nkey = qcrypto_cipher_get_key_len(QCRYPTO_CIPHER_ALG_AE... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
37
],
[
41
],
[
43
],
[
47,
49,
51
],
[
53
],
[... |
2,338 | static void s390_init(ram_addr_t my_ram_size,
const char *boot_device,
const char *kernel_filename,
const char *kernel_cmdline,
const char *initrd_filename,
const char *cpu_model)
{
CPUState *env = NULL;
... | true | qemu | 326384d5b6dcea69ca44695ee807f8b50234ab71 | static void s390_init(ram_addr_t my_ram_size,
const char *boot_device,
const char *kernel_filename,
const char *kernel_cmdline,
const char *initrd_filename,
const char *cpu_model)
{
CPUState *env = NULL;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(ram_addr_t VAR_0,
const char *VAR_1,
const char *VAR_2,
const char *VAR_3,
const char *VAR_4,
const char *VAR_5)
{
CPUState *env = NULL;
MemoryRegion *sysmem = get_system_memory();
... | [
"static void FUNC_0(ram_addr_t VAR_0,\nconst char *VAR_1,\nconst char *VAR_2,\nconst char *VAR_3,\nconst char *VAR_4,\nconst char *VAR_5)\n{",
"CPUState *env = NULL;",
"MemoryRegion *sysmem = get_system_memory();",
"MemoryRegion *ram = g_new(MemoryRegion, 1);",
"ram_addr_t kernel_size = 0;",
"ram_addr_t i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
2,
3,
4,
5,
6,
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
22
],
[
23
],
[
24
],
[
25
],
[
... |
2,339 | void host_to_target_siginfo(target_siginfo_t *tinfo, const siginfo_t *info)
{
host_to_target_siginfo_noswap(tinfo, info);
tswap_siginfo(tinfo, tinfo);
}
| true | qemu | 55d72a7eb32858d50ba0777cfde2027d007010b2 | void host_to_target_siginfo(target_siginfo_t *tinfo, const siginfo_t *info)
{
host_to_target_siginfo_noswap(tinfo, info);
tswap_siginfo(tinfo, tinfo);
}
| {
"code": [
" host_to_target_siginfo_noswap(tinfo, info);",
" tswap_siginfo(tinfo, tinfo);"
],
"line_no": [
5,
7
]
} | void FUNC_0(target_siginfo_t *VAR_0, const siginfo_t *VAR_1)
{
host_to_target_siginfo_noswap(VAR_0, VAR_1);
tswap_siginfo(VAR_0, VAR_0);
}
| [
"void FUNC_0(target_siginfo_t *VAR_0, const siginfo_t *VAR_1)\n{",
"host_to_target_siginfo_noswap(VAR_0, VAR_1);",
"tswap_siginfo(VAR_0, VAR_0);",
"}"
] | [
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
2,340 | static void ioapic_common_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = ioapic_common_realize;
dc->vmsd = &vmstate_ioapic_common;
dc->no_user = 1;
}
| true | qemu | efec3dd631d94160288392721a5f9c39e50fb2bc | static void ioapic_common_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = ioapic_common_realize;
dc->vmsd = &vmstate_ioapic_common;
dc->no_user = 1;
}
| {
"code": [
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;"... | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
dc->realize = ioapic_common_realize;
dc->vmsd = &vmstate_ioapic_common;
dc->no_user = 1;
}
| [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"dc->realize = ioapic_common_realize;",
"dc->vmsd = &vmstate_ioapic_common;",
"dc->no_user = 1;",
"}"
] | [
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
2,341 | uint64_t helper_cmpbge(uint64_t op1, uint64_t op2)
{
#if defined(__SSE2__)
uint64_t r;
/* The cmpbge instruction is heavily used in the implementation of
every string function on Alpha. We can do much better than either
the default loop below, or even an unrolled version by using the
... | true | qemu | f5790c3bc81702c98c7ddadedb274758cff8cbe7 | uint64_t helper_cmpbge(uint64_t op1, uint64_t op2)
{
#if defined(__SSE2__)
uint64_t r;
{
typedef uint64_t Q __attribute__((vector_size(16)));
typedef uint8_t B __attribute__((vector_size(16)));
Q q1 = (Q){ op1, 0 };
Q q2 = (Q){ op2, 0 };
q1 = (Q... | {
"code": [
"#if defined(__SSE2__)",
" uint64_t r;",
" typedef uint64_t Q __attribute__((vector_size(16)));",
" typedef uint8_t B __attribute__((vector_size(16)));",
" Q q1 = (Q){ op1, 0 };",
" Q q2 = (Q){ op2, 0 };",
" q1 = (Q)((B)q1 >= (B)q2);",
... | uint64_t FUNC_0(uint64_t op1, uint64_t op2)
{
#if defined(__SSE2__)
uint64_t r;
{
typedef uint64_t Q __attribute__((vector_size(16)));
typedef uint8_t B __attribute__((vector_size(16)));
Q VAR_0 = (Q){ op1, 0 };
Q VAR_1 = (Q){ op2, 0 };
VAR_0 = ... | [
"uint64_t FUNC_0(uint64_t op1, uint64_t op2)\n{",
"#if defined(__SSE2__)\nuint64_t r;",
"{",
"typedef uint64_t Q __attribute__((vector_size(16)));",
"typedef uint8_t B __attribute__((vector_size(16)));",
"Q VAR_0 = (Q){ op1, 0 };",
"Q VAR_1 = (Q){ op2, 0 };",
"VAR_0 = (Q)((B)VAR_0 >= (B)VAR_1);",
"r... | [
0,
1,
0,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1
] | [
[
1,
3
],
[
5,
7
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
33
],
[
37
],
[
39
],
[
45
],
[
53
],
[
59
],
[
65
],
[
73
],
[
75,
77
],
[
79
],
[
83
],
[
85... |
2,342 | int nbd_client_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset,
int bytes, BdrvRequestFlags flags)
{
NBDClientSession *client = nbd_get_client_session(bs);
NBDRequest request = {
.type = NBD_CMD_WRITE_ZEROES,
.from = offset,
.len = bytes,
... | true | qemu | 1104d83c726d2b20f9cec7b99ab3570a2fdbd46d | int nbd_client_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset,
int bytes, BdrvRequestFlags flags)
{
NBDClientSession *client = nbd_get_client_session(bs);
NBDRequest request = {
.type = NBD_CMD_WRITE_ZEROES,
.from = offset,
.len = bytes,
... | {
"code": [],
"line_no": []
} | int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,
int VAR_2, BdrvRequestFlags VAR_3)
{
NBDClientSession *client = nbd_get_client_session(VAR_0);
NBDRequest request = {
.type = NBD_CMD_WRITE_ZEROES,
.from = VAR_1,
.len = VAR_2,
};
if (!... | [
"int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,\nint VAR_2, BdrvRequestFlags VAR_3)\n{",
"NBDClientSession *client = nbd_get_client_session(VAR_0);",
"NBDRequest request = {",
".type = NBD_CMD_WRITE_ZEROES,\n.from = VAR_1,\n.len = VAR_2,\n};",
"if (!(client->info.VAR_3 & NBD_FLAG_SEND_WRITE_ZEROES)) {",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11,
13,
15,
17
],
[
22
],
[
24
],
[
26
],
[
30
],
[
32
],
[
34
],
[
36
],
[
38
],
[
40
],
[
42
],
[
46
],
[
48
]
] |
2,343 | static uint32_t get_cmd(ESPState *s, uint8_t *buf)
{
uint32_t dmalen;
int target;
dmalen = s->rregs[ESP_TCLO] | (s->rregs[ESP_TCMID] << 8);
target = s->wregs[ESP_WBUSID] & 7;
DPRINTF("get_cmd: len %d target %d\n", dmalen, target);
if (s->dma) {
s->dma_memory_read(s->dma_opaque,... | true | qemu | 8dea1dd406189dae6108104faf27f397835ae871 | static uint32_t get_cmd(ESPState *s, uint8_t *buf)
{
uint32_t dmalen;
int target;
dmalen = s->rregs[ESP_TCLO] | (s->rregs[ESP_TCMID] << 8);
target = s->wregs[ESP_WBUSID] & 7;
DPRINTF("get_cmd: len %d target %d\n", dmalen, target);
if (s->dma) {
s->dma_memory_read(s->dma_opaque,... | {
"code": [
" target = s->wregs[ESP_WBUSID] & 7;"
],
"line_no": [
13
]
} | static uint32_t FUNC_0(ESPState *s, uint8_t *buf)
{
uint32_t dmalen;
int VAR_0;
dmalen = s->rregs[ESP_TCLO] | (s->rregs[ESP_TCMID] << 8);
VAR_0 = s->wregs[ESP_WBUSID] & 7;
DPRINTF("FUNC_0: len %d VAR_0 %d\n", dmalen, VAR_0);
if (s->dma) {
s->dma_memory_read(s->dma_opaque, buf, ... | [
"static uint32_t FUNC_0(ESPState *s, uint8_t *buf)\n{",
"uint32_t dmalen;",
"int VAR_0;",
"dmalen = s->rregs[ESP_TCLO] | (s->rregs[ESP_TCMID] << 8);",
"VAR_0 = s->wregs[ESP_WBUSID] & 7;",
"DPRINTF(\"FUNC_0: len %d VAR_0 %d\\n\", dmalen, VAR_0);",
"if (s->dma) {",
"s->dma_memory_read(s->dma_opaque, buf... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
47
],
[
49... |
2,344 | static int opt_preset(const char *opt, const char *arg)
{
FILE *f=NULL;
char tmp[1000], tmp2[1000], line[1000];
int i;
const char *base[3]= { getenv("HOME"),
"/usr/local/share",
"/usr/share",
};
for(i=!base[0];... | true | FFmpeg | 3ddb448d0a31f63004b1e7aab1dc113e4b29a6fa | static int opt_preset(const char *opt, const char *arg)
{
FILE *f=NULL;
char tmp[1000], tmp2[1000], line[1000];
int i;
const char *base[3]= { getenv("HOME"),
"/usr/local/share",
"/usr/share",
};
for(i=!base[0];... | {
"code": [
" if(!f && ((arg[0]=='.' && arg[1]=='/') || arg[0]=='/')){"
],
"line_no": [
43
]
} | static int FUNC_0(const char *VAR_0, const char *VAR_1)
{
FILE *f=NULL;
char VAR_2[1000], VAR_3[1000], VAR_4[1000];
int VAR_5;
const char *VAR_6[3]= { getenv("HOME"),
"/usr/local/share",
"/usr/share",
};
for(VA... | [
"static int FUNC_0(const char *VAR_0, const char *VAR_1)\n{",
"FILE *f=NULL;",
"char VAR_2[1000], VAR_3[1000], VAR_4[1000];",
"int VAR_5;",
"const char *VAR_6[3]= { getenv(\"HOME\"),",
"\"/usr/local/share\",\n\"/usr/share\",\n};",
"for(VAR_5=!VAR_6[0]; VAR_5<3 && !f; VAR_5++){",
"snprintf(VAR_2, sizeo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13,
15,
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
2,345 | static USBDevice *usb_msd_init(USBBus *bus, const char *filename)
{
static int nr=0;
char id[8];
QemuOpts *opts;
DriveInfo *dinfo;
USBDevice *dev;
const char *p1;
char fmt[32];
/* parse -usbdevice disk: syntax into drive opts */
snprintf(id, sizeof(id), "usb%d", nr++);
... | true | qemu | 8be7e7e4c72c048b90e3482557954a24bba43ba7 | static USBDevice *usb_msd_init(USBBus *bus, const char *filename)
{
static int nr=0;
char id[8];
QemuOpts *opts;
DriveInfo *dinfo;
USBDevice *dev;
const char *p1;
char fmt[32];
snprintf(id, sizeof(id), "usb%d", nr++);
opts = qemu_opts_create(qemu_find_opts("drive"),... | {
"code": [
" opts = qemu_opts_create(qemu_find_opts(\"drive\"), id, 0);"
],
"line_no": [
25
]
} | static USBDevice *FUNC_0(USBBus *bus, const char *filename)
{
static int VAR_0=0;
char VAR_1[8];
QemuOpts *opts;
DriveInfo *dinfo;
USBDevice *dev;
const char *VAR_2;
char VAR_3[32];
snprintf(VAR_1, sizeof(VAR_1), "usb%d", VAR_0++);
opts = qemu_opts_create(qemu_find_... | [
"static USBDevice *FUNC_0(USBBus *bus, const char *filename)\n{",
"static int VAR_0=0;",
"char VAR_1[8];",
"QemuOpts *opts;",
"DriveInfo *dinfo;",
"USBDevice *dev;",
"const char *VAR_2;",
"char VAR_3[32];",
"snprintf(VAR_1, sizeof(VAR_1), \"usb%d\", VAR_0++);",
"opts = qemu_opts_create(qemu_find_o... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
2,346 | static void codebook_trellis_rate(AACEncContext *s, SingleChannelElement *sce,
int win, int group_len, const float lambda)
{
BandCodingPath path[120][12];
int w, swb, cb, start, size;
int i, j;
const int max_sfb = sce->ics.max_sfb;
const int run_bits = sce->... | true | FFmpeg | c5d4f87e81111427c0952278ec247fa8ab1e6e52 | static void codebook_trellis_rate(AACEncContext *s, SingleChannelElement *sce,
int win, int group_len, const float lambda)
{
BandCodingPath path[120][12];
int w, swb, cb, start, size;
int i, j;
const int max_sfb = sce->ics.max_sfb;
const int run_bits = sce->... | {
"code": [
" BandCodingPath path[120][12];",
" for (cb = 0; cb < 12; cb++) {",
" for (cb = 1; cb < 12; cb++)",
" put_bits(&s->pb, 4, stackcb[i]);",
" memset(sce->zeroes + win*16 + start, !stackcb[i], count);",
" sce->band_type[win*16 + start] = stackcb[i];",... | static void FUNC_0(AACEncContext *VAR_0, SingleChannelElement *VAR_1,
int VAR_2, int VAR_3, const float VAR_4)
{
BandCodingPath path[120][12];
int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;
int VAR_10, VAR_11;
const int VAR_12 = VAR_1->ics.VAR_12;
const int VAR_13 =... | [
"static void FUNC_0(AACEncContext *VAR_0, SingleChannelElement *VAR_1,\nint VAR_2, int VAR_3, const float VAR_4)\n{",
"BandCodingPath path[120][12];",
"int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;",
"int VAR_10, VAR_11;",
"const int VAR_12 = VAR_1->ics.VAR_12;",
"const int VAR_13 = VAR_1->ics.num_windows == 1 ... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
2,347 | av_cold void ff_mlpdsp_init_arm(MLPDSPContext *c)
{
int cpu_flags = av_get_cpu_flags();
if (have_armv5te(cpu_flags)) {
c->mlp_filter_channel = ff_mlp_filter_channel_arm;
}
} | true | FFmpeg | 89135716fd4c2963e01e0155547c47bf709f1aa3 | av_cold void ff_mlpdsp_init_arm(MLPDSPContext *c)
{
int cpu_flags = av_get_cpu_flags();
if (have_armv5te(cpu_flags)) {
c->mlp_filter_channel = ff_mlp_filter_channel_arm;
}
} | {
"code": [],
"line_no": []
} | av_cold void FUNC_0(MLPDSPContext *c)
{
int VAR_0 = av_get_cpu_flags();
if (have_armv5te(VAR_0)) {
c->mlp_filter_channel = ff_mlp_filter_channel_arm;
}
} | [
"av_cold void FUNC_0(MLPDSPContext *c)\n{",
"int VAR_0 = av_get_cpu_flags();",
"if (have_armv5te(VAR_0)) {",
"c->mlp_filter_channel = ff_mlp_filter_channel_arm;",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
14
],
[
16
]
] |
2,351 | void slirp_pollfds_poll(GArray *pollfds, int select_error)
{
Slirp *slirp;
struct socket *so, *so_next;
int ret;
if (QTAILQ_EMPTY(&slirp_instances)) {
return;
}
curtime = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);
QTAILQ_FOREACH(slirp, &slirp_instances, entry) {
... | true | qemu | bfb1ac14029ee72b19296109fba880c0551755d5 | void slirp_pollfds_poll(GArray *pollfds, int select_error)
{
Slirp *slirp;
struct socket *so, *so_next;
int ret;
if (QTAILQ_EMPTY(&slirp_instances)) {
return;
}
curtime = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);
QTAILQ_FOREACH(slirp, &slirp_instances, entry) {
... | {
"code": [
" sorecvoob(so);"
],
"line_no": [
115
]
} | void FUNC_0(GArray *VAR_0, int VAR_1)
{
Slirp *slirp;
struct socket *VAR_2, *VAR_3;
int VAR_4;
if (QTAILQ_EMPTY(&slirp_instances)) {
return;
}
curtime = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);
QTAILQ_FOREACH(slirp, &slirp_instances, entry) {
if (... | [
"void FUNC_0(GArray *VAR_0, int VAR_1)\n{",
"Slirp *slirp;",
"struct socket *VAR_2, *VAR_3;",
"int VAR_4;",
"if (QTAILQ_EMPTY(&slirp_instances)) {",
"return;",
"}",
"curtime = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);",
"QTAILQ_FOREACH(slirp, &slirp_instances, entry) {",
"if (slirp->time_fasttimo &&... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
63
... |
2,353 | SwsFunc yuv2rgb_init_mlib(SwsContext *c)
{
switch(c->dstFormat){
case PIX_FMT_RGB24: return mlib_YUV2RGB420_24;
case PIX_FMT_BGR32: return mlib_YUV2ARGB420_32;
case PIX_FMT_RGB32: return mlib_YUV2ABGR420_32;
default: return NULL;
}
}
| true | FFmpeg | 428098165de4c3edfe42c1b7f00627d287015863 | SwsFunc yuv2rgb_init_mlib(SwsContext *c)
{
switch(c->dstFormat){
case PIX_FMT_RGB24: return mlib_YUV2RGB420_24;
case PIX_FMT_BGR32: return mlib_YUV2ARGB420_32;
case PIX_FMT_RGB32: return mlib_YUV2ABGR420_32;
default: return NULL;
}
}
| {
"code": [
"\tswitch(c->dstFormat){",
"\tswitch(c->dstFormat){",
"\tswitch(c->dstFormat){",
"\tcase PIX_FMT_RGB24: return mlib_YUV2RGB420_24;",
"\tcase PIX_FMT_BGR32: return mlib_YUV2ARGB420_32;",
"\tcase PIX_FMT_RGB32: return mlib_YUV2ABGR420_32;",
"\tdefault: return NULL;"
],
"line_... | SwsFunc FUNC_0(SwsContext *c)
{
switch(c->dstFormat){
case PIX_FMT_RGB24: return mlib_YUV2RGB420_24;
case PIX_FMT_BGR32: return mlib_YUV2ARGB420_32;
case PIX_FMT_RGB32: return mlib_YUV2ABGR420_32;
default: return NULL;
}
}
| [
"SwsFunc FUNC_0(SwsContext *c)\n{",
"switch(c->dstFormat){",
"case PIX_FMT_RGB24: return mlib_YUV2RGB420_24;",
"case PIX_FMT_BGR32: return mlib_YUV2ARGB420_32;",
"case PIX_FMT_RGB32: return mlib_YUV2ABGR420_32;",
"default: return NULL;",
"}",
"}"
] | [
0,
1,
1,
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
2,354 | int ffio_ensure_seekback(AVIOContext *s, int64_t buf_size)
{
uint8_t *buffer;
int max_buffer_size = s->max_packet_size ?
s->max_packet_size : IO_BUFFER_SIZE;
int filled = s->buf_end - s->buffer;
ptrdiff_t checksum_ptr_offset = s->checksum_ptr ? s->checksum_ptr - s->buffer... | true | FFmpeg | dc87758775e2ce8be84e4fe598e12416e83d2845 | int ffio_ensure_seekback(AVIOContext *s, int64_t buf_size)
{
uint8_t *buffer;
int max_buffer_size = s->max_packet_size ?
s->max_packet_size : IO_BUFFER_SIZE;
int filled = s->buf_end - s->buffer;
ptrdiff_t checksum_ptr_offset = s->checksum_ptr ? s->checksum_ptr - s->buffer... | {
"code": [],
"line_no": []
} | int FUNC_0(AVIOContext *VAR_0, int64_t VAR_1)
{
uint8_t *buffer;
int VAR_2 = VAR_0->max_packet_size ?
VAR_0->max_packet_size : IO_BUFFER_SIZE;
int VAR_3 = VAR_0->buf_end - VAR_0->buffer;
ptrdiff_t checksum_ptr_offset = VAR_0->checksum_ptr ? VAR_0->checksum_ptr - VAR_0->bu... | [
"int FUNC_0(AVIOContext *VAR_0, int64_t VAR_1)\n{",
"uint8_t *buffer;",
"int VAR_2 = VAR_0->max_packet_size ?\nVAR_0->max_packet_size : IO_BUFFER_SIZE;",
"int VAR_3 = VAR_0->buf_end - VAR_0->buffer;",
"ptrdiff_t checksum_ptr_offset = VAR_0->checksum_ptr ? VAR_0->checksum_ptr - VAR_0->buffer : -1;",
"VAR_1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13
],
[
17
],
[
21,
23
],
[
25
],
[
29
],
[
31,
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
]
] |
2,355 | static void raise_mmu_exception(CPUMIPSState *env, target_ulong address,
int rw, int tlb_error)
{
CPUState *cs = CPU(mips_env_get_cpu(env));
int exception = 0, error_code = 0;
if (rw == MMU_INST_FETCH) {
error_code |= EXCP_INST_NOTAVAIL;
}
switch (... | true | qemu | 701074a6fc7470d0ed54e4a4bcd4d491ad8da22e | static void raise_mmu_exception(CPUMIPSState *env, target_ulong address,
int rw, int tlb_error)
{
CPUState *cs = CPU(mips_env_get_cpu(env));
int exception = 0, error_code = 0;
if (rw == MMU_INST_FETCH) {
error_code |= EXCP_INST_NOTAVAIL;
}
switch (... | {
"code": [],
"line_no": []
} | static void FUNC_0(CPUMIPSState *VAR_0, target_ulong VAR_1,
int VAR_2, int VAR_3)
{
CPUState *cs = CPU(mips_env_get_cpu(VAR_0));
int VAR_4 = 0, VAR_5 = 0;
if (VAR_2 == MMU_INST_FETCH) {
VAR_5 |= EXCP_INST_NOTAVAIL;
}
switch (VAR_3) {
default:
... | [
"static void FUNC_0(CPUMIPSState *VAR_0, target_ulong VAR_1,\nint VAR_2, int VAR_3)\n{",
"CPUState *cs = CPU(mips_env_get_cpu(VAR_0));",
"int VAR_4 = 0, VAR_5 = 0;",
"if (VAR_2 == MMU_INST_FETCH) {",
"VAR_5 |= EXCP_INST_NOTAVAIL;",
"}",
"switch (VAR_3) {",
"default:\ncase TLBRET_BADADDR:\nif (VAR_2 ==... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23,
25,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
47
],
[
49
],
[
51
],
[
53
],
[
55
... |
2,356 | static int decode_frame(WmallDecodeCtx *s)
{
GetBitContext* gb = &s->gb;
int more_frames = 0;
int len = 0;
int i;
/** check for potential output buffer overflow */
if (s->num_channels * s->samples_per_frame > s->samples_end - s->samples) {
/** return an error if no frame could ... | true | FFmpeg | dae7ff04160901a30a35af05f2f149b289c4f0b1 | static int decode_frame(WmallDecodeCtx *s)
{
GetBitContext* gb = &s->gb;
int more_frames = 0;
int len = 0;
int i;
if (s->num_channels * s->samples_per_frame > s->samples_end - s->samples) {
av_log(s->avctx, AV_LOG_ERROR,
"not enough space for the outp... | {
"code": [],
"line_no": []
} | static int FUNC_0(WmallDecodeCtx *VAR_0)
{
GetBitContext* gb = &VAR_0->gb;
int VAR_1 = 0;
int VAR_2 = 0;
int VAR_3;
if (VAR_0->num_channels * VAR_0->samples_per_frame > VAR_0->samples_end - VAR_0->samples) {
av_log(VAR_0->avctx, AV_LOG_ERROR,
"not eno... | [
"static int FUNC_0(WmallDecodeCtx *VAR_0)\n{",
"GetBitContext* gb = &VAR_0->gb;",
"int VAR_1 = 0;",
"int VAR_2 = 0;",
"int VAR_3;",
"if (VAR_0->num_channels * VAR_0->samples_per_frame > VAR_0->samples_end - VAR_0->samples) {",
"av_log(VAR_0->avctx, AV_LOG_ERROR,\n\"not enough space for the output sample... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
35,
37
],
[
43
],
[
45
],
[
47
],
[
49
],
[
55
],
[
57
],
[
59
],
[
67
... |
2,357 | static void rv34_idct_dc_add_c(uint8_t *dst, int stride, int dc)
{
const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
int i, j;
cm += (13*13*dc + 0x200) >> 10;
for (i = 0; i < 4; i++)
{
for (j = 0; j < 4; j++)
dst[j] = cm[ dst[j] ];
dst += stride;
}
}
| true | FFmpeg | 3ab9a2a5577d445252724af4067d2a7c8a378efa | static void rv34_idct_dc_add_c(uint8_t *dst, int stride, int dc)
{
const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
int i, j;
cm += (13*13*dc + 0x200) >> 10;
for (i = 0; i < 4; i++)
{
for (j = 0; j < 4; j++)
dst[j] = cm[ dst[j] ];
dst += stride;
}
}
| {
"code": [
"static void rv34_idct_dc_add_c(uint8_t *dst, int stride, int dc)"
],
"line_no": [
1
]
} | static void FUNC_0(uint8_t *VAR_0, int VAR_1, int VAR_2)
{
const uint8_t *VAR_3 = ff_cropTbl + MAX_NEG_CROP;
int VAR_4, VAR_5;
VAR_3 += (13*13*VAR_2 + 0x200) >> 10;
for (VAR_4 = 0; VAR_4 < 4; VAR_4++)
{
for (VAR_5 = 0; VAR_5 < 4; VAR_5++)
VAR_0[VAR_5] = VAR_3[ VAR_0[V... | [
"static void FUNC_0(uint8_t *VAR_0, int VAR_1, int VAR_2)\n{",
"const uint8_t *VAR_3 = ff_cropTbl + MAX_NEG_CROP;",
"int VAR_4, VAR_5;",
"VAR_3 += (13*13*VAR_2 + 0x200) >> 10;",
"for (VAR_4 = 0; VAR_4 < 4; VAR_4++)",
"{",
"for (VAR_5 = 0; VAR_5 < 4; VAR_5++)",
"VAR_0[VAR_5] = VAR_3[ VAR_0[VAR_5] ];",
... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
]
] |
2,359 | static void monitor_event(void *opaque, int event)
{
Monitor *mon = opaque;
switch (event) {
case CHR_EVENT_MUX_IN:
qemu_mutex_lock(&mon->out_lock);
mon->mux_out = 0;
qemu_mutex_unlock(&mon->out_lock);
if (mon->reset_seen) {
monitor_resume(mon);
... | true | qemu | e5554e2015f8fb452135f7b1ce1976536266379c | static void monitor_event(void *opaque, int event)
{
Monitor *mon = opaque;
switch (event) {
case CHR_EVENT_MUX_IN:
qemu_mutex_lock(&mon->out_lock);
mon->mux_out = 0;
qemu_mutex_unlock(&mon->out_lock);
if (mon->reset_seen) {
monitor_resume(mon);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, int VAR_1)
{
Monitor *mon = VAR_0;
switch (VAR_1) {
case CHR_EVENT_MUX_IN:
qemu_mutex_lock(&mon->out_lock);
mon->mux_out = 0;
qemu_mutex_unlock(&mon->out_lock);
if (mon->reset_seen) {
monitor_resume(mon);
mo... | [
"static void FUNC_0(void *VAR_0, int VAR_1)\n{",
"Monitor *mon = VAR_0;",
"switch (VAR_1) {",
"case CHR_EVENT_MUX_IN:\nqemu_mutex_lock(&mon->out_lock);",
"mon->mux_out = 0;",
"qemu_mutex_unlock(&mon->out_lock);",
"if (mon->reset_seen) {",
"monitor_resume(mon);",
"monitor_flush(mon);",
"} else {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15
],
[
17
],
[
19
],
[
22
],
[
24
],
[
26
],
[
28
],
[
30
],
[
32
],
[
36,
38
],
[
40
],
[
42
],
[
44
],
[
46
],
[
48... |
2,360 | static ExitStatus gen_mtpr(DisasContext *ctx, TCGv vb, int regno)
{
TCGv tmp;
int data;
switch (regno) {
case 255:
/* TBIA */
gen_helper_tbia(cpu_env);
break;
case 254:
/* TBIS */
gen_helper_tbis(cpu_env, vb);
break;
case 253:
... | true | qemu | a4535b8e3ef2b41e0e7d42293db912d44ad812f0 | static ExitStatus gen_mtpr(DisasContext *ctx, TCGv vb, int regno)
{
TCGv tmp;
int data;
switch (regno) {
case 255:
gen_helper_tbia(cpu_env);
break;
case 254:
gen_helper_tbis(cpu_env, vb);
break;
case 253:
tmp... | {
"code": [
" TCGv tmp;",
" tmp = tcg_const_i64(1);",
" tcg_gen_st32_i64(tmp, cpu_env, -offsetof(AlphaCPU, env) +",
" offsetof(CPUState, halted));"
],
"line_no": [
5,
37,
39,
41
]
} | static ExitStatus FUNC_0(DisasContext *ctx, TCGv vb, int regno)
{
TCGv tmp;
int VAR_0;
switch (regno) {
case 255:
gen_helper_tbia(cpu_env);
break;
case 254:
gen_helper_tbis(cpu_env, vb);
break;
case 253:
tmp ... | [
"static ExitStatus FUNC_0(DisasContext *ctx, TCGv vb, int regno)\n{",
"TCGv tmp;",
"int VAR_0;",
"switch (regno) {",
"case 255:\ngen_helper_tbia(cpu_env);",
"break;",
"case 254:\ngen_helper_tbis(cpu_env, vb);",
"break;",
"case 253:\ntmp = tcg_const_i64(1);",
"tcg_gen_st32_i64(tmp, cpu_env, -offset... | [
0,
1,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
17
],
[
19
],
[
23,
27
],
[
29
],
[
33,
37
],
[
39,
41
],
[
43
],
[
47,
51
],
[
53
],
[
57,
61
],
[
63
],
[
67,
71
],
... |
2,361 | static bool key_is_missing(const BlockInfo *bdev)
{
return (bdev->inserted && bdev->inserted->encryption_key_missing);
}
| true | qemu | 788cf9f8c8cbda53843e060540f3e91a060eb744 | static bool key_is_missing(const BlockInfo *bdev)
{
return (bdev->inserted && bdev->inserted->encryption_key_missing);
}
| {
"code": [
"static bool key_is_missing(const BlockInfo *bdev)",
" return (bdev->inserted && bdev->inserted->encryption_key_missing);"
],
"line_no": [
1,
5
]
} | static bool FUNC_0(const BlockInfo *bdev)
{
return (bdev->inserted && bdev->inserted->encryption_key_missing);
}
| [
"static bool FUNC_0(const BlockInfo *bdev)\n{",
"return (bdev->inserted && bdev->inserted->encryption_key_missing);",
"}"
] | [
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
2,362 | static int64_t ivshmem_recv_msg(IVShmemState *s, int *pfd, Error **errp)
{
int64_t msg;
int n, ret;
n = 0;
do {
ret = qemu_chr_fe_read_all(&s->server_chr, (uint8_t *)&msg + n,
sizeof(msg) - n);
if (ret < 0) {
if (ret == -EINTR) {
... | true | qemu | 51af0ec9fa7269f0c69aa50a1a24748b4edc4b44 | static int64_t ivshmem_recv_msg(IVShmemState *s, int *pfd, Error **errp)
{
int64_t msg;
int n, ret;
n = 0;
do {
ret = qemu_chr_fe_read_all(&s->server_chr, (uint8_t *)&msg + n,
sizeof(msg) - n);
if (ret < 0) {
if (ret == -EINTR) {
... | {
"code": [
" return msg;"
],
"line_no": [
41
]
} | static int64_t FUNC_0(IVShmemState *s, int *pfd, Error **errp)
{
int64_t msg;
int VAR_0, VAR_1;
VAR_0 = 0;
do {
VAR_1 = qemu_chr_fe_read_all(&s->server_chr, (uint8_t *)&msg + VAR_0,
sizeof(msg) - VAR_0);
if (VAR_1 < 0) {
if (VAR_1... | [
"static int64_t FUNC_0(IVShmemState *s, int *pfd, Error **errp)\n{",
"int64_t msg;",
"int VAR_0, VAR_1;",
"VAR_0 = 0;",
"do {",
"VAR_1 = qemu_chr_fe_read_all(&s->server_chr, (uint8_t *)&msg + VAR_0,\nsizeof(msg) - VAR_0);",
"if (VAR_1 < 0) {",
"if (VAR_1 == -EINTR) {",
"continue;",
"}",
"error_s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
]
] |
2,363 | static USBDevice *usb_bt_init(USBBus *bus, const char *cmdline)
{
USBDevice *dev;
struct USBBtState *s;
HCIInfo *hci;
const char *name = "usb-bt-dongle";
if (*cmdline) {
hci = hci_init(cmdline);
} else {
hci = bt_new_hci(qemu_find_bt_vlan(0));
}
if (!hci)
... | true | qemu | 3bc36a401e0f33e63a4d2c58b646ddf78efb567c | static USBDevice *usb_bt_init(USBBus *bus, const char *cmdline)
{
USBDevice *dev;
struct USBBtState *s;
HCIInfo *hci;
const char *name = "usb-bt-dongle";
if (*cmdline) {
hci = hci_init(cmdline);
} else {
hci = bt_new_hci(qemu_find_bt_vlan(0));
}
if (!hci)
... | {
"code": [
" if (qdev_init(&dev->qdev) < 0) {",
" error_report(\"Failed to initialize USB device '%s'\", name);",
" return NULL;",
" return NULL;"
],
"line_no": [
37,
39,
27,
27
]
} | static USBDevice *FUNC_0(USBBus *bus, const char *cmdline)
{
USBDevice *dev;
struct USBBtState *VAR_0;
HCIInfo *hci;
const char *VAR_1 = "usb-bt-dongle";
if (*cmdline) {
hci = hci_init(cmdline);
} else {
hci = bt_new_hci(qemu_find_bt_vlan(0));
}
if (!hci)
... | [
"static USBDevice *FUNC_0(USBBus *bus, const char *cmdline)\n{",
"USBDevice *dev;",
"struct USBBtState *VAR_0;",
"HCIInfo *hci;",
"const char *VAR_1 = \"usb-bt-dongle\";",
"if (*cmdline) {",
"hci = hci_init(cmdline);",
"} else {",
"hci = bt_new_hci(qemu_find_bt_vlan(0));",
"}",
"if (!hci)\nretur... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[... |
2,364 | static void pre_process_video_frame(InputStream *ist, AVPicture *picture, void **bufp)
{
AVCodecContext *dec;
AVPicture *picture2;
AVPicture picture_tmp;
uint8_t *buf = 0;
dec = ist->st->codec;
/* deinterlace : must be done before any resize */
if (FF_API_DEINTERLACE && do_deinte... | false | FFmpeg | 4257b804e2354db07e66ebfd966d7d13f49c7895 | static void pre_process_video_frame(InputStream *ist, AVPicture *picture, void **bufp)
{
AVCodecContext *dec;
AVPicture *picture2;
AVPicture picture_tmp;
uint8_t *buf = 0;
dec = ist->st->codec;
if (FF_API_DEINTERLACE && do_deinterlace) {
int size;
s... | {
"code": [],
"line_no": []
} | static void FUNC_0(InputStream *VAR_0, AVPicture *VAR_1, void **VAR_2)
{
AVCodecContext *dec;
AVPicture *picture2;
AVPicture picture_tmp;
uint8_t *buf = 0;
dec = VAR_0->st->codec;
if (FF_API_DEINTERLACE && do_deinterlace) {
int VAR_3;
VAR_3 = avpict... | [
"static void FUNC_0(InputStream *VAR_0, AVPicture *VAR_1, void **VAR_2)\n{",
"AVCodecContext *dec;",
"AVPicture *picture2;",
"AVPicture picture_tmp;",
"uint8_t *buf = 0;",
"dec = VAR_0->st->codec;",
"if (FF_API_DEINTERLACE && do_deinterlace) {",
"int VAR_3;",
"VAR_3 = avpicture_get_size(dec->pix_fmt... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
21
],
[
23
],
[
29
],
[
31,
33
],
[
35
],
[
37,
39
],
[
43
],
[
45
],
[
49,
51
],
[
55
],
[
57
],
[
59
],
[... |
2,366 | static int vc1_decode_p_mb_intfi(VC1Context *v)
{
MpegEncContext *s = &v->s;
GetBitContext *gb = &s->gb;
int i;
int mb_pos = s->mb_x + s->mb_y * s->mb_stride;
int cbp = 0; /* cbp decoding stuff */
int mqdiff, mquant; /* MB quantization */
int ttmb = v->ttfrm; /* MB Transform type */
... | false | FFmpeg | f6b195cfb9712ae5032881d5dd8c4effb26be0fb | static int vc1_decode_p_mb_intfi(VC1Context *v)
{
MpegEncContext *s = &v->s;
GetBitContext *gb = &s->gb;
int i;
int mb_pos = s->mb_x + s->mb_y * s->mb_stride;
int cbp = 0;
int mqdiff, mquant;
int ttmb = v->ttfrm;
int mb_has_coeffs = 1;
int dmv_x, dmv_y;
int val;... | {
"code": [],
"line_no": []
} | static int FUNC_0(VC1Context *VAR_0)
{
MpegEncContext *s = &VAR_0->s;
GetBitContext *gb = &s->gb;
int VAR_1;
int VAR_2 = s->mb_x + s->mb_y * s->mb_stride;
int VAR_3 = 0;
int VAR_4, VAR_5;
int VAR_6 = VAR_0->ttfrm;
int VAR_7 = 1;
int VAR_8, VAR_9;
int VAR_10;
... | [
"static int FUNC_0(VC1Context *VAR_0)\n{",
"MpegEncContext *s = &VAR_0->s;",
"GetBitContext *gb = &s->gb;",
"int VAR_1;",
"int VAR_2 = s->mb_x + s->mb_y * s->mb_stride;",
"int VAR_3 = 0;",
"int VAR_4, VAR_5;",
"int VAR_6 = VAR_0->ttfrm;",
"int VAR_7 = 1;",
"int VAR_8, VAR_9;",
"int VAR_10;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
43
],
[
45
],
[
47
... |
2,368 | static bool virtio_scsi_data_plane_handle_ctrl(VirtIODevice *vdev,
VirtQueue *vq)
{
VirtIOSCSI *s = VIRTIO_SCSI(vdev);
assert(s->ctx && s->dataplane_started);
return virtio_scsi_handle_ctrl_vq(s, vq);
}
| true | qemu | 71407786054cad26de7ef66718b2a57a4bcb49b5 | static bool virtio_scsi_data_plane_handle_ctrl(VirtIODevice *vdev,
VirtQueue *vq)
{
VirtIOSCSI *s = VIRTIO_SCSI(vdev);
assert(s->ctx && s->dataplane_started);
return virtio_scsi_handle_ctrl_vq(s, vq);
}
| {
"code": [
" return virtio_scsi_handle_ctrl_vq(s, vq);"
],
"line_no": [
13
]
} | static bool FUNC_0(VirtIODevice *vdev,
VirtQueue *vq)
{
VirtIOSCSI *s = VIRTIO_SCSI(vdev);
assert(s->ctx && s->dataplane_started);
return virtio_scsi_handle_ctrl_vq(s, vq);
}
| [
"static bool FUNC_0(VirtIODevice *vdev,\nVirtQueue *vq)\n{",
"VirtIOSCSI *s = VIRTIO_SCSI(vdev);",
"assert(s->ctx && s->dataplane_started);",
"return virtio_scsi_handle_ctrl_vq(s, vq);",
"}"
] | [
0,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
]
] |
2,369 | static void start_tcg_kick_timer(void)
{
if (!tcg_kick_vcpu_timer && CPU_NEXT(first_cpu)) {
tcg_kick_vcpu_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL,
kick_tcg_thread, NULL);
timer_mod(tcg_kick_vcpu_timer, qemu_tcg_next_kick());
}
}
| true | qemu | 372579427a5040a26dfee78464b50e2bdf27ef26 | static void start_tcg_kick_timer(void)
{
if (!tcg_kick_vcpu_timer && CPU_NEXT(first_cpu)) {
tcg_kick_vcpu_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL,
kick_tcg_thread, NULL);
timer_mod(tcg_kick_vcpu_timer, qemu_tcg_next_kick());
}
}
| {
"code": [
" if (!tcg_kick_vcpu_timer && CPU_NEXT(first_cpu)) {"
],
"line_no": [
5
]
} | static void FUNC_0(void)
{
if (!tcg_kick_vcpu_timer && CPU_NEXT(first_cpu)) {
tcg_kick_vcpu_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL,
kick_tcg_thread, NULL);
timer_mod(tcg_kick_vcpu_timer, qemu_tcg_next_kick());
}
}
| [
"static void FUNC_0(void)\n{",
"if (!tcg_kick_vcpu_timer && CPU_NEXT(first_cpu)) {",
"tcg_kick_vcpu_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL,\nkick_tcg_thread, NULL);",
"timer_mod(tcg_kick_vcpu_timer, qemu_tcg_next_kick());",
"}",
"}"
] | [
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13
],
[
15
]
] |
2,370 | static void rtc_periodic_timer(void *opaque)
{
RTCState *s = opaque;
rtc_timer_update(s, s->next_periodic_time);
#ifdef TARGET_I386
if ((s->cmos_data[RTC_REG_C] & 0xc0) && rtc_td_hack) {
s->irq_coalesced++;
return;
}
#endif
if (s->cmos_data[RTC_REG_B] & REG_B_PIE) {
... | true | qemu | 93b665693dd4afd32c89b0d5ee2b407b26a7a3bc | static void rtc_periodic_timer(void *opaque)
{
RTCState *s = opaque;
rtc_timer_update(s, s->next_periodic_time);
#ifdef TARGET_I386
if ((s->cmos_data[RTC_REG_C] & 0xc0) && rtc_td_hack) {
s->irq_coalesced++;
return;
}
#endif
if (s->cmos_data[RTC_REG_B] & REG_B_PIE) {
... | {
"code": [
"#ifdef TARGET_I386",
" if ((s->cmos_data[RTC_REG_C] & 0xc0) && rtc_td_hack) {",
" s->irq_coalesced++;",
"#endif",
"#ifdef TARGET_I386",
"#endif"
],
"line_no": [
11,
13,
15,
21,
11,
21
]
} | static void FUNC_0(void *VAR_0)
{
RTCState *s = VAR_0;
rtc_timer_update(s, s->next_periodic_time);
#ifdef TARGET_I386
if ((s->cmos_data[RTC_REG_C] & 0xc0) && rtc_td_hack) {
s->irq_coalesced++;
return;
}
#endif
if (s->cmos_data[RTC_REG_B] & REG_B_PIE) {
s->cmos_da... | [
"static void FUNC_0(void *VAR_0)\n{",
"RTCState *s = VAR_0;",
"rtc_timer_update(s, s->next_periodic_time);",
"#ifdef TARGET_I386\nif ((s->cmos_data[RTC_REG_C] & 0xc0) && rtc_td_hack) {",
"s->irq_coalesced++;",
"return;",
"}",
"#endif\nif (s->cmos_data[RTC_REG_B] & REG_B_PIE) {",
"s->cmos_data[RTC_RE... | [
0,
0,
0,
1,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
37
],
[
39
],
[
41
]
] |
2,371 | void do_m68k_semihosting(CPUM68KState *env, int nr)
{
uint32_t args;
void *p;
void *q;
uint32_t len;
uint32_t result;
args = env->dregs[1];
switch (nr) {
case HOSTED_EXIT:
gdb_exit(env, env->dregs[0]);
exit(env->dregs[0]);
case HOSTED_OPEN:
if (... | true | qemu | 5382a012e8ce7cf5ea612d291286be827574c181 | void do_m68k_semihosting(CPUM68KState *env, int nr)
{
uint32_t args;
void *p;
void *q;
uint32_t len;
uint32_t result;
args = env->dregs[1];
switch (nr) {
case HOSTED_EXIT:
gdb_exit(env, env->dregs[0]);
exit(env->dregs[0]);
case HOSTED_OPEN:
if (... | {
"code": [
" long ret;",
" if (ret != -1)"
],
"line_no": [
419,
437
]
} | void FUNC_0(CPUM68KState *VAR_0, int VAR_1)
{
uint32_t args;
void *VAR_6;
void *VAR_3;
uint32_t len;
uint32_t result;
args = VAR_0->dregs[1];
switch (VAR_1) {
case HOSTED_EXIT:
gdb_exit(VAR_0, VAR_0->dregs[0]);
exit(VAR_0->dregs[0]);
case HOSTED_OPEN:
... | [
"void FUNC_0(CPUM68KState *VAR_0, int VAR_1)\n{",
"uint32_t args;",
"void *VAR_6;",
"void *VAR_3;",
"uint32_t len;",
"uint32_t result;",
"args = VAR_0->dregs[1];",
"switch (VAR_1) {",
"case HOSTED_EXIT:\ngdb_exit(VAR_0, VAR_0->dregs[0]);",
"exit(VAR_0->dregs[0]);",
"case HOSTED_OPEN:\nif (use_gd... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27,
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[... |
2,372 | static uint8_t get_tlm(Jpeg2000DecoderContext *s, int n)
{
uint8_t Stlm, ST, SP, tile_tlm, i;
bytestream_get_byte(&s->buf); /* Ztlm: skipped */
Stlm = bytestream_get_byte(&s->buf);
// too complex ? ST = ((Stlm >> 4) & 0x01) + ((Stlm >> 4) & 0x02);
ST = (Stlm >> 4) & 0x03;
... | true | FFmpeg | 1a3598aae768465a8efc8475b6df5a8261bc62fc | static uint8_t get_tlm(Jpeg2000DecoderContext *s, int n)
{
uint8_t Stlm, ST, SP, tile_tlm, i;
bytestream_get_byte(&s->buf);
Stlm = bytestream_get_byte(&s->buf);
ST = (Stlm >> 4) & 0x03;
SP = (Stlm >> 6) & 0x01;
tile_tlm = (n - 4) / ((SP + 1) * 2 + ST);
... | {
"code": [
" Stlm = bytestream_get_byte(&s->buf);",
" bytestream_get_byte(&s->buf);",
" bytestream_get_be16(&s->buf);",
" bytestream_get_be32(&s->buf);",
" bytestream_get_be16(&s->buf);",
" bytestream_get_be32(&s->buf);"
],
"line_n... | static uint8_t FUNC_0(Jpeg2000DecoderContext *s, int n)
{
uint8_t Stlm, ST, SP, tile_tlm, i;
bytestream_get_byte(&s->buf);
Stlm = bytestream_get_byte(&s->buf);
ST = (Stlm >> 4) & 0x03;
SP = (Stlm >> 6) & 0x01;
tile_tlm = (n - 4) / ((SP + 1) * 2 + ST);
... | [
"static uint8_t FUNC_0(Jpeg2000DecoderContext *s, int n)\n{",
"uint8_t Stlm, ST, SP, tile_tlm, i;",
"bytestream_get_byte(&s->buf);",
"Stlm = bytestream_get_byte(&s->buf);",
"ST = (Stlm >> 4) & 0x03;",
"SP = (Stlm >> 6) & 0x01;",
"tile_tlm = (n - 4) / ((SP + 1) * 2 + ST);",
"for (i = 0; i < tile_... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31,
33
],
[
35
],
[
37,
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
[
51
... |
2,373 | static int decode_seq_header(AVSContext *h) {
MpegEncContext *s = &h->s;
int frame_rate_code;
int width, height;
h->profile = get_bits(&s->gb,8);
h->level = get_bits(&s->gb,8);
skip_bits1(&s->gb); //progressive sequence
width = get_bits(&s->gb,14);
... | true | FFmpeg | f9505923a344a56c3ff36925adb7f0c3c9a3996c | static int decode_seq_header(AVSContext *h) {
MpegEncContext *s = &h->s;
int frame_rate_code;
int width, height;
h->profile = get_bits(&s->gb,8);
h->level = get_bits(&s->gb,8);
skip_bits1(&s->gb);
width = get_bits(&s->gb,14);
height = ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVSContext *VAR_0) {
MpegEncContext *s = &VAR_0->s;
int VAR_1;
int VAR_2, VAR_3;
VAR_0->profile = get_bits(&s->gb,8);
VAR_0->level = get_bits(&s->gb,8);
skip_bits1(&s->gb);
VAR_2 = get_bits(&s->gb,14);
VAR_3 = get_bi... | [
"static int FUNC_0(AVSContext *VAR_0) {",
"MpegEncContext *s = &VAR_0->s;",
"int VAR_1;",
"int VAR_2, VAR_3;",
"VAR_0->profile = get_bits(&s->gb,8);",
"VAR_0->level = get_bits(&s->gb,8);",
"skip_bits1(&s->gb);",
"VAR_2 = get_bits(&s->gb,14);",
"VAR_3 = get_bits(&... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
32
],
[
34
],
[
36
],
[
38
],
[
40
],
[
42
],
[
44
],
[
46
],
... |
2,374 | static int qemu_chr_open_win_pipe(QemuOpts *opts, CharDriverState **_chr)
{
const char *filename = qemu_opt_get(opts, "path");
CharDriverState *chr;
WinCharState *s;
chr = g_malloc0(sizeof(CharDriverState));
s = g_malloc0(sizeof(WinCharState));
chr->opaque = s;
chr->chr_write = win... | true | qemu | 1f51470d044852592922f91000e741c381582cdc | static int qemu_chr_open_win_pipe(QemuOpts *opts, CharDriverState **_chr)
{
const char *filename = qemu_opt_get(opts, "path");
CharDriverState *chr;
WinCharState *s;
chr = g_malloc0(sizeof(CharDriverState));
s = g_malloc0(sizeof(WinCharState));
chr->opaque = s;
chr->chr_write = win... | {
"code": [
" *_chr = chr;",
" return 0;",
" *_chr = chr;",
" return 0;",
" *_chr = chr;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" *_chr = chr;",
" return 0;",
" *_chr = chr;",
" return 0;",
" *_chr = c... | static int FUNC_0(QemuOpts *VAR_0, CharDriverState **VAR_1)
{
const char *VAR_2 = qemu_opt_get(VAR_0, "path");
CharDriverState *chr;
WinCharState *s;
chr = g_malloc0(sizeof(CharDriverState));
s = g_malloc0(sizeof(WinCharState));
chr->opaque = s;
chr->chr_write = win_chr_write;
... | [
"static int FUNC_0(QemuOpts *VAR_0, CharDriverState **VAR_1)\n{",
"const char *VAR_2 = qemu_opt_get(VAR_0, \"path\");",
"CharDriverState *chr;",
"WinCharState *s;",
"chr = g_malloc0(sizeof(CharDriverState));",
"s = g_malloc0(sizeof(WinCharState));",
"chr->opaque = s;",
"chr->chr_write = win_chr_write;... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
]
] |
2,375 | SnapshotInfo *qmp_blockdev_snapshot_delete_internal_sync(const char *device,
bool has_id,
const char *id,
bool has_name,
... | true | qemu | 5839e53bbc0fec56021d758aab7610df421ed8c8 | SnapshotInfo *qmp_blockdev_snapshot_delete_internal_sync(const char *device,
bool has_id,
const char *id,
bool has_name,
... | {
"code": [
" info = g_malloc0(sizeof(SnapshotInfo));"
],
"line_no": [
101
]
} | SnapshotInfo *FUNC_0(const char *device,
bool has_id,
const char *id,
bool has_name,
con... | [
"SnapshotInfo *FUNC_0(const char *device,\nbool has_id,\nconst char *id,\nbool has_name,\nconst char *name,\nError **errp)\n{",
"BlockDriverState *bs = bdrv_find(device);",
"QEMUSnapshotInfo sn;",
"Error *local_err = NULL;",
"SnapshotInfo *info = NULL;",
"int VAR_0;",
"if (!bs) {",
"error_set(errp, QE... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
53
],
[... |
2,377 | static int proxy_socket(const char *path, uid_t uid, gid_t gid)
{
int sock, client;
struct sockaddr_un proxy, qemu;
socklen_t size;
/* requested socket already exists, refuse to start */
if (!access(path, F_OK)) {
do_log(LOG_CRIT, "socket already exists\n");
return -1;
... | true | qemu | 25ee9a7fa3f4e09fde48bb184447ff5651ed5fd8 | static int proxy_socket(const char *path, uid_t uid, gid_t gid)
{
int sock, client;
struct sockaddr_un proxy, qemu;
socklen_t size;
if (!access(path, F_OK)) {
do_log(LOG_CRIT, "socket already exists\n");
return -1;
}
sock = socket(AF_UNIX, SOCK_STREAM, 0);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0, uid_t VAR_1, gid_t VAR_2)
{
int VAR_3, VAR_4;
struct sockaddr_un VAR_5, VAR_6;
socklen_t size;
if (!access(VAR_0, F_OK)) {
do_log(LOG_CRIT, "socket already exists\n");
return -1;
}
VAR_3 = socket(AF_UNIX, SOCK_STREAM, 0);
... | [
"static int FUNC_0(const char *VAR_0, uid_t VAR_1, gid_t VAR_2)\n{",
"int VAR_3, VAR_4;",
"struct sockaddr_un VAR_5, VAR_6;",
"socklen_t size;",
"if (!access(VAR_0, F_OK)) {",
"do_log(LOG_CRIT, \"socket already exists\\n\");",
"return -1;",
"}",
"VAR_3 = socket(AF_UNIX, SOCK_STREAM, 0);",
"if (VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
15
],
[
17
],
[
19
],
[
21
],
[
26
],
[
28
],
[
30
],
[
32
],
[
34
],
[
40
],
[
44
],
[
46
],
[
48,
50
],
[
52
],
[
54
],
[... |
2,378 | void *qemu_ram_mmap(int fd, size_t size, size_t align, bool shared)
{
/*
* Note: this always allocates at least one extra page of virtual address
* space, even if size is already aligned.
*/
size_t total = size + align;
void *ptr = mmap(0, total, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE,... | true | qemu | 9d4ec9370a36f8a564e1ba05519328c0bd60da13 | void *qemu_ram_mmap(int fd, size_t size, size_t align, bool shared)
{
size_t total = size + align;
void *ptr = mmap(0, total, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
size_t offset = QEMU_ALIGN_UP((uintptr_t)ptr, align) - (uintptr_t)ptr;
void *ptr1;
if (ptr == MAP_FAILED) ... | {
"code": [
" return NULL;",
" return NULL;"
],
"line_no": [
25,
25
]
} | void *FUNC_0(int VAR_0, size_t VAR_1, size_t VAR_2, bool VAR_3)
{
size_t total = VAR_1 + VAR_2;
void *VAR_4 = mmap(0, total, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
size_t offset = QEMU_ALIGN_UP((uintptr_t)VAR_4, VAR_2) - (uintptr_t)VAR_4;
void *VAR_5;
if (VAR_4 == MAP_FA... | [
"void *FUNC_0(int VAR_0, size_t VAR_1, size_t VAR_2, bool VAR_3)\n{",
"size_t total = VAR_1 + VAR_2;",
"void *VAR_4 = mmap(0, total, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);",
"size_t offset = QEMU_ALIGN_UP((uintptr_t)VAR_4, VAR_2) - (uintptr_t)VAR_4;",
"void *VAR_5;",
"if (VAR_4 == MAP_FAILED) {",... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
33
],
[
37
],
[
41,
43,
45,
47,
49
],
[
51
],
[
53
],
[
55
],
[
57
],
[
61
],
[
63
],
[
... |
2,379 | start_list(Visitor *v, const char *name, Error **errp)
{
StringInputVisitor *siv = to_siv(v);
parse_str(siv, errp);
siv->cur_range = g_list_first(siv->ranges);
if (siv->cur_range) {
Range *r = siv->cur_range->data;
if (r) {
siv->cur = r->begin;
}
}
... | true | qemu | 74f24cb6306d065045d0e2215a7d10533fa59c57 | start_list(Visitor *v, const char *name, Error **errp)
{
StringInputVisitor *siv = to_siv(v);
parse_str(siv, errp);
siv->cur_range = g_list_first(siv->ranges);
if (siv->cur_range) {
Range *r = siv->cur_range->data;
if (r) {
siv->cur = r->begin;
}
}
... | {
"code": [
" parse_str(siv, errp);",
" parse_str(siv, errp);"
],
"line_no": [
9,
9
]
} | FUNC_0(Visitor *VAR_0, const char *VAR_1, Error **VAR_2)
{
StringInputVisitor *siv = to_siv(VAR_0);
parse_str(siv, VAR_2);
siv->cur_range = g_list_first(siv->ranges);
if (siv->cur_range) {
Range *r = siv->cur_range->data;
if (r) {
siv->cur = r->begin;
}
... | [
"FUNC_0(Visitor *VAR_0, const char *VAR_1, Error **VAR_2)\n{",
"StringInputVisitor *siv = to_siv(VAR_0);",
"parse_str(siv, VAR_2);",
"siv->cur_range = g_list_first(siv->ranges);",
"if (siv->cur_range) {",
"Range *r = siv->cur_range->data;",
"if (r) {",
"siv->cur = r->begin;",
"}",
"}",
"}"
] | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
2,380 | void fw_cfg_add_i16(FWCfgState *s, uint16_t key, uint16_t value)
{
uint16_t *copy;
copy = g_malloc(sizeof(value));
*copy = cpu_to_le16(value);
fw_cfg_add_bytes(s, key, (uint8_t *)copy, sizeof(value));
}
| true | qemu | 089da572b956ef0f8f5b8d5917358e07892a77c2 | void fw_cfg_add_i16(FWCfgState *s, uint16_t key, uint16_t value)
{
uint16_t *copy;
copy = g_malloc(sizeof(value));
*copy = cpu_to_le16(value);
fw_cfg_add_bytes(s, key, (uint8_t *)copy, sizeof(value));
}
| {
"code": [
" fw_cfg_add_bytes(s, key, (uint8_t *)copy, sizeof(value));",
" fw_cfg_add_bytes(s, key, (uint8_t *)copy, sizeof(value));",
" fw_cfg_add_bytes(s, key, (uint8_t *)copy, sizeof(value));"
],
"line_no": [
13,
13,
13
]
} | void FUNC_0(FWCfgState *VAR_0, uint16_t VAR_1, uint16_t VAR_2)
{
uint16_t *copy;
copy = g_malloc(sizeof(VAR_2));
*copy = cpu_to_le16(VAR_2);
fw_cfg_add_bytes(VAR_0, VAR_1, (uint8_t *)copy, sizeof(VAR_2));
}
| [
"void FUNC_0(FWCfgState *VAR_0, uint16_t VAR_1, uint16_t VAR_2)\n{",
"uint16_t *copy;",
"copy = g_malloc(sizeof(VAR_2));",
"*copy = cpu_to_le16(VAR_2);",
"fw_cfg_add_bytes(VAR_0, VAR_1, (uint8_t *)copy, sizeof(VAR_2));",
"}"
] | [
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
2,381 | void FUNC(ff_emulated_edge_mc)(uint8_t *buf, const uint8_t *src,
ptrdiff_t linesize_arg,
int block_w, int block_h,
int src_x, int src_y, int w, int h)
{
int x, y;
int start_y, start_x, end_y, ... | true | FFmpeg | c341f734e5f9d6af4a8fdcceb6f5d12de6395c76 | void FUNC(ff_emulated_edge_mc)(uint8_t *buf, const uint8_t *src,
ptrdiff_t linesize_arg,
int block_w, int block_h,
int src_x, int src_y, int w, int h)
{
int x, y;
int start_y, start_x, end_y, ... | {
"code": [
" ptrdiff_t linesize_arg,",
" emuedge_linesize_type linesize = linesize_arg;",
" emuedge_linesize_type linesize = linesize_arg;"
],
"line_no": [
3,
15,
15
]
} | void FUNC_0(ff_emulated_edge_mc)(uint8_t *buf, const uint8_t *src,
ptrdiff_t linesize_arg,
int block_w, int block_h,
int src_x, int src_y, int w, int h)
{
int VAR_0, VAR_1;
int VAR_2, VAR_3, V... | [
"void FUNC_0(ff_emulated_edge_mc)(uint8_t *buf, const uint8_t *src,\nptrdiff_t linesize_arg,\nint block_w, int block_h,\nint src_x, int src_y, int w, int h)\n{",
"int VAR_0, VAR_1;",
"int VAR_2, VAR_3, VAR_4, VAR_5;",
"emuedge_linesize_type linesize = linesize_arg;",
"if (!w || !h)\nreturn;",
"if (src_y >... | [
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
2,382 | static int draw_glyphs(DrawTextContext *s, AVFrame *frame,
int width, int height,
const uint8_t rgbcolor[4], const uint8_t yuvcolor[4],
int x, int y)
{
char *text = HAVE_LOCALTIME_R ? s->expanded_text : s->text;
uint32_t code = 0;
i... | false | FFmpeg | fe026ba960790a004adfcff33f44f96b05538e5c | static int draw_glyphs(DrawTextContext *s, AVFrame *frame,
int width, int height,
const uint8_t rgbcolor[4], const uint8_t yuvcolor[4],
int x, int y)
{
char *text = HAVE_LOCALTIME_R ? s->expanded_text : s->text;
uint32_t code = 0;
i... | {
"code": [],
"line_no": []
} | static int FUNC_0(DrawTextContext *VAR_0, AVFrame *VAR_1,
int VAR_2, int VAR_3,
const uint8_t VAR_4[4], const uint8_t VAR_5[4],
int VAR_6, int VAR_7)
{
char *VAR_8 = HAVE_LOCALTIME_R ? VAR_0->expanded_text : VAR_0->VAR_8;
uint32_t code =... | [
"static int FUNC_0(DrawTextContext *VAR_0, AVFrame *VAR_1,\nint VAR_2, int VAR_3,\nconst uint8_t VAR_4[4], const uint8_t VAR_5[4],\nint VAR_6, int VAR_7)\n{",
"char *VAR_8 = HAVE_LOCALTIME_R ? VAR_0->expanded_text : VAR_0->VAR_8;",
"uint32_t code = 0;",
"int VAR_9;",
"uint8_t *p;",
"Glyph *glyph = NULL;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
33,
35
],
[
39
],
[
41
],
[
45,
47,
49
],
[
53
],
[
55,
57,
59
],
[
61
... |
2,383 | static void test_lifecycle(void)
{
Coroutine *coroutine;
bool done = false;
/* Create, enter, and return from coroutine */
coroutine = qemu_coroutine_create(set_and_exit);
qemu_coroutine_enter(coroutine, &done);
g_assert(done); /* expect done to be true (first time) */
/* Repeat ... | true | qemu | 0b8b8753e4d94901627b3e86431230f2319215c4 | static void test_lifecycle(void)
{
Coroutine *coroutine;
bool done = false;
coroutine = qemu_coroutine_create(set_and_exit);
qemu_coroutine_enter(coroutine, &done);
g_assert(done);
done = false;
coroutine = qemu_coroutine_create(set_and_exit);
qemu_coroutine_ent... | {
"code": [
" coroutine = qemu_coroutine_create(set_and_exit);",
" qemu_coroutine_enter(coroutine, &done);",
" coroutine = qemu_coroutine_create(set_and_exit);",
" qemu_coroutine_enter(coroutine, &done);"
],
"line_no": [
13,
15,
13,
15
]
} | static void FUNC_0(void)
{
Coroutine *coroutine;
bool done = false;
coroutine = qemu_coroutine_create(set_and_exit);
qemu_coroutine_enter(coroutine, &done);
g_assert(done);
done = false;
coroutine = qemu_coroutine_create(set_and_exit);
qemu_coroutine_enter(corou... | [
"static void FUNC_0(void)\n{",
"Coroutine *coroutine;",
"bool done = false;",
"coroutine = qemu_coroutine_create(set_and_exit);",
"qemu_coroutine_enter(coroutine, &done);",
"g_assert(done);",
"done = false;",
"coroutine = qemu_coroutine_create(set_and_exit);",
"qemu_coroutine_enter(coroutine, &done)... | [
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
2,384 | static void decode_pitch_lag_low(int *lag_int, int *lag_frac, int pitch_index,
uint8_t *base_lag_int, int subframe, enum Mode mode)
{
if (subframe == 0 || (subframe == 2 && mode != MODE_6k60)) {
if (pitch_index < 116) {
*lag_int = (pitch_index + 69) >> 1;
... | true | FFmpeg | 6bd79ba59f46a8b3133f28faae53b75540469803 | static void decode_pitch_lag_low(int *lag_int, int *lag_frac, int pitch_index,
uint8_t *base_lag_int, int subframe, enum Mode mode)
{
if (subframe == 0 || (subframe == 2 && mode != MODE_6k60)) {
if (pitch_index < 116) {
*lag_int = (pitch_index + 69) >> 1;
... | {
"code": [
" *lag_frac = (pitch_index - (*lag_int << 1) + 68) << 1;",
" *lag_frac = (pitch_index - (*lag_int << 1)) << 1;"
],
"line_no": [
13,
33
]
} | static void FUNC_0(int *VAR_0, int *VAR_1, int VAR_2,
uint8_t *VAR_3, int VAR_4, enum Mode VAR_5)
{
if (VAR_4 == 0 || (VAR_4 == 2 && VAR_5 != MODE_6k60)) {
if (VAR_2 < 116) {
*VAR_0 = (VAR_2 + 69) >> 1;
*VAR_1 = (VAR_2 - (*VAR_0 << 1) + 68) << ... | [
"static void FUNC_0(int *VAR_0, int *VAR_1, int VAR_2,\nuint8_t *VAR_3, int VAR_4, enum Mode VAR_5)\n{",
"if (VAR_4 == 0 || (VAR_4 == 2 && VAR_5 != MODE_6k60)) {",
"if (VAR_2 < 116) {",
"*VAR_0 = (VAR_2 + 69) >> 1;",
"*VAR_1 = (VAR_2 - (*VAR_0 << 1) + 68) << 1;",
"} else {",
"*VAR_0 = VAR_2 - 24;",
... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
2,386 | void qpci_io_writel(QPCIDevice *dev, void *data, uint32_t value)
{
uintptr_t addr = (uintptr_t)data;
if (addr < QPCI_PIO_LIMIT) {
dev->bus->pio_writel(dev->bus, addr, value);
} else {
value = cpu_to_le32(value);
dev->bus->memwrite(dev->bus, addr, &value, sizeof(value));
... | true | qemu | b4ba67d9a702507793c2724e56f98e9b0f7be02b | void qpci_io_writel(QPCIDevice *dev, void *data, uint32_t value)
{
uintptr_t addr = (uintptr_t)data;
if (addr < QPCI_PIO_LIMIT) {
dev->bus->pio_writel(dev->bus, addr, value);
} else {
value = cpu_to_le32(value);
dev->bus->memwrite(dev->bus, addr, &value, sizeof(value));
... | {
"code": [
" uintptr_t addr = (uintptr_t)data;",
" if (addr < QPCI_PIO_LIMIT) {",
" uintptr_t addr = (uintptr_t)data;",
" if (addr < QPCI_PIO_LIMIT) {",
" uintptr_t addr = (uintptr_t)data;",
" if (addr < QPCI_PIO_LIMIT) {",
" uintptr_t addr = (uintptr_t)data;",
" ... | void FUNC_0(QPCIDevice *VAR_0, void *VAR_1, uint32_t VAR_2)
{
uintptr_t addr = (uintptr_t)VAR_1;
if (addr < QPCI_PIO_LIMIT) {
VAR_0->bus->pio_writel(VAR_0->bus, addr, VAR_2);
} else {
VAR_2 = cpu_to_le32(VAR_2);
VAR_0->bus->memwrite(VAR_0->bus, addr, &VAR_2, sizeof(VAR_2));
... | [
"void FUNC_0(QPCIDevice *VAR_0, void *VAR_1, uint32_t VAR_2)\n{",
"uintptr_t addr = (uintptr_t)VAR_1;",
"if (addr < QPCI_PIO_LIMIT) {",
"VAR_0->bus->pio_writel(VAR_0->bus, addr, VAR_2);",
"} else {",
"VAR_2 = cpu_to_le32(VAR_2);",
"VAR_0->bus->memwrite(VAR_0->bus, addr, &VAR_2, sizeof(VAR_2));",
"}",
... | [
1,
1,
1,
1,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
2,387 | void do_store_xer (void)
{
xer_so = (T0 >> XER_SO) & 0x01;
xer_ov = (T0 >> XER_OV) & 0x01;
xer_ca = (T0 >> XER_CA) & 0x01;
xer_cmp = (T0 >> XER_CMP) & 0xFF;
xer_bc = (T0 >> XER_BC) & 0x3F;
}
| true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | void do_store_xer (void)
{
xer_so = (T0 >> XER_SO) & 0x01;
xer_ov = (T0 >> XER_OV) & 0x01;
xer_ca = (T0 >> XER_CA) & 0x01;
xer_cmp = (T0 >> XER_CMP) & 0xFF;
xer_bc = (T0 >> XER_BC) & 0x3F;
}
| {
"code": [
" xer_bc = (T0 >> XER_BC) & 0x3F;"
],
"line_no": [
13
]
} | void FUNC_0 (void)
{
xer_so = (T0 >> XER_SO) & 0x01;
xer_ov = (T0 >> XER_OV) & 0x01;
xer_ca = (T0 >> XER_CA) & 0x01;
xer_cmp = (T0 >> XER_CMP) & 0xFF;
xer_bc = (T0 >> XER_BC) & 0x3F;
}
| [
"void FUNC_0 (void)\n{",
"xer_so = (T0 >> XER_SO) & 0x01;",
"xer_ov = (T0 >> XER_OV) & 0x01;",
"xer_ca = (T0 >> XER_CA) & 0x01;",
"xer_cmp = (T0 >> XER_CMP) & 0xFF;",
"xer_bc = (T0 >> XER_BC) & 0x3F;",
"}"
] | [
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
2,388 | int ffurl_open(URLContext **puc, const char *filename, int flags,
const AVIOInterruptCB *int_cb, AVDictionary **options)
{
int ret = ffurl_alloc(puc, filename, flags, int_cb);
if (ret < 0)
return ret;
if (options && (*puc)->prot->priv_data_class &&
(ret = av_opt_set_dic... | false | FFmpeg | 1dba8371d93cf1c83bcd5c432d921905206a60f3 | int ffurl_open(URLContext **puc, const char *filename, int flags,
const AVIOInterruptCB *int_cb, AVDictionary **options)
{
int ret = ffurl_alloc(puc, filename, flags, int_cb);
if (ret < 0)
return ret;
if (options && (*puc)->prot->priv_data_class &&
(ret = av_opt_set_dic... | {
"code": [],
"line_no": []
} | int FUNC_0(URLContext **VAR_0, const char *VAR_1, int VAR_2,
const AVIOInterruptCB *VAR_3, AVDictionary **VAR_4)
{
int VAR_5 = ffurl_alloc(VAR_0, VAR_1, VAR_2, VAR_3);
if (VAR_5 < 0)
return VAR_5;
if (VAR_4 && (*VAR_0)->prot->priv_data_class &&
(VAR_5 = av_opt_set_dict(... | [
"int FUNC_0(URLContext **VAR_0, const char *VAR_1, int VAR_2,\nconst AVIOInterruptCB *VAR_3, AVDictionary **VAR_4)\n{",
"int VAR_5 = ffurl_alloc(VAR_0, VAR_1, VAR_2, VAR_3);",
"if (VAR_5 < 0)\nreturn VAR_5;",
"if (VAR_4 && (*VAR_0)->prot->priv_data_class &&\n(VAR_5 = av_opt_set_dict((*VAR_0)->priv_data, VAR_4... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9,
11
],
[
13,
15,
17
],
[
19,
21
],
[
23
],
[
25,
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
]
] |
2,389 | static int mpeg4_decode_video_packet_header(MpegEncContext *s)
{
int mb_num_bits= av_log2(s->mb_num - 1) + 1;
int header_extension=0, mb_num, len;
/* is there enough space left for a video packet + header */
if( get_bits_count(&s->gb) > s->gb.size*8-20) return -1;
for(len=0; len<32; le... | false | FFmpeg | 68f593b48433842f3407586679fe07f3e5199ab9 | static int mpeg4_decode_video_packet_header(MpegEncContext *s)
{
int mb_num_bits= av_log2(s->mb_num - 1) + 1;
int header_extension=0, mb_num, len;
if( get_bits_count(&s->gb) > s->gb.size*8-20) return -1;
for(len=0; len<32; len++){
if(get_bits1(&s->gb)) break;
}
if... | {
"code": [],
"line_no": []
} | static int FUNC_0(MpegEncContext *VAR_0)
{
int VAR_1= av_log2(VAR_0->VAR_3 - 1) + 1;
int VAR_2=0, VAR_3, VAR_4;
if( get_bits_count(&VAR_0->gb) > VAR_0->gb.size*8-20) return -1;
for(VAR_4=0; VAR_4<32; VAR_4++){
if(get_bits1(&VAR_0->gb)) break;
}
if(VAR_4!=ff_mpeg4_... | [
"static int FUNC_0(MpegEncContext *VAR_0)\n{",
"int VAR_1= av_log2(VAR_0->VAR_3 - 1) + 1;",
"int VAR_2=0, VAR_3, VAR_4;",
"if( get_bits_count(&VAR_0->gb) > VAR_0->gb.size*8-20) return -1;",
"for(VAR_4=0; VAR_4<32; VAR_4++){",
"if(get_bits1(&VAR_0->gb)) break;",
"}",
"if(VAR_4!=ff_mpeg4_get_video_packe... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55... |
2,390 | int avfilter_link(AVFilterContext *src, unsigned srcpad,
AVFilterContext *dst, unsigned dstpad)
{
AVFilterLink *link;
if (src->nb_outputs <= srcpad || dst->nb_inputs <= dstpad ||
src->outputs[srcpad] || dst->inputs[dstpad])
return -1;
if (src->output_pads[sr... | false | FFmpeg | 7e2b15c094bb41ede9ce2a208982a20e4dfa26a6 | int avfilter_link(AVFilterContext *src, unsigned srcpad,
AVFilterContext *dst, unsigned dstpad)
{
AVFilterLink *link;
if (src->nb_outputs <= srcpad || dst->nb_inputs <= dstpad ||
src->outputs[srcpad] || dst->inputs[dstpad])
return -1;
if (src->output_pads[sr... | {
"code": [],
"line_no": []
} | int FUNC_0(AVFilterContext *VAR_0, unsigned VAR_1,
AVFilterContext *VAR_2, unsigned VAR_3)
{
AVFilterLink *link;
if (VAR_0->nb_outputs <= VAR_1 || VAR_2->nb_inputs <= VAR_3 ||
VAR_0->outputs[VAR_1] || VAR_2->inputs[VAR_3])
return -1;
if (VAR_0->output_pads[V... | [
"int FUNC_0(AVFilterContext *VAR_0, unsigned VAR_1,\nAVFilterContext *VAR_2, unsigned VAR_3)\n{",
"AVFilterLink *link;",
"if (VAR_0->nb_outputs <= VAR_1 || VAR_2->nb_inputs <= VAR_3 ||\nVAR_0->outputs[VAR_1] || VAR_2->inputs[VAR_3])\nreturn -1;",
"if (VAR_0->output_pads[VAR_1].type != VAR_2->input_pads[V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11,
13,
15
],
[
19
],
[
21,
23,
25
],
[
27
],
[
29
],
[
33,
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[
57... |
2,391 | static void usage(void)
{
printf("Escape an input string, adopting the av_get_token() escaping logic\n");
printf("usage: ffescape [OPTIONS]\n");
printf("\n"
"Options:\n"
"-e echo each input line on output\n"
"-h print this help\n"
... | false | FFmpeg | 9767ec6b865c35f68cb6642fefeacc009f17e638 | static void usage(void)
{
printf("Escape an input string, adopting the av_get_token() escaping logic\n");
printf("usage: ffescape [OPTIONS]\n");
printf("\n"
"Options:\n"
"-e echo each input line on output\n"
"-h print this help\n"
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
printf("Escape an input string, adopting the av_get_token() escaping logic\n");
printf("FUNC_0: ffescape [OPTIONS]\n");
printf("\n"
"Options:\n"
"-e echo each input line on output\n"
"-h print this help\n"
... | [
"static void FUNC_0(void)\n{",
"printf(\"Escape an input string, adopting the av_get_token() escaping logic\\n\");",
"printf(\"FUNC_0: ffescape [OPTIONS]\\n\");",
"printf(\"\\n\"\n\"Options:\\n\"\n\"-e echo each input line on output\\n\"\n\"-h print this help\\n\"\n\"-i INFILE ... | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11,
13,
15,
17,
19,
21,
23,
25,
27
],
[
29
]
] |
2,392 | static inline void mpeg_motion(MpegEncContext *s,
UINT8 *dest_y, UINT8 *dest_cb, UINT8 *dest_cr,
int dest_offset,
UINT8 **ref_picture, int src_offset,
int field_based, op_pixels_func *pix_op,
... | false | FFmpeg | 7f2fe444a39bca733d390b6608801c5f002bfd31 | static inline void mpeg_motion(MpegEncContext *s,
UINT8 *dest_y, UINT8 *dest_cb, UINT8 *dest_cr,
int dest_offset,
UINT8 **ref_picture, int src_offset,
int field_based, op_pixels_func *pix_op,
... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(MpegEncContext *VAR_0,
UINT8 *VAR_1, UINT8 *VAR_2, UINT8 *VAR_3,
int VAR_4,
UINT8 **VAR_5, int VAR_6,
int VAR_7, op_pixels_func *VAR_8,
... | [
"static inline void FUNC_0(MpegEncContext *VAR_0,\nUINT8 *VAR_1, UINT8 *VAR_2, UINT8 *VAR_3,\nint VAR_4,\nUINT8 **VAR_5, int VAR_6,\nint VAR_7, op_pixels_func *VAR_8,\nint VAR_9, int VAR_10, int VAR_11)\n{",
"UINT8 *ptr;",
"int VAR_12, VAR_13, VAR_14, VAR_15, VAR_16, VAR_17, VAR_18, VAR_19;",
"if(VAR_0->quart... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
51,
53
],
[
55
... |
2,393 | av_cold void ff_audio_convert_init_x86(AudioConvert *ac)
{
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_MMX(cpu_flags)) {
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32,
0, 1, 8, "MMX", ff_conv_s32_to_s16_mmx);
ff_audio_convert_se... | false | FFmpeg | d68c05380cebf563915412182643a8be04ef890b | av_cold void ff_audio_convert_init_x86(AudioConvert *ac)
{
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_MMX(cpu_flags)) {
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32,
0, 1, 8, "MMX", ff_conv_s32_to_s16_mmx);
ff_audio_convert_se... | {
"code": [],
"line_no": []
} | av_cold void FUNC_0(AudioConvert *ac)
{
int VAR_0 = av_get_cpu_flags();
if (EXTERNAL_MMX(VAR_0)) {
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32,
0, 1, 8, "MMX", ff_conv_s32_to_s16_mmx);
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FL... | [
"av_cold void FUNC_0(AudioConvert *ac)\n{",
"int VAR_0 = av_get_cpu_flags();",
"if (EXTERNAL_MMX(VAR_0)) {",
"ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32,\n0, 1, 8, \"MMX\", ff_conv_s32_to_s16_mmx);",
"ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP,\n6, 1, 4, \"MM... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15,
17
],
[
19
],
[
21
],
[
23,
25
],
[
27,
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45,
47
],
[
49,
51... |
2,394 | static void virtio_pci_config_write(void *opaque, hwaddr addr,
uint64_t val, unsigned size)
{
VirtIOPCIProxy *proxy = opaque;
uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
if (addr < config) {
... | true | qemu | 616a655219a92ae7cf5d6a7862e6489c6282009e | static void virtio_pci_config_write(void *opaque, hwaddr addr,
uint64_t val, unsigned size)
{
VirtIOPCIProxy *proxy = opaque;
uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
if (addr < config) {
... | {
"code": [
" if (virtio_is_big_endian()) {",
" if (virtio_is_big_endian()) {",
" if (virtio_is_big_endian()) {",
" if (virtio_is_big_endian()) {"
],
"line_no": [
41,
41,
41,
41
]
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
VirtIOPCIProxy *proxy = VAR_0;
uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
if (VAR_1 < config) {
virtio_io... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"VirtIOPCIProxy *proxy = VAR_0;",
"uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);",
"VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);",
"if (VAR_1 < config) {",
"virtio_ioport_write(proxy, VAR_1, VAR_2);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
31
],
[
33,
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51,
53
... |
2,396 | void *qpci_iomap(QPCIDevice *dev, int barno, uint64_t *sizeptr)
{
QPCIBus *bus = dev->bus;
static const int bar_reg_map[] = {
PCI_BASE_ADDRESS_0, PCI_BASE_ADDRESS_1, PCI_BASE_ADDRESS_2,
PCI_BASE_ADDRESS_3, PCI_BASE_ADDRESS_4, PCI_BASE_ADDRESS_5,
};
int bar_reg;
uint32_t addr,... | true | qemu | b4ba67d9a702507793c2724e56f98e9b0f7be02b | void *qpci_iomap(QPCIDevice *dev, int barno, uint64_t *sizeptr)
{
QPCIBus *bus = dev->bus;
static const int bar_reg_map[] = {
PCI_BASE_ADDRESS_0, PCI_BASE_ADDRESS_1, PCI_BASE_ADDRESS_2,
PCI_BASE_ADDRESS_3, PCI_BASE_ADDRESS_4, PCI_BASE_ADDRESS_5,
};
int bar_reg;
uint32_t addr,... | {
"code": [
"void *qpci_iomap(QPCIDevice *dev, int barno, uint64_t *sizeptr)",
" return (void *)(uintptr_t)loc;"
],
"line_no": [
1,
107
]
} | void *FUNC_0(QPCIDevice *VAR_0, int VAR_1, uint64_t *VAR_2)
{
QPCIBus *bus = VAR_0->bus;
static const int VAR_3[] = {
PCI_BASE_ADDRESS_0, PCI_BASE_ADDRESS_1, PCI_BASE_ADDRESS_2,
PCI_BASE_ADDRESS_3, PCI_BASE_ADDRESS_4, PCI_BASE_ADDRESS_5,
};
int VAR_4;
uint32_t addr, size;
... | [
"void *FUNC_0(QPCIDevice *VAR_0, int VAR_1, uint64_t *VAR_2)\n{",
"QPCIBus *bus = VAR_0->bus;",
"static const int VAR_3[] = {",
"PCI_BASE_ADDRESS_0, PCI_BASE_ADDRESS_1, PCI_BASE_ADDRESS_2,\nPCI_BASE_ADDRESS_3, PCI_BASE_ADDRESS_4, PCI_BASE_ADDRESS_5,\n};",
"int VAR_4;",
"uint32_t addr, size;",
"uint32_t ... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
... |
2,397 | int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near,
int point_transform, int ilv)
{
int i, t = 0;
uint8_t *zero, *last, *cur;
JLSState *state;
int off = 0, stride = 1, width, shift, ret = 0;
zero = av_mallocz(s->picture_ptr->linesize[0]);
if (!zero)
... | true | FFmpeg | e98dfeb27c2a82673d7f1782705f6694ec9062ca | int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near,
int point_transform, int ilv)
{
int i, t = 0;
uint8_t *zero, *last, *cur;
JLSState *state;
int off = 0, stride = 1, width, shift, ret = 0;
zero = av_mallocz(s->picture_ptr->linesize[0]);
if (!zero)
... | {
"code": [],
"line_no": []
} | int FUNC_0(MJpegDecodeContext *VAR_0, int VAR_1,
int VAR_2, int VAR_3)
{
int VAR_4, VAR_5 = 0;
uint8_t *zero, *last, *cur;
JLSState *state;
int VAR_6 = 0, VAR_7 = 1, VAR_8, VAR_9, VAR_10 = 0;
zero = av_mallocz(VAR_0->picture_ptr->linesize[0]);
if (!zero)
retu... | [
"int FUNC_0(MJpegDecodeContext *VAR_0, int VAR_1,\nint VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5 = 0;",
"uint8_t *zero, *last, *cur;",
"JLSState *state;",
"int VAR_6 = 0, VAR_7 = 1, VAR_8, VAR_9, VAR_10 = 0;",
"zero = av_mallocz(VAR_0->picture_ptr->linesize[0]);",
"if (!zero)\nreturn AVERROR(ENOMEM);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
2,
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9,
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22
],
[
23
],... |
2,398 | void FUNCC(ff_h264_chroma_dc_dequant_idct)(int16_t *_block, int qmul){
const int stride= 16*2;
const int xStride= 16;
int a,b,c,d,e;
dctcoef *block = (dctcoef*)_block;
a= block[stride*0 + xStride*0];
b= block[stride*0 + xStride*1];
c= block[stride*1 + xStride*0];
d= block[strid... | true | FFmpeg | 2898bc522da6adebda5cbbd9036defe22e3b9bcf | void FUNCC(ff_h264_chroma_dc_dequant_idct)(int16_t *_block, int qmul){
const int stride= 16*2;
const int xStride= 16;
int a,b,c,d,e;
dctcoef *block = (dctcoef*)_block;
a= block[stride*0 + xStride*0];
b= block[stride*0 + xStride*1];
c= block[stride*1 + xStride*0];
d= block[strid... | {
"code": [
" int a,b,c,d,e;",
" block[stride*0 + xStride*0]= ((a+c)*qmul) >> 7;",
" block[stride*0 + xStride*1]= ((e+b)*qmul) >> 7;",
" block[stride*1 + xStride*0]= ((a-c)*qmul) >> 7;",
" block[stride*1 + xStride*1]= ((e-b)*qmul) >> 7;"
],
"line_no": [
7,
33,
35,
... | void FUNC_0(ff_h264_chroma_dc_dequant_idct)(int16_t *_block, int qmul){
const int VAR_0= 16*2;
const int VAR_1= 16;
int VAR_2,VAR_3,VAR_4,VAR_5,VAR_6;
dctcoef *block = (dctcoef*)_block;
VAR_2= block[VAR_0*0 + VAR_1*0];
VAR_3= block[VAR_0*0 + VAR_1*1];
VAR_4= block[VAR_0*1 + VAR_1*0]... | [
"void FUNC_0(ff_h264_chroma_dc_dequant_idct)(int16_t *_block, int qmul){",
"const int VAR_0= 16*2;",
"const int VAR_1= 16;",
"int VAR_2,VAR_3,VAR_4,VAR_5,VAR_6;",
"dctcoef *block = (dctcoef*)_block;",
"VAR_2= block[VAR_0*0 + VAR_1*0];",
"VAR_3= block[VAR_0*0 + VAR_1*1];",
"VAR_4= block[VAR_0*1 + VAR_1... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
2,401 | static inline int mpeg2_decode_block_intra(MpegEncContext *s,
int16_t *block, int n)
{
int level, dc, diff, i, j, run;
int component;
RLTable *rl;
uint8_t *const scantable = s->intra_scantable.permutated;
const uint16_t *quant_matrix;
const int ... | true | FFmpeg | d757ddbaab8f03b3664788e620314b70ac791319 | static inline int mpeg2_decode_block_intra(MpegEncContext *s,
int16_t *block, int n)
{
int level, dc, diff, i, j, run;
int component;
RLTable *rl;
uint8_t *const scantable = s->intra_scantable.permutated;
const uint16_t *quant_matrix;
const int ... | {
"code": [
" block[0] = dc << (3 - s->intra_dc_precision);"
],
"line_no": [
51
]
} | static inline int FUNC_0(MpegEncContext *VAR_0,
int16_t *VAR_1, int VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;
int VAR_9;
RLTable *rl;
uint8_t *const scantable = VAR_0->intra_scantable.permutated;
const uint16_t *VAR_10;
const int VA... | [
"static inline int FUNC_0(MpegEncContext *VAR_0,\nint16_t *VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;",
"int VAR_9;",
"RLTable *rl;",
"uint8_t *const scantable = VAR_0->intra_scantable.permutated;",
"const uint16_t *VAR_10;",
"const int VAR_11 = VAR_0->VAR_11;",
"int VAR_12;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
... |
2,402 | static void vc1_draw_sprites(VC1Context *v, SpriteData* sd)
{
int i, plane, row, sprite;
int sr_cache[2][2] = { { -1, -1 }, { -1, -1 } };
uint8_t* src_h[2][2];
int xoff[2], xadv[2], yoff[2], yadv[2], alpha;
int ysub[2];
MpegEncContext *s = &v->s;
for (i = 0; i < 2; i++) {
... | true | FFmpeg | 2bf369b60c7d56dd73887a0156c37676d0fa7e29 | static void vc1_draw_sprites(VC1Context *v, SpriteData* sd)
{
int i, plane, row, sprite;
int sr_cache[2][2] = { { -1, -1 }, { -1, -1 } };
uint8_t* src_h[2][2];
int xoff[2], xadv[2], yoff[2], yadv[2], alpha;
int ysub[2];
MpegEncContext *s = &v->s;
for (i = 0; i < 2; i++) {
... | {
"code": [
" src_h[sprite][1] = iplane + (xoff[sprite] >> 16) + (yline + 1) * iline;",
" v->vc1dsp.sprite_h(v->sr_rows[sprite][1], iplane + (yline + 1) * iline, xoff[sprite], xadv[sprite], width);"
],
"line_no": [
81,
105
]
} | static void FUNC_0(VC1Context *VAR_0, SpriteData* VAR_1)
{
int VAR_2, VAR_3, VAR_4, VAR_5;
int VAR_6[2][2] = { { -1, -1 }, { -1, -1 } };
uint8_t* src_h[2][2];
int VAR_7[2], VAR_8[2], VAR_9[2], VAR_10[2], VAR_11;
int VAR_12[2];
MpegEncContext *s = &VAR_0->s;
for (VAR_2 = 0; VAR_2 < ... | [
"static void FUNC_0(VC1Context *VAR_0, SpriteData* VAR_1)\n{",
"int VAR_2, VAR_3, VAR_4, VAR_5;",
"int VAR_6[2][2] = { { -1, -1 }, { -1, -1 } };",
"uint8_t* src_h[2][2];",
"int VAR_7[2], VAR_8[2], VAR_9[2], VAR_10[2], VAR_11;",
"int VAR_12[2];",
"MpegEncContext *s = &VAR_0->s;",
"for (VAR_2 = 0; VAR_2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
47
],
[
49,
51
... |
2,403 | static int vhdx_log_flush(BlockDriverState *bs, BDRVVHDXState *s,
VHDXLogSequence *logs)
{
int ret = 0;
int i;
uint32_t cnt, sectors_read;
uint64_t new_file_size;
void *data = NULL;
VHDXLogDescEntries *desc_entries = NULL;
VHDXLogEntryHeader hdr_tmp = { 0 }... | true | qemu | 3f910692c287e1c611c00e763ebeb95ed0e017f8 | static int vhdx_log_flush(BlockDriverState *bs, BDRVVHDXState *s,
VHDXLogSequence *logs)
{
int ret = 0;
int i;
uint32_t cnt, sectors_read;
uint64_t new_file_size;
void *data = NULL;
VHDXLogDescEntries *desc_entries = NULL;
VHDXLogEntryHeader hdr_tmp = { 0 }... | {
"code": [
" if (hdr_tmp.flushed_file_offset > bdrv_getlength(bs->file->bs)) {",
" if (bdrv_getlength(bs->file->bs) < desc_entries->hdr.last_file_offset) {"
],
"line_no": [
61,
121
]
} | static int FUNC_0(BlockDriverState *VAR_0, BDRVVHDXState *VAR_1,
VHDXLogSequence *VAR_2)
{
int VAR_3 = 0;
int VAR_4;
uint32_t cnt, sectors_read;
uint64_t new_file_size;
void *VAR_5 = NULL;
VHDXLogDescEntries *desc_entries = NULL;
VHDXLogEntryHeader hdr_tmp ... | [
"static int FUNC_0(BlockDriverState *VAR_0, BDRVVHDXState *VAR_1,\nVHDXLogSequence *VAR_2)\n{",
"int VAR_3 = 0;",
"int VAR_4;",
"uint32_t cnt, sectors_read;",
"uint64_t new_file_size;",
"void *VAR_5 = NULL;",
"VHDXLogDescEntries *desc_entries = NULL;",
"VHDXLogEntryHeader hdr_tmp = { 0 };",
"cnt = V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[... |
2,404 | static void unterminated_array(void)
{
QObject *obj = qobject_from_json("[32", NULL);
g_assert(obj == NULL);
}
| true | qemu | aec4b054ea36c53c8b887da99f20010133b84378 | static void unterminated_array(void)
{
QObject *obj = qobject_from_json("[32", NULL);
g_assert(obj == NULL);
}
| {
"code": [
" QObject *obj = qobject_from_json(\"[32\", NULL);"
],
"line_no": [
5
]
} | static void FUNC_0(void)
{
QObject *obj = qobject_from_json("[32", NULL);
g_assert(obj == NULL);
}
| [
"static void FUNC_0(void)\n{",
"QObject *obj = qobject_from_json(\"[32\", NULL);",
"g_assert(obj == NULL);",
"}"
] | [
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
2,405 | static av_cold int xan_decode_init(AVCodecContext *avctx)
{
XanContext *s = avctx->priv_data;
s->avctx = avctx;
s->frame_size = 0;
if ((avctx->codec->id == CODEC_ID_XAN_WC3) &&
(s->avctx->palctrl == NULL)) {
av_log(avctx, AV_LOG_ERROR, "palette expected\n");
return AV... | true | FFmpeg | 24ae353dfbe61019a86093a9c5cd15476aabef49 | static av_cold int xan_decode_init(AVCodecContext *avctx)
{
XanContext *s = avctx->priv_data;
s->avctx = avctx;
s->frame_size = 0;
if ((avctx->codec->id == CODEC_ID_XAN_WC3) &&
(s->avctx->palctrl == NULL)) {
av_log(avctx, AV_LOG_ERROR, "palette expected\n");
return AV... | {
"code": [
" if ((avctx->codec->id == CODEC_ID_XAN_WC3) &&",
" (s->avctx->palctrl == NULL)) {",
" av_log(avctx, AV_LOG_ERROR, \"palette expected\\n\");",
" return AVERROR(EINVAL);"
],
"line_no": [
15,
17,
19,
21
]
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
XanContext *s = avctx->priv_data;
s->avctx = avctx;
s->frame_size = 0;
if ((avctx->codec->id == CODEC_ID_XAN_WC3) &&
(s->avctx->palctrl == NULL)) {
av_log(avctx, AV_LOG_ERROR, "palette expected\n");
return AVERROR(EIN... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"XanContext *s = avctx->priv_data;",
"s->avctx = avctx;",
"s->frame_size = 0;",
"if ((avctx->codec->id == CODEC_ID_XAN_WC3) &&\n(s->avctx->palctrl == NULL)) {",
"av_log(avctx, AV_LOG_ERROR, \"palette expected\\n\");",
"return AVERROR(EINVAL);",
"}... | [
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53... |
2,406 | static void init_uni_ac_vlc(RLTable *rl, uint8_t *uni_ac_vlc_len){
int i;
for(i=0; i<128; i++){
int level= i-64;
int run;
for(run=0; run<64; run++){
int len, bits, code;
int alevel= FFABS(level);
int sign= (level>>31)&1;
if... | true | FFmpeg | 7c5dfc174be59afa671a98ec85fe208c528ab64f | static void init_uni_ac_vlc(RLTable *rl, uint8_t *uni_ac_vlc_len){
int i;
for(i=0; i<128; i++){
int level= i-64;
int run;
for(run=0; run<64; run++){
int len, bits, code;
int alevel= FFABS(level);
int sign= (level>>31)&1;
if... | {
"code": [],
"line_no": []
} | static void FUNC_0(RLTable *VAR_0, uint8_t *VAR_1){
int VAR_2;
for(VAR_2=0; VAR_2<128; VAR_2++){
int VAR_3= VAR_2-64;
int VAR_4;
for(VAR_4=0; VAR_4<64; VAR_4++){
int VAR_5, VAR_6, VAR_7;
int VAR_8= FFABS(VAR_3);
int VAR_9= (VAR_3>>31)&1;
... | [
"static void FUNC_0(RLTable *VAR_0, uint8_t *VAR_1){",
"int VAR_2;",
"for(VAR_2=0; VAR_2<128; VAR_2++){",
"int VAR_3= VAR_2-64;",
"int VAR_4;",
"for(VAR_4=0; VAR_4<64; VAR_4++){",
"int VAR_5, VAR_6, VAR_7;",
"int VAR_8= FFABS(VAR_3);",
"int VAR_9= (VAR_3>>31)&1;",
"if (VAR_8 > VAR_0->max_level[0][... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
27,
29
],
[
31,
33
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
],
... |
2,407 | int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
{
unsigned int i, head, max;
target_phys_addr_t desc_pa = vq->vring.desc;
if (!virtqueue_num_heads(vq, vq->last_avail_idx))
return 0;
/* When we start there are none of either input nor output. */
elem->out_num = elem->in_nu... | true | qemu | c8eac1cfa1e9104a658b4614ada758861b8d823a | int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem)
{
unsigned int i, head, max;
target_phys_addr_t desc_pa = vq->vring.desc;
if (!virtqueue_num_heads(vq, vq->last_avail_idx))
return 0;
elem->out_num = elem->in_num = 0;
max = vq->vring.num;
i = head = virtqueue... | {
"code": [],
"line_no": []
} | int FUNC_0(VirtQueue *VAR_0, VirtQueueElement *VAR_1)
{
unsigned int VAR_2, VAR_3, VAR_4;
target_phys_addr_t desc_pa = VAR_0->vring.desc;
if (!virtqueue_num_heads(VAR_0, VAR_0->last_avail_idx))
return 0;
VAR_1->out_num = VAR_1->in_num = 0;
VAR_4 = VAR_0->vring.num;
... | [
"int FUNC_0(VirtQueue *VAR_0, VirtQueueElement *VAR_1)\n{",
"unsigned int VAR_2, VAR_3, VAR_4;",
"target_phys_addr_t desc_pa = VAR_0->vring.desc;",
"if (!virtqueue_num_heads(VAR_0, VAR_0->last_avail_idx))\nreturn 0;",
"VAR_1->out_num = VAR_1->in_num = 0;",
"VAR_4 = VAR_0->vring.num;",
"VAR_2 = VAR_3 = v... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
36
],
[
38
],
[
40
],
[
48
],
[
50
],
[
52
],
[
59
],
[
61
],
[
65
],
[
71
],
... |
2,408 | void qemu_ram_remap(ram_addr_t addr, ram_addr_t length)
{
RAMBlock *block;
ram_addr_t offset;
int flags;
void *area, *vaddr;
QLIST_FOREACH(block, &ram_list.blocks, next) {
offset = addr - block->offset;
if (offset < block->length) {
vaddr = block->host + offset... | true | qemu | fd28aa132362320f9f3a30b23f634bb14dee528e | void qemu_ram_remap(ram_addr_t addr, ram_addr_t length)
{
RAMBlock *block;
ram_addr_t offset;
int flags;
void *area, *vaddr;
QLIST_FOREACH(block, &ram_list.blocks, next) {
offset = addr - block->offset;
if (offset < block->length) {
vaddr = block->host + offset... | {
"code": [],
"line_no": []
} | void FUNC_0(ram_addr_t VAR_0, ram_addr_t VAR_1)
{
RAMBlock *block;
ram_addr_t offset;
int VAR_2;
void *VAR_3, *VAR_4;
QLIST_FOREACH(block, &ram_list.blocks, next) {
offset = VAR_0 - block->offset;
if (offset < block->VAR_1) {
VAR_4 = block->host + offset;
... | [
"void FUNC_0(ram_addr_t VAR_0, ram_addr_t VAR_1)\n{",
"RAMBlock *block;",
"ram_addr_t offset;",
"int VAR_2;",
"void *VAR_3, *VAR_4;",
"QLIST_FOREACH(block, &ram_list.blocks, next) {",
"offset = VAR_0 - block->offset;",
"if (offset < block->VAR_1) {",
"VAR_4 = block->host + offset;",
"if (block->VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39,
41,
43
],
[
46
],
[... |
2,409 | static void pnv_chip_power8_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PnvChipClass *k = PNV_CHIP_CLASS(klass);
k->cpu_model = "POWER8";
k->chip_type = PNV_CHIP_POWER8;
k->chip_cfam_id = 0x220ea04980000000ull; /* P8 Venice DD2.0 */
k->cores_mask ... | true | qemu | 967b75230b9720ea2b3ae49f38f8287026125f9f | static void pnv_chip_power8_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PnvChipClass *k = PNV_CHIP_CLASS(klass);
k->cpu_model = "POWER8";
k->chip_type = PNV_CHIP_POWER8;
k->chip_cfam_id = 0x220ea04980000000ull;
k->cores_mask = POWER8_CORE_MASK;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
PnvChipClass *k = PNV_CHIP_CLASS(VAR_0);
k->cpu_model = "POWER8";
k->chip_type = PNV_CHIP_POWER8;
k->chip_cfam_id = 0x220ea04980000000ull;
k->cores_mask = POWER8_CORE_MASK;
k->core_pir = p... | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"PnvChipClass *k = PNV_CHIP_CLASS(VAR_0);",
"k->cpu_model = \"POWER8\";",
"k->chip_type = PNV_CHIP_POWER8;",
"k->chip_cfam_id = 0x220ea04980000000ull;",
"k->cores_mask = POWER8_CORE_MASK;",
"k->core_pir... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
22
],
[
24
]
] |
2,410 | static void multiwrite_user_cb(MultiwriteCB *mcb)
{
int i;
for (i = 0; i < mcb->num_callbacks; i++) {
mcb->callbacks[i].cb(mcb->callbacks[i].opaque, mcb->error);
qemu_free(mcb->callbacks[i].free_qiov);
qemu_free(mcb->callbacks[i].free_buf);
}
}
| true | qemu | f8a83245d9ec685bc6aa6173d6765fe03e20688f | static void multiwrite_user_cb(MultiwriteCB *mcb)
{
int i;
for (i = 0; i < mcb->num_callbacks; i++) {
mcb->callbacks[i].cb(mcb->callbacks[i].opaque, mcb->error);
qemu_free(mcb->callbacks[i].free_qiov);
qemu_free(mcb->callbacks[i].free_buf);
}
}
| {
"code": [
" qemu_free(mcb->callbacks[i].free_buf);"
],
"line_no": [
15
]
} | static void FUNC_0(MultiwriteCB *VAR_0)
{
int VAR_1;
for (VAR_1 = 0; VAR_1 < VAR_0->num_callbacks; VAR_1++) {
VAR_0->callbacks[VAR_1].cb(VAR_0->callbacks[VAR_1].opaque, VAR_0->error);
qemu_free(VAR_0->callbacks[VAR_1].free_qiov);
qemu_free(VAR_0->callbacks[VAR_1].free_buf);
... | [
"static void FUNC_0(MultiwriteCB *VAR_0)\n{",
"int VAR_1;",
"for (VAR_1 = 0; VAR_1 < VAR_0->num_callbacks; VAR_1++) {",
"VAR_0->callbacks[VAR_1].cb(VAR_0->callbacks[VAR_1].opaque, VAR_0->error);",
"qemu_free(VAR_0->callbacks[VAR_1].free_qiov);",
"qemu_free(VAR_0->callbacks[VAR_1].free_buf);",
"}",
"}"... | [
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
2,412 | static void pflash_cfi02_realize(DeviceState *dev, Error **errp)
{
pflash_t *pfl = CFI_PFLASH02(dev);
uint32_t chip_len;
int ret;
Error *local_err = NULL;
chip_len = pfl->sector_len * pfl->nb_blocs;
/* XXX: to be fixed */
#if 0
if (total_len != (8 * 1024 * 1024) && total_len != (16 * 1024 * ... | true | qemu | 8929fc3a55f33a103adddf9cfd010bcf2b255c7d | static void pflash_cfi02_realize(DeviceState *dev, Error **errp)
{
pflash_t *pfl = CFI_PFLASH02(dev);
uint32_t chip_len;
int ret;
Error *local_err = NULL;
chip_len = pfl->sector_len * pfl->nb_blocs;
#if 0
if (total_len != (8 * 1024 * 1024) && total_len != (16 * 1024 * 1024) &&
total... | {
"code": [],
"line_no": []
} | static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)
{
pflash_t *pfl = CFI_PFLASH02(VAR_0);
uint32_t chip_len;
int VAR_2;
Error *local_err = NULL;
chip_len = pfl->sector_len * pfl->nb_blocs;
#if 0
if (total_len != (8 * 1024 * 1024) && total_len != (16 * 1024 * 1024) &&
total_len !=... | [
"static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)\n{",
"pflash_t *pfl = CFI_PFLASH02(VAR_0);",
"uint32_t chip_len;",
"int VAR_2;",
"Error *local_err = NULL;",
"chip_len = pfl->sector_len * pfl->nb_blocs;",
"#if 0\nif (total_len != (8 * 1024 * 1024) && total_len != (16 * 1024 * 1024) &&\ntotal_len !... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
9,
10,
11,
12
],
[
13,
14,
15,
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22
],
[
24
],
[
25
],
[
26
]... |
2,413 | float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
{
float q;
int qmin, qmax;
float br_compensation;
double diff;
double short_term_q;
double fps;
int picture_number = s->picture_number;
int64_t wanted_bits;
RateControlContext *rcc = &s->rc_context;
AVCodecC... | true | FFmpeg | b4356c9cc28197bb8da626ece08d4a062b62afc8 | float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
{
float q;
int qmin, qmax;
float br_compensation;
double diff;
double short_term_q;
double fps;
int picture_number = s->picture_number;
int64_t wanted_bits;
RateControlContext *rcc = &s->rc_context;
AVCodecC... | {
"code": [
" int var;",
" const int last_var = s->last_pict_type == AV_PICTURE_TYPE_I ? rcc->last_mb_var_sum",
" : rcc->last_mc_mb_var_sum;"
],
"line_no": [
31,
63,
65
]
} | float FUNC_0(MpegEncContext *VAR_0, int VAR_1)
{
float VAR_2;
int VAR_3, VAR_4;
float VAR_5;
double VAR_6;
double VAR_7;
double VAR_8;
int VAR_9 = VAR_0->VAR_9;
int64_t wanted_bits;
RateControlContext *rcc = &VAR_0->rc_context;
AVCodecContext *a = VAR_0->avctx;
... | [
"float FUNC_0(MpegEncContext *VAR_0, int VAR_1)\n{",
"float VAR_2;",
"int VAR_3, VAR_4;",
"float VAR_5;",
"double VAR_6;",
"double VAR_7;",
"double VAR_8;",
"int VAR_9 = VAR_0->VAR_9;",
"int64_t wanted_bits;",
"RateControlContext *rcc = &VAR_0->rc_context;",
"AVCodecContext *a = VAR_0->avc... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41,
43,
45,... |
2,416 | static void pred_spatial_direct_motion(H264Context * const h, int *mb_type){
MpegEncContext * const s = &h->s;
int b8_stride = 2;
int b4_stride = h->b_stride;
int mb_xy = h->mb_xy, mb_y = s->mb_y;
int mb_type_col[2];
const int16_t (*l1mv0)[2], (*l1mv1)[2];
const int8_t *l1ref0, *l1ref... | true | FFmpeg | 758ec111538ccd487686e8677aa754ee4d82beaa | static void pred_spatial_direct_motion(H264Context * const h, int *mb_type){
MpegEncContext * const s = &h->s;
int b8_stride = 2;
int b4_stride = h->b_stride;
int mb_xy = h->mb_xy, mb_y = s->mb_y;
int mb_type_col[2];
const int16_t (*l1mv0)[2], (*l1mv1)[2];
const int8_t *l1ref0, *l1ref... | {
"code": [],
"line_no": []
} | static void FUNC_0(H264Context * const VAR_0, int *VAR_1){
MpegEncContext * const s = &VAR_0->s;
int VAR_2 = 2;
int VAR_3 = VAR_0->b_stride;
int VAR_4 = VAR_0->VAR_4, VAR_5 = s->VAR_5;
int VAR_6[2];
const FUNC_1 (*l1mv0)[2], (*l1mv1)[2];
const int8_t *VAR_7, *l1ref1;
const int VA... | [
"static void FUNC_0(H264Context * const VAR_0, int *VAR_1){",
"MpegEncContext * const s = &VAR_0->s;",
"int VAR_2 = 2;",
"int VAR_3 = VAR_0->b_stride;",
"int VAR_4 = VAR_0->VAR_4, VAR_5 = s->VAR_5;",
"int VAR_6[2];",
"const FUNC_1 (*l1mv0)[2], (*l1mv1)[2];",
"const int8_t *VAR_7, *l1ref1;",
"const i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
39,
47
],
[
49
],
[
51
],
[
53
... |
2,417 | int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
{
if(min_ts > ts || max_ts < ts)
return -1;
if (s->iformat->read_seek2) {
int ret;
ff_read_frame_flush(s);
if (stream_index == -1 && s->nb_streams == 1) ... | true | FFmpeg | 98db90589651474366a32e14e3ad062ef3ca6707 | int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
{
if(min_ts > ts || max_ts < ts)
return -1;
if (s->iformat->read_seek2) {
int ret;
ff_read_frame_flush(s);
if (stream_index == -1 && s->nb_streams == 1) ... | {
"code": [
" AV_ROUND_UP);",
" AV_ROUND_DOWN);"
],
"line_no": [
29,
35
]
} | int FUNC_0(AVFormatContext *VAR_0, int VAR_1, int64_t VAR_2, int64_t VAR_3, int64_t VAR_4, int VAR_5)
{
if(VAR_2 > VAR_3 || VAR_4 < VAR_3)
return -1;
if (VAR_0->iformat->read_seek2) {
int VAR_8;
ff_read_frame_flush(VAR_0);
if (VAR_1 == -1 && VAR_0->nb_streams == 1) {
... | [
"int FUNC_0(AVFormatContext *VAR_0, int VAR_1, int64_t VAR_2, int64_t VAR_3, int64_t VAR_4, int VAR_5)\n{",
"if(VAR_2 > VAR_3 || VAR_4 < VAR_3)\nreturn -1;",
"if (VAR_0->iformat->read_seek2) {",
"int VAR_8;",
"ff_read_frame_flush(VAR_0);",
"if (VAR_1 == -1 && VAR_0->nb_streams == 1) {",
"AVRational time... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25,
27,
29
],
[
31,
33,
35
],
[
37
],
[
41
],
[
45,
47
],
[
49
],
[
51
],
[
55
],
[
59... |
2,418 | static inline void render_line_unrolled(intptr_t x, uint8_t y, int x1,
intptr_t sy, int ady, int adx,
float *buf)
{
int err = -adx;
x -= x1 - 1;
buf += x1 - 1;
while (++x < 0) {
err += ady;
if (err >... | true | FFmpeg | 24947d4988012f1f0fd467c83418615adc11c3e8 | static inline void render_line_unrolled(intptr_t x, uint8_t y, int x1,
intptr_t sy, int ady, int adx,
float *buf)
{
int err = -adx;
x -= x1 - 1;
buf += x1 - 1;
while (++x < 0) {
err += ady;
if (err >... | {
"code": [
"static inline void render_line_unrolled(intptr_t x, uint8_t y, int x1,",
" buf[x++] = ff_vorbis_floor1_inverse_db_table[y];",
" buf[x] = ff_vorbis_floor1_inverse_db_table[y];",
" buf[x] = ff_vorbis_floor1_inverse_db_table[y];"
],
"line_no": [
1,
25,
... | static inline void FUNC_0(intptr_t VAR_0, uint8_t VAR_1, int VAR_2,
intptr_t VAR_3, int VAR_4, int VAR_5,
float *VAR_6)
{
int VAR_7 = -VAR_5;
VAR_0 -= VAR_2 - 1;
VAR_6 += VAR_2 - 1;
while (++VAR_0 < 0) {
VAR_... | [
"static inline void FUNC_0(intptr_t VAR_0, uint8_t VAR_1, int VAR_2,\nintptr_t VAR_3, int VAR_4, int VAR_5,\nfloat *VAR_6)\n{",
"int VAR_7 = -VAR_5;",
"VAR_0 -= VAR_2 - 1;",
"VAR_6 += VAR_2 - 1;",
"while (++VAR_0 < 0) {",
"VAR_7 += VAR_4;",
"if (VAR_7 >= 0) {",
"VAR_7 += VAR_4 - VAR_5;",
"VAR_1 +=... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
]
] |
2,419 | iscsi_connect_cb(struct iscsi_context *iscsi, int status, void *command_data,
void *opaque)
{
struct IscsiTask *itask = opaque;
struct scsi_task *task;
if (status != 0) {
itask->status = 1;
itask->complete = 1;
return;
}
task = iscsi_inquiry_t... | true | qemu | e829b0bb054ed3389e5b22dad61875e51674e629 | iscsi_connect_cb(struct iscsi_context *iscsi, int status, void *command_data,
void *opaque)
{
struct IscsiTask *itask = opaque;
struct scsi_task *task;
if (status != 0) {
itask->status = 1;
itask->complete = 1;
return;
}
task = iscsi_inquiry_t... | {
"code": [
" struct IscsiTask *itask = opaque;",
" if (status != 0) {",
" itask->status = 1;",
" itask->complete = 1;",
" itask->status = 1;",
" itask->complete = 1;",
" struct IscsiTask *itask = opaque;",
" if (status != 0) {",
" ... | FUNC_0(struct iscsi_context *VAR_0, int VAR_1, void *VAR_2,
void *VAR_3)
{
struct IscsiTask *VAR_4 = VAR_3;
struct scsi_task *VAR_5;
if (VAR_1 != 0) {
VAR_4->VAR_1 = 1;
VAR_4->complete = 1;
return;
}
VAR_5 = iscsi_inquiry_task(VAR_0, VAR_4->is... | [
"FUNC_0(struct iscsi_context *VAR_0, int VAR_1, void *VAR_2,\nvoid *VAR_3)\n{",
"struct IscsiTask *VAR_4 = VAR_3;",
"struct scsi_task *VAR_5;",
"if (VAR_1 != 0) {",
"VAR_4->VAR_1 = 1;",
"VAR_4->complete = 1;",
"return;",
"}",
"VAR_5 = iscsi_inquiry_task(VAR_0, VAR_4->iscsilun->lun,\n0, 0, 36,\nisc... | [
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25,
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
]
] |
2,420 | static inline void s_zero(int cur_diff, struct G722Band *band)
{
int s_zero = 0;
#define ACCUM(k, x, d) do { \
int tmp = x; \
band->zero_mem[k] = ((band->zero_mem[k] * 255) >> 8) + \
d*((band->diff_mem[k]^cur_diff) < 0 ? -128 : 128); \
band->diff_mem[k... | true | FFmpeg | f55df62998681c7702f008ce7c12a00b15e33f53 | static inline void s_zero(int cur_diff, struct G722Band *band)
{
int s_zero = 0;
#define ACCUM(k, x, d) do { \
int tmp = x; \
band->zero_mem[k] = ((band->zero_mem[k] * 255) >> 8) + \
d*((band->diff_mem[k]^cur_diff) < 0 ? -128 : 128); \
band->diff_mem[k... | {
"code": [
" ACCUM(0, cur_diff << 1, 1);",
" ACCUM(0, cur_diff << 1, 0);"
],
"line_no": [
35,
49
]
} | static inline void VAR_2(int VAR_0, struct G722Band *VAR_1)
{
int VAR_2 = 0;
#define ACCUM(k, x, d) do { \
int VAR_3 = x; \
VAR_1->zero_mem[k] = ((VAR_1->zero_mem[k] * 255) >> 8) + \
d*((VAR_1->diff_mem[k]^VAR_0) < 0 ? -128 : 128); \
VAR_1->diff_mem[k]... | [
"static inline void VAR_2(int VAR_0, struct G722Band *VAR_1)\n{",
"int VAR_2 = 0;",
"#define ACCUM(k, x, d) do { \\",
"int VAR_3 = x; \\",
"VAR_1->zero_mem[k] = ((VAR_1->zero_mem[k] * 255) >> 8) + \\\nd*((VAR_1->diff_mem[k]^VAR_0) < 0 ? -128 : 128); \\",
"VAR_1->diff_mem[k] = VAR_3; \\",
"VAR_2 += (VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
... |
2,421 | static uint32_t qvirtio_pci_get_features(QVirtioDevice *d)
{
QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d;
return qpci_io_readl(dev->pdev, dev->addr + VIRTIO_PCI_HOST_FEATURES);
}
| true | qemu | b4ba67d9a702507793c2724e56f98e9b0f7be02b | static uint32_t qvirtio_pci_get_features(QVirtioDevice *d)
{
QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d;
return qpci_io_readl(dev->pdev, dev->addr + VIRTIO_PCI_HOST_FEATURES);
}
| {
"code": [
" return qpci_io_readl(dev->pdev, dev->addr + VIRTIO_PCI_HOST_FEATURES);"
],
"line_no": [
7
]
} | static uint32_t FUNC_0(QVirtioDevice *d)
{
QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d;
return qpci_io_readl(dev->pdev, dev->addr + VIRTIO_PCI_HOST_FEATURES);
}
| [
"static uint32_t FUNC_0(QVirtioDevice *d)\n{",
"QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d;",
"return qpci_io_readl(dev->pdev, dev->addr + VIRTIO_PCI_HOST_FEATURES);",
"}"
] | [
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
2,422 | static av_cold int decode_init(AVCodecContext * avctx)
{
KmvcContext *const c = avctx->priv_data;
int i;
c->avctx = avctx;
if (avctx->width > 320 || avctx->height > 200) {
av_log(avctx, AV_LOG_ERROR, "KMVC supports frames <= 320x200\n");
return -1;
}
c->frm0 = av_m... | true | FFmpeg | b12d92efd6c0d48665383a9baecc13e7ebbd8a22 | static av_cold int decode_init(AVCodecContext * avctx)
{
KmvcContext *const c = avctx->priv_data;
int i;
c->avctx = avctx;
if (avctx->width > 320 || avctx->height > 200) {
av_log(avctx, AV_LOG_ERROR, "KMVC supports frames <= 320x200\n");
return -1;
}
c->frm0 = av_m... | {
"code": [
" c->pal[i] = 0xFF << 24 | i * 0x10101;"
],
"line_no": [
37
]
} | static av_cold int FUNC_0(AVCodecContext * avctx)
{
KmvcContext *const c = avctx->priv_data;
int VAR_0;
c->avctx = avctx;
if (avctx->width > 320 || avctx->height > 200) {
av_log(avctx, AV_LOG_ERROR, "KMVC supports frames <= 320x200\n");
return -1;
}
c->frm0 = av_ma... | [
"static av_cold int FUNC_0(AVCodecContext * avctx)\n{",
"KmvcContext *const c = avctx->priv_data;",
"int VAR_0;",
"c->avctx = avctx;",
"if (avctx->width > 320 || avctx->height > 200) {",
"av_log(avctx, AV_LOG_ERROR, \"KMVC supports frames <= 320x200\\n\");",
"return -1;",
"}",
"c->frm0 = av_mallocz(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
... |
2,423 | static uint8_t lag_calc_zero_run(int8_t x)
{
return (x << 1) ^ (x >> 7);
}
| true | FFmpeg | ddb2dd7edbccc5596d8e3c039133be8444cb1d02 | static uint8_t lag_calc_zero_run(int8_t x)
{
return (x << 1) ^ (x >> 7);
}
| {
"code": [
" return (x << 1) ^ (x >> 7);"
],
"line_no": [
5
]
} | static uint8_t FUNC_0(int8_t x)
{
return (x << 1) ^ (x >> 7);
}
| [
"static uint8_t FUNC_0(int8_t x)\n{",
"return (x << 1) ^ (x >> 7);",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
2,425 | static void patch_reloc(uint8_t *code_ptr, int type,
intptr_t value, intptr_t addend)
{
value += addend;
switch(type) {
case R_386_PC32:
value -= (uintptr_t)code_ptr;
if (value != (int32_t)value) {
tcg_abort();
}
*(uint32_t *)code... | true | qemu | 5c53bb812152c3d7919cadfd47c210b181bf89ac | static void patch_reloc(uint8_t *code_ptr, int type,
intptr_t value, intptr_t addend)
{
value += addend;
switch(type) {
case R_386_PC32:
value -= (uintptr_t)code_ptr;
if (value != (int32_t)value) {
tcg_abort();
}
*(uint32_t *)code... | {
"code": [
" *(uint32_t *)code_ptr = value;",
" *(uint8_t *)code_ptr = value;"
],
"line_no": [
21,
35
]
} | static void FUNC_0(uint8_t *VAR_0, int VAR_1,
intptr_t VAR_2, intptr_t VAR_3)
{
VAR_2 += VAR_3;
switch(VAR_1) {
case R_386_PC32:
VAR_2 -= (uintptr_t)VAR_0;
if (VAR_2 != (int32_t)VAR_2) {
tcg_abort();
}
*(uint32_t *)VAR_0 = VAR_2;
... | [
"static void FUNC_0(uint8_t *VAR_0, int VAR_1,\nintptr_t VAR_2, intptr_t VAR_3)\n{",
"VAR_2 += VAR_3;",
"switch(VAR_1) {",
"case R_386_PC32:\nVAR_2 -= (uintptr_t)VAR_0;",
"if (VAR_2 != (int32_t)VAR_2) {",
"tcg_abort();",
"}",
"*(uint32_t *)VAR_0 = VAR_2;",
"break;",
"case R_386_PC8:\nVAR_2 -= (uin... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
... |
2,426 | static int nut_write_trailer(AVFormatContext *s)
{
NUTContext *nut = s->priv_data;
ByteIOContext *bc = &s->pb;
update_packetheader(nut, bc, 0);
#if 0
int i;
/* WRITE INDEX */
for (i = 0; s->nb_streams; i++)
{
put_be64(bc, INDEX_STARTCODE);
put_packetheader(nut, bc, 64);
... | false | FFmpeg | ee9f36a88eb3e2706ea659acb0ca80c414fa5d8a | static int nut_write_trailer(AVFormatContext *s)
{
NUTContext *nut = s->priv_data;
ByteIOContext *bc = &s->pb;
update_packetheader(nut, bc, 0);
#if 0
int i;
for (i = 0; s->nb_streams; i++)
{
put_be64(bc, INDEX_STARTCODE);
put_packetheader(nut, bc, 64);
put_v(bc, s->st... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
NUTContext *nut = VAR_0->priv_data;
ByteIOContext *bc = &VAR_0->pb;
update_packetheader(nut, bc, 0);
#if 0
int i;
for (i = 0; VAR_0->nb_streams; i++)
{
put_be64(bc, INDEX_STARTCODE);
put_packetheader(nut, bc, 64);
put_v(bc, ... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"NUTContext *nut = VAR_0->priv_data;",
"ByteIOContext *bc = &VAR_0->pb;",
"update_packetheader(nut, bc, 0);",
"#if 0\nint i;",
"for (i = 0; VAR_0->nb_streams; i++)",
"{",
"put_be64(bc, INDEX_STARTCODE);",
"put_packetheader(nut, bc, 64);",
"put_v(bc, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15,
17
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
47
],
[
51
],
[
55
],
[
57
]
] |
2,427 | static void noise(uint8_t *dst, const uint8_t *src,
int dst_linesize, int src_linesize,
int width, int start, int end, NoiseContext *n, int comp)
{
FilterParams *p = &n->param[comp];
int8_t *noise = p->noise;
const int flags = p->flags;
AVLFG *lfg = &p->lfg;
... | false | FFmpeg | f8f42f48218138d37956407ebf10227eb86d4a2d | static void noise(uint8_t *dst, const uint8_t *src,
int dst_linesize, int src_linesize,
int width, int start, int end, NoiseContext *n, int comp)
{
FilterParams *p = &n->param[comp];
int8_t *noise = p->noise;
const int flags = p->flags;
AVLFG *lfg = &p->lfg;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(uint8_t *VAR_0, const uint8_t *VAR_1,
int VAR_2, int VAR_3,
int VAR_4, int VAR_5, int VAR_6, NoiseContext *VAR_7, int VAR_8)
{
FilterParams *p = &VAR_7->param[VAR_8];
int8_t *FUNC_0 = p->FUNC_0;
const int VAR_9 = p->VAR_9;
AVLFG *lfg = &p->lf... | [
"static void FUNC_0(uint8_t *VAR_0, const uint8_t *VAR_1,\nint VAR_2, int VAR_3,\nint VAR_4, int VAR_5, int VAR_6, NoiseContext *VAR_7, int VAR_8)\n{",
"FilterParams *p = &VAR_7->param[VAR_8];",
"int8_t *FUNC_0 = p->FUNC_0;",
"const int VAR_9 = p->VAR_9;",
"AVLFG *lfg = &p->lfg;",
"int VAR_10, VAR_11;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
33
],
[
35,
37
],
[
39,
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
2,428 | void ff_generate_sliding_window_mmcos(H264Context *h) {
MpegEncContext * const s = &h->s;
assert(h->long_ref_count + h->short_ref_count <= h->sps.ref_frame_count);
h->mmco_index= 0;
if(h->short_ref_count && h->long_ref_count + h->short_ref_count == h->sps.ref_frame_count &&
!(FIELD_PI... | false | FFmpeg | 7ac85f4be840361d55db302ac476ced28297a061 | void ff_generate_sliding_window_mmcos(H264Context *h) {
MpegEncContext * const s = &h->s;
assert(h->long_ref_count + h->short_ref_count <= h->sps.ref_frame_count);
h->mmco_index= 0;
if(h->short_ref_count && h->long_ref_count + h->short_ref_count == h->sps.ref_frame_count &&
!(FIELD_PI... | {
"code": [],
"line_no": []
} | void FUNC_0(H264Context *VAR_0) {
MpegEncContext * const s = &VAR_0->s;
assert(VAR_0->long_ref_count + VAR_0->short_ref_count <= VAR_0->sps.ref_frame_count);
VAR_0->mmco_index= 0;
if(VAR_0->short_ref_count && VAR_0->long_ref_count + VAR_0->short_ref_count == VAR_0->sps.ref_frame_count &&
... | [
"void FUNC_0(H264Context *VAR_0) {",
"MpegEncContext * const s = &VAR_0->s;",
"assert(VAR_0->long_ref_count + VAR_0->short_ref_count <= VAR_0->sps.ref_frame_count);",
"VAR_0->mmco_index= 0;",
"if(VAR_0->short_ref_count && VAR_0->long_ref_count + VAR_0->short_ref_count == VAR_0->sps.ref_frame_count &&\n!(FIE... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
9
],
[
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
2,430 | static av_cold int X264_init(AVCodecContext *avctx)
{
X264Context *x4 = avctx->priv_data;
AVCPBProperties *cpb_props;
#if CONFIG_LIBX262_ENCODER
if (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
x4->params.b_mpeg2 = 1;
x264_param_default_mpeg2(&x4->params);
} else
#else
x2... | false | FFmpeg | 0e6c8532215790bbe560a9eea4f3cc82bb55cf92 | static av_cold int X264_init(AVCodecContext *avctx)
{
X264Context *x4 = avctx->priv_data;
AVCPBProperties *cpb_props;
#if CONFIG_LIBX262_ENCODER
if (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
x4->params.b_mpeg2 = 1;
x264_param_default_mpeg2(&x4->params);
} else
#else
x2... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
X264Context *x4 = avctx->priv_data;
AVCPBProperties *cpb_props;
#if CONFIG_LIBX262_ENCODER
if (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
x4->params.b_mpeg2 = 1;
x264_param_default_mpeg2(&x4->params);
} else
#else
x264_... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"X264Context *x4 = avctx->priv_data;",
"AVCPBProperties *cpb_props;",
"#if CONFIG_LIBX262_ENCODER\nif (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO) {",
"x4->params.b_mpeg2 = 1;",
"x264_param_default_mpeg2(&x4->params);",
"} else",
"#else\nx264_param... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25,
29
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
45,
47
],
[
51
],
[
53
],
[
55
],
... |
2,432 | static void blend_image_rgba_pm(AVFilterContext *ctx, AVFrame *dst, const AVFrame *src, int x, int y)
{
blend_image_packed_rgb(ctx, dst, src, 1, x, y, 1);
}
| false | FFmpeg | 6260ab60a80fd8baebf79f9ce9299b0db72333b5 | static void blend_image_rgba_pm(AVFilterContext *ctx, AVFrame *dst, const AVFrame *src, int x, int y)
{
blend_image_packed_rgb(ctx, dst, src, 1, x, y, 1);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(AVFilterContext *VAR_0, AVFrame *VAR_1, const AVFrame *VAR_2, int VAR_3, int VAR_4)
{
blend_image_packed_rgb(VAR_0, VAR_1, VAR_2, 1, VAR_3, VAR_4, 1);
}
| [
"static void FUNC_0(AVFilterContext *VAR_0, AVFrame *VAR_1, const AVFrame *VAR_2, int VAR_3, int VAR_4)\n{",
"blend_image_packed_rgb(VAR_0, VAR_1, VAR_2, 1, VAR_3, VAR_4, 1);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
2,433 | int ff_h264_frame_start(H264Context *h)
{
Picture *pic;
int i, ret;
const int pixel_shift = h->pixel_shift;
int c[4] = {
1<<(h->sps.bit_depth_luma-1),
1<<(h->sps.bit_depth_chroma-1),
1<<(h->sps.bit_depth_chroma-1),
-1
};
if (!ff_thread_can_start_frame... | false | FFmpeg | 039f55c80333a9db0e64e5c975b0820bff01c5e2 | int ff_h264_frame_start(H264Context *h)
{
Picture *pic;
int i, ret;
const int pixel_shift = h->pixel_shift;
int c[4] = {
1<<(h->sps.bit_depth_luma-1),
1<<(h->sps.bit_depth_chroma-1),
1<<(h->sps.bit_depth_chroma-1),
-1
};
if (!ff_thread_can_start_frame... | {
"code": [],
"line_no": []
} | int FUNC_0(H264Context *VAR_0)
{
Picture *pic;
int VAR_1, VAR_2;
const int VAR_3 = VAR_0->VAR_3;
int VAR_4[4] = {
1<<(VAR_0->sps.bit_depth_luma-1),
1<<(VAR_0->sps.bit_depth_chroma-1),
1<<(VAR_0->sps.bit_depth_chroma-1),
-1
};
if (!ff_thread_can_start_... | [
"int FUNC_0(H264Context *VAR_0)\n{",
"Picture *pic;",
"int VAR_1, VAR_2;",
"const int VAR_3 = VAR_0->VAR_3;",
"int VAR_4[4] = {",
"1<<(VAR_0->sps.bit_depth_luma-1),\n1<<(VAR_0->sps.bit_depth_chroma-1),\n1<<(VAR_0->sps.bit_depth_chroma-1),\n-1\n};",
"if (!ff_thread_can_start_frame(VAR_0->avctx)) {",
"a... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13,
15,
17,
19,
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
2,434 | static int probe(AVProbeData *p)
{
if (p->buf_size < 13)
return 0;
if (p->buf[0] == 0x01 && p->buf[1] == 0x00 &&
p->buf[4] == 0x01 + p->buf[2] &&
p->buf[8] == p->buf[4] + p->buf[6] &&
p->buf[12] == p->buf[8] + p->buf[10])
return AVPROBE_SCORE_MAX;
return ... | false | FFmpeg | 87e8788680e16c51f6048af26f3f7830c35207a5 | static int probe(AVProbeData *p)
{
if (p->buf_size < 13)
return 0;
if (p->buf[0] == 0x01 && p->buf[1] == 0x00 &&
p->buf[4] == 0x01 + p->buf[2] &&
p->buf[8] == p->buf[4] + p->buf[6] &&
p->buf[12] == p->buf[8] + p->buf[10])
return AVPROBE_SCORE_MAX;
return ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVProbeData *VAR_0)
{
if (VAR_0->buf_size < 13)
return 0;
if (VAR_0->buf[0] == 0x01 && VAR_0->buf[1] == 0x00 &&
VAR_0->buf[4] == 0x01 + VAR_0->buf[2] &&
VAR_0->buf[8] == VAR_0->buf[4] + VAR_0->buf[6] &&
VAR_0->buf[12] == VAR_0->buf[8] + VAR_0->buf[10])
... | [
"static int FUNC_0(AVProbeData *VAR_0)\n{",
"if (VAR_0->buf_size < 13)\nreturn 0;",
"if (VAR_0->buf[0] == 0x01 && VAR_0->buf[1] == 0x00 &&\nVAR_0->buf[4] == 0x01 + VAR_0->buf[2] &&\nVAR_0->buf[8] == VAR_0->buf[4] + VAR_0->buf[6] &&\nVAR_0->buf[12] == VAR_0->buf[8] + VAR_0->buf[10])\nreturn AVPROBE_SCORE_MAX;",
... | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
11,
13,
15,
17,
19
],
[
23
],
[
25
]
] |
2,435 | void ff_weight_h264_pixels8_8_msa(uint8_t *src, int stride,
int height, int log2_denom,
int weight_src, int offset)
{
avc_wgt_8width_msa(src, stride,
height, log2_denom, weight_src, offset);
}
| false | FFmpeg | bcd7bf7eeb09a395cc01698842d1b8be9af483fc | void ff_weight_h264_pixels8_8_msa(uint8_t *src, int stride,
int height, int log2_denom,
int weight_src, int offset)
{
avc_wgt_8width_msa(src, stride,
height, log2_denom, weight_src, offset);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(uint8_t *VAR_0, int VAR_1,
int VAR_2, int VAR_3,
int VAR_4, int VAR_5)
{
avc_wgt_8width_msa(VAR_0, VAR_1,
VAR_2, VAR_3, VAR_4, VAR_5);
}
| [
"void FUNC_0(uint8_t *VAR_0, int VAR_1,\nint VAR_2, int VAR_3,\nint VAR_4, int VAR_5)\n{",
"avc_wgt_8width_msa(VAR_0, VAR_1,\nVAR_2, VAR_3, VAR_4, VAR_5);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9,
11
],
[
13
]
] |
2,436 | void ff_fetch_timestamp(AVCodecParserContext *s, int off, int remove){
int i;
s->dts= s->pts= AV_NOPTS_VALUE;
s->offset= 0;
for(i = 0; i < AV_PARSER_PTS_NB; i++) {
if ( s->next_frame_offset + off >= s->cur_frame_offset[i]
&&(s-> frame_offset < s->cur_frame_offset... | false | FFmpeg | a4c7a5ea27050a28625eabf1ba98cfef9ac6620d | void ff_fetch_timestamp(AVCodecParserContext *s, int off, int remove){
int i;
s->dts= s->pts= AV_NOPTS_VALUE;
s->offset= 0;
for(i = 0; i < AV_PARSER_PTS_NB; i++) {
if ( s->next_frame_offset + off >= s->cur_frame_offset[i]
&&(s-> frame_offset < s->cur_frame_offset... | {
"code": [],
"line_no": []
} | void FUNC_0(AVCodecParserContext *VAR_0, int VAR_1, int VAR_2){
int VAR_3;
VAR_0->dts= VAR_0->pts= AV_NOPTS_VALUE;
VAR_0->offset= 0;
for(VAR_3 = 0; VAR_3 < AV_PARSER_PTS_NB; VAR_3++) {
if ( VAR_0->next_frame_offset + VAR_1 >= VAR_0->cur_frame_offset[VAR_3]
&&(VAR_0-> fr... | [
"void FUNC_0(AVCodecParserContext *VAR_0, int VAR_1, int VAR_2){",
"int VAR_3;",
"VAR_0->dts= VAR_0->pts= AV_NOPTS_VALUE;",
"VAR_0->offset= 0;",
"for(VAR_3 = 0; VAR_3 < AV_PARSER_PTS_NB; VAR_3++) {",
"if ( VAR_0->next_frame_offset + VAR_1 >= VAR_0->cur_frame_offset[VAR_3]\n&&(VAR_0-> frame_offset ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
7
],
[
9
],
[
11
],
[
13,
15,
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
]
] |
2,437 | static void new_video_stream(AVFormatContext *oc)
{
AVStream *st;
AVCodecContext *video_enc;
enum CodecID codec_id;
st = av_new_stream(oc, oc->nb_streams);
if (!st) {
fprintf(stderr, "Could not alloc stream\n");
av_exit(1);
}
avcodec_get_context_defaults2(st->code... | false | FFmpeg | 0c22311b56e66115675c4a96e4c78547886a4171 | static void new_video_stream(AVFormatContext *oc)
{
AVStream *st;
AVCodecContext *video_enc;
enum CodecID codec_id;
st = av_new_stream(oc, oc->nb_streams);
if (!st) {
fprintf(stderr, "Could not alloc stream\n");
av_exit(1);
}
avcodec_get_context_defaults2(st->code... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVFormatContext *VAR_0)
{
AVStream *st;
AVCodecContext *video_enc;
enum CodecID VAR_1;
st = av_new_stream(VAR_0, VAR_0->nb_streams);
if (!st) {
fprintf(stderr, "Could not alloc stream\n");
av_exit(1);
}
avcodec_get_context_defaults2(st->codec, A... | [
"static void FUNC_0(AVFormatContext *VAR_0)\n{",
"AVStream *st;",
"AVCodecContext *video_enc;",
"enum CodecID VAR_1;",
"st = av_new_stream(VAR_0, VAR_0->nb_streams);",
"if (!st) {",
"fprintf(stderr, \"Could not alloc stream\\n\");",
"av_exit(1);",
"}",
"avcodec_get_context_defaults2(st->codec, AVM... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
39,
41
],
[
45,
47
],
[
49
],
[
51
],
[
53
... |
2,438 | static int opt_debug(void *optctx, const char *opt, const char *arg)
{
av_log_set_level(99);
debug = parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX);
return 0;
}
| false | FFmpeg | e5c32d6da7836c7c9bb8393cb4de7e0997a4363b | static int opt_debug(void *optctx, const char *opt, const char *arg)
{
av_log_set_level(99);
debug = parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX);
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0, const char *VAR_1, const char *VAR_2)
{
av_log_set_level(99);
debug = parse_number_or_die(VAR_1, VAR_2, OPT_INT64, 0, INT_MAX);
return 0;
}
| [
"static int FUNC_0(void *VAR_0, const char *VAR_1, const char *VAR_2)\n{",
"av_log_set_level(99);",
"debug = parse_number_or_die(VAR_1, VAR_2, OPT_INT64, 0, INT_MAX);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
2,439 | static int pulse_set_volume(PulseData *s, double volume)
{
pa_operation *op;
pa_cvolume cvol;
pa_volume_t vol;
const pa_sample_spec *ss = pa_stream_get_sample_spec(s->stream);
vol = pa_sw_volume_multiply(lround(volume * PA_VOLUME_NORM), s->base_volume);
pa_cvolume_set(&cvol, ss->channel... | false | FFmpeg | 879b4a9d3ec89f587f9442fd4c7f1f36d5bd39c3 | static int pulse_set_volume(PulseData *s, double volume)
{
pa_operation *op;
pa_cvolume cvol;
pa_volume_t vol;
const pa_sample_spec *ss = pa_stream_get_sample_spec(s->stream);
vol = pa_sw_volume_multiply(lround(volume * PA_VOLUME_NORM), s->base_volume);
pa_cvolume_set(&cvol, ss->channel... | {
"code": [],
"line_no": []
} | static int FUNC_0(PulseData *VAR_0, double VAR_1)
{
pa_operation *op;
pa_cvolume cvol;
pa_volume_t vol;
const pa_sample_spec *VAR_2 = pa_stream_get_sample_spec(VAR_0->stream);
vol = pa_sw_volume_multiply(lround(VAR_1 * PA_VOLUME_NORM), VAR_0->base_volume);
pa_cvolume_set(&cvol, VAR_2->c... | [
"static int FUNC_0(PulseData *VAR_0, double VAR_1)\n{",
"pa_operation *op;",
"pa_cvolume cvol;",
"pa_volume_t vol;",
"const pa_sample_spec *VAR_2 = pa_stream_get_sample_spec(VAR_0->stream);",
"vol = pa_sw_volume_multiply(lround(VAR_1 * PA_VOLUME_NORM), VAR_0->base_volume);",
"pa_cvolume_set(&cvol, VAR_2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.