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
17,333
static void test_validate_fail_struct(TestInputVisitorData *data, const void *unused) { TestStruct *p = NULL; Error *err = NULL; Visitor *v; v = validate_test_init(data, "{ 'integer': -42, 'boolean': true, 'string': 'foo', 'extra': 42 }"); visit_type...
true
qemu
a12a5a1a0132527afe87c079e4aae4aad372bd94
static void test_validate_fail_struct(TestInputVisitorData *data, const void *unused) { TestStruct *p = NULL; Error *err = NULL; Visitor *v; v = validate_test_init(data, "{ 'integer': -42, 'boolean': true, 'string': 'foo', 'extra': 42 }"); visit_type...
{ "code": [ " error_free(err);", " g_assert(err);", " error_free(err);", " g_assert(err);", " error_free(err);", " g_assert(err);", " error_free(err);", " g_assert(err);", " error_free(err);", " g_assert(err);", " error_free(err);", " ...
static void FUNC_0(TestInputVisitorData *VAR_0, const void *VAR_1) { TestStruct *p = NULL; Error *err = NULL; Visitor *v; v = validate_test_init(VAR_0, "{ 'integer': -42, 'boolean': true, 'string': 'foo', 'extra': 42 }"); visit_type_TestStruct(v, &p,...
[ "static void FUNC_0(TestInputVisitorData *VAR_0,\nconst void *VAR_1)\n{", "TestStruct *p = NULL;", "Error *err = NULL;", "Visitor *v;", "v = validate_test_init(VAR_0, \"{ 'integer': -42, 'boolean': true, 'string': 'foo', 'extra': 42 }\");", "visit_type_TestStruct(v, &p, NULL, &err);", "g_assert(err);", ...
[ 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ] ]
17,334
static int dv_read_header(AVFormatContext *s, AVFormatParameters *ap) { unsigned state; RawDVContext *c = s->priv_data; c->dv_demux = dv_init_demux(s); if (!c->dv_demux) return -1; state = get_be32(s->pb); while ((state & 0xffffff7f) != 0x1f07003f) ...
true
FFmpeg
d509c743b78da198af385fea362b632292cd00ad
static int dv_read_header(AVFormatContext *s, AVFormatParameters *ap) { unsigned state; RawDVContext *c = s->priv_data; c->dv_demux = dv_init_demux(s); if (!c->dv_demux) return -1; state = get_be32(s->pb); while ((state & 0xffffff7f) != 0x1f07003f) ...
{ "code": [ " c->dv_demux->sys = dv_frame_profile(c->buf);" ], "line_no": [ 49 ] }
static int FUNC_0(AVFormatContext *VAR_0, AVFormatParameters *VAR_1) { unsigned VAR_2; RawDVContext *c = VAR_0->priv_data; c->dv_demux = dv_init_demux(VAR_0); if (!c->dv_demux) return -1; VAR_2 = get_be32(VAR_0->pb); while ((VAR_2 & 0xffffff7f) != 0...
[ "static int FUNC_0(AVFormatContext *VAR_0,\nAVFormatParameters *VAR_1)\n{", "unsigned VAR_2;", "RawDVContext *c = VAR_0->priv_data;", "c->dv_demux = dv_init_demux(VAR_0);", "if (!c->dv_demux)\nreturn -1;", "VAR_2 = get_be32(VAR_0->pb);", "while ((VAR_2 & 0xffffff7f) != 0x1f07003f) {", "if (url_feof(VA...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15, 17 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 41, 43, 45 ], [ 49 ], [ 51 ], [ 53 ...
17,335
int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; MJpegDecodeContext *s = avctx->priv_data; const uint8_t *buf_end, *buf_ptr; ...
true
FFmpeg
643fd8a198ddb67225f5edd503f8f151d13635a3
int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; MJpegDecodeContext *s = avctx->priv_data; const uint8_t *buf_end, *buf_ptr; ...
{ "code": [], "line_no": [] }
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; MJpegDecodeContext *s = VAR_0->priv_data; const uint8_t *VAR_6, *buf_ptr; int VAR_7; AV...
[ "int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{", "const uint8_t *VAR_4 = VAR_3->VAR_1;", "int VAR_5 = VAR_3->size;", "MJpegDecodeContext *s = VAR_0->priv_data;", "const uint8_t *VAR_6, *buf_ptr;", "int VAR_7;", "AVFrame *picture = VAR_1;", "s->got_picture = 0;", "b...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 49, 51 ], [...
17,339
static int raw_write(BlockDriverState *bs, int64_t sector_num, const uint8_t *buf, int nb_sectors) { if (check_write_unsafe(bs, sector_num, buf, nb_sectors)) { int ret; ret = raw_write_scrubbed_bootsect(bs, buf); if (ret < 0) { return ret; }...
true
qemu
8b33d9eeba91422ee2d73b6936ad57262d18cf5a
static int raw_write(BlockDriverState *bs, int64_t sector_num, const uint8_t *buf, int nb_sectors) { if (check_write_unsafe(bs, sector_num, buf, nb_sectors)) { int ret; ret = raw_write_scrubbed_bootsect(bs, buf); if (ret < 0) { return ret; }...
{ "code": [ " if (check_write_unsafe(bs, sector_num, buf, nb_sectors)) {", " int ret;", " ret = raw_write_scrubbed_bootsect(bs, buf);", " if (ret < 0) {", " return ret;", " ret = bdrv_write(bs->file, 1, buf + 512, nb_sectors - 1);", " if (re...
static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1, const uint8_t *VAR_2, int VAR_3) { if (check_write_unsafe(VAR_0, VAR_1, VAR_2, VAR_3)) { int VAR_4; VAR_4 = raw_write_scrubbed_bootsect(VAR_0, VAR_2); if (VAR_4 < 0) { return VAR_4; }...
[ "static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,\nconst uint8_t *VAR_2, int VAR_3)\n{", "if (check_write_unsafe(VAR_0, VAR_1, VAR_2, VAR_3)) {", "int VAR_4;", "VAR_4 = raw_write_scrubbed_bootsect(VAR_0, VAR_2);", "if (VAR_4 < 0) {", "return VAR_4;", "}", "VAR_4 = bdrv_write(VAR_0->file, 1, V...
[ 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ], [ 39 ], [ 41 ] ]
17,340
void av_read_image_line(uint16_t *dst, const uint8_t *data[4], const int linesize[4], const AVPixFmtDescriptor *desc, int x, int y, int c, int w, int read_pal_component) { AVComponentDescriptor comp= desc->comp[c]; int plane= comp.plane; int depth= comp.depth_minus1+1; int ...
true
FFmpeg
9525243f59f0a13e099612b66f7ba5d5d5293c70
void av_read_image_line(uint16_t *dst, const uint8_t *data[4], const int linesize[4], const AVPixFmtDescriptor *desc, int x, int y, int c, int w, int read_pal_component) { AVComponentDescriptor comp= desc->comp[c]; int plane= comp.plane; int depth= comp.depth_minus1+1; int ...
{ "code": [ " int val = flags & PIX_FMT_BE ? AV_RB16(p) : AV_RL16(p);" ], "line_no": [ 59 ] }
void FUNC_0(uint16_t *VAR_0, const uint8_t *VAR_1[4], const int VAR_2[4], const AVPixFmtDescriptor *VAR_3, int VAR_4, int VAR_5, int VAR_6, int VAR_7, int VAR_8) { AVComponentDescriptor comp= VAR_3->comp[VAR_6]; int VAR_9= comp.VAR_9; int VAR_10= comp.depth_minus1+1; int VA...
[ "void FUNC_0(uint16_t *VAR_0, const uint8_t *VAR_1[4], const int VAR_2[4],\nconst AVPixFmtDescriptor *VAR_3, int VAR_4, int VAR_5, int VAR_6, int VAR_7, int VAR_8)\n{", "AVComponentDescriptor comp= VAR_3->comp[VAR_6];", "int VAR_9= comp.VAR_9;", "int VAR_10= comp.depth_minus1+1;", "int VAR_11 = (1<<VAR_10)-...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ], [ 37, 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ...
17,342
void set_system_io_map(MemoryRegion *mr) { memory_region_transaction_begin(); address_space_io.root = mr; memory_region_transaction_commit(); }
true
qemu
8786db7cb96f8ce5c75c6e1e074319c9dca8d356
void set_system_io_map(MemoryRegion *mr) { memory_region_transaction_begin(); address_space_io.root = mr; memory_region_transaction_commit(); }
{ "code": [ " memory_region_transaction_begin();", " address_space_io.root = mr;", " memory_region_transaction_commit();" ], "line_no": [ 5, 7, 9 ] }
void FUNC_0(MemoryRegion *VAR_0) { memory_region_transaction_begin(); address_space_io.root = VAR_0; memory_region_transaction_commit(); }
[ "void FUNC_0(MemoryRegion *VAR_0)\n{", "memory_region_transaction_begin();", "address_space_io.root = VAR_0;", "memory_region_transaction_commit();", "}" ]
[ 0, 1, 1, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ] ]
17,343
int attribute_align_arg av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags) { BufferSinkContext *buf = ctx->priv; AVFilterLink *inlink = ctx->inputs[0]; int ret; AVFrame *cur_frame; /* no picref available, fetch it from the filterchain */ if (!av_fifo_size(buf...
false
FFmpeg
807d4b635567e51108ea3a6a774336321c3250e5
int attribute_align_arg av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags) { BufferSinkContext *buf = ctx->priv; AVFilterLink *inlink = ctx->inputs[0]; int ret; AVFrame *cur_frame; if (!av_fifo_size(buf->fifo)) { if (inlink->closed) ret...
{ "code": [], "line_no": [] }
int VAR_0 av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags) { BufferSinkContext *buf = ctx->priv; AVFilterLink *inlink = ctx->inputs[0]; int ret; AVFrame *cur_frame; if (!av_fifo_size(buf->fifo)) { if (inlink->closed) return AVERROR_EO...
[ "int VAR_0 av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags)\n{", "BufferSinkContext *buf = ctx->priv;", "AVFilterLink *inlink = ctx->inputs[0];", "int ret;", "AVFrame *cur_frame;", "if (!av_fifo_size(buf->fifo)) {", "if (inlink->closed)\nreturn AVERROR_EOF;", "if (flags &...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 17 ], [ 19, 21 ], [ 23, 25 ], [ 27, 29 ], [ 31 ], [ 35, 37 ], [ 41 ], [ 43 ], [ 45, 47 ], [ 49 ], [ 51 ], [ 53 ], [...
17,344
static float wv_get_value_float(WavpackFrameContext *s, uint32_t *crc, int S) { union { float f; uint32_t u; } value; int sign; int exp = s->float_max_exp; if (s->got_extra_bits) { const int max_bits = 1 + 23 + 8 + 1; const int left_bits = get_bits_l...
true
FFmpeg
f604eab30a7ec33e6d803a4d320ca9b453bde836
static float wv_get_value_float(WavpackFrameContext *s, uint32_t *crc, int S) { union { float f; uint32_t u; } value; int sign; int exp = s->float_max_exp; if (s->got_extra_bits) { const int max_bits = 1 + 23 + 8 + 1; const int left_bits = get_bits_l...
{ "code": [ " int sign;" ], "line_no": [ 15 ] }
static float FUNC_0(WavpackFrameContext *VAR_0, uint32_t *VAR_1, int VAR_2) { union { float f; uint32_t u; } VAR_3; int VAR_4; int VAR_5 = VAR_0->float_max_exp; if (VAR_0->got_extra_bits) { const int VAR_6 = 1 + 23 + 8 + 1; const int VAR_7 = get_bits...
[ "static float FUNC_0(WavpackFrameContext *VAR_0, uint32_t *VAR_1, int VAR_2)\n{", "union {", "float f;", "uint32_t u;", "} VAR_3;", "int VAR_4;", "int VAR_5 = VAR_0->float_max_exp;", "if (VAR_0->got_extra_bits) {", "const int VAR_6 = 1 + 23 + 8 + 1;", "const int VAR_7 = get_bits_left(&VAR_0->g...
[ 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 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 29, 31 ], [ 33 ], [ 37 ], [ 39 ], [ 41 ], [ 43, 45 ], [ 47 ], [ 49, 51 ], [...
17,345
static gboolean ga_channel_open(GAChannel *c, const gchar *path, GAChannelMethod method) { int ret; c->method = method; switch (c->method) { case GA_CHANNEL_VIRTIO_SERIAL: { int fd = qemu_open(path, O_RDWR | O_NONBLOCK #ifndef CONFIG_SOLARIS | O_ASYNC #endif...
true
qemu
d4f4a3efdf0a71621ae5351176f5f15b522d0026
static gboolean ga_channel_open(GAChannel *c, const gchar *path, GAChannelMethod method) { int ret; c->method = method; switch (c->method) { case GA_CHANNEL_VIRTIO_SERIAL: { int fd = qemu_open(path, O_RDWR | O_NONBLOCK #ifndef CONFIG_SOLARIS | O_ASYNC #endif...
{ "code": [], "line_no": [] }
static gboolean FUNC_0(GAChannel *c, const gchar *path, GAChannelMethod method) { int VAR_0; c->method = method; switch (c->method) { case GA_CHANNEL_VIRTIO_SERIAL: { int VAR_3 = qemu_open(path, O_RDWR | O_NONBLOCK #ifndef CONFIG_SOLARIS | O_ASYNC #endif ...
[ "static gboolean FUNC_0(GAChannel *c, const gchar *path, GAChannelMethod method)\n{", "int VAR_0;", "c->method = method;", "switch (c->method) {", "case GA_CHANNEL_VIRTIO_SERIAL: {", "int VAR_3 = qemu_open(path, O_RDWR | O_NONBLOCK\n#ifndef CONFIG_SOLARIS\n| O_ASYNC\n#endif\n);", "if (VAR_3 == -1) {", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15, 17, 19, 21, 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33, 35 ], [ 37 ], [ 39, 41 ], [ 43 ], [ 45 ], [ 47, 49 ], ...
17,346
static void init_qxl_rom(PCIQXLDevice *d) { QXLRom *rom = memory_region_get_ram_ptr(&d->rom_bar); QXLModes *modes = (QXLModes *)(rom + 1); uint32_t ram_header_size; uint32_t surface0_area_size; uint32_t num_pages; uint32_t fb, maxfb = 0; int i; memset(rom, 0, d->rom_size); ...
true
qemu
13d1fd44c46629aad672f192abbf02238c6cbf36
static void init_qxl_rom(PCIQXLDevice *d) { QXLRom *rom = memory_region_get_ram_ptr(&d->rom_bar); QXLModes *modes = (QXLModes *)(rom + 1); uint32_t ram_header_size; uint32_t surface0_area_size; uint32_t num_pages; uint32_t fb, maxfb = 0; int i; memset(rom, 0, d->rom_size); ...
{ "code": [ " uint32_t fb, maxfb = 0;", " int i;", " modes->n_modes = cpu_to_le32(ARRAY_SIZE(qxl_modes));", " for (i = 0; i < modes->n_modes; i++) {", " if (maxfb < fb) {", " maxfb = fb;", " modes->modes[i].id = cpu_to_le32(i);", " ...
static void FUNC_0(PCIQXLDevice *VAR_0) { QXLRom *rom = memory_region_get_ram_ptr(&VAR_0->rom_bar); QXLModes *modes = (QXLModes *)(rom + 1); uint32_t ram_header_size; uint32_t surface0_area_size; uint32_t num_pages; uint32_t fb, maxfb = 0; int VAR_1; memset(rom, 0, VAR_0->rom_...
[ "static void FUNC_0(PCIQXLDevice *VAR_0)\n{", "QXLRom *rom = memory_region_get_ram_ptr(&VAR_0->rom_bar);", "QXLModes *modes = (QXLModes *)(rom + 1);", "uint32_t ram_header_size;", "uint32_t surface0_area_size;", "uint32_t num_pages;", "uint32_t fb, maxfb = 0;", "int VAR_1;", "memset(rom, 0, VAR_0->r...
[ 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 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 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 47 ], [ 49 ...
17,347
roundAndPackFloat128( flag zSign, int32 zExp, uint64_t zSig0, uint64_t zSig1, uint64_t zSig2 STATUS_PARAM) { int8 roundingMode; flag roundNearestEven, increment, isTiny; roundingMode = STATUS(float_rounding_mode); roundNearestEven = ( roundingMode == float_round_nearest_even ); increm...
true
qemu
e6afc87f804abee7d0479be5e8e31c56d885fafb
roundAndPackFloat128( flag zSign, int32 zExp, uint64_t zSig0, uint64_t zSig1, uint64_t zSig2 STATUS_PARAM) { int8 roundingMode; flag roundNearestEven, increment, isTiny; roundingMode = STATUS(float_rounding_mode); roundNearestEven = ( roundingMode == float_round_nearest_even ); increm...
{ "code": [ " if ( STATUS(flush_to_zero) ) return packFloat128( zSign, 0, 0, 0 );", " if ( STATUS(flush_to_zero) ) return packFloat128( zSign, 0, 0, 0 );" ], "line_no": [ 101, 101 ] }
FUNC_0( flag VAR_0, int32 VAR_1, uint64_t VAR_2, uint64_t VAR_3, uint64_t VAR_4 STATUS_PARAM) { int8 roundingMode; flag roundNearestEven, increment, isTiny; roundingMode = STATUS(float_rounding_mode); roundNearestEven = ( roundingMode == float_round_nearest_even ); increment = ( (int6...
[ "FUNC_0(\nflag VAR_0, int32 VAR_1, uint64_t VAR_2, uint64_t VAR_3, uint64_t VAR_4 STATUS_PARAM)\n{", "int8 roundingMode;", "flag roundNearestEven, increment, isTiny;", "roundingMode = STATUS(float_rounding_mode);", "roundNearestEven = ( roundingMode == float_round_nearest_even );", "increment = ( (int64_t...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [...
17,348
static inline void RENAME(yvu9toyv12)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, unsigned int width, unsigned int height, int lumStride, int chromStride) { /* Y Plane */ memcpy(ydst, ysrc, width*height); /* XXX: implement upscaling for U,V */...
true
FFmpeg
7f526efd17973ec6d2204f7a47b6923e2be31363
static inline void RENAME(yvu9toyv12)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, unsigned int width, unsigned int height, int lumStride, int chromStride) { memcpy(ydst, ysrc, width*height); }
{ "code": [ "\tunsigned int width, unsigned int height, int lumStride, int chromStride)" ], "line_no": [ 5 ] }
static inline void FUNC_0(yvu9toyv12)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, unsigned int width, unsigned int height, int lumStride, int chromStride) { memcpy(ydst, ysrc, width*height); }
[ "static inline void FUNC_0(yvu9toyv12)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc,\nuint8_t *ydst, uint8_t *udst, uint8_t *vdst,\nunsigned int width, unsigned int height, int lumStride, int chromStride)\n{", "memcpy(ydst, ysrc, width*height);", "}" ]
[ 1, 0, 0 ]
[ [ 1, 3, 5, 7 ], [ 11 ], [ 17 ] ]
17,349
int ff_msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block, int n, int coded, const uint8_t *scan_table) { int level, i, last, run, run_diff; int dc_pred_dir; RLTable *rl; RL_VLC_ELEM *rl_vlc; int qmul, qadd; if (s->mb_intra) { qmul=1; ...
true
FFmpeg
a5037227501dc4f7528684beecee954360cbd7dd
int ff_msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block, int n, int coded, const uint8_t *scan_table) { int level, i, last, run, run_diff; int dc_pred_dir; RLTable *rl; RL_VLC_ELEM *rl_vlc; int qmul, qadd; if (s->mb_intra) { qmul=1; ...
{ "code": [ " int dc_pred_dir;" ], "line_no": [ 9 ] }
int FUNC_0(MpegEncContext * VAR_0, DCTELEM * VAR_1, int VAR_2, int VAR_3, const uint8_t *VAR_4) { int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9; int VAR_10; RLTable *rl; RL_VLC_ELEM *rl_vlc; int VAR_11, VAR_12; if (VAR_0->mb_intra) { VAR_11=1; VA...
[ "int FUNC_0(MpegEncContext * VAR_0, DCTELEM * VAR_1,\nint VAR_2, int VAR_3, const uint8_t *VAR_4)\n{", "int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;", "int VAR_10;", "RLTable *rl;", "RL_VLC_ELEM *rl_vlc;", "int VAR_11, VAR_12;", "if (VAR_0->mb_intra) {", "VAR_11=1;", "VAR_12=0;", "VAR_5 = msmpeg4_decode...
[ 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 21 ], [ 23 ], [ 29 ], [ 33 ], [ 35, 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49, 51 ], [...
17,351
static void sub2video_copy_rect(uint8_t *dst, int dst_linesize, int w, int h, AVSubtitleRect *r) { uint32_t *pal, *dst2; uint8_t *src, *src2; int x, y; if (r->type != SUBTITLE_BITMAP) { av_log(NULL, AV_LOG_WARNING, "sub2video: non-bitmap subtitle\n"); ...
true
FFmpeg
0ac83047f67bb56406c66d4ca664d3c0cb07c2f2
static void sub2video_copy_rect(uint8_t *dst, int dst_linesize, int w, int h, AVSubtitleRect *r) { uint32_t *pal, *dst2; uint8_t *src, *src2; int x, y; if (r->type != SUBTITLE_BITMAP) { av_log(NULL, AV_LOG_WARNING, "sub2video: non-bitmap subtitle\n"); ...
{ "code": [ " av_log(NULL, AV_LOG_WARNING, \"sub2video: rectangle overflowing\\n\");" ], "line_no": [ 25 ] }
static void FUNC_0(uint8_t *VAR_0, int VAR_1, int VAR_2, int VAR_3, AVSubtitleRect *VAR_4) { uint32_t *pal, *dst2; uint8_t *src, *src2; int VAR_5, VAR_6; if (VAR_4->type != SUBTITLE_BITMAP) { av_log(NULL, AV_LOG_WARNING, "sub2video: non-bitmap subtitle\n"...
[ "static void FUNC_0(uint8_t *VAR_0, int VAR_1, int VAR_2, int VAR_3,\nAVSubtitleRect *VAR_4)\n{", "uint32_t *pal, *dst2;", "uint8_t *src, *src2;", "int VAR_5, VAR_6;", "if (VAR_4->type != SUBTITLE_BITMAP) {", "av_log(NULL, AV_LOG_WARNING, \"sub2video: non-bitmap subtitle\\n\");", "return;", "}", "if...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [...
17,352
SchroVideoFormatEnum ff_get_schro_video_format_preset(AVCodecContext *avctx) { unsigned int num_formats = sizeof(ff_schro_video_formats) / sizeof(ff_schro_video_formats[0]); unsigned int idx = get_video_format_idx(avctx); return (idx < num_formats) ? ff_schro_video_fo...
true
FFmpeg
220b24c7c97dc033ceab1510549f66d0e7b52ef1
SchroVideoFormatEnum ff_get_schro_video_format_preset(AVCodecContext *avctx) { unsigned int num_formats = sizeof(ff_schro_video_formats) / sizeof(ff_schro_video_formats[0]); unsigned int idx = get_video_format_idx(avctx); return (idx < num_formats) ? ff_schro_video_fo...
{ "code": [ "SchroVideoFormatEnum ff_get_schro_video_format_preset(AVCodecContext *avctx)", " unsigned int num_formats = sizeof(ff_schro_video_formats) /", " sizeof(ff_schro_video_formats[0]);", " unsigned int idx = get_video_format_idx(avctx);", " return (id...
SchroVideoFormatEnum FUNC_0(AVCodecContext *avctx) { unsigned int VAR_0 = sizeof(ff_schro_video_formats) / sizeof(ff_schro_video_formats[0]); unsigned int VAR_1 = get_video_format_idx(avctx); return (VAR_1 < VAR_0) ? ff_schro_video_formats[VAR_1] : ...
[ "SchroVideoFormatEnum FUNC_0(AVCodecContext *avctx)\n{", "unsigned int VAR_0 = sizeof(ff_schro_video_formats) /\nsizeof(ff_schro_video_formats[0]);", "unsigned int VAR_1 = get_video_format_idx(avctx);", "return (VAR_1 < VAR_0) ? ff_schro_video_formats[VAR_1] :\nSCHRO_VIDEO_FORMAT_CUSTOM;", "}" ]
[ 1, 1, 1, 1, 0 ]
[ [ 1, 3 ], [ 5, 7 ], [ 11 ], [ 15, 17 ], [ 19 ] ]
17,354
void qemu_console_copy(QemuConsole *con, int src_x, int src_y, int dst_x, int dst_y, int w, int h) { assert(con->console_type == GRAPHIC_CONSOLE); dpy_gfx_copy(con, src_x, src_y, dst_x, dst_y, w, h); }
true
qemu
50628d3479e4f9aa97e323506856e394fe7ad7a6
void qemu_console_copy(QemuConsole *con, int src_x, int src_y, int dst_x, int dst_y, int w, int h) { assert(con->console_type == GRAPHIC_CONSOLE); dpy_gfx_copy(con, src_x, src_y, dst_x, dst_y, w, h); }
{ "code": [ "void qemu_console_copy(QemuConsole *con, int src_x, int src_y,", "void qemu_console_copy(QemuConsole *con, int src_x, int src_y,", " int dst_x, int dst_y, int w, int h)", " assert(con->console_type == GRAPHIC_CONSOLE);", " dpy_gfx_copy(con, src_x, src_y, ds...
void FUNC_0(QemuConsole *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4, int VAR_5, int VAR_6) { assert(VAR_0->console_type == GRAPHIC_CONSOLE); dpy_gfx_copy(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6); }
[ "void FUNC_0(QemuConsole *VAR_0, int VAR_1, int VAR_2,\nint VAR_3, int VAR_4, int VAR_5, int VAR_6)\n{", "assert(VAR_0->console_type == GRAPHIC_CONSOLE);", "dpy_gfx_copy(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6);", "}" ]
[ 1, 1, 1, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ] ]
17,356
static int aac_adtstoasc_init(AVBSFContext *ctx) { av_freep(&ctx->par_out->extradata); ctx->par_out->extradata_size = 0; return 0; }
false
FFmpeg
45d199d5b0b7f09eb9baa29929a3bd07ed46223b
static int aac_adtstoasc_init(AVBSFContext *ctx) { av_freep(&ctx->par_out->extradata); ctx->par_out->extradata_size = 0; return 0; }
{ "code": [], "line_no": [] }
static int FUNC_0(AVBSFContext *VAR_0) { av_freep(&VAR_0->par_out->extradata); VAR_0->par_out->extradata_size = 0; return 0; }
[ "static int FUNC_0(AVBSFContext *VAR_0)\n{", "av_freep(&VAR_0->par_out->extradata);", "VAR_0->par_out->extradata_size = 0;", "return 0;", "}" ]
[ 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ] ]
17,359
static int dmg_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { BDRVDMGState *s = bs->opaque; uint64_t info_begin, info_end, last_in_offset, last_out_offset; uint32_t count, tmp; uint32_t max_compressed_size = 1, max_sectors_per_chunk = 1, i; int64_t o...
true
qemu
fa8354bd226617e2afcc45c27a74959c15291cc0
static int dmg_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { BDRVDMGState *s = bs->opaque; uint64_t info_begin, info_end, last_in_offset, last_out_offset; uint32_t count, tmp; uint32_t max_compressed_size = 1, max_sectors_per_chunk = 1, i; int64_t o...
{ "code": [ " offset = bdrv_getlength(bs->file);", " offset -= 0x1d8;", " ret = read_uint64(bs, offset, &info_begin);" ], "line_no": [ 31, 41, 45 ] }
static int FUNC_0(BlockDriverState *VAR_0, QDict *VAR_1, int VAR_2, Error **VAR_3) { BDRVDMGState *s = VAR_0->opaque; uint64_t info_begin, info_end, last_in_offset, last_out_offset; uint32_t count, tmp; uint32_t max_compressed_size = 1, max_sectors_per_chunk = 1, i; int64_...
[ "static int FUNC_0(BlockDriverState *VAR_0, QDict *VAR_1, int VAR_2,\nError **VAR_3)\n{", "BDRVDMGState *s = VAR_0->opaque;", "uint64_t info_begin, info_end, last_in_offset, last_out_offset;", "uint32_t count, tmp;", "uint32_t max_compressed_size = 1, max_sectors_per_chunk = 1, i;", "int64_t offset;", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 45 ], [ 47 ], [ 49 ], [...
17,360
static int ea_read_header(AVFormatContext *s) { EaDemuxContext *ea = s->priv_data; AVStream *st; if (process_ea_header(s)<=0) return AVERROR(EIO); if (init_video_stream(s, &ea->video) || init_video_stream(s, &ea->alpha)) return AVERROR(ENOMEM); if (ea->audio_codec) { ...
true
FFmpeg
8812d047bc850ec0b6afec69ae2d716525b25128
static int ea_read_header(AVFormatContext *s) { EaDemuxContext *ea = s->priv_data; AVStream *st; if (process_ea_header(s)<=0) return AVERROR(EIO); if (init_video_stream(s, &ea->video) || init_video_stream(s, &ea->alpha)) return AVERROR(ENOMEM); if (ea->audio_codec) { ...
{ "code": [ " if (ea->bytes <= 0) {" ], "line_no": [ 49 ] }
static int FUNC_0(AVFormatContext *VAR_0) { EaDemuxContext *ea = VAR_0->priv_data; AVStream *st; if (process_ea_header(VAR_0)<=0) return AVERROR(EIO); if (init_video_stream(VAR_0, &ea->video) || init_video_stream(VAR_0, &ea->alpha)) return AVERROR(ENOMEM); if (ea->audio...
[ "static int FUNC_0(AVFormatContext *VAR_0)\n{", "EaDemuxContext *ea = VAR_0->priv_data;", "AVStream *st;", "if (process_ea_header(VAR_0)<=0)\nreturn AVERROR(EIO);", "if (init_video_stream(VAR_0, &ea->video) || init_video_stream(VAR_0, &ea->alpha))\nreturn AVERROR(ENOMEM);", "if (ea->audio_codec) {", "if...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11, 13 ], [ 17, 19 ], [ 23 ], [ 25 ], [ 27, 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39, 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51...
17,361
static void armv7m_bitband_init(void) { DeviceState *dev; dev = qdev_create(NULL, "ARM,bitband-memory"); qdev_prop_set_uint32(dev, "base", 0x20000000); qdev_init(dev); sysbus_mmio_map(sysbus_from_qdev(dev), 0, 0x22000000); dev = qdev_create(NULL, "ARM,bitband-memory"); qdev_prop_...
true
qemu
e23a1b33b53d25510320b26d9f154e19c6c99725
static void armv7m_bitband_init(void) { DeviceState *dev; dev = qdev_create(NULL, "ARM,bitband-memory"); qdev_prop_set_uint32(dev, "base", 0x20000000); qdev_init(dev); sysbus_mmio_map(sysbus_from_qdev(dev), 0, 0x22000000); dev = qdev_create(NULL, "ARM,bitband-memory"); qdev_prop_...
{ "code": [ " qdev_init(dev);", " qdev_init(dev);", " qdev_init(dev);", " qdev_init(dev);", " qdev_init(dev);", " qdev_init(dev);", " qdev_init(dev);", " qdev_init(dev);", " qdev_init(dev);", " qdev_init(dev);", " qdev_init(dev);", " ...
static void FUNC_0(void) { DeviceState *dev; dev = qdev_create(NULL, "ARM,bitband-memory"); qdev_prop_set_uint32(dev, "base", 0x20000000); qdev_init(dev); sysbus_mmio_map(sysbus_from_qdev(dev), 0, 0x22000000); dev = qdev_create(NULL, "ARM,bitband-memory"); qdev_prop_set_uint32(de...
[ "static void FUNC_0(void)\n{", "DeviceState *dev;", "dev = qdev_create(NULL, \"ARM,bitband-memory\");", "qdev_prop_set_uint32(dev, \"base\", 0x20000000);", "qdev_init(dev);", "sysbus_mmio_map(sysbus_from_qdev(dev), 0, 0x22000000);", "dev = qdev_create(NULL, \"ARM,bitband-memory\");", "qdev_prop_set_ui...
[ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ] ]
17,363
static void mpegts_write_section(MpegTSSection *s, uint8_t *buf, int len) { unsigned int crc; unsigned char packet[TS_PACKET_SIZE]; const unsigned char *buf_ptr; unsigned char *q; int first, b, len1, left; crc = av_bswap32(av_crc(av_crc_get_table(AV_CRC_32_IEEE), ...
true
FFmpeg
a566c952f905639456966413fee0b5701867ddcd
static void mpegts_write_section(MpegTSSection *s, uint8_t *buf, int len) { unsigned int crc; unsigned char packet[TS_PACKET_SIZE]; const unsigned char *buf_ptr; unsigned char *q; int first, b, len1, left; crc = av_bswap32(av_crc(av_crc_get_table(AV_CRC_32_IEEE), ...
{ "code": [], "line_no": [] }
static void FUNC_0(MpegTSSection *VAR_0, uint8_t *VAR_1, int VAR_2) { unsigned int VAR_3; unsigned char VAR_4[TS_PACKET_SIZE]; const unsigned char *VAR_5; unsigned char *VAR_6; int VAR_7, VAR_8, VAR_9, VAR_10; VAR_3 = av_bswap32(av_crc(av_crc_get_table(AV_CRC_32_IEEE), ...
[ "static void FUNC_0(MpegTSSection *VAR_0, uint8_t *VAR_1, int VAR_2)\n{", "unsigned int VAR_3;", "unsigned char VAR_4[TS_PACKET_SIZE];", "const unsigned char *VAR_5;", "unsigned char *VAR_6;", "int VAR_7, VAR_8, VAR_9, VAR_10;", "VAR_3 = av_bswap32(av_crc(av_crc_get_table(AV_CRC_32_IEEE),\n-1, VAR_1, 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 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17, 19 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47, 49 ], [ 51 ...
17,364
void address_space_init(AddressSpace *as, MemoryRegion *root, const char *name) { memory_region_transaction_begin(); as->root = root; as->current_map = g_new(FlatView, 1); flatview_init(as->current_map); as->ioeventfd_nb = 0; as->ioeventfds = NULL; QTAILQ_INSERT_TAIL(&address_spaces...
true
qemu
ac95190ea92f7625bb0065c2864321607b95c26b
void address_space_init(AddressSpace *as, MemoryRegion *root, const char *name) { memory_region_transaction_begin(); as->root = root; as->current_map = g_new(FlatView, 1); flatview_init(as->current_map); as->ioeventfd_nb = 0; as->ioeventfds = NULL; QTAILQ_INSERT_TAIL(&address_spaces...
{ "code": [], "line_no": [] }
void FUNC_0(AddressSpace *VAR_0, MemoryRegion *VAR_1, const char *VAR_2) { memory_region_transaction_begin(); VAR_0->VAR_1 = VAR_1; VAR_0->current_map = g_new(FlatView, 1); flatview_init(VAR_0->current_map); VAR_0->ioeventfd_nb = 0; VAR_0->ioeventfds = NULL; QTAILQ_INSERT_TAIL(&addr...
[ "void FUNC_0(AddressSpace *VAR_0, MemoryRegion *VAR_1, const char *VAR_2)\n{", "memory_region_transaction_begin();", "VAR_0->VAR_1 = VAR_1;", "VAR_0->current_map = g_new(FlatView, 1);", "flatview_init(VAR_0->current_map);", "VAR_0->ioeventfd_nb = 0;", "VAR_0->ioeventfds = NULL;", "QTAILQ_INSERT_TAIL(&...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 6 ], [ 8 ], [ 10 ], [ 12 ], [ 14 ], [ 16 ], [ 18 ], [ 20 ], [ 22 ], [ 24 ], [ 26 ], [ 28 ] ]
17,365
static gboolean fd_trampoline(GIOChannel *chan, GIOCondition cond, gpointer opaque) { IOTrampoline *tramp = opaque; if (tramp->opaque == NULL) { return FALSE; } if ((cond & G_IO_IN) && tramp->fd_read) { tramp->fd_read(tramp->opaque); } if ((cond & G_IO_OUT) && tram...
true
qemu
c82dc29a9112f34e0a51cad9a412cf6d9d05dfb2
static gboolean fd_trampoline(GIOChannel *chan, GIOCondition cond, gpointer opaque) { IOTrampoline *tramp = opaque; if (tramp->opaque == NULL) { return FALSE; } if ((cond & G_IO_IN) && tramp->fd_read) { tramp->fd_read(tramp->opaque); } if ((cond & G_IO_OUT) && tram...
{ "code": [ " if (tramp->opaque == NULL) {", " return FALSE;" ], "line_no": [ 9, 11 ] }
static gboolean FUNC_0(GIOChannel *chan, GIOCondition cond, gpointer opaque) { IOTrampoline *tramp = opaque; if (tramp->opaque == NULL) { return FALSE; } if ((cond & G_IO_IN) && tramp->fd_read) { tramp->fd_read(tramp->opaque); } if ((cond & G_IO_OUT) && tramp->fd_w...
[ "static gboolean FUNC_0(GIOChannel *chan, GIOCondition cond, gpointer opaque)\n{", "IOTrampoline *tramp = opaque;", "if (tramp->opaque == NULL) {", "return FALSE;", "}", "if ((cond & G_IO_IN) && tramp->fd_read) {", "tramp->fd_read(tramp->opaque);", "}", "if ((cond & G_IO_OUT) && tramp->fd_write) {",...
[ 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 19 ], [ 21 ], [ 25 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ] ]
17,366
static void test_flush_event_notifier(void) { EventNotifierTestData data = { .n = 0, .active = 10, .auto_set = true }; event_notifier_init(&data.e, false); aio_set_event_notifier(ctx, &data.e, event_ready_cb, event_active_cb); g_assert(aio_poll(ctx, false)); g_assert_cmpint(data.n, ==, 0); ...
true
qemu
24d1a6d9d5f5b3da868724dd3c6f56893e0693da
static void test_flush_event_notifier(void) { EventNotifierTestData data = { .n = 0, .active = 10, .auto_set = true }; event_notifier_init(&data.e, false); aio_set_event_notifier(ctx, &data.e, event_ready_cb, event_active_cb); g_assert(aio_poll(ctx, false)); g_assert_cmpint(data.n, ==, 0); ...
{ "code": [ " wait_for_aio();", " wait_for_aio();" ], "line_no": [ 31, 31 ] }
static void FUNC_0(void) { EventNotifierTestData data = { .n = 0, .active = 10, .auto_set = true }; event_notifier_init(&data.e, false); aio_set_event_notifier(ctx, &data.e, event_ready_cb, event_active_cb); g_assert(aio_poll(ctx, false)); g_assert_cmpint(data.n, ==, 0); g_assert_cmpint(d...
[ "static void FUNC_0(void)\n{", "EventNotifierTestData data = { .n = 0, .active = 10, .auto_set = true };", "event_notifier_init(&data.e, false);", "aio_set_event_notifier(ctx, &data.e, event_ready_cb, event_active_cb);", "g_assert(aio_poll(ctx, false));", "g_assert_cmpint(data.n, ==, 0);", "g_assert_cmp...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ...
17,368
static int protocol_client_auth_sasl_mechname(VncState *vs, uint8_t *data, size_t len) { char *mechname = malloc(len + 1); if (!mechname) { VNC_DEBUG("Out of memory reading mechname\n"); vnc_client_error(vs); } strncpy(mechname, (char*)data, len); mechname[len] = '\0'; V...
true
qemu
8ce7d35273352ebe19c871e6b32a52db77fa08c3
static int protocol_client_auth_sasl_mechname(VncState *vs, uint8_t *data, size_t len) { char *mechname = malloc(len + 1); if (!mechname) { VNC_DEBUG("Out of memory reading mechname\n"); vnc_client_error(vs); } strncpy(mechname, (char*)data, len); mechname[len] = '\0'; V...
{ "code": [ " vnc_client_error(vs);", " return -1;", " vnc_client_error(vs);", " return -1;", " vnc_client_error(vs);", " return -1;" ], "line_no": [ 33, 35, 33, 35, 33, 35 ] }
static int FUNC_0(VncState *VAR_0, uint8_t *VAR_1, size_t VAR_2) { char *VAR_3 = malloc(VAR_2 + 1); if (!VAR_3) { VNC_DEBUG("Out of memory reading VAR_3\n"); vnc_client_error(VAR_0); } strncpy(VAR_3, (char*)VAR_1, VAR_2); VAR_3[VAR_2] = '\0'; VNC_DEBUG("Got client VAR_3 ...
[ "static int FUNC_0(VncState *VAR_0, uint8_t *VAR_1, size_t VAR_2)\n{", "char *VAR_3 = malloc(VAR_2 + 1);", "if (!VAR_3) {", "VNC_DEBUG(\"Out of memory reading VAR_3\\n\");", "vnc_client_error(VAR_0);", "}", "strncpy(VAR_3, (char*)VAR_1, VAR_2);", "VAR_3[VAR_2] = '\\0';", "VNC_DEBUG(\"Got client VAR_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19, 21 ], [ 25 ], [ 27, 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ...
17,369
static void qxl_send_events(PCIQXLDevice *d, uint32_t events) { uint32_t old_pending; uint32_t le_events = cpu_to_le32(events); trace_qxl_send_events(d->id, events); assert(qemu_spice_display_is_running(&d->ssd)); old_pending = __sync_fetch_and_or(&d->ram->int_pending, le_events); if ((...
true
qemu
511aefb0c60e3063ead76d4ba6aabf619eed18ef
static void qxl_send_events(PCIQXLDevice *d, uint32_t events) { uint32_t old_pending; uint32_t le_events = cpu_to_le32(events); trace_qxl_send_events(d->id, events); assert(qemu_spice_display_is_running(&d->ssd)); old_pending = __sync_fetch_and_or(&d->ram->int_pending, le_events); if ((...
{ "code": [ " assert(qemu_spice_display_is_running(&d->ssd));" ], "line_no": [ 13 ] }
static void FUNC_0(PCIQXLDevice *VAR_0, uint32_t VAR_1) { uint32_t old_pending; uint32_t le_events = cpu_to_le32(VAR_1); trace_qxl_send_events(VAR_0->id, VAR_1); assert(qemu_spice_display_is_running(&VAR_0->ssd)); old_pending = __sync_fetch_and_or(&VAR_0->ram->int_pending, le_events); i...
[ "static void FUNC_0(PCIQXLDevice *VAR_0, uint32_t VAR_1)\n{", "uint32_t old_pending;", "uint32_t le_events = cpu_to_le32(VAR_1);", "trace_qxl_send_events(VAR_0->id, VAR_1);", "assert(qemu_spice_display_is_running(&VAR_0->ssd));", "old_pending = __sync_fetch_and_or(&VAR_0->ram->int_pending, le_events);", ...
[ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ] ]
17,371
static void decode_blocks(SnowContext *s){ int x, y; int w= s->b_width; int h= s->b_height; for(y=0; y<h; y++){ for(x=0; x<w; x++){ decode_q_branch(s, 0, x, y); } } }
true
FFmpeg
0af48e29f55a4e5824e6f7157ac94cf8b210aa84
static void decode_blocks(SnowContext *s){ int x, y; int w= s->b_width; int h= s->b_height; for(y=0; y<h; y++){ for(x=0; x<w; x++){ decode_q_branch(s, 0, x, y); } } }
{ "code": [ "static void decode_blocks(SnowContext *s){", " decode_q_branch(s, 0, x, y);" ], "line_no": [ 1, 15 ] }
static void FUNC_0(SnowContext *VAR_0){ int VAR_1, VAR_2; int VAR_3= VAR_0->b_width; int VAR_4= VAR_0->b_height; for(VAR_2=0; VAR_2<VAR_4; VAR_2++){ for(VAR_1=0; VAR_1<VAR_3; VAR_1++){ decode_q_branch(VAR_0, 0, VAR_1, VAR_2); } } }
[ "static void FUNC_0(SnowContext *VAR_0){", "int VAR_1, VAR_2;", "int VAR_3= VAR_0->b_width;", "int VAR_4= VAR_0->b_height;", "for(VAR_2=0; VAR_2<VAR_4; VAR_2++){", "for(VAR_1=0; VAR_1<VAR_3; VAR_1++){", "decode_q_branch(VAR_0, 0, VAR_1, VAR_2);", "}", "}", "}" ]
[ 1, 0, 0, 0, 0, 0, 1, 0, 0, 0 ]
[ [ 1 ], [ 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ] ]
17,372
static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) { VideoData *s = s1->priv_data; int ret, first_index, last_index; char buf[1024]; ByteIOContext pb1, *f = &pb1; AVStream *st; st = av_new_stream(s1, 0); if (!st) { av_free(s); return -ENOMEM; ...
true
FFmpeg
94ede53e57e5864a1f94cb5cae25cd0b142212ae
static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) { VideoData *s = s1->priv_data; int ret, first_index, last_index; char buf[1024]; ByteIOContext pb1, *f = &pb1; AVStream *st; st = av_new_stream(s1, 0); if (!st) { av_free(s); return -ENOMEM; ...
{ "code": [ " av_free(s);", " av_free(s);" ], "line_no": [ 21, 145 ] }
static int FUNC_0(AVFormatContext *VAR_0, AVFormatParameters *VAR_1) { VideoData *s = VAR_0->priv_data; int VAR_2, VAR_3, VAR_4; char VAR_5[1024]; ByteIOContext pb1, *f = &pb1; AVStream *st; st = av_new_stream(VAR_0, 0); if (!st) { av_free(s); return -ENOMEM; ...
[ "static int FUNC_0(AVFormatContext *VAR_0, AVFormatParameters *VAR_1)\n{", "VideoData *s = VAR_0->priv_data;", "int VAR_2, VAR_3, VAR_4;", "char VAR_5[1024];", "ByteIOContext pb1, *f = &pb1;", "AVStream *st;", "st = av_new_stream(VAR_0, 0);", "if (!st) {", "av_free(s);", "return -ENOMEM;", "}", ...
[ 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, 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 29, 31 ], [ 35 ], [ 37 ], [ 39 ], [ 45, 47 ], [ 49, 51 ], [ 55 ], [...
17,373
static void mpeg4_encode_gop_header(MpegEncContext *s) { int hours, minutes, seconds; int64_t time; put_bits(&s->pb, 16, 0); put_bits(&s->pb, 16, GOP_STARTCODE); time = s->current_picture_ptr->f.pts; if (s->reordered_input_picture[1]) time = FFMIN(time, s->reordered_input_pic...
true
FFmpeg
f6774f905fb3cfdc319523ac640be30b14c1bc55
static void mpeg4_encode_gop_header(MpegEncContext *s) { int hours, minutes, seconds; int64_t time; put_bits(&s->pb, 16, 0); put_bits(&s->pb, 16, GOP_STARTCODE); time = s->current_picture_ptr->f.pts; if (s->reordered_input_picture[1]) time = FFMIN(time, s->reordered_input_pic...
{ "code": [ " time = s->current_picture_ptr->f.pts;", " time = FFMIN(time, s->reordered_input_picture[1]->f.pts);" ], "line_no": [ 17, 21 ] }
static void FUNC_0(MpegEncContext *VAR_0) { int VAR_1, VAR_2, VAR_3; int64_t time; put_bits(&VAR_0->pb, 16, 0); put_bits(&VAR_0->pb, 16, GOP_STARTCODE); time = VAR_0->current_picture_ptr->f.pts; if (VAR_0->reordered_input_picture[1]) time = FFMIN(time, VAR_0->reordered_input_...
[ "static void FUNC_0(MpegEncContext *VAR_0)\n{", "int VAR_1, VAR_2, VAR_3;", "int64_t time;", "put_bits(&VAR_0->pb, 16, 0);", "put_bits(&VAR_0->pb, 16, GOP_STARTCODE);", "time = VAR_0->current_picture_ptr->f.pts;", "if (VAR_0->reordered_input_picture[1])\ntime = FFMIN(time, VAR_0->reordered_input_picture...
[ 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 17 ], [ 19, 21 ], [ 23 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 51 ], ...
17,374
static int av_encode(AVFormatContext **output_files, int nb_output_files, AVFormatContext **input_files, int nb_input_files, AVStreamMap *stream_maps, int nb_stream_maps) { int ret, i, j, k, n, nb_istreams = 0, nb_ostreams = 0...
false
FFmpeg
b51469a0c54b30079eecc4891cc050778f343683
static int av_encode(AVFormatContext **output_files, int nb_output_files, AVFormatContext **input_files, int nb_input_files, AVStreamMap *stream_maps, int nb_stream_maps) { int ret, i, j, k, n, nb_istreams = 0, nb_ostreams = 0...
{ "code": [], "line_no": [] }
static int FUNC_0(AVFormatContext **VAR_0, int VAR_1, AVFormatContext **VAR_2, int VAR_3, AVStreamMap *VAR_4, int VAR_5) { int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11 = 0, VAR_12 = 0; AVFormatContext *is, *os; AVC...
[ "static int FUNC_0(AVFormatContext **VAR_0,\nint VAR_1,\nAVFormatContext **VAR_2,\nint VAR_3,\nAVStreamMap *VAR_4, int VAR_5)\n{", "int VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11 = 0, VAR_12 = 0;", "AVFormatContext *is, *os;", "AVCodecContext *codec, *icodec;", "AVOutputStream *ost, **ost_table = NULL;", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3, 5, 7, 9, 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 31 ], [ 33, 35 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [...
17,377
static void vm_change_state_handler(void *opaque, int running, RunState state) { GICv3ITSState *s = (GICv3ITSState *)opaque; Error *err = NULL; int ret; if (running) { return; } ret = kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CTRL,...
true
qemu
8a7348b5d62d7ea16807e6bea54b448a0184bb0f
static void vm_change_state_handler(void *opaque, int running, RunState state) { GICv3ITSState *s = (GICv3ITSState *)opaque; Error *err = NULL; int ret; if (running) { return; } ret = kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CTRL,...
{ "code": [ " int ret;", " ret = kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CTRL,", " KVM_DEV_ARM_ITS_SAVE_TABLES, NULL, true, &err);", " if (ret < 0 && ret != -EFAULT) {", " abort();" ], "line_no": [ 11, 23, 25, 33, 35 ] ...
static void FUNC_0(void *VAR_0, int VAR_1, RunState VAR_2) { GICv3ITSState *s = (GICv3ITSState *)VAR_0; Error *err = NULL; int VAR_3; if (VAR_1) { return; } VAR_3 = kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CTRL, ...
[ "static void FUNC_0(void *VAR_0, int VAR_1,\nRunState VAR_2)\n{", "GICv3ITSState *s = (GICv3ITSState *)VAR_0;", "Error *err = NULL;", "int VAR_3;", "if (VAR_1) {", "return;", "}", "VAR_3 = kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CTRL,\nKVM_DEV_ARM_ITS_SAVE_TABLES, NULL, true, &err);", "if ...
[ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 23, 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ] ]
17,379
static uint8_t usb_linux_get_alt_setting(USBHostDevice *s, uint8_t configuration, uint8_t interface) { char device_name[64], line[1024]; int alt_setting; sprintf(device_name, "%d-%s:%d.%d", s->bus_num, s->port, (int)configuration, (int)interface); if (!usb_host_read_file(line,...
true
qemu
96dd9aac37d30f3425088f81523942e67b2d03ac
static uint8_t usb_linux_get_alt_setting(USBHostDevice *s, uint8_t configuration, uint8_t interface) { char device_name[64], line[1024]; int alt_setting; sprintf(device_name, "%d-%s:%d.%d", s->bus_num, s->port, (int)configuration, (int)interface); if (!usb_host_read_file(line,...
{ "code": [ "static uint8_t usb_linux_get_alt_setting(USBHostDevice *s,", " uint8_t configuration, uint8_t interface)", " char device_name[64], line[1024];", " int alt_setting;", " sprintf(device_name, \"%d-%s:%d.%d\", s->bus_num, s->port,", " (int)configuration, (int)in...
static uint8_t FUNC_0(USBHostDevice *s, uint8_t configuration, uint8_t interface) { char VAR_0[64], VAR_1[1024]; int VAR_2; sprintf(VAR_0, "%d-%s:%d.%d", s->bus_num, s->port, (int)configuration, (int)interface); if (!usb_host_read_file(VAR_1, sizeof(VAR_1), "bAlternateSetting"...
[ "static uint8_t FUNC_0(USBHostDevice *s,\nuint8_t configuration, uint8_t interface)\n{", "char VAR_0[64], VAR_1[1024];", "int VAR_2;", "sprintf(VAR_0, \"%d-%s:%d.%d\", s->bus_num, s->port,\n(int)configuration, (int)interface);", "if (!usb_host_read_file(VAR_1, sizeof(VAR_1), \"bAlternateSetting\",\nVAR_0)) ...
[ 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 13, 15 ], [ 19, 21 ], [ 25 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ] ]
17,380
static int append_extradata(APNGDemuxContext *ctx, AVIOContext *pb, int len) { int previous_size = ctx->extra_data_size; int new_size, ret; uint8_t *new_extradata; if (previous_size > INT_MAX - len) return AVERROR_INVALIDDATA; new_size = previous_size + len; new_extradata = a...
true
FFmpeg
16c429166ddf1736972b6ccce84bd3509ec16a34
static int append_extradata(APNGDemuxContext *ctx, AVIOContext *pb, int len) { int previous_size = ctx->extra_data_size; int new_size, ret; uint8_t *new_extradata; if (previous_size > INT_MAX - len) return AVERROR_INVALIDDATA; new_size = previous_size + len; new_extradata = a...
{ "code": [ "static int append_extradata(APNGDemuxContext *ctx, AVIOContext *pb, int len)", " int previous_size = ctx->extra_data_size;", " new_extradata = av_realloc(ctx->extra_data, new_size + AV_INPUT_BUFFER_PADDING_SIZE);", " ctx->extra_data = new_extradata;", " ctx->extra_data_siz...
static int FUNC_0(APNGDemuxContext *VAR_0, AVIOContext *VAR_1, int VAR_2) { int VAR_3 = VAR_0->extra_data_size; int VAR_4, VAR_5; uint8_t *new_extradata; if (VAR_3 > INT_MAX - VAR_2) return AVERROR_INVALIDDATA; VAR_4 = VAR_3 + VAR_2; new_extradata = av_realloc(VAR_0->extra_da...
[ "static int FUNC_0(APNGDemuxContext *VAR_0, AVIOContext *VAR_1, int VAR_2)\n{", "int VAR_3 = VAR_0->extra_data_size;", "int VAR_4, VAR_5;", "uint8_t *new_extradata;", "if (VAR_3 > INT_MAX - VAR_2)\nreturn AVERROR_INVALIDDATA;", "VAR_4 = VAR_3 + VAR_2;", "new_extradata = av_realloc(VAR_0->extra_data, VAR...
[ 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 13, 15 ], [ 19 ], [ 21 ], [ 23, 25 ], [ 27 ], [ 29 ], [ 33, 35 ], [ 39 ], [ 41 ] ]
17,382
void dnxhd_get_blocks(DNXHDEncContext *ctx, int mb_x, int mb_y) { const int bs = ctx->block_width_l2; const int bw = 1 << bs; int dct_y_offset = ctx->dct_y_offset; int dct_uv_offset = ctx->dct_uv_offset; int linesize = ctx->m.linesize; int uvlinesize = ctx->m.uvlinesize; const uint8_...
true
FFmpeg
eec67f25224a48047da57be18b610b11b0fd0bfe
void dnxhd_get_blocks(DNXHDEncContext *ctx, int mb_x, int mb_y) { const int bs = ctx->block_width_l2; const int bw = 1 << bs; int dct_y_offset = ctx->dct_y_offset; int dct_uv_offset = ctx->dct_uv_offset; int linesize = ctx->m.linesize; int uvlinesize = ctx->m.uvlinesize; const uint8_...
{ "code": [ " } else if (ctx->bit_depth == 10 && vdsp->emulated_edge_mc && ((mb_x << 3) + 8 > ctx->m.avctx->width ||", " (mb_y << 3) + 8 > ctx->m.avctx->height)) {", " int y_w = ctx->m.avctx->width - (mb_x << 3);", " in...
void FUNC_0(DNXHDEncContext *VAR_0, int VAR_1, int VAR_2) { const int VAR_3 = VAR_0->block_width_l2; const int VAR_4 = 1 << VAR_3; int VAR_5 = VAR_0->VAR_5; int VAR_6 = VAR_0->VAR_6; int VAR_7 = VAR_0->m.VAR_7; int VAR_8 = VAR_0->m.VAR_8; const uint8_t *VAR_9 = VAR_0->thread[0]->src[...
[ "void FUNC_0(DNXHDEncContext *VAR_0, int VAR_1, int VAR_2)\n{", "const int VAR_3 = VAR_0->block_width_l2;", "const int VAR_4 = 1 << VAR_3;", "int VAR_5 = VAR_0->VAR_5;", "int VAR_6 = VAR_0->VAR_6;", "int VAR_7 = VAR_0->m.VAR_7;", "int VAR_8 = VAR_0->m.VAR_8;", "const uint8_t *VAR_9 = VAR_0->thread[0]-...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17, 19 ], [ 21, 23 ], [ 25, 27 ], [ 29 ], [ 31 ], [ 35, 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ...
17,383
bool virtio_scsi_handle_event_vq(VirtIOSCSI *s, VirtQueue *vq) { virtio_scsi_acquire(s); if (s->events_dropped) { virtio_scsi_push_event(s, NULL, VIRTIO_SCSI_T_NO_EVENT, 0); virtio_scsi_release(s); return true; } virtio_scsi_release(s); return false; }
true
qemu
71407786054cad26de7ef66718b2a57a4bcb49b5
bool virtio_scsi_handle_event_vq(VirtIOSCSI *s, VirtQueue *vq) { virtio_scsi_acquire(s); if (s->events_dropped) { virtio_scsi_push_event(s, NULL, VIRTIO_SCSI_T_NO_EVENT, 0); virtio_scsi_release(s); return true; } virtio_scsi_release(s); return false; }
{ "code": [ " virtio_scsi_acquire(s);", " virtio_scsi_release(s);", " virtio_scsi_acquire(s);", " virtio_scsi_release(s);", " virtio_scsi_acquire(s);", " virtio_scsi_release(s);", " virtio_scsi_acquire(s);", " virtio_scsi_release(s);", " virtio_scsi_r...
bool FUNC_0(VirtIOSCSI *s, VirtQueue *vq) { virtio_scsi_acquire(s); if (s->events_dropped) { virtio_scsi_push_event(s, NULL, VIRTIO_SCSI_T_NO_EVENT, 0); virtio_scsi_release(s); return true; } virtio_scsi_release(s); return false; }
[ "bool FUNC_0(VirtIOSCSI *s, VirtQueue *vq)\n{", "virtio_scsi_acquire(s);", "if (s->events_dropped) {", "virtio_scsi_push_event(s, NULL, VIRTIO_SCSI_T_NO_EVENT, 0);", "virtio_scsi_release(s);", "return true;", "}", "virtio_scsi_release(s);", "return false;", "}" ]
[ 0, 1, 0, 0, 1, 0, 0, 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ] ]
17,384
static attribute_align_arg void *frame_worker_thread(void *arg) { PerThreadContext *p = arg; FrameThreadContext *fctx = p->parent; AVCodecContext *avctx = p->avctx; AVCodec *codec = avctx->codec; while (1) { int i; if (p->state == STATE_INPUT_READY && !fctx->die) { ...
true
FFmpeg
18a7f7465e7e6b9c3688ffc23230ae7a0639a771
static attribute_align_arg void *frame_worker_thread(void *arg) { PerThreadContext *p = arg; FrameThreadContext *fctx = p->parent; AVCodecContext *avctx = p->avctx; AVCodec *codec = avctx->codec; while (1) { int i; if (p->state == STATE_INPUT_READY && !fctx->die) { ...
{ "code": [ " if (p->progress_used[i]) {" ], "line_no": [ 61 ] }
static attribute_align_arg void *FUNC_0(void *arg) { PerThreadContext *p = arg; FrameThreadContext *fctx = p->parent; AVCodecContext *avctx = p->avctx; AVCodec *codec = avctx->codec; while (1) { int VAR_0; if (p->state == STATE_INPUT_READY && !fctx->die) { pthr...
[ "static attribute_align_arg void *FUNC_0(void *arg)\n{", "PerThreadContext *p = arg;", "FrameThreadContext *fctx = p->parent;", "AVCodecContext *avctx = p->avctx;", "AVCodec *codec = avctx->codec;", "while (1) {", "int VAR_0;", "if (p->state == STATE_INPUT_READY && !fctx->die) {", "pthread_mutex_loc...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23, 25 ], [ 27 ], [ 29 ], [ 33 ], [ 37, 39 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 53 ...
17,385
static void gen_spr_970_pmu_sup(CPUPPCState *env) { spr_register(env, SPR_970_PMC7, "PMC7", SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, &spr_write_generic, 0x00000000); spr_register(env, SPR_970_PMC8, "PMC8", SPR_NOACCESS, SPR_NOACCES...
true
qemu
83cc6f8c2f134ccff1a41ed86bbe3bc305e0c334
static void gen_spr_970_pmu_sup(CPUPPCState *env) { spr_register(env, SPR_970_PMC7, "PMC7", SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, &spr_write_generic, 0x00000000); spr_register(env, SPR_970_PMC8, "PMC8", SPR_NOACCESS, SPR_NOACCES...
{ "code": [ " SPR_NOACCESS, SPR_NOACCESS,", " &spr_read_generic, &spr_write_generic,", " 0x00000000);", " SPR_NOACCESS, SPR_NOACCESS,", " &spr_read_generic, &spr_write_generic,", " 0x00000000);", ...
static void FUNC_0(CPUPPCState *VAR_0) { spr_register(VAR_0, SPR_970_PMC7, "PMC7", SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, &spr_write_generic, 0x00000000); spr_register(VAR_0, SPR_970_PMC8, "PMC8", SPR_NOACCESS, SPR_NOACCESS, ...
[ "static void FUNC_0(CPUPPCState *VAR_0)\n{", "spr_register(VAR_0, SPR_970_PMC7, \"PMC7\",\nSPR_NOACCESS, SPR_NOACCESS,\n&spr_read_generic, &spr_write_generic,\n0x00000000);", "spr_register(VAR_0, SPR_970_PMC8, \"PMC8\",\nSPR_NOACCESS, SPR_NOACCESS,\n&spr_read_generic, &spr_write_generic,\n0x00000000);", "}" ]
[ 0, 1, 1, 0 ]
[ [ 1, 3 ], [ 5, 7, 9, 11 ], [ 13, 15, 17, 19 ], [ 21 ] ]
17,387
static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s, AVStream *stream, PayloadContext *hevc_data, char *attr, char *value) { /* profile-space: 0-3 */ /* pr...
true
FFmpeg
4adf75cade6905f33baeeaca559013467dc7d1ae
static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s, AVStream *stream, PayloadContext *hevc_data, char *attr, char *value) { if (!strcmp(attr, "prof...
{ "code": [], "line_no": [] }
static av_cold int FUNC_0(AVFormatContext *s, AVStream *stream, PayloadContext *hevc_data, char *attr, char *value) { if (!strcmp(attr, "profile-id")) { ...
[ "static av_cold int FUNC_0(AVFormatContext *s,\nAVStream *stream,\nPayloadContext *hevc_data,\nchar *attr, char *value)\n{", "if (!strcmp(attr, \"profile-id\")) {", "hevc_data->profile_id = atoi(value);", "av_dlog(s, \"SDP: found profile-id: %d\\n\", hevc_data->profile_id);", "}", "if (!strcmp(attr, \"spr...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7, 9 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 49, 51 ], [ 53 ], [ 55 ], [ 57 ], [ 59 ], [ 61 ], [ 63 ], [ 65 ], [ 67 ], [ 69 ], [ 71 ], [ 73 ], [ 75 ...
17,389
static int svq3_decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) { MpegEncContext *const s = avctx->priv_data; H264Context *const h = avctx->priv_data; int m, mb_type; unsigned char *extradata; unsigned int size; s->flags = avctx->flags...
true
FFmpeg
63d33cf4390a9280b1ba42ee722f3140cf1cad3e
static int svq3_decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) { MpegEncContext *const s = avctx->priv_data; H264Context *const h = avctx->priv_data; int m, mb_type; unsigned char *extradata; unsigned int size; s->flags = avctx->flags...
{ "code": [ " init_get_bits (&gb, extradata + 8, size);" ], "line_no": [ 89 ] }
static int FUNC_0 (AVCodecContext *VAR_0, void *VAR_1, int *VAR_2, uint8_t *VAR_3, int VAR_4) { MpegEncContext *const s = VAR_0->priv_data; H264Context *const h = VAR_0->priv_data; int VAR_5, VAR_6; unsigned char *VAR_7; unsigned int VAR_8; s->flags = VAR_0->flags; s->flags2 =...
[ "static int FUNC_0 (AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nuint8_t *VAR_3, int VAR_4) {", "MpegEncContext *const s = VAR_0->priv_data;", "H264Context *const h = VAR_0->priv_data;", "int VAR_5, VAR_6;", "unsigned char *VAR_7;", "unsigned int VAR_8;", "s->flags = VAR_0->flags;", "s->flags2 = ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 21 ], [ 23 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 47, 49 ...
17,390
static int qemu_rdma_reg_whole_ram_blocks(RDMAContext *rdma) { int i; RDMALocalBlocks *local = &rdma->local_ram_blocks; for (i = 0; i < local->nb_blocks; i++) { local->block[i].mr = ibv_reg_mr(rdma->pd, local->block[i].local_host_addr, lo...
true
qemu
60fe637bf0e4d7989e21e50f52526444765c63b4
static int qemu_rdma_reg_whole_ram_blocks(RDMAContext *rdma) { int i; RDMALocalBlocks *local = &rdma->local_ram_blocks; for (i = 0; i < local->nb_blocks; i++) { local->block[i].mr = ibv_reg_mr(rdma->pd, local->block[i].local_host_addr, lo...
{ "code": [], "line_no": [] }
static int FUNC_0(RDMAContext *VAR_0) { int VAR_1; RDMALocalBlocks *local = &VAR_0->local_ram_blocks; for (VAR_1 = 0; VAR_1 < local->nb_blocks; VAR_1++) { local->block[VAR_1].mr = ibv_reg_mr(VAR_0->pd, local->block[VAR_1].local_host_addr, ...
[ "static int FUNC_0(RDMAContext *VAR_0)\n{", "int VAR_1;", "RDMALocalBlocks *local = &VAR_0->local_ram_blocks;", "for (VAR_1 = 0; VAR_1 < local->nb_blocks; VAR_1++) {", "local->block[VAR_1].mr =\nibv_reg_mr(VAR_0->pd,\nlocal->block[VAR_1].local_host_addr,\nlocal->block[VAR_1].length,\nIBV_ACCESS_LOCAL_WRITE ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13, 15, 17, 19, 21, 23, 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 41 ], [ 43 ], [ 45 ], [ 49 ], [ 51 ], [ 53...
17,391
static int encode_plane(AVCodecContext *avctx, uint8_t *src, uint8_t *dst, int step, int stride, int width, int height, PutByteContext *pb) { UtvideoContext *c = avctx->priv_data; uint8_t lengths[256]; uint32_t counts[256] = { 0 }; Huf...
true
FFmpeg
f92f4935acd7d974adfd1deebdf1bb06cbe107ca
static int encode_plane(AVCodecContext *avctx, uint8_t *src, uint8_t *dst, int step, int stride, int width, int height, PutByteContext *pb) { UtvideoContext *c = avctx->priv_data; uint8_t lengths[256]; uint32_t counts[256] = { 0 }; Huf...
{ "code": [ " break;", " break;", " uint32_t counts[256] = { 0 };", " calculate_code_lengths(lengths, counts);" ], "line_no": [ 147, 147, 13, 157 ] }
static int FUNC_0(AVCodecContext *VAR_0, uint8_t *VAR_1, uint8_t *VAR_2, int VAR_3, int VAR_4, int VAR_5, int VAR_6, PutByteContext *VAR_7) { UtvideoContext *c = VAR_0->priv_data; uint8_t lengths[256]; uint32_t counts[256] = { 0 }; Huf...
[ "static int FUNC_0(AVCodecContext *VAR_0, uint8_t *VAR_1,\nuint8_t *VAR_2, int VAR_3, int VAR_4,\nint VAR_5, int VAR_6, PutByteContext *VAR_7)\n{", "UtvideoContext *c = VAR_0->priv_data;", "uint8_t lengths[256];", "uint32_t counts[256] = { 0 };", "HuffEntry he[256];", "uint32_t offset = 0, sli...
[ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3, 5, 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 31 ], [ 33, 35 ], [ 37 ], [ 39 ], [ 41, 43 ], [ 45 ], [ 47 ], [ 49, 51 ], [ 53 ], [...
17,392
static void init_excp_4xx_real (CPUPPCState *env) { #if !defined(CONFIG_USER_ONLY) env->excp_vectors[POWERPC_EXCP_CRITICAL] = 0x00000100; env->excp_vectors[POWERPC_EXCP_MCHECK] = 0x00000200; env->excp_vectors[POWERPC_EXCP_EXTERNAL] = 0x00000500; env->excp_vectors[POWERPC_EXCP_ALIGN] = 0x00000...
true
qemu
faadf50e2962dd54175647a80bd6fc4319c91973
static void init_excp_4xx_real (CPUPPCState *env) { #if !defined(CONFIG_USER_ONLY) env->excp_vectors[POWERPC_EXCP_CRITICAL] = 0x00000100; env->excp_vectors[POWERPC_EXCP_MCHECK] = 0x00000200; env->excp_vectors[POWERPC_EXCP_EXTERNAL] = 0x00000500; env->excp_vectors[POWERPC_EXCP_ALIGN] = 0x00000...
{ "code": [ "#endif", " env->excp_prefix = 0x00000000;", " env->ivor_mask = 0x0000FFF0;", " env->ivpr_mask = 0xFFFF0000;", " env->excp_prefix = 0x00000000;", " env->ivor_mask = 0x0000FFF0;", " env->ivpr_mask = 0xFFFF0000;", " env->excp_prefix = 0x00000000;", " ...
static void FUNC_0 (CPUPPCState *VAR_0) { #if !defined(CONFIG_USER_ONLY) VAR_0->excp_vectors[POWERPC_EXCP_CRITICAL] = 0x00000100; VAR_0->excp_vectors[POWERPC_EXCP_MCHECK] = 0x00000200; VAR_0->excp_vectors[POWERPC_EXCP_EXTERNAL] = 0x00000500; VAR_0->excp_vectors[POWERPC_EXCP_ALIGN] = 0x0000060...
[ "static void FUNC_0 (CPUPPCState *VAR_0)\n{", "#if !defined(CONFIG_USER_ONLY)\nVAR_0->excp_vectors[POWERPC_EXCP_CRITICAL] = 0x00000100;", "VAR_0->excp_vectors[POWERPC_EXCP_MCHECK] = 0x00000200;", "VAR_0->excp_vectors[POWERPC_EXCP_EXTERNAL] = 0x00000500;", "VAR_0->excp_vectors[POWERPC_EXCP_ALIGN] = 0x00...
[ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1 ]
[ [ 1, 3 ], [ 5, 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 35 ], [ 37, 39 ] ]
17,393
static void libschroedinger_decode_buffer_free(SchroBuffer *schro_buf, void *priv) { av_freep(&priv); }
true
FFmpeg
220b24c7c97dc033ceab1510549f66d0e7b52ef1
static void libschroedinger_decode_buffer_free(SchroBuffer *schro_buf, void *priv) { av_freep(&priv); }
{ "code": [ "static void libschroedinger_decode_buffer_free(SchroBuffer *schro_buf,", " void *priv)", " av_freep(&priv);" ], "line_no": [ 1, 3, 7 ] }
static void FUNC_0(SchroBuffer *VAR_0, void *VAR_1) { av_freep(&VAR_1); }
[ "static void FUNC_0(SchroBuffer *VAR_0,\nvoid *VAR_1)\n{", "av_freep(&VAR_1);", "}" ]
[ 1, 1, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ] ]
17,394
void aio_set_dispatching(AioContext *ctx, bool dispatching) { ctx->dispatching = dispatching; if (!dispatching) { /* Write ctx->dispatching before reading e.g. bh->scheduled. * Optimization: this is only needed when we're entering the "unsafe" * phase where other threads must cal...
true
qemu
eabc977973103527bbb8fed69c91cfaa6691f8ab
void aio_set_dispatching(AioContext *ctx, bool dispatching) { ctx->dispatching = dispatching; if (!dispatching) { smp_mb(); } }
{ "code": [ "void aio_set_dispatching(AioContext *ctx, bool dispatching)", " ctx->dispatching = dispatching;", " if (!dispatching) {", " smp_mb();" ], "line_no": [ 1, 5, 7, 17 ] }
void FUNC_0(AioContext *VAR_0, bool VAR_1) { VAR_0->VAR_1 = VAR_1; if (!VAR_1) { smp_mb(); } }
[ "void FUNC_0(AioContext *VAR_0, bool VAR_1)\n{", "VAR_0->VAR_1 = VAR_1;", "if (!VAR_1) {", "smp_mb();", "}", "}" ]
[ 1, 1, 1, 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 17 ], [ 19 ], [ 21 ] ]
17,395
static int adx_encode_header(AVCodecContext *avctx,unsigned char *buf,size_t bufsize) { #if 0 struct { uint32_t offset; /* 0x80000000 + sample start - 4 */ unsigned char unknown1[3]; /* 03 12 04 */ unsigned char channel; /* 1 or 2 */ uint32_t freq; uint32_t size; uint32_t unknown2; /* 01 f4 03 00 ...
true
FFmpeg
f19af812a32c1398d48c3550d11dbc6aafbb2bfc
static int adx_encode_header(AVCodecContext *avctx,unsigned char *buf,size_t bufsize) { #if 0 struct { uint32_t offset; unsigned char unknown1[3]; unsigned char channel; uint32_t freq; uint32_t size; uint32_t unknown2; uint32_t unknown3; uint32_t unknown4; } adxh...
{ "code": [ "\tstruct {", "\t\tuint32_t freq;", "\t\tuint32_t size;", "\twrite_long(buf+0x00,0x80000000|0x20);", "\twrite_long(buf+0x04,0x03120400|avctx->channels);", "\twrite_long(buf+0x08,avctx->sample_rate);", "\twrite_long(buf+0x10,0x01040300);", "\twrite_long(buf+0x14,0x00000000);...
static int FUNC_0(AVCodecContext *VAR_0,unsigned char *VAR_1,size_t VAR_2) { #if 0 struct { uint32_t offset; unsigned char unknown1[3]; unsigned char channel; uint32_t freq; uint32_t size; uint32_t unknown2; uint32_t unknown3; uint32_t unknown4; } adxhdr; #e...
[ "static int FUNC_0(AVCodecContext *VAR_0,unsigned char *VAR_1,size_t VAR_2)\n{", "#if 0\nstruct {", "uint32_t offset;", "unsigned char unknown1[3];", "unsigned char channel;", "uint32_t freq;", "uint32_t size;", "uint32_t unknown2;", "uint32_t unknown3;", "uint32_t unknown4;", "} adxhdr;", "#e...
[ 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0 ]
[ [ 1, 3 ], [ 5, 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 45 ], [ 49, 51 ], [ 53 ], [ 55 ], [ 57 ], [ 59 ], [ 61 ], [ 63 ], [ 65 ...
17,396
static vscsi_req *vscsi_find_req(VSCSIState *s, uint32_t tag) { if (tag >= VSCSI_REQ_LIMIT || !s->reqs[tag].active) { return NULL; } return &s->reqs[tag]; }
true
qemu
5c6c0e513600ba57c3e73b7151d3c0664438f7b5
static vscsi_req *vscsi_find_req(VSCSIState *s, uint32_t tag) { if (tag >= VSCSI_REQ_LIMIT || !s->reqs[tag].active) { return NULL; } return &s->reqs[tag]; }
{ "code": [ " return NULL;", " return NULL;", "static vscsi_req *vscsi_find_req(VSCSIState *s, uint32_t tag)" ], "line_no": [ 7, 7, 1 ] }
static vscsi_req *FUNC_0(VSCSIState *s, uint32_t tag) { if (tag >= VSCSI_REQ_LIMIT || !s->reqs[tag].active) { return NULL; } return &s->reqs[tag]; }
[ "static vscsi_req *FUNC_0(VSCSIState *s, uint32_t tag)\n{", "if (tag >= VSCSI_REQ_LIMIT || !s->reqs[tag].active) {", "return NULL;", "}", "return &s->reqs[tag];", "}" ]
[ 1, 0, 1, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ] ]
17,397
static inline void RENAME(rgb24tobgr15)(const uint8_t *src, uint8_t *dst, unsigned src_size) { const uint8_t *s = src; const uint8_t *end; #ifdef HAVE_MMX const uint8_t *mm_end; #endif uint16_t *d = (uint16_t *)dst; end = s + src_size; #ifdef HAVE_MMX __asm __volatile(PREFETCH" %0"::"m"(*src):"memory");...
true
FFmpeg
7f526efd17973ec6d2204f7a47b6923e2be31363
static inline void RENAME(rgb24tobgr15)(const uint8_t *src, uint8_t *dst, unsigned src_size) { const uint8_t *s = src; const uint8_t *end; #ifdef HAVE_MMX const uint8_t *mm_end; #endif uint16_t *d = (uint16_t *)dst; end = s + src_size; #ifdef HAVE_MMX __asm __volatile(PREFETCH" %0"::"m"(*src):"memory");...
{ "code": [ "static inline void RENAME(rgb24tobgr15)(const uint8_t *src, uint8_t *dst, unsigned src_size)" ], "line_no": [ 1 ] }
static inline void FUNC_0(rgb24tobgr15)(const uint8_t *src, uint8_t *dst, unsigned src_size) { const uint8_t *VAR_0 = src; const uint8_t *VAR_1; #ifdef HAVE_MMX const uint8_t *mm_end; #endif uint16_t *d = (uint16_t *)dst; VAR_1 = VAR_0 + src_size; #ifdef HAVE_MMX __asm __volatile(PREFETCH" %0"::"m"(*src...
[ "static inline void FUNC_0(rgb24tobgr15)(const uint8_t *src, uint8_t *dst, unsigned src_size)\n{", "const uint8_t *VAR_0 = src;", "const uint8_t *VAR_1;", "#ifdef HAVE_MMX\nconst uint8_t *mm_end;", "#endif\nuint16_t *d = (uint16_t *)dst;", "VAR_1 = VAR_0 + src_size;", "#ifdef HAVE_MMX\n__asm __volatile(...
[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9, 11 ], [ 13, 15 ], [ 17 ], [ 19, 21 ], [ 23, 25, 27, 29 ], [ 31 ], [ 33, 35 ], [ 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59,...
17,399
static void read_tree(GetBitContext *gb, Tree *tree) { uint8_t tmp1[16], tmp2[16], *in = tmp1, *out = tmp2; int i, t, len; tree->vlc_num = get_bits(gb, 4); if (!tree->vlc_num) { for (i = 0; i < 16; i++) tree->syms[i] = i; return; } if (get_bits1(gb)) { ...
true
FFmpeg
254af56dd101bc756194dd080bb99e8f123500dd
static void read_tree(GetBitContext *gb, Tree *tree) { uint8_t tmp1[16], tmp2[16], *in = tmp1, *out = tmp2; int i, t, len; tree->vlc_num = get_bits(gb, 4); if (!tree->vlc_num) { for (i = 0; i < 16; i++) tree->syms[i] = i; return; } if (get_bits1(gb)) { ...
{ "code": [ " for (i = 0; i < 16; i++)" ], "line_no": [ 15 ] }
static void FUNC_0(GetBitContext *VAR_0, Tree *VAR_1) { uint8_t tmp1[16], tmp2[16], *in = tmp1, *out = tmp2; int VAR_2, VAR_3, VAR_4; VAR_1->vlc_num = get_bits(VAR_0, 4); if (!VAR_1->vlc_num) { for (VAR_2 = 0; VAR_2 < 16; VAR_2++) VAR_1->syms[VAR_2] = VAR_2; return;...
[ "static void FUNC_0(GetBitContext *VAR_0, Tree *VAR_1)\n{", "uint8_t tmp1[16], tmp2[16], *in = tmp1, *out = tmp2;", "int VAR_2, VAR_3, VAR_4;", "VAR_1->vlc_num = get_bits(VAR_0, 4);", "if (!VAR_1->vlc_num) {", "for (VAR_2 = 0; VAR_2 < 16; VAR_2++)", "VAR_1->syms[VAR_2] = VAR_2;", "return;", "}", "...
[ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39, 41 ], [ 43 ], ...
17,400
uint32_t ide_data_readl(void *opaque, uint32_t addr) { IDEBus *bus = opaque; IDEState *s = idebus_active_if(bus); uint8_t *p; int ret; /* PIO data access allowed only when DRQ bit is set. The result of a read * during PIO in is indeterminate, return 0 and don't move forward. */ if (!(s->sta...
true
qemu
d2ff85854512574e7209f295e87b0835d5b032c6
uint32_t ide_data_readl(void *opaque, uint32_t addr) { IDEBus *bus = opaque; IDEState *s = idebus_active_if(bus); uint8_t *p; int ret; if (!(s->status & DRQ_STAT) || !ide_is_pio_out(s)) { p = s->data_ptr; ret = cpu_to_le32(*(uint32_t *)p); p += 4; s->data_ptr = p; if (p >= ...
{ "code": [], "line_no": [] }
uint32_t FUNC_0(void *opaque, uint32_t addr) { IDEBus *bus = opaque; IDEState *s = idebus_active_if(bus); uint8_t *p; int VAR_0; if (!(s->status & DRQ_STAT) || !ide_is_pio_out(s)) { p = s->data_ptr; VAR_0 = cpu_to_le32(*(uint32_t *)p); p += 4; s->data_ptr = p; if (p >= s->d...
[ "uint32_t FUNC_0(void *opaque, uint32_t addr)\n{", "IDEBus *bus = opaque;", "IDEState *s = idebus_active_if(bus);", "uint8_t *p;", "int VAR_0;", "if (!(s->status & DRQ_STAT) || !ide_is_pio_out(s)) {", "p = s->data_ptr;", "VAR_0 = cpu_to_le32(*(uint32_t *)p);", "p += 4;", "s->data_ptr = p;", "if ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 2 ], [ 3 ], [ 4 ], [ 5 ], [ 6 ], [ 9 ], [ 10 ], [ 11 ], [ 12 ], [ 13 ], [ 14, 15 ], [ 16 ] ]
17,401
void do_commit(Monitor *mon, const QDict *qdict) { const char *device = qdict_get_str(qdict, "device"); BlockDriverState *bs; if (!strcmp(device, "all")) { bdrv_commit_all(); } else { int ret; bs = bdrv_find(device); if (!bs) { qerror_report(QERR...
true
qemu
e88774971c33671477c9eb4a4cf1e65a047c9838
void do_commit(Monitor *mon, const QDict *qdict) { const char *device = qdict_get_str(qdict, "device"); BlockDriverState *bs; if (!strcmp(device, "all")) { bdrv_commit_all(); } else { int ret; bs = bdrv_find(device); if (!bs) { qerror_report(QERR...
{ "code": [ " bdrv_commit_all();", " int ret;" ], "line_no": [ 13, 17 ] }
void FUNC_0(Monitor *VAR_0, const QDict *VAR_1) { const char *VAR_2 = qdict_get_str(VAR_1, "VAR_2"); BlockDriverState *bs; if (!strcmp(VAR_2, "all")) { bdrv_commit_all(); } else { int VAR_3; bs = bdrv_find(VAR_2); if (!bs) { qerror_report(QERR_DE...
[ "void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)\n{", "const char *VAR_2 = qdict_get_str(VAR_1, \"VAR_2\");", "BlockDriverState *bs;", "if (!strcmp(VAR_2, \"all\")) {", "bdrv_commit_all();", "} else {", "int VAR_3;", "bs = bdrv_find(VAR_2);", "if (!bs) {", "qerror_report(QERR_DEVICE_NOT_FOUND, VAR...
[ 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ] ]
17,403
void avfilter_start_frame(AVFilterLink *link, AVFilterPicRef *picref) { void (*start_frame)(AVFilterLink *, AVFilterPicRef *); AVFilterPad *dst = &link_dpad(link); if(!(start_frame = dst->start_frame)) start_frame = avfilter_default_start_frame; /* prepare to copy the picture if it has...
true
FFmpeg
fe479c9d63f0743fa064ac2a5c019284ba88277a
void avfilter_start_frame(AVFilterLink *link, AVFilterPicRef *picref) { void (*start_frame)(AVFilterLink *, AVFilterPicRef *); AVFilterPad *dst = &link_dpad(link); if(!(start_frame = dst->start_frame)) start_frame = avfilter_default_start_frame; if((dst->min_perms & picref->perms...
{ "code": [], "line_no": [] }
VAR_4voidVAR_4 VAR_4avfilter_start_frameVAR_4(VAR_4AVFilterLinkVAR_4 *VAR_4VAR_0VAR_4, VAR_4AVFilterPicRefVAR_4 *VAR_4VAR_1VAR_4) { VAR_4voidVAR_4 (*VAR_4VAR_2VAR_4)(VAR_4AVFilterLinkVAR_4 *, VAR_4AVFilterPicRefVAR_4 *); VAR_4AVFilterPadVAR_4 *VAR_4dstVAR_4 = &VAR_4link_dpadVAR_4(VAR_4VAR_0VAR_4); VAR...
[ "VAR_4voidVAR_4 VAR_4avfilter_start_frameVAR_4(VAR_4AVFilterLinkVAR_4 *VAR_4VAR_0VAR_4, VAR_4AVFilterPicRefVAR_4 *VAR_4VAR_1VAR_4)\n{", "VAR_4voidVAR_4 (*VAR_4VAR_2VAR_4)(VAR_4AVFilterLinkVAR_4 *, VAR_4AVFilterPicRefVAR_4 *);", "VAR_4AVFilterPadVAR_4 *VAR_4dstVAR_4 = &VAR_4link_dpadVAR_4(VAR_4VAR_0VAR_4);", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11, 13 ], [ 19, 21 ], [ 37 ], [ 39 ], [ 41 ], [ 44 ], [ 46, 48 ], [ 52 ], [ 54 ] ]
17,404
static void ffserver_apply_stream_config(AVCodecContext *enc, const AVDictionary *conf, AVDictionary **opts) { AVDictionaryEntry *e; /* Return values from ffserver_set_*_param are ignored. Values are initially parsed and checked before inserting to AVDictionary. */ //video params ...
true
FFmpeg
3f07dd6e392bf35a478203dc60fcbd36dfdd42aa
static void ffserver_apply_stream_config(AVCodecContext *enc, const AVDictionary *conf, AVDictionary **opts) { AVDictionaryEntry *e; if ((e = av_dict_get(conf, "VideoBitRateRangeMin", NULL, 0))) ffserver_set_int_param(&enc->rc_min_rate, e->value, 1000, INT_MIN, I...
{ "code": [ " if (av_dict_get(conf, \"Qscale\", NULL, 0)) {" ], "line_no": [ 153 ] }
static void FUNC_0(AVCodecContext *VAR_0, const AVDictionary *VAR_1, AVDictionary **VAR_2) { AVDictionaryEntry *e; if ((e = av_dict_get(VAR_1, "VideoBitRateRangeMin", NULL, 0))) ffserver_set_int_param(&VAR_0->rc_min_rate, e->value, 1000, INT_MIN, INT_MAX, NULL, 0...
[ "static void FUNC_0(AVCodecContext *VAR_0, const AVDictionary *VAR_1, AVDictionary **VAR_2)\n{", "AVDictionaryEntry *e;", "if ((e = av_dict_get(VAR_1, \"VideoBitRateRangeMin\", NULL, 0)))\nffserver_set_int_param(&VAR_0->rc_min_rate, e->value, 1000, INT_MIN,\nINT_MAX, NULL, 0, NULL);", "if ((e = av_dict_get(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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 19, 21, 23 ], [ 25, 27, 29 ], [ 31, 33, 35 ], [ 37, 39, 41 ], [ 43, 45, 47 ], [ 49, 51, 53 ], [ 55, 57, 59 ], [ 61, 63, 65 ], [ 67, 69, 7...
17,405
static uint32_t grlib_gptimer_readl(void *opaque, target_phys_addr_t addr) { GPTimerUnit *unit = opaque; target_phys_addr_t timer_addr; int id; uint32_t value = 0; addr &= 0xff; /* Unit registers */ switch (addr) { case SCALER_OFFSET: ...
true
qemu
b4548fcc0314f5e118ed45b5774e9cd99f9a97d3
static uint32_t grlib_gptimer_readl(void *opaque, target_phys_addr_t addr) { GPTimerUnit *unit = opaque; target_phys_addr_t timer_addr; int id; uint32_t value = 0; addr &= 0xff; switch (addr) { case SCALER_OFFSET: trace_grlib_gpt...
{ "code": [ " trace_grlib_gptimer_readl(-1, \"scaler:\", unit->scaler);", " trace_grlib_gptimer_readl(-1, \"reload:\", unit->reload);", " trace_grlib_gptimer_readl(-1, \"config:\", unit->config);", " trace_grlib_gptimer_readl(id, \"counter value:\", value);", " ...
static uint32_t FUNC_0(void *opaque, target_phys_addr_t addr) { GPTimerUnit *unit = opaque; target_phys_addr_t timer_addr; int VAR_0; uint32_t value = 0; addr &= 0xff; switch (addr) { case SCALER_OFFSET: trace_grlib_gptimer_readl...
[ "static uint32_t FUNC_0(void *opaque, target_phys_addr_t addr)\n{", "GPTimerUnit *unit = opaque;", "target_phys_addr_t timer_addr;", "int VAR_0;", "uint32_t value = 0;", "addr &= 0xff;", "switch (addr) {", "case SCALER_OFFSET:\ntrace_grlib_gptimer_readl(-1, \"scaler...
[ 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 21 ], [ 23, 25 ], [ 27 ], [ 31, 33 ], [ 35 ], [ 39, 41 ], [ 43 ], [ 47, 49 ], [ 51 ], [ 55 ], [ 57 ], [ 61 ...
17,406
static void new_subtitle_stream(AVFormatContext *oc, int file_idx) { AVStream *st; AVOutputStream *ost; AVCodec *codec=NULL; AVCodecContext *subtitle_enc; enum CodecID codec_id; st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0); if (!st) { ...
true
FFmpeg
4618637aca3b771b0bfb8fe15f3a080dacf9f0c0
static void new_subtitle_stream(AVFormatContext *oc, int file_idx) { AVStream *st; AVOutputStream *ost; AVCodec *codec=NULL; AVCodecContext *subtitle_enc; enum CodecID codec_id; st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0); if (!st) { ...
{ "code": [ " enum CodecID codec_id;", " enum CodecID codec_id;", " enum CodecID codec_id;" ], "line_no": [ 13, 13, 13 ] }
static void FUNC_0(AVFormatContext *VAR_0, int VAR_1) { AVStream *st; AVOutputStream *ost; AVCodec *codec=NULL; AVCodecContext *subtitle_enc; enum CodecID VAR_2; st = av_new_stream(VAR_0, VAR_0->nb_streams < nb_streamid_map ? streamid_map[VAR_0->nb_streams] : 0); if (!st) { ...
[ "static void FUNC_0(AVFormatContext *VAR_0, int VAR_1)\n{", "AVStream *st;", "AVOutputStream *ost;", "AVCodec *codec=NULL;", "AVCodecContext *subtitle_enc;", "enum CodecID VAR_2;", "st = av_new_stream(VAR_0, VAR_0->nb_streams < nb_streamid_map ? streamid_map[VAR_0->nb_streams] : 0);", "if (!st) {", ...
[ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37, 39 ], [ 41 ], [ 43 ], [...
17,408
static inline void RENAME(bgr24ToUV_mmx)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, int width, enum PixelFormat srcFormat) { __asm__ volatile( "movq 24+%4, %%mm6 \n\t" "mov %3, %%"REG_a" \n\t" "pxor %%mm7, %%mm7...
true
FFmpeg
c3ab0004ae4dffc32494ae84dd15cfaa909a7884
static inline void RENAME(bgr24ToUV_mmx)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, int width, enum PixelFormat srcFormat) { __asm__ volatile( "movq 24+%4, %%mm6 \n\t" "mov %3, %%"REG_a" \n\t" "pxor %%mm7, %%mm7...
{ "code": [ "static inline void RENAME(bgr24ToUV_mmx)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, int width, enum PixelFormat srcFormat)" ], "line_no": [ 1 ] }
static inline void FUNC_0(bgr24ToUV_mmx)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, int width, enum PixelFormat srcFormat) { __asm__ volatile( "movq 24+%4, %%mm6 \n\t" "mov %3, %%"REG_a" \n\t" "pxor %%mm7, %%mm7...
[ "static inline void FUNC_0(bgr24ToUV_mmx)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src, int width, enum PixelFormat srcFormat)\n{", "__asm__ volatile(\n\"movq 24+%4, %%mm6 \\n\\t\"\n\"mov %3, %%\"REG_a\" \\n\\t\"\n\"pxor %%mm7, %%mm7 \...
[ 1, 0, 0 ]
[ [ 1, 3 ], [ 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 71, 73, 75, 77, 79, 81,...
17,409
static ram_addr_t find_ram_offset(ram_addr_t size) { RAMBlock *block, *next_block; ram_addr_t offset, mingap = ULONG_MAX; if (QLIST_EMPTY(&ram_list.blocks)) return 0; QLIST_FOREACH(block, &ram_list.blocks, next) { ram_addr_t end, next = ULONG_MAX; end = block->offse...
true
qemu
09d7ae9000fe27d1861cb0348cbf71563ded6148
static ram_addr_t find_ram_offset(ram_addr_t size) { RAMBlock *block, *next_block; ram_addr_t offset, mingap = ULONG_MAX; if (QLIST_EMPTY(&ram_list.blocks)) return 0; QLIST_FOREACH(block, &ram_list.blocks, next) { ram_addr_t end, next = ULONG_MAX; end = block->offse...
{ "code": [ " ram_addr_t offset, mingap = ULONG_MAX;" ], "line_no": [ 7 ] }
static ram_addr_t FUNC_0(ram_addr_t size) { RAMBlock *block, *next_block; ram_addr_t offset, mingap = ULONG_MAX; if (QLIST_EMPTY(&ram_list.blocks)) return 0; QLIST_FOREACH(block, &ram_list.blocks, next) { ram_addr_t end, next = ULONG_MAX; end = block->offset + block...
[ "static ram_addr_t FUNC_0(ram_addr_t size)\n{", "RAMBlock *block, *next_block;", "ram_addr_t offset, mingap = ULONG_MAX;", "if (QLIST_EMPTY(&ram_list.blocks))\nreturn 0;", "QLIST_FOREACH(block, &ram_list.blocks, next) {", "ram_addr_t end, next = ULONG_MAX;", "end = block->offset + block->length;", "QL...
[ 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11, 13 ], [ 17 ], [ 19 ], [ 23 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ] ]
17,410
static void guess_dc(MpegEncContext *s, int16_t *dc, int w, int h, int stride, int is_luma) { int b_x, b_y; int16_t (*col )[4] = av_malloc(stride*h*sizeof( int16_t)*4); uint32_t (*dist)[4] = av_malloc(stride*h*sizeof(uint32_t)*4); for(b_y=0; b_y<h; b_y++){ int colo...
true
FFmpeg
71c2a70cbfbb5fea6dffa5e462b0227565e29bcc
static void guess_dc(MpegEncContext *s, int16_t *dc, int w, int h, int stride, int is_luma) { int b_x, b_y; int16_t (*col )[4] = av_malloc(stride*h*sizeof( int16_t)*4); uint32_t (*dist)[4] = av_malloc(stride*h*sizeof(uint32_t)*4); for(b_y=0; b_y<h; b_y++){ int colo...
{ "code": [ " int64_t weight = 256 * 256 * 256 * 16 / dist[b_x + b_y*stride][j];" ], "line_no": [ 159 ] }
static void FUNC_0(MpegEncContext *VAR_0, int16_t *VAR_1, int VAR_2, int VAR_3, int VAR_4, int VAR_5) { int VAR_6, VAR_7; int16_t (*col )[4] = av_malloc(VAR_4*VAR_3*sizeof( int16_t)*4); uint32_t (*dist)[4] = av_malloc(VAR_4*VAR_3*sizeof(uint32_t)*4); for(VAR_7=0; VAR_7<VAR_...
[ "static void FUNC_0(MpegEncContext *VAR_0, int16_t *VAR_1, int VAR_2,\nint VAR_3, int VAR_4, int VAR_5)\n{", "int VAR_6, VAR_7;", "int16_t (*col )[4] = av_malloc(VAR_4*VAR_3*sizeof( int16_t)*4);", "uint32_t (*dist)[4] = av_malloc(VAR_4*VAR_3*sizeof(uint32_t)*4);", "for(VAR_7=0; VAR_7<VAR_3; VAR_7++){", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [...
17,414
Coroutine *qemu_coroutine_create(CoroutineEntry *entry) { Coroutine *co = NULL; if (CONFIG_COROUTINE_POOL) { co = QSLIST_FIRST(&alloc_pool); if (!co) { if (release_pool_size > POOL_BATCH_SIZE) { /* Slow path; a good place to register the destructor, too. */ ...
true
qemu
0b8b8753e4d94901627b3e86431230f2319215c4
Coroutine *qemu_coroutine_create(CoroutineEntry *entry) { Coroutine *co = NULL; if (CONFIG_COROUTINE_POOL) { co = QSLIST_FIRST(&alloc_pool); if (!co) { if (release_pool_size > POOL_BATCH_SIZE) { if (!coroutine_pool_cleanup_notifier.notify) {...
{ "code": [ "Coroutine *qemu_coroutine_create(CoroutineEntry *entry)" ], "line_no": [ 1 ] }
Coroutine *FUNC_0(CoroutineEntry *entry) { Coroutine *co = NULL; if (CONFIG_COROUTINE_POOL) { co = QSLIST_FIRST(&alloc_pool); if (!co) { if (release_pool_size > POOL_BATCH_SIZE) { if (!coroutine_pool_cleanup_notifier.notify) { ...
[ "Coroutine *FUNC_0(CoroutineEntry *entry)\n{", "Coroutine *co = NULL;", "if (CONFIG_COROUTINE_POOL) {", "co = QSLIST_FIRST(&alloc_pool);", "if (!co) {", "if (release_pool_size > POOL_BATCH_SIZE) {", "if (!coroutine_pool_cleanup_notifier.notify) {", "coroutine_pool_cleanup_notifier.notify = coroutine_p...
[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [ 53 ], [ 55...
17,415
static void pxa2xx_gpio_write(void *opaque, target_phys_addr_t offset, uint32_t value) { struct pxa2xx_gpio_info_s *s = (struct pxa2xx_gpio_info_s *) opaque; int bank; offset -= s->base; if (offset >= 0x200) return; bank = pxa2xx_gpio_regs[offset].bank; switch ...
true
qemu
2b76bdc965ba7b4f27133cb345101d9535ddaa79
static void pxa2xx_gpio_write(void *opaque, target_phys_addr_t offset, uint32_t value) { struct pxa2xx_gpio_info_s *s = (struct pxa2xx_gpio_info_s *) opaque; int bank; offset -= s->base; if (offset >= 0x200) return; bank = pxa2xx_gpio_regs[offset].bank; switch ...
{ "code": [], "line_no": [] }
static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint32_t VAR_2) { struct pxa2xx_gpio_info_s *VAR_3 = (struct pxa2xx_gpio_info_s *) VAR_0; int VAR_4; VAR_1 -= VAR_3->base; if (VAR_1 >= 0x200) return; VAR_4 = pxa2xx_gpio_regs[VAR_1].VAR_4; switch (pxa2x...
[ "static void FUNC_0(void *VAR_0,\ntarget_phys_addr_t VAR_1, uint32_t VAR_2)\n{", "struct pxa2xx_gpio_info_s *VAR_3 = (struct pxa2xx_gpio_info_s *) VAR_0;", "int VAR_4;", "VAR_1 -= VAR_3->base;", "if (VAR_1 >= 0x200)\nreturn;", "VAR_4 = pxa2xx_gpio_regs[VAR_1].VAR_4;", "switch (pxa2xx_gpio_regs[VAR_1].re...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13, 15 ], [ 19 ], [ 21 ], [ 23, 25 ], [ 27 ], [ 29 ], [ 33, 35 ], [ 37 ], [ 40 ], [ 44, 46 ], [ 48 ], [ 50 ], [ 54, 56 ...
17,416
static int decode_syncpoint(NUTContext *nut, int64_t *ts, int64_t *back_ptr) { AVFormatContext *s = nut->avf; AVIOContext *bc = s->pb; int64_t end; uint64_t tmp; nut->last_syncpoint_pos = avio_tell(bc) - 8; end = get_packetheader(nut, bc, 1, SYNCPOINT_STARTCODE); end += avio_...
true
FFmpeg
fb96ac469a1d375b473868984f832e3a7cdfc24c
static int decode_syncpoint(NUTContext *nut, int64_t *ts, int64_t *back_ptr) { AVFormatContext *s = nut->avf; AVIOContext *bc = s->pb; int64_t end; uint64_t tmp; nut->last_syncpoint_pos = avio_tell(bc) - 8; end = get_packetheader(nut, bc, 1, SYNCPOINT_STARTCODE); end += avio_...
{ "code": [ " *ts = tmp / s->nb_streams *", " av_q2d(nut->time_base[tmp % s->nb_streams]) * AV_TIME_BASE;" ], "line_no": [ 51, 53 ] }
static int FUNC_0(NUTContext *VAR_0, int64_t *VAR_1, int64_t *VAR_2) { AVFormatContext *s = VAR_0->avf; AVIOContext *bc = s->pb; int64_t end; uint64_t tmp; VAR_0->last_syncpoint_pos = avio_tell(bc) - 8; end = get_packetheader(VAR_0, bc, 1, SYNCPOINT_STARTCODE); end += avio_te...
[ "static int FUNC_0(NUTContext *VAR_0, int64_t *VAR_1, int64_t *VAR_2)\n{", "AVFormatContext *s = VAR_0->avf;", "AVIOContext *bc = s->pb;", "int64_t end;", "uint64_t tmp;", "VAR_0->last_syncpoint_pos = avio_tell(bc) - 8;", "end = get_packetheader(VAR_0, bc, 1, SYNCPOINT_STARTCODE);", "end += avio_t...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 19 ], [ 21 ], [ 25 ], [ 27 ], [ 29, 31 ], [ 35, 37 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 51, 53 ], [ 55 ], [...
17,417
static void coroutine_fn v9fs_flush(void *opaque) { ssize_t err; int16_t tag; size_t offset = 7; V9fsPDU *cancel_pdu; V9fsPDU *pdu = opaque; V9fsState *s = pdu->s; err = pdu_unmarshal(pdu, offset, "w", &tag); if (err < 0) { pdu_complete(pdu, err); return; ...
true
qemu
d5f2af7b95b738b25272a98319b09540a0606d14
static void coroutine_fn v9fs_flush(void *opaque) { ssize_t err; int16_t tag; size_t offset = 7; V9fsPDU *cancel_pdu; V9fsPDU *pdu = opaque; V9fsState *s = pdu->s; err = pdu_unmarshal(pdu, offset, "w", &tag); if (err < 0) { pdu_complete(pdu, err); return; ...
{ "code": [ " V9fsPDU *cancel_pdu;", " QLIST_FOREACH(cancel_pdu, &s->active_list, next) {", " if (cancel_pdu->tag == tag) {", " break;" ], "line_no": [ 11, 33, 35, 37 ] }
static void VAR_0 v9fs_flush(void *opaque) { ssize_t err; int16_t tag; size_t offset = 7; V9fsPDU *cancel_pdu; V9fsPDU *pdu = opaque; V9fsState *s = pdu->s; err = pdu_unmarshal(pdu, offset, "w", &tag); if (err < 0) { pdu_complete(pdu, err); return; } ...
[ "static void VAR_0 v9fs_flush(void *opaque)\n{", "ssize_t err;", "int16_t tag;", "size_t offset = 7;", "V9fsPDU *cancel_pdu;", "V9fsPDU *pdu = opaque;", "V9fsState *s = pdu->s;", "err = pdu_unmarshal(pdu, offset, \"w\", &tag);", "if (err < 0) {", "pdu_complete(pdu, err);", "return;", "}", "t...
[ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ...
17,418
static inline void expand_category(COOKContext *q, int *category, int *category_index) { int i; for (i = 0; i < q->num_vectors; i++) ++category[category_index[i]]; }
true
FFmpeg
442c3a8cb1785d74f8e2d7ab35b1862b7088436b
static inline void expand_category(COOKContext *q, int *category, int *category_index) { int i; for (i = 0; i < q->num_vectors; i++) ++category[category_index[i]]; }
{ "code": [ " ++category[category_index[i]];" ], "line_no": [ 11 ] }
static inline void FUNC_0(COOKContext *VAR_0, int *VAR_1, int *VAR_2) { int VAR_3; for (VAR_3 = 0; VAR_3 < VAR_0->num_vectors; VAR_3++) ++VAR_1[VAR_2[VAR_3]]; }
[ "static inline void FUNC_0(COOKContext *VAR_0, int *VAR_1,\nint *VAR_2)\n{", "int VAR_3;", "for (VAR_3 = 0; VAR_3 < VAR_0->num_vectors; VAR_3++)", "++VAR_1[VAR_2[VAR_3]];", "}" ]
[ 0, 0, 0, 1, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ] ]
17,419
static int gif_encode_close(AVCodecContext *avctx) { GIFContext *s = avctx->priv_data; av_frame_free(&avctx->coded_frame); av_freep(&s->lzw); av_freep(&s->buf); return 0; }
false
FFmpeg
d6604b29ef544793479d7fb4e05ef6622bb3e534
static int gif_encode_close(AVCodecContext *avctx) { GIFContext *s = avctx->priv_data; av_frame_free(&avctx->coded_frame); av_freep(&s->lzw); av_freep(&s->buf); return 0; }
{ "code": [], "line_no": [] }
static int FUNC_0(AVCodecContext *VAR_0) { GIFContext *s = VAR_0->priv_data; av_frame_free(&VAR_0->coded_frame); av_freep(&s->lzw); av_freep(&s->buf); return 0; }
[ "static int FUNC_0(AVCodecContext *VAR_0)\n{", "GIFContext *s = VAR_0->priv_data;", "av_frame_free(&VAR_0->coded_frame);", "av_freep(&s->lzw);", "av_freep(&s->buf);", "return 0;", "}" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ] ]
17,420
static av_cold int vqa_decode_end(AVCodecContext *avctx) { VqaContext *s = avctx->priv_data; av_free(s->codebook); av_free(s->next_codebook_buffer); av_free(s->decode_buffer); if (s->frame.data[0]) avctx->release_buffer(avctx, &s->frame); return 0; }
false
FFmpeg
341404f753fdbcddebb9fbce51f2ef057cceb79c
static av_cold int vqa_decode_end(AVCodecContext *avctx) { VqaContext *s = avctx->priv_data; av_free(s->codebook); av_free(s->next_codebook_buffer); av_free(s->decode_buffer); if (s->frame.data[0]) avctx->release_buffer(avctx, &s->frame); return 0; }
{ "code": [], "line_no": [] }
static av_cold int FUNC_0(AVCodecContext *avctx) { VqaContext *s = avctx->priv_data; av_free(s->codebook); av_free(s->next_codebook_buffer); av_free(s->decode_buffer); if (s->frame.data[0]) avctx->release_buffer(avctx, &s->frame); return 0; }
[ "static av_cold int FUNC_0(AVCodecContext *avctx)\n{", "VqaContext *s = avctx->priv_data;", "av_free(s->codebook);", "av_free(s->next_codebook_buffer);", "av_free(s->decode_buffer);", "if (s->frame.data[0])\navctx->release_buffer(avctx, &s->frame);", "return 0;", "}" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 17, 19 ], [ 23 ], [ 25 ] ]
17,421
static av_cold int pam_encode_init(AVCodecContext *avctx) { avctx->coded_frame = av_frame_alloc(); if (!avctx->coded_frame) return AVERROR(ENOMEM); avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; avctx->coded_frame->key_frame = 1; return 0; }
false
FFmpeg
d6604b29ef544793479d7fb4e05ef6622bb3e534
static av_cold int pam_encode_init(AVCodecContext *avctx) { avctx->coded_frame = av_frame_alloc(); if (!avctx->coded_frame) return AVERROR(ENOMEM); avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; avctx->coded_frame->key_frame = 1; return 0; }
{ "code": [], "line_no": [] }
static av_cold int FUNC_0(AVCodecContext *avctx) { avctx->coded_frame = av_frame_alloc(); if (!avctx->coded_frame) return AVERROR(ENOMEM); avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; avctx->coded_frame->key_frame = 1; return 0; }
[ "static av_cold int FUNC_0(AVCodecContext *avctx)\n{", "avctx->coded_frame = av_frame_alloc();", "if (!avctx->coded_frame)\nreturn AVERROR(ENOMEM);", "avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;", "avctx->coded_frame->key_frame = 1;", "return 0;", "}" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7, 9 ], [ 13 ], [ 15 ], [ 19 ], [ 21 ] ]
17,422
static int write_l2_entries(BlockDriverState *bs, uint64_t *l2_table, uint64_t l2_offset, int l2_index, int num) { int l2_start_index = l2_index & ~(L1_ENTRIES_PER_SECTOR - 1); int start_offset = (8 * l2_index) & ~511; int end_offset = (8 * (l2_index + num) + 511) & ~511; size_t len = end_offs...
true
qemu
8b3b720620a1137a1b794fc3ed64734236f94e06
static int write_l2_entries(BlockDriverState *bs, uint64_t *l2_table, uint64_t l2_offset, int l2_index, int num) { int l2_start_index = l2_index & ~(L1_ENTRIES_PER_SECTOR - 1); int start_offset = (8 * l2_index) & ~511; int end_offset = (8 * (l2_index + num) + 511) & ~511; size_t len = end_offs...
{ "code": [ " ret = bdrv_pwrite(bs->file, l2_offset + start_offset," ], "line_no": [ 21 ] }
static int FUNC_0(BlockDriverState *VAR_0, uint64_t *VAR_1, uint64_t VAR_2, int VAR_3, int VAR_4) { int VAR_5 = VAR_3 & ~(L1_ENTRIES_PER_SECTOR - 1); int VAR_6 = (8 * VAR_3) & ~511; int VAR_7 = (8 * (VAR_3 + VAR_4) + 511) & ~511; size_t len = VAR_7 - VAR_6; int VAR_8; BLKDBG_EVENT(...
[ "static int FUNC_0(BlockDriverState *VAR_0, uint64_t *VAR_1,\nuint64_t VAR_2, int VAR_3, int VAR_4)\n{", "int VAR_5 = VAR_3 & ~(L1_ENTRIES_PER_SECTOR - 1);", "int VAR_6 = (8 * VAR_3) & ~511;", "int VAR_7 = (8 * (VAR_3 + VAR_4) + 511) & ~511;", "size_t len = VAR_7 - VAR_6;", "int VAR_8;", "BLKDBG_EVENT(V...
[ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 21, 23 ], [ 25 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ] ]
17,423
static void FUNC(put_hevc_qpel_bi_w_h)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int16_t *src2, int height, int denom, int wx0, int wx1, int ox0, int ox1, intptr_t mx, ...
true
FFmpeg
d135f3c514ac1723256c8e0f5cdd466fe98a2578
static void FUNC(put_hevc_qpel_bi_w_h)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int16_t *src2, int height, int denom, int wx0, int wx1, int ox0, int ox1, intptr_t mx, ...
{ "code": [ " ((ox0 + ox1 + 1) << log2Wd)) >> (log2Wd + 1));", " ((ox0 + ox1 + 1) << log2Wd)) >> (log2Wd + 1));" ], "line_no": [ 43, 43 ] }
static void FUNC_0(put_hevc_qpel_bi_w_h)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int16_t *src2, int height, int denom, int wx0, int wx1, int ox0, int ox1, intptr_t mx...
[ "static void FUNC_0(put_hevc_qpel_bi_w_h)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,\nint16_t *src2,\nint height, int denom, int wx0, int wx1,\nint ox0, int ox1, intptr_t mx, intptr_t my, int width)\n{", "int VAR_0, VAR_1;", "pixel *src = (pixel*)_src;", "ptrdiff_t ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7, 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 23 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41, 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ...
17,424
void virtqueue_flush(VirtQueue *vq, unsigned int count) { uint16_t old, new; /* Make sure buffer is written before we update index. */ smp_wmb(); trace_virtqueue_flush(vq, count); old = vq->used_idx; new = old + count; vring_used_idx_set(vq, new); if (unlikely((int16_t)(new - vq->signall...
true
qemu
f5ed36635d8fa73feb66fe12b3b9c2ed90a1adbe
void virtqueue_flush(VirtQueue *vq, unsigned int count) { uint16_t old, new; smp_wmb(); trace_virtqueue_flush(vq, count); old = vq->used_idx; new = old + count; vring_used_idx_set(vq, new); if (unlikely((int16_t)(new - vq->signalled_used) < (uint16_t)(new - old))) vq->signalled_...
{ "code": [], "line_no": [] }
void FUNC_0(VirtQueue *VAR_0, unsigned int VAR_1) { uint16_t old, new; smp_wmb(); trace_virtqueue_flush(VAR_0, VAR_1); old = VAR_0->used_idx; new = old + VAR_1; vring_used_idx_set(VAR_0, new); if (unlikely((int16_t)(new - VAR_0->signalled_used) < (uint16_t)(new - old))) VAR_0->s...
[ "void FUNC_0(VirtQueue *VAR_0, unsigned int VAR_1)\n{", "uint16_t old, new;", "smp_wmb();", "trace_virtqueue_flush(VAR_0, VAR_1);", "old = VAR_0->used_idx;", "new = old + VAR_1;", "vring_used_idx_set(VAR_0, new);", "if (unlikely((int16_t)(new - VAR_0->signalled_used) < (uint16_t)(new - old)))\nVAR_0->...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 2 ], [ 3 ], [ 5 ], [ 6 ], [ 7 ], [ 8 ], [ 9 ], [ 10, 11 ] ]
17,425
static void xbr4x(AVFrame *input, AVFrame *output, const uint32_t *r2y) { const int nl = output->linesize[0]>>2; const int nl1 = nl + nl; const int nl2 = nl1 + nl; uint32_t pprev; uint32_t pprev2; int x, y; for (y = 0; y < input->height; y++) { uint32_t * E = (uint32...
true
FFmpeg
e0704840404381c7b976a35db4004deca4495a22
static void xbr4x(AVFrame *input, AVFrame *output, const uint32_t *r2y) { const int nl = output->linesize[0]>>2; const int nl1 = nl + nl; const int nl2 = nl1 + nl; uint32_t pprev; uint32_t pprev2; int x, y; for (y = 0; y < input->height; y++) { uint32_t * E = (uint32...
{ "code": [ " pprev = pprev2 = 2;", " uint32_t C1 = 0;", " uint32_t PC = 0;", " uint32_t PF = 0;", " uint32_t PI = 0;", " uint32_t I5 = 0;", " uint32_t C4 = 0;", " uint32_t F4 = 0;", " ui...
static void FUNC_0(AVFrame *VAR_0, AVFrame *VAR_1, const uint32_t *VAR_2) { const int VAR_3 = VAR_1->linesize[0]>>2; const int VAR_4 = VAR_3 + VAR_3; const int VAR_5 = VAR_4 + VAR_3; uint32_t pprev; uint32_t pprev2; int VAR_6, VAR_7; for (VAR_7 = 0; VAR_7 < VAR_0->height; VAR_7...
[ "static void FUNC_0(AVFrame *VAR_0, AVFrame *VAR_1, const uint32_t *VAR_2)\n{", "const int VAR_3 = VAR_1->linesize[0]>>2;", "const int VAR_4 = VAR_3 + VAR_3;", "const int VAR_5 = VAR_4 + VAR_3;", "uint32_t pprev;", "uint32_t pprev2;", "int VAR_6, VAR_7;", "for (VAR_7 = 0; VAR_7 < VAR_0->height; VAR_7+...
[ 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1...
[ [ 1, 3 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 23 ], [ 27 ], [ 33 ], [ 37 ], [ 41 ], [ 45 ], [ 49 ], [ 53 ], [ 55 ], [ 57 ], [ 59 ], [ 61 ], [ 63...
17,426
const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src, int *dst_length, int *consumed, int length){ int i, si, di; uint8_t *dst; int bufidx; // src[0]&0x80; //forbidden bit h->nal_ref_idc= src[0]>>5; h->nal_unit_type= src[0]&0x1F; src++; length--; #...
true
FFmpeg
23f5cff92cdcfa55a735c458fcb5f95c0e0f3b1f
const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src, int *dst_length, int *consumed, int length){ int i, si, di; uint8_t *dst; int bufidx; h->nal_ref_idc= src[0]>>5; h->nal_unit_type= src[0]&0x1F; src++; length--; #if HAVE_FAST_UNALIGNED # if HAVE_FAST_64BIT # ...
{ "code": [ " *dst_length= length;", " return src;", " av_fast_malloc(&h->rbsp_buffer[bufidx], &h->rbsp_buffer_size[bufidx], length+FF_INPUT_BUFFER_PADDING_SIZE);" ], "line_no": [ 83, 87, 95 ] }
const uint8_t *FUNC_0(H264Context *h, const uint8_t *src, int *dst_length, int *consumed, int length){ int VAR_0, VAR_1, VAR_2; uint8_t *dst; int VAR_3; h->nal_ref_idc= src[0]>>5; h->nal_unit_type= src[0]&0x1F; src++; length--; #if HAVE_FAST_UNALIGNED # if HAVE_FAST_64BIT # de...
[ "const uint8_t *FUNC_0(H264Context *h, const uint8_t *src, int *dst_length, int *consumed, int length){", "int VAR_0, VAR_1, VAR_2;", "uint8_t *dst;", "int VAR_3;", "h->nal_ref_idc= src[0]>>5;", "h->nal_unit_type= src[0]&0x1F;", "src++; length--;", "#if HAVE_FAST_UNALIGNED\n# if HAVE_FAST_64BIT\n# d...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1 ], [ 3 ], [ 5 ], [ 7 ], [ 13 ], [ 15 ], [ 19 ], [ 23, 25, 27, 29 ], [ 31, 33, 35, 37 ], [ 39, 41, 43 ], [ 45 ], [ 47 ], [ 49, 51, 53 ], [ 55 ], [ 57 ], ...
17,427
static void dct_unquantize_mpeg2_mmx(MpegEncContext *s, DCTELEM *block, int n, int qscale) { int nCoeffs; const UINT16 *quant_matrix; if(s->alternate_scan) nCoeffs= 64; else nCoeffs= nCoeffs= zigzag_end[ s->block_last_index[n] ]; if (s->mb_intra) {...
true
FFmpeg
d7e9533aa06f4073a27812349b35ba5fede11ca1
static void dct_unquantize_mpeg2_mmx(MpegEncContext *s, DCTELEM *block, int n, int qscale) { int nCoeffs; const UINT16 *quant_matrix; if(s->alternate_scan) nCoeffs= 64; else nCoeffs= nCoeffs= zigzag_end[ s->block_last_index[n] ]; if (s->mb_intra) {...
{ "code": [ " quant_matrix = s->non_intra_matrix;", " quant_matrix = s->non_intra_matrix;", "\t);", "\t);", " } else {", " } else {", " quant_matrix = s->non_intra_matrix;", " quant_matrix = s->non_intra_matrix;" ], "line_no": [ 131, 131, ...
static void FUNC_0(MpegEncContext *VAR_0, DCTELEM *VAR_1, int VAR_2, int VAR_3) { int VAR_4; const UINT16 *VAR_5; if(VAR_0->alternate_scan) VAR_4= 64; else VAR_4= VAR_4= zigzag_end[ VAR_0->block_last_index[VAR_2] ]; if (VAR_0->mb_intra) { ...
[ "static void FUNC_0(MpegEncContext *VAR_0,\nDCTELEM *VAR_1, int VAR_2, int VAR_3)\n{", "int VAR_4;", "const UINT16 *VAR_5;", "if(VAR_0->alternate_scan) VAR_4= 64;", "else VAR_4= VAR_4= zigzag_end[ VAR_0->block_last_index[VAR_2] ];", "if (VAR_0->mb_intra) {", "int VAR_6;", "if (VAR_2 < 4)\nVAR_6 = VAR_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15 ], [ 19 ], [ 21 ], [ 23, 25 ], [ 27, 29 ], [ 31 ], [ 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63,...
17,429
static int mov_write_avid_tag(AVIOContext *pb, MOVTrack *track) { int i; avio_wb32(pb, 24); /* size */ ffio_wfourcc(pb, "ACLR"); ffio_wfourcc(pb, "ACLR"); ffio_wfourcc(pb, "0001"); if (track->enc->color_range == AVCOL_RANGE_MPEG || /* Legal range (16-235) */ track->enc->color_ran...
true
FFmpeg
31c7c0e156975be615479948824c1528952c0731
static int mov_write_avid_tag(AVIOContext *pb, MOVTrack *track) { int i; avio_wb32(pb, 24); ffio_wfourcc(pb, "ACLR"); ffio_wfourcc(pb, "ACLR"); ffio_wfourcc(pb, "0001"); if (track->enc->color_range == AVCOL_RANGE_MPEG || track->enc->color_range == AVCOL_RANGE_UNSPECIFIED) { ...
{ "code": [ " avio_wb32(pb, 0);" ], "line_no": [ 97 ] }
static int FUNC_0(AVIOContext *VAR_0, MOVTrack *VAR_1) { int VAR_2; avio_wb32(VAR_0, 24); ffio_wfourcc(VAR_0, "ACLR"); ffio_wfourcc(VAR_0, "ACLR"); ffio_wfourcc(VAR_0, "0001"); if (VAR_1->enc->color_range == AVCOL_RANGE_MPEG || VAR_1->enc->color_range == AVCOL_RANGE_UNSPECIFIED...
[ "static int FUNC_0(AVIOContext *VAR_0, MOVTrack *VAR_1)\n{", "int VAR_2;", "avio_wb32(VAR_0, 24);", "ffio_wfourcc(VAR_0, \"ACLR\");", "ffio_wfourcc(VAR_0, \"ACLR\");", "ffio_wfourcc(VAR_0, \"0001\");", "if (VAR_1->enc->color_range == AVCOL_RANGE_MPEG ||\nVAR_1->enc->color_range == AVCOL_RANGE_UNSPECIFIE...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15, 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 45 ], [...
17,430
static qemu_irq *icp_pic_init(uint32_t base, qemu_irq parent_irq, qemu_irq parent_fiq) { icp_pic_state *s; int iomemtype; qemu_irq *qi; s = (icp_pic_state *)qemu_mallocz(sizeof(icp_pic_state)); if (!s) return NULL; qi = qemu_allocate_irqs(icp_pic_...
true
qemu
187337f8b0ec0813dd3876d1efe37d415fb81c2e
static qemu_irq *icp_pic_init(uint32_t base, qemu_irq parent_irq, qemu_irq parent_fiq) { icp_pic_state *s; int iomemtype; qemu_irq *qi; s = (icp_pic_state *)qemu_mallocz(sizeof(icp_pic_state)); if (!s) return NULL; qi = qemu_allocate_irqs(icp_pic_...
{ "code": [ " cpu_register_physical_memory(base, 0x007fffff, iomemtype);", " cpu_register_physical_memory(base, 0x007fffff, iomemtype);" ], "line_no": [ 33, 33 ] }
static qemu_irq *FUNC_0(uint32_t base, qemu_irq parent_irq, qemu_irq parent_fiq) { icp_pic_state *s; int VAR_0; qemu_irq *qi; s = (icp_pic_state *)qemu_mallocz(sizeof(icp_pic_state)); if (!s) return NULL; qi = qemu_allocate_irqs(icp_pic_set_irq, s...
[ "static qemu_irq *FUNC_0(uint32_t base,\nqemu_irq parent_irq, qemu_irq parent_fiq)\n{", "icp_pic_state *s;", "int VAR_0;", "qemu_irq *qi;", "s = (icp_pic_state *)qemu_mallocz(sizeof(icp_pic_state));", "if (!s)\nreturn NULL;", "qi = qemu_allocate_irqs(icp_pic_set_irq, s, 32);", "s->base = base;", "s-...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17, 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29, 31 ], [ 33 ], [ 37 ], [ 39 ] ]
17,431
static int handle_p_frame_apng(AVCodecContext *avctx, PNGDecContext *s, AVFrame *p) { int i, j; uint8_t *pd = p->data[0]; uint8_t *pd_last = s->last_picture.f->data[0]; uint8_t *pd_last_region = s->dispose_op == APNG_DISPOSE_OP_PREVIOUS ? ...
false
FFmpeg
0f6931f4b60cf1e65fd9a5da791c8ee913053f52
static int handle_p_frame_apng(AVCodecContext *avctx, PNGDecContext *s, AVFrame *p) { int i, j; uint8_t *pd = p->data[0]; uint8_t *pd_last = s->last_picture.f->data[0]; uint8_t *pd_last_region = s->dispose_op == APNG_DISPOSE_OP_PREVIOUS ? ...
{ "code": [], "line_no": [] }
static int FUNC_0(AVCodecContext *VAR_0, PNGDecContext *VAR_1, AVFrame *VAR_2) { int VAR_3, VAR_4; uint8_t *pd = VAR_2->data[0]; uint8_t *pd_last = VAR_1->last_picture.f->data[0]; uint8_t *pd_last_region = VAR_1->dispose_op == APNG_DISPOSE_OP_PREVIOUS ? ...
[ "static int FUNC_0(AVCodecContext *VAR_0, PNGDecContext *VAR_1,\nAVFrame *VAR_2)\n{", "int VAR_3, VAR_4;", "uint8_t *pd = VAR_2->data[0];", "uint8_t *pd_last = VAR_1->last_picture.f->data[0];", "uint8_t *pd_last_region = VAR_1->dispose_op == APNG_DISPOSE_OP_PREVIOUS ?\nVAR_1->previous_picture.f->data[0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13, 15 ], [ 17 ], [ 21, 23 ], [ 25, 27 ], [ 29 ], [ 31 ], [ 35 ], [ 37, 39 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [...
17,432
static int nprobe(AVFormatContext *s, uint8_t *enc_header, int size, const uint8_t *n_val) { OMAContext *oc = s->priv_data; uint32_t pos, taglen, datalen; struct AVDES av_des; if (!enc_header || !n_val) return -1; pos = OMA_ENC_HEADER_SIZE + oc->k_size; if (!memcmp(&enc_heade...
false
FFmpeg
f1d6f013b2078140fb701978d720abecde7cd73f
static int nprobe(AVFormatContext *s, uint8_t *enc_header, int size, const uint8_t *n_val) { OMAContext *oc = s->priv_data; uint32_t pos, taglen, datalen; struct AVDES av_des; if (!enc_header || !n_val) return -1; pos = OMA_ENC_HEADER_SIZE + oc->k_size; if (!memcmp(&enc_heade...
{ "code": [], "line_no": [] }
static int FUNC_0(AVFormatContext *VAR_0, uint8_t *VAR_1, int VAR_2, const uint8_t *VAR_3) { OMAContext *oc = VAR_0->priv_data; uint32_t pos, taglen, datalen; struct AVDES VAR_4; if (!VAR_1 || !VAR_3) return -1; pos = OMA_ENC_HEADER_SIZE + oc->k_size; if (!memcmp(&VAR_1[pos],...
[ "static int FUNC_0(AVFormatContext *VAR_0, uint8_t *VAR_1, int VAR_2, const uint8_t *VAR_3)\n{", "OMAContext *oc = VAR_0->priv_data;", "uint32_t pos, taglen, datalen;", "struct AVDES VAR_4;", "if (!VAR_1 || !VAR_3)\nreturn -1;", "pos = OMA_ENC_HEADER_SIZE + oc->k_size;", "if (!memcmp(&VAR_1[pos], \"EKB ...
[ 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 ], [ 27, 29 ], [ 33 ], [ 35 ], [ 39, 41 ], [ 45 ], [ 49 ], [ 51 ], [ 53 ], [ 55 ], [ 57, 59 ], [...
17,433
REORDER_OUT_50(int8, int8_t) REORDER_OUT_51(int8, int8_t) REORDER_OUT_71(int8, int8_t) REORDER_OUT_50(int16, int16_t) REORDER_OUT_51(int16, int16_t) REORDER_OUT_71(int16, int16_t) REORDER_OUT_50(int32, int32_t) REORDER_OUT_51(int32, int32_t) REORDER_OUT_71(int32, int32_t) REORDER_OUT_50(f32, float) REORDER_OU...
false
FFmpeg
cc276c85d15272df6e44fb3252657a43cbd49555
REORDER_OUT_50(int8, int8_t) REORDER_OUT_51(int8, int8_t) REORDER_OUT_71(int8, int8_t) REORDER_OUT_50(int16, int16_t) REORDER_OUT_51(int16, int16_t) REORDER_OUT_71(int16, int16_t) REORDER_OUT_50(int32, int32_t) REORDER_OUT_51(int32, int32_t) REORDER_OUT_71(int32, int32_t) REORDER_OUT_50(f32, float) REORDER_OU...
{ "code": [], "line_no": [] }
REORDER_OUT_50(int8, int8_t) REORDER_OUT_51(int8, int8_t) REORDER_OUT_71(int8, int8_t) REORDER_OUT_50(int16, int16_t) REORDER_OUT_51(int16, int16_t) REORDER_OUT_71(int16, int16_t) REORDER_OUT_50(int32, int32_t) REORDER_OUT_51(int32, int32_t) REORDER_OUT_71(int32, int32_t) REORDER_OUT_50(f32, float) REORDER_OU...
[ "REORDER_OUT_50(int8, int8_t)\nREORDER_OUT_51(int8, int8_t)\nREORDER_OUT_71(int8, int8_t)\nREORDER_OUT_50(int16, int16_t)\nREORDER_OUT_51(int16, int16_t)\nREORDER_OUT_71(int16, int16_t)\nREORDER_OUT_50(int32, int32_t)\nREORDER_OUT_51(int32, int32_t)\nREORDER_OUT_71(int32, int32_t)\nREORDER_OUT_50(f32, float)\nREORD...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 27, 29, 31, 33, 37, 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 53, 55 ], [ 57 ], [ 63, 65 ], [ 71, 73 ], [...
17,434
static inline void RENAME(rgb24ToY)(uint8_t *dst, uint8_t *src, int width) { int i; for(i=0; i<width; i++) { int r= src[i*3+0]; int g= src[i*3+1]; int b= src[i*3+2]; dst[i]= ((RY*r + GY*g + BY*b + (33<<(RGB2YUV_SHIFT-1)) )>>RGB2YUV_SHIFT); } }
true
FFmpeg
2da0d70d5eebe42f9fcd27ee554419ebe2a5da06
static inline void RENAME(rgb24ToY)(uint8_t *dst, uint8_t *src, int width) { int i; for(i=0; i<width; i++) { int r= src[i*3+0]; int g= src[i*3+1]; int b= src[i*3+2]; dst[i]= ((RY*r + GY*g + BY*b + (33<<(RGB2YUV_SHIFT-1)) )>>RGB2YUV_SHIFT); } }
{ "code": [ "\tint i;", "\tint i;", "\tint i;", "\tint i;", "\tfor(i=0; i<width; i++)", "\tint i;", "\tfor(i=0; i<width; i++)", "\tint i;", "\tfor(i=0; i<width; i++)", "\tint i;", "\tfor(i=0; i<width; i++)", "\tint i;", "\tfor(i=0; i<width; i++)", "\t\tdst[i]= (...
static inline void FUNC_0(rgb24ToY)(uint8_t *dst, uint8_t *src, int width) { int VAR_0; for(VAR_0=0; VAR_0<width; VAR_0++) { int r= src[VAR_0*3+0]; int g= src[VAR_0*3+1]; int b= src[VAR_0*3+2]; dst[VAR_0]= ((RY*r + GY*g + BY*b + (33<<(RGB2YUV_SHIFT-1)) )>>RGB2YUV_SHIFT); } }
[ "static inline void FUNC_0(rgb24ToY)(uint8_t *dst, uint8_t *src, int width)\n{", "int VAR_0;", "for(VAR_0=0; VAR_0<width; VAR_0++)", "{", "int r= src[VAR_0*3+0];", "int g= src[VAR_0*3+1];", "int b= src[VAR_0*3+2];", "dst[VAR_0]= ((RY*r + GY*g + BY*b + (33<<(RGB2YUV_SHIFT-1)) )>>RGB2YUV_SHIFT);", "}"...
[ 0, 1, 1, 0, 1, 1, 1, 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 21 ], [ 23 ] ]
17,435
static void dcr_write_pob (void *opaque, int dcrn, uint32_t val) { ppc4xx_pob_t *pob; pob = opaque; switch (dcrn) { case POB0_BEAR: /* Read only */ break; case POB0_BESR0: case POB0_BESR1: /* Write-clear */ pob->besr[dcrn - POB0_BESR0] &= ~val; ...
true
qemu
5a1972c8472fafd519a68b689fdcaf33ec857945
static void dcr_write_pob (void *opaque, int dcrn, uint32_t val) { ppc4xx_pob_t *pob; pob = opaque; switch (dcrn) { case POB0_BEAR: break; case POB0_BESR0: case POB0_BESR1: pob->besr[dcrn - POB0_BESR0] &= ~val; break; } }
{ "code": [ " pob->besr[dcrn - POB0_BESR0] &= ~val;" ], "line_no": [ 25 ] }
static void FUNC_0 (void *VAR_0, int VAR_1, uint32_t VAR_2) { ppc4xx_pob_t *pob; pob = VAR_0; switch (VAR_1) { case POB0_BEAR: break; case POB0_BESR0: case POB0_BESR1: pob->besr[VAR_1 - POB0_BESR0] &= ~VAR_2; break; } }
[ "static void FUNC_0 (void *VAR_0, int VAR_1, uint32_t VAR_2)\n{", "ppc4xx_pob_t *pob;", "pob = VAR_0;", "switch (VAR_1) {", "case POB0_BEAR:\nbreak;", "case POB0_BESR0:\ncase POB0_BESR1:\npob->besr[VAR_1 - POB0_BESR0] &= ~VAR_2;", "break;", "}", "}" ]
[ 0, 0, 0, 0, 0, 1, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13, 17 ], [ 19, 21, 25 ], [ 27 ], [ 29 ], [ 31 ] ]
17,436
static inline void yuv2yuvXinC(int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize, int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize, uint8_t *dest, uint8_t *uDest, uint8_t *vDest, int dstW, int chrDstW) { //FIXME Optimize (just quickly writen not opti..) int i; for(i=0; i<dstW; i++)...
true
FFmpeg
221b804f3491638ecf2eec1302c669ad2d9ec799
static inline void yuv2yuvXinC(int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize, int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize, uint8_t *dest, uint8_t *uDest, uint8_t *vDest, int dstW, int chrDstW) { int i; for(i=0; i<dstW; i++) { int val=1<<18; int j; for(j=0; j<lu...
{ "code": [ "\tint i;", "\t\t\t\t int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,", "\t\t\t\t uint8_t *dest, uint8_t *uDest, uint8_t *vDest, int dstW, int chrDstW)", "\tint i;", "\tfor(i=0; i<dstW; i++)", "\t\tint val=1<<18;", "\t\tint j;", "\t\tfor(j=0; j<lumFilterSize;...
static inline void FUNC_0(int16_t *VAR_0, int16_t **VAR_1, int VAR_2, int16_t *VAR_3, int16_t **VAR_4, int VAR_5, uint8_t *VAR_6, uint8_t *VAR_7, uint8_t *VAR_8, int VAR_9, int VAR_10) { int VAR_11; for(VAR_11=0; VAR_11<VAR_9; VAR_11++) { int VAR_12=1<<18; int VAR_16; for(VAR_16=0; ...
[ "static inline void FUNC_0(int16_t *VAR_0, int16_t **VAR_1, int VAR_2,\nint16_t *VAR_3, int16_t **VAR_4, int VAR_5,\nuint8_t *VAR_6, uint8_t *VAR_7, uint8_t *VAR_8, int VAR_9, int VAR_10)\n{", "int VAR_11;", "for(VAR_11=0; VAR_11<VAR_9; VAR_11++)", "{", "int VAR_12=1<<18;", "int VAR_16;", "for(VAR_16=0;...
[ 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0 ]
[ [ 1, 3, 5, 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 27 ], [ 29 ], [ 33, 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], ...
17,437
static int mjpeg_decode_com(MJpegDecodeContext *s) { int i; UINT8 *cbuf; /* XXX: verify len field validity */ unsigned int len = get_bits(&s->gb, 16)-2; cbuf = av_malloc(len+1); for (i = 0; i < len; i++) cbuf[i] = get_bits(&s->gb, 8); if (cbuf[i-1] == '\n') cbuf[i-1] = 0; ...
false
FFmpeg
dce778e0ea295db541e43b0850d3a7ef873996cc
static int mjpeg_decode_com(MJpegDecodeContext *s) { int i; UINT8 *cbuf; unsigned int len = get_bits(&s->gb, 16)-2; cbuf = av_malloc(len+1); for (i = 0; i < len; i++) cbuf[i] = get_bits(&s->gb, 8); if (cbuf[i-1] == '\n') cbuf[i-1] = 0; else cbuf[i] = 0; printf(...
{ "code": [], "line_no": [] }
static int FUNC_0(MJpegDecodeContext *VAR_0) { int VAR_1; UINT8 *cbuf; unsigned int VAR_2 = get_bits(&VAR_0->gb, 16)-2; cbuf = av_malloc(VAR_2+1); for (VAR_1 = 0; VAR_1 < VAR_2; VAR_1++) cbuf[VAR_1] = get_bits(&VAR_0->gb, 8); if (cbuf[VAR_1-1] == '\n') cbuf[VAR_1-1] = 0; ...
[ "static int FUNC_0(MJpegDecodeContext *VAR_0)\n{", "int VAR_1;", "UINT8 *cbuf;", "unsigned int VAR_2 = get_bits(&VAR_0->gb, 16)-2;", "cbuf = av_malloc(VAR_2+1);", "for (VAR_1 = 0; VAR_1 < VAR_2; VAR_1++)", "cbuf[VAR_1] = get_bits(&VAR_0->gb, 8);", "if (cbuf[VAR_1-1] == '\\n')\ncbuf[VAR_1-1] = 0;", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 13 ], [ 15 ], [ 19 ], [ 21 ], [ 23, 25 ], [ 27, 29 ], [ 33 ], [ 39, 41 ], [ 43 ], [ 49 ], [ 53 ], [ 57 ], [ 59 ] ]
17,438
static int doTest(uint8_t *ref[4], int refStride[4], int w, int h, int srcFormat, int dstFormat, int srcW, int srcH, int dstW, int dstH, int flags){ uint8_t *src[4] = {0}; uint8_t *dst[4] = {0}; uint8_t *out[4] = {0}; int srcStride[4], dstStride[4]; int i; uint64_t ssdY,...
false
FFmpeg
f5a9c4ee50ce5d51c8f7f0f23f63f76bbf40a9a1
static int doTest(uint8_t *ref[4], int refStride[4], int w, int h, int srcFormat, int dstFormat, int srcW, int srcH, int dstW, int dstH, int flags){ uint8_t *src[4] = {0}; uint8_t *dst[4] = {0}; uint8_t *out[4] = {0}; int srcStride[4], dstStride[4]; int i; uint64_t ssdY,...
{ "code": [], "line_no": [] }
static int FUNC_0(uint8_t *VAR_0[4], int VAR_1[4], int VAR_2, int VAR_3, int VAR_4, int VAR_5, int VAR_6, int VAR_7, int VAR_8, int VAR_9, int VAR_10){ uint8_t *src[4] = {0}; uint8_t *dst[4] = {0}; uint8_t *out[4] = {0}; int VAR_11[4], VAR_12[4]; int VAR_13; uint64_t ssd...
[ "static int FUNC_0(uint8_t *VAR_0[4], int VAR_1[4], int VAR_2, int VAR_3, int VAR_4, int VAR_5,\nint VAR_6, int VAR_7, int VAR_8, int VAR_9, int VAR_10){", "uint8_t *src[4] = {0};", "uint8_t *dst[4] = {0};", "uint8_t *out[4] = {0};", "int VAR_11[4], VAR_12[4];", "int VAR_13;", "uint64_t ssdY, ssdU, ssdV...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 33 ], [ 35, 37 ], [ 39, 41 ], [ 45, 47 ], [ 49, 51 ], [ 53,...
17,440
static ram_addr_t get_start_block(DumpState *s) { RAMBlock *block; if (!s->has_filter) { s->block = QTAILQ_FIRST(&ram_list.blocks); return 0; } QTAILQ_FOREACH(block, &ram_list.blocks, next) { if (block->offset >= s->begin + s->length || block->offset + bl...
true
qemu
56c4bfb3f07f3107894c00281276aea4f5e8834d
static ram_addr_t get_start_block(DumpState *s) { RAMBlock *block; if (!s->has_filter) { s->block = QTAILQ_FIRST(&ram_list.blocks); return 0; } QTAILQ_FOREACH(block, &ram_list.blocks, next) { if (block->offset >= s->begin + s->length || block->offset + bl...
{ "code": [ " RAMBlock *block;", " RAMBlock *block;", " QTAILQ_FOREACH(block, &ram_list.blocks, next) {", " s->block = block;", " RAMBlock *block;", " RAMBlock *block;", " s->block = QTAILQ_FIRST(&ram_list.blocks);", " QTAILQ_FOREACH(block, &ram_list.blo...
static ram_addr_t FUNC_0(DumpState *s) { RAMBlock *block; if (!s->has_filter) { s->block = QTAILQ_FIRST(&ram_list.blocks); return 0; } QTAILQ_FOREACH(block, &ram_list.blocks, next) { if (block->offset >= s->begin + s->length || block->offset + block->leng...
[ "static ram_addr_t FUNC_0(DumpState *s)\n{", "RAMBlock *block;", "if (!s->has_filter) {", "s->block = QTAILQ_FIRST(&ram_list.blocks);", "return 0;", "}", "QTAILQ_FOREACH(block, &ram_list.blocks, next) {", "if (block->offset >= s->begin + s->length ||\nblock->offset + block->length <= s->begin) {", "...
[ 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 21, 23 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 51 ], ...
17,441
static int get_cluster_table(BlockDriverState *bs, uint64_t offset, uint64_t **new_l2_table, int *new_l2_index) { BDRVQcowState *s = bs->opaque; unsigned int l1_index, l2_index; uint64_t l2_offset; uint64_t *l2_table = NULL; int ret; ...
true
qemu
2cf7cfa1cde6672b8a35bbed3fbc989f28c05dce
static int get_cluster_table(BlockDriverState *bs, uint64_t offset, uint64_t **new_l2_table, int *new_l2_index) { BDRVQcowState *s = bs->opaque; unsigned int l1_index, l2_index; uint64_t l2_offset; uint64_t *l2_table = NULL; int ret; ...
{ "code": [ " unsigned int l1_index, l2_index;", " unsigned int l1_index, l2_index;", " uint64_t l2_offset;" ], "line_no": [ 11, 11, 13 ] }
static int FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1, uint64_t **VAR_2, int *VAR_3) { BDRVQcowState *s = VAR_0->opaque; unsigned int VAR_4, VAR_5; uint64_t l2_offset; uint64_t *l2_table = NULL; int VAR_6; VAR_4 = V...
[ "static int FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1,\nuint64_t **VAR_2,\nint *VAR_3)\n{", "BDRVQcowState *s = VAR_0->opaque;", "unsigned int VAR_4, VAR_5;", "uint64_t l2_offset;", "uint64_t *l2_table = NULL;", "int VAR_6;", "VAR_4 = VAR_1 >> (s->l2_bits + s->cluster_bits);", "if (VAR_4 >= s->l1...
[ 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 ]
[ [ 1, 3, 5, 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 41 ], [ 49 ], [ 53 ], [ 55 ], [ 57 ], [ 59 ...
17,442
static void gem_write(void *opaque, hwaddr offset, uint64_t val, unsigned size) { CadenceGEMState *s = (CadenceGEMState *)opaque; uint32_t readonly; int i; DB_PRINT("offset: 0x%04x write: 0x%08x ", (unsigned)offset, (unsigned)val); offset >>= 2; /* Squash bits which are read ...
true
qemu
79b2ac8f28748b09816d09bd62a2b49ddc01ebeb
static void gem_write(void *opaque, hwaddr offset, uint64_t val, unsigned size) { CadenceGEMState *s = (CadenceGEMState *)opaque; uint32_t readonly; int i; DB_PRINT("offset: 0x%04x write: 0x%08x ", (unsigned)offset, (unsigned)val); offset >>= 2; val &= ~(s->regs_ro[offs...
{ "code": [ " case GEM_RECEIVE_Q1_PTR ... GEM_RECEIVE_Q15_PTR:", " case GEM_TRANSMIT_Q1_PTR ... GEM_TRANSMIT_Q15_PTR:", " case GEM_INT_Q8_ENABLE ... GEM_INT_Q15_ENABLE:", " s->regs[GEM_INT_Q8_MASK + offset - GEM_INT_Q8_ENABLE] &= ~val;", " gem_update_int_status(s);", " ...
static void FUNC_0(void *VAR_0, hwaddr VAR_1, uint64_t VAR_2, unsigned VAR_3) { CadenceGEMState *s = (CadenceGEMState *)VAR_0; uint32_t readonly; int VAR_4; DB_PRINT("VAR_1: 0x%04x write: 0x%08x ", (unsigned)VAR_1, (unsigned)VAR_2); VAR_1 >>= 2; VAR_2 &= ~(s->regs_ro[VA...
[ "static void FUNC_0(void *VAR_0, hwaddr VAR_1, uint64_t VAR_2,\nunsigned VAR_3)\n{", "CadenceGEMState *s = (CadenceGEMState *)VAR_0;", "uint32_t readonly;", "int VAR_4;", "DB_PRINT(\"VAR_1: 0x%04x write: 0x%08x \", (unsigned)VAR_1, (unsigned)VAR_2);", "VAR_1 >>= 2;", "VAR_2 &= ~(s->regs_ro[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, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 23 ], [ 27 ], [ 33 ], [ 39 ], [ 45 ], [ 47, 49 ], [ 51 ], [ 53 ], [ 55 ], [ 57 ], [ 59 ], [ 61 ], [ 63 ...
17,443
static int16_t g726_decode(G726Context* c, int I) { int dq, re_signal, pk0, fa1, i, tr, ylint, ylfrac, thr2, al, dq0; Float11 f; int I_sig= I >> (c->code_size - 1); dq = inverse_quant(c, I); /* Transition detect */ ylint = (c->yl >> 15); ylfrac = (c->yl >> 10) & 0x1f; thr2 =...
true
FFmpeg
c04aa148824f4fb7f4b70830ad3ca7a6cba8ab79
static int16_t g726_decode(G726Context* c, int I) { int dq, re_signal, pk0, fa1, i, tr, ylint, ylfrac, thr2, al, dq0; Float11 f; int I_sig= I >> (c->code_size - 1); dq = inverse_quant(c, I); ylint = (c->yl >> 15); ylfrac = (c->yl >> 10) & 0x1f; thr2 = (ylint > 9) ? 0x1f << ...
{ "code": [ " return av_clip(re_signal << 2, -0xffff, 0xffff);" ], "line_no": [ 159 ] }
static int16_t FUNC_0(G726Context* c, int I) { int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10; Float11 f; int VAR_11= I >> (c->code_size - 1); VAR_0 = inverse_quant(c, I); VAR_6 = (c->yl >> 15); VAR_7 = (c->yl >> 10) & 0x1f; VAR_8 = (VAR_6 ...
[ "static int16_t FUNC_0(G726Context* c, int I)\n{", "int VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;", "Float11 f;", "int VAR_11= I >> (c->code_size - 1);", "VAR_0 = inverse_quant(c, I);", "VAR_6 = (c->yl >> 15);", "VAR_7 = (c->yl >> 10) & 0x1f;", "VAR_8 = (VAR_6 > 9) ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 13 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 29, 31 ], [ 33 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [ 53 ], [...
17,444
void pl050_init(uint32_t base, qemu_irq irq, int is_mouse) { int iomemtype; pl050_state *s; s = (pl050_state *)qemu_mallocz(sizeof(pl050_state)); iomemtype = cpu_register_io_memory(0, pl050_readfn, pl050_writefn, s); cpu_register_physical_memory(base, ...
true
qemu
187337f8b0ec0813dd3876d1efe37d415fb81c2e
void pl050_init(uint32_t base, qemu_irq irq, int is_mouse) { int iomemtype; pl050_state *s; s = (pl050_state *)qemu_mallocz(sizeof(pl050_state)); iomemtype = cpu_register_io_memory(0, pl050_readfn, pl050_writefn, s); cpu_register_physical_memory(base, ...
{ "code": [ " cpu_register_physical_memory(base, 0x00000fff, iomemtype);", " cpu_register_physical_memory(base, 0x00000fff, iomemtype);", " cpu_register_physical_memory(base, 0x00000fff, iomemtype);", " cpu_register_physical_memory(base, 0x00000fff, iomemtype);", " cpu_register_phys...
void FUNC_0(uint32_t VAR_0, qemu_irq VAR_1, int VAR_2) { int VAR_3; pl050_state *s; s = (pl050_state *)qemu_mallocz(sizeof(pl050_state)); VAR_3 = cpu_register_io_memory(0, pl050_readfn, pl050_writefn, s); cpu_register_physical_memory(VAR_0, 0x00000fff,...
[ "void FUNC_0(uint32_t VAR_0, qemu_irq VAR_1, int VAR_2)\n{", "int VAR_3;", "pl050_state *s;", "s = (pl050_state *)qemu_mallocz(sizeof(pl050_state));", "VAR_3 = cpu_register_io_memory(0, pl050_readfn,\npl050_writefn, s);", "cpu_register_physical_memory(VAR_0, 0x00000fff, VAR_3);", "s->VAR_0 = VAR_0;", ...
[ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13, 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25, 27 ], [ 29, 31 ], [ 35 ] ]
17,445
static int matroska_parse_cluster(MatroskaDemuxContext *matroska) { MatroskaCluster cluster = { 0 }; EbmlList *blocks_list; MatroskaBlock *blocks; int i, res; int64_t pos = url_ftell(matroska->ctx->pb); matroska->prev_pkt = NULL; if (matroska->has_cluster_id){ /* For the fir...
true
FFmpeg
37dd235658bc797667ec842abaed19169a36e6e5
static int matroska_parse_cluster(MatroskaDemuxContext *matroska) { MatroskaCluster cluster = { 0 }; EbmlList *blocks_list; MatroskaBlock *blocks; int i, res; int64_t pos = url_ftell(matroska->ctx->pb); matroska->prev_pkt = NULL; if (matroska->has_cluster_id){ re...
{ "code": [ " if (blocks[i].bin.size > 0) {" ], "line_no": [ 41 ] }
static int FUNC_0(MatroskaDemuxContext *VAR_0) { MatroskaCluster cluster = { 0 }; EbmlList *blocks_list; MatroskaBlock *blocks; int VAR_1, VAR_2; int64_t pos = url_ftell(VAR_0->ctx->pb); VAR_0->prev_pkt = NULL; if (VAR_0->has_cluster_id){ VAR_2 = ebml_parse_id(VA...
[ "static int FUNC_0(MatroskaDemuxContext *VAR_0)\n{", "MatroskaCluster cluster = { 0 };", "EbmlList *blocks_list;", "MatroskaBlock *blocks;", "int VAR_1, VAR_2;", "int64_t pos = url_ftell(VAR_0->ctx->pb);", "VAR_0->prev_pkt = NULL;", "if (VAR_0->has_cluster_id){", "VAR_2 = ebml_parse_id(VAR_0, matros...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 23, 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45, 47,...
17,446
static av_cold void init_mdct_win(TwinContext *tctx) { int i,j; const ModeTab *mtab = tctx->mtab; int size_s = mtab->size / mtab->fmode[FT_SHORT].sub; int size_m = mtab->size / mtab->fmode[FT_MEDIUM].sub; int channels = tctx->avctx->channels; float norm = channels == 1 ? 2. : 1.; f...
true
FFmpeg
a8a6da4a0e059b2aab66627a96b63c3632c477c2
static av_cold void init_mdct_win(TwinContext *tctx) { int i,j; const ModeTab *mtab = tctx->mtab; int size_s = mtab->size / mtab->fmode[FT_SHORT].sub; int size_m = mtab->size / mtab->fmode[FT_MEDIUM].sub; int channels = tctx->avctx->channels; float norm = channels == 1 ? 2. : 1.; f...
{ "code": [ "static av_cold void init_mdct_win(TwinContext *tctx)", " int i,j;", " ff_mdct_init(&tctx->mdct_ctx[i], av_log2(bsize) + 1, 1,", " -sqrt(norm/bsize) / (1<<15));", " tctx->tmp_buf = av_malloc(mtab->size * sizeof(*tctx->tmp_buf));", " t...
static av_cold void FUNC_0(TwinContext *tctx) { int VAR_0,VAR_1; const ModeTab *VAR_2 = tctx->VAR_2; int VAR_3 = VAR_2->size / VAR_2->fmode[FT_SHORT].sub; int VAR_4 = VAR_2->size / VAR_2->fmode[FT_MEDIUM].sub; int VAR_5 = tctx->avctx->VAR_5; float VAR_6 = VAR_5 == 1 ? 2. : 1.; for ...
[ "static av_cold void FUNC_0(TwinContext *tctx)\n{", "int VAR_0,VAR_1;", "const ModeTab *VAR_2 = tctx->VAR_2;", "int VAR_3 = VAR_2->size / VAR_2->fmode[FT_SHORT].sub;", "int VAR_4 = VAR_2->size / VAR_2->fmode[FT_MEDIUM].sub;", "int VAR_5 = tctx->avctx->VAR_5;", "float VAR_6 = VAR_5 == 1 ? 2. : 1.;", "f...
[ 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 21 ], [ 23, 25 ], [ 27 ], [ 31 ], [ 35 ], [ 37 ], [ 39 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [...
17,450
static MemTxResult memory_region_oldmmio_write_accessor(MemoryRegion *mr, hwaddr addr, uint64_t *value, unsigned size, ...
true
qemu
f2d089425d43735b5369f70f3a36b712440578e5
static MemTxResult memory_region_oldmmio_write_accessor(MemoryRegion *mr, hwaddr addr, uint64_t *value, unsigned size, ...
{ "code": [], "line_no": [] }
static MemTxResult FUNC_0(MemoryRegion *mr, hwaddr addr, uint64_t *value, unsigned size, uns...
[ "static MemTxResult FUNC_0(MemoryRegion *mr,\nhwaddr addr,\nuint64_t *value,\nunsigned size,\nunsigned shift,\nuint64_t mask,\nMemTxAttrs attrs)\n{", "uint64_t tmp;", "tmp = (*value >> shift) & mask;", "if (mr->subpage) {", "trace_memory_region_subpage_write(get_cpu_index(), mr, addr, tmp, size);", "} els...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7, 9, 11, 13, 15 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 32 ], [ 34 ], [ 36 ], [ 38 ], [ 40 ], [ 42 ], [ 44 ] ]
17,451
static av_cold int aacPlus_encode_init(AVCodecContext *avctx) { aacPlusAudioContext *s = avctx->priv_data; aacplusEncConfiguration *aacplus_cfg; /* number of channels */ if (avctx->channels < 1 || avctx->channels > 2) { av_log(avctx, AV_LOG_ERROR, "encoding %d channel(s) is not allowed\n...
false
FFmpeg
963c58006f9ef2dc71f5f4b564e6d34892287c5e
static av_cold int aacPlus_encode_init(AVCodecContext *avctx) { aacPlusAudioContext *s = avctx->priv_data; aacplusEncConfiguration *aacplus_cfg; if (avctx->channels < 1 || avctx->channels > 2) { av_log(avctx, AV_LOG_ERROR, "encoding %d channel(s) is not allowed\n", avctx->channels); ...
{ "code": [], "line_no": [] }
static av_cold int FUNC_0(AVCodecContext *avctx) { aacPlusAudioContext *s = avctx->priv_data; aacplusEncConfiguration *aacplus_cfg; if (avctx->channels < 1 || avctx->channels > 2) { av_log(avctx, AV_LOG_ERROR, "encoding %d channel(s) is not allowed\n", avctx->channels); return ...
[ "static av_cold int FUNC_0(AVCodecContext *avctx)\n{", "aacPlusAudioContext *s = avctx->priv_data;", "aacplusEncConfiguration *aacplus_cfg;", "if (avctx->channels < 1 || avctx->channels > 2) {", "av_log(avctx, AV_LOG_ERROR, \"encoding %d channel(s) is not allowed\\n\", avctx->channels);", "return -1;", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 23, 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 39 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [ 53 ], [ 57 ], ...
17,453
static uint64_t get_v(ByteIOContext *bc) { uint64_t val = 0; for(; bytes_left(bc) > 0; ) { int tmp = get_byte(bc); if (tmp&0x80) val= (val<<7) + tmp - 0x80; else return (val<<7) + tmp; } return -1; }
false
FFmpeg
465e1dadbef7596a3eb87089a66bb4ecdc26d3c4
static uint64_t get_v(ByteIOContext *bc) { uint64_t val = 0; for(; bytes_left(bc) > 0; ) { int tmp = get_byte(bc); if (tmp&0x80) val= (val<<7) + tmp - 0x80; else return (val<<7) + tmp; } return -1; }
{ "code": [], "line_no": [] }
static uint64_t FUNC_0(ByteIOContext *bc) { uint64_t val = 0; for(; bytes_left(bc) > 0; ) { int tmp = get_byte(bc); if (tmp&0x80) val= (val<<7) + tmp - 0x80; else return (val<<7) + tmp; } return -1; }
[ "static uint64_t FUNC_0(ByteIOContext *bc)\n{", "uint64_t val = 0;", "for(; bytes_left(bc) > 0; )", "{", "int tmp = get_byte(bc);", "if (tmp&0x80)\nval= (val<<7) + tmp - 0x80;", "else\nreturn (val<<7) + tmp;", "}", "return -1;", "}" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 17, 19 ], [ 21, 23 ], [ 25 ], [ 27 ], [ 29 ] ]
17,455
static av_cold int libgsm_close(AVCodecContext *avctx) { gsm_destroy(avctx->priv_data); avctx->priv_data = NULL; return 0; }
true
FFmpeg
916ff02261f79e759d996c76670958276276bf2a
static av_cold int libgsm_close(AVCodecContext *avctx) { gsm_destroy(avctx->priv_data); avctx->priv_data = NULL; return 0; }
{ "code": [], "line_no": [] }
static av_cold int FUNC_0(AVCodecContext *avctx) { gsm_destroy(avctx->priv_data); avctx->priv_data = NULL; return 0; }
[ "static av_cold int FUNC_0(AVCodecContext *avctx) {", "gsm_destroy(avctx->priv_data);", "avctx->priv_data = NULL;", "return 0;", "}" ]
[ 0, 0, 0, 0, 0 ]
[ [ 1 ], [ 4 ], [ 6 ], [ 8 ], [ 10 ] ]
17,456
static int mov_open_dref(ByteIOContext **pb, char *src, MOVDref *ref) { /* try absolute path */ if (!url_fopen(pb, ref->path, URL_RDONLY)) return 0; /* try relative path */ if (ref->nlvl_to > 0 && ref->nlvl_from > 0) { char filename[1024]; char *src_path; int i...
true
FFmpeg
6a2459059e469fdb835ff4abcbc3bae9781116b3
static int mov_open_dref(ByteIOContext **pb, char *src, MOVDref *ref) { if (!url_fopen(pb, ref->path, URL_RDONLY)) return 0; if (ref->nlvl_to > 0 && ref->nlvl_from > 0) { char filename[1024]; char *src_path; int i, l; src_path = strrchr(s...
{ "code": [ " if (!url_fopen(pb, ref->path, URL_RDONLY))", " return 0;" ], "line_no": [ 7, 9 ] }
static int FUNC_0(ByteIOContext **VAR_0, char *VAR_1, MOVDref *VAR_2) { if (!url_fopen(VAR_0, VAR_2->path, URL_RDONLY)) return 0; if (VAR_2->nlvl_to > 0 && VAR_2->nlvl_from > 0) { char VAR_3[1024]; char *VAR_4; int VAR_5, VAR_6; VAR_4 = s...
[ "static int FUNC_0(ByteIOContext **VAR_0, char *VAR_1, MOVDref *VAR_2)\n{", "if (!url_fopen(VAR_0, VAR_2->path, URL_RDONLY))\nreturn 0;", "if (VAR_2->nlvl_to > 0 && VAR_2->nlvl_from > 0) {", "char VAR_3[1024];", "char *VAR_4;", "int VAR_5, VAR_6;", "VAR_4 = strrchr(VAR_1, '/');", "if (VAR_4)\nVAR_4++;...
[ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 7, 9 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 27 ], [ 29, 31 ], [ 33, 35 ], [ 41 ], [ 43 ], [ 45, 47 ], [ 49, 51 ], [ 53 ], [ 59 ], [ 61 ], [ 63 ], ...
17,459
FWCfgState *fw_cfg_init(uint32_t ctl_port, uint32_t data_port, hwaddr ctl_addr, hwaddr data_addr) { DeviceState *dev; SysBusDevice *d; FWCfgState *s; dev = qdev_create(NULL, TYPE_FW_CFG); qdev_prop_set_uint32(dev, "ctl_iobase", ctl_port); qdev_prop_set_uint32(de...
true
qemu
5712db6ae5101db645f71edc393368cd59bfd314
FWCfgState *fw_cfg_init(uint32_t ctl_port, uint32_t data_port, hwaddr ctl_addr, hwaddr data_addr) { DeviceState *dev; SysBusDevice *d; FWCfgState *s; dev = qdev_create(NULL, TYPE_FW_CFG); qdev_prop_set_uint32(dev, "ctl_iobase", ctl_port); qdev_prop_set_uint32(de...
{ "code": [ "FWCfgState *fw_cfg_init(uint32_t ctl_port, uint32_t data_port,", " hwaddr ctl_addr, hwaddr data_addr)", " DeviceState *dev;", " SysBusDevice *d;", " FWCfgState *s;", " dev = qdev_create(NULL, TYPE_FW_CFG);", " qdev_prop_set_uint32(dev, \"c...
FWCfgState *FUNC_0(uint32_t ctl_port, uint32_t data_port, hwaddr ctl_addr, hwaddr data_addr) { DeviceState *dev; SysBusDevice *d; FWCfgState *s; dev = qdev_create(NULL, TYPE_FW_CFG); qdev_prop_set_uint32(dev, "ctl_iobase", ctl_port); qdev_prop_set_uint32(dev, "d...
[ "FWCfgState *FUNC_0(uint32_t ctl_port, uint32_t data_port,\nhwaddr ctl_addr, hwaddr data_addr)\n{", "DeviceState *dev;", "SysBusDevice *d;", "FWCfgState *s;", "dev = qdev_create(NULL, TYPE_FW_CFG);", "qdev_prop_set_uint32(dev, \"ctl_iobase\", ctl_port);", "qdev_prop_set_uint32(dev, \"data_iobase\", data...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 25 ], [ 29 ], [ 33 ], [ 37 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [ 53 ], [...
17,460
void qmp_block_passwd(bool has_device, const char *device, bool has_node_name, const char *node_name, const char *password, Error **errp) { Error *local_err = NULL; BlockDriverState *bs; int err; bs = bdrv_lookup_bs(has_device ? device : NULL, ...
true
qemu
e3442099a2794925dfbe83711cd204caf80eae60
void qmp_block_passwd(bool has_device, const char *device, bool has_node_name, const char *node_name, const char *password, Error **errp) { Error *local_err = NULL; BlockDriverState *bs; int err; bs = bdrv_lookup_bs(has_device ? device : NULL, ...
{ "code": [], "line_no": [] }
void FUNC_0(bool VAR_0, const char *VAR_1, bool VAR_2, const char *VAR_3, const char *VAR_4, Error **VAR_5) { Error *local_err = NULL; BlockDriverState *bs; int VAR_6; bs = bdrv_lookup_bs(VAR_0 ? VAR_1 : NULL, VAR_2 ? VAR_3 : ...
[ "void FUNC_0(bool VAR_0, const char *VAR_1,\nbool VAR_2, const char *VAR_3,\nconst char *VAR_4, Error **VAR_5)\n{", "Error *local_err = NULL;", "BlockDriverState *bs;", "int VAR_6;", "bs = bdrv_lookup_bs(VAR_0 ? VAR_1 : NULL,\nVAR_2 ? VAR_3 : NULL,\n&local_err);", "if (local_err) {", "error_propagate(VA...
[ 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 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ...
17,461
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags) { int ret; switch (avctx->codec_type) { case AVMEDIA_TYPE_VIDEO: if (!frame->width) frame->width = avctx->width; if (!frame->height) frame->height = avctx->height;...
true
FFmpeg
669cc0f364d69aa9bd0153eb2f926abdd5d59575
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags) { int ret; switch (avctx->codec_type) { case AVMEDIA_TYPE_VIDEO: if (!frame->width) frame->width = avctx->width; if (!frame->height) frame->height = avctx->height;...
{ "code": [ " for (i = 0; i < planes - FF_ARRAY_ELEMS(frame->buf); i++)" ], "line_no": [ 283 ] }
int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1, int VAR_2) { int VAR_3; switch (VAR_0->codec_type) { case AVMEDIA_TYPE_VIDEO: if (!VAR_1->width) VAR_1->width = VAR_0->width; if (!VAR_1->height) VAR_1->height = VAR_0->height; ...
[ "int FUNC_0(AVCodecContext *VAR_0, AVFrame *VAR_1, int VAR_2)\n{", "int VAR_3;", "switch (VAR_0->codec_type) {", "case AVMEDIA_TYPE_VIDEO:\nif (!VAR_1->width)\nVAR_1->width = VAR_0->width;", "if (!VAR_1->height)\nVAR_1->height = VAR_0->height;", "if (VAR_1->format < 0)\nVAR_1->f...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ], [ 31, 33 ], [ 35 ], [ 37, 39, 41 ], [ 43, 45 ], [ 47 ], [ 49 ], [ 51, 53 ], [ 55...
17,462
m_get(Slirp *slirp) { register struct mbuf *m; int flags = 0; DEBUG_CALL("m_get"); if (slirp->m_freelist.m_next == &slirp->m_freelist) { m = (struct mbuf *)malloc(SLIRP_MSIZE); if (m == NULL) goto end_error; slirp->mbuf_alloced++; if (slirp->mbuf_alloced > MBUF_THRESH) flags = M_DOFREE; ...
true
qemu
53fae6d27f342a17bdc218dc51ccccebd99f3545
m_get(Slirp *slirp) { register struct mbuf *m; int flags = 0; DEBUG_CALL("m_get"); if (slirp->m_freelist.m_next == &slirp->m_freelist) { m = (struct mbuf *)malloc(SLIRP_MSIZE); if (m == NULL) goto end_error; slirp->mbuf_alloced++; if (slirp->mbuf_alloced > MBUF_THRESH) flags = M_DOFREE; ...
{ "code": [ "\tm->m_size = SLIRP_MSIZE - sizeof(struct m_hdr);" ], "line_no": [ 49 ] }
FUNC_0(Slirp *VAR_0) { register struct mbuf *VAR_1; int VAR_2 = 0; DEBUG_CALL("FUNC_0"); if (VAR_0->m_freelist.m_next == &VAR_0->m_freelist) { VAR_1 = (struct mbuf *)malloc(SLIRP_MSIZE); if (VAR_1 == NULL) goto end_error; VAR_0->mbuf_alloced++; if (VAR_0->mbuf_alloced > MBUF_THRESH) VAR_2 =...
[ "FUNC_0(Slirp *VAR_0)\n{", "register struct mbuf *VAR_1;", "int VAR_2 = 0;", "DEBUG_CALL(\"FUNC_0\");", "if (VAR_0->m_freelist.m_next == &VAR_0->m_freelist) {", "VAR_1 = (struct mbuf *)malloc(SLIRP_MSIZE);", "if (VAR_1 == NULL) goto end_error;", "VAR_0->mbuf_alloced++;", "if (VAR_0->mbuf_alloced > M...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23, 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 41 ], [ 43 ], [ 49 ], [ 51 ], [ 53 ], ...
17,464
uint_fast16_t float64_to_uint16_round_to_zero(float64 a STATUS_PARAM) { int64_t v; uint_fast16_t res; v = float64_to_int64_round_to_zero(a STATUS_VAR); if (v < 0) { res = 0; float_raise( float_flag_invalid STATUS_VAR); } else if (v > 0xffff) { res = 0xffff; ...
true
qemu
f2e933d20d5fd6c38bda227359b79bcc81654f99
uint_fast16_t float64_to_uint16_round_to_zero(float64 a STATUS_PARAM) { int64_t v; uint_fast16_t res; v = float64_to_int64_round_to_zero(a STATUS_VAR); if (v < 0) { res = 0; float_raise( float_flag_invalid STATUS_VAR); } else if (v > 0xffff) { res = 0xffff; ...
{ "code": [ " float_raise( float_flag_invalid STATUS_VAR);", " float_raise( float_flag_invalid STATUS_VAR);", " res = v;", " float_raise( float_flag_invalid STATUS_VAR);", " float_raise( float_flag_invalid STATUS_VAR);", " res = v;", " float...
uint_fast16_t FUNC_0(float64 a STATUS_PARAM) { int64_t v; uint_fast16_t res; v = float64_to_int64_round_to_zero(a STATUS_VAR); if (v < 0) { res = 0; float_raise( float_flag_invalid STATUS_VAR); } else if (v > 0xffff) { res = 0xffff; float_raise( float_flag...
[ "uint_fast16_t FUNC_0(float64 a STATUS_PARAM)\n{", "int64_t v;", "uint_fast16_t res;", "v = float64_to_int64_round_to_zero(a STATUS_VAR);", "if (v < 0) {", "res = 0;", "float_raise( float_flag_invalid STATUS_VAR);", "} else if (v > 0xffff) {", "res = 0xffff;", "float_raise( float_flag_invalid STAT...
[ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ] ]
17,465
static int vorbis_parse_setup_hdr_codebooks(vorbis_context *vc) { uint_fast16_t cb; uint8_t *tmp_vlc_bits; uint32_t *tmp_vlc_codes; GetBitContext *gb=&vc->gb; vc->codebook_count=get_bits(gb,8)+1; AV_DEBUG(" Codebooks: %d \n", vc->codebook_count); vc->codebooks=(vorbis_codebook *...
true
FFmpeg
975741e79cedc6033e5b02319792534a3a42c4ae
static int vorbis_parse_setup_hdr_codebooks(vorbis_context *vc) { uint_fast16_t cb; uint8_t *tmp_vlc_bits; uint32_t *tmp_vlc_codes; GetBitContext *gb=&vc->gb; vc->codebook_count=get_bits(gb,8)+1; AV_DEBUG(" Codebooks: %d \n", vc->codebook_count); vc->codebooks=(vorbis_codebook *...
{ "code": [ " codebook_setup->codevectors=(float *)av_mallocz(used_entries*codebook_setup->dimensions * sizeof(float));" ], "line_no": [ 249 ] }
static int FUNC_0(vorbis_context *VAR_0) { uint_fast16_t cb; uint8_t *tmp_vlc_bits; uint32_t *tmp_vlc_codes; GetBitContext *gb=&VAR_0->gb; VAR_0->codebook_count=get_bits(gb,8)+1; AV_DEBUG(" Codebooks: %d \n", VAR_0->codebook_count); VAR_0->codebooks=(vorbis_codebook *)av_mallocz...
[ "static int FUNC_0(vorbis_context *VAR_0) {", "uint_fast16_t cb;", "uint8_t *tmp_vlc_bits;", "uint32_t *tmp_vlc_codes;", "GetBitContext *gb=&VAR_0->gb;", "VAR_0->codebook_count=get_bits(gb,8)+1;", "AV_DEBUG(\" Codebooks: %d \\n\", VAR_0->codebook_count);", "VAR_0->codebooks=(vorbis_codebook *)av_mallo...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1 ], [ 3 ], [ 5 ], [ 7 ], [ 9 ], [ 13 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 41 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [...
17,466
static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg) { Picture *pic = NULL; int64_t pts; int i, display_picture_number = 0, ret; int encoding_delay = s->max_b_frames ? s->max_b_frames : (s->low_delay ? 0 : 1); int flush_offset = 1; ...
true
FFmpeg
de0cd0ffc9e4b7780d0cae5f969aca4e3bdf7e48
static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg) { Picture *pic = NULL; int64_t pts; int i, display_picture_number = 0, ret; int encoding_delay = s->max_b_frames ? s->max_b_frames : (s->low_delay ? 0 : 1); int flush_offset = 1; ...
{ "code": [], "line_no": [] }
static int FUNC_0(MpegEncContext *VAR_0, const AVFrame *VAR_1) { Picture *pic = NULL; int64_t pts; int VAR_2, VAR_3 = 0, VAR_4; int VAR_5 = VAR_0->max_b_frames ? VAR_0->max_b_frames : (VAR_0->low_delay ? 0 : 1); int VAR_6 = 1; int VAR_7 = 1; ...
[ "static int FUNC_0(MpegEncContext *VAR_0, const AVFrame *VAR_1)\n{", "Picture *pic = NULL;", "int64_t pts;", "int VAR_2, VAR_3 = 0, VAR_4;", "int VAR_5 = VAR_0->max_b_frames ? VAR_0->max_b_frames\n: (VAR_0->low_delay ? 0 : 1);", "int VAR_6 = 1;", "int VAR_7 = 1;", "if (VAR_1) {", "pts = VAR_1->pts;"...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11, 13 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 29 ], [ 31 ], [ 33 ], [ 37 ], [ 39, 41, 43 ], [ 45 ], [ 47 ], [ 51, 53 ...