id int32 0 27.3k | func stringlengths 26 142k | target bool 2
classes | project stringclasses 2
values | commit_id stringlengths 40 40 | func_clean stringlengths 26 131k | vul_lines dict | normalized_func stringlengths 24 132k | lines listlengths 1 2.8k | label listlengths 1 2.8k | line_no listlengths 1 2.8k |
|---|---|---|---|---|---|---|---|---|---|---|
5,063 | static void srt_to_ass(AVCodecContext *avctx, AVBPrint *dst,
const char *in, int x1, int y1, int x2, int y2)
{
if (x1 >= 0 && y1 >= 0) {
/* XXX: here we rescale coordinate assuming they are in DVD resolution
* (720x480) since we don't have anything better */
i... | true | FFmpeg | c11d3634b07b4aa71f75478aa1bcb63b0c22e030 | static void srt_to_ass(AVCodecContext *avctx, AVBPrint *dst,
const char *in, int x1, int y1, int x2, int y2)
{
if (x1 >= 0 && y1 >= 0) {
if (x2 >= 0 && y2 >= 0 && (x2 != x1 || y2 != y1) && x2 >= x1 && y2 >= y1) {
const int cx = x1 + (x2 - x... | {
"code": [
" const int scaled_x = cx * ASS_DEFAULT_PLAYRESX / 720;",
" const int scaled_y = cy * ASS_DEFAULT_PLAYRESY / 480;",
" const int scaled_x = x1 * ASS_DEFAULT_PLAYRESX / 720;",
" const int scaled_y = y1 * ASS_DEFAULT_PLAYRESY / 480;"
],
"line_no... | static void FUNC_0(AVCodecContext *VAR_0, AVBPrint *VAR_1,
const char *VAR_2, int VAR_3, int VAR_4, int VAR_5, int VAR_6)
{
if (VAR_3 >= 0 && VAR_4 >= 0) {
if (VAR_5 >= 0 && VAR_6 >= 0 && (VAR_5 != VAR_3 || VAR_6 != VAR_4) && VAR_5 >= VAR_3 && VAR_6 >= VAR_4) {
... | [
"static void FUNC_0(AVCodecContext *VAR_0, AVBPrint *VAR_1,\nconst char *VAR_2, int VAR_3, int VAR_4, int VAR_5, int VAR_6)\n{",
"if (VAR_3 >= 0 && VAR_4 >= 0) {",
"if (VAR_5 >= 0 && VAR_6 >= 0 && (VAR_5 != VAR_3 || VAR_6 != VAR_4) && VAR_5 >= VAR_3 && VAR_6 >= VAR_4) {",
"const int VAR_7 = VAR_3 + (VAR_5 - V... | [
0,
0,
0,
0,
0,
1,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
]
] |
5,064 | static void mmio_basic(void)
{
QVirtioMMIODevice *dev;
QVirtQueue *vq;
QGuestAllocator *alloc;
int n_size = TEST_IMAGE_SIZE / 2;
uint64_t capacity;
arm_test_start();
dev = qvirtio_mmio_init_device(MMIO_DEV_BASE_ADDR, MMIO_PAGE_SIZE);
g_assert(dev != NULL);
g_assert_cmph... | true | qemu | f1d3b99154138741161fc52f5a8c373bf71613c6 | static void mmio_basic(void)
{
QVirtioMMIODevice *dev;
QVirtQueue *vq;
QGuestAllocator *alloc;
int n_size = TEST_IMAGE_SIZE / 2;
uint64_t capacity;
arm_test_start();
dev = qvirtio_mmio_init_device(MMIO_DEV_BASE_ADDR, MMIO_PAGE_SIZE);
g_assert(dev != NULL);
g_assert_cmph... | {
"code": [
" guest_free(alloc, vq->desc);"
],
"line_no": [
71
]
} | static void FUNC_0(void)
{
QVirtioMMIODevice *dev;
QVirtQueue *vq;
QGuestAllocator *alloc;
int VAR_0 = TEST_IMAGE_SIZE / 2;
uint64_t capacity;
arm_test_start();
dev = qvirtio_mmio_init_device(MMIO_DEV_BASE_ADDR, MMIO_PAGE_SIZE);
g_assert(dev != NULL);
g_assert_cmphex(de... | [
"static void FUNC_0(void)\n{",
"QVirtioMMIODevice *dev;",
"QVirtQueue *vq;",
"QGuestAllocator *alloc;",
"int VAR_0 = TEST_IMAGE_SIZE / 2;",
"uint64_t capacity;",
"arm_test_start();",
"dev = qvirtio_mmio_init_device(MMIO_DEV_BASE_ADDR, MMIO_PAGE_SIZE);",
"g_assert(dev != NULL);",
"g_assert_cmphex(d... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
43,
45
],
[
49
],
[
51
],
[
55,
57
... |
5,065 | int ff_twinvq_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
AVFrame *frame = data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
TwinVQContext *tctx = avctx->priv_data;
const TwinVQModeTab *mtab = tc... | false | FFmpeg | 9e7b62f0fb7462a902330fcc82cf596388f0187b | int ff_twinvq_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
AVFrame *frame = data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
TwinVQContext *tctx = avctx->priv_data;
const TwinVQModeTab *mtab = tc... | {
"code": [],
"line_no": []
} | int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
AVFrame *frame = VAR_1;
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
TwinVQContext *tctx = VAR_0->priv_data;
const TwinVQModeTab *VAR_6 = tctx->VAR_6;
float... | [
"int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"AVFrame *frame = VAR_1;",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"TwinVQContext *tctx = VAR_0->priv_data;",
"const TwinVQModeTab *VAR_6 = tctx->VAR_6;",
"float **VAR_7 = 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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43,
45
],
[
49
],
[
53
... |
5,067 | static int split_field_ref_list(Picture *dest, int dest_len,
Picture *src, int src_len,
int parity, int long_i){
int i = split_field_half_ref_list(dest, dest_len, src, long_i, parity);
dest += i;
dest_len -= i;
i += split_fiel... | false | FFmpeg | d4f7d8386693beb987382ece8bb7499955620388 | static int split_field_ref_list(Picture *dest, int dest_len,
Picture *src, int src_len,
int parity, int long_i){
int i = split_field_half_ref_list(dest, dest_len, src, long_i, parity);
dest += i;
dest_len -= i;
i += split_fiel... | {
"code": [],
"line_no": []
} | static int FUNC_0(Picture *VAR_0, int VAR_1,
Picture *VAR_2, int VAR_3,
int VAR_4, int VAR_5){
int VAR_6 = split_field_half_ref_list(VAR_0, VAR_1, VAR_2, VAR_5, VAR_4);
VAR_0 += VAR_6;
VAR_1 -= VAR_6;
VAR_6 += split_field_half... | [
"static int FUNC_0(Picture *VAR_0, int VAR_1,\nPicture *VAR_2, int VAR_3,\nint VAR_4, int VAR_5){",
"int VAR_6 = split_field_half_ref_list(VAR_0, VAR_1, VAR_2, VAR_5, VAR_4);",
"VAR_0 += VAR_6;",
"VAR_1 -= VAR_6;",
"VAR_6 += split_field_half_ref_list(VAR_0, VAR_1, VAR_2 + VAR_5,\nVAR_3 - VAR_5, VAR_4);"... | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
9
],
[
11
],
[
13
],
[
17,
19
],
[
21
],
[
23
]
] |
5,068 | static int fourxm_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
FourxmDemuxContext *fourxm = s->priv_data;
ByteIOContext *pb = s->pb;
unsigned int fourcc_tag;
unsigned int size, out_size;
int ret = 0;
unsigned int track_number;
int packet_read = 0;
... | false | FFmpeg | 8bb7d97be0cda3c944956c79c50d0cf6f1efb7b9 | static int fourxm_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
FourxmDemuxContext *fourxm = s->priv_data;
ByteIOContext *pb = s->pb;
unsigned int fourcc_tag;
unsigned int size, out_size;
int ret = 0;
unsigned int track_number;
int packet_read = 0;
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0,
AVPacket *VAR_1)
{
FourxmDemuxContext *fourxm = VAR_0->priv_data;
ByteIOContext *pb = VAR_0->pb;
unsigned int VAR_2;
unsigned int VAR_3, VAR_4;
int VAR_5 = 0;
unsigned int VAR_6;
int VAR_7 = 0;
unsigned cha... | [
"static int FUNC_0(AVFormatContext *VAR_0,\nAVPacket *VAR_1)\n{",
"FourxmDemuxContext *fourxm = VAR_0->priv_data;",
"ByteIOContext *pb = VAR_0->pb;",
"unsigned int VAR_2;",
"unsigned int VAR_3, VAR_4;",
"int VAR_5 = 0;",
"unsigned int VAR_6;",
"int VAR_7 = 0;",
"unsigned char VAR_8[8];",
"int 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
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31,
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
47,
51
],
[
57
... |
5,069 | SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c)
{
int cpu_flags = av_get_cpu_flags();
if (c->srcFormat != PIX_FMT_YUV420P &&
c->srcFormat != PIX_FMT_YUVA420P)
return NULL;
#if HAVE_MMX2
if (cpu_flags & AV_CPU_FLAG_MMX2) {
switch (c->dstFormat) {
case PIX_FMT_RGB24: r... | false | FFmpeg | 5a840f636491fa52a003fb8f674f6db39d5edd66 | SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c)
{
int cpu_flags = av_get_cpu_flags();
if (c->srcFormat != PIX_FMT_YUV420P &&
c->srcFormat != PIX_FMT_YUVA420P)
return NULL;
#if HAVE_MMX2
if (cpu_flags & AV_CPU_FLAG_MMX2) {
switch (c->dstFormat) {
case PIX_FMT_RGB24: r... | {
"code": [],
"line_no": []
} | SwsFunc FUNC_0(SwsContext *c)
{
int VAR_0 = av_get_cpu_flags();
if (c->srcFormat != PIX_FMT_YUV420P &&
c->srcFormat != PIX_FMT_YUVA420P)
return NULL;
#if HAVE_MMX2
if (VAR_0 & AV_CPU_FLAG_MMX2) {
switch (c->dstFormat) {
case PIX_FMT_RGB24: return yuv420_rgb24_MM... | [
"SwsFunc FUNC_0(SwsContext *c)\n{",
"int VAR_0 = av_get_cpu_flags();",
"if (c->srcFormat != PIX_FMT_YUV420P &&\nc->srcFormat != PIX_FMT_YUVA420P)\nreturn NULL;",
"#if HAVE_MMX2\nif (VAR_0 & AV_CPU_FLAG_MMX2) {",
"switch (c->dstFormat) {",
"case PIX_FMT_RGB24: return yuv420_rgb24_MMX2;",
"case PIX_FMT_B... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11,
13
],
[
17,
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
35
],
[
37
],
[
39,
41
],
[
43,
45
],
[
47,
49
],
[
51
],
[
53,
55... |
5,070 | void cpsr_write(CPUARMState *env, uint32_t val, uint32_t mask)
{
if (mask & CPSR_NZCV) {
env->ZF = (~val) & CPSR_Z;
env->NF = val;
env->CF = (val >> 29) & 1;
env->VF = (val << 3) & 0x80000000;
}
if (mask & CPSR_Q)
env->QF = ((val & CPSR_Q) != 0);
if (mas... | true | qemu | 37064a8b6f9075e18b05bfc6d5264b138a224713 | void cpsr_write(CPUARMState *env, uint32_t val, uint32_t mask)
{
if (mask & CPSR_NZCV) {
env->ZF = (~val) & CPSR_Z;
env->NF = val;
env->CF = (val >> 29) & 1;
env->VF = (val << 3) & 0x80000000;
}
if (mask & CPSR_Q)
env->QF = ((val & CPSR_Q) != 0);
if (mas... | {
"code": [
" switch_mode(env, val & CPSR_M);"
],
"line_no": [
51
]
} | void FUNC_0(CPUARMState *VAR_0, uint32_t VAR_1, uint32_t VAR_2)
{
if (VAR_2 & CPSR_NZCV) {
VAR_0->ZF = (~VAR_1) & CPSR_Z;
VAR_0->NF = VAR_1;
VAR_0->CF = (VAR_1 >> 29) & 1;
VAR_0->VF = (VAR_1 << 3) & 0x80000000;
}
if (VAR_2 & CPSR_Q)
VAR_0->QF = ((VAR_1 & CPSR... | [
"void FUNC_0(CPUARMState *VAR_0, uint32_t VAR_1, uint32_t VAR_2)\n{",
"if (VAR_2 & CPSR_NZCV) {",
"VAR_0->ZF = (~VAR_1) & CPSR_Z;",
"VAR_0->NF = VAR_1;",
"VAR_0->CF = (VAR_1 >> 29) & 1;",
"VAR_0->VF = (VAR_1 << 3) & 0x80000000;",
"}",
"if (VAR_2 & CPSR_Q)\nVAR_0->QF = ((VAR_1 & CPSR_Q) != 0);",
"if ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17,
19
],
[
21,
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
... |
5,073 | static av_always_inline av_flatten void FUNCC(h264_loop_filter_luma)(uint8_t *p_pix, int xstride, int ystride, int inner_iters, int alpha, int beta, int8_t *tc0)
{
pixel *pix = (pixel*)p_pix;
int i, d;
xstride >>= sizeof(pixel)-1;
ystride >>= sizeof(pixel)-1;
alpha <<= BIT_DEPTH - 8;
beta... | false | FFmpeg | 06a0d5ef5ce3fd9236a9fa0ff0f37ea4107b747d | static av_always_inline av_flatten void FUNCC(h264_loop_filter_luma)(uint8_t *p_pix, int xstride, int ystride, int inner_iters, int alpha, int beta, int8_t *tc0)
{
pixel *pix = (pixel*)p_pix;
int i, d;
xstride >>= sizeof(pixel)-1;
ystride >>= sizeof(pixel)-1;
alpha <<= BIT_DEPTH - 8;
beta... | {
"code": [],
"line_no": []
} | static av_always_inline VAR_0 void FUNC_0(h264_loop_filter_luma)(uint8_t *p_pix, int xstride, int ystride, int inner_iters, int alpha, int beta, int8_t *tc0)
{
pixel *pix = (pixel*)p_pix;
int VAR_1, VAR_2;
xstride >>= sizeof(pixel)-1;
ystride >>= sizeof(pixel)-1;
alpha <<= BIT_DEPTH - 8;
... | [
"static av_always_inline VAR_0 void FUNC_0(h264_loop_filter_luma)(uint8_t *p_pix, int xstride, int ystride, int inner_iters, int alpha, int beta, int8_t *tc0)\n{",
"pixel *pix = (pixel*)p_pix;",
"int VAR_1, VAR_2;",
"xstride >>= sizeof(pixel)-1;",
"ystride >>= sizeof(pixel)-1;",
"alpha <<= BIT_DEPTH - 8;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
... |
5,074 | static int nbd_errno_to_system_errno(int err)
{
switch (err) {
case NBD_SUCCESS:
return 0;
case NBD_EPERM:
return EPERM;
case NBD_EIO:
return EIO;
case NBD_ENOMEM:
return ENOMEM;
case NBD_ENOSPC:
return ENOSPC;
case NBD_EINVAL:
defaul... | true | qemu | f3c32fce3688fe1f13ceb0777faa1fc19d66d1fc | static int nbd_errno_to_system_errno(int err)
{
switch (err) {
case NBD_SUCCESS:
return 0;
case NBD_EPERM:
return EPERM;
case NBD_EIO:
return EIO;
case NBD_ENOMEM:
return ENOMEM;
case NBD_ENOSPC:
return ENOSPC;
case NBD_EINVAL:
defaul... | {
"code": [
" case NBD_EINVAL:"
],
"line_no": [
27
]
} | static int FUNC_0(int VAR_0)
{
switch (VAR_0) {
case NBD_SUCCESS:
return 0;
case NBD_EPERM:
return EPERM;
case NBD_EIO:
return EIO;
case NBD_ENOMEM:
return ENOMEM;
case NBD_ENOSPC:
return ENOSPC;
case NBD_EINVAL:
default:
ret... | [
"static int FUNC_0(int VAR_0)\n{",
"switch (VAR_0) {",
"case NBD_SUCCESS:\nreturn 0;",
"case NBD_EPERM:\nreturn EPERM;",
"case NBD_EIO:\nreturn EIO;",
"case NBD_ENOMEM:\nreturn ENOMEM;",
"case NBD_ENOSPC:\nreturn ENOSPC;",
"case NBD_EINVAL:\ndefault:\nreturn EINVAL;",
"}",
"}"
] | [
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
],
[
33
],
[
35
]
] |
5,075 | pcie_cap_v1_fill(uint8_t *exp_cap, uint8_t port, uint8_t type, uint8_t version)
{
/* capability register
interrupt message number defaults to 0 */
pci_set_word(exp_cap + PCI_EXP_FLAGS,
((type << PCI_EXP_FLAGS_TYPE_SHIFT) & PCI_EXP_FLAGS_TYPE) |
version);
/* dev... | true | qemu | 6b4495401bdf442457b713b7e3994b465c55af35 | pcie_cap_v1_fill(uint8_t *exp_cap, uint8_t port, uint8_t type, uint8_t version)
{
pci_set_word(exp_cap + PCI_EXP_FLAGS,
((type << PCI_EXP_FLAGS_TYPE_SHIFT) & PCI_EXP_FLAGS_TYPE) |
version);
pci_set_long(exp_cap + PCI_EXP_DEVCAP, PCI_EXP_DEVCAP_R... | {
"code": [
"pcie_cap_v1_fill(uint8_t *exp_cap, uint8_t port, uint8_t type, uint8_t version)",
" PCI_EXP_LNK_MLW_1 | PCI_EXP_LNK_LS_25 |PCI_EXP_LNKSTA_DLLLA);"
],
"line_no": [
1,
49
]
} | FUNC_0(uint8_t *VAR_0, uint8_t VAR_1, uint8_t VAR_2, uint8_t VAR_3)
{
pci_set_word(VAR_0 + PCI_EXP_FLAGS,
((VAR_2 << PCI_EXP_FLAGS_TYPE_SHIFT) & PCI_EXP_FLAGS_TYPE) |
VAR_3);
pci_set_long(VAR_0 + PCI_EXP_DEVCAP, PCI_EXP_DEVCAP_RBER);
pci_... | [
"FUNC_0(uint8_t *VAR_0, uint8_t VAR_1, uint8_t VAR_2, uint8_t VAR_3)\n{",
"pci_set_word(VAR_0 + PCI_EXP_FLAGS,\n((VAR_2 << PCI_EXP_FLAGS_TYPE_SHIFT) & PCI_EXP_FLAGS_TYPE) |\nVAR_3);",
"pci_set_long(VAR_0 + PCI_EXP_DEVCAP, PCI_EXP_DEVCAP_RBER);",
"pci_set_long(VAR_0 + PCI_EXP_LNKCAP,\n(VAR_1 << PCI_EXP_LNKCAP_... | [
1,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
9,
11,
13
],
[
31
],
[
35,
37,
39,
41,
43
],
[
47,
49
],
[
51
]
] |
5,076 | static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)
{
AVFilterContext *ctx = inlink->dst;
TInterlaceContext *tinterlace = ctx->priv;
avfilter_unref_buffer(tinterlace->cur);
tinterlace->cur = tinterlace->next;
tinterlace->next = picref;
return 0;
} | true | FFmpeg | fd5293d216316752fd34dcb29051e748f076e5fb | static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)
{
AVFilterContext *ctx = inlink->dst;
TInterlaceContext *tinterlace = ctx->priv;
avfilter_unref_buffer(tinterlace->cur);
tinterlace->cur = tinterlace->next;
tinterlace->next = picref;
return 0;
} | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFilterLink *VAR_0, AVFilterBufferRef *VAR_1)
{
AVFilterContext *ctx = VAR_0->dst;
TInterlaceContext *tinterlace = ctx->priv;
avfilter_unref_buffer(tinterlace->cur);
tinterlace->cur = tinterlace->next;
tinterlace->next = VAR_1;
return 0;
} | [
"static int FUNC_0(AVFilterLink *VAR_0, AVFilterBufferRef *VAR_1)\n{",
"AVFilterContext *ctx = VAR_0->dst;",
"TInterlaceContext *tinterlace = ctx->priv;",
"avfilter_unref_buffer(tinterlace->cur);",
"tinterlace->cur = tinterlace->next;",
"tinterlace->next = VAR_1;",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
18
],
[
20
]
] |
5,077 | static void write_odml_master(AVFormatContext *s, int stream_index)
{
AVIOContext *pb = s->pb;
AVStream *st = s->streams[stream_index];
AVCodecContext *enc = st->codec;
AVIStream *avist = st->priv_data;
unsigned char tag[5];
int j;
/* Starting to lay out AVI OpenDML master index.
... | false | FFmpeg | bbcc09518e0d1efc189a43ff0120c1a31f51c802 | static void write_odml_master(AVFormatContext *s, int stream_index)
{
AVIOContext *pb = s->pb;
AVStream *st = s->streams[stream_index];
AVCodecContext *enc = st->codec;
AVIStream *avist = st->priv_data;
unsigned char tag[5];
int j;
avist->indexes.entry = avist->ind... | {
"code": [],
"line_no": []
} | static void FUNC_0(AVFormatContext *VAR_0, int VAR_1)
{
AVIOContext *pb = VAR_0->pb;
AVStream *st = VAR_0->streams[VAR_1];
AVCodecContext *enc = st->codec;
AVIStream *avist = st->priv_data;
unsigned char VAR_2[5];
int VAR_3;
avist->indexes.entry = avist->indexes.en... | [
"static void FUNC_0(AVFormatContext *VAR_0, int VAR_1)\n{",
"AVIOContext *pb = VAR_0->pb;",
"AVStream *st = VAR_0->streams[VAR_1];",
"AVCodecContext *enc = st->codec;",
"AVIStream *avist = st->priv_data;",
"unsigned char VAR_2[5];",
"int VAR_3;",
"avist->indexes.entry = avist->indexes.ents_alloca... | [
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
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
... |
5,078 | static void cook_imlt(COOKContext *q, float* inbuffer, float* outbuffer)
{
int i;
q->mdct_ctx.fft.imdct_calc(&q->mdct_ctx, outbuffer, inbuffer, q->mdct_tmp);
for(i = 0; i < q->samples_per_channel; i++){
float tmp = outbuffer[i];
outbuffer[i] = q->mlt_window[i] * outbuffer[q->samp... | false | FFmpeg | 85e7386ae0d33ede4c575d4df4c1faae6c906338 | static void cook_imlt(COOKContext *q, float* inbuffer, float* outbuffer)
{
int i;
q->mdct_ctx.fft.imdct_calc(&q->mdct_ctx, outbuffer, inbuffer, q->mdct_tmp);
for(i = 0; i < q->samples_per_channel; i++){
float tmp = outbuffer[i];
outbuffer[i] = q->mlt_window[i] * outbuffer[q->samp... | {
"code": [],
"line_no": []
} | static void FUNC_0(COOKContext *VAR_0, float* VAR_1, float* VAR_2)
{
int VAR_3;
VAR_0->mdct_ctx.fft.imdct_calc(&VAR_0->mdct_ctx, VAR_2, VAR_1, VAR_0->mdct_tmp);
for(VAR_3 = 0; VAR_3 < VAR_0->samples_per_channel; VAR_3++){
float tmp = VAR_2[VAR_3];
VAR_2[VAR_3] = VAR_0->mlt_window... | [
"static void FUNC_0(COOKContext *VAR_0, float* VAR_1, float* VAR_2)\n{",
"int VAR_3;",
"VAR_0->mdct_ctx.fft.imdct_calc(&VAR_0->mdct_ctx, VAR_2, VAR_1, VAR_0->mdct_tmp);",
"for(VAR_3 = 0; VAR_3 < VAR_0->samples_per_channel; VAR_3++){",
"float tmp = VAR_2[VAR_3];",
"VAR_2[VAR_3] = VAR_0->mlt_window[VAR_3] *... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
5,079 | static int mp3_write_trailer(struct AVFormatContext *s)
{
uint8_t buf[ID3v1_TAG_SIZE];
MP3Context *mp3 = s->priv_data;
/* write the id3v1 tag */
if (id3v1_create_tag(s, buf) > 0) {
avio_write(s->pb, buf, ID3v1_TAG_SIZE);
}
/* write number of frames */
if (mp3 && mp3->nb_... | false | FFmpeg | f1f298cd32b18bb910ff045df327ccb139628db7 | static int mp3_write_trailer(struct AVFormatContext *s)
{
uint8_t buf[ID3v1_TAG_SIZE];
MP3Context *mp3 = s->priv_data;
if (id3v1_create_tag(s, buf) > 0) {
avio_write(s->pb, buf, ID3v1_TAG_SIZE);
}
if (mp3 && mp3->nb_frames_offset) {
avio_seek(s->pb, mp3->nb_fr... | {
"code": [],
"line_no": []
} | static int FUNC_0(struct AVFormatContext *VAR_0)
{
uint8_t buf[ID3v1_TAG_SIZE];
MP3Context *mp3 = VAR_0->priv_data;
if (id3v1_create_tag(VAR_0, buf) > 0) {
avio_write(VAR_0->pb, buf, ID3v1_TAG_SIZE);
}
if (mp3 && mp3->nb_frames_offset) {
avio_seek(VAR_0->pb, m... | [
"static int FUNC_0(struct AVFormatContext *VAR_0)\n{",
"uint8_t buf[ID3v1_TAG_SIZE];",
"MP3Context *mp3 = VAR_0->priv_data;",
"if (id3v1_create_tag(VAR_0, buf) > 0) {",
"avio_write(VAR_0->pb, buf, ID3v1_TAG_SIZE);",
"}",
"if (mp3 && mp3->nb_frames_offset) {",
"avio_seek(VAR_0->pb, mp3->nb_frames_offse... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
15
],
[
17
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
39
],
[
41
]
] |
5,080 | int64_t qemu_get_clock(QEMUClock *clock)
{
switch(clock->type) {
case QEMU_TIMER_REALTIME:
return get_clock() / 1000000;
default:
case QEMU_TIMER_VIRTUAL:
if (use_icount) {
return cpu_get_icount();
} else {
return cpu_get_clock();
}
... | false | qemu | 0fdddf80a88ac2efe068990d1878f472bb6b95d9 | int64_t qemu_get_clock(QEMUClock *clock)
{
switch(clock->type) {
case QEMU_TIMER_REALTIME:
return get_clock() / 1000000;
default:
case QEMU_TIMER_VIRTUAL:
if (use_icount) {
return cpu_get_icount();
} else {
return cpu_get_clock();
}
... | {
"code": [],
"line_no": []
} | int64_t FUNC_0(QEMUClock *clock)
{
switch(clock->type) {
case QEMU_TIMER_REALTIME:
return get_clock() / 1000000;
default:
case QEMU_TIMER_VIRTUAL:
if (use_icount) {
return cpu_get_icount();
} else {
return cpu_get_clock();
}
}
}
| [
"int64_t FUNC_0(QEMUClock *clock)\n{",
"switch(clock->type) {",
"case QEMU_TIMER_REALTIME:\nreturn get_clock() / 1000000;",
"default:\ncase QEMU_TIMER_VIRTUAL:\nif (use_icount) {",
"return cpu_get_icount();",
"} else {",
"return cpu_get_clock();",
"}",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11,
13,
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
]
] |
5,082 | static int usb_qdev_exit(DeviceState *qdev)
{
USBDevice *dev = USB_DEVICE(qdev);
if (dev->attached) {
usb_device_detach(dev);
}
usb_device_handle_destroy(dev);
if (dev->port) {
usb_release_port(dev);
}
return 0;
}
| false | qemu | 7d553f27fce284805d7f94603932045ee3bbb979 | static int usb_qdev_exit(DeviceState *qdev)
{
USBDevice *dev = USB_DEVICE(qdev);
if (dev->attached) {
usb_device_detach(dev);
}
usb_device_handle_destroy(dev);
if (dev->port) {
usb_release_port(dev);
}
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(DeviceState *VAR_0)
{
USBDevice *dev = USB_DEVICE(VAR_0);
if (dev->attached) {
usb_device_detach(dev);
}
usb_device_handle_destroy(dev);
if (dev->port) {
usb_release_port(dev);
}
return 0;
}
| [
"static int FUNC_0(DeviceState *VAR_0)\n{",
"USBDevice *dev = USB_DEVICE(VAR_0);",
"if (dev->attached) {",
"usb_device_detach(dev);",
"}",
"usb_device_handle_destroy(dev);",
"if (dev->port) {",
"usb_release_port(dev);",
"}",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
5,083 | void scsi_req_build_sense(SCSIRequest *req, SCSISense sense)
{
trace_scsi_req_build_sense(req->dev->id, req->lun, req->tag,
sense.key, sense.asc, sense.ascq);
memset(req->sense, 0, 18);
req->sense[0] = 0xf0;
req->sense[2] = sense.key;
req->sense[7] = 10;
re... | false | qemu | 77e4743c94d2a926623e280913e05ad6c840791e | void scsi_req_build_sense(SCSIRequest *req, SCSISense sense)
{
trace_scsi_req_build_sense(req->dev->id, req->lun, req->tag,
sense.key, sense.asc, sense.ascq);
memset(req->sense, 0, 18);
req->sense[0] = 0xf0;
req->sense[2] = sense.key;
req->sense[7] = 10;
re... | {
"code": [],
"line_no": []
} | void FUNC_0(SCSIRequest *VAR_0, SCSISense VAR_1)
{
trace_scsi_req_build_sense(VAR_0->dev->id, VAR_0->lun, VAR_0->tag,
VAR_1.key, VAR_1.asc, VAR_1.ascq);
memset(VAR_0->VAR_1, 0, 18);
VAR_0->VAR_1[0] = 0xf0;
VAR_0->VAR_1[2] = VAR_1.key;
VAR_0->VAR_1[7] = 10;
... | [
"void FUNC_0(SCSIRequest *VAR_0, SCSISense VAR_1)\n{",
"trace_scsi_req_build_sense(VAR_0->dev->id, VAR_0->lun, VAR_0->tag,\nVAR_1.key, VAR_1.asc, VAR_1.ascq);",
"memset(VAR_0->VAR_1, 0, 18);",
"VAR_0->VAR_1[0] = 0xf0;",
"VAR_0->VAR_1[2] = VAR_1.key;",
"VAR_0->VAR_1[7] = 10;",
"VAR_0->VAR_1[12] = VAR_1.a... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
]
] |
5,084 | 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;
int re... | false | FFmpeg | 14c8ee00ffd9d45e6e0c6f11a957ce7e56f7eb3a | 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;
int re... | {
"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;
Vp3DecodeContext *s = VAR_0->priv_data;
GetBitContext gb;
int VAR_6;
int 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;",
"int VAR_7;",
"init_get_bits(&gb, VAR_4, VAR_5 * 8);",
"#if CON... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27,
29,
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
... |
5,086 | void memory_region_reset_dirty(MemoryRegion *mr, hwaddr addr,
hwaddr size, unsigned client)
{
assert(mr->terminates);
cpu_physical_memory_test_and_clear_dirty(mr->ram_addr + addr, size,
client);
}
| false | qemu | ec05ec26f940564b1e07bf88857035ec27e21dd8 | void memory_region_reset_dirty(MemoryRegion *mr, hwaddr addr,
hwaddr size, unsigned client)
{
assert(mr->terminates);
cpu_physical_memory_test_and_clear_dirty(mr->ram_addr + addr, size,
client);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(MemoryRegion *VAR_0, hwaddr VAR_1,
hwaddr VAR_2, unsigned VAR_3)
{
assert(VAR_0->terminates);
cpu_physical_memory_test_and_clear_dirty(VAR_0->ram_addr + VAR_1, VAR_2,
VAR_3);
}
| [
"void FUNC_0(MemoryRegion *VAR_0, hwaddr VAR_1,\nhwaddr VAR_2, unsigned VAR_3)\n{",
"assert(VAR_0->terminates);",
"cpu_physical_memory_test_and_clear_dirty(VAR_0->ram_addr + VAR_1, VAR_2,\nVAR_3);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9,
11
],
[
13
]
] |
5,088 | void qemu_ram_free_from_ptr(ram_addr_t addr)
{
RAMBlock *block;
/* This assumes the iothread lock is taken here too. */
qemu_mutex_lock_ramlist();
QTAILQ_FOREACH(block, &ram_list.blocks, next) {
if (addr == block->offset) {
QTAILQ_REMOVE(&ram_list.blocks, block, next);
... | false | qemu | 43771539d4666cba16298fc6b0ea63867425277c | void qemu_ram_free_from_ptr(ram_addr_t addr)
{
RAMBlock *block;
qemu_mutex_lock_ramlist();
QTAILQ_FOREACH(block, &ram_list.blocks, next) {
if (addr == block->offset) {
QTAILQ_REMOVE(&ram_list.blocks, block, next);
ram_list.mru_block = NULL;
ram_lis... | {
"code": [],
"line_no": []
} | void FUNC_0(ram_addr_t VAR_0)
{
RAMBlock *block;
qemu_mutex_lock_ramlist();
QTAILQ_FOREACH(block, &ram_list.blocks, next) {
if (VAR_0 == block->offset) {
QTAILQ_REMOVE(&ram_list.blocks, block, next);
ram_list.mru_block = NULL;
ram_list.version++;
... | [
"void FUNC_0(ram_addr_t VAR_0)\n{",
"RAMBlock *block;",
"qemu_mutex_lock_ramlist();",
"QTAILQ_FOREACH(block, &ram_list.blocks, next) {",
"if (VAR_0 == block->offset) {",
"QTAILQ_REMOVE(&ram_list.blocks, block, next);",
"ram_list.mru_block = NULL;",
"ram_list.version++;",
"g_free(block);",
"break;"... | [
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
],
[
33
]
] |
5,089 | void bdrv_io_limits_enable(BlockDriverState *bs)
{
qemu_co_queue_init(&bs->throttled_reqs);
bs->block_timer = qemu_new_timer_ns(vm_clock, bdrv_block_timer, bs);
bs->io_limits_enabled = true;
}
| false | qemu | 88266f5aa70fa71fd5cc20aa4dbeb7a7bd8d2e92 | void bdrv_io_limits_enable(BlockDriverState *bs)
{
qemu_co_queue_init(&bs->throttled_reqs);
bs->block_timer = qemu_new_timer_ns(vm_clock, bdrv_block_timer, bs);
bs->io_limits_enabled = true;
}
| {
"code": [],
"line_no": []
} | void FUNC_0(BlockDriverState *VAR_0)
{
qemu_co_queue_init(&VAR_0->throttled_reqs);
VAR_0->block_timer = qemu_new_timer_ns(vm_clock, bdrv_block_timer, VAR_0);
VAR_0->io_limits_enabled = true;
}
| [
"void FUNC_0(BlockDriverState *VAR_0)\n{",
"qemu_co_queue_init(&VAR_0->throttled_reqs);",
"VAR_0->block_timer = qemu_new_timer_ns(vm_clock, bdrv_block_timer, VAR_0);",
"VAR_0->io_limits_enabled = true;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
5,090 | static void cadence_ttc_write(void *opaque, target_phys_addr_t offset,
uint64_t value, unsigned size)
{
CadenceTimerState *s = cadence_timer_from_addr(opaque, offset);
DB_PRINT("addr: %08x data %08x\n", offset, (unsigned)value);
cadence_timer_sync(s);
switch (offset) {
case 0x00... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void cadence_ttc_write(void *opaque, target_phys_addr_t offset,
uint64_t value, unsigned size)
{
CadenceTimerState *s = cadence_timer_from_addr(opaque, offset);
DB_PRINT("addr: %08x data %08x\n", offset, (unsigned)value);
cadence_timer_sync(s);
switch (offset) {
case 0x00... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
CadenceTimerState *s = cadence_timer_from_addr(VAR_0, VAR_1);
DB_PRINT("addr: %08x data %08x\n", VAR_1, (unsigned)VAR_2);
cadence_timer_sync(s);
switch (VAR_1) {
case 0x00:
case 0x0... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"CadenceTimerState *s = cadence_timer_from_addr(VAR_0, VAR_1);",
"DB_PRINT(\"addr: %08x data %08x\\n\", VAR_1, (unsigned)VAR_2);",
"cadence_timer_sync(s);",
"switch (VAR_1) {",
"case 0x00:\ncase 0x04:\ncase 0x... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
15
],
[
19
],
[
21,
23,
25,
27
],
[
29
],
[
33,
35,
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51,
53,
55,
57
],
[
59
],
[
63... |
5,092 | static void virtio_scsi_hotplug(HotplugHandler *hotplug_dev, DeviceState *dev,
Error **errp)
{
VirtIODevice *vdev = VIRTIO_DEVICE(hotplug_dev);
VirtIOSCSI *s = VIRTIO_SCSI(vdev);
SCSIDevice *sd = SCSI_DEVICE(dev);
if (s->ctx && !s->dataplane_disabled) {
i... | false | qemu | ef546f1275f6563e8934dd5e338d29d9f9909ca6 | static void virtio_scsi_hotplug(HotplugHandler *hotplug_dev, DeviceState *dev,
Error **errp)
{
VirtIODevice *vdev = VIRTIO_DEVICE(hotplug_dev);
VirtIOSCSI *s = VIRTIO_SCSI(vdev);
SCSIDevice *sd = SCSI_DEVICE(dev);
if (s->ctx && !s->dataplane_disabled) {
i... | {
"code": [],
"line_no": []
} | static void FUNC_0(HotplugHandler *VAR_0, DeviceState *VAR_1,
Error **VAR_2)
{
VirtIODevice *vdev = VIRTIO_DEVICE(VAR_0);
VirtIOSCSI *s = VIRTIO_SCSI(vdev);
SCSIDevice *sd = SCSI_DEVICE(VAR_1);
if (s->ctx && !s->dataplane_disabled) {
if (blk_op_is_blocked... | [
"static void FUNC_0(HotplugHandler *VAR_0, DeviceState *VAR_1,\nError **VAR_2)\n{",
"VirtIODevice *vdev = VIRTIO_DEVICE(VAR_0);",
"VirtIOSCSI *s = VIRTIO_SCSI(vdev);",
"SCSIDevice *sd = SCSI_DEVICE(VAR_1);",
"if (s->ctx && !s->dataplane_disabled) {",
"if (blk_op_is_blocked(sd->conf.blk, BLOCK_OP_TYPE_DATA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31,
33,
35
],
[
37
],
[
39
]
] |
5,094 | static int write_elf64_load(DumpState *s, MemoryMapping *memory_mapping,
int phdr_index, target_phys_addr_t offset)
{
Elf64_Phdr phdr;
int ret;
int endian = s->dump_info.d_endian;
memset(&phdr, 0, sizeof(Elf64_Phdr));
phdr.p_type = cpu_convert_to_target32(PT_LOAD... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static int write_elf64_load(DumpState *s, MemoryMapping *memory_mapping,
int phdr_index, target_phys_addr_t offset)
{
Elf64_Phdr phdr;
int ret;
int endian = s->dump_info.d_endian;
memset(&phdr, 0, sizeof(Elf64_Phdr));
phdr.p_type = cpu_convert_to_target32(PT_LOAD... | {
"code": [],
"line_no": []
} | static int FUNC_0(DumpState *VAR_0, MemoryMapping *VAR_1,
int VAR_2, target_phys_addr_t VAR_3)
{
Elf64_Phdr phdr;
int VAR_4;
int VAR_5 = VAR_0->dump_info.d_endian;
memset(&phdr, 0, sizeof(Elf64_Phdr));
phdr.p_type = cpu_convert_to_target32(PT_LOAD, VAR_5);
p... | [
"static int FUNC_0(DumpState *VAR_0, MemoryMapping *VAR_1,\nint VAR_2, target_phys_addr_t VAR_3)\n{",
"Elf64_Phdr phdr;",
"int VAR_4;",
"int VAR_5 = VAR_0->dump_info.d_endian;",
"memset(&phdr, 0, sizeof(Elf64_Phdr));",
"phdr.p_type = cpu_convert_to_target32(PT_LOAD, VAR_5);",
"phdr.p_offset = cpu_conver... | [
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
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
5,095 | static void SET_TYPE(resample_one)(ResampleContext *c,
void *dst0, int dst_index, const void *src0,
int src_size, int index, int frac)
{
FELEM *dst = dst0;
const FELEM *src = src0;
int i;
int sample_index = index >> c->phase_sh... | false | FFmpeg | eed752d61da332fb13e9893a175a90fed7b1d7d3 | static void SET_TYPE(resample_one)(ResampleContext *c,
void *dst0, int dst_index, const void *src0,
int src_size, int index, int frac)
{
FELEM *dst = dst0;
const FELEM *src = src0;
int i;
int sample_index = index >> c->phase_sh... | {
"code": [],
"line_no": []
} | static void FUNC_0(resample_one)(ResampleContext *c,
void *dst0, int dst_index, const void *src0,
int src_size, int index, int frac)
{
FELEM *dst = dst0;
const FELEM *VAR_0 = src0;
int VAR_1;
int VAR_2 = index >> c->phase_shift... | [
"static void FUNC_0(resample_one)(ResampleContext *c,\nvoid *dst0, int dst_index, const void *src0,\nint src_size, int index, int frac)\n{",
"FELEM *dst = dst0;",
"const FELEM *VAR_0 = src0;",
"int VAR_1;",
"int VAR_2 = index >> c->phase_shift;",
"FELEM2 val = 0;",
"FELEM *filter = ((FELEM *)c->filter_b... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19,
21
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
5,096 | static void v9fs_xattrcreate(void *opaque)
{
int flags;
int32_t fid;
int64_t size;
ssize_t err = 0;
V9fsString name;
size_t offset = 7;
V9fsFidState *file_fidp;
V9fsFidState *xattr_fidp;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
pdu_unmarshal(pdu, offset, "d... | false | qemu | ddca7f86ac022289840e0200fd4050b2b58e9176 | static void v9fs_xattrcreate(void *opaque)
{
int flags;
int32_t fid;
int64_t size;
ssize_t err = 0;
V9fsString name;
size_t offset = 7;
V9fsFidState *file_fidp;
V9fsFidState *xattr_fidp;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
pdu_unmarshal(pdu, offset, "d... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0)
{
int VAR_1;
int32_t fid;
int64_t size;
ssize_t err = 0;
V9fsString name;
size_t offset = 7;
V9fsFidState *file_fidp;
V9fsFidState *xattr_fidp;
V9fsPDU *pdu = VAR_0;
V9fsState *s = pdu->s;
pdu_unmarshal(pdu, offset, "dsqd",
... | [
"static void FUNC_0(void *VAR_0)\n{",
"int VAR_1;",
"int32_t fid;",
"int64_t size;",
"ssize_t err = 0;",
"V9fsString name;",
"size_t offset = 7;",
"V9fsFidState *file_fidp;",
"V9fsFidState *xattr_fidp;",
"V9fsPDU *pdu = VAR_0;",
"V9fsState *s = pdu->s;",
"pdu_unmarshal(pdu, offset, \"dsqd\",\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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[... |
5,097 | uint64_t bdrv_dirty_bitmap_serialization_size(const BdrvDirtyBitmap *bitmap,
uint64_t start, uint64_t count)
{
return hbitmap_serialization_size(bitmap->bitmap, start, count);
}
| false | qemu | 86f6ae67e157362f3b141649874213ce01dcc622 | uint64_t bdrv_dirty_bitmap_serialization_size(const BdrvDirtyBitmap *bitmap,
uint64_t start, uint64_t count)
{
return hbitmap_serialization_size(bitmap->bitmap, start, count);
}
| {
"code": [],
"line_no": []
} | uint64_t FUNC_0(const BdrvDirtyBitmap *bitmap,
uint64_t start, uint64_t count)
{
return hbitmap_serialization_size(bitmap->bitmap, start, count);
}
| [
"uint64_t FUNC_0(const BdrvDirtyBitmap *bitmap,\nuint64_t start, uint64_t count)\n{",
"return hbitmap_serialization_size(bitmap->bitmap, start, count);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
]
] |
5,100 | static coroutine_fn int sd_co_discard(BlockDriverState *bs, int64_t sector_num,
int nb_sectors)
{
SheepdogAIOCB *acb;
QEMUIOVector dummy;
BDRVSheepdogState *s = bs->opaque;
int ret;
if (!s->discard_supported) {
return 0;
}
acb =... | false | qemu | 498f21405a286f718a0767c791b7d2db19f4e5bd | static coroutine_fn int sd_co_discard(BlockDriverState *bs, int64_t sector_num,
int nb_sectors)
{
SheepdogAIOCB *acb;
QEMUIOVector dummy;
BDRVSheepdogState *s = bs->opaque;
int ret;
if (!s->discard_supported) {
return 0;
}
acb =... | {
"code": [],
"line_no": []
} | static coroutine_fn int FUNC_0(BlockDriverState *bs, int64_t sector_num,
int nb_sectors)
{
SheepdogAIOCB *acb;
QEMUIOVector dummy;
BDRVSheepdogState *s = bs->opaque;
int VAR_0;
if (!s->discard_supported) {
return 0;
}
acb = sd_a... | [
"static coroutine_fn int FUNC_0(BlockDriverState *bs, int64_t sector_num,\nint nb_sectors)\n{",
"SheepdogAIOCB *acb;",
"QEMUIOVector dummy;",
"BDRVSheepdogState *s = bs->opaque;",
"int VAR_0;",
"if (!s->discard_supported) {",
"return 0;",
"}",
"acb = sd_aio_setup(bs, &dummy, sector_num, nb_sectors);... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
... |
5,103 | static void coroutine_fn qed_need_check_timer_entry(void *opaque)
{
BDRVQEDState *s = opaque;
int ret;
/* The timer should only fire when allocating writes have drained */
assert(!s->allocating_acb);
trace_qed_need_check_timer_cb(s);
qed_acquire(s);
qed_plug_allocating_write_re... | false | qemu | 1f01e50b8330c24714ddca5841fdbb703076b121 | static void coroutine_fn qed_need_check_timer_entry(void *opaque)
{
BDRVQEDState *s = opaque;
int ret;
assert(!s->allocating_acb);
trace_qed_need_check_timer_cb(s);
qed_acquire(s);
qed_plug_allocating_write_reqs(s);
ret = bdrv_co_flush(s->bs->file->bs);
qed_r... | {
"code": [],
"line_no": []
} | static void VAR_0 qed_need_check_timer_entry(void *opaque)
{
BDRVQEDState *s = opaque;
int ret;
assert(!s->allocating_acb);
trace_qed_need_check_timer_cb(s);
qed_acquire(s);
qed_plug_allocating_write_reqs(s);
ret = bdrv_co_flush(s->bs->file->bs);
qed_release(... | [
"static void VAR_0 qed_need_check_timer_entry(void *opaque)\n{",
"BDRVQEDState *s = opaque;",
"int ret;",
"assert(!s->allocating_acb);",
"trace_qed_need_check_timer_cb(s);",
"qed_acquire(s);",
"qed_plug_allocating_write_reqs(s);",
"ret = bdrv_co_flush(s->bs->file->bs);",
"qed_release(s);",
"if (re... | [
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
],
[
17
],
[
21
],
[
23
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
51
],
[
55
],
[
57
],
[
59... |
5,105 | static void gen_op_update_neg_cc(void)
{
tcg_gen_neg_tl(cpu_cc_src, cpu_T[0]);
tcg_gen_mov_tl(cpu_cc_dst, cpu_T[0]);
}
| false | qemu | a3251186fc6a04d421e9c4b65aa04ec32379ec38 | static void gen_op_update_neg_cc(void)
{
tcg_gen_neg_tl(cpu_cc_src, cpu_T[0]);
tcg_gen_mov_tl(cpu_cc_dst, cpu_T[0]);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
tcg_gen_neg_tl(cpu_cc_src, cpu_T[0]);
tcg_gen_mov_tl(cpu_cc_dst, cpu_T[0]);
}
| [
"static void FUNC_0(void)\n{",
"tcg_gen_neg_tl(cpu_cc_src, cpu_T[0]);",
"tcg_gen_mov_tl(cpu_cc_dst, cpu_T[0]);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
5,106 | static int thp_probe(AVProbeData *p)
{
/* check file header */
if (p->buf_size < 4)
return 0;
if (AV_RL32(p->buf) == MKTAG('T', 'H', 'P', '\0'))
return AVPROBE_SCORE_MAX;
else
return 0;
}
| false | FFmpeg | 87e8788680e16c51f6048af26f3f7830c35207a5 | static int thp_probe(AVProbeData *p)
{
if (p->buf_size < 4)
return 0;
if (AV_RL32(p->buf) == MKTAG('T', 'H', 'P', '\0'))
return AVPROBE_SCORE_MAX;
else
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(AVProbeData *VAR_0)
{
if (VAR_0->buf_size < 4)
return 0;
if (AV_RL32(VAR_0->buf) == MKTAG('T', 'H', 'P', '\0'))
return AVPROBE_SCORE_MAX;
else
return 0;
}
| [
"static int FUNC_0(AVProbeData *VAR_0)\n{",
"if (VAR_0->buf_size < 4)\nreturn 0;",
"if (AV_RL32(VAR_0->buf) == MKTAG('T', 'H', 'P', '\\0'))\nreturn AVPROBE_SCORE_MAX;",
"else\nreturn 0;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7,
9
],
[
13,
15
],
[
17,
19
],
[
21
]
] |
5,107 | static int coroutine_fn bdrv_aligned_preadv(BlockDriverState *bs,
BdrvTrackedRequest *req, int64_t offset, unsigned int bytes,
int64_t align, QEMUIOVector *qiov, int flags)
{
int64_t total_bytes, max_bytes;
int ret = 0;
uint64_t bytes_remaining = bytes;
int max_transfer;
assert(is_... | false | qemu | 85c97ca7a10b93216bc95052e9dabe3a4bb8736a | static int coroutine_fn bdrv_aligned_preadv(BlockDriverState *bs,
BdrvTrackedRequest *req, int64_t offset, unsigned int bytes,
int64_t align, QEMUIOVector *qiov, int flags)
{
int64_t total_bytes, max_bytes;
int ret = 0;
uint64_t bytes_remaining = bytes;
int max_transfer;
assert(is_... | {
"code": [],
"line_no": []
} | static int VAR_0 bdrv_aligned_preadv(BlockDriverState *bs,
BdrvTrackedRequest *req, int64_t offset, unsigned int bytes,
int64_t align, QEMUIOVector *qiov, int flags)
{
int64_t total_bytes, max_bytes;
int ret = 0;
uint64_t bytes_remaining = bytes;
int max_transfer;
assert(is_power_o... | [
"static int VAR_0 bdrv_aligned_preadv(BlockDriverState *bs,\nBdrvTrackedRequest *req, int64_t offset, unsigned int bytes,\nint64_t align, QEMUIOVector *qiov, int flags)\n{",
"int64_t total_bytes, max_bytes;",
"int ret = 0;",
"uint64_t bytes_remaining = bytes;",
"int max_transfer;",
"assert(is_power_of_2(a... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
43
],
[
49
],
[
61
],
[
63
],
[
67
],
[
69
],
[
71
],
[... |
5,108 | Visitor *qmp_output_get_visitor(QmpOutputVisitor *v)
{
return &v->visitor;
}
| false | qemu | 3b098d56979d2f7fd707c5be85555d114353a28d | Visitor *qmp_output_get_visitor(QmpOutputVisitor *v)
{
return &v->visitor;
}
| {
"code": [],
"line_no": []
} | Visitor *FUNC_0(QmpOutputVisitor *v)
{
return &v->visitor;
}
| [
"Visitor *FUNC_0(QmpOutputVisitor *v)\n{",
"return &v->visitor;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
5,109 | bool aio_dispatch(AioContext *ctx, bool dispatch_fds)
{
bool progress;
progress = aio_bh_poll(ctx);
if (dispatch_fds) {
progress |= aio_dispatch_handlers(ctx, INVALID_HANDLE_VALUE);
}
progress |= timerlistgroup_run_timers(&ctx->tlg);
return progress;
}
| false | qemu | a153bf52b37e148f052b0869600877130671a03d | bool aio_dispatch(AioContext *ctx, bool dispatch_fds)
{
bool progress;
progress = aio_bh_poll(ctx);
if (dispatch_fds) {
progress |= aio_dispatch_handlers(ctx, INVALID_HANDLE_VALUE);
}
progress |= timerlistgroup_run_timers(&ctx->tlg);
return progress;
}
| {
"code": [],
"line_no": []
} | bool FUNC_0(AioContext *ctx, bool dispatch_fds)
{
bool progress;
progress = aio_bh_poll(ctx);
if (dispatch_fds) {
progress |= aio_dispatch_handlers(ctx, INVALID_HANDLE_VALUE);
}
progress |= timerlistgroup_run_timers(&ctx->tlg);
return progress;
}
| [
"bool FUNC_0(AioContext *ctx, bool dispatch_fds)\n{",
"bool progress;",
"progress = aio_bh_poll(ctx);",
"if (dispatch_fds) {",
"progress |= aio_dispatch_handlers(ctx, INVALID_HANDLE_VALUE);",
"}",
"progress |= timerlistgroup_run_timers(&ctx->tlg);",
"return progress;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
]
] |
5,110 | void helper_check_iob(CPUX86State *env, uint32_t t0)
{
check_io(env, t0, 1);
}
| false | qemu | 81cf8d8adc64203567e03326c13ea4abec9fe5df | void helper_check_iob(CPUX86State *env, uint32_t t0)
{
check_io(env, t0, 1);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(CPUX86State *VAR_0, uint32_t VAR_1)
{
check_io(VAR_0, VAR_1, 1);
}
| [
"void FUNC_0(CPUX86State *VAR_0, uint32_t VAR_1)\n{",
"check_io(VAR_0, VAR_1, 1);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
5,111 | static void slirp_state_save(QEMUFile *f, void *opaque)
{
Slirp *slirp = opaque;
struct ex_list *ex_ptr;
for (ex_ptr = slirp->exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next)
if (ex_ptr->ex_pty == 3) {
struct socket *so;
so = slirp_find_ctl_socket(slirp, ex_ptr->ex_addr,... | false | qemu | eb5d4f5329df83ea15244b47f7fbca21adaae41b | static void slirp_state_save(QEMUFile *f, void *opaque)
{
Slirp *slirp = opaque;
struct ex_list *ex_ptr;
for (ex_ptr = slirp->exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next)
if (ex_ptr->ex_pty == 3) {
struct socket *so;
so = slirp_find_ctl_socket(slirp, ex_ptr->ex_addr,... | {
"code": [],
"line_no": []
} | static void FUNC_0(QEMUFile *VAR_0, void *VAR_1)
{
Slirp *slirp = VAR_1;
struct ex_list *VAR_2;
for (VAR_2 = slirp->exec_list; VAR_2; VAR_2 = VAR_2->ex_next)
if (VAR_2->ex_pty == 3) {
struct socket *VAR_3;
VAR_3 = slirp_find_ctl_socket(slirp, VAR_2->ex_addr,
... | [
"static void FUNC_0(QEMUFile *VAR_0, void *VAR_1)\n{",
"Slirp *slirp = VAR_1;",
"struct ex_list *VAR_2;",
"for (VAR_2 = slirp->exec_list; VAR_2; VAR_2 = VAR_2->ex_next)",
"if (VAR_2->ex_pty == 3) {",
"struct socket *VAR_3;",
"VAR_3 = slirp_find_ctl_socket(slirp, VAR_2->ex_addr,\nntohs(VAR_2->ex_fport));... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17,
19
],
[
21,
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
41
],
[
43
]
] |
5,112 | static inline void tlb_update_dirty(CPUTLBEntry *tlb_entry)
{
ram_addr_t ram_addr;
void *p;
if ((tlb_entry->addr_write & ~TARGET_PAGE_MASK) == io_mem_ram.ram_addr) {
p = (void *)(unsigned long)((tlb_entry->addr_write & TARGET_PAGE_MASK)
+ tlb_entry->addend);
ram_addr = q... | false | qemu | 7859cc6e39bf86f890bb1c72fd9ba41deb6ce2e7 | static inline void tlb_update_dirty(CPUTLBEntry *tlb_entry)
{
ram_addr_t ram_addr;
void *p;
if ((tlb_entry->addr_write & ~TARGET_PAGE_MASK) == io_mem_ram.ram_addr) {
p = (void *)(unsigned long)((tlb_entry->addr_write & TARGET_PAGE_MASK)
+ tlb_entry->addend);
ram_addr = q... | {
"code": [],
"line_no": []
} | static inline void FUNC_0(CPUTLBEntry *VAR_0)
{
ram_addr_t ram_addr;
void *VAR_1;
if ((VAR_0->addr_write & ~TARGET_PAGE_MASK) == io_mem_ram.ram_addr) {
VAR_1 = (void *)(unsigned long)((VAR_0->addr_write & TARGET_PAGE_MASK)
+ VAR_0->addend);
ram_addr = qemu_ram_addr_from_... | [
"static inline void FUNC_0(CPUTLBEntry *VAR_0)\n{",
"ram_addr_t ram_addr;",
"void *VAR_1;",
"if ((VAR_0->addr_write & ~TARGET_PAGE_MASK) == io_mem_ram.ram_addr) {",
"VAR_1 = (void *)(unsigned long)((VAR_0->addr_write & TARGET_PAGE_MASK)\n+ VAR_0->addend);",
"ram_addr = qemu_ram_addr_from_host_nofail(VAR_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
]
] |
5,113 | static IOMMUTLBEntry spapr_tce_translate_iommu(MemoryRegion *iommu, hwaddr addr,
bool is_write)
{
sPAPRTCETable *tcet = container_of(iommu, sPAPRTCETable, iommu);
uint64_t tce;
IOMMUTLBEntry ret = {
.target_as = &address_space_memory,
.io... | false | qemu | bf55b7afce53718ef96f4e6616da62c0ccac37dd | static IOMMUTLBEntry spapr_tce_translate_iommu(MemoryRegion *iommu, hwaddr addr,
bool is_write)
{
sPAPRTCETable *tcet = container_of(iommu, sPAPRTCETable, iommu);
uint64_t tce;
IOMMUTLBEntry ret = {
.target_as = &address_space_memory,
.io... | {
"code": [],
"line_no": []
} | static IOMMUTLBEntry FUNC_0(MemoryRegion *iommu, hwaddr addr,
bool is_write)
{
sPAPRTCETable *tcet = container_of(iommu, sPAPRTCETable, iommu);
uint64_t tce;
IOMMUTLBEntry ret = {
.target_as = &address_space_memory,
.iova = 0,
.t... | [
"static IOMMUTLBEntry FUNC_0(MemoryRegion *iommu, hwaddr addr,\nbool is_write)\n{",
"sPAPRTCETable *tcet = container_of(iommu, sPAPRTCETable, iommu);",
"uint64_t tce;",
"IOMMUTLBEntry ret = {",
".target_as = &address_space_memory,\n.iova = 0,\n.translated_addr = 0,\n.addr_mask = ~(hwaddr)0,\n.perm = IOMMU_N... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13,
15,
17,
19,
21,
23
],
[
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47,
49
],
[
53
],
[
55
]
] |
5,114 | int rpcit_service_call(S390CPU *cpu, uint8_t r1, uint8_t r2)
{
CPUS390XState *env = &cpu->env;
uint32_t fh;
S390PCIBusDevice *pbdev;
S390PCIIOMMU *iommu;
hwaddr start, end;
IOMMUTLBEntry entry;
MemoryRegion *mr;
cpu_synchronize_state(CPU(cpu));
if (env->psw.mask & PSW_M... | false | qemu | bf55b7afce53718ef96f4e6616da62c0ccac37dd | int rpcit_service_call(S390CPU *cpu, uint8_t r1, uint8_t r2)
{
CPUS390XState *env = &cpu->env;
uint32_t fh;
S390PCIBusDevice *pbdev;
S390PCIIOMMU *iommu;
hwaddr start, end;
IOMMUTLBEntry entry;
MemoryRegion *mr;
cpu_synchronize_state(CPU(cpu));
if (env->psw.mask & PSW_M... | {
"code": [],
"line_no": []
} | int FUNC_0(S390CPU *VAR_0, uint8_t VAR_1, uint8_t VAR_2)
{
CPUS390XState *env = &VAR_0->env;
uint32_t fh;
S390PCIBusDevice *pbdev;
S390PCIIOMMU *iommu;
hwaddr start, end;
IOMMUTLBEntry entry;
MemoryRegion *mr;
cpu_synchronize_state(CPU(VAR_0));
if (env->psw.mask & PSW_M... | [
"int FUNC_0(S390CPU *VAR_0, uint8_t VAR_1, uint8_t VAR_2)\n{",
"CPUS390XState *env = &VAR_0->env;",
"uint32_t fh;",
"S390PCIBusDevice *pbdev;",
"S390PCIIOMMU *iommu;",
"hwaddr start, end;",
"IOMMUTLBEntry entry;",
"MemoryRegion *mr;",
"cpu_synchronize_state(CPU(VAR_0));",
"if (env->psw.mask & PSW_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
... |
5,115 | static int coroutine_fn qcow2_co_is_allocated(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int *pnum)
{
BDRVQcowState *s = bs->opaque;
uint64_t cluster_offset;
int ret;
*pnum = nb_sectors;
/* FIXME We can get errors here, but the bdrv_co_is_allocated interface
* c... | false | qemu | 381b487d54ba18c73df9db8452028a330058c505 | static int coroutine_fn qcow2_co_is_allocated(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int *pnum)
{
BDRVQcowState *s = bs->opaque;
uint64_t cluster_offset;
int ret;
*pnum = nb_sectors;
qemu_co_mutex_lock(&s->lock);
ret = qcow2_get_cluster_offset(bs, sec... | {
"code": [],
"line_no": []
} | static int VAR_0 qcow2_co_is_allocated(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int *pnum)
{
BDRVQcowState *s = bs->opaque;
uint64_t cluster_offset;
int ret;
*pnum = nb_sectors;
qemu_co_mutex_lock(&s->lock);
ret = qcow2_get_cluster_offset(bs, sector_num... | [
"static int VAR_0 qcow2_co_is_allocated(BlockDriverState *bs,\nint64_t sector_num, int nb_sectors, int *pnum)\n{",
"BDRVQcowState *s = bs->opaque;",
"uint64_t cluster_offset;",
"int ret;",
"*pnum = nb_sectors;",
"qemu_co_mutex_lock(&s->lock);",
"ret = qcow2_get_cluster_offset(bs, sector_num << 9, pnum, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
]
] |
5,117 | static int vmdk_write(BlockDriverState *bs, int64_t sector_num,
const uint8_t *buf, int nb_sectors)
{
BDRVVmdkState *s = bs->opaque;
int index_in_cluster, n;
uint64_t cluster_offset;
static int cid_update = 0;
while (nb_sectors > 0) {
index_in_cluster = sector... | true | qemu | 630530a6529bc3da9ab8aead7053dc753cb9ac77 | static int vmdk_write(BlockDriverState *bs, int64_t sector_num,
const uint8_t *buf, int nb_sectors)
{
BDRVVmdkState *s = bs->opaque;
int index_in_cluster, n;
uint64_t cluster_offset;
static int cid_update = 0;
while (nb_sectors > 0) {
index_in_cluster = sector... | {
"code": [
" return -1;",
" cluster_offset = get_cluster_offset(bs, sector_num << 9, 1);"
],
"line_no": [
31,
27
]
} | static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,
const uint8_t *VAR_2, int VAR_3)
{
BDRVVmdkState *s = VAR_0->opaque;
int VAR_4, VAR_5;
uint64_t cluster_offset;
static int VAR_6 = 0;
while (VAR_3 > 0) {
VAR_4 = VAR_1 & (s->cluster_sectors - 1);
... | [
"static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,\nconst uint8_t *VAR_2, int VAR_3)\n{",
"BDRVVmdkState *s = VAR_0->opaque;",
"int VAR_4, VAR_5;",
"uint64_t cluster_offset;",
"static int VAR_6 = 0;",
"while (VAR_3 > 0) {",
"VAR_4 = VAR_1 & (s->cluster_sectors - 1);",
"VAR_5 = s->cluster_secto... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
47
],
[
49
],
[
51
... |
5,118 | static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
{
PNGDecContext *psrc = src->priv_data;
PNGDecContext *pdst = dst->priv_data;
int ret;
if (dst == src)
return 0;
ff_thread_release_buffer(dst, &pdst->picture);
if (psrc->picture.f->data[0] &&
... | true | FFmpeg | 478f1c3d5e5463a284ea7efecfc62d47ba3be11a | static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
{
PNGDecContext *psrc = src->priv_data;
PNGDecContext *pdst = dst->priv_data;
int ret;
if (dst == src)
return 0;
ff_thread_release_buffer(dst, &pdst->picture);
if (psrc->picture.f->data[0] &&
... | {
"code": [
" pdst->state |= psrc->state & (PNG_IHDR | PNG_PLTE);"
],
"line_no": [
65
]
} | static int FUNC_0(AVCodecContext *VAR_0, const AVCodecContext *VAR_1)
{
PNGDecContext *psrc = VAR_1->priv_data;
PNGDecContext *pdst = VAR_0->priv_data;
int VAR_2;
if (VAR_0 == VAR_1)
return 0;
ff_thread_release_buffer(VAR_0, &pdst->picture);
if (psrc->picture.f->data[0] &&
... | [
"static int FUNC_0(AVCodecContext *VAR_0, const AVCodecContext *VAR_1)\n{",
"PNGDecContext *psrc = VAR_1->priv_data;",
"PNGDecContext *pdst = VAR_0->priv_data;",
"int VAR_2;",
"if (VAR_0 == VAR_1)\nreturn 0;",
"ff_thread_release_buffer(VAR_0, &pdst->picture);",
"if (psrc->picture.f->data[0] &&\n(VAR_2 =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
21,
23,
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[... |
5,119 | static int read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
{
AVStream *st = s->streams[stream_index];
avio_seek(s->pb, FFMAX(timestamp, 0) * st->codec->width * st->codec->height * 4, SEEK_SET);
return 0;
}
| true | FFmpeg | 64476d7ee86e01f43312dc5dff850d641d2b6c9a | static int read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
{
AVStream *st = s->streams[stream_index];
avio_seek(s->pb, FFMAX(timestamp, 0) * st->codec->width * st->codec->height * 4, SEEK_SET);
return 0;
}
| {
"code": [
" avio_seek(s->pb, FFMAX(timestamp, 0) * st->codec->width * st->codec->height * 4, SEEK_SET);"
],
"line_no": [
7
]
} | static int FUNC_0(AVFormatContext *VAR_0, int VAR_1, int64_t VAR_2, int VAR_3)
{
AVStream *st = VAR_0->streams[VAR_1];
avio_seek(VAR_0->pb, FFMAX(VAR_2, 0) * st->codec->width * st->codec->height * 4, SEEK_SET);
return 0;
}
| [
"static int FUNC_0(AVFormatContext *VAR_0, int VAR_1, int64_t VAR_2, int VAR_3)\n{",
"AVStream *st = VAR_0->streams[VAR_1];",
"avio_seek(VAR_0->pb, FFMAX(VAR_2, 0) * st->codec->width * st->codec->height * 4, SEEK_SET);",
"return 0;",
"}"
] | [
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
]
] |
5,120 | static int transcode_init(void)
{
int ret = 0, i, j, k;
AVFormatContext *oc;
OutputStream *ost;
InputStream *ist;
char error[1024] = {0};
int want_sdp = 1;
for (i = 0; i < nb_filtergraphs; i++) {
FilterGraph *fg = filtergraphs[i];
for (j = 0; j < fg->nb_outputs; j... | false | FFmpeg | da2f1568439ff1786413899dbb4fe30d87ab2721 | static int transcode_init(void)
{
int ret = 0, i, j, k;
AVFormatContext *oc;
OutputStream *ost;
InputStream *ist;
char error[1024] = {0};
int want_sdp = 1;
for (i = 0; i < nb_filtergraphs; i++) {
FilterGraph *fg = filtergraphs[i];
for (j = 0; j < fg->nb_outputs; j... | {
"code": [],
"line_no": []
} | static int FUNC_0(void)
{
int VAR_0 = 0, VAR_1, VAR_2, VAR_3;
AVFormatContext *oc;
OutputStream *ost;
InputStream *ist;
char VAR_4[1024] = {0};
int VAR_5 = 1;
for (VAR_1 = 0; VAR_1 < nb_filtergraphs; VAR_1++) {
FilterGraph *fg = filtergraphs[VAR_1];
for (VAR_2 = 0... | [
"static int FUNC_0(void)\n{",
"int VAR_0 = 0, VAR_1, VAR_2, VAR_3;",
"AVFormatContext *oc;",
"OutputStream *ost;",
"InputStream *ist;",
"char VAR_4[1024] = {0};",
"int VAR_5 = 1;",
"for (VAR_1 = 0; VAR_1 < nb_filtergraphs; VAR_1++) {",
"FilterGraph *fg = filtergraphs[VAR_1];",
"for (VAR_2 = 0; VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
31,
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[... |
5,123 | static int mp3_read_packet(AVFormatContext *s, AVPacket *pkt)
{
int ret;
ret = av_get_packet(s->pb, pkt, MP3_PACKET_SIZE);
pkt->stream_index = 0;
if (ret <= 0) {
return AVERROR(EIO);
}
if (ret > ID3v1_TAG_SIZE &&
memcmp(&pkt->data[ret - ID3v1_TAG_SIZE], "TAG", 3) =... | false | FFmpeg | f73e3938ac70524826664855210446c3739c4a5e | static int mp3_read_packet(AVFormatContext *s, AVPacket *pkt)
{
int ret;
ret = av_get_packet(s->pb, pkt, MP3_PACKET_SIZE);
pkt->stream_index = 0;
if (ret <= 0) {
return AVERROR(EIO);
}
if (ret > ID3v1_TAG_SIZE &&
memcmp(&pkt->data[ret - ID3v1_TAG_SIZE], "TAG", 3) =... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
int VAR_2;
VAR_2 = av_get_packet(VAR_0->pb, VAR_1, MP3_PACKET_SIZE);
VAR_1->stream_index = 0;
if (VAR_2 <= 0) {
return AVERROR(EIO);
}
if (VAR_2 > ID3v1_TAG_SIZE &&
memcmp(&VAR_1->data[VAR_2 - ID3v1_TAG_S... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"int VAR_2;",
"VAR_2 = av_get_packet(VAR_0->pb, VAR_1, MP3_PACKET_SIZE);",
"VAR_1->stream_index = 0;",
"if (VAR_2 <= 0) {",
"return AVERROR(EIO);",
"}",
"if (VAR_2 > ID3v1_TAG_SIZE &&\nmemcmp(&VAR_1->data[VAR_2 - ID3v1_TAG_SIZE], \"TAG\"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
25,
27
],
[
35
],
[
37
],
[
39
]
] |
5,124 | static void ff_h264_idct_add_mmx(uint8_t *dst, int16_t *block, int stride)
{
/* Load dct coeffs */
__asm__ volatile(
"movq (%0), %%mm0 \n\t"
"movq 8(%0), %%mm1 \n\t"
"movq 16(%0), %%mm2 \n\t"
"movq 24(%0), %%mm3 \n\t"
:: "r"(block) );
__asm__ volatile(
... | false | FFmpeg | 1d16a1cf99488f16492b1bb48e023f4da8377e07 | static void ff_h264_idct_add_mmx(uint8_t *dst, int16_t *block, int stride)
{
__asm__ volatile(
"movq (%0), %%mm0 \n\t"
"movq 8(%0), %%mm1 \n\t"
"movq 16(%0), %%mm2 \n\t"
"movq 24(%0), %%mm3 \n\t"
:: "r"(block) );
__asm__ volatile(
IDCT4_1... | {
"code": [],
"line_no": []
} | static void FUNC_0(uint8_t *VAR_0, int16_t *VAR_1, int VAR_2)
{
__asm__ volatile(
"movq (%0), %%mm0 \n\t"
"movq 8(%0), %%mm1 \n\t"
"movq 16(%0), %%mm2 \n\t"
"movq 24(%0), %%mm3 \n\t"
:: "r"(VAR_1) );
__asm__ volatile(
IDCT4_1D( %%mm2, %%m... | [
"static void FUNC_0(uint8_t *VAR_0, int16_t *VAR_1, int VAR_2)\n{",
"__asm__ volatile(\n\"movq (%0), %%mm0 \\n\\t\"\n\"movq 8(%0), %%mm1 \\n\\t\"\n\"movq 16(%0), %%mm2 \\n\\t\"\n\"movq 24(%0), %%mm3 \\n\\t\"\n:: \"r\"(VAR_1) );",
"__asm__ volatile(\nIDCT4_1D( %%mm2, %%mm1, %%mm0, %%mm3, %%mm4 )\n\"movq ... | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7,
9,
11,
13,
15,
17
],
[
21,
25,
29,
33,
37,
43,
47,
49
],
[
53,
55,
57,
59,
61,
63,
65,
67,
69,
71,
73
],
[
75
]
] |
5,125 | static void vdadec_flush(AVCodecContext *avctx)
{
return ff_h264_decoder.flush(avctx);
}
| false | FFmpeg | 973b1a6b9070e2bf17d17568cbaf4043ce931f51 | static void vdadec_flush(AVCodecContext *avctx)
{
return ff_h264_decoder.flush(avctx);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(AVCodecContext *VAR_0)
{
return ff_h264_decoder.flush(VAR_0);
}
| [
"static void FUNC_0(AVCodecContext *VAR_0)\n{",
"return ff_h264_decoder.flush(VAR_0);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
5,126 | static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu, TranslationBlock *itb)
{
CPUArchState *env = cpu->env_ptr;
uintptr_t ret;
TranslationBlock *last_tb;
int tb_exit;
uint8_t *tb_ptr = itb->tc_ptr;
qemu_log_mask_and_addr(CPU_LOG_EXEC, itb->pc,
"Trace %p ... | true | qemu | 027d9a7d2911e993cdcbd21c7c35d1dd058f05bb | static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu, TranslationBlock *itb)
{
CPUArchState *env = cpu->env_ptr;
uintptr_t ret;
TranslationBlock *last_tb;
int tb_exit;
uint8_t *tb_ptr = itb->tc_ptr;
qemu_log_mask_and_addr(CPU_LOG_EXEC, itb->pc,
"Trace %p ... | {
"code": [
" cpu->tcg_exit_req = 0;"
],
"line_no": [
117
]
} | static inline tcg_target_ulong FUNC_0(CPUState *cpu, TranslationBlock *itb)
{
CPUArchState *env = cpu->env_ptr;
uintptr_t ret;
TranslationBlock *last_tb;
int VAR_0;
uint8_t *tb_ptr = itb->tc_ptr;
qemu_log_mask_and_addr(CPU_LOG_EXEC, itb->pc,
"Trace %p [" TARG... | [
"static inline tcg_target_ulong FUNC_0(CPUState *cpu, TranslationBlock *itb)\n{",
"CPUArchState *env = cpu->env_ptr;",
"uintptr_t ret;",
"TranslationBlock *last_tb;",
"int VAR_0;",
"uint8_t *tb_ptr = itb->tc_ptr;",
"qemu_log_mask_and_addr(CPU_LOG_EXEC, itb->pc,\n\"Trace %p [\" TARGET_FMT_lx \"] %s\\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,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17,
19,
21
],
[
25,
27,
29
],
[
31,
33
],
[
35,
39
],
[
41
],
[
43
],
[
45
],
[
47,
49
],
[
51,
53
],
[
55,... |
5,127 | static void ac97_class_init (ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS (klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS (klass);
k->realize = ac97_realize;
k->vendor_id = PCI_VENDOR_ID_INTEL;
k->device_id = PCI_DEVICE_ID_INTEL_82801AA_5;
k->revision = 0x01;
k->... | true | qemu | 12351a91da97b414eec8cdb09f1d9f41e535a401 | static void ac97_class_init (ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS (klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS (klass);
k->realize = ac97_realize;
k->vendor_id = PCI_VENDOR_ID_INTEL;
k->device_id = PCI_DEVICE_ID_INTEL_82801AA_5;
k->revision = 0x01;
k->... | {
"code": [],
"line_no": []
} | static void FUNC_0 (ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS (VAR_0);
PCIDeviceClass *k = PCI_DEVICE_CLASS (VAR_0);
k->realize = ac97_realize;
k->vendor_id = PCI_VENDOR_ID_INTEL;
k->device_id = PCI_DEVICE_ID_INTEL_82801AA_5;
k->revision = 0x01;
k->class_id... | [
"static void FUNC_0 (ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS (VAR_0);",
"PCIDeviceClass *k = PCI_DEVICE_CLASS (VAR_0);",
"k->realize = ac97_realize;",
"k->vendor_id = PCI_VENDOR_ID_INTEL;",
"k->device_id = PCI_DEVICE_ID_INTEL_82801AA_5;",
"k->revision = 0x01;",
"k->class_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
14
],
[
16
],
[
18
],
[
20
],
[
22
],
[
24
],
[
26
],
[
28
],
[
30
],
[
32
]
] |
5,128 | static int adx_decode_init(AVCodecContext * avctx)
{
ADXContext *c = avctx->priv_data;
// printf("adx_decode_init\n"); fflush(stdout);
c->prev[0].s1 = 0;
c->prev[0].s2 = 0;
c->prev[1].s1 = 0;
c->prev[1].s2 = 0;
c->header_parsed = 0;
c->in_temp = 0;
return 0;
}
| true | FFmpeg | f19af812a32c1398d48c3550d11dbc6aafbb2bfc | static int adx_decode_init(AVCodecContext * avctx)
{
ADXContext *c = avctx->priv_data;
c->prev[0].s1 = 0;
c->prev[0].s2 = 0;
c->prev[1].s1 = 0;
c->prev[1].s2 = 0;
c->header_parsed = 0;
c->in_temp = 0;
return 0;
}
| {
"code": [
"\tADXContext *c = avctx->priv_data;",
"\tADXContext *c = avctx->priv_data;",
"\tc->prev[0].s1 = 0;",
"\tc->prev[0].s2 = 0;",
"\tc->prev[1].s1 = 0;",
"\tc->prev[1].s2 = 0;",
"\tc->header_parsed = 0;",
"\tc->in_temp = 0;",
"\treturn 0;",
"\tADXContext *c = avctx->pri... | static int FUNC_0(AVCodecContext * VAR_0)
{
ADXContext *c = VAR_0->priv_data;
c->prev[0].s1 = 0;
c->prev[0].s2 = 0;
c->prev[1].s1 = 0;
c->prev[1].s2 = 0;
c->header_parsed = 0;
c->in_temp = 0;
return 0;
}
| [
"static int FUNC_0(AVCodecContext * VAR_0)\n{",
"ADXContext *c = VAR_0->priv_data;",
"c->prev[0].s1 = 0;",
"c->prev[0].s2 = 0;",
"c->prev[1].s1 = 0;",
"c->prev[1].s2 = 0;",
"c->header_parsed = 0;",
"c->in_temp = 0;",
"return 0;",
"}"
] | [
0,
1,
1,
1,
1,
1,
1,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
5,130 | static int xan_huffman_decode(unsigned char *dest, int dest_len,
const unsigned char *src, int src_len)
{
unsigned char byte = *src++;
unsigned char ival = byte + 0x16;
const unsigned char * ptr = src + byte*2;
int ptr_len = src_len - 1 - byte*2;
unsigned char va... | true | FFmpeg | c8b835954ae4aef797112afda3b52f8dfe3c7b74 | static int xan_huffman_decode(unsigned char *dest, int dest_len,
const unsigned char *src, int src_len)
{
unsigned char byte = *src++;
unsigned char ival = byte + 0x16;
const unsigned char * ptr = src + byte*2;
int ptr_len = src_len - 1 - byte*2;
unsigned char va... | {
"code": [
" val = src[val - 0x17 + get_bits1(&gb) * byte];"
],
"line_no": [
35
]
} | static int FUNC_0(unsigned char *VAR_0, int VAR_1,
const unsigned char *VAR_2, int VAR_3)
{
unsigned char VAR_4 = *VAR_2++;
unsigned char VAR_5 = VAR_4 + 0x16;
const unsigned char * VAR_6 = VAR_2 + VAR_4*2;
int VAR_7 = VAR_3 - 1 - VAR_4*2;
unsigned char VAR_8 = V... | [
"static int FUNC_0(unsigned char *VAR_0, int VAR_1,\nconst unsigned char *VAR_2, int VAR_3)\n{",
"unsigned char VAR_4 = *VAR_2++;",
"unsigned char VAR_5 = VAR_4 + 0x16;",
"const unsigned char * VAR_6 = VAR_2 + VAR_4*2;",
"int VAR_7 = VAR_3 - 1 - VAR_4*2;",
"unsigned char VAR_8 = VAR_5;",
"unsigned char ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23,
25
],
[
29
],
[
33
],
[
35
],
[
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
5,131 | static int init(AVCodecParserContext *s)
{
H264Context *h = s->priv_data;
h->thread_context[0] = h;
return 0;
} | true | FFmpeg | f907615f0813e8499f06a7eebccf1c63fce87c8e | static int init(AVCodecParserContext *s)
{
H264Context *h = s->priv_data;
h->thread_context[0] = h;
return 0;
} | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecParserContext *VAR_0)
{
H264Context *h = VAR_0->priv_data;
h->thread_context[0] = h;
return 0;
} | [
"static int FUNC_0(AVCodecParserContext *VAR_0)\n{",
"H264Context *h = VAR_0->priv_data;",
"h->thread_context[0] = h;",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
10
],
[
12
]
] |
5,132 | static int unpack_vectors(Vp3DecodeContext *s, GetBitContext *gb)
{
int i, j, k;
int coding_mode;
int motion_x[6];
int motion_y[6];
int last_motion_x = 0;
int last_motion_y = 0;
int prior_last_motion_x = 0;
int prior_last_motion_y = 0;
int current_macroblock;
int curre... | true | FFmpeg | feaf1a739377f8b9ce65e9d3032f3d828d0c15ed | static int unpack_vectors(Vp3DecodeContext *s, GetBitContext *gb)
{
int i, j, k;
int coding_mode;
int motion_x[6];
int motion_y[6];
int last_motion_x = 0;
int last_motion_y = 0;
int prior_last_motion_x = 0;
int prior_last_motion_y = 0;
int current_macroblock;
int curre... | {
"code": [
" int i, j, k;"
],
"line_no": [
5
]
} | static int FUNC_0(Vp3DecodeContext *VAR_0, GetBitContext *VAR_1)
{
int VAR_2, VAR_3, VAR_4;
int VAR_5;
int VAR_6[6];
int VAR_7[6];
int VAR_8 = 0;
int VAR_9 = 0;
int VAR_10 = 0;
int VAR_11 = 0;
int VAR_12;
int VAR_13;
debug_vp3(" vp3: unpacking motion vectors\n"... | [
"static int FUNC_0(Vp3DecodeContext *VAR_0, GetBitContext *VAR_1)\n{",
"int VAR_2, VAR_3, VAR_4;",
"int VAR_5;",
"int VAR_6[6];",
"int VAR_7[6];",
"int VAR_8 = 0;",
"int VAR_9 = 0;",
"int VAR_10 = 0;",
"int VAR_11 = 0;",
"int VAR_12;",
"int VAR_13;",
"debug_vp3(\" vp3: unpacking motion vector... | [
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
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
33
],
[
37
],
[
41
],
[
43
],
[
49
],
[
51,
53
],
[... |
5,133 | static void avoid_clipping(AACEncContext *s, SingleChannelElement *sce)
{
int start, i, j, w;
if (sce->ics.clip_avoidance_factor < 1.0f) {
for (w = 0; w < sce->ics.num_windows; w++) {
start = 0;
for (i = 0; i < sce->ics.max_sfb; i++) {
float *swb_coeffs =... | true | FFmpeg | 32be264cea542b4dc721b10092bf1dfe511a28ee | static void avoid_clipping(AACEncContext *s, SingleChannelElement *sce)
{
int start, i, j, w;
if (sce->ics.clip_avoidance_factor < 1.0f) {
for (w = 0; w < sce->ics.num_windows; w++) {
start = 0;
for (i = 0; i < sce->ics.max_sfb; i++) {
float *swb_coeffs =... | {
"code": [
" float *swb_coeffs = sce->coeffs + start + w*128;"
],
"line_no": [
17
]
} | static void FUNC_0(AACEncContext *VAR_0, SingleChannelElement *VAR_1)
{
int VAR_2, VAR_3, VAR_4, VAR_5;
if (VAR_1->ics.clip_avoidance_factor < 1.0f) {
for (VAR_5 = 0; VAR_5 < VAR_1->ics.num_windows; VAR_5++) {
VAR_2 = 0;
for (VAR_3 = 0; VAR_3 < VAR_1->ics.max_sfb; VAR_3++... | [
"static void FUNC_0(AACEncContext *VAR_0, SingleChannelElement *VAR_1)\n{",
"int VAR_2, VAR_3, VAR_4, VAR_5;",
"if (VAR_1->ics.clip_avoidance_factor < 1.0f) {",
"for (VAR_5 = 0; VAR_5 < VAR_1->ics.num_windows; VAR_5++) {",
"VAR_2 = 0;",
"for (VAR_3 = 0; VAR_3 < VAR_1->ics.max_sfb; VAR_3++) {",
"float *s... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
]
] |
5,134 | static void sdhci_end_transfer(SDHCIState *s)
{
/* Automatically send CMD12 to stop transfer if AutoCMD12 enabled */
if ((s->trnmod & SDHC_TRNS_ACMD12) != 0) {
SDRequest request;
uint8_t response[16];
request.cmd = 0x0C;
request.arg = 0;
DPRINT_L1("Automatically... | true | qemu | 8be487d8f184f2f721cabeac559fb7a6cba18c95 | static void sdhci_end_transfer(SDHCIState *s)
{
if ((s->trnmod & SDHC_TRNS_ACMD12) != 0) {
SDRequest request;
uint8_t response[16];
request.cmd = 0x0C;
request.arg = 0;
DPRINT_L1("Automatically issue CMD%d %08x\n", request.cmd, request.arg);
sdbus_do_c... | {
"code": [
" DPRINT_L1(\"Automatically issue CMD%d %08x\\n\", request.cmd, request.arg);"
],
"line_no": [
19
]
} | static void FUNC_0(SDHCIState *VAR_0)
{
if ((VAR_0->trnmod & SDHC_TRNS_ACMD12) != 0) {
SDRequest request;
uint8_t response[16];
request.cmd = 0x0C;
request.arg = 0;
DPRINT_L1("Automatically issue CMD%d %08x\n", request.cmd, request.arg);
sdbus_do_comma... | [
"static void FUNC_0(SDHCIState *VAR_0)\n{",
"if ((VAR_0->trnmod & SDHC_TRNS_ACMD12) != 0) {",
"SDRequest request;",
"uint8_t response[16];",
"request.cmd = 0x0C;",
"request.arg = 0;",
"DPRINT_L1(\"Automatically issue CMD%d %08x\\n\", request.cmd, request.arg);",
"sdbus_do_command(&VAR_0->sdbus, &reque... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
29
],
[
33,
35,
37
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
]
] |
5,135 | int ff_ps_read_data(AVCodecContext *avctx, GetBitContext *gb_host, PSContext *ps, int bits_left)
{
int e;
int bit_count_start = get_bits_count(gb_host);
int header;
int bits_consumed;
GetBitContext gbc = *gb_host, *gb = &gbc;
header = get_bits1(gb);
if (header) { //enable_ps_he... | true | FFmpeg | a237b38021cd3009cc78eeb974b596085f2fe393 | int ff_ps_read_data(AVCodecContext *avctx, GetBitContext *gb_host, PSContext *ps, int bits_left)
{
int e;
int bit_count_start = get_bits_count(gb_host);
int header;
int bits_consumed;
GetBitContext gbc = *gb_host, *gb = &gbc;
header = get_bits1(gb);
if (header) {
ps->... | {
"code": [],
"line_no": []
} | int FUNC_0(AVCodecContext *VAR_0, GetBitContext *VAR_1, PSContext *VAR_2, int VAR_3)
{
int VAR_4;
int VAR_5 = get_bits_count(VAR_1);
int VAR_6;
int VAR_7;
GetBitContext gbc = *VAR_1, *gb = &gbc;
VAR_6 = get_bits1(gb);
if (VAR_6) {
VAR_2->enable_iid = get_bits1(gb);
... | [
"int FUNC_0(AVCodecContext *VAR_0, GetBitContext *VAR_1, PSContext *VAR_2, int VAR_3)\n{",
"int VAR_4;",
"int VAR_5 = get_bits_count(VAR_1);",
"int VAR_6;",
"int VAR_7;",
"GetBitContext gbc = *VAR_1, *gb = &gbc;",
"VAR_6 = get_bits1(gb);",
"if (VAR_6) {",
"VAR_2->enable_iid = get_bits1(gb);",
"if ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[... |
5,136 | ff_vorbis_comment(AVFormatContext * as, AVDictionary **m, const uint8_t *buf, int size)
{
const uint8_t *p = buf;
const uint8_t *end = buf + size;
unsigned n, j;
int s;
if (size < 8) /* must have vendor_length and user_comment_list_length */
return -1;
s = bytestream_get_le32... | true | FFmpeg | d0a882ab1d2a4197da1edd77450af30e2da3460e | ff_vorbis_comment(AVFormatContext * as, AVDictionary **m, const uint8_t *buf, int size)
{
const uint8_t *p = buf;
const uint8_t *end = buf + size;
unsigned n, j;
int s;
if (size < 8)
return -1;
s = bytestream_get_le32(&p);
if (end - p - 4 < s || s < 0)
return... | {
"code": [],
"line_no": []
} | FUNC_0(AVFormatContext * VAR_0, AVDictionary **VAR_1, const uint8_t *VAR_2, int VAR_3)
{
const uint8_t *VAR_4 = VAR_2;
const uint8_t *VAR_5 = VAR_2 + VAR_3;
unsigned VAR_6, VAR_7;
int VAR_8;
if (VAR_3 < 8)
return -1;
VAR_8 = bytestream_get_le32(&VAR_4);
if (VAR_5 - VA... | [
"FUNC_0(AVFormatContext * VAR_0, AVDictionary **VAR_1, const uint8_t *VAR_2, int VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_2;",
"const uint8_t *VAR_5 = VAR_2 + VAR_3;",
"unsigned VAR_6, VAR_7;",
"int VAR_8;",
"if (VAR_3 < 8)\nreturn -1;",
"VAR_8 = bytestream_get_le32(&VAR_4);",
"if (VAR_5 - VAR_4 - 4 < ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
21
],
[
25,
27
],
[
31
],
[
35
],
[
39
],
[
41
],
[
43
],
[
47
],
[
51,
53
],
[
57
],
[
59
],
[
61
],
[... |
5,139 | static void *do_touch_pages(void *arg)
{
MemsetThread *memset_args = (MemsetThread *)arg;
char *addr = memset_args->addr;
uint64_t numpages = memset_args->numpages;
uint64_t hpagesize = memset_args->hpagesize;
sigset_t set, oldset;
int i = 0;
/* unblock SIGBUS */
sigemptyset(&... | true | qemu | 9dc44aa5829eb3131a01378a738dee28a382bbc1 | static void *do_touch_pages(void *arg)
{
MemsetThread *memset_args = (MemsetThread *)arg;
char *addr = memset_args->addr;
uint64_t numpages = memset_args->numpages;
uint64_t hpagesize = memset_args->hpagesize;
sigset_t set, oldset;
int i = 0;
sigemptyset(&set);
sigaddset... | {
"code": [
" memset(addr, 0, 1);"
],
"line_no": [
37
]
} | static void *FUNC_0(void *VAR_0)
{
MemsetThread *memset_args = (MemsetThread *)VAR_0;
char *VAR_1 = memset_args->VAR_1;
uint64_t numpages = memset_args->numpages;
uint64_t hpagesize = memset_args->hpagesize;
sigset_t set, oldset;
int VAR_2 = 0;
sigemptyset(&set);
sigadds... | [
"static void *FUNC_0(void *VAR_0)\n{",
"MemsetThread *memset_args = (MemsetThread *)VAR_0;",
"char *VAR_1 = memset_args->VAR_1;",
"uint64_t numpages = memset_args->numpages;",
"uint64_t hpagesize = memset_args->hpagesize;",
"sigset_t set, oldset;",
"int VAR_2 = 0;",
"sigemptyset(&set);",
"sigaddset(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
5,140 | static int raw_decode(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
int linesize_align = 4;
RawVideoContext *context = avctx->priv_data;
AVFrame *... | false | FFmpeg | 8b58f6b5c286ba14ec9c6c9e03f9ede8c6be9181 | static int raw_decode(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
int linesize_align = 4;
RawVideoContext *context = avctx->priv_data;
AVFrame *... | {
"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;
int VAR_6 = 4;
RawVideoContext *context = VAR_0->priv_data;
AVFrame *frame = VAR_1;... | [
"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;",
"int VAR_6 = 4;",
"RawVideoContext *context = VAR_0->priv_data;",
"AVFrame *frame = VAR_1;",
"AVPicture *picture = VAR_1;",
"frame->pict_ty... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49,
51
],
[... |
5,141 | static int oma_read_header(AVFormatContext *s)
{
int ret, framesize, jsflag, samplerate;
uint32_t codec_params, channel_id;
int16_t eid;
uint8_t buf[EA3_HEADER_SIZE];
uint8_t *edata;
AVStream *st;
ID3v2ExtraMeta *extra_meta = NULL;
OMAContext *oc = s->priv_data;
ff_id... | false | FFmpeg | 5331773cc33ba26b9e26ace643d926219e46a17b | static int oma_read_header(AVFormatContext *s)
{
int ret, framesize, jsflag, samplerate;
uint32_t codec_params, channel_id;
int16_t eid;
uint8_t buf[EA3_HEADER_SIZE];
uint8_t *edata;
AVStream *st;
ID3v2ExtraMeta *extra_meta = NULL;
OMAContext *oc = s->priv_data;
ff_id... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0)
{
int VAR_1, VAR_2, VAR_3, VAR_4;
uint32_t codec_params, channel_id;
int16_t eid;
uint8_t buf[EA3_HEADER_SIZE];
uint8_t *edata;
AVStream *st;
ID3v2ExtraMeta *extra_meta = NULL;
OMAContext *oc = VAR_0->priv_data;
ff_id3v2_read(... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3, VAR_4;",
"uint32_t codec_params, channel_id;",
"int16_t eid;",
"uint8_t buf[EA3_HEADER_SIZE];",
"uint8_t *edata;",
"AVStream *st;",
"ID3v2ExtraMeta *extra_meta = NULL;",
"OMAContext *oc = VAR_0->priv_data;",
"ff_id3v2_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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27,
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
51
],
[... |
5,142 | void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
int linesize_align[AV_NUM_DATA_POINTERS])
{
int i;
int w_align= 1;
int h_align= 1;
switch(s->pix_fmt){
case PIX_FMT_YUV420P:
case PIX_FMT_YUYV422:
case PIX_FMT_UYVY422:
c... | false | FFmpeg | 70d54392f5015b9c6594fcae558f59f952501e3b | void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
int linesize_align[AV_NUM_DATA_POINTERS])
{
int i;
int w_align= 1;
int h_align= 1;
switch(s->pix_fmt){
case PIX_FMT_YUV420P:
case PIX_FMT_YUYV422:
case PIX_FMT_UYVY422:
c... | {
"code": [],
"line_no": []
} | void FUNC_0(AVCodecContext *VAR_0, int *VAR_1, int *VAR_2,
int VAR_3[AV_NUM_DATA_POINTERS])
{
int VAR_4;
int VAR_5= 1;
int VAR_6= 1;
switch(VAR_0->pix_fmt){
case PIX_FMT_YUV420P:
case PIX_FMT_YUYV422:
case PIX_FMT_UYVY422:
case PIX_FMT_YUV422P:
... | [
"void FUNC_0(AVCodecContext *VAR_0, int *VAR_1, int *VAR_2,\nint VAR_3[AV_NUM_DATA_POINTERS])\n{",
"int VAR_4;",
"int VAR_5= 1;",
"int VAR_6= 1;",
"switch(VAR_0->pix_fmt){",
"case PIX_FMT_YUV420P:\ncase PIX_FMT_YUYV422:\ncase PIX_FMT_UYVY422:\ncase PIX_FMT_YUV422P:\ncase PIX_FMT_YUV440P:\ncase PIX_FMT_YUV... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17,
19,
21,
23,
25,
27,
29,
31,
33,
35,
37,
39,
41,
43,
45,
47,
49,
51,
53,
55,
57,
59,
61,
63,
65,
67,
69,
71,... |
5,143 | static int decode_mb_i(AVSContext *h, int cbp_code)
{
GetBitContext *gb = &h->gb;
unsigned pred_mode_uv;
int block;
uint8_t top[18];
uint8_t *left = NULL;
uint8_t *d;
ff_cavs_init_mb(h);
/* get intra prediction modes from stream */
for (block = 0; block < 4; block++) {
... | false | FFmpeg | 39185ec4faa9ef33954dbf2394444e045b632673 | static int decode_mb_i(AVSContext *h, int cbp_code)
{
GetBitContext *gb = &h->gb;
unsigned pred_mode_uv;
int block;
uint8_t top[18];
uint8_t *left = NULL;
uint8_t *d;
ff_cavs_init_mb(h);
for (block = 0; block < 4; block++) {
int nA, nB, predpred;
int ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVSContext *VAR_0, int VAR_1)
{
GetBitContext *gb = &VAR_0->gb;
unsigned VAR_2;
int VAR_3;
uint8_t top[18];
uint8_t *left = NULL;
uint8_t *d;
ff_cavs_init_mb(VAR_0);
for (VAR_3 = 0; VAR_3 < 4; VAR_3++) {
int VAR_4, VAR_5, VAR_6;
int ... | [
"static int FUNC_0(AVSContext *VAR_0, int VAR_1)\n{",
"GetBitContext *gb = &VAR_0->gb;",
"unsigned VAR_2;",
"int VAR_3;",
"uint8_t top[18];",
"uint8_t *left = NULL;",
"uint8_t *d;",
"ff_cavs_init_mb(VAR_0);",
"for (VAR_3 = 0; VAR_3 < 4; VAR_3++) {",
"int VAR_4, VAR_5, VAR_6;",
"int VAR_7 = scan3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
5,144 | static int gif_read_image(GifState *s)
{
int left, top, width, height, bits_per_pixel, code_size, flags;
int is_interleaved, has_local_palette, y, pass, y1, linesize, n, i;
uint8_t *ptr, *spal, *palette, *ptr1;
left = bytestream_get_le16(&s->bytestream);
top = bytestream_get_le16(&s->bytestr... | true | FFmpeg | 3bd1162a52cafc1bb758b25636e857c94fd3999c | static int gif_read_image(GifState *s)
{
int left, top, width, height, bits_per_pixel, code_size, flags;
int is_interleaved, has_local_palette, y, pass, y1, linesize, n, i;
uint8_t *ptr, *spal, *palette, *ptr1;
left = bytestream_get_le16(&s->bytestream);
top = bytestream_get_le16(&s->bytestr... | {
"code": [
" s->image_palette[i] = (0xff << 24) | AV_RB24(spal);",
" s->image_palette[i] = (0xff << 24);"
],
"line_no": [
69,
77
]
} | static int FUNC_0(GifState *VAR_0)
{
int VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;
int VAR_8, VAR_9, VAR_10, VAR_11, VAR_12, VAR_13, VAR_14, VAR_15;
uint8_t *ptr, *spal, *palette, *ptr1;
VAR_1 = bytestream_get_le16(&VAR_0->bytestream);
VAR_2 = bytestream_get_le16(&VAR_0->bytestream);
... | [
"static int FUNC_0(GifState *VAR_0)\n{",
"int VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;",
"int VAR_8, VAR_9, VAR_10, VAR_11, VAR_12, VAR_13, VAR_14, VAR_15;",
"uint8_t *ptr, *spal, *palette, *ptr1;",
"VAR_1 = bytestream_get_le16(&VAR_0->bytestream);",
"VAR_2 = bytestream_get_le16(&VAR_0->bytestream... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
... |
5,145 | static int mkv_write_tags(AVFormatContext *s)
{
MatroskaMuxContext *mkv = s->priv_data;
int i, ret;
ff_metadata_conv_ctx(s, ff_mkv_metadata_conv, NULL);
if (mkv_check_tag(s->metadata, 0)) {
ret = mkv_write_tag(s, s->metadata, 0, 0, &mkv->tags);
if (ret < 0) return ret;
}
... | true | FFmpeg | 20e8be0c20c7b51964fa4d317073bd36b983eb55 | static int mkv_write_tags(AVFormatContext *s)
{
MatroskaMuxContext *mkv = s->priv_data;
int i, ret;
ff_metadata_conv_ctx(s, ff_mkv_metadata_conv, NULL);
if (mkv_check_tag(s->metadata, 0)) {
ret = mkv_write_tag(s, s->metadata, 0, 0, &mkv->tags);
if (ret < 0) return ret;
}
... | {
"code": [
" put_ebml_void(s->pb, avio_tell(mkv->tags_bc));"
],
"line_no": [
153
]
} | static int FUNC_0(AVFormatContext *VAR_0)
{
MatroskaMuxContext *mkv = VAR_0->priv_data;
int VAR_1, VAR_2;
ff_metadata_conv_ctx(VAR_0, ff_mkv_metadata_conv, NULL);
if (mkv_check_tag(VAR_0->metadata, 0)) {
VAR_2 = mkv_write_tag(VAR_0, VAR_0->metadata, 0, 0, &mkv->tags);
if (VAR_... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"MatroskaMuxContext *mkv = VAR_0->priv_data;",
"int VAR_1, VAR_2;",
"ff_metadata_conv_ctx(VAR_0, ff_mkv_metadata_conv, NULL);",
"if (mkv_check_tag(VAR_0->metadata, 0)) {",
"VAR_2 = mkv_write_tag(VAR_0, VAR_0->metadata, 0, 0, &mkv->tags);",
"if (VAR_2 < 0) ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
31,
33
],
[
37,
39
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[
55
],
[
57... |
5,147 | static int hls_delete_old_segments(HLSContext *hls) {
HLSSegment *segment, *previous_segment = NULL;
float playlist_duration = 0.0f;
int ret = 0, path_size, sub_path_size;
char *dirname = NULL, *p, *sub_path;
char *path = NULL;
segment = hls->segments;
while (segment) {
p... | true | FFmpeg | 57ae94a3c0fced20464d9ae351efc977d964be38 | static int hls_delete_old_segments(HLSContext *hls) {
HLSSegment *segment, *previous_segment = NULL;
float playlist_duration = 0.0f;
int ret = 0, path_size, sub_path_size;
char *dirname = NULL, *p, *sub_path;
char *path = NULL;
segment = hls->segments;
while (segment) {
p... | {
"code": [
" if (segment->sub_filename[0] != '\\0') {",
" sub_path_size = strlen(dirname) + strlen(segment->sub_filename) + 1;"
],
"line_no": [
123,
125
]
} | static int FUNC_0(HLSContext *VAR_0) {
HLSSegment *segment, *previous_segment = NULL;
float VAR_1 = 0.0f;
int VAR_2 = 0, VAR_3, VAR_4;
char *VAR_5 = NULL, *VAR_6, *VAR_7;
char *VAR_8 = NULL;
segment = VAR_0->segments;
while (segment) {
VAR_1 += segment->duration;
... | [
"static int FUNC_0(HLSContext *VAR_0) {",
"HLSSegment *segment, *previous_segment = NULL;",
"float VAR_1 = 0.0f;",
"int VAR_2 = 0, VAR_3, VAR_4;",
"char *VAR_5 = NULL, *VAR_6, *VAR_7;",
"char *VAR_8 = NULL;",
"segment = VAR_0->segments;",
"while (segment) {",
"VAR_1 += segment->duration;",
"segmen... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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... | [
[
1
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
... |
5,148 | qcow_co_pwritev_compressed(BlockDriverState *bs, uint64_t offset,
uint64_t bytes, QEMUIOVector *qiov)
{
BDRVQcowState *s = bs->opaque;
QEMUIOVector hd_qiov;
struct iovec iov;
z_stream strm;
int ret, out_len;
uint8_t *buf, *out_buf;
uint64_t cluster_offset;... | true | qemu | 56439e9d55626b65ecb887f1ac3714652555312e | qcow_co_pwritev_compressed(BlockDriverState *bs, uint64_t offset,
uint64_t bytes, QEMUIOVector *qiov)
{
BDRVQcowState *s = bs->opaque;
QEMUIOVector hd_qiov;
struct iovec iov;
z_stream strm;
int ret, out_len;
uint8_t *buf, *out_buf;
uint64_t cluster_offset;... | {
"code": [
"fail:",
" cluster_offset = get_cluster_offset(bs, offset, 2, out_len, 0, 0);"
],
"line_no": [
161,
123
]
} | FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1,
uint64_t VAR_2, QEMUIOVector *VAR_3)
{
BDRVQcowState *s = VAR_0->opaque;
QEMUIOVector hd_qiov;
struct iovec VAR_4;
z_stream strm;
int VAR_5, VAR_6;
uint8_t *buf, *out_buf;
uint64_t cluster_offset;
buf ... | [
"FUNC_0(BlockDriverState *VAR_0, uint64_t VAR_1,\nuint64_t VAR_2, QEMUIOVector *VAR_3)\n{",
"BDRVQcowState *s = VAR_0->opaque;",
"QEMUIOVector hd_qiov;",
"struct iovec VAR_4;",
"z_stream strm;",
"int VAR_5, VAR_6;",
"uint8_t *buf, *out_buf;",
"uint64_t cluster_offset;",
"buf = qemu_blockalign(VAR_0,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
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
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27,
29,
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
49
],
[... |
5,149 | static int fifo_put(SerialState *s, int fifo, uint8_t chr)
{
SerialFIFO *f = (fifo) ? &s->recv_fifo : &s->xmit_fifo;
f->data[f->head++] = chr;
if (f->head == UART_FIFO_LENGTH)
f->head = 0;
f->count++;
return 1;
}
| true | qemu | 71e605f80313a632cc6714cde7bd240042dbdd95 | static int fifo_put(SerialState *s, int fifo, uint8_t chr)
{
SerialFIFO *f = (fifo) ? &s->recv_fifo : &s->xmit_fifo;
f->data[f->head++] = chr;
if (f->head == UART_FIFO_LENGTH)
f->head = 0;
f->count++;
return 1;
}
| {
"code": [
" f->data[f->head++] = chr;",
" if (f->head == UART_FIFO_LENGTH)",
" f->head = 0;",
" f->count++;"
],
"line_no": [
9,
13,
15,
17
]
} | static int FUNC_0(SerialState *VAR_0, int VAR_1, uint8_t VAR_2)
{
SerialFIFO *f = (VAR_1) ? &VAR_0->recv_fifo : &VAR_0->xmit_fifo;
f->data[f->head++] = VAR_2;
if (f->head == UART_FIFO_LENGTH)
f->head = 0;
f->count++;
return 1;
}
| [
"static int FUNC_0(SerialState *VAR_0, int VAR_1, uint8_t VAR_2)\n{",
"SerialFIFO *f = (VAR_1) ? &VAR_0->recv_fifo : &VAR_0->xmit_fifo;",
"f->data[f->head++] = VAR_2;",
"if (f->head == UART_FIFO_LENGTH)\nf->head = 0;",
"f->count++;",
"return 1;",
"}"
] | [
0,
0,
1,
1,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13,
15
],
[
17
],
[
21
],
[
23
]
] |
5,150 | static void rc4030_reset(DeviceState *dev)
{
rc4030State *s = RC4030(dev);
int i;
s->config = 0x410; /* some boards seem to accept 0x104 too */
s->revision = 1;
s->invalid_address_register = 0;
memset(s->dma_regs, 0, sizeof(s->dma_regs));
rc4030_dma_tt_update(s, 0, 0);
s->... | true | qemu | c627e7526a902dd5bb1907dbbd5cf961679dfa68 | static void rc4030_reset(DeviceState *dev)
{
rc4030State *s = RC4030(dev);
int i;
s->config = 0x410;
s->revision = 1;
s->invalid_address_register = 0;
memset(s->dma_regs, 0, sizeof(s->dma_regs));
rc4030_dma_tt_update(s, 0, 0);
s->remote_failed_address = s->memory_failed_a... | {
"code": [
" rc4030_dma_tt_update(s, 0, 0);",
" int i;",
" int i;"
],
"line_no": [
21,
7,
7
]
} | static void FUNC_0(DeviceState *VAR_0)
{
rc4030State *s = RC4030(VAR_0);
int VAR_1;
s->config = 0x410;
s->revision = 1;
s->invalid_address_register = 0;
memset(s->dma_regs, 0, sizeof(s->dma_regs));
rc4030_dma_tt_update(s, 0, 0);
s->remote_failed_address = s->memory_failed... | [
"static void FUNC_0(DeviceState *VAR_0)\n{",
"rc4030State *s = RC4030(VAR_0);",
"int VAR_1;",
"s->config = 0x410;",
"s->revision = 1;",
"s->invalid_address_register = 0;",
"memset(s->dma_regs, 0, sizeof(s->dma_regs));",
"rc4030_dma_tt_update(s, 0, 0);",
"s->remote_failed_address = s->memory_failed_a... | [
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
53... |
5,151 | static void encode_refpass(Jpeg2000T1Context *t1, int width, int height, int *nmsedec, int bpno)
{
int y0, x, y, mask = 1 << (bpno + NMSEDEC_FRACBITS);
for (y0 = 0; y0 < height; y0 += 4)
for (x = 0; x < width; x++)
for (y = y0; y < height && y < y0+4; y++)
if ((t1->flag... | false | FFmpeg | f1e173049ecc9de03817385ba8962d14cba779db | static void encode_refpass(Jpeg2000T1Context *t1, int width, int height, int *nmsedec, int bpno)
{
int y0, x, y, mask = 1 << (bpno + NMSEDEC_FRACBITS);
for (y0 = 0; y0 < height; y0 += 4)
for (x = 0; x < width; x++)
for (y = y0; y < height && y < y0+4; y++)
if ((t1->flag... | {
"code": [],
"line_no": []
} | static void FUNC_0(Jpeg2000T1Context *VAR_0, int VAR_1, int VAR_2, int *VAR_3, int VAR_4)
{
int VAR_5, VAR_6, VAR_7, VAR_8 = 1 << (VAR_4 + NMSEDEC_FRACBITS);
for (VAR_5 = 0; VAR_5 < VAR_2; VAR_5 += 4)
for (VAR_6 = 0; VAR_6 < VAR_1; VAR_6++)
for (VAR_7 = VAR_5; VAR_7 < VAR_2 && VAR_7 < V... | [
"static void FUNC_0(Jpeg2000T1Context *VAR_0, int VAR_1, int VAR_2, int *VAR_3, int VAR_4)\n{",
"int VAR_5, VAR_6, VAR_7, VAR_8 = 1 << (VAR_4 + NMSEDEC_FRACBITS);",
"for (VAR_5 = 0; VAR_5 < VAR_2; VAR_5 += 4)",
"for (VAR_6 = 0; VAR_6 < VAR_1; VAR_6++)",
"for (VAR_7 = VAR_5; VAR_7 < VAR_2 && VAR_7 < VAR_5+4;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
5,152 | void visit_optional(Visitor *v, bool *present, const char *name,
Error **errp)
{
if (!error_is_set(errp) && v->optional) {
v->optional(v, present, name, errp);
}
}
| true | qemu | 297a3646c2947ee64a6d42ca264039732c6218e0 | void visit_optional(Visitor *v, bool *present, const char *name,
Error **errp)
{
if (!error_is_set(errp) && v->optional) {
v->optional(v, present, name, errp);
}
}
| {
"code": [
" if (!error_is_set(errp) && v->optional) {"
],
"line_no": [
7
]
} | void FUNC_0(Visitor *VAR_0, bool *VAR_1, const char *VAR_2,
Error **VAR_3)
{
if (!error_is_set(VAR_3) && VAR_0->optional) {
VAR_0->optional(VAR_0, VAR_1, VAR_2, VAR_3);
}
}
| [
"void FUNC_0(Visitor *VAR_0, bool *VAR_1, const char *VAR_2,\nError **VAR_3)\n{",
"if (!error_is_set(VAR_3) && VAR_0->optional) {",
"VAR_0->optional(VAR_0, VAR_1, VAR_2, VAR_3);",
"}",
"}"
] | [
0,
1,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
5,153 | static int ws_snd_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
// WSSNDContext *c = avctx->priv_data;
int in_size, out_size;
int sample = 128;
int i;
... | true | FFmpeg | 417364ce1f979031ef6fee661fc15e1869bdb1b4 | static int ws_snd_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
int in_size, out_size;
int sample = 128;
int i;
uint8_t *samples = data;
if (!buf... | {
"code": [
" *data_size = out_size;",
" while (out_size > 0) {",
" int code;"
],
"line_no": [
59,
75,
77
]
} | 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;
int VAR_6, VAR_7;
int VAR_8 = 128;
int VAR_9;
uint8_t *samples = VAR_1;
if (!VAR_5)
retu... | [
"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;",
"int VAR_6, VAR_7;",
"int VAR_8 = 128;",
"int VAR_9;",
"uint8_t *samples = VAR_1;",
"if (!VAR_5)\nreturn 0;",
"VAR_7 = AV_RL16(&VAR_4[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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27,
29
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53
],
[... |
5,154 | static int mb_var_thread(AVCodecContext *c, void *arg){
MpegEncContext *s= *(void**)arg;
int mb_x, mb_y;
for(mb_y=s->start_mb_y; mb_y < s->end_mb_y; mb_y++) {
for(mb_x=0; mb_x < s->mb_width; mb_x++) {
int xx = mb_x * 16;
int yy = mb_y * 16;
uint8_t *pix =... | true | FFmpeg | f6774f905fb3cfdc319523ac640be30b14c1bc55 | static int mb_var_thread(AVCodecContext *c, void *arg){
MpegEncContext *s= *(void**)arg;
int mb_x, mb_y;
for(mb_y=s->start_mb_y; mb_y < s->end_mb_y; mb_y++) {
for(mb_x=0; mb_x < s->mb_width; mb_x++) {
int xx = mb_x * 16;
int yy = mb_y * 16;
uint8_t *pix =... | {
"code": [
" uint8_t *pix = s->new_picture.f.data[0] + (yy * s->linesize) + xx;"
],
"line_no": [
17
]
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1){
MpegEncContext *s= *(void**)VAR_1;
int VAR_2, VAR_3;
for(VAR_3=s->start_mb_y; VAR_3 < s->end_mb_y; VAR_3++) {
for(VAR_2=0; VAR_2 < s->mb_width; VAR_2++) {
int xx = VAR_2 * 16;
int yy = VAR_3 * 16;
uin... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1){",
"MpegEncContext *s= *(void**)VAR_1;",
"int VAR_2, VAR_3;",
"for(VAR_3=s->start_mb_y; VAR_3 < s->end_mb_y; VAR_3++) {",
"for(VAR_2=0; VAR_2 < s->mb_width; VAR_2++) {",
"int xx = VAR_2 * 16;",
"int yy = VAR_3 * 16;",
"uint8_t *pix = s->new_pictur... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
]
] |
5,155 | int inet_listen_opts(QemuOpts *opts, int port_offset)
{
struct addrinfo ai,*res,*e;
const char *addr;
char port[33];
char uaddr[INET6_ADDRSTRLEN+1];
char uport[33];
int slisten,rc,to,try_next;
memset(&ai,0, sizeof(ai));
ai.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
ai.ai_fami... | true | qemu | 40ff6d7e8dceca227e7f8a3e8e0d58b2c66d19b4 | int inet_listen_opts(QemuOpts *opts, int port_offset)
{
struct addrinfo ai,*res,*e;
const char *addr;
char port[33];
char uaddr[INET6_ADDRSTRLEN+1];
char uport[33];
int slisten,rc,to,try_next;
memset(&ai,0, sizeof(ai));
ai.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
ai.ai_fami... | {
"code": [
" slisten = socket(e->ai_family, e->ai_socktype, e->ai_protocol);"
],
"line_no": [
89
]
} | int FUNC_0(QemuOpts *VAR_0, int VAR_1)
{
struct addrinfo VAR_2,*VAR_3,*VAR_4;
const char *VAR_5;
char VAR_6[33];
char VAR_7[INET6_ADDRSTRLEN+1];
char VAR_8[33];
int VAR_9,VAR_10,VAR_11,VAR_12;
memset(&VAR_2,0, sizeof(VAR_2));
VAR_2.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
V... | [
"int FUNC_0(QemuOpts *VAR_0, int VAR_1)\n{",
"struct addrinfo VAR_2,*VAR_3,*VAR_4;",
"const char *VAR_5;",
"char VAR_6[33];",
"char VAR_7[INET6_ADDRSTRLEN+1];",
"char VAR_8[33];",
"int VAR_9,VAR_10,VAR_11,VAR_12;",
"memset(&VAR_2,0, sizeof(VAR_2));",
"VAR_2.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45,
47
],
[... |
5,159 | static int socket_open_listen(struct sockaddr_in *my_addr)
{
int server_fd, tmp;
server_fd = socket(AF_INET,SOCK_STREAM,0);
if (server_fd < 0) {
perror ("socket");
return -1;
}
tmp = 1;
setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, &tmp, sizeof(tmp));
if (b... | true | FFmpeg | f5e717f3c735af5c941b458d42615c97028aa916 | static int socket_open_listen(struct sockaddr_in *my_addr)
{
int server_fd, tmp;
server_fd = socket(AF_INET,SOCK_STREAM,0);
if (server_fd < 0) {
perror ("socket");
return -1;
}
tmp = 1;
setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, &tmp, sizeof(tmp));
if (b... | {
"code": [],
"line_no": []
} | static int FUNC_0(struct sockaddr_in *VAR_0)
{
int VAR_1, VAR_2;
VAR_1 = socket(AF_INET,SOCK_STREAM,0);
if (VAR_1 < 0) {
perror ("socket");
return -1;
}
VAR_2 = 1;
setsockopt(VAR_1, SOL_SOCKET, SO_REUSEADDR, &VAR_2, sizeof(VAR_2));
if (bind (VAR_1, (struct so... | [
"static int FUNC_0(struct sockaddr_in *VAR_0)\n{",
"int VAR_1, VAR_2;",
"VAR_1 = socket(AF_INET,SOCK_STREAM,0);",
"if (VAR_1 < 0) {",
"perror (\"socket\");",
"return -1;",
"}",
"VAR_2 = 1;",
"setsockopt(VAR_1, SOL_SOCKET, SO_REUSEADDR, &VAR_2, sizeof(VAR_2));",
"if (bind (VAR_1, (struct sockaddr *... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
28
],
[
30
],
[
32
],
[
34
],
[
36
],
[
38
],
[
40
],
[
44
],
[
46
],
[
48
],
[
50... |
5,160 | static uint64_t pxa2xx_gpio_read(void *opaque, hwaddr offset,
unsigned size)
{
PXA2xxGPIOInfo *s = (PXA2xxGPIOInfo *) opaque;
uint32_t ret;
int bank;
if (offset >= 0x200)
return 0;
bank = pxa2xx_gpio_regs[offset].bank;
switch (pxa2xx_gpio_regs[... | true | qemu | ab7a0f0b6dbe8836d490c736803abef6e3695e1f | static uint64_t pxa2xx_gpio_read(void *opaque, hwaddr offset,
unsigned size)
{
PXA2xxGPIOInfo *s = (PXA2xxGPIOInfo *) opaque;
uint32_t ret;
int bank;
if (offset >= 0x200)
return 0;
bank = pxa2xx_gpio_regs[offset].bank;
switch (pxa2xx_gpio_regs[... | {
"code": [
" printf(\"%s: Read from a write-only register \" REG_FMT \"\\n\",",
" __FUNCTION__, offset);",
" printf(\"%s: Read from a write-only register \" REG_FMT \"\\n\",",
" __FUNCTION__, offset);"
],
"line_no": [
31,
33,
... | static uint64_t FUNC_0(void *opaque, hwaddr offset,
unsigned size)
{
PXA2xxGPIOInfo *s = (PXA2xxGPIOInfo *) opaque;
uint32_t ret;
int VAR_0;
if (offset >= 0x200)
return 0;
VAR_0 = pxa2xx_gpio_regs[offset].VAR_0;
switch (pxa2xx_gpio_regs[offset]... | [
"static uint64_t FUNC_0(void *opaque, hwaddr offset,\nunsigned size)\n{",
"PXA2xxGPIOInfo *s = (PXA2xxGPIOInfo *) opaque;",
"uint32_t ret;",
"int VAR_0;",
"if (offset >= 0x200)\nreturn 0;",
"VAR_0 = pxa2xx_gpio_regs[offset].VAR_0;",
"switch (pxa2xx_gpio_regs[offset].reg) {",
"case GPDR:\nreturn s->dir... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13,
15
],
[
19
],
[
21
],
[
23,
25
],
[
29,
31,
33
],
[
35
],
[
39,
41,
43
],
[
45
],
[
49,
51
],
[
55,
57
],
[
61,
63
... |
5,161 | static void aux_slave_class_init(ObjectClass *klass, void *data)
{
DeviceClass *k = DEVICE_CLASS(klass);
set_bit(DEVICE_CATEGORY_MISC, k->categories);
k->bus_type = TYPE_AUX_BUS;
}
| true | qemu | e0dadc1e9ef1f35208e5d2af9c7740c18a0b769f | static void aux_slave_class_init(ObjectClass *klass, void *data)
{
DeviceClass *k = DEVICE_CLASS(klass);
set_bit(DEVICE_CATEGORY_MISC, k->categories);
k->bus_type = TYPE_AUX_BUS;
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *k = DEVICE_CLASS(VAR_0);
set_bit(DEVICE_CATEGORY_MISC, k->categories);
k->bus_type = TYPE_AUX_BUS;
}
| [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *k = DEVICE_CLASS(VAR_0);",
"set_bit(DEVICE_CATEGORY_MISC, k->categories);",
"k->bus_type = TYPE_AUX_BUS;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
]
] |
5,162 | static void vmdk_close(BlockDriverState *bs)
{
BDRVVmdkState *s = bs->opaque;
qemu_free(s->l1_table);
qemu_free(s->l2_cache);
bdrv_delete(s->hd);
// try to close parent image, if exist
vmdk_parent_close(s->hd);
}
| true | qemu | 5cbdd273fbf5e977d14b1f06976489d8e4625a68 | static void vmdk_close(BlockDriverState *bs)
{
BDRVVmdkState *s = bs->opaque;
qemu_free(s->l1_table);
qemu_free(s->l2_cache);
bdrv_delete(s->hd);
vmdk_parent_close(s->hd);
}
| {
"code": [
" bdrv_delete(s->hd);"
],
"line_no": [
13
]
} | static void FUNC_0(BlockDriverState *VAR_0)
{
BDRVVmdkState *s = VAR_0->opaque;
qemu_free(s->l1_table);
qemu_free(s->l2_cache);
bdrv_delete(s->hd);
vmdk_parent_close(s->hd);
}
| [
"static void FUNC_0(BlockDriverState *VAR_0)\n{",
"BDRVVmdkState *s = VAR_0->opaque;",
"qemu_free(s->l1_table);",
"qemu_free(s->l2_cache);",
"bdrv_delete(s->hd);",
"vmdk_parent_close(s->hd);",
"}"
] | [
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
]
] |
5,163 | static void *file_ram_alloc(RAMBlock *block,
ram_addr_t memory,
const char *path,
Error **errp)
{
bool unlink_on_error = false;
char *filename;
char *sanitized_name;
char *c;
void *area = MAP_FAILED;
in... | true | qemu | 1e356fc14beaa3ece6c0e961bd479af58be3198b | static void *file_ram_alloc(RAMBlock *block,
ram_addr_t memory,
const char *path,
Error **errp)
{
bool unlink_on_error = false;
char *filename;
char *sanitized_name;
char *c;
void *area = MAP_FAILED;
in... | {
"code": [
" os_mem_prealloc(fd, area, memory, errp);"
],
"line_no": [
239
]
} | static void *FUNC_0(RAMBlock *VAR_0,
ram_addr_t VAR_1,
const char *VAR_2,
Error **VAR_3)
{
bool unlink_on_error = false;
char *VAR_4;
char *VAR_5;
char *VAR_6;
void *VAR_7 = MAP_FAILED;
int VAR_8 = -1;
... | [
"static void *FUNC_0(RAMBlock *VAR_0,\nram_addr_t VAR_1,\nconst char *VAR_2,\nError **VAR_3)\n{",
"bool unlink_on_error = false;",
"char *VAR_4;",
"char *VAR_5;",
"char *VAR_6;",
"void *VAR_7 = MAP_FAILED;",
"int VAR_8 = -1;",
"int64_t file_size;",
"if (kvm_enabled() && !kvm_has_sync_mmu()) {",
"e... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
51
... |
5,164 | static void qpeg_decode_inter(const uint8_t *src, uint8_t *dst, int size,
int stride, int width, int height,
int delta, const uint8_t *ctable, uint8_t *refdata)
{
int i, j;
int code;
int filled = 0;
int orig_height;
if(!refdata)
... | true | FFmpeg | 81d4b3af81b52a79f11705ef02d3f48747047404 | static void qpeg_decode_inter(const uint8_t *src, uint8_t *dst, int size,
int stride, int width, int height,
int delta, const uint8_t *ctable, uint8_t *refdata)
{
int i, j;
int code;
int filled = 0;
int orig_height;
if(!refdata)
... | {
"code": [
" while((code & 0xF0) == 0xF0) {",
" if(!code)",
" skip = (*src++) + 64;",
" else if(code == 1)",
" skip = (*src++) + 320;"
],
"line_no": [
53,
221,
223,
225,
227
]
} | static void FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, int VAR_2,
int VAR_3, int VAR_4, int VAR_5,
int VAR_6, const uint8_t *VAR_7, uint8_t *VAR_8)
{
int VAR_9, VAR_10;
int VAR_11;
int VAR_12 = 0;
int VAR_13;
if(!VAR_8)
VAR... | [
"static void FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, int VAR_2,\nint VAR_3, int VAR_4, int VAR_5,\nint VAR_6, const uint8_t *VAR_7, uint8_t *VAR_8)\n{",
"int VAR_9, VAR_10;",
"int VAR_11;",
"int VAR_12 = 0;",
"int VAR_13;",
"if(!VAR_8)\nVAR_8= VAR_1;",
"for(VAR_9 = 0; VAR_9 < VAR_5; VAR_9++)",
"m... | [
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,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
49
],
[
53
],
[
55
],
[
57
],
[... |
5,165 | static void x86_cpu_apic_create(X86CPU *cpu, Error **errp)
{
APICCommonState *apic;
const char *apic_type = "apic";
if (kvm_apic_in_kernel()) {
apic_type = "kvm-apic";
} else if (xen_enabled()) {
apic_type = "xen-apic";
}
cpu->apic_state = DEVICE(object_new(apic_type... | true | qemu | 67e55caa6dcb91c80428cee6fe463f8dd8a755ab | static void x86_cpu_apic_create(X86CPU *cpu, Error **errp)
{
APICCommonState *apic;
const char *apic_type = "apic";
if (kvm_apic_in_kernel()) {
apic_type = "kvm-apic";
} else if (xen_enabled()) {
apic_type = "xen-apic";
}
cpu->apic_state = DEVICE(object_new(apic_type... | {
"code": [],
"line_no": []
} | static void FUNC_0(X86CPU *VAR_0, Error **VAR_1)
{
APICCommonState *apic;
const char *VAR_2 = "apic";
if (kvm_apic_in_kernel()) {
VAR_2 = "kvm-apic";
} else if (xen_enabled()) {
VAR_2 = "xen-apic";
}
VAR_0->apic_state = DEVICE(object_new(VAR_2));
object_proper... | [
"static void FUNC_0(X86CPU *VAR_0, Error **VAR_1)\n{",
"APICCommonState *apic;",
"const char *VAR_2 = \"apic\";",
"if (kvm_apic_in_kernel()) {",
"VAR_2 = \"kvm-apic\";",
"} else if (xen_enabled()) {",
"VAR_2 = \"xen-apic\";",
"}",
"VAR_0->apic_state = DEVICE(object_new(VAR_2));",
"object_property_... | [
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
],
[
27,
29
],
[
34
],
[
38
],
[
40
],
[
42
],
[
44
]
] |
5,166 | bool migration_has_failed(MigrationState *s)
{
return (s->state == MIG_STATE_CANCELLED ||
s->state == MIG_STATE_ERROR);
}
| true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | bool migration_has_failed(MigrationState *s)
{
return (s->state == MIG_STATE_CANCELLED ||
s->state == MIG_STATE_ERROR);
}
| {
"code": [],
"line_no": []
} | bool FUNC_0(MigrationState *s)
{
return (s->state == MIG_STATE_CANCELLED ||
s->state == MIG_STATE_ERROR);
}
| [
"bool FUNC_0(MigrationState *s)\n{",
"return (s->state == MIG_STATE_CANCELLED ||\ns->state == MIG_STATE_ERROR);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
9
]
] |
5,167 | static const uint8_t *read_huffman_tables(FourXContext *f,
const uint8_t * const buf)
{
int frequency[512] = { 0 };
uint8_t flag[512];
int up[512];
uint8_t len_tab[257];
int bits_tab[257];
int start, end;
const uint8_t *ptr = buf;
int j... | true | FFmpeg | be373cb50d3c411366fec7eef2eb3681abe48f96 | static const uint8_t *read_huffman_tables(FourXContext *f,
const uint8_t * const buf)
{
int frequency[512] = { 0 };
uint8_t flag[512];
int up[512];
uint8_t len_tab[257];
int bits_tab[257];
int start, end;
const uint8_t *ptr = buf;
int j... | {
"code": [
" const uint8_t * const buf)"
],
"line_no": [
3
]
} | static const uint8_t *FUNC_0(FourXContext *f,
const uint8_t * const buf)
{
int VAR_0[512] = { 0 };
uint8_t flag[512];
int VAR_1[512];
uint8_t len_tab[257];
int VAR_2[257];
int VAR_3, VAR_4;
const uint8_t *VAR_5 = buf;
int VAR_6;
... | [
"static const uint8_t *FUNC_0(FourXContext *f,\nconst uint8_t * const buf)\n{",
"int VAR_0[512] = { 0 };",
"uint8_t flag[512];",
"int VAR_1[512];",
"uint8_t len_tab[257];",
"int VAR_2[257];",
"int VAR_3, VAR_4;",
"const uint8_t *VAR_5 = buf;",
"int VAR_6;",
"memset(VAR_1, -1, sizeof(VAR_1));",
"... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45,
47
],
[
51
... |
5,168 | void hmp_info_tlb(Monitor *mon, const QDict *qdict)
{
CPUArchState *env1 = mon_get_cpu_env();
dump_mmu((FILE*)mon, (fprintf_function)monitor_printf, env1);
| true | qemu | 854e67fea6a6f181163a5467fc9ba04de8d181bb | void hmp_info_tlb(Monitor *mon, const QDict *qdict)
{
CPUArchState *env1 = mon_get_cpu_env();
dump_mmu((FILE*)mon, (fprintf_function)monitor_printf, env1);
| {
"code": [],
"line_no": []
} | void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)
{
CPUArchState *env1 = mon_get_cpu_env();
dump_mmu((FILE*)VAR_0, (fprintf_function)monitor_printf, env1);
| [
"void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)\n{",
"CPUArchState *env1 = mon_get_cpu_env();",
"dump_mmu((FILE*)VAR_0, (fprintf_function)monitor_printf, env1);"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
13
]
] |
5,169 | int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
MJpegDecodeContext *s = avctx->priv_data;
const uint8_t *buf_end, *buf_ptr;
const uint8_t *unescaped_bu... | true | FFmpeg | a9456c7c5ca883b5a3947e59a9fba5587e18e119 | int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
MJpegDecodeContext *s = avctx->priv_data;
const uint8_t *buf_end, *buf_ptr;
const uint8_t *unescaped_bu... | {
"code": [
" } else if (unescaped_buf_size > (1U<<29)) {"
],
"line_no": [
51
]
} | int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{
const uint8_t *VAR_4 = VAR_3->VAR_1;
int VAR_5 = VAR_3->size;
MJpegDecodeContext *s = VAR_0->priv_data;
const uint8_t *VAR_6, *buf_ptr;
const uint8_t *VAR_7;
int VAR_8;
int ... | [
"int FUNC_0(AVCodecContext *VAR_0, void *VAR_1, int *VAR_2,\nAVPacket *VAR_3)\n{",
"const uint8_t *VAR_4 = VAR_3->VAR_1;",
"int VAR_5 = VAR_3->size;",
"MJpegDecodeContext *s = VAR_0->priv_data;",
"const uint8_t *VAR_6, *buf_ptr;",
"const uint8_t *VAR_7;",
"int VAR_8;",
"int VAR_9;",
"int VAR_1... | [
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,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39,
41,
43
],
[
47
],
[
49
],
[... |
5,170 | GuestMemoryBlockList *qmp_guest_get_memory_blocks(Error **errp)
{
GuestMemoryBlockList *head, **link;
Error *local_err = NULL;
struct dirent *de;
DIR *dp;
head = NULL;
link = &head;
dp = opendir("/sys/devices/system/memory/");
if (!dp) {
error_setg_errno(errp, errno... | true | qemu | f693fe6ef402bdcf89b3979bf004c4c5bf646724 | GuestMemoryBlockList *qmp_guest_get_memory_blocks(Error **errp)
{
GuestMemoryBlockList *head, **link;
Error *local_err = NULL;
struct dirent *de;
DIR *dp;
head = NULL;
link = &head;
dp = opendir("/sys/devices/system/memory/");
if (!dp) {
error_setg_errno(errp, errno... | {
"code": [
" error_setg_errno(errp, errno, \"Can't open directory\"",
" \"\\\"/sys/devices/system/memory/\\\"\\n\");"
],
"line_no": [
25,
27
]
} | GuestMemoryBlockList *FUNC_0(Error **errp)
{
GuestMemoryBlockList *head, **link;
Error *local_err = NULL;
struct dirent *VAR_0;
DIR *dp;
head = NULL;
link = &head;
dp = opendir("/sys/devices/system/memory/");
if (!dp) {
error_setg_errno(errp, errno, "Can't open dire... | [
"GuestMemoryBlockList *FUNC_0(Error **errp)\n{",
"GuestMemoryBlockList *head, **link;",
"Error *local_err = NULL;",
"struct dirent *VAR_0;",
"DIR *dp;",
"head = NULL;",
"link = &head;",
"dp = opendir(\"/sys/devices/system/memory/\");",
"if (!dp) {",
"error_setg_errno(errp, errno, \"Can't open dire... | [
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
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
45
],
[
47
],
[
49
],
[
53,
55
],
[
57
],
[
59
],
[
63
... |
5,173 | int qcrypto_cipher_decrypt(QCryptoCipher *cipher,
const void *in,
void *out,
size_t len,
Error **errp)
{
QCryptoCipherBuiltin *ctxt = cipher->opaque;
return ctxt->decrypt(cipher, in, out, len, errp); | true | qemu | 3a661f1eabf7e8db66e28489884d9b54aacb94ea | int qcrypto_cipher_decrypt(QCryptoCipher *cipher,
const void *in,
void *out,
size_t len,
Error **errp)
{
QCryptoCipherBuiltin *ctxt = cipher->opaque;
return ctxt->decrypt(cipher, in, out, len, errp); | {
"code": [],
"line_no": []
} | int FUNC_0(QCryptoCipher *VAR_0,
const void *VAR_1,
void *VAR_2,
size_t VAR_3,
Error **VAR_4)
{
QCryptoCipherBuiltin *ctxt = VAR_0->opaque;
return ctxt->decrypt(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4); | [
"int FUNC_0(QCryptoCipher *VAR_0,\nconst void *VAR_1,\nvoid *VAR_2,\nsize_t VAR_3,\nError **VAR_4)\n{",
"QCryptoCipherBuiltin *ctxt = VAR_0->opaque;",
"return ctxt->decrypt(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4);"
] | [
0,
0,
0
] | [
[
1,
2,
3,
4,
5,
6
],
[
7
],
[
8
]
] |
5,175 | static int get_blocksize(BlockDriverState *bdrv)
{
uint8_t cmd[10];
uint8_t buf[8];
uint8_t sensebuf[8];
sg_io_hdr_t io_header;
int ret;
memset(cmd, 0, sizeof(cmd));
memset(buf, 0, sizeof(buf));
cmd[0] = READ_CAPACITY;
memset(&io_header, 0, sizeof(io_header));
io_h... | true | qemu | 5e30a07d6d70d3073ff61e6db79d61c2b688502f | static int get_blocksize(BlockDriverState *bdrv)
{
uint8_t cmd[10];
uint8_t buf[8];
uint8_t sensebuf[8];
sg_io_hdr_t io_header;
int ret;
memset(cmd, 0, sizeof(cmd));
memset(buf, 0, sizeof(buf));
cmd[0] = READ_CAPACITY;
memset(&io_header, 0, sizeof(io_header));
io_h... | {
"code": [
" cmd[0] = READ_CAPACITY;"
],
"line_no": [
21
]
} | static int FUNC_0(BlockDriverState *VAR_0)
{
uint8_t cmd[10];
uint8_t buf[8];
uint8_t sensebuf[8];
sg_io_hdr_t io_header;
int VAR_1;
memset(cmd, 0, sizeof(cmd));
memset(buf, 0, sizeof(buf));
cmd[0] = READ_CAPACITY;
memset(&io_header, 0, sizeof(io_header));
io_heade... | [
"static int FUNC_0(BlockDriverState *VAR_0)\n{",
"uint8_t cmd[10];",
"uint8_t buf[8];",
"uint8_t sensebuf[8];",
"sg_io_hdr_t io_header;",
"int VAR_1;",
"memset(cmd, 0, sizeof(cmd));",
"memset(buf, 0, sizeof(buf));",
"cmd[0] = READ_CAPACITY;",
"memset(&io_header, 0, sizeof(io_header));",
"io_head... | [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
... |
5,179 | static int svq1_decode_block_non_intra(GetBitContext *bitbuf, uint8_t *pixels,
ptrdiff_t pitch)
{
uint32_t bit_cache;
uint8_t *list[63];
uint32_t *dst;
const uint32_t *codebook;
int entries[6];
int i, j, m, n;
int stages;
unsigned mean;
... | true | FFmpeg | aed84ee4d1b0c9e315a84b1ee0918fa49ee9cc09 | static int svq1_decode_block_non_intra(GetBitContext *bitbuf, uint8_t *pixels,
ptrdiff_t pitch)
{
uint32_t bit_cache;
uint8_t *list[63];
uint32_t *dst;
const uint32_t *codebook;
int entries[6];
int i, j, m, n;
int stages;
unsigned mean;
... | {
"code": [
" int entries[6];",
" int entries[6];"
],
"line_no": [
15,
15
]
} | static int FUNC_0(GetBitContext *VAR_0, uint8_t *VAR_1,
ptrdiff_t VAR_2)
{
uint32_t bit_cache;
uint8_t *list[63];
uint32_t *dst;
const uint32_t *VAR_3;
int VAR_4[6];
int VAR_5, VAR_6, VAR_7, VAR_8;
int VAR_9;
unsigned VAR_10;
int VAR_... | [
"static int FUNC_0(GetBitContext *VAR_0, uint8_t *VAR_1,\nptrdiff_t VAR_2)\n{",
"uint32_t bit_cache;",
"uint8_t *list[63];",
"uint32_t *dst;",
"const uint32_t *VAR_3;",
"int VAR_4[6];",
"int VAR_5, VAR_6, VAR_7, VAR_8;",
"int VAR_9;",
"unsigned VAR_10;",
"int VAR_11, VAR_12, VAR_13, VAR_14, VAR_15... | [
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,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
31
],
[
37
],
[
39
],
[
45
],
[
47
],
[
49
],
[
55
],
[
59,
61
... |
5,181 | void do_interrupt (CPUState *env)
{
#if !defined(CONFIG_USER_ONLY)
target_ulong offset;
int cause = -1;
const char *name;
if (qemu_log_enabled() && env->exception_index != EXCP_EXT_INTERRUPT) {
if (env->exception_index < 0 || env->exception_index > EXCP_LAST)
name = "unknow... | true | qemu | e7d81004e486b0e80a674d164d8aec0e83fa812f | void do_interrupt (CPUState *env)
{
#if !defined(CONFIG_USER_ONLY)
target_ulong offset;
int cause = -1;
const char *name;
if (qemu_log_enabled() && env->exception_index != EXCP_EXT_INTERRUPT) {
if (env->exception_index < 0 || env->exception_index > EXCP_LAST)
name = "unknow... | {
"code": [],
"line_no": []
} | void FUNC_0 (CPUState *VAR_0)
{
#if !defined(CONFIG_USER_ONLY)
target_ulong offset;
int VAR_1 = -1;
const char *VAR_2;
if (qemu_log_enabled() && VAR_0->exception_index != EXCP_EXT_INTERRUPT) {
if (VAR_0->exception_index < 0 || VAR_0->exception_index > EXCP_LAST)
VAR_2 = "un... | [
"void FUNC_0 (CPUState *VAR_0)\n{",
"#if !defined(CONFIG_USER_ONLY)\ntarget_ulong offset;",
"int VAR_1 = -1;",
"const char *VAR_2;",
"if (qemu_log_enabled() && VAR_0->exception_index != EXCP_EXT_INTERRUPT) {",
"if (VAR_0->exception_index < 0 || VAR_0->exception_index > EXCP_LAST)\nVAR_2 = \"unknown\";",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
27,
29
],
[
31
],
[
33,
35,
37
],
[
39
],
[
41
],
[
43,
45
],
[
55
],
[
57
],
[
59,
61
... |
5,182 | static int dxva2_h264_decode_slice(AVCodecContext *avctx,
const uint8_t *buffer,
uint32_t size)
{
const H264Context *h = avctx->priv_data;
struct dxva_context *ctx = avctx->hwaccel_context;
const Picture *current_picture = h->cur_pi... | false | FFmpeg | 276839b8de7ff836a529bbd6221f615a343b23e1 | static int dxva2_h264_decode_slice(AVCodecContext *avctx,
const uint8_t *buffer,
uint32_t size)
{
const H264Context *h = avctx->priv_data;
struct dxva_context *ctx = avctx->hwaccel_context;
const Picture *current_picture = h->cur_pi... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0,
const uint8_t *VAR_1,
uint32_t VAR_2)
{
const H264Context *VAR_3 = VAR_0->priv_data;
struct dxva_context *VAR_4 = VAR_0->hwaccel_context;
const Picture *VAR_5 = VAR_3->cur_pic_ptr;
struc... | [
"static int FUNC_0(AVCodecContext *VAR_0,\nconst uint8_t *VAR_1,\nuint32_t VAR_2)\n{",
"const H264Context *VAR_3 = VAR_0->priv_data;",
"struct dxva_context *VAR_4 = VAR_0->hwaccel_context;",
"const Picture *VAR_5 = VAR_3->cur_pic_ptr;",
"struct dxva2_picture_context *VAR_6 = VAR_5->hwaccel_picture_private;"... | [
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
],
[
35
],
[
37,
39,
41
],
[
43,
45,
47
],
[
49
],
[
53,
55
],
[
57
],
[... |
5,183 | static int wavpack_encode_block(WavPackEncodeContext *s,
int32_t *samples_l, int32_t *samples_r,
uint8_t *out, int out_size)
{
int block_size, start, end, data_size, tcount, temp, m = 0;
int i, j, ret = 0, got_extra = 0, nb_samples = s->block_... | false | FFmpeg | e32eddaa51ad6e84ce9592b9634a788fcda9bad3 | static int wavpack_encode_block(WavPackEncodeContext *s,
int32_t *samples_l, int32_t *samples_r,
uint8_t *out, int out_size)
{
int block_size, start, end, data_size, tcount, temp, m = 0;
int i, j, ret = 0, got_extra = 0, nb_samples = s->block_... | {
"code": [],
"line_no": []
} | static int FUNC_0(WavPackEncodeContext *VAR_0,
int32_t *VAR_1, int32_t *VAR_2,
uint8_t *VAR_3, int VAR_4)
{
int VAR_5, VAR_20, VAR_7, VAR_8, VAR_20, VAR_10, VAR_11 = 0;
int VAR_12, VAR_13, VAR_14 = 0, VAR_15 = 0, VAR_16 = VAR_0->block_samples;... | [
"static int FUNC_0(WavPackEncodeContext *VAR_0,\nint32_t *VAR_1, int32_t *VAR_2,\nuint8_t *VAR_3, int VAR_4)\n{",
"int VAR_5, VAR_20, VAR_7, VAR_8, VAR_20, VAR_10, VAR_11 = 0;",
"int VAR_12, VAR_13, VAR_14 = 0, VAR_15 = 0, VAR_16 = VAR_0->block_samples;",
"uint32_t crc = 0xffffffffu;",
"struct Decorr *VAR_1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35,
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
],
[... |
5,184 | static int mpegts_probe(AVProbeData *p)
{
const int size = p->buf_size;
int score, fec_score, dvhs_score;
int check_count = size / TS_FEC_PACKET_SIZE;
#define CHECK_COUNT 10
if (check_count < CHECK_COUNT)
return AVERROR_INVALIDDATA;
score = analyze(p->buf, TS_PACKET_SIZE * check_... | true | FFmpeg | 1509c018bd5b054a2354e20021ccbac9c934d213 | static int mpegts_probe(AVProbeData *p)
{
const int size = p->buf_size;
int score, fec_score, dvhs_score;
int check_count = size / TS_FEC_PACKET_SIZE;
#define CHECK_COUNT 10
if (check_count < CHECK_COUNT)
return AVERROR_INVALIDDATA;
score = analyze(p->buf, TS_PACKET_SIZE * check_... | {
"code": [
" TS_PACKET_SIZE, NULL) * CHECK_COUNT / check_count;",
" TS_DVHS_PACKET_SIZE, NULL) * CHECK_COUNT / check_count;",
" TS_FEC_PACKET_SIZE, NULL) * CHECK_COUNT / check_count;"
],
"line_no": [
23,
27,
31
]
} | static int FUNC_0(AVProbeData *VAR_0)
{
const int VAR_1 = VAR_0->buf_size;
int VAR_2, VAR_3, VAR_4;
int VAR_5 = VAR_1 / TS_FEC_PACKET_SIZE;
#define CHECK_COUNT 10
if (VAR_5 < CHECK_COUNT)
return AVERROR_INVALIDDATA;
VAR_2 = analyze(VAR_0->buf, TS_PACKET_SIZE * VAR_5,
... | [
"static int FUNC_0(AVProbeData *VAR_0)\n{",
"const int VAR_1 = VAR_0->buf_size;",
"int VAR_2, VAR_3, VAR_4;",
"int VAR_5 = VAR_1 / TS_FEC_PACKET_SIZE;",
"#define CHECK_COUNT 10\nif (VAR_5 < CHECK_COUNT)\nreturn AVERROR_INVALIDDATA;",
"VAR_2 = analyze(VAR_0->buf, TS_PACKET_SIZE * VAR_5,\nTS_PACKET_SIZE, NU... | [
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11,
15,
17
],
[
21,
23
],
[
25,
27
],
[
29,
31
],
[
33,
35
],
[
43,
45
],
[
47,
49
],
[
51,
53
],
[
55,
57
],
[
59
]
] |
5,185 | static inline int l1_unscale(int n, int mant, int scale_factor)
{
int shift, mod;
int64_t val;
shift = scale_factor_modshift[scale_factor];
mod = shift & 3;
shift >>= 2;
val = MUL64(mant + (-1 << n) + 1, scale_factor_mult[n-1][mod]);
shift += n;
/* NOTE: at this poi... | true | FFmpeg | 0be95996d0a07a2f92105da1ed8c13d239c46ad8 | static inline int l1_unscale(int n, int mant, int scale_factor)
{
int shift, mod;
int64_t val;
shift = scale_factor_modshift[scale_factor];
mod = shift & 3;
shift >>= 2;
val = MUL64(mant + (-1 << n) + 1, scale_factor_mult[n-1][mod]);
shift += n;
return (int)((... | {
"code": [
" val = MUL64(mant + (-1 << n) + 1, scale_factor_mult[n-1][mod]);"
],
"line_no": [
17
]
} | static inline int FUNC_0(int VAR_0, int VAR_1, int VAR_2)
{
int VAR_3, VAR_4;
int64_t val;
VAR_3 = scale_factor_modshift[VAR_2];
VAR_4 = VAR_3 & 3;
VAR_3 >>= 2;
val = MUL64(VAR_1 + (-1 << VAR_0) + 1, scale_factor_mult[VAR_0-1][VAR_4]);
VAR_3 += VAR_0;
return (... | [
"static inline int FUNC_0(int VAR_0, int VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4;",
"int64_t val;",
"VAR_3 = scale_factor_modshift[VAR_2];",
"VAR_4 = VAR_3 & 3;",
"VAR_3 >>= 2;",
"val = MUL64(VAR_1 + (-1 << VAR_0) + 1, scale_factor_mult[VAR_0-1][VAR_4]);",
"VAR_3 += VAR_0;",
"return (int... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
]
] |
5,186 | static int read_low_coeffs(AVCodecContext *avctx, int16_t *dst, int size, int width, ptrdiff_t stride)
{
PixletContext *ctx = avctx->priv_data;
GetBitContext *b = &ctx->gbit;
unsigned cnt1, nbits, k, j = 0, i = 0;
int64_t value, state = 3;
int rlen, escape, flag = 0;
while (i < size) {
... | true | FFmpeg | 1f5b6c7e1ee604b1525b3ab84ea6e8817fe66f36 | static int read_low_coeffs(AVCodecContext *avctx, int16_t *dst, int size, int width, ptrdiff_t stride)
{
PixletContext *ctx = avctx->priv_data;
GetBitContext *b = &ctx->gbit;
unsigned cnt1, nbits, k, j = 0, i = 0;
int64_t value, state = 3;
int rlen, escape, flag = 0;
while (i < size) {
... | {
"code": [
" if (state * 4 > 0xFF || i >= size)",
" if (state * 4 > 0xFF || i >= size)"
],
"line_no": [
71,
71
]
} | static int FUNC_0(AVCodecContext *VAR_0, int16_t *VAR_1, int VAR_2, int VAR_3, ptrdiff_t VAR_4)
{
PixletContext *ctx = VAR_0->priv_data;
GetBitContext *b = &ctx->gbit;
unsigned VAR_5, VAR_6, VAR_7, VAR_8 = 0, VAR_9 = 0;
int64_t value, state = 3;
int VAR_10, VAR_11, VAR_12 = 0;
while (VA... | [
"static int FUNC_0(AVCodecContext *VAR_0, int16_t *VAR_1, int VAR_2, int VAR_3, ptrdiff_t VAR_4)\n{",
"PixletContext *ctx = VAR_0->priv_data;",
"GetBitContext *b = &ctx->gbit;",
"unsigned VAR_5, VAR_6, VAR_7, VAR_8 = 0, VAR_9 = 0;",
"int64_t value, state = 3;",
"int VAR_10, VAR_11, VAR_12 = 0;",
"while ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
5,187 | static void fdctrl_raise_irq(FDCtrl *fdctrl, uint8_t status0)
{
/* Sparc mutation */
if (fdctrl->sun4m && (fdctrl->msr & FD_MSR_CMDBUSY)) {
/* XXX: not sure */
fdctrl->msr &= ~FD_MSR_CMDBUSY;
fdctrl->msr |= FD_MSR_RQM | FD_MSR_DIO;
fdctrl->status0 = status0;
retur... | true | qemu | cfb08fbafcd946341bdf14103293887763802697 | static void fdctrl_raise_irq(FDCtrl *fdctrl, uint8_t status0)
{
if (fdctrl->sun4m && (fdctrl->msr & FD_MSR_CMDBUSY)) {
fdctrl->msr &= ~FD_MSR_CMDBUSY;
fdctrl->msr |= FD_MSR_RQM | FD_MSR_DIO;
fdctrl->status0 = status0;
return;
}
if (!(fdctrl->sra & FD_S... | {
"code": [
" if (cur_drv->max_track) {"
],
"line_no": [
37
]
} | static void FUNC_0(FDCtrl *VAR_0, uint8_t VAR_1)
{
if (VAR_0->sun4m && (VAR_0->msr & FD_MSR_CMDBUSY)) {
VAR_0->msr &= ~FD_MSR_CMDBUSY;
VAR_0->msr |= FD_MSR_RQM | FD_MSR_DIO;
VAR_0->VAR_1 = VAR_1;
return;
}
if (!(VAR_0->sra & FD_SRA_INTPEND)) {
... | [
"static void FUNC_0(FDCtrl *VAR_0, uint8_t VAR_1)\n{",
"if (VAR_0->sun4m && (VAR_0->msr & FD_MSR_CMDBUSY)) {",
"VAR_0->msr &= ~FD_MSR_CMDBUSY;",
"VAR_0->msr |= FD_MSR_RQM | FD_MSR_DIO;",
"VAR_0->VAR_1 = VAR_1;",
"return;",
"}",
"if (!(VAR_0->sra & FD_SRA_INTPEND)) {",
"qemu_set_irq(VAR_0->irq, 1);",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
4... |
5,188 | static void qemu_net_queue_append_iov(NetQueue *queue,
NetClientState *sender,
unsigned flags,
const struct iovec *iov,
int iovcnt,
... | true | qemu | 7d91ddd25e3a4e5008a2ac16127d51a34fd56bf1 | static void qemu_net_queue_append_iov(NetQueue *queue,
NetClientState *sender,
unsigned flags,
const struct iovec *iov,
int iovcnt,
... | {
"code": [],
"line_no": []
} | static void FUNC_0(NetQueue *VAR_0,
NetClientState *VAR_1,
unsigned VAR_2,
const struct iovec *VAR_3,
int VAR_4,
NetPacketSen... | [
"static void FUNC_0(NetQueue *VAR_0,\nNetClientState *VAR_1,\nunsigned VAR_2,\nconst struct iovec *VAR_3,\nint VAR_4,\nNetPacketSent *VAR_5)\n{",
"NetPacket *packet;",
"size_t max_len = 0;",
"int VAR_6;",
"if (VAR_0->nq_count >= VAR_0->nq_maxlen && !VAR_5) {",
"return;",
"}",
"for (VAR_6 = 0; VAR_6 < ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11,
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49
],
[
51
],
[... |
5,189 | static int ivr_read_header(AVFormatContext *s)
{
unsigned tag, type, len, tlen, value;
int i, j, n, count, nb_streams, ret;
uint8_t key[256], val[256];
AVIOContext *pb = s->pb;
AVStream *st;
int64_t pos, offset, temp;
pos = avio_tell(pb);
tag = avio_rl32(pb);
if (tag == M... | true | FFmpeg | 80ceb4696ab7b9c40a0e456a866c473a5291d2f2 | static int ivr_read_header(AVFormatContext *s)
{
unsigned tag, type, len, tlen, value;
int i, j, n, count, nb_streams, ret;
uint8_t key[256], val[256];
AVIOContext *pb = s->pb;
AVStream *st;
int64_t pos, offset, temp;
pos = avio_tell(pb);
tag = avio_rl32(pb);
if (tag == M... | {
"code": [
" int i, j, n, count, nb_streams, ret;"
],
"line_no": [
7
]
} | static int FUNC_0(AVFormatContext *VAR_0)
{
unsigned VAR_1, VAR_2, VAR_3, VAR_4, VAR_5;
int VAR_6, VAR_12, VAR_8, VAR_9, VAR_10, VAR_11;
uint8_t key[256], val[256];
AVIOContext *pb = VAR_0->pb;
AVStream *st;
int64_t pos, offset, temp;
pos = avio_tell(pb);
VAR_1 = avio_rl32(pb)... | [
"static int FUNC_0(AVFormatContext *VAR_0)\n{",
"unsigned VAR_1, VAR_2, VAR_3, VAR_4, VAR_5;",
"int VAR_6, VAR_12, VAR_8, VAR_9, VAR_10, VAR_11;",
"uint8_t key[256], val[256];",
"AVIOContext *pb = VAR_0->pb;",
"AVStream *st;",
"int64_t pos, offset, temp;",
"pos = avio_tell(pb);",
"VAR_1 = avio_rl32(... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
... |
5,192 | static int parse_filter(const char *spec, struct USBAutoFilter *f)
{
enum { BUS, DEV, VID, PID, DONE };
const char *p = spec;
int i;
f->bus_num = -1;
f->addr = -1;
f->vendor_id = -1;
f->product_id = -1;
for (i = BUS; i < DONE; i++) {
p = strpbrk(p, ":.");
... | true | qemu | 0745eb1e4336bf665a911754d18ddd63794b352d | static int parse_filter(const char *spec, struct USBAutoFilter *f)
{
enum { BUS, DEV, VID, PID, DONE };
const char *p = spec;
int i;
f->bus_num = -1;
f->addr = -1;
f->vendor_id = -1;
f->product_id = -1;
for (i = BUS; i < DONE; i++) {
p = strpbrk(p, ":.");
... | {
"code": [
" f->bus_num = -1;",
" f->addr = -1;",
" f->vendor_id = -1;",
" f->product_id = -1;"
],
"line_no": [
13,
15,
17,
19
]
} | static int FUNC_0(const char *VAR_0, struct USBAutoFilter *VAR_1)
{
enum { BUS, DEV, VID, PID, DONE };
const char *VAR_2 = VAR_0;
int VAR_3;
VAR_1->bus_num = -1;
VAR_1->addr = -1;
VAR_1->vendor_id = -1;
VAR_1->product_id = -1;
for (VAR_3 = BUS; VAR_3 < DONE; VAR_3+... | [
"static int FUNC_0(const char *VAR_0, struct USBAutoFilter *VAR_1)\n{",
"enum { BUS, DEV, VID, PID, DONE };",
"const char *VAR_2 = VAR_0;",
"int VAR_3;",
"VAR_1->bus_num = -1;",
"VAR_1->addr = -1;",
"VAR_1->vendor_id = -1;",
"VAR_1->product_id = -1;",
"for (VAR_3 = BUS; VAR_3 < DONE; VAR_3... | [
0,
0,
0,
0,
1,
1,
1,
1,
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
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[... |
5,193 | static void inline xan_wc3_build_palette(XanContext *s,
unsigned int *palette_data)
{
int i;
unsigned char r, g, b;
unsigned short *palette16;
unsigned int *palette32;
unsigned int pal_elem;
/* transform the palette passed through the palette control structure
* into the nec... | false | FFmpeg | ca16618b01abfde44b4eaf92dc89b01aa1b4a91e | static void inline xan_wc3_build_palette(XanContext *s,
unsigned int *palette_data)
{
int i;
unsigned char r, g, b;
unsigned short *palette16;
unsigned int *palette32;
unsigned int pal_elem;
switch (s->avctx->pix_fmt) {
case PIX_FMT_RGB555:
palette16 = (u... | {
"code": [],
"line_no": []
} | static void inline FUNC_0(XanContext *VAR_0,
unsigned int *VAR_1)
{
int VAR_2;
unsigned char VAR_3, VAR_4, VAR_5;
unsigned short *VAR_6;
unsigned int *VAR_7;
unsigned int VAR_8;
switch (VAR_0->avctx->pix_fmt) {
case PIX_FMT_RGB555:
VAR_6 = (unsigned short... | [
"static void inline FUNC_0(XanContext *VAR_0,\nunsigned int *VAR_1)\n{",
"int VAR_2;",
"unsigned char VAR_3, VAR_4, VAR_5;",
"unsigned short *VAR_6;",
"unsigned int *VAR_7;",
"unsigned int VAR_8;",
"switch (VAR_0->avctx->pix_fmt) {",
"case PIX_FMT_RGB555:\nVAR_6 = (unsigned short *)VAR_0->palette;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
],
[
25
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45,
47,
49
],
[
51
],
[
53
],
[
57,
59
... |
5,194 | int MPV_common_init(MpegEncContext *s)
{
int c_size, i;
UINT8 *pict;
s->dct_unquantize_h263 = dct_unquantize_h263_c;
s->dct_unquantize_mpeg1 = dct_unquantize_mpeg1_c;
s->dct_unquantize_mpeg2 = dct_unquantize_mpeg2_c;
#ifdef HAVE_MMX
MPV_common_init_mmx(s);
#endif
//setu... | false | FFmpeg | 7f2fe444a39bca733d390b6608801c5f002bfd31 | int MPV_common_init(MpegEncContext *s)
{
int c_size, i;
UINT8 *pict;
s->dct_unquantize_h263 = dct_unquantize_h263_c;
s->dct_unquantize_mpeg1 = dct_unquantize_mpeg1_c;
s->dct_unquantize_mpeg2 = dct_unquantize_mpeg2_c;
#ifdef HAVE_MMX
MPV_common_init_mmx(s);
#endif
... | {
"code": [],
"line_no": []
} | int FUNC_0(MpegEncContext *VAR_0)
{
int VAR_11, VAR_11;
UINT8 *pict;
VAR_0->dct_unquantize_h263 = dct_unquantize_h263_c;
VAR_0->dct_unquantize_mpeg1 = dct_unquantize_mpeg1_c;
VAR_0->dct_unquantize_mpeg2 = dct_unquantize_mpeg2_c;
#ifdef HAVE_MMX
MPV_common_init_mmx(VAR_0);
#e... | [
"int FUNC_0(MpegEncContext *VAR_0)\n{",
"int VAR_11, VAR_11;",
"UINT8 *pict;",
"VAR_0->dct_unquantize_h263 = dct_unquantize_h263_c;",
"VAR_0->dct_unquantize_mpeg1 = dct_unquantize_mpeg1_c;",
"VAR_0->dct_unquantize_mpeg2 = dct_unquantize_mpeg2_c;",
"#ifdef HAVE_MMX\nMPV_common_init_mmx(VAR_0);",
"#endi... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
23,
27,
29
],
[
31,
33
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47
],
[
49
],
[
53
],
[
55
],
[
57... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.