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 |
|---|---|---|---|---|---|---|---|---|---|---|
5,322 | static void print_samplesref(AVFilterBufferRef *samplesref)
{
const AVFilterBufferRefAudioProps *props = samplesref->audio;
const int n = props->nb_samples * av_get_channel_layout_nb_channels(props->channel_layout);
const uint16_t *p = (uint16_t*)samplesref->data[0];
const uint16_t *p_end = p +... | true | FFmpeg | 9076a6a943f7855756222181698aba78d3773d8f | static void print_samplesref(AVFilterBufferRef *samplesref)
{
const AVFilterBufferRefAudioProps *props = samplesref->audio;
const int n = props->nb_samples * av_get_channel_layout_nb_channels(props->channel_layout);
const uint16_t *p = (uint16_t*)samplesref->data[0];
const uint16_t *p_end = p +... | {
"code": [
"static void print_samplesref(AVFilterBufferRef *samplesref)",
" const AVFilterBufferRefAudioProps *props = samplesref->audio;",
" const int n = props->nb_samples * av_get_channel_layout_nb_channels(props->channel_layout);",
" const uint16_t *p = (uint16_t*)samplesref->data[0]... | static void FUNC_0(AVFilterBufferRef *VAR_0)
{
const AVFilterBufferRefAudioProps *VAR_1 = VAR_0->audio;
const int VAR_2 = VAR_1->nb_samples * av_get_channel_layout_nb_channels(VAR_1->channel_layout);
const uint16_t *VAR_3 = (uint16_t*)VAR_0->data[0];
const uint16_t *VAR_4 = VAR_3 + VAR_2;
... | [
"static void FUNC_0(AVFilterBufferRef *VAR_0)\n{",
"const AVFilterBufferRefAudioProps *VAR_1 = VAR_0->audio;",
"const int VAR_2 = VAR_1->nb_samples * av_get_channel_layout_nb_channels(VAR_1->channel_layout);",
"const uint16_t *VAR_3 = (uint16_t*)VAR_0->data[0];",
"const uint16_t *VAR_4 = VAR_3 + VAR_2;"... | [
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
5,323 | static void test_media_insert(void)
{
uint8_t dir;
/* Insert media in drive. DSKCHK should not be reset until a step pulse
* is sent. */
qmp_discard_response("{'execute':'change', 'arguments':{"
" 'device':'floppy0', 'target': '%s' }}",
test_im... | true | qemu | 563890c7c7e977842e2a35afe7a24d06d2103242 | static void test_media_insert(void)
{
uint8_t dir;
qmp_discard_response("{'execute':'change', 'arguments':{"
" 'device':'floppy0', 'target': '%s' }}",
test_image);
qmp_discard_response("");
qmp_discard_response("");
dir = inb(... | {
"code": [
" \" 'device':'floppy0', 'target': '%s' }}\","
],
"line_no": [
15
]
} | static void FUNC_0(void)
{
uint8_t dir;
qmp_discard_response("{'execute':'change', 'arguments':{"
" 'device':'floppy0', 'target': '%s' }}",
test_image);
qmp_discard_response("");
qmp_discard_response("");
dir = inb(FLOPPY_BASE... | [
"static void FUNC_0(void)\n{",
"uint8_t dir;",
"qmp_discard_response(\"{'execute':'change', 'arguments':{\"",
"\" 'device':'floppy0', 'target': '%s' }}\",",
"test_image);",
"qmp_discard_response(\"\");",
"qmp_discard_response(\"\");",
"dir = inb(FLOPPY_BASE + reg_dir);",
"assert_bit_set(dir, DSKCHG)... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
51
],
[
53
],
[
55
],
[
5... |
5,324 | void bdrv_set_dirty_tracking(BlockDriverState *bs, int enable)
{
int64_t bitmap_size;
if (enable) {
if (bs->dirty_tracking == 0) {
int64_t i;
uint8_t test;
bitmap_size = (bdrv_getlength(bs) >> BDRV_SECTOR_BITS);
bitmap_size /= BDRV_SECTORS_PER_... | true | qemu | c6d2283068026035a6468aae9dcde953bd7521ac | void bdrv_set_dirty_tracking(BlockDriverState *bs, int enable)
{
int64_t bitmap_size;
if (enable) {
if (bs->dirty_tracking == 0) {
int64_t i;
uint8_t test;
bitmap_size = (bdrv_getlength(bs) >> BDRV_SECTOR_BITS);
bitmap_size /= BDRV_SECTORS_PER_... | {
"code": [
" if (bs->dirty_tracking == 0) {",
" int64_t i;",
" uint8_t test;",
" bitmap_size = (bdrv_getlength(bs) >> BDRV_SECTOR_BITS);",
" bitmap_size /= BDRV_SECTORS_PER_DIRTY_CHUNK;",
" bitmap_size++;",
" bs->dir... | void FUNC_0(BlockDriverState *VAR_0, int VAR_1)
{
int64_t bitmap_size;
if (VAR_1) {
if (VAR_0->dirty_tracking == 0) {
int64_t i;
uint8_t test;
bitmap_size = (bdrv_getlength(VAR_0) >> BDRV_SECTOR_BITS);
bitmap_size /= BDRV_SECTORS_PER_DIRTY_CHUN... | [
"void FUNC_0(BlockDriverState *VAR_0, int VAR_1)\n{",
"int64_t bitmap_size;",
"if (VAR_1) {",
"if (VAR_0->dirty_tracking == 0) {",
"int64_t i;",
"uint8_t test;",
"bitmap_size = (bdrv_getlength(VAR_0) >> BDRV_SECTOR_BITS);",
"bitmap_size /= BDRV_SECTORS_PER_DIRTY_CHUNK;",
"bitmap_size++;",
"VAR_0->... | [
0,
0,
0,
1,
1,
1,
1,
1,
1,
0,
1,
1,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49... |
5,325 | static void quorum_aio_finalize(QuorumAIOCB *acb)
{
BDRVQuorumState *s = acb->common.bs->opaque;
int i, ret = 0;
if (acb->vote_ret) {
ret = acb->vote_ret;
}
acb->common.cb(acb->common.opaque, ret);
if (acb->is_read) {
for (i = 0; i < s->num_children; i++) {
... | true | qemu | a9db86b223030bd40bdd81b160788196bc95fe6f | static void quorum_aio_finalize(QuorumAIOCB *acb)
{
BDRVQuorumState *s = acb->common.bs->opaque;
int i, ret = 0;
if (acb->vote_ret) {
ret = acb->vote_ret;
}
acb->common.cb(acb->common.opaque, ret);
if (acb->is_read) {
for (i = 0; i < s->num_children; i++) {
... | {
"code": [
" BDRVQuorumState *s = acb->common.bs->opaque;",
" for (i = 0; i < s->num_children; i++) {"
],
"line_no": [
5,
25
]
} | static void FUNC_0(QuorumAIOCB *VAR_0)
{
BDRVQuorumState *s = VAR_0->common.bs->opaque;
int VAR_1, VAR_2 = 0;
if (VAR_0->vote_ret) {
VAR_2 = VAR_0->vote_ret;
}
VAR_0->common.cb(VAR_0->common.opaque, VAR_2);
if (VAR_0->is_read) {
for (VAR_1 = 0; VAR_1 < s->num_child... | [
"static void FUNC_0(QuorumAIOCB *VAR_0)\n{",
"BDRVQuorumState *s = VAR_0->common.bs->opaque;",
"int VAR_1, VAR_2 = 0;",
"if (VAR_0->vote_ret) {",
"VAR_2 = VAR_0->vote_ret;",
"}",
"VAR_0->common.cb(VAR_0->common.opaque, VAR_2);",
"if (VAR_0->is_read) {",
"for (VAR_1 = 0; VAR_1 < s->num_children; VAR_... | [
0,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
]
] |
5,326 | static int h261_decode_gob_header(H261Context *h){
unsigned int val;
MpegEncContext * const s = &h->s;
/* Check for GOB Start Code */
val = show_bits(&s->gb, 15);
if(val)
return -1;
/* We have a GBSC */
skip_bits(&s->gb, 16);
h->gob_number = get_bits(&s->gb, 4)... | true | FFmpeg | 49e5dcbce5f9e08ec375fd54c413148beb81f1d7 | static int h261_decode_gob_header(H261Context *h){
unsigned int val;
MpegEncContext * const s = &h->s;
val = show_bits(&s->gb, 15);
if(val)
return -1;
skip_bits(&s->gb, 16);
h->gob_number = get_bits(&s->gb, 4);
s->qscale = get_bits(&s->gb, 5);
... | {
"code": [
" val = show_bits(&s->gb, 15);",
" if(val)",
" return -1;",
" skip_bits(&s->gb, 16);",
" skip_bits(&s->gb, 8);",
" return -1;",
" return -1;"
],
"line_no": [
11,
13,
15,
21,
35,
15,
15
]
} | static int FUNC_0(H261Context *VAR_0){
unsigned int VAR_1;
MpegEncContext * const s = &VAR_0->s;
VAR_1 = show_bits(&s->gb, 15);
if(VAR_1)
return -1;
skip_bits(&s->gb, 16);
VAR_0->gob_number = get_bits(&s->gb, 4);
s->qscale = get_bits(&s->gb, 5);
... | [
"static int FUNC_0(H261Context *VAR_0){",
"unsigned int VAR_1;",
"MpegEncContext * const s = &VAR_0->s;",
"VAR_1 = show_bits(&s->gb, 15);",
"if(VAR_1)\nreturn -1;",
"skip_bits(&s->gb, 16);",
"VAR_0->gob_number = get_bits(&s->gb, 4);",
"s->qscale = get_bits(&s->gb, 5);",
"while (get_bits1(&s->gb) != ... | [
0,
0,
0,
1,
1,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
11
],
[
13,
15
],
[
21
],
[
25
],
[
27
],
[
33
],
[
35
],
[
37
],
[
41,
43
],
[
53
],
[
55
],
[
59
],
[
61
]
] |
5,328 | static int vhost_user_set_u64(struct vhost_dev *dev, int request, uint64_t u64)
{
VhostUserMsg msg = {
.request = request,
.flags = VHOST_USER_VERSION,
.u64 = u64,
.size = sizeof(m.u64),
};
vhost_user_write(dev, &msg, NULL, 0);
return 0;
}
| true | qemu | 7f4a930e64b9e69cd340395a7e4f0494aef4fcdd | static int vhost_user_set_u64(struct vhost_dev *dev, int request, uint64_t u64)
{
VhostUserMsg msg = {
.request = request,
.flags = VHOST_USER_VERSION,
.u64 = u64,
.size = sizeof(m.u64),
};
vhost_user_write(dev, &msg, NULL, 0);
return 0;
}
| {
"code": [
" };",
" .size = sizeof(m.u64),",
" .size = sizeof(m.u64),",
" .u64 = u64,",
" .size = sizeof(m.u64),"
],
"line_no": [
15,
13,
13,
11,
13
]
} | static int FUNC_0(struct vhost_dev *VAR_0, int VAR_1, uint64_t VAR_2)
{
VhostUserMsg msg = {
.VAR_1 = VAR_1,
.flags = VHOST_USER_VERSION,
.VAR_2 = VAR_2,
.size = sizeof(m.VAR_2),
};
vhost_user_write(VAR_0, &msg, NULL, 0);
return 0;
}
| [
"static int FUNC_0(struct vhost_dev *VAR_0, int VAR_1, uint64_t VAR_2)\n{",
"VhostUserMsg msg = {",
".VAR_1 = VAR_1,\n.flags = VHOST_USER_VERSION,\n.VAR_2 = VAR_2,\n.size = sizeof(m.VAR_2),\n};",
"vhost_user_write(VAR_0, &msg, NULL, 0);",
"return 0;",
"}"
] | [
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9,
11,
13,
15
],
[
19
],
[
23
],
[
25
]
] |
5,329 | static int read_rle_sgi(uint8_t *out_buf, SgiState *s)
{
uint8_t *dest_row;
unsigned int len = s->height * s->depth * 4;
GetByteContext g_table = s->g;
unsigned int y, z;
unsigned int start_offset;
/* size of RLE offset and length tables */
if (len * 2 > bytestream2_get_bytes_lef... | true | FFmpeg | f4a8a0080537484154bb74e08ec76cbcbd25484b | static int read_rle_sgi(uint8_t *out_buf, SgiState *s)
{
uint8_t *dest_row;
unsigned int len = s->height * s->depth * 4;
GetByteContext g_table = s->g;
unsigned int y, z;
unsigned int start_offset;
if (len * 2 > bytestream2_get_bytes_left(&s->g)) {
return AVERROR_INVALID... | {
"code": [
" if (expand_rle_row(s, dest_row + z, dest_row + FFABS(s->linesize),"
],
"line_no": [
39
]
} | static int FUNC_0(uint8_t *VAR_0, SgiState *VAR_1)
{
uint8_t *dest_row;
unsigned int VAR_2 = VAR_1->height * VAR_1->depth * 4;
GetByteContext g_table = VAR_1->g;
unsigned int VAR_3, VAR_4;
unsigned int VAR_5;
if (VAR_2 * 2 > bytestream2_get_bytes_left(&VAR_1->g)) {
retur... | [
"static int FUNC_0(uint8_t *VAR_0, SgiState *VAR_1)\n{",
"uint8_t *dest_row;",
"unsigned int VAR_2 = VAR_1->height * VAR_1->depth * 4;",
"GetByteContext g_table = VAR_1->g;",
"unsigned int VAR_3, VAR_4;",
"unsigned int VAR_5;",
"if (VAR_2 * 2 > bytestream2_get_bytes_left(&VAR_1->g)) {",
"return AVERR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[... |
5,330 | static inline void RENAME(uyvyToY)(uint8_t *dst, const uint8_t *src, long width, uint32_t *unused)
{
#if COMPILE_TEMPLATE_MMX
__asm__ volatile(
"mov %0, %%"REG_a" \n\t"
"1: \n\t"
"movq (%1, %%"REG_a",2), %%mm0 ... | false | FFmpeg | d1adad3cca407f493c3637e20ecd4f7124e69212 | static inline void RENAME(uyvyToY)(uint8_t *dst, const uint8_t *src, long width, uint32_t *unused)
{
#if COMPILE_TEMPLATE_MMX
__asm__ volatile(
"mov %0, %%"REG_a" \n\t"
"1: \n\t"
"movq (%1, %%"REG_a",2), %%mm0 ... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(uyvyToY)(uint8_t *dst, const uint8_t *src, long width, uint32_t *unused)
{
#if COMPILE_TEMPLATE_MMX
__asm__ volatile(
"mov %0, %%"REG_a" \n\t"
"1: \n\t"
"movq (%1, %%"REG_a",2), %%mm0 ... | [
"static inline void FUNC_0(uyvyToY)(uint8_t *dst, const uint8_t *src, long width, uint32_t *unused)\n{",
"#if COMPILE_TEMPLATE_MMX\n__asm__ volatile(\n\"mov %0, %%\"REG_a\" \\n\\t\"\n\"1: \\n\\t\"\n\"movq (%1, %%\"REG_a\",2), %%mm0 \\n\... | [
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
]
] |
5,331 | static inline void RENAME(yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
long width, long height,
long lumStride, long chromStride, long dstStride)
{
//FIXME interpolate chroma
RENAME(yuvPl... | false | FFmpeg | d1adad3cca407f493c3637e20ecd4f7124e69212 | static inline void RENAME(yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
long width, long height,
long lumStride, long chromStride, long dstStride)
{
RENAME(yuvPlanartoyuy2)(ysrc, usrc, vs... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
long width, long height,
long lumStride, long chromStride, long dstStride)
{
FUNC_0(yuvPlanartoyuy2)(ysrc, usrc, vs... | [
"static inline void FUNC_0(yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,\nlong width, long height,\nlong lumStride, long chromStride, long dstStride)\n{",
"FUNC_0(yuvPlanartoyuy2)(ysrc, usrc, vsrc, dst, width, height, lumStride, chromStride, dstStride, 2);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
11
],
[
13
]
] |
5,332 | static av_always_inline void filter_common(uint8_t *p, ptrdiff_t stride, int is4tap)
{
LOAD_PIXELS
int a, f1, f2;
const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
a = 3*(q0 - p0);
if (is4tap)
a += clip_int8(p1 - q1);
a = clip_int8(a);
// We deviate from the spec here w... | false | FFmpeg | b8664c929437d6d079e16979c496a2db40cf2324 | static av_always_inline void filter_common(uint8_t *p, ptrdiff_t stride, int is4tap)
{
LOAD_PIXELS
int a, f1, f2;
const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
a = 3*(q0 - p0);
if (is4tap)
a += clip_int8(p1 - q1);
a = clip_int8(a);
f1 = FFMIN(a+4, 127) >... | {
"code": [],
"line_no": []
} | static av_always_inline void FUNC_0(uint8_t *p, ptrdiff_t stride, int is4tap)
{
LOAD_PIXELS
int a, f1, f2;
const uint8_t *VAR_0 = ff_cropTbl + MAX_NEG_CROP;
a = 3*(q0 - p0);
if (is4tap)
a += clip_int8(p1 - q1);
a = clip_int8(a);
f1 = FFMIN(a+4, 127) >> 3;... | [
"static av_always_inline void FUNC_0(uint8_t *p, ptrdiff_t stride, int is4tap)\n{",
"LOAD_PIXELS\nint a, f1, f2;",
"const uint8_t *VAR_0 = ff_cropTbl + MAX_NEG_CROP;",
"a = 3*(q0 - p0);",
"if (is4tap)\na += clip_int8(p1 - q1);",
"a = clip_int8(a);",
"f1 = FFMIN(a+4, 127) >> 3;",
"f2 = FFMIN(a+3, 127) ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
13
],
[
17,
19
],
[
23
],
[
31
],
[
33
],
[
41
],
[
43
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
],
[
59
]
] |
5,334 | static int theora_decode_init(AVCodecContext *avctx)
{
Vp3DecodeContext *s = avctx->priv_data;
GetBitContext gb;
int ptype;
uint8_t *p= avctx->extradata;
int op_bytes, i;
s->theora = 1;
if (!avctx->extradata_size)
{
av_log(avctx, AV_LOG_ERROR, "Missing extradata!\n"... | false | FFmpeg | e278056fbad7405fc47901faea7de98db003a0fa | static int theora_decode_init(AVCodecContext *avctx)
{
Vp3DecodeContext *s = avctx->priv_data;
GetBitContext gb;
int ptype;
uint8_t *p= avctx->extradata;
int op_bytes, i;
s->theora = 1;
if (!avctx->extradata_size)
{
av_log(avctx, AV_LOG_ERROR, "Missing extradata!\n"... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0)
{
Vp3DecodeContext *s = VAR_0->priv_data;
GetBitContext gb;
int VAR_1;
uint8_t *p= VAR_0->extradata;
int VAR_2, VAR_3;
s->theora = 1;
if (!VAR_0->extradata_size)
{
av_log(VAR_0, AV_LOG_ERROR, "Missing extradata!\n");
... | [
"static int FUNC_0(AVCodecContext *VAR_0)\n{",
"Vp3DecodeContext *s = VAR_0->priv_data;",
"GetBitContext gb;",
"int VAR_1;",
"uint8_t *p= VAR_0->extradata;",
"int VAR_2, VAR_3;",
"s->theora = 1;",
"if (!VAR_0->extradata_size)\n{",
"av_log(VAR_0, AV_LOG_ERROR, \"Missing extradata!\\n\");",
"return ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
47
],
[
49
],
[
53,
55
... |
5,335 | static av_cold int pcm_encode_init(AVCodecContext *avctx)
{
avctx->frame_size = 0;
switch (avctx->codec->id) {
case AV_CODEC_ID_PCM_ALAW:
pcm_alaw_tableinit();
break;
case AV_CODEC_ID_PCM_MULAW:
pcm_ulaw_tableinit();
break;
default:
break;
}
... | false | FFmpeg | d6604b29ef544793479d7fb4e05ef6622bb3e534 | static av_cold int pcm_encode_init(AVCodecContext *avctx)
{
avctx->frame_size = 0;
switch (avctx->codec->id) {
case AV_CODEC_ID_PCM_ALAW:
pcm_alaw_tableinit();
break;
case AV_CODEC_ID_PCM_MULAW:
pcm_ulaw_tableinit();
break;
default:
break;
}
... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
avctx->frame_size = 0;
switch (avctx->codec->id) {
case AV_CODEC_ID_PCM_ALAW:
pcm_alaw_tableinit();
break;
case AV_CODEC_ID_PCM_MULAW:
pcm_ulaw_tableinit();
break;
default:
break;
}
avct... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"avctx->frame_size = 0;",
"switch (avctx->codec->id) {",
"case AV_CODEC_ID_PCM_ALAW:\npcm_alaw_tableinit();",
"break;",
"case AV_CODEC_ID_PCM_MULAW:\npcm_ulaw_tableinit();",
"break;",
"default:\nbreak;",
"}",
"avctx->bits_per_coded_sample = av... | [
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
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
43
],
[
45
]
] |
5,336 | static void write_packet(AVFormatContext *s, AVPacket *pkt, OutputStream *ost)
{
AVStream *st = ost->st;
int ret;
/*
* Audio encoders may split the packets -- #frames in != #packets out.
* But there is no reordering, so we can limit the number of output packets
* by simply dropping ... | false | FFmpeg | 398f015f077c6a2406deffd9e37ff34b9c7bb3bc | static void write_packet(AVFormatContext *s, AVPacket *pkt, OutputStream *ost)
{
AVStream *st = ost->st;
int ret;
if (!(st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && ost->encoding_needed)) {
if (ost->frame_number >= ost->max_frames) {
av_packet_unref(pkt);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1, OutputStream *VAR_2)
{
AVStream *st = VAR_2->st;
int VAR_3;
if (!(st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && VAR_2->encoding_needed)) {
if (VAR_2->frame_number >= VAR_2->max_frames) {
av_packet_u... | [
"static void FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1, OutputStream *VAR_2)\n{",
"AVStream *st = VAR_2->st;",
"int VAR_3;",
"if (!(st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && VAR_2->encoding_needed)) {",
"if (VAR_2->frame_number >= VAR_2->max_frames) {",
"av_packet_unref(VAR_1);",
"return;",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
49
],
[
51,
53
],
[
55
],
[
57
],
[
61,
63,
65... |
5,337 | void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
int lowres_flag, int is_mpeg12)
{
int mb_x, mb_y;
const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
#if CONFIG_MPEG_XVMC_DECODER
if(s->avctx->xvmc_acceleration){
ff_xvmc_decode_mb(s);//xvmc use... | false | FFmpeg | 83344066d326e6bad20feb66825ace12708eb084 | void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
int lowres_flag, int is_mpeg12)
{
int mb_x, mb_y;
const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
#if CONFIG_MPEG_XVMC_DECODER
if(s->avctx->xvmc_acceleration){
ff_xvmc_decode_mb(s);
... | {
"code": [],
"line_no": []
} | void FUNC_0(MpegEncContext *VAR_0, DCTELEM VAR_1[12][64],
int VAR_2, int VAR_3)
{
int VAR_4, VAR_5;
const int VAR_6 = VAR_0->VAR_5 * VAR_0->mb_stride + VAR_0->VAR_4;
#if CONFIG_MPEG_XVMC_DECODER
if(VAR_0->avctx->xvmc_acceleration){
ff_xvmc_decode_mb(VAR_0);
... | [
"void FUNC_0(MpegEncContext *VAR_0, DCTELEM VAR_1[12][64],\nint VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5;",
"const int VAR_6 = VAR_0->VAR_5 * VAR_0->mb_stride + VAR_0->VAR_4;",
"#if CONFIG_MPEG_XVMC_DECODER\nif(VAR_0->avctx->xvmc_acceleration){",
"ff_xvmc_decode_mb(VAR_0);",
"return;",
"}",
"#endif\nV... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
55
],
[... |
5,338 | void ff_aac_apply_tns(SingleChannelElement *sce)
{
const int mmm = FFMIN(sce->ics.tns_max_bands, sce->ics.max_sfb);
float *coef = sce->pcoeffs;
TemporalNoiseShaping *tns = &sce->tns;
int w, filt, m, i;
int bottom, top, order, start, end, size, inc;
float *lpc, tmp[TNS_MAX_ORDER+1];
... | false | FFmpeg | 21bfeec27f933e18e7aac52ec025831353f47430 | void ff_aac_apply_tns(SingleChannelElement *sce)
{
const int mmm = FFMIN(sce->ics.tns_max_bands, sce->ics.max_sfb);
float *coef = sce->pcoeffs;
TemporalNoiseShaping *tns = &sce->tns;
int w, filt, m, i;
int bottom, top, order, start, end, size, inc;
float *lpc, tmp[TNS_MAX_ORDER+1];
... | {
"code": [],
"line_no": []
} | void FUNC_0(SingleChannelElement *VAR_0)
{
const int VAR_1 = FFMIN(VAR_0->ics.tns_max_bands, VAR_0->ics.max_sfb);
float *VAR_2 = VAR_0->pcoeffs;
TemporalNoiseShaping *tns = &VAR_0->tns;
int VAR_3, VAR_4, VAR_5, VAR_6;
int VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12, VAR_13;
float *VAR_14,... | [
"void FUNC_0(SingleChannelElement *VAR_0)\n{",
"const int VAR_1 = FFMIN(VAR_0->ics.tns_max_bands, VAR_0->ics.max_sfb);",
"float *VAR_2 = VAR_0->pcoeffs;",
"TemporalNoiseShaping *tns = &VAR_0->tns;",
"int VAR_3, VAR_4, VAR_5, VAR_6;",
"int VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12, VAR_13;",
"float *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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33,
35
],
[
39
],
[
41
],
[
43,
45
],
[
47
... |
5,339 | void qcow2_free_clusters(BlockDriverState *bs,
int64_t offset, int64_t size)
{
int ret;
BLKDBG_EVENT(bs->file, BLKDBG_CLUSTER_FREE);
ret = update_refcount(bs, offset, size, -1);
if (ret < 0) {
fprintf(stderr, "qcow2_free_clusters failed: %s\n", strerror(-ret));... | true | qemu | 003fad6e2cae5311d3aea996388c90e3ab17de90 | void qcow2_free_clusters(BlockDriverState *bs,
int64_t offset, int64_t size)
{
int ret;
BLKDBG_EVENT(bs->file, BLKDBG_CLUSTER_FREE);
ret = update_refcount(bs, offset, size, -1);
if (ret < 0) {
fprintf(stderr, "qcow2_free_clusters failed: %s\n", strerror(-ret));... | {
"code": [
" abort();"
],
"line_no": [
19
]
} | void FUNC_0(BlockDriverState *VAR_0,
int64_t VAR_1, int64_t VAR_2)
{
int VAR_3;
BLKDBG_EVENT(VAR_0->file, BLKDBG_CLUSTER_FREE);
VAR_3 = update_refcount(VAR_0, VAR_1, VAR_2, -1);
if (VAR_3 < 0) {
fprintf(stderr, "FUNC_0 failed: %s\n", strerror(-VAR_3));
... | [
"void FUNC_0(BlockDriverState *VAR_0,\nint64_t VAR_1, int64_t VAR_2)\n{",
"int VAR_3;",
"BLKDBG_EVENT(VAR_0->file, BLKDBG_CLUSTER_FREE);",
"VAR_3 = update_refcount(VAR_0, VAR_1, VAR_2, -1);",
"if (VAR_3 < 0) {",
"fprintf(stderr, \"FUNC_0 failed: %s\\n\", strerror(-VAR_3));",
"abort();",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
5,340 | static void do_video_stats(AVOutputStream *ost,
AVInputStream *ist,
int frame_size)
{
static FILE *fvstats=NULL;
static INT64 total_size = 0;
struct tm *today;
time_t today2;
char filename[40];
AVCodecContext *enc;
int frame_number... | true | FFmpeg | bf5af5687569e34d6e3a4d31fc6bb5dc44efdb29 | static void do_video_stats(AVOutputStream *ost,
AVInputStream *ist,
int frame_size)
{
static FILE *fvstats=NULL;
static INT64 total_size = 0;
struct tm *today;
time_t today2;
char filename[40];
AVCodecContext *enc;
int frame_number... | {
"code": [
" struct tm *today;",
" time_t today2;"
],
"line_no": [
13,
15
]
} | static void FUNC_0(AVOutputStream *VAR_0,
AVInputStream *VAR_1,
int VAR_2)
{
static FILE *VAR_3=NULL;
static INT64 VAR_4 = 0;
struct tm *VAR_5;
time_t today2;
char VAR_6[40];
AVCodecContext *enc;
int VAR_7;
INT64 ti;
doub... | [
"static void FUNC_0(AVOutputStream *VAR_0,\nAVInputStream *VAR_1,\nint VAR_2)\n{",
"static FILE *VAR_3=NULL;",
"static INT64 VAR_4 = 0;",
"struct tm *VAR_5;",
"time_t today2;",
"char VAR_6[40];",
"AVCodecContext *enc;",
"int VAR_7;",
"INT64 ti;",
"double VAR_8, VAR_9, VAR_10;",
"if (!VAR_3) {",
... | [
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
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35,
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
5,341 | static int scsi_handle_rw_error(SCSIDiskReq *r, int error, int type)
{
int is_read = (type == SCSI_REQ_STATUS_RETRY_READ);
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
BlockErrorAction action = bdrv_get_on_error(s->bs, is_read);
if (action == BLOCK_ERR_IGNORE) {
bdrv_mo... | true | qemu | a1f0cce2ac0243572ff72aa561da67fe3766a395 | static int scsi_handle_rw_error(SCSIDiskReq *r, int error, int type)
{
int is_read = (type == SCSI_REQ_STATUS_RETRY_READ);
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
BlockErrorAction action = bdrv_get_on_error(s->bs, is_read);
if (action == BLOCK_ERR_IGNORE) {
bdrv_mo... | {
"code": [
" scsi_command_complete(r, CHECK_CONDITION,",
" HARDWARE_ERROR);"
],
"line_no": [
47,
49
]
} | static int FUNC_0(SCSIDiskReq *VAR_0, int VAR_1, int VAR_2)
{
int VAR_3 = (VAR_2 == SCSI_REQ_STATUS_RETRY_READ);
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0->req.dev);
BlockErrorAction action = bdrv_get_on_error(s->bs, VAR_3);
if (action == BLOCK_ERR_IGNORE) {
bdrv_mon_event(... | [
"static int FUNC_0(SCSIDiskReq *VAR_0, int VAR_1, int VAR_2)\n{",
"int VAR_3 = (VAR_2 == SCSI_REQ_STATUS_RETRY_READ);",
"SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, VAR_0->req.dev);",
"BlockErrorAction action = bdrv_get_on_error(s->bs, VAR_3);",
"if (action == BLOCK_ERR_IGNORE) {",
"bdrv_mon_event(s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
25
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,
49
],
[
51
... |
5,342 | static gboolean qio_channel_websock_handshake_io(QIOChannel *ioc,
GIOCondition condition,
gpointer user_data)
{
QIOTask *task = user_data;
QIOChannelWebsock *wioc = QIO_CHANNEL_WEBSOCK(
qio_task_get_s... | true | qemu | bc35d51077b33e68a0ab10a057f352747214223f | static gboolean qio_channel_websock_handshake_io(QIOChannel *ioc,
GIOCondition condition,
gpointer user_data)
{
QIOTask *task = user_data;
QIOChannelWebsock *wioc = QIO_CHANNEL_WEBSOCK(
qio_task_get_s... | {
"code": [
" object_ref(OBJECT(task));",
" (GDestroyNotify)object_unref);"
],
"line_no": [
47,
61
]
} | static gboolean FUNC_0(QIOChannel *ioc,
GIOCondition condition,
gpointer user_data)
{
QIOTask *task = user_data;
QIOChannelWebsock *wioc = QIO_CHANNEL_WEBSOCK(
qio_task_get_source(task));
Error *... | [
"static gboolean FUNC_0(QIOChannel *ioc,\nGIOCondition condition,\ngpointer user_data)\n{",
"QIOTask *task = user_data;",
"QIOChannelWebsock *wioc = QIO_CHANNEL_WEBSOCK(\nqio_task_get_source(task));",
"Error *err = NULL;",
"int VAR_0;",
"VAR_0 = qio_channel_websock_handshake_read(wioc, &err);",
"if (VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11,
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
47
],
[
49
],
[... |
5,343 | static int find_debugfs(char *debugfs)
{
char type[100];
FILE *fp;
fp = fopen("/proc/mounts", "r");
if (fp == NULL) {
return 0;
}
while (fscanf(fp, "%*s %" STR(PATH_MAX) "s %99s %*s %*d %*d\n",
debugfs, type) == 2) {
if (strcmp(type, "debugfs") == ... | true | qemu | 5070570c9089b905dd9efae30ee4318033c6ccd6 | static int find_debugfs(char *debugfs)
{
char type[100];
FILE *fp;
fp = fopen("/proc/mounts", "r");
if (fp == NULL) {
return 0;
}
while (fscanf(fp, "%*s %" STR(PATH_MAX) "s %99s %*s %*d %*d\n",
debugfs, type) == 2) {
if (strcmp(type, "debugfs") == ... | {
"code": [
" if (strcmp(type, \"debugfs\") != 0) {",
" return 0;",
" return 1;"
],
"line_no": [
37,
15,
43
]
} | static int FUNC_0(char *VAR_0)
{
char VAR_1[100];
FILE *fp;
fp = fopen("/proc/mounts", "r");
if (fp == NULL) {
return 0;
}
while (fscanf(fp, "%*s %" STR(PATH_MAX) "s %99s %*s %*d %*d\n",
VAR_0, VAR_1) == 2) {
if (strcmp(VAR_1, "VAR_0") == 0) {
... | [
"static int FUNC_0(char *VAR_0)\n{",
"char VAR_1[100];",
"FILE *fp;",
"fp = fopen(\"/proc/mounts\", \"r\");",
"if (fp == NULL) {",
"return 0;",
"}",
"while (fscanf(fp, \"%*s %\" STR(PATH_MAX) \"s %99s %*s %*d %*d\\n\",\nVAR_0, VAR_1) == 2) {",
"if (strcmp(VAR_1, \"VAR_0\") == 0) {",
"break;",
"}... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
]
] |
5,344 | void qemu_input_event_send(QemuConsole *src, InputEvent *evt)
{
QemuInputHandlerState *s;
if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) {
qemu_input_event_trace(src, evt);
/* pre processing */
if (graphic_rotate && (evt->kind == INPUT_EVENT_KIND_ABS)) {
... | true | qemu | bdcc3a28b7f6ed6b90ad8b8af7b5d17e0d3f1f06 | void qemu_input_event_send(QemuConsole *src, InputEvent *evt)
{
QemuInputHandlerState *s;
if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) {
qemu_input_event_trace(src, evt);
if (graphic_rotate && (evt->kind == INPUT_EVENT_KIND_ABS)) {
qemu_input_transf... | {
"code": [],
"line_no": []
} | void FUNC_0(QemuConsole *VAR_0, InputEvent *VAR_1)
{
QemuInputHandlerState *s;
if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) {
qemu_input_event_trace(VAR_0, VAR_1);
if (graphic_rotate && (VAR_1->kind == INPUT_EVENT_KIND_ABS)) {
qemu_input_transform_a... | [
"void FUNC_0(QemuConsole *VAR_0, InputEvent *VAR_1)\n{",
"QemuInputHandlerState *s;",
"if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) {",
"qemu_input_event_trace(VAR_0, VAR_1);",
"if (graphic_rotate && (VAR_1->kind == INPUT_EVENT_KIND_ABS)) {",
"qemu_input_transform_abs_rotate(VAR_1);... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
15
],
[
21
],
[
23
],
[
30
],
[
35
],
[
37
]
] |
5,345 | static int qemu_chr_fe_write_buffer(CharDriverState *s, const uint8_t *buf, int len, int *offset)
{
int res = 0;
*offset = 0;
qemu_mutex_lock(&s->chr_write_lock);
while (*offset < len) {
do {
res = s->chr_write(s, buf + *offset, len - *offset);
if (res == -1 && ... | true | qemu | 53628efbc8aa7a7ab5354d24b971f4d69452151d | static int qemu_chr_fe_write_buffer(CharDriverState *s, const uint8_t *buf, int len, int *offset)
{
int res = 0;
*offset = 0;
qemu_mutex_lock(&s->chr_write_lock);
while (*offset < len) {
do {
res = s->chr_write(s, buf + *offset, len - *offset);
if (res == -1 && ... | {
"code": [
" do {",
" g_usleep(100);",
" do {",
" res = s->chr_write(s, buf + *offset, len - *offset);",
" if (res == -1 && errno == EAGAIN) {",
" g_usleep(100);",
" } while (res == -1 && errno == EAGAIN);",
" ... | static int FUNC_0(CharDriverState *VAR_0, const uint8_t *VAR_1, int VAR_2, int *VAR_3)
{
int VAR_4 = 0;
*VAR_3 = 0;
qemu_mutex_lock(&VAR_0->chr_write_lock);
while (*VAR_3 < VAR_2) {
do {
VAR_4 = VAR_0->chr_write(VAR_0, VAR_1 + *VAR_3, VAR_2 - *VAR_3);
if (VAR_4 ... | [
"static int FUNC_0(CharDriverState *VAR_0, const uint8_t *VAR_1, int VAR_2, int *VAR_3)\n{",
"int VAR_4 = 0;",
"*VAR_3 = 0;",
"qemu_mutex_lock(&VAR_0->chr_write_lock);",
"while (*VAR_3 < VAR_2) {",
"do {",
"VAR_4 = VAR_0->chr_write(VAR_0, VAR_1 + *VAR_3, VAR_2 - *VAR_3);",
"if (VAR_4 == -1 && errno ==... | [
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
1,
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
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47... |
5,346 | VLANClientState *qdev_get_vlan_client(DeviceState *dev,
NetCanReceive *can_receive,
NetReceive *receive,
NetReceiveIOV *receive_iov,
NetCleanup *cleanup,
... | true | qemu | ae50b2747f77944faa79eb914272b54eb30b63b3 | VLANClientState *qdev_get_vlan_client(DeviceState *dev,
NetCanReceive *can_receive,
NetReceive *receive,
NetReceiveIOV *receive_iov,
NetCleanup *cleanup,
... | {
"code": [
" return qemu_new_vlan_client(nd->vlan, nd->model, nd->name, can_receive,",
" receive, receive_iov, cleanup, opaque);"
],
"line_no": [
19,
21
]
} | VLANClientState *FUNC_0(DeviceState *dev,
NetCanReceive *can_receive,
NetReceive *receive,
NetReceiveIOV *receive_iov,
NetCleanup *cleanup,
... | [
"VLANClientState *FUNC_0(DeviceState *dev,\nNetCanReceive *can_receive,\nNetReceive *receive,\nNetReceiveIOV *receive_iov,\nNetCleanup *cleanup,\nvoid *opaque)\n{",
"NICInfo *nd = dev->nd;",
"assert(nd);",
"return qemu_new_vlan_client(nd->vlan, nd->model, nd->name, can_receive,\nreceive, receive_iov, cleanup,... | [
0,
0,
0,
1,
0
] | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
17
],
[
19,
21
],
[
23
]
] |
5,347 | static int send_sub_rect_nojpeg(VncState *vs, int x, int y, int w, int h,
int bg, int fg, int colors, VncPalette *palette)
{
int ret;
if (colors == 0) {
if (tight_detect_smooth_image(vs, w, h)) {
ret = send_gradient_rect(vs, x, y, w, h);
... | true | qemu | d167f9bc06a577d6c85b8ed6991c1efe175aae7d | static int send_sub_rect_nojpeg(VncState *vs, int x, int y, int w, int h,
int bg, int fg, int colors, VncPalette *palette)
{
int ret;
if (colors == 0) {
if (tight_detect_smooth_image(vs, w, h)) {
ret = send_gradient_rect(vs, x, y, w, h);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(VncState *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4,
int VAR_5, int VAR_6, int VAR_7, VncPalette *VAR_8)
{
int VAR_9;
if (VAR_7 == 0) {
if (tight_detect_smooth_image(VAR_0, VAR_3, VAR_4)) {
VAR_9 = send_gradient_rect(VAR_0, VA... | [
"static int FUNC_0(VncState *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4,\nint VAR_5, int VAR_6, int VAR_7, VncPalette *VAR_8)\n{",
"int VAR_9;",
"if (VAR_7 == 0) {",
"if (tight_detect_smooth_image(VAR_0, VAR_3, VAR_4)) {",
"VAR_9 = send_gradient_rect(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4);",
"VAR_9 = s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
18
],
[
20
],
[
22
],
[
24
],
[
26
],
[
28
],
[
30
],
[
32
],
[
36
],
[
38
],
[
40
]
] |
5,348 | static int guess_disk_lchs(IDEState *s,
int *pcylinders, int *pheads, int *psectors)
{
uint8_t *buf;
int ret, i, heads, sectors, cylinders;
struct partition *p;
uint32_t nr_sects;
buf = qemu_memalign(512, 512);
if (buf == NULL)
return -1;
ret = ... | true | qemu | c717d8bf13d4c24372c4885eefa821ec76378d2b | static int guess_disk_lchs(IDEState *s,
int *pcylinders, int *pheads, int *psectors)
{
uint8_t *buf;
int ret, i, heads, sectors, cylinders;
struct partition *p;
uint32_t nr_sects;
buf = qemu_memalign(512, 512);
if (buf == NULL)
return -1;
ret = ... | {
"code": [
" uint8_t *buf;",
" buf = qemu_memalign(512, 512);",
" if (buf == NULL)",
" return -1;",
" qemu_free(buf);",
" qemu_free(buf);",
" qemu_free(buf);",
" qemu_free(buf);"
],
"line_no": [
7,
17,
19,
21,
27,
... | static int FUNC_0(IDEState *VAR_0,
int *VAR_1, int *VAR_2, int *VAR_3)
{
uint8_t *buf;
int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;
struct partition *VAR_9;
uint32_t nr_sects;
buf = qemu_memalign(512, 512);
if (buf == NULL)
return -1;
VAR_4 = bdrv_rea... | [
"static int FUNC_0(IDEState *VAR_0,\nint *VAR_1, int *VAR_2, int *VAR_3)\n{",
"uint8_t *buf;",
"int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;",
"struct partition *VAR_9;",
"uint32_t nr_sects;",
"buf = qemu_memalign(512, 512);",
"if (buf == NULL)\nreturn -1;",
"VAR_4 = bdrv_read(VAR_0->bs, 0, buf, 1);",
"if... | [
0,
1,
0,
0,
0,
1,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
5,349 | USBDevice *usb_host_device_open(USBBus *bus, const char *devname)
{
struct USBAutoFilter filter;
USBDevice *dev;
char *p;
dev = usb_create(bus, "usb-host");
if (strstr(devname, "auto:")) {
if (parse_filter(devname, &filter) < 0) {
goto fail;
}
} else {
... | true | qemu | 3bc36a401e0f33e63a4d2c58b646ddf78efb567c | USBDevice *usb_host_device_open(USBBus *bus, const char *devname)
{
struct USBAutoFilter filter;
USBDevice *dev;
char *p;
dev = usb_create(bus, "usb-host");
if (strstr(devname, "auto:")) {
if (parse_filter(devname, &filter) < 0) {
goto fail;
}
} else {
... | {
"code": [
" qdev_init_nofail(&dev->qdev);",
" qdev_init_nofail(&dev->qdev);",
" qdev_init_nofail(&dev->qdev);",
" qdev_init_nofail(&dev->qdev);"
],
"line_no": [
73,
73,
73,
73
]
} | USBDevice *FUNC_0(USBBus *bus, const char *devname)
{
struct USBAutoFilter VAR_0;
USBDevice *dev;
char *VAR_1;
dev = usb_create(bus, "usb-host");
if (strstr(devname, "auto:")) {
if (parse_filter(devname, &VAR_0) < 0) {
goto fail;
}
} else {
VAR_... | [
"USBDevice *FUNC_0(USBBus *bus, const char *devname)\n{",
"struct USBAutoFilter VAR_0;",
"USBDevice *dev;",
"char *VAR_1;",
"dev = usb_create(bus, \"usb-host\");",
"if (strstr(devname, \"auto:\")) {",
"if (parse_filter(devname, &VAR_0) < 0) {",
"goto fail;",
"}",
"} else {",
"VAR_1 = strchr(devn... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
5,350 | static void xlnx_dp_set_dpdma(Object *obj, const char *name, Object *val,
Error **errp)
{
XlnxDPState *s = XLNX_DP(obj);
if (s->console) {
DisplaySurface *surface = qemu_console_surface(s->console);
XlnxDPDMAState *dma = XLNX_DPDMA(val);
xlnx_dpdma_se... | true | qemu | 8f5d58ef2c92d7b82d9a6eeefd7c8854a183ba4a | static void xlnx_dp_set_dpdma(Object *obj, const char *name, Object *val,
Error **errp)
{
XlnxDPState *s = XLNX_DP(obj);
if (s->console) {
DisplaySurface *surface = qemu_console_surface(s->console);
XlnxDPDMAState *dma = XLNX_DPDMA(val);
xlnx_dpdma_se... | {
"code": [
"static void xlnx_dp_set_dpdma(Object *obj, const char *name, Object *val,"
],
"line_no": [
1
]
} | static void FUNC_0(Object *VAR_0, const char *VAR_1, Object *VAR_2,
Error **VAR_3)
{
XlnxDPState *s = XLNX_DP(VAR_0);
if (s->console) {
DisplaySurface *surface = qemu_console_surface(s->console);
XlnxDPDMAState *dma = XLNX_DPDMA(VAR_2);
xlnx_dpdma_set... | [
"static void FUNC_0(Object *VAR_0, const char *VAR_1, Object *VAR_2,\nError **VAR_3)\n{",
"XlnxDPState *s = XLNX_DP(VAR_0);",
"if (s->console) {",
"DisplaySurface *surface = qemu_console_surface(s->console);",
"XlnxDPDMAState *dma = XLNX_DPDMA(VAR_2);",
"xlnx_dpdma_set_host_data_location(dma, DP_GRAPHIC_D... | [
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15,
17
],
[
19
],
[
21
]
] |
5,351 | static int ff_interleave_new_audio_packet(AVFormatContext *s, AVPacket *pkt,
int stream_index, int flush)
{
AVStream *st = s->streams[stream_index];
AudioInterleaveContext *aic = st->priv_data;
int size = FFMIN(av_fifo_size(aic->fifo), *aic->samples * aic->sample_si... | false | FFmpeg | 3ca8a2328878ebdb203e49d0a060df1b5337a370 | static int ff_interleave_new_audio_packet(AVFormatContext *s, AVPacket *pkt,
int stream_index, int flush)
{
AVStream *st = s->streams[stream_index];
AudioInterleaveContext *aic = st->priv_data;
int size = FFMIN(av_fifo_size(aic->fifo), *aic->samples * aic->sample_si... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1,
int VAR_2, int VAR_3)
{
AVStream *st = VAR_0->streams[VAR_2];
AudioInterleaveContext *aic = st->priv_data;
int VAR_4 = FFMIN(av_fifo_size(aic->fifo), *aic->samples * aic->sample_size);
if (!VAR_4 || (!V... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1,\nint VAR_2, int VAR_3)\n{",
"AVStream *st = VAR_0->streams[VAR_2];",
"AudioInterleaveContext *aic = st->priv_data;",
"int VAR_4 = FFMIN(av_fifo_size(aic->fifo), *aic->samples * aic->sample_size);",
"if (!VAR_4 || (!VAR_3 && VAR_4 == av_fifo_size(ai... | [
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
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39,
41
],
[
45
],
[
47
]
] |
5,352 | static int alloc_tables(H264Context *h){
MpegEncContext * const s = &h->s;
const int big_mb_num= s->mb_stride * (s->mb_height+1);
int x,y;
CHECKED_ALLOCZ(h->intra4x4_pred_mode, big_mb_num * 8 * sizeof(uint8_t))
CHECKED_ALLOCZ(h->non_zero_count , big_mb_num * 16 * sizeof(uint8_t))
C... | false | FFmpeg | d31dbec3742e488156621b9ca21069f8c05aabf0 | static int alloc_tables(H264Context *h){
MpegEncContext * const s = &h->s;
const int big_mb_num= s->mb_stride * (s->mb_height+1);
int x,y;
CHECKED_ALLOCZ(h->intra4x4_pred_mode, big_mb_num * 8 * sizeof(uint8_t))
CHECKED_ALLOCZ(h->non_zero_count , big_mb_num * 16 * sizeof(uint8_t))
C... | {
"code": [],
"line_no": []
} | static int FUNC_0(H264Context *VAR_0){
MpegEncContext * const s = &VAR_0->s;
const int VAR_1= s->mb_stride * (s->mb_height+1);
int VAR_2,VAR_3;
CHECKED_ALLOCZ(VAR_0->intra4x4_pred_mode, VAR_1 * 8 * sizeof(uint8_t))
CHECKED_ALLOCZ(VAR_0->non_zero_count , VAR_1 * 16 * sizeof(uint8_t))
... | [
"static int FUNC_0(H264Context *VAR_0){",
"MpegEncContext * const s = &VAR_0->s;",
"const int VAR_1= s->mb_stride * (s->mb_height+1);",
"int VAR_2,VAR_3;",
"CHECKED_ALLOCZ(VAR_0->intra4x4_pred_mode, VAR_1 * 8 * sizeof(uint8_t))\nCHECKED_ALLOCZ(VAR_0->non_zero_count , VAR_1 * 16 * sizeof(uint8_t))\nCHECK... | [
0,
0,
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,
23,
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[
57... |
5,354 | static int decode_nal_sei_frame_packing_arrangement(HEVCContext *s)
{
GetBitContext *gb = &s->HEVClc->gb;
get_ue_golomb(gb); // frame_packing_arrangement_id
s->sei_frame_packing_present = !get_bits1(gb);
if (s->sei_frame_packing_present) {
s->frame_packing_arrangement_... | false | FFmpeg | c51c08e0e70c186971385bdbb225f69edd4e3375 | static int decode_nal_sei_frame_packing_arrangement(HEVCContext *s)
{
GetBitContext *gb = &s->HEVClc->gb;
get_ue_golomb(gb);
s->sei_frame_packing_present = !get_bits1(gb);
if (s->sei_frame_packing_present) {
s->frame_packing_arrangement_type = get_bits(gb, 7);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(HEVCContext *VAR_0)
{
GetBitContext *gb = &VAR_0->HEVClc->gb;
get_ue_golomb(gb);
VAR_0->sei_frame_packing_present = !get_bits1(gb);
if (VAR_0->sei_frame_packing_present) {
VAR_0->frame_packing_arrangement_type = get_bits(gb, 7);
VAR_0->quinc... | [
"static int FUNC_0(HEVCContext *VAR_0)\n{",
"GetBitContext *gb = &VAR_0->HEVClc->gb;",
"get_ue_golomb(gb);",
"VAR_0->sei_frame_packing_present = !get_bits1(gb);",
"if (VAR_0->sei_frame_packing_present) {",
"VAR_0->frame_packing_arrangement_type = get_bits(gb, 7);",
"VAR_0->quincunx_subsampling ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
31
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
]
] |
5,355 | static int decode_frame_header(ProresContext *ctx, const uint8_t *buf,
const int data_size, AVCodecContext *avctx)
{
int hdr_size, width, height, flags;
int version;
const uint8_t *ptr;
hdr_size = AV_RB16(buf);
av_dlog(avctx, "header size %d\n", hdr_size);
... | false | FFmpeg | 229843aa359ae0c9519977d7fa952688db63f559 | static int decode_frame_header(ProresContext *ctx, const uint8_t *buf,
const int data_size, AVCodecContext *avctx)
{
int hdr_size, width, height, flags;
int version;
const uint8_t *ptr;
hdr_size = AV_RB16(buf);
av_dlog(avctx, "header size %d\n", hdr_size);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(ProresContext *VAR_0, const uint8_t *VAR_1,
const int VAR_2, AVCodecContext *VAR_3)
{
int VAR_4, VAR_5, VAR_6, VAR_7;
int VAR_8;
const uint8_t *VAR_9;
VAR_4 = AV_RB16(VAR_1);
av_dlog(VAR_3, "header size %d\n", VAR_4);
if (VAR_4 > VAR_2) ... | [
"static int FUNC_0(ProresContext *VAR_0, const uint8_t *VAR_1,\nconst int VAR_2, AVCodecContext *VAR_3)\n{",
"int VAR_4, VAR_5, VAR_6, VAR_7;",
"int VAR_8;",
"const uint8_t *VAR_9;",
"VAR_4 = AV_RB16(VAR_1);",
"av_dlog(VAR_3, \"header size %d\\n\", VAR_4);",
"if (VAR_4 > VAR_2) {",
"av_log(VAR_3, AV_L... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[... |
5,358 | static int svq1_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
UINT8 *buf, int buf_size)
{
MpegEncContext *s=avctx->priv_data;
uint8_t *current, *previous;
int result, i, x, y, width, height;
AVFrame *pict = data;
/* ... | false | FFmpeg | 68f593b48433842f3407586679fe07f3e5199ab9 | static int svq1_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
UINT8 *buf, int buf_size)
{
MpegEncContext *s=avctx->priv_data;
uint8_t *current, *previous;
int result, i, x, y, width, height;
AVFrame *pict = data;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
UINT8 *VAR_3, int VAR_4)
{
MpegEncContext *s=VAR_0->priv_data;
uint8_t *current, *previous;
int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;
AVFrame *pict = VAR_1;
in... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nUINT8 *VAR_3, int VAR_4)\n{",
"MpegEncContext *s=VAR_0->priv_data;",
"uint8_t *current, *previous;",
"int\t\tVAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;",
"AVFrame *pict = VAR_1;",
"init_get_bits(&s->gb,VAR_3,VAR_4);",
"s->f_code =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21
],
[
27
],
[
31,
33
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[
59,
61
],
[
63,
65
],
[... |
5,360 | static int decode_blocks(SnowContext *s){
int x, y;
int w= s->b_width;
int h= s->b_height;
int res;
for(y=0; y<h; y++){
for(x=0; x<w; x++){
if ((res = decode_q_branch(s, 0, x, y)) < 0)
return res;
}
}
return 0;
} | true | FFmpeg | 4527ec2216109867498edc3ac8a17fd879b5d017 | static int decode_blocks(SnowContext *s){
int x, y;
int w= s->b_width;
int h= s->b_height;
int res;
for(y=0; y<h; y++){
for(x=0; x<w; x++){
if ((res = decode_q_branch(s, 0, x, y)) < 0)
return res;
}
}
return 0;
} | {
"code": [],
"line_no": []
} | static int FUNC_0(SnowContext *VAR_0){
int VAR_1, VAR_2;
int VAR_3= VAR_0->b_width;
int VAR_4= VAR_0->b_height;
int VAR_5;
for(VAR_2=0; VAR_2<VAR_4; VAR_2++){
for(VAR_1=0; VAR_1<VAR_3; VAR_1++){
if ((VAR_5 = decode_q_branch(VAR_0, 0, VAR_1, VAR_2)) < 0)
... | [
"static int FUNC_0(SnowContext *VAR_0){",
"int VAR_1, VAR_2;",
"int VAR_3= VAR_0->b_width;",
"int VAR_4= VAR_0->b_height;",
"int VAR_5;",
"for(VAR_2=0; VAR_2<VAR_4; VAR_2++){",
"for(VAR_1=0; VAR_1<VAR_3; VAR_1++){",
"if ((VAR_5 = decode_q_branch(VAR_0, 0, VAR_1, VAR_2)) < 0)\nreturn VAR_5;",
"}",
... | [
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
]
] |
5,362 | static int s390x_write_all_elf64_notes(const char *note_name,
WriteCoreDumpFunction f,
S390CPU *cpu, int id,
void *opaque)
{
Note note;
const NoteFuncDesc *nf;
int note_size;
int ... | true | qemu | 5f706fdc164b20b48254eadf7bd413edace34499 | static int s390x_write_all_elf64_notes(const char *note_name,
WriteCoreDumpFunction f,
S390CPU *cpu, int id,
void *opaque)
{
Note note;
const NoteFuncDesc *nf;
int note_size;
int ... | {
"code": [
"static int s390x_write_all_elf64_notes(const char *note_name,",
" void *opaque)",
" for (nf = note_func; nf->note_contents_func; nf++) {",
" note.hdr.n_namesz = cpu_to_be32(sizeof(note.name));",
" for (nf = note_func; nf->note_content... | static int FUNC_0(const char *VAR_0,
WriteCoreDumpFunction VAR_1,
S390CPU *VAR_2, int VAR_3,
void *VAR_4)
{
Note note;
const NoteFuncDesc *VAR_5;
int VAR_6;
int VAR_7 = -1;
... | [
"static int FUNC_0(const char *VAR_0,\nWriteCoreDumpFunction VAR_1,\nS390CPU *VAR_2, int VAR_3,\nvoid *VAR_4)\n{",
"Note note;",
"const NoteFuncDesc *VAR_5;",
"int VAR_6;",
"int VAR_7 = -1;",
"for (VAR_5 = note_func; VAR_5->note_contents_func; VAR_5++) {",
"memset(¬e, 0, sizeof(note));",
"note.hdr.... | [
1,
0,
0,
0,
0,
1,
0,
1,
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
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
49
],
[
53
],
[... |
5,364 | static int decode_unit(SCPRContext *s, PixelModel *pixel, unsigned step, unsigned *rval)
{
GetByteContext *gb = &s->gb;
RangeCoder *rc = &s->rc;
unsigned totfr = pixel->total_freq;
unsigned value, x = 0, cumfr = 0, cnt_x = 0;
int i, j, ret, c, cnt_c;
if ((ret = s->get_freq(rc, totfr, &v... | true | FFmpeg | 2171dfae8c065878a2e130390eb78cf2947a5b69 | static int decode_unit(SCPRContext *s, PixelModel *pixel, unsigned step, unsigned *rval)
{
GetByteContext *gb = &s->gb;
RangeCoder *rc = &s->rc;
unsigned totfr = pixel->total_freq;
unsigned value, x = 0, cumfr = 0, cnt_x = 0;
int i, j, ret, c, cnt_c;
if ((ret = s->get_freq(rc, totfr, &v... | {
"code": [],
"line_no": []
} | static int FUNC_0(SCPRContext *VAR_0, PixelModel *VAR_1, unsigned VAR_2, unsigned *VAR_3)
{
GetByteContext *gb = &VAR_0->gb;
RangeCoder *rc = &VAR_0->rc;
unsigned VAR_4 = VAR_1->total_freq;
unsigned VAR_5, VAR_6 = 0, VAR_7 = 0, VAR_8 = 0;
int VAR_9, VAR_10, VAR_11, VAR_12, VAR_13;
if ((... | [
"static int FUNC_0(SCPRContext *VAR_0, PixelModel *VAR_1, unsigned VAR_2, unsigned *VAR_3)\n{",
"GetByteContext *gb = &VAR_0->gb;",
"RangeCoder *rc = &VAR_0->rc;",
"unsigned VAR_4 = VAR_1->total_freq;",
"unsigned VAR_5, VAR_6 = 0, VAR_7 = 0, VAR_8 = 0;",
"int VAR_9, VAR_10, VAR_11, VAR_12, VAR_13;",
"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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
23
],
[
25
],
[
27,
29
],
[
31,
33
],
[
35
],
[
40
],
[
42
],
[
44
],
[
46
],
[
48,
50
],
[
52,... |
5,365 | void slirp_select_fill(int *pnfds, fd_set *readfds,
fd_set *writefds, fd_set *xfds)
{
}
| false | qemu | 8917c3bdba37d6fe4393db0fad3fabbde9530d6b | void slirp_select_fill(int *pnfds, fd_set *readfds,
fd_set *writefds, fd_set *xfds)
{
}
| {
"code": [],
"line_no": []
} | void FUNC_0(int *VAR_0, fd_set *VAR_1,
fd_set *VAR_2, fd_set *VAR_3)
{
}
| [
"void FUNC_0(int *VAR_0, fd_set *VAR_1,\nfd_set *VAR_2, fd_set *VAR_3)\n{",
"}"
] | [
0,
0
] | [
[
1,
3,
5
],
[
7
]
] |
5,367 | int tcp_socket_incoming(const char *address, uint16_t port)
{
char address_and_port[128];
Error *local_err = NULL;
combine_addr(address_and_port, 128, address, port);
int fd = inet_listen(address_and_port, NULL, 0, SOCK_STREAM, 0, &local_err);
if (local_err != NULL) {
qerror_repor... | false | qemu | 537b41f5013e1951fa15e8f18855b18d76124ce4 | int tcp_socket_incoming(const char *address, uint16_t port)
{
char address_and_port[128];
Error *local_err = NULL;
combine_addr(address_and_port, 128, address, port);
int fd = inet_listen(address_and_port, NULL, 0, SOCK_STREAM, 0, &local_err);
if (local_err != NULL) {
qerror_repor... | {
"code": [],
"line_no": []
} | int FUNC_0(const char *VAR_0, uint16_t VAR_1)
{
char VAR_2[128];
Error *local_err = NULL;
combine_addr(VAR_2, 128, VAR_0, VAR_1);
int VAR_3 = inet_listen(VAR_2, NULL, 0, SOCK_STREAM, 0, &local_err);
if (local_err != NULL) {
qerror_report_err(local_err);
error_free(local_e... | [
"int FUNC_0(const char *VAR_0, uint16_t VAR_1)\n{",
"char VAR_2[128];",
"Error *local_err = NULL;",
"combine_addr(VAR_2, 128, VAR_0, VAR_1);",
"int VAR_3 = inet_listen(VAR_2, NULL, 0, SOCK_STREAM, 0, &local_err);",
"if (local_err != NULL) {",
"qerror_report_err(local_err);",
"error_free(local_err);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
5,368 | static void paio_cancel(BlockDriverAIOCB *blockacb)
{
struct qemu_paiocb *acb = (struct qemu_paiocb *)blockacb;
int active = 0;
mutex_lock(&lock);
if (!acb->active) {
TAILQ_REMOVE(&request_list, acb, node);
acb->ret = -ECANCELED;
} else if (acb->ret == -EINPROGRESS) {
... | false | qemu | 72cf2d4f0e181d0d3a3122e04129c58a95da713e | static void paio_cancel(BlockDriverAIOCB *blockacb)
{
struct qemu_paiocb *acb = (struct qemu_paiocb *)blockacb;
int active = 0;
mutex_lock(&lock);
if (!acb->active) {
TAILQ_REMOVE(&request_list, acb, node);
acb->ret = -ECANCELED;
} else if (acb->ret == -EINPROGRESS) {
... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverAIOCB *VAR_0)
{
struct qemu_paiocb *VAR_1 = (struct qemu_paiocb *)VAR_0;
int VAR_2 = 0;
mutex_lock(&lock);
if (!VAR_1->VAR_2) {
TAILQ_REMOVE(&request_list, VAR_1, node);
VAR_1->ret = -ECANCELED;
} else if (VAR_1->ret == -EINPROGRESS) {
... | [
"static void FUNC_0(BlockDriverAIOCB *VAR_0)\n{",
"struct qemu_paiocb *VAR_1 = (struct qemu_paiocb *)VAR_0;",
"int VAR_2 = 0;",
"mutex_lock(&lock);",
"if (!VAR_1->VAR_2) {",
"TAILQ_REMOVE(&request_list, VAR_1, node);",
"VAR_1->ret = -ECANCELED;",
"} else if (VAR_1->ret == -EINPROGRESS) {",
"VAR_2 = ... | [
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
],
[
35,
37
],
[
39
],
[
43
],
[
45
]
] |
5,369 | static void machine_initfn(Object *obj)
{
MachineState *ms = MACHINE(obj);
object_property_add_str(obj, "accel",
machine_get_accel, machine_set_accel, NULL);
object_property_set_description(obj, "accel",
"Accelerator list",
... | false | qemu | d8870d0217216478888c2d3dd6bf62e155d978c8 | static void machine_initfn(Object *obj)
{
MachineState *ms = MACHINE(obj);
object_property_add_str(obj, "accel",
machine_get_accel, machine_set_accel, NULL);
object_property_set_description(obj, "accel",
"Accelerator list",
... | {
"code": [],
"line_no": []
} | static void FUNC_0(Object *VAR_0)
{
MachineState *ms = MACHINE(VAR_0);
object_property_add_str(VAR_0, "accel",
machine_get_accel, machine_set_accel, NULL);
object_property_set_description(VAR_0, "accel",
"Accelerator list",
... | [
"static void FUNC_0(Object *VAR_0)\n{",
"MachineState *ms = MACHINE(VAR_0);",
"object_property_add_str(VAR_0, \"accel\",\nmachine_get_accel, machine_set_accel, NULL);",
"object_property_set_description(VAR_0, \"accel\",\n\"Accelerator list\",\nNULL);",
"object_property_add_bool(VAR_0, \"kernel-irqchip\",\nm... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13,
15,
17
],
[
19,
21,
23,
25
],
[
27,
29,
31
],
[
33,
35,
37,
39
],
[
41,
43,
45
],
[
47,
49
],
[
51,
53,
55
],
[
57,
59
],
... |
5,370 | static ssize_t flush_buf(VirtIOSerialPort *port, const uint8_t *buf, size_t len)
{
VirtConsole *vcon = DO_UPCAST(VirtConsole, port, port);
ssize_t ret;
ret = qemu_chr_write(vcon->chr, buf, len);
trace_virtio_console_flush_buf(port->id, len, ret);
return ret;
}
| false | qemu | 0219d73283b6399a737ef5a098f849b956618eaa | static ssize_t flush_buf(VirtIOSerialPort *port, const uint8_t *buf, size_t len)
{
VirtConsole *vcon = DO_UPCAST(VirtConsole, port, port);
ssize_t ret;
ret = qemu_chr_write(vcon->chr, buf, len);
trace_virtio_console_flush_buf(port->id, len, ret);
return ret;
}
| {
"code": [],
"line_no": []
} | static ssize_t FUNC_0(VirtIOSerialPort *port, const uint8_t *buf, size_t len)
{
VirtConsole *vcon = DO_UPCAST(VirtConsole, port, port);
ssize_t ret;
ret = qemu_chr_write(vcon->chr, buf, len);
trace_virtio_console_flush_buf(port->id, len, ret);
return ret;
}
| [
"static ssize_t FUNC_0(VirtIOSerialPort *port, const uint8_t *buf, size_t len)\n{",
"VirtConsole *vcon = DO_UPCAST(VirtConsole, port, port);",
"ssize_t ret;",
"ret = qemu_chr_write(vcon->chr, buf, len);",
"trace_virtio_console_flush_buf(port->id, len, ret);",
"return ret;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
]
] |
5,371 | static uint64_t l2x0_priv_read(void *opaque, target_phys_addr_t offset,
unsigned size)
{
uint32_t cache_data;
l2x0_state *s = (l2x0_state *)opaque;
offset &= 0xfff;
if (offset >= 0x730 && offset < 0x800) {
return 0; /* cache ops complete */
}
switc... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint64_t l2x0_priv_read(void *opaque, target_phys_addr_t offset,
unsigned size)
{
uint32_t cache_data;
l2x0_state *s = (l2x0_state *)opaque;
offset &= 0xfff;
if (offset >= 0x730 && offset < 0x800) {
return 0;
}
switch (offset) {
case 0... | {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, target_phys_addr_t offset,
unsigned size)
{
uint32_t cache_data;
l2x0_state *s = (l2x0_state *)opaque;
offset &= 0xfff;
if (offset >= 0x730 && offset < 0x800) {
return 0;
}
switch (offset) {
case 0:
... | [
"static uint64_t FUNC_0(void *opaque, target_phys_addr_t offset,\nunsigned size)\n{",
"uint32_t cache_data;",
"l2x0_state *s = (l2x0_state *)opaque;",
"offset &= 0xfff;",
"if (offset >= 0x730 && offset < 0x800) {",
"return 0;",
"}",
"switch (offset) {",
"case 0:\nreturn CACHE_ID;",
"case 0x4:\ncac... | [
0,
0,
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,
29
],
[
31
],
[
33
],
[
35,
37
],
[
39,
41
],
[
43,
45
],
[
47,
49
],
[... |
5,372 | static int qcow_create2(const char *filename, int64_t total_size,
const char *backing_file, const char *backing_format,
int flags)
{
int fd, header_size, backing_filename_len, l1_size, i, shift, l2_bits;
int backing_format_len = 0;
QCowHeader header;
... | false | qemu | 2d2431f03fc78b532f3a1c5f858cf78859d50fc3 | static int qcow_create2(const char *filename, int64_t total_size,
const char *backing_file, const char *backing_format,
int flags)
{
int fd, header_size, backing_filename_len, l1_size, i, shift, l2_bits;
int backing_format_len = 0;
QCowHeader header;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0, int64_t VAR_1,
const char *VAR_2, const char *VAR_3,
int VAR_4)
{
int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11;
int VAR_12 = 0;
QCowHeader header;
uint64_t tmp, offset;
QCowCreateState s1, *s = &s... | [
"static int FUNC_0(const char *VAR_0, int64_t VAR_1,\nconst char *VAR_2, const char *VAR_3,\nint VAR_4)\n{",
"int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11;",
"int VAR_12 = 0;",
"QCowHeader header;",
"uint64_t tmp, offset;",
"QCowCreateState s1, *s = &s1;",
"QCowExtension ext_bf = {0, 0};",
"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,
0,
0,
0,
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
],
[
27
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
... |
5,373 | static void do_branch(DisasContext *dc, int32_t offset, uint32_t insn, int cc,
TCGv r_cond)
{
unsigned int cond = GET_FIELD(insn, 3, 6), a = (insn & (1 << 29));
target_ulong target = dc->pc + offset;
if (cond == 0x0) {
/* unconditional not taken */
if (a) {
... | false | qemu | 548f66db33b91bf305c4e5228bb29585701ab58d | static void do_branch(DisasContext *dc, int32_t offset, uint32_t insn, int cc,
TCGv r_cond)
{
unsigned int cond = GET_FIELD(insn, 3, 6), a = (insn & (1 << 29));
target_ulong target = dc->pc + offset;
if (cond == 0x0) {
if (a) {
dc->pc = dc->npc + ... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0, int32_t VAR_1, uint32_t VAR_2, int VAR_3,
TCGv VAR_4)
{
unsigned int VAR_5 = GET_FIELD(VAR_2, 3, 6), VAR_6 = (VAR_2 & (1 << 29));
target_ulong target = VAR_0->pc + VAR_1;
if (VAR_5 == 0x0) {
if (VAR_6) {
VAR... | [
"static void FUNC_0(DisasContext *VAR_0, int32_t VAR_1, uint32_t VAR_2, int VAR_3,\nTCGv VAR_4)\n{",
"unsigned int VAR_5 = GET_FIELD(VAR_2, 3, 6), VAR_6 = (VAR_2 & (1 << 29));",
"target_ulong target = VAR_0->pc + VAR_1;",
"if (VAR_5 == 0x0) {",
"if (VAR_6) {",
"VAR_0->pc = VAR_0->npc + 4;",
"VAR_0->npc ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
5,374 | static void prodsum(float *tgt, float *src, int len, int n)
{
unsigned int x;
float *p1, *p2;
double sum;
while (n >= 0) {
p1 = (p2 = src) - n;
for (sum=0, x=len; x--; sum += (*p1++) * (*p2++));
tgt[n--] = sum;
}
}
| false | FFmpeg | 69c23e6f33c38ebc03ce7f51fcb963deaff7383b | static void prodsum(float *tgt, float *src, int len, int n)
{
unsigned int x;
float *p1, *p2;
double sum;
while (n >= 0) {
p1 = (p2 = src) - n;
for (sum=0, x=len; x--; sum += (*p1++) * (*p2++));
tgt[n--] = sum;
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(float *VAR_0, float *VAR_1, int VAR_2, int VAR_3)
{
unsigned int VAR_4;
float *VAR_5, *VAR_6;
double VAR_7;
while (VAR_3 >= 0) {
VAR_5 = (VAR_6 = VAR_1) - VAR_3;
for (VAR_7=0, VAR_4=VAR_2; VAR_4--; VAR_7 += (*VAR_5++) * (*VAR_6++));
VAR_0[VAR_3--] = V... | [
"static void FUNC_0(float *VAR_0, float *VAR_1, int VAR_2, int VAR_3)\n{",
"unsigned int VAR_4;",
"float *VAR_5, *VAR_6;",
"double VAR_7;",
"while (VAR_3 >= 0) {",
"VAR_5 = (VAR_6 = VAR_1) - VAR_3;",
"for (VAR_7=0, VAR_4=VAR_2; VAR_4--; VAR_7 += (*VAR_5++) * (*VAR_6++));",
"VAR_0[VAR_3--] = VAR_7;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
5,375 | void cpu_tlb_update_dirty(CPUState *env)
{
int i;
for(i = 0; i < CPU_TLB_SIZE; i++)
tlb_update_dirty(&env->tlb_table[0][i]);
for(i = 0; i < CPU_TLB_SIZE; i++)
tlb_update_dirty(&env->tlb_table[1][i]);
#if (NB_MMU_MODES >= 3)
for(i = 0; i < CPU_TLB_SIZE; i++)
tlb_update_di... | false | qemu | cfde4bd93100c58c0bfaed76deefb144caac488f | void cpu_tlb_update_dirty(CPUState *env)
{
int i;
for(i = 0; i < CPU_TLB_SIZE; i++)
tlb_update_dirty(&env->tlb_table[0][i]);
for(i = 0; i < CPU_TLB_SIZE; i++)
tlb_update_dirty(&env->tlb_table[1][i]);
#if (NB_MMU_MODES >= 3)
for(i = 0; i < CPU_TLB_SIZE; i++)
tlb_update_di... | {
"code": [],
"line_no": []
} | void FUNC_0(CPUState *VAR_0)
{
int VAR_1;
for(VAR_1 = 0; VAR_1 < CPU_TLB_SIZE; VAR_1++)
tlb_update_dirty(&VAR_0->tlb_table[0][VAR_1]);
for(VAR_1 = 0; VAR_1 < CPU_TLB_SIZE; VAR_1++)
tlb_update_dirty(&VAR_0->tlb_table[1][VAR_1]);
#if (NB_MMU_MODES >= 3)
for(VAR_1 = 0; VAR_1 < CPU_T... | [
"void FUNC_0(CPUState *VAR_0)\n{",
"int VAR_1;",
"for(VAR_1 = 0; VAR_1 < CPU_TLB_SIZE; VAR_1++)",
"tlb_update_dirty(&VAR_0->tlb_table[0][VAR_1]);",
"for(VAR_1 = 0; VAR_1 < CPU_TLB_SIZE; VAR_1++)",
"tlb_update_dirty(&VAR_0->tlb_table[1][VAR_1]);",
"#if (NB_MMU_MODES >= 3)\nfor(VAR_1 = 0; VAR_1 < CPU_TLB_... | [
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
]
] |
5,376 | long do_rt_sigreturn(CPUMIPSState *env)
{
struct target_rt_sigframe *frame;
abi_ulong frame_addr;
sigset_t blocked;
#if defined(DEBUG_SIGNAL)
fprintf(stderr, "do_rt_sigreturn\n");
#endif
frame_addr = env->active_tc.gpr[29];
if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1))
... | false | qemu | 1c275925bfbbc2de84a8f0e09d1dd70bbefb6da3 | long do_rt_sigreturn(CPUMIPSState *env)
{
struct target_rt_sigframe *frame;
abi_ulong frame_addr;
sigset_t blocked;
#if defined(DEBUG_SIGNAL)
fprintf(stderr, "do_rt_sigreturn\n");
#endif
frame_addr = env->active_tc.gpr[29];
if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1))
... | {
"code": [],
"line_no": []
} | long FUNC_0(CPUMIPSState *VAR_0)
{
struct target_rt_sigframe *VAR_1;
abi_ulong frame_addr;
sigset_t blocked;
#if defined(DEBUG_SIGNAL)
fprintf(stderr, "FUNC_0\n");
#endif
frame_addr = VAR_0->active_tc.gpr[29];
if (!lock_user_struct(VERIFY_READ, VAR_1, frame_addr, 1))
goto badfram... | [
"long FUNC_0(CPUMIPSState *VAR_0)\n{",
"struct target_rt_sigframe *VAR_1;",
"abi_ulong frame_addr;",
"sigset_t blocked;",
"#if defined(DEBUG_SIGNAL)\nfprintf(stderr, \"FUNC_0\\n\");",
"#endif\nframe_addr = VAR_0->active_tc.gpr[29];",
"if (!lock_user_struct(VERIFY_READ, VAR_1, frame_addr, 1))\ngoto badfr... | [
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
],
[
27
],
[
29
],
[
33,
35
],
[
39,
41,
43,
45
],
[
49
],
[
51
],
[
57
],
[
59
],
[
63,
65
... |
5,377 | static void spr_read_decr (DisasContext *ctx, int gprn, int sprn)
{
if (use_icount) {
gen_io_start();
}
gen_helper_load_decr(cpu_gpr[gprn], cpu_env);
if (use_icount) {
gen_io_end();
gen_stop_exception(ctx);
}
}
| false | qemu | bd79255d2571a3c68820117caf94ea9afe1d527e | static void spr_read_decr (DisasContext *ctx, int gprn, int sprn)
{
if (use_icount) {
gen_io_start();
}
gen_helper_load_decr(cpu_gpr[gprn], cpu_env);
if (use_icount) {
gen_io_end();
gen_stop_exception(ctx);
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0 (DisasContext *VAR_0, int VAR_1, int VAR_2)
{
if (use_icount) {
gen_io_start();
}
gen_helper_load_decr(cpu_gpr[VAR_1], cpu_env);
if (use_icount) {
gen_io_end();
gen_stop_exception(VAR_0);
}
}
| [
"static void FUNC_0 (DisasContext *VAR_0, int VAR_1, int VAR_2)\n{",
"if (use_icount) {",
"gen_io_start();",
"}",
"gen_helper_load_decr(cpu_gpr[VAR_1], cpu_env);",
"if (use_icount) {",
"gen_io_end();",
"gen_stop_exception(VAR_0);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
5,378 | bool memory_region_is_logging(MemoryRegion *mr)
{
return mr->dirty_log_mask;
}
| false | qemu | 2d1a35bef0ed96b3f23535e459c552414ccdbafd | bool memory_region_is_logging(MemoryRegion *mr)
{
return mr->dirty_log_mask;
}
| {
"code": [],
"line_no": []
} | bool FUNC_0(MemoryRegion *mr)
{
return mr->dirty_log_mask;
}
| [
"bool FUNC_0(MemoryRegion *mr)\n{",
"return mr->dirty_log_mask;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
5,382 | static void mv88w8618_eth_write(void *opaque, target_phys_addr_t offset,
uint64_t value, unsigned size)
{
mv88w8618_eth_state *s = opaque;
switch (offset) {
case MP_ETH_SMIR:
s->smir = value;
break;
case MP_ETH_PCXR:
s->vlan_header = (... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void mv88w8618_eth_write(void *opaque, target_phys_addr_t offset,
uint64_t value, unsigned size)
{
mv88w8618_eth_state *s = opaque;
switch (offset) {
case MP_ETH_SMIR:
s->smir = value;
break;
case MP_ETH_PCXR:
s->vlan_header = (... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
mv88w8618_eth_state *s = VAR_0;
switch (VAR_1) {
case MP_ETH_SMIR:
s->smir = VAR_2;
break;
case MP_ETH_PCXR:
s->vlan_header = ((VAR_2 >> MP_ETH... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"mv88w8618_eth_state *s = VAR_0;",
"switch (VAR_1) {",
"case MP_ETH_SMIR:\ns->smir = VAR_2;",
"break;",
"case MP_ETH_PCXR:\ns->vlan_header = ((VAR_2 >> MP_ETH_PCXR_2BSM_BIT) & 1) * 2;",
"break;",
"case MP_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13,
15
],
[
17
],
[
21,
23
],
[
25
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53... |
5,383 | softusb_write(void *opaque, target_phys_addr_t addr, uint64_t value,
unsigned size)
{
MilkymistSoftUsbState *s = opaque;
trace_milkymist_softusb_memory_write(addr, value);
addr >>= 2;
switch (addr) {
case R_CTRL:
s->regs[addr] = value;
break;
default... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | softusb_write(void *opaque, target_phys_addr_t addr, uint64_t value,
unsigned size)
{
MilkymistSoftUsbState *s = opaque;
trace_milkymist_softusb_memory_write(addr, value);
addr >>= 2;
switch (addr) {
case R_CTRL:
s->regs[addr] = value;
break;
default... | {
"code": [],
"line_no": []
} | FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint64_t VAR_2,
unsigned VAR_3)
{
MilkymistSoftUsbState *s = VAR_0;
trace_milkymist_softusb_memory_write(VAR_1, VAR_2);
VAR_1 >>= 2;
switch (VAR_1) {
case R_CTRL:
s->regs[VAR_1] = VAR_2;
break;
default:
... | [
"FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint64_t VAR_2,\nunsigned VAR_3)\n{",
"MilkymistSoftUsbState *s = VAR_0;",
"trace_milkymist_softusb_memory_write(VAR_1, VAR_2);",
"VAR_1 >>= 2;",
"switch (VAR_1) {",
"case R_CTRL:\ns->regs[VAR_1] = VAR_2;",
"break;",
"default:\nerror_report(\"milkymist_so... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
27,
29,
31
],
[
33
],
[
35
],
[
37
]
] |
5,384 | void r4k_invalidate_tlb (CPUState *env, int idx, int use_extra)
{
r4k_tlb_t *tlb;
target_ulong addr;
target_ulong end;
uint8_t ASID = env->CP0_EntryHi & 0xFF;
target_ulong mask;
tlb = &env->tlb->mmu.r4k.tlb[idx];
/* The qemu TLB is flushed when the ASID changes, so no need to
... | false | qemu | 53715e48b0cc274f577723f5e6aa2cf2cd72414b | void r4k_invalidate_tlb (CPUState *env, int idx, int use_extra)
{
r4k_tlb_t *tlb;
target_ulong addr;
target_ulong end;
uint8_t ASID = env->CP0_EntryHi & 0xFF;
target_ulong mask;
tlb = &env->tlb->mmu.r4k.tlb[idx];
if (tlb->G == 0 && tlb->ASID != ASID) {
return;
... | {
"code": [],
"line_no": []
} | void FUNC_0 (CPUState *VAR_0, int VAR_1, int VAR_2)
{
r4k_tlb_t *tlb;
target_ulong addr;
target_ulong end;
uint8_t ASID = VAR_0->CP0_EntryHi & 0xFF;
target_ulong mask;
tlb = &VAR_0->tlb->mmu.r4k.tlb[VAR_1];
if (tlb->G == 0 && tlb->ASID != ASID) {
return;
}
... | [
"void FUNC_0 (CPUState *VAR_0, int VAR_1, int VAR_2)\n{",
"r4k_tlb_t *tlb;",
"target_ulong addr;",
"target_ulong end;",
"uint8_t ASID = VAR_0->CP0_EntryHi & 0xFF;",
"target_ulong mask;",
"tlb = &VAR_0->tlb->mmu.r4k.tlb[VAR_1];",
"if (tlb->G == 0 && tlb->ASID != ASID) {",
"return;",
"}",
"if (VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
23
],
[
25
],
[
27
],
[
31
],
[
39
],
[
41
],
[
43
],
[
45
],
[
51
],
[
53
],
[
55
],
[
57,
59
],
[... |
5,385 | static int vc1_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size)
{
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
AVFrame *pict = data;
uint8_t *buf2 = NULL;
/* no supplementary ... | false | FFmpeg | 34a8dcd031d637273cdea021e5a79cf720c4c51c | static int vc1_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size)
{
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
AVFrame *pict = data;
uint8_t *buf2 = NULL;
if (buf_size =... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
uint8_t *VAR_3, int VAR_4)
{
VC1Context *v = VAR_0->priv_data;
MpegEncContext *s = &v->s;
AVFrame *pict = VAR_1;
uint8_t *buf2 = NULL;
if (VAR_4 == 0) {
... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nuint8_t *VAR_3, int VAR_4)\n{",
"VC1Context *v = VAR_0->priv_data;",
"MpegEncContext *s = &v->s;",
"AVFrame *pict = VAR_1;",
"uint8_t *buf2 = NULL;",
"if (VAR_4 == 0) {",
"if (s->low_delay==0 && s->next_picture_ptr) {",
"*pict= *(AVF... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
47
],
[
49
],
[
51
],
[
53
],
[
57
],
[
63
... |
5,387 | void qmp_guest_set_user_password(const char *username,
const char *password,
bool crypted,
Error **errp)
{
NET_API_STATUS nas;
char *rawpasswddata = NULL;
size_t rawpasswdlen;
wchar_t *user, *wpass... | false | qemu | 920639cab0fe28d003c90b53bd8b66e8fb333bdd | void qmp_guest_set_user_password(const char *username,
const char *password,
bool crypted,
Error **errp)
{
NET_API_STATUS nas;
char *rawpasswddata = NULL;
size_t rawpasswdlen;
wchar_t *user, *wpass... | {
"code": [],
"line_no": []
} | void FUNC_0(const char *VAR_0,
const char *VAR_1,
bool VAR_2,
Error **VAR_3)
{
NET_API_STATUS nas;
char *VAR_4 = NULL;
size_t rawpasswdlen;
wchar_t *user, *wpass;
USER_INFO_1003 pi1003 = { 0, ... | [
"void FUNC_0(const char *VAR_0,\nconst char *VAR_1,\nbool VAR_2,\nError **VAR_3)\n{",
"NET_API_STATUS nas;",
"char *VAR_4 = NULL;",
"size_t rawpasswdlen;",
"wchar_t *user, *wpass;",
"USER_INFO_1003 pi1003 = { 0, };",
"if (VAR_2) {",
"error_setg(VAR_3, QERR_UNSUPPORTED);",
"return;",
"}",
"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
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
47
],
[
49,
51,
53
],
[... |
5,388 | static void cpu_exec_nocache(CPUState *cpu, int max_cycles,
TranslationBlock *orig_tb, bool ignore_icount)
{
TranslationBlock *tb;
/* Should never happen.
We only end up here when an existing TB is too long. */
if (max_cycles > CF_COUNT_MASK)
max_cycles ... | false | qemu | 6f789be56d3f38e9214dafcfab3bf9be7191f370 | static void cpu_exec_nocache(CPUState *cpu, int max_cycles,
TranslationBlock *orig_tb, bool ignore_icount)
{
TranslationBlock *tb;
if (max_cycles > CF_COUNT_MASK)
max_cycles = CF_COUNT_MASK;
tb = tb_gen_code(cpu, orig_tb->pc, orig_tb->cs_base, orig_tb->... | {
"code": [],
"line_no": []
} | static void FUNC_0(CPUState *VAR_0, int VAR_1,
TranslationBlock *VAR_2, bool VAR_3)
{
TranslationBlock *tb;
if (VAR_1 > CF_COUNT_MASK)
VAR_1 = CF_COUNT_MASK;
tb = tb_gen_code(VAR_0, VAR_2->pc, VAR_2->cs_base, VAR_2->flags,
VAR_1 | ... | [
"static void FUNC_0(CPUState *VAR_0, int VAR_1,\nTranslationBlock *VAR_2, bool VAR_3)\n{",
"TranslationBlock *tb;",
"if (VAR_1 > CF_COUNT_MASK)\nVAR_1 = CF_COUNT_MASK;",
"tb = tb_gen_code(VAR_0, VAR_2->pc, VAR_2->cs_base, VAR_2->flags,\nVAR_1 | CF_NOCACHE\n| (VAR_3 ? CF_IGNORE_ICOUNT : 0));",
"tb->VAR_2 = t... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
15,
17
],
[
21,
23,
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
]
] |
5,389 | static void virtio_scsi_migration_state_changed(Notifier *notifier, void *data)
{
VirtIOSCSI *s = container_of(notifier, VirtIOSCSI,
migration_state_notifier);
MigrationState *mig = data;
if (migration_in_setup(mig)) {
if (!s->dataplane_started) {
... | false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | static void virtio_scsi_migration_state_changed(Notifier *notifier, void *data)
{
VirtIOSCSI *s = container_of(notifier, VirtIOSCSI,
migration_state_notifier);
MigrationState *mig = data;
if (migration_in_setup(mig)) {
if (!s->dataplane_started) {
... | {
"code": [],
"line_no": []
} | static void FUNC_0(Notifier *VAR_0, void *VAR_1)
{
VirtIOSCSI *s = container_of(VAR_0, VirtIOSCSI,
migration_state_notifier);
MigrationState *mig = VAR_1;
if (migration_in_setup(mig)) {
if (!s->dataplane_started) {
return;
}
vir... | [
"static void FUNC_0(Notifier *VAR_0, void *VAR_1)\n{",
"VirtIOSCSI *s = container_of(VAR_0, VirtIOSCSI,\nmigration_state_notifier);",
"MigrationState *mig = VAR_1;",
"if (migration_in_setup(mig)) {",
"if (!s->dataplane_started) {",
"return;",
"}",
"virtio_scsi_dataplane_stop(s);",
"s->dataplane_disa... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
5,390 | static void hpet_reset(void *opaque)
{
HPETState *s = opaque;
int i;
static int count = 0;
for (i = 0; i < HPET_NUM_TIMERS; i++) {
HPETTimer *timer = &s->timer[i];
hpet_del_timer(timer);
timer->tn = i;
timer->cmp = ~0ULL;
timer->config = HPET_TN_PER... | false | qemu | 7afbecc9efa64a88ab6194c2cf1d6feabd03d119 | static void hpet_reset(void *opaque)
{
HPETState *s = opaque;
int i;
static int count = 0;
for (i = 0; i < HPET_NUM_TIMERS; i++) {
HPETTimer *timer = &s->timer[i];
hpet_del_timer(timer);
timer->tn = i;
timer->cmp = ~0ULL;
timer->config = HPET_TN_PER... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
HPETState *s = VAR_0;
int VAR_1;
static int VAR_2 = 0;
for (VAR_1 = 0; VAR_1 < HPET_NUM_TIMERS; VAR_1++) {
HPETTimer *timer = &s->timer[VAR_1];
hpet_del_timer(timer);
timer->tn = VAR_1;
timer->cmp = ~0ULL;
timer->con... | [
"static void FUNC_0(void *VAR_0)\n{",
"HPETState *s = VAR_0;",
"int VAR_1;",
"static int VAR_2 = 0;",
"for (VAR_1 = 0; VAR_1 < HPET_NUM_TIMERS; VAR_1++) {",
"HPETTimer *timer = &s->timer[VAR_1];",
"hpet_del_timer(timer);",
"timer->tn = VAR_1;",
"timer->cmp = ~0ULL;",
"timer->config = HPET_TN_PERI... | [
0,
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
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
... |
5,391 | static void aio_epoll_update(AioContext *ctx, AioHandler *node, bool is_new)
{
}
| false | qemu | c2b38b277a7882a592f4f2ec955084b2b756daaa | static void aio_epoll_update(AioContext *ctx, AioHandler *node, bool is_new)
{
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(AioContext *VAR_0, AioHandler *VAR_1, bool VAR_2)
{
}
| [
"static void FUNC_0(AioContext *VAR_0, AioHandler *VAR_1, bool VAR_2)\n{",
"}"
] | [
0,
0
] | [
[
1,
3
],
[
5
]
] |
5,392 | int inet_listen_opts(QemuOpts *opts, int port_offset)
{
struct addrinfo ai,*res,*e;
const char *addr;
char port[33];
char uaddr[INET6_ADDRSTRLEN+1];
char uport[33];
int slisten,rc,to,try_next;
memset(&ai,0, sizeof(ai));
ai.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
ai.ai_fami... | false | qemu | 877691f96f4ffba2dba45ba5556eacd53b77237b | int inet_listen_opts(QemuOpts *opts, int port_offset)
{
struct addrinfo ai,*res,*e;
const char *addr;
char port[33];
char uaddr[INET6_ADDRSTRLEN+1];
char uport[33];
int slisten,rc,to,try_next;
memset(&ai,0, sizeof(ai));
ai.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
ai.ai_fami... | {
"code": [],
"line_no": []
} | int FUNC_0(QemuOpts *VAR_0, int VAR_1)
{
struct addrinfo VAR_2,*VAR_3,*VAR_4;
const char *VAR_5;
char VAR_6[33];
char VAR_7[INET6_ADDRSTRLEN+1];
char VAR_8[33];
int VAR_9,VAR_10,VAR_11,VAR_12;
memset(&VAR_2,0, sizeof(VAR_2));
VAR_2.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
V... | [
"int FUNC_0(QemuOpts *VAR_0, int VAR_1)\n{",
"struct addrinfo VAR_2,*VAR_3,*VAR_4;",
"const char *VAR_5;",
"char VAR_6[33];",
"char VAR_7[INET6_ADDRSTRLEN+1];",
"char VAR_8[33];",
"int VAR_9,VAR_10,VAR_11,VAR_12;",
"memset(&VAR_2,0, sizeof(VAR_2));",
"VAR_2.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47,
49
... |
5,393 | static uint64_t iack_read(void *opaque, target_phys_addr_t addr, unsigned size)
{
return pic_read_irq(isa_pic);
}
| false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static uint64_t iack_read(void *opaque, target_phys_addr_t addr, unsigned size)
{
return pic_read_irq(isa_pic);
}
| {
"code": [],
"line_no": []
} | static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr, unsigned size)
{
return pic_read_irq(isa_pic);
}
| [
"static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr, unsigned size)\n{",
"return pic_read_irq(isa_pic);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
5,394 | static void sd_set_status(SDState *sd)
{
switch (sd->state) {
case sd_inactive_state:
sd->mode = sd_inactive;
break;
case sd_idle_state:
case sd_ready_state:
case sd_identification_state:
sd->mode = sd_card_identification_mode;
break;
case sd_standb... | false | qemu | 10a412dab3f54439ea3d60274eb41668f7d83bd2 | static void sd_set_status(SDState *sd)
{
switch (sd->state) {
case sd_inactive_state:
sd->mode = sd_inactive;
break;
case sd_idle_state:
case sd_ready_state:
case sd_identification_state:
sd->mode = sd_card_identification_mode;
break;
case sd_standb... | {
"code": [],
"line_no": []
} | static void FUNC_0(SDState *VAR_0)
{
switch (VAR_0->state) {
case sd_inactive_state:
VAR_0->mode = sd_inactive;
break;
case sd_idle_state:
case sd_ready_state:
case sd_identification_state:
VAR_0->mode = sd_card_identification_mode;
break;
case sd_s... | [
"static void FUNC_0(SDState *VAR_0)\n{",
"switch (VAR_0->state) {",
"case sd_inactive_state:\nVAR_0->mode = sd_inactive;",
"break;",
"case sd_idle_state:\ncase sd_ready_state:\ncase sd_identification_state:\nVAR_0->mode = sd_card_identification_mode;",
"break;",
"case sd_standby_state:\ncase sd_transfer... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
15,
17,
19,
21
],
[
23
],
[
27,
29,
31,
33,
35,
37,
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
]
] |
5,395 | void init_clocks(void)
{
QEMUClockType type;
for (type = 0; type < QEMU_CLOCK_MAX; type++) {
qemu_clock_init(type);
}
#ifdef CONFIG_PRCTL_PR_SET_TIMERSLACK
prctl(PR_SET_TIMERSLACK, 1, 0, 0, 0);
#endif
}
| false | qemu | c2b38b277a7882a592f4f2ec955084b2b756daaa | void init_clocks(void)
{
QEMUClockType type;
for (type = 0; type < QEMU_CLOCK_MAX; type++) {
qemu_clock_init(type);
}
#ifdef CONFIG_PRCTL_PR_SET_TIMERSLACK
prctl(PR_SET_TIMERSLACK, 1, 0, 0, 0);
#endif
}
| {
"code": [],
"line_no": []
} | void FUNC_0(void)
{
QEMUClockType type;
for (type = 0; type < QEMU_CLOCK_MAX; type++) {
qemu_clock_init(type);
}
#ifdef CONFIG_PRCTL_PR_SET_TIMERSLACK
prctl(PR_SET_TIMERSLACK, 1, 0, 0, 0);
#endif
}
| [
"void FUNC_0(void)\n{",
"QEMUClockType type;",
"for (type = 0; type < QEMU_CLOCK_MAX; type++) {",
"qemu_clock_init(type);",
"}",
"#ifdef CONFIG_PRCTL_PR_SET_TIMERSLACK\nprctl(PR_SET_TIMERSLACK, 1, 0, 0, 0);",
"#endif\n}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
19,
21
]
] |
5,396 | static void FUNC(sao_band_filter)(uint8_t *_dst, uint8_t *_src,
ptrdiff_t stride, SAOParams *sao,
int *borders, int width, int height,
int c_idx, int class)
{
pixel *dst = (pixel *)_dst;
pixel *src = (pix... | false | FFmpeg | 5856bca360c5bc3e340a357d91b1f993c80a7bea | static void FUNC(sao_band_filter)(uint8_t *_dst, uint8_t *_src,
ptrdiff_t stride, SAOParams *sao,
int *borders, int width, int height,
int c_idx, int class)
{
pixel *dst = (pixel *)_dst;
pixel *src = (pix... | {
"code": [],
"line_no": []
} | static void FUNC_0(sao_band_filter)(uint8_t *_dst, uint8_t *_src,
ptrdiff_t stride, SAOParams *sao,
int *borders, int width, int height,
int c_idx, int class)
{
pixel *dst = (pixel *)_dst;
pixel *src = (p... | [
"static void FUNC_0(sao_band_filter)(uint8_t *_dst, uint8_t *_src,\nptrdiff_t stride, SAOParams *sao,\nint *borders, int width, int height,\nint c_idx, int class)\n{",
"pixel *dst = (pixel *)_dst;",
"pixel *src = (pixel *)_src;",
"int VAR_0[32] = { 0 };",
"int VAR_1, VAR_2, VAR_3;",
"int VAR_4 = !!c_idx;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
35
],
[
37,
39,
41
],
[
43,
45
],
[
47
],
[
49,
51
],
[... |
5,397 | static void vhost_scsi_realize(DeviceState *dev, Error **errp)
{
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(dev);
VHostSCSI *s = VHOST_SCSI(dev);
Error *err = NULL;
int vhostfd = -1;
int ret;
if (!vs->conf.wwpn) {
error_setg(errp, "vhost-scsi: missing wwpn");
return;
... | true | qemu | b19ca188022d720e6cdf87c43c27cb68bac32f6a | static void vhost_scsi_realize(DeviceState *dev, Error **errp)
{
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(dev);
VHostSCSI *s = VHOST_SCSI(dev);
Error *err = NULL;
int vhostfd = -1;
int ret;
if (!vs->conf.wwpn) {
error_setg(errp, "vhost-scsi: missing wwpn");
return;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)
{
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(VAR_0);
VHostSCSI *s = VHOST_SCSI(VAR_0);
Error *err = NULL;
int VAR_2 = -1;
int VAR_3;
if (!vs->conf.wwpn) {
error_setg(VAR_1, "vhost-scsi: missing wwpn");
return;
}... | [
"static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)\n{",
"VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(VAR_0);",
"VHostSCSI *s = VHOST_SCSI(VAR_0);",
"Error *err = NULL;",
"int VAR_2 = -1;",
"int VAR_3;",
"if (!vs->conf.wwpn) {",
"error_setg(VAR_1, \"vhost-scsi: missing wwpn\");",
"return;",
"}",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45,... |
5,398 | static void update_refcount_discard(BlockDriverState *bs,
uint64_t offset, uint64_t length)
{
BDRVQcowState *s = bs->opaque;
Qcow2DiscardRegion *d, *p, *next;
QTAILQ_FOREACH(d, &s->discards, next) {
uint64_t new_start = MIN(offset, d->offset);
uin... | true | qemu | d8bb71b6227366c188595b91c24a58c9b06e46dd | static void update_refcount_discard(BlockDriverState *bs,
uint64_t offset, uint64_t length)
{
BDRVQcowState *s = bs->opaque;
Qcow2DiscardRegion *d, *p, *next;
QTAILQ_FOREACH(d, &s->discards, next) {
uint64_t new_start = MIN(offset, d->offset);
uin... | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0,
uint64_t VAR_1, uint64_t VAR_2)
{
BDRVQcowState *s = VAR_0->opaque;
Qcow2DiscardRegion *d, *p, *next;
QTAILQ_FOREACH(d, &s->discards, next) {
uint64_t new_start = MIN(VAR_1, d->VAR_1);
uint64_t new_end =... | [
"static void FUNC_0(BlockDriverState *VAR_0,\nuint64_t VAR_1, uint64_t VAR_2)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"Qcow2DiscardRegion *d, *p, *next;",
"QTAILQ_FOREACH(d, &s->discards, next) {",
"uint64_t new_start = MIN(VAR_1, d->VAR_1);",
"uint64_t new_end = MAX(VAR_1 + VAR_2, d->VAR_1 + d->bytes);... | [
0,
0,
0,
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
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47,
49,
51,
53
],
[
55
],
[
59,... |
5,399 | static void qcow2_close(BlockDriverState *bs)
{
BDRVQcowState *s = bs->opaque;
g_free(s->l1_table);
/* else pre-write overlap checks in cache_destroy may crash */
s->l1_table = NULL;
if (!(bs->open_flags & BDRV_O_INCOMING)) {
qcow2_cache_flush(bs, s->l2_table_cache);
qcow2_... | true | qemu | de82815db1c89da058b7fb941dab137d6d9ab738 | static void qcow2_close(BlockDriverState *bs)
{
BDRVQcowState *s = bs->opaque;
g_free(s->l1_table);
s->l1_table = NULL;
if (!(bs->open_flags & BDRV_O_INCOMING)) {
qcow2_cache_flush(bs, s->l2_table_cache);
qcow2_cache_flush(bs, s->refcount_block_cache);
qcow2_mar... | {
"code": [
" g_free(s->l1_table);",
" g_free(s->l1_table);",
" g_free(s->l1_table);",
" g_free(s->l1_table);"
],
"line_no": [
7,
7,
7,
7
]
} | static void FUNC_0(BlockDriverState *VAR_0)
{
BDRVQcowState *s = VAR_0->opaque;
g_free(s->l1_table);
s->l1_table = NULL;
if (!(VAR_0->open_flags & BDRV_O_INCOMING)) {
qcow2_cache_flush(VAR_0, s->l2_table_cache);
qcow2_cache_flush(VAR_0, s->refcount_block_cache);
... | [
"static void FUNC_0(BlockDriverState *VAR_0)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"g_free(s->l1_table);",
"s->l1_table = NULL;",
"if (!(VAR_0->open_flags & BDRV_O_INCOMING)) {",
"qcow2_cache_flush(VAR_0, s->l2_table_cache);",
"qcow2_cache_flush(VAR_0, s->refcount_block_cache);",
"qcow2_mark_clean... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
]
] |
5,400 | static void pred4x4_vertical_vp8_c(uint8_t *src, const uint8_t *topright, int stride){
const int lt= src[-1-1*stride];
LOAD_TOP_EDGE
LOAD_TOP_RIGHT_EDGE
uint32_t v = PACK_4U8((lt + 2*t0 + t1 + 2) >> 2,
(t0 + 2*t1 + t2 + 2) >> 2,
(t1 + 2*t2 + t3 +... | true | FFmpeg | 60f10e0ad37418cc697765d85b0bc22db70f726a | static void pred4x4_vertical_vp8_c(uint8_t *src, const uint8_t *topright, int stride){
const int lt= src[-1-1*stride];
LOAD_TOP_EDGE
LOAD_TOP_RIGHT_EDGE
uint32_t v = PACK_4U8((lt + 2*t0 + t1 + 2) >> 2,
(t0 + 2*t1 + t2 + 2) >> 2,
(t1 + 2*t2 + t3 +... | {
"code": [
" const int lt= src[-1-1*stride];",
" const int lt= src[-1-1*stride];"
],
"line_no": [
3,
3
]
} | static void FUNC_0(uint8_t *VAR_0, const uint8_t *VAR_1, int VAR_2){
const int VAR_3= VAR_0[-1-1*VAR_2];
LOAD_TOP_EDGE
LOAD_TOP_RIGHT_EDGE
uint32_t v = PACK_4U8((VAR_3 + 2*t0 + t1 + 2) >> 2,
(t0 + 2*t1 + t2 + 2) >> 2,
(t1 + 2*t2 + t3 + 2) >> 2,
... | [
"static void FUNC_0(uint8_t *VAR_0, const uint8_t *VAR_1, int VAR_2){",
"const int VAR_3= VAR_0[-1-1*VAR_2];",
"LOAD_TOP_EDGE\nLOAD_TOP_RIGHT_EDGE\nuint32_t v = PACK_4U8((VAR_3 + 2*t0 + t1 + 2) >> 2,\n(t0 + 2*t1 + t2 + 2) >> 2,\n(t1 + 2*t2 + t3 + 2) >> 2,\n(t2 + 2*t3 + t4 + 2) >> 2);",
"AV_WN32A(VAR_0+0*VAR_2... | [
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5,
7,
9,
11,
13,
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
5,401 | static void end_frame(AVFilterLink *link)
{
CropContext *crop = link->dst->priv;
crop->var_values[N] += 1.0;
avfilter_unref_buffer(link->cur_buf);
avfilter_end_frame(link->dst->outputs[0]);
}
| true | FFmpeg | 1afab338575810acc5eb75c17c4adfb73504de10 | static void end_frame(AVFilterLink *link)
{
CropContext *crop = link->dst->priv;
crop->var_values[N] += 1.0;
avfilter_unref_buffer(link->cur_buf);
avfilter_end_frame(link->dst->outputs[0]);
}
| {
"code": [
" crop->var_values[N] += 1.0;"
],
"line_no": [
9
]
} | static void FUNC_0(AVFilterLink *VAR_0)
{
CropContext *crop = VAR_0->dst->priv;
crop->var_values[N] += 1.0;
avfilter_unref_buffer(VAR_0->cur_buf);
avfilter_end_frame(VAR_0->dst->outputs[0]);
}
| [
"static void FUNC_0(AVFilterLink *VAR_0)\n{",
"CropContext *crop = VAR_0->dst->priv;",
"crop->var_values[N] += 1.0;",
"avfilter_unref_buffer(VAR_0->cur_buf);",
"avfilter_end_frame(VAR_0->dst->outputs[0]);",
"}"
] | [
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
5,404 | static void vfio_listener_release(VFIOContainer *container)
{
memory_listener_unregister(&container->iommu_data.listener);
}
| true | qemu | 87ca1f77b1c406137fe36ab73b2dc91fb75f8d0a | static void vfio_listener_release(VFIOContainer *container)
{
memory_listener_unregister(&container->iommu_data.listener);
}
| {
"code": [
" memory_listener_unregister(&container->iommu_data.listener);"
],
"line_no": [
5
]
} | static void FUNC_0(VFIOContainer *VAR_0)
{
memory_listener_unregister(&VAR_0->iommu_data.listener);
}
| [
"static void FUNC_0(VFIOContainer *VAR_0)\n{",
"memory_listener_unregister(&VAR_0->iommu_data.listener);",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
5,405 | static int coroutine_fn nfs_co_writev(BlockDriverState *bs,
int64_t sector_num, int nb_sectors,
QEMUIOVector *iov)
{
NFSClient *client = bs->opaque;
NFSRPC task;
char *buf = NULL;
nfs_co_init_task(client, &task);
... | true | qemu | 2347dd7b6841c1543ceb49cb232d596eb5dd1ca3 | static int coroutine_fn nfs_co_writev(BlockDriverState *bs,
int64_t sector_num, int nb_sectors,
QEMUIOVector *iov)
{
NFSClient *client = bs->opaque;
NFSRPC task;
char *buf = NULL;
nfs_co_init_task(client, &task);
... | {
"code": [
" buf = g_malloc(nb_sectors * BDRV_SECTOR_SIZE);"
],
"line_no": [
21
]
} | static int VAR_0 nfs_co_writev(BlockDriverState *bs,
int64_t sector_num, int nb_sectors,
QEMUIOVector *iov)
{
NFSClient *client = bs->opaque;
NFSRPC task;
char *buf = NULL;
nfs_co_init_task(client, &task);
bu... | [
"static int VAR_0 nfs_co_writev(BlockDriverState *bs,\nint64_t sector_num, int nb_sectors,\nQEMUIOVector *iov)\n{",
"NFSClient *client = bs->opaque;",
"NFSRPC task;",
"char *buf = NULL;",
"nfs_co_init_task(client, &task);",
"buf = g_malloc(nb_sectors * BDRV_SECTOR_SIZE);",
"qemu_iovec_to_buf(iov, 0, buf... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
27,
29,
31,
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
57
],
[... |
5,406 | static void rocker_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
k->init = pci_rocker_init;
k->exit = pci_rocker_uninit;
k->vendor_id = PCI_VENDOR_ID_REDHAT;
k->device_id = PCI_DEVICE_ID_REDHAT_ROCKER;
... | true | qemu | 0c8f86ea98945678622c6e4b070c4218a53a0d19 | static void rocker_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
k->init = pci_rocker_init;
k->exit = pci_rocker_uninit;
k->vendor_id = PCI_VENDOR_ID_REDHAT;
k->device_id = PCI_DEVICE_ID_REDHAT_ROCKER;
... | {
"code": [
" k->init = pci_rocker_init;"
],
"line_no": [
11
]
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
PCIDeviceClass *k = PCI_DEVICE_CLASS(VAR_0);
k->init = pci_rocker_init;
k->exit = pci_rocker_uninit;
k->vendor_id = PCI_VENDOR_ID_REDHAT;
k->device_id = PCI_DEVICE_ID_REDHAT_ROCKER;
k->revi... | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"PCIDeviceClass *k = PCI_DEVICE_CLASS(VAR_0);",
"k->init = pci_rocker_init;",
"k->exit = pci_rocker_uninit;",
"k->vendor_id = PCI_VENDOR_ID_REDHAT;",
"k->device_id = PCI_DEVICE_ID_REDHAT_ROCKER;",
"k->r... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
]
] |
5,410 | static void spapr_memory_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
uint32_t node, Error **errp)
{
Error *local_err = NULL;
sPAPRMachineState *ms = SPAPR_MACHINE(hotplug_dev);
PCDIMMDevice *dimm = PC_DIMM(dev);
PCDIMMDeviceClass *ddc = PC_DIMM_GET_CLASS(dimm);
... | true | qemu | df58713396f8b2deb923e39c00b10744c5c63909 | static void spapr_memory_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
uint32_t node, Error **errp)
{
Error *local_err = NULL;
sPAPRMachineState *ms = SPAPR_MACHINE(hotplug_dev);
PCDIMMDevice *dimm = PC_DIMM(dev);
PCDIMMDeviceClass *ddc = PC_DIMM_GET_CLASS(dimm);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(HotplugHandler *VAR_0, DeviceState *VAR_1,
uint32_t VAR_2, Error **VAR_3)
{
Error *local_err = NULL;
sPAPRMachineState *ms = SPAPR_MACHINE(VAR_0);
PCDIMMDevice *dimm = PC_DIMM(VAR_1);
PCDIMMDeviceClass *ddc = PC_DIMM_GET_CLASS(dimm);
MemoryRegion *mr ... | [
"static void FUNC_0(HotplugHandler *VAR_0, DeviceState *VAR_1,\nuint32_t VAR_2, Error **VAR_3)\n{",
"Error *local_err = NULL;",
"sPAPRMachineState *ms = SPAPR_MACHINE(VAR_0);",
"PCDIMMDevice *dimm = PC_DIMM(VAR_1);",
"PCDIMMDeviceClass *ddc = PC_DIMM_GET_CLASS(dimm);",
"MemoryRegion *mr = ddc->get_memory_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2,
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14,
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21,
22,
23
],... |
5,411 | int bdrv_write(BlockDriverState *bs, int64_t sector_num,
const uint8_t *buf, int nb_sectors)
{
BlockDriver *drv = bs->drv;
if (!bs->drv)
return -ENOMEDIUM;
if (bs->read_only)
return -EACCES;
if (bdrv_check_request(bs, sector_num, nb_sectors))
return -EIO;
... | true | qemu | 7cd1e32a860895ccca89eb90a0226efbcd969b55 | int bdrv_write(BlockDriverState *bs, int64_t sector_num,
const uint8_t *buf, int nb_sectors)
{
BlockDriver *drv = bs->drv;
if (!bs->drv)
return -ENOMEDIUM;
if (bs->read_only)
return -EACCES;
if (bdrv_check_request(bs, sector_num, nb_sectors))
return -EIO;
... | {
"code": [],
"line_no": []
} | int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,
const uint8_t *VAR_2, int VAR_3)
{
BlockDriver *drv = VAR_0->drv;
if (!VAR_0->drv)
return -ENOMEDIUM;
if (VAR_0->read_only)
return -EACCES;
if (bdrv_check_request(VAR_0, VAR_1, VAR_3))
return -EIO;
... | [
"int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,\nconst uint8_t *VAR_2, int VAR_3)\n{",
"BlockDriver *drv = VAR_0->drv;",
"if (!VAR_0->drv)\nreturn -ENOMEDIUM;",
"if (VAR_0->read_only)\nreturn -EACCES;",
"if (bdrv_check_request(VAR_0, VAR_1, VAR_3))\nreturn -EIO;",
"return drv->FUNC_0(VAR_0, VAR_1, VAR... | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9,
11
],
[
13,
15
],
[
17,
19
],
[
23
],
[
25
]
] |
5,412 | void scsi_req_cancel_async(SCSIRequest *req, Notifier *notifier)
{
trace_scsi_req_cancel(req->dev->id, req->lun, req->tag);
if (notifier) {
notifier_list_add(&req->cancel_notifiers, notifier);
scsi_req_ref(req);
scsi_req_dequeue(req);
req->io_canceled = true;
if (req->a... | true | qemu | 3daa41078aedf227ec98b0d1c9d56b77b6d20153 | void scsi_req_cancel_async(SCSIRequest *req, Notifier *notifier)
{
trace_scsi_req_cancel(req->dev->id, req->lun, req->tag);
if (notifier) {
notifier_list_add(&req->cancel_notifiers, notifier);
scsi_req_ref(req);
scsi_req_dequeue(req);
req->io_canceled = true;
if (req->a... | {
"code": [],
"line_no": []
} | void FUNC_0(SCSIRequest *VAR_0, Notifier *VAR_1)
{
trace_scsi_req_cancel(VAR_0->dev->id, VAR_0->lun, VAR_0->tag);
if (VAR_1) {
notifier_list_add(&VAR_0->cancel_notifiers, VAR_1);
scsi_req_ref(VAR_0);
scsi_req_dequeue(VAR_0);
VAR_0->io_canceled = true;
if (VAR_0->aiocb) ... | [
"void FUNC_0(SCSIRequest *VAR_0, Notifier *VAR_1)\n{",
"trace_scsi_req_cancel(VAR_0->dev->id, VAR_0->lun, VAR_0->tag);",
"if (VAR_1) {",
"notifier_list_add(&VAR_0->cancel_notifiers, VAR_1);",
"scsi_req_ref(VAR_0);",
"scsi_req_dequeue(VAR_0);",
"VAR_0->io_canceled = true;",
"if (VAR_0->aiocb) {",
"bl... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
]
] |
5,413 | static int alac_decode_frame(AVCodecContext *avctx,
void *outbuffer, int *outputsize,
AVPacket *avpkt)
{
const uint8_t *inbuffer = avpkt->data;
int input_buffer_size = avpkt->size;
ALACContext *alac = avctx->priv_data;
int channels;
... | true | FFmpeg | 313b52fbfff47ed934cdeccaebda9b3406466575 | static int alac_decode_frame(AVCodecContext *avctx,
void *outbuffer, int *outputsize,
AVPacket *avpkt)
{
const uint8_t *inbuffer = avpkt->data;
int input_buffer_size = avpkt->size;
ALACContext *alac = avctx->priv_data;
int channels;
... | {
"code": [
" return input_buffer_size;",
" if (!alac->context_initialized) {",
" if (alac->avctx->extradata_size != ALAC_EXTRADATA_SIZE) {",
" av_log(avctx, AV_LOG_ERROR, \"alac: expected %d extradata bytes\\n\",",
" ALAC_EXTRADATA_SIZE);",
" ... | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->data;
int VAR_5 = VAR_3->size;
ALACContext *alac = VAR_0->priv_data;
int VAR_6;
unsigned int VAR_7;
int VAR_8;
... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->data;",
"int VAR_5 = VAR_3->size;",
"ALACContext *alac = VAR_0->priv_data;",
"int VAR_6;",
"unsigned int VAR_7;",
"int VAR_8;",
"unsigned int VAR_9;",
"int VAR_10;",
"uint8_t i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
0,
1,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
35,
37
],
[
43
],
[
45
],
[
47,
49
],
[
51
],
[
53
],
[
55
... |
5,414 | static bool scsi_block_is_passthrough(SCSIDiskState *s, uint8_t *buf)
{
switch (buf[0]) {
case VERIFY_10:
case VERIFY_12:
case VERIFY_16:
/* Check if BYTCHK == 0x01 (data-out buffer contains data
* for the number of logical blocks specified in the length
* field). For ... | true | qemu | 166dbda7e131f7b6540f56c3234bb2f8b23d84c0 | static bool scsi_block_is_passthrough(SCSIDiskState *s, uint8_t *buf)
{
switch (buf[0]) {
case VERIFY_10:
case VERIFY_12:
case VERIFY_16:
if ((buf[1] & 6) != 2) {
return false;
}
break;
case READ_6:
case READ_10:
case READ_12:... | {
"code": [],
"line_no": []
} | static bool FUNC_0(SCSIDiskState *s, uint8_t *buf)
{
switch (buf[0]) {
case VERIFY_10:
case VERIFY_12:
case VERIFY_16:
if ((buf[1] & 6) != 2) {
return false;
}
break;
case READ_6:
case READ_10:
case READ_12:
case READ_16:... | [
"static bool FUNC_0(SCSIDiskState *s, uint8_t *buf)\n{",
"switch (buf[0]) {",
"case VERIFY_10:\ncase VERIFY_12:\ncase VERIFY_16:\nif ((buf[1] & 6) != 2) {",
"return false;",
"}",
"break;",
"case READ_6:\ncase READ_10:\ncase READ_12:\ncase READ_16:\ncase WRITE_6:\ncase WRITE_10:\ncase WRITE_12:\ncase WRI... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9,
11,
21
],
[
23
],
[
25
],
[
27
],
[
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
65
],
[
67
],
[
69
],
[
71
],
[
75,
77
],
[
79
],
[... |
5,415 | static void test_smram_lock(void)
{
QPCIBus *pcibus;
QPCIDevice *pcidev;
QDict *response;
pcibus = qpci_init_pc(NULL);
g_assert(pcibus != NULL);
pcidev = qpci_device_find(pcibus, 0);
g_assert(pcidev != NULL);
/* check open is settable */
smram_set_bit(pcidev, MCH_HOST_BRIDGE_SMRAM_D_... | true | qemu | fb6faea888c1e54059aed7f87be93de623b346ee | static void test_smram_lock(void)
{
QPCIBus *pcibus;
QPCIDevice *pcidev;
QDict *response;
pcibus = qpci_init_pc(NULL);
g_assert(pcibus != NULL);
pcidev = qpci_device_find(pcibus, 0);
g_assert(pcidev != NULL);
smram_set_bit(pcidev, MCH_HOST_BRIDGE_SMRAM_D_OPEN, false);
g_assert(s... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
QPCIBus *pcibus;
QPCIDevice *pcidev;
QDict *response;
pcibus = qpci_init_pc(NULL);
g_assert(pcibus != NULL);
pcidev = qpci_device_find(pcibus, 0);
g_assert(pcidev != NULL);
smram_set_bit(pcidev, MCH_HOST_BRIDGE_SMRAM_D_OPEN, false);
g_assert(smram_test... | [
"static void FUNC_0(void)\n{",
"QPCIBus *pcibus;",
"QPCIDevice *pcidev;",
"QDict *response;",
"pcibus = qpci_init_pc(NULL);",
"g_assert(pcibus != NULL);",
"pcidev = qpci_device_find(pcibus, 0);",
"g_assert(pcidev != NULL);",
"smram_set_bit(pcidev, MCH_HOST_BRIDGE_SMRAM_D_OPEN, false);",
"g_assert(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
11
],
[
12
],
[
13
],
[
14
],
[
16
],
[
17
],
[
18
],
[
19
],
[
21
],
[
22
],
[
23
],
[
24
],... |
5,417 | void do_mullwo (void)
{
int64_t res = (int64_t)Ts0 * (int64_t)Ts1;
if (likely((int32_t)res == res)) {
xer_ov = 0;
} else {
xer_ov = 1;
xer_so = 1;
}
T0 = (int32_t)res;
}
| true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | void do_mullwo (void)
{
int64_t res = (int64_t)Ts0 * (int64_t)Ts1;
if (likely((int32_t)res == res)) {
xer_ov = 0;
} else {
xer_ov = 1;
xer_so = 1;
}
T0 = (int32_t)res;
}
| {
"code": [
" } else {",
" } else {",
" } else {",
" xer_ov = 0;",
" } else {",
" xer_so = 1;",
" xer_ov = 1;",
" } else {",
" xer_ov = 0;",
" } else {",
" xer_so = 1;",
" xer_ov = 1;",
" xer_ov = 0;... | void FUNC_0 (void)
{
int64_t res = (int64_t)Ts0 * (int64_t)Ts1;
if (likely((int32_t)res == res)) {
xer_ov = 0;
} else {
xer_ov = 1;
xer_so = 1;
}
T0 = (int32_t)res;
}
| [
"void FUNC_0 (void)\n{",
"int64_t res = (int64_t)Ts0 * (int64_t)Ts1;",
"if (likely((int32_t)res == res)) {",
"xer_ov = 0;",
"} else {",
"xer_ov = 1;",
"xer_so = 1;",
"}",
"T0 = (int32_t)res;",
"}"
] | [
0,
1,
0,
1,
0,
1,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
5,418 | static int vfio_msix_setup(VFIOPCIDevice *vdev, int pos, Error **errp)
{
int ret;
vdev->msix->pending = g_malloc0(BITS_TO_LONGS(vdev->msix->entries) *
sizeof(unsigned long));
ret = msix_init(&vdev->pdev, vdev->msix->entries,
vdev->bars[vdev->ms... | true | qemu | ee640c625e190a0c0e6b8966adc0e4720fb75200 | static int vfio_msix_setup(VFIOPCIDevice *vdev, int pos, Error **errp)
{
int ret;
vdev->msix->pending = g_malloc0(BITS_TO_LONGS(vdev->msix->entries) *
sizeof(unsigned long));
ret = msix_init(&vdev->pdev, vdev->msix->entries,
vdev->bars[vdev->ms... | {
"code": [
" vdev->msix->pba_bar, vdev->msix->pba_offset, pos);",
" error_setg(errp, \"msix_init failed\");"
],
"line_no": [
21,
31
]
} | static int FUNC_0(VFIOPCIDevice *VAR_0, int VAR_1, Error **VAR_2)
{
int VAR_3;
VAR_0->msix->pending = g_malloc0(BITS_TO_LONGS(VAR_0->msix->entries) *
sizeof(unsigned long));
VAR_3 = msix_init(&VAR_0->pdev, VAR_0->msix->entries,
VAR_0->bars[VAR_... | [
"static int FUNC_0(VFIOPCIDevice *VAR_0, int VAR_1, Error **VAR_2)\n{",
"int VAR_3;",
"VAR_0->msix->pending = g_malloc0(BITS_TO_LONGS(VAR_0->msix->entries) *\nsizeof(unsigned long));",
"VAR_3 = msix_init(&VAR_0->pdev, VAR_0->msix->entries,\nVAR_0->bars[VAR_0->msix->table_bar].region.mem,\nVAR_0->msix->table_b... | [
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13,
15,
17,
19,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
71
],
[
75
],
[
77
]
] |
5,419 | static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pic, int *got_packet)
{
libx265Context *ctx = avctx->priv_data;
x265_picture x265pic;
x265_picture x265pic_out = { { 0 } };
x265_nal *nal;
uint8_t *dst;
int payload = 0;
... | true | FFmpeg | 04070dbca0688ab1e24528ce5c135254a9a79c47 | static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pic, int *got_packet)
{
libx265Context *ctx = avctx->priv_data;
x265_picture x265pic;
x265_picture x265pic_out = { { 0 } };
x265_nal *nal;
uint8_t *dst;
int payload = 0;
... | {
"code": [
" x265_picture x265pic_out = { { 0 } };"
],
"line_no": [
11
]
} | static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,
const AVFrame *VAR_2, int *VAR_3)
{
libx265Context *ctx = VAR_0->priv_data;
x265_picture x265pic;
x265_picture x265pic_out = { { 0 } };
x265_nal *nal;
uint8_t *dst;
int VAR_4 = 0;
int VAR_5;
... | [
"static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,\nconst AVFrame *VAR_2, int *VAR_3)\n{",
"libx265Context *ctx = VAR_0->priv_data;",
"x265_picture x265pic;",
"x265_picture x265pic_out = { { 0 } };",
"x265_nal *nal;",
"uint8_t *dst;",
"int VAR_4 = 0;",
"int VAR_5;",
"int VAR_6;",
"int VAR_... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
49,
51,... |
5,420 | static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
CFHDContext *s = avctx->priv_data;
GetByteContext gb;
ThreadFrame frame = { .f = data };
AVFrame *pic = data;
int ret = 0, i, j, planes, plane, got_buffer = 0;
int16_t *coe... | true | FFmpeg | cd6f319a7470394044627d1bd900e21b9aca5f4a | static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
CFHDContext *s = avctx->priv_data;
GetByteContext gb;
ThreadFrame frame = { .f = data };
AVFrame *pic = data;
int ret = 0, i, j, planes, plane, got_buffer = 0;
int16_t *coe... | {
"code": [
" int expected = highpass_height * highpass_stride;",
" if (highpass_height > highpass_a_height || highpass_width > highpass_a_width || a_expected < expected) {"
],
"line_no": [
555,
577
]
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
CFHDContext *s = VAR_0->priv_data;
GetByteContext gb;
ThreadFrame frame = { .f = VAR_1 };
AVFrame *pic = VAR_1;
int VAR_4 = 0, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9 = 0;
int16_t *coeff... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"CFHDContext *s = VAR_0->priv_data;",
"GetByteContext gb;",
"ThreadFrame frame = { .f = VAR_1 };",
"AVFrame *pic = VAR_1;",
"int VAR_4 = 0, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9 = 0;",
"int16_t *coeff_data;",
"s->cod... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
5,422 | static av_cold int dnxhd_decode_init_thread_copy(AVCodecContext *avctx)
{
DNXHDContext *ctx = avctx->priv_data;
// make sure VLC tables will be loaded when cid is parsed
ctx->cid = -1;
ctx->rows = av_mallocz_array(avctx->thread_count, sizeof(RowContext));
if (!ctx->rows)
return A... | true | FFmpeg | f800d6508d7e8fbd8d9777b775d333a4f02112ef | static av_cold int dnxhd_decode_init_thread_copy(AVCodecContext *avctx)
{
DNXHDContext *ctx = avctx->priv_data;
ctx->cid = -1;
ctx->rows = av_mallocz_array(avctx->thread_count, sizeof(RowContext));
if (!ctx->rows)
return AVERROR(ENOMEM);
return 0;
} | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
DNXHDContext *ctx = avctx->priv_data;
ctx->cid = -1;
ctx->rows = av_mallocz_array(avctx->thread_count, sizeof(RowContext));
if (!ctx->rows)
return AVERROR(ENOMEM);
return 0;
} | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"DNXHDContext *ctx = avctx->priv_data;",
"ctx->cid = -1;",
"ctx->rows = av_mallocz_array(avctx->thread_count, sizeof(RowContext));",
"if (!ctx->rows)\nreturn AVERROR(ENOMEM);",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
12
],
[
16
],
[
18,
20
],
[
24
],
[
26
]
] |
5,423 | void do_POWER_divo (void)
{
int64_t tmp;
if ((Ts0 == INT32_MIN && Ts1 == -1) || Ts1 == 0) {
T0 = (long)((-1) * (T0 >> 31));
env->spr[SPR_MQ] = 0;
xer_ov = 1;
xer_so = 1;
} else {
tmp = ((uint64_t)T0 << 32) | env->spr[SPR_MQ];
env->spr[SPR_MQ] = tmp... | true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | void do_POWER_divo (void)
{
int64_t tmp;
if ((Ts0 == INT32_MIN && Ts1 == -1) || Ts1 == 0) {
T0 = (long)((-1) * (T0 >> 31));
env->spr[SPR_MQ] = 0;
xer_ov = 1;
xer_so = 1;
} else {
tmp = ((uint64_t)T0 << 32) | env->spr[SPR_MQ];
env->spr[SPR_MQ] = tmp... | {
"code": [
" } else {",
" } else {",
" if ((Ts0 == INT32_MIN && Ts1 == -1) || Ts1 == 0) {",
" } else {",
" } else {",
" xer_so = 1;",
" xer_ov = 1;",
" } else {",
" } else {",
" xer_so = 1;",
" xer_ov = 1;",
" } else ... | void FUNC_0 (void)
{
int64_t tmp;
if ((Ts0 == INT32_MIN && Ts1 == -1) || Ts1 == 0) {
T0 = (long)((-1) * (T0 >> 31));
env->spr[SPR_MQ] = 0;
xer_ov = 1;
xer_so = 1;
} else {
tmp = ((uint64_t)T0 << 32) | env->spr[SPR_MQ];
env->spr[SPR_MQ] = tmp % T1;
... | [
"void FUNC_0 (void)\n{",
"int64_t tmp;",
"if ((Ts0 == INT32_MIN && Ts1 == -1) || Ts1 == 0) {",
"T0 = (long)((-1) * (T0 >> 31));",
"env->spr[SPR_MQ] = 0;",
"xer_ov = 1;",
"xer_so = 1;",
"} else {",
"tmp = ((uint64_t)T0 << 32) | env->spr[SPR_MQ];",
"env->spr[SPR_MQ] = tmp % T1;",
"tmp /= Ts1;",
... | [
0,
0,
1,
0,
0,
1,
1,
0,
0,
0,
1,
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... |
5,424 | void visit_type_uint64(Visitor *v, uint64_t *obj, const char *name, Error **errp)
{
int64_t value;
if (!error_is_set(errp)) {
if (v->type_uint64) {
v->type_uint64(v, obj, name, errp);
} else {
value = *obj;
v->type_int(v, &value, name, errp);
... | true | qemu | 297a3646c2947ee64a6d42ca264039732c6218e0 | void visit_type_uint64(Visitor *v, uint64_t *obj, const char *name, Error **errp)
{
int64_t value;
if (!error_is_set(errp)) {
if (v->type_uint64) {
v->type_uint64(v, obj, name, errp);
} else {
value = *obj;
v->type_int(v, &value, name, errp);
... | {
"code": [
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" if (!error_is_set(errp)) {",
" } else {",
" value = *obj;",
" v->t... | void FUNC_0(Visitor *VAR_0, uint64_t *VAR_1, const char *VAR_2, Error **VAR_3)
{
int64_t value;
if (!error_is_set(VAR_3)) {
if (VAR_0->type_uint64) {
VAR_0->type_uint64(VAR_0, VAR_1, VAR_2, VAR_3);
} else {
value = *VAR_1;
VAR_0->type_int(VAR_0, &value... | [
"void FUNC_0(Visitor *VAR_0, uint64_t *VAR_1, const char *VAR_2, Error **VAR_3)\n{",
"int64_t value;",
"if (!error_is_set(VAR_3)) {",
"if (VAR_0->type_uint64) {",
"VAR_0->type_uint64(VAR_0, VAR_1, VAR_2, VAR_3);",
"} else {",
"value = *VAR_1;",
"VAR_0->type_int(VAR_0, &value, VAR_2, VAR_3);",
"*VAR_... | [
0,
0,
1,
1,
1,
0,
1,
1,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
5,425 | SwsContext *getSwsContext(int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat, int flags,
SwsFilter *srcFilter, SwsFilter *dstFilter){
SwsContext *c;
int i;
int usesFilter;
SwsFilter dummyFilter= {NULL, NULL, NULL, NULL};
#ifdef ARCH_X86
if(gCpuCaps.hasMMX)
a... | true | FFmpeg | b7dc6f662868fbdad779c61c233b1d19d8b89d3c | SwsContext *getSwsContext(int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat, int flags,
SwsFilter *srcFilter, SwsFilter *dstFilter){
SwsContext *c;
int i;
int usesFilter;
SwsFilter dummyFilter= {NULL, NULL, NULL, NULL};
#ifdef ARCH_X86
if(gCpuCaps.hasMMX)
a... | {
"code": [
"\t\t\tinitMMX2HScaler( dstW, c->lumXInc, c->funnyYCode);",
"\t\t\tinitMMX2HScaler(c->chrDstW, c->chrXInc, c->funnyUVCode);"
],
"line_no": [
437,
439
]
} | SwsContext *FUNC_0(int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat, int flags,
SwsFilter *srcFilter, SwsFilter *dstFilter){
SwsContext *c;
int VAR_0;
int VAR_1;
SwsFilter dummyFilter= {NULL, NULL, NULL, NULL};
#ifdef ARCH_X86
if(gCpuCaps.hasMMX)
asm volat... | [
"SwsContext *FUNC_0(int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat, int flags,\nSwsFilter *srcFilter, SwsFilter *dstFilter){",
"SwsContext *c;",
"int VAR_0;",
"int VAR_1;",
"SwsFilter dummyFilter= {NULL, NULL, NULL, NULL};",
"#ifdef ARCH_X86\nif(gCpuCaps.hasMMX)\nasm volatile(\"emms\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19,
21
],
[
23,
27
],
[
33
],
[
35
],
[
37
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[
51,
53
],
[
55
],
[
57
],
... |
5,426 | static int smacker_decode_bigtree(GetBitContext *gb, HuffContext *hc, DBCtx *ctx)
{
if (hc->current + 1 >= hc->length) {
av_log(NULL, AV_LOG_ERROR, "Tree size exceeded!\n");
return AVERROR_INVALIDDATA;
}
if(!get_bits1(gb)){ //Leaf
int val, i1, i2;
i1 = ctx->v1->table ... | true | FFmpeg | 946ecd19ea752399bccc751c9339ff74b815587e | static int smacker_decode_bigtree(GetBitContext *gb, HuffContext *hc, DBCtx *ctx)
{
if (hc->current + 1 >= hc->length) {
av_log(NULL, AV_LOG_ERROR, "Tree size exceeded!\n");
return AVERROR_INVALIDDATA;
}
if(!get_bits1(gb)){
int val, i1, i2;
i1 = ctx->v1->table ? get_... | {
"code": [
"static int smacker_decode_bigtree(GetBitContext *gb, HuffContext *hc, DBCtx *ctx)",
" r = smacker_decode_bigtree(gb, hc, ctx);",
" r_new = smacker_decode_bigtree(gb, hc, ctx);"
],
"line_no": [
1,
61,
71
]
} | static int FUNC_0(GetBitContext *VAR_0, HuffContext *VAR_1, DBCtx *VAR_2)
{
if (VAR_1->current + 1 >= VAR_1->length) {
av_log(NULL, AV_LOG_ERROR, "Tree size exceeded!\n");
return AVERROR_INVALIDDATA;
}
if(!get_bits1(VAR_0)){
int VAR_3, VAR_4, VAR_5;
VAR_4 = VAR_2->v1... | [
"static int FUNC_0(GetBitContext *VAR_0, HuffContext *VAR_1, DBCtx *VAR_2)\n{",
"if (VAR_1->current + 1 >= VAR_1->length) {",
"av_log(NULL, AV_LOG_ERROR, \"Tree size exceeded!\\n\");",
"return AVERROR_INVALIDDATA;",
"}",
"if(!get_bits1(VAR_0)){",
"int VAR_3, VAR_4, VAR_5;",
"VAR_4 = VAR_2->v1->table ?... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[... |
5,427 | char *qemu_find_file(int type, const char *name)
{
int len;
const char *subdir;
char *buf;
/* Try the name as a straight path first */
if (access(name, R_OK) == 0) {
return g_strdup(name);
}
switch (type) {
case QEMU_FILE_TYPE_BIOS:
subdir = "";
brea... | true | qemu | 4524051c32190c1dc13ec2ccd122fd120dbed736 | char *qemu_find_file(int type, const char *name)
{
int len;
const char *subdir;
char *buf;
if (access(name, R_OK) == 0) {
return g_strdup(name);
}
switch (type) {
case QEMU_FILE_TYPE_BIOS:
subdir = "";
break;
case QEMU_FILE_TYPE_KEYMAP:
... | {
"code": [
" int len;",
" len = strlen(data_dir) + strlen(name) + strlen(subdir) + 2;",
" buf = g_malloc0(len);",
" snprintf(buf, len, \"%s/%s%s\", data_dir, subdir, name);",
" if (access(buf, R_OK)) {",
" return NULL;",
" return buf;"
],
"line_no": [
5,
... | char *FUNC_0(int VAR_0, const char *VAR_1)
{
int VAR_2;
const char *VAR_3;
char *VAR_4;
if (access(VAR_1, R_OK) == 0) {
return g_strdup(VAR_1);
}
switch (VAR_0) {
case QEMU_FILE_TYPE_BIOS:
VAR_3 = "";
break;
case QEMU_FILE_TYPE_KEYMAP:
... | [
"char *FUNC_0(int VAR_0, const char *VAR_1)\n{",
"int VAR_2;",
"const char *VAR_3;",
"char *VAR_4;",
"if (access(VAR_1, R_OK) == 0) {",
"return g_strdup(VAR_1);",
"}",
"switch (VAR_0) {",
"case QEMU_FILE_TYPE_BIOS:\nVAR_3 = \"\";",
"break;",
"case QEMU_FILE_TYPE_KEYMAP:\nVAR_3 = \"keymaps/\";",
... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
5,428 | static inline void decode_block_intra(MadContext *s, int16_t * block)
{
int level, i, j, run;
RLTable *rl = &ff_rl_mpeg1;
const uint8_t *scantable = s->scantable.permutated;
int16_t *quant_matrix = s->quant_matrix;
block[0] = (128 + get_sbits(&s->gb, 8)) * quant_matrix[0];
/* The RL d... | true | FFmpeg | 061c489895d29049a88dc6118e4b639a273b31d6 | static inline void decode_block_intra(MadContext *s, int16_t * block)
{
int level, i, j, run;
RLTable *rl = &ff_rl_mpeg1;
const uint8_t *scantable = s->scantable.permutated;
int16_t *quant_matrix = s->quant_matrix;
block[0] = (128 + get_sbits(&s->gb, 8)) * quant_matrix[0];
i =... | {
"code": [
" if (i > 63) {",
" av_log(s->avctx, AV_LOG_ERROR, \"ac-tex damaged at %d %d\\n\", s->mb_x, s->mb_y);"
],
"line_no": [
97,
99
]
} | static inline void FUNC_0(MadContext *VAR_0, int16_t * VAR_1)
{
int VAR_2, VAR_3, VAR_4, VAR_5;
RLTable *rl = &ff_rl_mpeg1;
const uint8_t *VAR_6 = VAR_0->VAR_6.permutated;
int16_t *quant_matrix = VAR_0->quant_matrix;
VAR_1[0] = (128 + get_sbits(&VAR_0->gb, 8)) * quant_matrix[0];
... | [
"static inline void FUNC_0(MadContext *VAR_0, int16_t * VAR_1)\n{",
"int VAR_2, VAR_3, VAR_4, VAR_5;",
"RLTable *rl = &ff_rl_mpeg1;",
"const uint8_t *VAR_6 = VAR_0->VAR_6.permutated;",
"int16_t *quant_matrix = VAR_0->quant_matrix;",
"VAR_1[0] = (128 + get_sbits(&VAR_0->gb, 8)) * quant_matrix[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,
1,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
... |
5,431 | static int overlay_opencl_blend(FFFrameSync *fs)
{
AVFilterContext *avctx = fs->parent;
AVFilterLink *outlink = avctx->outputs[0];
OverlayOpenCLContext *ctx = avctx->priv;
AVFrame *input_main, *input_overlay;
AVFrame *output;
cl_mem mem;
cl_int cle, x, y;
size_t global_wo... | true | FFmpeg | 9b4611a1c1f2ac5d1bfd75f7e6e41aa0bc15ca39 | static int overlay_opencl_blend(FFFrameSync *fs)
{
AVFilterContext *avctx = fs->parent;
AVFilterLink *outlink = avctx->outputs[0];
OverlayOpenCLContext *ctx = avctx->priv;
AVFrame *input_main, *input_overlay;
AVFrame *output;
cl_mem mem;
cl_int cle, x, y;
size_t global_wo... | {
"code": [],
"line_no": []
} | static int FUNC_0(FFFrameSync *VAR_0)
{
AVFilterContext *avctx = VAR_0->parent;
AVFilterLink *outlink = avctx->outputs[0];
OverlayOpenCLContext *ctx = avctx->priv;
AVFrame *input_main, *input_overlay;
AVFrame *output;
cl_mem mem;
cl_int cle, x, y;
size_t global_work[2];
... | [
"static int FUNC_0(FFFrameSync *VAR_0)\n{",
"AVFilterContext *avctx = VAR_0->parent;",
"AVFilterLink *outlink = avctx->outputs[0];",
"OverlayOpenCLContext *ctx = avctx->priv;",
"AVFrame *input_main, *input_overlay;",
"AVFrame *output;",
"cl_mem mem;",
"cl_int cle, x, y;",
"size_t global_work[... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
41
],
[
43,
45
],
[
47,
49
... |
5,432 | static int oggvorbis_encode_frame(AVCodecContext *avccontext,
unsigned char *packets,
int buf_size, void *data)
{
OggVorbisContext *context = avccontext->priv_data ;
float **buffer ;
ogg_packet op ;
signed char *audio = data ;
int l, samples = OGGVORBIS_FRAME_SIZE ;
buffer... | false | FFmpeg | 3f4993f19b609180ff0f92486ea8bbac9e531db2 | static int oggvorbis_encode_frame(AVCodecContext *avccontext,
unsigned char *packets,
int buf_size, void *data)
{
OggVorbisContext *context = avccontext->priv_data ;
float **buffer ;
ogg_packet op ;
signed char *audio = data ;
int l, samples = OGGVORBIS_FRAME_SIZE ;
buffer... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
unsigned char *VAR_1,
int VAR_2, void *VAR_3)
{
OggVorbisContext *context = VAR_0->priv_data ;
float **VAR_4 ;
ogg_packet op ;
signed char *VAR_5 = VAR_3 ;
int VAR_6, VAR_7 = OGGVORBIS_FRAME_SIZE ;
VAR_4 = vorbis_analysis_buffer(&co... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nunsigned char *VAR_1,\nint VAR_2, void *VAR_3)\n{",
"OggVorbisContext *context = VAR_0->priv_data ;",
"float **VAR_4 ;",
"ogg_packet op ;",
"signed char *VAR_5 = VAR_3 ;",
"int VAR_6, VAR_7 = OGGVORBIS_FRAME_SIZE ;",
"VAR_4 = vorbis_analysis_buffer(&context->vd... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
45
],
[
49
],
[
51
... |
5,433 | static int mpegps_read_header(AVFormatContext *s)
{
MpegDemuxContext *m = s->priv_data;
char buffer[7];
int64_t last_pos = avio_tell(s->pb);
m->header_state = 0xff;
s->ctx_flags |= AVFMTCTX_NOHEADER;
avio_get_str(s->pb, 6, buffer, sizeof(buffer));
if (!memcmp("IMKH", buffer, 4)... | false | FFmpeg | a5c1c7a8b3d13c86b453558628951c3f52054ab4 | static int mpegps_read_header(AVFormatContext *s)
{
MpegDemuxContext *m = s->priv_data;
char buffer[7];
int64_t last_pos = avio_tell(s->pb);
m->header_state = 0xff;
s->ctx_flags |= AVFMTCTX_NOHEADER;
avio_get_str(s->pb, 6, buffer, sizeof(buffer));
if (!memcmp("IMKH", buffer, 4)... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
MpegDemuxContext *m = VAR_0->priv_data;
char VAR_1[7];
int64_t last_pos = avio_tell(VAR_0->pb);
m->header_state = 0xff;
VAR_0->ctx_flags |= AVFMTCTX_NOHEADER;
avio_get_str(VAR_0->pb, 6, VAR_1, sizeof(VAR_1));
if (!memcmp("IMKH", VAR_1... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"MpegDemuxContext *m = VAR_0->priv_data;",
"char VAR_1[7];",
"int64_t last_pos = avio_tell(VAR_0->pb);",
"m->header_state = 0xff;",
"VAR_0->ctx_flags |= AVFMTCTX_NOHEADER;",
"avio_get_str(VAR_0->pb, 6, VAR_1, sizeof(VAR_1));",
"if (!memcmp(\"IMKH\", VA... | [
0,
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
],
[
37
],
[
39
]
] |
5,434 | static int read_access_unit(AVCodecContext *avctx, void* data,
int *got_frame_ptr, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
MLPDecodeContext *m = avctx->priv_data;
GetBitContext gb;
unsigned int length, substr;
unsigned ... | true | FFmpeg | f7bea731d955ec25a726abcd31862d3bd0183d58 | static int read_access_unit(AVCodecContext *avctx, void* data,
int *got_frame_ptr, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
MLPDecodeContext *m = avctx->priv_data;
GetBitContext gb;
unsigned int length, substr;
unsigned ... | {
"code": [
" return 0;"
],
"line_no": [
35
]
} | static int FUNC_0(AVCodecContext *VAR_0, void* VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
MLPDecodeContext *m = VAR_0->priv_data;
GetBitContext gb;
unsigned int VAR_6, VAR_7;
unsigned int VAR_8;
uns... | [
"static int FUNC_0(AVCodecContext *VAR_0, void* VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"MLPDecodeContext *m = VAR_0->priv_data;",
"GetBitContext gb;",
"unsigned int VAR_6, VAR_7;",
"unsigned int VAR_8;",
"unsigned int VAR_9 = 4;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33,
35
],
[
39
],
[
43,
45
],
[
49
],
[
53
],
[... |
5,435 | static int ipmi_register_netfn(IPMIBmcSim *s, unsigned int netfn,
const IPMINetfn *netfnd)
{
if ((netfn & 1) || (netfn > MAX_NETFNS) || (s->netfns[netfn / 2])) {
return -1;
}
s->netfns[netfn / 2] = netfnd;
return 0;
}
| true | qemu | 93a5364620dbfcf3cc13866d0e218fc3624c1edf | static int ipmi_register_netfn(IPMIBmcSim *s, unsigned int netfn,
const IPMINetfn *netfnd)
{
if ((netfn & 1) || (netfn > MAX_NETFNS) || (s->netfns[netfn / 2])) {
return -1;
}
s->netfns[netfn / 2] = netfnd;
return 0;
}
| {
"code": [
" if ((netfn & 1) || (netfn > MAX_NETFNS) || (s->netfns[netfn / 2])) {"
],
"line_no": [
7
]
} | static int FUNC_0(IPMIBmcSim *VAR_0, unsigned int VAR_1,
const IPMINetfn *VAR_2)
{
if ((VAR_1 & 1) || (VAR_1 > MAX_NETFNS) || (VAR_0->netfns[VAR_1 / 2])) {
return -1;
}
VAR_0->netfns[VAR_1 / 2] = VAR_2;
return 0;
}
| [
"static int FUNC_0(IPMIBmcSim *VAR_0, unsigned int VAR_1,\nconst IPMINetfn *VAR_2)\n{",
"if ((VAR_1 & 1) || (VAR_1 > MAX_NETFNS) || (VAR_0->netfns[VAR_1 / 2])) {",
"return -1;",
"}",
"VAR_0->netfns[VAR_1 / 2] = VAR_2;",
"return 0;",
"}"
] | [
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
5,436 | static int nbd_establish_connection(BlockDriverState *bs)
{
BDRVNBDState *s = bs->opaque;
int sock;
int ret;
off_t size;
size_t blocksize;
if (s->host_spec[0] == '/') {
sock = unix_socket_outgoing(s->host_spec);
} else {
sock = tcp_socket_outgoing_spec(s->host_spe... | true | qemu | b3adf53a3a10a1ca8347167907e4cf8bbd0204f1 | static int nbd_establish_connection(BlockDriverState *bs)
{
BDRVNBDState *s = bs->opaque;
int sock;
int ret;
off_t size;
size_t blocksize;
if (s->host_spec[0] == '/') {
sock = unix_socket_outgoing(s->host_spec);
} else {
sock = tcp_socket_outgoing_spec(s->host_spe... | {
"code": [
" qemu_aio_set_fd_handler(s->sock, nbd_reply_ready, NULL,"
],
"line_no": [
65
]
} | static int FUNC_0(BlockDriverState *VAR_0)
{
BDRVNBDState *s = VAR_0->opaque;
int VAR_1;
int VAR_2;
off_t size;
size_t blocksize;
if (s->host_spec[0] == '/') {
VAR_1 = unix_socket_outgoing(s->host_spec);
} else {
VAR_1 = tcp_socket_outgoing_spec(s->host_spec);
... | [
"static int FUNC_0(BlockDriverState *VAR_0)\n{",
"BDRVNBDState *s = VAR_0->opaque;",
"int VAR_1;",
"int VAR_2;",
"off_t size;",
"size_t blocksize;",
"if (s->host_spec[0] == '/') {",
"VAR_1 = unix_socket_outgoing(s->host_spec);",
"} else {",
"VAR_1 = tcp_socket_outgoing_spec(s->host_spec);",
"}",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
31
],
[
33
],
[
35
],
[
37
],
[
43,
45
],
[
47
],
[
49
],
[
51
],
[... |
5,438 | void memory_region_destroy(MemoryRegion *mr)
{
assert(QTAILQ_EMPTY(&mr->subregions));
mr->destructor(mr);
memory_region_clear_coalescing(mr);
g_free((char *)mr->name);
g_free(mr->ioeventfds);
} | true | qemu | 2be0e25f4b6a4f91e39388cc365bbe53b56ab62a | void memory_region_destroy(MemoryRegion *mr)
{
assert(QTAILQ_EMPTY(&mr->subregions));
mr->destructor(mr);
memory_region_clear_coalescing(mr);
g_free((char *)mr->name);
g_free(mr->ioeventfds);
} | {
"code": [],
"line_no": []
} | void FUNC_0(MemoryRegion *VAR_0)
{
assert(QTAILQ_EMPTY(&VAR_0->subregions));
VAR_0->destructor(VAR_0);
memory_region_clear_coalescing(VAR_0);
g_free((char *)VAR_0->name);
g_free(VAR_0->ioeventfds);
} | [
"void FUNC_0(MemoryRegion *VAR_0)\n{",
"assert(QTAILQ_EMPTY(&VAR_0->subregions));",
"VAR_0->destructor(VAR_0);",
"memory_region_clear_coalescing(VAR_0);",
"g_free((char *)VAR_0->name);",
"g_free(VAR_0->ioeventfds);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
8
],
[
10
],
[
12
],
[
14
],
[
16
]
] |
5,440 | static av_cold int aac_decode_init(AVCodecContext * avccontext) {
AACContext * ac = avccontext->priv_data;
int i;
ac->avccontext = avccontext;
if (avccontext->extradata_size <= 0 ||
decode_audio_specific_config(ac, avccontext->extradata, avccontext->extradata_size))
return -1;
... | false | FFmpeg | 158b39126d59f07069e0da07e0658111967c6179 | static av_cold int aac_decode_init(AVCodecContext * avccontext) {
AACContext * ac = avccontext->priv_data;
int i;
ac->avccontext = avccontext;
if (avccontext->extradata_size <= 0 ||
decode_audio_specific_config(ac, avccontext->extradata, avccontext->extradata_size))
return -1;
... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext * avccontext) {
AACContext * ac = avccontext->priv_data;
int VAR_0;
ac->avccontext = avccontext;
if (avccontext->extradata_size <= 0 ||
decode_audio_specific_config(ac, avccontext->extradata, avccontext->extradata_size))
return -1;
... | [
"static av_cold int FUNC_0(AVCodecContext * avccontext) {",
"AACContext * ac = avccontext->priv_data;",
"int VAR_0;",
"ac->avccontext = avccontext;",
"if (avccontext->extradata_size <= 0 ||\ndecode_audio_specific_config(ac, avccontext->extradata, avccontext->extradata_size))\nreturn -1;",
"avccontext->sam... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
13,
15,
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
... |
5,441 | static void read_info_chunk(AVFormatContext *s, int64_t size)
{
AVIOContext *pb = s->pb;
unsigned int i;
unsigned int nb_entries = avio_rb32(pb);
for (i = 0; i < nb_entries; i++) {
char key[32];
char value[1024];
avio_get_str(pb, INT_MAX, key, sizeof(key));
avio_... | false | FFmpeg | 90b2f3136778311fb5e097b8ee1f527518231c23 | static void read_info_chunk(AVFormatContext *s, int64_t size)
{
AVIOContext *pb = s->pb;
unsigned int i;
unsigned int nb_entries = avio_rb32(pb);
for (i = 0; i < nb_entries; i++) {
char key[32];
char value[1024];
avio_get_str(pb, INT_MAX, key, sizeof(key));
avio_... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVFormatContext *VAR_0, int64_t VAR_1)
{
AVIOContext *pb = VAR_0->pb;
unsigned int VAR_2;
unsigned int VAR_3 = avio_rb32(pb);
for (VAR_2 = 0; VAR_2 < VAR_3; VAR_2++) {
char VAR_4[32];
char VAR_5[1024];
avio_get_str(pb, INT_MAX, VAR_4, sizeof(VAR_4));
... | [
"static void FUNC_0(AVFormatContext *VAR_0, int64_t VAR_1)\n{",
"AVIOContext *pb = VAR_0->pb;",
"unsigned int VAR_2;",
"unsigned int VAR_3 = avio_rb32(pb);",
"for (VAR_2 = 0; VAR_2 < VAR_3; VAR_2++) {",
"char VAR_4[32];",
"char VAR_5[1024];",
"avio_get_str(pb, INT_MAX, VAR_4, sizeof(VAR_4));",
"avio... | [
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
]
] |
5,442 | static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int64_t *pkt_pts, int64_t *pkt_dts)
{
AVFrame *decoded_frame, *filtered_frame = NULL;
void *buffer_to_free = NULL;
int i, ret = 0;
float quality = 0;
#if CONFIG_AVFILTER
int frame_available = 1;
#endif
int dura... | false | FFmpeg | f2f8632aa5584438a09983b64c67908a96f029b9 | static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int64_t *pkt_pts, int64_t *pkt_dts)
{
AVFrame *decoded_frame, *filtered_frame = NULL;
void *buffer_to_free = NULL;
int i, ret = 0;
float quality = 0;
#if CONFIG_AVFILTER
int frame_available = 1;
#endif
int dura... | {
"code": [],
"line_no": []
} | static int FUNC_0(InputStream *VAR_0, AVPacket *VAR_1, int *VAR_2, int64_t *VAR_3, int64_t *VAR_4)
{
AVFrame *decoded_frame, *filtered_frame = NULL;
void *VAR_5 = NULL;
int VAR_6, VAR_7 = 0;
float VAR_8 = 0;
#if CONFIG_AVFILTER
int frame_available = 1;
#endif
int VAR_9=0;
int64_t *... | [
"static int FUNC_0(InputStream *VAR_0, AVPacket *VAR_1, int *VAR_2, int64_t *VAR_3, int64_t *VAR_4)\n{",
"AVFrame *decoded_frame, *filtered_frame = NULL;",
"void *VAR_5 = NULL;",
"int VAR_6, VAR_7 = 0;",
"float VAR_8 = 0;",
"#if CONFIG_AVFILTER\nint frame_available = 1;",
"#endif\nint VAR_9=0;",
"int6... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
45
],
[
47
],
[
49
... |
5,443 | static int mov_read_stps(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
MOVStreamContext *sc;
unsigned i, entries;
if (c->fc->nb_streams < 1)
return 0;
st = c->fc->streams[c->fc->nb_streams-1];
sc = st->priv_data;
avio_rb32(pb); // version + flags
e... | false | FFmpeg | 9888ffb1ce5e0a17f711b01933d504c72ea29d3b | static int mov_read_stps(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
MOVStreamContext *sc;
unsigned i, entries;
if (c->fc->nb_streams < 1)
return 0;
st = c->fc->streams[c->fc->nb_streams-1];
sc = st->priv_data;
avio_rb32(pb);
entries = avio_rb32... | {
"code": [],
"line_no": []
} | static int FUNC_0(MOVContext *VAR_0, AVIOContext *VAR_1, MOVAtom VAR_2)
{
AVStream *st;
MOVStreamContext *sc;
unsigned VAR_3, VAR_4;
if (VAR_0->fc->nb_streams < 1)
return 0;
st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1];
sc = st->priv_data;
avio_rb32(VAR_1);
V... | [
"static int FUNC_0(MOVContext *VAR_0, AVIOContext *VAR_1, MOVAtom VAR_2)\n{",
"AVStream *st;",
"MOVStreamContext *sc;",
"unsigned VAR_3, VAR_4;",
"if (VAR_0->fc->nb_streams < 1)\nreturn 0;",
"st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1];",
"sc = st->priv_data;",
"avio_rb32(VAR_1);",
"VAR_4 = avi... | [
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
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
43
],
[
45
],
[
49
],
[
53
],
[
55
]
] |
5,444 | static int decode_frame(AVCodecContext * avctx,
void *data, int *data_size,
uint8_t * buf, int buf_size)
{
MPADecodeContext *s = avctx->priv_data;
uint32_t header;
uint8_t *buf_ptr;
int len, out_size;
OUT_INT *out_samples = data;
buf_ptr = buf;
while (buf_size > 0) {
len ... | false | FFmpeg | 02af2269c03ed4a17b81247eff11b0d5bb1e9085 | static int decode_frame(AVCodecContext * avctx,
void *data, int *data_size,
uint8_t * buf, int buf_size)
{
MPADecodeContext *s = avctx->priv_data;
uint32_t header;
uint8_t *buf_ptr;
int len, out_size;
OUT_INT *out_samples = data;
buf_ptr = buf;
while (buf_size > 0) {
len ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext * VAR_0,
void *VAR_1, int *VAR_2,
uint8_t * VAR_3, int VAR_4)
{
MPADecodeContext *s = VAR_0->priv_data;
uint32_t header;
uint8_t *buf_ptr;
int VAR_5, VAR_6;
OUT_INT *out_samples = VAR_1;
buf_ptr = VAR_3;
while (VAR_4 > 0) {
VAR_5 = s->inbu... | [
"static int FUNC_0(AVCodecContext * VAR_0,\nvoid *VAR_1, int *VAR_2,\nuint8_t * VAR_3, int VAR_4)\n{",
"MPADecodeContext *s = VAR_0->priv_data;",
"uint32_t header;",
"uint8_t *buf_ptr;",
"int VAR_5, VAR_6;",
"OUT_INT *out_samples = VAR_1;",
"buf_ptr = VAR_3;",
"while (VAR_4 > 0) {",
"VAR_5 = s->inbu... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
5,445 | static av_cold void rv34_init_tables(void)
{
int i, j, k;
for(i = 0; i < NUM_INTRA_TABLES; i++){
for(j = 0; j < 2; j++){
rv34_gen_vlc(rv34_table_intra_cbppat [i][j], CBPPAT_VLC_SIZE, &intra_vlcs[i].cbppattern[j], NULL, 19*i + 0 + j);
rv34_gen_vlc(rv34_table_intra_... | false | FFmpeg | 3df18b3ed1177037892ce5b3db113d52dcdcdbf3 | static av_cold void rv34_init_tables(void)
{
int i, j, k;
for(i = 0; i < NUM_INTRA_TABLES; i++){
for(j = 0; j < 2; j++){
rv34_gen_vlc(rv34_table_intra_cbppat [i][j], CBPPAT_VLC_SIZE, &intra_vlcs[i].cbppattern[j], NULL, 19*i + 0 + j);
rv34_gen_vlc(rv34_table_intra_... | {
"code": [],
"line_no": []
} | static av_cold void FUNC_0(void)
{
int VAR_0, VAR_1, VAR_2;
for(VAR_0 = 0; VAR_0 < NUM_INTRA_TABLES; VAR_0++){
for(VAR_1 = 0; VAR_1 < 2; VAR_1++){
rv34_gen_vlc(rv34_table_intra_cbppat [VAR_0][VAR_1], CBPPAT_VLC_SIZE, &intra_vlcs[VAR_0].cbppattern[VAR_1], NULL, 19*VAR_0 + 0 + V... | [
"static av_cold void FUNC_0(void)\n{",
"int VAR_0, VAR_1, VAR_2;",
"for(VAR_0 = 0; VAR_0 < NUM_INTRA_TABLES; VAR_0++){",
"for(VAR_1 = 0; VAR_1 < 2; VAR_1++){",
"rv34_gen_vlc(rv34_table_intra_cbppat [VAR_0][VAR_1], CBPPAT_VLC_SIZE, &intra_vlcs[VAR_0].cbppattern[VAR_1], NULL, 19*VAR_0 + 0 + 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
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.