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 |
|---|---|---|---|---|---|---|---|---|---|---|
20,991 | static void m5206_mbar_writeb(void *opaque, target_phys_addr_t offset,
uint32_t value)
{
m5206_mbar_state *s = (m5206_mbar_state *)opaque;
int width;
offset &= 0x3ff;
if (offset >= 0x200) {
hw_error("Bad MBAR write offset 0x%x", (int)offset);
}
widt... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void m5206_mbar_writeb(void *opaque, target_phys_addr_t offset,
uint32_t value)
{
m5206_mbar_state *s = (m5206_mbar_state *)opaque;
int width;
offset &= 0x3ff;
if (offset >= 0x200) {
hw_error("Bad MBAR write offset 0x%x", (int)offset);
}
widt... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint32_t VAR_2)
{
m5206_mbar_state *s = (m5206_mbar_state *)VAR_0;
int VAR_3;
VAR_1 &= 0x3ff;
if (VAR_1 >= 0x200) {
hw_error("Bad MBAR write VAR_1 0x%x", (int)VAR_1);
}
VAR_3 = m5206_mbar_wid... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint32_t VAR_2)\n{",
"m5206_mbar_state *s = (m5206_mbar_state *)VAR_0;",
"int VAR_3;",
"VAR_1 &= 0x3ff;",
"if (VAR_1 >= 0x200) {",
"hw_error(\"Bad MBAR write VAR_1 0x%x\", (int)VAR_1);",
"}",
"VAR_3 = m5206_mbar_width[VAR_1 >> 2];",
"if (VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[... |
20,993 | static void mv88w8618_pit_write(void *opaque, target_phys_addr_t offset,
uint32_t value)
{
mv88w8618_pit_state *s = opaque;
mv88w8618_timer_state *t;
int i;
switch (offset) {
case MP_PIT_TIMER1_LENGTH ... MP_PIT_TIMER4_LENGTH:
t = &s->timer[offset >>... | false | qemu | c88d6bded69804617f412a60c7375cc93f8687a5 | static void mv88w8618_pit_write(void *opaque, target_phys_addr_t offset,
uint32_t value)
{
mv88w8618_pit_state *s = opaque;
mv88w8618_timer_state *t;
int i;
switch (offset) {
case MP_PIT_TIMER1_LENGTH ... MP_PIT_TIMER4_LENGTH:
t = &s->timer[offset >>... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint32_t VAR_2)
{
mv88w8618_pit_state *s = VAR_0;
mv88w8618_timer_state *t;
int VAR_3;
switch (VAR_1) {
case MP_PIT_TIMER1_LENGTH ... MP_PIT_TIMER4_LENGTH:
t = &s->timer[VAR_1 >> 2];
... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint32_t VAR_2)\n{",
"mv88w8618_pit_state *s = VAR_0;",
"mv88w8618_timer_state *t;",
"int VAR_3;",
"switch (VAR_1) {",
"case MP_PIT_TIMER1_LENGTH ... MP_PIT_TIMER4_LENGTH:\nt = &s->timer[VAR_1 >> 2];",
"t->limit = VAR_2;",
"ptimer_set_limit(t... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
20,995 | static void audio_detach_capture (HWVoiceOut *hw)
{
SWVoiceCap *sc = hw->cap_head.lh_first;
while (sc) {
SWVoiceCap *sc1 = sc->entries.le_next;
SWVoiceOut *sw = &sc->sw;
CaptureVoiceOut *cap = sc->cap;
int was_active = sw->active;
if (sw->rate) {
... | false | qemu | 72cf2d4f0e181d0d3a3122e04129c58a95da713e | static void audio_detach_capture (HWVoiceOut *hw)
{
SWVoiceCap *sc = hw->cap_head.lh_first;
while (sc) {
SWVoiceCap *sc1 = sc->entries.le_next;
SWVoiceOut *sw = &sc->sw;
CaptureVoiceOut *cap = sc->cap;
int was_active = sw->active;
if (sw->rate) {
... | {
"code": [],
"line_no": []
} | static void FUNC_0 (HWVoiceOut *VAR_0)
{
SWVoiceCap *sc = VAR_0->cap_head.lh_first;
while (sc) {
SWVoiceCap *sc1 = sc->entries.le_next;
SWVoiceOut *sw = &sc->sw;
CaptureVoiceOut *cap = sc->cap;
int VAR_1 = sw->active;
if (sw->rate) {
st_rate_stop ... | [
"static void FUNC_0 (HWVoiceOut *VAR_0)\n{",
"SWVoiceCap *sc = VAR_0->cap_head.lh_first;",
"while (sc) {",
"SWVoiceCap *sc1 = sc->entries.le_next;",
"SWVoiceOut *sw = &sc->sw;",
"CaptureVoiceOut *cap = sc->cap;",
"int VAR_1 = sw->active;",
"if (sw->rate) {",
"st_rate_stop (sw->rate);",
"sw->rate =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53... |
20,998 | unsigned s390_del_running_cpu(S390CPU *cpu)
{
CPUState *cs = CPU(cpu);
if (cs->halted == 0) {
assert(s390_running_cpus >= 1);
s390_running_cpus--;
cs->halted = 1;
cs->exception_index = EXCP_HLT;
}
return s390_running_cpus;
}
| false | qemu | 75973bfe415774babe7c1e18fa682c050fdce73b | unsigned s390_del_running_cpu(S390CPU *cpu)
{
CPUState *cs = CPU(cpu);
if (cs->halted == 0) {
assert(s390_running_cpus >= 1);
s390_running_cpus--;
cs->halted = 1;
cs->exception_index = EXCP_HLT;
}
return s390_running_cpus;
}
| {
"code": [],
"line_no": []
} | unsigned FUNC_0(S390CPU *VAR_0)
{
CPUState *cs = CPU(VAR_0);
if (cs->halted == 0) {
assert(s390_running_cpus >= 1);
s390_running_cpus--;
cs->halted = 1;
cs->exception_index = EXCP_HLT;
}
return s390_running_cpus;
}
| [
"unsigned FUNC_0(S390CPU *VAR_0)\n{",
"CPUState *cs = CPU(VAR_0);",
"if (cs->halted == 0) {",
"assert(s390_running_cpus >= 1);",
"s390_running_cpus--;",
"cs->halted = 1;",
"cs->exception_index = EXCP_HLT;",
"}",
"return s390_running_cpus;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
20,999 | static int raw_fd_pool_get(BDRVRawState *s)
{
int i;
for (i = 0; i < RAW_FD_POOL_SIZE; i++) {
/* already in use */
if (s->fd_pool[i] != -1)
continue;
/* try to dup file descriptor */
s->fd_pool[i] = dup(s->fd);
if (s->fd_pool[i] != -1)
... | false | qemu | 3c529d935923a70519557d420db1d5a09a65086a | static int raw_fd_pool_get(BDRVRawState *s)
{
int i;
for (i = 0; i < RAW_FD_POOL_SIZE; i++) {
if (s->fd_pool[i] != -1)
continue;
s->fd_pool[i] = dup(s->fd);
if (s->fd_pool[i] != -1)
return s->fd_pool[i];
}
return s... | {
"code": [],
"line_no": []
} | static int FUNC_0(BDRVRawState *VAR_0)
{
int VAR_1;
for (VAR_1 = 0; VAR_1 < RAW_FD_POOL_SIZE; VAR_1++) {
if (VAR_0->fd_pool[VAR_1] != -1)
continue;
VAR_0->fd_pool[VAR_1] = dup(VAR_0->fd);
if (VAR_0->fd_pool[VAR_1] != -1)
return VAR_... | [
"static int FUNC_0(BDRVRawState *VAR_0)\n{",
"int VAR_1;",
"for (VAR_1 = 0; VAR_1 < RAW_FD_POOL_SIZE; VAR_1++) {",
"if (VAR_0->fd_pool[VAR_1] != -1)\ncontinue;",
"VAR_0->fd_pool[VAR_1] = dup(VAR_0->fd);",
"if (VAR_0->fd_pool[VAR_1] != -1)\nreturn VAR_0->fd_pool[VAR_1];",
"}",
"return VAR_0->fd;",
"}... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13,
15
],
[
21
],
[
23,
25
],
[
27
],
[
33
],
[
35
]
] |
21,000 | static CharDriverState *qemu_chr_open_pipe(ChardevHostdev *opts)
{
const char *filename = opts->device;
CharDriverState *chr;
WinCharState *s;
chr = g_malloc0(sizeof(CharDriverState));
s = g_malloc0(sizeof(WinCharState));
chr->opaque = s;
chr->chr_write = win_chr_write;
chr->c... | false | qemu | db39fcf1f690b02d612e2bfc00980700887abe03 | static CharDriverState *qemu_chr_open_pipe(ChardevHostdev *opts)
{
const char *filename = opts->device;
CharDriverState *chr;
WinCharState *s;
chr = g_malloc0(sizeof(CharDriverState));
s = g_malloc0(sizeof(WinCharState));
chr->opaque = s;
chr->chr_write = win_chr_write;
chr->c... | {
"code": [],
"line_no": []
} | static CharDriverState *FUNC_0(ChardevHostdev *opts)
{
const char *VAR_0 = opts->device;
CharDriverState *chr;
WinCharState *s;
chr = g_malloc0(sizeof(CharDriverState));
s = g_malloc0(sizeof(WinCharState));
chr->opaque = s;
chr->chr_write = win_chr_write;
chr->chr_close = win_... | [
"static CharDriverState *FUNC_0(ChardevHostdev *opts)\n{",
"const char *VAR_0 = opts->device;",
"CharDriverState *chr;",
"WinCharState *s;",
"chr = g_malloc0(sizeof(CharDriverState));",
"s = g_malloc0(sizeof(WinCharState));",
"chr->opaque = s;",
"chr->chr_write = win_chr_write;",
"chr->chr_close = w... | [
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
]
] |
21,001 | static void cirrus_linear_write(void *opaque, target_phys_addr_t addr,
uint64_t val, unsigned size)
{
CirrusVGAState *s = opaque;
unsigned mode;
addr &= s->cirrus_addr_mask;
if (((s->vga.sr[0x17] & 0x44) == 0x44) &&
((addr & s->linear_mmio_mask) == s->... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void cirrus_linear_write(void *opaque, target_phys_addr_t addr,
uint64_t val, unsigned size)
{
CirrusVGAState *s = opaque;
unsigned mode;
addr &= s->cirrus_addr_mask;
if (((s->vga.sr[0x17] & 0x44) == 0x44) &&
((addr & s->linear_mmio_mask) == s->... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
CirrusVGAState *s = VAR_0;
unsigned VAR_4;
VAR_1 &= s->cirrus_addr_mask;
if (((s->vga.sr[0x17] & 0x44) == 0x44) &&
((VAR_1 & s->linear_mmio_mask) == s->linear_m... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"CirrusVGAState *s = VAR_0;",
"unsigned VAR_4;",
"VAR_1 &= s->cirrus_addr_mask;",
"if (((s->vga.sr[0x17] & 0x44) == 0x44) &&\n((VAR_1 & s->linear_mmio_mask) == s->linear_mmio_mask)) {",
"cirrus_mmio_blt_write... | [
0,
0,
0,
0,
0,
0,
0,
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
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
... |
21,002 | static void gdb_chr_receive(void *opaque, const uint8_t *buf, int size)
{
GDBState *s = opaque;
int i;
for (i = 0; i < size; i++) {
gdb_read_byte(s, buf[i]);
}
}
| false | qemu | 880a7578381d1c7ed4d41c7599ae3cc06567a824 | static void gdb_chr_receive(void *opaque, const uint8_t *buf, int size)
{
GDBState *s = opaque;
int i;
for (i = 0; i < size; i++) {
gdb_read_byte(s, buf[i]);
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, const uint8_t *VAR_1, int VAR_2)
{
GDBState *s = VAR_0;
int VAR_3;
for (VAR_3 = 0; VAR_3 < VAR_2; VAR_3++) {
gdb_read_byte(s, VAR_1[VAR_3]);
}
}
| [
"static void FUNC_0(void *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{",
"GDBState *s = VAR_0;",
"int VAR_3;",
"for (VAR_3 = 0; VAR_3 < VAR_2; VAR_3++) {",
"gdb_read_byte(s, VAR_1[VAR_3]);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
21,003 | get_pointer_coordinates(int *x, int *y, Display *dpy, AVFormatContext *s1)
{
Window mrootwindow, childwindow;
int dummy;
mrootwindow = DefaultRootWindow(dpy);
if (XQueryPointer(dpy, mrootwindow, &mrootwindow, &childwindow,
x, y, &dummy, &dummy, (unsigned int*)&dummy)) {
... | false | FFmpeg | ca4544409e32d692504b44e4ae804c3538993904 | get_pointer_coordinates(int *x, int *y, Display *dpy, AVFormatContext *s1)
{
Window mrootwindow, childwindow;
int dummy;
mrootwindow = DefaultRootWindow(dpy);
if (XQueryPointer(dpy, mrootwindow, &mrootwindow, &childwindow,
x, y, &dummy, &dummy, (unsigned int*)&dummy)) {
... | {
"code": [],
"line_no": []
} | FUNC_0(int *VAR_0, int *VAR_1, Display *VAR_2, AVFormatContext *VAR_3)
{
Window mrootwindow, childwindow;
int VAR_4;
mrootwindow = DefaultRootWindow(VAR_2);
if (XQueryPointer(VAR_2, mrootwindow, &mrootwindow, &childwindow,
VAR_0, VAR_1, &VAR_4, &VAR_4, (unsigned int*)&VAR... | [
"FUNC_0(int *VAR_0, int *VAR_1, Display *VAR_2, AVFormatContext *VAR_3)\n{",
"Window mrootwindow, childwindow;",
"int VAR_4;",
"mrootwindow = DefaultRootWindow(VAR_2);",
"if (XQueryPointer(VAR_2, mrootwindow, &mrootwindow, &childwindow,\nVAR_0, VAR_1, &VAR_4, &VAR_4, (unsigned int*)&VAR_4)) {",
"} else {"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
21,004 | uint64_t helper_stq_c_raw(uint64_t t0, uint64_t t1)
{
uint64_t ret;
if (t1 == env->lock) {
stq_raw(t1, t0);
ret = 0;
} else
ret = 1;
env->lock = 1;
return ret;
}
| false | qemu | 2374e73edafff0586cbfb67c333c5a7588f81fd5 | uint64_t helper_stq_c_raw(uint64_t t0, uint64_t t1)
{
uint64_t ret;
if (t1 == env->lock) {
stq_raw(t1, t0);
ret = 0;
} else
ret = 1;
env->lock = 1;
return ret;
}
| {
"code": [],
"line_no": []
} | uint64_t FUNC_0(uint64_t t0, uint64_t t1)
{
uint64_t ret;
if (t1 == env->lock) {
stq_raw(t1, t0);
ret = 0;
} else
ret = 1;
env->lock = 1;
return ret;
}
| [
"uint64_t FUNC_0(uint64_t t0, uint64_t t1)\n{",
"uint64_t ret;",
"if (t1 == env->lock) {",
"stq_raw(t1, t0);",
"ret = 0;",
"} else",
"ret = 1;",
"env->lock = 1;",
"return ret;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25
],
[
27
]
] |
21,005 | av_cold void ff_pixblockdsp_init(PixblockDSPContext *c, AVCodecContext *avctx)
{
const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8;
c->diff_pixels = diff_pixels_c;
switch (avctx->bits_per_raw_sample) {
case 9:
case 10:
case 12:
case 14:
c->get_pixels = get_... | true | FFmpeg | bc488ec28aec4bc91ba47283c49c9f7f25696eaa | av_cold void ff_pixblockdsp_init(PixblockDSPContext *c, AVCodecContext *avctx)
{
const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8;
c->diff_pixels = diff_pixels_c;
switch (avctx->bits_per_raw_sample) {
case 9:
case 10:
case 12:
case 14:
c->get_pixels = get_... | {
"code": [],
"line_no": []
} | av_cold void FUNC_0(PixblockDSPContext *c, AVCodecContext *avctx)
{
const unsigned VAR_0 = avctx->bits_per_raw_sample > 8;
c->diff_pixels = diff_pixels_c;
switch (avctx->bits_per_raw_sample) {
case 9:
case 10:
case 12:
case 14:
c->get_pixels = get_pixels_16_c;
... | [
"av_cold void FUNC_0(PixblockDSPContext *c, AVCodecContext *avctx)\n{",
"const unsigned VAR_0 = avctx->bits_per_raw_sample > 8;",
"c->diff_pixels = diff_pixels_c;",
"switch (avctx->bits_per_raw_sample) {",
"case 9:\ncase 10:\ncase 12:\ncase 14:\nc->get_pixels = get_pixels_16_c;",
"break;",
"default:\nif... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
10
],
[
14
],
[
16,
18,
20,
22,
24
],
[
26
],
[
28,
30
],
[
32
],
[
34
],
[
36
],
[
38
],
[
42,
44
],
[
46,
48
],
[
50,
52
],
[
54,
56
],
... |
21,010 | static void gen_pusha(DisasContext *s)
{
int i;
gen_op_movl_A0_reg(R_ESP);
gen_op_addl_A0_im(-8 << s->dflag);
if (!s->ss32)
tcg_gen_ext16u_tl(cpu_A0, cpu_A0);
tcg_gen_mov_tl(cpu_T[1], cpu_A0);
if (s->addseg)
gen_op_addl_A0_seg(s, R_SS);
for(i = 0;i < 8; i++) {
... | true | qemu | 712b4243c761cb6ab6a4367a160fd2a42e2d4b76 | static void gen_pusha(DisasContext *s)
{
int i;
gen_op_movl_A0_reg(R_ESP);
gen_op_addl_A0_im(-8 << s->dflag);
if (!s->ss32)
tcg_gen_ext16u_tl(cpu_A0, cpu_A0);
tcg_gen_mov_tl(cpu_T[1], cpu_A0);
if (s->addseg)
gen_op_addl_A0_seg(s, R_SS);
for(i = 0;i < 8; i++) {
... | {
"code": [
" gen_op_addl_A0_im(-8 << s->dflag);"
],
"line_no": [
9
]
} | static void FUNC_0(DisasContext *VAR_0)
{
int VAR_1;
gen_op_movl_A0_reg(R_ESP);
gen_op_addl_A0_im(-8 << VAR_0->dflag);
if (!VAR_0->ss32)
tcg_gen_ext16u_tl(cpu_A0, cpu_A0);
tcg_gen_mov_tl(cpu_T[1], cpu_A0);
if (VAR_0->addseg)
gen_op_addl_A0_seg(VAR_0, R_SS);
for(VAR_... | [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"int VAR_1;",
"gen_op_movl_A0_reg(R_ESP);",
"gen_op_addl_A0_im(-8 << VAR_0->dflag);",
"if (!VAR_0->ss32)\ntcg_gen_ext16u_tl(cpu_A0, cpu_A0);",
"tcg_gen_mov_tl(cpu_T[1], cpu_A0);",
"if (VAR_0->addseg)\ngen_op_addl_A0_seg(VAR_0, R_SS);",
"for(VAR_1 = 0;VAR_1... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
15
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
]
] |
21,011 | static void usbredir_buffered_bulk_packet(void *priv, uint64_t id,
struct usb_redir_buffered_bulk_packet_header *buffered_bulk_packet,
uint8_t *data, int data_len)
{
USBRedirDevice *dev = priv;
uint8_t status, ep = buffered_bulk_packet->endpoint;
void *free_on_destroy;
int i, len;
... | true | qemu | e8ce12d9eaeedeb7f8d9debcd4c9b993903f1abb | static void usbredir_buffered_bulk_packet(void *priv, uint64_t id,
struct usb_redir_buffered_bulk_packet_header *buffered_bulk_packet,
uint8_t *data, int data_len)
{
USBRedirDevice *dev = priv;
uint8_t status, ep = buffered_bulk_packet->endpoint;
void *free_on_destroy;
int i, len;
... | {
"code": [
" bufp_alloc(dev, data + i, len, status, ep, free_on_destroy);"
],
"line_no": [
71
]
} | static void FUNC_0(void *VAR_0, uint64_t VAR_1,
struct usb_redir_buffered_bulk_packet_header *VAR_2,
uint8_t *VAR_3, int VAR_4)
{
USBRedirDevice *dev = VAR_0;
uint8_t status, ep = VAR_2->endpoint;
void *VAR_5;
int VAR_6, VAR_7;
DPRINTF("buffered-bulk-in status %d ep %02X VAR_7 %d V... | [
"static void FUNC_0(void *VAR_0, uint64_t VAR_1,\nstruct usb_redir_buffered_bulk_packet_header *VAR_2,\nuint8_t *VAR_3, int VAR_4)\n{",
"USBRedirDevice *dev = VAR_0;",
"uint8_t status, ep = VAR_2->endpoint;",
"void *VAR_5;",
"int VAR_6, VAR_7;",
"DPRINTF(\"buffered-bulk-in status %d ep %02X VAR_7 %d VAR_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
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
51
],
[
53
],
[... |
21,013 | static int poll_frame(AVFilterLink *link)
{
AVFilterContext *s = link->src;
OverlayContext *over = s->priv;
int ret = avfilter_poll_frame(s->inputs[OVERLAY]);
if (ret == AVERROR_EOF)
ret = !!over->overpicref;
return ret && avfilter_poll_frame(s->inputs[MAIN]);
}
| true | FFmpeg | 06bf6d3bc04979bd39ecdc7311d0daf8aee7e10f | static int poll_frame(AVFilterLink *link)
{
AVFilterContext *s = link->src;
OverlayContext *over = s->priv;
int ret = avfilter_poll_frame(s->inputs[OVERLAY]);
if (ret == AVERROR_EOF)
ret = !!over->overpicref;
return ret && avfilter_poll_frame(s->inputs[MAIN]);
}
| {
"code": [
"static int poll_frame(AVFilterLink *link)",
" AVFilterContext *s = link->src;",
" OverlayContext *over = s->priv;",
" int ret = avfilter_poll_frame(s->inputs[OVERLAY]);",
" if (ret == AVERROR_EOF)",
" ret = !!over->overpicref;",
" return ret && avfilter... | static int FUNC_0(AVFilterLink *VAR_0)
{
AVFilterContext *s = VAR_0->src;
OverlayContext *over = s->priv;
int VAR_1 = avfilter_poll_frame(s->inputs[OVERLAY]);
if (VAR_1 == AVERROR_EOF)
VAR_1 = !!over->overpicref;
return VAR_1 && avfilter_poll_frame(s->inputs[MAIN]);
}
| [
"static int FUNC_0(AVFilterLink *VAR_0)\n{",
"AVFilterContext *s = VAR_0->src;",
"OverlayContext *over = s->priv;",
"int VAR_1 = avfilter_poll_frame(s->inputs[OVERLAY]);",
"if (VAR_1 == AVERROR_EOF)\nVAR_1 = !!over->overpicref;",
"return VAR_1 && avfilter_poll_frame(s->inputs[MAIN]);",
"}"
] | [
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
21
]
] |
21,014 | static void sbr_qmf_synthesis(DSPContext *dsp, FFTContext *mdct,
float *out, float X[2][38][64],
float mdct_buf[2][64],
float *v0, int *v_off, const unsigned int div)
{
int i, n;
const float *sbr_qmf_window = div ? s... | true | FFmpeg | 944f5b2779e4aa63f7624df6cd4de832a53db81b | static void sbr_qmf_synthesis(DSPContext *dsp, FFTContext *mdct,
float *out, float X[2][38][64],
float mdct_buf[2][64],
float *v0, int *v_off, const unsigned int div)
{
int i, n;
const float *sbr_qmf_window = div ? s... | {
"code": [
" if (*v_off == 0) {"
],
"line_no": [
19
]
} | static void FUNC_0(DSPContext *VAR_0, FFTContext *VAR_1,
float *VAR_2, float VAR_3[2][38][64],
float VAR_4[2][64],
float *VAR_5, int *VAR_6, const unsigned int VAR_7)
{
int VAR_8, VAR_9;
const float *VAR_10 = VAR_7 ?... | [
"static void FUNC_0(DSPContext *VAR_0, FFTContext *VAR_1,\nfloat *VAR_2, float VAR_3[2][38][64],\nfloat VAR_4[2][64],\nfloat *VAR_5, int *VAR_6, const unsigned int VAR_7)\n{",
"int VAR_8, VAR_9;",
"const float *VAR_10 = VAR_7 ? sbr_qmf_window_ds : sbr_qmf_window_us;",
"float *VAR_11;",
"for (VAR_8 = 0; VAR_... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
21,015 | void virtio_config_writeb(VirtIODevice *vdev, uint32_t addr, uint32_t data)
{
VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
uint8_t val = data;
if (addr > (vdev->config_len - sizeof(val)))
return;
stb_p(vdev->config + addr, val);
if (k->set_config) {
k->set_conf... | true | qemu | 5f5a1318653c08e435cfa52f60b6a712815b659d | void virtio_config_writeb(VirtIODevice *vdev, uint32_t addr, uint32_t data)
{
VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
uint8_t val = data;
if (addr > (vdev->config_len - sizeof(val)))
return;
stb_p(vdev->config + addr, val);
if (k->set_config) {
k->set_conf... | {
"code": [
" if (addr > (vdev->config_len - sizeof(val)))",
" if (addr > (vdev->config_len - sizeof(val)))",
" if (addr > (vdev->config_len - sizeof(val)))",
" if (addr > (vdev->config_len - sizeof(val)))",
" if (addr > (vdev->config_len - sizeof(val)))",
" if (addr > (vdev-... | void FUNC_0(VirtIODevice *VAR_0, uint32_t VAR_1, uint32_t VAR_2)
{
VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(VAR_0);
uint8_t val = VAR_2;
if (VAR_1 > (VAR_0->config_len - sizeof(val)))
return;
stb_p(VAR_0->config + VAR_1, val);
if (k->set_config) {
k->set_config(VA... | [
"void FUNC_0(VirtIODevice *VAR_0, uint32_t VAR_1, uint32_t VAR_2)\n{",
"VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(VAR_0);",
"uint8_t val = VAR_2;",
"if (VAR_1 > (VAR_0->config_len - sizeof(val)))\nreturn;",
"stb_p(VAR_0->config + VAR_1, val);",
"if (k->set_config) {",
"k->set_config(VAR_0, VAR_0->c... | [
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
21,016 | static int get_qcx(J2kDecoderContext *s, int n, J2kQuantStyle *q)
{
int i, x;
if (s->buf_end - s->buf < 1)
return AVERROR(EINVAL);
x = bytestream_get_byte(&s->buf); // Sqcd
q->nguardbits = x >> 5;
q->quantsty = x & 0x1f;
if (q->quantsty == J2K_QSTY_NONE){
n -= ... | true | FFmpeg | 282bb02839b1ce73963c8e3ee46804f1ade8b12a | static int get_qcx(J2kDecoderContext *s, int n, J2kQuantStyle *q)
{
int i, x;
if (s->buf_end - s->buf < 1)
return AVERROR(EINVAL);
x = bytestream_get_byte(&s->buf);
q->nguardbits = x >> 5;
q->quantsty = x & 0x1f;
if (q->quantsty == J2K_QSTY_NONE){
n -= 3;
... | {
"code": [
" if (s->buf_end - s->buf < n)",
" if (s->buf_end - s->buf < n)"
],
"line_no": [
29,
29
]
} | static int FUNC_0(J2kDecoderContext *VAR_0, int VAR_1, J2kQuantStyle *VAR_2)
{
int VAR_3, VAR_4;
if (VAR_0->buf_end - VAR_0->buf < 1)
return AVERROR(EINVAL);
VAR_4 = bytestream_get_byte(&VAR_0->buf);
VAR_2->nguardbits = VAR_4 >> 5;
VAR_2->quantsty = VAR_4 & 0x1f;
if (V... | [
"static int FUNC_0(J2kDecoderContext *VAR_0, int VAR_1, J2kQuantStyle *VAR_2)\n{",
"int VAR_3, VAR_4;",
"if (VAR_0->buf_end - VAR_0->buf < 1)\nreturn AVERROR(EINVAL);",
"VAR_4 = bytestream_get_byte(&VAR_0->buf);",
"VAR_2->nguardbits = VAR_4 >> 5;",
"VAR_2->quantsty = VAR_4 & 0x1f;",
"if (VAR_2->quantsty... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
15
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
... |
21,017 | static int mov_write_video_tag(ByteIOContext *pb, MOVTrack* track)
{
int pos = url_ftell(pb);
char compressor_name[32];
int tag;
put_be32(pb, 0); /* size */
tag = track->enc->codec_tag;
if (!tag)
tag = codec_get_tag(codec_movvideo_tags, track->enc->codec_id);
// if no mac fc... | true | FFmpeg | 25cf9062babc92b1657bf024f872df4b0ffa66a9 | static int mov_write_video_tag(ByteIOContext *pb, MOVTrack* track)
{
int pos = url_ftell(pb);
char compressor_name[32];
int tag;
put_be32(pb, 0);
tag = track->enc->codec_tag;
if (!tag)
tag = codec_get_tag(codec_movvideo_tags, track->enc->codec_id);
if (!tag)
tag = c... | {
"code": [
" if (track->enc->codec->name)",
" put_byte(pb, FFMAX(strlen(compressor_name),32) );"
],
"line_no": [
77,
81
]
} | static int FUNC_0(ByteIOContext *VAR_0, MOVTrack* VAR_1)
{
int VAR_2 = url_ftell(VAR_0);
char VAR_3[32];
int VAR_4;
put_be32(VAR_0, 0);
VAR_4 = VAR_1->enc->codec_tag;
if (!VAR_4)
VAR_4 = codec_get_tag(codec_movvideo_tags, VAR_1->enc->codec_id);
if (!VAR_4)
VAR_4 = c... | [
"static int FUNC_0(ByteIOContext *VAR_0, MOVTrack* VAR_1)\n{",
"int VAR_2 = url_ftell(VAR_0);",
"char VAR_3[32];",
"int VAR_4;",
"put_be32(VAR_0, 0);",
"VAR_4 = VAR_1->enc->codec_tag;",
"if (!VAR_4)\nVAR_4 = codec_get_tag(codec_movvideo_tags, VAR_1->enc->codec_id);",
"if (!VAR_4)\nVAR_4 = codec_get_ta... | [
0,
0,
0,
0,
0,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19,
21
],
[
25,
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
... |
21,018 | yuv2plane1_16_c_template(const int32_t *src, uint16_t *dest, int dstW,
int big_endian, int output_bits)
{
int i;
int shift = 19 - output_bits;
for (i = 0; i < dstW; i++) {
int val = src[i] + (1 << (shift - 1));
output_pixel(&dest[i], val, 0, uint);
}
}... | true | FFmpeg | b1a4b735f9b03840803413cb725216d15d5213a7 | yuv2plane1_16_c_template(const int32_t *src, uint16_t *dest, int dstW,
int big_endian, int output_bits)
{
int i;
int shift = 19 - output_bits;
for (i = 0; i < dstW; i++) {
int val = src[i] + (1 << (shift - 1));
output_pixel(&dest[i], val, 0, uint);
}
}... | {
"code": [
" int shift = 19 - output_bits;"
],
"line_no": [
9
]
} | FUNC_0(const int32_t *VAR_0, uint16_t *VAR_1, int VAR_2,
int VAR_3, int VAR_4)
{
int VAR_5;
int VAR_6 = 19 - VAR_4;
for (VAR_5 = 0; VAR_5 < VAR_2; VAR_5++) {
int VAR_7 = VAR_0[VAR_5] + (1 << (VAR_6 - 1));
output_pixel(&VAR_1[VAR_5], VAR_7, 0, uint);
}
... | [
"FUNC_0(const int32_t *VAR_0, uint16_t *VAR_1, int VAR_2,\nint VAR_3, int VAR_4)\n{",
"int VAR_5;",
"int VAR_6 = 19 - VAR_4;",
"for (VAR_5 = 0; VAR_5 < VAR_2; VAR_5++) {",
"int VAR_7 = VAR_0[VAR_5] + (1 << (VAR_6 - 1));",
"output_pixel(&VAR_1[VAR_5], VAR_7, 0, uint);",
"}",
"}"
] | [
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
21,019 | void ff_update_duplicate_context(MpegEncContext *dst, MpegEncContext *src)
{
MpegEncContext bak;
int i;
// FIXME copy only needed parts
// START_TIMER
backup_duplicate_context(&bak, dst);
memcpy(dst, src, sizeof(MpegEncContext));
backup_duplicate_context(dst, &bak);
for (i = 0; ... | true | FFmpeg | f1d8763a02b5fce9a7d9789e049d74a45b15e1e8 | void ff_update_duplicate_context(MpegEncContext *dst, MpegEncContext *src)
{
MpegEncContext bak;
int i;
backup_duplicate_context(&bak, dst);
memcpy(dst, src, sizeof(MpegEncContext));
backup_duplicate_context(dst, &bak);
for (i = 0; i < 12; i++) {
dst->pblocks[i] = &ds... | {
"code": [
"void ff_update_duplicate_context(MpegEncContext *dst, MpegEncContext *src)",
" int i;",
" int i;"
],
"line_no": [
1,
7,
7
]
} | void FUNC_0(MpegEncContext *VAR_0, MpegEncContext *VAR_1)
{
MpegEncContext bak;
int VAR_2;
backup_duplicate_context(&bak, VAR_0);
memcpy(VAR_0, VAR_1, sizeof(MpegEncContext));
backup_duplicate_context(VAR_0, &bak);
for (VAR_2 = 0; VAR_2 < 12; VAR_2++) {
VAR_0->pblocks... | [
"void FUNC_0(MpegEncContext *VAR_0, MpegEncContext *VAR_1)\n{",
"MpegEncContext bak;",
"int VAR_2;",
"backup_duplicate_context(&bak, VAR_0);",
"memcpy(VAR_0, VAR_1, sizeof(MpegEncContext));",
"backup_duplicate_context(VAR_0, &bak);",
"for (VAR_2 = 0; VAR_2 < 12; VAR_2++) {",
"VAR_0->pblocks[VAR_2] = &... | [
1,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
29
]
] |
21,021 | static int mpeg_mux_read_header(AVFormatContext *s,
AVFormatParameters *ap)
{
MpegDemuxContext *m;
int size, startcode, c, rate_bound, audio_bound, video_bound, mux_rate, val;
int codec_id, n, i, type;
AVStream *st;
m = av_mallocz(sizeof(MpegDemuxContext));
... | true | FFmpeg | 1cb0edb40b8e94e1a50ad40c40d43e34ed8435fe | static int mpeg_mux_read_header(AVFormatContext *s,
AVFormatParameters *ap)
{
MpegDemuxContext *m;
int size, startcode, c, rate_bound, audio_bound, video_bound, mux_rate, val;
int codec_id, n, i, type;
AVStream *st;
m = av_mallocz(sizeof(MpegDemuxContext));
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0,
AVFormatParameters *VAR_1)
{
MpegDemuxContext *m;
int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;
int VAR_10, VAR_11, VAR_12, VAR_13;
AVStream *st;
m = av_mallocz(sizeof(MpegDemuxContext));
if (!m)
... | [
"static int FUNC_0(AVFormatContext *VAR_0,\nAVFormatParameters *VAR_1)\n{",
"MpegDemuxContext *m;",
"int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;",
"int VAR_10, VAR_11, VAR_12, VAR_13;",
"AVStream *st;",
"m = av_mallocz(sizeof(MpegDemuxContext));",
"if (!m)\nreturn -ENOMEM;",
"VAR_0->pr... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47,
53
],
[
55
... |
21,022 | static bool victim_tlb_hit(CPUArchState *env, size_t mmu_idx, size_t index,
size_t elt_ofs, target_ulong page)
{
size_t vidx;
for (vidx = 0; vidx < CPU_VTLB_SIZE; ++vidx) {
CPUTLBEntry *vtlb = &env->tlb_v_table[mmu_idx][vidx];
target_ulong cmp = *(target_ulong *)... | true | qemu | b0706b716769494f321a0d2bfd9fa9893992f995 | static bool victim_tlb_hit(CPUArchState *env, size_t mmu_idx, size_t index,
size_t elt_ofs, target_ulong page)
{
size_t vidx;
for (vidx = 0; vidx < CPU_VTLB_SIZE; ++vidx) {
CPUTLBEntry *vtlb = &env->tlb_v_table[mmu_idx][vidx];
target_ulong cmp = *(target_ulong *)... | {
"code": [
" tmptlb = *tlb; *tlb = *vtlb; *vtlb = tmptlb;"
],
"line_no": [
29
]
} | static bool FUNC_0(CPUArchState *env, size_t mmu_idx, size_t index,
size_t elt_ofs, target_ulong page)
{
size_t vidx;
for (vidx = 0; vidx < CPU_VTLB_SIZE; ++vidx) {
CPUTLBEntry *vtlb = &env->tlb_v_table[mmu_idx][vidx];
target_ulong cmp = *(target_ulong *)((uintpt... | [
"static bool FUNC_0(CPUArchState *env, size_t mmu_idx, size_t index,\nsize_t elt_ofs, target_ulong page)\n{",
"size_t vidx;",
"for (vidx = 0; vidx < CPU_VTLB_SIZE; ++vidx) {",
"CPUTLBEntry *vtlb = &env->tlb_v_table[mmu_idx][vidx];",
"target_ulong cmp = *(target_ulong *)((uintptr_t)vtlb + elt_ofs);",
"if (... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
21,023 | static inline unsigned in_reg(IVState *s, enum Reg reg)
{
const char *name = reg2str(reg);
QTestState *qtest = global_qtest;
unsigned res;
global_qtest = s->qtest;
res = qpci_io_readl(s->dev, s->reg_base + reg);
g_test_message("*%s -> %x\n", name, res);
global_qtest = qtest;
... | true | qemu | b4ba67d9a702507793c2724e56f98e9b0f7be02b | static inline unsigned in_reg(IVState *s, enum Reg reg)
{
const char *name = reg2str(reg);
QTestState *qtest = global_qtest;
unsigned res;
global_qtest = s->qtest;
res = qpci_io_readl(s->dev, s->reg_base + reg);
g_test_message("*%s -> %x\n", name, res);
global_qtest = qtest;
... | {
"code": [
" res = qpci_io_readl(s->dev, s->reg_base + reg);"
],
"line_no": [
15
]
} | static inline unsigned FUNC_0(IVState *VAR_0, enum Reg VAR_1)
{
const char *VAR_2 = reg2str(VAR_1);
QTestState *qtest = global_qtest;
unsigned VAR_3;
global_qtest = VAR_0->qtest;
VAR_3 = qpci_io_readl(VAR_0->dev, VAR_0->reg_base + VAR_1);
g_test_message("*%VAR_0 -> %x\n", VAR_2, VAR_3);... | [
"static inline unsigned FUNC_0(IVState *VAR_0, enum Reg VAR_1)\n{",
"const char *VAR_2 = reg2str(VAR_1);",
"QTestState *qtest = global_qtest;",
"unsigned VAR_3;",
"global_qtest = VAR_0->qtest;",
"VAR_3 = qpci_io_readl(VAR_0->dev, VAR_0->reg_base + VAR_1);",
"g_test_message(\"*%VAR_0 -> %x\\n\", VAR_2, V... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
]
] |
21,024 | static void fw_cfg_init1(DeviceState *dev)
{
FWCfgState *s = FW_CFG(dev);
MachineState *machine = MACHINE(qdev_get_machine());
uint32_t version = FW_CFG_VERSION;
assert(!object_resolve_path(FW_CFG_PATH, NULL));
object_property_add_child(OBJECT(machine), FW_CFG_NAME, OBJECT(s), NULL);
... | true | qemu | 38f3adc34de83bf75d2023831dc520d32568a2d9 | static void fw_cfg_init1(DeviceState *dev)
{
FWCfgState *s = FW_CFG(dev);
MachineState *machine = MACHINE(qdev_get_machine());
uint32_t version = FW_CFG_VERSION;
assert(!object_resolve_path(FW_CFG_PATH, NULL));
object_property_add_child(OBJECT(machine), FW_CFG_NAME, OBJECT(s), NULL);
... | {
"code": [
"static void fw_cfg_init1(DeviceState *dev)",
" assert(!object_resolve_path(FW_CFG_PATH, NULL));",
" object_property_add_child(OBJECT(machine), FW_CFG_NAME, OBJECT(s), NULL);",
" qdev_init_nofail(dev);"
],
"line_no": [
1,
13,
17,
21
]
} | static void FUNC_0(DeviceState *VAR_0)
{
FWCfgState *s = FW_CFG(VAR_0);
MachineState *machine = MACHINE(qdev_get_machine());
uint32_t version = FW_CFG_VERSION;
assert(!object_resolve_path(FW_CFG_PATH, NULL));
object_property_add_child(OBJECT(machine), FW_CFG_NAME, OBJECT(s), NULL);
... | [
"static void FUNC_0(DeviceState *VAR_0)\n{",
"FWCfgState *s = FW_CFG(VAR_0);",
"MachineState *machine = MACHINE(qdev_get_machine());",
"uint32_t version = FW_CFG_VERSION;",
"assert(!object_resolve_path(FW_CFG_PATH, NULL));",
"object_property_add_child(OBJECT(machine), FW_CFG_NAME, OBJECT(s), NULL);",
"q... | [
1,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
47
],
[
51
],
[
53
],
[
55
... |
21,025 | static void bmdma_map(PCIDevice *pci_dev, int region_num,
pcibus_t addr, pcibus_t size, int type)
{
PCIIDEState *d = DO_UPCAST(PCIIDEState, dev, pci_dev);
int i;
for(i = 0;i < 2; i++) {
BMDMAState *bm = &d->bmdma[i];
d->bus[i].bmdma = bm;
bm->bus = d->bu... | true | qemu | 90228ee395b71cdd64e6bc844e3d553eb9ef643f | static void bmdma_map(PCIDevice *pci_dev, int region_num,
pcibus_t addr, pcibus_t size, int type)
{
PCIIDEState *d = DO_UPCAST(PCIIDEState, dev, pci_dev);
int i;
for(i = 0;i < 2; i++) {
BMDMAState *bm = &d->bmdma[i];
d->bus[i].bmdma = bm;
bm->bus = d->bu... | {
"code": [],
"line_no": []
} | static void FUNC_0(PCIDevice *VAR_0, int VAR_1,
pcibus_t VAR_2, pcibus_t VAR_3, int VAR_4)
{
PCIIDEState *d = DO_UPCAST(PCIIDEState, dev, VAR_0);
int VAR_5;
for(VAR_5 = 0;VAR_5 < 2; VAR_5++) {
BMDMAState *bm = &d->bmdma[VAR_5];
d->bus[VAR_5].bmdma = bm;
... | [
"static void FUNC_0(PCIDevice *VAR_0, int VAR_1,\npcibus_t VAR_2, pcibus_t VAR_3, int VAR_4)\n{",
"PCIIDEState *d = DO_UPCAST(PCIIDEState, dev, VAR_0);",
"int VAR_5;",
"for(VAR_5 = 0;VAR_5 < 2; VAR_5++) {",
"BMDMAState *bm = &d->bmdma[VAR_5];",
"d->bus[VAR_5].bmdma = bm;",
"bm->bus = d->bus+VAR_5;",
"... | [
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
],
[
22
],
[
26
],
[
30
],
[
32
],
[
36
],
[
38
],
[
40
],
[
42
],
[
44
],
[
46
],
[
48
],
[
50
],
[... |
21,027 | static uint32_t softfloat_mul(uint32_t x, uint64_t mantissa)
{
uint64_t l = x * (mantissa & 0xffffffff);
uint64_t h = x * (mantissa >> 32);
h += l >> 32;
l &= 0xffffffff;
l += 1 << av_log2(h >> 21);
h += l >> 32;
return h >> 20;
}
| true | FFmpeg | 948b54763b6c851b2a0bec6702cd9c419065fdb6 | static uint32_t softfloat_mul(uint32_t x, uint64_t mantissa)
{
uint64_t l = x * (mantissa & 0xffffffff);
uint64_t h = x * (mantissa >> 32);
h += l >> 32;
l &= 0xffffffff;
l += 1 << av_log2(h >> 21);
h += l >> 32;
return h >> 20;
}
| {
"code": [
" l += 1 << av_log2(h >> 21);"
],
"line_no": [
13
]
} | static uint32_t FUNC_0(uint32_t x, uint64_t mantissa)
{
uint64_t l = x * (mantissa & 0xffffffff);
uint64_t h = x * (mantissa >> 32);
h += l >> 32;
l &= 0xffffffff;
l += 1 << av_log2(h >> 21);
h += l >> 32;
return h >> 20;
}
| [
"static uint32_t FUNC_0(uint32_t x, uint64_t mantissa)\n{",
"uint64_t l = x * (mantissa & 0xffffffff);",
"uint64_t h = x * (mantissa >> 32);",
"h += l >> 32;",
"l &= 0xffffffff;",
"l += 1 << av_log2(h >> 21);",
"h += l >> 32;",
"return h >> 20;",
"}"
] | [
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
21,028 | static void dv_decode_ac(GetBitContext *gb, BlockInfo *mb, DCTELEM *block)
{
int last_index = gb->size_in_bits;
const uint8_t *scan_table = mb->scan_table;
const uint32_t *factor_table = mb->factor_table;
int pos = mb->pos;
int partial_bit_count = mb->partial_bit_count;
i... | true | FFmpeg | b6ae0866821df5f3b83f6b7f5c281d9a3e36b7ee | static void dv_decode_ac(GetBitContext *gb, BlockInfo *mb, DCTELEM *block)
{
int last_index = gb->size_in_bits;
const uint8_t *scan_table = mb->scan_table;
const uint32_t *factor_table = mb->factor_table;
int pos = mb->pos;
int partial_bit_count = mb->partial_bit_count;
i... | {
"code": [
" re_cache = ((unsigned)re_cache >> partial_bit_count) |",
" (mb->partial_bit_buffer << (sizeof(re_cache) * 8 - partial_bit_count));",
" mb->partial_bit_buffer = NEG_USR32(re_cache, mb->partial_bit_count);"
],
"line_no": [
29,
31,
77
]
} | static void FUNC_0(GetBitContext *VAR_0, BlockInfo *VAR_1, DCTELEM *VAR_2)
{
int VAR_3 = VAR_0->size_in_bits;
const uint8_t *VAR_4 = VAR_1->VAR_4;
const uint32_t *VAR_5 = VAR_1->VAR_5;
int VAR_6 = VAR_1->VAR_6;
int VAR_7 = VAR_1->VAR_7;
int VAR_8, VAR_9, VAR_10, VAR_11;
... | [
"static void FUNC_0(GetBitContext *VAR_0, BlockInfo *VAR_1, DCTELEM *VAR_2)\n{",
"int VAR_3 = VAR_0->size_in_bits;",
"const uint8_t *VAR_4 = VAR_1->VAR_4;",
"const uint32_t *VAR_5 = VAR_1->VAR_5;",
"int VAR_6 = VAR_1->VAR_6;",
"int VAR_7 = VAR_1->VAR_7;",
"int VAR_8, VAR_9, VAR_10, VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
43
],
[
45,
47
],
[
51
],
[
53
],
[
55
... |
21,029 | void spapr_core_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
Error **errp)
{
sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(OBJECT(hotplug_dev));
sPAPRMachineState *spapr = SPAPR_MACHINE(OBJECT(hotplug_dev));
sPAPRCPUCore *core = SPAPR_CPU_CORE(OBJECT(dev));
CPUCore *... | true | qemu | 3c0c47e3464f3c54bd3f1cc6d4da2cbf7465e295 | void spapr_core_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
Error **errp)
{
sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(OBJECT(hotplug_dev));
sPAPRMachineState *spapr = SPAPR_MACHINE(OBJECT(hotplug_dev));
sPAPRCPUCore *core = SPAPR_CPU_CORE(OBJECT(dev));
CPUCore *... | {
"code": [
" g_assert(smc->dr_cpu_enabled);",
" sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(OBJECT(hotplug_dev));",
" g_assert(smc->dr_cpu_enabled);",
" sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(OBJECT(hotplug_dev));"
],
"line_no": [
33,
7,
33,
7
]
} | void FUNC_0(HotplugHandler *VAR_0, DeviceState *VAR_1,
Error **VAR_2)
{
sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(OBJECT(VAR_0));
sPAPRMachineState *spapr = SPAPR_MACHINE(OBJECT(VAR_0));
sPAPRCPUCore *core = SPAPR_CPU_CORE(OBJECT(VAR_1));
CPUCore *cc = CPU_CORE(VAR_1);
... | [
"void FUNC_0(HotplugHandler *VAR_0, DeviceState *VAR_1,\nError **VAR_2)\n{",
"sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(OBJECT(VAR_0));",
"sPAPRMachineState *spapr = SPAPR_MACHINE(OBJECT(VAR_0));",
"sPAPRCPUCore *core = SPAPR_CPU_CORE(OBJECT(VAR_1));",
"CPUCore *cc = CPU_CORE(VAR_1);",
"CPUState *c... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
37
],
[
39
],
[
43
],
[
55
],
[
57
],
[... |
21,031 | static void spatial_compose53i_dy(dwt_compose_t *cs, DWTELEM *buffer, int width, int height, int stride){
int y= cs->y;
DWTELEM *b0= cs->b0;
DWTELEM *b1= cs->b1;
DWTELEM *b2= buffer + mirror(y+1, height-1)*stride;
DWTELEM *b3= buffer + mirror(y+2, height-1)*stride;
{START_TIMER
if(b... | true | FFmpeg | 13705b69ebe9e375fdb52469760a0fbb5f593cc1 | static void spatial_compose53i_dy(dwt_compose_t *cs, DWTELEM *buffer, int width, int height, int stride){
int y= cs->y;
DWTELEM *b0= cs->b0;
DWTELEM *b1= cs->b1;
DWTELEM *b2= buffer + mirror(y+1, height-1)*stride;
DWTELEM *b3= buffer + mirror(y+2, height-1)*stride;
{START_TIMER
if(b... | {
"code": [
" if(y-1 >= 0) horizontal_compose53i(b0, width);",
" if(b1 <= b3) vertical_compose53iL0(b1, b2, b3, width);",
" if(b0 <= b2) vertical_compose53iH0(b0, b1, b2, width);",
" if(y-1 >= 0) horizontal_compose53i(b0, width);",
" if(b0 <= b2) horizontal_compo... | static void FUNC_0(dwt_compose_t *VAR_0, DWTELEM *VAR_1, int VAR_2, int VAR_3, int VAR_4){
int VAR_5= VAR_0->VAR_5;
DWTELEM *b0= VAR_0->b0;
DWTELEM *b1= VAR_0->b1;
DWTELEM *b2= VAR_1 + mirror(VAR_5+1, VAR_3-1)*VAR_4;
DWTELEM *b3= VAR_1 + mirror(VAR_5+2, VAR_3-1)*VAR_4;
{START_TIMER
... | [
"static void FUNC_0(dwt_compose_t *VAR_0, DWTELEM *VAR_1, int VAR_2, int VAR_3, int VAR_4){",
"int VAR_5= VAR_0->VAR_5;",
"DWTELEM *b0= VAR_0->b0;",
"DWTELEM *b1= VAR_0->b1;",
"DWTELEM *b2= VAR_1 + mirror(VAR_5+1, VAR_3-1)*VAR_4;",
"DWTELEM *b3= VAR_1 + mirror(VAR_5+2, VAR_3-1)*VAR_4;",
"{START_TIMER",
... | [
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
21,032 | static int cng_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
AVFrame *frame = data;
CNGContext *p = avctx->priv_data;
int buf_size = avpkt->size;
int ret, i;
int16_t *buf_out;
float e = 1.0;
float scaling;
... | true | FFmpeg | 51090133b31bc719ea868db15d3ee38e9dbe90f1 | static int cng_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
AVFrame *frame = data;
CNGContext *p = avctx->priv_data;
int buf_size = avpkt->size;
int ret, i;
int16_t *buf_out;
float e = 1.0;
float scaling;
... | {
"code": [
" buf_out[i] = p->filter_out[i + p->order];"
],
"line_no": [
105
]
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
AVFrame *frame = VAR_1;
CNGContext *p = VAR_0->priv_data;
int VAR_4 = VAR_3->size;
int VAR_5, VAR_6;
int16_t *buf_out;
float VAR_7 = 1.0;
float VAR_8;
if (VAR_3->... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"AVFrame *frame = VAR_1;",
"CNGContext *p = VAR_0->priv_data;",
"int VAR_4 = VAR_3->size;",
"int VAR_5, VAR_6;",
"int16_t *buf_out;",
"float VAR_7 = 1.0;",
"float VAR_8;",
"if (VAR_3->size) {",
"int VAR_9 = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[... |
21,035 | static av_cold int vdadec_init(AVCodecContext *avctx)
{
VDADecoderContext *ctx = avctx->priv_data;
struct vda_context *vda_ctx = &ctx->vda_ctx;
OSStatus status;
int ret;
ctx->h264_initialized = 0;
/* init pix_fmts of codec */
if (!ff_h264_vda_decoder.pix_fmts) {
if (kCFCoreFoundation... | true | FFmpeg | 344d6db978af251e32b886f4c54e993771004fc0 | static av_cold int vdadec_init(AVCodecContext *avctx)
{
VDADecoderContext *ctx = avctx->priv_data;
struct vda_context *vda_ctx = &ctx->vda_ctx;
OSStatus status;
int ret;
ctx->h264_initialized = 0;
if (!ff_h264_vda_decoder.pix_fmts) {
if (kCFCoreFoundationVersionNumber < kCFCoreFound... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
VDADecoderContext *ctx = avctx->priv_data;
struct vda_context *VAR_0 = &ctx->VAR_0;
OSStatus status;
int VAR_1;
ctx->h264_initialized = 0;
if (!ff_h264_vda_decoder.pix_fmts) {
if (kCFCoreFoundationVersionNumber < kCFCoreFoundationVe... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"VDADecoderContext *ctx = avctx->priv_data;",
"struct vda_context *VAR_0 = &ctx->VAR_0;",
"OSStatus status;",
"int VAR_1;",
"ctx->h264_initialized = 0;",
"if (!ff_h264_vda_decoder.pix_fmts) {",
"if (kCFCoreFoundationVersionNumber < kCFCoreFoundati... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
9
],
[
10,
11
],
[
12,
13
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22
],
[
23,
24
],
[
... |
21,036 | static void inner_add_yblock_bw_16_obmc_32_mmx(const uint8_t *obmc, const long obmc_stride, uint8_t * * block, int b_w, long b_h,
int src_x, int src_y, long src_stride, slice_buffer * sb, int add, uint8_t * dst8){
snow_inner_add_yblock_mmx_header
snow_inner_add_yblock_mmx_start("mm1", "mm5", "3... | true | FFmpeg | 3e0f7126b53b395d9e79df57b2e626eb99ad846b | static void inner_add_yblock_bw_16_obmc_32_mmx(const uint8_t *obmc, const long obmc_stride, uint8_t * * block, int b_w, long b_h,
int src_x, int src_y, long src_stride, slice_buffer * sb, int add, uint8_t * dst8){
snow_inner_add_yblock_mmx_header
snow_inner_add_yblock_mmx_start("mm1", "mm5", "3... | {
"code": [
"snow_inner_add_yblock_mmx_mix(\"32\", \"8\")"
],
"line_no": [
27
]
} | static void FUNC_0(const uint8_t *VAR_0, const long VAR_1, uint8_t * * VAR_2, int VAR_3, long VAR_4,
int VAR_5, int VAR_6, long VAR_7, slice_buffer * VAR_8, int VAR_9, uint8_t * VAR_10){
snow_inner_add_yblock_mmx_header
snow_inner_add_yblock_mmx_start("mm1", "mm5", "3", "0", "0")
snow_inner_ad... | [
"static void FUNC_0(const uint8_t *VAR_0, const long VAR_1, uint8_t * * VAR_2, int VAR_3, long VAR_4,\nint VAR_5, int VAR_6, long VAR_7, slice_buffer * VAR_8, int VAR_9, uint8_t * VAR_10){",
"snow_inner_add_yblock_mmx_header\nsnow_inner_add_yblock_mmx_start(\"mm1\", \"mm5\", \"3\", \"0\", \"0\")\nsnow_inner_add_y... | [
0,
1
] | [
[
1,
3
],
[
5,
7,
9,
11,
13,
15,
19,
21,
23,
25,
27,
29,
31
]
] |
21,038 | static void blend_frames16_c(BLEND_FUNC_PARAMS)
{
int line, pixel;
uint16_t *dstw = (uint16_t *)dst;
uint16_t *src1w = (uint16_t *)src1;
uint16_t *src2w = (uint16_t *)src2;
width /= 2;
src1_linesize /= 2;
src2_linesize /= 2;
dst_linesize /= 2;
for (line = 0; line < height; ... | true | FFmpeg | 2cbe6bac0337939f023bd1c37a9c455e6d535f3a | static void blend_frames16_c(BLEND_FUNC_PARAMS)
{
int line, pixel;
uint16_t *dstw = (uint16_t *)dst;
uint16_t *src1w = (uint16_t *)src1;
uint16_t *src2w = (uint16_t *)src2;
width /= 2;
src1_linesize /= 2;
src2_linesize /= 2;
dst_linesize /= 2;
for (line = 0; line < height; ... | {
"code": [
" dstw[pixel] = ((src1w[pixel] * factor1) + (src2w[pixel] * factor2) + half) >> shift;"
],
"line_no": [
25
]
} | static void FUNC_0(VAR_0)
{
int VAR_1, VAR_2;
uint16_t *dstw = (uint16_t *)dst;
uint16_t *src1w = (uint16_t *)src1;
uint16_t *src2w = (uint16_t *)src2;
width /= 2;
src1_linesize /= 2;
src2_linesize /= 2;
dst_linesize /= 2;
for (VAR_1 = 0; VAR_1 < height; VAR_1++) {
... | [
"static void FUNC_0(VAR_0)\n{",
"int VAR_1, VAR_2;",
"uint16_t *dstw = (uint16_t *)dst;",
"uint16_t *src1w = (uint16_t *)src1;",
"uint16_t *src2w = (uint16_t *)src2;",
"width /= 2;",
"src1_linesize /= 2;",
"src2_linesize /= 2;",
"dst_linesize /= 2;",
"for (VAR_1 = 0; VAR_1 < height; VAR_1++) {",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
]
] |
21,039 | static int cinepak_encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data)
{
CinepakEncContext *s = avctx->priv_data;
AVFrame *frame = data;
int ret;
s->lambda = frame->quality ? frame->quality - 1 : 2 * FF_LAMBDA_SCALE;
frame->key_frame = s->curframe == 0;
f... | true | FFmpeg | 7da9f4523159670d577a2808d4481e64008a8894 | static int cinepak_encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data)
{
CinepakEncContext *s = avctx->priv_data;
AVFrame *frame = data;
int ret;
s->lambda = frame->quality ? frame->quality - 1 : 2 * FF_LAMBDA_SCALE;
frame->key_frame = s->curframe == 0;
f... | {
"code": [
"static int cinepak_encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data)",
" AVFrame *frame = data;",
" frame->key_frame = s->curframe == 0;",
" frame->pict_type = frame->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P;",
" ret = rd_frame(s, f... | static int FUNC_0(AVCodecContext *VAR_0, unsigned char *VAR_1, int VAR_2, void *VAR_3)
{
CinepakEncContext *s = VAR_0->priv_data;
AVFrame *frame = VAR_3;
int VAR_4;
s->lambda = frame->quality ? frame->quality - 1 : 2 * FF_LAMBDA_SCALE;
frame->key_frame = s->curframe == 0;
frame->pict_... | [
"static int FUNC_0(AVCodecContext *VAR_0, unsigned char *VAR_1, int VAR_2, void *VAR_3)\n{",
"CinepakEncContext *s = VAR_0->priv_data;",
"AVFrame *frame = VAR_3;",
"int VAR_4;",
"s->lambda = frame->quality ? frame->quality - 1 : 2 * FF_LAMBDA_SCALE;",
"frame->key_frame = s->curframe == 0;",
"frame->pict... | [
1,
0,
1,
0,
0,
1,
1,
1,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
23
],
[
27
],
[
31,
33
],
[
37
],
[
39
]
] |
21,040 | void qemu_bh_schedule_idle(QEMUBH *bh)
{
if (bh->scheduled)
return;
bh->idle = 1;
/* Make sure that idle & any writes needed by the callback are done
* before the locations are read in the aio_bh_poll.
*/
smp_wmb();
bh->scheduled = 1;
}
| true | qemu | e8d3b1a25f284cdf9705b7cf0412281cc9ee3a36 | void qemu_bh_schedule_idle(QEMUBH *bh)
{
if (bh->scheduled)
return;
bh->idle = 1;
smp_wmb();
bh->scheduled = 1;
}
| {
"code": [
" if (bh->scheduled)",
" smp_wmb();",
" bh->scheduled = 1;",
" if (bh->scheduled)",
" bh->scheduled = 1;"
],
"line_no": [
5,
17,
19,
5,
19
]
} | void FUNC_0(QEMUBH *VAR_0)
{
if (VAR_0->scheduled)
return;
VAR_0->idle = 1;
smp_wmb();
VAR_0->scheduled = 1;
}
| [
"void FUNC_0(QEMUBH *VAR_0)\n{",
"if (VAR_0->scheduled)\nreturn;",
"VAR_0->idle = 1;",
"smp_wmb();",
"VAR_0->scheduled = 1;",
"}"
] | [
0,
1,
0,
1,
1,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
17
],
[
19
],
[
21
]
] |
21,041 | static int mov_read_mdhd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
{
AVStream *st = c->fc->streams[c->fc->nb_streams-1];
MOVStreamContext *sc = st->priv_data;
int version = get_byte(pb);
int lang;
if (version > 1)
return -1; /* unsupported */
get_be24(pb); /* flags */
... | true | FFmpeg | dce25564cc554cc85c8c28928b1b8d3f965c1b16 | static int mov_read_mdhd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
{
AVStream *st = c->fc->streams[c->fc->nb_streams-1];
MOVStreamContext *sc = st->priv_data;
int version = get_byte(pb);
int lang;
if (version > 1)
return -1;
get_be24(pb);
if (version == 1) {
... | {
"code": [
" int lang;"
],
"line_no": [
11
]
} | static int FUNC_0(MOVContext *VAR_0, ByteIOContext *VAR_1, MOVAtom VAR_2)
{
AVStream *st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1];
MOVStreamContext *sc = st->priv_data;
int VAR_3 = get_byte(VAR_1);
int VAR_4;
if (VAR_3 > 1)
return -1;
get_be24(VAR_1);
if (VAR_3 ==... | [
"static int FUNC_0(MOVContext *VAR_0, ByteIOContext *VAR_1, MOVAtom VAR_2)\n{",
"AVStream *st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1];",
"MOVStreamContext *sc = st->priv_data;",
"int VAR_3 = get_byte(VAR_1);",
"int VAR_4;",
"if (VAR_3 > 1)\nreturn -1;",
"get_be24(VAR_1);",
"if (VAR_3 == 1) {",
... | [
0,
0,
0,
0,
1,
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
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[... |
21,042 | void error_set(Error **errp, ErrorClass err_class, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
error_setv(errp, err_class, fmt, ap);
va_end(ap);
}
| true | qemu | 1e9b65bb1bad51735cab6c861c29b592dccabf0e | void error_set(Error **errp, ErrorClass err_class, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
error_setv(errp, err_class, fmt, ap);
va_end(ap);
}
| {
"code": [
"void error_set(Error **errp, ErrorClass err_class, const char *fmt, ...)",
"void error_set(Error **errp, ErrorClass err_class, const char *fmt, ...)",
" error_setv(errp, err_class, fmt, ap);"
],
"line_no": [
1,
1,
11
]
} | void FUNC_0(Error **VAR_0, ErrorClass VAR_1, const char *VAR_2, ...)
{
va_list ap;
va_start(ap, VAR_2);
error_setv(VAR_0, VAR_1, VAR_2, ap);
va_end(ap);
}
| [
"void FUNC_0(Error **VAR_0, ErrorClass VAR_1, const char *VAR_2, ...)\n{",
"va_list ap;",
"va_start(ap, VAR_2);",
"error_setv(VAR_0, VAR_1, VAR_2, ap);",
"va_end(ap);",
"}"
] | [
1,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
21,043 | void aux_init_mmio(AUXSlave *aux_slave, MemoryRegion *mmio)
{
assert(!aux_slave->mmio);
aux_slave->mmio = mmio;
}
| true | qemu | e0dadc1e9ef1f35208e5d2af9c7740c18a0b769f | void aux_init_mmio(AUXSlave *aux_slave, MemoryRegion *mmio)
{
assert(!aux_slave->mmio);
aux_slave->mmio = mmio;
}
| {
"code": [],
"line_no": []
} | void FUNC_0(AUXSlave *VAR_0, MemoryRegion *VAR_1)
{
assert(!VAR_0->VAR_1);
VAR_0->VAR_1 = VAR_1;
}
| [
"void FUNC_0(AUXSlave *VAR_0, MemoryRegion *VAR_1)\n{",
"assert(!VAR_0->VAR_1);",
"VAR_0->VAR_1 = VAR_1;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
21,044 | static void s390_virtio_bridge_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = s390_virtio_bridge_init;
dc->no_user = 1;
}
| true | qemu | efec3dd631d94160288392721a5f9c39e50fb2bc | static void s390_virtio_bridge_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = s390_virtio_bridge_init;
dc->no_user = 1;
}
| {
"code": [
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;"... | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(VAR_0);
k->init = s390_virtio_bridge_init;
dc->no_user = 1;
}
| [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(VAR_0);",
"k->init = s390_virtio_bridge_init;",
"dc->no_user = 1;",
"}"
] | [
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
]
] |
21,046 | static void start_auth_vencrypt_subauth(VncState *vs)
{
switch (vs->subauth) {
case VNC_AUTH_VENCRYPT_TLSNONE:
case VNC_AUTH_VENCRYPT_X509NONE:
VNC_DEBUG("Accept TLS auth none\n");
vnc_write_u32(vs, 0); /* Accept auth completion */
start_client_init(vs);
break;
cas... | true | qemu | 7364dbdabb7824d5bde1e341bb6d928282f01c83 | static void start_auth_vencrypt_subauth(VncState *vs)
{
switch (vs->subauth) {
case VNC_AUTH_VENCRYPT_TLSNONE:
case VNC_AUTH_VENCRYPT_X509NONE:
VNC_DEBUG("Accept TLS auth none\n");
vnc_write_u32(vs, 0);
start_client_init(vs);
break;
case VNC_AUTH_VENCRYPT_TLSVNC:
... | {
"code": [
" VNC_DEBUG(\"Accept TLS auth none\\n\");",
" VNC_DEBUG(\"Start TLS auth VNC\\n\");",
" VNC_DEBUG(\"Start TLS auth SASL\\n\");",
" VNC_DEBUG(\"Reject subauth %d server bug\\n\", vs->auth);"
],
"line_no": [
11,
25,
39,
51
]
} | static void FUNC_0(VncState *VAR_0)
{
switch (VAR_0->subauth) {
case VNC_AUTH_VENCRYPT_TLSNONE:
case VNC_AUTH_VENCRYPT_X509NONE:
VNC_DEBUG("Accept TLS auth none\n");
vnc_write_u32(VAR_0, 0);
start_client_init(VAR_0);
break;
case VNC_AUTH_VENCRYPT_TLSVNC:
case... | [
"static void FUNC_0(VncState *VAR_0)\n{",
"switch (VAR_0->subauth) {",
"case VNC_AUTH_VENCRYPT_TLSNONE:\ncase VNC_AUTH_VENCRYPT_X509NONE:\nVNC_DEBUG(\"Accept TLS auth none\\n\");",
"vnc_write_u32(VAR_0, 0);",
"start_client_init(VAR_0);",
"break;",
"case VNC_AUTH_VENCRYPT_TLSVNC:\ncase VNC_AUTH_VENCRYPT_... | [
0,
0,
1,
0,
0,
0,
1,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
21,
23,
25
],
[
27
],
[
29
],
[
33,
35,
37,
39
],
[
41
],
[
43
],
[
45,
49,
51
],
[
53
],
[
55
],
[... |
21,047 | static void qpeg_decode_intra(const uint8_t *src, uint8_t *dst, int size,
int stride, int width, int height)
{
int i;
int code;
int c0, c1;
int run, copy;
int filled = 0;
int rows_to_go;
rows_to_go = height;
height--;
dst = dst + height * stri... | true | FFmpeg | e7c1e38ba632f7315e332dd350b38f782f428884 | static void qpeg_decode_intra(const uint8_t *src, uint8_t *dst, int size,
int stride, int width, int height)
{
int i;
int code;
int c0, c1;
int run, copy;
int filled = 0;
int rows_to_go;
rows_to_go = height;
height--;
dst = dst + height * stri... | {
"code": [
"static void qpeg_decode_intra(const uint8_t *src, uint8_t *dst, int size,"
],
"line_no": [
1
]
} | static void FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, int VAR_2,
int VAR_3, int VAR_4, int VAR_5)
{
int VAR_6;
int VAR_7;
int VAR_8, VAR_9;
int VAR_10, VAR_11;
int VAR_12 = 0;
int VAR_13;
VAR_13 = VAR_5;
VAR_5--;
VAR_1 = VAR_1 + VAR_5 * VAR... | [
"static void FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, int VAR_2,\nint VAR_3, int VAR_4, int VAR_5)\n{",
"int VAR_6;",
"int VAR_7;",
"int VAR_8, VAR_9;",
"int VAR_10, VAR_11;",
"int VAR_12 = 0;",
"int VAR_13;",
"VAR_13 = VAR_5;",
"VAR_5--;",
"VAR_1 = VAR_1 + VAR_5 * VAR_3;",
"while((VAR_2 > 0... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
21,048 | static void parse_drive(DeviceState *dev, const char *str, void **ptr,
const char *propname, Error **errp)
{
BlockBackend *blk;
blk = blk_by_name(str);
if (!blk) {
error_setg(errp, "Property '%s.%s' can't find value '%s'",
object_get_typename(OBJEC... | true | qemu | 8daea510951dd309a44cea8de415c685c43851cf | static void parse_drive(DeviceState *dev, const char *str, void **ptr,
const char *propname, Error **errp)
{
BlockBackend *blk;
blk = blk_by_name(str);
if (!blk) {
error_setg(errp, "Property '%s.%s' can't find value '%s'",
object_get_typename(OBJEC... | {
"code": [],
"line_no": []
} | static void FUNC_0(DeviceState *VAR_0, const char *VAR_1, void **VAR_2,
const char *VAR_3, Error **VAR_4)
{
BlockBackend *blk;
blk = blk_by_name(VAR_1);
if (!blk) {
error_setg(VAR_4, "Property '%s.%s' can't find value '%s'",
object_get_typename(OBJ... | [
"static void FUNC_0(DeviceState *VAR_0, const char *VAR_1, void **VAR_2,\nconst char *VAR_3, Error **VAR_4)\n{",
"BlockBackend *blk;",
"blk = blk_by_name(VAR_1);",
"if (!blk) {",
"error_setg(VAR_4, \"Property '%s.%s' can't find value '%s'\",\nobject_get_typename(OBJECT(VAR_0)), VAR_3, VAR_1);",
"return;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31,
33,
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[
51... |
21,049 | int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
VP56Context *s = avctx->priv_data;
AVFrame *const p = s->frames[VP56_FRAME_CURRENT];
int remaining_buf_size = avpkt->size;
int av_uninit(al... | true | FFmpeg | 4bed06637729ab000b79250c67d53078300e37c4 | int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
VP56Context *s = avctx->priv_data;
AVFrame *const p = s->frames[VP56_FRAME_CURRENT];
int remaining_buf_size = avpkt->size;
int av_uninit(al... | {
"code": [
" if (ret < 0)"
],
"line_no": [
67
]
} | int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->VAR_1;
VP56Context *s = VAR_0->priv_data;
AVFrame *const p = s->frames[VP56_FRAME_CURRENT];
int VAR_5 = VAR_3->size;
int FUNC_1(alpha_offset);
int VAR_6, V... | [
"int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"VP56Context *s = VAR_0->priv_data;",
"AVFrame *const p = s->frames[VP56_FRAME_CURRENT];",
"int VAR_5 = VAR_3->size;",
"int FUNC_1(alpha_offset);",
"int VAR_6, VAR_7;",
"int VAR_8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
41
],
[
43,
45
],
[
49
],
[
51
... |
21,051 | static int analyze(const uint8_t *buf, int size, int packet_size, int *index)
{
int stat[TS_MAX_PACKET_SIZE];
int i;
int x = 0;
int best_score = 0;
memset(stat, 0, packet_size * sizeof(int));
for (x = i = 0; i < size - 3; i++) {
if (buf[i] == 0x47 && !(buf[i + 1] & 0x80) && (... | true | FFmpeg | 1509c018bd5b054a2354e20021ccbac9c934d213 | static int analyze(const uint8_t *buf, int size, int packet_size, int *index)
{
int stat[TS_MAX_PACKET_SIZE];
int i;
int x = 0;
int best_score = 0;
memset(stat, 0, packet_size * sizeof(int));
for (x = i = 0; i < size - 3; i++) {
if (buf[i] == 0x47 && !(buf[i + 1] & 0x80) && (... | {
"code": [
"static int analyze(const uint8_t *buf, int size, int packet_size, int *index)",
" if (buf[i] == 0x47 && !(buf[i + 1] & 0x80) && (buf[i + 3] & 0x30)) {"
],
"line_no": [
1,
21
]
} | static int FUNC_0(const uint8_t *VAR_0, int VAR_1, int VAR_2, int *VAR_3)
{
int VAR_4[TS_MAX_PACKET_SIZE];
int VAR_5;
int VAR_6 = 0;
int VAR_7 = 0;
memset(VAR_4, 0, VAR_2 * sizeof(int));
for (VAR_6 = VAR_5 = 0; VAR_5 < VAR_1 - 3; VAR_5++) {
if (VAR_0[VAR_5] == 0x47 && !(VAR_0... | [
"static int FUNC_0(const uint8_t *VAR_0, int VAR_1, int VAR_2, int *VAR_3)\n{",
"int VAR_4[TS_MAX_PACKET_SIZE];",
"int VAR_5;",
"int VAR_6 = 0;",
"int VAR_7 = 0;",
"memset(VAR_4, 0, VAR_2 * sizeof(int));",
"for (VAR_6 = VAR_5 = 0; VAR_5 < VAR_1 - 3; VAR_5++) {",
"if (VAR_0[VAR_5] == 0x47 && !(VAR_0[VA... | [
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
39
],
[
41,
43
],
[
45
],
[
49
],
[
51
... |
21,052 | static int coroutine_fn qcow2_co_is_allocated(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int *pnum)
{
BDRVQcowState *s = bs->opaque;
uint64_t cluster_offset;
int ret;
*pnum = nb_sectors;
/* FIXME We can get errors here, but the bdrv_co_is_allocated interface
* c... | true | qemu | d663640c04f2aab810915c556390211d75457704 | static int coroutine_fn qcow2_co_is_allocated(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int *pnum)
{
BDRVQcowState *s = bs->opaque;
uint64_t cluster_offset;
int ret;
*pnum = nb_sectors;
qemu_co_mutex_lock(&s->lock);
ret = qcow2_get_cluster_offset(bs, sec... | {
"code": [
" *pnum = 0;"
],
"line_no": [
29
]
} | static int VAR_0 qcow2_co_is_allocated(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int *pnum)
{
BDRVQcowState *s = bs->opaque;
uint64_t cluster_offset;
int ret;
*pnum = nb_sectors;
qemu_co_mutex_lock(&s->lock);
ret = qcow2_get_cluster_offset(bs, sector_num... | [
"static int VAR_0 qcow2_co_is_allocated(BlockDriverState *bs,\nint64_t sector_num, int nb_sectors, int *pnum)\n{",
"BDRVQcowState *s = bs->opaque;",
"uint64_t cluster_offset;",
"int ret;",
"*pnum = nb_sectors;",
"qemu_co_mutex_lock(&s->lock);",
"ret = qcow2_get_cluster_offset(bs, sector_num << 9, pnum, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
]
] |
21,053 | static void pci_unin_config_writel (void *opaque, target_phys_addr_t addr,
uint32_t val)
{
UNINState *s = opaque;
s->config_reg = val;
}
| true | qemu | 2e29bd04786003561303dcad940b38afe790fb9b | static void pci_unin_config_writel (void *opaque, target_phys_addr_t addr,
uint32_t val)
{
UNINState *s = opaque;
s->config_reg = val;
}
| {
"code": [
" s->config_reg = val;",
" s->config_reg = val;"
],
"line_no": [
11,
11
]
} | static void FUNC_0 (void *VAR_0, target_phys_addr_t VAR_1,
uint32_t VAR_2)
{
UNINState *s = VAR_0;
s->config_reg = VAR_2;
}
| [
"static void FUNC_0 (void *VAR_0, target_phys_addr_t VAR_1,\nuint32_t VAR_2)\n{",
"UNINState *s = VAR_0;",
"s->config_reg = VAR_2;",
"}"
] | [
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
]
] |
21,054 | static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size)
{
AVCodecContext *avctx = s->avctx;
Mpeg1Context *s1 = (Mpeg1Context *) s;
/* start frame decoding */
if (s->first_field || s->picture_structure == PICT_FRAME) {
AVFrameSideData *pan_scan;
if... | true | FFmpeg | f6774f905fb3cfdc319523ac640be30b14c1bc55 | static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size)
{
AVCodecContext *avctx = s->avctx;
Mpeg1Context *s1 = (Mpeg1Context *) s;
if (s->first_field || s->picture_structure == PICT_FRAME) {
AVFrameSideData *pan_scan;
if (ff_MPV_frame_start(s, av... | {
"code": [
" s->current_picture_ptr->f.repeat_pict = 0;",
" s->current_picture_ptr->f.repeat_pict = 4;",
" s->current_picture_ptr->f.repeat_pict = 2;",
" s->current_picture_ptr->f.repeat_pict = 1;",
" pan_scan = av_frame_new_side_... | static int FUNC_0(MpegEncContext *VAR_0, const uint8_t *VAR_1, int VAR_2)
{
AVCodecContext *avctx = VAR_0->avctx;
Mpeg1Context *s1 = (Mpeg1Context *) VAR_0;
if (VAR_0->first_field || VAR_0->picture_structure == PICT_FRAME) {
AVFrameSideData *pan_scan;
if (ff_MPV_frame_st... | [
"static int FUNC_0(MpegEncContext *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{",
"AVCodecContext *avctx = VAR_0->avctx;",
"Mpeg1Context *s1 = (Mpeg1Context *) VAR_0;",
"if (VAR_0->first_field || VAR_0->picture_structure == PICT_FRAME) {",
"AVFrameSideData *pan_scan;",
"if (ff_MPV_frame_start(VAR_0, av... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
1,
0,
1,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0,
1,
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
15
],
[
19,
21
],
[
25
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55,
57,
59
],
... |
21,055 | static int rm_assemble_video_frame(AVFormatContext *s, ByteIOContext *pb,
RMDemuxContext *rm, RMStream *vst,
AVPacket *pkt, int len)
{
int hdr, seq, pic_num, len2, pos;
int type;
hdr = get_byte(pb); len--;
type = hdr >> 6;
... | true | FFmpeg | ce0453aac99c826ba0093f701e4dea67718ce457 | static int rm_assemble_video_frame(AVFormatContext *s, ByteIOContext *pb,
RMDemuxContext *rm, RMStream *vst,
AVPacket *pkt, int len)
{
int hdr, seq, pic_num, len2, pos;
int type;
hdr = get_byte(pb); len--;
type = hdr >> 6;
... | {
"code": [
" pkt->size += 8*(vst->cur_slice - vst->slices);"
],
"line_no": [
141
]
} | static int FUNC_0(AVFormatContext *VAR_0, ByteIOContext *VAR_1,
RMDemuxContext *VAR_2, RMStream *VAR_3,
AVPacket *VAR_4, int VAR_5)
{
int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;
int VAR_11;
VAR_6 = get_byte(VAR_1); VAR_5--;
VAR_1... | [
"static int FUNC_0(AVFormatContext *VAR_0, ByteIOContext *VAR_1,\nRMDemuxContext *VAR_2, RMStream *VAR_3,\nAVPacket *VAR_4, int VAR_5)\n{",
"int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;",
"int VAR_11;",
"VAR_6 = get_byte(VAR_1); VAR_5--;",
"VAR_11 = VAR_6 >> 6;",
"if(VAR_11 != 3){",
"VAR_7 = get_byte(VAR_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,
1,
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,... |
21,056 | static ExitStatus gen_call_pal(DisasContext *ctx, int palcode)
{
/* We're emulating OSF/1 PALcode. Many of these are trivial access
to internal cpu registers. */
/* Unprivileged PAL call */
if (palcode >= 0x80 && palcode < 0xC0) {
switch (palcode) {
case 0x86:
... | true | qemu | 06ef8604e92964cbf30084b7d31091aa7cbbb62f | static ExitStatus gen_call_pal(DisasContext *ctx, int palcode)
{
if (palcode >= 0x80 && palcode < 0xC0) {
switch (palcode) {
case 0x86:
break;
case 0x9E:
tcg_gen_mov_i64(cpu_ir[IR_V0], cpu_unique);
... | {
"code": [
"#ifndef CONFIG_USER_ONLY",
"#endif",
"#ifndef CONFIG_USER_ONLY",
"#endif",
" tcg_gen_mov_i64(cpu_ir[IR_V0], cpu_unique);",
" tcg_gen_mov_i64(cpu_unique, cpu_ir[IR_A0]);",
" tcg_gen_st_i64(cpu_ir[IR_A0], cpu_env, offsetof(CPUAlphaState, vptptr))... | static ExitStatus FUNC_0(DisasContext *ctx, int palcode)
{
if (palcode >= 0x80 && palcode < 0xC0) {
switch (palcode) {
case 0x86:
break;
case 0x9E:
tcg_gen_mov_i64(cpu_ir[IR_V0], cpu_unique);
... | [
"static ExitStatus FUNC_0(DisasContext *ctx, int palcode)\n{",
"if (palcode >= 0x80 && palcode < 0xC0) {",
"switch (palcode) {",
"case 0x86:\nbreak;",
"case 0x9E:\ntcg_gen_mov_i64(cpu_ir[IR_V0], cpu_unique);",
"break;",
"case 0x9F:\ntcg_gen_mov_i64(cpu_unique, cpu_ir[IR_A0]);",
"break;",
"default:\n... | [
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
1,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
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
],
[
13
],
[
15
],
[
17,
23
],
[
25,
29
],
[
31
],
[
33,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55,
59
],
[
61
],
[
63,
69
],
[
... |
21,057 | void virtio_blk_data_plane_destroy(VirtIOBlockDataPlane *s)
{
if (!s) {
return;
}
virtio_blk_data_plane_stop(s);
blk_op_unblock_all(s->conf->conf.blk, s->blocker);
error_free(s->blocker);
object_unref(OBJECT(s->iothread));
qemu_bh_delete(s->bh);
g_free(s);
}
| true | qemu | fed105e2756dde98efa5e80baca02ae516dd1e51 | void virtio_blk_data_plane_destroy(VirtIOBlockDataPlane *s)
{
if (!s) {
return;
}
virtio_blk_data_plane_stop(s);
blk_op_unblock_all(s->conf->conf.blk, s->blocker);
error_free(s->blocker);
object_unref(OBJECT(s->iothread));
qemu_bh_delete(s->bh);
g_free(s);
}
| {
"code": [
" object_unref(OBJECT(s->iothread));"
],
"line_no": [
19
]
} | void FUNC_0(VirtIOBlockDataPlane *VAR_0)
{
if (!VAR_0) {
return;
}
virtio_blk_data_plane_stop(VAR_0);
blk_op_unblock_all(VAR_0->conf->conf.blk, VAR_0->blocker);
error_free(VAR_0->blocker);
object_unref(OBJECT(VAR_0->iothread));
qemu_bh_delete(VAR_0->bh);
g_free(VAR_0)... | [
"void FUNC_0(VirtIOBlockDataPlane *VAR_0)\n{",
"if (!VAR_0) {",
"return;",
"}",
"virtio_blk_data_plane_stop(VAR_0);",
"blk_op_unblock_all(VAR_0->conf->conf.blk, VAR_0->blocker);",
"error_free(VAR_0->blocker);",
"object_unref(OBJECT(VAR_0->iothread));",
"qemu_bh_delete(VAR_0->bh);",
"g_free(VAR_0);... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
21,058 | static void uhci_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
UHCIPCIDeviceClass *u = container_of(k, UHCIPCIDeviceClass, parent_class);
UHCIInfo *info = data;
k->init = info->initfn ? info->initfn : usb_uhci... | true | qemu | 6c2d1c32d084320081b0cd047f8cacd6e722d03a | static void uhci_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
UHCIPCIDeviceClass *u = container_of(k, UHCIPCIDeviceClass, parent_class);
UHCIInfo *info = data;
k->init = info->initfn ? info->initfn : usb_uhci... | {
"code": [],
"line_no": []
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
PCIDeviceClass *k = PCI_DEVICE_CLASS(VAR_0);
UHCIPCIDeviceClass *u = container_of(k, UHCIPCIDeviceClass, parent_class);
UHCIInfo *info = VAR_1;
k->init = info->initfn ? info->initfn : usb_uhci_common... | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"PCIDeviceClass *k = PCI_DEVICE_CLASS(VAR_0);",
"UHCIPCIDeviceClass *u = container_of(k, UHCIPCIDeviceClass, parent_class);",
"UHCIInfo *info = VAR_1;",
"k->init = info->initfn ? info->initfn : usb_uhci_com... | [
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
],
[
28
],
[
30
],
[
32
],
[
34
]
] |
21,060 | static int openfile(char *name, int flags, bool writethrough, bool force_share,
QDict *opts)
{
Error *local_err = NULL;
BlockDriverState *bs;
if (qemuio_blk) {
error_report("file open already, try 'help close'");
QDECREF(opts);
return 1;
}
if... | true | qemu | 788cf9f8c8cbda53843e060540f3e91a060eb744 | static int openfile(char *name, int flags, bool writethrough, bool force_share,
QDict *opts)
{
Error *local_err = NULL;
BlockDriverState *bs;
if (qemuio_blk) {
error_report("file open already, try 'help close'");
QDECREF(opts);
return 1;
}
if... | {
"code": [
" Error *local_err = NULL;",
" return 0;",
" BlockDriverState *bs;",
" if (qemu_read_password(password, sizeof(password)) < 0) {",
" error_report(\"No password given\");",
" if (bdrv_set_key(bs, password) < 0) {",
" error_report(\"in... | static int FUNC_0(char *VAR_0, int VAR_1, bool VAR_2, bool VAR_3,
QDict *VAR_4)
{
Error *local_err = NULL;
BlockDriverState *bs;
if (qemuio_blk) {
error_report("file open already, try 'help close'");
QDECREF(VAR_4);
return 1;
}
if (VAR_3) {
... | [
"static int FUNC_0(char *VAR_0, int VAR_1, bool VAR_2, bool VAR_3,\nQDict *VAR_4)\n{",
"Error *local_err = NULL;",
"BlockDriverState *bs;",
"if (qemuio_blk) {",
"error_report(\"file open already, try 'help close'\");",
"QDECREF(VAR_4);",
"return 1;",
"}",
"if (VAR_3) {",
"if (!VAR_4) {",
"VAR_4 ... | [
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
0,
0,
0,
0,
1,
1,
1,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
21,062 | static void powerpc_get_compat(Object *obj, Visitor *v, const char *name,
void *opaque, Error **errp)
{
char *value = (char *)"";
Property *prop = opaque;
uint32_t *max_compat = qdev_get_prop_ptr(DEVICE(obj), prop);
switch (*max_compat) {
case CPU_POWERPC_LOGI... | true | qemu | 7843c0d60db694b6d97e14ec5538fb97424016c1 | static void powerpc_get_compat(Object *obj, Visitor *v, const char *name,
void *opaque, Error **errp)
{
char *value = (char *)"";
Property *prop = opaque;
uint32_t *max_compat = qdev_get_prop_ptr(DEVICE(obj), prop);
switch (*max_compat) {
case CPU_POWERPC_LOGI... | {
"code": [
"static void powerpc_get_compat(Object *obj, Visitor *v, const char *name,",
" void *opaque, Error **errp)",
" char *value = (char *)\"\";",
" Property *prop = opaque;",
" uint32_t *max_compat = qdev_get_prop_ptr(DEVICE(obj), prop);",
" swi... | static void FUNC_0(Object *VAR_0, Visitor *VAR_1, const char *VAR_2,
void *VAR_3, Error **VAR_4)
{
char *VAR_5 = (char *)"";
Property *prop = VAR_3;
uint32_t *max_compat = qdev_get_prop_ptr(DEVICE(VAR_0), prop);
switch (*max_compat) {
case CPU_POWERPC_LOGICAL_... | [
"static void FUNC_0(Object *VAR_0, Visitor *VAR_1, const char *VAR_2,\nvoid *VAR_3, Error **VAR_4)\n{",
"char *VAR_5 = (char *)\"\";",
"Property *prop = VAR_3;",
"uint32_t *max_compat = qdev_get_prop_ptr(DEVICE(VAR_0), prop);",
"switch (*max_compat) {",
"case CPU_POWERPC_LOGICAL_2_05:\nVAR_5 = (char *)\"p... | [
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
0,
1,
1,
1,
0,
0,
1,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
51
... |
21,063 | int cache_insert(PageCache *cache, uint64_t addr, uint8_t *pdata)
{
CacheItem *it = NULL;
g_assert(cache);
g_assert(cache->page_cache);
/* actual update of entry */
it = cache_get_by_addr(cache, addr);
/* allocate page */
if (!it->it_data) {
it->it_data = g_try_mallo... | true | qemu | 6d3cb1f970ee85361618f7ff02869180394e012d | int cache_insert(PageCache *cache, uint64_t addr, uint8_t *pdata)
{
CacheItem *it = NULL;
g_assert(cache);
g_assert(cache->page_cache);
it = cache_get_by_addr(cache, addr);
if (!it->it_data) {
it->it_data = g_try_malloc(cache->page_size);
if (!it->it_data)... | {
"code": [
"int cache_insert(PageCache *cache, uint64_t addr, uint8_t *pdata)"
],
"line_no": [
1
]
} | int FUNC_0(PageCache *VAR_0, uint64_t VAR_1, uint8_t *VAR_2)
{
CacheItem *it = NULL;
g_assert(VAR_0);
g_assert(VAR_0->page_cache);
it = cache_get_by_addr(VAR_0, VAR_1);
if (!it->it_data) {
it->it_data = g_try_malloc(VAR_0->page_size);
if (!it->it_data) {
... | [
"int FUNC_0(PageCache *VAR_0, uint64_t VAR_1, uint8_t *VAR_2)\n{",
"CacheItem *it = NULL;",
"g_assert(VAR_0);",
"g_assert(VAR_0->page_cache);",
"it = cache_get_by_addr(VAR_0, VAR_1);",
"if (!it->it_data) {",
"it->it_data = g_try_malloc(VAR_0->page_size);",
"if (!it->it_data) {",
"DPRINTF(\"Error all... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
11
],
[
13
],
[
19
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49
],
[
53
],
[
55
]
] |
21,064 | int ff_alloc_picture(MpegEncContext *s, Picture *pic, int shared){
const int big_mb_num= s->mb_stride*(s->mb_height+1) + 1; //the +1 is needed so memset(,,stride*height) does not sig11
const int mb_array_size= s->mb_stride*s->mb_height;
const int b8_array_size= s->b8_stride*s->mb_height*2;
const int... | true | FFmpeg | 5029a406334ad0eaf92130e23d596e405a8a5aa0 | int ff_alloc_picture(MpegEncContext *s, Picture *pic, int shared){
const int big_mb_num= s->mb_stride*(s->mb_height+1) + 1;
const int mb_array_size= s->mb_stride*s->mb_height;
const int b8_array_size= s->b8_stride*s->mb_height*2;
const int b4_array_size= s->b4_stride*s->mb_height*4;
int i;
... | {
"code": [
" FF_ALLOCZ_OR_GOTO(s->avctx, pic->qscale_table , mb_array_size * sizeof(uint8_t) , fail)"
],
"line_no": [
61
]
} | int FUNC_0(MpegEncContext *VAR_0, Picture *VAR_1, int VAR_2){
const int VAR_3= VAR_0->mb_stride*(VAR_0->mb_height+1) + 1;
const int VAR_4= VAR_0->mb_stride*VAR_0->mb_height;
const int VAR_5= VAR_0->b8_stride*VAR_0->mb_height*2;
const int VAR_6= VAR_0->b4_stride*VAR_0->mb_height*4;
int VAR_7;
... | [
"int FUNC_0(MpegEncContext *VAR_0, Picture *VAR_1, int VAR_2){",
"const int VAR_3= VAR_0->mb_stride*(VAR_0->mb_height+1) + 1;",
"const int VAR_4= VAR_0->mb_stride*VAR_0->mb_height;",
"const int VAR_5= VAR_0->b8_stride*VAR_0->mb_height*2;",
"const int VAR_6= VAR_0->b4_stride*VAR_0->mb_height*4;",
"int VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31,
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49,... |
21,065 | static int raw_open_common(BlockDriverState *bs, QDict *options,
int bdrv_flags, int open_flags, Error **errp)
{
BDRVRawState *s = bs->opaque;
QemuOpts *opts;
Error *local_err = NULL;
const char *filename = NULL;
BlockdevAioOptions aio, aio_default;
int fd, ret... | true | qemu | 2b218f5dbcca5fe728b1852d161d7a21fd02b2f5 | static int raw_open_common(BlockDriverState *bs, QDict *options,
int bdrv_flags, int open_flags, Error **errp)
{
BDRVRawState *s = bs->opaque;
QemuOpts *opts;
Error *local_err = NULL;
const char *filename = NULL;
BlockdevAioOptions aio, aio_default;
int fd, ret... | {
"code": [
"#ifndef F_OFD_SETLK",
" fprintf(stderr,",
" \"File lock requested but OFD locking syscall is unavailable, \"",
" \"falling back to POSIX file locks.\\n\"",
" \"Due to the implementation, locks can be lost unexpectedly.\\n\");",
"... | static int FUNC_0(BlockDriverState *VAR_0, QDict *VAR_1,
int VAR_2, int VAR_3, Error **VAR_4)
{
BDRVRawState *s = VAR_0->opaque;
QemuOpts *opts;
Error *local_err = NULL;
const char *VAR_5 = NULL;
BlockdevAioOptions aio, aio_default;
int VAR_6, VAR_7;
struc... | [
"static int FUNC_0(BlockDriverState *VAR_0, QDict *VAR_1,\nint VAR_2, int VAR_3, Error **VAR_4)\n{",
"BDRVRawState *s = VAR_0->opaque;",
"QemuOpts *opts;",
"Error *local_err = NULL;",
"const char *VAR_5 = NULL;",
"BlockdevAioOptions aio, aio_default;",
"int VAR_6, VAR_7;",
"struct stat VAR_8;",
"OnO... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
45
],
[
47
],
[... |
21,066 | int ff_pre_estimate_p_frame_motion(MpegEncContext * s,
int mb_x, int mb_y)
{
int mx, my, range, dmin;
int xmin, ymin, xmax, ymax;
int rel_xmin, rel_ymin, rel_xmax, rel_ymax;
int pred_x=0, pred_y=0;
int P[10][2];
const int shift= 1+s->quarter_sample;
... | false | FFmpeg | ebbcdc9ac0ea190748a1605bda86ce84466c8b4e | int ff_pre_estimate_p_frame_motion(MpegEncContext * s,
int mb_x, int mb_y)
{
int mx, my, range, dmin;
int xmin, ymin, xmax, ymax;
int rel_xmin, rel_ymin, rel_xmax, rel_ymax;
int pred_x=0, pred_y=0;
int P[10][2];
const int shift= 1+s->quarter_sample;
... | {
"code": [],
"line_no": []
} | int FUNC_0(MpegEncContext * VAR_0,
int VAR_1, int VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6;
int VAR_7, VAR_8, VAR_9, VAR_10;
int VAR_11, VAR_12, VAR_13, VAR_14;
int VAR_15=0, VAR_16=0;
int VAR_17[10][2];
const int VAR_18= 1+VAR_0->quarter_sample;
u... | [
"int FUNC_0(MpegEncContext * VAR_0,\nint VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6;",
"int VAR_7, VAR_8, VAR_9, VAR_10;",
"int VAR_11, VAR_12, VAR_13, VAR_14;",
"int VAR_15=0, VAR_16=0;",
"int VAR_17[10][2];",
"const int VAR_18= 1+VAR_0->quarter_sample;",
"uint16_t * const mv_penalty= 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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[... |
21,067 | static void RENAME(chrRangeFromJpeg)(int16_t *dst, int width)
{
int i;
for (i = 0; i < width; i++) {
dst[i ] = (dst[i ]*1799 + 4081085)>>11; //1469
dst[i+VOFW] = (dst[i+VOFW]*1799 + 4081085)>>11; //1469
}
}
| false | FFmpeg | d1adad3cca407f493c3637e20ecd4f7124e69212 | static void RENAME(chrRangeFromJpeg)(int16_t *dst, int width)
{
int i;
for (i = 0; i < width; i++) {
dst[i ] = (dst[i ]*1799 + 4081085)>>11;
dst[i+VOFW] = (dst[i+VOFW]*1799 + 4081085)>>11;
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(chrRangeFromJpeg)(int16_t *dst, int width)
{
int VAR_0;
for (VAR_0 = 0; VAR_0 < width; VAR_0++) {
dst[VAR_0 ] = (dst[VAR_0 ]*1799 + 4081085)>>11;
dst[VAR_0+VOFW] = (dst[VAR_0+VOFW]*1799 + 4081085)>>11;
}
}
| [
"static void FUNC_0(chrRangeFromJpeg)(int16_t *dst, int width)\n{",
"int VAR_0;",
"for (VAR_0 = 0; VAR_0 < width; VAR_0++) {",
"dst[VAR_0 ] = (dst[VAR_0 ]*1799 + 4081085)>>11;",
"dst[VAR_0+VOFW] = (dst[VAR_0+VOFW]*1799 + 4081085)>>11;",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
21,069 | int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(format);
const AVComponentDescriptor *c;
unsigned i, nb_planes = 0;
int pixelstep[MAX_PLANES] = { 0 };
if (!desc->name)
return AVERROR(EINVAL);
... | false | FFmpeg | e0db41316a94d85c1d6ab7ebeaf1f4b5e0f3c76a | int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(format);
const AVComponentDescriptor *c;
unsigned i, nb_planes = 0;
int pixelstep[MAX_PLANES] = { 0 };
if (!desc->name)
return AVERROR(EINVAL);
... | {
"code": [],
"line_no": []
} | int FUNC_0(FFDrawContext *VAR_0, enum AVPixelFormat VAR_1, unsigned VAR_2)
{
const AVPixFmtDescriptor *VAR_3 = av_pix_fmt_desc_get(VAR_1);
const AVComponentDescriptor *VAR_4;
unsigned VAR_5, VAR_6 = 0;
int VAR_7[MAX_PLANES] = { 0 };
if (!VAR_3->name)
return AVERROR(EINVAL);
if ... | [
"int FUNC_0(FFDrawContext *VAR_0, enum AVPixelFormat VAR_1, unsigned VAR_2)\n{",
"const AVPixFmtDescriptor *VAR_3 = av_pix_fmt_desc_get(VAR_1);",
"const AVComponentDescriptor *VAR_4;",
"unsigned VAR_5, VAR_6 = 0;",
"int VAR_7[MAX_PLANES] = { 0 };",
"if (!VAR_3->name)\nreturn AVERROR(EINVAL);",
"if (VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
19,
21
],
[
23
],
[
25
],
[
29,
31
],
[
33,
35
],
[
39,
41,
43
],
[
45
],
[
47,
49
],
[
51
],
[
53
],
[... |
21,071 | static int htab_save_complete(QEMUFile *f, void *opaque)
{
sPAPRMachineState *spapr = opaque;
int fd;
/* Iteration header */
qemu_put_be32(f, 0);
if (!spapr->htab) {
int rc;
assert(kvm_enabled());
fd = get_htab_fd(spapr);
if (fd < 0) {
r... | true | qemu | c573fc03da65e35bf44bce0448ea12801e3631ac | static int htab_save_complete(QEMUFile *f, void *opaque)
{
sPAPRMachineState *spapr = opaque;
int fd;
qemu_put_be32(f, 0);
if (!spapr->htab) {
int rc;
assert(kvm_enabled());
fd = get_htab_fd(spapr);
if (fd < 0) {
return fd;
}
... | {
"code": [
" close_htab_fd(spapr);"
],
"line_no": [
45
]
} | static int FUNC_0(QEMUFile *VAR_0, void *VAR_1)
{
sPAPRMachineState *spapr = VAR_1;
int VAR_2;
qemu_put_be32(VAR_0, 0);
if (!spapr->htab) {
int VAR_3;
assert(kvm_enabled());
VAR_2 = get_htab_fd(spapr);
if (VAR_2 < 0) {
return VAR_2;
... | [
"static int FUNC_0(QEMUFile *VAR_0, void *VAR_1)\n{",
"sPAPRMachineState *spapr = VAR_1;",
"int VAR_2;",
"qemu_put_be32(VAR_0, 0);",
"if (!spapr->htab) {",
"int VAR_3;",
"assert(kvm_enabled());",
"VAR_2 = get_htab_fd(spapr);",
"if (VAR_2 < 0) {",
"return VAR_2;",
"}",
"VAR_3 = kvmppc_save_htab... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
17
],
[
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53... |
21,072 | struct pxa2xx_gpio_info_s *pxa2xx_gpio_init(target_phys_addr_t base,
CPUState *env, qemu_irq *pic, int lines)
{
int iomemtype;
struct pxa2xx_gpio_info_s *s;
s = (struct pxa2xx_gpio_info_s *)
qemu_mallocz(sizeof(struct pxa2xx_gpio_info_s));
memset(s, 0, sizeof(struct ... | true | qemu | 187337f8b0ec0813dd3876d1efe37d415fb81c2e | struct pxa2xx_gpio_info_s *pxa2xx_gpio_init(target_phys_addr_t base,
CPUState *env, qemu_irq *pic, int lines)
{
int iomemtype;
struct pxa2xx_gpio_info_s *s;
s = (struct pxa2xx_gpio_info_s *)
qemu_mallocz(sizeof(struct pxa2xx_gpio_info_s));
memset(s, 0, sizeof(struct ... | {
"code": [
" cpu_register_physical_memory(base, 0x00000fff, iomemtype);",
" cpu_register_physical_memory(base, 0x00000fff, iomemtype);",
" cpu_register_physical_memory(base, 0x00000fff, iomemtype);",
" cpu_register_physical_memory(base, 0x00000fff, iomemtype);",
" cpu_register_phys... | struct pxa2xx_gpio_info_s *FUNC_0(target_phys_addr_t VAR_0,
CPUState *VAR_1, qemu_irq *VAR_2, int VAR_3)
{
int VAR_4;
struct pxa2xx_gpio_info_s *VAR_5;
VAR_5 = (struct pxa2xx_gpio_info_s *)
qemu_mallocz(sizeof(struct pxa2xx_gpio_info_s));
memset(VAR_5, 0, sizeof(stru... | [
"struct pxa2xx_gpio_info_s *FUNC_0(target_phys_addr_t VAR_0,\nCPUState *VAR_1, qemu_irq *VAR_2, int VAR_3)\n{",
"int VAR_4;",
"struct pxa2xx_gpio_info_s *VAR_5;",
"VAR_5 = (struct pxa2xx_gpio_info_s *)\nqemu_mallocz(sizeof(struct pxa2xx_gpio_info_s));",
"memset(VAR_5, 0, sizeof(struct pxa2xx_gpio_info_s));"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
33
],
[
37,
39
],
[
43
],
[
45
]
] |
21,073 | AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b)
{
AVFilterFormats *ret;
unsigned i, j, k = 0;
ret = av_mallocz(sizeof(AVFilterFormats));
/* merge list of formats */
ret->formats = av_malloc(sizeof(*ret->formats) * FFMIN(a->format_count,
... | true | FFmpeg | 79a0ec1af4817bb7b989803b9f460d1e4acaf7b7 | AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b)
{
AVFilterFormats *ret;
unsigned i, j, k = 0;
ret = av_mallocz(sizeof(AVFilterFormats));
ret->formats = av_malloc(sizeof(*ret->formats) * FFMIN(a->format_count,
... | {
"code": [],
"line_no": []
} | AVFilterFormats *FUNC_0(AVFilterFormats *a, AVFilterFormats *b)
{
AVFilterFormats *ret;
unsigned VAR_0, VAR_1, VAR_2 = 0;
ret = av_mallocz(sizeof(AVFilterFormats));
ret->formats = av_malloc(sizeof(*ret->formats) * FFMIN(a->format_count,
b->... | [
"AVFilterFormats *FUNC_0(AVFilterFormats *a, AVFilterFormats *b)\n{",
"AVFilterFormats *ret;",
"unsigned VAR_0, VAR_1, VAR_2 = 0;",
"ret = av_mallocz(sizeof(AVFilterFormats));",
"ret->formats = av_malloc(sizeof(*ret->formats) * FFMIN(a->format_count,\nb->format_count));",
"for(VAR_0 = 0; VAR_0 < a->format... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
7,
8
],
[
9
],
[
10
],
[
11,
12
],
[
13
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22
],
[
23
],
[
24
]... |
21,074 | void console_select(unsigned int index)
{
TextConsole *s;
if (index >= MAX_CONSOLES)
return;
if (active_console) {
active_console->g_width = ds_get_width(active_console->ds);
active_console->g_height = ds_get_height(active_console->ds);
}
s = consoles[index];
... | true | qemu | 8bd6b06d7b718b3e595aab279699ef3651ce2e48 | void console_select(unsigned int index)
{
TextConsole *s;
if (index >= MAX_CONSOLES)
return;
if (active_console) {
active_console->g_width = ds_get_width(active_console->ds);
active_console->g_height = ds_get_height(active_console->ds);
}
s = consoles[index];
... | {
"code": [
" if (active_console->cursor_timer) {"
],
"line_no": [
29
]
} | void FUNC_0(unsigned int VAR_0)
{
TextConsole *s;
if (VAR_0 >= MAX_CONSOLES)
return;
if (active_console) {
active_console->g_width = ds_get_width(active_console->ds);
active_console->g_height = ds_get_height(active_console->ds);
}
s = consoles[VAR_0];
if (s) {... | [
"void FUNC_0(unsigned int VAR_0)\n{",
"TextConsole *s;",
"if (VAR_0 >= MAX_CONSOLES)\nreturn;",
"if (active_console) {",
"active_console->g_width = ds_get_width(active_console->ds);",
"active_console->g_height = ds_get_height(active_console->ds);",
"}",
"s = consoles[VAR_0];",
"if (s) {",
"Display... | [
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
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
... |
21,075 | static av_always_inline int simple_limit(uint8_t *p, ptrdiff_t stride, int flim)
{
LOAD_PIXELS
return 2*FFABS(p0-q0) + (FFABS(p1-q1) >> 1) <= flim;
}
| false | FFmpeg | b8664c929437d6d079e16979c496a2db40cf2324 | static av_always_inline int simple_limit(uint8_t *p, ptrdiff_t stride, int flim)
{
LOAD_PIXELS
return 2*FFABS(p0-q0) + (FFABS(p1-q1) >> 1) <= flim;
}
| {
"code": [],
"line_no": []
} | static av_always_inline int FUNC_0(uint8_t *p, ptrdiff_t stride, int flim)
{
LOAD_PIXELS
return 2*FFABS(p0-q0) + (FFABS(p1-q1) >> 1) <= flim;
}
| [
"static av_always_inline int FUNC_0(uint8_t *p, ptrdiff_t stride, int flim)\n{",
"LOAD_PIXELS\nreturn 2*FFABS(p0-q0) + (FFABS(p1-q1) >> 1) <= flim;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
]
] |
21,076 | dshow_read_close(AVFormatContext *s)
{
struct dshow_ctx *ctx = s->priv_data;
AVPacketList *pktl;
if (ctx->control) {
IMediaControl_Stop(ctx->control);
IMediaControl_Release(ctx->control);
}
if (ctx->graph) {
IEnumFilters *fenum;
int r;
r = IGrap... | false | FFmpeg | 190f6135b48a97dadd7586f154640bec6468df1b | dshow_read_close(AVFormatContext *s)
{
struct dshow_ctx *ctx = s->priv_data;
AVPacketList *pktl;
if (ctx->control) {
IMediaControl_Stop(ctx->control);
IMediaControl_Release(ctx->control);
}
if (ctx->graph) {
IEnumFilters *fenum;
int r;
r = IGrap... | {
"code": [],
"line_no": []
} | FUNC_0(AVFormatContext *VAR_0)
{
struct dshow_ctx *VAR_1 = VAR_0->priv_data;
AVPacketList *pktl;
if (VAR_1->control) {
IMediaControl_Stop(VAR_1->control);
IMediaControl_Release(VAR_1->control);
}
if (VAR_1->graph) {
IEnumFilters *fenum;
int VAR_2;
... | [
"FUNC_0(AVFormatContext *VAR_0)\n{",
"struct dshow_ctx *VAR_1 = VAR_0->priv_data;",
"AVPacketList *pktl;",
"if (VAR_1->control) {",
"IMediaControl_Stop(VAR_1->control);",
"IMediaControl_Release(VAR_1->control);",
"}",
"if (VAR_1->graph) {",
"IEnumFilters *fenum;",
"int VAR_2;",
"VAR_2 = IGraphBu... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
43
],
[
45
],
[
47
],
... |
21,077 | static int ftp_conn_control_block_control(void *data)
{
FTPContext *s = data;
return s->conn_control_block_flag;
}
| false | FFmpeg | 247e658784ead984f96021acb9c95052ba599f26 | static int ftp_conn_control_block_control(void *data)
{
FTPContext *s = data;
return s->conn_control_block_flag;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0)
{
FTPContext *s = VAR_0;
return s->conn_control_block_flag;
}
| [
"static int FUNC_0(void *VAR_0)\n{",
"FTPContext *s = VAR_0;",
"return s->conn_control_block_flag;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
21,078 | static int probe_file(const char *filename)
{
AVFormatContext *fmt_ctx;
int ret, i;
if ((ret = open_input_file(&fmt_ctx, filename)))
return ret;
if (do_show_packets)
show_packets(fmt_ctx);
if (do_show_streams)
for (i = 0; i < fmt_ctx->nb_streams; i++)
... | false | FFmpeg | 3a8c95f730732b9f1ffacdbfbf79a01b202a67af | static int probe_file(const char *filename)
{
AVFormatContext *fmt_ctx;
int ret, i;
if ((ret = open_input_file(&fmt_ctx, filename)))
return ret;
if (do_show_packets)
show_packets(fmt_ctx);
if (do_show_streams)
for (i = 0; i < fmt_ctx->nb_streams; i++)
... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0)
{
AVFormatContext *fmt_ctx;
int VAR_1, VAR_2;
if ((VAR_1 = open_input_file(&fmt_ctx, VAR_0)))
return VAR_1;
if (do_show_packets)
show_packets(fmt_ctx);
if (do_show_streams)
for (VAR_2 = 0; VAR_2 < fmt_ctx->nb_streams; VAR_2+... | [
"static int FUNC_0(const char *VAR_0)\n{",
"AVFormatContext *fmt_ctx;",
"int VAR_1, VAR_2;",
"if ((VAR_1 = open_input_file(&fmt_ctx, VAR_0)))\nreturn VAR_1;",
"if (do_show_packets)\nshow_packets(fmt_ctx);",
"if (do_show_streams)\nfor (VAR_2 = 0; VAR_2 < fmt_ctx->nb_streams; VAR_2++)",
"show_stream(fmt_c... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17,
19
],
[
23,
25
],
[
27
],
[
31,
33
],
[
37
],
[
39
],
[
41
]
] |
21,079 | av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
{
MJpegDecodeContext *s = avctx->priv_data;
if (!s->picture_ptr) {
s->picture = av_frame_alloc();
if (!s->picture)
return AVERROR(ENOMEM);
s->picture_ptr = s->picture;
}
s->avctx = avctx;
ff_blo... | true | FFmpeg | 212c6a1d70df011b6f2a2aa02f7677503287bd00 | av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
{
MJpegDecodeContext *s = avctx->priv_data;
if (!s->picture_ptr) {
s->picture = av_frame_alloc();
if (!s->picture)
return AVERROR(ENOMEM);
s->picture_ptr = s->picture;
}
s->avctx = avctx;
ff_blo... | {
"code": [
" build_basic_mjpeg_vlc(s);",
" int ret;",
" init_get_bits(&s->gb, avctx->extradata, avctx->extradata_size * 8);"
],
"line_no": [
51,
57,
61
]
} | av_cold int FUNC_0(AVCodecContext *avctx)
{
MJpegDecodeContext *s = avctx->priv_data;
if (!s->picture_ptr) {
s->picture = av_frame_alloc();
if (!s->picture)
return AVERROR(ENOMEM);
s->picture_ptr = s->picture;
}
s->avctx = avctx;
ff_blockdsp_init(&s-... | [
"av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"MJpegDecodeContext *s = avctx->priv_data;",
"if (!s->picture_ptr) {",
"s->picture = av_frame_alloc();",
"if (!s->picture)\nreturn AVERROR(ENOMEM);",
"s->picture_ptr = s->picture;",
"}",
"s->avctx = avctx;",
"ff_blockdsp_init(&s->bdsp, avctx);",
"ff_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13,
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47... |
21,080 | int bdrv_open(BlockDriverState *bs, const char *filename, int flags,
BlockDriver *drv)
{
int ret;
int probed = 0;
if (flags & BDRV_O_SNAPSHOT) {
BlockDriverState *bs1;
int64_t total_size;
int is_protocol = 0;
BlockDriver *bdrv_qcow2;
QEMUOptionParameter ... | true | qemu | 79368c81bf8cf93864d7afc88b81b05d8f0a2c90 | int bdrv_open(BlockDriverState *bs, const char *filename, int flags,
BlockDriver *drv)
{
int ret;
int probed = 0;
if (flags & BDRV_O_SNAPSHOT) {
BlockDriverState *bs1;
int64_t total_size;
int is_protocol = 0;
BlockDriver *bdrv_qcow2;
QEMUOptionParameter ... | {
"code": [],
"line_no": []
} | int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1, int VAR_2,
BlockDriver *VAR_3)
{
int VAR_4;
int VAR_5 = 0;
if (VAR_2 & BDRV_O_SNAPSHOT) {
BlockDriverState *bs1;
int64_t total_size;
int VAR_6 = 0;
BlockDriver *bdrv_qcow2;
QEMUOptionParameter *optio... | [
"int FUNC_0(BlockDriverState *VAR_0, const char *VAR_1, int VAR_2,\nBlockDriver *VAR_3)\n{",
"int VAR_4;",
"int VAR_5 = 0;",
"if (VAR_2 & BDRV_O_SNAPSHOT) {",
"BlockDriverState *bs1;",
"int64_t total_size;",
"int VAR_6 = 0;",
"BlockDriver *bdrv_qcow2;",
"QEMUOptionParameter *options;",
"char VAR_7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
2,
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],
[
22
],
[
23
],
[
24,
25
],... |
21,081 | static int parse_outputs(const char **buf, AVFilterInOut **curr_inputs,
AVFilterInOut **open_inputs,
AVFilterInOut **open_outputs, AVClass *log_ctx)
{
int ret, pad = 0;
while (**buf == '[') {
char *name = parse_link_name(buf, log_ctx);
A... | true | FFmpeg | 668673f10ce225d26a96f1aeb62066e8c641c85a | static int parse_outputs(const char **buf, AVFilterInOut **curr_inputs,
AVFilterInOut **open_inputs,
AVFilterInOut **open_outputs, AVClass *log_ctx)
{
int ret, pad = 0;
while (**buf == '[') {
char *name = parse_link_name(buf, log_ctx);
A... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char **VAR_0, AVFilterInOut **VAR_1,
AVFilterInOut **VAR_2,
AVFilterInOut **VAR_3, AVClass *VAR_4)
{
int VAR_5, VAR_6 = 0;
while (**VAR_0 == '[') {
char *VAR_7 = parse_link_name(VAR_0, VAR_4);
AVFilterInOut *match... | [
"static int FUNC_0(const char **VAR_0, AVFilterInOut **VAR_1,\nAVFilterInOut **VAR_2,\nAVFilterInOut **VAR_3, AVClass *VAR_4)\n{",
"int VAR_5, VAR_6 = 0;",
"while (**VAR_0 == '[') {",
"char *VAR_7 = parse_link_name(VAR_0, VAR_4);",
"AVFilterInOut *match;",
"AVFilterInOut *input = *VAR_1;",
"*VAR_1 = (*V... | [
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
],
[
29
],
[
33,
40
],
[
44
],
[
46,
48,
50
],
[
52
],
[
54
],
[
56
],
[
58
],
[
60
],
[
64
],
[
66
],
[... |
21,082 | static inline void rgb2rgb_init_c(void)
{
rgb15to16 = rgb15to16_c;
rgb15tobgr24 = rgb15tobgr24_c;
rgb15to32 = rgb15to32_c;
rgb16tobgr24 = rgb16tobgr24_c;
rgb16to32 = rgb16to32_c;
rgb16to15 = rgb16to15_c;
rgb24tobgr16 = rgb24tobgr1... | true | FFmpeg | a37fd7f9578d2dfbe20a109aae91e5f0a4b58874 | static inline void rgb2rgb_init_c(void)
{
rgb15to16 = rgb15to16_c;
rgb15tobgr24 = rgb15tobgr24_c;
rgb15to32 = rgb15to32_c;
rgb16tobgr24 = rgb16tobgr24_c;
rgb16to32 = rgb16to32_c;
rgb16to15 = rgb16to15_c;
rgb24tobgr16 = rgb24tobgr1... | {
"code": [
" rgb24toyv12 = rgb24toyv12_c;"
],
"line_no": [
53
]
} | static inline void FUNC_0(void)
{
rgb15to16 = rgb15to16_c;
rgb15tobgr24 = rgb15tobgr24_c;
rgb15to32 = rgb15to32_c;
rgb16tobgr24 = rgb16tobgr24_c;
rgb16to32 = rgb16to32_c;
rgb16to15 = rgb16to15_c;
rgb24tobgr16 = rgb24tobgr16_c;
... | [
"static inline void FUNC_0(void)\n{",
"rgb15to16 = rgb15to16_c;",
"rgb15tobgr24 = rgb15tobgr24_c;",
"rgb15to32 = rgb15to32_c;",
"rgb16tobgr24 = rgb16tobgr24_c;",
"rgb16to32 = rgb16to32_c;",
"rgb16to15 = rgb16to15_c;",
"rgb24tobgr16 = rgb24tobgr16_c... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
... |
21,083 | static Visitor *visitor_input_test_init_internal(TestInputVisitorData *data,
const char *json_string,
va_list *ap)
{
visitor_input_teardown(data, NULL);
data->obj = qobject_from_jsonv(json_string, ap);
... | true | qemu | cbd8acf38f37544b830086af840bfb1015ce10e0 | static Visitor *visitor_input_test_init_internal(TestInputVisitorData *data,
const char *json_string,
va_list *ap)
{
visitor_input_teardown(data, NULL);
data->obj = qobject_from_jsonv(json_string, ap);
... | {
"code": [
" data->qiv = qobject_input_visitor_new(data->obj);"
],
"line_no": [
19
]
} | static Visitor *FUNC_0(TestInputVisitorData *data,
const char *json_string,
va_list *ap)
{
visitor_input_teardown(data, NULL);
data->obj = qobject_from_jsonv(json_string, ap);
g_assert(data->obj);
... | [
"static Visitor *FUNC_0(TestInputVisitorData *data,\nconst char *json_string,\nva_list *ap)\n{",
"visitor_input_teardown(data, NULL);",
"data->obj = qobject_from_jsonv(json_string, ap);",
"g_assert(data->obj);",
"data->qiv = qobject_input_visitor_new(data->obj);",
"g_assert(data->qiv);",
"return data->q... | [
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
21,084 | static int audio_decode_frame(VideoState *is)
{
int data_size, resampled_data_size;
int64_t dec_channel_layout;
int got_frame = 0;
av_unused double audio_clock0;
int wanted_nb_samples;
AVRational tb;
int ret;
int reconfigure;
if (!is->frame)
if (!(is->frame = av_... | true | FFmpeg | ce928d7d2b3bd68a222cfbc19a44805ac4cdaf14 | static int audio_decode_frame(VideoState *is)
{
int data_size, resampled_data_size;
int64_t dec_channel_layout;
int got_frame = 0;
av_unused double audio_clock0;
int wanted_nb_samples;
AVRational tb;
int ret;
int reconfigure;
if (!is->frame)
if (!(is->frame = av_... | {
"code": [
" swr_init(is->swr_ctx);"
],
"line_no": [
271
]
} | static int FUNC_0(VideoState *VAR_0)
{
int VAR_1, VAR_2;
int64_t dec_channel_layout;
int VAR_3 = 0;
av_unused double audio_clock0;
int VAR_4;
AVRational tb;
int VAR_5;
int VAR_6;
if (!VAR_0->frame)
if (!(VAR_0->frame = av_frame_alloc()))
return AVERR... | [
"static int FUNC_0(VideoState *VAR_0)\n{",
"int VAR_1, VAR_2;",
"int64_t dec_channel_layout;",
"int VAR_3 = 0;",
"av_unused double audio_clock0;",
"int VAR_4;",
"AVRational tb;",
"int VAR_5;",
"int VAR_6;",
"if (!VAR_0->frame)\nif (!(VAR_0->frame = av_frame_alloc()))\nreturn AVERROR(ENOMEM);",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
25,
27
],
[
31
],
[
33,
35
],
[
39,
41
],
[
45,
47
],
[
51
],
[
53
],
[
55
],
[... |
21,085 | static void scsi_do_read(void *opaque, int ret)
{
SCSIDiskReq *r = opaque;
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
uint32_t n;
if (r->req.aiocb != NULL) {
r->req.aiocb = NULL;
bdrv_acct_done(s->qdev.conf.bs, &r->acct);
if (ret < 0) {
if (scsi_handle_rw_... | true | qemu | 31e8fd86f24b4eec8a1708d712bf0532460bb0a5 | static void scsi_do_read(void *opaque, int ret)
{
SCSIDiskReq *r = opaque;
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
uint32_t n;
if (r->req.aiocb != NULL) {
r->req.aiocb = NULL;
bdrv_acct_done(s->qdev.conf.bs, &r->acct);
if (ret < 0) {
if (scsi_handle_rw_... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, int VAR_1)
{
SCSIDiskReq *r = VAR_0;
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
uint32_t n;
if (r->req.aiocb != NULL) {
r->req.aiocb = NULL;
bdrv_acct_done(s->qdev.conf.bs, &r->acct);
if (VAR_1 < 0) {
if (scsi_handle_rw_erro... | [
"static void FUNC_0(void *VAR_0, int VAR_1)\n{",
"SCSIDiskReq *r = VAR_0;",
"SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);",
"uint32_t n;",
"if (r->req.aiocb != NULL) {",
"r->req.aiocb = NULL;",
"bdrv_acct_done(s->qdev.conf.bs, &r->acct);",
"if (VAR_1 < 0) {",
"if (scsi_handle_rw_er... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15,
16
],
[
17
],
[
18
],
[
19
],
[
20,
21
],
[
22,
... |
21,086 | static void coroutine_fn sd_write_done(SheepdogAIOCB *acb)
{
BDRVSheepdogState *s = acb->common.bs->opaque;
struct iovec iov;
AIOReq *aio_req;
uint32_t offset, data_len, mn, mx;
mn = s->min_dirty_data_idx;
mx = s->max_dirty_data_idx;
if (mn <= mx) {
/* we need to update th... | false | qemu | 498f21405a286f718a0767c791b7d2db19f4e5bd | static void coroutine_fn sd_write_done(SheepdogAIOCB *acb)
{
BDRVSheepdogState *s = acb->common.bs->opaque;
struct iovec iov;
AIOReq *aio_req;
uint32_t offset, data_len, mn, mx;
mn = s->min_dirty_data_idx;
mx = s->max_dirty_data_idx;
if (mn <= mx) {
offset = size... | {
"code": [],
"line_no": []
} | static void VAR_0 sd_write_done(SheepdogAIOCB *acb)
{
BDRVSheepdogState *s = acb->common.bs->opaque;
struct iovec iov;
AIOReq *aio_req;
uint32_t offset, data_len, mn, mx;
mn = s->min_dirty_data_idx;
mx = s->max_dirty_data_idx;
if (mn <= mx) {
offset = sizeof(s->i... | [
"static void VAR_0 sd_write_done(SheepdogAIOCB *acb)\n{",
"BDRVSheepdogState *s = acb->common.bs->opaque;",
"struct iovec iov;",
"AIOReq *aio_req;",
"uint32_t offset, data_len, mn, mx;",
"mn = s->min_dirty_data_idx;",
"mx = s->max_dirty_data_idx;",
"if (mn <= mx) {",
"offset = sizeof(s->inode) - siz... | [
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
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
51
],
[
53
... |
21,087 | static int coroutine_fn bdrv_aligned_pwritev(BlockDriverState *bs,
BdrvTrackedRequest *req, int64_t offset, unsigned int bytes,
int64_t align, QEMUIOVector *qiov, int flags)
{
BlockDriver *drv = bs->drv;
bool waited;
int ret;
int64_t start_sector = offset >> BDRV_SECTOR_BITS;
int64... | false | qemu | 85c97ca7a10b93216bc95052e9dabe3a4bb8736a | static int coroutine_fn bdrv_aligned_pwritev(BlockDriverState *bs,
BdrvTrackedRequest *req, int64_t offset, unsigned int bytes,
int64_t align, QEMUIOVector *qiov, int flags)
{
BlockDriver *drv = bs->drv;
bool waited;
int ret;
int64_t start_sector = offset >> BDRV_SECTOR_BITS;
int64... | {
"code": [],
"line_no": []
} | static int VAR_0 bdrv_aligned_pwritev(BlockDriverState *bs,
BdrvTrackedRequest *req, int64_t offset, unsigned int bytes,
int64_t align, QEMUIOVector *qiov, int flags)
{
BlockDriver *drv = bs->drv;
bool waited;
int ret;
int64_t start_sector = offset >> BDRV_SECTOR_BITS;
int64_t end_... | [
"static int VAR_0 bdrv_aligned_pwritev(BlockDriverState *bs,\nBdrvTrackedRequest *req, int64_t offset, unsigned int bytes,\nint64_t align, QEMUIOVector *qiov, int flags)\n{",
"BlockDriver *drv = bs->drv;",
"bool waited;",
"int ret;",
"int64_t start_sector = offset >> BDRV_SECTOR_BITS;",
"int64_t end_secto... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
45
],
[
47
],
[
49
],
[... |
21,088 | static target_ulong get_sigframe(struct target_sigaction *ka,
CPUPPCState *env,
int frame_size)
{
target_ulong oldsp, newsp;
oldsp = env->gpr[1];
if ((ka->sa_flags & TARGET_SA_ONSTACK) &&
(sas_ss_flags(oldsp))) {
o... | false | qemu | 32a2003af9cb0cb11b3992fd3248cb89752c53e9 | static target_ulong get_sigframe(struct target_sigaction *ka,
CPUPPCState *env,
int frame_size)
{
target_ulong oldsp, newsp;
oldsp = env->gpr[1];
if ((ka->sa_flags & TARGET_SA_ONSTACK) &&
(sas_ss_flags(oldsp))) {
o... | {
"code": [],
"line_no": []
} | static target_ulong FUNC_0(struct target_sigaction *ka,
CPUPPCState *env,
int frame_size)
{
target_ulong oldsp, newsp;
oldsp = env->gpr[1];
if ((ka->sa_flags & TARGET_SA_ONSTACK) &&
(sas_ss_flags(oldsp))) {
oldsp =... | [
"static target_ulong FUNC_0(struct target_sigaction *ka,\nCPUPPCState *env,\nint frame_size)\n{",
"target_ulong oldsp, newsp;",
"oldsp = env->gpr[1];",
"if ((ka->sa_flags & TARGET_SA_ONSTACK) &&\n(sas_ss_flags(oldsp))) {",
"oldsp = (target_sigaltstack_used.ss_sp\n+ target_sigaltstack_used.ss_size);",
"}",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
17,
19
],
[
21,
23
],
[
25
],
[
29
],
[
33
],
[
35
]
] |
21,089 | vsprintf_len(string, format, args)
char *string;
const char *format;
va_list args;
{
vsprintf(string, format, args);
return strlen(string);
}
| false | qemu | 9eca6cc64392b4ad8bd8723e840f491fa36524ad | vsprintf_len(string, format, args)
char *string;
const char *format;
va_list args;
{
vsprintf(string, format, args);
return strlen(string);
}
| {
"code": [],
"line_no": []
} | vsprintf_len(string, format, args)
char *string;
const char *format;
va_list args;
{
vsprintf(string, format, args);
return strlen(string);
}
| [
"vsprintf_len(string, format, args)\nchar *string;",
"const char *format;",
"va_list args;",
"{",
"vsprintf(string, format, args);",
"return strlen(string);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
21,090 | void HELPER(idte)(CPUS390XState *env, uint64_t r1, uint64_t r2, uint32_t m4)
{
CPUState *cs = CPU(s390_env_get_cpu(env));
const uintptr_t ra = GETPC();
uint64_t table, entry, raddr;
uint16_t entries, i, index = 0;
if (r2 & 0xff000) {
cpu_restore_state(cs, ra);
program_inter... | false | qemu | 8d2f850a5ab7579a852f23b28273940a47dfd7ff | void HELPER(idte)(CPUS390XState *env, uint64_t r1, uint64_t r2, uint32_t m4)
{
CPUState *cs = CPU(s390_env_get_cpu(env));
const uintptr_t ra = GETPC();
uint64_t table, entry, raddr;
uint16_t entries, i, index = 0;
if (r2 & 0xff000) {
cpu_restore_state(cs, ra);
program_inter... | {
"code": [],
"line_no": []
} | void FUNC_0(idte)(CPUS390XState *env, uint64_t r1, uint64_t r2, uint32_t m4)
{
CPUState *cs = CPU(s390_env_get_cpu(env));
const uintptr_t VAR_0 = GETPC();
uint64_t table, entry, raddr;
uint16_t entries, i, index = 0;
if (r2 & 0xff000) {
cpu_restore_state(cs, VAR_0);
program... | [
"void FUNC_0(idte)(CPUS390XState *env, uint64_t r1, uint64_t r2, uint32_t m4)\n{",
"CPUState *cs = CPU(s390_env_get_cpu(env));",
"const uintptr_t VAR_0 = GETPC();",
"uint64_t table, entry, raddr;",
"uint16_t entries, i, index = 0;",
"if (r2 & 0xff000) {",
"cpu_restore_state(cs, VAR_0);",
"program_inte... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37,
39
],
[
41
],
[
43,
45
],
[
47
],
[
49,
51
],
[... |
21,093 | CharDriverState *qemu_chr_open_opts(QemuOpts *opts,
void (*init)(struct CharDriverState *s))
{
CharDriverState *chr;
int i;
if (qemu_opts_id(opts) == NULL) {
fprintf(stderr, "chardev: no id specified\n");
return NULL;
}
for (i = 0; i <... | false | qemu | 72cf2d4f0e181d0d3a3122e04129c58a95da713e | CharDriverState *qemu_chr_open_opts(QemuOpts *opts,
void (*init)(struct CharDriverState *s))
{
CharDriverState *chr;
int i;
if (qemu_opts_id(opts) == NULL) {
fprintf(stderr, "chardev: no id specified\n");
return NULL;
}
for (i = 0; i <... | {
"code": [],
"line_no": []
} | CharDriverState *FUNC_0(QemuOpts *opts,
void (*init)(struct CharDriverState *s))
{
CharDriverState *chr;
int VAR_0;
if (qemu_opts_id(opts) == NULL) {
fprintf(stderr, "chardev: no id specified\n");
return NULL;
}
for (VAR_0 = 0; VAR_0 <... | [
"CharDriverState *FUNC_0(QemuOpts *opts,\nvoid (*init)(struct CharDriverState *s))\n{",
"CharDriverState *chr;",
"int VAR_0;",
"if (qemu_opts_id(opts) == NULL) {",
"fprintf(stderr, \"chardev: no id specified\\n\");",
"return NULL;",
"}",
"for (VAR_0 = 0; VAR_0 < ARRAY_SIZE(backend_table); 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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47,
49
],
[
51
... |
21,094 | static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size, uint8_t *buf, int buf_size)
{
AC3DecodeContext *ctx = (AC3DecodeContext *)avctx->priv_data;
ac3_audio_block *ab = &ctx->audio_block;
int frame_start;
int i, j, k, l, value;
float tmp_block_first_half[128], tmp_bloc... | false | FFmpeg | 486637af8ef29ec215e0e0b7ecd3b5470f0e04e5 | static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size, uint8_t *buf, int buf_size)
{
AC3DecodeContext *ctx = (AC3DecodeContext *)avctx->priv_data;
ac3_audio_block *ab = &ctx->audio_block;
int frame_start;
int i, j, k, l, value;
float tmp_block_first_half[128], tmp_bloc... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext * VAR_0, void *VAR_1, int *VAR_2, uint8_t *VAR_3, int VAR_4)
{
AC3DecodeContext *ctx = (AC3DecodeContext *)VAR_0->priv_data;
ac3_audio_block *ab = &ctx->audio_block;
int VAR_5;
int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;
float VAR_11[128], VAR_12[128];
int16_t... | [
"static int FUNC_0(AVCodecContext * VAR_0, void *VAR_1, int *VAR_2, uint8_t *VAR_3, int VAR_4)\n{",
"AC3DecodeContext *ctx = (AC3DecodeContext *)VAR_0->priv_data;",
"ac3_audio_block *ab = &ctx->audio_block;",
"int VAR_5;",
"int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;",
"float VAR_11[128], VAR_12[128];",
"in... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
39
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
... |
21,095 | static void ac97_save (QEMUFile *f, void *opaque)
{
size_t i;
uint8_t active[LAST_INDEX];
AC97LinkState *s = opaque;
pci_device_save (s->pci_dev, f);
qemu_put_be32s (f, &s->glob_cnt);
qemu_put_be32s (f, &s->glob_sta);
qemu_put_be32s (f, &s->cas);
for (i = 0; i < ARRAY_SIZE... | false | qemu | 10ee2aaa417d8d8978cdb2bbed55ebb152df5f6b | static void ac97_save (QEMUFile *f, void *opaque)
{
size_t i;
uint8_t active[LAST_INDEX];
AC97LinkState *s = opaque;
pci_device_save (s->pci_dev, f);
qemu_put_be32s (f, &s->glob_cnt);
qemu_put_be32s (f, &s->glob_sta);
qemu_put_be32s (f, &s->cas);
for (i = 0; i < ARRAY_SIZE... | {
"code": [],
"line_no": []
} | static void FUNC_0 (QEMUFile *VAR_0, void *VAR_1)
{
size_t i;
uint8_t active[LAST_INDEX];
AC97LinkState *s = VAR_1;
pci_device_save (s->pci_dev, VAR_0);
qemu_put_be32s (VAR_0, &s->glob_cnt);
qemu_put_be32s (VAR_0, &s->glob_sta);
qemu_put_be32s (VAR_0, &s->cas);
for (i = 0;... | [
"static void FUNC_0 (QEMUFile *VAR_0, void *VAR_1)\n{",
"size_t i;",
"uint8_t active[LAST_INDEX];",
"AC97LinkState *s = VAR_1;",
"pci_device_save (s->pci_dev, VAR_0);",
"qemu_put_be32s (VAR_0, &s->glob_cnt);",
"qemu_put_be32s (VAR_0, &s->glob_sta);",
"qemu_put_be32s (VAR_0, &s->cas);",
"for (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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
21,096 | static void timer_save(QEMUFile *f, void *opaque)
{
if (cpu_ticks_enabled) {
hw_error("cannot save state if virtual timers are running");
}
qemu_put_be64(f, cpu_ticks_offset);
qemu_put_be64(f, ticks_per_sec);
qemu_put_be64(f, cpu_clock_offset);
}
| false | qemu | b03b2e48cb322cb695ff7a6666b25712140ea3c9 | static void timer_save(QEMUFile *f, void *opaque)
{
if (cpu_ticks_enabled) {
hw_error("cannot save state if virtual timers are running");
}
qemu_put_be64(f, cpu_ticks_offset);
qemu_put_be64(f, ticks_per_sec);
qemu_put_be64(f, cpu_clock_offset);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(QEMUFile *VAR_0, void *VAR_1)
{
if (cpu_ticks_enabled) {
hw_error("cannot save state if virtual timers are running");
}
qemu_put_be64(VAR_0, cpu_ticks_offset);
qemu_put_be64(VAR_0, ticks_per_sec);
qemu_put_be64(VAR_0, cpu_clock_offset);
}
| [
"static void FUNC_0(QEMUFile *VAR_0, void *VAR_1)\n{",
"if (cpu_ticks_enabled) {",
"hw_error(\"cannot save state if virtual timers are running\");",
"}",
"qemu_put_be64(VAR_0, cpu_ticks_offset);",
"qemu_put_be64(VAR_0, ticks_per_sec);",
"qemu_put_be64(VAR_0, cpu_clock_offset);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
21,097 | void eth_get_protocols(const uint8_t *headers,
uint32_t hdr_length,
bool *isip4, bool *isip6,
bool *isudp, bool *istcp)
{
int proto;
size_t l2hdr_len = eth_get_l2_hdr_length(headers);
assert(hdr_length >= eth_get_l2_hdr_length(heade... | false | qemu | eb700029c7836798046191d62d595363d92c84d4 | void eth_get_protocols(const uint8_t *headers,
uint32_t hdr_length,
bool *isip4, bool *isip6,
bool *isudp, bool *istcp)
{
int proto;
size_t l2hdr_len = eth_get_l2_hdr_length(headers);
assert(hdr_length >= eth_get_l2_hdr_length(heade... | {
"code": [],
"line_no": []
} | void FUNC_0(const uint8_t *VAR_0,
uint32_t VAR_1,
bool *VAR_2, bool *VAR_3,
bool *VAR_4, bool *VAR_5)
{
int VAR_6;
size_t l2hdr_len = eth_get_l2_hdr_length(VAR_0);
assert(VAR_1 >= eth_get_l2_hdr_length(VAR_0));
*VAR_2 = *VAR_3 ... | [
"void FUNC_0(const uint8_t *VAR_0,\nuint32_t VAR_1,\nbool *VAR_2, bool *VAR_3,\nbool *VAR_4, bool *VAR_5)\n{",
"int VAR_6;",
"size_t l2hdr_len = eth_get_l2_hdr_length(VAR_0);",
"assert(VAR_1 >= eth_get_l2_hdr_length(VAR_0));",
"*VAR_2 = *VAR_3 = *VAR_4 = *VAR_5 = false;",
"VAR_6 = eth_get_l3_proto(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
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
33,
35
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
... |
21,098 | VncInfo *qmp_query_vnc(Error **errp)
{
VncInfo *info = g_malloc0(sizeof(*info));
VncDisplay *vd = vnc_display_find(NULL);
SocketAddressLegacy *addr = NULL;
if (vd == NULL || !vd->nlsock) {
info->enabled = false;
} else {
info->enabled = true;
/* for compatibility... | false | qemu | bd269ebc82fbaa5fe7ce5bc7c1770ac8acecd884 | VncInfo *qmp_query_vnc(Error **errp)
{
VncInfo *info = g_malloc0(sizeof(*info));
VncDisplay *vd = vnc_display_find(NULL);
SocketAddressLegacy *addr = NULL;
if (vd == NULL || !vd->nlsock) {
info->enabled = false;
} else {
info->enabled = true;
info->has_... | {
"code": [],
"line_no": []
} | VncInfo *FUNC_0(Error **errp)
{
VncInfo *info = g_malloc0(sizeof(*info));
VncDisplay *vd = vnc_display_find(NULL);
SocketAddressLegacy *addr = NULL;
if (vd == NULL || !vd->nlsock) {
info->enabled = false;
} else {
info->enabled = true;
info->has_clients... | [
"VncInfo *FUNC_0(Error **errp)\n{",
"VncInfo *info = g_malloc0(sizeof(*info));",
"VncDisplay *vd = vnc_display_find(NULL);",
"SocketAddressLegacy *addr = NULL;",
"if (vd == NULL || !vd->nlsock) {",
"info->enabled = false;",
"} else {",
"info->enabled = true;",
"info->has_clients = true;",
"info->c... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51,
53
],
[... |
21,099 | static void unassigned_mem_write(void *opaque, hwaddr addr,
uint64_t val, unsigned size)
{
#ifdef DEBUG_UNASSIGNED
printf("Unassigned mem write " TARGET_FMT_plx " = 0x%"PRIx64"\n", addr, val);
#endif
#if defined(TARGET_ALPHA) || defined(TARGET_SPARC) || defined(TARGET_MICROBLA... | false | qemu | b018ddf633f77195e9ae859c6d940a334e68879f | static void unassigned_mem_write(void *opaque, hwaddr addr,
uint64_t val, unsigned size)
{
#ifdef DEBUG_UNASSIGNED
printf("Unassigned mem write " TARGET_FMT_plx " = 0x%"PRIx64"\n", addr, val);
#endif
#if defined(TARGET_ALPHA) || defined(TARGET_SPARC) || defined(TARGET_MICROBLA... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
#ifdef DEBUG_UNASSIGNED
printf("Unassigned mem write " TARGET_FMT_plx " = 0x%"PRIx64"\n", VAR_1, VAR_2);
#endif
#if defined(TARGET_ALPHA) || defined(TARGET_SPARC) || defined(TARGET_MICROBLAZE)
... | [
"static void FUNC_0(void *VAR_0, hwaddr VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"#ifdef DEBUG_UNASSIGNED\nprintf(\"Unassigned mem write \" TARGET_FMT_plx \" = 0x%\"PRIx64\"\\n\", VAR_1, VAR_2);",
"#endif\n#if defined(TARGET_ALPHA) || defined(TARGET_SPARC) || defined(TARGET_MICROBLAZE)\ncpu_unassigned_acces... | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7,
9
],
[
11,
13,
15
],
[
17,
19
]
] |
21,101 | static int milkymist_vgafb_init(SysBusDevice *dev)
{
MilkymistVgafbState *s = FROM_SYSBUS(typeof(*s), dev);
memory_region_init_io(&s->regs_region, &vgafb_mmio_ops, s,
"milkymist-vgafb", R_MAX * 4);
sysbus_init_mmio(dev, &s->regs_region);
s->con = graphic_console_init(vgafb_update_d... | false | qemu | 2c62f08ddbf3fa80dc7202eb9a2ea60ae44e2cc5 | static int milkymist_vgafb_init(SysBusDevice *dev)
{
MilkymistVgafbState *s = FROM_SYSBUS(typeof(*s), dev);
memory_region_init_io(&s->regs_region, &vgafb_mmio_ops, s,
"milkymist-vgafb", R_MAX * 4);
sysbus_init_mmio(dev, &s->regs_region);
s->con = graphic_console_init(vgafb_update_d... | {
"code": [],
"line_no": []
} | static int FUNC_0(SysBusDevice *VAR_0)
{
MilkymistVgafbState *s = FROM_SYSBUS(typeof(*s), VAR_0);
memory_region_init_io(&s->regs_region, &vgafb_mmio_ops, s,
"milkymist-vgafb", R_MAX * 4);
sysbus_init_mmio(VAR_0, &s->regs_region);
s->con = graphic_console_init(vgafb_update_display,
... | [
"static int FUNC_0(SysBusDevice *VAR_0)\n{",
"MilkymistVgafbState *s = FROM_SYSBUS(typeof(*s), VAR_0);",
"memory_region_init_io(&s->regs_region, &vgafb_mmio_ops, s,\n\"milkymist-vgafb\", R_MAX * 4);",
"sysbus_init_mmio(VAR_0, &s->regs_region);",
"s->con = graphic_console_init(vgafb_update_display,\nvgafb_in... | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
],
[
17,
19,
21
],
[
25
],
[
27
]
] |
21,103 | static void memory_init(void)
{
qemu_mutex_init(&flat_view_mutex);
}
| false | qemu | 374f2981d1f10bc4307f250f24b2a7ddb9b14be0 | static void memory_init(void)
{
qemu_mutex_init(&flat_view_mutex);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
qemu_mutex_init(&flat_view_mutex);
}
| [
"static void FUNC_0(void)\n{",
"qemu_mutex_init(&flat_view_mutex);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
21,104 | static void tcg_reg_alloc_bb_end(TCGContext *s, TCGRegSet allocated_regs)
{
int i;
for (i = s->nb_globals; i < s->nb_temps; i++) {
TCGTemp *ts = &s->temps[i];
if (ts->temp_local) {
temp_save(s, ts, allocated_regs);
} else {
#ifdef USE_LIVENESS_ANALYSIS
... | false | qemu | eabb7b91b36b202b4dac2df2d59d698e3aff197a | static void tcg_reg_alloc_bb_end(TCGContext *s, TCGRegSet allocated_regs)
{
int i;
for (i = s->nb_globals; i < s->nb_temps; i++) {
TCGTemp *ts = &s->temps[i];
if (ts->temp_local) {
temp_save(s, ts, allocated_regs);
} else {
#ifdef USE_LIVENESS_ANALYSIS
... | {
"code": [],
"line_no": []
} | static void FUNC_0(TCGContext *VAR_0, TCGRegSet VAR_1)
{
int VAR_2;
for (VAR_2 = VAR_0->nb_globals; VAR_2 < VAR_0->nb_temps; VAR_2++) {
TCGTemp *ts = &VAR_0->temps[VAR_2];
if (ts->temp_local) {
temp_save(VAR_0, ts, VAR_1);
} else {
#ifdef USE_LIVENESS_ANALYSIS
... | [
"static void FUNC_0(TCGContext *VAR_0, TCGRegSet VAR_1)\n{",
"int VAR_2;",
"for (VAR_2 = VAR_0->nb_globals; VAR_2 < VAR_0->nb_temps; VAR_2++) {",
"TCGTemp *ts = &VAR_0->temps[VAR_2];",
"if (ts->temp_local) {",
"temp_save(VAR_0, ts, VAR_1);",
"} else {",
"#ifdef USE_LIVENESS_ANALYSIS\nif (!ts->indirect... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19,
23
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
45
],
[
47
]
] |
21,105 | static int bitplane_decoding(uint8_t* plane, int width, int height, VC9Context *v)
{
int imode, x, y, i, code, use_vertical_tile, tile_w, tile_h;
uint8_t invert, *planep = plane;
int stride= width;
invert = get_bits(&v->gb, 1);
imode = get_vlc2(&v->gb, vc9_imode_vlc.table, VC9_IMODE_VLC_BITS... | false | FFmpeg | e5540b3fd30367ce3cc33b2f34a04b660dbc4b38 | static int bitplane_decoding(uint8_t* plane, int width, int height, VC9Context *v)
{
int imode, x, y, i, code, use_vertical_tile, tile_w, tile_h;
uint8_t invert, *planep = plane;
int stride= width;
invert = get_bits(&v->gb, 1);
imode = get_vlc2(&v->gb, vc9_imode_vlc.table, VC9_IMODE_VLC_BITS... | {
"code": [],
"line_no": []
} | static int FUNC_0(uint8_t* VAR_0, int VAR_1, int VAR_2, VC9Context *VAR_3)
{
int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11;
uint8_t invert, *planep = VAR_0;
int VAR_12= VAR_1;
invert = get_bits(&VAR_3->gb, 1);
VAR_4 = get_vlc2(&VAR_3->gb, vc9_imode_vlc.table, VC9_IMODE_VLC_BIT... | [
"static int FUNC_0(uint8_t* VAR_0, int VAR_1, int VAR_2, VC9Context *VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11;",
"uint8_t invert, *planep = VAR_0;",
"int VAR_12= VAR_1;",
"invert = get_bits(&VAR_3->gb, 1);",
"VAR_4 = get_vlc2(&VAR_3->gb, vc9_imode_vlc.table, VC9_IMODE_VLC_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
23,
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,
47,
49
],
[... |
21,107 | static int qpa_init_out (HWVoiceOut *hw, audsettings_t *as)
{
int error;
static pa_sample_spec ss;
audsettings_t obt_as = *as;
PAVoiceOut *pa = (PAVoiceOut *) hw;
ss.format = audfmt_to_pa (as->fmt, as->endianness);
ss.channels = as->nchannels;
ss.rate = as->freq;
obt_as.fmt ... | false | qemu | 1ea879e5580f63414693655fcf0328559cdce138 | static int qpa_init_out (HWVoiceOut *hw, audsettings_t *as)
{
int error;
static pa_sample_spec ss;
audsettings_t obt_as = *as;
PAVoiceOut *pa = (PAVoiceOut *) hw;
ss.format = audfmt_to_pa (as->fmt, as->endianness);
ss.channels = as->nchannels;
ss.rate = as->freq;
obt_as.fmt ... | {
"code": [],
"line_no": []
} | static int FUNC_0 (HWVoiceOut *VAR_0, audsettings_t *VAR_1)
{
int VAR_2;
static pa_sample_spec VAR_3;
audsettings_t obt_as = *VAR_1;
PAVoiceOut *pa = (PAVoiceOut *) VAR_0;
VAR_3.format = audfmt_to_pa (VAR_1->fmt, VAR_1->endianness);
VAR_3.channels = VAR_1->nchannels;
VAR_3.rate = V... | [
"static int FUNC_0 (HWVoiceOut *VAR_0, audsettings_t *VAR_1)\n{",
"int VAR_2;",
"static pa_sample_spec VAR_3;",
"audsettings_t obt_as = *VAR_1;",
"PAVoiceOut *pa = (PAVoiceOut *) VAR_0;",
"VAR_3.format = audfmt_to_pa (VAR_1->fmt, VAR_1->endianness);",
"VAR_3.channels = VAR_1->nchannels;",
"VAR_3.rate ... | [
0,
0,
0,
0,
0,
0,
0,
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
],
[
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[
59
... |
21,108 | static int proxy_name_to_path(FsContext *ctx, V9fsPath *dir_path,
const char *name, V9fsPath *target)
{
if (dir_path) {
v9fs_string_sprintf((V9fsString *)target, "%s/%s",
dir_path->data, name);
} else {
v9fs_string_sprintf((V9fsStr... | false | qemu | 494a8ebe713055d3946183f4b395f85a18b43e9e | static int proxy_name_to_path(FsContext *ctx, V9fsPath *dir_path,
const char *name, V9fsPath *target)
{
if (dir_path) {
v9fs_string_sprintf((V9fsString *)target, "%s/%s",
dir_path->data, name);
} else {
v9fs_string_sprintf((V9fsStr... | {
"code": [],
"line_no": []
} | static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,
const char *VAR_2, V9fsPath *VAR_3)
{
if (VAR_1) {
v9fs_string_sprintf((V9fsString *)VAR_3, "%s/%s",
VAR_1->data, VAR_2);
} else {
v9fs_string_sprintf((V9fsString *)VAR_3, "%s", ... | [
"static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,\nconst char *VAR_2, V9fsPath *VAR_3)\n{",
"if (VAR_1) {",
"v9fs_string_sprintf((V9fsString *)VAR_3, \"%s/%s\",\nVAR_1->data, VAR_2);",
"} else {",
"v9fs_string_sprintf((V9fsString *)VAR_3, \"%s\", VAR_2);",
"}",
"VAR_3->size++;",
"return 0;",
"}"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
]
] |
21,109 | static int v9fs_synth_mknod(FsContext *fs_ctx, V9fsPath *path,
const char *buf, FsCred *credp)
{
errno = EPERM;
return -1;
}
| false | qemu | 364031f17932814484657e5551ba12957d993d7e | static int v9fs_synth_mknod(FsContext *fs_ctx, V9fsPath *path,
const char *buf, FsCred *credp)
{
errno = EPERM;
return -1;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,
const char *VAR_2, FsCred *VAR_3)
{
errno = EPERM;
return -1;
}
| [
"static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,\nconst char *VAR_2, FsCred *VAR_3)\n{",
"errno = EPERM;",
"return -1;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
]
] |
21,111 | static int roq_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *frame, int *got_packet)
{
RoqContext *enc = avctx->priv_data;
int size, ret;
enc->avctx = avctx;
enc->frame_to_enc = frame;
if (frame->quality)
enc->lambda = frame->qual... | false | FFmpeg | 3beb9cbad35218ed1fb3473eeb3cfc97a931bff4 | static int roq_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *frame, int *got_packet)
{
RoqContext *enc = avctx->priv_data;
int size, ret;
enc->avctx = avctx;
enc->frame_to_enc = frame;
if (frame->quality)
enc->lambda = frame->qual... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,
const AVFrame *VAR_2, int *VAR_3)
{
RoqContext *enc = VAR_0->priv_data;
int VAR_4, VAR_5;
enc->VAR_0 = VAR_0;
enc->frame_to_enc = VAR_2;
if (VAR_2->quality)
enc->lambda = VAR_2->quality - 1;
... | [
"static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,\nconst AVFrame *VAR_2, int *VAR_3)\n{",
"RoqContext *enc = VAR_0->priv_data;",
"int VAR_4, VAR_5;",
"enc->VAR_0 = VAR_0;",
"enc->frame_to_enc = VAR_2;",
"if (VAR_2->quality)\nenc->lambda = VAR_2->quality - 1;",
"else\nenc->lambda = 2*ROQ_LAMBDA_... | [
0,
0,
0,
0,
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
],
[
21,
23
],
[
25,
27
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
51,
53
],
[
57
],
[
63,
65
],
[
67
],
[... |
21,112 | static int swf_write_video(AVFormatContext *s,
AVCodecContext *enc, const uint8_t *buf, int size)
{
SWFContext *swf = s->priv_data;
ByteIOContext *pb = &s->pb;
int c = 0;
int outSize = 0;
int outSamples = 0;
/* Flash Player limit */
if ( swf->swf_fr... | false | FFmpeg | d3e18ad02795f9761b7e5a5c018dfef786046acf | static int swf_write_video(AVFormatContext *s,
AVCodecContext *enc, const uint8_t *buf, int size)
{
SWFContext *swf = s->priv_data;
ByteIOContext *pb = &s->pb;
int c = 0;
int outSize = 0;
int outSamples = 0;
if ( swf->swf_frame_number >= 16000 ) {
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0,
AVCodecContext *VAR_1, const uint8_t *VAR_2, int VAR_3)
{
SWFContext *swf = VAR_0->priv_data;
ByteIOContext *pb = &VAR_0->pb;
int VAR_4 = 0;
int VAR_5 = 0;
int VAR_6 = 0;
if ( swf->swf_frame_number >= 16000... | [
"static int FUNC_0(AVFormatContext *VAR_0,\nAVCodecContext *VAR_1, const uint8_t *VAR_2, int VAR_3)\n{",
"SWFContext *swf = VAR_0->priv_data;",
"ByteIOContext *pb = &VAR_0->pb;",
"int VAR_4 = 0;",
"int VAR_5 = 0;",
"int VAR_6 = 0;",
"if ( swf->swf_frame_number >= 16000 ) {",
"return 0;",
"}",
"if ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
21
],
[
23
],
[
25
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
21,113 | static int parse_nal_units(AVCodecParserContext *s, const uint8_t *buf,
int buf_size, AVCodecContext *avctx)
{
HEVCParserContext *ctx = s->priv_data;
int ret, i;
ret = ff_h2645_packet_split(&ctx->pkt, buf, buf_size, avctx, 0, 0,
AV_CODEC_ID_... | false | FFmpeg | cc13bc8c4f0f4afa30d0b94c3f3a369ccd2aaf0b | static int parse_nal_units(AVCodecParserContext *s, const uint8_t *buf,
int buf_size, AVCodecContext *avctx)
{
HEVCParserContext *ctx = s->priv_data;
int ret, i;
ret = ff_h2645_packet_split(&ctx->pkt, buf, buf_size, avctx, 0, 0,
AV_CODEC_ID_... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecParserContext *VAR_0, const uint8_t *VAR_1,
int VAR_2, AVCodecContext *VAR_3)
{
HEVCParserContext *ctx = VAR_0->priv_data;
int VAR_4, VAR_5;
VAR_4 = ff_h2645_packet_split(&ctx->pkt, VAR_1, VAR_2, VAR_3, 0, 0,
AV_CODE... | [
"static int FUNC_0(AVCodecParserContext *VAR_0, const uint8_t *VAR_1,\nint VAR_2, AVCodecContext *VAR_3)\n{",
"HEVCParserContext *ctx = VAR_0->priv_data;",
"int VAR_4, VAR_5;",
"VAR_4 = ff_h2645_packet_split(&ctx->pkt, VAR_1, VAR_2, VAR_3, 0, 0,\nAV_CODEC_ID_HEVC);",
"if (VAR_4 < 0)\nreturn VAR_4;",
"for ... | [
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
],
[
23
],
[
25
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,
61,
63,
65,... |
21,114 | static int get_channel_idx(char **map, int *ch, char delim, int max_ch)
{
char *next = split(*map, delim);
int len;
int n = 0;
if (!next && delim == '-')
return AVERROR(EINVAL);
if (!*map)
return AVERROR(EINVAL);
len = strlen(*map);
sscanf(*map, "%d%n", ch, &n);
... | false | FFmpeg | 9f6431c8f6c4e92e3f6ea2f3bc8f58677a7e7ce3 | static int get_channel_idx(char **map, int *ch, char delim, int max_ch)
{
char *next = split(*map, delim);
int len;
int n = 0;
if (!next && delim == '-')
return AVERROR(EINVAL);
if (!*map)
return AVERROR(EINVAL);
len = strlen(*map);
sscanf(*map, "%d%n", ch, &n);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(char **VAR_0, int *VAR_1, char VAR_2, int VAR_3)
{
char *VAR_4 = split(*VAR_0, VAR_2);
int VAR_5;
int VAR_6 = 0;
if (!VAR_4 && VAR_2 == '-')
return AVERROR(EINVAL);
if (!*VAR_0)
return AVERROR(EINVAL);
VAR_5 = strlen(*VAR_0);
sscanf(*VAR_0, "%d%VAR... | [
"static int FUNC_0(char **VAR_0, int *VAR_1, char VAR_2, int VAR_3)\n{",
"char *VAR_4 = split(*VAR_0, VAR_2);",
"int VAR_5;",
"int VAR_6 = 0;",
"if (!VAR_4 && VAR_2 == '-')\nreturn AVERROR(EINVAL);",
"if (!*VAR_0)\nreturn AVERROR(EINVAL);",
"VAR_5 = strlen(*VAR_0);",
"sscanf(*VAR_0, \"%d%VAR_6\", VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
15,
17
],
[
19
],
[
21
],
[
23,
25
],
[
27,
29
],
[
31
],
[
33
],
[
35
]
] |
21,115 | static int decode_residual_block(AVSContext *h, GetBitContext *gb,
const struct dec_2dvlc *r, int esc_golomb_order,
int qp, uint8_t *dst, int stride) {
int i, level_code, esc_code, level, run, mask;
DCTELEM level_buf[65];
uint8_t run_buf... | true | FFmpeg | 4a71da0f3ab7f5542decd11c81994f849d5b2c78 | static int decode_residual_block(AVSContext *h, GetBitContext *gb,
const struct dec_2dvlc *r, int esc_golomb_order,
int qp, uint8_t *dst, int stride) {
int i, level_code, esc_code, level, run, mask;
DCTELEM level_buf[65];
uint8_t run_buf... | {
"code": [
" } else {"
],
"line_no": [
37
]
} | static int FUNC_0(AVSContext *VAR_0, GetBitContext *VAR_1,
const struct dec_2dvlc *VAR_2, int VAR_3,
int VAR_4, uint8_t *VAR_5, int VAR_6) {
int VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12;
DCTELEM level_buf[65];
uint8_t run_buf[65];
... | [
"static int FUNC_0(AVSContext *VAR_0, GetBitContext *VAR_1,\nconst struct dec_2dvlc *VAR_2, int VAR_3,\nint VAR_4, uint8_t *VAR_5, int VAR_6) {",
"int VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12;",
"DCTELEM level_buf[65];",
"uint8_t run_buf[65];",
"DCTELEM *block = VAR_0->block;",
"for(VAR_7=0;VAR_7<65;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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[... |
21,116 | static void device_set_hotplugged(Object *obj, bool value, Error **err)
{
DeviceState *dev = DEVICE(obj);
dev->hotplugged = value;
}
| true | qemu | 36cccb8c575b74a691f685911fbb0301af19f924 | static void device_set_hotplugged(Object *obj, bool value, Error **err)
{
DeviceState *dev = DEVICE(obj);
dev->hotplugged = value;
}
| {
"code": [
"static void device_set_hotplugged(Object *obj, bool value, Error **err)",
" DeviceState *dev = DEVICE(obj);",
" dev->hotplugged = value;"
],
"line_no": [
1,
5,
9
]
} | static void FUNC_0(Object *VAR_0, bool VAR_1, Error **VAR_2)
{
DeviceState *dev = DEVICE(VAR_0);
dev->hotplugged = VAR_1;
}
| [
"static void FUNC_0(Object *VAR_0, bool VAR_1, Error **VAR_2)\n{",
"DeviceState *dev = DEVICE(VAR_0);",
"dev->hotplugged = VAR_1;",
"}"
] | [
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
]
] |
21,117 | static void mips_fulong2e_init(MachineState *machine)
{
ram_addr_t ram_size = machine->ram_size;
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_filename = machine->init... | true | qemu | d8f94e1bb275ab6a14a15220fd6afd0d04324aeb | static void mips_fulong2e_init(MachineState *machine)
{
ram_addr_t ram_size = machine->ram_size;
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_filename = machine->init... | {
"code": [
" ide_drive_get(hd, MAX_IDE_BUS);",
" ide_drive_get(hd, MAX_IDE_BUS);",
" ide_drive_get(hd, MAX_IDE_BUS);",
" ide_drive_get(hd, MAX_IDE_BUS);",
" ide_drive_get(hd, MAX_IDE_BUS);",
" ide_drive_get(hd, MAX_IDE_BUS);",
" ide_drive_get(hd, MAX_IDE_BUS);",
"... | static void FUNC_0(MachineState *VAR_0)
{
ram_addr_t ram_size = VAR_0->ram_size;
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;
char *VAR_5;
MemoryRegion *address_space_mem = get_system_memory();... | [
"static void FUNC_0(MachineState *VAR_0)\n{",
"ram_addr_t ram_size = VAR_0->ram_size;",
"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;",
"char *VAR_5;",
"MemoryRegion *address_space_mem = get_system_memo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.