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 |
|---|---|---|---|---|---|---|---|---|---|---|
26,002 | static void virtio_setup(uint64_t dev_info)
{
struct schib schib;
int i;
int r;
bool found = false;
bool check_devno = false;
uint16_t dev_no = -1;
blk_schid.one = 1;
if (dev_info != -1) {
check_devno = true;
dev_no = dev_info & 0xffff;
debug_print_i... | false | qemu | 5d739a4787a53da8d787551c8de27ad39fabdb34 | static void virtio_setup(uint64_t dev_info)
{
struct schib schib;
int i;
int r;
bool found = false;
bool check_devno = false;
uint16_t dev_no = -1;
blk_schid.one = 1;
if (dev_info != -1) {
check_devno = true;
dev_no = dev_info & 0xffff;
debug_print_i... | {
"code": [],
"line_no": []
} | static void FUNC_0(uint64_t VAR_0)
{
struct VAR_1 VAR_1;
int VAR_2;
int VAR_3;
bool found = false;
bool check_devno = false;
uint16_t dev_no = -1;
blk_schid.one = 1;
if (VAR_0 != -1) {
check_devno = true;
dev_no = VAR_0 & 0xffff;
debug_print_int("dev... | [
"static void FUNC_0(uint64_t VAR_0)\n{",
"struct VAR_1 VAR_1;",
"int VAR_2;",
"int VAR_3;",
"bool found = false;",
"bool check_devno = false;",
"uint16_t dev_no = -1;",
"blk_schid.one = 1;",
"if (VAR_0 != -1) {",
"check_devno = true;",
"dev_no = VAR_0 & 0xffff;",
"debug_print_int(\"device no. ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
26,004 | void memory_region_init_ram(MemoryRegion *mr,
const char *name,
uint64_t size)
{
memory_region_init(mr, name, size);
mr->ram = true;
mr->terminates = true;
mr->destructor = memory_region_destructor_ram;
mr->ram_addr = qemu_ram_alloc(siz... | false | qemu | 26a83ad0e793465b74a8b06a65f2f6fdc5615413 | void memory_region_init_ram(MemoryRegion *mr,
const char *name,
uint64_t size)
{
memory_region_init(mr, name, size);
mr->ram = true;
mr->terminates = true;
mr->destructor = memory_region_destructor_ram;
mr->ram_addr = qemu_ram_alloc(siz... | {
"code": [],
"line_no": []
} | void FUNC_0(MemoryRegion *VAR_0,
const char *VAR_1,
uint64_t VAR_2)
{
memory_region_init(VAR_0, VAR_1, VAR_2);
VAR_0->ram = true;
VAR_0->terminates = true;
VAR_0->destructor = memory_region_destructor_ram;
VAR_0->ram_addr = qemu_ram_all... | [
"void FUNC_0(MemoryRegion *VAR_0,\nconst char *VAR_1,\nuint64_t VAR_2)\n{",
"memory_region_init(VAR_0, VAR_1, VAR_2);",
"VAR_0->ram = true;",
"VAR_0->terminates = true;",
"VAR_0->destructor = memory_region_destructor_ram;",
"VAR_0->ram_addr = qemu_ram_alloc(VAR_2, VAR_0);",
"VAR_0->backend_registered = ... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
26,005 | static uint64_t pchip_read(void *opaque, hwaddr addr, unsigned size)
{
TyphoonState *s = opaque;
uint64_t ret = 0;
if (addr & 4) {
return s->latch_tmp;
}
switch (addr) {
case 0x0000:
/* WSBA0: Window Space Base Address Register. */
ret = s->pchip.win[0].bas... | false | qemu | 678421650dc166cd6cb35bb2bc0baf1b481b40ca | static uint64_t pchip_read(void *opaque, hwaddr addr, unsigned size)
{
TyphoonState *s = opaque;
uint64_t ret = 0;
if (addr & 4) {
return s->latch_tmp;
}
switch (addr) {
case 0x0000:
ret = s->pchip.win[0].base_addr;
break;
case 0x0040:
... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, hwaddr addr, unsigned size)
{
TyphoonState *s = opaque;
uint64_t ret = 0;
if (addr & 4) {
return s->latch_tmp;
}
switch (addr) {
case 0x0000:
ret = s->pchip.win[0].base_addr;
break;
case 0x0040:
... | [
"static uint64_t FUNC_0(void *opaque, hwaddr addr, unsigned size)\n{",
"TyphoonState *s = opaque;",
"uint64_t ret = 0;",
"if (addr & 4) {",
"return s->latch_tmp;",
"}",
"switch (addr) {",
"case 0x0000:\nret = s->pchip.win[0].base_addr;",
"break;",
"case 0x0040:\nret = s->pchip.win[1].base_addr;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
19
],
[
21,
25
],
[
27
],
[
29,
33
],
[
35
],
[
37,
41
],
[
43
],
[
45,
49
],
[
51
],
[
55,
59
],
[
61
],
... |
26,006 | void cpu_x86_update_dr7(CPUX86State *env, uint32_t new_dr7)
{
int i;
for (i = 0; i < DR7_MAX_BP; i++) {
hw_breakpoint_remove(env, i);
}
env->dr[7] = new_dr7;
for (i = 0; i < DR7_MAX_BP; i++) {
hw_breakpoint_insert(env, i);
}
}
| false | qemu | 36eb6e096729f9aade3a6af7dbe4d0a990335d7e | void cpu_x86_update_dr7(CPUX86State *env, uint32_t new_dr7)
{
int i;
for (i = 0; i < DR7_MAX_BP; i++) {
hw_breakpoint_remove(env, i);
}
env->dr[7] = new_dr7;
for (i = 0; i < DR7_MAX_BP; i++) {
hw_breakpoint_insert(env, i);
}
}
| {
"code": [],
"line_no": []
} | void FUNC_0(CPUX86State *VAR_0, uint32_t VAR_1)
{
int VAR_2;
for (VAR_2 = 0; VAR_2 < DR7_MAX_BP; VAR_2++) {
hw_breakpoint_remove(VAR_0, VAR_2);
}
VAR_0->dr[7] = VAR_1;
for (VAR_2 = 0; VAR_2 < DR7_MAX_BP; VAR_2++) {
hw_breakpoint_insert(VAR_0, VAR_2);
}
}
| [
"void FUNC_0(CPUX86State *VAR_0, uint32_t VAR_1)\n{",
"int VAR_2;",
"for (VAR_2 = 0; VAR_2 < DR7_MAX_BP; VAR_2++) {",
"hw_breakpoint_remove(VAR_0, VAR_2);",
"}",
"VAR_0->dr[7] = VAR_1;",
"for (VAR_2 = 0; VAR_2 < DR7_MAX_BP; VAR_2++) {",
"hw_breakpoint_insert(VAR_0, VAR_2);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
26,009 | int ffurl_get_file_handle(URLContext *h)
{
if (!h->prot->url_get_file_handle)
return -1;
return h->prot->url_get_file_handle(h);
}
| false | FFmpeg | be4dfbf7b71e44a53ca8da882a081e35ea134c83 | int ffurl_get_file_handle(URLContext *h)
{
if (!h->prot->url_get_file_handle)
return -1;
return h->prot->url_get_file_handle(h);
}
| {
"code": [],
"line_no": []
} | int FUNC_0(URLContext *VAR_0)
{
if (!VAR_0->prot->url_get_file_handle)
return -1;
return VAR_0->prot->url_get_file_handle(VAR_0);
}
| [
"int FUNC_0(URLContext *VAR_0)\n{",
"if (!VAR_0->prot->url_get_file_handle)\nreturn -1;",
"return VAR_0->prot->url_get_file_handle(VAR_0);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
]
] |
26,010 | static void cmd_read_toc_pma_atip(IDEState *s, uint8_t* buf)
{
int format, msf, start_track, len;
uint64_t total_sectors = s->nb_sectors >> 2;
int max_len;
if (total_sectors == 0) {
ide_atapi_cmd_error(s, SENSE_NOT_READY, ASC_MEDIUM_NOT_PRESENT);
return;
}
max_len = ... | false | qemu | 7a2c4b82340d621bff462672b29c88d2020d68c1 | static void cmd_read_toc_pma_atip(IDEState *s, uint8_t* buf)
{
int format, msf, start_track, len;
uint64_t total_sectors = s->nb_sectors >> 2;
int max_len;
if (total_sectors == 0) {
ide_atapi_cmd_error(s, SENSE_NOT_READY, ASC_MEDIUM_NOT_PRESENT);
return;
}
max_len = ... | {
"code": [],
"line_no": []
} | static void FUNC_0(IDEState *VAR_0, uint8_t* VAR_1)
{
int VAR_2, VAR_3, VAR_4, VAR_5;
uint64_t total_sectors = VAR_0->nb_sectors >> 2;
int VAR_6;
if (total_sectors == 0) {
ide_atapi_cmd_error(VAR_0, SENSE_NOT_READY, ASC_MEDIUM_NOT_PRESENT);
return;
}
VAR_6 = ube16_to... | [
"static void FUNC_0(IDEState *VAR_0, uint8_t* VAR_1)\n{",
"int VAR_2, VAR_3, VAR_4, VAR_5;",
"uint64_t total_sectors = VAR_0->nb_sectors >> 2;",
"int VAR_6;",
"if (total_sectors == 0) {",
"ide_atapi_cmd_error(VAR_0, SENSE_NOT_READY, ASC_MEDIUM_NOT_PRESENT);",
"return;",
"}",
"VAR_6 = ube16_to_cpu(VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35,
37
],
[
39,
41
],
[
43
],
[
45
],
[
47,
51
],
[... |
26,011 | av_cold void ff_rv40dsp_init(RV34DSPContext *c, DSPContext* dsp) {
ff_rv34dsp_init(c, dsp);
c->put_pixels_tab[0][ 0] = dsp->put_h264_qpel_pixels_tab[0][0];
c->put_pixels_tab[0][ 1] = put_rv40_qpel16_mc10_c;
c->put_pixels_tab[0][ 2] = dsp->put_h264_qpel_pixels_tab[0][2];
c->put_pixels_tab[0]... | false | FFmpeg | 507dce2536fea4b78a9f4973f77e1fa20cfe1b81 | av_cold void ff_rv40dsp_init(RV34DSPContext *c, DSPContext* dsp) {
ff_rv34dsp_init(c, dsp);
c->put_pixels_tab[0][ 0] = dsp->put_h264_qpel_pixels_tab[0][0];
c->put_pixels_tab[0][ 1] = put_rv40_qpel16_mc10_c;
c->put_pixels_tab[0][ 2] = dsp->put_h264_qpel_pixels_tab[0][2];
c->put_pixels_tab[0]... | {
"code": [],
"line_no": []
} | av_cold void FUNC_0(RV34DSPContext *c, DSPContext* dsp) {
ff_rv34dsp_init(c, dsp);
c->put_pixels_tab[0][ 0] = dsp->put_h264_qpel_pixels_tab[0][0];
c->put_pixels_tab[0][ 1] = put_rv40_qpel16_mc10_c;
c->put_pixels_tab[0][ 2] = dsp->put_h264_qpel_pixels_tab[0][2];
c->put_pixels_tab[0][ 3] = pu... | [
"av_cold void FUNC_0(RV34DSPContext *c, DSPContext* dsp) {",
"ff_rv34dsp_init(c, dsp);",
"c->put_pixels_tab[0][ 0] = dsp->put_h264_qpel_pixels_tab[0][0];",
"c->put_pixels_tab[0][ 1] = put_rv40_qpel16_mc10_c;",
"c->put_pixels_tab[0][ 2] = dsp->put_h264_qpel_pixels_tab[0][2];",
"c->put_pixels_tab[0][ 3] = p... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
... |
26,012 | static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length)
{
int i, consumed, ret = 0;
s->ref = NULL;
s->eos = 0;
/* split the input packet into NAL units, so we know the upper bound on the
* number of slices in the frame */
s->nb_nals = 0;
while (length >= 4) {... | false | FFmpeg | f7f88018393b96ae410041e9a0fc51f4c082002e | static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length)
{
int i, consumed, ret = 0;
s->ref = NULL;
s->eos = 0;
s->nb_nals = 0;
while (length >= 4) {
HEVCNAL *nal;
int extract_length = 0;
if (s->is_nalff) {
int i;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(HEVCContext *VAR_0, const uint8_t *VAR_1, int VAR_2)
{
int VAR_7, VAR_4, VAR_5 = 0;
VAR_0->ref = NULL;
VAR_0->eos = 0;
VAR_0->nb_nals = 0;
while (VAR_2 >= 4) {
HEVCNAL *nal;
int VAR_6 = 0;
if (VAR_0->is_nalff) {
int VAR_7;... | [
"static int FUNC_0(HEVCContext *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{",
"int VAR_7, VAR_4, VAR_5 = 0;",
"VAR_0->ref = NULL;",
"VAR_0->eos = 0;",
"VAR_0->nb_nals = 0;",
"while (VAR_2 >= 4) {",
"HEVCNAL *nal;",
"int VAR_6 = 0;",
"if (VAR_0->is_nalff) {",
"int VAR_7;",
"for (VAR_7 = 0; 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,
3
],
[
5
],
[
9
],
[
11
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53... |
26,013 | static always_inline void gen_intermediate_code_internal (CPUState *env,
TranslationBlock *tb,
int search_pc)
{
DisasContext ctx, *ctxp = &ctx;
opc_handler_t **table, *handler;
target_ul... | false | qemu | af4b6c54c141c1e2d3637fc15b912e82b88828cf | static always_inline void gen_intermediate_code_internal (CPUState *env,
TranslationBlock *tb,
int search_pc)
{
DisasContext ctx, *ctxp = &ctx;
opc_handler_t **table, *handler;
target_ul... | {
"code": [],
"line_no": []
} | static always_inline void FUNC_0 (CPUState *env,
TranslationBlock *tb,
int search_pc)
{
DisasContext ctx, *ctxp = &ctx;
opc_handler_t **table, *handler;
target_ulong pc_start;
uint1... | [
"static always_inline void FUNC_0 (CPUState *env,\nTranslationBlock *tb,\nint search_pc)\n{",
"DisasContext ctx, *ctxp = &ctx;",
"opc_handler_t **table, *handler;",
"target_ulong pc_start;",
"uint16_t *gen_opc_end;",
"CPUBreakpoint *bp;",
"int VAR_0, VAR_1 = -1;",
"int VAR_2;",
"int VAR_3;",
"pc_s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,... |
26,014 | static int slb_lookup (CPUPPCState *env, target_ulong eaddr,
target_ulong *vsid, target_ulong *page_mask, int *attr)
{
target_phys_addr_t sr_base;
target_ulong mask;
uint64_t tmp64;
uint32_t tmp;
int n, ret;
int slb_nr;
ret = -5;
sr_base = env->spr[SPR_... | false | qemu | eacc324914c2dc7aecec3b4ea920252b685b5c8e | static int slb_lookup (CPUPPCState *env, target_ulong eaddr,
target_ulong *vsid, target_ulong *page_mask, int *attr)
{
target_phys_addr_t sr_base;
target_ulong mask;
uint64_t tmp64;
uint32_t tmp;
int n, ret;
int slb_nr;
ret = -5;
sr_base = env->spr[SPR_... | {
"code": [],
"line_no": []
} | static int FUNC_0 (CPUPPCState *VAR_0, target_ulong VAR_1,
target_ulong *VAR_2, target_ulong *VAR_3, int *VAR_4)
{
target_phys_addr_t sr_base;
target_ulong mask;
uint64_t tmp64;
uint32_t tmp;
int VAR_5, VAR_6;
int VAR_7;
VAR_6 = -5;
sr_base = VAR_0->spr... | [
"static int FUNC_0 (CPUPPCState *VAR_0, target_ulong VAR_1,\ntarget_ulong *VAR_2, target_ulong *VAR_3, int *VAR_4)\n{",
"target_phys_addr_t sr_base;",
"target_ulong mask;",
"uint64_t tmp64;",
"uint32_t tmp;",
"int VAR_5, VAR_6;",
"int VAR_7;",
"VAR_6 = -5;",
"sr_base = VAR_0->spr[SPR_ASR];",
"#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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25,
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,... |
26,015 | static const mon_cmd_t *monitor_parse_command(Monitor *mon,
const char *cmdline,
QDict *qdict)
{
const char *p, *typestr;
int c;
const mon_cmd_t *cmd;
char cmdname[256];
char buf[1024];
char *key... | false | qemu | 7fd669a1c49743073e53166798244f15b1a8e0d2 | static const mon_cmd_t *monitor_parse_command(Monitor *mon,
const char *cmdline,
QDict *qdict)
{
const char *p, *typestr;
int c;
const mon_cmd_t *cmd;
char cmdname[256];
char buf[1024];
char *key... | {
"code": [],
"line_no": []
} | static const mon_cmd_t *FUNC_0(Monitor *mon,
const char *cmdline,
QDict *qdict)
{
const char *VAR_0, *VAR_1;
int VAR_2;
const mon_cmd_t *VAR_3;
char VAR_4[256];
char VAR_5[1024];
char *VAR_6;
... | [
"static const mon_cmd_t *FUNC_0(Monitor *mon,\nconst char *cmdline,\nQDict *qdict)\n{",
"const char *VAR_0, *VAR_1;",
"int VAR_2;",
"const mon_cmd_t *VAR_3;",
"char VAR_4[256];",
"char VAR_5[1024];",
"char *VAR_6;",
"#ifdef DEBUG\nmonitor_printf(mon, \"command='%s'\\n\", cmdline);",
"#endif\nVAR_0 =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
33
],
[
35,
37
],
[
43
],
[
45,
47
],
[
49
],
[
53
],
[
55
],
[
57
],
[
59
... |
26,016 | static coroutine_fn int qcow_co_writev(BlockDriverState *bs, int64_t sector_num,
int nb_sectors, QEMUIOVector *qiov)
{
BDRVQcowState *s = bs->opaque;
int index_in_cluster;
uint64_t cluster_offset;
int ret = 0, n;
struct iovec hd_iov;
QEMUIOVector hd_qiov;
u... | false | qemu | d85f4222b4681da7ebf8a90b26e085a68fa2c55a | static coroutine_fn int qcow_co_writev(BlockDriverState *bs, int64_t sector_num,
int nb_sectors, QEMUIOVector *qiov)
{
BDRVQcowState *s = bs->opaque;
int index_in_cluster;
uint64_t cluster_offset;
int ret = 0, n;
struct iovec hd_iov;
QEMUIOVector hd_qiov;
u... | {
"code": [],
"line_no": []
} | static coroutine_fn int FUNC_0(BlockDriverState *bs, int64_t sector_num,
int nb_sectors, QEMUIOVector *qiov)
{
BDRVQcowState *s = bs->opaque;
int VAR_0;
uint64_t cluster_offset;
int VAR_1 = 0, VAR_2;
struct iovec VAR_3;
QEMUIOVector hd_qiov;
uint8_t *buf;
... | [
"static coroutine_fn int FUNC_0(BlockDriverState *bs, int64_t sector_num,\nint nb_sectors, QEMUIOVector *qiov)\n{",
"BDRVQcowState *s = bs->opaque;",
"int VAR_0;",
"uint64_t cluster_offset;",
"int VAR_1 = 0, VAR_2;",
"struct iovec VAR_3;",
"QEMUIOVector hd_qiov;",
"uint8_t *buf;",
"void *VAR_4;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
26,017 | static void start_auth_vencrypt_subauth(VncState *vs)
{
switch (vs->vd->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;
... | false | qemu | 7e7e2ebc942da8285931ceabf12823e165dced8b | static void start_auth_vencrypt_subauth(VncState *vs)
{
switch (vs->vd->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_TLSV... | {
"code": [],
"line_no": []
} | static void FUNC_0(VncState *VAR_0)
{
switch (VAR_0->vd->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:
... | [
"static void FUNC_0(VncState *VAR_0)\n{",
"switch (VAR_0->vd->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_VENCR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9,
11
],
[
13
],
[
15
],
[
17
],
[
21,
23,
25
],
[
27
],
[
29
],
[
33,
35,
37,
39
],
[
41
],
[
43,
47,
49
],
[
51
],
[
53
],
[
55
],
[... |
26,019 | static void disas_test_b_imm(DisasContext *s, uint32_t insn)
{
unsigned int bit_pos, op, rt;
uint64_t addr;
int label_match;
TCGv_i64 tcg_cmp;
bit_pos = (extract32(insn, 31, 1) << 5) | extract32(insn, 19, 5);
op = extract32(insn, 24, 1); /* 0: TBZ; 1: TBNZ */
addr = s->pc + sextrac... | false | qemu | 42a268c241183877192c376d03bd9b6d527407c7 | static void disas_test_b_imm(DisasContext *s, uint32_t insn)
{
unsigned int bit_pos, op, rt;
uint64_t addr;
int label_match;
TCGv_i64 tcg_cmp;
bit_pos = (extract32(insn, 31, 1) << 5) | extract32(insn, 19, 5);
op = extract32(insn, 24, 1);
addr = s->pc + sextract32(insn, 5, 14) * 4 ... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0, uint32_t VAR_1)
{
unsigned int VAR_2, VAR_3, VAR_4;
uint64_t addr;
int VAR_5;
TCGv_i64 tcg_cmp;
VAR_2 = (extract32(VAR_1, 31, 1) << 5) | extract32(VAR_1, 19, 5);
VAR_3 = extract32(VAR_1, 24, 1);
addr = VAR_0->pc + sextract32(VAR_1, 5, 14) * ... | [
"static void FUNC_0(DisasContext *VAR_0, uint32_t VAR_1)\n{",
"unsigned int VAR_2, VAR_3, VAR_4;",
"uint64_t addr;",
"int VAR_5;",
"TCGv_i64 tcg_cmp;",
"VAR_2 = (extract32(VAR_1, 31, 1) << 5) | extract32(VAR_1, 19, 5);",
"VAR_3 = extract32(VAR_1, 24, 1);",
"addr = VAR_0->pc + sextract32(VAR_1, 5, 14) ... | [
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
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
]
] |
26,020 | static QObject *parse_escape(JSONParserContext *ctxt, QList **tokens, va_list *ap)
{
QObject *token = NULL, *obj;
QList *working = qlist_copy(*tokens);
if (ap == NULL) {
goto out;
}
token = qlist_pop(working);
if (token == NULL) {
goto out;
}
if (token_is... | false | qemu | 65c0f1e9558c7c762cdb333406243fff1d687117 | static QObject *parse_escape(JSONParserContext *ctxt, QList **tokens, va_list *ap)
{
QObject *token = NULL, *obj;
QList *working = qlist_copy(*tokens);
if (ap == NULL) {
goto out;
}
token = qlist_pop(working);
if (token == NULL) {
goto out;
}
if (token_is... | {
"code": [],
"line_no": []
} | static QObject *FUNC_0(JSONParserContext *ctxt, QList **tokens, va_list *ap)
{
QObject *token = NULL, *obj;
QList *working = qlist_copy(*tokens);
if (ap == NULL) {
goto out;
}
token = qlist_pop(working);
if (token == NULL) {
goto out;
}
if (token_is_escap... | [
"static QObject *FUNC_0(JSONParserContext *ctxt, QList **tokens, va_list *ap)\n{",
"QObject *token = NULL, *obj;",
"QList *working = qlist_copy(*tokens);",
"if (ap == NULL) {",
"goto out;",
"}",
"token = qlist_pop(working);",
"if (token == NULL) {",
"goto out;",
"}",
"if (token_is_escape(token, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47... |
26,021 | ParallelState *parallel_mm_init(target_phys_addr_t base, int it_shift, qemu_irq irq, CharDriverState *chr)
{
ParallelState *s;
int io_sw;
s = qemu_mallocz(sizeof(ParallelState));
s->irq = irq;
s->chr = chr;
s->it_shift = it_shift;
qemu_register_reset(parallel_reset, s);
io_s... | false | qemu | defdb20e1a8ac3a7200aaf190d7fb20a5ac8bcea | ParallelState *parallel_mm_init(target_phys_addr_t base, int it_shift, qemu_irq irq, CharDriverState *chr)
{
ParallelState *s;
int io_sw;
s = qemu_mallocz(sizeof(ParallelState));
s->irq = irq;
s->chr = chr;
s->it_shift = it_shift;
qemu_register_reset(parallel_reset, s);
io_s... | {
"code": [],
"line_no": []
} | ParallelState *FUNC_0(target_phys_addr_t base, int it_shift, qemu_irq irq, CharDriverState *chr)
{
ParallelState *s;
int VAR_0;
s = qemu_mallocz(sizeof(ParallelState));
s->irq = irq;
s->chr = chr;
s->it_shift = it_shift;
qemu_register_reset(parallel_reset, s);
VAR_0 = cpu_re... | [
"ParallelState *FUNC_0(target_phys_addr_t base, int it_shift, qemu_irq irq, CharDriverState *chr)\n{",
"ParallelState *s;",
"int VAR_0;",
"s = qemu_mallocz(sizeof(ParallelState));",
"s->irq = irq;",
"s->chr = chr;",
"s->it_shift = it_shift;",
"qemu_register_reset(parallel_reset, s);",
"VAR_0 = cpu_r... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
25
],
[
27
],
[
29
],
[
31
]
] |
26,022 | int float32_le( float32 a, float32 b STATUS_PARAM )
{
flag aSign, bSign;
if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) )
|| ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) )
) {
float_raise( float_flag_invalid STATUS_VAR);
return... | false | qemu | f090c9d4ad5812fb92843d6470a1111c15190c4c | int float32_le( float32 a, float32 b STATUS_PARAM )
{
flag aSign, bSign;
if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) )
|| ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) )
) {
float_raise( float_flag_invalid STATUS_VAR);
return... | {
"code": [],
"line_no": []
} | int FUNC_0( float32 VAR_0, float32 VAR_1 STATUS_PARAM )
{
flag aSign, bSign;
if ( ( ( extractFloat32Exp( VAR_0 ) == 0xFF ) && extractFloat32Frac( VAR_0 ) )
|| ( ( extractFloat32Exp( VAR_1 ) == 0xFF ) && extractFloat32Frac( VAR_1 ) )
) {
float_raise( float_flag_invalid STATUS_V... | [
"int FUNC_0( float32 VAR_0, float32 VAR_1 STATUS_PARAM )\n{",
"flag aSign, bSign;",
"if ( ( ( extractFloat32Exp( VAR_0 ) == 0xFF ) && extractFloat32Frac( VAR_0 ) )\n|| ( ( extractFloat32Exp( VAR_1 ) == 0xFF ) && extractFloat32Frac( VAR_1 ) )\n) {",
"float_raise( float_flag_invalid STATUS_VAR);",
"return ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
]
] |
26,023 | static void ttafilter_init(TTAContext *s, TTAFilter *c, int32_t shift) {
memset(c, 0, sizeof(TTAFilter));
if (s->pass) {
int i;
for (i = 0; i < 8; i++)
c->qm[i] = sign_extend(s->crc_pass[i], 8);
}
c->shift = shift;
c->round = shift_1[shift-1];
// c->round = 1 <... | false | FFmpeg | 2e988fd689642899927707a084bf40dc1326dc90 | static void ttafilter_init(TTAContext *s, TTAFilter *c, int32_t shift) {
memset(c, 0, sizeof(TTAFilter));
if (s->pass) {
int i;
for (i = 0; i < 8; i++)
c->qm[i] = sign_extend(s->crc_pass[i], 8);
}
c->shift = shift;
c->round = shift_1[shift-1];
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(TTAContext *VAR_0, TTAFilter *VAR_1, int32_t VAR_2) {
memset(VAR_1, 0, sizeof(TTAFilter));
if (VAR_0->pass) {
int VAR_3;
for (VAR_3 = 0; VAR_3 < 8; VAR_3++)
VAR_1->qm[VAR_3] = sign_extend(VAR_0->crc_pass[VAR_3], 8);
}
VAR_1->VAR_2 = VAR_2;
VAR_1-... | [
"static void FUNC_0(TTAContext *VAR_0, TTAFilter *VAR_1, int32_t VAR_2) {",
"memset(VAR_1, 0, sizeof(TTAFilter));",
"if (VAR_0->pass) {",
"int VAR_3;",
"for (VAR_3 = 0; VAR_3 < 8; VAR_3++)",
"VAR_1->qm[VAR_3] = sign_extend(VAR_0->crc_pass[VAR_3], 8);",
"}",
"VAR_1->VAR_2 = VAR_2;",
"VAR_1->round = s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
]
] |
26,024 | USBDevice *usb_msd_init(const char *filename, BlockDriverState **pbs)
{
MSDState *s;
BlockDriverState *bdrv;
BlockDriver *drv = NULL;
const char *p1;
char fmt[32];
p1 = strchr(filename, ':');
if (p1++) {
const char *p2;
if (strstart(filename, "format=", &p2)) {
... | false | qemu | bb5fc20f7c1c65e95030da3629dd0d7a0cce38cd | USBDevice *usb_msd_init(const char *filename, BlockDriverState **pbs)
{
MSDState *s;
BlockDriverState *bdrv;
BlockDriver *drv = NULL;
const char *p1;
char fmt[32];
p1 = strchr(filename, ':');
if (p1++) {
const char *p2;
if (strstart(filename, "format=", &p2)) {
... | {
"code": [],
"line_no": []
} | USBDevice *FUNC_0(const char *filename, BlockDriverState **pbs)
{
MSDState *s;
BlockDriverState *bdrv;
BlockDriver *drv = NULL;
const char *VAR_0;
char VAR_1[32];
VAR_0 = strchr(filename, ':');
if (VAR_0++) {
const char *VAR_2;
if (strstart(filename, "format=", ... | [
"USBDevice *FUNC_0(const char *filename, BlockDriverState **pbs)\n{",
"MSDState *s;",
"BlockDriverState *bdrv;",
"BlockDriver *drv = NULL;",
"const char *VAR_0;",
"char VAR_1[32];",
"VAR_0 = strchr(filename, ':');",
"if (VAR_0++) {",
"const char *VAR_2;",
"if (strstart(filename, \"format=\", &VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
26,025 | static int buffered_rate_limit(void *opaque)
{
QEMUFileBuffered *s = opaque;
int ret;
ret = qemu_file_get_error(s->file);
if (ret) {
return ret;
}
if (s->bytes_xfer > s->xfer_limit)
return 1;
return 0;
}
| false | qemu | 0d82d0e8b98cf0ea03a45f8542d835ebd3a84cd3 | static int buffered_rate_limit(void *opaque)
{
QEMUFileBuffered *s = opaque;
int ret;
ret = qemu_file_get_error(s->file);
if (ret) {
return ret;
}
if (s->bytes_xfer > s->xfer_limit)
return 1;
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(void *VAR_0)
{
QEMUFileBuffered *s = VAR_0;
int VAR_1;
VAR_1 = qemu_file_get_error(s->file);
if (VAR_1) {
return VAR_1;
}
if (s->bytes_xfer > s->xfer_limit)
return 1;
return 0;
}
| [
"static int FUNC_0(void *VAR_0)\n{",
"QEMUFileBuffered *s = VAR_0;",
"int VAR_1;",
"VAR_1 = qemu_file_get_error(s->file);",
"if (VAR_1) {",
"return VAR_1;",
"}",
"if (s->bytes_xfer > s->xfer_limit)\nreturn 1;",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
27
],
[
29
]
] |
26,026 | static int alloc_refcount_block(BlockDriverState *bs,
int64_t cluster_index, void **refcount_block)
{
BDRVQcowState *s = bs->opaque;
unsigned int refcount_table_index;
int ret;
BLKDBG_EVENT(bs->file, BLKDBG_REFBLOCK_ALLOC);
/* Find the refcount block for th... | false | qemu | a3f1afb43a09e4577571c044c48f2ba9e6e4ad06 | static int alloc_refcount_block(BlockDriverState *bs,
int64_t cluster_index, void **refcount_block)
{
BDRVQcowState *s = bs->opaque;
unsigned int refcount_table_index;
int ret;
BLKDBG_EVENT(bs->file, BLKDBG_REFBLOCK_ALLOC);
refcount_table_index = clus... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0,
int64_t VAR_1, void **VAR_2)
{
BDRVQcowState *s = VAR_0->opaque;
unsigned int VAR_3;
int VAR_4;
BLKDBG_EVENT(VAR_0->file, BLKDBG_REFBLOCK_ALLOC);
VAR_3 = VAR_1 >> s->refcount_block_bits;
if (VAR_3 < s-... | [
"static int FUNC_0(BlockDriverState *VAR_0,\nint64_t VAR_1, void **VAR_2)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"unsigned int VAR_3;",
"int VAR_4;",
"BLKDBG_EVENT(VAR_0->file, BLKDBG_REFBLOCK_ALLOC);",
"VAR_3 = VAR_1 >> s->refcount_block_bits;",
"if (VAR_3 < s->refcount_table_size) {",
"uint64_t r... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
21
],
[
25
],
[
29,
31
],
[
37
],
[
39
],
[
41,
43,
45,
47
],
[
49
],
[
51
],
[
55,
57
],
[
59
],
[
61
],
[
111... |
26,028 | static inline int vc1_pred_dc(MpegEncContext *s, int overlap, int pq, int n,
int a_avail, int c_avail,
int16_t **dc_val_ptr, int *dir_ptr)
{
int a, b, c, wrap, pred;
int16_t *dc_val;
int mb_pos = s->mb_x + s->mb_y * s->mb_stride;
int q1,... | false | FFmpeg | 95b192de5d05f3e1542e7b2378cdefbc195f5185 | static inline int vc1_pred_dc(MpegEncContext *s, int overlap, int pq, int n,
int a_avail, int c_avail,
int16_t **dc_val_ptr, int *dir_ptr)
{
int a, b, c, wrap, pred;
int16_t *dc_val;
int mb_pos = s->mb_x + s->mb_y * s->mb_stride;
int q1,... | {
"code": [],
"line_no": []
} | static inline int FUNC_0(MpegEncContext *VAR_0, int VAR_1, int VAR_2, int VAR_3,
int VAR_4, int VAR_5,
int16_t **VAR_6, int *VAR_7)
{
int VAR_8, VAR_9, VAR_10, VAR_11, VAR_12;
int16_t *dc_val;
int VAR_13 = VAR_0->mb_x + VAR_0->mb_y * VAR_0->m... | [
"static inline int FUNC_0(MpegEncContext *VAR_0, int VAR_1, int VAR_2, int VAR_3,\nint VAR_4, int VAR_5,\nint16_t **VAR_6, int *VAR_7)\n{",
"int VAR_8, VAR_9, VAR_10, VAR_11, VAR_12;",
"int16_t *dc_val;",
"int VAR_13 = VAR_0->mb_x + VAR_0->mb_y * VAR_0->mb_stride;",
"int VAR_14, VAR_15 = 0;",
"VAR_11 = VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
],
[
51
],
[
53
],
[
55,
57
... |
26,029 | static void external_snapshot_prepare(BlkTransactionState *common,
Error **errp)
{
BlockDriver *drv;
int flags, ret;
QDict *options = NULL;
Error *local_err = NULL;
bool has_device = false;
const char *device;
bool has_node_name = false;
co... | true | qemu | 57b6bdf37c64985cf02b8737c550d52759059c9d | static void external_snapshot_prepare(BlkTransactionState *common,
Error **errp)
{
BlockDriver *drv;
int flags, ret;
QDict *options = NULL;
Error *local_err = NULL;
bool has_device = false;
const char *device;
bool has_node_name = false;
co... | {
"code": [
" QDECREF(options);"
],
"line_no": [
233
]
} | static void FUNC_0(BlkTransactionState *VAR_0,
Error **VAR_1)
{
BlockDriver *drv;
int VAR_2, VAR_3;
QDict *options = NULL;
Error *local_err = NULL;
bool has_device = false;
const char *VAR_4;
bool has_node_name = false;
const char *VAR_5;
... | [
"static void FUNC_0(BlkTransactionState *VAR_0,\nError **VAR_1)\n{",
"BlockDriver *drv;",
"int VAR_2, VAR_3;",
"QDict *options = NULL;",
"Error *local_err = NULL;",
"bool has_device = false;",
"const char *VAR_4;",
"bool has_node_name = false;",
"const char *VAR_5;",
"bool has_snapshot_node_name =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
43
],
[
47
],
[
49
... |
26,032 | int avio_get_str(AVIOContext *s, int maxlen, char *buf, int buflen)
{
int i;
// reserve 1 byte for terminating 0
buflen = FFMIN(buflen - 1, maxlen);
for (i = 0; i < buflen; i++)
if (!(buf[i] = avio_r8(s)))
return i + 1;
if (buflen)
buf[i] = 0;
for (; i < m... | false | FFmpeg | ab2940691ba76e1a9b0ce608db0dfc45021d741e | int avio_get_str(AVIOContext *s, int maxlen, char *buf, int buflen)
{
int i;
buflen = FFMIN(buflen - 1, maxlen);
for (i = 0; i < buflen; i++)
if (!(buf[i] = avio_r8(s)))
return i + 1;
if (buflen)
buf[i] = 0;
for (; i < maxlen; i++)
if (!avio_r8(s... | {
"code": [],
"line_no": []
} | int FUNC_0(AVIOContext *VAR_0, int VAR_1, char *VAR_2, int VAR_3)
{
int VAR_4;
VAR_3 = FFMIN(VAR_3 - 1, VAR_1);
for (VAR_4 = 0; VAR_4 < VAR_3; VAR_4++)
if (!(VAR_2[VAR_4] = avio_r8(VAR_0)))
return VAR_4 + 1;
if (VAR_3)
VAR_2[VAR_4] = 0;
for (; VAR_4 < VAR... | [
"int FUNC_0(AVIOContext *VAR_0, int VAR_1, char *VAR_2, int VAR_3)\n{",
"int VAR_4;",
"VAR_3 = FFMIN(VAR_3 - 1, VAR_1);",
"for (VAR_4 = 0; VAR_4 < VAR_3; VAR_4++)",
"if (!(VAR_2[VAR_4] = avio_r8(VAR_0)))\nreturn VAR_4 + 1;",
"if (VAR_3)\nVAR_2[VAR_4] = 0;",
"for (; VAR_4 < VAR_1; VAR_4++)",
"if (!avio... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
11
],
[
13
],
[
15,
17
],
[
19,
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
]
] |
26,033 | static int RENAME(swScale)(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[])
{
/* load a few things into local vars to make the code more readable? and faster */
const int srcW= c->srcW;
const int dstW= c->dst... | false | FFmpeg | d1adad3cca407f493c3637e20ecd4f7124e69212 | static int RENAME(swScale)(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[])
{
const int srcW= c->srcW;
const int dstW= c->dstW;
const int dstH= c->dstH;
const int chrDstW= c->chrDstW;
const in... | {
"code": [],
"line_no": []
} | static int FUNC_0(swScale)(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[])
{
const int VAR_0= c->VAR_0;
const int VAR_1= c->VAR_1;
const int VAR_2= c->VAR_2;
const int VAR_3= c->VAR_3;
const ... | [
"static int FUNC_0(swScale)(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY,\nint srcSliceH, uint8_t* dst[], int dstStride[])\n{",
"const int VAR_0= c->VAR_0;",
"const int VAR_1= c->VAR_1;",
"const int VAR_2= c->VAR_2;",
"const int VAR_3= c->VAR_3;",
"const int VAR_4= c->VAR_4;",
"co... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
... |
26,034 | static inline int wv_unpack_mono(WavpackFrameContext *s, GetBitContext *gb,
void *dst, const int type)
{
int i, j, count = 0;
int last, t;
int A, S, T;
int pos = s->pos;
uint32_t crc = s->sc.crc;
uint32_t crc_extra_bits = s->... | true | FFmpeg | d90c5bf10559554d6f9cd1dfb90767b991b76d5d | static inline int wv_unpack_mono(WavpackFrameContext *s, GetBitContext *gb,
void *dst, const int type)
{
int i, j, count = 0;
int last, t;
int A, S, T;
int pos = s->pos;
uint32_t crc = s->sc.crc;
uint32_t crc_extra_bits = s->... | {
"code": [
" S = T + ((s->decorr[i].weightA * A + 512) >> 10);"
],
"line_no": [
71
]
} | static inline int FUNC_0(WavpackFrameContext *VAR_0, GetBitContext *VAR_1,
void *VAR_2, const int VAR_3)
{
int VAR_4, VAR_5, VAR_6 = 0;
int VAR_7, VAR_8;
int VAR_9, VAR_10, VAR_11;
int VAR_12 = VAR_0->VAR_12;
uint32_t crc = VAR_0->... | [
"static inline int FUNC_0(WavpackFrameContext *VAR_0, GetBitContext *VAR_1,\nvoid *VAR_2, const int VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6 = 0;",
"int VAR_7, VAR_8;",
"int VAR_9, VAR_10, VAR_11;",
"int VAR_12 = VAR_0->VAR_12;",
"uint32_t crc = VAR_0->sc.crc;",
"uint32_t crc_ex... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45,... |
26,035 | static void mmu_init (CPUMIPSState *env, const mips_def_t *def)
{
env->tlb = qemu_mallocz(sizeof(CPUMIPSTLBContext));
switch (def->mmu_type) {
case MMU_TYPE_NONE:
no_mmu_init(env, def);
break;
case MMU_TYPE_R4000:
r4k_mmu_init(env, def);
... | true | qemu | 51cc2e783af5586b2e742ce9e5b2762dc50ad325 | static void mmu_init (CPUMIPSState *env, const mips_def_t *def)
{
env->tlb = qemu_mallocz(sizeof(CPUMIPSTLBContext));
switch (def->mmu_type) {
case MMU_TYPE_NONE:
no_mmu_init(env, def);
break;
case MMU_TYPE_R4000:
r4k_mmu_init(env, def);
... | {
"code": [
" env->CP0_Random = env->tlb->nb_tlb - 1;",
" env->tlb->tlb_in_use = env->tlb->nb_tlb;"
],
"line_no": [
41,
43
]
} | static void FUNC_0 (CPUMIPSState *VAR_0, const mips_def_t *VAR_1)
{
VAR_0->tlb = qemu_mallocz(sizeof(CPUMIPSTLBContext));
switch (VAR_1->mmu_type) {
case MMU_TYPE_NONE:
no_mmu_init(VAR_0, VAR_1);
break;
case MMU_TYPE_R4000:
r4k_mmu_init(VAR_0, VAR_1)... | [
"static void FUNC_0 (CPUMIPSState *VAR_0, const mips_def_t *VAR_1)\n{",
"VAR_0->tlb = qemu_mallocz(sizeof(CPUMIPSTLBContext));",
"switch (VAR_1->mmu_type) {",
"case MMU_TYPE_NONE:\nno_mmu_init(VAR_0, VAR_1);",
"break;",
"case MMU_TYPE_R4000:\nr4k_mmu_init(VAR_0, VAR_1);",
"break;",
"case MMU_TYPE_FMT:... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31,
33,
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
]
] |
26,036 | static void sample_queue_push(HintSampleQueue *queue, uint8_t *data, int size,
int sample)
{
/* No need to keep track of smaller samples, since describing them
* with immediates is more efficient. */
if (size <= 14)
return;
if (!queue->samples || queue->len ... | true | FFmpeg | 05b7a635dc1e5266fb367ce8b0019a0830317879 | static void sample_queue_push(HintSampleQueue *queue, uint8_t *data, int size,
int sample)
{
if (size <= 14)
return;
if (!queue->samples || queue->len >= queue->size) {
HintSample *samples;
samples = av_realloc(queue->samples, sizeof(HintSampl... | {
"code": [
" samples = av_realloc(queue->samples, sizeof(HintSample) * (queue->size + 10));"
],
"line_no": [
19
]
} | static void FUNC_0(HintSampleQueue *VAR_0, uint8_t *VAR_1, int VAR_2,
int VAR_3)
{
if (VAR_2 <= 14)
return;
if (!VAR_0->samples || VAR_0->len >= VAR_0->VAR_2) {
HintSample *samples;
samples = av_realloc(VAR_0->samples, sizeof(HintSample) * (VA... | [
"static void FUNC_0(HintSampleQueue *VAR_0, uint8_t *VAR_1, int VAR_2,\nint VAR_3)\n{",
"if (VAR_2 <= 14)\nreturn;",
"if (!VAR_0->samples || VAR_0->len >= VAR_0->VAR_2) {",
"HintSample *samples;",
"samples = av_realloc(VAR_0->samples, sizeof(HintSample) * (VAR_0->VAR_2 + 10));",
"if (!samples)\nreturn;",
... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
11,
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
]
] |
26,039 | static void gen_spr_power8_tce_address_control(CPUPPCState *env)
{
spr_register(env, SPR_TAR, "TAR",
&spr_read_generic, &spr_write_generic,
&spr_read_generic, &spr_write_generic,
0x00000000);
}
| true | qemu | 45ed0be146b7433d1123f09eb1a984210a311625 | static void gen_spr_power8_tce_address_control(CPUPPCState *env)
{
spr_register(env, SPR_TAR, "TAR",
&spr_read_generic, &spr_write_generic,
&spr_read_generic, &spr_write_generic,
0x00000000);
}
| {
"code": [
" &spr_read_generic, &spr_write_generic,"
],
"line_no": [
7
]
} | static void FUNC_0(CPUPPCState *VAR_0)
{
spr_register(VAR_0, SPR_TAR, "TAR",
&spr_read_generic, &spr_write_generic,
&spr_read_generic, &spr_write_generic,
0x00000000);
}
| [
"static void FUNC_0(CPUPPCState *VAR_0)\n{",
"spr_register(VAR_0, SPR_TAR, \"TAR\",\n&spr_read_generic, &spr_write_generic,\n&spr_read_generic, &spr_write_generic,\n0x00000000);",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5,
7,
9,
11
],
[
13
]
] |
26,040 | static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
int n, int coded, int intra)
{
int level, i, last, run;
int dc_pred_dir;
RLTable * rl;
RL_VLC_ELEM * rl_vlc;
const UINT8 * scan_table;
int qmul, qadd;
if(intra) {
/* DC coef *... | true | FFmpeg | ce3bcaeda1dec8bdc25d4daf5a8358feafe5d124 | static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
int n, int coded, int intra)
{
int level, i, last, run;
int dc_pred_dir;
RLTable * rl;
RL_VLC_ELEM * rl_vlc;
const UINT8 * scan_table;
int qmul, qadd;
if(intra) {
if... | {
"code": [
" if(abs_level<=MAX_LEVEL && run<=MAX_RUN && ((s->workaround_bugs&FF_BUG_AC_VLC)==0)){",
" if(abs_level <= rl->max_level[last][run]*2){",
" fprintf(stderr, \"illegal 3. esc, esc 1 encoding possible\\n\");",
" ... | static inline int FUNC_0(MpegEncContext * VAR_0, DCTELEM * VAR_1,
int VAR_2, int VAR_3, int VAR_4)
{
int VAR_5, VAR_6, VAR_7, VAR_8;
int VAR_9;
RLTable * rl;
RL_VLC_ELEM * rl_vlc;
const UINT8 * VAR_10;
int VAR_11, VAR_12;
if(VAR_4) {
if(VA... | [
"static inline int FUNC_0(MpegEncContext * VAR_0, DCTELEM * VAR_1,\nint VAR_2, int VAR_3, int VAR_4)\n{",
"int VAR_5, VAR_6, VAR_7, VAR_8;",
"int VAR_9;",
"RLTable * rl;",
"RL_VLC_ELEM * rl_vlc;",
"const UINT8 * VAR_10;",
"int VAR_11, VAR_12;",
"if(VAR_4) {",
"if(VAR_0->partitioned_frame){",
"VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
... |
26,041 | int load_uboot(const char *filename, target_ulong *ep, int *is_linux)
{
int fd;
int size;
uboot_image_header_t h;
uboot_image_header_t *hdr = &h;
uint8_t *data = NULL;
fd = open(filename, O_RDONLY | O_BINARY);
if (fd < 0)
return -1;
size = read(fd, hdr, sizeof(ubo... | true | qemu | 265ca29a7162a9437efabdb3b133237eef49ab7b | int load_uboot(const char *filename, target_ulong *ep, int *is_linux)
{
int fd;
int size;
uboot_image_header_t h;
uboot_image_header_t *hdr = &h;
uint8_t *data = NULL;
fd = open(filename, O_RDONLY | O_BINARY);
if (fd < 0)
return -1;
size = read(fd, hdr, sizeof(ubo... | {
"code": [
" goto fail;",
" goto fail;",
" goto fail;",
" goto fail;",
" goto fail;",
" goto fail;",
" return hdr->ih_size;",
"fail:",
" return -1;"
],
"line_no": [
31,
31,
31,
31,
31,
31,
109,
113... | int FUNC_0(const char *VAR_0, target_ulong *VAR_1, int *VAR_2)
{
int VAR_3;
int VAR_4;
uboot_image_header_t h;
uboot_image_header_t *hdr = &h;
uint8_t *data = NULL;
VAR_3 = open(VAR_0, O_RDONLY | O_BINARY);
if (VAR_3 < 0)
return -1;
VAR_4 = read(VAR_3, hdr, sizeof... | [
"int FUNC_0(const char *VAR_0, target_ulong *VAR_1, int *VAR_2)\n{",
"int VAR_3;",
"int VAR_4;",
"uboot_image_header_t h;",
"uboot_image_header_t *hdr = &h;",
"uint8_t *data = NULL;",
"VAR_3 = open(VAR_0, O_RDONLY | O_BINARY);",
"if (VAR_3 < 0)\nreturn -1;",
"VAR_4 = read(VAR_3, hdr, sizeof(uboot_im... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
1,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21,
23
],
[
27
],
[
29,
31
],
[
35
],
[
39,
41
],
[
47
],
[
49
],
[
51
],
[
53
],
[
59
],
[
61
],
... |
26,042 | static int64_t alloc_refcount_block(BlockDriverState *bs, int64_t cluster_index)
{
BDRVQcowState *s = bs->opaque;
unsigned int refcount_table_index;
int ret;
BLKDBG_EVENT(bs->file, BLKDBG_REFBLOCK_ALLOC);
/* Find the refcount block for the given cluster */
refcount_table_index = clust... | true | qemu | 25408c09502be036e5575754fe54019ed4ed5dfa | static int64_t alloc_refcount_block(BlockDriverState *bs, int64_t cluster_index)
{
BDRVQcowState *s = bs->opaque;
unsigned int refcount_table_index;
int ret;
BLKDBG_EVENT(bs->file, BLKDBG_REFBLOCK_ALLOC);
refcount_table_index = cluster_index >> (s->cluster_bits - REFCOUNT_SHIFT);
... | {
"code": [
" memset(s->refcount_block_cache, 0, s->cluster_size);",
" s->refcount_block_cache_offset = new_block;"
],
"line_no": [
119,
121
]
} | static int64_t FUNC_0(BlockDriverState *bs, int64_t cluster_index)
{
BDRVQcowState *s = bs->opaque;
unsigned int VAR_0;
int VAR_1;
BLKDBG_EVENT(bs->file, BLKDBG_REFBLOCK_ALLOC);
VAR_0 = cluster_index >> (s->cluster_bits - REFCOUNT_SHIFT);
if (VAR_0 < s->refcount_table_size) {
... | [
"static int64_t FUNC_0(BlockDriverState *bs, int64_t cluster_index)\n{",
"BDRVQcowState *s = bs->opaque;",
"unsigned int VAR_0;",
"int VAR_1;",
"BLKDBG_EVENT(bs->file, BLKDBG_REFBLOCK_ALLOC);",
"VAR_0 = cluster_index >> (s->cluster_bits - REFCOUNT_SHIFT);",
"if (VAR_0 < s->refcount_table_size) {",
"ui... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
19
],
[
23
],
[
27,
29
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
101
],
... |
26,043 | static int parse_vtrk(AVFormatContext *s,
FourxmDemuxContext *fourxm, uint8_t *buf, int size)
{
AVStream *st;
/* check that there is enough data */
if (size != vtrk_SIZE) {
return AVERROR_INVALIDDATA;
}
/* allocate a new AVStream */
st = avformat_new_stre... | true | FFmpeg | 42d73f7f6bea0ee0f64a3ad4882860ce5b923a11 | static int parse_vtrk(AVFormatContext *s,
FourxmDemuxContext *fourxm, uint8_t *buf, int size)
{
AVStream *st;
if (size != vtrk_SIZE) {
return AVERROR_INVALIDDATA;
}
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
... | {
"code": [
" FourxmDemuxContext *fourxm, uint8_t *buf, int size)",
" if (size != vtrk_SIZE) {",
" FourxmDemuxContext *fourxm, uint8_t *buf, int size)"
],
"line_no": [
3,
11,
3
]
} | static int FUNC_0(AVFormatContext *VAR_0,
FourxmDemuxContext *VAR_1, uint8_t *VAR_2, int VAR_3)
{
AVStream *st;
if (VAR_3 != vtrk_SIZE) {
return AVERROR_INVALIDDATA;
}
st = avformat_new_stream(VAR_0, NULL);
if (!st)
return AVERROR(ENOMEM);... | [
"static int FUNC_0(AVFormatContext *VAR_0,\nFourxmDemuxContext *VAR_1, uint8_t *VAR_2, int VAR_3)\n{",
"AVStream *st;",
"if (VAR_3 != vtrk_SIZE) {",
"return AVERROR_INVALIDDATA;",
"}",
"st = avformat_new_stream(VAR_0, NULL);",
"if (!st)\nreturn AVERROR(ENOMEM);",
"avpriv_set_pts_info(st, 60, 1, VAR_1-... | [
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
21
],
[
23,
25
],
[
29
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
55
]
] |
26,044 | void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd)
{
if (bs->backing_hd) {
assert(bs->backing_blocker);
bdrv_op_unblock_all(bs->backing_hd, bs->backing_blocker);
} else if (backing_hd) {
error_setg(&bs->backing_blocker,
"device is use... | true | qemu | bb00021de0b5908bc2c3ca467ad9a2b0c9c36459 | void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd)
{
if (bs->backing_hd) {
assert(bs->backing_blocker);
bdrv_op_unblock_all(bs->backing_hd, bs->backing_blocker);
} else if (backing_hd) {
error_setg(&bs->backing_blocker,
"device is use... | {
"code": [
" bdrv_op_unblock(bs->backing_hd, BLOCK_OP_TYPE_COMMIT,"
],
"line_no": [
51
]
} | void FUNC_0(BlockDriverState *VAR_0, BlockDriverState *VAR_1)
{
if (VAR_0->VAR_1) {
assert(VAR_0->backing_blocker);
bdrv_op_unblock_all(VAR_0->VAR_1, VAR_0->backing_blocker);
} else if (VAR_1) {
error_setg(&VAR_0->backing_blocker,
"device is used as backing hd... | [
"void FUNC_0(BlockDriverState *VAR_0, BlockDriverState *VAR_1)\n{",
"if (VAR_0->VAR_1) {",
"assert(VAR_0->backing_blocker);",
"bdrv_op_unblock_all(VAR_0->VAR_1, VAR_0->backing_blocker);",
"} else if (VAR_1) {",
"error_setg(&VAR_0->backing_blocker,\n\"device is used as backing hd of '%s'\",\nbdrv_get_devic... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15,
17,
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
47
],
[
51,
53... |
26,045 | static void scsi_command_complete(void *opaque, int ret)
{
SCSIGenericReq *r = (SCSIGenericReq *)opaque;
SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, r->req.dev);
r->req.aiocb = NULL;
s->driver_status = r->io_header.driver_status;
if (s->driver_status & SG_ERR_DRIVER_SENSE)
... | true | qemu | a1f0cce2ac0243572ff72aa561da67fe3766a395 | static void scsi_command_complete(void *opaque, int ret)
{
SCSIGenericReq *r = (SCSIGenericReq *)opaque;
SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, r->req.dev);
r->req.aiocb = NULL;
s->driver_status = r->io_header.driver_status;
if (s->driver_status & SG_ERR_DRIVER_SENSE)
... | {
"code": [
" if (ret != 0)",
" r->req.status = BUSY;",
" else {"
],
"line_no": [
21,
23,
25
]
} | static void FUNC_0(void *VAR_0, int VAR_1)
{
SCSIGenericReq *r = (SCSIGenericReq *)VAR_0;
SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, r->req.dev);
r->req.aiocb = NULL;
s->driver_status = r->io_header.driver_status;
if (s->driver_status & SG_ERR_DRIVER_SENSE)
s->senselen ... | [
"static void FUNC_0(void *VAR_0, int VAR_1)\n{",
"SCSIGenericReq *r = (SCSIGenericReq *)VAR_0;",
"SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, r->req.dev);",
"r->req.aiocb = NULL;",
"s->driver_status = r->io_header.driver_status;",
"if (s->driver_status & SG_ERR_DRIVER_SENSE)\ns->senselen = r->... | [
0,
0,
0,
0,
0,
0,
1,
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
],
[
41,
43
],
[
45
],
[
47,
49
],
... |
26,046 | static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs,
int64_t offset,
int64_t length,
uint64_t addend,
... | true | qemu | 7453c96b78c2b09aa72924f933bb9616e5474194 | static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs,
int64_t offset,
int64_t length,
uint64_t addend,
... | {
"code": [
" uint16_t *refcount_block = NULL;",
" (void**) &refcount_block);",
" refcount = be16_to_cpu(refcount_block[block_index]);",
" refcount_block[block_index] = cpu_to_be16(refcount);",
" wret = qcow2_cache_put(bs, s->refcount_block_cache,",
"... | static int VAR_0 update_refcount(BlockDriverState *bs,
int64_t offset,
int64_t length,
uint64_t addend,
bool dec... | [
"static int VAR_0 update_refcount(BlockDriverState *bs,\nint64_t offset,\nint64_t length,\nuint64_t addend,\nbool decrease,\nenum qcow2_discard_type type)\n{",
"BDRVQcowState *s = bs->opaque;",
"int64_t start, last, cluster_offset;",
"uint16_t *refcount_block = NULL;",
"int64_t old_table_index = -1;",
"in... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0... | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
29,
31,
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51,
53
],
[
55
... |
26,047 | int ff_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, int buf_size)
{
GetBitContext gb;
int specific_config_bitindex;
init_get_bits(&gb, buf, buf_size*8);
c->object_type = get_object_type(&gb);
c->sample_rate = get_sample_rate(&gb, &c->sampling_index);
c->chan_config = g... | false | FFmpeg | 37216b99e090a88d98be57a8aab14a8316b96a71 | int ff_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, int buf_size)
{
GetBitContext gb;
int specific_config_bitindex;
init_get_bits(&gb, buf, buf_size*8);
c->object_type = get_object_type(&gb);
c->sample_rate = get_sample_rate(&gb, &c->sampling_index);
c->chan_config = g... | {
"code": [],
"line_no": []
} | int FUNC_0(MPEG4AudioConfig *VAR_0, const uint8_t *VAR_1, int VAR_2)
{
GetBitContext gb;
int VAR_3;
init_get_bits(&gb, VAR_1, VAR_2*8);
VAR_0->object_type = get_object_type(&gb);
VAR_0->sample_rate = get_sample_rate(&gb, &VAR_0->sampling_index);
VAR_0->chan_config = get_bits(&gb, 4);
... | [
"int FUNC_0(MPEG4AudioConfig *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{",
"GetBitContext gb;",
"int VAR_3;",
"init_get_bits(&gb, VAR_1, VAR_2*8);",
"VAR_0->object_type = get_object_type(&gb);",
"VAR_0->sample_rate = get_sample_rate(&gb, &VAR_0->sampling_index);",
"VAR_0->chan_config = get_bits(&gb, 4);... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
... |
26,048 | void ff_hevc_luma_mv_mvp_mode(HEVCContext *s, int x0, int y0, int nPbW,
int nPbH, int log2_cb_size, int part_idx,
int merge_idx, MvField *mv,
int mvp_lx_flag, int LX)
{
HEVCLocalContext *lc = s->HEVClc;
MvField *tab_... | false | FFmpeg | 97bb456b6b787bb36e2785072e604ba0db9a43df | void ff_hevc_luma_mv_mvp_mode(HEVCContext *s, int x0, int y0, int nPbW,
int nPbH, int log2_cb_size, int part_idx,
int merge_idx, MvField *mv,
int mvp_lx_flag, int LX)
{
HEVCLocalContext *lc = s->HEVClc;
MvField *tab_... | {
"code": [],
"line_no": []
} | void FUNC_0(HEVCContext *VAR_0, int VAR_1, int VAR_2, int VAR_3,
int VAR_4, int VAR_5, int VAR_6,
int VAR_7, MvField *VAR_8,
int VAR_9, int VAR_10)
{
HEVCLocalContext *lc = VAR_0->HEVClc;
MvField *tab_mvf = VAR_0->re... | [
"void FUNC_0(HEVCContext *VAR_0, int VAR_1, int VAR_2, int VAR_3,\nint VAR_4, int VAR_5, int VAR_6,\nint VAR_7, MvField *VAR_8,\nint VAR_9, int VAR_10)\n{",
"HEVCLocalContext *lc = VAR_0->HEVClc;",
"MvField *tab_mvf = VAR_0->ref->tab_mvf;",
"int VAR_11 = 0;",
"int VAR_12 = 1;",
"int VAR_13 = 1;",
"int V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
26,050 | static void pc_compat_2_0(MachineState *machine)
{
smbios_legacy_mode = true;
has_reserved_memory = false;
} | true | qemu | 07fb61760cdea7c3f1b9c897513986945bca8e89 | static void pc_compat_2_0(MachineState *machine)
{
smbios_legacy_mode = true;
has_reserved_memory = false;
} | {
"code": [],
"line_no": []
} | static void FUNC_0(MachineState *VAR_0)
{
smbios_legacy_mode = true;
has_reserved_memory = false;
} | [
"static void FUNC_0(MachineState *VAR_0)\n{",
"smbios_legacy_mode = true;",
"has_reserved_memory = false;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
22
],
[
24
],
[
26
]
] |
26,051 | static CharDriverState *qemu_chr_open_msmouse(const char *id,
ChardevBackend *backend,
ChardevReturn *ret,
Error **errp)
{
ChardevCommon *common = backend->u.msmouse.data;
... | true | qemu | 71200fb9664c2967a1cdd22b68b0da3a8b2b3eb7 | static CharDriverState *qemu_chr_open_msmouse(const char *id,
ChardevBackend *backend,
ChardevReturn *ret,
Error **errp)
{
ChardevCommon *common = backend->u.msmouse.data;
... | {
"code": [],
"line_no": []
} | static CharDriverState *FUNC_0(const char *id,
ChardevBackend *backend,
ChardevReturn *ret,
Error **errp)
{
ChardevCommon *common = backend->u.msmouse.data;
MouseState ... | [
"static CharDriverState *FUNC_0(const char *id,\nChardevBackend *backend,\nChardevReturn *ret,\nError **errp)\n{",
"ChardevCommon *common = backend->u.msmouse.data;",
"MouseState *mouse;",
"CharDriverState *chr;",
"chr = qemu_chr_alloc(common, errp);",
"chr->chr_write = msmouse_chr_write;",
"chr->chr_cl... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
24
],
[
26
],
[
28
],
[
30
],
[
34
],
[
36,
38
],
[
42
],
[
44
],
[
48
]
] |
26,052 | int kvm_arch_on_sigbus_vcpu(CPUState *env, int code, void *addr)
{
#ifdef KVM_CAP_MCE
ram_addr_t ram_addr;
target_phys_addr_t paddr;
if ((env->mcg_cap & MCG_SER_P) && addr
&& (code == BUS_MCEERR_AR || code == BUS_MCEERR_AO)) {
if (qemu_ram_addr_from_host(addr, &ram_addr) ||
... | true | qemu | 3c85e74fbf9e5a39d8d13ef91a5f3dd91f0bc8a8 | int kvm_arch_on_sigbus_vcpu(CPUState *env, int code, void *addr)
{
#ifdef KVM_CAP_MCE
ram_addr_t ram_addr;
target_phys_addr_t paddr;
if ((env->mcg_cap & MCG_SER_P) && addr
&& (code == BUS_MCEERR_AR || code == BUS_MCEERR_AO)) {
if (qemu_ram_addr_from_host(addr, &ram_addr) ||
... | {
"code": [],
"line_no": []
} | int FUNC_0(CPUState *VAR_0, int VAR_1, void *VAR_2)
{
#ifdef KVM_CAP_MCE
ram_addr_t ram_addr;
target_phys_addr_t paddr;
if ((VAR_0->mcg_cap & MCG_SER_P) && VAR_2
&& (VAR_1 == BUS_MCEERR_AR || VAR_1 == BUS_MCEERR_AO)) {
if (qemu_ram_addr_from_host(VAR_2, &ram_addr) ||
!k... | [
"int FUNC_0(CPUState *VAR_0, int VAR_1, void *VAR_2)\n{",
"#ifdef KVM_CAP_MCE\nram_addr_t ram_addr;",
"target_phys_addr_t paddr;",
"if ((VAR_0->mcg_cap & MCG_SER_P) && VAR_2\n&& (VAR_1 == BUS_MCEERR_AR || VAR_1 == BUS_MCEERR_AO)) {",
"if (qemu_ram_addr_from_host(VAR_2, &ram_addr) ||\n!kvm_physical_memory_ad... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
13,
15
],
[
17,
19,
21
],
[
23,
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
42
],
[
44
],
[
46,
48
],
[
50
],
[
52
... |
26,053 | static int vc1_decode_intra_block(VC1Context *v, DCTELEM block[64], int n, int coded, int mquant, int codingset)
{
GetBitContext *gb = &v->s.gb;
MpegEncContext *s = &v->s;
int dc_pred_dir = 0; /* Direction of the DC prediction used */
int run_diff, i;
int16_t *dc_val;
int16_t *ac_val, *ac... | true | FFmpeg | 6f3e4e1712260ef8c5b4754d781ccd80bcfa1d0c | static int vc1_decode_intra_block(VC1Context *v, DCTELEM block[64], int n, int coded, int mquant, int codingset)
{
GetBitContext *gb = &v->s.gb;
MpegEncContext *s = &v->s;
int dc_pred_dir = 0;
int run_diff, i;
int16_t *dc_val;
int16_t *ac_val, *ac_val2;
int dcdiff;
int mb_pos =... | {
"code": [
" if(dc_pred_dir && c_avail) q2 = s->current_picture.qscale_table[mb_pos - 1];",
" if(!dc_pred_dir && a_avail) q2 = s->current_picture.qscale_table[mb_pos - s->mb_stride];"
],
"line_no": [
171,
173
]
} | static int FUNC_0(VC1Context *VAR_0, DCTELEM VAR_1[64], int VAR_2, int VAR_3, int VAR_4, int VAR_5)
{
GetBitContext *gb = &VAR_0->s.gb;
MpegEncContext *s = &VAR_0->s;
int VAR_6 = 0;
int VAR_7, VAR_8;
int16_t *dc_val;
int16_t *ac_val, *ac_val2;
int VAR_9;
int VAR_10 = s->mb_x + ... | [
"static int FUNC_0(VC1Context *VAR_0, DCTELEM VAR_1[64], int VAR_2, int VAR_3, int VAR_4, int VAR_5)\n{",
"GetBitContext *gb = &VAR_0->s.gb;",
"MpegEncContext *s = &VAR_0->s;",
"int VAR_6 = 0;",
"int VAR_7, VAR_8;",
"int16_t *dc_val;",
"int16_t *ac_val, *ac_val2;",
"int VAR_9;",
"int VAR_10 = s->mb_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
33
],
[
39
],
[
41
],
[
47
],
[
49
],
[
51
],
[
53
... |
26,054 | static int can_safely_read(GetBitContext* gb, uint64_t bits) {
return get_bits_left(gb) >= bits;
}
| false | FFmpeg | e494f44c051d7dccc038a603ab22532b87dd1705 | static int can_safely_read(GetBitContext* gb, uint64_t bits) {
return get_bits_left(gb) >= bits;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(GetBitContext* VAR_0, uint64_t VAR_1) {
return get_bits_left(VAR_0) >= VAR_1;
}
| [
"static int FUNC_0(GetBitContext* VAR_0, uint64_t VAR_1) {",
"return get_bits_left(VAR_0) >= VAR_1;",
"}"
] | [
0,
0,
0
] | [
[
1
],
[
3
],
[
5
]
] |
26,055 | static int tta_probe(AVProbeData *p)
{
const uint8_t *d = p->buf;
if (p->buf_size < 4)
return 0;
if (d[0] == 'T' && d[1] == 'T' && d[2] == 'A' && d[3] == '1')
return 80;
return 0;
}
| false | FFmpeg | 87e8788680e16c51f6048af26f3f7830c35207a5 | static int tta_probe(AVProbeData *p)
{
const uint8_t *d = p->buf;
if (p->buf_size < 4)
return 0;
if (d[0] == 'T' && d[1] == 'T' && d[2] == 'A' && d[3] == '1')
return 80;
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(AVProbeData *VAR_0)
{
const uint8_t *VAR_1 = VAR_0->buf;
if (VAR_0->buf_size < 4)
return 0;
if (VAR_1[0] == 'T' && VAR_1[1] == 'T' && VAR_1[2] == 'A' && VAR_1[3] == '1')
return 80;
return 0;
}
| [
"static int FUNC_0(AVProbeData *VAR_0)\n{",
"const uint8_t *VAR_1 = VAR_0->buf;",
"if (VAR_0->buf_size < 4)\nreturn 0;",
"if (VAR_1[0] == 'T' && VAR_1[1] == 'T' && VAR_1[2] == 'A' && VAR_1[3] == '1')\nreturn 80;",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11,
13
],
[
15
],
[
17
]
] |
26,056 | static void qcow2_cache_table_release(BlockDriverState *bs, Qcow2Cache *c,
int i, int num_tables)
{
/* Using MADV_DONTNEED to discard memory is a Linux-specific feature */
#ifdef CONFIG_LINUX
BDRVQcow2State *s = bs->opaque;
void *t = qcow2_cache_get_table_addr(bs, c, ... | false | qemu | 08546bcfb260c28141e27cf3367c443528602fc0 | static void qcow2_cache_table_release(BlockDriverState *bs, Qcow2Cache *c,
int i, int num_tables)
{
#ifdef CONFIG_LINUX
BDRVQcow2State *s = bs->opaque;
void *t = qcow2_cache_get_table_addr(bs, c, i);
int align = getpagesize();
size_t mem_size = (size_t) s->... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0, Qcow2Cache *VAR_1,
int VAR_2, int VAR_3)
{
#ifdef CONFIG_LINUX
BDRVQcow2State *s = VAR_0->opaque;
void *t = qcow2_cache_get_table_addr(VAR_0, VAR_1, VAR_2);
int align = getpagesize();
size_t mem_size = (size_t) s-... | [
"static void FUNC_0(BlockDriverState *VAR_0, Qcow2Cache *VAR_1,\nint VAR_2, int VAR_3)\n{",
"#ifdef CONFIG_LINUX\nBDRVQcow2State *s = VAR_0->opaque;",
"void *t = qcow2_cache_get_table_addr(VAR_0, VAR_1, VAR_2);",
"int align = getpagesize();",
"size_t mem_size = (size_t) s->cluster_size * VAR_3;",
"size_t ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
]
] |
26,057 | static void qpi_init(void)
{
kqemu_comm_base = 0xff000000 | 1;
qpi_io_memory = cpu_register_io_memory(
qpi_mem_read,
qpi_mem_write, NULL);
cpu_register_physical_memory(kqemu_comm_base & ~0xfff,
... | false | qemu | 4a1418e07bdcfaa3177739e04707ecaec75d89e1 | static void qpi_init(void)
{
kqemu_comm_base = 0xff000000 | 1;
qpi_io_memory = cpu_register_io_memory(
qpi_mem_read,
qpi_mem_write, NULL);
cpu_register_physical_memory(kqemu_comm_base & ~0xfff,
... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
kqemu_comm_base = 0xff000000 | 1;
qpi_io_memory = cpu_register_io_memory(
qpi_mem_read,
qpi_mem_write, NULL);
cpu_register_physical_memory(kqemu_comm_base & ~0xfff,
... | [
"static void FUNC_0(void)\n{",
"kqemu_comm_base = 0xff000000 | 1;",
"qpi_io_memory = cpu_register_io_memory(\nqpi_mem_read,\nqpi_mem_write, NULL);",
"cpu_register_physical_memory(kqemu_comm_base & ~0xfff,\n0x1000, qpi_io_memory);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9,
11
],
[
13,
15
],
[
17
]
] |
26,058 | tight_detect_smooth_image(VncState *vs, int w, int h)
{
uint errors;
int compression = vs->tight.compression;
int quality = vs->tight.quality;
if (!vs->vd->lossy) {
return 0;
}
if (ds_get_bytes_per_pixel(vs->ds) == 1 ||
vs->clientds.pf.bytes_per_pixel == 1 ||
... | false | qemu | 7bccf57383cca60a778d5c543ac80c9f62d89ef2 | tight_detect_smooth_image(VncState *vs, int w, int h)
{
uint errors;
int compression = vs->tight.compression;
int quality = vs->tight.quality;
if (!vs->vd->lossy) {
return 0;
}
if (ds_get_bytes_per_pixel(vs->ds) == 1 ||
vs->clientds.pf.bytes_per_pixel == 1 ||
... | {
"code": [],
"line_no": []
} | FUNC_0(VncState *VAR_0, int VAR_1, int VAR_2)
{
uint errors;
int VAR_3 = VAR_0->tight.VAR_3;
int VAR_4 = VAR_0->tight.VAR_4;
if (!VAR_0->vd->lossy) {
return 0;
}
if (ds_get_bytes_per_pixel(VAR_0->ds) == 1 ||
VAR_0->clientds.pf.bytes_per_pixel == 1 ||
VAR_1 <... | [
"FUNC_0(VncState *VAR_0, int VAR_1, int VAR_2)\n{",
"uint errors;",
"int VAR_3 = VAR_0->tight.VAR_3;",
"int VAR_4 = VAR_0->tight.VAR_4;",
"if (!VAR_0->vd->lossy) {",
"return 0;",
"}",
"if (ds_get_bytes_per_pixel(VAR_0->ds) == 1 ||\nVAR_0->clientds.pf.bytes_per_pixel == 1 ||\nVAR_1 < VNC_TIGHT_DETECT_M... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
21,
23,
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
26,060 | static void list_formats(AVFormatContext *ctx, int type)
{
const struct video_data *s = ctx->priv_data;
struct v4l2_fmtdesc vfd = { .type = V4L2_BUF_TYPE_VIDEO_CAPTURE };
while(!v4l2_ioctl(s->fd, VIDIOC_ENUM_FMT, &vfd)) {
enum AVCodecID codec_id = avpriv_fmt_v4l2codec(vfd.pixelformat);
... | false | FFmpeg | 931da6a5e9dd54563fe5d4d30b7bd4d0a0218c87 | static void list_formats(AVFormatContext *ctx, int type)
{
const struct video_data *s = ctx->priv_data;
struct v4l2_fmtdesc vfd = { .type = V4L2_BUF_TYPE_VIDEO_CAPTURE };
while(!v4l2_ioctl(s->fd, VIDIOC_ENUM_FMT, &vfd)) {
enum AVCodecID codec_id = avpriv_fmt_v4l2codec(vfd.pixelformat);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVFormatContext *VAR_0, int VAR_1)
{
const struct video_data *VAR_2 = VAR_0->priv_data;
struct v4l2_fmtdesc VAR_3 = { .VAR_1 = V4L2_BUF_TYPE_VIDEO_CAPTURE };
while(!v4l2_ioctl(VAR_2->fd, VIDIOC_ENUM_FMT, &VAR_3)) {
enum AVCodecID VAR_4 = avpriv_fmt_v4l2codec(VAR_3.pixelform... | [
"static void FUNC_0(AVFormatContext *VAR_0, int VAR_1)\n{",
"const struct video_data *VAR_2 = VAR_0->priv_data;",
"struct v4l2_fmtdesc VAR_3 = { .VAR_1 = V4L2_BUF_TYPE_VIDEO_CAPTURE };",
"while(!v4l2_ioctl(VAR_2->fd, VIDIOC_ENUM_FMT, &VAR_3)) {",
"enum AVCodecID VAR_4 = avpriv_fmt_v4l2codec(VAR_3.pixelforma... | [
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
],
[
19
],
[
23,
25
],
[
27
],
[
29,
31,
33
],
[
35
],
[
37
],
[
39
],
[
41,
43,
45
],
[
47
],
[
49
],
[
51
],
... |
26,062 | static CharDriverState *qemu_chr_open_pp_fd(int fd, Error **errp)
{
CharDriverState *chr;
ParallelCharDriver *drv;
if (ioctl(fd, PPCLAIM) < 0) {
error_setg_errno(errp, errno, "not a parallel port");
close(fd);
return NULL;
}
drv = g_new0(ParallelCharDriver, 1);
... | false | qemu | d0d7708ba29cbcc343364a46bff981e0ff88366f | static CharDriverState *qemu_chr_open_pp_fd(int fd, Error **errp)
{
CharDriverState *chr;
ParallelCharDriver *drv;
if (ioctl(fd, PPCLAIM) < 0) {
error_setg_errno(errp, errno, "not a parallel port");
close(fd);
return NULL;
}
drv = g_new0(ParallelCharDriver, 1);
... | {
"code": [],
"line_no": []
} | static CharDriverState *FUNC_0(int fd, Error **errp)
{
CharDriverState *chr;
ParallelCharDriver *drv;
if (ioctl(fd, PPCLAIM) < 0) {
error_setg_errno(errp, errno, "not a parallel port");
close(fd);
return NULL;
}
drv = g_new0(ParallelCharDriver, 1);
drv->fd =... | [
"static CharDriverState *FUNC_0(int fd, Error **errp)\n{",
"CharDriverState *chr;",
"ParallelCharDriver *drv;",
"if (ioctl(fd, PPCLAIM) < 0) {",
"error_setg_errno(errp, errno, \"not a parallel port\");",
"close(fd);",
"return NULL;",
"}",
"drv = g_new0(ParallelCharDriver, 1);",
"drv->fd = fd;",
... | [
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
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
]
] |
26,063 | static QError *qerror_from_info(const char *fmt, va_list *va)
{
QError *qerr;
qerr = qerror_new();
loc_save(&qerr->loc);
qerr->error = error_obj_from_fmt_no_fail(fmt, va);
qerr->err_msg = qerror_format(fmt, qerr->error);
return qerr;
}
| false | qemu | 13f59ae8157e8ec238fa8aefe5309909a1eeb7e2 | static QError *qerror_from_info(const char *fmt, va_list *va)
{
QError *qerr;
qerr = qerror_new();
loc_save(&qerr->loc);
qerr->error = error_obj_from_fmt_no_fail(fmt, va);
qerr->err_msg = qerror_format(fmt, qerr->error);
return qerr;
}
| {
"code": [],
"line_no": []
} | static QError *FUNC_0(const char *fmt, va_list *va)
{
QError *qerr;
qerr = qerror_new();
loc_save(&qerr->loc);
qerr->error = error_obj_from_fmt_no_fail(fmt, va);
qerr->err_msg = qerror_format(fmt, qerr->error);
return qerr;
}
| [
"static QError *FUNC_0(const char *fmt, va_list *va)\n{",
"QError *qerr;",
"qerr = qerror_new();",
"loc_save(&qerr->loc);",
"qerr->error = error_obj_from_fmt_no_fail(fmt, va);",
"qerr->err_msg = qerror_format(fmt, qerr->error);",
"return qerr;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
]
] |
26,064 | static void unblock_io_signals(void)
{
sigset_t set;
sigemptyset(&set);
sigaddset(&set, SIGUSR2);
sigaddset(&set, SIGIO);
sigaddset(&set, SIGALRM);
pthread_sigmask(SIG_UNBLOCK, &set, NULL);
sigemptyset(&set);
sigaddset(&set, SIGUSR1);
pthread_sigmask(SIG_BLOCK, &set, NU... | false | qemu | cc84de9570ffe01a9c3c169bd62ab9586a9a080c | static void unblock_io_signals(void)
{
sigset_t set;
sigemptyset(&set);
sigaddset(&set, SIGUSR2);
sigaddset(&set, SIGIO);
sigaddset(&set, SIGALRM);
pthread_sigmask(SIG_UNBLOCK, &set, NULL);
sigemptyset(&set);
sigaddset(&set, SIGUSR1);
pthread_sigmask(SIG_BLOCK, &set, NU... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
sigset_t set;
sigemptyset(&set);
sigaddset(&set, SIGUSR2);
sigaddset(&set, SIGIO);
sigaddset(&set, SIGALRM);
pthread_sigmask(SIG_UNBLOCK, &set, NULL);
sigemptyset(&set);
sigaddset(&set, SIGUSR1);
pthread_sigmask(SIG_BLOCK, &set, NULL);
}
| [
"static void FUNC_0(void)\n{",
"sigset_t set;",
"sigemptyset(&set);",
"sigaddset(&set, SIGUSR2);",
"sigaddset(&set, SIGIO);",
"sigaddset(&set, SIGALRM);",
"pthread_sigmask(SIG_UNBLOCK, &set, NULL);",
"sigemptyset(&set);",
"sigaddset(&set, SIGUSR1);",
"pthread_sigmask(SIG_BLOCK, &set, NULL);",
"}... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
26,065 | float32 helper_fqtos(CPUSPARCState *env)
{
float32 ret;
clear_float_exceptions(env);
ret = float128_to_float32(QT1, &env->fp_status);
check_ieee_exceptions(env);
return ret;
}
| false | qemu | 7385aed20db5d83979f683b9d0048674411e963c | float32 helper_fqtos(CPUSPARCState *env)
{
float32 ret;
clear_float_exceptions(env);
ret = float128_to_float32(QT1, &env->fp_status);
check_ieee_exceptions(env);
return ret;
}
| {
"code": [],
"line_no": []
} | float32 FUNC_0(CPUSPARCState *env)
{
float32 ret;
clear_float_exceptions(env);
ret = float128_to_float32(QT1, &env->fp_status);
check_ieee_exceptions(env);
return ret;
}
| [
"float32 FUNC_0(CPUSPARCState *env)\n{",
"float32 ret;",
"clear_float_exceptions(env);",
"ret = float128_to_float32(QT1, &env->fp_status);",
"check_ieee_exceptions(env);",
"return ret;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
26,066 | float32 float32_round_to_int( float32 a STATUS_PARAM)
{
flag aSign;
int16 aExp;
bits32 lastBitMask, roundBitsMask;
int8 roundingMode;
float32 z;
aExp = extractFloat32Exp( a );
if ( 0x96 <= aExp ) {
if ( ( aExp == 0xFF ) && extractFloat32Frac( a ) ) {
return pr... | false | qemu | f090c9d4ad5812fb92843d6470a1111c15190c4c | float32 float32_round_to_int( float32 a STATUS_PARAM)
{
flag aSign;
int16 aExp;
bits32 lastBitMask, roundBitsMask;
int8 roundingMode;
float32 z;
aExp = extractFloat32Exp( a );
if ( 0x96 <= aExp ) {
if ( ( aExp == 0xFF ) && extractFloat32Frac( a ) ) {
return pr... | {
"code": [],
"line_no": []
} | float32 FUNC_0( float32 a STATUS_PARAM)
{
flag aSign;
int16 aExp;
bits32 lastBitMask, roundBitsMask;
int8 roundingMode;
float32 z;
aExp = extractFloat32Exp( a );
if ( 0x96 <= aExp ) {
if ( ( aExp == 0xFF ) && extractFloat32Frac( a ) ) {
return propagateFloat32... | [
"float32 FUNC_0( float32 a STATUS_PARAM)\n{",
"flag aSign;",
"int16 aExp;",
"bits32 lastBitMask, roundBitsMask;",
"int8 roundingMode;",
"float32 z;",
"aExp = extractFloat32Exp( a );",
"if ( 0x96 <= aExp ) {",
"if ( ( aExp == 0xFF ) && extractFloat32Frac( a ) ) {",
"return propagateFloat32NaN( a, a... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[... |
26,067 | static void do_drive_backup(DriveBackup *backup, BlockJobTxn *txn, Error **errp)
{
BlockDriverState *bs;
BlockDriverState *target_bs;
BlockDriverState *source = NULL;
BdrvDirtyBitmap *bmap = NULL;
AioContext *aio_context;
QDict *options = NULL;
Error *local_err = NULL;
int flags... | false | qemu | 13b9414b5798539e2dbb87a570d96184fe21edf4 | static void do_drive_backup(DriveBackup *backup, BlockJobTxn *txn, Error **errp)
{
BlockDriverState *bs;
BlockDriverState *target_bs;
BlockDriverState *source = NULL;
BdrvDirtyBitmap *bmap = NULL;
AioContext *aio_context;
QDict *options = NULL;
Error *local_err = NULL;
int flags... | {
"code": [],
"line_no": []
} | static void FUNC_0(DriveBackup *VAR_0, BlockJobTxn *VAR_1, Error **VAR_2)
{
BlockDriverState *bs;
BlockDriverState *target_bs;
BlockDriverState *source = NULL;
BdrvDirtyBitmap *bmap = NULL;
AioContext *aio_context;
QDict *options = NULL;
Error *local_err = NULL;
int VAR_3;
... | [
"static void FUNC_0(DriveBackup *VAR_0, BlockJobTxn *VAR_1, Error **VAR_2)\n{",
"BlockDriverState *bs;",
"BlockDriverState *target_bs;",
"BlockDriverState *source = NULL;",
"BdrvDirtyBitmap *bmap = NULL;",
"AioContext *aio_context;",
"QDict *options = NULL;",
"Error *local_err = NULL;",
"int VAR_3;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
26,068 | static int encrypt_sectors(BDRVQcowState *s, int64_t sector_num,
uint8_t *buf, int nb_sectors, bool enc,
Error **errp)
{
union {
uint64_t ll[2];
uint8_t b[16];
} ivec;
int i;
int ret;
for(i = 0; i < nb_sectors; i++) {
... | false | qemu | d85f4222b4681da7ebf8a90b26e085a68fa2c55a | static int encrypt_sectors(BDRVQcowState *s, int64_t sector_num,
uint8_t *buf, int nb_sectors, bool enc,
Error **errp)
{
union {
uint64_t ll[2];
uint8_t b[16];
} ivec;
int i;
int ret;
for(i = 0; i < nb_sectors; i++) {
... | {
"code": [],
"line_no": []
} | static int FUNC_0(BDRVQcowState *VAR_0, int64_t VAR_1,
uint8_t *VAR_2, int VAR_3, bool VAR_4,
Error **VAR_5)
{
union {
uint64_t ll[2];
uint8_t b[16];
} VAR_6;
int VAR_7;
int VAR_8;
for(VAR_7 = 0; VAR_7 < VAR_3; VAR_7++... | [
"static int FUNC_0(BDRVQcowState *VAR_0, int64_t VAR_1,\nuint8_t *VAR_2, int VAR_3, bool VAR_4,\nError **VAR_5)\n{",
"union {",
"uint64_t ll[2];",
"uint8_t b[16];",
"} VAR_6;",
"int VAR_7;",
"int VAR_8;",
"for(VAR_7 = 0; VAR_7 < VAR_3; VAR_7++) {",
"VAR_6.ll[0] = cpu_to_le64(VAR_1);",
"VAR_6.ll[1]... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29,
31,
33
],
[
35
],
[
37
],
[
39
],
[
41,
43,
45,
47
],
[
49
],
[... |
26,070 | static void nbd_teardown_connection(BlockDriverState *bs)
{
NBDClientSession *client = nbd_get_client_session(bs);
if (!client->ioc) { /* Already closed */
return;
}
/* finish any pending coroutines */
qio_channel_shutdown(client->ioc,
QIO_CHANNEL_SHUTDOW... | false | qemu | a12a712a7dfbd2e2f4882ef2c90a9b2162166dd7 | static void nbd_teardown_connection(BlockDriverState *bs)
{
NBDClientSession *client = nbd_get_client_session(bs);
if (!client->ioc) {
return;
}
qio_channel_shutdown(client->ioc,
QIO_CHANNEL_SHUTDOWN_BOTH,
NULL);
nbd_recv_... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0)
{
NBDClientSession *client = nbd_get_client_session(VAR_0);
if (!client->ioc) {
return;
}
qio_channel_shutdown(client->ioc,
QIO_CHANNEL_SHUTDOWN_BOTH,
NULL);
nbd_recv_coroutines_... | [
"static void FUNC_0(BlockDriverState *VAR_0)\n{",
"NBDClientSession *client = nbd_get_client_session(VAR_0);",
"if (!client->ioc) {",
"return;",
"}",
"qio_channel_shutdown(client->ioc,\nQIO_CHANNEL_SHUTDOWN_BOTH,\nNULL);",
"nbd_recv_coroutines_enter_all(VAR_0);",
"nbd_client_detach_aio_context(VAR_0);... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
19,
21,
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
26,071 | static int cinepak_decode_strip (CinepakContext *s,
cvid_strip *strip, const uint8_t *data, int size)
{
const uint8_t *eod = (data + size);
int chunk_id, chunk_size;
/* coordinate sanity checks */
if (strip->x1 >= s->width || strip->x2 > s->width ||
... | false | FFmpeg | 7056f13a89da1d1f4afd5c6342e7ca6824777125 | static int cinepak_decode_strip (CinepakContext *s,
cvid_strip *strip, const uint8_t *data, int size)
{
const uint8_t *eod = (data + size);
int chunk_id, chunk_size;
if (strip->x1 >= s->width || strip->x2 > s->width ||
strip->y1 >= s->height || s... | {
"code": [],
"line_no": []
} | static int FUNC_0 (CinepakContext *VAR_0,
cvid_strip *VAR_1, const uint8_t *VAR_2, int VAR_3)
{
const uint8_t *VAR_4 = (VAR_2 + VAR_3);
int VAR_5, VAR_6;
if (VAR_1->x1 >= VAR_0->width || VAR_1->x2 > VAR_0->width ||
VAR_1->y1 >= VAR_0->height || V... | [
"static int FUNC_0 (CinepakContext *VAR_0,\ncvid_strip *VAR_1, const uint8_t *VAR_2, int VAR_3)\n{",
"const uint8_t *VAR_4 = (VAR_2 + VAR_3);",
"int VAR_5, VAR_6;",
"if (VAR_1->x1 >= VAR_0->width || VAR_1->x2 > VAR_0->width ||\nVAR_1->y1 >= VAR_0->height || VAR_1->y2 > VAR_0->height ||\nVAR_1->x1 >= 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
],
[
15,
17,
19,
21
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
37
],
[
39
],
[
43
],
[
47,
49,
51,
53,
55,
57
],
[
59
],
[
63,
65,
67,... |
26,072 | static int coroutine_fn bdrv_driver_pwritev(BlockDriverState *bs,
uint64_t offset, uint64_t bytes,
QEMUIOVector *qiov, int flags)
{
BlockDriver *drv = bs->drv;
int64_t sector_num = offset >> BDRV_SECTOR_BITS;
unsig... | false | qemu | 08844473820c93541fc47bdfeae0f2cc88cfab59 | static int coroutine_fn bdrv_driver_pwritev(BlockDriverState *bs,
uint64_t offset, uint64_t bytes,
QEMUIOVector *qiov, int flags)
{
BlockDriver *drv = bs->drv;
int64_t sector_num = offset >> BDRV_SECTOR_BITS;
unsig... | {
"code": [],
"line_no": []
} | static int VAR_0 bdrv_driver_pwritev(BlockDriverState *bs,
uint64_t offset, uint64_t bytes,
QEMUIOVector *qiov, int flags)
{
BlockDriver *drv = bs->drv;
int64_t sector_num = offset >> BDRV_SECTOR_BITS;
unsigned int... | [
"static int VAR_0 bdrv_driver_pwritev(BlockDriverState *bs,\nuint64_t offset, uint64_t bytes,\nQEMUIOVector *qiov, int flags)\n{",
"BlockDriver *drv = bs->drv;",
"int64_t sector_num = offset >> BDRV_SECTOR_BITS;",
"unsigned int nb_sectors = bytes >> BDRV_SECTOR_BITS;",
"int ret;",
"assert((offset & (BDRV_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43,
45,
47
],
[
49
],
[
51
],
[... |
26,073 | static void ss10_init(int ram_size, int vga_ram_size, int boot_device,
DisplayState *ds, const char **fd_filename, int snapshot,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_mo... | false | qemu | b3ceef24f4fee8d5ed96b8c4a5d3e80c0a651f0b | static void ss10_init(int ram_size, int vga_ram_size, int boot_device,
DisplayState *ds, const char **fd_filename, int snapshot,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_mo... | {
"code": [],
"line_no": []
} | static void FUNC_0(int VAR_0, int VAR_1, int VAR_2,
DisplayState *VAR_3, const char **VAR_4, int VAR_5,
const char *VAR_6, const char *VAR_7,
const char *VAR_8, const char *VAR_9)
{
if (VAR_9 == NULL)
VAR_9 = "TI Super... | [
"static void FUNC_0(int VAR_0, int VAR_1, int VAR_2,\nDisplayState *VAR_3, const char **VAR_4, int VAR_5,\nconst char *VAR_6, const char *VAR_7,\nconst char *VAR_8, const char *VAR_9)\n{",
"if (VAR_9 == NULL)\nVAR_9 = \"TI SuperSparc II\";",
"sun4m_common_init(VAR_0, VAR_2, VAR_3, VAR_6,\nVAR_7, VAR_8, VAR_9,\n... | [
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11,
13
],
[
15,
17,
19
],
[
21
]
] |
26,074 | static uint64_t bonito_readl(void *opaque, target_phys_addr_t addr,
unsigned size)
{
PCIBonitoState *s = opaque;
uint32_t saddr;
saddr = (addr - BONITO_REGBASE) >> 2;
DPRINTF("bonito_readl "TARGET_FMT_plx"\n", addr);
switch (saddr) {
case BONITO_INTISR:
... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint64_t bonito_readl(void *opaque, target_phys_addr_t addr,
unsigned size)
{
PCIBonitoState *s = opaque;
uint32_t saddr;
saddr = (addr - BONITO_REGBASE) >> 2;
DPRINTF("bonito_readl "TARGET_FMT_plx"\n", addr);
switch (saddr) {
case BONITO_INTISR:
... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,
unsigned size)
{
PCIBonitoState *s = opaque;
uint32_t saddr;
saddr = (addr - BONITO_REGBASE) >> 2;
DPRINTF("FUNC_0 "TARGET_FMT_plx"\n", addr);
switch (saddr) {
case BONITO_INTISR:
retu... | [
"static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,\nunsigned size)\n{",
"PCIBonitoState *s = opaque;",
"uint32_t saddr;",
"saddr = (addr - BONITO_REGBASE) >> 2;",
"DPRINTF(\"FUNC_0 \"TARGET_FMT_plx\"\\n\", addr);",
"switch (saddr) {",
"case BONITO_INTISR:\nreturn s->regs[saddr];",
"default... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21,
23
],
[
25,
27
],
[
29
],
[
31
]
] |
26,076 | static int ast_write_header(AVFormatContext *s)
{
ASTMuxContext *ast = s->priv_data;
AVIOContext *pb = s->pb;
AVCodecContext *enc;
unsigned int codec_tag;
if (s->nb_streams == 1) {
enc = s->streams[0]->codec;
} else {
av_log(s, AV_LOG_ERROR, "only one stream is support... | false | FFmpeg | b7d77f8e64d5e30982671e861f63654709111a8e | static int ast_write_header(AVFormatContext *s)
{
ASTMuxContext *ast = s->priv_data;
AVIOContext *pb = s->pb;
AVCodecContext *enc;
unsigned int codec_tag;
if (s->nb_streams == 1) {
enc = s->streams[0]->codec;
} else {
av_log(s, AV_LOG_ERROR, "only one stream is support... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
ASTMuxContext *ast = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
AVCodecContext *enc;
unsigned int VAR_1;
if (VAR_0->nb_streams == 1) {
enc = VAR_0->streams[0]->codec;
} else {
av_log(VAR_0, AV_LOG_ERROR, "only one stream ... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"ASTMuxContext *ast = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"AVCodecContext *enc;",
"unsigned int VAR_1;",
"if (VAR_0->nb_streams == 1) {",
"enc = VAR_0->streams[0]->codec;",
"} else {",
"av_log(VAR_0, AV_LOG_ERROR, \"only one stream is s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
... |
26,077 | static int read_old_huffman_tables(HYuvContext *s)
{
GetBitContext gb;
int i;
init_get_bits(&gb, classic_shift_luma,
classic_shift_luma_table_size * 8);
if (read_len_table(s->len[0], &gb) < 0)
return -1;
init_get_bits(&gb, classic_shift_chroma,
... | false | FFmpeg | f67a0d115254461649470452058fa3c28c0df294 | static int read_old_huffman_tables(HYuvContext *s)
{
GetBitContext gb;
int i;
init_get_bits(&gb, classic_shift_luma,
classic_shift_luma_table_size * 8);
if (read_len_table(s->len[0], &gb) < 0)
return -1;
init_get_bits(&gb, classic_shift_chroma,
... | {
"code": [],
"line_no": []
} | static int FUNC_0(HYuvContext *VAR_0)
{
GetBitContext gb;
int VAR_1;
init_get_bits(&gb, classic_shift_luma,
classic_shift_luma_table_size * 8);
if (read_len_table(VAR_0->len[0], &gb) < 0)
return -1;
init_get_bits(&gb, classic_shift_chroma,
cla... | [
"static int FUNC_0(HYuvContext *VAR_0)\n{",
"GetBitContext gb;",
"int VAR_1;",
"init_get_bits(&gb, classic_shift_luma,\nclassic_shift_luma_table_size * 8);",
"if (read_len_table(VAR_0->len[0], &gb) < 0)\nreturn -1;",
"init_get_bits(&gb, classic_shift_chroma,\nclassic_shift_chroma_table_size * 8);",
"if ... | [
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
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55... |
26,078 | static void pc_init_isa(MachineState *machine)
{
has_pci_info = false;
has_acpi_build = false;
smbios_defaults = false;
if (!machine->cpu_model) {
machine->cpu_model = "486";
}
x86_cpu_compat_disable_kvm_features(FEAT_KVM, KVM_FEATURE_PV_EOI);
enable_compat_apic_id_mode... | true | qemu | 5f8632d3c3d7bc5ef24166ba7cf90fcfb2adbf7d | static void pc_init_isa(MachineState *machine)
{
has_pci_info = false;
has_acpi_build = false;
smbios_defaults = false;
if (!machine->cpu_model) {
machine->cpu_model = "486";
}
x86_cpu_compat_disable_kvm_features(FEAT_KVM, KVM_FEATURE_PV_EOI);
enable_compat_apic_id_mode... | {
"code": [],
"line_no": []
} | static void FUNC_0(MachineState *VAR_0)
{
has_pci_info = false;
has_acpi_build = false;
smbios_defaults = false;
if (!VAR_0->cpu_model) {
VAR_0->cpu_model = "486";
}
x86_cpu_compat_disable_kvm_features(FEAT_KVM, KVM_FEATURE_PV_EOI);
enable_compat_apic_id_mode();
pc... | [
"static void FUNC_0(MachineState *VAR_0)\n{",
"has_pci_info = false;",
"has_acpi_build = false;",
"smbios_defaults = false;",
"if (!VAR_0->cpu_model) {",
"VAR_0->cpu_model = \"486\";",
"}",
"x86_cpu_compat_disable_kvm_features(FEAT_KVM, KVM_FEATURE_PV_EOI);",
"enable_compat_apic_id_mode();",
"pc_i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
16
],
[
18
],
[
20
],
[
22
],
[
24
],
[
26
],
[
28
]
] |
26,079 | static int decode_ics_info(AACContext *ac, IndividualChannelStream *ics,
GetBitContext *gb)
{
const MPEG4AudioConfig *const m4ac = &ac->oc[1].m4ac;
const int aot = m4ac->object_type;
const int sampling_index = m4ac->sampling_index;
if (aot != AOT_ER_AAC_ELD) {
i... | true | FFmpeg | 87e85a133f3ce2f037b90e9c7bbca99951df6c15 | static int decode_ics_info(AACContext *ac, IndividualChannelStream *ics,
GetBitContext *gb)
{
const MPEG4AudioConfig *const m4ac = &ac->oc[1].m4ac;
const int aot = m4ac->object_type;
const int sampling_index = m4ac->sampling_index;
if (aot != AOT_ER_AAC_ELD) {
i... | {
"code": [
" return AVERROR_INVALIDDATA;"
],
"line_no": [
19
]
} | static int FUNC_0(AACContext *VAR_0, IndividualChannelStream *VAR_1,
GetBitContext *VAR_2)
{
const MPEG4AudioConfig *const VAR_3 = &VAR_0->oc[1].VAR_3;
const int VAR_4 = VAR_3->object_type;
const int VAR_5 = VAR_3->VAR_5;
if (VAR_4 != AOT_ER_AAC_ELD) {
if (get_b... | [
"static int FUNC_0(AACContext *VAR_0, IndividualChannelStream *VAR_1,\nGetBitContext *VAR_2)\n{",
"const MPEG4AudioConfig *const VAR_3 = &VAR_0->oc[1].VAR_3;",
"const int VAR_4 = VAR_3->object_type;",
"const int VAR_5 = VAR_3->VAR_5;",
"if (VAR_4 != AOT_ER_AAC_ELD) {",
"if (get_bits1(VAR_2)) {",
"av_log... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
45
... |
26,080 | static void dvbsub_parse_region_segment(AVCodecContext *avctx,
uint8_t *buf, int buf_size)
{
DVBSubContext *ctx = (DVBSubContext*) avctx->priv_data;
uint8_t *buf_end = buf + buf_size;
int region_id, object_id;
DVBSubRegion *region;
DVBSubObject *objec... | true | FFmpeg | 2867ed9b1c0561b0e50d9c4f73e09621333e2f1f | static void dvbsub_parse_region_segment(AVCodecContext *avctx,
uint8_t *buf, int buf_size)
{
DVBSubContext *ctx = (DVBSubContext*) avctx->priv_data;
uint8_t *buf_end = buf + buf_size;
int region_id, object_id;
DVBSubRegion *region;
DVBSubObject *objec... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVCodecContext *VAR_0,
uint8_t *VAR_1, int VAR_2)
{
DVBSubContext *ctx = (DVBSubContext*) VAR_0->priv_data;
uint8_t *buf_end = VAR_1 + VAR_2;
int VAR_3, VAR_4;
DVBSubRegion *region;
DVBSubObject *object;
DVBSubObjectDisplay *di... | [
"static void FUNC_0(AVCodecContext *VAR_0,\nuint8_t *VAR_1, int VAR_2)\n{",
"DVBSubContext *ctx = (DVBSubContext*) VAR_0->priv_data;",
"uint8_t *buf_end = VAR_1 + VAR_2;",
"int VAR_3, VAR_4;",
"DVBSubRegion *region;",
"DVBSubObject *object;",
"DVBSubObjectDisplay *display;",
"int VAR_5;",
"if (VAR_2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
31
],
[
35
],
[
39,
41
],
[
43
],
[
47
],
[
51
],
[
53
],
[
58
],
[
62
],
... |
26,081 | int ff_unlock_avcodec(const AVCodec *codec)
{
if (codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE || !codec->init)
return 0;
av_assert0(ff_avcodec_locked);
ff_avcodec_locked = 0;
atomic_fetch_add(&entangled_thread_counter, -1);
if (lockmgr_cb) {
if ((*lockmgr_cb)(&codec... | true | FFmpeg | a04c2c707de2ce850f79870e84ac9d7ec7aa9143 | int ff_unlock_avcodec(const AVCodec *codec)
{
if (codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE || !codec->init)
return 0;
av_assert0(ff_avcodec_locked);
ff_avcodec_locked = 0;
atomic_fetch_add(&entangled_thread_counter, -1);
if (lockmgr_cb) {
if ((*lockmgr_cb)(&codec... | {
"code": [
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" if (lockmgr_cb) {",
" if (lockmgr_cb) {",
" return -1;",
" if (lockmgr_cb) {",
" if ((*lockmgr_cb)(&codec_mutex, AV_LOCK_RELEASE))",
" return ... | int FUNC_0(const AVCodec *VAR_0)
{
if (VAR_0->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE || !VAR_0->init)
return 0;
av_assert0(ff_avcodec_locked);
ff_avcodec_locked = 0;
atomic_fetch_add(&entangled_thread_counter, -1);
if (lockmgr_cb) {
if ((*lockmgr_cb)(&codec_mutex, AV_... | [
"int FUNC_0(const AVCodec *VAR_0)\n{",
"if (VAR_0->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE || !VAR_0->init)\nreturn 0;",
"av_assert0(ff_avcodec_locked);",
"ff_avcodec_locked = 0;",
"atomic_fetch_add(&entangled_thread_counter, -1);",
"if (lockmgr_cb) {",
"if ((*lockmgr_cb)(&codec_mutex, AV_LOCK_RELE... | [
0,
1,
0,
0,
0,
1,
1,
0,
1,
0
] | [
[
1,
3
],
[
5,
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
27
],
[
29
]
] |
26,082 | static inline void copy(LZOContext *c, int cnt)
{
register const uint8_t *src = c->in;
register uint8_t *dst = c->out;
if (cnt > c->in_end - src) {
cnt = FFMAX(c->in_end - src, 0);
c->error |= AV_LZO_INPUT_DEPLETED;
}
if (cnt > c->out_end - dst) {
cnt ... | true | FFmpeg | cf2b7c01f81c1fb3283a1390c0ca9a2f81f4f4a8 | static inline void copy(LZOContext *c, int cnt)
{
register const uint8_t *src = c->in;
register uint8_t *dst = c->out;
if (cnt > c->in_end - src) {
cnt = FFMAX(c->in_end - src, 0);
c->error |= AV_LZO_INPUT_DEPLETED;
}
if (cnt > c->out_end - dst) {
cnt ... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(LZOContext *VAR_0, int VAR_1)
{
register const uint8_t *VAR_2 = VAR_0->in;
register uint8_t *VAR_3 = VAR_0->out;
if (VAR_1 > VAR_0->in_end - VAR_2) {
VAR_1 = FFMAX(VAR_0->in_end - VAR_2, 0);
VAR_0->error |= AV_LZO_INPUT_DEPLETED;
}
if (V... | [
"static inline void FUNC_0(LZOContext *VAR_0, int VAR_1)\n{",
"register const uint8_t *VAR_2 = VAR_0->in;",
"register uint8_t *VAR_3 = VAR_0->out;",
"if (VAR_1 > VAR_0->in_end - VAR_2) {",
"VAR_1 = FFMAX(VAR_0->in_end - VAR_2, 0);",
"VAR_0->error |= AV_LZO_INPUT_DEPLETED;",
"}",
"if (VAR_1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
10
],
[
12
],
[
14
],
[
16
],
[
18
],
[
20
],
[
22
],
[
24
],
[
26,
28
],
[
30
],
[
32
],
[
34
],
[
36,
38,
40
],
[
42
],
[
44
],
... |
26,083 | static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int size, UID uid)
{
MXFDescriptor *descriptor = arg;
switch(tag) {
case 0x3F01:
descriptor->sub_descriptors_count = avio_rb32(pb);
if (descriptor->sub_descriptors_count >= UINT_MAX / sizeof(UID))
... | true | FFmpeg | fd34dbea58e097609ff09cf7dcc59f74930195d3 | static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int size, UID uid)
{
MXFDescriptor *descriptor = arg;
switch(tag) {
case 0x3F01:
descriptor->sub_descriptors_count = avio_rb32(pb);
if (descriptor->sub_descriptors_count >= UINT_MAX / sizeof(UID))
... | {
"code": [
"static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int size, UID uid)"
],
"line_no": [
1
]
} | static int FUNC_0(void *VAR_0, AVIOContext *VAR_1, int VAR_2, int VAR_3, UID VAR_4)
{
MXFDescriptor *descriptor = VAR_0;
switch(VAR_2) {
case 0x3F01:
descriptor->sub_descriptors_count = avio_rb32(VAR_1);
if (descriptor->sub_descriptors_count >= UINT_MAX / sizeof(UID))
retu... | [
"static int FUNC_0(void *VAR_0, AVIOContext *VAR_1, int VAR_2, int VAR_3, UID VAR_4)\n{",
"MXFDescriptor *descriptor = VAR_0;",
"switch(VAR_2) {",
"case 0x3F01:\ndescriptor->sub_descriptors_count = avio_rb32(VAR_1);",
"if (descriptor->sub_descriptors_count >= UINT_MAX / sizeof(UID))\nreturn -1;",
"descrip... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9,
11
],
[
13,
15
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47,... |
26,084 | static int fir_channel(AVFilterContext *ctx, void *arg, int ch, int nb_jobs)
{
AudioFIRContext *s = ctx->priv;
const float *src = (const float *)s->in[0]->extended_data[ch];
int index1 = (s->index + 1) % 3;
int index2 = (s->index + 2) % 3;
float *sum = s->sum[ch];
AVFrame *out = arg;
... | false | FFmpeg | bd404e3949b081788247e2e6e9df0581ef7cc190 | static int fir_channel(AVFilterContext *ctx, void *arg, int ch, int nb_jobs)
{
AudioFIRContext *s = ctx->priv;
const float *src = (const float *)s->in[0]->extended_data[ch];
int index1 = (s->index + 1) % 3;
int index2 = (s->index + 2) % 3;
float *sum = s->sum[ch];
AVFrame *out = arg;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFilterContext *VAR_0, void *VAR_1, int VAR_2, int VAR_3)
{
AudioFIRContext *s = VAR_0->priv;
const float *VAR_4 = (const float *)s->in[0]->extended_data[VAR_2];
int VAR_5 = (s->index + 1) % 3;
int VAR_6 = (s->index + 2) % 3;
float *VAR_7 = s->VAR_7[VAR_2];
AVFrame *out... | [
"static int FUNC_0(AVFilterContext *VAR_0, void *VAR_1, int VAR_2, int VAR_3)\n{",
"AudioFIRContext *s = VAR_0->priv;",
"const float *VAR_4 = (const float *)s->in[0]->extended_data[VAR_2];",
"int VAR_5 = (s->index + 1) % 3;",
"int VAR_6 = (s->index + 2) % 3;",
"float *VAR_7 = s->VAR_7[VAR_2];",
"AVFrame... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
47
],
[
51
... |
26,085 | static int aiff_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
AVStream *st = s->streams[0];
AIFFInputContext *aiff = s->priv_data;
int64_t max_size;
int res, size;
/* calculate size of remaining data */
max_size = aiff->data_end - avio_tell(s->pb);
i... | false | FFmpeg | 763e714442e07f6430b003c8a9f4b62deaa7b3a5 | static int aiff_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
AVStream *st = s->streams[0];
AIFFInputContext *aiff = s->priv_data;
int64_t max_size;
int res, size;
max_size = aiff->data_end - avio_tell(s->pb);
if (max_size <= 0)
return AVER... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0,
AVPacket *VAR_1)
{
AVStream *st = VAR_0->streams[0];
AIFFInputContext *aiff = VAR_0->priv_data;
int64_t max_size;
int VAR_2, VAR_3;
max_size = aiff->data_end - avio_tell(VAR_0->pb);
if (max_size <= 0)
... | [
"static int FUNC_0(AVFormatContext *VAR_0,\nAVPacket *VAR_1)\n{",
"AVStream *st = VAR_0->streams[0];",
"AIFFInputContext *aiff = VAR_0->priv_data;",
"int64_t max_size;",
"int VAR_2, VAR_3;",
"max_size = aiff->data_end - avio_tell(VAR_0->pb);",
"if (max_size <= 0)\nreturn AVERROR_EOF;",
"if (st->codec-... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
19
],
[
21,
23
],
[
29,
31
],
[
33,
35
],
[
37
],
[
39
],
[
41,
43
],
[
47,
49
],
[
53
],
[
55
],
[
57
],
[
59
... |
26,086 | static int get_riff(AVFormatContext *s, AVIOContext *pb)
{
AVIContext *avi = s->priv_data;
char header[8];
int i;
/* check RIFF header */
avio_read(pb, header, 4);
avi->riff_end = avio_rl32(pb); /* RIFF chunk size */
avi->riff_end += avio_tell(pb); /* RIFF chunk end */
avio_r... | true | FFmpeg | 8a048fe6f8bf41de93c091a7a9b3132bedc1b41c | static int get_riff(AVFormatContext *s, AVIOContext *pb)
{
AVIContext *avi = s->priv_data;
char header[8];
int i;
avio_read(pb, header, 4);
avi->riff_end = avio_rl32(pb);
avi->riff_end += avio_tell(pb);
avio_read(pb, header + 4, 4);
for (i = 0; avi_headers[i][0]; i+... | {
"code": [
" char header[8];"
],
"line_no": [
7
]
} | static int FUNC_0(AVFormatContext *VAR_0, AVIOContext *VAR_1)
{
AVIContext *avi = VAR_0->priv_data;
char VAR_2[8];
int VAR_3;
avio_read(VAR_1, VAR_2, 4);
avi->riff_end = avio_rl32(VAR_1);
avi->riff_end += avio_tell(VAR_1);
avio_read(VAR_1, VAR_2 + 4, 4);
for (VAR_3 ... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVIOContext *VAR_1)\n{",
"AVIContext *avi = VAR_0->priv_data;",
"char VAR_2[8];",
"int VAR_3;",
"avio_read(VAR_1, VAR_2, 4);",
"avi->riff_end = avio_rl32(VAR_1);",
"avi->riff_end += avio_tell(VAR_1);",
"avio_read(VAR_1, VAR_2 + 4, 4);",
"for (VAR_3 = 0; av... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27,
29
],
[
31,
33
],
[
37,
39,
41
],
[
45
],
[
47
]
] |
26,088 | static int decode_segment(TAKDecContext *s, int8_t mode, int32_t *decoded, int len)
{
struct CParam code;
GetBitContext *gb = &s->gb;
int i;
if (!mode) {
memset(decoded, 0, len * sizeof(*decoded));
return 0;
}
if (mode > FF_ARRAY_ELEMS(xcodes))
return AVERRO... | true | FFmpeg | 955db411929a9876d3cd016fbbb9c49b6362feba | static int decode_segment(TAKDecContext *s, int8_t mode, int32_t *decoded, int len)
{
struct CParam code;
GetBitContext *gb = &s->gb;
int i;
if (!mode) {
memset(decoded, 0, len * sizeof(*decoded));
return 0;
}
if (mode > FF_ARRAY_ELEMS(xcodes))
return AVERRO... | {
"code": [
" int x = get_bits_long(gb, code.init);",
" int scale = get_unary(gb, 1, 9);"
],
"line_no": [
33,
41
]
} | static int FUNC_0(TAKDecContext *VAR_0, int8_t VAR_1, int32_t *VAR_2, int VAR_3)
{
struct CParam VAR_4;
GetBitContext *gb = &VAR_0->gb;
int VAR_5;
if (!VAR_1) {
memset(VAR_2, 0, VAR_3 * sizeof(*VAR_2));
return 0;
}
if (VAR_1 > FF_ARRAY_ELEMS(xcodes))
return ... | [
"static int FUNC_0(TAKDecContext *VAR_0, int8_t VAR_1, int32_t *VAR_2, int VAR_3)\n{",
"struct CParam VAR_4;",
"GetBitContext *gb = &VAR_0->gb;",
"int VAR_5;",
"if (!VAR_1) {",
"memset(VAR_2, 0, VAR_3 * sizeof(*VAR_2));",
"return 0;",
"}",
"if (VAR_1 > FF_ARRAY_ELEMS(xcodes))\nreturn AVERROR_INVALID... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
26,089 | static int paf_video_decode(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *pkt)
{
PAFVideoDecContext *c = avctx->priv_data;
uint8_t code, *dst, *end;
int i, frame, ret;
if (pkt->size < 2)
return AVERROR_INVALIDDATA;
bytestream2_init(&c->g... | true | FFmpeg | c4360559ee2a6c8c624f24fc7e2a1cf00972ba68 | static int paf_video_decode(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *pkt)
{
PAFVideoDecContext *c = avctx->priv_data;
uint8_t code, *dst, *end;
int i, frame, ret;
if (pkt->size < 2)
return AVERROR_INVALIDDATA;
bytestream2_init(&c->g... | {
"code": [
" if ((code & 0xF) > 4) {"
],
"line_no": [
27
]
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
PAFVideoDecContext *c = VAR_0->priv_data;
uint8_t code, *dst, *end;
int VAR_4, VAR_5, VAR_6;
if (VAR_3->size < 2)
return AVERROR_INVALIDDATA;
bytestream2_init(&c->gb, ... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"PAFVideoDecContext *c = VAR_0->priv_data;",
"uint8_t code, *dst, *end;",
"int VAR_4, VAR_5, VAR_6;",
"if (VAR_3->size < 2)\nreturn AVERROR_INVALIDDATA;",
"bytestream2_init(&c->gb, VAR_3->VAR_1, VAR_3->size);",
"co... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37,
39
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55
],
[... |
26,091 | int avresample_get_matrix(AVAudioResampleContext *avr, double *matrix,
int stride)
{
int in_channels, out_channels, i, o;
in_channels = av_get_channel_layout_nb_channels(avr->in_channel_layout);
out_channels = av_get_channel_layout_nb_channels(avr->out_channel_layout);
... | true | FFmpeg | 8821ae649e61097ec57ca58472c3e4239c82913c | int avresample_get_matrix(AVAudioResampleContext *avr, double *matrix,
int stride)
{
int in_channels, out_channels, i, o;
in_channels = av_get_channel_layout_nb_channels(avr->in_channel_layout);
out_channels = av_get_channel_layout_nb_channels(avr->out_channel_layout);
... | {
"code": [
" if ( in_channels < 0 || in_channels > AVRESAMPLE_MAX_CHANNELS ||",
" out_channels < 0 || out_channels > AVRESAMPLE_MAX_CHANNELS) {",
" if ( in_channels < 0 || in_channels > AVRESAMPLE_MAX_CHANNELS ||",
" out_channels < 0 || out_channels > AVRESAMPLE_MAX_CHANNELS) {"... | int FUNC_0(AVAudioResampleContext *VAR_0, double *VAR_1,
int VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6;
VAR_3 = av_get_channel_layout_nb_channels(VAR_0->in_channel_layout);
VAR_4 = av_get_channel_layout_nb_channels(VAR_0->out_channel_layout);
if ( VAR_3 < 0 || VAR_3 >... | [
"int FUNC_0(AVAudioResampleContext *VAR_0, double *VAR_1,\nint VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6;",
"VAR_3 = av_get_channel_layout_nb_channels(VAR_0->in_channel_layout);",
"VAR_4 = av_get_channel_layout_nb_channels(VAR_0->out_channel_layout);",
"if ( VAR_3 < 0 || VAR_3 > AVRESAMPLE_MAX_CHANNELS ... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49,
51... |
26,092 | static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index)
{
AVPacket out_pkt = { 0 }, flush_pkt = { 0 };
AVStream *st = s->streams[stream_index];
uint8_t *data = pkt ? pkt->data : NULL;
int size = pkt ? pkt->size : 0;
int ret = 0, got_output = 0;
if (!pkt) {
... | false | FFmpeg | d584533cf38141172e20bae5436629ee17c8ce50 | static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index)
{
AVPacket out_pkt = { 0 }, flush_pkt = { 0 };
AVStream *st = s->streams[stream_index];
uint8_t *data = pkt ? pkt->data : NULL;
int size = pkt ? pkt->size : 0;
int ret = 0, got_output = 0;
if (!pkt) {
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1, int VAR_2)
{
AVPacket out_pkt = { 0 }, flush_pkt = { 0 };
AVStream *st = VAR_0->streams[VAR_2];
uint8_t *data = VAR_1 ? VAR_1->data : NULL;
int VAR_3 = VAR_1 ? VAR_1->VAR_3 : 0;
int VAR_4 = 0, VAR_5 = 0;
if (!VAR_1) {
... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1, int VAR_2)\n{",
"AVPacket out_pkt = { 0 }, flush_pkt = { 0 };",
"AVStream *st = VAR_0->streams[VAR_2];",
"uint8_t *data = VAR_1 ? VAR_1->data : NULL;",
"int VAR_3 = VAR_1 ? VAR_1->VAR_3 : 0;",
"int VAR_4 = 0, VAR_5 = 0;",
"if (!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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37,
39,
41
],
[
45
],
[
49
],
[
51
],
[
55
... |
26,093 | int avpriv_dv_produce_packet(DVDemuxContext *c, AVPacket *pkt,
uint8_t* buf, int buf_size, int64_t pos)
{
int size, i;
uint8_t *ppcm[4] = {0};
if (buf_size < DV_PROFILE_BYTES ||
!(c->sys = avpriv_dv_frame_profile(c->sys, buf, buf_size)) ||
buf_size < c->sys->fr... | true | FFmpeg | 5cb57a16ede71d913384a0b3036a2c6df5da5e43 | int avpriv_dv_produce_packet(DVDemuxContext *c, AVPacket *pkt,
uint8_t* buf, int buf_size, int64_t pos)
{
int size, i;
uint8_t *ppcm[4] = {0};
if (buf_size < DV_PROFILE_BYTES ||
!(c->sys = avpriv_dv_frame_profile(c->sys, buf, buf_size)) ||
buf_size < c->sys->fr... | {
"code": [
" dv_extract_audio(buf, ppcm, c->sys);"
],
"line_no": [
43
]
} | int FUNC_0(DVDemuxContext *VAR_0, AVPacket *VAR_1,
uint8_t* VAR_2, int VAR_3, int64_t VAR_4)
{
int VAR_5, VAR_6;
uint8_t *ppcm[4] = {0};
if (VAR_3 < DV_PROFILE_BYTES ||
!(VAR_0->sys = avpriv_dv_frame_profile(VAR_0->sys, VAR_2, VAR_3)) ||
VAR_3 < VAR_0->sys->fra... | [
"int FUNC_0(DVDemuxContext *VAR_0, AVPacket *VAR_1,\nuint8_t* VAR_2, int VAR_3, int64_t VAR_4)\n{",
"int VAR_5, VAR_6;",
"uint8_t *ppcm[4] = {0};",
"if (VAR_3 < DV_PROFILE_BYTES ||\n!(VAR_0->sys = avpriv_dv_frame_profile(VAR_0->sys, VAR_2, VAR_3)) ||\nVAR_3 < VAR_0->sys->frame_size) {",
"return -1;",
"}",... | [
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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13,
15,
17
],
[
19
],
[
21
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
51
],
[
53
],
[
55
],
[
57
],
[... |
26,094 | int mmu40x_get_physical_address (CPUState *env, mmu_ctx_t *ctx,
target_ulong address, int rw, int access_type)
{
ppcemb_tlb_t *tlb;
target_phys_addr_t raddr;
int i, ret, zsel, zpr, pr;
ret = -1;
raddr = -1;
pr = msr_pr;
for (i = 0; i < env->nb_tlb;... | true | qemu | 6f2d8978728c48ca46f5c01835438508aace5c64 | int mmu40x_get_physical_address (CPUState *env, mmu_ctx_t *ctx,
target_ulong address, int rw, int access_type)
{
ppcemb_tlb_t *tlb;
target_phys_addr_t raddr;
int i, ret, zsel, zpr, pr;
ret = -1;
raddr = -1;
pr = msr_pr;
for (i = 0; i < env->nb_tlb;... | {
"code": [
" raddr = -1;",
" raddr = -1;"
],
"line_no": [
17,
17
]
} | int FUNC_0 (CPUState *VAR_0, mmu_ctx_t *VAR_1,
target_ulong VAR_2, int VAR_3, int VAR_4)
{
ppcemb_tlb_t *tlb;
target_phys_addr_t raddr;
int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;
VAR_6 = -1;
raddr = -1;
VAR_9 = msr_pr;
for (VAR_5 = 0; VAR_5 < VAR_0->nb... | [
"int FUNC_0 (CPUState *VAR_0, mmu_ctx_t *VAR_1,\ntarget_ulong VAR_2, int VAR_3, int VAR_4)\n{",
"ppcemb_tlb_t *tlb;",
"target_phys_addr_t raddr;",
"int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;",
"VAR_6 = -1;",
"raddr = -1;",
"VAR_9 = msr_pr;",
"for (VAR_5 = 0; VAR_5 < VAR_0->nb_tlb; VAR_5++) {",
"tlb = &V... | [
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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27,
29
],
[
31
],
[
33
],
[
35,
37
],
[
39,
41
],
[
43
],
[
45,
49
],
[
51,... |
26,095 | int bdrv_get_dirty(BlockDriverState *bs, int64_t sector)
{
int64_t chunk = sector / (int64_t)BDRV_SECTORS_PER_DIRTY_CHUNK;
if (bs->dirty_bitmap != NULL &&
(sector << BDRV_SECTOR_BITS) <= bdrv_getlength(bs)) {
return bs->dirty_bitmap[chunk];
} else {
return 0;
}
}
| true | qemu | c6d2283068026035a6468aae9dcde953bd7521ac | int bdrv_get_dirty(BlockDriverState *bs, int64_t sector)
{
int64_t chunk = sector / (int64_t)BDRV_SECTORS_PER_DIRTY_CHUNK;
if (bs->dirty_bitmap != NULL &&
(sector << BDRV_SECTOR_BITS) <= bdrv_getlength(bs)) {
return bs->dirty_bitmap[chunk];
} else {
return 0;
}
}
| {
"code": [
" if (bs->dirty_bitmap != NULL &&",
" (sector << BDRV_SECTOR_BITS) <= bdrv_getlength(bs)) {",
" return bs->dirty_bitmap[chunk];"
],
"line_no": [
9,
11,
13
]
} | int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1)
{
int64_t chunk = VAR_1 / (int64_t)BDRV_SECTORS_PER_DIRTY_CHUNK;
if (VAR_0->dirty_bitmap != NULL &&
(VAR_1 << BDRV_SECTOR_BITS) <= bdrv_getlength(VAR_0)) {
return VAR_0->dirty_bitmap[chunk];
} else {
return 0;
}
}
| [
"int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1)\n{",
"int64_t chunk = VAR_1 / (int64_t)BDRV_SECTORS_PER_DIRTY_CHUNK;",
"if (VAR_0->dirty_bitmap != NULL &&\n(VAR_1 << BDRV_SECTOR_BITS) <= bdrv_getlength(VAR_0)) {",
"return VAR_0->dirty_bitmap[chunk];",
"} else {",
"return 0;",
"}",
"}"
] | [
0,
0,
1,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
26,096 | static int gdv_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *avpkt)
{
GDVContext *gdv = avctx->priv_data;
GetByteContext *gb = &gdv->gb;
PutByteContext *pb = &gdv->pb;
AVFrame *frame = data;
int ret, i, pal_size;
const uint8_t *pal ... | true | FFmpeg | cf5a6c754aa3b67062b8cc60fa244e9c7d82010f | static int gdv_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *avpkt)
{
GDVContext *gdv = avctx->priv_data;
GetByteContext *gb = &gdv->gb;
PutByteContext *pb = &gdv->pb;
AVFrame *frame = data;
int ret, i, pal_size;
const uint8_t *pal ... | {
"code": [
" if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)",
" return ret;",
" if (pal && pal_size == AVPALETTE_SIZE)",
" memcpy(gdv->pal, pal, AVPALETTE_SIZE);",
" return AVERROR_INVALIDDATA;"
],
"line_no": [
27,
29,
31,
33,
111
]
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
GDVContext *gdv = VAR_0->priv_data;
GetByteContext *gb = &gdv->gb;
PutByteContext *pb = &gdv->pb;
AVFrame *frame = VAR_1;
int VAR_4, VAR_5, VAR_6;
const uint8_t *VAR_7 = av_pa... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"GDVContext *gdv = VAR_0->priv_data;",
"GetByteContext *gb = &gdv->gb;",
"PutByteContext *pb = &gdv->pb;",
"AVFrame *frame = VAR_1;",
"int VAR_4, VAR_5, VAR_6;",
"const uint8_t *VAR_7 = av_packet_get_side_data(VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
31,
33
],
[
37
],
[
39
],
[
43
],
[
45
],
[
49,
51
],
[
55
... |
26,097 | int ff_rle_encode(uint8_t *outbuf, int out_size, const uint8_t *ptr , int bpp, int w,
int add_rep, int xor_rep, int add_raw, int xor_raw)
{
int count, x;
uint8_t *out = outbuf;
for(x = 0; x < w; x += count) {
/* see if we can encode the next set of pixels with RLE */
... | false | FFmpeg | 0afdedcafb4d524abfe2c958f17aafe4f1ab8d9a | int ff_rle_encode(uint8_t *outbuf, int out_size, const uint8_t *ptr , int bpp, int w,
int add_rep, int xor_rep, int add_raw, int xor_raw)
{
int count, x;
uint8_t *out = outbuf;
for(x = 0; x < w; x += count) {
if((count = count_pixels(ptr, w-x, bpp, 1)) > 1) {
... | {
"code": [],
"line_no": []
} | int FUNC_0(uint8_t *VAR_0, int VAR_1, const uint8_t *VAR_2 , int VAR_3, int VAR_4,
int VAR_5, int VAR_6, int VAR_7, int VAR_8)
{
int VAR_9, VAR_10;
uint8_t *out = VAR_0;
for(VAR_10 = 0; VAR_10 < VAR_4; VAR_10 += VAR_9) {
if((VAR_9 = count_pixels(VAR_2, VAR_4-VAR_1... | [
"int FUNC_0(uint8_t *VAR_0, int VAR_1, const uint8_t *VAR_2 , int VAR_3, int VAR_4,\nint VAR_5, int VAR_6, int VAR_7, int VAR_8)\n{",
"int VAR_9, VAR_10;",
"uint8_t *out = VAR_0;",
"for(VAR_10 = 0; VAR_10 < VAR_4; VAR_10 += VAR_9) {",
"if((VAR_9 = count_pixels(VAR_2, VAR_4-VAR_10, VAR_3, 1)) > 1) {",
"if(... | [
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
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
53
],
[... |
26,098 | static void stream_component_close(VideoState *is, int stream_index)
{
AVFormatContext *ic = is->ic;
AVCodecContext *avctx;
if (stream_index < 0 || stream_index >= ic->nb_streams)
return;
avctx = ic->streams[stream_index]->codec;
switch (avctx->codec_type) {
case AVMEDIA_TYPE... | false | FFmpeg | 4fd07b9366fb2f74b6af0dea8092d6bafa38f131 | static void stream_component_close(VideoState *is, int stream_index)
{
AVFormatContext *ic = is->ic;
AVCodecContext *avctx;
if (stream_index < 0 || stream_index >= ic->nb_streams)
return;
avctx = ic->streams[stream_index]->codec;
switch (avctx->codec_type) {
case AVMEDIA_TYPE... | {
"code": [],
"line_no": []
} | static void FUNC_0(VideoState *VAR_0, int VAR_1)
{
AVFormatContext *ic = VAR_0->ic;
AVCodecContext *avctx;
if (VAR_1 < 0 || VAR_1 >= ic->nb_streams)
return;
avctx = ic->streams[VAR_1]->codec;
switch (avctx->codec_type) {
case AVMEDIA_TYPE_AUDIO:
packet_queue_abort(&V... | [
"static void FUNC_0(VideoState *VAR_0, int VAR_1)\n{",
"AVFormatContext *ic = VAR_0->ic;",
"AVCodecContext *avctx;",
"if (VAR_1 < 0 || VAR_1 >= ic->nb_streams)\nreturn;",
"avctx = ic->streams[VAR_1]->codec;",
"switch (avctx->codec_type) {",
"case AVMEDIA_TYPE_AUDIO:\npacket_queue_abort(&VAR_0->audioq);"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
19
],
[
21,
23
],
[
27
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
... |
26,099 | static inline int mpeg1_decode_block_inter(MpegEncContext *s, int16_t *block, int n)
{
int level, i, j, run;
RLTable *rl = &ff_rl_mpeg1;
uint8_t * const scantable = s->intra_scantable.permutated;
const uint16_t *quant_matrix = s->inter_matrix;
const int qscale = s->qscale;
... | true | FFmpeg | 6d93307f8df81808f0dcdbc064b848054a6e83b3 | static inline int mpeg1_decode_block_inter(MpegEncContext *s, int16_t *block, int n)
{
int level, i, j, run;
RLTable *rl = &ff_rl_mpeg1;
uint8_t * const scantable = s->intra_scantable.permutated;
const uint16_t *quant_matrix = s->inter_matrix;
const int qscale = s->qscale;
... | {
"code": [
" if (i > 63) {",
" av_log(s->avctx, AV_LOG_ERROR, \"ac-tex damaged at %d %d\\n\", s->mb_x, s->mb_y);",
" return -1;",
" if (i > 63) {",
" av_log(s->avctx, AV_LOG_ERROR, \"ac-tex damaged at %d %d\\n\", s->mb_x, s->mb_y)... | static inline int FUNC_0(MpegEncContext *VAR_0, int16_t *VAR_1, int VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6;
RLTable *rl = &ff_rl_mpeg1;
uint8_t * const scantable = VAR_0->intra_scantable.permutated;
const uint16_t *VAR_7 = VAR_0->inter_matrix;
const int VAR_8 = VAR_0->VAR_8;
... | [
"static inline int FUNC_0(MpegEncContext *VAR_0, int16_t *VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6;",
"RLTable *rl = &ff_rl_mpeg1;",
"uint8_t * const scantable = VAR_0->intra_scantable.permutated;",
"const uint16_t *VAR_7 = VAR_0->inter_matrix;",
"const int VAR_8 = VAR_0->VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
... |
26,101 | static void vp8_decode_mv_mb_modes(AVCodecContext *avctx, VP8Frame *curframe,
VP8Frame *prev_frame)
{
VP8Context *s = avctx->priv_data;
int mb_x, mb_y;
s->mv_min.y = -MARGIN;
s->mv_max.y = ((s->mb_height - 1) << 6) + MARGIN;
for (mb_y = 0; mb_y < s->mb_hei... | true | FFmpeg | ac4b32df71bd932838043a4838b86d11e169707f | static void vp8_decode_mv_mb_modes(AVCodecContext *avctx, VP8Frame *curframe,
VP8Frame *prev_frame)
{
VP8Context *s = avctx->priv_data;
int mb_x, mb_y;
s->mv_min.y = -MARGIN;
s->mv_max.y = ((s->mb_height - 1) << 6) + MARGIN;
for (mb_y = 0; mb_y < s->mb_hei... | {
"code": [
"static void vp8_decode_mv_mb_modes(AVCodecContext *avctx, VP8Frame *curframe,",
" VP8Frame *prev_frame)",
" prev_frame->seg_map->data + mb_xy : NULL, 1);"
],
"line_no": [
1,
3,
47
]
} | static void FUNC_0(AVCodecContext *VAR_0, VP8Frame *VAR_1,
VP8Frame *VAR_2)
{
VP8Context *s = VAR_0->priv_data;
int VAR_3, VAR_4;
s->mv_min.y = -MARGIN;
s->mv_max.y = ((s->mb_height - 1) << 6) + MARGIN;
for (VAR_4 = 0; VAR_4 < s->mb_height; VAR_4++) {
... | [
"static void FUNC_0(AVCodecContext *VAR_0, VP8Frame *VAR_1,\nVP8Frame *VAR_2)\n{",
"VP8Context *s = VAR_0->priv_data;",
"int VAR_3, VAR_4;",
"s->mv_min.y = -MARGIN;",
"s->mv_max.y = ((s->mb_height - 1) << 6) + MARGIN;",
"for (VAR_4 = 0; VAR_4 < s->mb_height; VAR_4++) {",
"VP8Macroblock *mb = s->macroblo... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37,
39,
41
],
[
43,
45,
47
],
[
49
],
[
51
],
[
53
... |
26,102 | static struct omap_eac_s *omap_eac_init(struct omap_target_agent_s *ta,
qemu_irq irq, qemu_irq *drq, omap_clk fclk, omap_clk iclk)
{
struct omap_eac_s *s = (struct omap_eac_s *)
g_malloc0(sizeof(struct omap_eac_s));
s->irq = irq;
s->codec.rxdrq = *drq ++;
s->codec.tx... | true | qemu | b45c03f585ea9bb1af76c73e82195418c294919d | static struct omap_eac_s *omap_eac_init(struct omap_target_agent_s *ta,
qemu_irq irq, qemu_irq *drq, omap_clk fclk, omap_clk iclk)
{
struct omap_eac_s *s = (struct omap_eac_s *)
g_malloc0(sizeof(struct omap_eac_s));
s->irq = irq;
s->codec.rxdrq = *drq ++;
s->codec.tx... | {
"code": [
" struct omap_eac_s *s = (struct omap_eac_s *)",
" g_malloc0(sizeof(struct omap_eac_s));"
],
"line_no": [
7,
9
]
} | static struct omap_eac_s *FUNC_0(struct omap_target_agent_s *VAR_0,
qemu_irq VAR_1, qemu_irq *VAR_2, omap_clk VAR_3, omap_clk VAR_4)
{
struct omap_eac_s *VAR_5 = (struct omap_eac_s *)
g_malloc0(sizeof(struct omap_eac_s));
VAR_5->VAR_1 = VAR_1;
VAR_5->codec.rxdrq = *VAR_2 ... | [
"static struct omap_eac_s *FUNC_0(struct omap_target_agent_s *VAR_0,\nqemu_irq VAR_1, qemu_irq *VAR_2, omap_clk VAR_3, omap_clk VAR_4)\n{",
"struct omap_eac_s *VAR_5 = (struct omap_eac_s *)\ng_malloc0(sizeof(struct omap_eac_s));",
"VAR_5->VAR_1 = VAR_1;",
"VAR_5->codec.rxdrq = *VAR_2 ++;",
"VAR_5->codec.txd... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7,
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27,
29
],
[
31
],
[
35
],
[
37
]
] |
26,103 | bool runstate_needs_reset(void)
{
return runstate_check(RUN_STATE_INTERNAL_ERROR) ||
runstate_check(RUN_STATE_SHUTDOWN) ||
runstate_check(RUN_STATE_GUEST_PANICKED);
}
| true | qemu | df39076850958b842ac9e414dc3ab2895f1877bf | bool runstate_needs_reset(void)
{
return runstate_check(RUN_STATE_INTERNAL_ERROR) ||
runstate_check(RUN_STATE_SHUTDOWN) ||
runstate_check(RUN_STATE_GUEST_PANICKED);
}
| {
"code": [
" runstate_check(RUN_STATE_SHUTDOWN) ||",
" runstate_check(RUN_STATE_GUEST_PANICKED);"
],
"line_no": [
7,
9
]
} | bool FUNC_0(void)
{
return runstate_check(RUN_STATE_INTERNAL_ERROR) ||
runstate_check(RUN_STATE_SHUTDOWN) ||
runstate_check(RUN_STATE_GUEST_PANICKED);
}
| [
"bool FUNC_0(void)\n{",
"return runstate_check(RUN_STATE_INTERNAL_ERROR) ||\nrunstate_check(RUN_STATE_SHUTDOWN) ||\nrunstate_check(RUN_STATE_GUEST_PANICKED);",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5,
7,
9
],
[
11
]
] |
26,104 | int64_t bdrv_getlength(BlockDriverState *bs)
{
int64_t ret = bdrv_nb_sectors(bs);
return ret < 0 ? ret : ret * BDRV_SECTOR_SIZE;
} | true | qemu | 4a9c9ea0d318bec2f67848c5ceaf4ad5bcb91d09 | int64_t bdrv_getlength(BlockDriverState *bs)
{
int64_t ret = bdrv_nb_sectors(bs);
return ret < 0 ? ret : ret * BDRV_SECTOR_SIZE;
} | {
"code": [],
"line_no": []
} | int64_t FUNC_0(BlockDriverState *bs)
{
int64_t ret = bdrv_nb_sectors(bs);
return ret < 0 ? ret : ret * BDRV_SECTOR_SIZE;
} | [
"int64_t FUNC_0(BlockDriverState *bs)\n{",
"int64_t ret = bdrv_nb_sectors(bs);",
"return ret < 0 ? ret : ret * BDRV_SECTOR_SIZE;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
10
],
[
12
]
] |
26,105 | static av_always_inline void mc_luma_scaled(VP9Context *s, vp9_scaled_mc_func smc,
vp9_mc_func (*mc)[2],
uint8_t *dst, ptrdiff_t dst_stride,
const uint8_t *ref, ptrdiff_t ref_stride,
... | true | FFmpeg | 68caef9d48c4f1540b1b3181ebe7062a3417c62a | static av_always_inline void mc_luma_scaled(VP9Context *s, vp9_scaled_mc_func smc,
vp9_mc_func (*mc)[2],
uint8_t *dst, ptrdiff_t dst_stride,
const uint8_t *ref, ptrdiff_t ref_stride,
... | {
"code": [
" if (x < 3 || y < 3 || x + 4 >= w - refbw_m1 || y + 4 >= h - refbh_m1) {",
" if (x < 3 || y < 3 || x + 4 >= w - refbw_m1 || y + 4 >= h - refbh_m1) {"
],
"line_no": [
83,
83
]
} | static av_always_inline void FUNC_0(VP9Context *s, vp9_scaled_mc_func smc,
vp9_mc_func (*mc)[2],
uint8_t *dst, ptrdiff_t dst_stride,
const uint8_t *ref, ptrdiff_t ref_stride,
... | [
"static av_always_inline void FUNC_0(VP9Context *s, vp9_scaled_mc_func smc,\nvp9_mc_func (*mc)[2],\nuint8_t *dst, ptrdiff_t dst_stride,\nconst uint8_t *ref, ptrdiff_t ref_stride,\nThreadFrame *ref_frame,\nptrdiff_t y, ptrdiff_t x, const VP56mv *in_mv,\nint px, int py, int pw, int ph,\nint bw, int bh, int w, int h, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13,
15,
17,
19
],
[
21,
23
],
[
25,
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
53
],
[
55
],
[
59
],
[
61
],
[... |
26,106 | static void vc1_inv_trans_4x4_c(uint8_t *dest, int linesize, DCTELEM *block)
{
int i;
register int t1,t2,t3,t4;
DCTELEM *src, *dst;
const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
src = block;
dst = block;
for(i = 0; i < 4; i++){
t1 = 17 * (src[0] + src[2]) + 4;
t2... | true | FFmpeg | c23acbaed40101c677dfcfbbfe0d2c230a8e8f44 | static void vc1_inv_trans_4x4_c(uint8_t *dest, int linesize, DCTELEM *block)
{
int i;
register int t1,t2,t3,t4;
DCTELEM *src, *dst;
const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
src = block;
dst = block;
for(i = 0; i < 4; i++){
t1 = 17 * (src[0] + src[2]) + 4;
t2... | {
"code": [
" const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;",
" const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;",
" const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;",
" const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;",
" dest[0*linesize] = cm[dest[0*linesize] + ((t1 + t3) >> 7)];",... | static void FUNC_0(uint8_t *VAR_0, int VAR_1, DCTELEM *VAR_2)
{
int VAR_3;
register int VAR_4,VAR_5,VAR_6,VAR_7;
DCTELEM *src, *dst;
const uint8_t *VAR_8 = ff_cropTbl + MAX_NEG_CROP;
src = VAR_2;
dst = VAR_2;
for(VAR_3 = 0; VAR_3 < 4; VAR_3++){
VAR_4 = 17 * (src[0] + src[2... | [
"static void FUNC_0(uint8_t *VAR_0, int VAR_1, DCTELEM *VAR_2)\n{",
"int VAR_3;",
"register int VAR_4,VAR_5,VAR_6,VAR_7;",
"DCTELEM *src, *dst;",
"const uint8_t *VAR_8 = ff_cropTbl + MAX_NEG_CROP;",
"src = VAR_2;",
"dst = VAR_2;",
"for(VAR_3 = 0; VAR_3 < 4; VAR_3++){",
"VAR_4 = 17 * (src[0] + src[2]... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
49
... |
26,107 | long do_rt_sigreturn(CPUSH4State *regs)
{
struct target_rt_sigframe *frame;
abi_ulong frame_addr;
sigset_t blocked;
target_ulong r0;
#if defined(DEBUG_SIGNAL)
fprintf(stderr, "do_rt_sigreturn\n");
#endif
frame_addr = regs->gregs[15];
if (!lock_user_struct(VERIFY_READ, frame, fram... | true | qemu | 016d2e1dfa21b64a524d3629fdd317d4c25bc3b8 | long do_rt_sigreturn(CPUSH4State *regs)
{
struct target_rt_sigframe *frame;
abi_ulong frame_addr;
sigset_t blocked;
target_ulong r0;
#if defined(DEBUG_SIGNAL)
fprintf(stderr, "do_rt_sigreturn\n");
#endif
frame_addr = regs->gregs[15];
if (!lock_user_struct(VERIFY_READ, frame, fram... | {
"code": [
" \tgoto badframe;",
" goto badframe;",
" goto badframe;",
" if (restore_sigcontext(regs, &frame->uc.tuc_mcontext, &r0))",
" goto badframe;",
" goto badframe;",
" goto badframe;",
" goto badframe;"
],
"line_no": [
25,
... | long FUNC_0(CPUSH4State *VAR_0)
{
struct target_rt_sigframe *VAR_1;
abi_ulong frame_addr;
sigset_t blocked;
target_ulong r0;
#if defined(DEBUG_SIGNAL)
fprintf(stderr, "FUNC_0\n");
#endif
frame_addr = VAR_0->gregs[15];
if (!lock_user_struct(VERIFY_READ, VAR_1, frame_addr, 1))
... | [
"long FUNC_0(CPUSH4State *VAR_0)\n{",
"struct target_rt_sigframe *VAR_1;",
"abi_ulong frame_addr;",
"sigset_t blocked;",
"target_ulong r0;",
"#if defined(DEBUG_SIGNAL)\nfprintf(stderr, \"FUNC_0\\n\");",
"#endif\nframe_addr = VAR_0->gregs[15];",
"if (!lock_user_struct(VERIFY_READ, VAR_1, frame_addr, 1)... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
19,
21
],
[
23,
25
],
[
29
],
[
31
],
[
35,
37
],
[
41,
43,
45,
47
],
[
51
],
[
53
],
[
57,
59
],
[
61
... |
26,108 | int ff_draw_init(FFDrawContext *draw, enum PixelFormat format, unsigned flags)
{
const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[format];
const AVComponentDescriptor *c;
unsigned i, nb_planes = 0;
int pixelstep[MAX_PLANES] = { 0 };
if (!desc->name)
return AVERROR(EINVAL);
... | true | FFmpeg | 24eac3cff54a5828ba76bc1ad93b99724cde45c1 | int ff_draw_init(FFDrawContext *draw, enum PixelFormat format, unsigned flags)
{
const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[format];
const AVComponentDescriptor *c;
unsigned i, nb_planes = 0;
int pixelstep[MAX_PLANES] = { 0 };
if (!desc->name)
return AVERROR(EINVAL);
... | {
"code": [
" if (desc->flags & ~(PIX_FMT_PLANAR | PIX_FMT_RGB))"
],
"line_no": [
19
]
} | int FUNC_0(FFDrawContext *VAR_0, enum PixelFormat VAR_1, unsigned VAR_2)
{
const AVPixFmtDescriptor *VAR_3 = &av_pix_fmt_descriptors[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);
i... | [
"int FUNC_0(FFDrawContext *VAR_0, enum PixelFormat VAR_1, unsigned VAR_2)\n{",
"const AVPixFmtDescriptor *VAR_3 = &av_pix_fmt_descriptors[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 (VA... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
19,
21
],
[
23
],
[
25
],
[
29,
31
],
[
33,
35
],
[
39,
41,
43
],
[
45
],
[
47,
49
],
[
51
],
[
53
],
[... |
26,109 | static void pty_chr_close(struct CharDriverState *chr)
{
PtyCharDriver *s = chr->opaque;
int fd;
remove_fd_in_watch(chr);
fd = g_io_channel_unix_get_fd(s->fd);
g_io_channel_unref(s->fd);
close(fd);
if (s->timer_tag) {
g_source_remove(s->timer_tag);
s->timer_tag = ... | true | qemu | 7b3621f47a990c5099c6385728347f69a8d0e55c | static void pty_chr_close(struct CharDriverState *chr)
{
PtyCharDriver *s = chr->opaque;
int fd;
remove_fd_in_watch(chr);
fd = g_io_channel_unix_get_fd(s->fd);
g_io_channel_unref(s->fd);
close(fd);
if (s->timer_tag) {
g_source_remove(s->timer_tag);
s->timer_tag = ... | {
"code": [
" remove_fd_in_watch(chr);"
],
"line_no": [
11
]
} | static void FUNC_0(struct CharDriverState *VAR_0)
{
PtyCharDriver *s = VAR_0->opaque;
int VAR_1;
remove_fd_in_watch(VAR_0);
VAR_1 = g_io_channel_unix_get_fd(s->VAR_1);
g_io_channel_unref(s->VAR_1);
close(VAR_1);
if (s->timer_tag) {
g_source_remove(s->timer_tag);
s... | [
"static void FUNC_0(struct CharDriverState *VAR_0)\n{",
"PtyCharDriver *s = VAR_0->opaque;",
"int VAR_1;",
"remove_fd_in_watch(VAR_0);",
"VAR_1 = g_io_channel_unix_get_fd(s->VAR_1);",
"g_io_channel_unref(s->VAR_1);",
"close(VAR_1);",
"if (s->timer_tag) {",
"g_source_remove(s->timer_tag);",
"s->tim... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
26,111 | av_cold void ff_dct_init_mmx(DCTContext *s)
{
#if HAVE_YASM
int has_vectors = av_get_cpu_flags();
if (has_vectors & AV_CPU_FLAG_SSE && HAVE_SSE)
s->dct32 = ff_dct32_float_sse;
if (has_vectors & AV_CPU_FLAG_SSE2 && HAVE_SSE)
s->dct32 = ff_dct32_float_sse2;
if (has_vectors & AV_CPU... | false | FFmpeg | e0c6cce44729d94e2a5507a4b6d031f23e8bd7b6 | av_cold void ff_dct_init_mmx(DCTContext *s)
{
#if HAVE_YASM
int has_vectors = av_get_cpu_flags();
if (has_vectors & AV_CPU_FLAG_SSE && HAVE_SSE)
s->dct32 = ff_dct32_float_sse;
if (has_vectors & AV_CPU_FLAG_SSE2 && HAVE_SSE)
s->dct32 = ff_dct32_float_sse2;
if (has_vectors & AV_CPU... | {
"code": [],
"line_no": []
} | av_cold void FUNC_0(DCTContext *s)
{
#if HAVE_YASM
int has_vectors = av_get_cpu_flags();
if (has_vectors & AV_CPU_FLAG_SSE && HAVE_SSE)
s->dct32 = ff_dct32_float_sse;
if (has_vectors & AV_CPU_FLAG_SSE2 && HAVE_SSE)
s->dct32 = ff_dct32_float_sse2;
if (has_vectors & AV_CPU_FLAG_AVX... | [
"av_cold void FUNC_0(DCTContext *s)\n{",
"#if HAVE_YASM\nint has_vectors = av_get_cpu_flags();",
"if (has_vectors & AV_CPU_FLAG_SSE && HAVE_SSE)\ns->dct32 = ff_dct32_float_sse;",
"if (has_vectors & AV_CPU_FLAG_SSE2 && HAVE_SSE)\ns->dct32 = ff_dct32_float_sse2;",
"if (has_vectors & AV_CPU_FLAG_AVX && HAVE_AV... | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9,
11
],
[
13,
15
],
[
17,
19
],
[
21,
23
]
] |
26,112 | int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame)
{
AVFrame *tmp;
int ret;
av_assert0(avctx->codec_type == AVMEDIA_TYPE_VIDEO);
if (!frame->data[0])
return ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF);
if (av_frame_is_writable(frame)) {
frame->pkt_pts = ... | false | FFmpeg | 4a0f6651434c6f213d830140f575b4ec7858519f | int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame)
{
AVFrame *tmp;
int ret;
av_assert0(avctx->codec_type == AVMEDIA_TYPE_VIDEO);
if (!frame->data[0])
return ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF);
if (av_frame_is_writable(frame)) {
frame->pkt_pts = ... | {
"code": [],
"line_no": []
} | int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1)
{
AVFrame *tmp;
int VAR_2;
av_assert0(VAR_0->codec_type == AVMEDIA_TYPE_VIDEO);
if (!VAR_1->data[0])
return ff_get_buffer(VAR_0, VAR_1, AV_GET_BUFFER_FLAG_REF);
if (av_frame_is_writable(VAR_1)) {
VAR_1->pkt_pts = VAR_0->... | [
"int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1)\n{",
"AVFrame *tmp;",
"int VAR_2;",
"av_assert0(VAR_0->codec_type == AVMEDIA_TYPE_VIDEO);",
"if (!VAR_1->data[0])\nreturn ff_get_buffer(VAR_0, VAR_1, AV_GET_BUFFER_FLAG_REF);",
"if (av_frame_is_writable(VAR_1)) {",
"VAR_1->pkt_pts = VAR_0->internal->pkt... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15,
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35,
37
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
57... |
26,115 | static void block_dirty_bitmap_add_abort(BlkActionState *common)
{
BlockDirtyBitmapAdd *action;
BlockDirtyBitmapState *state = DO_UPCAST(BlockDirtyBitmapState,
common, common);
action = common->action->u.block_dirty_bitmap_add;
/* Should not be able t... | false | qemu | 32bafa8fdd098d52fbf1102d5a5e48d29398c0aa | static void block_dirty_bitmap_add_abort(BlkActionState *common)
{
BlockDirtyBitmapAdd *action;
BlockDirtyBitmapState *state = DO_UPCAST(BlockDirtyBitmapState,
common, common);
action = common->action->u.block_dirty_bitmap_add;
if (state->pr... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlkActionState *VAR_0)
{
BlockDirtyBitmapAdd *action;
BlockDirtyBitmapState *state = DO_UPCAST(BlockDirtyBitmapState,
VAR_0, VAR_0);
action = VAR_0->action->u.block_dirty_bitmap_add;
if (state->prepared) {
qmp_blo... | [
"static void FUNC_0(BlkActionState *VAR_0)\n{",
"BlockDirtyBitmapAdd *action;",
"BlockDirtyBitmapState *state = DO_UPCAST(BlockDirtyBitmapState,\nVAR_0, VAR_0);",
"action = VAR_0->action->u.block_dirty_bitmap_add;",
"if (state->prepared) {",
"qmp_block_dirty_bitmap_remove(action->node, action->name, &erro... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
13
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
26,116 | static int cirrus_bitblt_common_patterncopy(CirrusVGAState *s, bool videosrc)
{
uint32_t patternsize;
uint8_t *dst;
uint8_t *src;
dst = s->vga.vram_ptr + s->cirrus_blt_dstaddr;
if (videosrc) {
switch (s->vga.get_bpp(&s->vga)) {
case 8:
patternsize = 64;
... | false | qemu | 026aeffcb4752054830ba203020ed6eb05bcaba8 | static int cirrus_bitblt_common_patterncopy(CirrusVGAState *s, bool videosrc)
{
uint32_t patternsize;
uint8_t *dst;
uint8_t *src;
dst = s->vga.vram_ptr + s->cirrus_blt_dstaddr;
if (videosrc) {
switch (s->vga.get_bpp(&s->vga)) {
case 8:
patternsize = 64;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(CirrusVGAState *VAR_0, bool VAR_1)
{
uint32_t patternsize;
uint8_t *dst;
uint8_t *src;
dst = VAR_0->vga.vram_ptr + VAR_0->cirrus_blt_dstaddr;
if (VAR_1) {
switch (VAR_0->vga.get_bpp(&VAR_0->vga)) {
case 8:
patternsize = 64;
brea... | [
"static int FUNC_0(CirrusVGAState *VAR_0, bool VAR_1)\n{",
"uint32_t patternsize;",
"uint8_t *dst;",
"uint8_t *src;",
"dst = VAR_0->vga.vram_ptr + VAR_0->cirrus_blt_dstaddr;",
"if (VAR_1) {",
"switch (VAR_0->vga.get_bpp(&VAR_0->vga)) {",
"case 8:\npatternsize = 64;",
"break;",
"case 15:\ncase 16:\... | [
0,
0,
0,
0,
0,
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,
23
],
[
25
],
[
27,
29,
31
],
[
33
],
[
35,
37,
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
26,119 | static int nbd_handle_export_name(NBDClient *client, uint32_t length)
{
int rc = -EINVAL, csock = client->sock;
char name[256];
/* Client sends:
[20 .. xx] export name (length bytes)
*/
TRACE("Checking length");
if (length > 255) {
LOG("Bad length received");
... | false | qemu | 1a6245a5b0b4e8d822c739b403fc67c8a7bc8d12 | static int nbd_handle_export_name(NBDClient *client, uint32_t length)
{
int rc = -EINVAL, csock = client->sock;
char name[256];
TRACE("Checking length");
if (length > 255) {
LOG("Bad length received");
goto fail;
}
if (read_sync(csock, name, length) != length... | {
"code": [],
"line_no": []
} | static int FUNC_0(NBDClient *VAR_0, uint32_t VAR_1)
{
int VAR_2 = -EINVAL, VAR_3 = VAR_0->sock;
char VAR_4[256];
TRACE("Checking VAR_1");
if (VAR_1 > 255) {
LOG("Bad VAR_1 received");
goto fail;
}
if (read_sync(VAR_3, VAR_4, VAR_1) != VAR_1) {
LOG("r... | [
"static int FUNC_0(NBDClient *VAR_0, uint32_t VAR_1)\n{",
"int VAR_2 = -EINVAL, VAR_3 = VAR_0->sock;",
"char VAR_4[256];",
"TRACE(\"Checking VAR_1\");",
"if (VAR_1 > 255) {",
"LOG(\"Bad VAR_1 received\");",
"goto fail;",
"}",
"if (read_sync(VAR_3, VAR_4, VAR_1) != VAR_1) {",
"LOG(\"read failed\");... | [
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
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53... |
26,120 | static void tcg_out_insn_3401(TCGContext *s, AArch64Insn insn, TCGType ext,
TCGReg rd, TCGReg rn, uint64_t aimm)
{
if (aimm > 0xfff) {
assert((aimm & 0xfff) == 0);
aimm >>= 12;
assert(aimm <= 0xfff);
aimm |= 1 << 12; /* apply LSL 12 */
}
... | false | qemu | eabb7b91b36b202b4dac2df2d59d698e3aff197a | static void tcg_out_insn_3401(TCGContext *s, AArch64Insn insn, TCGType ext,
TCGReg rd, TCGReg rn, uint64_t aimm)
{
if (aimm > 0xfff) {
assert((aimm & 0xfff) == 0);
aimm >>= 12;
assert(aimm <= 0xfff);
aimm |= 1 << 12;
}
tcg_out32(s, ins... | {
"code": [],
"line_no": []
} | static void FUNC_0(TCGContext *VAR_0, AArch64Insn VAR_1, TCGType VAR_2,
TCGReg VAR_3, TCGReg VAR_4, uint64_t VAR_5)
{
if (VAR_5 > 0xfff) {
assert((VAR_5 & 0xfff) == 0);
VAR_5 >>= 12;
assert(VAR_5 <= 0xfff);
VAR_5 |= 1 << 12;
}
tcg_out3... | [
"static void FUNC_0(TCGContext *VAR_0, AArch64Insn VAR_1, TCGType VAR_2,\nTCGReg VAR_3, TCGReg VAR_4, uint64_t VAR_5)\n{",
"if (VAR_5 > 0xfff) {",
"assert((VAR_5 & 0xfff) == 0);",
"VAR_5 >>= 12;",
"assert(VAR_5 <= 0xfff);",
"VAR_5 |= 1 << 12;",
"}",
"tcg_out32(VAR_0, VAR_1 | VAR_2 << 31 | VAR_5 << 10 ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
26,121 | static int proxy_mkdir(FsContext *fs_ctx, V9fsPath *dir_path,
const char *name, FsCred *credp)
{
int retval;
V9fsString fullname;
v9fs_string_init(&fullname);
v9fs_string_sprintf(&fullname, "%s/%s", dir_path->data, name);
retval = v9fs_request(fs_ctx->private, T_MKD... | false | qemu | 494a8ebe713055d3946183f4b395f85a18b43e9e | static int proxy_mkdir(FsContext *fs_ctx, V9fsPath *dir_path,
const char *name, FsCred *credp)
{
int retval;
V9fsString fullname;
v9fs_string_init(&fullname);
v9fs_string_sprintf(&fullname, "%s/%s", dir_path->data, name);
retval = v9fs_request(fs_ctx->private, T_MKD... | {
"code": [],
"line_no": []
} | static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,
const char *VAR_2, FsCred *VAR_3)
{
int VAR_4;
V9fsString fullname;
v9fs_string_init(&fullname);
v9fs_string_sprintf(&fullname, "%s/%s", VAR_1->data, VAR_2);
VAR_4 = v9fs_request(VAR_0->private, T_MKDIR, NULL, "sd... | [
"static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,\nconst char *VAR_2, FsCred *VAR_3)\n{",
"int VAR_4;",
"V9fsString fullname;",
"v9fs_string_init(&fullname);",
"v9fs_string_sprintf(&fullname, \"%s/%s\", VAR_1->data, VAR_2);",
"VAR_4 = v9fs_request(VAR_0->private, T_MKDIR, NULL, \"sddd\", &fullname,\nV... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
]
] |
26,123 | static always_inline uint64_t float_zero_divide_excp (uint64_t arg1, uint64_t arg2)
{
env->fpscr |= 1 << FPSCR_ZX;
env->fpscr &= ~((1 << FPSCR_FR) | (1 << FPSCR_FI));
/* Update the floating-point exception summary */
env->fpscr |= 1 << FPSCR_FX;
if (fpscr_ze != 0) {
/* Update the floa... | false | qemu | e33e94f92298c96e0928cefab00ea5bae0a1cd19 | static always_inline uint64_t float_zero_divide_excp (uint64_t arg1, uint64_t arg2)
{
env->fpscr |= 1 << FPSCR_ZX;
env->fpscr &= ~((1 << FPSCR_FR) | (1 << FPSCR_FI));
env->fpscr |= 1 << FPSCR_FX;
if (fpscr_ze != 0) {
env->fpscr |= 1 << FPSCR_FEX;
if (msr_fe0 != 0 |... | {
"code": [],
"line_no": []
} | static always_inline VAR_0 float_zero_divide_excp (VAR_0 arg1, VAR_0 arg2)
{
env->fpscr |= 1 << FPSCR_ZX;
env->fpscr &= ~((1 << FPSCR_FR) | (1 << FPSCR_FI));
env->fpscr |= 1 << FPSCR_FX;
if (fpscr_ze != 0) {
env->fpscr |= 1 << FPSCR_FEX;
if (msr_fe0 != 0 || msr_fe1... | [
"static always_inline VAR_0 float_zero_divide_excp (VAR_0 arg1, VAR_0 arg2)\n{",
"env->fpscr |= 1 << FPSCR_ZX;",
"env->fpscr &= ~((1 << FPSCR_FR) | (1 << FPSCR_FI));",
"env->fpscr |= 1 << FPSCR_FX;",
"if (fpscr_ze != 0) {",
"env->fpscr |= 1 << FPSCR_FEX;",
"if (msr_fe0 != 0 || msr_fe1 != 0) {",
"helpe... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
26,124 | void *s1d13745_init(qemu_irq gpio_int)
{
BlizzardState *s = (BlizzardState *) g_malloc0(sizeof(*s));
DisplaySurface *surface;
s->fb = g_malloc(0x180000);
s->con = graphic_console_init(blizzard_update_display,
blizzard_invalidate_display,
... | false | qemu | 2c62f08ddbf3fa80dc7202eb9a2ea60ae44e2cc5 | void *s1d13745_init(qemu_irq gpio_int)
{
BlizzardState *s = (BlizzardState *) g_malloc0(sizeof(*s));
DisplaySurface *surface;
s->fb = g_malloc(0x180000);
s->con = graphic_console_init(blizzard_update_display,
blizzard_invalidate_display,
... | {
"code": [],
"line_no": []
} | void *FUNC_0(qemu_irq VAR_0)
{
BlizzardState *s = (BlizzardState *) g_malloc0(sizeof(*s));
DisplaySurface *surface;
s->fb = g_malloc(0x180000);
s->con = graphic_console_init(blizzard_update_display,
blizzard_invalidate_display,
... | [
"void *FUNC_0(qemu_irq VAR_0)\n{",
"BlizzardState *s = (BlizzardState *) g_malloc0(sizeof(*s));",
"DisplaySurface *surface;",
"s->fb = g_malloc(0x180000);",
"s->con = graphic_console_init(blizzard_update_display,\nblizzard_invalidate_display,\nblizzard_screen_dump, NULL, s);",
"surface = qemu_console_surf... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15,
17,
19
],
[
21
],
[
25
],
[
27,
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
[
51,
53
],
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.