label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
0 | void laio_attach_aio_context(LinuxAioState *s, AioContext *new_context){ s->aio_context = new_context; s->completion_bh = aio_bh_new(new_context, qemu_laio_completion_bh, s); aio_set_event_notifier(new_context, &s->e, false, qemu_laio_completion_cb, NULL);} |
0 | process_tx_desc(E1000State *s, struct e1000_tx_desc *dp){ PCIDevice *d = PCI_DEVICE(s); uint32_t txd_lower = le32_to_cpu(dp->lower.data); uint32_t dtype = txd_lower & (E1000_TXD_CMD_DEXT | E1000_TXD_DTYP_D); unsigned int split_size = txd_lower & 0xffff, bytes, sz; unsigned int msh = 0xfffff; uint64_t addr; struct e1000... |
0 | int unix_socket_outgoing(const char *path){ Error *local_err = NULL; int fd = unix_connect(path, &local_err); if (local_err != NULL) { qerror_report_err(local_err); error_free(local_err); } return fd;} |
0 | static ssize_t nbd_receive_request(int csock, struct nbd_request *request){ uint8_t buf[4 + 4 + 8 + 8 + 4]; uint32_t magic; if (read_sync(csock, buf, sizeof(buf)) != sizeof(buf)) { LOG("read failed"); errno = EINVAL; return -1; } /* Request [ 0 .. 3] magic (NBD_REQUEST_MAGIC) [ 4 .. 7] type (0 == READ, 1 == WRITE) [ 8 ... |
0 | static void raw_close_fd_pool(BDRVRawState *s){ int i; for (i = 0; i < RAW_FD_POOL_SIZE; i++) { if (s->fd_pool[i] != -1) { close(s->fd_pool[i]); s->fd_pool[i] = -1; } }} |
0 | static UHCIAsync *uhci_async_alloc(UHCIState *s){ UHCIAsync *async = g_malloc(sizeof(UHCIAsync)); memset(&async->packet, 0, sizeof(async->packet)); async->uhci = s; async->valid = 0; async->td = 0; async->token = 0; async->done = 0; async->isoc = 0; usb_packet_init(&async->packet); qemu_sglist_init(&async->sgl, 1); ret... |
0 | static void apic_startup(APICState *s, int vector_num){ CPUState *env = s->cpu_env; if (!env->halted) return; env->eip = 0; cpu_x86_load_seg_cache(env, R_CS, vector_num << 8, vector_num << 12, 0xffff, 0); env->halted = 0;} |
0 | void kvm_s390_virtio_irq(S390CPU *cpu, int config_change, uint64_t token){ kvm_s390_interrupt_internal(cpu, KVM_S390_INT_VIRTIO, config_change, token, 1);} |
0 | static void bdrv_io_limits_intercept(BlockDriverState *bs, unsigned int bytes, bool is_write){ /* does this io must wait */ bool must_wait = throttle_schedule_timer(&bs->throttle_state, is_write); /* if must wait or any request of this type throttled queue the IO */ if (must_wait || !qemu_co_queue_empty(&bs->throttled_... |
0 | static int parse_bintree(Indeo3DecodeContext *ctx, AVCodecContext *avctx, Plane *plane, int code, Cell *ref_cell, const int depth, const int strip_width){ Cell curr_cell; int bytes_used; if (depth <= 0) { av_log(avctx, AV_LOG_ERROR, "Stack overflow (corrupted binary tree)!\n"); return AVERROR_INVALIDDATA; // unwind rec... |
0 | int64_t swr_next_pts(struct SwrContext *s, int64_t pts){ if(pts == INT64_MIN) return s->outpts; if(s->min_compensation >= FLT_MAX) { return (s->outpts = pts - swr_get_delay(s, s->in_sample_rate * (int64_t)s->out_sample_rate)); } else { int64_t delta = pts - swr_get_delay(s, s->in_sample_rate * (int64_t)s->out_sample_ra... |
0 | int av_utf8_decode(int32_t *codep, const uint8_t **bufp, const uint8_t *buf_end, unsigned int flags){ const uint8_t *p = *bufp; uint32_t top; uint64_t code; int ret = 0; if (p >= buf_end) return 0; code = *p++; /* first sequence byte starts with 10, or is 1111-1110 or 1111-1111, which is not admitted */ if ((code & 0xc... |
0 | static av_always_inline av_flatten void h264_loop_filter_luma_intra_c(uint8_t *pix, int xstride, int ystride, int alpha, int beta){ int d; for( d = 0; d < 16; d++ ) { const int p2 = pix[-3*xstride]; const int p1 = pix[-2*xstride]; const int p0 = pix[-1*xstride]; const int q0 = pix[ 0*xstride]; const int q1 = pix[ 1*xst... |
1 | static void sigbus_handler(int signal){ siglongjmp(sigjump, 1);} |
1 | void fw_cfg_add_bytes(FWCfgState *s, uint16_t key, uint8_t *data, uint32_t len){ int arch = !!(key & FW_CFG_ARCH_LOCAL); key &= FW_CFG_ENTRY_MASK; assert(key < FW_CFG_MAX_ENTRY); s->entries[arch][key].data = data; s->entries[arch][key].len = len;} |
1 | static void set_bmc_global_enables(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(3); set_global_enables(ibs, cmd[2]);} |
1 | static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size, int parse_extradata){ AVCodecContext *const avctx = h->avctx; H264SliceContext *sl; int buf_index; unsigned context_count; int next_avc; int nals_needed = 0; ///< number of NALs that need decoding before the next frame thread starts int nal_i... |
1 | int spapr_h_cas_compose_response(sPAPRMachineState *spapr, target_ulong addr, target_ulong size, sPAPROptionVector *ov5_updates){ void *fdt, *fdt_skel; sPAPRDeviceTreeUpdateHeader hdr = { .version_id = 1 }; size -= sizeof(hdr); /* Create sceleton */ fdt_skel = g_malloc0(size); _FDT((fdt_create(fdt_skel, size))); _FDT((... |
1 | static MatroskaLevel1Element *matroska_find_level1_elem(MatroskaDemuxContext *matroska, uint32_t id){ int i; MatroskaLevel1Element *elem; // Some files link to all clusters; useless. if (id == MATROSKA_ID_CLUSTER) // There can be multiple seekheads. if (id != MATROSKA_ID_SEEKHEAD) { for (i = 0; i < matroska->num_level1... |
1 | static int mp_dacl_removexattr(FsContext *ctx, const char *path, const char *name){ int ret; char *buffer; buffer = rpath(ctx, path); ret = lremovexattr(buffer, MAP_ACL_DEFAULT); if (ret == -1 && errno == ENODATA) { /* * We don't get ENODATA error when trying to remove a * posix acl that is not present. So don't throw ... |
1 | static void IRQ_local_pipe(OpenPICState *opp, int n_CPU, int n_IRQ){ IRQ_dst_t *dst; IRQ_src_t *src; int priority; dst = &opp->dst[n_CPU]; src = &opp->src[n_IRQ]; priority = IPVP_PRIORITY(src->ipvp); if (priority <= dst->pctp) { /* Too low priority */ DPRINTF("%s: IRQ %d has too low priority on CPU %d\n", __func__, n_I... |
1 | static void process_incoming_migration_bh(void *opaque){ Error *local_err = NULL; MigrationIncomingState *mis = opaque; /* Make sure all file formats flush their mutable metadata */ bdrv_invalidate_cache_all(&local_err); migrate_set_state(&mis->state, MIGRATION_STATUS_ACTIVE, MIGRATION_STATUS_FAILED); error_report_err(... |
1 | static int decode_phys_chunk(AVCodecContext *avctx, PNGDecContext *s){ if (s->state & PNG_IDAT) { av_log(avctx, AV_LOG_ERROR, "pHYs after IDAT\n"); return AVERROR_INVALIDDATA; } avctx->sample_aspect_ratio.num = bytestream2_get_be32(&s->gb); avctx->sample_aspect_ratio.den = bytestream2_get_be32(&s->gb); if (avctx->sampl... |
1 | static int xio3130_downstream_initfn(PCIDevice *d){ PCIEPort *p = PCIE_PORT(d); PCIESlot *s = PCIE_SLOT(d); int rc; pci_bridge_initfn(d, TYPE_PCIE_BUS); pcie_port_init_reg(d); rc = msi_init(d, XIO3130_MSI_OFFSET, XIO3130_MSI_NR_VECTOR, XIO3130_MSI_SUPPORTED_FLAGS & PCI_MSI_FLAGS_64BIT, XIO3130_MSI_SUPPORTED_FLAGS & PCI... |
0 | static av_cold int hevc_decode_free(AVCodecContext *avctx){ HEVCContext *s = avctx->priv_data; HEVCLocalContext *lc = s->HEVClc; int i; pic_arrays_free(s); av_freep(&s->md5_ctx); for(i=0; i < s->nals_allocated; i++) { av_freep(&s->skipped_bytes_pos_nal[i]); } av_freep(&s->skipped_bytes_pos_size_nal); av_freep(&s->skipp... |
0 | static av_cold int dct_init(MpegEncContext *s){ ff_blockdsp_init(&s->bdsp, s->avctx); ff_hpeldsp_init(&s->hdsp, s->avctx->flags); ff_me_cmp_init(&s->mecc, s->avctx); ff_mpegvideodsp_init(&s->mdsp); ff_videodsp_init(&s->vdsp, s->avctx->bits_per_raw_sample); s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_c; s->... |
0 | static void filter_mb_edgeh( H264Context *h, uint8_t *pix, int stride, int bS[4], int qp ) { int i, d; const int index_a = clip( qp + h->slice_alpha_c0_offset, 0, 51 ); const int alpha = alpha_table[index_a]; const int beta = beta_table[clip( qp + h->slice_beta_offset, 0, 51 )]; const int pix_next = stride; for( i = 0;... |
0 | static void aflat(WaveformContext *s, AVFrame *in, AVFrame *out, int component, int intensity, int offset, int column){ const int plane = s->desc->comp[component].plane; const int mirror = s->mirror; const int c0_linesize = in->linesize[ plane + 0 ]; const int c1_linesize = in->linesize[(plane + 1) % s->ncomp]; const i... |
0 | int ff_dirac_golomb_read_32bit(DiracGolombLUT *lut_ctx, const uint8_t *buf, int bytes, uint8_t *_dst, int coeffs){ int i, b, c_idx = 0; int32_t *dst = (int32_t *)_dst; DiracGolombLUT *future[4], *l = &lut_ctx[2*LUT_SIZE + buf[0]]; INIT_RESIDUE(res); for (b = 1; b <= bytes; b++) { future[0] = &lut_ctx[buf[b]]; future[1]... |
1 | static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length){ int x, y; const int width= f->avctx->width; const int height= f->avctx->height; uint16_t *dst= (uint16_t*)f->current_picture.data[0]; const int stride= f->current_picture.linesize[0]>>1; const unsigned int bitstream_size= AV_RL32(buf); const in... |
1 | static int pci_pcnet_init(PCIDevice *pci_dev){ PCIPCNetState *d = PCI_PCNET(pci_dev); PCNetState *s = &d->state; uint8_t *pci_conf;#if 0 printf("sizeof(RMD)=%d, sizeof(TMD)=%d\n", sizeof(struct pcnet_RMD), sizeof(struct pcnet_TMD));#endif pci_conf = pci_dev->config; pci_set_word(pci_conf + PCI_STATUS, PCI_STATUS_FAST_B... |
1 | void OPPROTO op_fdiv_STN_ST0(void){ ST(PARAM1) /= ST0;} |
1 | static int open_file(AVFormatContext *avf, unsigned fileno){ ConcatContext *cat = avf->priv_data; ConcatFile *file = &cat->files[fileno]; int ret; if (cat->avf) avformat_close_input(&cat->avf); cat->avf = avformat_alloc_context(); if (!cat->avf) return AVERROR(ENOMEM); cat->avf->flags |= avf->flags; cat->avf->interrupt... |
1 | BlockDirtyInfoList *bdrv_query_dirty_bitmaps(BlockDriverState *bs){ BdrvDirtyBitmap *bm; BlockDirtyInfoList *list = NULL; BlockDirtyInfoList **plist = &list; QLIST_FOREACH(bm, &bs->dirty_bitmaps, list) { BlockDirtyInfo *info = g_malloc0(sizeof(BlockDirtyInfo)); BlockDirtyInfoList *entry = g_malloc0(sizeof(BlockDirtyInf... |
1 | void register_displaychangelistener(DisplayChangeListener *dcl){ QemuConsole *con; trace_displaychangelistener_register(dcl, dcl->ops->dpy_name); dcl->ds = get_alloc_displaystate(); QLIST_INSERT_HEAD(&dcl->ds->listeners, dcl, next); gui_setup_refresh(dcl->ds); if (dcl->con) { dcl->con->dcls++; con = dcl->con; } else { ... |
1 | static void cpu_ioreq_move(ioreq_t *req){ int i, sign; sign = req->df ? -1 : 1; if (!req->data_is_ptr) { if (req->dir == IOREQ_READ) { for (i = 0; i < req->count; i++) { cpu_physical_memory_read( req->addr + (sign * i * (int64_t)req->size), (uint8_t *) &req->data, req->size); } } else if (req->dir == IOREQ_WRITE) { for... |
0 | static void imc_get_coeffs(AVCodecContext *avctx, IMCContext *q, IMCChannel *chctx){ int i, j, cw_len, cw; for (i = 0; i < BANDS; i++) { if (!chctx->sumLenArr[i]) continue; if (chctx->bandFlagsBuf[i] || chctx->bandWidthT[i]) { for (j = band_tab[i]; j < band_tab[i + 1]; j++) { cw_len = chctx->CWlengthT[j]; cw = 0; if (g... |
0 | void ff_generate_sliding_window_mmcos(H264Context *h, int first_slice){ MpegEncContext * const s = &h->s; MMCO mmco_temp[MAX_MMCO_COUNT], *mmco = first_slice ? h->mmco : mmco_temp; int mmco_index = 0, i; assert(h->long_ref_count + h->short_ref_count <= h->sps.ref_frame_count); if (h->short_ref_count && h->long_ref_coun... |
1 | void virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb){ uint32_t type; struct iovec *in_iov = req->elem->in_sg; struct iovec *iov = req->elem->out_sg; unsigned in_num = req->elem->in_num; unsigned out_num = req->elem->out_num; if (req->elem->out_num < 1 || req->elem->in_num < 1) { error_report("virtio... |
1 | void OPPROTO op_sdiv_T1_T0(void){ int64_t x0; int32_t x1; x0 = T0 | ((int64_t) (env->y) << 32); x1 = T1; x0 = x0 / x1; if ((int32_t) x0 != x0) {T0 = x0 < 0? 0x80000000: 0x7fffffff;T1 = 1; } else {T0 = x0;T1 = 0; FORCE_RET(); |
1 | static void spapr_machine_class_init(ObjectClass *oc, void *data){ MachineClass *mc = MACHINE_CLASS(oc); sPAPRMachineClass *smc = SPAPR_MACHINE_CLASS(oc); FWPathProviderClass *fwc = FW_PATH_PROVIDER_CLASS(oc); NMIClass *nc = NMI_CLASS(oc); HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc); mc->desc = "pSeries Logical... |
1 | static int ram_decompress_open(RamDecompressState *s, QEMUFile *f){ int ret; memset(s, 0, sizeof(*s)); s->f = f; ret = inflateInit(&s->zstream); if (ret != Z_OK) return -1; return 0;} |
1 | static int virtio_scsi_vring_init(VirtIOSCSI *s, VirtQueue *vq, int n){ BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(s))); VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); int rc; /* Set up virtqueue notify */ rc = k->set_host_notifier(qbus->parent, n, true); if (rc != 0) { fprintf(stderr, "virtio-scsi: Failed to set... |
1 | void qemu_get_guest_memory_mapping(MemoryMappingList *list, Error **errp){ CPUState *cpu, *first_paging_enabled_cpu; RAMBlock *block; ram_addr_t offset, length; first_paging_enabled_cpu = find_paging_enabled_cpu(first_cpu); if (first_paging_enabled_cpu) { for (cpu = first_paging_enabled_cpu; cpu != NULL; cpu = cpu->nex... |
1 | static inline void RENAME(rgb24tobgr32)(const uint8_t *src, uint8_t *dst, int src_size){ uint8_t *dest = dst; const uint8_t *s = src; const uint8_t *end; const uint8_t *mm_end; end = s + src_size; __asm__ volatile(PREFETCH" %0"::"m"(*s):"memory"); mm_end = end - 23; __asm__ volatile("movq %0, %%mm7"::"m"(mask32a):"memo... |
1 | int bdrv_open2(BlockDriverState *bs, const char *filename, int flags, BlockDriver *drv){ int ret, open_flags; char tmp_filename[PATH_MAX]; char backing_filename[PATH_MAX]; bs->read_only = 0; bs->is_temporary = 0; bs->encrypted = 0; if (flags & BDRV_O_SNAPSHOT) { BlockDriverState *bs1; int64_t total_size; /* if snapshot... |
1 | static int wma_decode_superframe(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt){ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; WMACodecContext *s = avctx->priv_data; int nb_frames, bit_offset, i, pos, len, ret; uint8_t *q; int16_t *samples; tprintf(avctx, "***decode_superframe:\... |
1 | static int vc1_decode_p_mb(VC1Context *v){ MpegEncContext *s = &v->s; GetBitContext *gb = &s->gb; int i, j; int mb_pos = s->mb_x + s->mb_y * s->mb_stride; int cbp; /* cbp decoding stuff */ int mqdiff, mquant; /* MB quantization */ int ttmb = v->ttfrm; /* MB Transform type */ int mb_has_coeffs = 1; /* last_flag */ int d... |
1 | int qdev_build_hotpluggable_device_list(Object *obj, void *opaque){ GSList **list = opaque; DeviceState *dev = DEVICE(obj); if (dev->realized && object_property_get_bool(obj, "hotpluggable", NULL)) { *list = g_slist_append(*list, dev); } object_child_foreach(obj, qdev_build_hotpluggable_device_list, opaque); return 0;} |
1 | static void test_qemu_strtoul_max(void){ const char *str = g_strdup_printf("%lu", ULONG_MAX); 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, ==, ULONG_MAX); g_assert(endptr == str + strlen(str));} |
1 | static int usb_msd_initfn(USBDevice *dev){ MSDState *s = DO_UPCAST(MSDState, dev, dev); if (!s->conf.dinfo || !s->conf.dinfo->bdrv) { error_report("usb-msd: drive property not set"); s->dev.speed = USB_SPEED_FULL; scsi_bus_new(&s->bus, &s->dev.qdev, 0, 1, usb_msd_command_complete); s->scsi_dev = scsi_bus_legacy_add_dri... |
1 | static int net_slirp_init(NetClientState *peer, const char *model, const char *name, int restricted, bool ipv4, const char *vnetwork, const char *vhost, bool ipv6, const char *vprefix6, int vprefix6_len, const char *vhost6, const char *vhostname, const char *tftp_export, const char *bootfile, const char *vdhcp_start, c... |
1 | size_t qemu_fd_getpagesize(int fd){#ifdef CONFIG_LINUX struct statfs fs; int ret; if (fd != -1) { do { ret = fstatfs(fd, &fs); } while (ret != 0 && errno == EINTR); if (ret == 0 && fs.f_type == HUGETLBFS_MAGIC) { return fs.f_bsize; } } return getpagesize();} |
1 | static int cpudef_setfield(const char *name, const char *str, void *opaque){ x86_def_t *def = opaque; int err = 0; if (!strcmp(name, "name")) { def->name = g_strdup(str); } else if (!strcmp(name, "model_id")) { strncpy(def->model_id, str, sizeof (def->model_id)); } else if (!strcmp(name, "level")) { setscalar(&def->lev... |
1 | static inline int onenand_prog_spare(OneNANDState *s, int sec, int secn, void *src){ int result = 0; if (secn > 0) { const uint8_t *sp = (const uint8_t *)src; uint8_t *dp = 0, *dpp = 0; if (s->blk_cur) { dp = g_malloc(512); if (!dp || blk_read(s->blk_cur, s->secs_cur + (sec >> 5), dp, 1) < 0) { result = 1; } else { dpp... |
1 | static int ircam_read_header(AVFormatContext *s){ uint32_t magic, sample_rate, channels, tag; const AVCodecTag *tags; int le = -1, i; AVStream *st; magic = avio_rl32(s->pb); for (i = 0; i < 7; i++) { if (magic == table[i].magic) { le = table[i].is_le; break; } } if (le == 1) { sample_rate = av_int2float(avio_rl32(s->pb... |
1 | static void pc_init_pci_1_6(QEMUMachineInitArgs *args){ has_pci_info = false; pc_init_pci(args);} |
1 | static char **breakline(char *input, int *count){ int c = 0; char *p; char **rval = g_malloc0(sizeof(char *)); char **tmp; while (rval && (p = qemu_strsep(&input, " ")) != NULL) { if (!*p) { continue; } c++; tmp = g_realloc(rval, sizeof(*rval) * (c + 1)); if (!tmp) { g_free(rval); rval = NULL; c = 0; break; } else { rv... |
1 | int kvm_arch_release_virq_post(int virq){ MSIRouteEntry *entry, *next; QLIST_FOREACH_SAFE(entry, &msi_route_list, list, next) { if (entry->virq == virq) { trace_kvm_x86_remove_msi_route(virq); QLIST_REMOVE(entry, list); break; } } return 0;} |
1 | monitor_qapi_event_queue(QAPIEvent event, QDict *qdict, Error **errp){ MonitorQAPIEventConf *evconf; MonitorQAPIEventState *evstate; assert(event < QAPI_EVENT__MAX); evconf = &monitor_qapi_event_conf[event]; trace_monitor_protocol_event_queue(event, qdict, evconf->rate); qemu_mutex_lock(&monitor_lock); if (!evconf->rat... |
1 | void pdu_submit(V9fsPDU *pdu){ Coroutine *co; CoroutineEntry *handler; V9fsState *s = pdu->s; if (pdu->id >= ARRAY_SIZE(pdu_co_handlers) || (pdu_co_handlers[pdu->id] == NULL)) { handler = v9fs_op_not_supp; } else { handler = pdu_co_handlers[pdu->id]; } if (is_ro_export(&s->ctx) && !is_read_only_op(pdu)) { handler = v9f... |
1 | static ssize_t socket_writev_buffer(void *opaque, struct iovec *iov, int iovcnt, int64_t pos){ QEMUFileSocket *s = opaque; ssize_t len; ssize_t size = iov_size(iov, iovcnt); len = iov_send(s->fd, iov, iovcnt, 0, size); if (len < size) { len = -socket_error(); } return len;} |
1 | static void assign_storage(SCLPDevice *sclp, SCCB *sccb){ MemoryRegion *mr = NULL; uint64_t this_subregion_size; AssignStorage *assign_info = (AssignStorage *) sccb; sclpMemoryHotplugDev *mhd = get_sclp_memory_hotplug_dev(); ram_addr_t assign_addr; MemoryRegion *sysmem = get_system_memory(); if (!mhd) { sccb->h.respons... |
1 | static int curl_open(BlockDriverState *bs, QDict *options, int flags, Error **errp){ BDRVCURLState *s = bs->opaque; CURLState *state = NULL; QemuOpts *opts; Error *local_err = NULL; const char *file; const char *cookie; const char *cookie_secret; double d; const char *secretid; const char *protocol_delimiter; static in... |
0 | static void mp3_write_xing(AVFormatContext *s){ MP3Context *mp3 = s->priv_data; AVCodecContext *codec = s->streams[mp3->audio_stream_idx]->codec; int32_t header; MPADecodeHeader mpah; int srate_idx, i, channels; int bitrate_idx; int best_bitrate_idx; int best_bitrate_error = INT_MAX; int xing_offset; int ver = 0; int l... |
0 | static int flashsv_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_size, void *data){ FlashSVContext * const s = avctx->priv_data; AVFrame *pict = data; AVFrame * const p = &s->frame; int res; int I_frame = 0; int opt_w, opt_h; *p = *pict; /* First frame needs to be a keyframe */ if (avctx->frame_number == 0)... |
0 | static void draw_bar(TestSourceContext *test, const uint8_t color[4], int x, int y, int w, int h, AVFrame *frame){ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format); uint8_t *p, *p0; int plane; x = FFMIN(x, test->w - 1); y = FFMIN(y, test->h - 1); w = FFMIN(w, test->w - x); h = FFMIN(h, test->h - y); ... |
0 | static void set_kernel_args_old(const struct arm_boot_info *info){ target_phys_addr_t p; const char *s; int initrd_size = info->initrd_size; target_phys_addr_t base = info->loader_start; /* see linux/include/asm-arm/setup.h */ p = base + KERNEL_ARGS_ADDR; /* page_size */ WRITE_WORD(p, 4096); /* nr_pages */ WRITE_WORD(p... |
0 | static void virtio_ccw_net_realize(VirtioCcwDevice *ccw_dev, Error **errp){ DeviceState *qdev = DEVICE(ccw_dev); VirtIONetCcw *dev = VIRTIO_NET_CCW(ccw_dev); DeviceState *vdev = DEVICE(&dev->vdev); Error *err = NULL; virtio_net_set_netclient_name(&dev->vdev, qdev->id, object_get_typename(OBJECT(qdev))); qdev_set_parent... |
0 | uint8_t cpu_inb(CPUState *env, pio_addr_t addr){ uint8_t val; val = ioport_read(0, addr); LOG_IOPORT("inb : %04"FMT_pioaddr" %02"PRIx8"\n", addr, val);#ifdef CONFIG_KQEMU if (env) env->last_io_time = cpu_get_time_fast();#endif return val;} |
0 | static void zynq_init(QEMUMachineInitArgs *args){ ram_addr_t ram_size = args->ram_size; const char *cpu_model = args->cpu_model; const char *kernel_filename = args->kernel_filename; const char *kernel_cmdline = args->kernel_cmdline; const char *initrd_filename = args->initrd_filename; ObjectClass *cpu_oc; ARMCPU *cpu; ... |
0 | static void avc_wgt_16width_msa(uint8_t *data, int32_t stride, int32_t height, int32_t log2_denom, int32_t src_weight, int32_t offset_in){ uint8_t cnt; v16u8 zero = { 0 }; v16u8 src0, src1, src2, src3; v16u8 dst0, dst1, dst2, dst3; v8u16 src0_l, src1_l, src2_l, src3_l; v8u16 src0_r, src1_r, src2_r, src3_r; v8u16 temp0,... |
0 | static void mem_info_pae32(Monitor *mon, CPUState *env){ unsigned int l1, l2, l3; int prot, last_prot; uint64_t pdpe, pde, pte; uint64_t pdp_addr, pd_addr, pt_addr; target_phys_addr_t start, end; pdp_addr = env->cr[3] & ~0x1f; last_prot = 0; start = -1; for (l1 = 0; l1 < 4; l1++) { cpu_physical_memory_read(pdp_addr + l... |
0 | int64_t helper_fdtox(CPUSPARCState *env, float64 src){ int64_t ret; clear_float_exceptions(env); ret = float64_to_int64_round_to_zero(src, &env->fp_status); check_ieee_exceptions(env); return ret;} |
0 | static inline void gen_op_jz_ecx(TCGMemOp size, int label1){ tcg_gen_mov_tl(cpu_tmp0, cpu_regs[R_ECX]); gen_extu(size, cpu_tmp0); tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_tmp0, 0, label1);} |
0 | void qemu_ram_foreach_block(RAMBlockIterFunc func, void *opaque){ RAMBlock *block; rcu_read_lock(); QLIST_FOREACH_RCU(block, &ram_list.blocks, next) { func(block->host, block->offset, block->used_length, opaque); } rcu_read_unlock();} |
0 | static uint64_t exynos4210_pwm_read(void *opaque, target_phys_addr_t offset, unsigned size){ Exynos4210PWMState *s = (Exynos4210PWMState *)opaque; uint32_t value = 0; int index; switch (offset) { case TCFG0: case TCFG1: index = (offset - TCFG0) >> 2; value = s->reg_tcfg[index]; break; case TCON: value = s->reg_tcon; br... |
0 | static void apic_init_ipi(APICState *s){ int i; s->tpr = 0; s->spurious_vec = 0xff; s->log_dest = 0; s->dest_mode = 0xf; memset(s->isr, 0, sizeof(s->isr)); memset(s->tmr, 0, sizeof(s->tmr)); memset(s->irr, 0, sizeof(s->irr)); for(i = 0; i < APIC_LVT_NB; i++) s->lvt[i] = 1 << 16; /* mask LVT */ s->esr = 0; memset(s->icr... |
0 | static void init_ppc_proc(PowerPCCPU *cpu){ PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu); CPUPPCState *env = &cpu->env;#if !defined(CONFIG_USER_ONLY) int i; env->irq_inputs = NULL; /* Set all exception vectors to an invalid address */ for (i = 0; i < POWERPC_EXCP_NB; i++) env->excp_vectors[i] = (target_ulong)(-1UL... |
0 | static int set_boot_dev(ISADevice *s, const char *boot_device){#define PC_MAX_BOOT_DEVICES 3 int nbds, bds[3] = { 0, }; int i; nbds = strlen(boot_device); if (nbds > PC_MAX_BOOT_DEVICES) { error_report("Too many boot devices for PC"); return(1); } for (i = 0; i < nbds; i++) { bds[i] = boot_device2nibble(boot_device[i])... |
0 | static int64_t load_kernel (void){ int64_t kernel_entry, kernel_high; long initrd_size; ram_addr_t initrd_offset; int big_endian; uint32_t *prom_buf; long prom_size; int prom_index = 0;#ifdef TARGET_WORDS_BIGENDIAN big_endian = 1;#else big_endian = 0;#endif if (load_elf(loaderparams.kernel_filename, cpu_mips_kseg0_to_p... |
0 | static int nbd_co_receive_reply(NBDClientSession *s, NBDRequest *request, QEMUIOVector *qiov){ int ret; int i = HANDLE_TO_INDEX(s, request->handle); /* Wait until we're woken up by nbd_read_reply_entry. */ s->requests[i].receiving = true; qemu_coroutine_yield(); s->requests[i].receiving = false; if (s->reply.handle != ... |
0 | void ff_h264_init_cabac_states(const H264Context *h, H264SliceContext *sl){ int i; const int8_t (*tab)[2]; const int slice_qp = av_clip(sl->qscale - 6*(h->sps.bit_depth_luma-8), 0, 51); if (sl->slice_type_nos == AV_PICTURE_TYPE_I) tab = cabac_context_init_I; else tab = cabac_context_init_PB[sl->cabac_init_idc]; /* calc... |
0 | static int mov_read_udta(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom){ uint64_t end = url_ftell(pb) + atom.size; while (url_ftell(pb) + 8 < end) { uint32_t tag_size = get_be32(pb); uint32_t tag = get_le32(pb); uint64_t next = url_ftell(pb) + tag_size - 8; if (next > end) // stop if tag_size is wrong break; switch... |
0 | static int usb_host_auto_scan(void *opaque, int bus_num, int addr, char *port, int class_id, int vendor_id, int product_id, const char *product_name, int speed){ struct USBAutoFilter *f; struct USBHostDevice *s; /* Ignore hubs */ if (class_id == 9) return 0; QTAILQ_FOREACH(s, &hostdevs, next) { f = &s->match; if (f->bu... |
0 | static int disas_coproc_insn(DisasContext *s, uint32_t insn){ int cpnum, is64, crn, crm, opc1, opc2, isread, rt, rt2; const ARMCPRegInfo *ri; cpnum = (insn >> 8) & 0xf; /* First check for coprocessor space used for XScale/iwMMXt insns */ if (arm_dc_feature(s, ARM_FEATURE_XSCALE) && (cpnum < 2)) { if (extract32(s->c15_c... |
0 | e1000_mmio_write(void *opaque, target_phys_addr_t addr, uint64_t val, unsigned size){ E1000State *s = opaque; unsigned int index = (addr & 0x1ffff) >> 2; if (index < NWRITEOPS && macreg_writeops[index]) { macreg_writeops[index](s, index, val); } else if (index < NREADOPS && macreg_readops[index]) { DBGOUT(MMIO, "e1000_... |
0 | socket_sockaddr_to_address_unix(struct sockaddr_storage *sa, socklen_t salen, Error **errp){ SocketAddress *addr; struct sockaddr_un *su = (struct sockaddr_un *)sa; addr = g_new0(SocketAddress, 1); addr->type = SOCKET_ADDRESS_KIND_UNIX; addr->u.q_unix = g_new0(UnixSocketAddress, 1); if (su->sun_path[0]) { addr->u.q_uni... |
0 | static int fetch_active_ports_list(QEMUFile *f, int version_id, VirtIOSerial *s, uint32_t nr_active_ports){ uint32_t i; s->post_load = g_malloc0(sizeof(*s->post_load)); s->post_load->nr_active_ports = nr_active_ports; s->post_load->connected = g_malloc0(sizeof(*s->post_load->connected) * nr_active_ports); s->post_load-... |
0 | void qdev_prop_set_globals_for_type(DeviceState *dev, const char *typename, Error **errp){ GlobalProperty *prop; QTAILQ_FOREACH(prop, &global_props, next) { Error *err = NULL; if (strcmp(typename, prop->driver) != 0) { continue; } prop->not_used = false; object_property_parse(OBJECT(dev), prop->value, prop->property, &... |
0 | void bdrv_set_in_use(BlockDriverState *bs, int in_use){ assert(bs->in_use != in_use); bs->in_use = in_use;} |
0 | static void qvirtio_scsi_stop(void){ qtest_end();} |
0 | int qemu_aio_set_fd_handler(int fd, IOHandler *io_read, IOHandler *io_write, AioFlushHandler *io_flush, void *opaque){ AioHandler *node; node = find_aio_handler(fd); /* Are we deleting the fd handler? */ if (!io_read && !io_write) { if (node) { /* If the lock is held, just mark the node as deleted */ if (walking_handle... |
0 | static pcibus_t pci_bar_address(PCIDevice *d,int reg, uint8_t type, pcibus_t size){ pcibus_t new_addr, last_addr; int bar = pci_bar(d, reg); uint16_t cmd = pci_get_word(d->config + PCI_COMMAND); if (type & PCI_BASE_ADDRESS_SPACE_IO) { if (!(cmd & PCI_COMMAND_IO)) { return PCI_BAR_UNMAPPED; } new_addr = pci_get_long(d->... |
0 | static void pc_dimm_check_memdev_is_busy(Object *obj, const char *name, Object *val, Error **errp){ MemoryRegion *mr; Error *local_err = NULL; mr = host_memory_backend_get_memory(MEMORY_BACKEND(val), &local_err); if (local_err) { goto out; } if (memory_region_is_mapped(mr)) { char *path = object_get_canonical_path_comp... |
0 | static int vhdx_parse_log(BlockDriverState *bs, BDRVVHDXState *s){ int ret = 0; int i; VHDXHeader *hdr; hdr = s->headers[s->curr_header]; /* either the log guid, or log length is zero, * then a replay log is present */ for (i = 0; i < sizeof(hdr->log_guid.data4); i++) { ret |= hdr->log_guid.data4[i]; } if (hdr->log_gui... |
0 | static void vfio_unmap_bar(VFIOPCIDevice *vdev, int nr){ VFIOBAR *bar = &vdev->bars[nr]; if (!bar->region.size) { return; } vfio_bar_quirk_teardown(vdev, nr); memory_region_del_subregion(&bar->region.mem, &bar->region.mmap_mem); munmap(bar->region.mmap, memory_region_size(&bar->region.mmap_mem)); if (vdev->msix && vdev... |
0 | static void pmac_ide_writeb (void *opaque, target_phys_addr_t addr, uint32_t val){ MACIOIDEState *d = opaque; addr = (addr & 0xFFF) >> 4; switch (addr) { case 1 ... 7: ide_ioport_write(&d->bus, addr, val); break; case 8: case 22: ide_cmd_write(&d->bus, 0, val); break; default: break; }} |
0 | static int MPA_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr){ MpegAudioContext *s = avctx->priv_data; const int16_t *samples = (const int16_t *)frame->data[0]; short smr[MPA_MAX_CHANNELS][SBLIMIT]; unsigned char bit_alloc[MPA_MAX_CHANNELS][SBLIMIT]; int padding, i, ret;... |
0 | int vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb){ av_log(avctx, AV_LOG_DEBUG, "Header: %0X\n", show_bits(gb, 32)); v->profile = get_bits(gb, 2); if (v->profile == PROFILE_COMPLEX) { av_log(avctx, AV_LOG_WARNING, "WMV3 Complex Profile is not fully supported\n"); } if (v->profile ==... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.