label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
0 | char* qdev_get_fw_dev_path(DeviceState *dev) { char path[128]; int l; l = qdev_get_fw_dev_path_helper(dev, path, 128); path[l-1] = '\0'; return strdup(path); } | 21,494 |
0 | static ssize_t drop_sync(QIOChannel *ioc, size_t size) { ssize_t ret, dropped = size; char small[1024]; char *buffer; buffer = sizeof(small) < size ? small : g_malloc(MIN(65536, size)); while (size > 0) { ret = read_sync(ioc, buffer, MIN(65536, size)); if (ret < 0) { goto cleanup; } assert(ret <= size); size -= ret; } ... | 21,495 |
0 | static BlockAIOCB *bdrv_aio_readv_em(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockCompletionFunc *cb, void *opaque) { return bdrv_aio_rw_vector(bs, sector_num, qiov, nb_sectors, cb, opaque, 0); } | 21,496 |
0 | static int seek_frame_generic(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { int index; int64_t ret; AVStream *st; AVIndexEntry *ie; st = s->streams[stream_index]; index = av_index_search_timestamp(st, timestamp, flags); if(index < 0 && st->nb_index_entries && timestamp < st->index_entries[0].tim... | 21,497 |
0 | static void dvbsub_parse_page_segment(AVCodecContext *avctx, const uint8_t *buf, int buf_size) { DVBSubContext *ctx = avctx->priv_data; DVBSubRegionDisplay *display; DVBSubRegionDisplay *tmp_display_list, **tmp_ptr; const uint8_t *buf_end = buf + buf_size; int region_id; int page_state; if (buf_size < 1) return; ctx->t... | 21,498 |
0 | static void test_qemu_strtoul_negative(void) { const char *str = " \t -321"; char f = 'X'; const char *endptr = &f; unsigned long res = 999; int err; err = qemu_strtoul(str, &endptr, 0, &res); g_assert_cmpint(err, ==, 0); g_assert_cmpint(res, ==, -321ul); g_assert(endptr == str + strlen(str)); } | 21,499 |
0 | static int is_cpuid_supported(void) { return 1; } | 21,500 |
0 | void vnc_display_init(const char *id) { VncDisplay *vs; if (vnc_display_find(id) != NULL) { return; } vs = g_malloc0(sizeof(*vs)); vs->id = strdup(id); QTAILQ_INSERT_TAIL(&vnc_displays, vs, next); vs->lsock = -1; #ifdef CONFIG_VNC_WS vs->lwebsock = -1; #endif QTAILQ_INIT(&vs->clients); vs->expires = TIME_MAX; if (keybo... | 21,501 |
0 | static int get_key(const char **ropts, const char *delim, char *key, unsigned key_size) { unsigned key_pos = 0; const char *opts = *ropts; opts += strspn(opts, WHITESPACES); while (is_key_char(*opts)) { key[key_pos++] = *opts; if (key_pos == key_size) key_pos--; (opts)++; } opts += strspn(opts, WHITESPACES); if (!*opts... | 21,502 |
0 | static void expand_timestamps(void *log, struct sbg_script *s) { int i, nb_rel = 0; int64_t now, cur_ts, delta = 0; for (i = 0; i < s->nb_tseq; i++) nb_rel += s->tseq[i].ts.type == 'N'; if (nb_rel == s->nb_tseq) { /* All ts are relative to NOW: consider NOW = 0 */ now = 0; if (s->start_ts != AV_NOPTS_VALUE) av_log(log,... | 21,503 |
0 | static void generate_len_table(uint8_t *dst, uint64_t *stats, int size){ heap_elem_t h[size]; int up[2*size]; int len[2*size]; int offset, i, next; for(offset=1; ; offset<<=1){ for(i=0; i<size; i++){ h[i].name = i; h[i].val = (stats[i] << 8) + offset; } for(i=size/2-1; i>=0; i--) heap_sift(h, i, size); for(next=size; n... | 21,504 |
0 | static int scale_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame) { AVFilterContext *avctx = inlink->dst; AVFilterLink *outlink = avctx->outputs[0]; ScaleVAAPIContext *ctx = avctx->priv; AVFrame *output_frame = NULL; VASurfaceID input_surface, output_surface; VAProcPipelineParameterBuffer params; VABuffer... | 21,505 |
1 | static int get_packet(URLContext *s, int for_header) { RTMPContext *rt = s->priv_data; int ret; uint8_t *p; const uint8_t *next; uint32_t data_size; uint32_t ts, cts, pts=0; if (rt->state == STATE_STOPPED) return AVERROR_EOF; for (;;) { RTMPPacket rpkt = { 0 }; if ((ret = ff_rtmp_packet_read(rt->stream, &rpkt, rt->chun... | 21,506 |
1 | static void save_display_set(DVBSubContext *ctx) { DVBSubRegion *region; DVBSubRegionDisplay *display; DVBSubCLUT *clut; uint32_t *clut_table; int x_pos, y_pos, width, height; int x, y, y_off, x_off; uint32_t *pbuf; char filename[32]; static int fileno_index = 0; x_pos = -1; y_pos = -1; width = 0; height = 0; for (disp... | 21,507 |
1 | int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen, void *log_ctx) { char *tail, color_string2[128]; const ColorEntry *entry; int len, hex_offset = 0; if (color_string[0] == '#') { hex_offset = 1; } else if (!strncmp(color_string, "0x", 2)) hex_offset = 2; if (slen < 0) slen = strlen(color_strin... | 21,509 |
1 | int i2c_start_transfer(I2CBus *bus, uint8_t address, int recv) { BusChild *kid; I2CSlaveClass *sc; I2CNode *node; if (address == 0x00) { /* * This is a broadcast, the current_devs will be all the devices of the * bus. */ bus->broadcast = true; } QTAILQ_FOREACH(kid, &bus->qbus.children, sibling) { DeviceState *qdev = ki... | 21,510 |
0 | void ff_MPV_encode_init_x86(MpegEncContext *s) { int mm_flags = av_get_cpu_flags(); const int dct_algo = s->avctx->dct_algo; if (dct_algo == FF_DCT_AUTO || dct_algo == FF_DCT_MMX) { #if HAVE_MMX_INLINE if (mm_flags & AV_CPU_FLAG_MMX && HAVE_MMX) s->dct_quantize = dct_quantize_MMX; #endif #if HAVE_MMXEXT_INLINE if (mm_f... | 21,512 |
0 | static void smbios_build_type_1_fields(void) { smbios_maybe_add_str(1, offsetof(struct smbios_type_1, manufacturer_str), type1.manufacturer); smbios_maybe_add_str(1, offsetof(struct smbios_type_1, product_name_str), type1.product); smbios_maybe_add_str(1, offsetof(struct smbios_type_1, version_str), type1.version); smb... | 21,514 |
0 | static inline int mirror_clip_sectors(MirrorBlockJob *s, int64_t sector_num, int nb_sectors) { return MIN(nb_sectors, s->bdev_length / BDRV_SECTOR_SIZE - sector_num); } | 21,515 |
0 | static void bcm2835_property_mbox_push(BCM2835PropertyState *s, uint32_t value) { uint32_t tag; uint32_t bufsize; uint32_t tot_len; size_t resplen; uint32_t tmp; value &= ~0xf; s->addr = value; tot_len = ldl_phys(&s->dma_as, value); /* @(addr + 4) : Buffer response code */ value = s->addr + 8; while (value + 8 <= s->ad... | 21,516 |
0 | ObjectClass *object_class_dynamic_cast(ObjectClass *class, const char *typename) { TypeImpl *target_type = type_get_by_name(typename); TypeImpl *type = class->type; ObjectClass *ret = NULL; if (type->num_interfaces && type_is_ancestor(target_type, type_interface)) { int found = 0; GSList *i; for (i = class->interfaces;... | 21,517 |
0 | static void sdhci_send_command(SDHCIState *s) { SDRequest request; uint8_t response[16]; int rlen; s->errintsts = 0; s->acmd12errsts = 0; request.cmd = s->cmdreg >> 8; request.arg = s->argument; DPRINT_L1("sending CMD%u ARG[0x%08x]\n", request.cmd, request.arg); rlen = sd_do_command(s->card, &request, response); if (s-... | 21,518 |
0 | static void ss5_init(int ram_size, int vga_ram_size, int boot_device, DisplayState *ds, const char **fd_filename, int snapshot, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { if (cpu_model == NULL) cpu_model = "Fujitsu MB86904"; sun4m_common_init(ram_size,... | 21,519 |
0 | const char *qemu_opt_get(QemuOpts *opts, const char *name) { QemuOpt *opt = qemu_opt_find(opts, name); if (!opt) { const QemuOptDesc *desc = find_desc_by_name(opts->list->desc, name); if (desc && desc->def_value_str) { return desc->def_value_str; } } return opt ? opt->str : NULL; } | 21,520 |
0 | void qemu_mod_timer(QEMUTimer *ts, int64_t expire_time) { QEMUTimer **pt, *t; qemu_del_timer(ts); /* add the timer in the sorted list */ /* NOTE: this code must be signal safe because qemu_timer_expired() can be called from a signal. */ pt = &active_timers[ts->clock->type]; for(;;) { t = *pt; if (!t) break; if (t->expi... | 21,521 |
0 | static void qemu_system_suspend(void) { pause_all_vcpus(); notifier_list_notify(&suspend_notifiers, NULL); runstate_set(RUN_STATE_SUSPENDED); monitor_protocol_event(QEVENT_SUSPEND, NULL); is_suspended = true; } | 21,522 |
0 | static void RENAME(yuv2rgb565_1)(SwsContext *c, const uint16_t *buf0, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, uint8_t *dest, int dstW, int uvalpha, enum PixelFormat dstFormat, int flags, int y) { const uint16_t *buf1= buf0; //FIXME needed for RG... | 21,523 |
0 | static void numa_node_parse_cpus(int nodenr, const char *cpus) { char *endptr; unsigned long long value, endvalue; value = strtoull(cpus, &endptr, 10); if (*endptr == '-') { endvalue = strtoull(endptr+1, &endptr, 10); } else { endvalue = value; } if (!(endvalue < MAX_CPUMASK_BITS)) { endvalue = MAX_CPUMASK_BITS - 1; fp... | 21,524 |
0 | static void icount_dummy_timer(void *opaque) { (void)opaque; } | 21,525 |
0 | static int gdb_set_float_reg(CPUPPCState *env, uint8_t *mem_buf, int n) { if (n < 32) { env->fpr[n] = ldfq_p(mem_buf); return 8; } if (n == 32) { /* FPSCR not implemented */ return 4; } return 0; } | 21,526 |
0 | static inline void decode(DisasContext *dc) { uint32_t ir; int i; if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) { tcg_gen_debug_insn_start(dc->pc); } dc->ir = ir = ldl_code(dc->pc); LOG_DIS("%8.8x\t", dc->ir); /* try guessing 'empty' instruction memory, although it may be a valid * instruction sequence (eg. srui r0,... | 21,527 |
0 | void memory_region_init_iommu(MemoryRegion *mr, Object *owner, const MemoryRegionIOMMUOps *ops, const char *name, uint64_t size) { memory_region_init(mr, owner, name, size); mr->iommu_ops = ops, mr->terminates = true; /* then re-forwards */ notifier_list_init(&mr->iommu_notify); } | 21,528 |
0 | void helper_movl_drN_T0(CPUX86State *env, int reg, target_ulong t0) { #ifndef CONFIG_USER_ONLY if (reg < 4) { if (hw_breakpoint_enabled(env->dr[7], reg) && hw_breakpoint_type(env->dr[7], reg) != DR7_TYPE_IO_RW) { hw_breakpoint_remove(env, reg); env->dr[reg] = t0; hw_breakpoint_insert(env, reg); } else { env->dr[reg] = ... | 21,529 |
0 | QDict *qdict_new(void) { QDict *qdict; qdict = g_malloc0(sizeof(*qdict)); QOBJECT_INIT(qdict, &qdict_type); return qdict; } | 21,530 |
0 | int qcow2_get_cluster_offset(BlockDriverState *bs, uint64_t offset, unsigned int *bytes, uint64_t *cluster_offset) { BDRVQcow2State *s = bs->opaque; unsigned int l2_index; uint64_t l1_index, l2_offset, *l2_table; int l1_bits, c; unsigned int offset_in_cluster; uint64_t bytes_available, bytes_needed, nb_clusters; int re... | 21,532 |
0 | mips_mipssim_init (ram_addr_t ram_size, int vga_ram_size, const char *boot_device, DisplayState *ds, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { char buf[1024]; unsigned long bios_offset; CPUState *env; int bios_size; /* Init CPUs. */ if (cpu_model == N... | 21,533 |
0 | static inline void RENAME(LEToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused) { #if COMPILE_TEMPLATE_MMX __asm__ volatile( "mov %0, %%"REG_a" \n\t" "1: \n\t" "movq (%1, %%"REG_a",2), %%mm0 \n\t" "movq 8(%1, %%"REG_a",2), %%mm1 \n\t" "movq (%2, %%"REG_a",2), %%mm... | 21,534 |
0 | static target_phys_addr_t intel_hda_addr(uint32_t lbase, uint32_t ubase) { target_phys_addr_t addr; addr = ((uint64_t)ubase << 32) | lbase; return addr; } | 21,535 |
0 | static BlockMeasureInfo *qcow2_measure(QemuOpts *opts, BlockDriverState *in_bs, Error **errp) { Error *local_err = NULL; BlockMeasureInfo *info; uint64_t required = 0; /* bytes that contribute to required size */ uint64_t virtual_size; /* disk size as seen by guest */ uint64_t refcount_bits; uint64_t l2_tables; size_t ... | 21,536 |
0 | static void raw_aio_cancel(BlockDriverAIOCB *blockacb) { int ret; RawAIOCB *acb = (RawAIOCB *)blockacb; RawAIOCB **pacb; ret = aio_cancel(acb->aiocb.aio_fildes, &acb->aiocb); if (ret == AIO_NOTCANCELED) { /* fail safe: if the aio could not be canceled, we wait for it */ while (aio_error(&acb->aiocb) == EINPROGRESS); } ... | 21,537 |
0 | void check_file_fixed_eof_mmaps(void) { char *addr; char *cp; unsigned int *p1; uintptr_t p; int i; /* Find a suitable address to start with. */ addr = mmap(NULL, pagesize * 44, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); fprintf (stderr, "%s addr=%p", __func__, (void *)addr); fail_unless (addr != MAP_FAILED); for ... | 21,539 |
0 | static void nbd_attach_aio_context(BlockDriverState *bs, AioContext *new_context) { BDRVNBDState *s = bs->opaque; nbd_client_session_attach_aio_context(&s->client, new_context); } | 21,540 |
0 | void bmdma_cmd_writeb(void *opaque, uint32_t addr, uint32_t val) { BMDMAState *bm = opaque; #ifdef DEBUG_IDE printf("%s: 0x%08x\n", __func__, val); #endif /* Ignore writes to SSBM if it keeps the old value */ if ((val & BM_CMD_START) != (bm->cmd & BM_CMD_START)) { if (!(val & BM_CMD_START)) { /* * We can't cancel Scatt... | 21,541 |
0 | uint32_t qemu_devtree_get_phandle(void *fdt, const char *path) { uint32_t r; r = fdt_get_phandle(fdt, findnode_nofail(fdt, path)); if (r <= 0) { fprintf(stderr, "%s: Couldn't get phandle for %s: %s\n", __func__, path, fdt_strerror(r)); exit(1); } return r; } | 21,542 |
0 | static char *SocketAddress_to_str(const char *prefix, SocketAddressLegacy *addr, bool is_listen, bool is_telnet) { switch (addr->type) { case SOCKET_ADDRESS_LEGACY_KIND_INET: return g_strdup_printf("%s%s:%s:%s%s", prefix, is_telnet ? "telnet" : "tcp", addr->u.inet.data->host, addr->u.inet.data->port, is_listen ? ",serv... | 21,543 |
0 | void handle_vm86_fault(CPUX86State *env) { TaskState *ts = env->opaque; uint8_t *csp, *pc, *ssp; unsigned int ip, sp, newflags, newip, newcs, opcode, intno; int data32, pref_done; csp = (uint8_t *)(env->segs[R_CS] << 4); ip = env->eip & 0xffff; pc = csp + ip; ssp = (uint8_t *)(env->segs[R_SS] << 4); sp = env->regs[R_ES... | 21,544 |
0 | static MemTxResult gic_cpu_write(GICState *s, int cpu, int offset, uint32_t value, MemTxAttrs attrs) { switch (offset) { case 0x00: /* Control */ gic_set_cpu_control(s, cpu, value, attrs); break; case 0x04: /* Priority mask */ s->priority_mask[cpu] = (value & 0xff); break; case 0x08: /* Binary Point */ if (s->security_... | 21,545 |
0 | static int op_to_movi(int op) { switch (op_bits(op)) { case 32: return INDEX_op_movi_i32; #if TCG_TARGET_REG_BITS == 64 case 64: return INDEX_op_movi_i64; #endif default: fprintf(stderr, "op_to_movi: unexpected return value of " "function op_bits.\n"); tcg_abort(); } } | 21,546 |
0 | static void dbdma_end(DBDMA_io *io) { DBDMA_channel *ch = io->channel; dbdma_cmd *current = &ch->current; if (conditional_wait(ch)) goto wait; current->xfer_status = cpu_to_le16(be32_to_cpu(ch->regs[DBDMA_STATUS])); current->res_count = cpu_to_le16(be32_to_cpu(io->len)); dbdma_cmdptr_save(ch); if (io->is_last) ch->regs... | 21,547 |
0 | static void nfs_process_read(void *arg) { NFSClient *client = arg; aio_context_acquire(client->aio_context); nfs_service(client->context, POLLIN); nfs_set_events(client); aio_context_release(client->aio_context); } | 21,548 |
0 | int qemu_init_main_loop(void) { int ret; qemu_init_sigbus(); ret = qemu_signal_init(); if (ret) { return ret; } /* Note eventfd must be drained before signalfd handlers run */ ret = qemu_event_init(); if (ret) { return ret; } qemu_cond_init(&qemu_cpu_cond); qemu_cond_init(&qemu_system_cond); qemu_cond_init(&qemu_pause_... | 21,550 |
0 | static bool blit_is_unsafe(struct CirrusVGAState *s, bool dst_only) { /* should be the case, see cirrus_bitblt_start */ assert(s->cirrus_blt_width > 0); assert(s->cirrus_blt_height > 0); if (s->cirrus_blt_width > CIRRUS_BLTBUFSIZE) { return true; } if (blit_region_is_unsafe(s, s->cirrus_blt_dstpitch, s->cirrus_blt_dsta... | 21,551 |
0 | static void virtio_pci_register_devices(void) { type_register_static(&virtio_blk_info); type_register_static_alias(&virtio_blk_info, "virtio-blk"); type_register_static(&virtio_net_info); type_register_static_alias(&virtio_net_info, "virtio-net"); type_register_static(&virtio_serial_info); type_register_static_alias(&v... | 21,552 |
0 | static MemTxResult nvic_sysreg_read(void *opaque, hwaddr addr, uint64_t *data, unsigned size, MemTxAttrs attrs) { NVICState *s = (NVICState *)opaque; uint32_t offset = addr; unsigned i, startvec, end; uint32_t val; if (attrs.user && !nvic_user_access_ok(s, addr)) { /* Generate BusFault for unprivileged accesses */ retu... | 21,553 |
0 | coroutine_fn iscsi_co_pdiscard(BlockDriverState *bs, int64_t offset, int count) { IscsiLun *iscsilun = bs->opaque; struct IscsiTask iTask; struct unmap_list list; if (!is_byte_request_lun_aligned(offset, count, iscsilun)) { return -ENOTSUP; } if (!iscsilun->lbp.lbpu) { /* UNMAP is not supported by the target */ return ... | 21,554 |
0 | static ssize_t qio_channel_command_writev(QIOChannel *ioc, const struct iovec *iov, size_t niov, int *fds, size_t nfds, Error **errp) { QIOChannelCommand *cioc = QIO_CHANNEL_COMMAND(ioc); ssize_t ret; retry: ret = writev(cioc->writefd, iov, niov); if (ret <= 0) { if (errno == EAGAIN || errno == EWOULDBLOCK) { return QI... | 21,556 |
0 | static void v9fs_synth_fill_statbuf(V9fsSynthNode *node, struct stat *stbuf) { stbuf->st_dev = 0; stbuf->st_ino = node->attr->inode; stbuf->st_mode = node->attr->mode; stbuf->st_nlink = node->attr->nlink; stbuf->st_uid = 0; stbuf->st_gid = 0; stbuf->st_rdev = 0; stbuf->st_size = 0; stbuf->st_blksize = 0; stbuf->st_bloc... | 21,557 |
0 | void cpu_exec_init(CPUState *env) { CPUState **penv; int cpu_index; #if defined(CONFIG_USER_ONLY) cpu_list_lock(); #endif env->next_cpu = NULL; penv = &first_cpu; cpu_index = 0; while (*penv != NULL) { penv = &(*penv)->next_cpu; cpu_index++; } env->cpu_index = cpu_index; env->numa_node = 0; TAILQ_INIT(&env->breakpoints... | 21,558 |
0 | static void sdhci_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); SDHCIClass *k = SDHCI_CLASS(klass); dc->vmsd = &sdhci_vmstate; dc->props = sdhci_properties; dc->reset = sdhci_generic_reset; dc->realize = sdhci_realize; k->reset = sdhci_reset; k->mem_read = sdhci_read; k->mem_write ... | 21,559 |
0 | static void ppc_heathrow_init(MachineState *machine) { ram_addr_t ram_size = machine->ram_size; const char *cpu_model = machine->cpu_model; const char *kernel_filename = machine->kernel_filename; const char *kernel_cmdline = machine->kernel_cmdline; const char *initrd_filename = machine->initrd_filename; const char *bo... | 21,560 |
0 | static void hls_decode_neighbour(HEVCContext *s, int x_ctb, int y_ctb, int ctb_addr_ts) { HEVCLocalContext *lc = &s->HEVClc; int ctb_size = 1 << s->ps.sps->log2_ctb_size; int ctb_addr_rs = s->ps.pps->ctb_addr_ts_to_rs[ctb_addr_ts]; int ctb_addr_in_slice = ctb_addr_rs - s->sh.slice_addr; s->tab_slice_address[ctb_addr_rs... | 21,562 |
0 | static void scsi_qdev_unrealize(DeviceState *qdev, Error **errp) { SCSIDevice *dev = SCSI_DEVICE(qdev); if (dev->vmsentry) { qemu_del_vm_change_state_handler(dev->vmsentry); } scsi_device_unrealize(dev, errp); } | 21,563 |
1 | static void xen_set_memory(struct MemoryListener *listener, MemoryRegionSection *section, bool add) { XenIOState *state = container_of(listener, XenIOState, memory_listener); hwaddr start_addr = section->offset_within_address_space; ram_addr_t size = int128_get64(section->size); bool log_dirty = memory_region_is_loggin... | 21,565 |
1 | opts_check_list(Visitor *v, Error **errp) { /* * FIXME should set error when unvisited elements remain. Mostly * harmless, as the generated visits always visit all elements. */ } | 21,566 |
1 | static int vorbis_packet(AVFormatContext *s, int idx) { struct ogg *ogg = s->priv_data; struct ogg_stream *os = ogg->streams + idx; struct oggvorbis_private *priv = os->private; int duration; /* first packet handling here we parse the duration of each packet in the first page and compare the total duration to the page ... | 21,568 |
1 | static int32_t scsi_disk_dma_command(SCSIRequest *req, uint8_t *buf) { SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req); SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, req->dev); int32_t len; uint8_t command; command = buf[0]; if (s->tray_open || !bdrv_is_inserted(s->qdev.conf.bs)) { scsi_check_condition(r, SENSE_C... | 21,570 |
1 | static void coroutine_fn mirror_run(void *opaque) { MirrorBlockJob *s = opaque; MirrorExitData *data; BlockDriverState *bs = s->common.bs; int64_t sector_num, end, sectors_per_chunk, length; uint64_t last_pause_ns; BlockDriverInfo bdi; char backing_filename[1024]; int ret = 0; int n; if (block_job_is_cancelled(&s->comm... | 21,571 |
1 | int object_property_get_enum(Object *obj, const char *name, const char *strings[], Error **errp) { StringOutputVisitor *sov; StringInputVisitor *siv; int ret; sov = string_output_visitor_new(false); object_property_get(obj, string_output_get_visitor(sov), name, errp); siv = string_input_visitor_new(string_output_get_st... | 21,572 |
0 | int ff_vaapi_render_picture(FFVAContext *vactx, VASurfaceID surface) { VABufferID va_buffers[3]; unsigned int n_va_buffers = 0; if (!vactx->pic_param_buf_id) return 0; vaUnmapBuffer(vactx->display, vactx->pic_param_buf_id); va_buffers[n_va_buffers++] = vactx->pic_param_buf_id; if (vactx->iq_matrix_buf_id) { vaUnmapBuff... | 21,573 |
0 | static void loop_filter(H264Context *h){ MpegEncContext * const s = &h->s; uint8_t *dest_y, *dest_cb, *dest_cr; int linesize, uvlinesize, mb_x, mb_y; const int end_mb_y= s->mb_y + FRAME_MBAFF; const int old_slice_type= h->slice_type; if(h->deblocking_filter) { for(mb_x= 0; mb_x<s->mb_width; mb_x++){ for(mb_y=end_mb_y -... | 21,574 |
0 | static int mov_write_tfhd_tag(AVIOContext *pb, MOVTrack *track, int64_t moof_offset) { int64_t pos = avio_tell(pb); uint32_t flags = MOV_TFHD_DEFAULT_SIZE | MOV_TFHD_DEFAULT_DURATION | MOV_TFHD_BASE_DATA_OFFSET; if (!track->entry) { flags |= MOV_TFHD_DURATION_IS_EMPTY; } else { flags |= MOV_TFHD_DEFAULT_FLAGS; } /* Don... | 21,575 |
1 | static int normalize_samples(AC3EncodeContext *s) { int v = 14 - log2_tab(s, s->windowed_samples, AC3_WINDOW_SIZE); lshift_tab(s->windowed_samples, AC3_WINDOW_SIZE, v); return v - 9; } | 21,577 |
1 | uint32_t HELPER(servc)(CPUS390XState *env, uint64_t r1, uint64_t r2) { int r = sclp_service_call(env, r1, r2); if (r < 0) { program_interrupt(env, -r, 4); return 0; } return r; } | 21,578 |
1 | static void test_query_cpus(const void *data) { char *cli; QDict *resp; QList *cpus; const QObject *e; cli = make_cli(data, "-smp 8 -numa node,cpus=0-3 -numa node,cpus=4-7"); qtest_start(cli); cpus = get_cpus(&resp); g_assert(cpus); while ((e = qlist_pop(cpus))) { QDict *cpu, *props; int64_t cpu_idx, node; cpu = qobjec... | 21,579 |
1 | int virtio_scsi_common_exit(VirtIOSCSICommon *vs) { VirtIODevice *vdev = VIRTIO_DEVICE(vs); g_free(vs->cmd_vqs); virtio_cleanup(vdev); return 0; } | 21,580 |
1 | static int decode_subframe_fixed(FLACContext *s, int32_t *decoded, int pred_order, int bps) { const int blocksize = s->blocksize; unsigned av_uninit(a), av_uninit(b), av_uninit(c), av_uninit(d); int i; int ret; /* warm up samples */ for (i = 0; i < pred_order; i++) { decoded[i] = get_sbits_long(&s->gb, bps); } if ((ret... | 21,581 |
0 | static int add_tonal_components(float *spectrum, int num_components, TonalComponent *components) { int i, j, last_pos = -1; float *input, *output; for (i = 0; i < num_components; i++) { last_pos = FFMAX(components[i].pos + components[i].num_coefs, last_pos); input = components[i].coef; output = &spectrum[components[i].... | 21,582 |
1 | static int qemu_rdma_write_flush(QEMUFile *f, RDMAContext *rdma) { int ret; if (!rdma->current_length) { return 0; } ret = qemu_rdma_write_one(f, rdma, rdma->current_index, rdma->current_addr, rdma->current_length); if (ret < 0) { return ret; } if (ret == 0) { rdma->nb_sent++; DDDPRINTF("sent total: %d\n", rdma->nb_sen... | 21,588 |
1 | Exynos4210State *exynos4210_init(MemoryRegion *system_mem, unsigned long ram_size) { int i, n; Exynos4210State *s = g_new(Exynos4210State, 1); qemu_irq gate_irq[EXYNOS4210_NCPUS][EXYNOS4210_IRQ_GATE_NINPUTS]; unsigned long mem_size; DeviceState *dev; SysBusDevice *busdev; ObjectClass *cpu_oc; cpu_oc = cpu_class_by_name... | 21,590 |
1 | static void *clone_func(void *arg) { new_thread_info *info = arg; CPUArchState *env; CPUState *cpu; TaskState *ts; rcu_register_thread(); env = info->env; cpu = ENV_GET_CPU(env); thread_cpu = cpu; ts = (TaskState *)cpu->opaque; info->tid = gettid(); cpu->host_tid = info->tid; task_settid(ts); if (info->child_tidptr) pu... | 21,591 |
1 | static inline void RENAME(yuv2rgb32_1)(SwsContext *c, const uint16_t *buf0, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, uint8_t *dest, int dstW, int uvalpha, enum PixelFormat dstFormat, int flags, int y) { x86_reg uv_off = c->uv_off << 1; const uint... | 21,592 |
1 | QInt *qobject_to_qint(const QObject *obj) { if (qobject_type(obj) != QTYPE_QINT) return NULL; return container_of(obj, QInt, base); } | 21,593 |
1 | static int libopenjpeg_copy_packed8(AVCodecContext *avctx, const AVFrame *frame, opj_image_t *image) { int compno; int x; int y; int *image_line; int frame_index; const int numcomps = image->numcomps; for (compno = 0; compno < numcomps; ++compno) { if (image->comps[compno].w > frame->linesize[0] / numcomps) { av_log(av... | 21,594 |
1 | static int spapr_msicfg_find(sPAPRPHBState *phb, uint32_t config_addr, bool alloc_new) { int i; for (i = 0; i < SPAPR_MSIX_MAX_DEVS; ++i) { if (!phb->msi_table[i].nvec) { break; } if (phb->msi_table[i].config_addr == config_addr) { return i; } } if ((i < SPAPR_MSIX_MAX_DEVS) && alloc_new) { trace_spapr_pci_msi("Allocat... | 21,595 |
1 | static void fdctrl_connect_drives(FDCtrl *fdctrl) { unsigned int i; FDrive *drive; for (i = 0; i < MAX_FD; i++) { drive = &fdctrl->drives[i]; fd_init(drive); fd_revalidate(drive); if (drive->bs) { bdrv_set_removable(drive->bs, 1); } } } | 21,596 |
0 | static av_cold int decode_init(AVCodecContext *avctx) { ASV1Context *const a = avctx->priv_data; const int scale = avctx->codec_id == AV_CODEC_ID_ASV1 ? 1 : 2; int i; if (avctx->extradata_size < 1) { av_log(avctx, AV_LOG_ERROR, "No extradata provided\n"); return AVERROR_INVALIDDATA; } ff_asv_common_init(avctx); ff_bloc... | 21,597 |
0 | int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask, const AVFrame *reference) { int len, nb_components, i, h, v, predictor, point_transform; int index, id, ret; const int block_size = s->lossless ? 1 : 8; int ilv, prev_shift; if (!s->got_picture) { av_log(s->avctx, AV_LOG_WARNING, "Can not process... | 21,598 |
0 | static void do_video_out(AVFormatContext *s, AVOutputStream *ost, AVInputStream *ist, AVFrame *in_picture, int *frame_size, AVOutputStream *audio_sync) { int nb_frames, i, ret; AVFrame *final_picture, *formatted_picture; AVFrame picture_format_temp, picture_crop_temp; static uint8_t *video_buffer= NULL; uint8_t *buf = ... | 21,599 |
0 | static void av_always_inline filter_mb_edgecv( uint8_t *pix, int stride, const int16_t bS[4], unsigned int qp, H264Context *h ) { const int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8); const unsigned int index_a = qp - qp_bd_offset + h->slice_alpha_c0_offset; const int alpha = alpha_table[index_a]; const int beta = ... | 21,600 |
0 | int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; MpegEncContext *s = avctx->priv_data; int ret; AVFrame *pict = data; #ifdef PRINT_FRAME_TIME uint64_t time= rdtsc(); #endif #ifdef DEBUG av_log(avctx, AV_LOG_DEBUG... | 21,602 |
0 | static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int64_t *pkt_pts) { AVFrame *decoded_frame, *filtered_frame = NULL; void *buffer_to_free = NULL; int i, ret = 0; float quality; #if CONFIG_AVFILTER int frame_available = 1; #endif if (!ist->decoded_frame && !(ist->decoded_frame = avcodec_alloc... | 21,603 |
0 | enum AVCodecID ff_get_pcm_codec_id(int bps, int flt, int be, int sflags) { if (bps > 64U) return AV_CODEC_ID_NONE; if (flt) { switch (bps) { case 32: return be ? AV_CODEC_ID_PCM_F32BE : AV_CODEC_ID_PCM_F32LE; case 64: return be ? AV_CODEC_ID_PCM_F64BE : AV_CODEC_ID_PCM_F64LE; default: return AV_CODEC_ID_NONE; } } else ... | 21,604 |
0 | static int synthfilt_build_sb_samples (QDM2Context *q, GetBitContext *gb, int length, int sb_min, int sb_max) { int sb, j, k, n, ch, run, channels; int joined_stereo, zero_encoding, chs; int type34_first; float type34_div = 0; float type34_predictor; float samples[10], sign_bits[16]; if (length == 0) { // If no data us... | 21,605 |
0 | static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref) { PadContext *pad = inlink->dst->priv; AVFilterBufferRef *outpicref = avfilter_ref_buffer(inpicref, ~0); int plane; inlink->dst->outputs[0]->out_buf = outpicref; for (plane = 0; plane < 4 && outpicref->data[plane]; plane++) { int hsub = (plane =... | 21,606 |
0 | static int thread_init(AVCodecContext *avctx) { int i; ThreadContext *c; int thread_count = avctx->thread_count; if (!thread_count) { int nb_cpus = get_logical_cpus(avctx); // use number of cores + 1 as thread count if there is motre than one if (nb_cpus > 1) thread_count = avctx->thread_count = nb_cpus + 1; } if (thre... | 21,608 |
0 | static av_cold int vtenc_init(AVCodecContext *avctx) { CFMutableDictionaryRef enc_info; CFMutableDictionaryRef pixel_buffer_info; CMVideoCodecType codec_type; VTEncContext *vtctx = avctx->priv_data; CFStringRef profile_level; CFBooleanRef has_b_frames_cfbool; CFNumberRef gamma_level = NULL; int status; codec_type = get... | 21,609 |
1 | av_cold void ff_dsputil_init_alpha(DSPContext *c, AVCodecContext *avctx) { const int high_bit_depth = avctx->bits_per_raw_sample > 8; /* amask clears all bits that correspond to present features. */ if (amask(AMASK_MVI) == 0) { c->put_pixels_clamped = put_pixels_clamped_mvi_asm; c->add_pixels_clamped = add_pixels_clamp... | 21,610 |
1 | static av_always_inline int dnxhd_decode_dct_block(const DNXHDContext *ctx, RowContext *row, int n, int index_bits, int level_bias, int level_shift, int dc_shift) { int i, j, index1, index2, len, flags; int level, component, sign; const int *scale; const uint8_t *weight_matrix; const uint8_t *ac_info = ctx->cid_table->... | 21,611 |
0 | static void pci_write(void *opaque, hwaddr addr, uint64_t data, unsigned int size) { AcpiPciHpState *s = opaque; switch (addr) { case PCI_EJ_BASE: if (s->hotplug_select >= ACPI_PCIHP_MAX_HOTPLUG_BUS) { break; } acpi_pcihp_eject_slot(s, s->hotplug_select, data); ACPI_PCIHP_DPRINTF("pciej write %" HWADDR_PRIx " <== %" PR... | 21,613 |
0 | int64_t qemu_strtosz(const char *nptr, char **end) { return do_strtosz(nptr, end, 'B', 1024); } | 21,614 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.