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 |
|---|---|---|---|---|---|---|---|---|---|---|
13,834 | int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
int *got_picture_ptr,
const AVPacket *avpkt)
{
int ret;
// copy to ensure we do not change avpkt
AVPacket tmp = *avpkt;
if (avctx->codec->type != AVMEDIA_TYPE... | false | FFmpeg | 3cc1a8988112896e302c96f9df8839d983677891 | int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
int *got_picture_ptr,
const AVPacket *avpkt)
{
int ret;
AVPacket tmp = *avpkt;
if (avctx->codec->type != AVMEDIA_TYPE_VIDEO) {
av_log(avctx, AV_LOG_... | {
"code": [],
"line_no": []
} | int VAR_0 avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
int *got_picture_ptr,
const AVPacket *avpkt)
{
int ret;
AVPacket tmp = *avpkt;
if (avctx->codec->type != AVMEDIA_TYPE_VIDEO) {
av_log(avctx, AV_LOG_ERROR, "Invali... | [
"int VAR_0 avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,\nint *got_picture_ptr,\nconst AVPacket *avpkt)\n{",
"int ret;",
"AVPacket tmp = *avpkt;",
"if (avctx->codec->type != AVMEDIA_TYPE_VIDEO) {",
"av_log(avctx, AV_LOG_ERROR, \"Invalid media type for video\\n\");",
"return AVERROR(EINVAL... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29,
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45,
47
],
[
49
],
[
51,
53
],
[
55
... |
13,835 | static void evalPrimary(Parser *p){
double d, d2=NAN;
char *next= p->s;
int i;
/* number */
d= strtod(p->s, &next);
if(next != p->s){
push(p, d);
p->s= next;
return;
}
/* named constants */
for(i=0; p->const_name[i]; i++){
if(strma... | false | FFmpeg | 69f5de1855fb7a8d188f8f915887a9b00c7795f2 | static void evalPrimary(Parser *p){
double d, d2=NAN;
char *next= p->s;
int i;
d= strtod(p->s, &next);
if(next != p->s){
push(p, d);
p->s= next;
return;
}
for(i=0; p->const_name[i]; i++){
if(strmatch(p->s, p->const_name[i])){
... | {
"code": [],
"line_no": []
} | static void FUNC_0(Parser *VAR_0){
double VAR_1, VAR_2=NAN;
char *VAR_3= VAR_0->s;
int VAR_4;
VAR_1= strtod(VAR_0->s, &VAR_3);
if(VAR_3 != VAR_0->s){
push(VAR_0, VAR_1);
VAR_0->s= VAR_3;
return;
}
for(VAR_4=0; VAR_0->const_name[VAR_4]; VA... | [
"static void FUNC_0(Parser *VAR_0){",
"double VAR_1, VAR_2=NAN;",
"char *VAR_3= VAR_0->s;",
"int VAR_4;",
"VAR_1= strtod(VAR_0->s, &VAR_3);",
"if(VAR_3 != VAR_0->s){",
"push(VAR_0, VAR_1);",
"VAR_0->s= VAR_3;",
"return;",
"}",
"for(VAR_4=0; VAR_0->const_name[VAR_4]; VAR_4++){",
"if(strmatch(VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1
],
[
3
],
[
5
],
[
7
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
... |
13,837 | void do_POWER_dozo (void)
{
if (Ts1 > Ts0) {
T2 = T0;
T0 = T1 - T0;
if (((~T2) ^ T1 ^ (-1)) & ((~T2) ^ T0) & (1 << 31)) {
xer_so = 1;
xer_ov = 1;
} else {
xer_ov = 0;
}
} else {
T0 = 0;
xer_ov = 0;
}
}... | true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | void do_POWER_dozo (void)
{
if (Ts1 > Ts0) {
T2 = T0;
T0 = T1 - T0;
if (((~T2) ^ T1 ^ (-1)) & ((~T2) ^ T0) & (1 << 31)) {
xer_so = 1;
xer_ov = 1;
} else {
xer_ov = 0;
}
} else {
T0 = 0;
xer_ov = 0;
}
}... | {
"code": [
" } else {",
" } else {",
" } else {",
" xer_ov = 0;",
" } else {",
" } else {",
" xer_ov = 0;",
" } else {",
" xer_ov = 0;",
" } else {",
" } else {",
" } else {",
" } else {",
" if (Ts1 > Ts0) {... | void FUNC_0 (void)
{
if (Ts1 > Ts0) {
T2 = T0;
T0 = T1 - T0;
if (((~T2) ^ T1 ^ (-1)) & ((~T2) ^ T0) & (1 << 31)) {
xer_so = 1;
xer_ov = 1;
} else {
xer_ov = 0;
}
} else {
T0 = 0;
xer_ov = 0;
}
}
| [
"void FUNC_0 (void)\n{",
"if (Ts1 > Ts0) {",
"T2 = T0;",
"T0 = T1 - T0;",
"if (((~T2) ^ T1 ^ (-1)) & ((~T2) ^ T0) & (1 << 31)) {",
"xer_so = 1;",
"xer_ov = 1;",
"} else {",
"xer_ov = 0;",
"}",
"} else {",
"T0 = 0;",
"xer_ov = 0;",
"}",
"}"
] | [
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
13,838 | static void test_i440fx_defaults(gconstpointer opaque)
{
const TestData *s = opaque;
QPCIBus *bus;
QPCIDevice *dev;
uint32_t value;
bus = test_start_get_bus(s);
dev = qpci_device_find(bus, QPCI_DEVFN(0, 0));
g_assert(dev != NULL);
/* 3.2.2 */
g_assert_cmpint(qpci_config... | true | qemu | 1bab33ab4ab4702f53012551cad333beb270f30d | static void test_i440fx_defaults(gconstpointer opaque)
{
const TestData *s = opaque;
QPCIBus *bus;
QPCIDevice *dev;
uint32_t value;
bus = test_start_get_bus(s);
dev = qpci_device_find(bus, QPCI_DEVFN(0, 0));
g_assert(dev != NULL);
g_assert_cmpint(qpci_config_readw(dev,... | {
"code": [],
"line_no": []
} | static void FUNC_0(gconstpointer VAR_0)
{
const TestData *VAR_1 = VAR_0;
QPCIBus *bus;
QPCIDevice *dev;
uint32_t value;
bus = test_start_get_bus(VAR_1);
dev = qpci_device_find(bus, QPCI_DEVFN(0, 0));
g_assert(dev != NULL);
g_assert_cmpint(qpci_config_readw(dev, PCI_VEN... | [
"static void FUNC_0(gconstpointer VAR_0)\n{",
"const TestData *VAR_1 = VAR_0;",
"QPCIBus *bus;",
"QPCIDevice *dev;",
"uint32_t value;",
"bus = test_start_get_bus(VAR_1);",
"dev = qpci_device_find(bus, QPCI_DEVFN(0, 0));",
"g_assert(dev != NULL);",
"g_assert_cmpint(qpci_config_readw(dev, PCI_VENDOR_I... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
25
],
[
29
],
[
31,
35
],
[
39
],
[
41,
45
],
[
47
],
[
51
],
[
55
],
[
59
],
[
65
],
[
67
... |
13,839 | BlockInfoList *qmp_query_block(Error **errp)
{
BlockInfoList *head = NULL, **p_next = &head;
BlockBackend *blk;
Error *local_err = NULL;
for (blk = blk_next(NULL); blk; blk = blk_next(blk)) {
BlockInfoList *info = g_malloc0(sizeof(*info));
bdrv_query_info(blk, &info->value, &loc... | true | qemu | 903c341d5742b160e52752eb6fdc1ba9b87dc52e | BlockInfoList *qmp_query_block(Error **errp)
{
BlockInfoList *head = NULL, **p_next = &head;
BlockBackend *blk;
Error *local_err = NULL;
for (blk = blk_next(NULL); blk; blk = blk_next(blk)) {
BlockInfoList *info = g_malloc0(sizeof(*info));
bdrv_query_info(blk, &info->value, &loc... | {
"code": [
" goto err;",
" err:",
" qapi_free_BlockInfoList(head);",
" return NULL;"
],
"line_no": [
23,
41,
43,
45
]
} | BlockInfoList *FUNC_0(Error **errp)
{
BlockInfoList *head = NULL, **p_next = &head;
BlockBackend *blk;
Error *local_err = NULL;
for (blk = blk_next(NULL); blk; blk = blk_next(blk)) {
BlockInfoList *info = g_malloc0(sizeof(*info));
bdrv_query_info(blk, &info->value, &local_err);
... | [
"BlockInfoList *FUNC_0(Error **errp)\n{",
"BlockInfoList *head = NULL, **p_next = &head;",
"BlockBackend *blk;",
"Error *local_err = NULL;",
"for (blk = blk_next(NULL); blk; blk = blk_next(blk)) {",
"BlockInfoList *info = g_malloc0(sizeof(*info));",
"bdrv_query_info(blk, &info->value, &local_err);",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37
],
[
41,
43
],
[
45
],
[
47
]
] |
13,840 | static int asf_write_header(AVFormatContext *s)
{
ASFContext *asf = s->priv_data;
s->packet_size = PACKET_SIZE;
s->max_interleave_delta = 0;
asf->nb_packets = 0;
asf->index_ptr = av_malloc(sizeof(ASFIndex) * ASF_INDEX_BLOCK);
asf->nb_index_memory_alloc = ASF_INDEX_BLOCK;
... | true | FFmpeg | 2c8cff2be4a044c66e4904efa156dafd0d332d25 | static int asf_write_header(AVFormatContext *s)
{
ASFContext *asf = s->priv_data;
s->packet_size = PACKET_SIZE;
s->max_interleave_delta = 0;
asf->nb_packets = 0;
asf->index_ptr = av_malloc(sizeof(ASFIndex) * ASF_INDEX_BLOCK);
asf->nb_index_memory_alloc = ASF_INDEX_BLOCK;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
ASFContext *asf = VAR_0->priv_data;
VAR_0->packet_size = PACKET_SIZE;
VAR_0->max_interleave_delta = 0;
asf->nb_packets = 0;
asf->index_ptr = av_malloc(sizeof(ASFIndex) * ASF_INDEX_BLOCK);
asf->nb_index_memory_alloc = ASF_INDEX_B... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"ASFContext *asf = VAR_0->priv_data;",
"VAR_0->packet_size = PACKET_SIZE;",
"VAR_0->max_interleave_delta = 0;",
"asf->nb_packets = 0;",
"asf->index_ptr = av_malloc(sizeof(ASFIndex) * ASF_INDEX_BLOCK);",
"asf->nb_index_memory_alloc = ASF_INDEX_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
31
],
[
36
],
[
38
],
[
42
],
[
46
],
[
48
],
[
50
],
[
52,
54
],
[
58,
60
],
[
64
],
[
66... |
13,841 | static int mp3_write_xing(AVFormatContext *s)
{
MP3Context *mp3 = s->priv_data;
AVCodecContext *codec = s->streams[mp3->audio_stream_idx]->codec;
int32_t header;
MPADecodeHeader mpah;
int srate_idx, i, channels;
int bitrate_idx;
int best_bitrate_idx = -1;
int bes... | true | FFmpeg | eccec203978e53f897a3c6105d011bbdff2a978b | static int mp3_write_xing(AVFormatContext *s)
{
MP3Context *mp3 = s->priv_data;
AVCodecContext *codec = s->streams[mp3->audio_stream_idx]->codec;
int32_t header;
MPADecodeHeader mpah;
int srate_idx, i, channels;
int bitrate_idx;
int best_bitrate_idx = -1;
int bes... | {
"code": [
" int bytes_needed, lsf;",
" int bit_rate = 1000 * avpriv_mpa_bitrate_tab[lsf][3 - 1][bitrate_idx];"
],
"line_no": [
25,
99
]
} | static int FUNC_0(AVFormatContext *VAR_0)
{
MP3Context *mp3 = VAR_0->priv_data;
AVCodecContext *codec = VAR_0->streams[mp3->audio_stream_idx]->codec;
int32_t header;
MPADecodeHeader mpah;
int VAR_1, VAR_2, VAR_3;
int VAR_4;
int VAR_5 = -1;
int VAR_6 = INT_MAX;
... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"MP3Context *mp3 = VAR_0->priv_data;",
"AVCodecContext *codec = VAR_0->streams[mp3->audio_stream_idx]->codec;",
"int32_t header;",
"MPADecodeHeader mpah;",
"int VAR_1, VAR_2, VAR_3;",
"int VAR_4;",
"int VAR_5 = -1;",
"int VAR_6 = INT_MA... | [
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31,
33
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[... |
13,842 | static int mkv_write_trailer(AVFormatContext *s)
{
MatroskaMuxContext *mkv = s->priv_data;
AVIOContext *pb = s->pb;
int64_t currentpos, cuespos;
int ret;
// check if we have an audio packet cached
if (mkv->cur_audio_pkt.size > 0) {
ret = mkv_write_packet_internal(s, &mkv->cur_a... | true | FFmpeg | 3dabebc272b0ab5455610975a6d75de08b97dc62 | static int mkv_write_trailer(AVFormatContext *s)
{
MatroskaMuxContext *mkv = s->priv_data;
AVIOContext *pb = s->pb;
int64_t currentpos, cuespos;
int ret;
if (mkv->cur_audio_pkt.size > 0) {
ret = mkv_write_packet_internal(s, &mkv->cur_audio_pkt, 0);
av_free_packet(&mkv... | {
"code": [
" return ret;",
" return ret;",
" return ret;",
" mkv_write_seekhead(pb, mkv->main_seekhead);",
" mkv_write_seekhead(pb, mkv->main_seekhead);",
" av_freep(&mkv->tracks);",
" av_freep(&mkv->cues->entries);",
" av_freep(... | static int FUNC_0(AVFormatContext *VAR_0)
{
MatroskaMuxContext *mkv = VAR_0->priv_data;
AVIOContext *pb = VAR_0->pb;
int64_t currentpos, cuespos;
int VAR_1;
if (mkv->cur_audio_pkt.size > 0) {
VAR_1 = mkv_write_packet_internal(VAR_0, &mkv->cur_audio_pkt, 0);
av_free_pa... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"MatroskaMuxContext *mkv = VAR_0->priv_data;",
"AVIOContext *pb = VAR_0->pb;",
"int64_t currentpos, cuespos;",
"int VAR_1;",
"if (mkv->cur_audio_pkt.size > 0) {",
"VAR_1 = mkv_write_packet_internal(VAR_0, &mkv->cur_audio_pkt, 0);",
"av_free_packet(&mkv->... | [
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,
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
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
13,843 | static int quantize(CinepakEncContext *s, int h, AVPicture *pict, int v1mode, int size, int v4, strip_info *info)
{
int x, y, i, j, k, x2, y2, x3, y3, plane, shift;
int entry_size = s->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4;
int *codebook = v1mode ? info->v1_codebook : info->v4_codebook;
int64_t tot... | true | FFmpeg | 7da9f4523159670d577a2808d4481e64008a8894 | static int quantize(CinepakEncContext *s, int h, AVPicture *pict, int v1mode, int size, int v4, strip_info *info)
{
int x, y, i, j, k, x2, y2, x3, y3, plane, shift;
int entry_size = s->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4;
int *codebook = v1mode ? info->v1_codebook : info->v4_codebook;
int64_t tot... | {
"code": [
" int entry_size = s->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4;",
" } else {",
" } else {",
" int entry_size = s->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4;",
"static int quantize(CinepakEncContext *s, int h, AVPicture *pict, int v1mode, int size, int v4, strip_inf... | static int FUNC_0(CinepakEncContext *VAR_0, int VAR_1, AVPicture *VAR_2, int VAR_3, int VAR_4, int VAR_5, strip_info *VAR_6)
{
int VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12, VAR_13, VAR_14, VAR_15, VAR_16, VAR_17;
int VAR_18 = VAR_0->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4;
int *VAR_19 = VAR_3 ? VAR_6->... | [
"static int FUNC_0(CinepakEncContext *VAR_0, int VAR_1, AVPicture *VAR_2, int VAR_3, int VAR_4, int VAR_5, strip_info *VAR_6)\n{",
"int VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12, VAR_13, VAR_14, VAR_15, VAR_16, VAR_17;",
"int VAR_18 = VAR_0->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4;",
"int *VAR_19 = VAR_3 ? VA... | [
1,
1,
1,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45,
47,
49
],
[... |
13,844 | void qemu_put_buffer_async(QEMUFile *f, const uint8_t *buf, int size)
{
if (!f->ops->writev_buffer) {
qemu_put_buffer(f, buf, size);
return;
}
if (f->last_error) {
return;
}
f->bytes_xfer += size;
add_to_iovec(f, buf, size);
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | void qemu_put_buffer_async(QEMUFile *f, const uint8_t *buf, int size)
{
if (!f->ops->writev_buffer) {
qemu_put_buffer(f, buf, size);
return;
}
if (f->last_error) {
return;
}
f->bytes_xfer += size;
add_to_iovec(f, buf, size);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(QEMUFile *VAR_0, const uint8_t *VAR_1, int VAR_2)
{
if (!VAR_0->ops->writev_buffer) {
qemu_put_buffer(VAR_0, VAR_1, VAR_2);
return;
}
if (VAR_0->last_error) {
return;
}
VAR_0->bytes_xfer += VAR_2;
add_to_iovec(VAR_0, VAR_1, VAR_2);
}
| [
"void FUNC_0(QEMUFile *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{",
"if (!VAR_0->ops->writev_buffer) {",
"qemu_put_buffer(VAR_0, VAR_1, VAR_2);",
"return;",
"}",
"if (VAR_0->last_error) {",
"return;",
"}",
"VAR_0->bytes_xfer += VAR_2;",
"add_to_iovec(VAR_0, VAR_1, VAR_2);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
]
] |
13,845 | static int handle_alloc(BlockDriverState *bs, uint64_t guest_offset,
uint64_t *host_offset, uint64_t *bytes, QCowL2Meta **m)
{
BDRVQcowState *s = bs->opaque;
int l2_index;
uint64_t *l2_table;
uint64_t entry;
unsigned int nb_clusters;
int ret;
uint64_t alloc_cluster_offset;
... | true | qemu | ecdd5333ab9ed3f2b848066aaaef02c027b25e36 | static int handle_alloc(BlockDriverState *bs, uint64_t guest_offset,
uint64_t *host_offset, uint64_t *bytes, QCowL2Meta **m)
{
BDRVQcowState *s = bs->opaque;
int l2_index;
uint64_t *l2_table;
uint64_t entry;
unsigned int nb_clusters;
int ret;
uint64_t alloc_cluster_offset;
... | {
"code": [
" if (nb_clusters == 0) {",
" *bytes = 0;",
" return 0;"
],
"line_no": [
93,
95,
97
]
} | static int FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1,
uint64_t *VAR_2, uint64_t *VAR_3, QCowL2Meta **VAR_4)
{
BDRVQcowState *s = VAR_0->opaque;
int VAR_5;
uint64_t *l2_table;
uint64_t entry;
unsigned int VAR_6;
int VAR_7;
uint64_t alloc_cluster_offset;
trace_qcow2_... | [
"static int FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1,\nuint64_t *VAR_2, uint64_t *VAR_3, QCowL2Meta **VAR_4)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"int VAR_5;",
"uint64_t *l2_table;",
"uint64_t entry;",
"unsigned int VAR_6;",
"int VAR_7;",
"uint64_t alloc_cluster_offset;",
"trace_qcow2_han... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25,
27
],
[
29
],
[
41,
43
],
[
47
],
[
49
],
[
55
],
[
57
],
[
59
],
[
61
],
[
65
],
[... |
13,846 | static uint32_t parse_peak(const uint8_t *peak)
{
int64_t val = 0;
int64_t scale = 1;
if (!peak)
return 0;
peak += strspn(peak, " \t");
if (peak[0] == '1' && peak[1] == '.')
return UINT32_MAX;
else if (!(peak[0] == '0' && peak[1] == '.'))
return 0;
... | true | FFmpeg | 8542f9c4f17125d483c40c0c5723842f1c982f81 | static uint32_t parse_peak(const uint8_t *peak)
{
int64_t val = 0;
int64_t scale = 1;
if (!peak)
return 0;
peak += strspn(peak, " \t");
if (peak[0] == '1' && peak[1] == '.')
return UINT32_MAX;
else if (!(peak[0] == '0' && peak[1] == '.'))
return 0;
... | {
"code": [
"static uint32_t parse_peak(const uint8_t *peak)",
" int64_t val = 0;",
" int64_t scale = 1;",
" if (!peak)",
" return 0;",
" peak += strspn(peak, \" \\t\");",
" if (peak[0] == '1' && peak[1] == '.')",
" return UINT32_MAX;",
" else if (!(... | static uint32_t FUNC_0(const uint8_t *peak)
{
int64_t val = 0;
int64_t scale = 1;
if (!peak)
return 0;
peak += strspn(peak, " \t");
if (peak[0] == '1' && peak[1] == '.')
return UINT32_MAX;
else if (!(peak[0] == '0' && peak[1] == '.'))
return 0;
peak... | [
"static uint32_t FUNC_0(const uint8_t *peak)\n{",
"int64_t val = 0;",
"int64_t scale = 1;",
"if (!peak)\nreturn 0;",
"peak += strspn(peak, \" \\t\");",
"if (peak[0] == '1' && peak[1] == '.')\nreturn UINT32_MAX;",
"else if (!(peak[0] == '0' && peak[1] == '.'))\nreturn 0;",
"peak += 2;",
"while (av_is... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
17
],
[
21,
23
],
[
25,
27
],
[
31
],
[
35
],
[
37
],
[
41,
43
],
[
47
],
[
49
],
[
53
],
[
55
],
[
59
],
[
61
]
] |
13,847 | void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4],
const uint8_t *src_data[4], const int src_linesizes[4],
enum AVPixelFormat pix_fmt, int width, int height)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
if (!desc || desc->flags & PIX_F... | true | FFmpeg | adc39b28a5264591b9f8e5838a752c3d547e8110 | void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4],
const uint8_t *src_data[4], const int src_linesizes[4],
enum AVPixelFormat pix_fmt, int width, int height)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
if (!desc || desc->flags & PIX_F... | {
"code": [],
"line_no": []
} | void FUNC_0(uint8_t *VAR_0[4], int VAR_1[4],
const uint8_t *VAR_2[4], const int VAR_3[4],
enum AVPixelFormat VAR_4, int VAR_5, int VAR_6)
{
const AVPixFmtDescriptor *VAR_7 = av_pix_fmt_desc_get(VAR_4);
if (!VAR_7 || VAR_7->flags & PIX_FMT_HWACCEL)
if (VAR_7->... | [
"void FUNC_0(uint8_t *VAR_0[4], int VAR_1[4],\nconst uint8_t *VAR_2[4], const int VAR_3[4],\nenum AVPixelFormat VAR_4, int VAR_5, int VAR_6)\n{",
"const AVPixFmtDescriptor *VAR_7 = av_pix_fmt_desc_get(VAR_4);",
"if (!VAR_7 || VAR_7->flags & PIX_FMT_HWACCEL)\nif (VAR_7->flags & PIX_FMT_PAL ||\nVAR_7->flags & PIX... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13,
18,
20
],
[
22,
24,
26
],
[
30
],
[
32
],
[
34
],
[
38
],
[
40
],
[
44
],
[
46
],
[
48
],
[
54
],
[
56
],
[
59,
61,
63
]
] |
13,848 | static void gen_ld (CPUMIPSState *env, DisasContext *ctx, uint32_t opc,
int rt, int base, int16_t offset)
{
const char *opn = "ld";
TCGv t0, t1;
if (rt == 0 && env->insn_flags & (INSN_LOONGSON2E | INSN_LOONGSON2F)) {
/* Loongson CPU uses a load to zero register for prefet... | true | qemu | fc40787abcf8452b8f50d92b7a13243a12972c7a | static void gen_ld (CPUMIPSState *env, DisasContext *ctx, uint32_t opc,
int rt, int base, int16_t offset)
{
const char *opn = "ld";
TCGv t0, t1;
if (rt == 0 && env->insn_flags & (INSN_LOONGSON2E | INSN_LOONGSON2F)) {
MIPS_DEBUG("NOP");
return;
... | {
"code": [
" TCGv t0, t1;",
" save_cpu_state(ctx, 1);",
" gen_helper_1e2i(ldl, t1, t1, t0, ctx->mem_idx);",
" gen_store_gpr(t1, rt);",
" save_cpu_state(ctx, 1);",
" gen_helper_1e2i(ldr, t1, t1, t0, ctx->mem_idx);",
" gen_store_gpr(t1, rt);",
... | static void FUNC_0 (CPUMIPSState *VAR_0, DisasContext *VAR_1, uint32_t VAR_2,
int VAR_3, int VAR_4, int16_t VAR_5)
{
const char *VAR_6 = "ld";
TCGv t0, t1;
if (VAR_3 == 0 && VAR_0->insn_flags & (INSN_LOONGSON2E | INSN_LOONGSON2F)) {
MIPS_DEBUG("NOP");
... | [
"static void FUNC_0 (CPUMIPSState *VAR_0, DisasContext *VAR_1, uint32_t VAR_2,\nint VAR_3, int VAR_4, int16_t VAR_5)\n{",
"const char *VAR_6 = \"ld\";",
"TCGv t0, t1;",
"if (VAR_3 == 0 && VAR_0->insn_flags & (INSN_LOONGSON2E | INSN_LOONGSON2F)) {",
"MIPS_DEBUG(\"NOP\");",
"return;",
"}",
"t0 = tcg_tem... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37,
39,
41
],
[
43
],
[
45
],
[
47
],
[
49,
51
],
[
53
],
[
55
],
[
57
... |
13,849 | static void gxf_read_index(AVFormatContext *s, int pkt_len) {
AVIOContext *pb = s->pb;
AVStream *st = s->streams[0];
uint32_t fields_per_map = avio_rl32(pb);
uint32_t map_cnt = avio_rl32(pb);
int i;
pkt_len -= 8;
if (s->flags & AVFMT_FLAG_IGNIDX) {
avio_skip(pb, pkt_len);
... | true | FFmpeg | 5aedee4facb2295cfdeaf322bc67fd15323862d9 | static void gxf_read_index(AVFormatContext *s, int pkt_len) {
AVIOContext *pb = s->pb;
AVStream *st = s->streams[0];
uint32_t fields_per_map = avio_rl32(pb);
uint32_t map_cnt = avio_rl32(pb);
int i;
pkt_len -= 8;
if (s->flags & AVFMT_FLAG_IGNIDX) {
avio_skip(pb, pkt_len);
... | {
"code": [
" AVStream *st = s->streams[0];",
" if (s->flags & AVFMT_FLAG_IGNIDX) {"
],
"line_no": [
5,
15
]
} | static void FUNC_0(AVFormatContext *VAR_0, int VAR_1) {
AVIOContext *pb = VAR_0->pb;
AVStream *st = VAR_0->streams[0];
uint32_t fields_per_map = avio_rl32(pb);
uint32_t map_cnt = avio_rl32(pb);
int VAR_2;
VAR_1 -= 8;
if (VAR_0->flags & AVFMT_FLAG_IGNIDX) {
avio_skip(pb, VAR_1... | [
"static void FUNC_0(AVFormatContext *VAR_0, int VAR_1) {",
"AVIOContext *pb = VAR_0->pb;",
"AVStream *st = VAR_0->streams[0];",
"uint32_t fields_per_map = avio_rl32(pb);",
"uint32_t map_cnt = avio_rl32(pb);",
"int VAR_2;",
"VAR_1 -= 8;",
"if (VAR_0->flags & AVFMT_FLAG_IGNIDX) {",
"avio_skip(pb, VAR_... | [
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[... |
13,850 | static void draw_char(AVCodecContext *avctx, int c, int a)
{
XbinContext *s = avctx->priv_data;
if (s->y > avctx->height - s->font_height)
return;
ff_draw_pc_font(s->frame.data[0] + s->y * s->frame.linesize[0] + s->x,
s->frame.linesize[0], s->font, s->font_height, c,
... | true | FFmpeg | b9dbaa409f51545a840929665fa0303b46e7e8a5 | static void draw_char(AVCodecContext *avctx, int c, int a)
{
XbinContext *s = avctx->priv_data;
if (s->y > avctx->height - s->font_height)
return;
ff_draw_pc_font(s->frame.data[0] + s->y * s->frame.linesize[0] + s->x,
s->frame.linesize[0], s->font, s->font_height, c,
... | {
"code": [
" if (s->x >= avctx->width) {"
],
"line_no": [
19
]
} | static void FUNC_0(AVCodecContext *VAR_0, int VAR_1, int VAR_2)
{
XbinContext *s = VAR_0->priv_data;
if (s->y > VAR_0->height - s->font_height)
return;
ff_draw_pc_font(s->frame.data[0] + s->y * s->frame.linesize[0] + s->x,
s->frame.linesize[0], s->font, s->font_height, VAR_... | [
"static void FUNC_0(AVCodecContext *VAR_0, int VAR_1, int VAR_2)\n{",
"XbinContext *s = VAR_0->priv_data;",
"if (s->y > VAR_0->height - s->font_height)\nreturn;",
"ff_draw_pc_font(s->frame.data[0] + s->y * s->frame.linesize[0] + s->x,\ns->frame.linesize[0], s->font, s->font_height, VAR_1,\nVAR_2 & 0x0F, VAR_2... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11,
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
13,851 | static int xwma_read_header(AVFormatContext *s)
{
int64_t size;
int ret;
uint32_t dpds_table_size = 0;
uint32_t *dpds_table = 0;
unsigned int tag;
AVIOContext *pb = s->pb;
AVStream *st;
XWMAContext *xwma = s->priv_data;
int i;
/* The following code is mostly copied from wav.c, wi... | true | FFmpeg | a3cb7f992f88fcfa524bd9cd08b28e09d6718f75 | static int xwma_read_header(AVFormatContext *s)
{
int64_t size;
int ret;
uint32_t dpds_table_size = 0;
uint32_t *dpds_table = 0;
unsigned int tag;
AVIOContext *pb = s->pb;
AVStream *st;
XWMAContext *xwma = s->priv_data;
int i;
tag = avio_rl32(pb);
if (tag != MKTAG... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
int64_t size;
int VAR_1;
uint32_t dpds_table_size = 0;
uint32_t *dpds_table = 0;
unsigned int VAR_2;
AVIOContext *pb = VAR_0->pb;
AVStream *st;
XWMAContext *xwma = VAR_0->priv_data;
int VAR_3;
VAR_2 = avio_rl32(pb);
if (... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"int64_t size;",
"int VAR_1;",
"uint32_t dpds_table_size = 0;",
"uint32_t *dpds_table = 0;",
"unsigned int VAR_2;",
"AVIOContext *pb = VAR_0->pb;",
"AVStream *st;",
"XWMAContext *xwma = VAR_0->priv_data;",
"int VAR_3;",
"VAR_2 = avio_rl32(pb);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
16
],
[
17,
18
],
[
19
],
[
20
],
[
21,
22
],
[
24
],
[
25,
26
],
[
27
],
[
... |
13,852 | static int openfile(char *name, int flags, int growable, QDict *opts)
{
Error *local_err = NULL;
if (qemuio_bs) {
fprintf(stderr, "file open already, try 'help close'\n");
return 1;
}
if (growable) {
if (bdrv_open(&qemuio_bs, name, NULL, opts, flags | BDRV_O_PROTOCOL... | true | qemu | 29f2601aa605f0af0cba8eedcff7812c6c8532e9 | static int openfile(char *name, int flags, int growable, QDict *opts)
{
Error *local_err = NULL;
if (qemuio_bs) {
fprintf(stderr, "file open already, try 'help close'\n");
return 1;
}
if (growable) {
if (bdrv_open(&qemuio_bs, name, NULL, opts, flags | BDRV_O_PROTOCOL... | {
"code": [],
"line_no": []
} | static int FUNC_0(char *VAR_0, int VAR_1, int VAR_2, QDict *VAR_3)
{
Error *local_err = NULL;
if (qemuio_bs) {
fprintf(stderr, "file open already, try 'help close'\n");
return 1;
}
if (VAR_2) {
if (bdrv_open(&qemuio_bs, VAR_0, NULL, VAR_3, VAR_1 | BDRV_O_PROTOCOL,
... | [
"static int FUNC_0(char *VAR_0, int VAR_1, int VAR_2, QDict *VAR_3)\n{",
"Error *local_err = NULL;",
"if (qemuio_bs) {",
"fprintf(stderr, \"file open already, try 'help close'\\n\");",
"return 1;",
"}",
"if (VAR_2) {",
"if (bdrv_open(&qemuio_bs, VAR_0, NULL, VAR_3, VAR_1 | BDRV_O_PROTOCOL,\nNULL, &loc... | [
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
],
[
14
],
[
16
],
[
20
],
[
22,
24,
26
],
[
28,
30
],
[
32
],
[
34
],
[
36
],
[
38
],
[
40
],
[
44,
46,
48
],
[
50,
52
],
[
54... |
13,853 | static int cirrus_bitblt_videotovideo_copy(CirrusVGAState * s)
{
if (blit_is_unsafe(s))
return 0;
return cirrus_do_copy(s, s->cirrus_blt_dstaddr - s->vga.start_addr,
s->cirrus_blt_srcaddr - s->vga.start_addr,
s->cirrus_blt_width, s->cirrus_blt_height);
}
| true | qemu | 913a87885f589d263e682c2eb6637c6e14538061 | static int cirrus_bitblt_videotovideo_copy(CirrusVGAState * s)
{
if (blit_is_unsafe(s))
return 0;
return cirrus_do_copy(s, s->cirrus_blt_dstaddr - s->vga.start_addr,
s->cirrus_blt_srcaddr - s->vga.start_addr,
s->cirrus_blt_width, s->cirrus_blt_height);
}
| {
"code": [
" if (blit_is_unsafe(s))",
" if (blit_is_unsafe(s))"
],
"line_no": [
5,
5
]
} | static int FUNC_0(CirrusVGAState * VAR_0)
{
if (blit_is_unsafe(VAR_0))
return 0;
return cirrus_do_copy(VAR_0, VAR_0->cirrus_blt_dstaddr - VAR_0->vga.start_addr,
VAR_0->cirrus_blt_srcaddr - VAR_0->vga.start_addr,
VAR_0->cirrus_blt_width, VAR_0->cirrus_blt_height);
}
| [
"static int FUNC_0(CirrusVGAState * VAR_0)\n{",
"if (blit_is_unsafe(VAR_0))\nreturn 0;",
"return cirrus_do_copy(VAR_0, VAR_0->cirrus_blt_dstaddr - VAR_0->vga.start_addr,\nVAR_0->cirrus_blt_srcaddr - VAR_0->vga.start_addr,\nVAR_0->cirrus_blt_width, VAR_0->cirrus_blt_height);",
"}"
] | [
0,
1,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
11,
13,
15
],
[
17
]
] |
13,854 | static void vpb_sic_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = vpb_sic_init;
dc->no_user = 1;
dc->vmsd = &vmstate_vpb_sic;
}
| true | qemu | efec3dd631d94160288392721a5f9c39e50fb2bc | static void vpb_sic_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = vpb_sic_init;
dc->no_user = 1;
dc->vmsd = &vmstate_vpb_sic;
}
| {
"code": [
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;"... | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(VAR_0);
k->init = vpb_sic_init;
dc->no_user = 1;
dc->vmsd = &vmstate_vpb_sic;
}
| [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(VAR_0);",
"k->init = vpb_sic_init;",
"dc->no_user = 1;",
"dc->vmsd = &vmstate_vpb_sic;",
"}"
] | [
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
13,856 | static int nvenc_upload_frame(AVCodecContext *avctx, const AVFrame *frame,
NvencSurface *nvenc_frame)
{
NvencContext *ctx = avctx->priv_data;
NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs;
NV_ENCODE_API_FUNCTION_LIST *p_nvenc = &dl_fn->nvenc_funcs;
... | true | FFmpeg | bbe1b21022e4872bc64066d46a4567dc1b655f7a | static int nvenc_upload_frame(AVCodecContext *avctx, const AVFrame *frame,
NvencSurface *nvenc_frame)
{
NvencContext *ctx = avctx->priv_data;
NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs;
NV_ENCODE_API_FUNCTION_LIST *p_nvenc = &dl_fn->nvenc_funcs;
... | {
"code": [
" nvenc_frame->in_map.version = NV_ENC_MAP_INPUT_RESOURCE_VER;",
" nvenc_frame->in_map.registeredResource = ctx->registered_frames[reg_idx].regptr;",
" nv_status = p_nvenc->nvEncMapInputResource(ctx->nvencoder, &nvenc_frame->in_map);",
" if (nv_status != NV_ENC_... | static int FUNC_0(AVCodecContext *VAR_0, const AVFrame *VAR_1,
NvencSurface *VAR_2)
{
NvencContext *ctx = VAR_0->priv_data;
NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs;
NV_ENCODE_API_FUNCTION_LIST *p_nvenc = &dl_fn->nvenc_funcs;
int VAR_3;
NV... | [
"static int FUNC_0(AVCodecContext *VAR_0, const AVFrame *VAR_1,\nNvencSurface *VAR_2)\n{",
"NvencContext *ctx = VAR_0->priv_data;",
"NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs;",
"NV_ENCODE_API_FUNCTION_LIST *p_nvenc = &dl_fn->nvenc_funcs;",
"int VAR_3;",
"NVENCSTATUS nv_status;",
"if (VAR_0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
0,
1,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37,
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
13,858 | void QEMU_NORETURN do_unassigned_access(target_phys_addr_t addr, int is_write,
int is_exec, int unused, int size)
{
env->trap_arg0 = addr;
env->trap_arg1 = is_write;
dynamic_excp(EXCP_MCHK, 0);
}
| true | qemu | b14ef7c9ab41ea824c3ccadb070ad95567cca84e | void QEMU_NORETURN do_unassigned_access(target_phys_addr_t addr, int is_write,
int is_exec, int unused, int size)
{
env->trap_arg0 = addr;
env->trap_arg1 = is_write;
dynamic_excp(EXCP_MCHK, 0);
}
| {
"code": [
"void QEMU_NORETURN do_unassigned_access(target_phys_addr_t addr, int is_write,",
" int is_exec, int unused, int size)"
],
"line_no": [
1,
3
]
} | void VAR_0 do_unassigned_access(target_phys_addr_t addr, int is_write,
int is_exec, int unused, int size)
{
env->trap_arg0 = addr;
env->trap_arg1 = is_write;
dynamic_excp(EXCP_MCHK, 0);
}
| [
"void VAR_0 do_unassigned_access(target_phys_addr_t addr, int is_write,\nint is_exec, int unused, int size)\n{",
"env->trap_arg0 = addr;",
"env->trap_arg1 = is_write;",
"dynamic_excp(EXCP_MCHK, 0);",
"}"
] | [
1,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
13,860 | static int dct_quantize_refine(MpegEncContext *s, //FIXME breaks denoise?
DCTELEM *block, int16_t *weight, DCTELEM *orig,
int n, int qscale){
int16_t rem[64];
DCTELEM d1[64];
const int *qmat;
const uint8_t *scantable= s->intra_scantable.scantable;
... | true | FFmpeg | 125af022434fbb6a61ba8244eb19d3a43f9687e9 | static int dct_quantize_refine(MpegEncContext *s,
DCTELEM *block, int16_t *weight, DCTELEM *orig,
int n, int qscale){
int16_t rem[64];
DCTELEM d1[64];
const int *qmat;
const uint8_t *scantable= s->intra_scantable.scantable;
const uint8_t *perm_... | {
"code": [
" DCTELEM d1[64];"
],
"line_no": [
9
]
} | static int FUNC_0(MpegEncContext *VAR_0,
DCTELEM *VAR_1, int16_t *VAR_2, DCTELEM *VAR_3,
int VAR_4, int VAR_5){
int16_t rem[64];
DCTELEM d1[64];
const int *VAR_6;
const uint8_t *VAR_7= VAR_0->intra_scantable.VAR_7;
const uint8_t *VAR_8= VAR_0->... | [
"static int FUNC_0(MpegEncContext *VAR_0,\nDCTELEM *VAR_1, int16_t *VAR_2, DCTELEM *VAR_3,\nint VAR_4, int VAR_5){",
"int16_t rem[64];",
"DCTELEM d1[64];",
"const int *VAR_6;",
"const uint8_t *VAR_7= VAR_0->intra_scantable.VAR_7;",
"const uint8_t *VAR_8= VAR_0->intra_scantable.permutated;",
"int VAR_9[6... | [
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
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
13,861 | void *g_realloc(void * mem, size_t n_bytes)
{
__coverity_negative_sink__(n_bytes);
mem = realloc(mem, n_bytes == 0 ? 1 : n_bytes);
if (!mem) __coverity_panic__();
return mem;
}
| true | qemu | 9d7a4c6690ef9962a3b20034f65008f1ea15c1d6 | void *g_realloc(void * mem, size_t n_bytes)
{
__coverity_negative_sink__(n_bytes);
mem = realloc(mem, n_bytes == 0 ? 1 : n_bytes);
if (!mem) __coverity_panic__();
return mem;
}
| {
"code": [
" __coverity_negative_sink__(n_bytes);",
" if (!mem) __coverity_panic__();",
" return mem;",
" __coverity_negative_sink__(n_bytes);",
" if (!mem) __coverity_panic__();",
" return mem;",
"void *g_realloc(void * mem, size_t n_bytes)",
" __coverity_negativ... | void *FUNC_0(void * VAR_0, size_t VAR_1)
{
__coverity_negative_sink__(VAR_1);
VAR_0 = realloc(VAR_0, VAR_1 == 0 ? 1 : VAR_1);
if (!VAR_0) __coverity_panic__();
return VAR_0;
}
| [
"void *FUNC_0(void * VAR_0, size_t VAR_1)\n{",
"__coverity_negative_sink__(VAR_1);",
"VAR_0 = realloc(VAR_0, VAR_1 == 0 ? 1 : VAR_1);",
"if (!VAR_0) __coverity_panic__();",
"return VAR_0;",
"}"
] | [
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
13,862 | av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx)
{
int i;
ff_check_alignment();
#if CONFIG_ENCODERS
if (avctx->bits_per_raw_sample == 10) {
c->fdct = ff_jpeg_fdct_islow_10;
c->fdct248 = ff_fdct248_islow_10;
} else {
if(avctx->dct_algo==FF_DCT_FAS... | true | FFmpeg | 0a07f2b346433a9a2677c69c6b29a1a827e39109 | av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx)
{
int i;
ff_check_alignment();
#if CONFIG_ENCODERS
if (avctx->bits_per_raw_sample == 10) {
c->fdct = ff_jpeg_fdct_islow_10;
c->fdct248 = ff_fdct248_islow_10;
} else {
if(avctx->dct_algo==FF_DCT_FAS... | {
"code": [
" int i;",
" for(i=0; i<64; i++){",
" if(!c->put_2tap_qpel_pixels_tab[0][i])",
" c->put_2tap_qpel_pixels_tab[0][i]= c->put_h264_qpel_pixels_tab[0][i];",
" if(!c->avg_2tap_qpel_pixels_tab[0][i])",
" c->avg_2tap_qpel_pixels_tab[0][i]= c->avg_... | av_cold void FUNC_0(DSPContext* c, AVCodecContext *avctx)
{
int VAR_0;
ff_check_alignment();
#if CONFIG_ENCODERS
if (avctx->bits_per_raw_sample == 10) {
c->fdct = ff_jpeg_fdct_islow_10;
c->fdct248 = ff_fdct248_islow_10;
} else {
if(avctx->dct_algo==FF_DCT_FASTINT)... | [
"av_cold void FUNC_0(DSPContext* c, AVCodecContext *avctx)\n{",
"int VAR_0;",
"ff_check_alignment();",
"#if CONFIG_ENCODERS\nif (avctx->bits_per_raw_sample == 10) {",
"c->fdct = ff_jpeg_fdct_islow_10;",
"c->fdct248 = ff_fdct248_islow_10;",
"} else {",
"if(avctx->dct_algo==FF_DCT_FASTINT) {",
"c->... | [
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
9
],
[
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
... |
13,863 | static int mpc7_decode_frame(AVCodecContext * avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
MPCContext *c = avctx->priv_data;
GetBitContext gb;
uint8_t *bits;
in... | false | FFmpeg | c8b5c4d27409dfdcec80868686b173ba446c998b | static int mpc7_decode_frame(AVCodecContext * avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
MPCContext *c = avctx->priv_data;
GetBitContext gb;
uint8_t *bits;
in... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext * VAR_0,
void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
MPCContext *c = VAR_0->priv_data;
GetBitContext gb;
uint8_t *bits;
int VAR_6, VAR_7... | [
"static 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;",
"MPCContext *c = VAR_0->priv_data;",
"GetBitContext gb;",
"uint8_t *bits;",
"int VAR_6, VAR_7;",
"int VAR_8 = -1;",
"Band *bands = c->bands;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
... |
13,864 | void ff_h264_filter_mb(const H264Context *h, H264SliceContext *sl,
int mb_x, int mb_y,
uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr,
unsigned int linesize, unsigned int uvlinesize)
{
const int mb_xy= mb_x + mb_y*h->mb_stride;
const i... | false | FFmpeg | 3176217c60ca7828712985092d9102d331ea4f3d | void ff_h264_filter_mb(const H264Context *h, H264SliceContext *sl,
int mb_x, int mb_y,
uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr,
unsigned int linesize, unsigned int uvlinesize)
{
const int mb_xy= mb_x + mb_y*h->mb_stride;
const i... | {
"code": [],
"line_no": []
} | void FUNC_0(const H264Context *VAR_0, H264SliceContext *VAR_1,
int VAR_2, int VAR_3,
uint8_t *VAR_4, uint8_t *VAR_5, uint8_t *VAR_6,
unsigned int VAR_7, unsigned int VAR_8)
{
const int VAR_9= VAR_2 + VAR_3*VAR_0->mb_stride;
const int VAR... | [
"void FUNC_0(const H264Context *VAR_0, H264SliceContext *VAR_1,\nint VAR_2, int VAR_3,\nuint8_t *VAR_4, uint8_t *VAR_5, uint8_t *VAR_6,\nunsigned int VAR_7, unsigned int VAR_8)\n{",
"const int VAR_9= VAR_2 + VAR_3*VAR_0->mb_stride;",
"const int VAR_10 = VAR_0->cur_pic.VAR_10[VAR_9];",
"const int VAR_11 = IS_I... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29,
33,
37
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[
57
],
[... |
13,865 | static void show_streams(WriterContext *w, AVFormatContext *fmt_ctx)
{
int i;
writer_print_section_header(w, SECTION_ID_STREAMS);
for (i = 0; i < fmt_ctx->nb_streams; i++)
if (selected_streams[i])
show_stream(w, fmt_ctx, i, 0);
writer_print_section_footer(w);
}
| false | FFmpeg | e87190f5d20d380608f792ceb14d0def1d80e24b | static void show_streams(WriterContext *w, AVFormatContext *fmt_ctx)
{
int i;
writer_print_section_header(w, SECTION_ID_STREAMS);
for (i = 0; i < fmt_ctx->nb_streams; i++)
if (selected_streams[i])
show_stream(w, fmt_ctx, i, 0);
writer_print_section_footer(w);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(WriterContext *VAR_0, AVFormatContext *VAR_1)
{
int VAR_2;
writer_print_section_header(VAR_0, SECTION_ID_STREAMS);
for (VAR_2 = 0; VAR_2 < VAR_1->nb_streams; VAR_2++)
if (selected_streams[VAR_2])
show_stream(VAR_0, VAR_1, VAR_2, 0);
writer_print_section_foot... | [
"static void FUNC_0(WriterContext *VAR_0, AVFormatContext *VAR_1)\n{",
"int VAR_2;",
"writer_print_section_header(VAR_0, SECTION_ID_STREAMS);",
"for (VAR_2 = 0; VAR_2 < VAR_1->nb_streams; VAR_2++)",
"if (selected_streams[VAR_2])\nshow_stream(VAR_0, VAR_1, VAR_2, 0);",
"writer_print_section_footer(VAR_0);"... | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
15
],
[
17
]
] |
13,866 | static av_always_inline void h264_loop_filter_strength_iteration_mmx2(int16_t bS[2][4][4], uint8_t nnz[40],
int8_t ref[2][40], int16_t mv[2][40][2],
int bidir, int edges, int... | false | FFmpeg | 2c3135f6d3faf764f5df364db00da1b2d4dcb097 | static av_always_inline void h264_loop_filter_strength_iteration_mmx2(int16_t bS[2][4][4], uint8_t nnz[40],
int8_t ref[2][40], int16_t mv[2][40][2],
int bidir, int edges, int... | {
"code": [],
"line_no": []
} | static av_always_inline void FUNC_0(int16_t bS[2][4][4], uint8_t nnz[40],
int8_t ref[2][40], int16_t mv[2][40][2],
int bidir, int edges, int step,
... | [
"static av_always_inline void FUNC_0(int16_t bS[2][4][4], uint8_t nnz[40],\nint8_t ref[2][40], int16_t mv[2][40][2],\nint bidir, int edges, int step,\nint mask_mv, int dir)\n{",
"const x86_reg VAR_0 = dir ? -8 : -1;",
"DECLARE_ALIGNED(8, const uint64_t, mask_dir) = dir ? 0 : 0xffffffffffffffffULL;",
"int ... | [
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,
61,
63,... |
13,868 | static void intra_predict_hor_dc_8x8_msa(uint8_t *src, int32_t stride)
{
uint8_t lp_cnt;
uint32_t src0 = 0, src1 = 0;
uint64_t out0, out1;
for (lp_cnt = 0; lp_cnt < 4; lp_cnt++) {
src0 += src[lp_cnt * stride - 1];
src1 += src[(4 + lp_cnt) * stride - 1];
}
src0 = (src... | false | FFmpeg | d6737539e77e78fca9a04914d51996cfd1ccc55c | static void intra_predict_hor_dc_8x8_msa(uint8_t *src, int32_t stride)
{
uint8_t lp_cnt;
uint32_t src0 = 0, src1 = 0;
uint64_t out0, out1;
for (lp_cnt = 0; lp_cnt < 4; lp_cnt++) {
src0 += src[lp_cnt * stride - 1];
src1 += src[(4 + lp_cnt) * stride - 1];
}
src0 = (src... | {
"code": [],
"line_no": []
} | static void FUNC_0(uint8_t *VAR_0, int32_t VAR_1)
{
uint8_t lp_cnt;
uint32_t src0 = 0, src1 = 0;
uint64_t out0, out1;
for (lp_cnt = 0; lp_cnt < 4; lp_cnt++) {
src0 += VAR_0[lp_cnt * VAR_1 - 1];
src1 += VAR_0[(4 + lp_cnt) * VAR_1 - 1];
}
src0 = (src0 + 2) >> 2;
s... | [
"static void FUNC_0(uint8_t *VAR_0, int32_t VAR_1)\n{",
"uint8_t lp_cnt;",
"uint32_t src0 = 0, src1 = 0;",
"uint64_t out0, out1;",
"for (lp_cnt = 0; lp_cnt < 4; lp_cnt++) {",
"src0 += VAR_0[lp_cnt * VAR_1 - 1];",
"src1 += VAR_0[(4 + lp_cnt) * VAR_1 - 1];",
"}",
"src0 = (src0 + 2) >> 2;",
"src1 = (... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
]
] |
13,870 | static int config_out_props(AVFilterLink *outlink)
{
AVFilterContext *ctx = outlink->src;
AVFilterLink *inlink = outlink->src->inputs[0];
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(outlink->format);
TInterlaceContext *tinterlace = ctx->priv;
int i;
tinterlace->vsub = desc->log... | false | FFmpeg | 3af1060319b46005dbfb3b01f9104539caf30146 | static int config_out_props(AVFilterLink *outlink)
{
AVFilterContext *ctx = outlink->src;
AVFilterLink *inlink = outlink->src->inputs[0];
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(outlink->format);
TInterlaceContext *tinterlace = ctx->priv;
int i;
tinterlace->vsub = desc->log... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFilterLink *VAR_0)
{
AVFilterContext *ctx = VAR_0->src;
AVFilterLink *inlink = VAR_0->src->inputs[0];
const AVPixFmtDescriptor *VAR_1 = av_pix_fmt_desc_get(VAR_0->format);
TInterlaceContext *tinterlace = ctx->priv;
int VAR_3;
tinterlace->vsub = VAR_1->log2_chroma_h;
... | [
"static int FUNC_0(AVFilterLink *VAR_0)\n{",
"AVFilterContext *ctx = VAR_0->src;",
"AVFilterLink *inlink = VAR_0->src->inputs[0];",
"const AVPixFmtDescriptor *VAR_1 = av_pix_fmt_desc_get(VAR_0->format);",
"TInterlaceContext *tinterlace = ctx->priv;",
"int VAR_3;",
"tinterlace->vsub = VAR_1->log2_chroma_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43,
45
],
[
47,
49
],
[
55
... |
13,871 | static void rv40_v_weak_loop_filter(uint8_t *src, const int stride,
const int filter_p1, const int filter_q1,
const int alpha, const int beta,
const int lim_p0q0, const int lim_q1,
... | true | FFmpeg | 3ab9a2a5577d445252724af4067d2a7c8a378efa | static void rv40_v_weak_loop_filter(uint8_t *src, const int stride,
const int filter_p1, const int filter_q1,
const int alpha, const int beta,
const int lim_p0q0, const int lim_q1,
... | {
"code": [
"static void rv40_v_weak_loop_filter(uint8_t *src, const int stride,"
],
"line_no": [
1
]
} | static void FUNC_0(uint8_t *VAR_0, const int VAR_1,
const int VAR_2, const int VAR_3,
const int VAR_4, const int VAR_5,
const int VAR_6, const int VAR_7,
const int VAR_8)
... | [
"static void FUNC_0(uint8_t *VAR_0, const int VAR_1,\nconst int VAR_2, const int VAR_3,\nconst int VAR_4, const int VAR_5,\nconst int VAR_6, const int VAR_7,\nconst int VAR_8)\n{",
"rv40_weak_loop_filter(VAR_0, 1, VAR_1, VAR_2, VAR_3,\nVAR_4, VAR_5, VAR_6, VAR_7, VAR_8);",
"}"
] | [
1,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13,
15
],
[
17
]
] |
13,872 | static int open_output_file(OptionsContext *o, const char *filename)
{
AVFormatContext *oc;
int i, j, err;
AVOutputFormat *file_oformat;
OutputFile *of;
OutputStream *ost;
InputStream *ist;
AVDictionary *unused_opts = NULL;
AVDictionaryEntry *e = NULL;
if (o->stop_time... | true | FFmpeg | a25c5dbb5ee0f54c474d9caf43359cd0f61ae1bf | static int open_output_file(OptionsContext *o, const char *filename)
{
AVFormatContext *oc;
int i, j, err;
AVOutputFormat *file_oformat;
OutputFile *of;
OutputStream *ost;
InputStream *ist;
AVDictionary *unused_opts = NULL;
AVDictionaryEntry *e = NULL;
if (o->stop_time... | {
"code": [
" if (!key || !*p2)"
],
"line_no": [
951
]
} | static int FUNC_0(OptionsContext *VAR_0, const char *VAR_1)
{
AVFormatContext *oc;
int VAR_2, VAR_5, VAR_5;
AVOutputFormat *file_oformat;
OutputFile *of;
OutputStream *ost;
InputStream *ist;
AVDictionary *unused_opts = NULL;
AVDictionaryEntry *e = NULL;
if (VAR_0->stop... | [
"static int FUNC_0(OptionsContext *VAR_0, const char *VAR_1)\n{",
"AVFormatContext *oc;",
"int VAR_2, VAR_5, VAR_5;",
"AVOutputFormat *file_oformat;",
"OutputFile *of;",
"OutputStream *ost;",
"InputStream *ist;",
"AVDictionary *unused_opts = NULL;",
"AVDictionaryEntry *e = NULL;",
"if (VAR_0->sto... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
13,873 | static void vapic_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->no_user = 1;
dc->reset = vapic_reset;
dc->vmsd = &vmstate_vapic;
dc->realize = vapic_realize;
}
| true | qemu | efec3dd631d94160288392721a5f9c39e50fb2bc | static void vapic_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->no_user = 1;
dc->reset = vapic_reset;
dc->vmsd = &vmstate_vapic;
dc->realize = vapic_realize;
}
| {
"code": [
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;",
" dc->no_user = 1;"... | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
dc->no_user = 1;
dc->reset = vapic_reset;
dc->vmsd = &vmstate_vapic;
dc->realize = vapic_realize;
}
| [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"dc->no_user = 1;",
"dc->reset = vapic_reset;",
"dc->vmsd = &vmstate_vapic;",
"dc->realize = vapic_realize;",
"}"
] | [
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
13,874 | AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score_max)
{
AVProbeData lpd = *pd;
AVInputFormat *fmt1 = NULL, *fmt;
int score, id3 = 0;
if (lpd.buf_size > 10 && ff_id3v2_match(lpd.buf, ID3v2_DEFAULT_MAGIC)) {
int id3len = ff_id3v2_tag_len(lpd.buf);
i... | false | FFmpeg | 7a773d4d59c9a2e14cb84201f8d17cbf3edaede8 | AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score_max)
{
AVProbeData lpd = *pd;
AVInputFormat *fmt1 = NULL, *fmt;
int score, id3 = 0;
if (lpd.buf_size > 10 && ff_id3v2_match(lpd.buf, ID3v2_DEFAULT_MAGIC)) {
int id3len = ff_id3v2_tag_len(lpd.buf);
i... | {
"code": [],
"line_no": []
} | AVInputFormat *FUNC_0(AVProbeData *pd, int is_opened, int *score_max)
{
AVProbeData lpd = *pd;
AVInputFormat *fmt1 = NULL, *fmt;
int VAR_0, VAR_1 = 0;
if (lpd.buf_size > 10 && ff_id3v2_match(lpd.buf, ID3v2_DEFAULT_MAGIC)) {
int VAR_2 = ff_id3v2_tag_len(lpd.buf);
if (lpd.buf_size... | [
"AVInputFormat *FUNC_0(AVProbeData *pd, int is_opened, int *score_max)\n{",
"AVProbeData lpd = *pd;",
"AVInputFormat *fmt1 = NULL, *fmt;",
"int VAR_0, VAR_1 = 0;",
"if (lpd.buf_size > 10 && ff_id3v2_match(lpd.buf, ID3v2_DEFAULT_MAGIC)) {",
"int VAR_2 = ff_id3v2_tag_len(lpd.buf);",
"if (lpd.buf_size > VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
13,875 | static void v4l2_free_buffer(void *opaque, uint8_t *unused)
{
V4L2Buffer* avbuf = opaque;
V4L2m2mContext *s = buf_to_m2mctx(avbuf);
atomic_fetch_sub_explicit(&s->refcount, 1, memory_order_acq_rel);
if (s->reinit) {
if (!atomic_load(&s->refcount))
sem_post(&s->refsync);
... | true | FFmpeg | a0c624e299730c8c5800375c2f5f3c6c200053ff | static void v4l2_free_buffer(void *opaque, uint8_t *unused)
{
V4L2Buffer* avbuf = opaque;
V4L2m2mContext *s = buf_to_m2mctx(avbuf);
atomic_fetch_sub_explicit(&s->refcount, 1, memory_order_acq_rel);
if (s->reinit) {
if (!atomic_load(&s->refcount))
sem_post(&s->refsync);
... | {
"code": [
" atomic_fetch_sub_explicit(&s->refcount, 1, memory_order_acq_rel);",
" if (s->reinit) {",
" if (!atomic_load(&s->refcount))",
" sem_post(&s->refsync);",
" if (avbuf->context->streamon) {",
" ff_v4l2_buffer_enqueue(avbuf);",
" if (!atomic_lo... | static void FUNC_0(void *VAR_0, uint8_t *VAR_1)
{
V4L2Buffer* avbuf = VAR_0;
V4L2m2mContext *s = buf_to_m2mctx(avbuf);
atomic_fetch_sub_explicit(&s->refcount, 1, memory_order_acq_rel);
if (s->reinit) {
if (!atomic_load(&s->refcount))
sem_post(&s->refsync);
return;
... | [
"static void FUNC_0(void *VAR_0, uint8_t *VAR_1)\n{",
"V4L2Buffer* avbuf = VAR_0;",
"V4L2m2mContext *s = buf_to_m2mctx(avbuf);",
"atomic_fetch_sub_explicit(&s->refcount, 1, memory_order_acq_rel);",
"if (s->reinit) {",
"if (!atomic_load(&s->refcount))\nsem_post(&s->refsync);",
"return;",
"}",
"if (av... | [
0,
0,
0,
1,
1,
1,
0,
0,
1,
1,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15,
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35,
37
],
[
39
]
] |
13,876 | static int64_t wav_seek_tag(AVIOContext *s, int64_t offset, int whence)
{
return avio_seek(s, offset + (offset & 1), whence);
}
| true | FFmpeg | 09602dbe7a6400e12a66001be5223298f3dc7c56 | static int64_t wav_seek_tag(AVIOContext *s, int64_t offset, int whence)
{
return avio_seek(s, offset + (offset & 1), whence);
}
| {
"code": [
" return avio_seek(s, offset + (offset & 1), whence);"
],
"line_no": [
5
]
} | static int64_t FUNC_0(AVIOContext *s, int64_t offset, int whence)
{
return avio_seek(s, offset + (offset & 1), whence);
}
| [
"static int64_t FUNC_0(AVIOContext *s, int64_t offset, int whence)\n{",
"return avio_seek(s, offset + (offset & 1), whence);",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
13,877 | static void ahci_start_dma(IDEDMA *dma, IDEState *s,
BlockCompletionFunc *dma_cb)
{
#ifdef DEBUG_AHCI
AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma);
#endif
DPRINTF(ad->port_no, "\n");
s->io_buffer_offset = 0;
dma_cb(s, 0);
}
| true | qemu | 192cf55cc02dc0838bbfa5ac17feb7f6c1651441 | static void ahci_start_dma(IDEDMA *dma, IDEState *s,
BlockCompletionFunc *dma_cb)
{
#ifdef DEBUG_AHCI
AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma);
#endif
DPRINTF(ad->port_no, "\n");
s->io_buffer_offset = 0;
dma_cb(s, 0);
}
| {
"code": [
"#ifdef DEBUG_AHCI",
"#endif",
"#ifdef DEBUG_AHCI",
"#ifdef DEBUG_AHCI",
"#endif"
],
"line_no": [
7,
11,
7,
7,
11
]
} | static void FUNC_0(IDEDMA *VAR_0, IDEState *VAR_1,
BlockCompletionFunc *VAR_2)
{
#ifdef DEBUG_AHCI
AHCIDevice *ad = DO_UPCAST(AHCIDevice, VAR_0, VAR_0);
#endif
DPRINTF(ad->port_no, "\n");
VAR_1->io_buffer_offset = 0;
VAR_2(VAR_1, 0);
}
| [
"static void FUNC_0(IDEDMA *VAR_0, IDEState *VAR_1,\nBlockCompletionFunc *VAR_2)\n{",
"#ifdef DEBUG_AHCI\nAHCIDevice *ad = DO_UPCAST(AHCIDevice, VAR_0, VAR_0);",
"#endif\nDPRINTF(ad->port_no, \"\\n\");",
"VAR_1->io_buffer_offset = 0;",
"VAR_2(VAR_1, 0);",
"}"
] | [
0,
1,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7,
9
],
[
11,
13
],
[
15
],
[
17
],
[
19
]
] |
13,878 | rdt_new_context (void)
{
PayloadContext *rdt = av_mallocz(sizeof(PayloadContext));
avformat_open_input(&rdt->rmctx, "", &ff_rdt_demuxer, NULL);
return rdt;
}
| true | FFmpeg | ed307e2659f2db81a434afece905383fdceb9b6e | rdt_new_context (void)
{
PayloadContext *rdt = av_mallocz(sizeof(PayloadContext));
avformat_open_input(&rdt->rmctx, "", &ff_rdt_demuxer, NULL);
return rdt;
}
| {
"code": [
" avformat_open_input(&rdt->rmctx, \"\", &ff_rdt_demuxer, NULL);"
],
"line_no": [
9
]
} | FUNC_0 (void)
{
PayloadContext *rdt = av_mallocz(sizeof(PayloadContext));
avformat_open_input(&rdt->rmctx, "", &ff_rdt_demuxer, NULL);
return rdt;
}
| [
"FUNC_0 (void)\n{",
"PayloadContext *rdt = av_mallocz(sizeof(PayloadContext));",
"avformat_open_input(&rdt->rmctx, \"\", &ff_rdt_demuxer, NULL);",
"return rdt;",
"}"
] | [
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
]
] |
13,879 | static void qpci_pc_config_writeb(QPCIBus *bus, int devfn, uint8_t offset, uint8_t value)
{
outl(0xcf8, (1 << 31) | (devfn << 8) | offset);
outb(0xcfc, value);
}
| true | qemu | a879125b47c3ae554c01824f996a64a45a86556e | static void qpci_pc_config_writeb(QPCIBus *bus, int devfn, uint8_t offset, uint8_t value)
{
outl(0xcf8, (1 << 31) | (devfn << 8) | offset);
outb(0xcfc, value);
}
| {
"code": [
" outl(0xcf8, (1 << 31) | (devfn << 8) | offset);",
" outl(0xcf8, (1 << 31) | (devfn << 8) | offset);",
" outl(0xcf8, (1 << 31) | (devfn << 8) | offset);",
" outl(0xcf8, (1 << 31) | (devfn << 8) | offset);",
" outl(0xcf8, (1 << 31) | (devfn << 8) | offset);",
" ou... | static void FUNC_0(QPCIBus *VAR_0, int VAR_1, uint8_t VAR_2, uint8_t VAR_3)
{
outl(0xcf8, (1 << 31) | (VAR_1 << 8) | VAR_2);
outb(0xcfc, VAR_3);
}
| [
"static void FUNC_0(QPCIBus *VAR_0, int VAR_1, uint8_t VAR_2, uint8_t VAR_3)\n{",
"outl(0xcf8, (1 << 31) | (VAR_1 << 8) | VAR_2);",
"outb(0xcfc, VAR_3);",
"}"
] | [
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
13,880 | static void hpet_set_timer(HPETTimer *t)
{
uint64_t diff;
uint32_t wrap_diff; /* how many ticks until we wrap? */
uint64_t cur_tick = hpet_get_ticks();
/* whenever new timer is being set up, make sure wrap_flag is 0 */
t->wrap_flag = 0;
diff = hpet_calculate_diff(t, cur_tick);
/... | true | qemu | 27bb0b2d6f80f058bdb6fcc8fcdfa69b0c8a6d71 | static void hpet_set_timer(HPETTimer *t)
{
uint64_t diff;
uint32_t wrap_diff;
uint64_t cur_tick = hpet_get_ticks();
t->wrap_flag = 0;
diff = hpet_calculate_diff(t, cur_tick);
if (t->config & HPET_TN_32BIT && !timer_is_periodic(t)) {
wrap_diff = 0xffffffff - ... | {
"code": [
" qemu_mod_timer(t->qemu_timer, qemu_get_clock(vm_clock)",
" + (int64_t)ticks_to_ns(diff));"
],
"line_no": [
41,
43
]
} | static void FUNC_0(HPETTimer *VAR_0)
{
uint64_t diff;
uint32_t wrap_diff;
uint64_t cur_tick = hpet_get_ticks();
VAR_0->wrap_flag = 0;
diff = hpet_calculate_diff(VAR_0, cur_tick);
if (VAR_0->config & HPET_TN_32BIT && !timer_is_periodic(VAR_0)) {
wrap_diff = 0... | [
"static void FUNC_0(HPETTimer *VAR_0)\n{",
"uint64_t diff;",
"uint32_t wrap_diff;",
"uint64_t cur_tick = hpet_get_ticks();",
"VAR_0->wrap_flag = 0;",
"diff = hpet_calculate_diff(VAR_0, cur_tick);",
"if (VAR_0->config & HPET_TN_32BIT && !timer_is_periodic(VAR_0)) {",
"wrap_diff = 0xffffffff - (uint32_t... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
15
],
[
17
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41,
43
],
[
45
]
] |
13,881 | static uint32_t set_allocation_state(sPAPRDRConnector *drc,
sPAPRDRAllocationState state)
{
sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);
DPRINTFN("drc: %x, set_allocation_state: %x", get_index(drc), state);
if (state == SPAPR_DR_ALLOCATION_ST... | true | qemu | aab99135b63522267c6fdae04712cb2f02c8c7de | static uint32_t set_allocation_state(sPAPRDRConnector *drc,
sPAPRDRAllocationState state)
{
sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);
DPRINTFN("drc: %x, set_allocation_state: %x", get_index(drc), state);
if (state == SPAPR_DR_ALLOCATION_ST... | {
"code": [],
"line_no": []
} | static uint32_t FUNC_0(sPAPRDRConnector *drc,
sPAPRDRAllocationState state)
{
sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);
DPRINTFN("drc: %x, FUNC_0: %x", get_index(drc), state);
if (state == SPAPR_DR_ALLOCATION_STATE_USABLE) {
... | [
"static uint32_t FUNC_0(sPAPRDRConnector *drc,\nsPAPRDRAllocationState state)\n{",
"sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);",
"DPRINTFN(\"drc: %x, FUNC_0: %x\", get_index(drc), state);",
"if (state == SPAPR_DR_ALLOCATION_STATE_USABLE) {",
"if (!drc->dev) {",
"return RTAS_OUT_NO_SU... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
15
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41,
43
],
[
45
],
[
47,
49
],
[
53
],
[
55
],
[
57
],
[
59
]
] |
13,882 | int chr_baum_init(QemuOpts *opts, CharDriverState **_chr)
{
BaumDriverState *baum;
CharDriverState *chr;
brlapi_handle_t *handle;
#ifdef CONFIG_SDL
SDL_SysWMinfo info;
#endif
int tty;
baum = g_malloc0(sizeof(BaumDriverState));
baum->chr = chr = g_malloc0(sizeof(CharDriverState));... | true | qemu | 1f51470d044852592922f91000e741c381582cdc | int chr_baum_init(QemuOpts *opts, CharDriverState **_chr)
{
BaumDriverState *baum;
CharDriverState *chr;
brlapi_handle_t *handle;
#ifdef CONFIG_SDL
SDL_SysWMinfo info;
#endif
int tty;
baum = g_malloc0(sizeof(BaumDriverState));
baum->chr = chr = g_malloc0(sizeof(CharDriverState));... | {
"code": [
" *_chr = chr;",
" return 0;",
"int chr_baum_init(QemuOpts *opts, CharDriverState **_chr)",
" *_chr = chr;",
" return 0;",
" return -EIO;",
" *_chr = chr;",
" return 0;",
" return 0;",
" return 0;",
" return 0;",
" *_chr = ch... | int FUNC_0(QemuOpts *VAR_0, CharDriverState **VAR_1)
{
BaumDriverState *baum;
CharDriverState *chr;
brlapi_handle_t *handle;
#ifdef CONFIG_SDL
SDL_SysWMinfo info;
#endif
int VAR_2;
baum = g_malloc0(sizeof(BaumDriverState));
baum->chr = chr = g_malloc0(sizeof(CharDriverState));
... | [
"int FUNC_0(QemuOpts *VAR_0, CharDriverState **VAR_1)\n{",
"BaumDriverState *baum;",
"CharDriverState *chr;",
"brlapi_handle_t *handle;",
"#ifdef CONFIG_SDL\nSDL_SysWMinfo info;",
"#endif\nint VAR_2;",
"baum = g_malloc0(sizeof(BaumDriverState));",
"baum->chr = chr = g_malloc0(sizeof(CharDriverState));... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13
],
[
15,
17
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
13,883 | static av_cold int ipvideo_decode_init(AVCodecContext *avctx)
{
IpvideoContext *s = avctx->priv_data;
s->avctx = avctx;
s->is_16bpp = avctx->bits_per_coded_sample == 16;
avctx->pix_fmt = s->is_16bpp ? AV_PIX_FMT_RGB555 : AV_PIX_FMT_PAL8;
ff_hpeldsp_init(&s->hdsp, avctx->flags);
s-... | true | FFmpeg | 60a45713e7bc94b079f8cd39cfaa300e9c381f62 | static av_cold int ipvideo_decode_init(AVCodecContext *avctx)
{
IpvideoContext *s = avctx->priv_data;
s->avctx = avctx;
s->is_16bpp = avctx->bits_per_coded_sample == 16;
avctx->pix_fmt = s->is_16bpp ? AV_PIX_FMT_RGB555 : AV_PIX_FMT_PAL8;
ff_hpeldsp_init(&s->hdsp, avctx->flags);
s-... | {
"code": [
" av_frame_free(&s->last_frame);",
" av_frame_free(&s->second_last_frame);",
" av_frame_free(&s->cur_decode_frame);",
" av_frame_free(&s->prev_decode_frame);",
" return AVERROR(ENOMEM);",
" ff_get_buffer(avctx, s->cur_decode_frame, 0);",
" ... | static av_cold int FUNC_0(AVCodecContext *avctx)
{
IpvideoContext *s = avctx->priv_data;
s->avctx = avctx;
s->is_16bpp = avctx->bits_per_coded_sample == 16;
avctx->pix_fmt = s->is_16bpp ? AV_PIX_FMT_RGB555 : AV_PIX_FMT_PAL8;
ff_hpeldsp_init(&s->hdsp, avctx->flags);
s->last_frame ... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"IpvideoContext *s = avctx->priv_data;",
"s->avctx = avctx;",
"s->is_16bpp = avctx->bits_per_coded_sample == 16;",
"avctx->pix_fmt = s->is_16bpp ? AV_PIX_FMT_RGB555 : AV_PIX_FMT_PAL8;",
"ff_hpeldsp_init(&s->hdsp, avctx->flags);",
"s->last_frame ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
... |
13,884 | static int vvfat_open(BlockDriverState *bs, QDict *options, int flags)
{
BDRVVVFATState *s = bs->opaque;
int cyls, heads, secs;
bool floppy;
const char *dirname;
QemuOpts *opts;
Error *local_err = NULL;
int ret;
#ifdef DEBUG
vvv = s;
#endif
DLOG(if (stderr == NULL) {
... | true | qemu | 78f27bd02ceba4a2f6ac5c725f4d4410eec205ef | static int vvfat_open(BlockDriverState *bs, QDict *options, int flags)
{
BDRVVVFATState *s = bs->opaque;
int cyls, heads, secs;
bool floppy;
const char *dirname;
QemuOpts *opts;
Error *local_err = NULL;
int ret;
#ifdef DEBUG
vvv = s;
#endif
DLOG(if (stderr == NULL) {
... | {
"code": [
" if (enable_write_target(s)) {",
" ret = -EIO;"
],
"line_no": [
199,
201
]
} | static int FUNC_0(BlockDriverState *VAR_0, QDict *VAR_1, int VAR_2)
{
BDRVVVFATState *s = VAR_0->opaque;
int VAR_3, VAR_4, VAR_5;
bool floppy;
const char *VAR_6;
QemuOpts *opts;
Error *local_err = NULL;
int VAR_7;
#ifdef DEBUG
vvv = s;
#endif
DLOG(if (stderr == NULL) {
... | [
"static int FUNC_0(BlockDriverState *VAR_0, QDict *VAR_1, int VAR_2)\n{",
"BDRVVVFATState *s = VAR_0->opaque;",
"int VAR_3, VAR_4, VAR_5;",
"bool floppy;",
"const char *VAR_6;",
"QemuOpts *opts;",
"Error *local_err = NULL;",
"int VAR_7;",
"#ifdef DEBUG\nvvv = s;",
"#endif\nDLOG(if (stderr == 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
],
[
21,
23
],
[
25,
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
... |
13,885 | static int v4l2_try_start(AVCodecContext *avctx)
{
V4L2m2mContext *s = avctx->priv_data;
V4L2Context *const capture = &s->capture;
V4L2Context *const output = &s->output;
struct v4l2_selection selection;
int ret;
/* 1. start the output process */
if (!output->streamon) {
r... | true | FFmpeg | a0c624e299730c8c5800375c2f5f3c6c200053ff | static int v4l2_try_start(AVCodecContext *avctx)
{
V4L2m2mContext *s = avctx->priv_data;
V4L2Context *const capture = &s->capture;
V4L2Context *const output = &s->output;
struct v4l2_selection selection;
int ret;
if (!output->streamon) {
ret = ff_v4l2_context_set_status(o... | {
"code": [
" V4L2m2mContext *s = avctx->priv_data;",
" V4L2m2mContext *s = avctx->priv_data;",
" V4L2m2mContext *s = avctx->priv_data;",
" V4L2m2mContext *s = avctx->priv_data;",
" V4L2m2mContext *s = avctx->priv_data;",
" V4L2m2mContext *s = avctx->priv_data;",
" V4L... | static int FUNC_0(AVCodecContext *VAR_0)
{
V4L2m2mContext *s = VAR_0->priv_data;
V4L2Context *const capture = &s->capture;
V4L2Context *const output = &s->output;
struct v4l2_selection VAR_1;
int VAR_2;
if (!output->streamon) {
VAR_2 = ff_v4l2_context_set_status(output, V... | [
"static int FUNC_0(AVCodecContext *VAR_0)\n{",
"V4L2m2mContext *s = VAR_0->priv_data;",
"V4L2Context *const capture = &s->capture;",
"V4L2Context *const output = &s->output;",
"struct v4l2_selection VAR_1;",
"int VAR_2;",
"if (!output->streamon) {",
"VAR_2 = ff_v4l2_context_set_status(output, VIDIOC_S... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35,
37
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
13,887 | static int vp3_decode_frame(AVCodecContext *avctx,
void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
Vp3DecodeContext *s = avctx->priv_data;
GetBitContext gb;
int i, ret... | true | FFmpeg | 6105b7219a90438deae71b0dc5a034c71ee30fc0 | static int vp3_decode_frame(AVCodecContext *avctx,
void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
Vp3DecodeContext *s = avctx->priv_data;
GetBitContext gb;
int i, ret... | {
"code": [
" } else",
" ret = vp3_decode_init(avctx);",
" } else",
" ret = vp3_decode_init(avctx);"
],
"line_no": [
57,
59,
57,
59
]
} | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
Vp3DecodeContext *s = VAR_0->priv_data;
GetBitContext gb;
int VAR_6, VAR_7;
... | [
"static 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;",
"Vp3DecodeContext *s = VAR_0->priv_data;",
"GetBitContext gb;",
"int VAR_6, VAR_7;",
"if ((VAR_7 = init_get_bits8(&gb, VAR_4, VAR_5)) < 0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21,
23
],
[
27,
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
... |
13,889 | static void sysbus_fdc_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->props = sysbus_fdc_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
} | true | qemu | e4f4fb1eca795e36f363b4647724221e774523c1 | static void sysbus_fdc_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->props = sysbus_fdc_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
} | {
"code": [],
"line_no": []
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
dc->props = sysbus_fdc_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
} | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"dc->props = sysbus_fdc_properties;",
"set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
18
]
] |
13,891 | static void gmc_motion(MpegEncContext *s,
uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
uint8_t **ref_picture)
{
uint8_t *ptr;
int linesize, uvlinesize;
const int a = s->sprite_warping_accuracy;
int ox, oy;
linesize = s->linesize;
... | true | FFmpeg | fd52d2d3d1ee41822a9801dffd41c0e1a2db32a8 | static void gmc_motion(MpegEncContext *s,
uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
uint8_t **ref_picture)
{
uint8_t *ptr;
int linesize, uvlinesize;
const int a = s->sprite_warping_accuracy;
int ox, oy;
linesize = s->linesize;
... | {
"code": [
" s->h_edge_pos >> 1, s->v_edge_pos >> 1);",
" s->h_edge_pos >> 1, s->v_edge_pos >> 1);"
],
"line_no": [
95,
95
]
} | static void FUNC_0(MpegEncContext *VAR_0,
uint8_t *VAR_1, uint8_t *VAR_2, uint8_t *VAR_3,
uint8_t **VAR_4)
{
uint8_t *ptr;
int VAR_5, VAR_6;
const int VAR_7 = VAR_0->sprite_warping_accuracy;
int VAR_8, VAR_9;
VAR_5 = VAR_0->VAR_5;
VAR_6 ... | [
"static void FUNC_0(MpegEncContext *VAR_0,\nuint8_t *VAR_1, uint8_t *VAR_2, uint8_t *VAR_3,\nuint8_t **VAR_4)\n{",
"uint8_t *ptr;",
"int VAR_5, VAR_6;",
"const int VAR_7 = VAR_0->sprite_warping_accuracy;",
"int VAR_8, VAR_9;",
"VAR_5 = VAR_0->VAR_5;",
"VAR_6 = VAR_0->VAR_6;",
"ptr = VAR_4[0];",
"V... | [
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
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25
],
[
29,
31
],
[
33,
35
],
[
39,
41,
43,
45,
47,
49
],
[
51,
53,
55,
57,
59,
61,
63
],
[... |
13,892 | static av_cold int Faac_encode_init(AVCodecContext *avctx)
{
FaacAudioContext *s = avctx->priv_data;
faacEncConfigurationPtr faac_cfg;
unsigned long samples_input, max_bytes_output;
/* number of channels */
if (avctx->channels < 1 || avctx->channels > 6)
return -1;
s->faac_ha... | false | FFmpeg | 2c006f438042435ec67012d6b78f0374e94180bf | static av_cold int Faac_encode_init(AVCodecContext *avctx)
{
FaacAudioContext *s = avctx->priv_data;
faacEncConfigurationPtr faac_cfg;
unsigned long samples_input, max_bytes_output;
if (avctx->channels < 1 || avctx->channels > 6)
return -1;
s->faac_handle = faacEncOpen(avctx... | {
"code": [],
"line_no": []
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
FaacAudioContext *s = avctx->priv_data;
faacEncConfigurationPtr faac_cfg;
unsigned long VAR_0, VAR_1;
if (avctx->channels < 1 || avctx->channels > 6)
return -1;
s->faac_handle = faacEncOpen(avctx->sample_rate,
... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"FaacAudioContext *s = avctx->priv_data;",
"faacEncConfigurationPtr faac_cfg;",
"unsigned long VAR_0, VAR_1;",
"if (avctx->channels < 1 || avctx->channels > 6)\nreturn -1;",
"s->faac_handle = faacEncOpen(avctx->sample_rate,\navctx->channels,\n&VAR_0, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
15,
17
],
[
21,
23,
25
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
47
],
[
49,
51
],
[
53
],
[
55,
57,
59
],
[
61
... |
13,894 | av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType inverse)
{
int n = 1 << nbits;
int i;
s->nbits = nbits;
s->inverse = inverse;
ff_init_ff_cos_tabs(nbits+2);
s->costab = ff_cos_tabs[nbits+2];
s->csc2 = av_malloc(n/2 * sizeof(FFTSample));
if (f... | false | FFmpeg | 721d6f2dc5437df21ae17923b29fa2be847764c7 | av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType inverse)
{
int n = 1 << nbits;
int i;
s->nbits = nbits;
s->inverse = inverse;
ff_init_ff_cos_tabs(nbits+2);
s->costab = ff_cos_tabs[nbits+2];
s->csc2 = av_malloc(n/2 * sizeof(FFTSample));
if (f... | {
"code": [],
"line_no": []
} | av_cold int FUNC_0(DCTContext *s, int nbits, enum DCTTransformType inverse)
{
int VAR_0 = 1 << nbits;
int VAR_1;
s->nbits = nbits;
s->inverse = inverse;
ff_init_ff_cos_tabs(nbits+2);
s->costab = ff_cos_tabs[nbits+2];
s->csc2 = av_malloc(VAR_0/2 * sizeof(FFTSample));
... | [
"av_cold int FUNC_0(DCTContext *s, int nbits, enum DCTTransformType inverse)\n{",
"int VAR_0 = 1 << nbits;",
"int VAR_1;",
"s->nbits = nbits;",
"s->inverse = inverse;",
"ff_init_ff_cos_tabs(nbits+2);",
"s->costab = ff_cos_tabs[nbits+2];",
"s->csc2 = av_malloc(VAR_0/2 * sizeof(FFTSample));",
"if ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
21
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55... |
13,895 | static int mov_read_mdhd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
{
AVStream *st = c->fc->streams[c->fc->nb_streams-1];
MOVStreamContext *sc = st->priv_data;
int version = get_byte(pb);
char language[4] = {0};
unsigned lang;
if (version > 1)
return -1; /* unsupported */
... | false | FFmpeg | 6a63ff19b6a7fe3bc32c7fb4a62fca8f65786432 | static int mov_read_mdhd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
{
AVStream *st = c->fc->streams[c->fc->nb_streams-1];
MOVStreamContext *sc = st->priv_data;
int version = get_byte(pb);
char language[4] = {0};
unsigned lang;
if (version > 1)
return -1;
get_be24(p... | {
"code": [],
"line_no": []
} | static int FUNC_0(MOVContext *VAR_0, ByteIOContext *VAR_1, MOVAtom VAR_2)
{
AVStream *st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1];
MOVStreamContext *sc = st->priv_data;
int VAR_3 = get_byte(VAR_1);
char VAR_4[4] = {0};
unsigned VAR_5;
if (VAR_3 > 1)
return -1;
get_... | [
"static int FUNC_0(MOVContext *VAR_0, ByteIOContext *VAR_1, MOVAtom VAR_2)\n{",
"AVStream *st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1];",
"MOVStreamContext *sc = st->priv_data;",
"int VAR_3 = get_byte(VAR_1);",
"char VAR_4[4] = {0};",
"unsigned VAR_5;",
"if (VAR_3 > 1)\nreturn -1;",
"get_be24(VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
47
],
[
49,
51
... |
13,898 | static int decode_pce(AACContext *ac, enum ChannelPosition new_che_pos[4][MAX_ELEM_ID],
GetBitContext *gb)
{
int num_front, num_side, num_back, num_lfe, num_assoc_data, num_cc, sampling_index;
skip_bits(gb, 2); // object_type
sampling_index = get_bits(gb, 4);
if (ac->m4a... | true | FFmpeg | 8d637124864dcf8bf367ab96e572d6c7cf043675 | static int decode_pce(AACContext *ac, enum ChannelPosition new_che_pos[4][MAX_ELEM_ID],
GetBitContext *gb)
{
int num_front, num_side, num_back, num_lfe, num_assoc_data, num_cc, sampling_index;
skip_bits(gb, 2);
sampling_index = get_bits(gb, 4);
if (ac->m4ac.sampling_ind... | {
"code": [
" skip_bits_long(gb, 8 * get_bits(gb, 8));"
],
"line_no": [
77
]
} | static int FUNC_0(AACContext *VAR_0, enum ChannelPosition VAR_1[4][MAX_ELEM_ID],
GetBitContext *VAR_2)
{
int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;
skip_bits(VAR_2, 2);
VAR_9 = get_bits(VAR_2, 4);
if (VAR_0->m4ac.VAR_9 != VAR_9)
av_log(VAR_0->avcconte... | [
"static int FUNC_0(AACContext *VAR_0, enum ChannelPosition VAR_1[4][MAX_ELEM_ID],\nGetBitContext *VAR_2)\n{",
"int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;",
"skip_bits(VAR_2, 2);",
"VAR_9 = get_bits(VAR_2, 4);",
"if (VAR_0->m4ac.VAR_9 != VAR_9)\nav_log(VAR_0->avccontext, AV_LOG_WARNING, \"Sample ra... | [
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
],
[
11
],
[
15
],
[
17,
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37,
39
],
[
41,
43
],
[
47,
49
],
[
53
],
[
55
],
[
57
],
... |
13,900 | static inline abi_ulong do_shmat(int shmid, abi_ulong shmaddr, int shmflg)
{
abi_long raddr;
void *host_raddr;
struct shmid_ds shm_info;
int i,ret;
/* find out the length of the shared memory segment */
ret = get_errno(shmctl(shmid, IPC_STAT, &shm_info));
if (is_error(ret)) {
... | true | qemu | ee8e76141b4dd00f8e97fda274876a17f9a46bbe | static inline abi_ulong do_shmat(int shmid, abi_ulong shmaddr, int shmflg)
{
abi_long raddr;
void *host_raddr;
struct shmid_ds shm_info;
int i,ret;
ret = get_errno(shmctl(shmid, IPC_STAT, &shm_info));
if (is_error(ret)) {
return ret;
}
mmap_lock();
... | {
"code": [
"static inline abi_ulong do_shmat(int shmid, abi_ulong shmaddr, int shmflg)"
],
"line_no": [
1
]
} | static inline abi_ulong FUNC_0(int shmid, abi_ulong shmaddr, int shmflg)
{
abi_long raddr;
void *VAR_0;
struct shmid_ds VAR_1;
int VAR_2,VAR_3;
VAR_3 = get_errno(shmctl(shmid, IPC_STAT, &VAR_1));
if (is_error(VAR_3)) {
return VAR_3;
}
mmap_lock();
... | [
"static inline abi_ulong FUNC_0(int shmid, abi_ulong shmaddr, int shmflg)\n{",
"abi_long raddr;",
"void *VAR_0;",
"struct shmid_ds VAR_1;",
"int VAR_2,VAR_3;",
"VAR_3 = get_errno(shmctl(shmid, IPC_STAT, &VAR_1));",
"if (is_error(VAR_3)) {",
"return VAR_3;",
"}",
"mmap_lock();",
"if (shmaddr)\nVA... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
23
],
[
25
],
[
29
],
[
33,
35
],
[
37
],
[
39
],
[
43
],
[
47
],
[
49
],
[
51
],
[
53
],
[
55
],
[... |
13,901 | static void gif_fill_rect(AVFrame *picture, uint32_t color, int l, int t, int w, int h)
{
const int linesize = picture->linesize[0] / sizeof(uint32_t);
const uint32_t *py = (uint32_t *)picture->data[0] + t * linesize;
const uint32_t *pr, *pb = py + (t + h) * linesize;
uint32_t *px;
for (; py... | true | FFmpeg | c004de0b1c5b44849f9619910c173d1a2204c16e | static void gif_fill_rect(AVFrame *picture, uint32_t color, int l, int t, int w, int h)
{
const int linesize = picture->linesize[0] / sizeof(uint32_t);
const uint32_t *py = (uint32_t *)picture->data[0] + t * linesize;
const uint32_t *pr, *pb = py + (t + h) * linesize;
uint32_t *px;
for (; py... | {
"code": [
" const uint32_t *pr, *pb = py + (t + h) * linesize;"
],
"line_no": [
9
]
} | static void FUNC_0(AVFrame *VAR_0, uint32_t VAR_1, int VAR_2, int VAR_3, int VAR_4, int VAR_5)
{
const int VAR_6 = VAR_0->VAR_6[0] / sizeof(uint32_t);
const uint32_t *VAR_7 = (uint32_t *)VAR_0->data[0] + VAR_3 * VAR_6;
const uint32_t *VAR_8, *pb = VAR_7 + (VAR_3 + VAR_5) * VAR_6;
uint32_t *px;
... | [
"static void FUNC_0(AVFrame *VAR_0, uint32_t VAR_1, int VAR_2, int VAR_3, int VAR_4, int VAR_5)\n{",
"const int VAR_6 = VAR_0->VAR_6[0] / sizeof(uint32_t);",
"const uint32_t *VAR_7 = (uint32_t *)VAR_0->data[0] + VAR_3 * VAR_6;",
"const uint32_t *VAR_8, *pb = VAR_7 + (VAR_3 + VAR_5) * VAR_6;",
"uint32_t *px;... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
13,902 | void helper_divl_EAX_T0(void)
{
unsigned int den, q, r;
uint64_t num;
num = ((uint32_t)EAX) | ((uint64_t)((uint32_t)EDX) << 32);
den = T0;
if (den == 0) {
raise_exception(EXCP00_DIVZ);
}
#ifdef BUGGY_GCC_DIV64
r = div32(&q, num, den);
#else
q = (num / den);
... | true | qemu | 45bbbb466cf4a6280076ea5a51f67ef5bedee345 | void helper_divl_EAX_T0(void)
{
unsigned int den, q, r;
uint64_t num;
num = ((uint32_t)EAX) | ((uint64_t)((uint32_t)EDX) << 32);
den = T0;
if (den == 0) {
raise_exception(EXCP00_DIVZ);
}
#ifdef BUGGY_GCC_DIV64
r = div32(&q, num, den);
#else
q = (num / den);
... | {
"code": [
" unsigned int den, q, r;",
" uint64_t num;"
],
"line_no": [
5,
7
]
} | void FUNC_0(void)
{
unsigned int VAR_0, VAR_1, VAR_2;
uint64_t num;
num = ((uint32_t)EAX) | ((uint64_t)((uint32_t)EDX) << 32);
VAR_0 = T0;
if (VAR_0 == 0) {
raise_exception(EXCP00_DIVZ);
}
#ifdef BUGGY_GCC_DIV64
VAR_2 = div32(&VAR_1, num, VAR_0);
#else
VAR_1 = (... | [
"void FUNC_0(void)\n{",
"unsigned int VAR_0, VAR_1, VAR_2;",
"uint64_t num;",
"num = ((uint32_t)EAX) | ((uint64_t)((uint32_t)EDX) << 32);",
"VAR_0 = T0;",
"if (VAR_0 == 0) {",
"raise_exception(EXCP00_DIVZ);",
"}",
"#ifdef BUGGY_GCC_DIV64\nVAR_2 = div32(&VAR_1, num, VAR_0);",
"#else\nVAR_1 = (num /... | [
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25,
27
],
[
29
],
[
31,
33
],
[
35
],
[
37
]
] |
13,903 | static int mmap_init(AVFormatContext *ctx)
{
int i, res;
struct video_data *s = ctx->priv_data;
struct v4l2_requestbuffers req = {
.type = V4L2_BUF_TYPE_VIDEO_CAPTURE,
.count = desired_video_buffers,
.memory = V4L2_MEMORY_MMAP
};
res = ioctl(s->fd, VIDIOC_REQBUF... | false | FFmpeg | f929ab0569ff31ed5a59b0b0adb7ce09df3fca39 | static int mmap_init(AVFormatContext *ctx)
{
int i, res;
struct video_data *s = ctx->priv_data;
struct v4l2_requestbuffers req = {
.type = V4L2_BUF_TYPE_VIDEO_CAPTURE,
.count = desired_video_buffers,
.memory = V4L2_MEMORY_MMAP
};
res = ioctl(s->fd, VIDIOC_REQBUF... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
int VAR_1, VAR_2;
struct video_data *VAR_3 = VAR_0->priv_data;
struct v4l2_requestbuffers VAR_4 = {
.type = V4L2_BUF_TYPE_VIDEO_CAPTURE,
.count = desired_video_buffers,
.memory = V4L2_MEMORY_MMAP
};
VAR_2 = ioctl(VAR_3... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"int VAR_1, VAR_2;",
"struct video_data *VAR_3 = VAR_0->priv_data;",
"struct v4l2_requestbuffers VAR_4 = {",
".type = V4L2_BUF_TYPE_VIDEO_CAPTURE,\n.count = desired_video_buffers,\n.memory = V4L2_MEMORY_MMAP\n};",
"VAR_2 = ioctl(VAR_3->fd, VIDIOC_REQBUFS,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
13,
15,
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
45
],
[
49
],
[
51
],
[... |
13,904 | static void adx_decode(ADXContext *c, int16_t *out, const uint8_t *in, int ch)
{
ADXChannelState *prev = &c->prev[ch];
GetBitContext gb;
int scale = AV_RB16(in);
int i;
int s0, s1, s2, d;
init_get_bits(&gb, in + 2, (18 - 2) * 8);
s1 = prev->s1;
s2 = prev->s2;
for (i = 0; ... | true | FFmpeg | 954d94dd5e13ba7a5e9e049d0f980bddced9644c | static void adx_decode(ADXContext *c, int16_t *out, const uint8_t *in, int ch)
{
ADXChannelState *prev = &c->prev[ch];
GetBitContext gb;
int scale = AV_RB16(in);
int i;
int s0, s1, s2, d;
init_get_bits(&gb, in + 2, (18 - 2) * 8);
s1 = prev->s1;
s2 = prev->s2;
for (i = 0; ... | {
"code": [
" s0 = (BASEVOL * d * scale + SCALE1 * s1 - SCALE2 * s2) >> 14;"
],
"line_no": [
27
]
} | static void FUNC_0(ADXContext *VAR_0, int16_t *VAR_1, const uint8_t *VAR_2, int VAR_3)
{
ADXChannelState *prev = &VAR_0->prev[VAR_3];
GetBitContext gb;
int VAR_4 = AV_RB16(VAR_2);
int VAR_5;
int VAR_6, VAR_7, VAR_8, VAR_9;
init_get_bits(&gb, VAR_2 + 2, (18 - 2) * 8);
VAR_7 = prev->... | [
"static void FUNC_0(ADXContext *VAR_0, int16_t *VAR_1, const uint8_t *VAR_2, int VAR_3)\n{",
"ADXChannelState *prev = &VAR_0->prev[VAR_3];",
"GetBitContext gb;",
"int VAR_4 = AV_RB16(VAR_2);",
"int VAR_5;",
"int VAR_6, VAR_7, VAR_8, VAR_9;",
"init_get_bits(&gb, VAR_2 + 2, (18 - 2) * 8);",
"VAR_7 = pre... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
13,907 | void ide_exec_cmd(IDEBus *bus, uint32_t val)
{
uint16_t *identify_data;
IDEState *s;
int n;
int lba48 = 0;
#if defined(DEBUG_IDE)
printf("ide: CMD=%02x\n", val);
#endif
s = idebus_active_if(bus);
/* ignore commands to non existent slave */
if (s != bus->ifs && !s->bs)
... | true | qemu | 413860cfb57d44baf971ae8d4f1cdf45340b3a4d | void ide_exec_cmd(IDEBus *bus, uint32_t val)
{
uint16_t *identify_data;
IDEState *s;
int n;
int lba48 = 0;
#if defined(DEBUG_IDE)
printf("ide: CMD=%02x\n", val);
#endif
s = idebus_active_if(bus);
if (s != bus->ifs && !s->bs)
return;
if ((s->status & (B... | {
"code": [
" case WIN_VERIFY_EXT:",
" lba48 = 1;",
" case WIN_VERIFY:",
" case WIN_VERIFY_ONCE:",
"\tide_cmd_lba48_transform(s, lba48);",
" s->status = READY_STAT | SEEK_STAT;",
" ide_set_irq(s->bus);",
" break;"
],
"line_no": [
123,
12... | void FUNC_0(IDEBus *VAR_0, uint32_t VAR_1)
{
uint16_t *identify_data;
IDEState *s;
int VAR_2;
int VAR_3 = 0;
#if defined(DEBUG_IDE)
printf("ide: CMD=%02x\VAR_2", VAR_1);
#endif
s = idebus_active_if(VAR_0);
if (s != VAR_0->ifs && !s->bs)
return;
if ((s-... | [
"void FUNC_0(IDEBus *VAR_0, uint32_t VAR_1)\n{",
"uint16_t *identify_data;",
"IDEState *s;",
"int VAR_2;",
"int VAR_3 = 0;",
"#if defined(DEBUG_IDE)\nprintf(\"ide: CMD=%02x\\VAR_2\", VAR_1);",
"#endif\ns = idebus_active_if(VAR_0);",
"if (s != VAR_0->ifs && !s->bs)\nreturn;",
"if ((s->status & (BUSY_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
19,
21
],
[
25,
27
],
[
33,
35
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
53
],
[
55
],
[
59
],
[
61
... |
13,908 | av_cold void ff_h264dsp_init(H264DSPContext *c, const int bit_depth,
const int chroma_format_idc)
{
#undef FUNC
#define FUNC(a, depth) a ## _ ## depth ## _c
#define ADDPX_DSP(depth) \
c->h264_add_pixels4_clear = FUNC(ff_h264_add_pixels4, depth);\
c->h264_add_pixels8_clear =... | true | FFmpeg | a03a642d5ceb5f2f7c6ebbf56ff365dfbcdb65eb | av_cold void ff_h264dsp_init(H264DSPContext *c, const int bit_depth,
const int chroma_format_idc)
{
#undef FUNC
#define FUNC(a, depth) a ## _ ## depth ## _c
#define ADDPX_DSP(depth) \
c->h264_add_pixels4_clear = FUNC(ff_h264_add_pixels4, depth);\
c->h264_add_pixels8_clear =... | {
"code": [
" if (chroma_format_idc == 1)\\",
" if (chroma_format_idc == 1)\\",
" if (chroma_format_idc == 1)\\",
" if (chroma_format_idc == 1)\\",
" if (chroma_format_idc == 1)\\",
" if (chroma_format_idc == 1)\\"
],
"line_no": [
47,
47,
47,
47,
47,
... | av_cold void FUNC_0(H264DSPContext *c, const int bit_depth,
const int chroma_format_idc)
{
#undef FUNC
#define FUNC(a, depth) a ## _ ## depth ## _c
#define ADDPX_DSP(depth) \
c->h264_add_pixels4_clear = FUNC(ff_h264_add_pixels4, depth);\
c->h264_add_pixels8_clear = FUNC(ff_... | [
"av_cold void FUNC_0(H264DSPContext *c, const int bit_depth,\nconst int chroma_format_idc)\n{",
"#undef FUNC\n#define FUNC(a, depth) a ## _ ## depth ## _c\n#define ADDPX_DSP(depth) \\\nc->h264_add_pixels4_clear = FUNC(ff_h264_add_pixels4, depth);\\",
"c->h264_add_pixels8_clear = FUNC(ff_h264_add_pixels8, depth)... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7,
9,
13,
15
],
[
17,
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,
49
],
[
51,
53
],
[
55
... |
13,909 | static void gen_slbia(DisasContext *ctx)
{
#if defined(CONFIG_USER_ONLY)
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
#else
if (unlikely(ctx->pr)) {
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
return;
}
gen_helper_slbia(cpu_env);
#endif
}
| true | qemu | 9b2fadda3e0196ffd485adde4fe9cdd6fae35300 | static void gen_slbia(DisasContext *ctx)
{
#if defined(CONFIG_USER_ONLY)
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
#else
if (unlikely(ctx->pr)) {
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
return;
}
gen_helper_slbia(cpu_env);
#endif
}
| {
"code": [
" gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);",
" gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);",
" if (unlikely(ctx->pr)) {",
" gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);",
" gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);",
" if (unlikely(... | static void FUNC_0(DisasContext *VAR_0)
{
#if defined(CONFIG_USER_ONLY)
gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);
#else
if (unlikely(VAR_0->pr)) {
gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);
return;
}
gen_helper_slbia(cpu_env);
#endif
}
| [
"static void FUNC_0(DisasContext *VAR_0)\n{",
"#if defined(CONFIG_USER_ONLY)\ngen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);",
"#else\nif (unlikely(VAR_0->pr)) {",
"gen_inval_exception(VAR_0, POWERPC_EXCP_PRIV_OPC);",
"return;",
"}",
"gen_helper_slbia(cpu_env);",
"#endif\n}"
] | [
0,
1,
1,
1,
0,
0,
0,
1
] | [
[
1,
3
],
[
5,
7
],
[
9,
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
]
] |
13,910 | int nbd_client_init(BlockDriverState *bs,
QIOChannelSocket *sioc,
const char *export,
QCryptoTLSCreds *tlscreds,
const char *hostname,
Error **errp)
{
NbdClientSession *client = nbd_get_client_session(bs);
... | true | qemu | 9bc9732faeff09828fe38c0ebe2401ee131a6fca | int nbd_client_init(BlockDriverState *bs,
QIOChannelSocket *sioc,
const char *export,
QCryptoTLSCreds *tlscreds,
const char *hostname,
Error **errp)
{
NbdClientSession *client = nbd_get_client_session(bs);
... | {
"code": [
" qemu_co_mutex_init(&client->free_sema);"
],
"line_no": [
57
]
} | int FUNC_0(BlockDriverState *VAR_0,
QIOChannelSocket *VAR_1,
const char *VAR_2,
QCryptoTLSCreds *VAR_3,
const char *VAR_4,
Error **VAR_5)
{
NbdClientSession *client = nbd_get_client_session(VAR_0);
int VA... | [
"int FUNC_0(BlockDriverState *VAR_0,\nQIOChannelSocket *VAR_1,\nconst char *VAR_2,\nQCryptoTLSCreds *VAR_3,\nconst char *VAR_4,\nError **VAR_5)\n{",
"NbdClientSession *client = nbd_get_client_session(VAR_0);",
"int VAR_6;",
"logout(\"session init %s\\n\", VAR_2);",
"qio_channel_set_blocking(QIO_CHANNEL(VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
29,
31,
33,
35,
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[
57
],
[... |
13,911 | static inline void rgtc_block_internal(uint8_t *dst, ptrdiff_t stride,
const uint8_t *block,
const int *color_tab)
{
uint8_t indices[16];
int x, y;
decompress_indices(indices, block + 2);
/* Only one or two channels... | true | FFmpeg | ec7f04c13a6e6e483cc86e576aff7700e42cd59e | static inline void rgtc_block_internal(uint8_t *dst, ptrdiff_t stride,
const uint8_t *block,
const int *color_tab)
{
uint8_t indices[16];
int x, y;
decompress_indices(indices, block + 2);
for (y = 0; y <... | {
"code": [
" uint32_t pixel = RGBA(c, c, c, 255);"
],
"line_no": [
37
]
} | static inline void FUNC_0(uint8_t *VAR_0, ptrdiff_t VAR_1,
const uint8_t *VAR_2,
const int *VAR_3)
{
uint8_t indices[16];
int VAR_4, VAR_5;
decompress_indices(indices, VAR_2 + 2);
for (VAR_5 = 0; VAR_5 <... | [
"static inline void FUNC_0(uint8_t *VAR_0, ptrdiff_t VAR_1,\nconst uint8_t *VAR_2,\nconst int *VAR_3)\n{",
"uint8_t indices[16];",
"int VAR_4, VAR_5;",
"decompress_indices(indices, VAR_2 + 2);",
"for (VAR_5 = 0; VAR_5 < 4; VAR_5++) {",
"for (VAR_4 = 0; VAR_4 < 4; VAR_4++) {",
"int VAR_6 = indices[VAR_4 ... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
15
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
]
] |
13,912 | int sclp_service_call(uint64_t sccb, uint32_t code)
{
int r = 0;
SCCB work_sccb;
hwaddr sccb_len = sizeof(SCCB);
/* first some basic checks on program checks */
if (cpu_physical_memory_is_io(sccb)) {
r = -PGM_ADDRESSING;
goto out;
}
if (sccb & ~0x7ffffff8ul) {
... | true | qemu | 6e25280216fc23c8387892f76d961559da124528 | int sclp_service_call(uint64_t sccb, uint32_t code)
{
int r = 0;
SCCB work_sccb;
hwaddr sccb_len = sizeof(SCCB);
if (cpu_physical_memory_is_io(sccb)) {
r = -PGM_ADDRESSING;
goto out;
}
if (sccb & ~0x7ffffff8ul) {
r = -PGM_SPECIFICATION;
goto o... | {
"code": [
"int sclp_service_call(uint64_t sccb, uint32_t code)",
" if (sccb & ~0x7ffffff8ul) {"
],
"line_no": [
1,
25
]
} | int FUNC_0(uint64_t VAR_0, uint32_t VAR_1)
{
int VAR_2 = 0;
SCCB work_sccb;
hwaddr sccb_len = sizeof(SCCB);
if (cpu_physical_memory_is_io(VAR_0)) {
VAR_2 = -PGM_ADDRESSING;
goto out;
}
if (VAR_0 & ~0x7ffffff8ul) {
VAR_2 = -PGM_SPECIFICATION;
g... | [
"int FUNC_0(uint64_t VAR_0, uint32_t VAR_1)\n{",
"int VAR_2 = 0;",
"SCCB work_sccb;",
"hwaddr sccb_len = sizeof(SCCB);",
"if (cpu_physical_memory_is_io(VAR_0)) {",
"VAR_2 = -PGM_ADDRESSING;",
"goto out;",
"}",
"if (VAR_0 & ~0x7ffffff8ul) {",
"VAR_2 = -PGM_SPECIFICATION;",
"goto out;",
"}",
"... | [
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
45
],
[
51,
53
],
[
55
],
[
57
],
[
59
],
[
63
],
[
67,
69... |
13,913 | unsigned avutil_version(void)
{
av_assert0(AV_PIX_FMT_VDA_VLD == 81); //check if the pix fmt enum has not had anything inserted or removed by mistake
av_assert0(AV_SAMPLE_FMT_DBLP == 9);
av_assert0(AVMEDIA_TYPE_ATTACHMENT == 4);
av_assert0(AV_PICTURE_TYPE_BI == 7);
av_assert0(LIBAVUTIL_VERSION_MICRO... | true | FFmpeg | 9a697cfe716e2ed5f5ba183910c104c5ad783256 | unsigned avutil_version(void)
{
av_assert0(AV_PIX_FMT_VDA_VLD == 81);
av_assert0(AV_SAMPLE_FMT_DBLP == 9);
av_assert0(AVMEDIA_TYPE_ATTACHMENT == 4);
av_assert0(AV_PICTURE_TYPE_BI == 7);
av_assert0(LIBAVUTIL_VERSION_MICRO >= 100);
av_assert0(HAVE_MMX2 == HAVE_MMXEXT);
return LIBAVUTIL_VERSIO... | {
"code": [],
"line_no": []
} | unsigned FUNC_0(void)
{
av_assert0(AV_PIX_FMT_VDA_VLD == 81);
av_assert0(AV_SAMPLE_FMT_DBLP == 9);
av_assert0(AVMEDIA_TYPE_ATTACHMENT == 4);
av_assert0(AV_PICTURE_TYPE_BI == 7);
av_assert0(LIBAVUTIL_VERSION_MICRO >= 100);
av_assert0(HAVE_MMX2 == HAVE_MMXEXT);
return LIBAVUTIL_VERSION_INT; | [
"unsigned FUNC_0(void)\n{",
"av_assert0(AV_PIX_FMT_VDA_VLD == 81);",
"av_assert0(AV_SAMPLE_FMT_DBLP == 9);",
"av_assert0(AVMEDIA_TYPE_ATTACHMENT == 4);",
"av_assert0(AV_PICTURE_TYPE_BI == 7);",
"av_assert0(LIBAVUTIL_VERSION_MICRO >= 100);",
"av_assert0(HAVE_MMX2 == HAVE_MMXEXT);",
"return LIBAVUTIL_VE... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
]
] |
13,916 | static CharDriverState *qemu_chr_open_tty_fd(int fd,
ChardevCommon *backend,
Error **errp)
{
CharDriverState *chr;
tty_serial_init(fd, 115200, 'N', 8, 1);
chr = qemu_chr_open_fd(fd, fd, backend, errp);
... | true | qemu | 71200fb9664c2967a1cdd22b68b0da3a8b2b3eb7 | static CharDriverState *qemu_chr_open_tty_fd(int fd,
ChardevCommon *backend,
Error **errp)
{
CharDriverState *chr;
tty_serial_init(fd, 115200, 'N', 8, 1);
chr = qemu_chr_open_fd(fd, fd, backend, errp);
... | {
"code": [],
"line_no": []
} | static CharDriverState *FUNC_0(int fd,
ChardevCommon *backend,
Error **errp)
{
CharDriverState *chr;
tty_serial_init(fd, 115200, 'N', 8, 1);
chr = qemu_chr_open_fd(fd, fd, backend, errp);
chr->chr_ioctl... | [
"static CharDriverState *FUNC_0(int fd,\nChardevCommon *backend,\nError **errp)\n{",
"CharDriverState *chr;",
"tty_serial_init(fd, 115200, 'N', 8, 1);",
"chr = qemu_chr_open_fd(fd, fd, backend, errp);",
"chr->chr_ioctl = tty_serial_ioctl;",
"chr->chr_close = qemu_chr_close_tty;",
"return chr;"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15
],
[
20
],
[
22
],
[
24
]
] |
13,917 | static int vhost_user_set_owner(struct vhost_dev *dev)
{
VhostUserMsg msg = {
.request = VHOST_USER_SET_OWNER,
.flags = VHOST_USER_VERSION,
};
vhost_user_write(dev, &msg, NULL, 0);
return 0;
}
| true | qemu | c4843a45e3d4f3698b214275ab5e78cdb6a3d212 | static int vhost_user_set_owner(struct vhost_dev *dev)
{
VhostUserMsg msg = {
.request = VHOST_USER_SET_OWNER,
.flags = VHOST_USER_VERSION,
};
vhost_user_write(dev, &msg, NULL, 0);
return 0;
}
| {
"code": [
" vhost_user_write(dev, &msg, NULL, 0);",
" vhost_user_write(dev, &msg, NULL, 0);",
" vhost_user_write(dev, &msg, NULL, 0);",
" vhost_user_write(dev, &msg, NULL, 0);",
" vhost_user_write(dev, &msg, NULL, 0);",
" vhost_user_write(dev, &msg, NULL, 0);",
" vho... | static int FUNC_0(struct vhost_dev *VAR_0)
{
VhostUserMsg msg = {
.request = VHOST_USER_SET_OWNER,
.flags = VHOST_USER_VERSION,
};
vhost_user_write(VAR_0, &msg, NULL, 0);
return 0;
}
| [
"static int FUNC_0(struct vhost_dev *VAR_0)\n{",
"VhostUserMsg msg = {",
".request = VHOST_USER_SET_OWNER,\n.flags = VHOST_USER_VERSION,\n};",
"vhost_user_write(VAR_0, &msg, NULL, 0);",
"return 0;",
"}"
] | [
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9,
11
],
[
15
],
[
19
],
[
21
]
] |
13,918 | static int mxf_read_source_clip(MXFStructuralComponent *source_clip, ByteIOContext *pb, int tag)
{
switch(tag) {
case 0x0202:
source_clip->duration = get_be64(pb);
break;
case 0x1201:
source_clip->start_position = get_be64(pb);
break;
case 0x1101:
/* UMI... | true | FFmpeg | 39bb30f6640fe1faf4bbc779a79786028febc95d | static int mxf_read_source_clip(MXFStructuralComponent *source_clip, ByteIOContext *pb, int tag)
{
switch(tag) {
case 0x0202:
source_clip->duration = get_be64(pb);
break;
case 0x1201:
source_clip->start_position = get_be64(pb);
break;
case 0x1101:
... | {
"code": [
"static int mxf_read_source_clip(MXFStructuralComponent *source_clip, ByteIOContext *pb, int tag)"
],
"line_no": [
1
]
} | static int FUNC_0(MXFStructuralComponent *VAR_0, ByteIOContext *VAR_1, int VAR_2)
{
switch(VAR_2) {
case 0x0202:
VAR_0->duration = get_be64(VAR_1);
break;
case 0x1201:
VAR_0->start_position = get_be64(VAR_1);
break;
case 0x1101:
url_fskip(VAR_1... | [
"static int FUNC_0(MXFStructuralComponent *VAR_0, ByteIOContext *VAR_1, int VAR_2)\n{",
"switch(VAR_2) {",
"case 0x0202:\nVAR_0->duration = get_be64(VAR_1);",
"break;",
"case 0x1201:\nVAR_0->start_position = get_be64(VAR_1);",
"break;",
"case 0x1101:\nurl_fskip(VAR_1, 16);",
"get_buffer(VAR_1, VAR_0->... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11
],
[
13,
15
],
[
17
],
[
19,
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
]
] |
13,919 | static void adlib_realizefn (DeviceState *dev, Error **errp)
{
AdlibState *s = ADLIB(dev);
PortioList *port_list = g_new(PortioList, 1);
struct audsettings as;
if (glob_adlib) {
error_setg (errp, "Cannot create more than 1 adlib device");
return;
}
glob_adlib = s;
#... | true | qemu | 848696bf353750899832c51005f1bd3540da5c29 | static void adlib_realizefn (DeviceState *dev, Error **errp)
{
AdlibState *s = ADLIB(dev);
PortioList *port_list = g_new(PortioList, 1);
struct audsettings as;
if (glob_adlib) {
error_setg (errp, "Cannot create more than 1 adlib device");
return;
}
glob_adlib = s;
#... | {
"code": [
" PortioList *port_list = g_new(PortioList, 1);",
" portio_list_init (port_list, OBJECT(s), adlib_portio_list, s, \"adlib\");",
" portio_list_add (port_list, isa_address_space_io(&s->parent_obj), 0);",
" PortioList *port_list = g_new(PortioList, 1);",
" PortioList *port_... | static void FUNC_0 (DeviceState *VAR_0, Error **VAR_1)
{
AdlibState *s = ADLIB(VAR_0);
PortioList *port_list = g_new(PortioList, 1);
struct audsettings VAR_2;
if (glob_adlib) {
error_setg (VAR_1, "Cannot create more than 1 adlib device");
return;
}
glob_adlib = s;
#... | [
"static void FUNC_0 (DeviceState *VAR_0, Error **VAR_1)\n{",
"AdlibState *s = ADLIB(VAR_0);",
"PortioList *port_list = g_new(PortioList, 1);",
"struct audsettings VAR_2;",
"if (glob_adlib) {",
"error_setg (VAR_1, \"Cannot create more than 1 adlib device\");",
"return;",
"}",
"glob_adlib = s;",
"#i... | [
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,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
... |
13,920 | static int lag_decode_arith_plane(LagarithContext *l, uint8_t *dst,
int width, int height, int stride,
const uint8_t *src, int src_size)
{
int i = 0;
int read = 0;
uint32_t length;
uint32_t offset = 1;
int esc_count = src[0]... | true | FFmpeg | 0a82f5275f719e6e369a807720a2c3603aa0ddd9 | static int lag_decode_arith_plane(LagarithContext *l, uint8_t *dst,
int width, int height, int stride,
const uint8_t *src, int src_size)
{
int i = 0;
int read = 0;
uint32_t length;
uint32_t offset = 1;
int esc_count = src[0]... | {
"code": [
" for (i = 0; i < height; i++)",
" src += lag_decode_zero_run_line(l, dst + (i * stride), src,",
" width, esc_count);"
],
"line_no": [
83,
85,
87
]
} | static int FUNC_0(LagarithContext *VAR_0, uint8_t *VAR_1,
int VAR_2, int VAR_3, int VAR_4,
const uint8_t *VAR_5, int VAR_6)
{
int VAR_7 = 0;
int VAR_8 = 0;
uint32_t length;
uint32_t offset = 1;
int VAR_9 = VAR_5[0];
Get... | [
"static int FUNC_0(LagarithContext *VAR_0, uint8_t *VAR_1,\nint VAR_2, int VAR_3, int VAR_4,\nconst uint8_t *VAR_5, int VAR_6)\n{",
"int VAR_7 = 0;",
"int VAR_8 = 0;",
"uint32_t length;",
"uint32_t offset = 1;",
"int VAR_9 = VAR_5[0];",
"GetBitContext gb;",
"lag_rac rac;",
"rac.avctx = VAR_0->avctx;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
49,
51
],
[... |
13,921 | static void check_pred16x16(H264PredContext *h, uint8_t *buf0, uint8_t *buf1,
int codec, int chroma_format, int bit_depth)
{
if (chroma_format == 1) {
int pred_mode;
declare_func(void, uint8_t *src, ptrdiff_t stride);
for (pred_mode = 0; pred_mode < 9; pre... | false | FFmpeg | 711781d7a1714ea4eb0217eb1ba04811978c43d1 | static void check_pred16x16(H264PredContext *h, uint8_t *buf0, uint8_t *buf1,
int codec, int chroma_format, int bit_depth)
{
if (chroma_format == 1) {
int pred_mode;
declare_func(void, uint8_t *src, ptrdiff_t stride);
for (pred_mode = 0; pred_mode < 9; pre... | {
"code": [],
"line_no": []
} | static void FUNC_0(H264PredContext *VAR_0, uint8_t *VAR_1, uint8_t *VAR_2,
int VAR_3, int VAR_4, int VAR_5)
{
if (VAR_4 == 1) {
int VAR_6;
declare_func(void, uint8_t *src, ptrdiff_t stride);
for (VAR_6 = 0; VAR_6 < 9; VAR_6++) {
if (check_pred... | [
"static void FUNC_0(H264PredContext *VAR_0, uint8_t *VAR_1, uint8_t *VAR_2,\nint VAR_3, int VAR_4, int VAR_5)\n{",
"if (VAR_4 == 1) {",
"int VAR_6;",
"declare_func(void, uint8_t *src, ptrdiff_t stride);",
"for (VAR_6 = 0; VAR_6 < 9; VAR_6++) {",
"if (check_pred_func(VAR_0->pred16x16[VAR_6], \"16x16\", pre... | [
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
]
] |
13,922 | int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int size)
{
if (size < 0 || avpkt->size < 0 || size > INT_MAX - FF_INPUT_BUFFER_PADDING_SIZE) {
av_log(avctx, AV_LOG_ERROR, "Size %d invalid\n", size);
return AVERROR(EINVAL);
}
if (avctx) {
av_assert0(!avpkt->data... | false | FFmpeg | 47c9887ecaa764006cf661a6446b3533472f6a6e | int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int size)
{
if (size < 0 || avpkt->size < 0 || size > INT_MAX - FF_INPUT_BUFFER_PADDING_SIZE) {
av_log(avctx, AV_LOG_ERROR, "Size %d invalid\n", size);
return AVERROR(EINVAL);
}
if (avctx) {
av_assert0(!avpkt->data... | {
"code": [],
"line_no": []
} | int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1, int VAR_2)
{
if (VAR_2 < 0 || VAR_1->VAR_2 < 0 || VAR_2 > INT_MAX - FF_INPUT_BUFFER_PADDING_SIZE) {
av_log(VAR_0, AV_LOG_ERROR, "Size %d invalid\n", VAR_2);
return AVERROR(EINVAL);
}
if (VAR_0) {
av_assert0(!VAR_1->data || V... | [
"int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1, int VAR_2)\n{",
"if (VAR_2 < 0 || VAR_1->VAR_2 < 0 || VAR_2 > INT_MAX - FF_INPUT_BUFFER_PADDING_SIZE) {",
"av_log(VAR_0, AV_LOG_ERROR, \"Size %d invalid\\n\", VAR_2);",
"return AVERROR(EINVAL);",
"}",
"if (VAR_0) {",
"av_assert0(!VAR_1->data || VAR_1->... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39,
41
],
[
43,
47
],
[
49
... |
13,923 | static int sort_stt(FFV1Context *s, uint8_t stt[256])
{
int i, i2, changed, print = 0;
do {
changed = 0;
for (i = 12; i < 244; i++) {
for (i2 = i + 1; i2 < 245 && i2 < i + 4; i2++) {
#define COST(old, new) \
s->rc_stat[old][0] * -l... | false | FFmpeg | c2cbc80ae9e3f00e21235915a80f81a2aeb7db0a | static int sort_stt(FFV1Context *s, uint8_t stt[256])
{
int i, i2, changed, print = 0;
do {
changed = 0;
for (i = 12; i < 244; i++) {
for (i2 = i + 1; i2 < 245 && i2 < i + 4; i2++) {
#define COST(old, new) \
s->rc_stat[old][0] * -l... | {
"code": [],
"line_no": []
} | static int FUNC_0(FFV1Context *VAR_0, uint8_t VAR_1[256])
{
int VAR_2, VAR_3, VAR_4, VAR_5 = 0;
do {
VAR_4 = 0;
for (VAR_2 = 12; VAR_2 < 244; VAR_2++) {
for (VAR_3 = VAR_2 + 1; VAR_3 < 245 && VAR_3 < VAR_2 + 4; VAR_3++) {
#define COST(old, new) ... | [
"static int FUNC_0(FFV1Context *VAR_0, uint8_t VAR_1[256])\n{",
"int VAR_2, VAR_3, VAR_4, VAR_5 = 0;",
"do {",
"VAR_4 = 0;",
"for (VAR_2 = 12; VAR_2 < 244; VAR_2++) {",
"for (VAR_3 = VAR_2 + 1; VAR_3 < 245 && VAR_3 < VAR_2 + 4; VAR_3++) {",
"#define COST(old, new) \\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
27,
29,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
... |
13,924 | static void dvbsub_parse_object_segment(AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
DVBSubContext *ctx = avctx->priv_data;
const uint8_t *buf_end = buf + buf_size;
const uint8_t *block;
int object_id;
DVBSubObject *object;
DVBSubOb... | false | FFmpeg | 607ad990d31e6be52980970e5ce8cd25ab3de812 | static void dvbsub_parse_object_segment(AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
DVBSubContext *ctx = avctx->priv_data;
const uint8_t *buf_end = buf + buf_size;
const uint8_t *block;
int object_id;
DVBSubObject *object;
DVBSubOb... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVCodecContext *VAR_0,
const uint8_t *VAR_1, int VAR_2)
{
DVBSubContext *ctx = VAR_0->priv_data;
const uint8_t *VAR_3 = VAR_1 + VAR_2;
const uint8_t *VAR_4;
int VAR_5;
DVBSubObject *object;
DVBSubObjectDisplay *display;
in... | [
"static void FUNC_0(AVCodecContext *VAR_0,\nconst uint8_t *VAR_1, int VAR_2)\n{",
"DVBSubContext *ctx = VAR_0->priv_data;",
"const uint8_t *VAR_3 = VAR_1 + VAR_2;",
"const uint8_t *VAR_4;",
"int VAR_5;",
"DVBSubObject *object;",
"DVBSubObjectDisplay *display;",
"int VAR_6, VAR_7;",
"int VAR_8, VAR_9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
31
],
[
35
],
[
39,
41
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55
],
[
57... |
13,925 | static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pict, int *got_packet)
{
SVQ1EncContext *const s = avctx->priv_data;
AVFrame *const p = avctx->coded_frame;
int i, ret;
if (!pkt->data &&
(ret = av_new_packet(pkt, s->y_... | false | FFmpeg | 28fb80dcbf6f63eedfcfffc725a6bf0069d03fab | static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pict, int *got_packet)
{
SVQ1EncContext *const s = avctx->priv_data;
AVFrame *const p = avctx->coded_frame;
int i, ret;
if (!pkt->data &&
(ret = av_new_packet(pkt, s->y_... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,
const AVFrame *VAR_2, int *VAR_3)
{
SVQ1EncContext *const s = VAR_0->priv_data;
AVFrame *const p = VAR_0->coded_frame;
int VAR_4, VAR_5;
if (!VAR_1->data &&
(VAR_5 = av_new_packet(VAR_1, s->y_b... | [
"static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,\nconst AVFrame *VAR_2, int *VAR_3)\n{",
"SVQ1EncContext *const s = VAR_0->priv_data;",
"AVFrame *const p = VAR_0->coded_frame;",
"int VAR_4, VAR_5;",
"if (!VAR_1->data &&\n(VAR_5 = av_new_packet(VAR_1, s->y_block_width * s->y_block_height *\n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15,
17,
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49
],
[
51
... |
13,926 | static inline void RENAME(rgb32to16)(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
mm_end = end - 15;
#if 1 //is faster only if multiplie... | false | FFmpeg | ae4cffd9fc5bc495692920d646d7d1462315cfa6 | static inline void RENAME(rgb32to16)(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
mm_end = end - 15;
#if 1
asm volatile(
"movq %3,... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(rgb32to16)(const uint8_t *VAR_2, uint8_t *dst, unsigned src_size)
{
const uint8_t *VAR_0 = VAR_2;
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
mm_end = VAR_1 - 15;
#if 1
asm vola... | [
"static inline void FUNC_0(rgb32to16)(const uint8_t *VAR_2, uint8_t *dst, unsigned src_size)\n{",
"const uint8_t *VAR_0 = VAR_2;",
"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\nmm_end = VAR_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,
61,
63,
65,... |
13,927 | static int decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size)
{
MDECContext * const a = avctx->priv_data;
AVFrame *picture = data;
AVFrame * const p= (AVFrame*)&a->picture;
int i;
/* special case for ... | false | FFmpeg | 934982c4ace1a3d5d627b518782ed092a456c49e | static int decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size)
{
MDECContext * const a = avctx->priv_data;
AVFrame *picture = data;
AVFrame * const p= (AVFrame*)&a->picture;
int i;
if (buf_size =... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
uint8_t *VAR_3, int VAR_4)
{
MDECContext * const a = VAR_0->priv_data;
AVFrame *picture = VAR_1;
AVFrame * const p= (AVFrame*)&a->picture;
int VAR_5;
if (VAR_4 == 0) {
... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nvoid *VAR_1, int *VAR_2,\nuint8_t *VAR_3, int VAR_4)\n{",
"MDECContext * const a = VAR_0->priv_data;",
"AVFrame *picture = VAR_1;",
"AVFrame * const p= (AVFrame*)&a->picture;",
"int VAR_5;",
"if (VAR_4 == 0) {",
"return 0;",
"}",
"if(p->VAR_1[0])\nVAR_0->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,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21
],
[
23
],
[
25
],
[
29,
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49,
51,
53
],
[... |
13,928 | void OPPROTO op_srli_T0 (void)
{
T0 = T0 >> PARAM1;
RETURN();
}
| true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | void OPPROTO op_srli_T0 (void)
{
T0 = T0 >> PARAM1;
RETURN();
}
| {
"code": [
" RETURN();",
" T0 = T0 >> PARAM1;",
" RETURN();"
],
"line_no": [
7,
5,
7
]
} | void VAR_0 op_srli_T0 (void)
{
T0 = T0 >> PARAM1;
RETURN();
}
| [
"void VAR_0 op_srli_T0 (void)\n{",
"T0 = T0 >> PARAM1;",
"RETURN();",
"}"
] | [
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
13,929 | static void bdrv_qed_invalidate_cache(BlockDriverState *bs)
{
BDRVQEDState *s = bs->opaque;
bdrv_qed_close(bs);
memset(s, 0, sizeof(BDRVQEDState));
bdrv_qed_open(bs, NULL, bs->open_flags, NULL);
} | true | qemu | 3456a8d1852e970688b73d03fdc44dde851759e1 | static void bdrv_qed_invalidate_cache(BlockDriverState *bs)
{
BDRVQEDState *s = bs->opaque;
bdrv_qed_close(bs);
memset(s, 0, sizeof(BDRVQEDState));
bdrv_qed_open(bs, NULL, bs->open_flags, NULL);
} | {
"code": [],
"line_no": []
} | static void FUNC_0(BlockDriverState *VAR_0)
{
BDRVQEDState *s = VAR_0->opaque;
bdrv_qed_close(VAR_0);
memset(s, 0, sizeof(BDRVQEDState));
bdrv_qed_open(VAR_0, NULL, VAR_0->open_flags, NULL);
} | [
"static void FUNC_0(BlockDriverState *VAR_0)\n{",
"BDRVQEDState *s = VAR_0->opaque;",
"bdrv_qed_close(VAR_0);",
"memset(s, 0, sizeof(BDRVQEDState));",
"bdrv_qed_open(VAR_0, NULL, VAR_0->open_flags, NULL);",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
]
] |
13,930 | void syscall_init(void)
{
IOCTLEntry *ie;
const argtype *arg_type;
int size;
int i;
#define STRUCT(name, ...) thunk_register_struct(STRUCT_ ## name, #name, struct_ ## name ## _def);
#define STRUCT_SPECIAL(name) thunk_register_struct_direct(STRUCT_ ## name, #name, &struct_ ## name ## _def);
#include "sys... | true | qemu | 8be656b87c6bb1b9f8af3ff78094413d71e4443a | void syscall_init(void)
{
IOCTLEntry *ie;
const argtype *arg_type;
int size;
int i;
#define STRUCT(name, ...) thunk_register_struct(STRUCT_ ## name, #name, struct_ ## name ## _def);
#define STRUCT_SPECIAL(name) thunk_register_struct_direct(STRUCT_ ## name, #name, &struct_ ## name ## _def);
#include "sys... | {
"code": [],
"line_no": []
} | void FUNC_0(void)
{
IOCTLEntry *ie;
const argtype *VAR_0;
int VAR_1;
int VAR_2;
#define STRUCT(name, ...) thunk_register_struct(STRUCT_ ## name, #name, struct_ ## name ## _def);
#define STRUCT_SPECIAL(name) thunk_register_struct_direct(STRUCT_ ## name, #name, &struct_ ## name ## _def);
#include "syscall... | [
"void FUNC_0(void)\n{",
"IOCTLEntry *ie;",
"const argtype *VAR_0;",
"int VAR_1;",
"int VAR_2;",
"#define STRUCT(name, ...) thunk_register_struct(STRUCT_ ## name, #name, struct_ ## name ## _def);",
"#define STRUCT_SPECIAL(name) thunk_register_struct_direct(STRUCT_ ## name, #name, &struct_ ## name ## _def... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9,
10,
11,
14
],
[
15
],
[
16
],
[
19
],
[
20
],
[
21,
22
],
[
23
],
[
24
],
[
25,
26
],
[
27
],
[
... |
13,931 | static void null_end_frame(AVFilterLink *inlink) { }
| true | FFmpeg | 06bf6d3bc04979bd39ecdc7311d0daf8aee7e10f | static void null_end_frame(AVFilterLink *inlink) { }
| {
"code": [
"static void null_end_frame(AVFilterLink *inlink) { }"
],
"line_no": [
1
]
} | static void FUNC_0(AVFilterLink *VAR_0) { }
| [
"static void FUNC_0(AVFilterLink *VAR_0) { }"
] | [
1
] | [
[
1
]
] |
13,932 | void qemu_init_vcpu(void *_env)
{
CPUState *env = _env;
int r;
env->nr_cores = smp_cores;
env->nr_threads = smp_threads;
if (kvm_enabled()) {
r = kvm_init_vcpu(env);
if (r < 0) {
fprintf(stderr, "kvm_init_vcpu failed: %s\n", strerror(-r));
exit(1... | true | qemu | 12d4536f7d911b6d87a766ad7300482ea663cea2 | void qemu_init_vcpu(void *_env)
{
CPUState *env = _env;
int r;
env->nr_cores = smp_cores;
env->nr_threads = smp_threads;
if (kvm_enabled()) {
r = kvm_init_vcpu(env);
if (r < 0) {
fprintf(stderr, "kvm_init_vcpu failed: %s\n", strerror(-r));
exit(1... | {
"code": [
" if (kvm_enabled()) {",
"void qemu_init_vcpu(void *_env)",
" CPUState *env = _env;",
" int r;",
" env->nr_cores = smp_cores;",
" env->nr_threads = smp_threads;",
" if (kvm_enabled()) {",
" r = kvm_init_vcpu(env);",
" if (r < 0) {",
"... | void FUNC_0(void *VAR_0)
{
CPUState *env = VAR_0;
int VAR_1;
env->nr_cores = smp_cores;
env->nr_threads = smp_threads;
if (kvm_enabled()) {
VAR_1 = kvm_init_vcpu(env);
if (VAR_1 < 0) {
fprintf(stderr, "kvm_init_vcpu failed: %s\n", strerror(-VAR_1));
... | [
"void FUNC_0(void *VAR_0)\n{",
"CPUState *env = VAR_0;",
"int VAR_1;",
"env->nr_cores = smp_cores;",
"env->nr_threads = smp_threads;",
"if (kvm_enabled()) {",
"VAR_1 = kvm_init_vcpu(env);",
"if (VAR_1 < 0) {",
"fprintf(stderr, \"kvm_init_vcpu failed: %s\\n\", strerror(-VAR_1));",
"exit(1);",
"}"... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
]
] |
13,933 | static void migrate_finish_set_state(MigrationState *s, int new_state)
{
if (atomic_cmpxchg(&s->state, MIG_STATE_ACTIVE, new_state) == new_state) {
trace_migrate_set_state(new_state);
}
}
| true | qemu | d58f574bf39796ed2396dfd1e308352fbb03f944 | static void migrate_finish_set_state(MigrationState *s, int new_state)
{
if (atomic_cmpxchg(&s->state, MIG_STATE_ACTIVE, new_state) == new_state) {
trace_migrate_set_state(new_state);
}
}
| {
"code": [
"static void migrate_finish_set_state(MigrationState *s, int new_state)",
" if (atomic_cmpxchg(&s->state, MIG_STATE_ACTIVE, new_state) == new_state) {"
],
"line_no": [
1,
5
]
} | static void FUNC_0(MigrationState *VAR_0, int VAR_1)
{
if (atomic_cmpxchg(&VAR_0->state, MIG_STATE_ACTIVE, VAR_1) == VAR_1) {
trace_migrate_set_state(VAR_1);
}
}
| [
"static void FUNC_0(MigrationState *VAR_0, int VAR_1)\n{",
"if (atomic_cmpxchg(&VAR_0->state, MIG_STATE_ACTIVE, VAR_1) == VAR_1) {",
"trace_migrate_set_state(VAR_1);",
"}",
"}"
] | [
1,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
13,934 | static void ohci_reset(OHCIState *ohci)
{
OHCIPort *port;
int i;
ohci->ctl = 0;
ohci->old_ctl = 0;
ohci->status = 0;
ohci->intr_status = 0;
ohci->intr = OHCI_INTR_MIE;
ohci->hcca = 0;
ohci->ctrl_head = ohci->ctrl_cur = 0;
ohci->bulk_head = ohci->bulk_cur = 0;
... | true | qemu | 73221b12ea55ae916b550e56d70743221ca3c886 | static void ohci_reset(OHCIState *ohci)
{
OHCIPort *port;
int i;
ohci->ctl = 0;
ohci->old_ctl = 0;
ohci->status = 0;
ohci->intr_status = 0;
ohci->intr = OHCI_INTR_MIE;
ohci->hcca = 0;
ohci->ctrl_head = ohci->ctrl_cur = 0;
ohci->bulk_head = ohci->bulk_cur = 0;
... | {
"code": [
"static void ohci_reset(OHCIState *ohci)"
],
"line_no": [
1
]
} | static void FUNC_0(OHCIState *VAR_0)
{
OHCIPort *port;
int VAR_1;
VAR_0->ctl = 0;
VAR_0->old_ctl = 0;
VAR_0->status = 0;
VAR_0->intr_status = 0;
VAR_0->intr = OHCI_INTR_MIE;
VAR_0->hcca = 0;
VAR_0->ctrl_head = VAR_0->ctrl_cur = 0;
VAR_0->bulk_head = VAR_0->bulk_cur... | [
"static void FUNC_0(OHCIState *VAR_0)\n{",
"OHCIPort *port;",
"int VAR_1;",
"VAR_0->ctl = 0;",
"VAR_0->old_ctl = 0;",
"VAR_0->status = 0;",
"VAR_0->intr_status = 0;",
"VAR_0->intr = OHCI_INTR_MIE;",
"VAR_0->hcca = 0;",
"VAR_0->ctrl_head = VAR_0->ctrl_cur = 0;",
"VAR_0->bulk_head = VAR_0->bulk_cu... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53... |
13,935 | static int qxl_init_primary(PCIDevice *dev)
{
PCIQXLDevice *qxl = DO_UPCAST(PCIQXLDevice, pci, dev);
VGACommonState *vga = &qxl->vga;
PortioList *qxl_vga_port_list = g_new(PortioList, 1);
int rc;
qxl->id = 0;
qxl_init_ramsize(qxl);
vga->vram_size_mb = qxl->vga.vram_size >> 20;
... | true | qemu | 848696bf353750899832c51005f1bd3540da5c29 | static int qxl_init_primary(PCIDevice *dev)
{
PCIQXLDevice *qxl = DO_UPCAST(PCIQXLDevice, pci, dev);
VGACommonState *vga = &qxl->vga;
PortioList *qxl_vga_port_list = g_new(PortioList, 1);
int rc;
qxl->id = 0;
qxl_init_ramsize(qxl);
vga->vram_size_mb = qxl->vga.vram_size >> 20;
... | {
"code": [
" PortioList *qxl_vga_port_list = g_new(PortioList, 1);",
" portio_list_init(qxl_vga_port_list, OBJECT(dev), qxl_vga_portio_list,",
" portio_list_set_flush_coalesced(qxl_vga_port_list);",
" portio_list_add(qxl_vga_port_list, pci_address_space_io(dev), 0x3b0);"
],
"line_no":... | static int FUNC_0(PCIDevice *VAR_0)
{
PCIQXLDevice *qxl = DO_UPCAST(PCIQXLDevice, pci, VAR_0);
VGACommonState *vga = &qxl->vga;
PortioList *qxl_vga_port_list = g_new(PortioList, 1);
int VAR_1;
qxl->id = 0;
qxl_init_ramsize(qxl);
vga->vram_size_mb = qxl->vga.vram_size >> 20;
vg... | [
"static int FUNC_0(PCIDevice *VAR_0)\n{",
"PCIQXLDevice *qxl = DO_UPCAST(PCIQXLDevice, pci, VAR_0);",
"VGACommonState *vga = &qxl->vga;",
"PortioList *qxl_vga_port_list = g_new(PortioList, 1);",
"int VAR_1;",
"qxl->id = 0;",
"qxl_init_ramsize(qxl);",
"vga->vram_size_mb = qxl->vga.vram_size >> 20;",
... | [
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27,
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
... |
13,936 | static void nbd_trip(void *opaque)
{
NBDClient *client = opaque;
NBDExport *exp = client->exp;
NBDRequest *req;
struct nbd_request request;
struct nbd_reply reply;
ssize_t ret;
uint32_t command;
TRACE("Reading request.");
if (client->closing) {
return;
}
... | true | qemu | df7b97ff89319ccf392a16748081482a3d22b35a | static void nbd_trip(void *opaque)
{
NBDClient *client = opaque;
NBDExport *exp = client->exp;
NBDRequest *req;
struct nbd_request request;
struct nbd_reply reply;
ssize_t ret;
uint32_t command;
TRACE("Reading request.");
if (client->closing) {
return;
}
... | {
"code": [
" ret = blk_read(exp->blk,",
" (request.from + exp->dev_offset) / BDRV_SECTOR_SIZE,",
" req->data, request.len / BDRV_SECTOR_SIZE);",
" ret = blk_write(exp->blk,",
" (request.from + exp->dev_offset) / BDRV... | static void FUNC_0(void *VAR_0)
{
NBDClient *client = VAR_0;
NBDExport *exp = client->exp;
NBDRequest *req;
struct nbd_request VAR_1;
struct nbd_reply VAR_2;
ssize_t ret;
uint32_t command;
TRACE("Reading VAR_1.");
if (client->closing) {
return;
}
req ... | [
"static void FUNC_0(void *VAR_0)\n{",
"NBDClient *client = VAR_0;",
"NBDExport *exp = client->exp;",
"NBDRequest *req;",
"struct nbd_request VAR_1;",
"struct nbd_reply VAR_2;",
"ssize_t ret;",
"uint32_t command;",
"TRACE(\"Reading VAR_1.\");",
"if (client->closing) {",
"return;",
"}",
"req =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
13,937 | bool memory_region_is_unassigned(MemoryRegion *mr)
{
return mr != &io_mem_ram && mr != &io_mem_rom
&& mr != &io_mem_notdirty && !mr->rom_device
&& mr != &io_mem_watch;
}
| true | qemu | 2a8e7499093cd33a607ebd7c1cd591169aa68a3e | bool memory_region_is_unassigned(MemoryRegion *mr)
{
return mr != &io_mem_ram && mr != &io_mem_rom
&& mr != &io_mem_notdirty && !mr->rom_device
&& mr != &io_mem_watch;
}
| {
"code": [
" return mr != &io_mem_ram && mr != &io_mem_rom",
" && mr != &io_mem_notdirty && !mr->rom_device"
],
"line_no": [
5,
7
]
} | bool FUNC_0(MemoryRegion *mr)
{
return mr != &io_mem_ram && mr != &io_mem_rom
&& mr != &io_mem_notdirty && !mr->rom_device
&& mr != &io_mem_watch;
}
| [
"bool FUNC_0(MemoryRegion *mr)\n{",
"return mr != &io_mem_ram && mr != &io_mem_rom\n&& mr != &io_mem_notdirty && !mr->rom_device\n&& mr != &io_mem_watch;",
"}"
] | [
0,
1,
0
] | [
[
1,
3
],
[
5,
7,
9
],
[
11
]
] |
13,939 | static void setup_rt_frame(int sig, struct target_sigaction *ka,
target_siginfo_t *info,
target_sigset_t *set, CPUState *env)
{
fprintf(stderr, "setup_rt_frame: not implemented\n");
}
| true | qemu | 0b1bcb00fb2baf5f3227dd9cd849fa69bf50d7a8 | static void setup_rt_frame(int sig, struct target_sigaction *ka,
target_siginfo_t *info,
target_sigset_t *set, CPUState *env)
{
fprintf(stderr, "setup_rt_frame: not implemented\n");
}
| {
"code": [
" fprintf(stderr, \"setup_rt_frame: not implemented\\n\");"
],
"line_no": [
9
]
} | static void FUNC_0(int VAR_0, struct target_sigaction *VAR_1,
target_siginfo_t *VAR_2,
target_sigset_t *VAR_3, CPUState *VAR_4)
{
fprintf(stderr, "FUNC_0: not implemented\n");
}
| [
"static void FUNC_0(int VAR_0, struct target_sigaction *VAR_1,\ntarget_siginfo_t *VAR_2,\ntarget_sigset_t *VAR_3, CPUState *VAR_4)\n{",
"fprintf(stderr, \"FUNC_0: not implemented\\n\");",
"}"
] | [
0,
1,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
]
] |
13,940 | static unsigned int virtqueue_get_head(VirtQueue *vq, unsigned int idx)
{
unsigned int head;
/* Grab the next descriptor number they're advertising, and increment
* the index we've seen. */
head = vring_avail_ring(vq, idx % vq->vring.num);
/* If their number is silly, that's a fatal mista... | true | qemu | fb1131b674e492a5f91abd77b9fcc9a9e2b88eb7 | static unsigned int virtqueue_get_head(VirtQueue *vq, unsigned int idx)
{
unsigned int head;
head = vring_avail_ring(vq, idx % vq->vring.num);
if (head >= vq->vring.num) {
error_report("Guest says index %u is available", head);
exit(1);
}
return head;
}
| {
"code": [
"static unsigned int virtqueue_get_head(VirtQueue *vq, unsigned int idx)",
" unsigned int head;",
" head = vring_avail_ring(vq, idx % vq->vring.num);",
" if (head >= vq->vring.num) {",
" error_report(\"Guest says index %u is available\", head);",
" exit(1);",... | static unsigned int FUNC_0(VirtQueue *VAR_0, unsigned int VAR_1)
{
unsigned int VAR_2;
VAR_2 = vring_avail_ring(VAR_0, VAR_1 % VAR_0->vring.num);
if (VAR_2 >= VAR_0->vring.num) {
error_report("Guest says index %u is available", VAR_2);
exit(1);
}
return VA... | [
"static unsigned int FUNC_0(VirtQueue *VAR_0, unsigned int VAR_1)\n{",
"unsigned int VAR_2;",
"VAR_2 = vring_avail_ring(VAR_0, VAR_1 % VAR_0->vring.num);",
"if (VAR_2 >= VAR_0->vring.num) {",
"error_report(\"Guest says index %u is available\", VAR_2);",
"exit(1);",
"}",
"return VAR_2;",
"}"
] | [
1,
1,
1,
1,
1,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
13
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
]
] |
13,941 | int kvm_has_sync_mmu(void)
{
#ifdef KVM_CAP_SYNC_MMU
KVMState *s = kvm_state;
return kvm_check_extension(s, KVM_CAP_SYNC_MMU);
#else
return 0;
#endif
}
| true | qemu | 94a8d39afd8ccfdbf578af04c3385fdb5f545af1 | int kvm_has_sync_mmu(void)
{
#ifdef KVM_CAP_SYNC_MMU
KVMState *s = kvm_state;
return kvm_check_extension(s, KVM_CAP_SYNC_MMU);
#else
return 0;
#endif
}
| {
"code": [
"#endif",
"#endif",
"#endif",
"#endif",
"#endif",
"#endif",
"#endif",
"#endif",
"#endif",
"#ifdef KVM_CAP_SYNC_MMU",
" KVMState *s = kvm_state;",
" return kvm_check_extension(s, KVM_CAP_SYNC_MMU);",
"#else",
" return 0;",
"#endif",
"... | int FUNC_0(void)
{
#ifdef KVM_CAP_SYNC_MMU
KVMState *s = kvm_state;
return kvm_check_extension(s, KVM_CAP_SYNC_MMU);
#else
return 0;
#endif
}
| [
"int FUNC_0(void)\n{",
"#ifdef KVM_CAP_SYNC_MMU\nKVMState *s = kvm_state;",
"return kvm_check_extension(s, KVM_CAP_SYNC_MMU);",
"#else\nreturn 0;",
"#endif\n}"
] | [
0,
1,
1,
1,
1
] | [
[
1,
3
],
[
5,
7
],
[
11
],
[
13,
15
],
[
17,
19
]
] |
13,942 | static void ff_wmv2_idct_add_c(uint8_t *dest, int line_size, DCTELEM *block)
{
ff_wmv2_idct_c(block);
add_pixels_clamped_c(block, dest, line_size);
}
| true | FFmpeg | e6bc38fd49c94726b45d5d5cc2b756ad8ec49ee0 | static void ff_wmv2_idct_add_c(uint8_t *dest, int line_size, DCTELEM *block)
{
ff_wmv2_idct_c(block);
add_pixels_clamped_c(block, dest, line_size);
}
| {
"code": [
" ff_wmv2_idct_c(block);",
"static void ff_wmv2_idct_add_c(uint8_t *dest, int line_size, DCTELEM *block)",
" ff_wmv2_idct_c(block);",
" add_pixels_clamped_c(block, dest, line_size);"
],
"line_no": [
5,
1,
5,
7
]
} | static void FUNC_0(uint8_t *VAR_0, int VAR_1, DCTELEM *VAR_2)
{
ff_wmv2_idct_c(VAR_2);
add_pixels_clamped_c(VAR_2, VAR_0, VAR_1);
}
| [
"static void FUNC_0(uint8_t *VAR_0, int VAR_1, DCTELEM *VAR_2)\n{",
"ff_wmv2_idct_c(VAR_2);",
"add_pixels_clamped_c(VAR_2, VAR_0, VAR_1);",
"}"
] | [
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
13,944 | static void vc1_decode_b_blocks(VC1Context *v)
{
MpegEncContext *s = &v->s;
/* select codingmode used for VLC tables selection */
switch(v->c_ac_table_index){
case 0:
v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;
break;
case 1:
v->coding... | false | FFmpeg | 2d08f9ea54a347eb0282c227bae359d1a9c3d4bb | static void vc1_decode_b_blocks(VC1Context *v)
{
MpegEncContext *s = &v->s;
switch(v->c_ac_table_index){
case 0:
v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;
break;
case 1:
v->codingset = CS_HIGH_MOT_INTRA;
break;
case 2:... | {
"code": [],
"line_no": []
} | static void FUNC_0(VC1Context *VAR_0)
{
MpegEncContext *s = &VAR_0->s;
switch(VAR_0->c_ac_table_index){
case 0:
VAR_0->codingset = (VAR_0->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;
break;
case 1:
VAR_0->codingset = CS_HIGH_MOT_INTRA;
break;
... | [
"static void FUNC_0(VC1Context *VAR_0)\n{",
"MpegEncContext *s = &VAR_0->s;",
"switch(VAR_0->c_ac_table_index){",
"case 0:\nVAR_0->codingset = (VAR_0->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;",
"break;",
"case 1:\nVAR_0->codingset = CS_HIGH_MOT_INTRA;",
"break;",
"case 2:\nVAR_0->codings... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
11
],
[
13,
15
],
[
17
],
[
19,
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
35
],
[
37,
39
],
[
41
],
[
43,
45
],
[
47
],
[
49,
51
],
[
5... |
13,945 | static float ppp_pvq_search_c(float *X, int *y, int K, int N)
{
int i, y_norm = 0;
float res = 0.0f, xy_norm = 0.0f;
for (i = 0; i < N; i++)
res += FFABS(X[i]);
res = K/(res + FLT_EPSILON);
for (i = 0; i < N; i++) {
y[i] = lrintf(res*X[i]);
y_norm += y[i]*y[i]... | false | FFmpeg | 05dfa21d47f35f394938653abcab8b3baa3bc999 | static float ppp_pvq_search_c(float *X, int *y, int K, int N)
{
int i, y_norm = 0;
float res = 0.0f, xy_norm = 0.0f;
for (i = 0; i < N; i++)
res += FFABS(X[i]);
res = K/(res + FLT_EPSILON);
for (i = 0; i < N; i++) {
y[i] = lrintf(res*X[i]);
y_norm += y[i]*y[i]... | {
"code": [],
"line_no": []
} | static float FUNC_0(float *VAR_0, int *VAR_1, int VAR_2, int VAR_3)
{
int VAR_4, VAR_5 = 0;
float VAR_6 = 0.0f, VAR_7 = 0.0f;
for (VAR_4 = 0; VAR_4 < VAR_3; VAR_4++)
VAR_6 += FFABS(VAR_0[VAR_4]);
VAR_6 = VAR_2/(VAR_6 + FLT_EPSILON);
for (VAR_4 = 0; VAR_4 < VAR_3; VAR_4++) {
... | [
"static float FUNC_0(float *VAR_0, int *VAR_1, int VAR_2, int VAR_3)\n{",
"int VAR_4, VAR_5 = 0;",
"float VAR_6 = 0.0f, VAR_7 = 0.0f;",
"for (VAR_4 = 0; VAR_4 < VAR_3; VAR_4++)",
"VAR_6 += FFABS(VAR_0[VAR_4]);",
"VAR_6 = VAR_2/(VAR_6 + FLT_EPSILON);",
"for (VAR_4 = 0; VAR_4 < VAR_3; VAR_4++) {",
"VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
53
],
[
55
],
[
57... |
13,946 | uint32_t do_arm_semihosting(CPUARMState *env)
{
ARMCPU *cpu = arm_env_get_cpu(env);
CPUState *cs = CPU(cpu);
target_ulong args;
target_ulong arg0, arg1, arg2, arg3;
char * s;
int nr;
uint32_t ret;
uint32_t len;
#ifdef CONFIG_USER_ONLY
TaskState *ts = cs->opaque;
#else
... | false | qemu | 1ecc3a2df168034b8ab33ff5ba6434ce3593dbb5 | uint32_t do_arm_semihosting(CPUARMState *env)
{
ARMCPU *cpu = arm_env_get_cpu(env);
CPUState *cs = CPU(cpu);
target_ulong args;
target_ulong arg0, arg1, arg2, arg3;
char * s;
int nr;
uint32_t ret;
uint32_t len;
#ifdef CONFIG_USER_ONLY
TaskState *ts = cs->opaque;
#else
... | {
"code": [],
"line_no": []
} | uint32_t FUNC_0(CPUARMState *env)
{
ARMCPU *cpu = arm_env_get_cpu(env);
CPUState *cs = CPU(cpu);
target_ulong args;
target_ulong arg0, arg1, arg2, arg3;
char * VAR_0;
int VAR_1;
uint32_t ret;
uint32_t len;
#ifdef CONFIG_USER_ONLY
TaskState *ts = cs->opaque;
#else
CPU... | [
"uint32_t FUNC_0(CPUARMState *env)\n{",
"ARMCPU *cpu = arm_env_get_cpu(env);",
"CPUState *cs = CPU(cpu);",
"target_ulong args;",
"target_ulong arg0, arg1, arg2, arg3;",
"char * VAR_0;",
"int VAR_1;",
"uint32_t ret;",
"uint32_t len;",
"#ifdef CONFIG_USER_ONLY\nTaskState *ts = cs->opaque;",
"#else... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21,
23
],
[
25,
27
],
[
29,
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
... |
13,947 | static int openfile(char *name, int flags, QDict *opts)
{
Error *local_err = NULL;
BlockDriverState *bs;
if (qemuio_blk) {
error_report("file open already, try 'help close'");
QDECREF(opts);
return 1;
}
qemuio_blk = blk_new_open(name, NULL, opts, flags, &local_er... | false | qemu | 4ef130fca87b7a8c77e1af9ca967f28b683811d7 | static int openfile(char *name, int flags, QDict *opts)
{
Error *local_err = NULL;
BlockDriverState *bs;
if (qemuio_blk) {
error_report("file open already, try 'help close'");
QDECREF(opts);
return 1;
}
qemuio_blk = blk_new_open(name, NULL, opts, flags, &local_er... | {
"code": [],
"line_no": []
} | static int FUNC_0(char *VAR_0, int VAR_1, QDict *VAR_2)
{
Error *local_err = NULL;
BlockDriverState *bs;
if (qemuio_blk) {
error_report("file open already, try 'help close'");
QDECREF(VAR_2);
return 1;
}
qemuio_blk = blk_new_open(VAR_0, NULL, VAR_2, VAR_1, &local... | [
"static int FUNC_0(char *VAR_0, int VAR_1, QDict *VAR_2)\n{",
"Error *local_err = NULL;",
"BlockDriverState *bs;",
"if (qemuio_blk) {",
"error_report(\"file open already, try 'help close'\");",
"QDECREF(VAR_2);",
"return 1;",
"}",
"qemuio_blk = blk_new_open(VAR_0, NULL, VAR_2, VAR_1, &local_err);",
... | [
0,
0,
0,
0,
0,
0,
0,
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
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
... |
13,948 | static void *worker_thread(void *opaque)
{
ThreadPool *pool = opaque;
qemu_mutex_lock(&pool->lock);
pool->pending_threads--;
do_spawn_thread(pool);
while (!pool->stopping) {
ThreadPoolElement *req;
int ret;
do {
pool->idle_threads++;
q... | false | qemu | c2b38b277a7882a592f4f2ec955084b2b756daaa | static void *worker_thread(void *opaque)
{
ThreadPool *pool = opaque;
qemu_mutex_lock(&pool->lock);
pool->pending_threads--;
do_spawn_thread(pool);
while (!pool->stopping) {
ThreadPoolElement *req;
int ret;
do {
pool->idle_threads++;
q... | {
"code": [],
"line_no": []
} | static void *FUNC_0(void *VAR_0)
{
ThreadPool *pool = VAR_0;
qemu_mutex_lock(&pool->lock);
pool->pending_threads--;
do_spawn_thread(pool);
while (!pool->stopping) {
ThreadPoolElement *req;
int VAR_1;
do {
pool->idle_threads++;
qemu_mut... | [
"static void *FUNC_0(void *VAR_0)\n{",
"ThreadPool *pool = VAR_0;",
"qemu_mutex_lock(&pool->lock);",
"pool->pending_threads--;",
"do_spawn_thread(pool);",
"while (!pool->stopping) {",
"ThreadPoolElement *req;",
"int VAR_1;",
"do {",
"pool->idle_threads++;",
"qemu_mutex_unlock(&pool->lock);",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49... |
13,949 | void qemu_aio_wait(void)
{
int ret;
if (qemu_bh_poll())
return;
do {
AioHandler *node;
fd_set rdfds, wrfds;
int max_fd = -1;
walking_handlers = 1;
FD_ZERO(&rdfds);
FD_ZERO(&wrfds);
/* fill fd sets */
LIST_FOREACH(... | false | qemu | 72cf2d4f0e181d0d3a3122e04129c58a95da713e | void qemu_aio_wait(void)
{
int ret;
if (qemu_bh_poll())
return;
do {
AioHandler *node;
fd_set rdfds, wrfds;
int max_fd = -1;
walking_handlers = 1;
FD_ZERO(&rdfds);
FD_ZERO(&wrfds);
LIST_FOREACH(node, &aio_handler... | {
"code": [],
"line_no": []
} | void FUNC_0(void)
{
int VAR_0;
if (qemu_bh_poll())
return;
do {
AioHandler *node;
fd_set rdfds, wrfds;
int VAR_1 = -1;
walking_handlers = 1;
FD_ZERO(&rdfds);
FD_ZERO(&wrfds);
LIST_FOREACH(node, &aio_handlers, nod... | [
"void FUNC_0(void)\n{",
"int VAR_0;",
"if (qemu_bh_poll())\nreturn;",
"do {",
"AioHandler *node;",
"fd_set rdfds, wrfds;",
"int VAR_1 = -1;",
"walking_handlers = 1;",
"FD_ZERO(&rdfds);",
"FD_ZERO(&wrfds);",
"LIST_FOREACH(node, &aio_handlers, node) {",
"if (node->io_flush && node->io_flush(node... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
31
],
[
37
],
[
47,
49
],
[
53
],
[
55
],
[
57
],
[
59
],
[
61
],
[
63
],
[
65... |
13,950 | void hotplug_handler_post_plug(HotplugHandler *plug_handler,
DeviceState *plugged_dev,
Error **errp)
{
HotplugHandlerClass *hdc = HOTPLUG_HANDLER_GET_CLASS(plug_handler);
if (hdc->post_plug) {
hdc->post_plug(plug_handler, plugged_dev,... | false | qemu | c7f8d0f3a52b5ef8fdcd305cce438f67d7e06a9f | void hotplug_handler_post_plug(HotplugHandler *plug_handler,
DeviceState *plugged_dev,
Error **errp)
{
HotplugHandlerClass *hdc = HOTPLUG_HANDLER_GET_CLASS(plug_handler);
if (hdc->post_plug) {
hdc->post_plug(plug_handler, plugged_dev,... | {
"code": [],
"line_no": []
} | void FUNC_0(HotplugHandler *VAR_0,
DeviceState *VAR_1,
Error **VAR_2)
{
HotplugHandlerClass *hdc = HOTPLUG_HANDLER_GET_CLASS(VAR_0);
if (hdc->post_plug) {
hdc->post_plug(VAR_0, VAR_1, VAR_2);
}
}
| [
"void FUNC_0(HotplugHandler *VAR_0,\nDeviceState *VAR_1,\nError **VAR_2)\n{",
"HotplugHandlerClass *hdc = HOTPLUG_HANDLER_GET_CLASS(VAR_0);",
"if (hdc->post_plug) {",
"hdc->post_plug(VAR_0, VAR_1, VAR_2);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
13,952 | static void kvm_openpic_realize(DeviceState *dev, Error **errp)
{
SysBusDevice *d = SYS_BUS_DEVICE(dev);
KVMOpenPICState *opp = KVM_OPENPIC(dev);
KVMState *s = kvm_state;
int kvm_openpic_model;
struct kvm_create_device cd = {0};
int ret, i;
if (!kvm_check_extension(s, KVM_CAP_DEVIC... | false | qemu | f41389ae3c54bd5e2040e3f95a2872981c3ed965 | static void kvm_openpic_realize(DeviceState *dev, Error **errp)
{
SysBusDevice *d = SYS_BUS_DEVICE(dev);
KVMOpenPICState *opp = KVM_OPENPIC(dev);
KVMState *s = kvm_state;
int kvm_openpic_model;
struct kvm_create_device cd = {0};
int ret, i;
if (!kvm_check_extension(s, KVM_CAP_DEVIC... | {
"code": [],
"line_no": []
} | static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)
{
SysBusDevice *d = SYS_BUS_DEVICE(VAR_0);
KVMOpenPICState *opp = KVM_OPENPIC(VAR_0);
KVMState *s = kvm_state;
int VAR_2;
struct kvm_create_device VAR_3 = {0};
int VAR_4, VAR_5;
if (!kvm_check_extension(s, KVM_CAP_DEVICE_CTRL)) ... | [
"static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)\n{",
"SysBusDevice *d = SYS_BUS_DEVICE(VAR_0);",
"KVMOpenPICState *opp = KVM_OPENPIC(VAR_0);",
"KVMState *s = kvm_state;",
"int VAR_2;",
"struct kvm_create_device VAR_3 = {0};",
"int VAR_4, VAR_5;",
"if (!kvm_check_extension(s, KVM_CAP_DEVICE_CTRL... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31,
33
],
[
35
],
[
39,
41
],
[
43
],
[
47,
49
],
[
51
],
[... |
13,953 | static int get_free_io_mem_idx(void)
{
int i;
for (i = 0; i<IO_MEM_NB_ENTRIES; i++)
if (!io_mem_used[i]) {
io_mem_used[i] = 1;
return i;
}
return -1;
}
| false | qemu | c6703b4761c4df633997a37d52641b20a0b6cf45 | static int get_free_io_mem_idx(void)
{
int i;
for (i = 0; i<IO_MEM_NB_ENTRIES; i++)
if (!io_mem_used[i]) {
io_mem_used[i] = 1;
return i;
}
return -1;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(void)
{
int VAR_0;
for (VAR_0 = 0; VAR_0<IO_MEM_NB_ENTRIES; VAR_0++)
if (!io_mem_used[VAR_0]) {
io_mem_used[VAR_0] = 1;
return VAR_0;
}
return -1;
}
| [
"static int FUNC_0(void)\n{",
"int VAR_0;",
"for (VAR_0 = 0; VAR_0<IO_MEM_NB_ENTRIES; VAR_0++)",
"if (!io_mem_used[VAR_0]) {",
"io_mem_used[VAR_0] = 1;",
"return VAR_0;",
"}",
"return -1;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.