label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
0 | av_cold void ff_hpeldsp_vp3_init_x86(HpelDSPContext *c, int cpu_flags, int flags){ if (EXTERNAL_AMD3DNOW(cpu_flags)) { if (flags & AV_CODEC_FLAG_BITEXACT) { c->put_no_rnd_pixels_tab[1][1] = ff_put_no_rnd_pixels8_x2_exact_3dnow; c->put_no_rnd_pixels_tab[1][2] = ff_put_no_rnd_pixels8_y2_exact_3dnow; } } if (EXTERNAL_MMXE... |
0 | const char *bdrv_get_device_name(const BlockDriverState *bs){ return bs->blk ? blk_name(bs->blk) : "";} |
0 | static void mmu6xx_dump_mmu(FILE *f, fprintf_function cpu_fprintf, CPUPPCState *env){ ppc6xx_tlb_t *tlb; target_ulong sr; int type, way, entry, i; cpu_fprintf(f, "HTAB base = 0x%"HWADDR_PRIx"\n", env->htab_base); cpu_fprintf(f, "HTAB mask = 0x%"HWADDR_PRIx"\n", env->htab_mask); cpu_fprintf(f, "\nSegment registers:\n");... |
0 | static SocketAddress *nbd_build_socket_address(const char *sockpath, const char *bindto, const char *port){ SocketAddress *saddr; saddr = g_new0(SocketAddress, 1); if (sockpath) { saddr->type = SOCKET_ADDRESS_KIND_UNIX; saddr->u.q_unix.data = g_new0(UnixSocketAddress, 1); saddr->u.q_unix.data->path = g_strdup(sockpath)... |
0 | static void select_vgahw (const char *p){ const char *opts; assert(vga_interface_type == VGA_NONE); if (strstart(p, "std", &opts)) { if (vga_available()) { vga_interface_type = VGA_STD; } else { error_report("standard VGA not available"); exit(1); } } else if (strstart(p, "cirrus", &opts)) { if (cirrus_vga_available())... |
0 | static target_ulong h_resize_hpt_commit(PowerPCCPU *cpu, sPAPRMachineState *spapr, target_ulong opcode, target_ulong *args){ target_ulong flags = args[0]; target_ulong shift = args[1]; sPAPRPendingHPT *pending = spapr->pending_hpt; int rc; size_t newsize; if (spapr->resize_hpt == SPAPR_RESIZE_HPT_DISABLED) { return H_A... |
0 | static inline void migration_bitmap_set_dirty(MemoryRegion *mr, int length){ ram_addr_t addr; for (addr = 0; addr < length; addr += TARGET_PAGE_SIZE) { if (!memory_region_get_dirty(mr, addr, TARGET_PAGE_SIZE, DIRTY_MEMORY_MIGRATION)) { memory_region_set_dirty(mr, addr, TARGET_PAGE_SIZE); } }} |
0 | static int piix3_pre_save(void *opaque){ int i; PIIX3State *piix3 = opaque; for (i = 0; i < ARRAY_SIZE(piix3->pci_irq_levels_vmstate); i++) { piix3->pci_irq_levels_vmstate[i] = pci_bus_get_irq_level(piix3->dev.bus, i); } return 0;} |
0 | static void send_qmp_error_event(BlockDriverState *bs, BlockErrorAction action, bool is_read, int error){ IoOperationType optype; optype = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE; qapi_event_send_block_io_error(bdrv_get_device_name(bs), optype, action, bdrv_iostatus_is_enabled(bs), error == ENOSPC, s... |
0 | static int expand(AVFilterContext *ctx, double *pz, int nb, double *coeffs){ int i; coeffs[0] = 1.0; coeffs[1] = 0.0; for (i = 0; i < nb; i++) { coeffs[2 * (i + 1) ] = 0.0; coeffs[2 * (i + 1) + 1] = 0.0; } for (i = 0; i < nb; i++) multiply(pz[2 * i], pz[2 * i + 1], nb, coeffs); for (i = 0; i < nb + 1; i++) { if (fabs(c... |
0 | static int vnc_display_get_address(const char *addrstr, bool websocket, bool reverse, int displaynum, int to, bool has_ipv4, bool has_ipv6, bool ipv4, bool ipv6, SocketAddressLegacy **retaddr, Error **errp){ int ret = -1; SocketAddressLegacy *addr = NULL; addr = g_new0(SocketAddressLegacy, 1); if (strncmp(addrstr, "uni... |
0 | static int64_t ffm_seek1(AVFormatContext *s, int64_t pos1){ FFMContext *ffm = s->priv_data; AVIOContext *pb = s->pb; int64_t pos; pos = FFMIN(pos1, ffm->file_size - FFM_PACKET_SIZE); pos = FFMAX(pos, FFM_PACKET_SIZE); av_dlog(s, "seek to %"PRIx64" -> %"PRIx64"\n", pos1, pos); return avio_seek(pb, pos, SEEK_SET);} |
0 | static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap){ AVStream *st; int id; st = av_new_stream(s, 0); if (!st) return AVERROR_NOMEM; if (ap) { id = s->iformat->value; if (id == CODEC_ID_RAWVIDEO) { st->codec->codec_type = CODEC_TYPE_VIDEO; } else { st->codec->codec_type = CODEC_TYPE_AUDIO; } st->codec... |
1 | static size_t curl_size_cb(void *ptr, size_t size, size_t nmemb, void *opaque){ CURLState *s = ((CURLState*)opaque); size_t realsize = size * nmemb; size_t fsize; if(sscanf(ptr, "Content-Length: %zd", &fsize) == 1) { s->s->len = fsize; } return realsize;} |
1 | static av_cold int twin_decode_close(AVCodecContext *avctx){ TwinContext *tctx = avctx->priv_data; int i; for (i = 0; i < 3; i++) { ff_mdct_end(&tctx->mdct_ctx[i]); av_free(tctx->cos_tabs[i]); } av_free(tctx->curr_frame); av_free(tctx->spectrum); av_free(tctx->prev_frame); av_free(tctx->tmp_buf); return 0;} |
1 | static void fw_cfg_class_init(ObjectClass *klass, void *data){ DeviceClass *dc = DEVICE_CLASS(klass); dc->realize = fw_cfg_realize; dc->no_user = 1; dc->reset = fw_cfg_reset; dc->vmsd = &vmstate_fw_cfg; dc->props = fw_cfg_properties;} |
1 | static target_ulong h_read(PowerPCCPU *cpu, sPAPREnvironment *spapr, target_ulong opcode, target_ulong *args){ CPUPPCState *env = &cpu->env; target_ulong flags = args[0]; target_ulong pte_index = args[1]; uint8_t *hpte; int i, ridx, n_entries = 1; if ((pte_index * HASH_PTE_SIZE_64) & ~env->htab_mask) { return H_PARAMET... |
1 | static int bdrv_co_do_ioctl(BlockDriverState *bs, int req, void *buf){ BlockDriver *drv = bs->drv; BdrvTrackedRequest tracked_req; CoroutineIOCompletion co = { .coroutine = qemu_coroutine_self(), }; BlockAIOCB *acb; tracked_request_begin(&tracked_req, bs, 0, 0, BDRV_TRACKED_IOCTL); if (!drv || !drv->bdrv_aio_ioctl) { c... |
1 | static int asf_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int flags){ ASFContext *asf = s->priv_data; AVStream *st = s->streams[stream_index]; int64_t pos; int index; if (s->packet_size <= 0) return -1; /* Try using the protocol's read_seek if available */ if (s->pb) { int ret = avio_seek_time(s->pb, ... |
1 | void ff_mpeg_unref_picture(MpegEncContext *s, Picture *pic){ int off = offsetof(Picture, mb_mean) + sizeof(pic->mb_mean); pic->tf.f = &pic->f; /* WM Image / Screen codecs allocate internal buffers with different * dimensions / colorspaces; ignore user-defined callbacks for these. */ if (s->codec_id != AV_CODEC_ID_WMV3I... |
1 | void nbd_client_new(NBDExport *exp, QIOChannelSocket *sioc, QCryptoTLSCreds *tlscreds, const char *tlsaclname, void (*close_fn)(NBDClient *)){ NBDClient *client; NBDClientNewData *data = g_new(NBDClientNewData, 1); client = g_malloc0(sizeof(NBDClient)); client->refcount = 1; client->exp = exp; client->tlscreds = tlscre... |
1 | void hbitmap_set(HBitmap *hb, uint64_t start, uint64_t count){ /* Compute range in the last layer. */ uint64_t last = start + count - 1; trace_hbitmap_set(hb, start, count, start >> hb->granularity, last >> hb->granularity); start >>= hb->granularity; last >>= hb->granularity; count = last - start + 1; hb->count += cou... |
1 | static int shorten_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt){ AVFrame *frame = data; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; ShortenContext *s = avctx->priv_data; int i, input_buf_size = 0; int ret; /* allocate internal bitstream buffer */ if (s->max_fram... |
1 | int64_t ff_lsb2full(StreamContext *stream, int64_t lsb){ int64_t mask = (1<<stream->msb_pts_shift)-1; int64_t delta= stream->last_pts - mask/2; return ((lsb - delta)&mask) + delta;} |
1 | long do_sigreturn(CPUAlphaState *env){ struct target_sigcontext *sc; abi_ulong sc_addr = env->ir[IR_A0]; target_sigset_t target_set; sigset_t set; if (!lock_user_struct(VERIFY_READ, sc, sc_addr, 1)) { goto badframe; } target_sigemptyset(&target_set); if (__get_user(target_set.sig[0], &sc->sc_mask)) { goto badframe; } t... |
1 | static void coroutine_fn wait_serialising_requests(BdrvTrackedRequest *self){ BlockDriverState *bs = self->bs; BdrvTrackedRequest *req; bool retry; if (!bs->serialising_in_flight) { return; } do { retry = false; QLIST_FOREACH(req, &bs->tracked_requests, list) { if (req == self || (!req->serialising && !self->serialisin... |
1 | void qemu_spice_init(void){ QemuOpts *opts = QTAILQ_FIRST(&qemu_spice_opts.head); const char *password, *str, *x509_dir, *addr, *x509_key_password = NULL, *x509_dh_file = NULL, *tls_ciphers = NULL; char *x509_key_file = NULL, *x509_cert_file = NULL, *x509_cacert_file = NULL; int port, tls_port, len, addr_flags; spice_i... |
1 | void do_store_601_batu (int nr){ do_store_ibatu(env, nr, T0); env->DBAT[0][nr] = env->IBAT[0][nr]; env->DBAT[1][nr] = env->IBAT[1][nr];} |
1 | static void dp8393x_realize(DeviceState *dev, Error **errp){ dp8393xState *s = DP8393X(dev); int i, checksum; uint8_t *prom; address_space_init(&s->as, s->dma_mr, "dp8393x"); memory_region_init_io(&s->mmio, OBJECT(dev), &dp8393x_ops, s, "dp8393x-regs", 0x40 << s->it_shift); s->nic = qemu_new_nic(&net_dp83932_info, &s->... |
1 | void bdrv_round_to_clusters(BlockDriverState *bs, int64_t offset, unsigned int bytes, int64_t *cluster_offset, unsigned int *cluster_bytes){ BlockDriverInfo bdi; if (bdrv_get_info(bs, &bdi) < 0 || bdi.cluster_size == 0) { *cluster_offset = offset; *cluster_bytes = bytes; } else { int64_t c = bdi.cluster_size; *cluster_... |
0 | int ff_audio_rechunk_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush, int (*get_packet)(AVFormatContext *, AVPacket *, AVPacket *, int), int (*compare_ts)(AVFormatContext *, AVPacket *, AVPacket *)){ int i; if (pkt) { AVStream *st = s->streams[pkt->stream_index]; AudioInterleaveContext *aic = st-... |
0 | static av_cold int init_decoder(AVCodecContext *avctx){ avctx->pix_fmt = PIX_FMT_PAL8; return 0;} |
0 | static void opt_output_file(const char *filename){ AVFormatContext *oc; int err, use_video, use_audio, use_subtitle; int input_has_video, input_has_audio, input_has_subtitle; AVFormatParameters params, *ap = ¶ms; AVOutputFormat *file_oformat; if (!strcmp(filename, "-")) filename = "pipe:"; oc = avformat_alloc_conte... |
0 | static uint32_t bonito_sbridge_pciaddr(void *opaque, hwaddr addr){ PCIBonitoState *s = opaque; PCIHostState *phb = PCI_HOST_BRIDGE(s->pcihost); uint32_t cfgaddr; uint32_t idsel; uint32_t devno; uint32_t funno; uint32_t regno; uint32_t pciaddr; /* support type0 pci config */ if ((s->regs[BONITO_PCIMAP_CFG] & 0x10000) !=... |
0 | const char *drive_get_serial(BlockDriverState *bdrv){ DriveInfo *dinfo; TAILQ_FOREACH(dinfo, &drives, next) { if (dinfo->bdrv == bdrv) return dinfo->serial; } return "\0";} |
0 | static void vnc_read_when(VncState *vs, VncReadEvent *func, size_t expecting){ vs->read_handler = func; vs->read_handler_expect = expecting;} |
0 | static int decode_mips16_opc (CPUState *env, DisasContext *ctx, int *is_branch){ int rx, ry; int sa; int op, cnvt_op, op1, offset; int funct; int n_bytes; op = (ctx->opcode >> 11) & 0x1f; sa = (ctx->opcode >> 2) & 0x7; sa = sa == 0 ? 8 : sa; rx = xlat((ctx->opcode >> 8) & 0x7); cnvt_op = (ctx->opcode >> 5) & 0x7; ry = ... |
0 | static int smc_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt){ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; SmcContext *s = avctx->priv_data; const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL); int ret; bytestream2_init(&s->gb, buf, buf_size... |
0 | static void proxy_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off){ seekdir(fs->dir, off);} |
0 | void virtio_notify(VirtIODevice *vdev, VirtQueue *vq){ /* Always notify when queue is empty */ if ((vq->inuse || vring_avail_idx(vq) != vq->last_avail_idx) && (vring_avail_flags(vq) & VRING_AVAIL_F_NO_INTERRUPT)) return; vdev->isr |= 0x01; virtio_update_irq(vdev);} |
0 | static int64_t allocate_cluster(BlockDriverState *bs, int64_t sector_num){ BDRVParallelsState *s = bs->opaque; uint32_t idx, offset, tmp; int64_t pos; int ret; idx = sector_num / s->tracks; offset = sector_num % s->tracks; if (idx >= s->catalog_size) { return -EINVAL; } if (s->catalog_bitmap[idx] != 0) { return (uint64... |
0 | static int vdi_open(BlockDriverState *bs, QDict *options, int flags, Error **errp){ BDRVVdiState *s = bs->opaque; VdiHeader header; size_t bmap_size; int ret; logout("\n"); ret = bdrv_read(bs->file, 0, (uint8_t *)&header, 1); if (ret < 0) { goto fail; } vdi_header_to_cpu(&header);#if defined(CONFIG_VDI_DEBUG) vdi_heade... |
0 | ThreadPool *aio_get_thread_pool(AioContext *ctx){ if (!ctx->thread_pool) { ctx->thread_pool = thread_pool_new(ctx); } return ctx->thread_pool;} |
0 | static void string_serialize(void *native_in, void **datap, VisitorFunc visit, Error **errp){ StringSerializeData *d = g_malloc0(sizeof(*d)); d->sov = string_output_visitor_new(false); visit(string_output_get_visitor(d->sov), &native_in, errp); *datap = d;} |
0 | void cpu_x86_update_cr3(CPUX86State *env){ if (env->cr[0] & CR0_PG_MASK) {#if defined(DEBUG_MMU) printf("CR3 update: CR3=%08x\n", env->cr[3]);#endif tlb_flush(env); }} |
0 | static inline void apply_8x8(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int dir, uint8_t **ref_picture, qpel_mc_func (*qpix_op)[16], op_pixels_func (*pix_op)[4]){ int dxy, mx, my, src_x, src_y; int i; int mb_x = s->mb_x; int mb_y = s->mb_y; uint8_t *ptr, *dest; mx = 0; my = 0; if (s->quarte... |
0 | void mpeg_motion_internal(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int field_based, int bottom_field, int field_select, uint8_t **ref_picture, op_pixels_func (*pix_op)[4], int motion_x, int motion_y, int h, int is_mpeg12, int mb_y){ uint8_t *ptr_y, *ptr_cb, *ptr_cr; int dxy, uvdxy, mx, my... |
0 | static void parse_palette_segment(AVCodecContext *avctx, const uint8_t *buf, int buf_size){ PGSSubContext *ctx = avctx->priv_data; const uint8_t *buf_end = buf + buf_size; const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP; int color_id; int y, cb, cr, alpha; int r, g, b, r_add, g_add, b_add; /* Skip two null bytes */ buf ... |
0 | static int transcode(OutputFile *output_files, int nb_output_files, InputFile *input_files, int nb_input_files){ int ret, i; AVFormatContext *is, *os; OutputStream *ost; InputStream *ist; uint8_t *no_packet; int no_packet_count = 0; int64_t timer_start; int key; if (!(no_packet = av_mallocz(nb_input_files))) exit_progr... |
0 | void *av_realloc(void *ptr, size_t size){#if CONFIG_MEMALIGN_HACK int diff;#endif /* let's disallow possible ambiguous cases */ if (size > (MAX_MALLOC_SIZE-16)) return NULL;#if CONFIG_MEMALIGN_HACK //FIXME this isn't aligned correctly, though it probably isn't needed if(!ptr) return av_malloc(size); diff= ((char*)ptr)[... |
0 | static av_cold int raw_close_decoder(AVCodecContext *avctx){ RawVideoContext *context = avctx->priv_data; av_freep(&context->buffer); return 0;} |
1 | static int mc_subpel(DiracContext *s, DiracBlock *block, const uint8_t *src[5], int x, int y, int ref, int plane){ Plane *p = &s->plane[plane]; uint8_t **ref_hpel = s->ref_pics[ref]->hpel[plane]; int motion_x = block->u.mv[ref][0]; int motion_y = block->u.mv[ref][1]; int mx, my, i, epel, nplanes = 0; if (plane) { motio... |
1 | int kvm_arch_init_vcpu(CPUState *cs){ struct { struct kvm_cpuid2 cpuid; struct kvm_cpuid_entry2 entries[KVM_MAX_CPUID_ENTRIES]; } QEMU_PACKED cpuid_data; X86CPU *cpu = X86_CPU(cs); CPUX86State *env = &cpu->env; uint32_t limit, i, j, cpuid_i; uint32_t unused; struct kvm_cpuid_entry2 *c; uint32_t signature[3]; int r; cpu... |
1 | static QObject *pci_get_dev_dict(PCIDevice *dev, PCIBus *bus, int bus_num){ int class; QObject *obj; obj = qobject_from_jsonf("{ 'bus': %d, 'slot': %d, 'function': %d," "'class_info': %p, 'id': %p, 'regions': %p," " 'qdev_id': %s }", bus_num, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn), pci_get_dev_class(dev), pci_get_d... |
1 | static int decode_block_progressive(MJpegDecodeContext *s, int16_t *block, uint8_t *last_nnz, int ac_index, int16_t *quant_matrix, int ss, int se, int Al, int *EOBRUN){ int code, i, j, level, val, run; if (*EOBRUN) { (*EOBRUN)--; return 0; } { OPEN_READER(re, &s->gb); for (i = ss; ; i++) { UPDATE_CACHE(re, &s->gb); GET... |
1 | static void *bsd_vmalloc(size_t size){ void *p; mmap_lock(); /* Use map and mark the pages as used. */ p = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); if (h2g_valid(p)) { /* Allocated region overlaps guest address space. This may recurse. */ abi_ulong addr = h2g(p); page_set_flags(addr & TA... |
1 | void rgb32tobgr24(const uint8_t *src, uint8_t *dst, long src_size){long i;long num_pixels = src_size >> 2;for(i=0; i<num_pixels; i++){#ifdef WORDS_BIGENDIAN/* RGB32 (= A,B,G,R) -> BGR24 (= B,G,R) */dst[3*i + 0] = src[4*i + 1];dst[3*i + 1] = src[4*i + 2];dst[3*i + 2] = src[4*i + 3];#elsedst[3*i + 0] = src[4*i + 2];dst[3... |
1 | static int initFilter(int16_t **outFilter, int16_t **filterPos, int *outFilterSize, int xInc, int srcW, int dstW, int filterAlign, int one, int flags, int cpu_flags, SwsVector *srcFilter, SwsVector *dstFilter, double param[2], int is_horizontal){ int i; int filterSize; int filter2Size; int minFilterSize; int64_t *filte... |
1 | static ssize_t usbnet_receive(VLANClientState *nc, const uint8_t *buf, size_t size){ USBNetState *s = DO_UPCAST(NICState, nc, nc)->opaque; struct rndis_packet_msg_type *msg; if (is_rndis(s)) { msg = (struct rndis_packet_msg_type *) s->in_buf; if (!s->rndis_state == RNDIS_DATA_INITIALIZED) return -1; if (size + sizeof(s... |
1 | int unix_connect(const char *path){ QemuOpts *opts; int sock; opts = qemu_opts_create(&dummy_opts, NULL, 0); qemu_opt_set(opts, "path", path); sock = unix_connect_opts(opts); qemu_opts_del(opts); return sock;} |
1 | static inline bool regime_translation_disabled(CPUARMState *env, ARMMMUIdx mmu_idx){ if (arm_feature(env, ARM_FEATURE_M)) { switch (env->v7m.mpu_ctrl[regime_is_secure(env, mmu_idx)] & (R_V7M_MPU_CTRL_ENABLE_MASK | R_V7M_MPU_CTRL_HFNMIENA_MASK)) { case R_V7M_MPU_CTRL_ENABLE_MASK: /* Enabled, but not for HardFault and NM... |
0 | static void migration_instance_init(Object *obj){ MigrationState *ms = MIGRATION_OBJ(obj); ms->state = MIGRATION_STATUS_NONE; ms->xbzrle_cache_size = DEFAULT_MIGRATE_CACHE_SIZE; ms->mbps = -1; ms->parameters.tls_creds = g_strdup(""); ms->parameters.tls_hostname = g_strdup("");} |
0 | static void do_stop_capture(Monitor *mon, const QDict *qdict){ int i; int n = qdict_get_int(qdict, "n"); CaptureState *s; for (s = capture_head.lh_first, i = 0; s; s = s->entries.le_next, ++i) { if (i == n) { s->ops.destroy (s->opaque); LIST_REMOVE (s, entries); qemu_free (s); return; } }} |
0 | static void nbd_refresh_filename(BlockDriverState *bs){ QDict *opts = qdict_new(); const char *path = qdict_get_try_str(bs->options, "path"); const char *host = qdict_get_try_str(bs->options, "host"); const char *port = qdict_get_try_str(bs->options, "port"); const char *export = qdict_get_try_str(bs->options, "export"... |
0 | static int select_input_picture(MpegEncContext *s){ int i, ret; for (i = 1; i < MAX_PICTURE_COUNT; i++) s->reordered_input_picture[i - 1] = s->reordered_input_picture[i]; s->reordered_input_picture[MAX_PICTURE_COUNT - 1] = NULL; /* set next picture type & ordering */ if (!s->reordered_input_picture[0] && s->input_pictu... |
0 | static inline void iwmmxt_store_reg(TCGv var, int reg){ tcg_gen_st_i64(var, cpu_env, offsetof(CPUState, iwmmxt.regs[reg]));} |
0 | static int msix_is_masked(PCIDevice *dev, int vector){ unsigned offset = vector * MSIX_ENTRY_SIZE + MSIX_VECTOR_CTRL; return dev->msix_table_page[offset] & MSIX_VECTOR_MASK;} |
0 | static void qed_aio_next_io(QEDAIOCB *acb){ BDRVQEDState *s = acb_to_s(acb); uint64_t offset; size_t len; int ret; trace_qed_aio_next_io(s, acb, 0, acb->cur_pos + acb->cur_qiov.size); if (acb->backing_qiov) { qemu_iovec_destroy(acb->backing_qiov); g_free(acb->backing_qiov); acb->backing_qiov = NULL; } acb->qiov_offset ... |
0 | writev_f(int argc, char **argv){struct timeval t1, t2;int Cflag = 0, qflag = 0;int c, cnt;char *buf;int64_t offset;int total;int nr_iov;int pattern = 0xcd;QEMUIOVector qiov;while ((c = getopt(argc, argv, "CqP:")) != EOF) {switch (c) {case 'C':Cflag = 1;break;case 'q':qflag = 1;break;case 'P':pattern = atoi(optarg);brea... |
0 | static void test_qemu_strtoull_decimal(void){ const char *str = "0123"; char f = 'X'; const char *endptr = &f; uint64_t res = 999; int err; err = qemu_strtoull(str, &endptr, 10, &res); g_assert_cmpint(err, ==, 0); g_assert_cmpint(res, ==, 123); g_assert(endptr == str + strlen(str)); str = "123"; endptr = &f; res = 999;... |
0 | static uint64_t imx_timerp_read(void *opaque, target_phys_addr_t offset, unsigned size){ IMXTimerPState *s = (IMXTimerPState *)opaque; DPRINTF("p-read(offset=%x)", offset >> 2); switch (offset >> 2) { case 0: /* Control Register */ DPRINTF("cr %x\n", s->cr); return s->cr; case 1: /* Status Register */ DPRINTF("int_leve... |
0 | static void tcg_out_brcond2(TCGContext *s, TCGCond cond, TCGReg al, TCGReg ah, TCGReg bl, TCGReg bh, int label_index){ TCGCond b_cond = TCG_COND_NE; TCGReg tmp = TCG_TMP1; /* With branches, we emit between 4 and 9 insns with 2 or 3 branches. With setcond, we emit between 3 and 10 insns and only 1 branch, which ought to... |
0 | static void legacy_mouse_event(DeviceState *dev, QemuConsole *src, InputEvent *evt){ static const int bmap[INPUT_BUTTON__MAX] = { [INPUT_BUTTON_LEFT] = MOUSE_EVENT_LBUTTON, [INPUT_BUTTON_MIDDLE] = MOUSE_EVENT_MBUTTON, [INPUT_BUTTON_RIGHT] = MOUSE_EVENT_RBUTTON, }; QEMUPutMouseEntry *s = (QEMUPutMouseEntry *)dev; InputB... |
0 | static int h264_slice_header_init(H264Context *h){ int nb_slices = (HAVE_THREADS && h->avctx->active_thread_type & FF_THREAD_SLICE) ? h->avctx->thread_count : 1; int i, ret; ff_set_sar(h->avctx, h->sps.sar); av_pix_fmt_get_chroma_sub_sample(h->avctx->pix_fmt, &h->chroma_x_shift, &h->chroma_y_shift); if (h->sps.timing_i... |
0 | int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx){ int i, ret; Picture *pic; s->mb_skipped = 0; /* mark & release old frames */ if (s->pict_type != AV_PICTURE_TYPE_B && s->last_picture_ptr && s->last_picture_ptr != s->next_picture_ptr && s->last_picture_ptr->f->buf[0]) { ff_mpeg_unref_picture(s->avctx, s... |
0 | static guint io_add_watch_poll(GIOChannel *channel, IOCanReadHandler *fd_can_read, GIOFunc fd_read, gpointer user_data){ IOWatchPoll *iwp; iwp = (IOWatchPoll *) g_source_new(&io_watch_poll_funcs, sizeof(IOWatchPoll)); iwp->fd_can_read = fd_can_read; iwp->opaque = user_data; iwp->src = g_io_create_watch(channel, G_IO_IN... |
0 | int qio_channel_socket_dgram_sync(QIOChannelSocket *ioc, SocketAddress *localAddr, SocketAddress *remoteAddr, Error **errp){ int fd; trace_qio_channel_socket_dgram_sync(ioc, localAddr, remoteAddr); fd = socket_dgram(remoteAddr, localAddr, errp); if (fd < 0) { trace_qio_channel_socket_dgram_fail(ioc); return -1; } trace... |
0 | int ff_init_me(MpegEncContext *s){ MotionEstContext * const c= &s->me; int cache_size= FFMIN(ME_MAP_SIZE>>ME_MAP_SHIFT, 1<<ME_MAP_SHIFT); int dia_size= FFMAX(FFABS(s->avctx->dia_size)&255, FFABS(s->avctx->pre_dia_size)&255); if(FFMIN(s->avctx->dia_size, s->avctx->pre_dia_size) < -ME_MAP_SIZE){ av_log(s->avctx, AV_LOG_E... |
1 | float32 float32_scalbn( float32 a, int n STATUS_PARAM ){ flag aSign; int16 aExp; uint32_t aSig; a = float32_squash_input_denormal(a STATUS_VAR); aSig = extractFloat32Frac( a ); aExp = extractFloat32Exp( a ); aSign = extractFloat32Sign( a ); if ( aExp == 0xFF ) { return a; } if ( aExp != 0 ) aSig |= 0x00800000; else if ... |
1 | void net_check_clients(void){ VLANState *vlan; VLANClientState *vc; int has_nic, has_host_dev; QTAILQ_FOREACH(vlan, &vlans, next) { QTAILQ_FOREACH(vc, &vlan->clients, next) { switch (vc->info->type) { case NET_CLIENT_TYPE_NIC: has_nic = 1; break; case NET_CLIENT_TYPE_SLIRP: case NET_CLIENT_TYPE_TAP: case NET_CLIENT_TYP... |
1 | static uint32_t hpet_time_after64(uint64_t a, uint64_t b){ return ((int64_t)(b) - (int64_t)(a) < 0);} |
1 | static void kvm_arm_gicv3_realize(DeviceState *dev, Error **errp){ GICv3State *s = KVM_ARM_GICV3(dev); KVMARMGICv3Class *kgc = KVM_ARM_GICV3_GET_CLASS(s); Error *local_err = NULL; DPRINTF("kvm_arm_gicv3_realize\n"); kgc->parent_realize(dev, &local_err); if (local_err) { error_propagate(errp, local_err); return; } if (s... |
1 | static TypeImpl *type_register_internal(const TypeInfo *info){ TypeImpl *ti = g_malloc0(sizeof(*ti)); int i; g_assert(info->name != NULL); if (type_table_lookup(info->name) != NULL) { fprintf(stderr, "Registering `%s' which already exists\n", info->name); abort(); } ti->name = g_strdup(info->name); ti->parent = g_strdu... |
1 | static int disas_vfp_insn(CPUState * env, DisasContext *s, uint32_t insn){ uint32_t rd, rn, rm, op, i, n, offset, delta_d, delta_m, bank_mask; int dp, veclen; TCGv addr; TCGv tmp; TCGv tmp2; if (!arm_feature(env, ARM_FEATURE_VFP)) return 1; if (!vfp_enabled(env)) { /* VFP disabled. Only allow fmxr/fmrx to/from some con... |
1 | void drive_hot_add(Monitor *mon, const QDict *qdict){ int dom, pci_bus; unsigned slot; int type, bus; PCIDevice *dev; DriveInfo *dinfo = NULL; const char *pci_addr = qdict_get_str(qdict, "pci_addr"); const char *opts = qdict_get_str(qdict, "opts"); BusState *scsibus; dinfo = add_init_drive(opts); if (!dinfo) goto err; ... |
1 | static inline int msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block, int n, int coded){ int level, i, last, run, run_diff; int dc_pred_dir; RLTable *rl; RL_VLC_ELEM *rl_vlc; const UINT8 *scan_table; int qmul, qadd; if (s->mb_intra) { qmul=1; qadd=0;/* DC coef */ set_stat(ST_DC); level = msmpeg4_decode_dc(s, n, &... |
1 | static int usb_device_post_load(void *opaque, int version_id){ USBDevice *dev = opaque; if (dev->state == USB_STATE_NOTATTACHED) { dev->attached = 0; } else { dev->attached = 1; return 0; |
1 | int inet_listen_opts(QemuOpts *opts, int port_offset, Error **errp){ struct addrinfo ai,*res,*e; const char *addr; char port[33]; char uaddr[INET6_ADDRSTRLEN+1]; char uport[33]; int slisten, rc, to, port_min, port_max, p; memset(&ai,0, sizeof(ai)); ai.ai_flags = AI_PASSIVE | AI_ADDRCONFIG; ai.ai_family = PF_UNSPEC; ai.... |
1 | static int oma_read_packet(AVFormatContext *s, AVPacket *pkt){ OMAContext *oc = s->priv_data; AVStream *st = s->streams[0]; int packet_size = st->codec->block_align; int byte_rate = st->codec->bit_rate >> 3; int64_t pos = avio_tell(s->pb); int ret = av_get_packet(s->pb, pkt, packet_size); if (ret < packet_size) pkt->fl... |
0 | void av_opt_set_defaults2(void *s, int mask, int flags){#endif const AVOption *opt = NULL; while ((opt = av_opt_next(s, opt)) != NULL) {#if FF_API_OLD_AVOPTIONS if ((opt->flags & mask) != flags) continue;#endif switch (opt->type) { case AV_OPT_TYPE_CONST: /* Nothing to be done here */ break; case AV_OPT_TYPE_FLAGS: cas... |
1 | static int RENAME(resample_common)(ResampleContext *c, void *dest, const void *source, int n, int update_ctx){ DELEM *dst = dest; const DELEM *src = source; int dst_index; int index= c->index; int frac= c->frac; int sample_index = 0; while (index >= c->phase_count) { sample_index++; index -= c->phase_count; } for (dst_... |
1 | BdrvNextIterator *bdrv_next(BdrvNextIterator *it, BlockDriverState **bs){ if (!it) { it = g_new(BdrvNextIterator, 1); *it = (BdrvNextIterator) { .phase = BDRV_NEXT_BACKEND_ROOTS, }; } /* First, return all root nodes of BlockBackends. In order to avoid * returning a BDS twice when multiple BBs refer to it, we only retur... |
1 | static int channelmap_filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf){ AVFilterContext *ctx = inlink->dst; AVFilterLink *outlink = ctx->outputs[0]; const ChannelMapContext *s = ctx->priv; const int nch_in = av_get_channel_layout_nb_channels(inlink->channel_layout); const int nch_out = s->nch; int ch; uint8... |
0 | static int encode_thread(AVCodecContext *c, void *arg){ MpegEncContext *s= *(void**)arg; int mb_x, mb_y, pdif = 0; int chr_h= 16>>s->chroma_y_shift; int i, j; MpegEncContext best_s, backup_s; uint8_t bit_buf[2][MAX_MB_BYTES]; uint8_t bit_buf2[2][MAX_MB_BYTES]; uint8_t bit_buf_tex[2][MAX_MB_BYTES]; PutBitContext pb[2], ... |
0 | static void new_audio_stream(AVFormatContext *oc, int file_idx){ AVStream *st; OutputStream *ost; AVCodec *codec= NULL; AVCodecContext *audio_enc; enum CodecID codec_id = CODEC_ID_NONE; if(!audio_stream_copy){ if (audio_codec_name) { codec_id = find_codec_or_die(audio_codec_name, AVMEDIA_TYPE_AUDIO, 1, avcodec_opts[AVM... |
1 | static int virtio_net_handle_mac(VirtIONet *n, uint8_t cmd, VirtQueueElement *elem){ struct virtio_net_ctrl_mac mac_data; if (cmd != VIRTIO_NET_CTRL_MAC_TABLE_SET || elem->out_num != 3 || elem->out_sg[1].iov_len < sizeof(mac_data) || elem->out_sg[2].iov_len < sizeof(mac_data)) return VIRTIO_NET_ERR; n->mac_table.in_use... |
1 | static ssize_t vnc_tls_pull(gnutls_transport_ptr_t transport, void *data, size_t len) { VncState *vs = (VncState *)transport; int ret; retry: ret = qemu_recv(vs->csock, data, len, 0); if (ret < 0) { if (errno == EINTR) goto retry; return -1; } return ret;} |
1 | file_backend_memory_alloc(HostMemoryBackend *backend, Error **errp){ HostMemoryBackendFile *fb = MEMORY_BACKEND_FILE(backend); if (!backend->size) { error_setg(errp, "can't create backend with size 0"); return; } if (!fb->mem_path) { error_setg(errp, "mem-path property not set"); return; }#ifndef CONFIG_LINUX error_set... |
1 | sorecvoob(struct socket *so){struct tcpcb *tp = sototcpcb(so);DEBUG_CALL("sorecvoob");DEBUG_ARG("so = %p", so);/* * We take a guess at how much urgent data has arrived. * In most situations, when urgent data arrives, the next * read() should get all the urgent data. This guess will * be wrong however if more data arriv... |
1 | static uint32_t cmos_ioport_read(void *opaque, uint32_t addr){ RTCState *s = opaque; int ret; if ((addr & 1) == 0) { return 0xff; } else { switch(s->cmos_index) { case RTC_SECONDS: case RTC_MINUTES: case RTC_HOURS: case RTC_DAY_OF_WEEK: case RTC_DAY_OF_MONTH: case RTC_MONTH: case RTC_YEAR: ret = s->cmos_data[s->cmos_in... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.