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 |
|---|---|---|---|---|---|---|---|---|---|---|
3,548 | int avpriv_dv_produce_packet(DVDemuxContext *c, AVPacket *pkt,
uint8_t *buf, int buf_size)
{
int size, i;
uint8_t *ppcm[4] = { 0 };
if (buf_size < DV_PROFILE_BYTES ||
!(c->sys = avpriv_dv_frame_profile(c->sys, buf, buf_size)) ||
buf_size < c->sys->frame_... | true | FFmpeg | 7ee191cab0dc44700f26c5784e2adeb6a779651b | int avpriv_dv_produce_packet(DVDemuxContext *c, AVPacket *pkt,
uint8_t *buf, int buf_size)
{
int size, i;
uint8_t *ppcm[4] = { 0 };
if (buf_size < DV_PROFILE_BYTES ||
!(c->sys = avpriv_dv_frame_profile(c->sys, buf, buf_size)) ||
buf_size < c->sys->frame_... | {
"code": [
" uint8_t *ppcm[4] = { 0 };"
],
"line_no": [
9
]
} | int FUNC_0(DVDemuxContext *VAR_0, AVPacket *VAR_1,
uint8_t *VAR_2, int VAR_3)
{
int VAR_4, VAR_5;
uint8_t *ppcm[4] = { 0 };
if (VAR_3 < DV_PROFILE_BYTES ||
!(VAR_0->sys = avpriv_dv_frame_profile(VAR_0->sys, VAR_2, VAR_3)) ||
VAR_3 < VAR_0->sys->frame_siz... | [
"int FUNC_0(DVDemuxContext *VAR_0, AVPacket *VAR_1,\nuint8_t *VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5;",
"uint8_t *ppcm[4] = { 0 };",
"if (VAR_3 < DV_PROFILE_BYTES ||\n!(VAR_0->sys = avpriv_dv_frame_profile(VAR_0->sys, VAR_2, VAR_3)) ||\nVAR_3 < VAR_0->sys->frame_size) {",
"return -1;",
"}",
"VAR_4 = d... | [
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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13,
15,
17
],
[
19
],
[
21
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43,
45
],
[
53
],
[
55
],
[
57
],
[
59
],
[... |
3,549 | static void handle_event(int event)
{
static bool logged;
if (event & ~PVPANIC_PANICKED && !logged) {
qemu_log_mask(LOG_GUEST_ERROR, "pvpanic: unknown event %#x.\n", event);
logged = true;
}
if (event & PVPANIC_PANICKED) {
panicked_mon_event("pause");
vm_stop... | true | qemu | 3a4496903795e05c1e8367bb4c9862d5670f48d7 | static void handle_event(int event)
{
static bool logged;
if (event & ~PVPANIC_PANICKED && !logged) {
qemu_log_mask(LOG_GUEST_ERROR, "pvpanic: unknown event %#x.\n", event);
logged = true;
}
if (event & PVPANIC_PANICKED) {
panicked_mon_event("pause");
vm_stop... | {
"code": [
" panicked_mon_event(\"pause\");"
],
"line_no": [
21
]
} | static void FUNC_0(int VAR_0)
{
static bool VAR_1;
if (VAR_0 & ~PVPANIC_PANICKED && !VAR_1) {
qemu_log_mask(LOG_GUEST_ERROR, "pvpanic: unknown VAR_0 %#x.\n", VAR_0);
VAR_1 = true;
}
if (VAR_0 & PVPANIC_PANICKED) {
panicked_mon_event("pause");
vm_stop(RUN_STAT... | [
"static void FUNC_0(int VAR_0)\n{",
"static bool VAR_1;",
"if (VAR_0 & ~PVPANIC_PANICKED && !VAR_1) {",
"qemu_log_mask(LOG_GUEST_ERROR, \"pvpanic: unknown VAR_0 %#x.\\n\", VAR_0);",
"VAR_1 = true;",
"}",
"if (VAR_0 & PVPANIC_PANICKED) {",
"panicked_mon_event(\"pause\");",
"vm_stop(RUN_STATE_GUEST_PA... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
3,550 | static void *iothread_run(void *opaque)
{
IOThread *iothread = opaque;
rcu_register_thread();
my_iothread = iothread;
qemu_mutex_lock(&iothread->init_done_lock);
iothread->thread_id = qemu_get_thread_id();
qemu_cond_signal(&iothread->init_done_cond);
qemu_mutex_unlock(&iothread->... | true | qemu | 2362a28ea11c145e1a13ae79342d76dc118a72a6 | static void *iothread_run(void *opaque)
{
IOThread *iothread = opaque;
rcu_register_thread();
my_iothread = iothread;
qemu_mutex_lock(&iothread->init_done_lock);
iothread->thread_id = qemu_get_thread_id();
qemu_cond_signal(&iothread->init_done_cond);
qemu_mutex_unlock(&iothread->... | {
"code": [
" while (!atomic_read(&iothread->stopping)) {"
],
"line_no": [
25
]
} | static void *FUNC_0(void *VAR_0)
{
IOThread *iothread = VAR_0;
rcu_register_thread();
my_iothread = iothread;
qemu_mutex_lock(&iothread->init_done_lock);
iothread->thread_id = qemu_get_thread_id();
qemu_cond_signal(&iothread->init_done_cond);
qemu_mutex_unlock(&iothread->init_don... | [
"static void *FUNC_0(void *VAR_0)\n{",
"IOThread *iothread = VAR_0;",
"rcu_register_thread();",
"my_iothread = iothread;",
"qemu_mutex_lock(&iothread->init_done_lock);",
"iothread->thread_id = qemu_get_thread_id();",
"qemu_cond_signal(&iothread->init_done_cond);",
"qemu_mutex_unlock(&iothread->init_do... | [
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
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
37
],
[
39,
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
55
],
... |
3,552 | static void omap_rtc_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
struct omap_rtc_s *s = (struct omap_rtc_s *) opaque;
int offset = addr & OMAP_MPUI_REG_MASK;
struct tm new_tm;
time_t ti[2];
if (size != 1) {
return omap_badwidth_write... | true | qemu | 7e7e5858f83ae711b08d11e2268c6fc6f8385fb7 | static void omap_rtc_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
struct omap_rtc_s *s = (struct omap_rtc_s *) opaque;
int offset = addr & OMAP_MPUI_REG_MASK;
struct tm new_tm;
time_t ti[2];
if (size != 1) {
return omap_badwidth_write... | {
"code": [
" s->ti -= (s->current_tm.tm_year % 100) * 31536000;",
" s->ti += from_bcd(value) * 31536000;"
],
"line_no": [
165,
167
]
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
struct omap_rtc_s *VAR_4 = (struct omap_rtc_s *) VAR_0;
int VAR_5 = VAR_1 & OMAP_MPUI_REG_MASK;
struct tm VAR_6;
time_t ti[2];
if (VAR_3 != 1) {
return omap_badwidth_write8(VA... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"struct omap_rtc_s *VAR_4 = (struct omap_rtc_s *) VAR_0;",
"int VAR_5 = VAR_1 & OMAP_MPUI_REG_MASK;",
"struct tm VAR_6;",
"time_t ti[2];",
"if (VAR_3 != 1) {",
"return omap_badwidth_write8(VAR_0, VAR_1, 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,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27,
29,
31
],
[
33,
35
],
[
37
],
[
39
],
[
43,
45,
47
],
[
49,
51
],
[
53
],
[... |
3,553 | static void neon_store_reg(int reg, int pass, TCGv var)
{
tcg_gen_st_i32(var, cpu_env, neon_reg_offset(reg, pass));
dead_tmp(var);
}
| true | qemu | 7d1b0095bff7157e856d1d0e6c4295641ced2752 | static void neon_store_reg(int reg, int pass, TCGv var)
{
tcg_gen_st_i32(var, cpu_env, neon_reg_offset(reg, pass));
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 void FUNC_0(int VAR_0, int VAR_1, TCGv VAR_2)
{
tcg_gen_st_i32(VAR_2, cpu_env, neon_reg_offset(VAR_0, VAR_1));
dead_tmp(VAR_2);
}
| [
"static void FUNC_0(int VAR_0, int VAR_1, TCGv VAR_2)\n{",
"tcg_gen_st_i32(VAR_2, cpu_env, neon_reg_offset(VAR_0, VAR_1));",
"dead_tmp(VAR_2);",
"}"
] | [
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
3,554 | static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
{
int b, prefixes, aflag, dflag;
int shift, ot;
int modrm, reg, rm, mod, reg_addr, op, opreg, offset_addr, val;
target_ulong next_eip, tval;
int rex_w, rex_r;
if (unlikely(loglevel & CPU_LOG_TB_OP))
tcg_gen_... | true | qemu | 32938e127f50a40844a0fb9c5abb8691aeeccf7e | static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
{
int b, prefixes, aflag, dflag;
int shift, ot;
int modrm, reg, rm, mod, reg_addr, op, opreg, offset_addr, val;
target_ulong next_eip, tval;
int rex_w, rex_r;
if (unlikely(loglevel & CPU_LOG_TB_OP))
tcg_gen_... | {
"code": [],
"line_no": []
} | static target_ulong FUNC_0(DisasContext *s, target_ulong pc_start)
{
int VAR_0, VAR_1, VAR_2, VAR_3;
int VAR_4, VAR_5;
int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_17, VAR_12, VAR_13, VAR_18;
target_ulong next_eip, tval;
int VAR_15, VAR_16;
if (unlikely(loglevel & CPU_LOG_TB_OP))
... | [
"static target_ulong FUNC_0(DisasContext *s, target_ulong pc_start)\n{",
"int VAR_0, VAR_1, VAR_2, VAR_3;",
"int VAR_4, VAR_5;",
"int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_17, VAR_12, VAR_13, VAR_18;",
"target_ulong next_eip, tval;",
"int VAR_15, VAR_16;",
"if (unlikely(loglevel & CPU_LOG_TB_OP))\ntcg... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
41
],
[
43,
45
],
[... |
3,556 | static void align_position(AVIOContext *pb, int64_t offset, uint64_t size)
{
if (avio_tell(pb) != offset + size)
avio_seek(pb, offset + size, SEEK_SET);
}
| true | FFmpeg | 74474750f1ac522730dae271a5ea5003caa8b73c | static void align_position(AVIOContext *pb, int64_t offset, uint64_t size)
{
if (avio_tell(pb) != offset + size)
avio_seek(pb, offset + size, SEEK_SET);
}
| {
"code": [
" if (avio_tell(pb) != offset + size)"
],
"line_no": [
5
]
} | static void FUNC_0(AVIOContext *VAR_0, int64_t VAR_1, uint64_t VAR_2)
{
if (avio_tell(VAR_0) != VAR_1 + VAR_2)
avio_seek(VAR_0, VAR_1 + VAR_2, SEEK_SET);
}
| [
"static void FUNC_0(AVIOContext *VAR_0, int64_t VAR_1, uint64_t VAR_2)\n{",
"if (avio_tell(VAR_0) != VAR_1 + VAR_2)\navio_seek(VAR_0, VAR_1 + VAR_2, SEEK_SET);",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
]
] |
3,557 | static int usb_serial_handle_data(USBDevice *dev, USBPacket *p)
{
USBSerialState *s = (USBSerialState *)dev;
int ret = 0;
uint8_t devep = p->devep;
uint8_t *data = p->data;
int len = p->len;
int first_len;
switch (p->pid) {
case USB_TOKEN_OUT:
if (devep != 2)
... | true | qemu | 4f4321c11ff6e98583846bfd6f0e81954924b003 | static int usb_serial_handle_data(USBDevice *dev, USBPacket *p)
{
USBSerialState *s = (USBSerialState *)dev;
int ret = 0;
uint8_t devep = p->devep;
uint8_t *data = p->data;
int len = p->len;
int first_len;
switch (p->pid) {
case USB_TOKEN_OUT:
if (devep != 2)
... | {
"code": [
" uint8_t *data = p->data;",
" int len = p->len;",
" uint8_t *data = p->data;",
" int len = p->len;",
" uint8_t *data = p->data;",
" int len = p->len;"
],
"line_no": [
11,
13,
11,
13,
11,
13
]
} | static int FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)
{
USBSerialState *s = (USBSerialState *)VAR_0;
int VAR_2 = 0;
uint8_t devep = VAR_1->devep;
uint8_t *data = VAR_1->data;
int VAR_3 = VAR_1->VAR_3;
int VAR_4;
switch (VAR_1->pid) {
case USB_TOKEN_OUT:
if (devep != 2... | [
"static int FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)\n{",
"USBSerialState *s = (USBSerialState *)VAR_0;",
"int VAR_2 = 0;",
"uint8_t devep = VAR_1->devep;",
"uint8_t *data = VAR_1->data;",
"int VAR_3 = VAR_1->VAR_3;",
"int VAR_4;",
"switch (VAR_1->pid) {",
"case USB_TOKEN_OUT:\nif (devep != 2)\ngo... | [
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,
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
],
[
29
],
[
33,
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
3,558 | void isa_register_portio_list(ISADevice *dev, uint16_t start,
const MemoryRegionPortio *pio_start,
void *opaque, const char *name)
{
PortioList piolist;
/* START is how we should treat DEV, regardless of the actual
contents of the portio... | true | qemu | e305a16510afa74eec20390479e349402e55ef4c | void isa_register_portio_list(ISADevice *dev, uint16_t start,
const MemoryRegionPortio *pio_start,
void *opaque, const char *name)
{
PortioList piolist;
isa_init_ioport(dev, start);
portio_list_init(&piolist, OBJEC... | {
"code": [
"void isa_register_portio_list(ISADevice *dev, uint16_t start,",
" PortioList piolist;",
" portio_list_init(&piolist, OBJECT(dev), pio_start, opaque, name);",
" portio_list_add(&piolist, isabus->address_space_io, start);",
"void isa_register_portio_list(ISADevice *dev, uint16_... | void FUNC_0(ISADevice *VAR_0, uint16_t VAR_1,
const MemoryRegionPortio *VAR_2,
void *VAR_3, const char *VAR_4)
{
PortioList piolist;
isa_init_ioport(VAR_0, VAR_1);
portio_list_init(&piolist, OBJECT(VAR_0), VAR_2, V... | [
"void FUNC_0(ISADevice *VAR_0, uint16_t VAR_1,\nconst MemoryRegionPortio *VAR_2,\nvoid *VAR_3, const char *VAR_4)\n{",
"PortioList piolist;",
"isa_init_ioport(VAR_0, VAR_1);",
"portio_list_init(&piolist, OBJECT(VAR_0), VAR_2, VAR_3, VAR_4);",
"portio_list_add(&piolist, isabus->address_space_io, VAR_1);",
... | [
1,
1,
0,
1,
1,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
19
],
[
33
],
[
35
],
[
37
]
] |
3,559 | static inline void write_mem(IVState *s, uint64_t off,
const void *buf, size_t len)
{
QTestState *qtest = global_qtest;
global_qtest = s->qtest;
qpci_memwrite(s->dev, s->mem_base + off, buf, len);
global_qtest = qtest;
}
| true | qemu | b4ba67d9a702507793c2724e56f98e9b0f7be02b | static inline void write_mem(IVState *s, uint64_t off,
const void *buf, size_t len)
{
QTestState *qtest = global_qtest;
global_qtest = s->qtest;
qpci_memwrite(s->dev, s->mem_base + off, buf, len);
global_qtest = qtest;
}
| {
"code": [
" qpci_memwrite(s->dev, s->mem_base + off, buf, len);"
],
"line_no": [
13
]
} | static inline void FUNC_0(IVState *VAR_0, uint64_t VAR_1,
const void *VAR_2, size_t VAR_3)
{
QTestState *qtest = global_qtest;
global_qtest = VAR_0->qtest;
qpci_memwrite(VAR_0->dev, VAR_0->mem_base + VAR_1, VAR_2, VAR_3);
global_qtest = qtest;
}
| [
"static inline void FUNC_0(IVState *VAR_0, uint64_t VAR_1,\nconst void *VAR_2, size_t VAR_3)\n{",
"QTestState *qtest = global_qtest;",
"global_qtest = VAR_0->qtest;",
"qpci_memwrite(VAR_0->dev, VAR_0->mem_base + VAR_1, VAR_2, VAR_3);",
"global_qtest = qtest;",
"}"
] | [
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
3,562 | static void qemu_mod_timer_ns(QEMUTimer *ts, int64_t expire_time)
{
QEMUTimer **pt, *t;
qemu_del_timer(ts);
/* add the timer in the sorted list */
/* NOTE: this code must be signal safe because
qemu_timer_expired() can be called from a signal. */
pt = &active_timers[ts->clock->type... | true | qemu | ab33fcda9f96b9195dfb3fcf5bd9bb5383caeaea | static void qemu_mod_timer_ns(QEMUTimer *ts, int64_t expire_time)
{
QEMUTimer **pt, *t;
qemu_del_timer(ts);
pt = &active_timers[ts->clock->type];
for(;;) {
t = *pt;
if (!t)
break;
if (t->expire_time > expire_time)
break;
... | {
"code": [
" if (use_icount)"
],
"line_no": [
57
]
} | static void FUNC_0(QEMUTimer *VAR_0, int64_t VAR_1)
{
QEMUTimer **pt, *t;
qemu_del_timer(VAR_0);
pt = &active_timers[VAR_0->clock->type];
for(;;) {
t = *pt;
if (!t)
break;
if (t->VAR_1 > VAR_1)
break;
pt = &t->next;
... | [
"static void FUNC_0(QEMUTimer *VAR_0, int64_t VAR_1)\n{",
"QEMUTimer **pt, *t;",
"qemu_del_timer(VAR_0);",
"pt = &active_timers[VAR_0->clock->type];",
"for(;;) {",
"t = *pt;",
"if (!t)\nbreak;",
"if (t->VAR_1 > VAR_1)\nbreak;",
"pt = &t->next;",
"}",
"VAR_0->VAR_1 = VAR_1;",
"VAR_0->next = *pt... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
47
],
[
49
],
[
51
],
[
53
],
[
57,
59
],
... |
3,563 | static void co_read_response(void *opaque)
{
BDRVSheepdogState *s = opaque;
if (!s->co_recv) {
s->co_recv = qemu_coroutine_create(aio_read_response);
}
qemu_coroutine_enter(s->co_recv, opaque);
}
| true | qemu | 0b8b8753e4d94901627b3e86431230f2319215c4 | static void co_read_response(void *opaque)
{
BDRVSheepdogState *s = opaque;
if (!s->co_recv) {
s->co_recv = qemu_coroutine_create(aio_read_response);
}
qemu_coroutine_enter(s->co_recv, opaque);
}
| {
"code": [
" s->co_recv = qemu_coroutine_create(aio_read_response);",
" qemu_coroutine_enter(s->co_recv, opaque);"
],
"line_no": [
11,
17
]
} | static void FUNC_0(void *VAR_0)
{
BDRVSheepdogState *s = VAR_0;
if (!s->co_recv) {
s->co_recv = qemu_coroutine_create(aio_read_response);
}
qemu_coroutine_enter(s->co_recv, VAR_0);
}
| [
"static void FUNC_0(void *VAR_0)\n{",
"BDRVSheepdogState *s = VAR_0;",
"if (!s->co_recv) {",
"s->co_recv = qemu_coroutine_create(aio_read_response);",
"}",
"qemu_coroutine_enter(s->co_recv, VAR_0);",
"}"
] | [
0,
0,
0,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
]
] |
3,564 | static void omap2_inth_write(void *opaque, target_phys_addr_t addr,
uint64_t value, unsigned size)
{
struct omap_intr_handler_s *s = (struct omap_intr_handler_s *) opaque;
int offset = addr;
int bank_no, line_no;
struct omap_intr_handler_bank_s *bank = NULL;
if ... | true | qemu | 096685fc2a955ea17d5363ab452e301be2b43873 | static void omap2_inth_write(void *opaque, target_phys_addr_t addr,
uint64_t value, unsigned size)
{
struct omap_intr_handler_s *s = (struct omap_intr_handler_s *) opaque;
int offset = addr;
int bank_no, line_no;
struct omap_intr_handler_bank_s *bank = NULL;
if ... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
struct omap_intr_handler_s *VAR_4 = (struct omap_intr_handler_s *) VAR_0;
int VAR_5 = VAR_1;
int VAR_6, VAR_7;
struct omap_intr_handler_bank_s *VAR_8 = NULL;
if ((VAR_5 &... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"struct omap_intr_handler_s *VAR_4 = (struct omap_intr_handler_s *) VAR_0;",
"int VAR_5 = VAR_1;",
"int VAR_6, VAR_7;",
"struct omap_intr_handler_bank_s *VAR_8 = NULL;",
"if ((VAR_5 & 0xf80) == 0x80) {",
"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,
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
],
[
30
],
[
32
],
[
36
],
[
38,
40
],
[
42
],
[
44,
46
],
[
51,
53
],
[
55
... |
3,565 | static int decode_hextile(VmncContext *c, uint8_t* dst, uint8_t* src, int w, int h, int stride)
{
int i, j, k;
int bg = 0, fg = 0, rects, color, flags, xy, wh;
const int bpp = c->bpp2;
uint8_t *dst2;
int bw = 16, bh = 16;
uint8_t *ssrc=src;
for(j = 0; j < h; j += 16) {
dst... | true | FFmpeg | 096bc417ae9b5bf35631d48fbc798020aac08aee | static int decode_hextile(VmncContext *c, uint8_t* dst, uint8_t* src, int w, int h, int stride)
{
int i, j, k;
int bg = 0, fg = 0, rects, color, flags, xy, wh;
const int bpp = c->bpp2;
uint8_t *dst2;
int bw = 16, bh = 16;
uint8_t *ssrc=src;
for(j = 0; j < h; j += 16) {
dst... | {
"code": [
"static int decode_hextile(VmncContext *c, uint8_t* dst, uint8_t* src, int w, int h, int stride)",
" color = (flags & HT_CLR);"
],
"line_no": [
1,
59
]
} | static int FUNC_0(VmncContext *VAR_0, uint8_t* VAR_1, uint8_t* VAR_2, int VAR_3, int VAR_4, int VAR_5)
{
int VAR_6, VAR_7, VAR_8;
int VAR_9 = 0, VAR_10 = 0, VAR_11, VAR_12, VAR_13, VAR_14, VAR_15;
const int VAR_16 = VAR_0->bpp2;
uint8_t *dst2;
int VAR_17 = 16, VAR_18 = 16;
uint8_t *ssrc=V... | [
"static int FUNC_0(VmncContext *VAR_0, uint8_t* VAR_1, uint8_t* VAR_2, int VAR_3, int VAR_4, int VAR_5)\n{",
"int VAR_6, VAR_7, VAR_8;",
"int VAR_9 = 0, VAR_10 = 0, VAR_11, VAR_12, VAR_13, VAR_14, VAR_15;",
"const int VAR_16 = VAR_0->bpp2;",
"uint8_t *dst2;",
"int VAR_17 = 16, VAR_18 = 16;",
"uint8_t *s... | [
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,
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
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
3,567 | static void filter_mb_mbaff_edgev( H264Context *h, uint8_t *pix, int stride, int16_t bS[4], int bsi, int qp ) {
int i;
int index_a = qp + h->slice_alpha_c0_offset;
int alpha = (alpha_table+52)[index_a];
int beta = (beta_table+52)[qp + h->slice_beta_offset];
for( i = 0; i < 8; i++, pix += strid... | false | FFmpeg | 0c32e19d584ba6ddbc27f0a796260404daaf4b6a | static void filter_mb_mbaff_edgev( H264Context *h, uint8_t *pix, int stride, int16_t bS[4], int bsi, int qp ) {
int i;
int index_a = qp + h->slice_alpha_c0_offset;
int alpha = (alpha_table+52)[index_a];
int beta = (beta_table+52)[qp + h->slice_beta_offset];
for( i = 0; i < 8; i++, pix += strid... | {
"code": [],
"line_no": []
} | static void FUNC_0( H264Context *VAR_0, uint8_t *VAR_1, int VAR_2, int16_t VAR_3[4], int VAR_4, int VAR_5 ) {
int VAR_6;
int VAR_7 = VAR_5 + VAR_0->slice_alpha_c0_offset;
int VAR_8 = (alpha_table+52)[VAR_7];
int VAR_9 = (beta_table+52)[VAR_5 + VAR_0->slice_beta_offset];
for( VAR_6 = 0; VAR_6 <... | [
"static void FUNC_0( H264Context *VAR_0, uint8_t *VAR_1, int VAR_2, int16_t VAR_3[4], int VAR_4, int VAR_5 ) {",
"int VAR_6;",
"int VAR_7 = VAR_5 + VAR_0->slice_alpha_c0_offset;",
"int VAR_8 = (alpha_table+52)[VAR_7];",
"int VAR_9 = (beta_table+52)[VAR_5 + VAR_0->slice_beta_offset];",
"for( VAR_6 = 0; 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,
0,
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
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43,
45,
47
],
[... |
3,570 | static void arm_idct_add(UINT8 *dest, int line_size, DCTELEM *block)
{
j_rev_dct_ARM (block);
add_pixels_clamped(block, dest, line_size);
}
| false | FFmpeg | 83f238cbf0c038245d2b2dffa5beb0916e7c36d2 | static void arm_idct_add(UINT8 *dest, int line_size, DCTELEM *block)
{
j_rev_dct_ARM (block);
add_pixels_clamped(block, dest, line_size);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(UINT8 *VAR_0, int VAR_1, DCTELEM *VAR_2)
{
j_rev_dct_ARM (VAR_2);
add_pixels_clamped(VAR_2, VAR_0, VAR_1);
}
| [
"static void FUNC_0(UINT8 *VAR_0, int VAR_1, DCTELEM *VAR_2)\n{",
"j_rev_dct_ARM (VAR_2);",
"add_pixels_clamped(VAR_2, VAR_0, VAR_1);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
3,571 | static inline void decode_block_intra(MadContext * t, DCTELEM * block)
{
MpegEncContext *s = &t->s;
int level, i, j, run;
RLTable *rl = &ff_rl_mpeg1;
const uint8_t *scantable = s->intra_scantable.permutated;
int16_t *quant_matrix = s->intra_matrix;
block[0] = (128 + get_sbits(&s->gb, 8)... | false | FFmpeg | 1d0ae92a259b924952856de1a5ca0dc6fd5031e5 | static inline void decode_block_intra(MadContext * t, DCTELEM * block)
{
MpegEncContext *s = &t->s;
int level, i, j, run;
RLTable *rl = &ff_rl_mpeg1;
const uint8_t *scantable = s->intra_scantable.permutated;
int16_t *quant_matrix = s->intra_matrix;
block[0] = (128 + get_sbits(&s->gb, 8)... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(MadContext * VAR_0, DCTELEM * VAR_1)
{
MpegEncContext *s = &VAR_0->s;
int VAR_2, VAR_3, VAR_4, VAR_5;
RLTable *rl = &ff_rl_mpeg1;
const uint8_t *VAR_6 = s->intra_scantable.permutated;
int16_t *quant_matrix = s->intra_matrix;
VAR_1[0] = (128 + get_sbits(&s->gb, ... | [
"static inline void FUNC_0(MadContext * VAR_0, DCTELEM * VAR_1)\n{",
"MpegEncContext *s = &VAR_0->s;",
"int VAR_2, VAR_3, VAR_4, VAR_5;",
"RLTable *rl = &ff_rl_mpeg1;",
"const uint8_t *VAR_6 = s->intra_scantable.permutated;",
"int16_t *quant_matrix = s->intra_matrix;",
"VAR_1[0] = (128 + get_sbits(&s->g... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
... |
3,572 | static void test_ivshmem_memdev(void)
{
IVState state;
/* just for the sake of checking memory-backend property */
setup_vm_cmd(&state, "-object memory-backend-ram,size=1M,id=mb1"
" -device ivshmem,x-memdev=mb1", false);
qtest_quit(state.qtest);
}
| true | qemu | 1760048a5d21bacf0e4838da2f61b2d8db7d2866 | static void test_ivshmem_memdev(void)
{
IVState state;
setup_vm_cmd(&state, "-object memory-backend-ram,size=1M,id=mb1"
" -device ivshmem,x-memdev=mb1", false);
qtest_quit(state.qtest);
}
| {
"code": [
" qtest_quit(state.qtest);"
],
"line_no": [
17
]
} | static void FUNC_0(void)
{
IVState state;
setup_vm_cmd(&state, "-object memory-backend-ram,size=1M,id=mb1"
" -device ivshmem,x-memdev=mb1", false);
qtest_quit(state.qtest);
}
| [
"static void FUNC_0(void)\n{",
"IVState state;",
"setup_vm_cmd(&state, \"-object memory-backend-ram,size=1M,id=mb1\"\n\" -device ivshmem,x-memdev=mb1\", false);",
"qtest_quit(state.qtest);",
"}"
] | [
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
11,
13
],
[
17
],
[
19
]
] |
3,573 | static av_cold void init_static(void)
{
if (!huff_vlc[0].bits) {
INIT_VLC_STATIC(&huff_vlc[0], VLC_BITS, 18,
&ff_mlp_huffman_tables[0][0][1], 2, 1,
&ff_mlp_huffman_tables[0][0][0], 2, 1, 512);
INIT_VLC_STATIC(&huff_vlc[1], VLC_BITS, 16,
&ff_mlp_huffman_... | true | FFmpeg | 7fd88069241ead2d2fd3e2db1b79e4b292e90001 | static av_cold void init_static(void)
{
if (!huff_vlc[0].bits) {
INIT_VLC_STATIC(&huff_vlc[0], VLC_BITS, 18,
&ff_mlp_huffman_tables[0][0][1], 2, 1,
&ff_mlp_huffman_tables[0][0][0], 2, 1, 512);
INIT_VLC_STATIC(&huff_vlc[1], VLC_BITS, 16,
&ff_mlp_huffman_... | {
"code": [],
"line_no": []
} | static av_cold void FUNC_0(void)
{
if (!huff_vlc[0].bits) {
INIT_VLC_STATIC(&huff_vlc[0], VLC_BITS, 18,
&ff_mlp_huffman_tables[0][0][1], 2, 1,
&ff_mlp_huffman_tables[0][0][0], 2, 1, 512);
INIT_VLC_STATIC(&huff_vlc[1], VLC_BITS, 16,
&ff_mlp_huffman_table... | [
"static av_cold void FUNC_0(void)\n{",
"if (!huff_vlc[0].bits) {",
"INIT_VLC_STATIC(&huff_vlc[0], VLC_BITS, 18,\n&ff_mlp_huffman_tables[0][0][1], 2, 1,\n&ff_mlp_huffman_tables[0][0][0], 2, 1, 512);",
"INIT_VLC_STATIC(&huff_vlc[1], VLC_BITS, 16,\n&ff_mlp_huffman_tables[1][0][1], 2, 1,\n&ff_mlp_huffman_tables[1... | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9,
11
],
[
13,
15,
17
],
[
19,
21,
23
],
[
28
]
] |
3,574 | void gen_pc_load(CPUState *env, TranslationBlock *tb,
unsigned long searched_pc, int pc_pos, void *puc)
{
env->regs[15] = gen_opc_pc[pc_pos];
} | true | qemu | e12ce78d4aa05ccf80d6a843a9227042647db39d | void gen_pc_load(CPUState *env, TranslationBlock *tb,
unsigned long searched_pc, int pc_pos, void *puc)
{
env->regs[15] = gen_opc_pc[pc_pos];
} | {
"code": [],
"line_no": []
} | void FUNC_0(CPUState *VAR_0, TranslationBlock *VAR_1,
unsigned long VAR_2, int VAR_3, void *VAR_4)
{
VAR_0->regs[15] = gen_opc_pc[VAR_3];
} | [
"void FUNC_0(CPUState *VAR_0, TranslationBlock *VAR_1,\nunsigned long VAR_2, int VAR_3, void *VAR_4)\n{",
"VAR_0->regs[15] = gen_opc_pc[VAR_3];",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
10
]
] |
3,575 | void virtio_scsi_dataplane_notify(VirtIODevice *vdev, VirtIOSCSIReq *req)
{
if (virtio_should_notify(vdev, req->vq)) {
event_notifier_set(virtio_queue_get_guest_notifier(req->vq));
}
}
| true | qemu | 83d768b5640946b7da55ce8335509df297e2c7cd | void virtio_scsi_dataplane_notify(VirtIODevice *vdev, VirtIOSCSIReq *req)
{
if (virtio_should_notify(vdev, req->vq)) {
event_notifier_set(virtio_queue_get_guest_notifier(req->vq));
}
}
| {
"code": [
"void virtio_scsi_dataplane_notify(VirtIODevice *vdev, VirtIOSCSIReq *req)",
" if (virtio_should_notify(vdev, req->vq)) {",
" event_notifier_set(virtio_queue_get_guest_notifier(req->vq));"
],
"line_no": [
1,
5,
7
]
} | void FUNC_0(VirtIODevice *VAR_0, VirtIOSCSIReq *VAR_1)
{
if (virtio_should_notify(VAR_0, VAR_1->vq)) {
event_notifier_set(virtio_queue_get_guest_notifier(VAR_1->vq));
}
}
| [
"void FUNC_0(VirtIODevice *VAR_0, VirtIOSCSIReq *VAR_1)\n{",
"if (virtio_should_notify(VAR_0, VAR_1->vq)) {",
"event_notifier_set(virtio_queue_get_guest_notifier(VAR_1->vq));",
"}",
"}"
] | [
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
3,576 | SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c)
{
int cpu_flags = av_get_cpu_flags();
if (c->srcFormat != PIX_FMT_YUV420P &&
c->srcFormat != PIX_FMT_YUVA420P)
return NULL;
if (HAVE_MMX2 && cpu_flags & AV_CPU_FLAG_MMX2) {
switch (c->dstFormat) {
case PIX_FMT_RGB24: ret... | true | FFmpeg | 39d607e5bbc25ad9629683702b510e865434ef21 | SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c)
{
int cpu_flags = av_get_cpu_flags();
if (c->srcFormat != PIX_FMT_YUV420P &&
c->srcFormat != PIX_FMT_YUVA420P)
return NULL;
if (HAVE_MMX2 && cpu_flags & AV_CPU_FLAG_MMX2) {
switch (c->dstFormat) {
case PIX_FMT_RGB24: ret... | {
"code": [
" if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P) {",
"#if HAVE_7REGS",
" if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P) {",
"#if HAVE_7REGS"
],
"line_no": [
37,
39,
37,
39
]
} | SwsFunc FUNC_0(SwsContext *c)
{
int VAR_0 = av_get_cpu_flags();
if (c->srcFormat != PIX_FMT_YUV420P &&
c->srcFormat != PIX_FMT_YUVA420P)
return NULL;
if (HAVE_MMX2 && VAR_0 & AV_CPU_FLAG_MMX2) {
switch (c->dstFormat) {
case PIX_FMT_RGB24: return yuv420_rgb24_MMX2... | [
"SwsFunc FUNC_0(SwsContext *c)\n{",
"int VAR_0 = av_get_cpu_flags();",
"if (c->srcFormat != PIX_FMT_YUV420P &&\nc->srcFormat != PIX_FMT_YUVA420P)\nreturn NULL;",
"if (HAVE_MMX2 && VAR_0 & AV_CPU_FLAG_MMX2) {",
"switch (c->dstFormat) {",
"case PIX_FMT_RGB24: return yuv420_rgb24_MMX2;",
"case PIX_FMT_BGR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11,
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35,
37
],
[
39,
41
],
[
43,
45
],
[
47
],
[
49,
51
],
[
53... |
3,577 | int ide_init_drive(IDEState *s, BlockDriverState *bs,
const char *version, const char *serial)
{
int cylinders, heads, secs;
uint64_t nb_sectors;
s->bs = bs;
bdrv_get_geometry(bs, &nb_sectors);
bdrv_guess_geometry(bs, &cylinders, &heads, &secs);
if (cylinders < 1 || ... | true | qemu | 98f28ad7a7d26e5e77c5cb37b262d76d6ccd963d | int ide_init_drive(IDEState *s, BlockDriverState *bs,
const char *version, const char *serial)
{
int cylinders, heads, secs;
uint64_t nb_sectors;
s->bs = bs;
bdrv_get_geometry(bs, &nb_sectors);
bdrv_guess_geometry(bs, &cylinders, &heads, &secs);
if (cylinders < 1 || ... | {
"code": [],
"line_no": []
} | int FUNC_0(IDEState *VAR_0, BlockDriverState *VAR_1,
const char *VAR_2, const char *VAR_3)
{
int VAR_4, VAR_5, VAR_6;
uint64_t nb_sectors;
VAR_0->VAR_1 = VAR_1;
bdrv_get_geometry(VAR_1, &nb_sectors);
bdrv_guess_geometry(VAR_1, &VAR_4, &VAR_5, &VAR_6);
if (VAR_4 < 1 |... | [
"int FUNC_0(IDEState *VAR_0, BlockDriverState *VAR_1,\nconst char *VAR_2, const char *VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6;",
"uint64_t nb_sectors;",
"VAR_0->VAR_1 = VAR_1;",
"bdrv_get_geometry(VAR_1, &nb_sectors);",
"bdrv_guess_geometry(VAR_1, &VAR_4, &VAR_5, &VAR_6);",
"if (VAR_4 < 1 || VAR_4 > 16383)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
49
],
[
51
],
[
53
],
[... |
3,578 | SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, BlockDriverState *bdrv,
int unit, bool removable, int bootindex,
const char *serial, Error **errp)
{
const char *driver;
DeviceState *dev;
Error *err = NULL;
driver = ... | true | qemu | c24e7517ee4a98e90eee5f0f07708a1fa12326b3 | SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, BlockDriverState *bdrv,
int unit, bool removable, int bootindex,
const char *serial, Error **errp)
{
const char *driver;
DeviceState *dev;
Error *err = NULL;
driver = ... | {
"code": [
" if (serial) {"
],
"line_no": [
35
]
} | SCSIDevice *FUNC_0(SCSIBus *bus, BlockDriverState *bdrv,
int unit, bool removable, int bootindex,
const char *serial, Error **errp)
{
const char *VAR_0;
DeviceState *dev;
Error *err = NULL;
VAR_0 = bdrv_is_sg(bdrv) ? "s... | [
"SCSIDevice *FUNC_0(SCSIBus *bus, BlockDriverState *bdrv,\nint unit, bool removable, int bootindex,\nconst char *serial, Error **errp)\n{",
"const char *VAR_0;",
"DeviceState *dev;",
"Error *err = NULL;",
"VAR_0 = bdrv_is_sg(bdrv) ? \"scsi-generic\" : \"scsi-disk\";",
"dev = qdev_create(&bus->qbus, 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,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
3,579 | static int unix_get_buffer(void *opaque, uint8_t *buf, int64_t pos, int size)
{
QEMUFileSocket *s = opaque;
ssize_t len;
for (;;) {
len = read(s->fd, buf, size);
if (len != -1) {
break;
}
if (errno == EAGAIN) {
yield_until_fd_readable(s->fd... | true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static int unix_get_buffer(void *opaque, uint8_t *buf, int64_t pos, int size)
{
QEMUFileSocket *s = opaque;
ssize_t len;
for (;;) {
len = read(s->fd, buf, size);
if (len != -1) {
break;
}
if (errno == EAGAIN) {
yield_until_fd_readable(s->fd... | {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0, uint8_t *VAR_1, int64_t VAR_2, int VAR_3)
{
QEMUFileSocket *s = VAR_0;
ssize_t len;
for (;;) {
len = read(s->fd, VAR_1, VAR_3);
if (len != -1) {
break;
}
if (errno == EAGAIN) {
yield_until_fd_readable(s->fd);
... | [
"static int FUNC_0(void *VAR_0, uint8_t *VAR_1, int64_t VAR_2, int VAR_3)\n{",
"QEMUFileSocket *s = VAR_0;",
"ssize_t len;",
"for (;;) {",
"len = read(s->fd, VAR_1, VAR_3);",
"if (len != -1) {",
"break;",
"}",
"if (errno == EAGAIN) {",
"yield_until_fd_readable(s->fd);",
"} else if (errno != EINT... | [
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
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
]
] |
3,580 | DriveInfo *add_init_drive(const char *optstr)
{
DriveInfo *dinfo;
QemuOpts *opts;
MachineClass *mc;
opts = drive_def(optstr);
if (!opts)
return NULL;
mc = MACHINE_GET_CLASS(current_machine);
dinfo = drive_new(opts, mc->block_default_type);
if (!dinfo) {
qem... | true | qemu | f51074cdc6e750daa3b6df727d83449a7e42b391 | DriveInfo *add_init_drive(const char *optstr)
{
DriveInfo *dinfo;
QemuOpts *opts;
MachineClass *mc;
opts = drive_def(optstr);
if (!opts)
return NULL;
mc = MACHINE_GET_CLASS(current_machine);
dinfo = drive_new(opts, mc->block_default_type);
if (!dinfo) {
qem... | {
"code": [
"DriveInfo *add_init_drive(const char *optstr)",
" QemuOpts *opts;",
" return NULL;",
" return NULL;",
" return NULL;",
" return NULL;",
" return NULL;",
" return NULL;",
" return NULL;",
" return NULL;",
... | DriveInfo *FUNC_0(const char *optstr)
{
DriveInfo *dinfo;
QemuOpts *opts;
MachineClass *mc;
opts = drive_def(optstr);
if (!opts)
return NULL;
mc = MACHINE_GET_CLASS(current_machine);
dinfo = drive_new(opts, mc->block_default_type);
if (!dinfo) {
qemu_opts_d... | [
"DriveInfo *FUNC_0(const char *optstr)\n{",
"DriveInfo *dinfo;",
"QemuOpts *opts;",
"MachineClass *mc;",
"opts = drive_def(optstr);",
"if (!opts)\nreturn NULL;",
"mc = MACHINE_GET_CLASS(current_machine);",
"dinfo = drive_new(opts, mc->block_default_type);",
"if (!dinfo) {",
"qemu_opts_del(opts);",... | [
1,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15,
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
]
] |
3,581 | static void decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src, int log2w, int log2h, int stride){
const int index= size2index[log2h][log2w];
const int h= 1<<log2h;
int code= get_vlc2(&f->gb, block_type_vlc[1-(f->version>1)][index].table, BLOCK_TYPE_VLC_BITS, 1);
uint16_t *start= (uint16_t... | true | FFmpeg | 1443ea93d935784370f41d85e224718484b0e32c | static void decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src, int log2w, int log2h, int stride){
const int index= size2index[log2h][log2w];
const int h= 1<<log2h;
int code= get_vlc2(&f->gb, block_type_vlc[1-(f->version>1)][index].table, BLOCK_TYPE_VLC_BITS, 1);
uint16_t *start= (uint16_t... | {
"code": [
" src += f->mv[ *f->bytestream++ ];",
" src += f->mv[ *f->bytestream++ ];",
" mcdc(dst, src, log2w, h, stride, 1, av_le2ne16(*f->wordstream++));",
" mcdc(dst, src, log2w, h, stride, 0, av_le2ne16(*f->wordstream++));",
" dst[0] = av_le2ne16(*f->wor... | static void FUNC_0(FourXContext *VAR_0, uint16_t *VAR_1, uint16_t *VAR_2, int VAR_3, int VAR_4, int VAR_5){
const int VAR_6= size2index[VAR_4][VAR_3];
const int VAR_7= 1<<VAR_4;
int VAR_8= get_vlc2(&VAR_0->gb, block_type_vlc[1-(VAR_0->version>1)][VAR_6].table, BLOCK_TYPE_VLC_BITS, 1);
uint16_t *star... | [
"static void FUNC_0(FourXContext *VAR_0, uint16_t *VAR_1, uint16_t *VAR_2, int VAR_3, int VAR_4, int VAR_5){",
"const int VAR_6= size2index[VAR_4][VAR_3];",
"const int VAR_7= 1<<VAR_4;",
"int VAR_8= get_vlc2(&VAR_0->gb, block_type_vlc[1-(VAR_0->version>1)][VAR_6].table, BLOCK_TYPE_VLC_BITS, 1);",
"uint16_t ... | [
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,
1,
0,
0,
1,
1,
0,
1,
1,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
3,583 | static int mov_write_int8_metadata(AVFormatContext *s, AVIOContext *pb,
const char *name, const char *tag,
int len)
{
AVDictionaryEntry *t = NULL;
uint8_t num;
if (!(t = av_dict_get(s->metadata, tag, NULL, 0)))
return 0;
... | false | FFmpeg | 5f531386210e844f0a6819404cde58da54c46a00 | static int mov_write_int8_metadata(AVFormatContext *s, AVIOContext *pb,
const char *name, const char *tag,
int len)
{
AVDictionaryEntry *t = NULL;
uint8_t num;
if (!(t = av_dict_get(s->metadata, tag, NULL, 0)))
return 0;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVIOContext *VAR_1,
const char *VAR_2, const char *VAR_3,
int VAR_4)
{
AVDictionaryEntry *t = NULL;
uint8_t num;
if (!(t = av_dict_get(VAR_0->metadata, VAR_3, NULL, 0)))
return 0;... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVIOContext *VAR_1,\nconst char *VAR_2, const char *VAR_3,\nint VAR_4)\n{",
"AVDictionaryEntry *t = NULL;",
"uint8_t num;",
"if (!(t = av_dict_get(VAR_0->metadata, VAR_3, NULL, 0)))\nreturn 0;",
"num = t ? atoi(t->value) : 0;",
"avio_wb32(VAR_1, VAR_4+8);",
"ff... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15,
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
]
] |
3,584 | int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt,
const uint8_t *buf, int len)
{
unsigned int ssrc, h;
int payload_type, seq, ret;
AVStream *st;
uint32_t timestamp;
int rv= 0;
if (!buf) {
/* return the next packets, if any */
if(s->st && s->... | false | FFmpeg | 4a6cc06123d969fe3214ff874bc87c1aec529143 | int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt,
const uint8_t *buf, int len)
{
unsigned int ssrc, h;
int payload_type, seq, ret;
AVStream *st;
uint32_t timestamp;
int rv= 0;
if (!buf) {
if(s->st && s->parse_packet) {
timestam... | {
"code": [],
"line_no": []
} | int FUNC_0(RTPDemuxContext *VAR_0, AVPacket *VAR_1,
const uint8_t *VAR_2, int VAR_3)
{
unsigned int VAR_4, VAR_5;
int VAR_6, VAR_7, VAR_8;
AVStream *st;
uint32_t timestamp;
int VAR_9= 0;
if (!VAR_2) {
if(VAR_0->st && VAR_0->parse_packet) {
... | [
"int FUNC_0(RTPDemuxContext *VAR_0, AVPacket *VAR_1,\nconst uint8_t *VAR_2, int VAR_3)\n{",
"unsigned int VAR_4, VAR_5;",
"int VAR_6, VAR_7, VAR_8;",
"AVStream *st;",
"uint32_t timestamp;",
"int VAR_9= 0;",
"if (!VAR_2) {",
"if(VAR_0->st && VAR_0->parse_packet) {",
"timestamp= 0;",
"VAR_9= 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,
0,
0,
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
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37,
39
],
[
41,
43
],
[
45,
47
],
[
49
],
[
51,... |
3,586 | static int decode_mb_info(IVI4DecContext *ctx, IVIBandDesc *band,
IVITile *tile, AVCodecContext *avctx)
{
int x, y, mv_x, mv_y, mv_delta, offs, mb_offset, blks_per_mb,
mv_scale, mb_type_bits, s;
IVIMbInfo *mb, *ref_mb;
int row_offset = band->... | true | FFmpeg | 5216245a2c5ed8140d99f14fcc148fbb6db9831e | static int decode_mb_info(IVI4DecContext *ctx, IVIBandDesc *band,
IVITile *tile, AVCodecContext *avctx)
{
int x, y, mv_x, mv_y, mv_delta, offs, mb_offset, blks_per_mb,
mv_scale, mb_type_bits, s;
IVIMbInfo *mb, *ref_mb;
int row_offset = band->... | {
"code": [
" if (band->inherit_mv) {",
" if (band->inherit_mv) {"
],
"line_no": [
97,
165
]
} | static int FUNC_0(IVI4DecContext *VAR_0, IVIBandDesc *VAR_1,
IVITile *VAR_2, AVCodecContext *VAR_3)
{
int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11,
VAR_12, VAR_13, VAR_14;
IVIMbInfo *mb, *ref_mb;
int VAR_15 = VAR_1->mb_size * ... | [
"static int FUNC_0(IVI4DecContext *VAR_0, IVIBandDesc *VAR_1,\nIVITile *VAR_2, AVCodecContext *VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11,\nVAR_12, VAR_13, VAR_14;",
"IVIMbInfo *mb, *ref_mb;",
"int VAR_15 = VAR_1->mb_size * VAR_1->pitch;",
"mb = VAR_2->mb... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1... | [
[
1,
3,
5
],
[
7,
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[
55
],
[
57
... |
3,587 | static int balloon_parse(const char *arg)
{
QemuOpts *opts;
if (strcmp(arg, "none") == 0) {
return 0;
}
if (!strncmp(arg, "virtio", 6)) {
if (arg[6] == ',') {
/* have params -> parse them */
opts = qemu_opts_parse(qemu_find_opts("device"), arg+7, 0);
... | true | qemu | 8be7e7e4c72c048b90e3482557954a24bba43ba7 | static int balloon_parse(const char *arg)
{
QemuOpts *opts;
if (strcmp(arg, "none") == 0) {
return 0;
}
if (!strncmp(arg, "virtio", 6)) {
if (arg[6] == ',') {
opts = qemu_opts_parse(qemu_find_opts("device"), arg+7, 0);
if (!opts)
... | {
"code": [
" opts = qemu_opts_create(qemu_find_opts(\"device\"), NULL, 0);",
" opts = qemu_opts_create(qemu_find_opts(\"device\"), NULL, 0);"
],
"line_no": [
33,
33
]
} | static int FUNC_0(const char *VAR_0)
{
QemuOpts *opts;
if (strcmp(VAR_0, "none") == 0) {
return 0;
}
if (!strncmp(VAR_0, "virtio", 6)) {
if (VAR_0[6] == ',') {
opts = qemu_opts_parse(qemu_find_opts("device"), VAR_0+7, 0);
if (!opts)
... | [
"static int FUNC_0(const char *VAR_0)\n{",
"QemuOpts *opts;",
"if (strcmp(VAR_0, \"none\") == 0) {",
"return 0;",
"}",
"if (!strncmp(VAR_0, \"virtio\", 6)) {",
"if (VAR_0[6] == ',') {",
"opts = qemu_opts_parse(qemu_find_opts(\"device\"), VAR_0+7, 0);",
"if (!opts)\nreturn -1;",
"} else {",
"opt... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
23
],
[
25,
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
]
] |
3,588 | static inline void RENAME(yuv2yuvX)(SwsContext *c, int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize,
int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,
uint8_t *dest, uint8_t *uDest, uint8_t *vDest, int dstW, int chrDstW)
{
#ifdef HAVE_MMX
if(uDest != NULL)
{
asm volatile(
Y... | true | FFmpeg | 7f526efd17973ec6d2204f7a47b6923e2be31363 | static inline void RENAME(yuv2yuvX)(SwsContext *c, int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize,
int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,
uint8_t *dest, uint8_t *uDest, uint8_t *vDest, int dstW, int chrDstW)
{
#ifdef HAVE_MMX
if(uDest != NULL)
{
asm volatile(
Y... | {
"code": [
"\t\t\t\t uint8_t *dest, uint8_t *uDest, uint8_t *vDest, int dstW, int chrDstW)",
"\t\t\t\t\"r\" (uDest), \"p\" ((long)chrDstW)",
"\t\t\t\t\"r\" (vDest), \"p\" ((long)chrDstW)",
"\t\t\t \"r\" (dest), \"p\" ((long)dstW)",
"\t\t\t\t uint8_t *dest, uint8_t *uDest, uint8_t *vDest, ... | static inline void FUNC_0(yuv2yuvX)(SwsContext *c, int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize,
int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,
uint8_t *dest, uint8_t *uDest, uint8_t *vDest, int dstW, int chrDstW)
{
#ifdef HAVE_MMX
if(uDest != NULL)
{
asm volatile(
Y... | [
"static inline void FUNC_0(yuv2yuvX)(SwsContext *c, int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize,\nint16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,\nuint8_t *dest, uint8_t *uDest, uint8_t *vDest, int dstW, int chrDstW)\n{",
"#ifdef HAVE_MMX\nif(uDest != NULL)\n{",
"asm volatile(\nYSCALEYUV2YV... | [
1,
0,
1,
1,
0,
1,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9,
11,
13
],
[
15,
17,
19,
21,
23,
25
],
[
29,
31,
33,
35,
37,
39
],
[
41
],
[
45,
47,
49,
51,
53,
55
],
[
57,
59,
61,
63,
65
],
[
67,
69,... |
3,589 | int attribute_align_arg avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
int *frame_size_ptr,
uint8_t *buf, int buf_size)
{
int ret;
if((avctx->codec->capabilities & CODEC_CAP_DELAY) || buf_size){
//FIXME remove the check below _aft... | false | FFmpeg | 81fc2f37db98b3472bf997e5f302e65d75670f3e | int attribute_align_arg avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
int *frame_size_ptr,
uint8_t *buf, int buf_size)
{
int ret;
if((avctx->codec->capabilities & CODEC_CAP_DELAY) || buf_size){
if(*frame_size_ptr < AVCO... | {
"code": [],
"line_no": []
} | int VAR_0 avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
int *frame_size_ptr,
uint8_t *buf, int buf_size)
{
int ret;
if((avctx->codec->capabilities & CODEC_CAP_DELAY) || buf_size){
if(*frame_size_ptr < AVCODEC_MAX_AUDIO_... | [
"int VAR_0 avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,\nint *frame_size_ptr,\nuint8_t *buf, int buf_size)\n{",
"int ret;",
"if((avctx->codec->capabilities & CODEC_CAP_DELAY) || buf_size){",
"if(*frame_size_ptr < AVCODEC_MAX_AUDIO_FRAME_SIZE){",
"av_log(avctx, AV_LOG_ERROR, \"buffer smalle... | [
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
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27,
29
],
[
31
],
[
33
],
[
35
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
3,590 | static void nbd_co_receive_reply(NBDClientSession *s,
NBDRequest *request,
NBDReply *reply,
QEMUIOVector *qiov)
{
int ret;
/* Wait until we're woken up by nbd_read_reply_entry. */
qemu_coroutine_yiel... | true | qemu | 72b6ffc76653214b69a94a7b1643ff80df134486 | static void nbd_co_receive_reply(NBDClientSession *s,
NBDRequest *request,
NBDReply *reply,
QEMUIOVector *qiov)
{
int ret;
qemu_coroutine_yield();
*reply = s->reply;
if (reply->handle != re... | {
"code": [
" if (reply->handle != request->handle ||",
" !s->ioc) {"
],
"line_no": [
21,
23
]
} | static void FUNC_0(NBDClientSession *VAR_0,
NBDRequest *VAR_1,
NBDReply *VAR_2,
QEMUIOVector *VAR_3)
{
int VAR_4;
qemu_coroutine_yield();
*VAR_2 = VAR_0->VAR_2;
if (VAR_2->handle != VAR_1->... | [
"static void FUNC_0(NBDClientSession *VAR_0,\nNBDRequest *VAR_1,\nNBDReply *VAR_2,\nQEMUIOVector *VAR_3)\n{",
"int VAR_4;",
"qemu_coroutine_yield();",
"*VAR_2 = VAR_0->VAR_2;",
"if (VAR_2->handle != VAR_1->handle ||\n!VAR_0->ioc) {",
"VAR_2->error = EIO;",
"} else {",
"if (VAR_3 && VAR_2->error == 0) ... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
47
],
[
49
],
[
51
]
] |
3,591 | static const char *local_mapped_attr_path(FsContext *ctx,
const char *path, char *buffer)
{
char *dir_name;
char *tmp_path = strdup(path);
char *base_name = basename(tmp_path);
/* NULL terminate the directory */
dir_name = tmp_path;
*(base_name... | true | qemu | d3f8e138c23ba082f87c96634d06b978473c1e9b | static const char *local_mapped_attr_path(FsContext *ctx,
const char *path, char *buffer)
{
char *dir_name;
char *tmp_path = strdup(path);
char *base_name = basename(tmp_path);
dir_name = tmp_path;
*(base_name - 1) = '\0';
snprintf(buff... | {
"code": [
" char *tmp_path = strdup(path);",
" free(tmp_path);",
" char *tmp_path = strdup(path);",
" free(tmp_path);"
],
"line_no": [
9,
27,
9,
27
]
} | static const char *FUNC_0(FsContext *VAR_0,
const char *VAR_1, char *VAR_2)
{
char *VAR_3;
char *VAR_4 = strdup(VAR_1);
char *VAR_5 = basename(VAR_4);
VAR_3 = VAR_4;
*(VAR_5 - 1) = '\0';
snprintf(VAR_2, PATH_MAX, "%s/%s/%s/%s",
... | [
"static const char *FUNC_0(FsContext *VAR_0,\nconst char *VAR_1, char *VAR_2)\n{",
"char *VAR_3;",
"char *VAR_4 = strdup(VAR_1);",
"char *VAR_5 = basename(VAR_4);",
"VAR_3 = VAR_4;",
"*(VAR_5 - 1) = '\\0';",
"snprintf(VAR_2, PATH_MAX, \"%s/%s/%s/%s\",\nVAR_0->fs_root, VAR_3, VIRTFS_META_DIR, VAR_5);",
... | [
0,
0,
1,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
23,
25
],
[
27
],
[
29
],
[
31
]
] |
3,592 | void usb_host_info(Monitor *mon, const QDict *qdict)
{
libusb_device **devs;
struct libusb_device_descriptor ddesc;
char port[16];
int i, n;
if (usb_host_init() != 0) {
return;
}
n = libusb_get_device_list(ctx, &devs);
for (i = 0; i < n; i++) {
if (libusb_g... | true | qemu | 3ce21445387c64032a21ae73c995195307a28a36 | void usb_host_info(Monitor *mon, const QDict *qdict)
{
libusb_device **devs;
struct libusb_device_descriptor ddesc;
char port[16];
int i, n;
if (usb_host_init() != 0) {
return;
}
n = libusb_get_device_list(ctx, &devs);
for (i = 0; i < n; i++) {
if (libusb_g... | {
"code": [
" libusb_device **devs;",
" libusb_device **devs;"
],
"line_no": [
5,
5
]
} | void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)
{
libusb_device **devs;
struct libusb_device_descriptor VAR_2;
char VAR_3[16];
int VAR_4, VAR_5;
if (usb_host_init() != 0) {
return;
}
VAR_5 = libusb_get_device_list(ctx, &devs);
for (VAR_4 = 0; VAR_4 < VAR_5; VAR_4++)... | [
"void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)\n{",
"libusb_device **devs;",
"struct libusb_device_descriptor VAR_2;",
"char VAR_3[16];",
"int VAR_4, VAR_5;",
"if (usb_host_init() != 0) {",
"return;",
"}",
"VAR_5 = libusb_get_device_list(ctx, &devs);",
"for (VAR_4 = 0; VAR_4 < VAR_5; VAR_4++) {"... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43,
45,
47,
49
... |
3,593 | static void gen_mulldo(DisasContext *ctx)
{
TCGv_i64 t0 = tcg_temp_new_i64();
TCGv_i64 t1 = tcg_temp_new_i64();
tcg_gen_muls2_i64(t0, t1, cpu_gpr[rA(ctx->opcode)],
cpu_gpr[rB(ctx->opcode)]);
tcg_gen_mov_i64(cpu_gpr[rD(ctx->opcode)], t0);
tcg_gen_sari_i64(t0, t0, 63);... | true | qemu | 61aa9a697a1ec9b102e86cb7ea96876e6f20afe3 | static void gen_mulldo(DisasContext *ctx)
{
TCGv_i64 t0 = tcg_temp_new_i64();
TCGv_i64 t1 = tcg_temp_new_i64();
tcg_gen_muls2_i64(t0, t1, cpu_gpr[rA(ctx->opcode)],
cpu_gpr[rB(ctx->opcode)]);
tcg_gen_mov_i64(cpu_gpr[rD(ctx->opcode)], t0);
tcg_gen_sari_i64(t0, t0, 63);... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0)
{
TCGv_i64 t0 = tcg_temp_new_i64();
TCGv_i64 t1 = tcg_temp_new_i64();
tcg_gen_muls2_i64(t0, t1, cpu_gpr[rA(VAR_0->opcode)],
cpu_gpr[rB(VAR_0->opcode)]);
tcg_gen_mov_i64(cpu_gpr[rD(VAR_0->opcode)], t0);
tcg_gen_sari_i64(t0, t0, ... | [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"TCGv_i64 t0 = tcg_temp_new_i64();",
"TCGv_i64 t1 = tcg_temp_new_i64();",
"tcg_gen_muls2_i64(t0, t1, cpu_gpr[rA(VAR_0->opcode)],\ncpu_gpr[rB(VAR_0->opcode)]);",
"tcg_gen_mov_i64(cpu_gpr[rD(VAR_0->opcode)], t0);",
"tcg_gen_sari_i64(t0, t0, 63);",
"tcg_gen_set... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15
],
[
19
],
[
21
],
[
26
],
[
30
],
[
32
],
[
36
],
[
38
]
] |
3,594 | static inline target_phys_addr_t get_pgaddr (target_phys_addr_t sdr1,
int sdr_sh,
target_phys_addr_t hash,
target_phys_addr_t mask)
{
return (sdr1 & ((target_ulong)(-1ULL) << s... | true | qemu | 12de9a396acbc95e25c5d60ed097cc55777eaaed | static inline target_phys_addr_t get_pgaddr (target_phys_addr_t sdr1,
int sdr_sh,
target_phys_addr_t hash,
target_phys_addr_t mask)
{
return (sdr1 & ((target_ulong)(-1ULL) << s... | {
"code": [
"static inline target_phys_addr_t get_pgaddr (target_phys_addr_t sdr1,",
" int sdr_sh,",
" target_phys_addr_t hash,",
" target_phys_addr_t mask)",
" re... | static inline target_phys_addr_t FUNC_0 (target_phys_addr_t sdr1,
int sdr_sh,
target_phys_addr_t hash,
target_phys_addr_t mask)
{
return (sdr1 & ((target_ulong)(-1ULL) << sdr_s... | [
"static inline target_phys_addr_t FUNC_0 (target_phys_addr_t sdr1,\nint sdr_sh,\ntarget_phys_addr_t hash,\ntarget_phys_addr_t mask)\n{",
"return (sdr1 & ((target_ulong)(-1ULL) << sdr_sh)) | (hash & mask);",
"}"
] | [
1,
1,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
]
] |
3,595 | static unsigned int mszh_decomp(const unsigned char * srcptr, int srclen, unsigned char * destptr, unsigned int destsize)
{
unsigned char *destptr_bak = destptr;
unsigned char *destptr_end = destptr + destsize;
const unsigned char *srcptr_end = srcptr + srclen;
unsigned mask = *srcptr++;
unsig... | true | FFmpeg | 42a1f1d7a8cf67eed68db596d6a1e53c0c36e4ab | static unsigned int mszh_decomp(const unsigned char * srcptr, int srclen, unsigned char * destptr, unsigned int destsize)
{
unsigned char *destptr_bak = destptr;
unsigned char *destptr_end = destptr + destsize;
const unsigned char *srcptr_end = srcptr + srclen;
unsigned mask = *srcptr++;
unsig... | {
"code": [
" av_memcpy_backptr(destptr, ofs, cnt);"
],
"line_no": [
41
]
} | static unsigned int FUNC_0(const unsigned char * VAR_0, int VAR_1, unsigned char * VAR_2, unsigned int VAR_3)
{
unsigned char *VAR_4 = VAR_2;
unsigned char *VAR_5 = VAR_2 + VAR_3;
const unsigned char *VAR_6 = VAR_0 + VAR_1;
unsigned VAR_7 = *VAR_0++;
unsigned VAR_8 = 0x80;
while (VAR_0 ... | [
"static unsigned int FUNC_0(const unsigned char * VAR_0, int VAR_1, unsigned char * VAR_2, unsigned int VAR_3)\n{",
"unsigned char *VAR_4 = VAR_2;",
"unsigned char *VAR_5 = VAR_2 + VAR_3;",
"const unsigned char *VAR_6 = VAR_0 + VAR_1;",
"unsigned VAR_7 = *VAR_0++;",
"unsigned VAR_8 = 0x80;",
"while (VAR... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
3,597 | static uint32_t unassigned_mem_readb(void *opaque, target_phys_addr_t addr)
{
#ifdef DEBUG_UNASSIGNED
printf("Unassigned mem read " TARGET_FMT_plx "\n", addr);
#endif
#if defined(TARGET_ALPHA) || defined(TARGET_SPARC) || defined(TARGET_MICROBLAZE)
do_unassigned_access(addr, 0, 0, 0, 1);
#endif
retur... | true | qemu | b14ef7c9ab41ea824c3ccadb070ad95567cca84e | static uint32_t unassigned_mem_readb(void *opaque, target_phys_addr_t addr)
{
#ifdef DEBUG_UNASSIGNED
printf("Unassigned mem read " TARGET_FMT_plx "\n", addr);
#endif
#if defined(TARGET_ALPHA) || defined(TARGET_SPARC) || defined(TARGET_MICROBLAZE)
do_unassigned_access(addr, 0, 0, 0, 1);
#endif
retur... | {
"code": [
" do_unassigned_access(addr, 0, 0, 0, 1);"
],
"line_no": [
13
]
} | static uint32_t FUNC_0(void *opaque, target_phys_addr_t addr)
{
#ifdef DEBUG_UNASSIGNED
printf("Unassigned mem read " TARGET_FMT_plx "\n", addr);
#endif
#if defined(TARGET_ALPHA) || defined(TARGET_SPARC) || defined(TARGET_MICROBLAZE)
do_unassigned_access(addr, 0, 0, 0, 1);
#endif
return 0;
}
| [
"static uint32_t FUNC_0(void *opaque, target_phys_addr_t addr)\n{",
"#ifdef DEBUG_UNASSIGNED\nprintf(\"Unassigned mem read \" TARGET_FMT_plx \"\\n\", addr);",
"#endif\n#if defined(TARGET_ALPHA) || defined(TARGET_SPARC) || defined(TARGET_MICROBLAZE)\ndo_unassigned_access(addr, 0, 0, 0, 1);",
"#endif\nreturn 0;... | [
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9,
11,
13
],
[
15,
17
],
[
19
]
] |
3,599 | static int mxg_update_cache(AVFormatContext *s, unsigned int cache_size)
{
MXGContext *mxg = s->priv_data;
unsigned int current_pos = mxg->buffer_ptr - mxg->buffer;
unsigned int soi_pos;
int ret;
/* reallocate internal buffer */
if (current_pos > current_pos + cache_size)
retur... | true | FFmpeg | a72b41035cc4925922b4164b7453c9a5c2b7e630 | static int mxg_update_cache(AVFormatContext *s, unsigned int cache_size)
{
MXGContext *mxg = s->priv_data;
unsigned int current_pos = mxg->buffer_ptr - mxg->buffer;
unsigned int soi_pos;
int ret;
if (current_pos > current_pos + cache_size)
return AVERROR(ENOMEM);
soi_pos ... | {
"code": [
" mxg->buffer = av_fast_realloc(mxg->buffer, &mxg->buffer_size,",
" current_pos + cache_size +",
" FF_INPUT_BUFFER_PADDING_SIZE);",
" if (!mxg->buffer)"
],
"line_no": [
23,
25,
27,
29
]
} | static int FUNC_0(AVFormatContext *VAR_0, unsigned int VAR_1)
{
MXGContext *mxg = VAR_0->priv_data;
unsigned int VAR_2 = mxg->buffer_ptr - mxg->buffer;
unsigned int VAR_3;
int VAR_4;
if (VAR_2 > VAR_2 + VAR_1)
return AVERROR(ENOMEM);
VAR_3 = mxg->soi_ptr - mxg->buffer;
... | [
"static int FUNC_0(AVFormatContext *VAR_0, unsigned int VAR_1)\n{",
"MXGContext *mxg = VAR_0->priv_data;",
"unsigned int VAR_2 = mxg->buffer_ptr - mxg->buffer;",
"unsigned int VAR_3;",
"int VAR_4;",
"if (VAR_2 > VAR_2 + VAR_1)\nreturn AVERROR(ENOMEM);",
"VAR_3 = mxg->soi_ptr - mxg->buffer;",
"mxg->buf... | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17,
19
],
[
21
],
[
23,
25,
27
],
[
29,
31
],
[
33
],
[
35
],
[
41,
43
],
[
45,
47
],
[
51
],
[
55
],
[
57
]
] |
3,601 | vubr_set_mem_table_exec(VubrDev *dev, VhostUserMsg *vmsg)
{
int i;
VhostUserMemory *memory = &vmsg->payload.memory;
dev->nregions = memory->nregions;
DPRINT("Nregions: %d\n", memory->nregions);
for (i = 0; i < dev->nregions; i++) {
void *mmap_addr;
VhostUserMemoryRegion *ms... | true | qemu | 6d0b908a628a7086fa855c68b217cc1e2a5c4c19 | vubr_set_mem_table_exec(VubrDev *dev, VhostUserMsg *vmsg)
{
int i;
VhostUserMemory *memory = &vmsg->payload.memory;
dev->nregions = memory->nregions;
DPRINT("Nregions: %d\n", memory->nregions);
for (i = 0; i < dev->nregions; i++) {
void *mmap_addr;
VhostUserMemoryRegion *ms... | {
"code": [],
"line_no": []
} | FUNC_0(VubrDev *VAR_0, VhostUserMsg *VAR_1)
{
int VAR_2;
VhostUserMemory *memory = &VAR_1->payload.memory;
VAR_0->nregions = memory->nregions;
DPRINT("Nregions: %d\n", memory->nregions);
for (VAR_2 = 0; VAR_2 < VAR_0->nregions; VAR_2++) {
void *mmap_addr;
VhostUserMemoryReg... | [
"FUNC_0(VubrDev *VAR_0, VhostUserMsg *VAR_1)\n{",
"int VAR_2;",
"VhostUserMemory *memory = &VAR_1->payload.memory;",
"VAR_0->nregions = memory->nregions;",
"DPRINT(\"Nregions: %d\\n\", memory->nregions);",
"for (VAR_2 = 0; VAR_2 < VAR_0->nregions; VAR_2++) {",
"void *mmap_addr;",
"VhostUserMemoryRegio... | [
0,
0,
0,
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
],
[
25
],
[
27,
29
],
[
31,
33
],
[
35,
37
],
[
39,
41
],
[
45
],
[
47
],
[
49
],
[
51
... |
3,603 | static av_cold int dilate_init(AVFilterContext *ctx, const char *args)
{
OCVContext *s = ctx->priv;
DilateContext *dilate = s->priv;
char default_kernel_str[] = "3x3+0x0/rect";
char *kernel_str;
const char *buf = args;
int ret;
dilate->nb_iterations = 1;
if (args)
k... | false | FFmpeg | a6653787a4b1e89170ff7962312dd110769c83a3 | static av_cold int dilate_init(AVFilterContext *ctx, const char *args)
{
OCVContext *s = ctx->priv;
DilateContext *dilate = s->priv;
char default_kernel_str[] = "3x3+0x0/rect";
char *kernel_str;
const char *buf = args;
int ret;
dilate->nb_iterations = 1;
if (args)
k... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVFilterContext *ctx, const char *args)
{
OCVContext *s = ctx->priv;
DilateContext *dilate = s->priv;
char VAR_0[] = "3x3+0x0/rect";
char *VAR_1;
const char *VAR_2 = args;
int VAR_3;
dilate->nb_iterations = 1;
if (args)
VAR_1 = av_get_token... | [
"static av_cold int FUNC_0(AVFilterContext *ctx, const char *args)\n{",
"OCVContext *s = ctx->priv;",
"DilateContext *dilate = s->priv;",
"char VAR_0[] = \"3x3+0x0/rect\";",
"char *VAR_1;",
"const char *VAR_2 = args;",
"int VAR_3;",
"dilate->nb_iterations = 1;",
"if (args)\nVAR_1 = av_get_token(&VAR... | [
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
],
[
23,
25
],
[
27,
29,
31,
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
[... |
3,604 | static int transcode(OutputFile *output_files,
int nb_output_files,
InputFile *input_files,
int nb_input_files)
{
int ret = 0, i;
AVFormatContext *is, *os;
AVCodecContext *codec, *icodec;
OutputStream *ost;
InputStream *ist;
... | false | FFmpeg | 93ed69ad2103e0c58ebcaa80dd55742d75f8c461 | static int transcode(OutputFile *output_files,
int nb_output_files,
InputFile *input_files,
int nb_input_files)
{
int ret = 0, i;
AVFormatContext *is, *os;
AVCodecContext *codec, *icodec;
OutputStream *ost;
InputStream *ist;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(OutputFile *VAR_0,
int VAR_1,
InputFile *VAR_2,
int VAR_3)
{
int VAR_4 = 0, VAR_5;
AVFormatContext *is, *os;
AVCodecContext *codec, *icodec;
OutputStream *ost;
InputStream *ist;
char VAR_6[1024];
int ... | [
"static int FUNC_0(OutputFile *VAR_0,\nint VAR_1,\nInputFile *VAR_2,\nint VAR_3)\n{",
"int VAR_4 = 0, VAR_5;",
"AVFormatContext *is, *os;",
"AVCodecContext *codec, *icodec;",
"OutputStream *ost;",
"InputStream *ist;",
"char VAR_6[1024];",
"int VAR_7;",
"int VAR_8 = 1;",
"uint8_t *no_packet;",
"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
],
[
29
],
[
31
],
[
35,
37
],
[
41,
43
],
[
45
],
[
51
],
[
53
],
[... |
3,605 | static int dvvideo_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size)
{
DVVideoContext *s = avctx->priv_data;
/* special case for last picture */
if(buf_size==0)
return 0;
... | false | FFmpeg | 934982c4ace1a3d5d627b518782ed092a456c49e | static int dvvideo_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size)
{
DVVideoContext *s = avctx->priv_data;
if(buf_size==0)
return 0;
s->sys = dv_frame_profile(buf);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
uint8_t *VAR_3, int VAR_4)
{
DVVideoContext *s = VAR_0->priv_data;
if(VAR_4==0)
return 0;
s->sys = dv_frame_profile(VAR_3);
if (!s->sys || ... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nuint8_t *VAR_3, int VAR_4)\n{",
"DVVideoContext *s = VAR_0->priv_data;",
"if(VAR_4==0)\nreturn 0;",
"s->sys = dv_frame_profile(VAR_3);",
"if (!s->sys || VAR_4 < s->sys->frame_size)\nreturn -1;",
"if(s->picture.VAR_1[0])\nVAR_0->release_b... | [
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
],
[
21
],
[
23,
25
],
[
29,
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
57
],
[... |
3,606 | rdt_parse_packet (PayloadContext *rdt, AVStream *st,
AVPacket *pkt, uint32_t *timestamp,
const uint8_t *buf, int len, int flags)
{
int seq = 1, res;
ByteIOContext pb;
if (rdt->audio_pkt_cnt == 0) {
int pos;
init_put_byte(&pb, buf, len, 0, NULL,... | false | FFmpeg | 5d88c2647def2557637077e9284cfe9806954502 | rdt_parse_packet (PayloadContext *rdt, AVStream *st,
AVPacket *pkt, uint32_t *timestamp,
const uint8_t *buf, int len, int flags)
{
int seq = 1, res;
ByteIOContext pb;
if (rdt->audio_pkt_cnt == 0) {
int pos;
init_put_byte(&pb, buf, len, 0, NULL,... | {
"code": [],
"line_no": []
} | FUNC_0 (PayloadContext *VAR_0, AVStream *VAR_1,
AVPacket *VAR_2, uint32_t *VAR_3,
const uint8_t *VAR_4, int VAR_5, int VAR_6)
{
int VAR_7 = 1, VAR_8;
ByteIOContext pb;
if (VAR_0->audio_pkt_cnt == 0) {
int VAR_9;
init_put_byte(&pb, VAR_4, VAR_5,... | [
"FUNC_0 (PayloadContext *VAR_0, AVStream *VAR_1,\nAVPacket *VAR_2, uint32_t *VAR_3,\nconst uint8_t *VAR_4, int VAR_5, int VAR_6)\n{",
"int VAR_7 = 1, VAR_8;",
"ByteIOContext pb;",
"if (VAR_0->audio_pkt_cnt == 0) {",
"int VAR_9;",
"init_put_byte(&pb, VAR_4, VAR_5, 0, NULL, NULL, NULL, NULL);",
"VAR_6 = (... | [
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
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31,
33
],
[
35
],
[
37,
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
[
51
... |
3,607 | static void FUNC(hevc_v_loop_filter_luma)(uint8_t *pix, ptrdiff_t stride,
int *beta, int *tc, uint8_t *no_p,
uint8_t *no_q)
{
FUNC(hevc_loop_filter_luma)(pix, sizeof(pixel), stride,
beta, tc, no_... | false | FFmpeg | 73bb8f61d48dbf7237df2e9cacd037f12b84b00a | static void FUNC(hevc_v_loop_filter_luma)(uint8_t *pix, ptrdiff_t stride,
int *beta, int *tc, uint8_t *no_p,
uint8_t *no_q)
{
FUNC(hevc_loop_filter_luma)(pix, sizeof(pixel), stride,
beta, tc, no_... | {
"code": [],
"line_no": []
} | static void FUNC_0(hevc_v_loop_filter_luma)(uint8_t *pix, ptrdiff_t stride,
int *beta, int *tc, uint8_t *no_p,
uint8_t *no_q)
{
FUNC_0(hevc_loop_filter_luma)(pix, sizeof(pixel), stride,
beta, tc,... | [
"static void FUNC_0(hevc_v_loop_filter_luma)(uint8_t *pix, ptrdiff_t stride,\nint *beta, int *tc, uint8_t *no_p,\nuint8_t *no_q)\n{",
"FUNC_0(hevc_loop_filter_luma)(pix, sizeof(pixel), stride,\nbeta, tc, no_p, no_q);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9,
11
],
[
13
]
] |
3,608 | static int http_server(void)
{
int server_fd, ret, rtsp_server_fd, delay, delay1;
struct pollfd poll_table[HTTP_MAX_CONNECTIONS + 2], *poll_entry;
HTTPContext *c, *c_next;
server_fd = socket_open_listen(&my_http_addr);
if (server_fd < 0)
return -1;
rtsp_server_fd = socket_ope... | false | FFmpeg | e8d658df344553170cc1302438a8e70d97b52169 | static int http_server(void)
{
int server_fd, ret, rtsp_server_fd, delay, delay1;
struct pollfd poll_table[HTTP_MAX_CONNECTIONS + 2], *poll_entry;
HTTPContext *c, *c_next;
server_fd = socket_open_listen(&my_http_addr);
if (server_fd < 0)
return -1;
rtsp_server_fd = socket_ope... | {
"code": [],
"line_no": []
} | static int FUNC_0(void)
{
int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4;
struct pollfd VAR_5[HTTP_MAX_CONNECTIONS + 2], *poll_entry;
HTTPContext *c, *c_next;
VAR_0 = socket_open_listen(&my_http_addr);
if (VAR_0 < 0)
return -1;
VAR_2 = socket_open_listen(&my_rtsp_addr);
if (VAR_2... | [
"static int FUNC_0(void)\n{",
"int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4;",
"struct pollfd VAR_5[HTTP_MAX_CONNECTIONS + 2], *poll_entry;",
"HTTPContext *c, *c_next;",
"VAR_0 = socket_open_listen(&my_http_addr);",
"if (VAR_0 < 0)\nreturn -1;",
"VAR_2 = socket_open_listen(&my_rtsp_addr);",
"if (VAR_2 < 0)\n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
29
],
[
33
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[
59
... |
3,609 | static int h264_field_start(H264Context *h, const H264SliceContext *sl,
const H2645NAL *nal, int first_slice)
{
int i;
const SPS *sps;
int last_pic_structure, last_pic_droppable, ret;
ret = h264_init_ps(h, sl, first_slice);
if (ret < 0)
return ret;
... | true | FFmpeg | 083300bea935d125b83f60d7030f78a7ffb0f3df | static int h264_field_start(H264Context *h, const H264SliceContext *sl,
const H2645NAL *nal, int first_slice)
{
int i;
const SPS *sps;
int last_pic_structure, last_pic_droppable, ret;
ret = h264_init_ps(h, sl, first_slice);
if (ret < 0)
return ret;
... | {
"code": [
" if (h->cur_pic_ptr->tf.owner == h->avctx) {",
" ff_thread_report_progress(&h->cur_pic_ptr->tf, INT_MAX,",
" last_pic_structure == PICT_BOTTOM_FIELD);"
],
"line_no": [
109,
111,
113
]
} | static int FUNC_0(H264Context *VAR_0, const H264SliceContext *VAR_1,
const H2645NAL *VAR_2, int VAR_3)
{
int VAR_4;
const SPS *VAR_5;
int VAR_6, VAR_7, VAR_8;
VAR_8 = h264_init_ps(VAR_0, VAR_1, VAR_3);
if (VAR_8 < 0)
return VAR_8;
VAR_5 = VAR_0-... | [
"static int FUNC_0(H264Context *VAR_0, const H264SliceContext *VAR_1,\nconst H2645NAL *VAR_2, int VAR_3)\n{",
"int VAR_4;",
"const SPS *VAR_5;",
"int VAR_6, VAR_7, VAR_8;",
"VAR_8 = h264_init_ps(VAR_0, VAR_1, VAR_3);",
"if (VAR_8 < 0)\nreturn VAR_8;",
"VAR_5 = VAR_0->ps.VAR_5;",
"VAR_7 = VAR_0->drop... | [
0,
0,
0,
0,
0,
0,
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,
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
],
[
17
],
[
19,
21
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
55
],
[
57
],
[
59
... |
3,612 | void fork_start(void)
{
mmap_fork_start();
qemu_mutex_lock(&tb_ctx.tb_lock);
cpu_list_lock();
} | true | qemu | 06065c451f10c7ef62cfb575a87f323a70ae1c9e | void fork_start(void)
{
mmap_fork_start();
qemu_mutex_lock(&tb_ctx.tb_lock);
cpu_list_lock();
} | {
"code": [],
"line_no": []
} | void FUNC_0(void)
{
mmap_fork_start();
qemu_mutex_lock(&tb_ctx.tb_lock);
cpu_list_lock();
} | [
"void FUNC_0(void)\n{",
"mmap_fork_start();",
"qemu_mutex_lock(&tb_ctx.tb_lock);",
"cpu_list_lock();",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
6
],
[
8
],
[
10
],
[
12
]
] |
3,613 | static int config_output(AVFilterLink *outlink)
{
AVFilterContext *ctx = outlink->src;
LIBVMAFContext *s = ctx->priv;
AVFilterLink *mainlink = ctx->inputs[0];
int ret;
outlink->w = mainlink->w;
outlink->h = mainlink->h;
outlink->time_base = mainlink->time_base;
outlink->sample... | true | FFmpeg | a8ab52fae7286d4e7eec9256a08b6ad0b1e39d6c | static int config_output(AVFilterLink *outlink)
{
AVFilterContext *ctx = outlink->src;
LIBVMAFContext *s = ctx->priv;
AVFilterLink *mainlink = ctx->inputs[0];
int ret;
outlink->w = mainlink->w;
outlink->h = mainlink->h;
outlink->time_base = mainlink->time_base;
outlink->sample... | {
"code": [
" if ((ret = ff_dualinput_init(ctx, &s->dinput)) < 0)"
],
"line_no": [
25
]
} | static int FUNC_0(AVFilterLink *VAR_0)
{
AVFilterContext *ctx = VAR_0->src;
LIBVMAFContext *s = ctx->priv;
AVFilterLink *mainlink = ctx->inputs[0];
int VAR_1;
VAR_0->w = mainlink->w;
VAR_0->h = mainlink->h;
VAR_0->time_base = mainlink->time_base;
VAR_0->sample_aspect_ratio = m... | [
"static int FUNC_0(AVFilterLink *VAR_0)\n{",
"AVFilterContext *ctx = VAR_0->src;",
"LIBVMAFContext *s = ctx->priv;",
"AVFilterLink *mainlink = ctx->inputs[0];",
"int VAR_1;",
"VAR_0->w = mainlink->w;",
"VAR_0->h = mainlink->h;",
"VAR_0->time_base = mainlink->time_base;",
"VAR_0->sample_aspect_ratio ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
31
],
[
33
]
] |
3,614 | void h263_encode_mb(MpegEncContext * s,
DCTELEM block[6][64],
int motion_x, int motion_y)
{
int cbpc, cbpy, i, cbp, pred_x, pred_y;
// printf("**mb x=%d y=%d\n", s->mb_x, s->mb_y);
if (!s->mb_intra) {
/* compute cbp */
cbp = 0;
for (i = 0; i < 6; i++) {
if (s->bl... | true | FFmpeg | 544286b3d39365b30298ae07e66a755200b0895c | void h263_encode_mb(MpegEncContext * s,
DCTELEM block[6][64],
int motion_x, int motion_y)
{
int cbpc, cbpy, i, cbp, pred_x, pred_y;
if (!s->mb_intra) {
cbp = 0;
for (i = 0; i < 6; i++) {
if (s->block_last_index[i] >= 0)
cbp |= 1 << (5 - i);
}
if ((... | {
"code": [
" if (!umvplus) { "
],
"line_no": [
63
]
} | void FUNC_0(MpegEncContext * VAR_0,
DCTELEM VAR_1[6][64],
int VAR_2, int VAR_3)
{
int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;
if (!VAR_0->mb_intra) {
VAR_7 = 0;
for (VAR_6 = 0; VAR_6 < 6; VAR_6++) {
if (VAR_0->block_last_index[VAR_6] >= 0)
VAR_7 |= 1 << (5... | [
"void FUNC_0(MpegEncContext * VAR_0,\nDCTELEM VAR_1[6][64],\nint VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;",
"if (!VAR_0->mb_intra) {",
"VAR_7 = 0;",
"for (VAR_6 = 0; VAR_6 < 6; VAR_6++) {",
"if (VAR_0->block_last_index[VAR_6] >= 0)\nVAR_7 |= 1 << (5 - VAR_6);",
"}",
"if ((... | [
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
] | [
[
1,
3,
5,
7
],
[
9
],
[
15
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45,
47
],
[
49
],
[
51
],
[
53
],
[... |
3,615 | static int decode_band(IVI5DecContext *ctx, int plane_num,
IVIBandDesc *band, AVCodecContext *avctx)
{
int result, i, t, idx1, idx2;
IVITile *tile;
band->buf = band->bufs[ctx->dst_buf];
band->ref_buf = band->bufs[ctx->ref_buf];
band->data_ptr = ctx->fr... | false | FFmpeg | 7fcb98a7ec51123ecfd810a167d96f128eed9b79 | static int decode_band(IVI5DecContext *ctx, int plane_num,
IVIBandDesc *band, AVCodecContext *avctx)
{
int result, i, t, idx1, idx2;
IVITile *tile;
band->buf = band->bufs[ctx->dst_buf];
band->ref_buf = band->bufs[ctx->ref_buf];
band->data_ptr = ctx->fr... | {
"code": [],
"line_no": []
} | static int FUNC_0(IVI5DecContext *VAR_0, int VAR_1,
IVIBandDesc *VAR_2, AVCodecContext *VAR_3)
{
int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;
IVITile *tile;
VAR_2->buf = VAR_2->bufs[VAR_0->dst_buf];
VAR_2->ref_buf = VAR_2->bufs[VAR_0->ref_buf];
VAR_2->data_p... | [
"static int FUNC_0(IVI5DecContext *VAR_0, int VAR_1,\nIVIBandDesc *VAR_2, AVCodecContext *VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;",
"IVITile *tile;",
"VAR_2->buf = VAR_2->bufs[VAR_0->dst_buf];",
"VAR_2->ref_buf = VAR_2->bufs[VAR_0->ref_buf];",
"VAR_2->data_ptr = VAR_0->frame_da... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
51
],
[
53
],
[
55
... |
3,617 | static int select_reference_stream(AVFormatContext *s)
{
SegmentContext *seg = s->priv_data;
int ret, i;
seg->reference_stream_index = -1;
if (!strcmp(seg->reference_stream_specifier, "auto")) {
/* select first index of type with highest priority */
int type_index_map[AVMEDIA_TY... | true | FFmpeg | e3197257171c347353538152523f9d3fe880aee6 | static int select_reference_stream(AVFormatContext *s)
{
SegmentContext *seg = s->priv_data;
int ret, i;
seg->reference_stream_index = -1;
if (!strcmp(seg->reference_stream_specifier, "auto")) {
int type_index_map[AVMEDIA_TYPE_NB];
static const enum AVMediaType type_pr... | {
"code": [
" break;"
],
"line_no": [
67
]
} | static int FUNC_0(AVFormatContext *VAR_0)
{
SegmentContext *seg = VAR_0->priv_data;
int VAR_1, VAR_2;
seg->reference_stream_index = -1;
if (!strcmp(seg->reference_stream_specifier, "auto")) {
int VAR_3[AVMEDIA_TYPE_NB];
static const enum AVMediaType VAR_4[] = {
... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"SegmentContext *seg = VAR_0->priv_data;",
"int VAR_1, VAR_2;",
"seg->reference_stream_index = -1;",
"if (!strcmp(seg->reference_stream_specifier, \"auto\")) {",
"int VAR_3[AVMEDIA_TYPE_NB];",
"static const enum AVMediaType VAR_4[] = {",
"AVMEDIA_TYPE_VI... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21,
23,
25,
27,
29,
31
],
[
33
],
[
37
],
[
39
],
[
45
],
[
47
],
[
49,
53,
55
],
[
57
],
[
61
],
... |
3,618 | static void property_get_tm(Object *obj, Visitor *v, const char *name,
void *opaque, Error **errp)
{
TMProperty *prop = opaque;
Error *err = NULL;
struct tm value;
prop->get(obj, &value, &err);
if (err) {
goto out;
}
visit_start_struct(v, nam... | true | qemu | 15c2f669e3fb2bc97f7b42d1871f595c0ac24af8 | static void property_get_tm(Object *obj, Visitor *v, const char *name,
void *opaque, Error **errp)
{
TMProperty *prop = opaque;
Error *err = NULL;
struct tm value;
prop->get(obj, &value, &err);
if (err) {
goto out;
}
visit_start_struct(v, nam... | {
"code": [
" error_propagate(errp, err);",
" err = NULL;",
" error_propagate(errp, err);",
" err = NULL;",
" error_propagate(errp, err);",
" err = NULL;",
" visit_end_struct(v, errp);",
" goto out;",
" error_propagate(errp, err);",
" err = NUL... | static void FUNC_0(Object *VAR_0, Visitor *VAR_1, const char *VAR_2,
void *VAR_3, Error **VAR_4)
{
TMProperty *prop = VAR_3;
Error *err = NULL;
struct tm VAR_5;
prop->get(VAR_0, &VAR_5, &err);
if (err) {
goto out;
}
visit_start_struct(VAR_1, ... | [
"static void FUNC_0(Object *VAR_0, Visitor *VAR_1, const char *VAR_2,\nvoid *VAR_3, Error **VAR_4)\n{",
"TMProperty *prop = VAR_3;",
"Error *err = NULL;",
"struct tm VAR_5;",
"prop->get(VAR_0, &VAR_5, &err);",
"if (err) {",
"goto out;",
"}",
"visit_start_struct(VAR_1, VAR_2, NULL, 0, &err);",
"if ... | [
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,
1,
1,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
3,622 | e1000e_write_lgcy_rx_descr(E1000ECore *core, uint8_t *desc,
struct NetRxPkt *pkt,
const E1000E_RSSInfo *rss_info,
uint16_t length)
{
uint32_t status_flags, rss, mrq;
uint16_t ip_id;
struct e1000_rx_desc *d = (struct e1... | true | qemu | c89d416a2b0fb6a21224186b10af4c4a3feee31b | e1000e_write_lgcy_rx_descr(E1000ECore *core, uint8_t *desc,
struct NetRxPkt *pkt,
const E1000E_RSSInfo *rss_info,
uint16_t length)
{
uint32_t status_flags, rss, mrq;
uint16_t ip_id;
struct e1000_rx_desc *d = (struct e1... | {
"code": [
" memset(d, 0, sizeof(*d));",
" memset(d, 0, sizeof(*d));",
" memset(d, 0, sizeof(*d));"
],
"line_no": [
21,
21,
21
]
} | FUNC_0(E1000ECore *VAR_0, uint8_t *VAR_1,
struct NetRxPkt *VAR_2,
const E1000E_RSSInfo *VAR_3,
uint16_t VAR_4)
{
uint32_t status_flags, rss, mrq;
uint16_t ip_id;
struct e1000_rx_desc *VAR_5 = (struct e1000_rx_desc *) V... | [
"FUNC_0(E1000ECore *VAR_0, uint8_t *VAR_1,\nstruct NetRxPkt *VAR_2,\nconst E1000E_RSSInfo *VAR_3,\nuint16_t VAR_4)\n{",
"uint32_t status_flags, rss, mrq;",
"uint16_t ip_id;",
"struct e1000_rx_desc *VAR_5 = (struct e1000_rx_desc *) VAR_1;",
"memset(VAR_5, 0, sizeof(*VAR_5));",
"assert(!VAR_3->enabled);",
... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
25
],
[
29
],
[
33,
35,
37,
39,
41
],
[
43
],
[
45
],
[
47
]
] |
3,623 | void qemu_put_byte(QEMUFile *f, int v)
{
if (f->last_error) {
return;
}
f->buf[f->buf_index] = v;
f->bytes_xfer++;
if (f->ops->writev_buffer) {
add_to_iovec(f, f->buf + f->buf_index, 1);
}
f->buf_index++;
if (f->buf_index == IO_BUF_SIZE) {
qemu_fflus... | true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | void qemu_put_byte(QEMUFile *f, int v)
{
if (f->last_error) {
return;
}
f->buf[f->buf_index] = v;
f->bytes_xfer++;
if (f->ops->writev_buffer) {
add_to_iovec(f, f->buf + f->buf_index, 1);
}
f->buf_index++;
if (f->buf_index == IO_BUF_SIZE) {
qemu_fflus... | {
"code": [],
"line_no": []
} | void FUNC_0(QEMUFile *VAR_0, int VAR_1)
{
if (VAR_0->last_error) {
return;
}
VAR_0->buf[VAR_0->buf_index] = VAR_1;
VAR_0->bytes_xfer++;
if (VAR_0->ops->writev_buffer) {
add_to_iovec(VAR_0, VAR_0->buf + VAR_0->buf_index, 1);
}
VAR_0->buf_index++;
if (VAR_0->bu... | [
"void FUNC_0(QEMUFile *VAR_0, int VAR_1)\n{",
"if (VAR_0->last_error) {",
"return;",
"}",
"VAR_0->buf[VAR_0->buf_index] = VAR_1;",
"VAR_0->bytes_xfer++;",
"if (VAR_0->ops->writev_buffer) {",
"add_to_iovec(VAR_0, VAR_0->buf + VAR_0->buf_index, 1);",
"}",
"VAR_0->buf_index++;",
"if (VAR_0->buf_ind... | [
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
],
[
29
],
[
31
]
] |
3,624 | long do_rt_sigreturn(CPUX86State *env)
{
abi_ulong frame_addr;
struct rt_sigframe *frame;
sigset_t set;
frame_addr = env->regs[R_ESP] - 4;
trace_user_do_rt_sigreturn(env, frame_addr);
if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1))
goto badframe;
target_to_host_s... | true | qemu | c599d4d6d6e9bfdb64e54c33a22cb26e3496b96d | long do_rt_sigreturn(CPUX86State *env)
{
abi_ulong frame_addr;
struct rt_sigframe *frame;
sigset_t set;
frame_addr = env->regs[R_ESP] - 4;
trace_user_do_rt_sigreturn(env, frame_addr);
if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1))
goto badframe;
target_to_host_s... | {
"code": [
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" ret... | long FUNC_0(CPUX86State *VAR_0)
{
abi_ulong frame_addr;
struct rt_sigframe *VAR_1;
sigset_t set;
frame_addr = VAR_0->regs[R_ESP] - 4;
trace_user_do_rt_sigreturn(VAR_0, frame_addr);
if (!lock_user_struct(VERIFY_READ, VAR_1, frame_addr, 1))
goto badframe;
target_to_host_sigs... | [
"long FUNC_0(CPUX86State *VAR_0)\n{",
"abi_ulong frame_addr;",
"struct rt_sigframe *VAR_1;",
"sigset_t set;",
"frame_addr = VAR_0->regs[R_ESP] - 4;",
"trace_user_do_rt_sigreturn(VAR_0, frame_addr);",
"if (!lock_user_struct(VERIFY_READ, VAR_1, frame_addr, 1))\ngoto badframe;",
"target_to_host_sigset(&s... | [
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
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35,
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
51,
53
],
[... |
3,625 | unsigned ff_els_decode_unsigned(ElsDecCtx *ctx, ElsUnsignedRung *ur)
{
int i, n, r, bit;
ElsRungNode *rung_node;
if (ctx->err)
return 0;
/* decode unary prefix */
for (n = 0; n < ELS_EXPGOLOMB_LEN + 1; n++)
if (ff_els_decode_bit(ctx, &ur->prefix_rung[n]))
bre... | true | FFmpeg | 4e0819310e2d2eff60be2d6df28335f0739712b9 | unsigned ff_els_decode_unsigned(ElsDecCtx *ctx, ElsUnsignedRung *ur)
{
int i, n, r, bit;
ElsRungNode *rung_node;
if (ctx->err)
return 0;
for (n = 0; n < ELS_EXPGOLOMB_LEN + 1; n++)
if (ff_els_decode_bit(ctx, &ur->prefix_rung[n]))
break;
if (ctx-... | {
"code": [
" ctx->err = AVERROR(EOVERFLOW);"
],
"line_no": [
31
]
} | unsigned FUNC_0(ElsDecCtx *VAR_0, ElsUnsignedRung *VAR_1)
{
int VAR_2, VAR_3, VAR_4, VAR_5;
ElsRungNode *rung_node;
if (VAR_0->err)
return 0;
for (VAR_3 = 0; VAR_3 < ELS_EXPGOLOMB_LEN + 1; VAR_3++)
if (ff_els_decode_bit(VAR_0, &VAR_1->prefix_rung[VAR_3]))
br... | [
"unsigned FUNC_0(ElsDecCtx *VAR_0, ElsUnsignedRung *VAR_1)\n{",
"int VAR_2, VAR_3, VAR_4, VAR_5;",
"ElsRungNode *rung_node;",
"if (VAR_0->err)\nreturn 0;",
"for (VAR_3 = 0; VAR_3 < ELS_EXPGOLOMB_LEN + 1; VAR_3++)",
"if (ff_els_decode_bit(VAR_0, &VAR_1->prefix_rung[VAR_3]))\nbreak;",
"if (VAR_0->err || V... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
19
],
[
21,
23
],
[
29
],
[
31
],
[
33
],
[
35
],
[
41,
43
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
],
[
59
],
[
61
],
... |
3,626 | static int sse_mb(MpegEncContext *s){
int w= 16;
int h= 16;
if(s->mb_x*16 + 16 > s->width ) w= s->width - s->mb_x*16;
if(s->mb_y*16 + 16 > s->height) h= s->height- s->mb_y*16;
if(w==16 && h==16)
if(s->avctx->mb_cmp == FF_CMP_NSSE){
return s->dsp.nsse[0](s, s->new_picture.f.... | true | FFmpeg | f6774f905fb3cfdc319523ac640be30b14c1bc55 | static int sse_mb(MpegEncContext *s){
int w= 16;
int h= 16;
if(s->mb_x*16 + 16 > s->width ) w= s->width - s->mb_x*16;
if(s->mb_y*16 + 16 > s->height) h= s->height- s->mb_y*16;
if(w==16 && h==16)
if(s->avctx->mb_cmp == FF_CMP_NSSE){
return s->dsp.nsse[0](s, s->new_picture.f.... | {
"code": [
" return s->dsp.nsse[0](s, s->new_picture.f.data[0] + s->mb_x*16 + s->mb_y*s->linesize*16, s->dest[0], s->linesize, 16)",
" +s->dsp.nsse[1](s, s->new_picture.f.data[1] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[1], s->uvlinesize, 8)",
" +s->dsp.nsse[1](s... | static int FUNC_0(MpegEncContext *VAR_0){
int VAR_1= 16;
int VAR_2= 16;
if(VAR_0->mb_x*16 + 16 > VAR_0->width ) VAR_1= VAR_0->width - VAR_0->mb_x*16;
if(VAR_0->mb_y*16 + 16 > VAR_0->height) VAR_2= VAR_0->height- VAR_0->mb_y*16;
if(VAR_1==16 && VAR_2==16)
if(VAR_0->avctx->mb_cmp == FF... | [
"static int FUNC_0(MpegEncContext *VAR_0){",
"int VAR_1= 16;",
"int VAR_2= 16;",
"if(VAR_0->mb_x*16 + 16 > VAR_0->width ) VAR_1= VAR_0->width - VAR_0->mb_x*16;",
"if(VAR_0->mb_y*16 + 16 > VAR_0->height) VAR_2= VAR_0->height- VAR_0->mb_y*16;",
"if(VAR_1==16 && VAR_2==16)\nif(VAR_0->avctx->mb_cmp == FF_CMP_... | [
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
1,
0
] | [
[
1
],
[
3
],
[
5
],
[
9
],
[
11
],
[
15,
17
],
[
19,
21,
23
],
[
25
],
[
27,
29,
31
],
[
33
],
[
35,
37,
39,
41
],
[
43
]
] |
3,627 | static uint64_t alloc_cluster_offset(BlockDriverState *bs,
uint64_t offset,
int n_start, int n_end,
int *num, QCowL2Meta *m)
{
BDRVQcowState *s = bs->opaque;
int l2_index, ret;
uint64_t l2_o... | true | qemu | ff4b91c2f7e51dab148aba4bf43c2f39f219e495 | static uint64_t alloc_cluster_offset(BlockDriverState *bs,
uint64_t offset,
int n_start, int n_end,
int *num, QCowL2Meta *m)
{
BDRVQcowState *s = bs->opaque;
int l2_index, ret;
uint64_t l2_o... | {
"code": [
" &l2_table[l2_index], 0);",
" &l2_table[l2_index + i], 0);"
],
"line_no": [
49,
83
]
} | static uint64_t FUNC_0(BlockDriverState *bs,
uint64_t offset,
int n_start, int n_end,
int *num, QCowL2Meta *m)
{
BDRVQcowState *s = bs->opaque;
int VAR_0, VAR_1;
uint64_t l2_offset, *l2_tabl... | [
"static uint64_t FUNC_0(BlockDriverState *bs,\nuint64_t offset,\nint n_start, int n_end,\nint *num, QCowL2Meta *m)\n{",
"BDRVQcowState *s = bs->opaque;",
"int VAR_0, VAR_1;",
"uint64_t l2_offset, *l2_table, cluster_offset;",
"int VAR_2, VAR_3 = 0;",
"VAR_1 = get_cluster_table(bs, offset, &l2_table, &l2_of... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
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
],
[
29
],
[
33
],
[
37
],
[
45
],
[
47,
49
],
[
53
],
[
55
],
[
59
],
[
61
],
[
69,
71
... |
3,628 | static int dv_extract_audio(uint8_t* frame, uint8_t* ppcm[4],
const DVprofile *sys)
{
int size, chan, i, j, d, of, smpls, freq, quant, half_ch;
uint16_t lc, rc;
const uint8_t* as_pack;
uint8_t *pcm, ipcm;
as_pack = dv_extract_pack(frame, dv_audio_source);
if... | true | FFmpeg | 88d84dd8eacd4edfe29f12209f10733d631ca5ae | static int dv_extract_audio(uint8_t* frame, uint8_t* ppcm[4],
const DVprofile *sys)
{
int size, chan, i, j, d, of, smpls, freq, quant, half_ch;
uint16_t lc, rc;
const uint8_t* as_pack;
uint8_t *pcm, ipcm;
as_pack = dv_extract_pack(frame, dv_audio_source);
if... | {
"code": [
" pcm = ppcm[ipcm++];",
" pcm = ppcm[ipcm++];",
" if (!pcm)",
" break;"
],
"line_no": [
51,
157,
159,
161
]
} | static int FUNC_0(uint8_t* VAR_0, uint8_t* VAR_1[4],
const DVprofile *VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12;
uint16_t lc, rc;
const uint8_t* VAR_13;
uint8_t *pcm, ipcm;
VAR_13 = dv_extract_pack(VAR_0, dv_audio_source... | [
"static int FUNC_0(uint8_t* VAR_0, uint8_t* VAR_1[4],\nconst DVprofile *VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12;",
"uint16_t lc, rc;",
"const uint8_t* VAR_13;",
"uint8_t *pcm, ipcm;",
"VAR_13 = dv_extract_pack(VAR_0, dv_audio_source);",
"if (!VAR_13)\nret... | [
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,
1,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19,
21
],
[
25
],
[
27
],
[
29
],
[
33,
35
],
[
39
],
[
41
],
[
49
],
[
51
],
[
57
],
[
61
],
[
63
],
[... |
3,629 | static int transcode_init(void)
{
int ret = 0, i, j, k;
AVFormatContext *oc;
AVCodecContext *codec, *icodec;
OutputStream *ost;
InputStream *ist;
char error[1024];
int want_sdp = 1;
/* init framerate emulation */
for (i = 0; i < nb_input_files; i++) {
InputFile *... | true | FFmpeg | 369cb092ecbbaff20bb0a2a1d60536c3bc04a8f0 | static int transcode_init(void)
{
int ret = 0, i, j, k;
AVFormatContext *oc;
AVCodecContext *codec, *icodec;
OutputStream *ost;
InputStream *ist;
char error[1024];
int want_sdp = 1;
for (i = 0; i < nb_input_files; i++) {
InputFile *ifile = input_files[i];
... | {
"code": [
" break;",
" } else {",
" } else {",
" return 0;",
" exit_program(1);",
" } else {",
" } else {",
" break;",
" default:",
" for (i = 0; i < nb_output_stream... | static int FUNC_0(void)
{
int VAR_0 = 0, VAR_1, VAR_2, VAR_3;
AVFormatContext *oc;
AVCodecContext *codec, *icodec;
OutputStream *ost;
InputStream *ist;
char VAR_4[1024];
int VAR_5 = 1;
for (VAR_1 = 0; VAR_1 < nb_input_files; VAR_1++) {
InputFile *ifile = input_f... | [
"static int FUNC_0(void)\n{",
"int VAR_0 = 0, VAR_1, VAR_2, VAR_3;",
"AVFormatContext *oc;",
"AVCodecContext *codec, *icodec;",
"OutputStream *ost;",
"InputStream *ist;",
"char VAR_4[1024];",
"int VAR_5 = 1;",
"for (VAR_1 = 0; VAR_1 < nb_input_files; VAR_1++) {",
"InputFile *ifile = input_files[VA... | [
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,
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... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
3,630 | static int get_aiff_header(AVFormatContext *s, int size,
unsigned version)
{
AVIOContext *pb = s->pb;
AVCodecParameters *par = s->streams[0]->codecpar;
AIFFInputContext *aiff = s->priv_data;
int exp;
uint64_t val;
int sample_rate;
unsigned ... | true | FFmpeg | ad5807f8aa883bee5431186dc1f24c5435d722d3 | static int get_aiff_header(AVFormatContext *s, int size,
unsigned version)
{
AVIOContext *pb = s->pb;
AVCodecParameters *par = s->streams[0]->codecpar;
AIFFInputContext *aiff = s->priv_data;
int exp;
uint64_t val;
int sample_rate;
unsigned ... | {
"code": [
" par->bit_rate = par->sample_rate * (par->block_align << 3) /"
],
"line_no": [
181
]
} | static int FUNC_0(AVFormatContext *VAR_0, int VAR_1,
unsigned VAR_2)
{
AVIOContext *pb = VAR_0->pb;
AVCodecParameters *par = VAR_0->streams[0]->codecpar;
AIFFInputContext *aiff = VAR_0->priv_data;
int VAR_3;
uint64_t val;
int VAR_4;
unsigne... | [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1,\nunsigned VAR_2)\n{",
"AVIOContext *pb = VAR_0->pb;",
"AVCodecParameters *par = VAR_0->streams[0]->codecpar;",
"AIFFInputContext *aiff = VAR_0->priv_data;",
"int VAR_3;",
"uint64_t val;",
"int VAR_4;",
"unsigned int VAR_5;",
"if (VAR_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,
0,
0,
0,
0,
0,
0,
0,
0,
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... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
3,631 | static void xen_init_pv(QEMUMachineInitArgs *args)
{
const char *cpu_model = args->cpu_model;
const char *kernel_filename = args->kernel_filename;
const char *kernel_cmdline = args->kernel_cmdline;
const char *initrd_filename = args->initrd_filename;
X86CPU *cpu;
CPUState *cs;
DriveI... | true | qemu | 58ee9b0ae05d81c74d6869a25ce4263fc22ed809 | static void xen_init_pv(QEMUMachineInitArgs *args)
{
const char *cpu_model = args->cpu_model;
const char *kernel_filename = args->kernel_filename;
const char *kernel_cmdline = args->kernel_cmdline;
const char *initrd_filename = args->initrd_filename;
X86CPU *cpu;
CPUState *cs;
DriveI... | {
"code": [
" const char *cpu_model = args->cpu_model;",
" X86CPU *cpu;",
" CPUState *cs;",
" if (cpu_model == NULL) {",
"#ifdef TARGET_X86_64",
" cpu_model = \"qemu64\";",
"#else",
" cpu_model = \"qemu32\";",
"#endif",
" cpu = cpu_x86_init(cpu_mode... | static void FUNC_0(QEMUMachineInitArgs *VAR_0)
{
const char *VAR_1 = VAR_0->VAR_1;
const char *VAR_2 = VAR_0->VAR_2;
const char *VAR_3 = VAR_0->VAR_3;
const char *VAR_4 = VAR_0->VAR_4;
X86CPU *cpu;
CPUState *cs;
DriveInfo *dinfo;
int VAR_5;
if (VAR_1 == NULL) {
#if... | [
"static void FUNC_0(QEMUMachineInitArgs *VAR_0)\n{",
"const char *VAR_1 = VAR_0->VAR_1;",
"const char *VAR_2 = VAR_0->VAR_2;",
"const char *VAR_3 = VAR_0->VAR_3;",
"const char *VAR_4 = VAR_0->VAR_4;",
"X86CPU *cpu;",
"CPUState *cs;",
"DriveInfo *dinfo;",
"int VAR_5;",
"if (VAR_1 == NULL) {",
"#i... | [
0,
1,
0,
0,
0,
1,
1,
0,
0,
1,
1,
1,
1,
1,
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,
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
],
[
49
],
[
51
],
[... |
3,632 | void signal_init(void)
{
struct sigaction act;
int i;
/* set all host signal handlers. ALL signals are blocked during
the handlers to serialize them. */
sigfillset(&act.sa_mask);
act.sa_flags = SA_SIGINFO;
act.sa_sigaction = host_signal_handler;
for(i = 1; i < NSIG; i++) {
... | true | qemu | c9087c2a6068b23207517f7d7ff796e68290358b | void signal_init(void)
{
struct sigaction act;
int i;
sigfillset(&act.sa_mask);
act.sa_flags = SA_SIGINFO;
act.sa_sigaction = host_signal_handler;
for(i = 1; i < NSIG; i++) {
sigaction(i, &act, NULL);
}
memset(sigact_table, 0, sizeof(sigact_table));
firs... | {
"code": [
"\tsigaction(i, &act, NULL);"
],
"line_no": [
23
]
} | void FUNC_0(void)
{
struct sigaction VAR_0;
int VAR_1;
sigfillset(&VAR_0.sa_mask);
VAR_0.sa_flags = SA_SIGINFO;
VAR_0.sa_sigaction = host_signal_handler;
for(VAR_1 = 1; VAR_1 < NSIG; VAR_1++) {
sigaction(VAR_1, &VAR_0, NULL);
}
memset(sigact_table, 0, sizeof(si... | [
"void FUNC_0(void)\n{",
"struct sigaction VAR_0;",
"int VAR_1;",
"sigfillset(&VAR_0.sa_mask);",
"VAR_0.sa_flags = SA_SIGINFO;",
"VAR_0.sa_sigaction = host_signal_handler;",
"for(VAR_1 = 1; VAR_1 < NSIG; VAR_1++) {",
"sigaction(VAR_1, &VAR_0, NULL);",
"}",
"memset(sigact_table, 0, sizeof(sigact_tab... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
3,633 | static inline void gen_bx(DisasContext *s, TCGv_i32 var)
{
s->is_jmp = DISAS_UPDATE;
tcg_gen_andi_i32(cpu_R[15], var, ~1);
tcg_gen_andi_i32(var, var, 1);
store_cpu_field(var, thumb);
}
| true | qemu | 577bf808958d06497928c639efaa473bf8c5e099 | static inline void gen_bx(DisasContext *s, TCGv_i32 var)
{
s->is_jmp = DISAS_UPDATE;
tcg_gen_andi_i32(cpu_R[15], var, ~1);
tcg_gen_andi_i32(var, var, 1);
store_cpu_field(var, thumb);
}
| {
"code": [
" s->is_jmp = DISAS_UPDATE;",
" s->is_jmp = DISAS_UPDATE;",
" s->is_jmp = DISAS_UPDATE;",
" s->is_jmp = DISAS_UPDATE;",
" s->is_jmp = DISAS_UPDATE;"
],
"line_no": [
5,
5,
5,
5,
5
]
} | static inline void FUNC_0(DisasContext *VAR_0, TCGv_i32 VAR_1)
{
VAR_0->is_jmp = DISAS_UPDATE;
tcg_gen_andi_i32(cpu_R[15], VAR_1, ~1);
tcg_gen_andi_i32(VAR_1, VAR_1, 1);
store_cpu_field(VAR_1, thumb);
}
| [
"static inline void FUNC_0(DisasContext *VAR_0, TCGv_i32 VAR_1)\n{",
"VAR_0->is_jmp = DISAS_UPDATE;",
"tcg_gen_andi_i32(cpu_R[15], VAR_1, ~1);",
"tcg_gen_andi_i32(VAR_1, VAR_1, 1);",
"store_cpu_field(VAR_1, thumb);",
"}"
] | [
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
3,635 | static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb,
int buf_size, int *coded_samples, int *approx_nb_samples)
{
ADPCMDecodeContext *s = avctx->priv_data;
int nb_samples = 0;
int ch = avctx->channels;
int has_coded_samples = 0;
i... | true | FFmpeg | 3c803ed9cb23e5a8d76b6c31d8a8c71cac27e769 | static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb,
int buf_size, int *coded_samples, int *approx_nb_samples)
{
ADPCMDecodeContext *s = avctx->priv_data;
int nb_samples = 0;
int ch = avctx->channels;
int has_coded_samples = 0;
i... | {
"code": [
" nb_samples = 2 + (buf_size - 7 * ch) * 2 / ch;"
],
"line_no": [
239
]
} | static int FUNC_0(AVCodecContext *VAR_0, GetByteContext *VAR_1,
int VAR_2, int *VAR_3, int *VAR_4)
{
ADPCMDecodeContext *s = VAR_0->priv_data;
int VAR_5 = 0;
int VAR_6 = VAR_0->channels;
int VAR_7 = 0;
int VAR_8;
*VAR_3 = 0;
*VAR_4 =... | [
"static int FUNC_0(AVCodecContext *VAR_0, GetByteContext *VAR_1,\nint VAR_2, int *VAR_3, int *VAR_4)\n{",
"ADPCMDecodeContext *s = VAR_0->priv_data;",
"int VAR_5 = 0;",
"int VAR_6 = VAR_0->channels;",
"int VAR_7 = 0;",
"int VAR_8;",
"*VAR_3 = 0;",
"*VAR_4 = 0;",
"if(VAR_6 <= 0)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
35,
37,
39
],
[
41
],
[
43
],
[
45,
47,
49
],
[
51
],
[
53
],
[
57,... |
3,636 | static void serial_receive1(void *opaque, const uint8_t *buf, int size)
{
SerialState *s = opaque;
serial_receive_byte(s, buf[0]);
}
| true | qemu | 81174dae3f9189519cd60c7b79e91c291b021bbe | static void serial_receive1(void *opaque, const uint8_t *buf, int size)
{
SerialState *s = opaque;
serial_receive_byte(s, buf[0]);
}
| {
"code": [
" SerialState *s = opaque;",
" serial_receive_byte(s, buf[0]);"
],
"line_no": [
5,
7
]
} | static void FUNC_0(void *VAR_0, const uint8_t *VAR_1, int VAR_2)
{
SerialState *s = VAR_0;
serial_receive_byte(s, VAR_1[0]);
}
| [
"static void FUNC_0(void *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{",
"SerialState *s = VAR_0;",
"serial_receive_byte(s, VAR_1[0]);",
"}"
] | [
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
3,639 | static TCGv_i32 gen_get_asi(DisasContext *dc, int insn)
{
int asi;
if (IS_IMM) {
#ifdef TARGET_SPARC64
asi = dc->asi;
#else
gen_exception(dc, TT_ILL_INSN);
asi = 0;
#endif
} else {
asi = GET_FIELD(insn, 19, 26);
}
return tcg_const_i32(asi);
}
| false | qemu | 7ec1e5ea4bd0700fa48da86bffa2fcc6146c410a | static TCGv_i32 gen_get_asi(DisasContext *dc, int insn)
{
int asi;
if (IS_IMM) {
#ifdef TARGET_SPARC64
asi = dc->asi;
#else
gen_exception(dc, TT_ILL_INSN);
asi = 0;
#endif
} else {
asi = GET_FIELD(insn, 19, 26);
}
return tcg_const_i32(asi);
}
| {
"code": [],
"line_no": []
} | static TCGv_i32 FUNC_0(DisasContext *dc, int insn)
{
int VAR_0;
if (IS_IMM) {
#ifdef TARGET_SPARC64
VAR_0 = dc->VAR_0;
#else
gen_exception(dc, TT_ILL_INSN);
VAR_0 = 0;
#endif
} else {
VAR_0 = GET_FIELD(insn, 19, 26);
}
return tcg_const_i32(VAR_0);
}
| [
"static TCGv_i32 FUNC_0(DisasContext *dc, int insn)\n{",
"int VAR_0;",
"if (IS_IMM) {",
"#ifdef TARGET_SPARC64\nVAR_0 = dc->VAR_0;",
"#else\ngen_exception(dc, TT_ILL_INSN);",
"VAR_0 = 0;",
"#endif\n} else {",
"VAR_0 = GET_FIELD(insn, 19, 26);",
"}",
"return tcg_const_i32(VAR_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
]
] |
3,640 | static void setup_rt_frame(int sig, struct target_sigaction *ka,
target_siginfo_t *info,
target_sigset_t *set, CPUSH4State *regs)
{
struct target_rt_sigframe *frame;
abi_ulong frame_addr;
int i;
int err = 0;
int signal;
frame_addr ... | false | qemu | b0fd8d18683f0d77a8e6b482771ebea82234d727 | static void setup_rt_frame(int sig, struct target_sigaction *ka,
target_siginfo_t *info,
target_sigset_t *set, CPUSH4State *regs)
{
struct target_rt_sigframe *frame;
abi_ulong frame_addr;
int i;
int err = 0;
int signal;
frame_addr ... | {
"code": [],
"line_no": []
} | static void FUNC_0(int VAR_0, struct target_sigaction *VAR_1,
target_siginfo_t *VAR_2,
target_sigset_t *VAR_3, CPUSH4State *VAR_4)
{
struct target_rt_sigframe *VAR_5;
abi_ulong frame_addr;
int VAR_6;
int VAR_7 = 0;
int VAR_8;
frame... | [
"static void FUNC_0(int VAR_0, struct target_sigaction *VAR_1,\ntarget_siginfo_t *VAR_2,\ntarget_sigset_t *VAR_3, CPUSH4State *VAR_4)\n{",
"struct target_rt_sigframe *VAR_5;",
"abi_ulong frame_addr;",
"int VAR_6;",
"int VAR_7 = 0;",
"int VAR_8;",
"frame_addr = get_sigframe(VAR_1, VAR_4->gregs[15], sizeo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
29
],
[
33
],
[
39
],
[
41
],
[
43,
45
],
[
47,
49
],
[
51,
53
],
[
55,
57
],
[... |
3,641 | static void display_mouse_set(DisplayChangeListener *dcl,
int x, int y, int on)
{
SimpleSpiceDisplay *ssd = container_of(dcl, SimpleSpiceDisplay, dcl);
qemu_mutex_lock(&ssd->lock);
ssd->ptr_x = x;
ssd->ptr_y = y;
if (ssd->ptr_move) {
g_free(ssd->ptr_mo... | false | qemu | ef1e1e0782e99c9dcf2b35e5310cdd8ca9211374 | static void display_mouse_set(DisplayChangeListener *dcl,
int x, int y, int on)
{
SimpleSpiceDisplay *ssd = container_of(dcl, SimpleSpiceDisplay, dcl);
qemu_mutex_lock(&ssd->lock);
ssd->ptr_x = x;
ssd->ptr_y = y;
if (ssd->ptr_move) {
g_free(ssd->ptr_mo... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisplayChangeListener *VAR_0,
int VAR_1, int VAR_2, int VAR_3)
{
SimpleSpiceDisplay *ssd = container_of(VAR_0, SimpleSpiceDisplay, VAR_0);
qemu_mutex_lock(&ssd->lock);
ssd->ptr_x = VAR_1;
ssd->ptr_y = VAR_2;
if (ssd->ptr_move) {
g_fr... | [
"static void FUNC_0(DisplayChangeListener *VAR_0,\nint VAR_1, int VAR_2, int VAR_3)\n{",
"SimpleSpiceDisplay *ssd = container_of(VAR_0, SimpleSpiceDisplay, VAR_0);",
"qemu_mutex_lock(&ssd->lock);",
"ssd->ptr_x = VAR_1;",
"ssd->ptr_y = VAR_2;",
"if (ssd->ptr_move) {",
"g_free(ssd->ptr_move);",
"}",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
3,642 | static void cpu_request_exit(void *opaque, int irq, int level)
{
CPUState *cpu = current_cpu;
if (cpu && level) {
cpu_exit(cpu);
}
}
| false | qemu | 5039d6e23586fe6bbedc5e4fe302b48a66890ade | static void cpu_request_exit(void *opaque, int irq, int level)
{
CPUState *cpu = current_cpu;
if (cpu && level) {
cpu_exit(cpu);
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, int VAR_1, int VAR_2)
{
CPUState *cpu = current_cpu;
if (cpu && VAR_2) {
cpu_exit(cpu);
}
}
| [
"static void FUNC_0(void *VAR_0, int VAR_1, int VAR_2)\n{",
"CPUState *cpu = current_cpu;",
"if (cpu && VAR_2) {",
"cpu_exit(cpu);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
3,643 | int qemu_get_thread_id(void)
{
#if defined (__linux__)
return syscall(SYS_gettid);
#else
return getpid();
#endif
}
| false | qemu | cbcfa0418f0c196afa765f5c9837b9344d1adcf3 | int qemu_get_thread_id(void)
{
#if defined (__linux__)
return syscall(SYS_gettid);
#else
return getpid();
#endif
}
| {
"code": [],
"line_no": []
} | int FUNC_0(void)
{
#if defined (__linux__)
return syscall(SYS_gettid);
#else
return getpid();
#endif
}
| [
"int FUNC_0(void)\n{",
"#if defined (__linux__)\nreturn syscall(SYS_gettid);",
"#else\nreturn getpid();",
"#endif\n}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9,
11
],
[
13,
15
]
] |
3,644 | static void listflags(char *buf, int bufsize, uint32_t fbits,
const char **featureset, uint32_t flags)
{
const char **p = &featureset[31];
char *q, *b, bit;
int nc;
b = 4 <= bufsize ? buf + (bufsize -= 3) - 1 : NULL;
*buf = '\0';
for (q = buf, bit = 31; fbits && bufsize; --p, fbits... | false | qemu | d354899c8279146f3e154b9ba1f7461abb7f5279 | static void listflags(char *buf, int bufsize, uint32_t fbits,
const char **featureset, uint32_t flags)
{
const char **p = &featureset[31];
char *q, *b, bit;
int nc;
b = 4 <= bufsize ? buf + (bufsize -= 3) - 1 : NULL;
*buf = '\0';
for (q = buf, bit = 31; fbits && bufsize; --p, fbits... | {
"code": [],
"line_no": []
} | static void FUNC_0(char *VAR_0, int VAR_1, uint32_t VAR_2,
const char **VAR_3, uint32_t VAR_4)
{
const char **VAR_5 = &VAR_3[31];
char *VAR_6, *VAR_7, VAR_8;
int VAR_9;
VAR_7 = 4 <= VAR_1 ? VAR_0 + (VAR_1 -= 3) - 1 : NULL;
*VAR_0 = '\0';
for (VAR_6 = VAR_0, VAR_8 = 31; VAR_2 && VAR... | [
"static void FUNC_0(char *VAR_0, int VAR_1, uint32_t VAR_2,\nconst char **VAR_3, uint32_t VAR_4)\n{",
"const char **VAR_5 = &VAR_3[31];",
"char *VAR_6, *VAR_7, VAR_8;",
"int VAR_9;",
"VAR_7 = 4 <= VAR_1 ? VAR_0 + (VAR_1 -= 3) - 1 : NULL;",
"*VAR_0 = '\\0';",
"for (VAR_6 = VAR_0, VAR_8 = 31; VAR_2 && VAR... | [
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
],
[
47
... |
3,645 | void watchdog_add_model(WatchdogTimerModel *model)
{
LIST_INSERT_HEAD(&watchdog_list, model, entry);
}
| false | qemu | 72cf2d4f0e181d0d3a3122e04129c58a95da713e | void watchdog_add_model(WatchdogTimerModel *model)
{
LIST_INSERT_HEAD(&watchdog_list, model, entry);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(WatchdogTimerModel *VAR_0)
{
LIST_INSERT_HEAD(&watchdog_list, VAR_0, entry);
}
| [
"void FUNC_0(WatchdogTimerModel *VAR_0)\n{",
"LIST_INSERT_HEAD(&watchdog_list, VAR_0, entry);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
3,646 | static void encode_plane(FFV1Context *s, uint8_t *src, int w, int h,
int stride, int plane_index)
{
int x, y, i;
const int ring_size = s->avctx->context_model ? 3 : 2;
int16_t *sample[3];
s->run_index = 0;
memset(s->sample_buffer, 0, ring_size * (w + 6) * sizeof(*s-... | false | FFmpeg | 77f521d9e5126575f9bcc21241d81867173c7619 | static void encode_plane(FFV1Context *s, uint8_t *src, int w, int h,
int stride, int plane_index)
{
int x, y, i;
const int ring_size = s->avctx->context_model ? 3 : 2;
int16_t *sample[3];
s->run_index = 0;
memset(s->sample_buffer, 0, ring_size * (w + 6) * sizeof(*s-... | {
"code": [],
"line_no": []
} | static void FUNC_0(FFV1Context *VAR_0, uint8_t *VAR_1, int VAR_2, int VAR_3,
int VAR_4, int VAR_5)
{
int VAR_6, VAR_7, VAR_8;
const int VAR_9 = VAR_0->avctx->context_model ? 3 : 2;
int16_t *sample[3];
VAR_0->run_index = 0;
memset(VAR_0->sample_buffer, 0, VAR_9 * (VA... | [
"static void FUNC_0(FFV1Context *VAR_0, uint8_t *VAR_1, int VAR_2, int VAR_3,\nint VAR_4, int VAR_5)\n{",
"int VAR_6, VAR_7, VAR_8;",
"const int VAR_9 = VAR_0->avctx->context_model ? 3 : 2;",
"int16_t *sample[3];",
"VAR_0->run_index = 0;",
"memset(VAR_0->sample_buffer, 0, VAR_9 * (VAR_2 + 6) * sizeof(*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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
3,647 | static int decode_plane(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
Plane *plane, const uint8_t *data, int32_t data_size,
int32_t strip_width)
{
Cell curr_cell;
int num_vectors;
/* each plane data starts with mc_vector_count... | false | FFmpeg | 1afe49b062a959ed0433e4fd9c1b5dff829ae03e | static int decode_plane(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
Plane *plane, const uint8_t *data, int32_t data_size,
int32_t strip_width)
{
Cell curr_cell;
int num_vectors;
num_vectors = bytestream_get_le32(... | {
"code": [],
"line_no": []
} | static int FUNC_0(Indeo3DecodeContext *VAR_0, AVCodecContext *VAR_1,
Plane *VAR_2, const uint8_t *VAR_3, int32_t VAR_4,
int32_t VAR_5)
{
Cell curr_cell;
int VAR_6;
VAR_6 = bytestream_get_le32(&VAR_3);
VAR_0->mc_v... | [
"static int FUNC_0(Indeo3DecodeContext *VAR_0, AVCodecContext *VAR_1,\nPlane *VAR_2, const uint8_t *VAR_3, int32_t VAR_4,\nint32_t VAR_5)\n{",
"Cell curr_cell;",
"int VAR_6;",
"VAR_6 = bytestream_get_le32(&VAR_3);",
"VAR_0->mc_vectors = VAR_6 ? VAR_3 : 0;",
"init_get_bits(&VAR_0->g... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
19
],
[
21
],
[
27
],
[
29
],
[
31
],
[
35
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
]
] |
3,648 | int qemu_savevm_state_iterate(QEMUFile *f)
{
SaveStateEntry *se;
int ret = 1;
TAILQ_FOREACH(se, &savevm_handlers, entry) {
if (se->save_live_state == NULL)
continue;
/* Section type */
qemu_put_byte(f, QEMU_VM_SECTION_PART);
qemu_put_be32(f, se->secti... | false | qemu | 72cf2d4f0e181d0d3a3122e04129c58a95da713e | int qemu_savevm_state_iterate(QEMUFile *f)
{
SaveStateEntry *se;
int ret = 1;
TAILQ_FOREACH(se, &savevm_handlers, entry) {
if (se->save_live_state == NULL)
continue;
qemu_put_byte(f, QEMU_VM_SECTION_PART);
qemu_put_be32(f, se->section_id);
... | {
"code": [],
"line_no": []
} | int FUNC_0(QEMUFile *VAR_0)
{
SaveStateEntry *se;
int VAR_1 = 1;
TAILQ_FOREACH(se, &savevm_handlers, entry) {
if (se->save_live_state == NULL)
continue;
qemu_put_byte(VAR_0, QEMU_VM_SECTION_PART);
qemu_put_be32(VAR_0, se->section_id);
VAR_... | [
"int FUNC_0(QEMUFile *VAR_0)\n{",
"SaveStateEntry *se;",
"int VAR_1 = 1;",
"TAILQ_FOREACH(se, &savevm_handlers, entry) {",
"if (se->save_live_state == NULL)\ncontinue;",
"qemu_put_byte(VAR_0, QEMU_VM_SECTION_PART);",
"qemu_put_be32(VAR_0, se->section_id);",
"VAR_1 &= !!se->save_live_state(VAR_0, QEMU_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13,
15
],
[
21
],
[
23
],
[
27
],
[
29
],
[
33,
35
],
[
39,
41
],
[
45
],
[
47
]
] |
3,649 | static void qmp_cleanup(void *datap)
{
QmpSerializeData *d = datap;
visit_free(qmp_output_get_visitor(d->qov));
visit_free(d->qiv);
g_free(d);
}
| false | qemu | 3b098d56979d2f7fd707c5be85555d114353a28d | static void qmp_cleanup(void *datap)
{
QmpSerializeData *d = datap;
visit_free(qmp_output_get_visitor(d->qov));
visit_free(d->qiv);
g_free(d);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
QmpSerializeData *d = VAR_0;
visit_free(qmp_output_get_visitor(d->qov));
visit_free(d->qiv);
g_free(d);
}
| [
"static void FUNC_0(void *VAR_0)\n{",
"QmpSerializeData *d = VAR_0;",
"visit_free(qmp_output_get_visitor(d->qov));",
"visit_free(d->qiv);",
"g_free(d);",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
]
] |
3,650 | void parse_numa_opts(MachineClass *mc)
{
int i;
if (qemu_opts_foreach(qemu_find_opts("numa"), parse_numa, NULL, NULL)) {
exit(1);
}
assert(max_numa_nodeid <= MAX_NODES);
/* No support for sparse NUMA node IDs yet: */
for (i = max_numa_nodeid - 1; i >= 0; i--) {
/* ... | false | qemu | cdda2018e3b9ce0c18938767dfdb1e05a05b67ca | void parse_numa_opts(MachineClass *mc)
{
int i;
if (qemu_opts_foreach(qemu_find_opts("numa"), parse_numa, NULL, NULL)) {
exit(1);
}
assert(max_numa_nodeid <= MAX_NODES);
for (i = max_numa_nodeid - 1; i >= 0; i--) {
if (!numa_info[i].present) {
... | {
"code": [],
"line_no": []
} | void FUNC_0(MachineClass *VAR_0)
{
int VAR_1;
if (qemu_opts_foreach(qemu_find_opts("numa"), parse_numa, NULL, NULL)) {
exit(1);
}
assert(max_numa_nodeid <= MAX_NODES);
for (VAR_1 = max_numa_nodeid - 1; VAR_1 >= 0; VAR_1--) {
if (!numa_info[VAR_1].present... | [
"void FUNC_0(MachineClass *VAR_0)\n{",
"int VAR_1;",
"if (qemu_opts_foreach(qemu_find_opts(\"numa\"), parse_numa, NULL, NULL)) {",
"exit(1);",
"}",
"assert(max_numa_nodeid <= MAX_NODES);",
"for (VAR_1 = max_numa_nodeid - 1; VAR_1 >= 0; VAR_1--) {",
"if (!numa_info[VAR_1].present) {",
"error_report(\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
17
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
41
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55
],
[
65
],
[
67... |
3,651 | static inline uint8_t *bt_hci_event_start(struct bt_hci_s *hci,
int evt, int len)
{
uint8_t *packet, mask;
int mask_byte;
if (len > 255) {
fprintf(stderr, "%s: HCI event params too long (%ib)\n",
__FUNCTION__, len);
exit(-1);
}
ma... | false | qemu | a89f364ae8740dfc31b321eed9ee454e996dc3c1 | static inline uint8_t *bt_hci_event_start(struct bt_hci_s *hci,
int evt, int len)
{
uint8_t *packet, mask;
int mask_byte;
if (len > 255) {
fprintf(stderr, "%s: HCI event params too long (%ib)\n",
__FUNCTION__, len);
exit(-1);
}
ma... | {
"code": [],
"line_no": []
} | static inline uint8_t *FUNC_0(struct bt_hci_s *hci,
int evt, int len)
{
uint8_t *packet, mask;
int VAR_0;
if (len > 255) {
fprintf(stderr, "%s: HCI event params too long (%ib)\n",
__FUNCTION__, len);
exit(-1);
}
VAR_0 = (evt - 1) ... | [
"static inline uint8_t *FUNC_0(struct bt_hci_s *hci,\nint evt, int len)\n{",
"uint8_t *packet, mask;",
"int VAR_0;",
"if (len > 255) {",
"fprintf(stderr, \"%s: HCI event params too long (%ib)\\n\",\n__FUNCTION__, len);",
"exit(-1);",
"}",
"VAR_0 = (evt - 1) >> 3;",
"mask = 1 << ((evt - 1) & 3);",
... | [
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
],
[
25
],
[
27
],
[
29,
31
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
]
] |
3,652 | uint64_t helper_efdctsidz (uint64_t val)
{
CPU_DoubleU u;
u.ll = val;
/* NaN are not treated the same way IEEE 754 does */
if (unlikely(float64_is_nan(u.d)))
return 0;
return float64_to_int64_round_to_zero(u.d, &env->vec_status);
}
| false | qemu | 185698715dfb18c82ad2a5dbc169908602d43e81 | uint64_t helper_efdctsidz (uint64_t val)
{
CPU_DoubleU u;
u.ll = val;
if (unlikely(float64_is_nan(u.d)))
return 0;
return float64_to_int64_round_to_zero(u.d, &env->vec_status);
}
| {
"code": [],
"line_no": []
} | uint64_t FUNC_0 (uint64_t val)
{
CPU_DoubleU u;
u.ll = val;
if (unlikely(float64_is_nan(u.d)))
return 0;
return float64_to_int64_round_to_zero(u.d, &env->vec_status);
}
| [
"uint64_t FUNC_0 (uint64_t val)\n{",
"CPU_DoubleU u;",
"u.ll = val;",
"if (unlikely(float64_is_nan(u.d)))\nreturn 0;",
"return float64_to_int64_round_to_zero(u.d, &env->vec_status);",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13,
15
],
[
19
],
[
21
]
] |
3,653 | static int kvm_has_msr_star(CPUState *env)
{
kvm_supported_msrs(env);
return has_msr_star;
}
| false | qemu | c3a3a7d356c4df2fe145037172ae52cba5f545a5 | static int kvm_has_msr_star(CPUState *env)
{
kvm_supported_msrs(env);
return has_msr_star;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(CPUState *VAR_0)
{
kvm_supported_msrs(VAR_0);
return has_msr_star;
}
| [
"static int FUNC_0(CPUState *VAR_0)\n{",
"kvm_supported_msrs(VAR_0);",
"return has_msr_star;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
3,654 | int64_t qemu_fseek(QEMUFile *f, int64_t pos, int whence)
{
if (whence == SEEK_SET) {
/* nothing to do */
} else if (whence == SEEK_CUR) {
pos += qemu_ftell(f);
} else {
/* SEEK_END not supported */
return -1;
}
if (f->is_writable) {
qemu_fflush(f);
... | false | qemu | 5dafc53f1fb091d242f2179ffcb43bb28af36d1e | int64_t qemu_fseek(QEMUFile *f, int64_t pos, int whence)
{
if (whence == SEEK_SET) {
} else if (whence == SEEK_CUR) {
pos += qemu_ftell(f);
} else {
return -1;
}
if (f->is_writable) {
qemu_fflush(f);
f->buf_offset = pos;
} else {
... | {
"code": [],
"line_no": []
} | int64_t FUNC_0(QEMUFile *f, int64_t pos, int whence)
{
if (whence == SEEK_SET) {
} else if (whence == SEEK_CUR) {
pos += qemu_ftell(f);
} else {
return -1;
}
if (f->is_writable) {
qemu_fflush(f);
f->buf_offset = pos;
} else {
... | [
"int64_t FUNC_0(QEMUFile *f, int64_t pos, int whence)\n{",
"if (whence == SEEK_SET) {",
"} else if (whence == SEEK_CUR) {",
"pos += qemu_ftell(f);",
"} else {",
"return -1;",
"}",
"if (f->is_writable) {",
"qemu_fflush(f);",
"f->buf_offset = pos;",
"} else {",
"f->buf_offset = pos;",
"f->buf_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
3,655 | static void qbus_list_dev(BusState *bus, char *dest, int len)
{
DeviceState *dev;
const char *sep = " ";
int pos = 0;
pos += snprintf(dest+pos, len-pos, "devices at \"%s\":",
bus->name);
LIST_FOREACH(dev, &bus->children, sibling) {
pos += snprintf(dest+pos, len-... | false | qemu | 72cf2d4f0e181d0d3a3122e04129c58a95da713e | static void qbus_list_dev(BusState *bus, char *dest, int len)
{
DeviceState *dev;
const char *sep = " ";
int pos = 0;
pos += snprintf(dest+pos, len-pos, "devices at \"%s\":",
bus->name);
LIST_FOREACH(dev, &bus->children, sibling) {
pos += snprintf(dest+pos, len-... | {
"code": [],
"line_no": []
} | static void FUNC_0(BusState *VAR_0, char *VAR_1, int VAR_2)
{
DeviceState *dev;
const char *VAR_3 = " ";
int VAR_4 = 0;
VAR_4 += snprintf(VAR_1+VAR_4, VAR_2-VAR_4, "devices at \"%s\":",
VAR_0->name);
LIST_FOREACH(dev, &VAR_0->children, sibling) {
VAR_4 += snprin... | [
"static void FUNC_0(BusState *VAR_0, char *VAR_1, int VAR_2)\n{",
"DeviceState *dev;",
"const char *VAR_3 = \" \";",
"int VAR_4 = 0;",
"VAR_4 += snprintf(VAR_1+VAR_4, VAR_2-VAR_4, \"devices at \\\"%s\\\":\",\nVAR_0->name);",
"LIST_FOREACH(dev, &VAR_0->children, sibling) {",
"VAR_4 += snprintf(VAR_1+VAR_... | [
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
]
] |
3,656 | void vnc_zlib_zfree(void *x, void *addr)
{
qemu_free(addr);
}
| false | qemu | 245f7b51c0ea04fb2224b1127430a096c91aee70 | void vnc_zlib_zfree(void *x, void *addr)
{
qemu_free(addr);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(void *VAR_0, void *VAR_1)
{
qemu_free(VAR_1);
}
| [
"void FUNC_0(void *VAR_0, void *VAR_1)\n{",
"qemu_free(VAR_1);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
3,657 | static target_ulong h_put_term_char(CPUState *env, sPAPREnvironment *spapr,
target_ulong opcode, target_ulong *args)
{
target_ulong reg = args[0];
target_ulong len = args[1];
target_ulong char0_7 = args[2];
target_ulong char8_15 = args[3];
VIOsPAPRDevice *s... | false | qemu | 3feef8ad17af7307373b9e88b9d7ecb98eeb99da | static target_ulong h_put_term_char(CPUState *env, sPAPREnvironment *spapr,
target_ulong opcode, target_ulong *args)
{
target_ulong reg = args[0];
target_ulong len = args[1];
target_ulong char0_7 = args[2];
target_ulong char8_15 = args[3];
VIOsPAPRDevice *s... | {
"code": [],
"line_no": []
} | static target_ulong FUNC_0(CPUState *env, sPAPREnvironment *spapr,
target_ulong opcode, target_ulong *args)
{
target_ulong reg = args[0];
target_ulong len = args[1];
target_ulong char0_7 = args[2];
target_ulong char8_15 = args[3];
VIOsPAPRDevice *sdev = spa... | [
"static target_ulong FUNC_0(CPUState *env, sPAPREnvironment *spapr,\ntarget_ulong opcode, target_ulong *args)\n{",
"target_ulong reg = args[0];",
"target_ulong len = args[1];",
"target_ulong char0_7 = args[2];",
"target_ulong char8_15 = args[3];",
"VIOsPAPRDevice *sdev = spapr_vio_find_by_reg(spapr->vio_b... | [
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
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49
]
] |
3,659 | static void thread_pool_co_cb(void *opaque, int ret)
{
ThreadPoolCo *co = opaque;
co->ret = ret;
qemu_coroutine_enter(co->co);
}
| false | qemu | c2b38b277a7882a592f4f2ec955084b2b756daaa | static void thread_pool_co_cb(void *opaque, int ret)
{
ThreadPoolCo *co = opaque;
co->ret = ret;
qemu_coroutine_enter(co->co);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, int VAR_1)
{
ThreadPoolCo *co = VAR_0;
co->VAR_1 = VAR_1;
qemu_coroutine_enter(co->co);
}
| [
"static void FUNC_0(void *VAR_0, int VAR_1)\n{",
"ThreadPoolCo *co = VAR_0;",
"co->VAR_1 = VAR_1;",
"qemu_coroutine_enter(co->co);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
]
] |
3,660 | static int qemu_balloon(ram_addr_t target)
{
if (!balloon_event_fn) {
return 0;
}
trace_balloon_event(balloon_opaque, target);
balloon_event_fn(balloon_opaque, target);
return 1;
}
| false | qemu | 6502a14734e71b2f6dd079b0a1e546e6aa2d2f8d | static int qemu_balloon(ram_addr_t target)
{
if (!balloon_event_fn) {
return 0;
}
trace_balloon_event(balloon_opaque, target);
balloon_event_fn(balloon_opaque, target);
return 1;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(ram_addr_t VAR_0)
{
if (!balloon_event_fn) {
return 0;
}
trace_balloon_event(balloon_opaque, VAR_0);
balloon_event_fn(balloon_opaque, VAR_0);
return 1;
}
| [
"static int FUNC_0(ram_addr_t VAR_0)\n{",
"if (!balloon_event_fn) {",
"return 0;",
"}",
"trace_balloon_event(balloon_opaque, VAR_0);",
"balloon_event_fn(balloon_opaque, VAR_0);",
"return 1;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
3,661 | static bool cmd_write_dma(IDEState *s, uint8_t cmd)
{
bool lba48 = (cmd == WIN_WRITEDMA_EXT);
if (!s->bs) {
ide_abort_command(s);
return true;
}
ide_cmd_lba48_transform(s, lba48);
ide_sector_start_dma(s, IDE_DMA_WRITE);
s->media_changed = 1;
return false;
}... | false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | static bool cmd_write_dma(IDEState *s, uint8_t cmd)
{
bool lba48 = (cmd == WIN_WRITEDMA_EXT);
if (!s->bs) {
ide_abort_command(s);
return true;
}
ide_cmd_lba48_transform(s, lba48);
ide_sector_start_dma(s, IDE_DMA_WRITE);
s->media_changed = 1;
return false;
}... | {
"code": [],
"line_no": []
} | static bool FUNC_0(IDEState *s, uint8_t cmd)
{
bool lba48 = (cmd == WIN_WRITEDMA_EXT);
if (!s->bs) {
ide_abort_command(s);
return true;
}
ide_cmd_lba48_transform(s, lba48);
ide_sector_start_dma(s, IDE_DMA_WRITE);
s->media_changed = 1;
return false;
}
| [
"static bool FUNC_0(IDEState *s, uint8_t cmd)\n{",
"bool lba48 = (cmd == WIN_WRITEDMA_EXT);",
"if (!s->bs) {",
"ide_abort_command(s);",
"return true;",
"}",
"ide_cmd_lba48_transform(s, lba48);",
"ide_sector_start_dma(s, IDE_DMA_WRITE);",
"s->media_changed = 1;",
"return false;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25
],
[
29
],
[
31
]
] |
3,663 | static uint64_t pxa2xx_pm_read(void *opaque, hwaddr addr,
unsigned size)
{
PXA2xxState *s = (PXA2xxState *) opaque;
switch (addr) {
case PMCR ... PCMD31:
if (addr & 3)
goto fail;
return s->pm_regs[addr >> 2];
default:
fail:
... | false | qemu | a89f364ae8740dfc31b321eed9ee454e996dc3c1 | static uint64_t pxa2xx_pm_read(void *opaque, hwaddr addr,
unsigned size)
{
PXA2xxState *s = (PXA2xxState *) opaque;
switch (addr) {
case PMCR ... PCMD31:
if (addr & 3)
goto fail;
return s->pm_regs[addr >> 2];
default:
fail:
... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, hwaddr addr,
unsigned size)
{
PXA2xxState *s = (PXA2xxState *) opaque;
switch (addr) {
case PMCR ... PCMD31:
if (addr & 3)
goto fail;
return s->pm_regs[addr >> 2];
default:
fail:
pr... | [
"static uint64_t FUNC_0(void *opaque, hwaddr addr,\nunsigned size)\n{",
"PXA2xxState *s = (PXA2xxState *) opaque;",
"switch (addr) {",
"case PMCR ... PCMD31:\nif (addr & 3)\ngoto fail;",
"return s->pm_regs[addr >> 2];",
"default:\nfail:\nprintf(\"%s: Bad register \" REG_FMT \"\\n\", __FUNCTION__, addr);",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13,
15,
17
],
[
21
],
[
23,
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
3,664 | static void ics_base_realize(DeviceState *dev, Error **errp)
{
ICSStateClass *icsc = ICS_BASE_GET_CLASS(dev);
ICSState *ics = ICS_BASE(dev);
Object *obj;
Error *err = NULL;
obj = object_property_get_link(OBJECT(dev), ICS_PROP_XICS, &err);
if (!obj) {
error_setg(errp, "%s: requi... | false | qemu | 100f738850639a108d6767316ce4dcc1d1ea4ae4 | static void ics_base_realize(DeviceState *dev, Error **errp)
{
ICSStateClass *icsc = ICS_BASE_GET_CLASS(dev);
ICSState *ics = ICS_BASE(dev);
Object *obj;
Error *err = NULL;
obj = object_property_get_link(OBJECT(dev), ICS_PROP_XICS, &err);
if (!obj) {
error_setg(errp, "%s: requi... | {
"code": [],
"line_no": []
} | static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)
{
ICSStateClass *icsc = ICS_BASE_GET_CLASS(VAR_0);
ICSState *ics = ICS_BASE(VAR_0);
Object *obj;
Error *err = NULL;
obj = object_property_get_link(OBJECT(VAR_0), ICS_PROP_XICS, &err);
if (!obj) {
error_setg(VAR_1, "%s: requi... | [
"static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)\n{",
"ICSStateClass *icsc = ICS_BASE_GET_CLASS(VAR_0);",
"ICSState *ics = ICS_BASE(VAR_0);",
"Object *obj;",
"Error *err = NULL;",
"obj = object_property_get_link(OBJECT(VAR_0), ICS_PROP_XICS, &err);",
"if (!obj) {",
"error_setg(VAR_1, \"%s: requi... | [
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
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
3,665 | bool postcopy_ram_supported_by_host(void)
{
error_report("%s: No OS support", __func__);
return false;
}
| false | qemu | d7651f150d61936344c4fab45eaeb0716c606af2 | bool postcopy_ram_supported_by_host(void)
{
error_report("%s: No OS support", __func__);
return false;
}
| {
"code": [],
"line_no": []
} | bool FUNC_0(void)
{
error_report("%s: No OS support", __func__);
return false;
}
| [
"bool FUNC_0(void)\n{",
"error_report(\"%s: No OS support\", __func__);",
"return false;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
3,666 | int64_t qemu_file_get_rate_limit(QEMUFile *f)
{
return f->xfer_limit;
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | int64_t qemu_file_get_rate_limit(QEMUFile *f)
{
return f->xfer_limit;
}
| {
"code": [],
"line_no": []
} | int64_t FUNC_0(QEMUFile *f)
{
return f->xfer_limit;
}
| [
"int64_t FUNC_0(QEMUFile *f)\n{",
"return f->xfer_limit;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
3,667 | static inline void put_codeword(PutBitContext *pb, vorbis_enc_codebook *cb,
int entry)
{
assert(entry >= 0);
assert(entry < cb->nentries);
assert(cb->lens[entry]);
put_bits(pb, cb->lens[entry], cb->codewords[entry]);
}
| true | FFmpeg | 1ba08c94f5bb4d1c3c2d3651b5e01edb4ce172e2 | static inline void put_codeword(PutBitContext *pb, vorbis_enc_codebook *cb,
int entry)
{
assert(entry >= 0);
assert(entry < cb->nentries);
assert(cb->lens[entry]);
put_bits(pb, cb->lens[entry], cb->codewords[entry]);
}
| {
"code": [
"static inline void put_codeword(PutBitContext *pb, vorbis_enc_codebook *cb,",
" int entry)"
],
"line_no": [
1,
3
]
} | static inline void FUNC_0(PutBitContext *VAR_0, vorbis_enc_codebook *VAR_1,
int VAR_2)
{
assert(VAR_2 >= 0);
assert(VAR_2 < VAR_1->nentries);
assert(VAR_1->lens[VAR_2]);
put_bits(VAR_0, VAR_1->lens[VAR_2], VAR_1->codewords[VAR_2]);
}
| [
"static inline void FUNC_0(PutBitContext *VAR_0, vorbis_enc_codebook *VAR_1,\nint VAR_2)\n{",
"assert(VAR_2 >= 0);",
"assert(VAR_2 < VAR_1->nentries);",
"assert(VAR_1->lens[VAR_2]);",
"put_bits(VAR_0, VAR_1->lens[VAR_2], VAR_1->codewords[VAR_2]);",
"}"
] | [
1,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
3,668 | static inline int qemu_rdma_buffer_mergable(RDMAContext *rdma,
uint64_t offset, uint64_t len)
{
RDMALocalBlock *block;
uint8_t *host_addr;
uint8_t *chunk_end;
if (rdma->current_index < 0) {
return 0;
}
if (rdma->current_chunk < 0) {
return 0;
... | true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | static inline int qemu_rdma_buffer_mergable(RDMAContext *rdma,
uint64_t offset, uint64_t len)
{
RDMALocalBlock *block;
uint8_t *host_addr;
uint8_t *chunk_end;
if (rdma->current_index < 0) {
return 0;
}
if (rdma->current_chunk < 0) {
return 0;
... | {
"code": [],
"line_no": []
} | static inline int FUNC_0(RDMAContext *VAR_0,
uint64_t VAR_1, uint64_t VAR_2)
{
RDMALocalBlock *block;
uint8_t *host_addr;
uint8_t *chunk_end;
if (VAR_0->current_index < 0) {
return 0;
}
if (VAR_0->current_chunk < 0) {
return 0;
}
bloc... | [
"static inline int FUNC_0(RDMAContext *VAR_0,\nuint64_t VAR_1, uint64_t VAR_2)\n{",
"RDMALocalBlock *block;",
"uint8_t *host_addr;",
"uint8_t *chunk_end;",
"if (VAR_0->current_index < 0) {",
"return 0;",
"}",
"if (VAR_0->current_chunk < 0) {",
"return 0;",
"}",
"block = &(VAR_0->local_ram_blocks... | [
0,
0,
0,
0,
0,
0,
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
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
53
],
[
55
],
[
57
],
[... |
3,669 | static int vmdk_open_desc_file(BlockDriverState *bs, int flags,
int64_t desc_offset)
{
int ret;
char buf[2048];
char ct[128];
BDRVVmdkState *s = bs->opaque;
ret = bdrv_pread(bs->file, desc_offset, buf, sizeof(buf));
if (ret < 0) {
return ret;
... | true | qemu | b3c0bfb6f949d8f1c97f390f951c0bab3e703810 | static int vmdk_open_desc_file(BlockDriverState *bs, int flags,
int64_t desc_offset)
{
int ret;
char buf[2048];
char ct[128];
BDRVVmdkState *s = bs->opaque;
ret = bdrv_pread(bs->file, desc_offset, buf, sizeof(buf));
if (ret < 0) {
return ret;
... | {
"code": [
" g_free(s->extents);"
],
"line_no": [
63
]
} | static int FUNC_0(BlockDriverState *VAR_0, int VAR_1,
int64_t VAR_2)
{
int VAR_3;
char VAR_4[2048];
char VAR_5[128];
BDRVVmdkState *s = VAR_0->opaque;
VAR_3 = bdrv_pread(VAR_0->file, VAR_2, VAR_4, sizeof(VAR_4));
if (VAR_3 < 0) {
return VAR_3;
... | [
"static int FUNC_0(BlockDriverState *VAR_0, int VAR_1,\nint64_t VAR_2)\n{",
"int VAR_3;",
"char VAR_4[2048];",
"char VAR_5[128];",
"BDRVVmdkState *s = VAR_0->opaque;",
"VAR_3 = bdrv_pread(VAR_0->file, VAR_2, VAR_4, sizeof(VAR_4));",
"if (VAR_3 < 0) {",
"return VAR_3;",
"}",
"VAR_4[2047] = '\\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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33,
35,
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
... |
3,670 | static void vc1_mc_4mv_chroma(VC1Context *v, int dir)
{
MpegEncContext *s = &v->s;
H264ChromaContext *h264chroma = &v->h264chroma;
uint8_t *srcU, *srcV;
int uvmx, uvmy, uvsrc_x, uvsrc_y;
int k, tx = 0, ty = 0;
int mvx[4], mvy[4], intra[4], mv_f[4];
int valid_count;
int chroma_re... | true | FFmpeg | f6774f905fb3cfdc319523ac640be30b14c1bc55 | static void vc1_mc_4mv_chroma(VC1Context *v, int dir)
{
MpegEncContext *s = &v->s;
H264ChromaContext *h264chroma = &v->h264chroma;
uint8_t *srcU, *srcV;
int uvmx, uvmy, uvsrc_x, uvsrc_y;
int k, tx = 0, ty = 0;
int mvx[4], mvy[4], intra[4], mv_f[4];
int valid_count;
int chroma_re... | {
"code": [
" srcU = s->current_picture.f.data[1];",
" srcV = s->current_picture.f.data[2];",
" srcU = s->last_picture.f.data[1];",
" srcV = s->last_picture.f.data[2];",
" srcU = s->next_picture.f.data[1];",
" srcV = s->next_picture.f.d... | static void FUNC_0(VC1Context *VAR_0, int VAR_1)
{
MpegEncContext *s = &VAR_0->s;
H264ChromaContext *h264chroma = &VAR_0->h264chroma;
uint8_t *srcU, *srcV;
int VAR_2, VAR_3, VAR_4, VAR_5;
int VAR_6, VAR_7 = 0, VAR_8 = 0;
int VAR_9[4], VAR_10[4], VAR_11[4], VAR_12[4];
int VAR_13;
... | [
"static void FUNC_0(VC1Context *VAR_0, int VAR_1)\n{",
"MpegEncContext *s = &VAR_0->s;",
"H264ChromaContext *h264chroma = &VAR_0->h264chroma;",
"uint8_t *srcU, *srcV;",
"int VAR_2, VAR_3, VAR_4, VAR_5;",
"int VAR_6, VAR_7 = 0, VAR_8 = 0;",
"int VAR_9[4], VAR_10[4], VAR_11[4], VAR_12[4];",
"int VAR_13;... | [
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
1... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
33,
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,... |
3,671 | void palette8torgb24(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette)
{
unsigned i;
/*
writes 1 byte o much and might cause alignment issues on some architectures?
for(i=0; i<num_pixels; i++)
((unsigned *)(&dst[i*3])) = ((unsigned *)palette)[ src[i] ];
*/
for(i=0; i<num_pixel... | true | FFmpeg | 7f526efd17973ec6d2204f7a47b6923e2be31363 | void palette8torgb24(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette)
{
unsigned i;
for(i=0; i<num_pixels; i++)
{
dst[0]= palette[ src[i]*4+2 ];
dst[1]= palette[ src[i]*4+1 ];
dst[2]= palette[ src[i]*4+0 ];
dst+= 3;
}
}
| {
"code": [
"\tunsigned i;",
"\tunsigned i;",
"void palette8torgb24(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette)",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tunsigned i;",
"\tuns... | void FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, unsigned VAR_2, const uint8_t *VAR_3)
{
unsigned VAR_4;
for(VAR_4=0; VAR_4<VAR_2; VAR_4++)
{
VAR_1[0]= VAR_3[ VAR_0[VAR_4]*4+2 ];
VAR_1[1]= VAR_3[ VAR_0[VAR_4]*4+1 ];
VAR_1[2]= VAR_3[ VAR_0[VAR_4]*4+0 ];
VAR_1+= 3;
}
}
| [
"void FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, unsigned VAR_2, const uint8_t *VAR_3)\n{",
"unsigned VAR_4;",
"for(VAR_4=0; VAR_4<VAR_2; VAR_4++)",
"{",
"VAR_1[0]= VAR_3[ VAR_0[VAR_4]*4+2 ];",
"VAR_1[1]= VAR_3[ VAR_0[VAR_4]*4+1 ];",
"VAR_1[2]= VAR_3[ VAR_0[VAR_4]*4+0 ];",
"VAR_1+= 3;",
"}",
"}"... | [
1,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.