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
21,856
static void spapr_dt_rtas(sPAPRMachineState *spapr, void *fdt) { int rtas; GString *hypertas = g_string_sized_new(256); GString *qemu_hypertas = g_string_sized_new(256); uint32_t refpoints[] = { cpu_to_be32(0x4), cpu_to_be32(0x4) }; uint64_t max_hotplug_addr = spapr->hotplug_memory.base + ...
false
qemu
4f441474c61f317de7927edfdb1d042b0b6f3882
static void spapr_dt_rtas(sPAPRMachineState *spapr, void *fdt) { int rtas; GString *hypertas = g_string_sized_new(256); GString *qemu_hypertas = g_string_sized_new(256); uint32_t refpoints[] = { cpu_to_be32(0x4), cpu_to_be32(0x4) }; uint64_t max_hotplug_addr = spapr->hotplug_memory.base + ...
{ "code": [], "line_no": [] }
static void FUNC_0(sPAPRMachineState *VAR_0, void *VAR_1) { int VAR_2; GString *hypertas = g_string_sized_new(256); GString *qemu_hypertas = g_string_sized_new(256); uint32_t refpoints[] = { cpu_to_be32(0x4), cpu_to_be32(0x4) }; uint64_t max_hotplug_addr = VAR_0->hotplug_memory.base + ...
[ "static void FUNC_0(sPAPRMachineState *VAR_0, void *VAR_1)\n{", "int VAR_2;", "GString *hypertas = g_string_sized_new(256);", "GString *qemu_hypertas = g_string_sized_new(256);", "uint32_t refpoints[] = { cpu_to_be32(0x4), cpu_to_be32(0x4) };", "uint64_t max_hotplug_addr = VAR_0->hotplug_memory.base +\nme...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13, 15 ], [ 17 ], [ 19, 21, 23, 25, 27 ], [ 31 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [...
21,857
static ssize_t nbd_co_receive_request(NBDRequest *req, struct nbd_request *request) { NBDClient *client = req->client; uint32_t command; ssize_t rc; g_assert(qemu_in_coroutine()); client->recv_coroutine = qemu_coroutine_self(); nbd_update_can_read(...
false
qemu
b626b51a6721e53817155af720243f59072e424f
static ssize_t nbd_co_receive_request(NBDRequest *req, struct nbd_request *request) { NBDClient *client = req->client; uint32_t command; ssize_t rc; g_assert(qemu_in_coroutine()); client->recv_coroutine = qemu_coroutine_self(); nbd_update_can_read(...
{ "code": [], "line_no": [] }
static ssize_t FUNC_0(NBDRequest *req, struct nbd_request *request) { NBDClient *client = req->client; uint32_t command; ssize_t rc; g_assert(qemu_in_coroutine()); client->recv_coroutine = qemu_coroutine_self(); nbd_update_can_read(client); ...
[ "static ssize_t FUNC_0(NBDRequest *req,\nstruct nbd_request *request)\n{", "NBDClient *client = req->client;", "uint32_t command;", "ssize_t rc;", "g_assert(qemu_in_coroutine());", "client->recv_coroutine = qemu_coroutine_self();", "nbd_update_can_read(client);", "rc = nbd_receive_request(client->ioc,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 39 ], [ 43 ], [ 45 ], [ 49 ], [ 51 ], [...
21,859
static void qio_channel_socket_listen_worker(QIOTask *task, gpointer opaque) { QIOChannelSocket *ioc = QIO_CHANNEL_SOCKET(qio_task_get_source(task)); SocketAddressLegacy *addr = opaque; Error *err = NULL; qio_channel_socket_listen_sync(ioc, addr, &err...
false
qemu
bd269ebc82fbaa5fe7ce5bc7c1770ac8acecd884
static void qio_channel_socket_listen_worker(QIOTask *task, gpointer opaque) { QIOChannelSocket *ioc = QIO_CHANNEL_SOCKET(qio_task_get_source(task)); SocketAddressLegacy *addr = opaque; Error *err = NULL; qio_channel_socket_listen_sync(ioc, addr, &err...
{ "code": [], "line_no": [] }
static void FUNC_0(QIOTask *VAR_0, gpointer VAR_1) { QIOChannelSocket *ioc = QIO_CHANNEL_SOCKET(qio_task_get_source(VAR_0)); SocketAddressLegacy *addr = VAR_1; Error *err = NULL; qio_channel_socket_listen_sync(ioc, addr, &err); qio_task_set_err...
[ "static void FUNC_0(QIOTask *VAR_0,\ngpointer VAR_1)\n{", "QIOChannelSocket *ioc = QIO_CHANNEL_SOCKET(qio_task_get_source(VAR_0));", "SocketAddressLegacy *addr = VAR_1;", "Error *err = NULL;", "qio_channel_socket_listen_sync(ioc, addr, &err);", "qio_task_set_error(VAR_0, err);", "}" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 19 ], [ 21 ] ]
21,861
static void smp_parse(QemuOpts *opts) { if (opts) { unsigned cpus = qemu_opt_get_number(opts, "cpus", 0); unsigned sockets = qemu_opt_get_number(opts, "sockets", 0); unsigned cores = qemu_opt_get_number(opts, "cores", 0); unsigned threads = qemu_opt_get_number(opts, "thr...
false
qemu
0544edd88a6acea81aefe22fd0cd9a85d1eef093
static void smp_parse(QemuOpts *opts) { if (opts) { unsigned cpus = qemu_opt_get_number(opts, "cpus", 0); unsigned sockets = qemu_opt_get_number(opts, "sockets", 0); unsigned cores = qemu_opt_get_number(opts, "cores", 0); unsigned threads = qemu_opt_get_number(opts, "thr...
{ "code": [], "line_no": [] }
static void FUNC_0(QemuOpts *VAR_0) { if (VAR_0) { unsigned VAR_1 = qemu_opt_get_number(VAR_0, "VAR_1", 0); unsigned VAR_2 = qemu_opt_get_number(VAR_0, "VAR_2", 0); unsigned VAR_3 = qemu_opt_get_number(VAR_0, "VAR_3", 0); unsigned VAR_4 = qemu_opt_get_number(VAR_0, "VAR_...
[ "static void FUNC_0(QemuOpts *VAR_0)\n{", "if (VAR_0) {", "unsigned VAR_1 = qemu_opt_get_number(VAR_0, \"VAR_1\", 0);", "unsigned VAR_2 = qemu_opt_get_number(VAR_0, \"VAR_2\", 0);", "unsigned VAR_3 = qemu_opt_get_number(VAR_0, \"VAR_3\", 0);", "unsigned VAR_4 = qemu_opt_get_number(VAR_0, \"VAR_4\", 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47...
21,862
static void vp8_idct_dc_add4y_c(uint8_t *dst, int16_t block[4][16], ptrdiff_t stride) { vp8_idct_dc_add_c(dst+ 0, block[0], stride); vp8_idct_dc_add_c(dst+ 4, block[1], stride); vp8_idct_dc_add_c(dst+ 8, block[2], stride); vp8_idct_dc_add_c(dst+12, block[3], stride); }
false
FFmpeg
b8664c929437d6d079e16979c496a2db40cf2324
static void vp8_idct_dc_add4y_c(uint8_t *dst, int16_t block[4][16], ptrdiff_t stride) { vp8_idct_dc_add_c(dst+ 0, block[0], stride); vp8_idct_dc_add_c(dst+ 4, block[1], stride); vp8_idct_dc_add_c(dst+ 8, block[2], stride); vp8_idct_dc_add_c(dst+12, block[3], stride); }
{ "code": [], "line_no": [] }
static void FUNC_0(uint8_t *VAR_0, int16_t VAR_1[4][16], ptrdiff_t VAR_2) { vp8_idct_dc_add_c(VAR_0+ 0, VAR_1[0], VAR_2); vp8_idct_dc_add_c(VAR_0+ 4, VAR_1[1], VAR_2); vp8_idct_dc_add_c(VAR_0+ 8, VAR_1[2], VAR_2); vp8_idct_dc_add_c(VAR_0+12, VAR_1[3], VAR_2); }
[ "static void FUNC_0(uint8_t *VAR_0, int16_t VAR_1[4][16], ptrdiff_t VAR_2)\n{", "vp8_idct_dc_add_c(VAR_0+ 0, VAR_1[0], VAR_2);", "vp8_idct_dc_add_c(VAR_0+ 4, VAR_1[1], VAR_2);", "vp8_idct_dc_add_c(VAR_0+ 8, VAR_1[2], VAR_2);", "vp8_idct_dc_add_c(VAR_0+12, VAR_1[3], VAR_2);", "}" ]
[ 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ] ]
21,865
static void rtl8139_io_writeb(void *opaque, uint8_t addr, uint32_t val) { RTL8139State *s = opaque; switch (addr) { case MAC0 ... MAC0+5: s->phys[addr - MAC0] = val; qemu_format_nic_info_str(qemu_get_queue(s->nic), s->phys); break; case MAC0+6 ....
false
qemu
90d131fb6504ed12a37dc8433375cc683c30e9da
static void rtl8139_io_writeb(void *opaque, uint8_t addr, uint32_t val) { RTL8139State *s = opaque; switch (addr) { case MAC0 ... MAC0+5: s->phys[addr - MAC0] = val; qemu_format_nic_info_str(qemu_get_queue(s->nic), s->phys); break; case MAC0+6 ....
{ "code": [], "line_no": [] }
static void FUNC_0(void *VAR_0, uint8_t VAR_1, uint32_t VAR_2) { RTL8139State *s = VAR_0; switch (VAR_1) { case MAC0 ... MAC0+5: s->phys[VAR_1 - MAC0] = VAR_2; qemu_format_nic_info_str(qemu_get_queue(s->nic), s->phys); break; case MAC0+6 ... MAC...
[ "static void FUNC_0(void *VAR_0, uint8_t VAR_1, uint32_t VAR_2)\n{", "RTL8139State *s = VAR_0;", "switch (VAR_1)\n{", "case MAC0 ... MAC0+5:\ns->phys[VAR_1 - MAC0] = VAR_2;", "qemu_format_nic_info_str(qemu_get_queue(s->nic), s->phys);", "break;", "case MAC0+6 ... MAC0+7:\nbreak;", "case MAR0 ... MAR0+...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9, 11 ], [ 13, 15 ], [ 17 ], [ 19 ], [ 21, 25 ], [ 27, 29 ], [ 31 ], [ 33, 35 ], [ 37 ], [ 39, 41 ], [ 43 ], [ 45, 47 ], [ 49 ], [ 51, 53...
21,866
static void test_validate_fail_union(TestInputVisitorData *data, const void *unused) { UserDefUnion *tmp = NULL; Error *err = NULL; Visitor *v; v = validate_test_init(data, "{ 'type': 'b', 'data' : { 'integer': 42 } }"); visit_type_UserDefUnion(v, &tm...
false
qemu
805017b7791200f1b72deef17dc98fd272b941eb
static void test_validate_fail_union(TestInputVisitorData *data, const void *unused) { UserDefUnion *tmp = NULL; Error *err = NULL; Visitor *v; v = validate_test_init(data, "{ 'type': 'b', 'data' : { 'integer': 42 } }"); visit_type_UserDefUnion(v, &tm...
{ "code": [], "line_no": [] }
static void FUNC_0(TestInputVisitorData *VAR_0, const void *VAR_1) { UserDefUnion *tmp = NULL; Error *err = NULL; Visitor *v; v = validate_test_init(VAR_0, "{ 'type': 'b', 'VAR_0' : { 'integer': 42 } }"); visit_type_UserDefUnion(v, &tmp, NULL, &err); ...
[ "static void FUNC_0(TestInputVisitorData *VAR_0,\nconst void *VAR_1)\n{", "UserDefUnion *tmp = NULL;", "Error *err = NULL;", "Visitor *v;", "v = validate_test_init(VAR_0, \"{ 'type': 'b', 'VAR_0' : { 'integer': 42 } }\");", "visit_type_UserDefUnion(v, &tmp, NULL, &err);", "g_assert(err);", "qapi_free_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ] ]
21,867
static void nabm_writew (void *opaque, uint32_t addr, uint32_t val) { PCIAC97LinkState *d = opaque; AC97LinkState *s = &d->ac97; AC97BusMasterRegs *r = NULL; uint32_t index = addr - s->base[1]; switch (index) { case PI_SR: case PO_SR: case MC_SR: r = &s->bm_regs[GET_BM ...
false
qemu
10ee2aaa417d8d8978cdb2bbed55ebb152df5f6b
static void nabm_writew (void *opaque, uint32_t addr, uint32_t val) { PCIAC97LinkState *d = opaque; AC97LinkState *s = &d->ac97; AC97BusMasterRegs *r = NULL; uint32_t index = addr - s->base[1]; switch (index) { case PI_SR: case PO_SR: case MC_SR: r = &s->bm_regs[GET_BM ...
{ "code": [], "line_no": [] }
static void FUNC_0 (void *VAR_0, uint32_t VAR_1, uint32_t VAR_2) { PCIAC97LinkState *d = VAR_0; AC97LinkState *s = &d->ac97; AC97BusMasterRegs *r = NULL; uint32_t index = VAR_1 - s->base[1]; switch (index) { case PI_SR: case PO_SR: case MC_SR: r = &s->bm_regs[GET_BM (in...
[ "static void FUNC_0 (void *VAR_0, uint32_t VAR_1, uint32_t VAR_2)\n{", "PCIAC97LinkState *d = VAR_0;", "AC97LinkState *s = &d->ac97;", "AC97BusMasterRegs *r = NULL;", "uint32_t index = VAR_1 - s->base[1];", "switch (index) {", "case PI_SR:\ncase PO_SR:\ncase MC_SR:\nr = &s->bm_regs[GET_BM (index)];", ...
[ 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 ] ]
21,868
static void musicpal_misc_write(void *opaque, target_phys_addr_t offset, uint64_t value, unsigned size) { }
false
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
static void musicpal_misc_write(void *opaque, target_phys_addr_t offset, uint64_t value, unsigned size) { }
{ "code": [], "line_no": [] }
static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, uint64_t VAR_2, unsigned VAR_3) { }
[ "static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{", "}" ]
[ 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ] ]
21,869
void HELPER(ucf64_cmpd)(float64 a, float64 b, uint32_t c, CPUUniCore32State *env) { int flag; flag = float64_compare_quiet(a, b, &env->ucf64.fp_status); env->CF = 0; switch (c & 0x7) { case 0: /* F */ break; case 1: /* UN */ if (flag == 2) { env->CF = 1; ...
false
qemu
e8ede0a8bb5298a6979bcf7ed84ef64a64a4e3fe
void HELPER(ucf64_cmpd)(float64 a, float64 b, uint32_t c, CPUUniCore32State *env) { int flag; flag = float64_compare_quiet(a, b, &env->ucf64.fp_status); env->CF = 0; switch (c & 0x7) { case 0: break; case 1: if (flag == 2) { env->CF = 1; } ...
{ "code": [], "line_no": [] }
void FUNC_0(ucf64_cmpd)(float64 a, float64 b, uint32_t c, CPUUniCore32State *env) { int VAR_0; VAR_0 = float64_compare_quiet(a, b, &env->ucf64.fp_status); env->CF = 0; switch (c & 0x7) { case 0: break; case 1: if (VAR_0 == 2) { env->CF = 1; } ...
[ "void FUNC_0(ucf64_cmpd)(float64 a, float64 b, uint32_t c, CPUUniCore32State *env)\n{", "int VAR_0;", "VAR_0 = float64_compare_quiet(a, b, &env->ucf64.fp_status);", "env->CF = 0;", "switch (c & 0x7) {", "case 0:\nbreak;", "case 1:\nif (VAR_0 == 2) {", "env->CF = 1;", "}", "break;", "case 2:\nif ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13, 15 ], [ 17, 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27, 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37, 39 ], [ 41 ], [ 43 ], [ 45 ...
21,870
static void acpi_align_size(GArray *blob, unsigned align) { /* Align size to multiple of given size. This reduces the chance * we need to change size in the future (breaking cross version migration). */ g_array_set_size(blob, (ROUND_UP(acpi_data_len(blob), align) + g_...
false
qemu
134d42d614768b2803e551621f6654dab1fdc2d2
static void acpi_align_size(GArray *blob, unsigned align) { g_array_set_size(blob, (ROUND_UP(acpi_data_len(blob), align) + g_array_get_element_size(blob) - 1) / g_array_get_element_size(blob)); }
{ "code": [], "line_no": [] }
static void FUNC_0(GArray *VAR_0, unsigned VAR_1) { g_array_set_size(VAR_0, (ROUND_UP(acpi_data_len(VAR_0), VAR_1) + g_array_get_element_size(VAR_0) - 1) / g_array_get_element_size(VAR_0)); }
[ "static void FUNC_0(GArray *VAR_0, unsigned VAR_1)\n{", "g_array_set_size(VAR_0, (ROUND_UP(acpi_data_len(VAR_0), VAR_1) +\ng_array_get_element_size(VAR_0) - 1) /\ng_array_get_element_size(VAR_0));", "}" ]
[ 0, 0, 0 ]
[ [ 1, 3 ], [ 11, 13, 15 ], [ 17 ] ]
21,872
int fd_start_outgoing_migration(MigrationState *s, const char *fdname) { s->fd = monitor_get_fd(s->mon, fdname); if (s->fd == -1) { DPRINTF("fd_migration: invalid file descriptor identifier\n"); goto err_after_get_fd; } if (fcntl(s->fd, F_SETFL, O_NONBLOCK) == -1) { DPR...
false
qemu
e1c37d0e94048502f9874e6356ce7136d4b05bdb
int fd_start_outgoing_migration(MigrationState *s, const char *fdname) { s->fd = monitor_get_fd(s->mon, fdname); if (s->fd == -1) { DPRINTF("fd_migration: invalid file descriptor identifier\n"); goto err_after_get_fd; } if (fcntl(s->fd, F_SETFL, O_NONBLOCK) == -1) { DPR...
{ "code": [], "line_no": [] }
int FUNC_0(MigrationState *VAR_0, const char *VAR_1) { VAR_0->fd = monitor_get_fd(VAR_0->mon, VAR_1); if (VAR_0->fd == -1) { DPRINTF("fd_migration: invalid file descriptor identifier\n"); goto err_after_get_fd; } if (fcntl(VAR_0->fd, F_SETFL, O_NONBLOCK) == -1) { DPRINT...
[ "int FUNC_0(MigrationState *VAR_0, const char *VAR_1)\n{", "VAR_0->fd = monitor_get_fd(VAR_0->mon, VAR_1);", "if (VAR_0->fd == -1) {", "DPRINTF(\"fd_migration: invalid file descriptor identifier\\n\");", "goto err_after_get_fd;", "}", "if (fcntl(VAR_0->fd, F_SETFL, O_NONBLOCK) == -1) {", "DPRINTF(\"Un...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 27 ], [ 29 ], [ 31 ], [ 35 ], [ 37 ], [ 41, 43 ], [ 45, 47 ], [ 49 ] ]
21,873
int msmpeg4_decode_picture_header(MpegEncContext * s) { int code; #if 0 { int i; for(i=0; i<s->gb.size*8; i++) printf("%d", get_bits1(&s->gb)); // get_bits1(&s->gb); printf("END\n"); return -1; } #endif if(s->msmpeg4_version==1){ int start_code, num; start_code = (get_b...
false
FFmpeg
68f593b48433842f3407586679fe07f3e5199ab9
int msmpeg4_decode_picture_header(MpegEncContext * s) { int code; #if 0 { int i; for(i=0; i<s->gb.size*8; i++) printf("%d", get_bits1(&s->gb)); printf("END\n"); return -1; } #endif if(s->msmpeg4_version==1){ int start_code, num; start_code = (get_bits(&s->gb, 16)<<16) | g...
{ "code": [], "line_no": [] }
int FUNC_0(MpegEncContext * VAR_0) { int VAR_1; #if 0 { int i; for(i=0; i<VAR_0->gb.size*8; i++) printf("%d", get_bits1(&VAR_0->gb)); printf("END\n"); return -1; } #endif if(VAR_0->msmpeg4_version==1){ int VAR_2, VAR_3; VAR_2 = (get_bits(&VAR_0->gb, 16)<<16) | get_bits(&V...
[ "int FUNC_0(MpegEncContext * VAR_0)\n{", "int VAR_1;", "#if 0\n{", "int i;", "for(i=0; i<VAR_0->gb.size*8; i++)", "printf(\"%d\", get_bits1(&VAR_0->gb));", "printf(\"END\\n\");", "return -1;", "}", "#endif\nif(VAR_0->msmpeg4_version==1){", "int VAR_2, VAR_3;", "VAR_2 = (get_bits(&VAR_0->gb, 16...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ], [ 25 ], [ 27, 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 47 ], [ 49 ], [ 53...
21,874
static void usbnet_receive(void *opaque, const uint8_t *buf, size_t size) { USBNetState *s = opaque; struct rndis_packet_msg_type *msg; if (s->rndis) { msg = (struct rndis_packet_msg_type *) s->in_buf; if (!s->rndis_state == RNDIS_DATA_INITIALIZED) return; if (s...
false
qemu
e3f5ec2b5e92706e3b807059f79b1fb5d936e567
static void usbnet_receive(void *opaque, const uint8_t *buf, size_t size) { USBNetState *s = opaque; struct rndis_packet_msg_type *msg; if (s->rndis) { msg = (struct rndis_packet_msg_type *) s->in_buf; if (!s->rndis_state == RNDIS_DATA_INITIALIZED) return; if (s...
{ "code": [], "line_no": [] }
static void FUNC_0(void *VAR_0, const uint8_t *VAR_1, size_t VAR_2) { USBNetState *s = VAR_0; struct rndis_packet_msg_type *VAR_3; if (s->rndis) { VAR_3 = (struct rndis_packet_msg_type *) s->in_buf; if (!s->rndis_state == RNDIS_DATA_INITIALIZED) return; if (VAR_...
[ "static void FUNC_0(void *VAR_0, const uint8_t *VAR_1, size_t VAR_2)\n{", "USBNetState *s = VAR_0;", "struct rndis_packet_msg_type *VAR_3;", "if (s->rndis) {", "VAR_3 = (struct rndis_packet_msg_type *) s->in_buf;", "if (!s->rndis_state == RNDIS_DATA_INITIALIZED)\nreturn;", "if (VAR_2 + sizeof(struct rnd...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15, 17 ], [ 19, 21 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 51 ], [ 53 ], [ 55 ], [ 57, 59 ], [ 61 ], [ 63 ], ...
21,877
static int v9fs_walk_marshal(V9fsPDU *pdu, uint16_t nwnames, V9fsQID *qids) { int i; size_t offset = 7; offset += pdu_marshal(pdu, offset, "w", nwnames); for (i = 0; i < nwnames; i++) { offset += pdu_marshal(pdu, offset, "Q", &qids[i]); } return offset; }
false
qemu
ddca7f86ac022289840e0200fd4050b2b58e9176
static int v9fs_walk_marshal(V9fsPDU *pdu, uint16_t nwnames, V9fsQID *qids) { int i; size_t offset = 7; offset += pdu_marshal(pdu, offset, "w", nwnames); for (i = 0; i < nwnames; i++) { offset += pdu_marshal(pdu, offset, "Q", &qids[i]); } return offset; }
{ "code": [], "line_no": [] }
static int FUNC_0(V9fsPDU *VAR_0, uint16_t VAR_1, V9fsQID *VAR_2) { int VAR_3; size_t offset = 7; offset += pdu_marshal(VAR_0, offset, "w", VAR_1); for (VAR_3 = 0; VAR_3 < VAR_1; VAR_3++) { offset += pdu_marshal(VAR_0, offset, "Q", &VAR_2[VAR_3]); } return offset; }
[ "static int FUNC_0(V9fsPDU *VAR_0, uint16_t VAR_1, V9fsQID *VAR_2)\n{", "int VAR_3;", "size_t offset = 7;", "offset += pdu_marshal(VAR_0, offset, \"w\", VAR_1);", "for (VAR_3 = 0; VAR_3 < VAR_1; VAR_3++) {", "offset += pdu_marshal(VAR_0, offset, \"Q\", &VAR_2[VAR_3]);", "}", "return offset;", "}" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ] ]
21,878
static void close_unused_images(BlockDriverState *top, BlockDriverState *base, const char *base_id) { BlockDriverState *intermediate; intermediate = top->backing_hd; while (intermediate) { BlockDriverState *unused; /* reached base */ if (in...
false
qemu
88266f5aa70fa71fd5cc20aa4dbeb7a7bd8d2e92
static void close_unused_images(BlockDriverState *top, BlockDriverState *base, const char *base_id) { BlockDriverState *intermediate; intermediate = top->backing_hd; while (intermediate) { BlockDriverState *unused; if (intermediate == base...
{ "code": [], "line_no": [] }
static void FUNC_0(BlockDriverState *VAR_0, BlockDriverState *VAR_1, const char *VAR_2) { BlockDriverState *intermediate; intermediate = VAR_0->backing_hd; while (intermediate) { BlockDriverState *unused; if (intermediate == VAR_1) { ...
[ "static void FUNC_0(BlockDriverState *VAR_0, BlockDriverState *VAR_1,\nconst char *VAR_2)\n{", "BlockDriverState *intermediate;", "intermediate = VAR_0->backing_hd;", "while (intermediate) {", "BlockDriverState *unused;", "if (intermediate == VAR_1) {", "break;", "}", "unused = intermediate;", "in...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15 ], [ 21 ], [ 23 ], [ 25 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ] ]
21,879
static void qemu_paio_submit(struct qemu_paiocb *aiocb) { aiocb->ret = -EINPROGRESS; aiocb->active = 0; mutex_lock(&lock); if (idle_threads == 0 && cur_threads < max_threads) spawn_thread(); TAILQ_INSERT_TAIL(&request_list, aiocb, node); mutex_unlock(&lock); cond_signal(&con...
false
qemu
72cf2d4f0e181d0d3a3122e04129c58a95da713e
static void qemu_paio_submit(struct qemu_paiocb *aiocb) { aiocb->ret = -EINPROGRESS; aiocb->active = 0; mutex_lock(&lock); if (idle_threads == 0 && cur_threads < max_threads) spawn_thread(); TAILQ_INSERT_TAIL(&request_list, aiocb, node); mutex_unlock(&lock); cond_signal(&con...
{ "code": [], "line_no": [] }
static void FUNC_0(struct qemu_paiocb *VAR_0) { VAR_0->ret = -EINPROGRESS; VAR_0->active = 0; mutex_lock(&lock); if (idle_threads == 0 && cur_threads < max_threads) spawn_thread(); TAILQ_INSERT_TAIL(&request_list, VAR_0, node); mutex_unlock(&lock); cond_signal(&cond); }
[ "static void FUNC_0(struct qemu_paiocb *VAR_0)\n{", "VAR_0->ret = -EINPROGRESS;", "VAR_0->active = 0;", "mutex_lock(&lock);", "if (idle_threads == 0 && cur_threads < max_threads)\nspawn_thread();", "TAILQ_INSERT_TAIL(&request_list, VAR_0, node);", "mutex_unlock(&lock);", "cond_signal(&cond);", "}" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11, 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ] ]
21,881
static int raw_media_changed(BlockDriverState *bs) { return bdrv_media_changed(bs->file->bs); }
false
qemu
2e6fc7eb1a4af1b127df5f07b8bb28af891946fa
static int raw_media_changed(BlockDriverState *bs) { return bdrv_media_changed(bs->file->bs); }
{ "code": [], "line_no": [] }
static int FUNC_0(BlockDriverState *VAR_0) { return bdrv_media_changed(VAR_0->file->VAR_0); }
[ "static int FUNC_0(BlockDriverState *VAR_0)\n{", "return bdrv_media_changed(VAR_0->file->VAR_0);", "}" ]
[ 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ] ]
21,882
bool is_tcg_gen_code(uintptr_t tc_ptr) { /* This can be called during code generation, code_gen_buffer_max_size is used instead of code_gen_ptr for upper boundary checking */ return (tc_ptr >= (uintptr_t)tcg_ctx.code_gen_buffer && tc_ptr < (uintptr_t)(tcg_ctx.code_gen_buffer + ...
false
qemu
52ae646d4a3ebdcdcc973492c6a56f2c49b6578f
bool is_tcg_gen_code(uintptr_t tc_ptr) { return (tc_ptr >= (uintptr_t)tcg_ctx.code_gen_buffer && tc_ptr < (uintptr_t)(tcg_ctx.code_gen_buffer + tcg_ctx.code_gen_buffer_max_size)); }
{ "code": [], "line_no": [] }
bool FUNC_0(uintptr_t tc_ptr) { return (tc_ptr >= (uintptr_t)tcg_ctx.code_gen_buffer && tc_ptr < (uintptr_t)(tcg_ctx.code_gen_buffer + tcg_ctx.code_gen_buffer_max_size)); }
[ "bool FUNC_0(uintptr_t tc_ptr)\n{", "return (tc_ptr >= (uintptr_t)tcg_ctx.code_gen_buffer &&\ntc_ptr < (uintptr_t)(tcg_ctx.code_gen_buffer +\ntcg_ctx.code_gen_buffer_max_size));", "}" ]
[ 0, 0, 0 ]
[ [ 1, 3 ], [ 9, 11, 13 ], [ 15 ] ]
21,884
int ff_h264_decode_sei(H264Context *h) { while (get_bits_left(&h->gb) > 16) { int size = 0; int type = 0; int ret = 0; int last = 0; while (get_bits_left(&h->gb) >= 8 && (last = get_bits(&h->gb, 8)) == 255) { type += 255; } ...
false
FFmpeg
0bfab80a0d9fce0180e8aa2a947267f89b725091
int ff_h264_decode_sei(H264Context *h) { while (get_bits_left(&h->gb) > 16) { int size = 0; int type = 0; int ret = 0; int last = 0; while (get_bits_left(&h->gb) >= 8 && (last = get_bits(&h->gb, 8)) == 255) { type += 255; } ...
{ "code": [], "line_no": [] }
int FUNC_0(H264Context *VAR_0) { while (get_bits_left(&VAR_0->gb) > 16) { int VAR_1 = 0; int VAR_2 = 0; int VAR_3 = 0; int VAR_4 = 0; while (get_bits_left(&VAR_0->gb) >= 8 && (VAR_4 = get_bits(&VAR_0->gb, 8)) == 255) { VAR_2 += 255; ...
[ "int FUNC_0(H264Context *VAR_0)\n{", "while (get_bits_left(&VAR_0->gb) > 16) {", "int VAR_1 = 0;", "int VAR_2 = 0;", "int VAR_3 = 0;", "int VAR_4 = 0;", "while (get_bits_left(&VAR_0->gb) >= 8 &&\n(VAR_4 = get_bits(&VAR_0->gb, 8)) == 255) {", "VAR_2 += 255;", "}", "VAR_2 += VAR_4;", "VAR_4 = 0;"...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17, 19 ], [ 21 ], [ 23 ], [ 25 ], [ 29 ], [ 31, 33 ], [ 35 ], [ 37 ], [ 39 ], [ 43 ], [ 45, 47 ], [ 49 ], [...
21,886
av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation) { const int isRgb = c->dstFormat == AV_PIX_FMT_RGB32 || c->dstFormat == AV...
false
FFmpeg
1dd797e3c9f179f957316a0becbec048b42df8aa
av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation) { const int isRgb = c->dstFormat == AV_PIX_FMT_RGB32 || c->dstFormat == AV...
{ "code": [], "line_no": [] }
av_cold int FUNC_0(SwsContext *c, const int inv_table[4], int fullRange, int brightness, int contrast, int saturation) { const int VAR_0 = c->dstFormat == AV_PIX_FMT_RGB32 || c->dstFormat == AV_PIX_FMT_RGB32_1 ...
[ "av_cold int FUNC_0(SwsContext *c, const int inv_table[4],\nint fullRange, int brightness,\nint contrast, int saturation)\n{", "const int VAR_0 = c->dstFormat == AV_PIX_FMT_RGB32 ||\nc->dstFormat == AV_PIX_FMT_RGB32_1 ||\nc->dstFormat == AV_PIX_FMT_BGR24 ||\nc->dstFormat == AV_PIX_FMT_RGB565BE ||\nc->d...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3, 5, 7 ], [ 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33 ], [ 35, 37, 39, 41, 43, 45 ], [ 47 ], [ 49 ], [ 51 ], [ 53 ], [ 55 ], [ 57 ], [ 61 ], [...
21,887
static int vp3_decode_init(AVCodecContext *avctx) { Vp3DecodeContext *s = avctx->priv_data; int i; s->avctx = avctx; s->width = avctx->width; s->height = avctx->height; avctx->pix_fmt = PIX_FMT_YUV420P; avctx->has_b_frames = 0; dsputil_init(&s->dsp, avctx); /* initializ...
false
FFmpeg
892fc83e88a20f9543c6c5be3626712be7a2e6f2
static int vp3_decode_init(AVCodecContext *avctx) { Vp3DecodeContext *s = avctx->priv_data; int i; s->avctx = avctx; s->width = avctx->width; s->height = avctx->height; avctx->pix_fmt = PIX_FMT_YUV420P; avctx->has_b_frames = 0; dsputil_init(&s->dsp, avctx); s->q...
{ "code": [], "line_no": [] }
static int FUNC_0(AVCodecContext *VAR_0) { Vp3DecodeContext *s = VAR_0->priv_data; int VAR_1; s->VAR_0 = VAR_0; s->width = VAR_0->width; s->height = VAR_0->height; VAR_0->pix_fmt = PIX_FMT_YUV420P; VAR_0->has_b_frames = 0; dsputil_init(&s->dsp, VAR_0); s->qualit...
[ "static int FUNC_0(AVCodecContext *VAR_0)\n{", "Vp3DecodeContext *s = VAR_0->priv_data;", "int VAR_1;", "s->VAR_0 = VAR_0;", "s->width = VAR_0->width;", "s->height = VAR_0->height;", "VAR_0->pix_fmt = PIX_FMT_YUV420P;", "VAR_0->has_b_frames = 0;", "dsputil_init(&s->dsp, VAR_0);", "s->quality_index...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 47 ], [ 49 ], [ 51 ], [ 55...
21,888
static void gen_tlbsync(DisasContext *ctx) { #if defined(CONFIG_USER_ONLY) GEN_PRIV; #else CHK_HV; /* tlbsync is a nop for server, ptesync handles delayed tlb flush, * embedded however needs to deal with tlbsync. We don't try to be * fancy and swallow the overhead of checking for both. ...
true
qemu
e3cffe6fad29e07d401eabb913a6d88501d5c143
static void gen_tlbsync(DisasContext *ctx) { #if defined(CONFIG_USER_ONLY) GEN_PRIV; #else CHK_HV; gen_check_tlb_flush(ctx); #endif }
{ "code": [ " gen_check_tlb_flush(ctx);" ], "line_no": [ 23 ] }
static void FUNC_0(DisasContext *VAR_0) { #if defined(CONFIG_USER_ONLY) GEN_PRIV; #else CHK_HV; gen_check_tlb_flush(VAR_0); #endif }
[ "static void FUNC_0(DisasContext *VAR_0)\n{", "#if defined(CONFIG_USER_ONLY)\nGEN_PRIV;", "#else\nCHK_HV;", "gen_check_tlb_flush(VAR_0);", "#endif\n}" ]
[ 0, 0, 0, 1, 0 ]
[ [ 1, 3 ], [ 5, 7 ], [ 9, 11 ], [ 23 ], [ 25, 27 ] ]
21,890
static void search_for_ms(AACEncContext *s, ChannelElement *cpe) { int start = 0, i, w, w2, g, sid_sf_boost; float M[128], S[128]; float *L34 = s->scoefs, *R34 = s->scoefs + 128, *M34 = s->scoefs + 128*2, *S34 = s->scoefs + 128*3; const float lambda = s->lambda; const float mslambda = FFMIN(1....
true
FFmpeg
ca203e9985cd2dcf42a0c0853940850d3a8edf3a
static void search_for_ms(AACEncContext *s, ChannelElement *cpe) { int start = 0, i, w, w2, g, sid_sf_boost; float M[128], S[128]; float *L34 = s->scoefs, *R34 = s->scoefs + 128, *M34 = s->scoefs + 128*2, *S34 = s->scoefs + 128*3; const float lambda = s->lambda; const float mslambda = FFMIN(1....
{ "code": [ " int start = 0, i, w, w2, g, sid_sf_boost;", " for (w = 0; w < sce0->ics.num_windows; w += sce0->ics.group_len[w]) {", " int min_sf_idx_mid = SCALE_MAX_POS;", " int min_sf_idx_side = SCALE_MAX_POS;", " for (g = 0; g < sce0->ics.num_swb; g++) {", " ...
static void FUNC_0(AACEncContext *VAR_0, ChannelElement *VAR_1) { int VAR_2 = 0, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7; float VAR_8[128], VAR_9[128]; float *VAR_10 = VAR_0->scoefs, *VAR_11 = VAR_0->scoefs + 128, *VAR_12 = VAR_0->scoefs + 128*2, *VAR_13 = VAR_0->scoefs + 128*3; const float VAR_14 = VAR_...
[ "static void FUNC_0(AACEncContext *VAR_0, ChannelElement *VAR_1)\n{", "int VAR_2 = 0, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;", "float VAR_8[128], VAR_9[128];", "float *VAR_10 = VAR_0->scoefs, *VAR_11 = VAR_0->scoefs + 128, *VAR_12 = VAR_0->scoefs + 128*2, *VAR_13 = VAR_0->scoefs + 128*3;", "const float VAR_14 =...
[ 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19, 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31, 33 ], [ 35, 37 ], [ 39 ], [ 43 ], [ 45 ], [...
21,891
static void net_tx_pkt_do_sw_csum(struct NetTxPkt *pkt) { struct iovec *iov = &pkt->vec[NET_TX_PKT_L2HDR_FRAG]; uint32_t csum_cntr; uint16_t csum = 0; uint32_t cso; /* num of iovec without vhdr */ uint32_t iov_len = pkt->payload_frags + NET_TX_PKT_PL_START_FRAG - 1; uint16_t csl; ...
true
qemu
0dacea92d26c31d453c58de2e99c178fee554166
static void net_tx_pkt_do_sw_csum(struct NetTxPkt *pkt) { struct iovec *iov = &pkt->vec[NET_TX_PKT_L2HDR_FRAG]; uint32_t csum_cntr; uint16_t csum = 0; uint32_t cso; uint32_t iov_len = pkt->payload_frags + NET_TX_PKT_PL_START_FRAG - 1; uint16_t csl; struct ip_header *iphdr; ...
{ "code": [ " csum = cpu_to_be16(net_checksum_finish(csum_cntr));" ], "line_no": [ 55 ] }
static void FUNC_0(struct NetTxPkt *VAR_0) { struct iovec *VAR_1 = &VAR_0->vec[NET_TX_PKT_L2HDR_FRAG]; uint32_t csum_cntr; uint16_t csum = 0; uint32_t cso; uint32_t iov_len = VAR_0->payload_frags + NET_TX_PKT_PL_START_FRAG - 1; uint16_t csl; struct ip_header *VAR_2; size_t...
[ "static void FUNC_0(struct NetTxPkt *VAR_0)\n{", "struct iovec *VAR_1 = &VAR_0->vec[NET_TX_PKT_L2HDR_FRAG];", "uint32_t csum_cntr;", "uint16_t csum = 0;", "uint32_t cso;", "uint32_t iov_len = VAR_0->payload_frags + NET_TX_PKT_PL_START_FRAG - 1;", "uint16_t csl;", "struct ip_header *VAR_2;", "size_t ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 27 ], [ 33 ], [ 39 ], [ 41 ], [ 47, 49 ], [ 55 ], [ 57 ], [ 59 ] ]
21,892
static av_cold int xvid_encode_init(AVCodecContext *avctx) { int xerr, i, ret = -1; int xvid_flags = avctx->flags; struct xvid_context *x = avctx->priv_data; uint16_t *intra, *inter; int fd; xvid_plugin_single_t single = { 0 }; struct xvid_ff_pass1 rc2pass1 ...
true
FFmpeg
0b9b3163f2a9be54b986f1e7e7d55a88d1e2f2a8
static av_cold int xvid_encode_init(AVCodecContext *avctx) { int xerr, i, ret = -1; int xvid_flags = avctx->flags; struct xvid_context *x = avctx->priv_data; uint16_t *intra, *inter; int fd; xvid_plugin_single_t single = { 0 }; struct xvid_ff_pass1 rc2pass1 ...
{ "code": [ " AVPacket packet;" ], "line_no": [ 687 ] }
static av_cold int FUNC_0(AVCodecContext *avctx) { int VAR_0, VAR_1, VAR_9 = -1; int VAR_3 = avctx->flags; struct xvid_context *VAR_4 = avctx->priv_data; uint16_t *intra, *inter; int VAR_5; xvid_plugin_single_t single = { 0 }; struct xvid_ff_pass1 VAR_6 = ...
[ "static av_cold int FUNC_0(AVCodecContext *avctx)\n{", "int VAR_0, VAR_1, VAR_9 = -1;", "int VAR_3 = avctx->flags;", "struct xvid_context *VAR_4 = avctx->priv_data;", "uint16_t *intra, *inter;", "int VAR_5;", "xvid_plugin_single_t single = { 0 };", "struct xvid_ff_pass1 VAR_6 ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ], [ 37 ], [ 43 ], [ 45, 47 ], [ 49, 51 ...
21,893
static void test_submit_co(void) { WorkerTestData data; Coroutine *co = qemu_coroutine_create(co_test_cb); qemu_coroutine_enter(co, &data); /* Back here once the worker has started. */ g_assert_cmpint(active, ==, 1); g_assert_cmpint(data.ret, ==, -EINPROGRESS); /* qemu_aio_w...
true
qemu
35ecde26018207fe723bec6efbd340db6e9c2d53
static void test_submit_co(void) { WorkerTestData data; Coroutine *co = qemu_coroutine_create(co_test_cb); qemu_coroutine_enter(co, &data); g_assert_cmpint(active, ==, 1); g_assert_cmpint(data.ret, ==, -EINPROGRESS); qemu_aio_wait_all(); g_assert_cmpin...
{ "code": [ " qemu_aio_wait_all();", " qemu_aio_wait_all();", " qemu_aio_wait_all();", " qemu_aio_wait_all();" ], "line_no": [ 29, 29, 29, 29 ] }
static void FUNC_0(void) { WorkerTestData data; Coroutine *co = qemu_coroutine_create(co_test_cb); qemu_coroutine_enter(co, &data); g_assert_cmpint(active, ==, 1); g_assert_cmpint(data.ret, ==, -EINPROGRESS); qemu_aio_wait_all(); g_assert_cmpint(active...
[ "static void FUNC_0(void)\n{", "WorkerTestData data;", "Coroutine *co = qemu_coroutine_create(co_test_cb);", "qemu_coroutine_enter(co, &data);", "g_assert_cmpint(active, ==, 1);", "g_assert_cmpint(data.ret, ==, -EINPROGRESS);", "qemu_aio_wait_all();", "g_assert_cmpint(active, ==, 0);", "g_assert_cmp...
[ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 19 ], [ 21 ], [ 29 ], [ 37 ], [ 39 ], [ 41 ] ]
21,894
static void pcnet_transmit(PCNetState *s) { hwaddr xmit_cxda = 0; int count = CSR_XMTRL(s)-1; int add_crc = 0; int bcnt; s->xmit_pos = -1; if (!CSR_TXON(s)) { s->csr[0] &= ~0x0008; return; } s->tx_busy = 1; txagain: if (pcnet_tdte_poll(s)) { ...
true
qemu
837f21aacf5a714c23ddaadbbc5212f9b661e3f7
static void pcnet_transmit(PCNetState *s) { hwaddr xmit_cxda = 0; int count = CSR_XMTRL(s)-1; int add_crc = 0; int bcnt; s->xmit_pos = -1; if (!CSR_TXON(s)) { s->csr[0] &= ~0x0008; return; } s->tx_busy = 1; txagain: if (pcnet_tdte_poll(s)) { ...
{ "code": [ " if (s->xmit_pos + bcnt > sizeof(s->buffer)) {" ], "line_no": [ 99 ] }
static void FUNC_0(PCNetState *VAR_0) { hwaddr xmit_cxda = 0; int VAR_1 = CSR_XMTRL(VAR_0)-1; int VAR_2 = 0; int VAR_3; VAR_0->xmit_pos = -1; if (!CSR_TXON(VAR_0)) { VAR_0->csr[0] &= ~0x0008; return; } VAR_0->tx_busy = 1; txagain: if (pcnet_tdte...
[ "static void FUNC_0(PCNetState *VAR_0)\n{", "hwaddr xmit_cxda = 0;", "int VAR_1 = CSR_XMTRL(VAR_0)-1;", "int VAR_2 = 0;", "int VAR_3;", "VAR_0->xmit_pos = -1;", "if (!CSR_TXON(VAR_0)) {", "VAR_0->csr[0] &= ~0x0008;", "return;", "}", "VAR_0->tx_busy = 1;", "txagain:\nif (pcnet_tdte_poll(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, 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 ], [ 21 ], [ 23 ], [ 27 ], [ 31, 33 ], [ 35 ], [ 39 ], [ 43, 45 ], [ 47 ], [ 49, 51 ], [ 53 ], [...
21,895
long do_sigreturn(CPUMBState *env) { struct target_signal_frame *frame; abi_ulong frame_addr; target_sigset_t target_set; sigset_t set; int i; frame_addr = env->regs[R_SP]; trace_user_do_sigreturn(env, frame_addr); /* Make sure the guest isn't playing games. */ if (!lock...
true
qemu
4134ecfeb903c362558cb1cb594ff532fd83fb84
long do_sigreturn(CPUMBState *env) { struct target_signal_frame *frame; abi_ulong frame_addr; target_sigset_t target_set; sigset_t set; int i; frame_addr = env->regs[R_SP]; trace_user_do_sigreturn(env, frame_addr); if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 1...
{ "code": [ " return env->regs[10];" ], "line_no": [ 57 ] }
long FUNC_0(CPUMBState *VAR_0) { struct target_signal_frame *VAR_1; abi_ulong frame_addr; target_sigset_t target_set; sigset_t set; int VAR_2; frame_addr = VAR_0->regs[R_SP]; trace_user_do_sigreturn(VAR_0, frame_addr); if (!lock_user_struct(VERIFY_WRITE, VAR_1, frame_add...
[ "long FUNC_0(CPUMBState *VAR_0)\n{", "struct target_signal_frame *VAR_1;", "abi_ulong frame_addr;", "target_sigset_t target_set;", "sigset_t set;", "int VAR_2;", "frame_addr = VAR_0->regs[R_SP];", "trace_user_do_sigreturn(VAR_0, frame_addr);", "if (!lock_user_struct(VERIFY_WRITE, VAR_1, frame_addr, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 19 ], [ 23, 25 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 45 ], [ 51 ], [ 55 ], [ 57 ], [...
21,896
static hwaddr ppc_hash64_pteg_search(PowerPCCPU *cpu, hwaddr hash, bool secondary, target_ulong ptem, ppc_hash_pte64_t *pte) { CPUPPCState *env = &cpu->env; int i; uint64_t token; target_ulong pte0, pte1; target_ulong ...
true
qemu
4322e8ced5aaac7191958f09622d199fe61e2d87
static hwaddr ppc_hash64_pteg_search(PowerPCCPU *cpu, hwaddr hash, bool secondary, target_ulong ptem, ppc_hash_pte64_t *pte) { CPUPPCState *env = &cpu->env; int i; uint64_t token; target_ulong pte0, pte1; target_ulong ...
{ "code": [ " bool secondary, target_ulong ptem,", " ppc_hash_pte64_t *pte)" ], "line_no": [ 3, 5 ] }
static hwaddr FUNC_0(PowerPCCPU *cpu, hwaddr hash, bool secondary, target_ulong ptem, ppc_hash_pte64_t *pte) { CPUPPCState *env = &cpu->env; int VAR_0; uint64_t token; target_ulong pte0, pte1; target_ulong pte_index; ...
[ "static hwaddr FUNC_0(PowerPCCPU *cpu, hwaddr hash,\nbool secondary, target_ulong ptem,\nppc_hash_pte64_t *pte)\n{", "CPUPPCState *env = &cpu->env;", "int VAR_0;", "uint64_t token;", "target_ulong pte0, pte1;", "target_ulong pte_index;", "pte_index = (hash & env->htab_mask) * HPTES_PER_GROUP;", "token...
[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 39, 41, 43 ], [ 45 ], [ 47 ], [ 49 ...
21,897
static void qemu_kvm_eat_signal(CPUState *env, int timeout) { struct timespec ts; int r, e; siginfo_t siginfo; sigset_t waitset; ts.tv_sec = timeout / 1000; ts.tv_nsec = (timeout % 1000) * 1000000; sigemptyset(&waitset); sigaddset(&waitset, SIG_IPI); qemu_mutex_unlock...
true
qemu
c0532a76b407af4b276dc5a62d8178db59857ea6
static void qemu_kvm_eat_signal(CPUState *env, int timeout) { struct timespec ts; int r, e; siginfo_t siginfo; sigset_t waitset; ts.tv_sec = timeout / 1000; ts.tv_nsec = (timeout % 1000) * 1000000; sigemptyset(&waitset); sigaddset(&waitset, SIG_IPI); qemu_mutex_unlock...
{ "code": [ " qemu_mutex_unlock(&qemu_global_mutex);", " r = sigtimedwait(&waitset, &siginfo, &ts);", " e = errno;", " qemu_mutex_lock(&qemu_global_mutex);", " if (r == -1 && !(e == EAGAIN || e == EINTR)) {", " fprintf(stderr, \"sigtimedwait: %s\\n\", strerror(e));", ...
static void FUNC_0(CPUState *VAR_0, int VAR_1) { struct timespec VAR_2; int VAR_3, VAR_4; siginfo_t siginfo; sigset_t waitset; VAR_2.tv_sec = VAR_1 / 1000; VAR_2.tv_nsec = (VAR_1 % 1000) * 1000000; sigemptyset(&waitset); sigaddset(&waitset, SIG_IPI); qemu_mutex_unlock...
[ "static void FUNC_0(CPUState *VAR_0, int VAR_1)\n{", "struct timespec VAR_2;", "int VAR_3, VAR_4;", "siginfo_t siginfo;", "sigset_t waitset;", "VAR_2.tv_sec = VAR_1 / 1000;", "VAR_2.tv_nsec = (VAR_1 % 1000) * 1000000;", "sigemptyset(&waitset);", "sigaddset(&waitset, SIG_IPI);", "qemu_mutex_unlock(...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ] ]
21,898
static int write_representation(AVFormatContext *s, AVStream *stream, char *id, int output_width, int output_height, int output_sample_rate) { WebMDashMuxContext *w = s->priv_data; AVDictionaryEntry *irange = av_dict_get(stream->metadata, INITI...
true
FFmpeg
1c37848f9029985d1271da9a0d161c2ebf0aca81
static int write_representation(AVFormatContext *s, AVStream *stream, char *id, int output_width, int output_height, int output_sample_rate) { WebMDashMuxContext *w = s->priv_data; AVDictionaryEntry *irange = av_dict_get(stream->metadata, INITI...
{ "code": [ " return -1;", " WebMDashMuxContext *w = s->priv_data;" ], "line_no": [ 23, 7 ] }
static int FUNC_0(AVFormatContext *VAR_0, AVStream *VAR_1, char *VAR_2, int VAR_3, int VAR_4, int VAR_5) { WebMDashMuxContext *w = VAR_0->priv_data; AVDictionaryEntry *irange = av_dict_get(VAR_1->metadata, INITIALIZATION_RANGE, NULL, 0); A...
[ "static int FUNC_0(AVFormatContext *VAR_0, AVStream *VAR_1, char *VAR_2,\nint VAR_3, int VAR_4,\nint VAR_5) {", "WebMDashMuxContext *w = VAR_0->priv_data;", "AVDictionaryEntry *irange = av_dict_get(VAR_1->metadata, INITIALIZATION_RANGE, NULL, 0);", "AVDictionaryEntry *cues_start = av_dict_get(VAR_1->metadata,...
[ 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19, 21 ], [ 23 ], [ 25 ], [ 27 ], [ 31, 33 ], [ 35, 37 ], [ 39, 41 ], [ 43, 45 ], [ 47 ], [ 51 ...
21,900
static inline int set_options(AVFilterContext *ctx, const char *args) { HueContext *hue = ctx->priv; int n, ret; char c1 = 0, c2 = 0; char *old_hue_expr, *old_hue_deg_expr, *old_saturation_expr; AVExpr *old_hue_pexpr, *old_hue_deg_pexpr, *old_saturation_pexpr; if (args) { /...
true
FFmpeg
7fe1ecefe17b0146d49cd0003f80266a481d1faa
static inline int set_options(AVFilterContext *ctx, const char *args) { HueContext *hue = ctx->priv; int n, ret; char c1 = 0, c2 = 0; char *old_hue_expr, *old_hue_deg_expr, *old_saturation_expr; AVExpr *old_hue_pexpr, *old_hue_deg_pexpr, *old_saturation_pexpr; if (args) { ...
{ "code": [ " if (!hue->hue_expr && !hue->hue_deg_expr) {", " hue->hue_expr = old_hue_expr;", " hue->hue_deg_expr = old_hue_deg_expr;", " if (hue->hue_deg_expr)", " PARSE_EXPRESSION(hue_deg, h);", " if (hue->hue_...
static inline int FUNC_0(AVFilterContext *VAR_0, const char *VAR_1) { HueContext *hue = VAR_0->priv; int VAR_2, VAR_3; char VAR_4 = 0, VAR_5 = 0; char *VAR_6, *VAR_7, *VAR_8; AVExpr *old_hue_pexpr, *old_hue_deg_pexpr, *old_saturation_pexpr; if (VAR_1) { if (strchr...
[ "static inline int FUNC_0(AVFilterContext *VAR_0, const char *VAR_1)\n{", "HueContext *hue = VAR_0->priv;", "int VAR_2, VAR_3;", "char VAR_4 = 0, VAR_5 = 0;", "char *VAR_6, *VAR_7, *VAR_8;", "AVExpr *old_hue_pexpr, *old_hue_deg_pexpr, *old_saturation_pexpr;", "if (VAR_1) {", "if (strchr(VAR_1, '='...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 31 ], [ 33 ], [ 35 ], [ 39 ], [ 41 ], [ 43 ], [ 47, 49 ], [ 51 ], [...
21,902
static int iothread_stop(Object *object, void *opaque) { IOThread *iothread; iothread = (IOThread *)object_dynamic_cast(object, TYPE_IOTHREAD); if (!iothread || !iothread->ctx) { return 0; } iothread->stopping = true; aio_notify(iothread->ctx); if (atomic_read(&iothread->m...
true
qemu
65072c157e466db2785748a929e775703b20eefe
static int iothread_stop(Object *object, void *opaque) { IOThread *iothread; iothread = (IOThread *)object_dynamic_cast(object, TYPE_IOTHREAD); if (!iothread || !iothread->ctx) { return 0; } iothread->stopping = true; aio_notify(iothread->ctx); if (atomic_read(&iothread->m...
{ "code": [ " if (!iothread || !iothread->ctx) {" ], "line_no": [ 11 ] }
static int FUNC_0(Object *VAR_0, void *VAR_1) { IOThread *iothread; iothread = (IOThread *)object_dynamic_cast(VAR_0, TYPE_IOTHREAD); if (!iothread || !iothread->ctx) { return 0; } iothread->stopping = true; aio_notify(iothread->ctx); if (atomic_read(&iothread->main_loop))...
[ "static int FUNC_0(Object *VAR_0, void *VAR_1)\n{", "IOThread *iothread;", "iothread = (IOThread *)object_dynamic_cast(VAR_0, TYPE_IOTHREAD);", "if (!iothread || !iothread->ctx) {", "return 0;", "}", "iothread->stopping = true;", "aio_notify(iothread->ctx);", "if (atomic_read(&iothread->main_loop)) ...
[ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ] ]
21,903
SCSIDevice *scsi_disk_init(BlockDriverState *bdrv, int tcq, scsi_completionfn completion, void *opaque) { SCSIDevice *d; SCSIDeviceState *s; s = (SCSIDeviceState *)qemu_mallocz(sizeof(SCSIDeviceState)); s->bdrv = bdrv; s->tcq = tcq; s->completion = completio...
true
qemu
274fb0e1ed962e9ae43ab05e7939499cebb39d26
SCSIDevice *scsi_disk_init(BlockDriverState *bdrv, int tcq, scsi_completionfn completion, void *opaque) { SCSIDevice *d; SCSIDeviceState *s; s = (SCSIDeviceState *)qemu_mallocz(sizeof(SCSIDeviceState)); s->bdrv = bdrv; s->tcq = tcq; s->completion = completio...
{ "code": [], "line_no": [] }
SCSIDevice *FUNC_0(BlockDriverState *bdrv, int tcq, scsi_completionfn completion, void *opaque) { SCSIDevice *d; SCSIDeviceState *s; s = (SCSIDeviceState *)qemu_mallocz(sizeof(SCSIDeviceState)); s->bdrv = bdrv; s->tcq = tcq; s->completion = completion; ...
[ "SCSIDevice *FUNC_0(BlockDriverState *bdrv, int tcq,\nscsi_completionfn completion, void *opaque)\n{", "SCSIDevice *d;", "SCSIDeviceState *s;", "s = (SCSIDeviceState *)qemu_mallocz(sizeof(SCSIDeviceState));", "s->bdrv = bdrv;", "s->tcq = tcq;", "s->completion = completion;", "s->opaque = opaque;", "...
[ 0, 0, 0, 0, 0, 0, 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 ], [ 14 ], [ 16 ], [ 18 ], [ 20 ], [ 22 ], [ 24 ], [ 26 ], [ 28 ], [ 30 ], [ 32 ], [ 34 ], [ 36 ], [ 38, 40 ], [ 42 ], [ 44, 46 ], [...
21,904
static void usbredir_handle_destroy(USBDevice *udev) { USBRedirDevice *dev = DO_UPCAST(USBRedirDevice, dev, udev); qemu_chr_delete(dev->cs); /* Note must be done after qemu_chr_close, as that causes a close event */ qemu_bh_delete(dev->chardev_close_bh); qemu_del_timer(dev->attach_timer);...
true
qemu
a14ff8a650b5943ee6221b952494661f7cb3b5e2
static void usbredir_handle_destroy(USBDevice *udev) { USBRedirDevice *dev = DO_UPCAST(USBRedirDevice, dev, udev); qemu_chr_delete(dev->cs); qemu_bh_delete(dev->chardev_close_bh); qemu_del_timer(dev->attach_timer); qemu_free_timer(dev->attach_timer); usbredir_cleanup_device_q...
{ "code": [], "line_no": [] }
static void FUNC_0(USBDevice *VAR_0) { USBRedirDevice *dev = DO_UPCAST(USBRedirDevice, dev, VAR_0); qemu_chr_delete(dev->cs); qemu_bh_delete(dev->chardev_close_bh); qemu_del_timer(dev->attach_timer); qemu_free_timer(dev->attach_timer); usbredir_cleanup_device_queues(dev); ...
[ "static void FUNC_0(USBDevice *VAR_0)\n{", "USBRedirDevice *dev = DO_UPCAST(USBRedirDevice, dev, VAR_0);", "qemu_chr_delete(dev->cs);", "qemu_bh_delete(dev->chardev_close_bh);", "qemu_del_timer(dev->attach_timer);", "qemu_free_timer(dev->attach_timer);", "usbredir_cleanup_device_queues(dev);", "if (de...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 14 ], [ 18 ], [ 20 ], [ 24 ], [ 28 ], [ 30 ], [ 32 ], [ 34 ], [ 36 ], [ 38 ], [ 42 ], [ 44 ] ]
21,905
static int find_optimal_param(uint32_t sum, int n) { int k; uint32_t sum2; if (sum <= n >> 1) return 0; sum2 = sum - (n >> 1); k = av_log2(n < 256 ? FASTDIV(sum2, n) : sum2 / n); return FFMIN(k, MAX_RICE_PARAM); }
true
FFmpeg
5ff998a233d759d0de83ea6f95c383d03d25d88e
static int find_optimal_param(uint32_t sum, int n) { int k; uint32_t sum2; if (sum <= n >> 1) return 0; sum2 = sum - (n >> 1); k = av_log2(n < 256 ? FASTDIV(sum2, n) : sum2 / n); return FFMIN(k, MAX_RICE_PARAM); }
{ "code": [ "static int find_optimal_param(uint32_t sum, int n)", " uint32_t sum2;", " k = av_log2(n < 256 ? FASTDIV(sum2, n) : sum2 / n);" ], "line_no": [ 1, 7, 17 ] }
static int FUNC_0(uint32_t VAR_0, int VAR_1) { int VAR_2; uint32_t sum2; if (VAR_0 <= VAR_1 >> 1) return 0; sum2 = VAR_0 - (VAR_1 >> 1); VAR_2 = av_log2(VAR_1 < 256 ? FASTDIV(sum2, VAR_1) : sum2 / VAR_1); return FFMIN(VAR_2, MAX_RICE_PARAM); }
[ "static int FUNC_0(uint32_t VAR_0, int VAR_1)\n{", "int VAR_2;", "uint32_t sum2;", "if (VAR_0 <= VAR_1 >> 1)\nreturn 0;", "sum2 = VAR_0 - (VAR_1 >> 1);", "VAR_2 = av_log2(VAR_1 < 256 ? FASTDIV(sum2, VAR_1) : sum2 / VAR_1);", "return FFMIN(VAR_2, MAX_RICE_PARAM);", "}" ]
[ 1, 0, 1, 0, 0, 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11, 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ] ]
21,906
static void set_pixel_format(VncState *vs, int bits_per_pixel, int depth, int big_endian_flag, int true_color_flag, int red_max, int green_max, int blue_max, int red_shift, int green_shift, int blue_shift) { int host_big_endian_flag; #ifdef WORDS_BIGENDIAN host_big_endi...
true
qemu
6cec5487990bf3f1f22b3fcb871978255e92ae0d
static void set_pixel_format(VncState *vs, int bits_per_pixel, int depth, int big_endian_flag, int true_color_flag, int red_max, int green_max, int blue_max, int red_shift, int green_shift, int blue_shift) { int host_big_endian_flag; #ifdef WORDS_BIGENDIAN host_big_endi...
{ "code": [ " int host_big_endian_flag;", "#ifdef WORDS_BIGENDIAN", " host_big_endian_flag = 1;", "#else", " host_big_endian_flag = 0;", "#endif", " fail:", " if (bits_per_pixel == 32 &&", " bits_per_pixel == vs->depth * 8 &&", " host_big_endian_fla...
static void FUNC_0(VncState *VAR_0, int VAR_1, int VAR_2, int VAR_3, int VAR_4, int VAR_5, int VAR_6, int VAR_7, int VAR_8, int VAR_9, int VAR_10) { int VAR_11; #ifdef WORDS_BIGENDIAN VAR_11 = 1; #else VAR_11 = 0; #endif if (!VAR_4) { fail: vnc_client...
[ "static void FUNC_0(VncState *VAR_0,\nint VAR_1, int VAR_2,\nint VAR_3, int VAR_4,\nint VAR_5, int VAR_6, int VAR_7,\nint VAR_8, int VAR_9, int VAR_10)\n{", "int VAR_11;", "#ifdef WORDS_BIGENDIAN\nVAR_11 = 1;", "#else\nVAR_11 = 0;", "#endif\nif (!VAR_4) {", "fail:\nvnc_client_error(VAR_0);", "return;", ...
[ 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 ]
[ [ 1, 3, 5, 7, 9, 11 ], [ 13 ], [ 17, 19 ], [ 21, 23 ], [ 25, 27 ], [ 29, 31 ], [ 33 ], [ 35 ], [ 37, 39, 41, 43, 45 ], [ 47 ], [ 49 ], [ 51 ], [ 53 ], [ 55,...
21,907
static int bdrv_check_byte_request(BlockDriverState *bs, int64_t offset, size_t size) { int64_t len; if (!bdrv_is_inserted(bs)) return -ENOMEDIUM; if (bs->growable) return 0; len = bdrv_getlength(bs); if (offset < 0) if ((offset > len) || (len -...
true
qemu
1dd3a44753f10970ded50950d28353c00bfcaf91
static int bdrv_check_byte_request(BlockDriverState *bs, int64_t offset, size_t size) { int64_t len; if (!bdrv_is_inserted(bs)) return -ENOMEDIUM; if (bs->growable) return 0; len = bdrv_getlength(bs); if (offset < 0) if ((offset > len) || (len -...
{ "code": [], "line_no": [] }
static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1, size_t VAR_2) { int64_t len; if (!bdrv_is_inserted(VAR_0)) return -ENOMEDIUM; if (VAR_0->growable) return 0; len = bdrv_getlength(VAR_0); if (VAR_1 < 0) if ((VAR_1 > len) || (len - VAR_1 ...
[ "static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,\nsize_t VAR_2)\n{", "int64_t len;", "if (!bdrv_is_inserted(VAR_0))\nreturn -ENOMEDIUM;", "if (VAR_0->growable)\nreturn 0;", "len = bdrv_getlength(VAR_0);", "if (VAR_1 < 0)\nif ((VAR_1 > len) || (len - VAR_1 < VAR_2))\nreturn 0;" ]
[ 0, 0, 0, 0, 0, 0 ]
[ [ 1, 2, 3 ], [ 4 ], [ 5, 6 ], [ 7, 8 ], [ 9 ], [ 10, 11, 12 ] ]
21,908
static void net_socket_accept(void *opaque) { NetSocketListenState *s = opaque; NetSocketState *s1; struct sockaddr_in saddr; socklen_t len; int fd; for(;;) { len = sizeof(saddr); fd = qemu_accept(s->fd, (struct sockaddr *)&saddr, &len); if (fd < 0 && errno !=...
true
qemu
e5d1fca0f20babbe355957b9ba536fe6187691cc
static void net_socket_accept(void *opaque) { NetSocketListenState *s = opaque; NetSocketState *s1; struct sockaddr_in saddr; socklen_t len; int fd; for(;;) { len = sizeof(saddr); fd = qemu_accept(s->fd, (struct sockaddr *)&saddr, &len); if (fd < 0 && errno !=...
{ "code": [ " if (!s1) {", " closesocket(fd);", " } else {" ], "line_no": [ 37, 39, 41 ] }
static void FUNC_0(void *VAR_0) { NetSocketListenState *s = VAR_0; NetSocketState *s1; struct sockaddr_in VAR_1; socklen_t len; int VAR_2; for(;;) { len = sizeof(VAR_1); VAR_2 = qemu_accept(s->VAR_2, (struct sockaddr *)&VAR_1, &len); if (VAR_2 < 0 && errno != ...
[ "static void FUNC_0(void *VAR_0)\n{", "NetSocketListenState *s = VAR_0;", "NetSocketState *s1;", "struct sockaddr_in VAR_1;", "socklen_t len;", "int VAR_2;", "for(;;) {", "len = sizeof(VAR_1);", "VAR_2 = qemu_accept(s->VAR_2, (struct sockaddr *)&VAR_1, &len);", "if (VAR_2 < 0 && errno != EINTR) {"...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 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,...
21,909
static void svq3_luma_dc_dequant_idct_c(int16_t *output, int16_t *input, int qp) { const int qmul = svq3_dequant_coeff[qp]; #define stride 16 int i; int temp[16]; static const uint8_t x_offset[4] = { 0, 1 * stride, 4 * stride, 5 * stride }; for (i = 0; i < 4; i++) { const int z0 = ...
true
FFmpeg
669419939c1d36be35196859dc73ec9a194157ad
static void svq3_luma_dc_dequant_idct_c(int16_t *output, int16_t *input, int qp) { const int qmul = svq3_dequant_coeff[qp]; #define stride 16 int i; int temp[16]; static const uint8_t x_offset[4] = { 0, 1 * stride, 4 * stride, 5 * stride }; for (i = 0; i < 4; i++) { const int z0 = ...
{ "code": [ " const int qmul = svq3_dequant_coeff[qp];", " output[stride * 0 + offset] = (z0 + z3) * qmul + 0x80000 >> 20;", " output[stride * 2 + offset] = (z1 + z2) * qmul + 0x80000 >> 20;", " output[stride * 8 + offset] = (z1 - z2) * qmul + 0x80000 >> 20;", " o...
static void FUNC_0(int16_t *VAR_0, int16_t *VAR_1, int VAR_2) { const int VAR_3 = svq3_dequant_coeff[VAR_2]; #define stride 16 int VAR_4; int VAR_5[16]; static const uint8_t VAR_6[4] = { 0, 1 * stride, 4 * stride, 5 * stride }; for (VAR_4 = 0; VAR_4 < 4; VAR_4++) { const int VAR_12...
[ "static void FUNC_0(int16_t *VAR_0, int16_t *VAR_1, int VAR_2)\n{", "const int VAR_3 = svq3_dequant_coeff[VAR_2];", "#define stride 16\nint VAR_4;", "int VAR_5[16];", "static const uint8_t VAR_6[4] = { 0, 1 * stride, 4 * stride, 5 * stride };", "for (VAR_4 = 0; VAR_4 < 4; VAR_4++) {", "const int VAR_12 ...
[ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7, 9 ], [ 11 ], [ 13 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [...
21,910
static av_cold int adpcm_encode_init(AVCodecContext *avctx) { ADPCMEncodeContext *s = avctx->priv_data; uint8_t *extradata; int i; if (avctx->channels > 2) return -1; /* only stereo or mono =) */ if (avctx->trellis && (unsigned)avctx->trellis > 16U) { av_log(avctx, AV_LOG_E...
true
FFmpeg
cb023d9afe9da0a9d221b5eeddd2981c520b5978
static av_cold int adpcm_encode_init(AVCodecContext *avctx) { ADPCMEncodeContext *s = avctx->priv_data; uint8_t *extradata; int i; if (avctx->channels > 2) return -1; if (avctx->trellis && (unsigned)avctx->trellis > 16U) { av_log(avctx, AV_LOG_ERROR, "invalid trellis size\...
{ "code": [ " avctx->coded_frame = avcodec_alloc_frame();" ], "line_no": [ 155 ] }
static av_cold int FUNC_0(AVCodecContext *avctx) { ADPCMEncodeContext *s = avctx->priv_data; uint8_t *extradata; int VAR_0; if (avctx->channels > 2) return -1; if (avctx->trellis && (unsigned)avctx->trellis > 16U) { av_log(avctx, AV_LOG_ERROR, "invalid trellis size\n"); ...
[ "static av_cold int FUNC_0(AVCodecContext *avctx)\n{", "ADPCMEncodeContext *s = avctx->priv_data;", "uint8_t *extradata;", "int VAR_0;", "if (avctx->channels > 2)\nreturn -1;", "if (avctx->trellis && (unsigned)avctx->trellis > 16U) {", "av_log(avctx, AV_LOG_ERROR, \"invalid trellis size\\n\");", "retu...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11, 13 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 27 ], [ 29 ], [ 31 ], [ 33, 35 ], [ 37, 39 ], [ 41, 43 ], [ 45, 47 ], [ 49 ], [...
21,911
int ff_h264_slice_context_init(H264Context *h, H264SliceContext *sl) { ERContext *er = &sl->er; int mb_array_size = h->mb_height * h->mb_stride; int y_size = (2 * h->mb_width + 1) * (2 * h->mb_height + 1); int c_size = h->mb_stride * (h->mb_height + 1); int yc_size = y_size + 2 * c_size; ...
true
FFmpeg
d9d9fd9446eb722fd288f56d905f0dfde661af8f
int ff_h264_slice_context_init(H264Context *h, H264SliceContext *sl) { ERContext *er = &sl->er; int mb_array_size = h->mb_height * h->mb_stride; int y_size = (2 * h->mb_width + 1) * (2 * h->mb_height + 1); int c_size = h->mb_stride * (h->mb_height + 1); int yc_size = y_size + 2 * c_size; ...
{ "code": [ " h->mb_height * h->mb_stride, fail);" ], "line_no": [ 97 ] }
int FUNC_0(H264Context *VAR_0, H264SliceContext *VAR_1) { ERContext *er = &VAR_1->er; int VAR_2 = VAR_0->mb_height * VAR_0->mb_stride; int VAR_3 = (2 * VAR_0->mb_width + 1) * (2 * VAR_0->mb_height + 1); int VAR_4 = VAR_0->mb_stride * (VAR_0->mb_height + 1); int VAR_5 = VAR_3 + 2 * VAR_4; ...
[ "int FUNC_0(H264Context *VAR_0, H264SliceContext *VAR_1)\n{", "ERContext *er = &VAR_1->er;", "int VAR_2 = VAR_0->mb_height * VAR_0->mb_stride;", "int VAR_3 = (2 * VAR_0->mb_width + 1) * (2 * VAR_0->mb_height + 1);", "int VAR_4 = VAR_0->mb_stride * (VAR_0->mb_height + 1);", "int VAR_5 = VAR_3 + 2 * 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19, 21, 23, 25, 27, 29 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [ 55 ], [...
21,912
static void test_visitor_in_alternate_number(TestInputVisitorData *data, const void *unused) { Visitor *v; Error *err = NULL; AltStrBool *asb; AltStrNum *asn; AltNumStr *ans; AltStrInt *asi; AltIntNum *ain; AltNumInt *ani; /* ...
true
qemu
0426d53c6530606bf7641b83f2b755fe61c280ee
static void test_visitor_in_alternate_number(TestInputVisitorData *data, const void *unused) { Visitor *v; Error *err = NULL; AltStrBool *asb; AltStrNum *asn; AltNumStr *ans; AltStrInt *asi; AltIntNum *ain; AltNumInt *ani; ...
{ "code": [ " visit_type_AltNumStr(v, &ans, NULL, &error_abort);", " g_assert_cmpint(ans->type, ==, ALT_NUM_STR_KIND_N);", " g_assert_cmpfloat(ans->u.n, ==, 42);", " g_assert_cmpint(asi->type, ==, ALT_STR_INT_KIND_I);", " g_assert_cmpint(ain->type, ==, ALT_INT_NUM_KIND_I);", " ...
static void FUNC_0(TestInputVisitorData *VAR_0, const void *VAR_1) { Visitor *v; Error *err = NULL; AltStrBool *asb; AltStrNum *asn; AltNumStr *ans; AltStrInt *asi; AltIntNum *ain; AltNumInt *ani; v = visitor_input_tes...
[ "static void FUNC_0(TestInputVisitorData *VAR_0,\nconst void *VAR_1)\n{", "Visitor *v;", "Error *err = NULL;", "AltStrBool *asb;", "AltStrNum *asn;", "AltNumStr *ans;", "AltStrInt *asi;", "AltIntNum *ain;", "AltNumInt *ani;", "v = visitor_input_test_init(VAR_0, \"42\");", "visit_type_AltStrBool(...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0...
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 43 ], [ 45 ], [ 51 ], [ 53 ], [ 57 ], [ 59 ], [...
21,913
static int coroutine_fn iscsi_co_writev(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *iov) { IscsiLun *iscsilun = bs->opaque; struct IscsiTask iTask; uint64_t lba; uint32_t num_sectors; ...
true
qemu
e49ab19fcaa617ad6cdfe1ac401327326b6a2552
static int coroutine_fn iscsi_co_writev(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *iov) { IscsiLun *iscsilun = bs->opaque; struct IscsiTask iTask; uint64_t lba; uint32_t num_sectors; ...
{ "code": [ "#if !defined(LIBISCSI_FEATURE_IOVECTOR)", " if (iov->niov == 1) {", " data = iov->iov[0].iov_base;", " } else {", " size_t size = MIN(nb_sectors * BDRV_SECTOR_SIZE, iov->size);", " buf = g_malloc(size);", " qemu_iovec_to_buf(iov, 0, buf, size)...
static int VAR_0 iscsi_co_writev(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *iov) { IscsiLun *iscsilun = bs->opaque; struct IscsiTask iTask; uint64_t lba; uint32_t num_sectors; uint8_t...
[ "static int VAR_0 iscsi_co_writev(BlockDriverState *bs,\nint64_t sector_num, int nb_sectors,\nQEMUIOVector *iov)\n{", "IscsiLun *iscsilun = bs->opaque;", "struct IscsiTask iTask;", "uint64_t lba;", "uint32_t num_sectors;", "uint8_t *data = NULL;", "uint8_t *buf = NULL;", "if (!is_request_lun_aligned(s...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 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 ]
[ [ 1, 3, 5, 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 23 ], [ 25 ], [ 27 ], [ 31 ], [ 33 ], [ 35, 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [...
21,915
static void add_sel_entry(IPMIBmcSim *ibs, uint8_t *cmd, unsigned int cmd_len, uint8_t *rsp, unsigned int *rsp_len, unsigned int max_rsp_len) { IPMI_CHECK_CMD_LEN(18); if (sel_add_event(ibs, cmd + 2)) { rsp[2] = IPMI_CC...
true
qemu
4f298a4b2957b7833bc607c951ca27c458d98d88
static void add_sel_entry(IPMIBmcSim *ibs, uint8_t *cmd, unsigned int cmd_len, uint8_t *rsp, unsigned int *rsp_len, unsigned int max_rsp_len) { IPMI_CHECK_CMD_LEN(18); if (sel_add_event(ibs, cmd + 2)) { rsp[2] = IPMI_CC...
{ "code": [ " IPMI_CHECK_CMD_LEN(18);" ], "line_no": [ 11 ] }
static void FUNC_0(IPMIBmcSim *VAR_0, uint8_t *VAR_1, unsigned int VAR_2, uint8_t *VAR_3, unsigned int *VAR_4, unsigned int VAR_5) { IPMI_CHECK_CMD_LEN(18); if (sel_add_event(VAR_0, VAR_1 + 2)) { VAR_3[2] = IPMI_CC_OUT_...
[ "static void FUNC_0(IPMIBmcSim *VAR_0,\nuint8_t *VAR_1, unsigned int VAR_2,\nuint8_t *VAR_3, unsigned int *VAR_4,\nunsigned int VAR_5)\n{", "IPMI_CHECK_CMD_LEN(18);", "if (sel_add_event(VAR_0, VAR_1 + 2)) {", "VAR_3[2] = IPMI_CC_OUT_OF_SPACE;", "return;", "}", "IPMI_ADD_RSP_DATA(VAR_1[2]);", "IPMI_ADD...
[ 0, 1, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7, 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 23 ], [ 25 ], [ 27 ] ]
21,916
static void vmdk_free_last_extent(BlockDriverState *bs) { BDRVVmdkState *s = bs->opaque; if (s->num_extents == 0) { return; } s->num_extents--; s->extents = g_realloc(s->extents, s->num_extents * sizeof(VmdkExtent)); }
true
qemu
5839e53bbc0fec56021d758aab7610df421ed8c8
static void vmdk_free_last_extent(BlockDriverState *bs) { BDRVVmdkState *s = bs->opaque; if (s->num_extents == 0) { return; } s->num_extents--; s->extents = g_realloc(s->extents, s->num_extents * sizeof(VmdkExtent)); }
{ "code": [ " s->extents = g_realloc(s->extents, s->num_extents * sizeof(VmdkExtent));" ], "line_no": [ 17 ] }
static void FUNC_0(BlockDriverState *VAR_0) { BDRVVmdkState *s = VAR_0->opaque; if (s->num_extents == 0) { return; } s->num_extents--; s->extents = g_realloc(s->extents, s->num_extents * sizeof(VmdkExtent)); }
[ "static void FUNC_0(BlockDriverState *VAR_0)\n{", "BDRVVmdkState *s = VAR_0->opaque;", "if (s->num_extents == 0) {", "return;", "}", "s->num_extents--;", "s->extents = g_realloc(s->extents, s->num_extents * sizeof(VmdkExtent));", "}" ]
[ 0, 0, 0, 0, 0, 0, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ] ]
21,917
static int libschroedinger_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet) { int enc_size = 0; SchroEncoderParams *p_schro_params = avctx->priv_data; SchroEncoder *encoder = p_schro_params->encoder; struct FFSchroEnc...
true
FFmpeg
220b24c7c97dc033ceab1510549f66d0e7b52ef1
static int libschroedinger_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet) { int enc_size = 0; SchroEncoderParams *p_schro_params = avctx->priv_data; SchroEncoder *encoder = p_schro_params->encoder; struct FFSchroEnc...
{ "code": [ " SchroBuffer *enc_buf;", " int go = 1;", " if (!p_schro_params->eos_signalled) {", " p_schro_params->eos_signalled = 1;", " return AVERROR(ENOMEM);", " break;", " go = 0;", " break;", "...
static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1, const AVFrame *VAR_2, int *VAR_3) { int VAR_4 = 0; SchroEncoderParams *p_schro_params = VAR_0->priv_data; SchroEncoder *encoder = p_schro_params->encoder; struct FFSchroEncodedFrame *VAR_5 = NULL; ...
[ "static int FUNC_0(AVCodecContext *VAR_0, AVPacket *VAR_1,\nconst AVFrame *VAR_2, int *VAR_3)\n{", "int VAR_4 = 0;", "SchroEncoderParams *p_schro_params = VAR_0->priv_data;", "SchroEncoder *encoder = p_schro_params->encoder;", "struct FFSchroEncodedFrame *VAR_5 = NULL;", "int VAR_6 = 1;", "SchroBuffer *...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1...
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 45 ], [ 47, 49 ...
21,920
static int qcow2_write(BlockDriverState *bs, int64_t sector_num, const uint8_t *buf, int nb_sectors) { Coroutine *co; AioContext *aio_context = bdrv_get_aio_context(bs); Qcow2WriteCo data = { .bs = bs, .sector_num = sector_num, .buf = buf...
true
qemu
0b8b8753e4d94901627b3e86431230f2319215c4
static int qcow2_write(BlockDriverState *bs, int64_t sector_num, const uint8_t *buf, int nb_sectors) { Coroutine *co; AioContext *aio_context = bdrv_get_aio_context(bs); Qcow2WriteCo data = { .bs = bs, .sector_num = sector_num, .buf = buf...
{ "code": [ " qemu_coroutine_enter(co, &data);", " co = qemu_coroutine_create(qcow2_write_co_entry);", " qemu_coroutine_enter(co, &data);", " qemu_coroutine_enter(co, &data);", " qemu_coroutine_enter(co, &data);" ], "line_no": [ 27, 25, 27, 27, 27 ] }
static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1, const uint8_t *VAR_2, int VAR_3) { Coroutine *co; AioContext *aio_context = bdrv_get_aio_context(VAR_0); Qcow2WriteCo data = { .VAR_0 = VAR_0, .VAR_1 = VAR_1, .VAR_2 = VAR_2, ...
[ "static int FUNC_0(BlockDriverState *VAR_0, int64_t VAR_1,\nconst uint8_t *VAR_2, int VAR_3)\n{", "Coroutine *co;", "AioContext *aio_context = bdrv_get_aio_context(VAR_0);", "Qcow2WriteCo data = {", ".VAR_0 = VAR_0,\n.VAR_1 = VAR_1,\n.VAR_2 = VAR_2,\n.VAR_3 = VAR_3,\n.ret = -EINPROGRES...
[ 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13, 15, 17, 19, 21, 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ] ]
21,922
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) { V...
true
qemu
43c696a298f6bef81818b1d8e64d41a160782101
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) { V...
{ "code": [ " if (s->ctx && !s->dataplane_disabled) {" ], "line_no": [ 15 ] }
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) { VirtIOSCSIBlkChangeNo...
[ "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) {", "VirtIOSCSIBlkChangeNotifier *insert_notifier, *remove_...
[ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [...
21,923
static CharDriverState *qemu_chr_open_pty(const char *id, ChardevReturn *ret) { CharDriverState *chr; PtyCharDriver *s; int master_fd, slave_fd; char pty_name[PATH_MAX]; master_fd = qemu_openpty_raw(&slave_fd, pty_name); if (master_fd < 0) { ...
true
qemu
2d528d45ecf5ee3c1a566a9f3d664464925ef830
static CharDriverState *qemu_chr_open_pty(const char *id, ChardevReturn *ret) { CharDriverState *chr; PtyCharDriver *s; int master_fd, slave_fd; char pty_name[PATH_MAX]; master_fd = qemu_openpty_raw(&slave_fd, pty_name); if (master_fd < 0) { ...
{ "code": [ " s = g_malloc0(sizeof(PtyCharDriver));" ], "line_no": [ 51 ] }
static CharDriverState *FUNC_0(const char *id, ChardevReturn *ret) { CharDriverState *chr; PtyCharDriver *s; int VAR_0, VAR_1; char VAR_2[PATH_MAX]; VAR_0 = qemu_openpty_raw(&VAR_1, VAR_2); if (VAR_0 < 0) { return NULL; } c...
[ "static CharDriverState *FUNC_0(const char *id,\nChardevReturn *ret)\n{", "CharDriverState *chr;", "PtyCharDriver *s;", "int VAR_0, VAR_1;", "char VAR_2[PATH_MAX];", "VAR_0 = qemu_openpty_raw(&VAR_1, VAR_2);", "if (VAR_0 < 0) {", "return NULL;", "}", "close(VAR_1);", "qemu_set_nonblock(VAR_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 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 27 ], [ 29 ], [ 33 ], [ 37 ], [ 39 ], [ 41 ], [ 45, 47 ], [ 51 ], [ 53 ], [ 55 ...
21,924
static void RENAME(uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, int width, int height, int lumStride, int chromStride, int srcStride) { int y; const int chromWidth = FF_CEIL_RSHIFT(width, 1); for (y=0...
true
FFmpeg
1e3f77b53a803a6c63fa64829f1be557b8226288
static void RENAME(uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, int width, int height, int lumStride, int chromStride, int srcStride) { int y; const int chromWidth = FF_CEIL_RSHIFT(width, 1); for (y=0...
{ "code": [ " RENAME(extract_even)(src+1, ydst, width);", " RENAME(extract_even)(src+1, ydst, width);" ], "line_no": [ 17, 17 ] }
static void FUNC_0(uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, int width, int height, int lumStride, int chromStride, int srcStride) { int VAR_0; const int VAR_1 = FF_CEIL_RSHIFT(width, 1); for (VAR_...
[ "static void FUNC_0(uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,\nint width, int height,\nint lumStride, int chromStride, int srcStride)\n{", "int VAR_0;", "const int VAR_1 = FF_CEIL_RSHIFT(width, 1);", "for (VAR_0=0; VAR_0<height; VAR_0++) {", "FUNC_0(extract_even)(src+1, ...
[ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5, 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 31 ], [ 33 ], [ 35 ], [ 37, 39, 41, 43, 45 ], [ 47 ] ]
21,926
av_cold int ff_h264_decode_init(AVCodecContext *avctx) { H264Context *h = avctx->priv_data; int i; int ret; h->avctx = avctx; h->bit_depth_luma = 8; h->chroma_format_idc = 1; h->cur_chroma_format_idc = 1; ff_h264dsp_init(&h->h264dsp, 8, 1); av_assert0(h->sps.bit_...
true
FFmpeg
4b7356ce8f2c7902a9b97645f86e0ae09bc2676c
av_cold int ff_h264_decode_init(AVCodecContext *avctx) { H264Context *h = avctx->priv_data; int i; int ret; h->avctx = avctx; h->bit_depth_luma = 8; h->chroma_format_idc = 1; h->cur_chroma_format_idc = 1; ff_h264dsp_init(&h->h264dsp, 8, 1); av_assert0(h->sps.bit_...
{ "code": [ " \"Error resilience is enabled. It is unsafe and unsupported and may crash. \"" ], "line_no": [ 193 ] }
av_cold int FUNC_0(AVCodecContext *avctx) { H264Context *h = avctx->priv_data; int VAR_0; int VAR_1; h->avctx = avctx; h->bit_depth_luma = 8; h->chroma_format_idc = 1; h->cur_chroma_format_idc = 1; ff_h264dsp_init(&h->h264dsp, 8, 1); av_assert0(h->sps.bit_depth_c...
[ "av_cold int FUNC_0(AVCodecContext *avctx)\n{", "H264Context *h = avctx->priv_data;", "int VAR_0;", "int VAR_1;", "h->avctx = avctx;", "h->bit_depth_luma = 8;", "h->chroma_format_idc = 1;", "h->cur_chroma_format_idc = 1;", "ff_h264dsp_init(&h->h264dsp, 8, 1);", "av_assert0(h->sps.bit_depth_chro...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 13 ], [ 17 ], [ 19 ], [ 23 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 39 ], [ 41 ], [ 47 ], [ 51 ], [ 53 ], [ 57 ], [ 59 ...
21,927
static int decode_hextile(VmncContext *c, uint8_t* dst, GetByteContext *gb, int w, int h, int stride) { int i, j, k; int bg = 0, fg = 0, rects, color, flags, xy, wh; const int bpp = c->bpp2; uint8_t *dst2; int bw = 16, bh = 16; for (j = 0; j < h; j += 16) { ...
true
FFmpeg
f5d46d332258dcd8ca623019ece1d5e5bb74142b
static int decode_hextile(VmncContext *c, uint8_t* dst, GetByteContext *gb, int w, int h, int stride) { int i, j, k; int bg = 0, fg = 0, rects, color, flags, xy, wh; const int bpp = c->bpp2; uint8_t *dst2; int bw = 16, bh = 16; for (j = 0; j < h; j += 16) { ...
{ "code": [ " paint_rect(dst2, xy >> 4, xy & 0xF,", " (wh>>4)+1, (wh & 0xF)+1, fg, bpp, stride);" ], "line_no": [ 99, 101 ] }
static int FUNC_0(VmncContext *VAR_0, uint8_t* VAR_1, GetByteContext *VAR_2, int VAR_3, int VAR_4, int VAR_5) { int VAR_6, VAR_7, VAR_8; int VAR_9 = 0, VAR_10 = 0, VAR_11, VAR_12, VAR_13, VAR_14, VAR_15; const int VAR_16 = VAR_0->bpp2; uint8_t *dst2; int VAR_17 = 16,...
[ "static int FUNC_0(VmncContext *VAR_0, uint8_t* VAR_1, GetByteContext *VAR_2,\nint VAR_3, int VAR_4, int VAR_5)\n{", "int VAR_6, VAR_7, VAR_8;", "int VAR_9 = 0, VAR_10 = 0, VAR_11, VAR_12, VAR_13, VAR_14, VAR_15;", "const int VAR_16 = VAR_0->bpp2;", "uint8_t *dst2;", "int VAR_17 = 16, VAR_18 = 16;", "fo...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 21 ], [ 23 ], [ 25, 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39, 41 ], [ 43 ], [ 45 ], [...
21,928
int msi_init(struct PCIDevice *dev, uint8_t offset, unsigned int nr_vectors, bool msi64bit, bool msi_per_vector_mask) { unsigned int vectors_order; uint16_t flags; uint8_t cap_size; int config_offset; if (!msi_nonbroken) { return -ENOTSUP; } MSI_DEV_PRINTF(...
true
qemu
1108b2f8a939fb5778d384149e2f1b99062a72da
int msi_init(struct PCIDevice *dev, uint8_t offset, unsigned int nr_vectors, bool msi64bit, bool msi_per_vector_mask) { unsigned int vectors_order; uint16_t flags; uint8_t cap_size; int config_offset; if (!msi_nonbroken) { return -ENOTSUP; } MSI_DEV_PRINTF(...
{ "code": [ " unsigned int nr_vectors, bool msi64bit, bool msi_per_vector_mask)", " config_offset = pci_add_capability(dev, PCI_CAP_ID_MSI, offset, cap_size);" ], "line_no": [ 3, 65 ] }
int FUNC_0(struct PCIDevice *VAR_0, uint8_t VAR_1, unsigned int VAR_2, bool VAR_3, bool VAR_4) { unsigned int VAR_5; uint16_t flags; uint8_t cap_size; int VAR_6; if (!msi_nonbroken) { return -ENOTSUP; } MSI_DEV_PRINTF(VAR_0, "init VAR_1:...
[ "int FUNC_0(struct PCIDevice *VAR_0, uint8_t VAR_1,\nunsigned int VAR_2, bool VAR_3, bool VAR_4)\n{", "unsigned int VAR_5;", "uint16_t flags;", "uint8_t cap_size;", "int VAR_6;", "if (!msi_nonbroken) {", "return -ENOTSUP;", "}", "MSI_DEV_PRINTF(VAR_0,\n\"init VAR_1: 0x%\"PRIx8\" vector: %\"PRId8\n\"...
[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 19 ], [ 21 ], [ 25, 27, 29, 31 ], [ 35 ], [ 37 ], [ 39 ], [ 43 ], [ 47 ], [ 49 ], [ 51 ], [ 53 ], [ 55 ...
21,929
static int read_motion_values(AVCodecContext *avctx, GetBitContext *gb, Bundle *b) { int t, sign, v; const uint8_t *dec_end; CHECK_READ_VAL(gb, b, t); dec_end = b->cur_dec + t; if (dec_end > b->data_end) { av_log(avctx, AV_LOG_ERROR, "Too many motion values\n"); return -1; ...
true
FFmpeg
a00676e48e49a3d794d6d2063ceca539e945a4a4
static int read_motion_values(AVCodecContext *avctx, GetBitContext *gb, Bundle *b) { int t, sign, v; const uint8_t *dec_end; CHECK_READ_VAL(gb, b, t); dec_end = b->cur_dec + t; if (dec_end > b->data_end) { av_log(avctx, AV_LOG_ERROR, "Too many motion values\n"); return -1; ...
{ "code": [ " do {", " } while (b->cur_dec < dec_end);", " do {", " } while (b->cur_dec < dec_end);" ], "line_no": [ 41, 55, 41, 55 ] }
static int FUNC_0(AVCodecContext *VAR_0, GetBitContext *VAR_1, Bundle *VAR_2) { int VAR_3, VAR_4, VAR_5; const uint8_t *VAR_6; CHECK_READ_VAL(VAR_1, VAR_2, VAR_3); VAR_6 = VAR_2->cur_dec + VAR_3; if (VAR_6 > VAR_2->data_end) { av_log(VAR_0, AV_LOG_ERROR, "Too many motion values\n");...
[ "static int FUNC_0(AVCodecContext *VAR_0, GetBitContext *VAR_1, Bundle *VAR_2)\n{", "int VAR_3, VAR_4, VAR_5;", "const uint8_t *VAR_6;", "CHECK_READ_VAL(VAR_1, VAR_2, VAR_3);", "VAR_6 = VAR_2->cur_dec + VAR_3;", "if (VAR_6 > VAR_2->data_end) {", "av_log(VAR_0, AV_LOG_ERROR, \"Too many motion values\\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, 1, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43...
21,930
static int gen_set_psr(DisasContext *s, uint32_t mask, int spsr, TCGv t0) { TCGv tmp; if (spsr) { /* ??? This is also undefined in system mode. */ if (IS_USER(s)) return 1; tmp = load_cpu_field(spsr); tcg_gen_andi_i32(tmp, tmp, ~mask); tcg_gen_andi...
true
qemu
7d1b0095bff7157e856d1d0e6c4295641ced2752
static int gen_set_psr(DisasContext *s, uint32_t mask, int spsr, TCGv t0) { TCGv tmp; if (spsr) { if (IS_USER(s)) return 1; tmp = load_cpu_field(spsr); tcg_gen_andi_i32(tmp, tmp, ~mask); tcg_gen_andi_i32(t0, t0, mask); tcg_gen_or_i32(tmp, ...
{ "code": [ " dead_tmp(t0);" ], "line_no": [ 33 ] }
static int FUNC_0(DisasContext *VAR_0, uint32_t VAR_1, int VAR_2, TCGv VAR_3) { TCGv tmp; if (VAR_2) { if (IS_USER(VAR_0)) return 1; tmp = load_cpu_field(VAR_2); tcg_gen_andi_i32(tmp, tmp, ~VAR_1); tcg_gen_andi_i32(VAR_3, VAR_3, VAR_1); tc...
[ "static int FUNC_0(DisasContext *VAR_0, uint32_t VAR_1, int VAR_2, TCGv VAR_3)\n{", "TCGv tmp;", "if (VAR_2) {", "if (IS_USER(VAR_0))\nreturn 1;", "tmp = load_cpu_field(VAR_2);", "tcg_gen_andi_i32(tmp, tmp, ~VAR_1);", "tcg_gen_andi_i32(VAR_3, VAR_3, VAR_1);", "tcg_gen_or_i32(tmp, tmp, VAR_3);", "sto...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11, 13 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ] ]
21,931
int av_image_fill_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int width) { int i; const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt]; int max_step [4]; /* max pixel step for each plane */ int max_step_comp[4]; /* the component for each plane which has the ma...
true
FFmpeg
10931720cd55d83e0b933b8a9bb0795fd9e48875
int av_image_fill_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int width) { int i; const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt]; int max_step [4]; int max_step_comp[4]; memset(linesizes, 0, 4*sizeof(linesizes[0])); if ((unsigned)pix_fmt ...
{ "code": [ " if (desc->flags & PIX_FMT_BITSTREAM) {", " if (width > (INT_MAX -7) / (desc->comp[0].step_minus1+1))", " return AVERROR(EINVAL);", " linesizes[0] = (width * (desc->comp[0].step_minus1+1) + 7) >> 3;", " return 0;" ], "line_no": [ 25, 27, ...
int FUNC_0(int VAR_0[4], enum PixelFormat VAR_1, int VAR_2) { int VAR_3; const AVPixFmtDescriptor *VAR_4 = &av_pix_fmt_descriptors[VAR_1]; int VAR_5 [4]; int VAR_6[4]; memset(VAR_0, 0, 4*sizeof(VAR_0[0])); if ((unsigned)VAR_1 >= PIX_FMT_NB || VAR_4->flags & PIX_FMT_H...
[ "int FUNC_0(int VAR_0[4], enum PixelFormat VAR_1, int VAR_2)\n{", "int VAR_3;", "const AVPixFmtDescriptor *VAR_4 = &av_pix_fmt_descriptors[VAR_1];", "int VAR_5 [4];", "int VAR_6[4];", "memset(VAR_0, 0, 4*sizeof(VAR_0[0]));", "if ((unsigned)VAR_1 >= PIX_FMT_NB || VAR_4->flags & PIX_FMT_HWACCEL)\nretu...
[ 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 19, 21 ], [ 25 ], [ 27, 29 ], [ 31 ], [ 33 ], [ 35 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47, 49 ], [ 51 ], [...
21,932
static int nbd_negotiate_options(NBDClient *client, uint16_t myflags, Error **errp) { uint32_t flags; bool fixedNewstyle = false; bool no_zeroes = false; /* Client sends: [ 0 .. 3] client flags Then we loop until NBD_OPT_EXPORT_NAME or NBD_OPT_GO: ...
true
qemu
fdad35ef6c5839d50dfc14073364ac893afebc30
static int nbd_negotiate_options(NBDClient *client, uint16_t myflags, Error **errp) { uint32_t flags; bool fixedNewstyle = false; bool no_zeroes = false; if (nbd_read(client->ioc, &flags, sizeof(flags), errp) < 0) { error_prepend(errp, "read faile...
{ "code": [], "line_no": [] }
static int FUNC_0(NBDClient *VAR_0, uint16_t VAR_1, Error **VAR_2) { uint32_t flags; bool fixedNewstyle = false; bool no_zeroes = false; if (nbd_read(VAR_0->ioc, &flags, sizeof(flags), VAR_2) < 0) { error_prepend(VAR_2, "read failed: "); r...
[ "static int FUNC_0(NBDClient *VAR_0, uint16_t VAR_1,\nError **VAR_2)\n{", "uint32_t flags;", "bool fixedNewstyle = false;", "bool no_zeroes = false;", "if (nbd_read(VAR_0->ioc, &flags, sizeof(flags), VAR_2) < 0) {", "error_prepend(VAR_2, \"read failed: \");", "return -EIO;", "be32_to_cpus(&flags);", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 2, 3 ], [ 4 ], [ 5 ], [ 6 ], [ 19 ], [ 20 ], [ 21 ], [ 22 ], [ 23 ], [ 24 ], [ 25 ], [ 26 ], [ 27 ], [ 28 ], [ 29 ], [ 30 ], [ 31 ], [ 32 ], [ 33 ], [ ...
21,933
static int virtio_ccw_blk_init(VirtioCcwDevice *ccw_dev) { VirtIOBlkCcw *dev = VIRTIO_BLK_CCW(ccw_dev); DeviceState *vdev = DEVICE(&dev->vdev); virtio_blk_set_conf(vdev, &(dev->blk)); qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus)); if (qdev_init(vdev) < 0) { return -1; } re...
true
qemu
caffdac363801cd2cf2bf01ad013a8c1e1e43800
static int virtio_ccw_blk_init(VirtioCcwDevice *ccw_dev) { VirtIOBlkCcw *dev = VIRTIO_BLK_CCW(ccw_dev); DeviceState *vdev = DEVICE(&dev->vdev); virtio_blk_set_conf(vdev, &(dev->blk)); qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus)); if (qdev_init(vdev) < 0) { return -1; } re...
{ "code": [ " virtio_blk_set_conf(vdev, &(dev->blk));", " virtio_blk_set_conf(vdev, &(dev->blk));", " virtio_blk_set_conf(vdev, &(dev->blk));" ], "line_no": [ 9, 9, 9 ] }
static int FUNC_0(VirtioCcwDevice *VAR_0) { VirtIOBlkCcw *dev = VIRTIO_BLK_CCW(VAR_0); DeviceState *vdev = DEVICE(&dev->vdev); virtio_blk_set_conf(vdev, &(dev->blk)); qdev_set_parent_bus(vdev, BUS(&VAR_0->bus)); if (qdev_init(vdev) < 0) { return -1; } return virtio_ccw_dev...
[ "static int FUNC_0(VirtioCcwDevice *VAR_0)\n{", "VirtIOBlkCcw *dev = VIRTIO_BLK_CCW(VAR_0);", "DeviceState *vdev = DEVICE(&dev->vdev);", "virtio_blk_set_conf(vdev, &(dev->blk));", "qdev_set_parent_bus(vdev, BUS(&VAR_0->bus));", "if (qdev_init(vdev) < 0) {", "return -1;", "}", "return virtio_ccw_devi...
[ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ] ]
21,934
static av_cold int libschroedinger_decode_close(AVCodecContext *avctx) { SchroDecoderParams *p_schro_params = avctx->priv_data; /* Free the decoder. */ schro_decoder_free(p_schro_params->decoder); av_freep(&p_schro_params->format); /* Free data in the output frame queue. */ ff_schro_que...
true
FFmpeg
220b24c7c97dc033ceab1510549f66d0e7b52ef1
static av_cold int libschroedinger_decode_close(AVCodecContext *avctx) { SchroDecoderParams *p_schro_params = avctx->priv_data; schro_decoder_free(p_schro_params->decoder); av_freep(&p_schro_params->format); ff_schro_queue_free(&p_schro_params->dec_frame_queue, ...
{ "code": [ " return 0;", " SchroDecoderParams *p_schro_params = avctx->priv_data;", " return 0;", " SchroDecoderParams *p_schro_params = avctx->priv_data;", " SchroDecoderParams *p_schro_params = avctx->priv_data;", "static av_cold int libschroedinger_decode_close(AVCodecContex...
static av_cold int FUNC_0(AVCodecContext *avctx) { SchroDecoderParams *p_schro_params = avctx->priv_data; schro_decoder_free(p_schro_params->decoder); av_freep(&p_schro_params->format); ff_schro_queue_free(&p_schro_params->dec_frame_queue, libschroedinger_deco...
[ "static av_cold int FUNC_0(AVCodecContext *avctx)\n{", "SchroDecoderParams *p_schro_params = avctx->priv_data;", "schro_decoder_free(p_schro_params->decoder);", "av_freep(&p_schro_params->format);", "ff_schro_queue_free(&p_schro_params->dec_frame_queue,\nlibschroedinger_decode_frame_free);", "return 0;", ...
[ 1, 1, 1, 1, 1, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 17, 19 ], [ 23 ], [ 25 ] ]
21,935
static void parse_forced_key_frames(char *kf, OutputStream *ost, AVCodecContext *avctx) { char *p; int n = 1, i; int64_t t; for (p = kf; *p; p++) if (*p == ',') n++; ost->forced_kf_count = n; ost->forced_kf_pts = av_malloc(siz...
true
FFmpeg
636ced8e1dc8248a1353b416240b93d70ad03edb
static void parse_forced_key_frames(char *kf, OutputStream *ost, AVCodecContext *avctx) { char *p; int n = 1, i; int64_t t; for (p = kf; *p; p++) if (*p == ',') n++; ost->forced_kf_count = n; ost->forced_kf_pts = av_malloc(siz...
{ "code": [ " exit(1);", " exit(1);", " exit(1);", " exit(1);", " exit(1);", " exit(1);", " exit(1);", " exit(1);", " exit(1);", " exit(1);", " exit(1);", " exit(1);", " exit(...
static void FUNC_0(char *VAR_0, OutputStream *VAR_1, AVCodecContext *VAR_2) { char *VAR_3; int VAR_4 = 1, VAR_5; int64_t t; for (VAR_3 = VAR_0; *VAR_3; VAR_3++) if (*VAR_3 == ',') VAR_4++; VAR_1->forced_kf_count = VAR_4; VAR_1->...
[ "static void FUNC_0(char *VAR_0, OutputStream *VAR_1,\nAVCodecContext *VAR_2)\n{", "char *VAR_3;", "int VAR_4 = 1, VAR_5;", "int64_t t;", "for (VAR_3 = VAR_0; *VAR_3; VAR_3++)", "if (*VAR_3 == ',')\nVAR_4++;", "VAR_1->forced_kf_count = VAR_4;", "VAR_1->forced_kf_pts = av_malloc(sizeof(*VAR_1->forced...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17, 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 35 ], [ 37 ], [ 39 ], [ 43, 45 ], [ 49 ], [ 51 ], [...
21,936
void decode_mvs(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y) { VP8Macroblock *mb_edge[3] = { mb + 2 /* top */, mb - 1 /* left */, mb + 1 /* top-left */ }; enum { CNT_ZERO, CNT_NEAREST, CNT_NEAR, CNT_SPLITMV }; enum { VP8_EDGE...
true
FFmpeg
0f0b5d643401d4d83322eeee0e57eb5a226ef9ab
void decode_mvs(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y) { VP8Macroblock *mb_edge[3] = { mb + 2 , mb - 1 , mb + 1 }; enum { CNT_ZERO, CNT_NEAREST, CNT_NEAR, CNT_SPLITMV }; enum { VP8_EDGE_TOP, VP8_EDGE_LEFT, VP8_EDGE_TOP...
{ "code": [], "line_no": [] }
void FUNC_0(VP8Context *VAR_0, VP8Macroblock *VAR_1, int VAR_2, int VAR_3) { VP8Macroblock *mb_edge[3] = { VAR_1 + 2 , VAR_1 - 1 , VAR_1 + 1 }; enum { CNT_ZERO, CNT_NEAREST, CNT_NEAR, CNT_SPLITMV }; enum { VP8_EDGE_TOP, VP8_EDGE_LEFT...
[ "void FUNC_0(VP8Context *VAR_0, VP8Macroblock *VAR_1, int VAR_2, int VAR_3)\n{", "VP8Macroblock *mb_edge[3] = { VAR_1 + 2 ,", "VAR_1 - 1 ,\nVAR_1 + 1 };", "enum { CNT_ZERO, CNT_NEAREST, CNT_NEAR, CNT_SPLITMV };", "enum { VP8_EDGE_TOP, VP8_EDGE_LEFT, VP8_EDGE_TOPLEFT };", "int VAR_4 = CNT_ZERO;", "int V...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7, 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 29 ], [ 31 ], [ 38, 40 ], [ 42 ], [ 44 ], [ 46 ], [ 48 ], [ 50 ...
21,937
static int check_output_constraints(InputStream *ist, OutputStream *ost) { OutputFile *of = output_files[ost->file_index]; int ist_index = input_files[ist->file_index]->ist_index + ist->st->index; if (ost->source_index != ist_index) return 0; if (of->start_time && ist->pts < of->start...
false
FFmpeg
2fc354f90d61f5f1bb75dbdd808a502dec69cf99
static int check_output_constraints(InputStream *ist, OutputStream *ost) { OutputFile *of = output_files[ost->file_index]; int ist_index = input_files[ist->file_index]->ist_index + ist->st->index; if (ost->source_index != ist_index) return 0; if (of->start_time && ist->pts < of->start...
{ "code": [], "line_no": [] }
static int FUNC_0(InputStream *VAR_0, OutputStream *VAR_1) { OutputFile *of = output_files[VAR_1->file_index]; int VAR_2 = input_files[VAR_0->file_index]->VAR_2 + VAR_0->st->index; if (VAR_1->source_index != VAR_2) return 0; if (of->start_time && VAR_0->pts < of->start_time) ...
[ "static int FUNC_0(InputStream *VAR_0, OutputStream *VAR_1)\n{", "OutputFile *of = output_files[VAR_1->file_index];", "int VAR_2 = input_files[VAR_0->file_index]->VAR_2 + VAR_0->st->index;", "if (VAR_1->source_index != VAR_2)\nreturn 0;", "if (of->start_time && VAR_0->pts < of->start_time)\nreturn 0;", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11, 13 ], [ 17, 19 ], [ 23, 25, 27 ], [ 29 ], [ 31 ], [ 33 ], [ 37 ], [ 39 ] ]
21,939
CPUState *mon_get_cpu(void) { if (!cur_mon->mon_cpu) { monitor_set_cpu(0); } cpu_synchronize_state(cur_mon->mon_cpu); return cur_mon->mon_cpu; }
true
qemu
27a83f8e7ed63ced7e36c47a42f46ab44ee02bd8
CPUState *mon_get_cpu(void) { if (!cur_mon->mon_cpu) { monitor_set_cpu(0); } cpu_synchronize_state(cur_mon->mon_cpu); return cur_mon->mon_cpu; }
{ "code": [ " monitor_set_cpu(0);" ], "line_no": [ 7 ] }
CPUState *FUNC_0(void) { if (!cur_mon->mon_cpu) { monitor_set_cpu(0); } cpu_synchronize_state(cur_mon->mon_cpu); return cur_mon->mon_cpu; }
[ "CPUState *FUNC_0(void)\n{", "if (!cur_mon->mon_cpu) {", "monitor_set_cpu(0);", "}", "cpu_synchronize_state(cur_mon->mon_cpu);", "return cur_mon->mon_cpu;", "}" ]
[ 0, 0, 1, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ] ]
21,940
static int vc1_decode_p_mb_intfr(VC1Context *v) { MpegEncContext *s = &v->s; GetBitContext *gb = &s->gb; int i; int mb_pos = s->mb_x + s->mb_y * s->mb_stride; int cbp = 0; /* cbp decoding stuff */ int mqdiff, mquant; /* MB quantization */ int ttmb = v->ttfrm; /* MB Transform type */ ...
true
FFmpeg
d51d6ae9c41310d62f4582c07c2fad26d41eeca6
static int vc1_decode_p_mb_intfr(VC1Context *v) { MpegEncContext *s = &v->s; GetBitContext *gb = &s->gb; int i; int mb_pos = s->mb_x + s->mb_y * s->mb_stride; int cbp = 0; int mqdiff, mquant; int ttmb = v->ttfrm; int mb_has_coeffs = 1; int dmv_x, dmv_y; int val;...
{ "code": [], "line_no": [] }
static int FUNC_0(VC1Context *VAR_0) { MpegEncContext *s = &VAR_0->s; GetBitContext *gb = &s->gb; int VAR_1; int VAR_2 = s->mb_x + s->mb_y * s->mb_stride; int VAR_3 = 0; int VAR_4, VAR_5; int VAR_6 = VAR_0->ttfrm; int VAR_7 = 1; int VAR_8, VAR_9; int VAR_10; ...
[ "static int FUNC_0(VC1Context *VAR_0)\n{", "MpegEncContext *s = &VAR_0->s;", "GetBitContext *gb = &s->gb;", "int VAR_1;", "int VAR_2 = s->mb_x + s->mb_y * s->mb_stride;", "int VAR_3 = 0;", "int VAR_4, VAR_5;", "int VAR_6 = VAR_0->ttfrm;", "int VAR_7 = 1;", "int VAR_8, VAR_9;", "int VAR_10;", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 41 ], [ 45, 47 ], [...
21,941
ssize_t ne2000_receive(NetClientState *nc, const uint8_t *buf, size_t size_) { NE2000State *s = qemu_get_nic_opaque(nc); int size = size_; uint8_t *p; unsigned int total_len, next, avail, len, index, mcast_idx; uint8_t buf1[60]; static const uint8_t broadcast_macaddr[6] = { 0xff,...
true
qemu
737d2b3c41d59eb8f94ab7eb419b957938f24943
ssize_t ne2000_receive(NetClientState *nc, const uint8_t *buf, size_t size_) { NE2000State *s = qemu_get_nic_opaque(nc); int size = size_; uint8_t *p; unsigned int total_len, next, avail, len, index, mcast_idx; uint8_t buf1[60]; static const uint8_t broadcast_macaddr[6] = { 0xff,...
{ "code": [ " avail = 0;" ], "line_no": [ 161 ] }
ssize_t FUNC_0(NetClientState *nc, const uint8_t *buf, size_t size_) { NE2000State *s = qemu_get_nic_opaque(nc); int VAR_0 = size_; uint8_t *p; unsigned int VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6; uint8_t buf1[60]; static const uint8_t VAR_7[6] = { 0xff, 0xff, 0xff, 0xff, 0xff,...
[ "ssize_t FUNC_0(NetClientState *nc, const uint8_t *buf, size_t size_)\n{", "NE2000State *s = qemu_get_nic_opaque(nc);", "int VAR_0 = size_;", "uint8_t *p;", "unsigned int VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6;", "uint8_t buf1[60];", "static const uint8_t VAR_7[6] =\n{ 0xff, 0xff, 0xff, 0xff, 0xff, 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, 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 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15, 17 ], [ 21, 23 ], [ 25, 29, 31 ], [ 37 ], [ 41 ], [ 43 ], [ 47, 49 ], [ 51 ], [ 55, 57 ], [ 59 ], [ 61,...
21,942
static av_cold int decode_init_thread_copy(AVCodecContext *avctx) { HYuvContext *s = avctx->priv_data; int i, ret; if ((ret = ff_huffyuv_alloc_temp(s)) < 0) { ff_huffyuv_common_end(s); return ret; } for (i = 0; i < 8; i++) s->vlc[i].table = NULL; if (s->version >= 2) { ...
true
FFmpeg
7c7e7c44a6eb68eca861e45cb2ce78f582b12c69
static av_cold int decode_init_thread_copy(AVCodecContext *avctx) { HYuvContext *s = avctx->priv_data; int i, ret; if ((ret = ff_huffyuv_alloc_temp(s)) < 0) { ff_huffyuv_common_end(s); return ret; } for (i = 0; i < 8; i++) s->vlc[i].table = NULL; if (s->version >= 2) { ...
{ "code": [], "line_no": [] }
static av_cold int FUNC_0(AVCodecContext *avctx) { HYuvContext *s = avctx->priv_data; int VAR_0, VAR_1; if ((VAR_1 = ff_huffyuv_alloc_temp(s)) < 0) { ff_huffyuv_common_end(s); return VAR_1; } for (VAR_0 = 0; VAR_0 < 8; VAR_0++) s->vlc[VAR_0].table = NULL; if (s->version >...
[ "static av_cold int FUNC_0(AVCodecContext *avctx)\n{", "HYuvContext *s = avctx->priv_data;", "int VAR_0, VAR_1;", "if ((VAR_1 = ff_huffyuv_alloc_temp(s)) < 0) {", "ff_huffyuv_common_end(s);", "return VAR_1;", "}", "for (VAR_0 = 0; VAR_0 < 8; VAR_0++)", "s->vlc[VAR_0].table = NULL;", "if (s->versio...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 2 ], [ 3 ], [ 4 ], [ 5 ], [ 6 ], [ 7 ], [ 8 ], [ 9 ], [ 10 ], [ 11 ], [ 12, 13, 14 ], [ 15 ], [ 16, 17 ], [ 18 ], [ 19 ], [ 20 ] ]
21,943
static void get_pci_host_devaddr(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { DeviceState *dev = DEVICE(obj); Property *prop = opaque; PCIHostDeviceAddress *addr = qdev_get_prop_ptr(dev, prop); char buffer[] = "xxxx:xx:xx.x"; char *...
true
qemu
00b8702581f312aa46f797a8b3153d9b2892d967
static void get_pci_host_devaddr(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { DeviceState *dev = DEVICE(obj); Property *prop = opaque; PCIHostDeviceAddress *addr = qdev_get_prop_ptr(dev, prop); char buffer[] = "xxxx:xx:xx.x"; char *...
{ "code": [ " char buffer[] = \"xxxx:xx:xx.x\";", " rc = snprintf(buffer, sizeof(buffer), \"%04x:%02x:%02x.%d\",", " addr->domain, addr->bus, addr->slot, addr->function);", " assert(rc == sizeof(buffer) - 1);" ], "line_no": [ 13, 21, 23, 25 ] }
static void FUNC_0(Object *VAR_0, Visitor *VAR_1, const char *VAR_2, void *VAR_3, Error **VAR_4) { DeviceState *dev = DEVICE(VAR_0); Property *prop = VAR_3; PCIHostDeviceAddress *addr = qdev_get_prop_ptr(dev, prop); char VAR_5[] = "xxxx:xx:xx.x"; char *VAR_6 =...
[ "static void FUNC_0(Object *VAR_0, Visitor *VAR_1, const char *VAR_2,\nvoid *VAR_3, Error **VAR_4)\n{", "DeviceState *dev = DEVICE(VAR_0);", "Property *prop = VAR_3;", "PCIHostDeviceAddress *addr = qdev_get_prop_ptr(dev, prop);", "char VAR_5[] = \"xxxx:xx:xx.x\";", "char *VAR_6 = VAR_5;", "int VAR_7 = 0...
[ 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 21, 23 ], [ 25 ], [ 29 ], [ 31 ] ]
21,944
static int cin_probe(AVProbeData *p) { if (p->buf_size < 18) return 0; /* header starts with this special marker */ if (AV_RL32(&p->buf[0]) != 0x55AA0000) return 0; /* for accuracy, check some header field values */ if (AV_RL32(&p->buf[12]) != 22050 || p->buf[16] != 16 ||...
false
FFmpeg
87e8788680e16c51f6048af26f3f7830c35207a5
static int cin_probe(AVProbeData *p) { if (p->buf_size < 18) return 0; if (AV_RL32(&p->buf[0]) != 0x55AA0000) return 0; if (AV_RL32(&p->buf[12]) != 22050 || p->buf[16] != 16 || p->buf[17] != 0) return 0; return AVPROBE_SCORE_MAX; }
{ "code": [], "line_no": [] }
static int FUNC_0(AVProbeData *VAR_0) { if (VAR_0->buf_size < 18) return 0; if (AV_RL32(&VAR_0->buf[0]) != 0x55AA0000) return 0; if (AV_RL32(&VAR_0->buf[12]) != 22050 || VAR_0->buf[16] != 16 || VAR_0->buf[17] != 0) return 0; return AVPROBE_SCORE_MAX; }
[ "static int FUNC_0(AVProbeData *VAR_0)\n{", "if (VAR_0->buf_size < 18)\nreturn 0;", "if (AV_RL32(&VAR_0->buf[0]) != 0x55AA0000)\nreturn 0;", "if (AV_RL32(&VAR_0->buf[12]) != 22050 || VAR_0->buf[16] != 16 || VAR_0->buf[17] != 0)\nreturn 0;", "return AVPROBE_SCORE_MAX;", "}" ]
[ 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5, 7 ], [ 13, 15 ], [ 21, 23 ], [ 27 ], [ 29 ] ]
21,945
static int try_decode_frame(AVStream *st, AVPacket *avpkt, AVDictionary **options) { AVCodec *codec; int got_picture = 1, ret = 0; AVFrame picture; AVPacket pkt = *avpkt; if(!st->codec->codec){ AVDictionary *thread_opt = NULL; codec = avcodec_find_decoder(st->codec->codec...
false
FFmpeg
af08d9aeea870de017139f7b1c44b7d816cf8e56
static int try_decode_frame(AVStream *st, AVPacket *avpkt, AVDictionary **options) { AVCodec *codec; int got_picture = 1, ret = 0; AVFrame picture; AVPacket pkt = *avpkt; if(!st->codec->codec){ AVDictionary *thread_opt = NULL; codec = avcodec_find_decoder(st->codec->codec...
{ "code": [], "line_no": [] }
static int FUNC_0(AVStream *VAR_0, AVPacket *VAR_1, AVDictionary **VAR_2) { AVCodec *codec; int VAR_3 = 1, VAR_4 = 0; AVFrame picture; AVPacket pkt = *VAR_1; if(!VAR_0->codec->codec){ AVDictionary *thread_opt = NULL; codec = avcodec_find_decoder(VAR_0->codec->codec_id); ...
[ "static int FUNC_0(AVStream *VAR_0, AVPacket *VAR_1, AVDictionary **VAR_2)\n{", "AVCodec *codec;", "int VAR_3 = 1, VAR_4 = 0;", "AVFrame picture;", "AVPacket pkt = *VAR_1;", "if(!VAR_0->codec->codec){", "AVDictionary *thread_opt = NULL;", "codec = avcodec_find_decoder(VAR_0->codec->codec_id);", "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 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 21 ], [ 23, 25 ], [ 33 ], [ 35 ], [ 37, 39 ], [ 41, 43 ], [ 45 ], [ 49, 51, 53, 55, 57 ], [ 59 ], [...
21,946
static void validate_thread_parameters(AVCodecContext *avctx) { int frame_threading_supported = (avctx->codec->capabilities & CODEC_CAP_FRAME_THREADS) && !(avctx->flags & CODEC_FLAG_TRUNCATED) && !(avctx->flags & CODEC_FLAG_LOW_DELAY) ...
false
FFmpeg
d0df2934ca63a1d5c31602e6558f341bd738bd07
static void validate_thread_parameters(AVCodecContext *avctx) { int frame_threading_supported = (avctx->codec->capabilities & CODEC_CAP_FRAME_THREADS) && !(avctx->flags & CODEC_FLAG_TRUNCATED) && !(avctx->flags & CODEC_FLAG_LOW_DELAY) ...
{ "code": [], "line_no": [] }
static void FUNC_0(AVCodecContext *VAR_0) { int VAR_1 = (VAR_0->codec->capabilities & CODEC_CAP_FRAME_THREADS) && !(VAR_0->flags & CODEC_FLAG_TRUNCATED) && !(VAR_0->flags & CODEC_FLAG_LOW_DELAY) && !(VAR_0->flags2 &...
[ "static void FUNC_0(AVCodecContext *VAR_0)\n{", "int VAR_1 = (VAR_0->codec->capabilities & CODEC_CAP_FRAME_THREADS)\n&& !(VAR_0->flags & CODEC_FLAG_TRUNCATED)\n&& !(VAR_0->flags & CODEC_FLAG_LOW_DELAY)\n&& !(VAR_0->flags2 & CODEC_FLAG2_CHUNKS);", "if (VAR_0->thread_count == 1) {", "VAR_0->active_thread_type =...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5, 7, 9, 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ] ]
21,947
static int xan_unpack_luma(const uint8_t *src, const int src_size, uint8_t *dst, const int dst_size) { int tree_size, eof; const uint8_t *tree; int bits, mask; int tree_root, node; const uint8_t *dst_end = dst + dst_size; const uint8_t *src_end = src + src_size; ...
true
FFmpeg
55188278169c3a1838334d7aa47a1f7a40741690
static int xan_unpack_luma(const uint8_t *src, const int src_size, uint8_t *dst, const int dst_size) { int tree_size, eof; const uint8_t *tree; int bits, mask; int tree_root, node; const uint8_t *dst_end = dst + dst_size; const uint8_t *src_end = src + src_size; ...
{ "code": [ "static int xan_unpack_luma(const uint8_t *src, const int src_size,", " const uint8_t *tree;", " const uint8_t *src_end = src + src_size;", " tree_size = *src++;", " eof = *src++;", " tree = src - eof * 2 - 2;", " src += tree_size * 2;", " bits = *s...
static int FUNC_0(const uint8_t *VAR_0, const int VAR_1, uint8_t *VAR_2, const int VAR_3) { int VAR_4, VAR_5; const uint8_t *VAR_6; int VAR_7, VAR_8; int VAR_9, VAR_10; const uint8_t *VAR_11 = VAR_2 + VAR_3; const uint8_t *VAR_12 = VAR_0 + VAR_1; VAR_4 = *VAR_0...
[ "static int FUNC_0(const uint8_t *VAR_0, const int VAR_1,\nuint8_t *VAR_2, const int VAR_3)\n{", "int VAR_4, VAR_5;", "const uint8_t *VAR_6;", "int VAR_7, VAR_8;", "int VAR_9, VAR_10;", "const uint8_t *VAR_11 = VAR_2 + VAR_3;", "const uint8_t *VAR_12 = VAR_0 + VAR_1;", "VAR_4 = *VAR_0++;", "VAR_5 ...
[ 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [...
21,949
PPC_OP(set_T1) { T1 = PARAM(1); RETURN(); }
true
qemu
d9bce9d99f4656ae0b0127f7472db9067b8f84ab
PPC_OP(set_T1) { T1 = PARAM(1); RETURN(); }
{ "code": [ " T1 = PARAM(1);", " RETURN();", " RETURN();" ], "line_no": [ 5, 7, 7 ] }
FUNC_0(VAR_0) { T1 = PARAM(1); RETURN(); }
[ "FUNC_0(VAR_0)\n{", "T1 = PARAM(1);", "RETURN();", "}" ]
[ 0, 1, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ] ]
21,950
static int nbd_co_send_request(BlockDriverState *bs, NBDRequest *request, QEMUIOVector *qiov) { NBDClientSession *s = nbd_get_client_session(bs); int rc, ret, i; qemu_co_mutex_lock(&s->send_mutex); while (s->in_flight == MAX_NBD_REQU...
true
qemu
72b6ffc76653214b69a94a7b1643ff80df134486
static int nbd_co_send_request(BlockDriverState *bs, NBDRequest *request, QEMUIOVector *qiov) { NBDClientSession *s = nbd_get_client_session(bs); int rc, ret, i; qemu_co_mutex_lock(&s->send_mutex); while (s->in_flight == MAX_NBD_REQU...
{ "code": [ " if (rc >= 0) {" ], "line_no": [ 65 ] }
static int FUNC_0(BlockDriverState *VAR_0, NBDRequest *VAR_1, QEMUIOVector *VAR_2) { NBDClientSession *s = nbd_get_client_session(VAR_0); int VAR_3, VAR_4, VAR_5; qemu_co_mutex_lock(&s->send_mutex); while (s->in_flight == MAX_NBD_REQ...
[ "static int FUNC_0(BlockDriverState *VAR_0,\nNBDRequest *VAR_1,\nQEMUIOVector *VAR_2)\n{", "NBDClientSession *s = nbd_get_client_session(VAR_0);", "int VAR_3, VAR_4, VAR_5;", "qemu_co_mutex_lock(&s->send_mutex);", "while (s->in_flight == MAX_NBD_REQUESTS) {", "qemu_co_queue_wait(&s->free_sema, &s->send_mu...
[ 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 ]
[ [ 1, 3, 5, 7 ], [ 9 ], [ 11 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 41 ], [ 43 ], [ 45 ], [ 49 ], [ 51 ...
21,952
static void __attribute__((__constructor__)) rcu_init(void) { QemuThread thread; qemu_mutex_init(&rcu_gp_lock); qemu_event_init(&rcu_gp_event, true); qemu_event_init(&rcu_call_ready_event, false); qemu_thread_create(&thread, "call_rcu", call_rcu_thread, NULL, QEMU_T...
true
qemu
21b7cf9e07e5991c57b461181cfb5bbb6fe7a9d6
static void __attribute__((__constructor__)) rcu_init(void) { QemuThread thread; qemu_mutex_init(&rcu_gp_lock); qemu_event_init(&rcu_gp_event, true); qemu_event_init(&rcu_call_ready_event, false); qemu_thread_create(&thread, "call_rcu", call_rcu_thread, NULL, QEMU_T...
{ "code": [ "static void __attribute__((__constructor__)) rcu_init(void)" ], "line_no": [ 1 ] }
static void __attribute__((__constructor__)) FUNC_0(void) { QemuThread thread; qemu_mutex_init(&rcu_gp_lock); qemu_event_init(&rcu_gp_event, true); qemu_event_init(&rcu_call_ready_event, false); qemu_thread_create(&thread, "call_rcu", call_rcu_thread, NULL, QEMU_THR...
[ "static void __attribute__((__constructor__)) FUNC_0(void)\n{", "QemuThread thread;", "qemu_mutex_init(&rcu_gp_lock);", "qemu_event_init(&rcu_gp_event, true);", "qemu_event_init(&rcu_call_ready_event, false);", "qemu_thread_create(&thread, \"call_rcu\", call_rcu_thread,\nNULL, QEMU_THREAD_DETACHED);", "...
[ 1, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 15 ], [ 17, 19 ], [ 23 ], [ 25 ] ]
21,953
static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx, const uint8_t *buf, int buf_size) { GetByteContext gb; const uint8_t *bs_hdr; uint32_t frame_num, word2, check_sum, data_size; uint32_t y_offset, u_offset, v_offset, sta...
true
FFmpeg
34e6af9e204ca6bb18d8cf8ec68fe19b0e083e95
static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx, const uint8_t *buf, int buf_size) { GetByteContext gb; const uint8_t *bs_hdr; uint32_t frame_num, word2, check_sum, data_size; uint32_t y_offset, u_offset, v_offset, sta...
{ "code": [ " if (ctx->data_size > buf_size)", " ctx->data_size = buf_size;" ], "line_no": [ 77, 79 ] }
static int FUNC_0(Indeo3DecodeContext *VAR_0, AVCodecContext *VAR_1, const uint8_t *VAR_2, int VAR_3) { GetByteContext gb; const uint8_t *VAR_4; uint32_t frame_num, word2, check_sum, data_size; uint32_t y_offset, u_offset, v_offset, starts[3], ends[3...
[ "static int FUNC_0(Indeo3DecodeContext *VAR_0, AVCodecContext *VAR_1,\nconst uint8_t *VAR_2, int VAR_3)\n{", "GetByteContext gb;", "const uint8_t *VAR_4;", "uint32_t frame_num, word2, check_sum, data_size;", "uint32_t y_offset, u_offset, v_offset, starts[3], ends[3];", "uint16_t hei...
[ 0, 0, 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, 0, 0, 0...
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 21 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 49 ], [ 53 ], [ 55 ], [...
21,954
static int libquvi_probe(AVProbeData *p) { int score; quvi_t q; QUVIcode rc; rc = quvi_init(&q); if (rc != QUVI_OK) return AVERROR(ENOMEM); score = quvi_supported(q, (char *)p->filename) == QUVI_OK ? AVPROBE_SCORE_EXTENSION : 0; quvi_close(&q); return score; }
true
FFmpeg
2d40a09b6e73230b160a505f01ed1acf169e1d9f
static int libquvi_probe(AVProbeData *p) { int score; quvi_t q; QUVIcode rc; rc = quvi_init(&q); if (rc != QUVI_OK) return AVERROR(ENOMEM); score = quvi_supported(q, (char *)p->filename) == QUVI_OK ? AVPROBE_SCORE_EXTENSION : 0; quvi_close(&q); return score; }
{ "code": [ " quvi_t q;", " QUVIcode rc;", " rc = quvi_init(&q);", " quvi_close(&q);", "static int libquvi_probe(AVProbeData *p)", " int score;", " quvi_t q;", " QUVIcode rc;", " rc = quvi_init(&q);", " if (rc != QUVI_OK)", " return AVERROR...
static int FUNC_0(AVProbeData *VAR_0) { int VAR_1; quvi_t q; QUVIcode rc; rc = quvi_init(&q); if (rc != QUVI_OK) return AVERROR(ENOMEM); VAR_1 = quvi_supported(q, (char *)VAR_0->filename) == QUVI_OK ? AVPROBE_SCORE_EXTENSION : 0; quvi_close(&q); return VAR_1; }
[ "static int FUNC_0(AVProbeData *VAR_0)\n{", "int VAR_1;", "quvi_t q;", "QUVIcode rc;", "rc = quvi_init(&q);", "if (rc != QUVI_OK)\nreturn AVERROR(ENOMEM);", "VAR_1 = quvi_supported(q, (char *)VAR_0->filename) == QUVI_OK ? AVPROBE_SCORE_EXTENSION : 0;", "quvi_close(&q);", "return VAR_1;", "}" ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 13 ], [ 15, 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ] ]
21,955
void rgb16tobgr16(const uint8_t *src, uint8_t *dst, unsigned int src_size) { unsigned i; unsigned num_pixels = src_size >> 1; for(i=0; i<num_pixels; i++) { unsigned b,g,r; register uint16_t rgb; rgb = src[2*i]; r = rgb&0x1F; g = (rgb&0x7E0)>>5; b = (rgb&0xF800)>>11; ...
true
FFmpeg
7f526efd17973ec6d2204f7a47b6923e2be31363
void rgb16tobgr16(const uint8_t *src, uint8_t *dst, unsigned int src_size) { unsigned i; unsigned num_pixels = src_size >> 1; for(i=0; i<num_pixels; i++) { unsigned b,g,r; register uint16_t rgb; rgb = src[2*i]; r = rgb&0x1F; g = (rgb&0x7E0)>>5; b = (rgb&0xF800)>>11; ...
{ "code": [ "\tunsigned i;", "\tunsigned i;", "\tunsigned i;", "\tunsigned i;", "\tunsigned i;", "\tunsigned i;", "\tunsigned i;", "\tunsigned i;", "\tunsigned i;", "\tunsigned i;", "void rgb16tobgr16(const uint8_t *src, uint8_t *dst, unsigned int src_size)", "\tunsigne...
void FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, unsigned int VAR_2) { unsigned VAR_3; unsigned VAR_4 = VAR_2 >> 1; for(VAR_3=0; VAR_3<VAR_4; VAR_3++) { unsigned VAR_5,VAR_6,VAR_7; register uint16_t VAR_8; VAR_8 = VAR_0[2*VAR_3]; VAR_7 = VAR_8&0x1F; VAR_6 = (VAR_8&0x7E0)>>5; ...
[ "void FUNC_0(const uint8_t *VAR_0, uint8_t *VAR_1, unsigned int VAR_2)\n{", "unsigned VAR_3;", "unsigned VAR_4 = VAR_2 >> 1;", "for(VAR_3=0; VAR_3<VAR_4; VAR_3++)", "{", "unsigned VAR_5,VAR_6,VAR_7;", "register uint16_t VAR_8;", "VAR_8 = VAR_0[2*VAR_3];", "VAR_7 = VAR_8&0x1F;", "VAR_6 = (VAR_8&0x7...
[ 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ] ]
21,956
static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64]) { int i, j, k, cbp, val, mb_type, motion_type; const int mb_block_count = 4 + (1 << s->chroma_format); int ret; ff_tlog(s->avctx, "decode_mb: x=%d y=%d\n", s->mb_x, s->mb_y); av_assert2(s->mb_skipped == 0); if (s->m...
true
FFmpeg
a720b854b0d3f0fae2b1eac644dd39e5821cacb1
static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64]) { int i, j, k, cbp, val, mb_type, motion_type; const int mb_block_count = 4 + (1 << s->chroma_format); int ret; ff_tlog(s->avctx, "decode_mb: x=%d y=%d\n", s->mb_x, s->mb_y); av_assert2(s->mb_skipped == 0); if (s->m...
{ "code": [ " cbp <<= mb_block_count - 6;" ], "line_no": [ 659 ] }
static int FUNC_0(MpegEncContext *VAR_0, int16_t VAR_1[12][64]) { int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_11, VAR_8; const int VAR_9 = 4 + (1 << VAR_0->chroma_format); int VAR_10; ff_tlog(VAR_0->avctx, "decode_mb: x=%d y=%d\n", VAR_0->mb_x, VAR_0->mb_y); av_assert2(VAR_0->mb_skipped == ...
[ "static int FUNC_0(MpegEncContext *VAR_0, int16_t VAR_1[12][64])\n{", "int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_11, VAR_8;", "const int VAR_9 = 4 + (1 << VAR_0->chroma_format);", "int VAR_10;", "ff_tlog(VAR_0->avctx, \"decode_mb: x=%d y=%d\\n\", VAR_0->mb_x, VAR_0->mb_y);", "av_assert2(VAR_0->mb_skipped...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 13 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 27, 29 ], [ 31 ], [ 33 ], [ 37, 39 ], [ 41, 45 ], [ 47 ], [ 49 ], [ 51 ], [ 53 ], [...
21,959
static inline void RENAME(rgb15ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width) { int i; assert(src1 == src2); for(i=0; i<width; i++) { int d0= ((uint32_t*)src1)[i]; int dl= (d0&0x03E07C1F); int dh= ((d0>>5)&0x03E0F81F); int dh2= (dh>>11) + (dh<<21); int d=...
true
FFmpeg
2da0d70d5eebe42f9fcd27ee554419ebe2a5da06
static inline void RENAME(rgb15ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width) { int i; assert(src1 == src2); for(i=0; i<width; i++) { int d0= ((uint32_t*)src1)[i]; int dl= (d0&0x03E07C1F); int dh= ((d0>>5)&0x03E0F81F); int dh2= (dh>>11) + (dh<<21); int d=...
{ "code": [ "\tint i;", "\tint i;", "\tint i;", "\tint i;", "\tfor(i=0; i<width; i++)", "\tint i;", "\tfor(i=0; i<width; i++)", " assert(src1 == src2);", "\tint i;", "\tfor(i=0; i<width; i++)", "\tint i;", "\tfor(i=0; i<width; i++)", " assert(src1 == s...
static inline void FUNC_0(rgb15ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width) { int VAR_0; assert(src1 == src2); for(VAR_0=0; VAR_0<width; VAR_0++) { int d0= ((uint32_t*)src1)[VAR_0]; int dl= (d0&0x03E07C1F); int dh= ((d0>>5)&0x03E0F81F); int dh2= (dh>>11) +...
[ "static inline void FUNC_0(rgb15ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width)\n{", "int VAR_0;", "assert(src1 == src2);", "for(VAR_0=0; VAR_0<width; VAR_0++)", "{", "int d0= ((uint32_t*)src1)[VAR_0];", "int dl= (d0&0x03E07C1F);", "int dh= ((d0>>5)&0x03E0F81F);", "int d...
[ 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 17 ], [ 19 ], [ 23 ], [ 25 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ] ]
21,960
const char *av_get_string(void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len){ const AVOption *o= av_find_opt(obj, name, NULL, 0, 0); void *dst; if(!o || o->offset<=0) return NULL; if(o->type != FF_OPT_TYPE_STRING && (!buf || !buf_len)) return NULL; ...
true
FFmpeg
24cdc39e9dfd2b98e96c96387903bd41313bd0dd
const char *av_get_string(void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len){ const AVOption *o= av_find_opt(obj, name, NULL, 0, 0); void *dst; if(!o || o->offset<=0) return NULL; if(o->type != FF_OPT_TYPE_STRING && (!buf || !buf_len)) return NULL; ...
{ "code": [ " return dst;" ], "line_no": [ 25 ] }
const char *FUNC_0(void *VAR_0, const char *VAR_1, const AVOption **VAR_2, char *VAR_3, int VAR_4){ const AVOption *VAR_5= av_find_opt(VAR_0, VAR_1, NULL, 0, 0); void *VAR_6; if(!VAR_5 || VAR_5->offset<=0) return NULL; if(VAR_5->type != FF_OPT_TYPE_STRING && (!VAR_3 || !VAR_4)) ret...
[ "const char *FUNC_0(void *VAR_0, const char *VAR_1, const AVOption **VAR_2, char *VAR_3, int VAR_4){", "const AVOption *VAR_5= av_find_opt(VAR_0, VAR_1, NULL, 0, 0);", "void *VAR_6;", "if(!VAR_5 || VAR_5->offset<=0)\nreturn NULL;", "if(VAR_5->type != FF_OPT_TYPE_STRING && (!VAR_3 || !VAR_4))\nreturn NULL;",...
[ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1 ], [ 3 ], [ 5 ], [ 7, 9 ], [ 11, 13 ], [ 17 ], [ 19 ], [ 23, 25 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ...
21,961
static void increase_dynamic_storage(IVShmemState *s, int new_min_size) { int j, old_nb_alloc; old_nb_alloc = s->nb_peers; while (new_min_size >= s->nb_peers) s->nb_peers = s->nb_peers * 2; IVSHMEM_DPRINTF("bumping storage to %d guests\n", s->nb_peers); s->peers = g_realloc(s->...
true
qemu
34bc07c5282a631c2663ae1ded0a186f46f64612
static void increase_dynamic_storage(IVShmemState *s, int new_min_size) { int j, old_nb_alloc; old_nb_alloc = s->nb_peers; while (new_min_size >= s->nb_peers) s->nb_peers = s->nb_peers * 2; IVSHMEM_DPRINTF("bumping storage to %d guests\n", s->nb_peers); s->peers = g_realloc(s->...
{ "code": [ "static void increase_dynamic_storage(IVShmemState *s, int new_min_size) {", " while (new_min_size >= s->nb_peers)", " s->nb_peers = s->nb_peers * 2;" ], "line_no": [ 1, 13, 15 ] }
static void FUNC_0(IVShmemState *VAR_0, int VAR_1) { int VAR_2, VAR_3; VAR_3 = VAR_0->nb_peers; while (VAR_1 >= VAR_0->nb_peers) VAR_0->nb_peers = VAR_0->nb_peers * 2; IVSHMEM_DPRINTF("bumping storage to %d guests\n", VAR_0->nb_peers); VAR_0->peers = g_realloc(VAR_0->peers, VAR...
[ "static void FUNC_0(IVShmemState *VAR_0, int VAR_1) {", "int VAR_2, VAR_3;", "VAR_3 = VAR_0->nb_peers;", "while (VAR_1 >= VAR_0->nb_peers)\nVAR_0->nb_peers = VAR_0->nb_peers * 2;", "IVSHMEM_DPRINTF(\"bumping storage to %d guests\\n\", VAR_0->nb_peers);", "VAR_0->peers = g_realloc(VAR_0->peers, VAR_0->nb_p...
[ 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1 ], [ 5 ], [ 9 ], [ 13, 15 ], [ 19 ], [ 21 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ] ]
21,963
static void usb_host_auto_check(void *unused) { struct USBHostDevice *s; struct USBAutoFilter *f; libusb_device **devs; struct libusb_device_descriptor ddesc; int unconnected = 0; int i, n; if (usb_host_init() != 0) { return; } if (runstate_is_running()) { ...
true
qemu
3ce21445387c64032a21ae73c995195307a28a36
static void usb_host_auto_check(void *unused) { struct USBHostDevice *s; struct USBAutoFilter *f; libusb_device **devs; struct libusb_device_descriptor ddesc; int unconnected = 0; int i, n; if (usb_host_init() != 0) { return; } if (runstate_is_running()) { ...
{ "code": [ " libusb_device **devs;", " libusb_device **devs;" ], "line_no": [ 9, 9 ] }
static void FUNC_0(void *VAR_0) { struct USBHostDevice *VAR_1; struct USBAutoFilter *VAR_2; libusb_device **devs; struct libusb_device_descriptor VAR_3; int VAR_4 = 0; int VAR_5, VAR_6; if (usb_host_init() != 0) { return; } if (runstate_is_running()) { ...
[ "static void FUNC_0(void *VAR_0)\n{", "struct USBHostDevice *VAR_1;", "struct USBAutoFilter *VAR_2;", "libusb_device **devs;", "struct libusb_device_descriptor VAR_3;", "int VAR_4 = 0;", "int VAR_5, VAR_6;", "if (usb_host_init() != 0) {", "return;", "}", "if (runstate_is_running()) {", "VAR_6 ...
[ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 21 ], [ 23 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ...
21,964
int tcg_gen_code(TCGContext *s, TranslationBlock *tb) { #ifdef CONFIG_PROFILER TCGProfile *prof = &s->prof; #endif int i, oi, oi_next, num_insns; #ifdef CONFIG_PROFILER { int n; n = s->gen_op_buf[0].prev + 1; atomic_set(&prof->op_count, prof->op_count + n); if ...
true
qemu
15fa08f8451babc88d733bd411d4c94976f9d0f8
int tcg_gen_code(TCGContext *s, TranslationBlock *tb) { #ifdef CONFIG_PROFILER TCGProfile *prof = &s->prof; #endif int i, oi, oi_next, num_insns; #ifdef CONFIG_PROFILER { int n; n = s->gen_op_buf[0].prev + 1; atomic_set(&prof->op_count, prof->op_count + n); if ...
{ "code": [ "#endif", " for (oi = s->gen_op_buf[0].next; oi != 0; oi = oi_next) {", " TCGOp * const op = &s->gen_op_buf[oi];", " oi_next = op->next;", " TCGOp * const op = &s->gen_op_buf[oi];", " for (oi = s->gen_op_buf[0].next; oi != 0; oi = oi_next) {", " ...
int FUNC_0(TCGContext *VAR_0, TranslationBlock *VAR_1) { #ifdef CONFIG_PROFILER TCGProfile *prof = &VAR_0->prof; #endif int VAR_2, VAR_3, VAR_4, VAR_5; #ifdef CONFIG_PROFILER { int n; n = VAR_0->gen_op_buf[0].prev + 1; atomic_set(&prof->op_count, prof->op_count + n); ...
[ "int FUNC_0(TCGContext *VAR_0, TranslationBlock *VAR_1)\n{", "#ifdef CONFIG_PROFILER\nTCGProfile *prof = &VAR_0->prof;", "#endif\nint VAR_2, VAR_3, VAR_4, VAR_5;", "#ifdef CONFIG_PROFILER\n{", "int n;", "n = VAR_0->gen_op_buf[0].prev + 1;", "atomic_set(&prof->op_count, prof->op_count + n);", "if (n > ...
[ 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0...
[ [ 1, 3 ], [ 5, 7 ], [ 9, 11 ], [ 15, 17 ], [ 19 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47, 51, 53, 55 ...
21,965
void palette_destroy(VncPalette *palette) { if (palette == NULL) { qemu_free(palette); } }
true
qemu
d6e58090fed20e30e6966007bc4df0c04324d9e7
void palette_destroy(VncPalette *palette) { if (palette == NULL) { qemu_free(palette); } }
{ "code": [ " if (palette == NULL) {", " qemu_free(palette);" ], "line_no": [ 5, 7 ] }
void FUNC_0(VncPalette *VAR_0) { if (VAR_0 == NULL) { qemu_free(VAR_0); } }
[ "void FUNC_0(VncPalette *VAR_0)\n{", "if (VAR_0 == NULL) {", "qemu_free(VAR_0);", "}", "}" ]
[ 0, 1, 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ] ]
21,966
static int ivshmem_setup_interrupts(IVShmemState *s) { /* allocate QEMU callback data for receiving interrupts */ s->msi_vectors = g_malloc0(s->vectors * sizeof(MSIVector)); if (ivshmem_has_feature(s, IVSHMEM_MSI)) { if (msix_init_exclusive_bar(PCI_DEVICE(s), s->vectors, 1)) { re...
true
qemu
ee640c625e190a0c0e6b8966adc0e4720fb75200
static int ivshmem_setup_interrupts(IVShmemState *s) { s->msi_vectors = g_malloc0(s->vectors * sizeof(MSIVector)); if (ivshmem_has_feature(s, IVSHMEM_MSI)) { if (msix_init_exclusive_bar(PCI_DEVICE(s), s->vectors, 1)) { return -1; } IVSHMEM_DPRINTF("msix initi...
{ "code": [ "static int ivshmem_setup_interrupts(IVShmemState *s)", " if (msix_init_exclusive_bar(PCI_DEVICE(s), s->vectors, 1)) {" ], "line_no": [ 1, 13 ] }
static int FUNC_0(IVShmemState *VAR_0) { VAR_0->msi_vectors = g_malloc0(VAR_0->vectors * sizeof(MSIVector)); if (ivshmem_has_feature(VAR_0, IVSHMEM_MSI)) { if (msix_init_exclusive_bar(PCI_DEVICE(VAR_0), VAR_0->vectors, 1)) { return -1; } IVSHMEM_DPRINTF("msix...
[ "static int FUNC_0(IVShmemState *VAR_0)\n{", "VAR_0->msi_vectors = g_malloc0(VAR_0->vectors * sizeof(MSIVector));", "if (ivshmem_has_feature(VAR_0, IVSHMEM_MSI)) {", "if (msix_init_exclusive_bar(PCI_DEVICE(VAR_0), VAR_0->vectors, 1)) {", "return -1;", "}", "IVSHMEM_DPRINTF(\"msix initialized (%d vectors...
[ 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 7 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 21 ], [ 23 ], [ 25 ], [ 29 ], [ 31 ] ]
21,968
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_sampl...
true
FFmpeg
4a5cc34b46a8bf8d47ec907383be83b6153b9f69
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_sampl...
{ "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_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11 = 0; int VAR_12, VAR_13, VAR_14 = 0, VAR_15 = 0, VAR_16 = VAR_0->block_samples; ui...
[ "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_6, VAR_7, VAR_8, VAR_9, 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_20;...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 2, 3, 4 ], [ 5 ], [ 6 ], [ 7 ], [ 8 ], [ 9 ], [ 10 ], [ 11 ], [ 12 ], [ 13 ], [ 14 ], [ 15, 16 ], [ 17 ], [ 18 ], [ 19 ], [ 20 ], [ 21 ], [ 22 ], [ ...
21,970
virtio_crypto_check_cryptodev_is_used(Object *obj, const char *name, Object *val, Error **errp) { if (cryptodev_backend_is_used(CRYPTODEV_BACKEND(val))) { char *path = object_get_canonical_path_component(val); error_setg(errp, "can't use alread...
true
qemu
8f5d58ef2c92d7b82d9a6eeefd7c8854a183ba4a
virtio_crypto_check_cryptodev_is_used(Object *obj, const char *name, Object *val, Error **errp) { if (cryptodev_backend_is_used(CRYPTODEV_BACKEND(val))) { char *path = object_get_canonical_path_component(val); error_setg(errp, "can't use alread...
{ "code": [ "virtio_crypto_check_cryptodev_is_used(Object *obj, const char *name," ], "line_no": [ 1 ] }
FUNC_0(Object *VAR_0, const char *VAR_1, Object *VAR_2, Error **VAR_3) { if (cryptodev_backend_is_used(CRYPTODEV_BACKEND(VAR_2))) { char *VAR_4 = object_get_canonical_path_component(VAR_2); error_setg(VAR_3, "can't use already used cryptodev ba...
[ "FUNC_0(Object *VAR_0, const char *VAR_1,\nObject *VAR_2, Error **VAR_3)\n{", "if (cryptodev_backend_is_used(CRYPTODEV_BACKEND(VAR_2))) {", "char *VAR_4 = object_get_canonical_path_component(VAR_2);", "error_setg(VAR_3,\n\"can't use already used cryptodev backend: %s\", VAR_4);", "g_free(VAR_4);", "} else...
[ 1, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3, 5 ], [ 7 ], [ 9 ], [ 11, 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ] ]
21,973
static void unterminated_dict(void) { QObject *obj = qobject_from_json("{'abc':32", NULL); g_assert(obj == NULL); }
true
qemu
aec4b054ea36c53c8b887da99f20010133b84378
static void unterminated_dict(void) { QObject *obj = qobject_from_json("{'abc':32", NULL); g_assert(obj == NULL); }
{ "code": [ " QObject *obj = qobject_from_json(\"{'abc':32\", NULL);" ], "line_no": [ 5 ] }
static void FUNC_0(void) { QObject *obj = qobject_from_json("{'abc':32", NULL); g_assert(obj == NULL); }
[ "static void FUNC_0(void)\n{", "QObject *obj = qobject_from_json(\"{'abc':32\", NULL);", "g_assert(obj == NULL);", "}" ]
[ 0, 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ] ]
21,975
static void* attribute_align_arg worker(void *v) { AVCodecContext *avctx = v; SliceThreadContext *c = avctx->internal->thread_ctx; unsigned last_execute = 0; int our_job = c->job_count; int thread_count = avctx->thread_count; int self_id; pthread_mutex_lock(&c->current_job_lock); ...
false
FFmpeg
50ce510ac4e3ed093c051738242a9a75aeeb36ce
static void* attribute_align_arg worker(void *v) { AVCodecContext *avctx = v; SliceThreadContext *c = avctx->internal->thread_ctx; unsigned last_execute = 0; int our_job = c->job_count; int thread_count = avctx->thread_count; int self_id; pthread_mutex_lock(&c->current_job_lock); ...
{ "code": [], "line_no": [] }
static void* VAR_0 worker(void *v) { AVCodecContext *avctx = v; SliceThreadContext *c = avctx->internal->thread_ctx; unsigned last_execute = 0; int our_job = c->job_count; int thread_count = avctx->thread_count; int self_id; pthread_mutex_lock(&c->current_job_lock); self_id = ...
[ "static void* VAR_0 worker(void *v)\n{", "AVCodecContext *avctx = v;", "SliceThreadContext *c = avctx->internal->thread_ctx;", "unsigned last_execute = 0;", "int our_job = c->job_count;", "int thread_count = avctx->thread_count;", "int self_id;", "pthread_mutex_lock(&c->current_job_lock);", "self_id...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27, 29 ], [ 33, 35 ], [ 37 ], [ 39 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ...
21,976
static void avc_h_loop_filter_luma_mbaff_intra_msa(uint8_t *src, int32_t stride, int32_t alpha_in, int32_t beta_in) { uint64_t load0, load1; uint32_t out...
false
FFmpeg
bcd7bf7eeb09a395cc01698842d1b8be9af483fc
static void avc_h_loop_filter_luma_mbaff_intra_msa(uint8_t *src, int32_t stride, int32_t alpha_in, int32_t beta_in) { uint64_t load0, load1; uint32_t out...
{ "code": [], "line_no": [] }
static void FUNC_0(uint8_t *VAR_0, int32_t VAR_1, int32_t VAR_2, int32_t VAR_3) { uint64_t load0, load1; uint32_t out0, out2; uint16_t out1, out3; ...
[ "static void FUNC_0(uint8_t *VAR_0,\nint32_t VAR_1,\nint32_t VAR_2,\nint32_t VAR_3)\n{", "uint64_t load0, load1;", "uint32_t out0, out2;", "uint16_t out1, out3;", "v8u16 src0_r, src1_r, src2_r, src3_r, src4_r, src5_r, src6_r, src7_r;", "v8u16 dst0_r, dst1_r, dst4_r, dst5_r;", "v8u16 dst2_x_r, dst2_y_r, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ 1, 3, 5, 7, 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 21 ], [ 23 ], [ 25 ], [ 27 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [...
21,977
static int mov_read_tkhd(MOVContext *c, ByteIOContext *pb, MOVAtom atom) { int i; int width; int height; int64_t disp_transform[2]; int display_matrix[3][2]; AVStream *st = c->fc->streams[c->fc->nb_streams-1]; MOVStreamContext *sc = st->priv_data; int version = get_byte(pb); ...
false
FFmpeg
6a63ff19b6a7fe3bc32c7fb4a62fca8f65786432
static int mov_read_tkhd(MOVContext *c, ByteIOContext *pb, MOVAtom atom) { int i; int width; int height; int64_t disp_transform[2]; int display_matrix[3][2]; AVStream *st = c->fc->streams[c->fc->nb_streams-1]; MOVStreamContext *sc = st->priv_data; int version = get_byte(pb); ...
{ "code": [], "line_no": [] }
static int FUNC_0(MOVContext *VAR_0, ByteIOContext *VAR_1, MOVAtom VAR_2) { int VAR_3; int VAR_4; int VAR_5; int64_t disp_transform[2]; int VAR_6[3][2]; AVStream *st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1]; MOVStreamContext *sc = st->priv_data; int VAR_7 = get_byte(VAR_1);...
[ "static int FUNC_0(MOVContext *VAR_0, ByteIOContext *VAR_1, MOVAtom VAR_2)\n{", "int VAR_3;", "int VAR_4;", "int VAR_5;", "int64_t disp_transform[2];", "int VAR_6[3][2];", "AVStream *st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1];", "MOVStreamContext *sc = st->priv_data;", "int VAR_7 = get_byte(VA...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 19 ], [ 23 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [ 51 ], [ 53 ], [ 55 ], [ 61 ...
21,978
static void v9fs_read(void *opaque) { int32_t fid; int64_t off; ssize_t err = 0; int32_t count = 0; size_t offset = 7; int32_t max_count; V9fsFidState *fidp; V9fsPDU *pdu = opaque; V9fsState *s = pdu->s; pdu_unmarshal(pdu, offset, "dqd", &fid, &off, &max_count); ...
true
qemu
c572f23a3e7180dbeab5e86583e43ea2afed6271
static void v9fs_read(void *opaque) { int32_t fid; int64_t off; ssize_t err = 0; int32_t count = 0; size_t offset = 7; int32_t max_count; V9fsFidState *fidp; V9fsPDU *pdu = opaque; V9fsState *s = pdu->s; pdu_unmarshal(pdu, offset, "dqd", &fid, &off, &max_count); ...
{ "code": [], "line_no": [] }
static void FUNC_0(void *VAR_0) { int32_t fid; int64_t off; ssize_t err = 0; int32_t count = 0; size_t offset = 7; int32_t max_count; V9fsFidState *fidp; V9fsPDU *pdu = VAR_0; V9fsState *s = pdu->s; pdu_unmarshal(pdu, offset, "dqd", &fid, &off, &max_count); f...
[ "static void FUNC_0(void *VAR_0)\n{", "int32_t fid;", "int64_t off;", "ssize_t err = 0;", "int32_t count = 0;", "size_t offset = 7;", "int32_t max_count;", "V9fsFidState *fidp;", "V9fsPDU *pdu = VAR_0;", "V9fsState *s = pdu->s;", "pdu_unmarshal(pdu, offset, \"dqd\", &fid, &off, &max_count);", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ], [ 30 ], [ 32 ], [ 34 ], [ 36 ], [ 38 ], [ 40 ], [ 44 ], [ 46 ], [ 48 ...
21,979
int qio_channel_readv_all(QIOChannel *ioc, const struct iovec *iov, size_t niov, Error **errp) { int ret = -1; struct iovec *local_iov = g_new(struct iovec, niov); struct iovec *local_iov_head = local_iov; unsigned int...
true
qemu
e8ffaa311080a570a7c86d03c139c160cd11a831
int qio_channel_readv_all(QIOChannel *ioc, const struct iovec *iov, size_t niov, Error **errp) { int ret = -1; struct iovec *local_iov = g_new(struct iovec, niov); struct iovec *local_iov_head = local_iov; unsigned int...
{ "code": [ "int qio_channel_readv_all(QIOChannel *ioc,", " const struct iovec *iov,", " size_t niov,", " Error **errp)", " error_setg(errp,", " \"Unexpected end-of-file before all bytes...
int FUNC_0(QIOChannel *VAR_0, const struct iovec *VAR_1, size_t VAR_2, Error **VAR_3) { int VAR_4 = -1; struct iovec *VAR_5 = g_new(struct iovec, VAR_2); struct iovec *VAR_6 = VAR_5; unsigned int VAR_7 = VAR_2; ...
[ "int FUNC_0(QIOChannel *VAR_0,\nconst struct iovec *VAR_1,\nsize_t VAR_2,\nError **VAR_3)\n{", "int VAR_4 = -1;", "struct iovec *VAR_5 = g_new(struct iovec, VAR_2);", "struct iovec *VAR_6 = VAR_5;", "unsigned int VAR_7 = VAR_2;", "VAR_7 = iov_copy(VAR_5, VAR_7,\nVAR_1, VAR_2,\n0, iov_size(VAR_1, VAR_2));"...
[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0 ]
[ [ 1, 3, 5, 7, 9 ], [ 11 ], [ 13 ], [ 15 ], [ 17 ], [ 21, 23, 25 ], [ 29 ], [ 31 ], [ 33 ], [ 35 ], [ 37 ], [ 39 ], [ 41 ], [ 43 ], [ 45 ], [ 47 ], [ 49 ], [...
21,981
void qvirtio_pci_device_disable(QVirtioPCIDevice *d) { qpci_iounmap(d->pdev, d->addr); d->addr = NULL; }
true
qemu
b4ba67d9a702507793c2724e56f98e9b0f7be02b
void qvirtio_pci_device_disable(QVirtioPCIDevice *d) { qpci_iounmap(d->pdev, d->addr); d->addr = NULL; }
{ "code": [ " qpci_iounmap(d->pdev, d->addr);", " d->addr = NULL;" ], "line_no": [ 5, 7 ] }
void FUNC_0(QVirtioPCIDevice *VAR_0) { qpci_iounmap(VAR_0->pdev, VAR_0->addr); VAR_0->addr = NULL; }
[ "void FUNC_0(QVirtioPCIDevice *VAR_0)\n{", "qpci_iounmap(VAR_0->pdev, VAR_0->addr);", "VAR_0->addr = NULL;", "}" ]
[ 0, 1, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 9 ] ]
21,982
static void vfio_vga_quirk_teardown(VFIODevice *vdev) { int i; for (i = 0; i < ARRAY_SIZE(vdev->vga.region); i++) { while (!QLIST_EMPTY(&vdev->vga.region[i].quirks)) { VFIOQuirk *quirk = QLIST_FIRST(&vdev->vga.region[i].quirks); memory_region_del_subregion(&vdev->vga.regi...
true
qemu
7c4228b4771acddcb8815079bc116007cec8a1ff
static void vfio_vga_quirk_teardown(VFIODevice *vdev) { int i; for (i = 0; i < ARRAY_SIZE(vdev->vga.region); i++) { while (!QLIST_EMPTY(&vdev->vga.region[i].quirks)) { VFIOQuirk *quirk = QLIST_FIRST(&vdev->vga.region[i].quirks); memory_region_del_subregion(&vdev->vga.regi...
{ "code": [], "line_no": [] }
static void FUNC_0(VFIODevice *VAR_0) { int VAR_1; for (VAR_1 = 0; VAR_1 < ARRAY_SIZE(VAR_0->vga.region); VAR_1++) { while (!QLIST_EMPTY(&VAR_0->vga.region[VAR_1].quirks)) { VFIOQuirk *quirk = QLIST_FIRST(&VAR_0->vga.region[VAR_1].quirks); memory_region_del_subregion(&VAR...
[ "static void FUNC_0(VFIODevice *VAR_0)\n{", "int VAR_1;", "for (VAR_1 = 0; VAR_1 < ARRAY_SIZE(VAR_0->vga.region); VAR_1++) {", "while (!QLIST_EMPTY(&VAR_0->vga.region[VAR_1].quirks)) {", "VFIOQuirk *quirk = QLIST_FIRST(&VAR_0->vga.region[VAR_1].quirks);", "memory_region_del_subregion(&VAR_0->vga.region[VA...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 9 ], [ 11 ], [ 13 ], [ 15 ], [ 18 ], [ 20 ], [ 22 ], [ 24 ], [ 26 ] ]
21,983
int ff_v4l2_m2m_codec_full_reinit(V4L2m2mContext *s) { void *log_ctx = s->avctx; int ret; av_log(log_ctx, AV_LOG_DEBUG, "%s full reinit\n", s->devname); /* wait for pending buffer references */ if (atomic_load(&s->refcount)) while(sem_wait(&s->refsync) == -1 && errno == EINTR); ...
true
FFmpeg
a0c624e299730c8c5800375c2f5f3c6c200053ff
int ff_v4l2_m2m_codec_full_reinit(V4L2m2mContext *s) { void *log_ctx = s->avctx; int ret; av_log(log_ctx, AV_LOG_DEBUG, "%s full reinit\n", s->devname); if (atomic_load(&s->refcount)) while(sem_wait(&s->refsync) == -1 && errno == EINTR); ff_v4l2_m2m_codec_end(s->avct...
{ "code": [ " ff_v4l2_m2m_codec_end(s->avctx);", " s->fd = open(s->devname, O_RDWR | O_NONBLOCK, 0);", " if (s->fd < 0)", " return AVERROR(errno);", " ret = v4l2_prepare_contexts(s);", " if (ret < 0)", " goto error;", " if (close(s->fd) < 0) {", " ...
int FUNC_0(V4L2m2mContext *VAR_0) { void *VAR_1 = VAR_0->avctx; int VAR_2; av_log(VAR_1, AV_LOG_DEBUG, "%VAR_0 full reinit\n", VAR_0->devname); if (atomic_load(&VAR_0->refcount)) while(sem_wait(&VAR_0->refsync) == -1 && errno == EINTR); ff_v4l2_m2m_codec_end(VAR_0->a...
[ "int FUNC_0(V4L2m2mContext *VAR_0)\n{", "void *VAR_1 = VAR_0->avctx;", "int VAR_2;", "av_log(VAR_1, AV_LOG_DEBUG, \"%VAR_0 full reinit\\n\", VAR_0->devname);", "if (atomic_load(&VAR_0->refcount))\nwhile(sem_wait(&VAR_0->refsync) == -1 && errno == EINTR);", "ff_v4l2_m2m_codec_end(VAR_0->avctx);", "VAR_0-...
[ 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ], [ 11 ], [ 17, 19 ], [ 25 ], [ 31 ], [ 33 ], [ 37 ], [ 39, 41 ], [ 45 ], [ 47, 49 ], [ 59 ], [ 61 ], [ 63 ], [ 65 ], [ 67 ], [ 71 ], ...
21,984
static av_cold int wmv2_decode_init(AVCodecContext *avctx){ Wmv2Context * const w= avctx->priv_data; if(avctx->idct_algo==FF_IDCT_AUTO){ avctx->idct_algo=FF_IDCT_WMV2; } if(ff_msmpeg4_decode_init(avctx) < 0) return -1; ff_wmv2_common_init(w); ff_intrax8_common_ini...
true
FFmpeg
e6bc38fd49c94726b45d5d5cc2b756ad8ec49ee0
static av_cold int wmv2_decode_init(AVCodecContext *avctx){ Wmv2Context * const w= avctx->priv_data; if(avctx->idct_algo==FF_IDCT_AUTO){ avctx->idct_algo=FF_IDCT_WMV2; } if(ff_msmpeg4_decode_init(avctx) < 0) return -1; ff_wmv2_common_init(w); ff_intrax8_common_ini...
{ "code": [ " if(avctx->idct_algo==FF_IDCT_AUTO){", " avctx->idct_algo=FF_IDCT_WMV2;" ], "line_no": [ 7, 9 ] }
static av_cold int FUNC_0(AVCodecContext *avctx){ Wmv2Context * const w= avctx->priv_data; if(avctx->idct_algo==FF_IDCT_AUTO){ avctx->idct_algo=FF_IDCT_WMV2; } if(ff_msmpeg4_decode_init(avctx) < 0) return -1; ff_wmv2_common_init(w); ff_intrax8_common_init(&w->x8,&...
[ "static av_cold int FUNC_0(AVCodecContext *avctx){", "Wmv2Context * const w= avctx->priv_data;", "if(avctx->idct_algo==FF_IDCT_AUTO){", "avctx->idct_algo=FF_IDCT_WMV2;", "}", "if(ff_msmpeg4_decode_init(avctx) < 0)\nreturn -1;", "ff_wmv2_common_init(w);", "ff_intrax8_common_init(&w->x8,&w->s);", "ret...
[ 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 ]
[ [ 1 ], [ 3 ], [ 7 ], [ 9 ], [ 11 ], [ 15, 17 ], [ 21 ], [ 25 ], [ 29 ], [ 31 ] ]
21,985
static inline int divide3(int x) { return ((x+1)*21845 + 10922) >> 16; }
true
FFmpeg
c0220c768c7fc933a76c863ebbb0abdf68a88533
static inline int divide3(int x) { return ((x+1)*21845 + 10922) >> 16; }
{ "code": [ " return ((x+1)*21845 + 10922) >> 16;" ], "line_no": [ 5 ] }
static inline int FUNC_0(int VAR_0) { return ((VAR_0+1)*21845 + 10922) >> 16; }
[ "static inline int FUNC_0(int VAR_0)\n{", "return ((VAR_0+1)*21845 + 10922) >> 16;", "}" ]
[ 0, 1, 0 ]
[ [ 1, 3 ], [ 5 ], [ 7 ] ]