label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
1 | static int qdev_add_one_global(QemuOpts *opts, void *opaque){ GlobalProperty *g; ObjectClass *oc; g = g_malloc0(sizeof(*g)); g->driver = qemu_opt_get(opts, "driver"); g->property = qemu_opt_get(opts, "property"); g->value = qemu_opt_get(opts, "value"); oc = object_class_by_name(g->driver); if (oc) { DeviceClass *dc = D... |
1 | void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst, const ptrdiff_t dst_pitch){ int x, y, indx; int32_t p0, p1, p2, p3, tmp0, tmp1, tmp2; int32_t b0_1, b0_2, b1_1, b1_2, b1_3, b2_1, b2_2, b2_3, b2_4, b2_5, b2_6; int32_t b3_1, b3_2, b3_3, b3_4, b3_5, b3_6, b3_7, b3_8, b3_9; ptrdiff_t pitch, back_pitch; cons... |
1 | void virtio_scsi_common_realize(DeviceState *dev, Error **errp){ VirtIODevice *vdev = VIRTIO_DEVICE(dev); VirtIOSCSICommon *s = VIRTIO_SCSI_COMMON(dev); int i; virtio_init(vdev, "virtio-scsi", VIRTIO_ID_SCSI, sizeof(VirtIOSCSIConfig)); s->cmd_vqs = g_malloc0(s->conf.num_queues * sizeof(VirtQueue *)); s->sense_size = VI... |
1 | static CharDriverState *qemu_chr_open_udp_fd(int fd){ CharDriverState *chr = NULL; NetCharDriver *s = NULL; chr = qemu_chr_alloc(); s = g_malloc0(sizeof(NetCharDriver)); s->fd = fd; s->chan = io_channel_from_socket(s->fd); s->bufcnt = 0; s->bufptr = 0; chr->opaque = s; chr->chr_write = udp_chr_write; chr->chr_update_re... |
0 | static int genh_read_packet(AVFormatContext *s, AVPacket *pkt){ AVCodecContext *codec = s->streams[0]->codec; GENHDemuxContext *c = s->priv_data; int ret; if (c->dsp_int_type == 1 && codec->codec_id == AV_CODEC_ID_ADPCM_THP && codec->channels > 1) { int i, ch; if (avio_feof(s->pb)) return AVERROR_EOF; av_new_packet(pkt... |
1 | static void balloon_page(void *addr, int deflate){#if defined(__linux__) if (!kvm_enabled() || kvm_has_sync_mmu()) madvise(addr, TARGET_PAGE_SIZE, deflate ? MADV_WILLNEED : MADV_DONTNEED);#endif} |
1 | static void test_self(void){ Coroutine *coroutine; coroutine = qemu_coroutine_create(verify_self); qemu_coroutine_enter(coroutine, &coroutine);} |
1 | static void gen_wrteei(DisasContext *ctx){#if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);#else if (unlikely(ctx->pr)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); return; } if (ctx->opcode & 0x00008000) { tcg_gen_ori_tl(cpu_msr, cpu_msr, (1 << MSR_EE)); /* Stop translation to have a... |
1 | void qemu_put_be16(QEMUFile *f, unsigned int v){ qemu_put_byte(f, v >> 8); qemu_put_byte(f, v);} |
1 | static void test_cancel(void){ WorkerTestData data[100]; int num_canceled; int i; /* Start more work items than there will be threads, to ensure * the pool is full. */ test_submit_many(); /* Start long running jobs, to ensure we can cancel some. */ for (i = 0; i < 100; i++) { data[i].n = 0; data[i].ret = -EINPROGRESS; ... |
1 | static void spr_write_tbl(DisasContext *ctx, int sprn, int gprn){ if (ctx->tb->cflags & CF_USE_ICOUNT) { gen_io_start(); } gen_helper_store_tbl(cpu_env, cpu_gpr[gprn]); if (ctx->tb->cflags & CF_USE_ICOUNT) { gen_io_end(); gen_stop_exception(ctx); }} |
1 | static void coroutine_fn commit_run(void *opaque){ CommitBlockJob *s = opaque; BlockDriverState *active = s->active; BlockDriverState *top = s->top; BlockDriverState *base = s->base; BlockDriverState *overlay_bs = NULL; int64_t sector_num, end; int ret = 0; int n = 0; void *buf; int bytes_written = 0; int64_t base_len;... |
1 | static inline long double compute_read_bwidth(void){ assert(block_mig_state.total_time != 0); return (block_mig_state.reads * BLOCK_SIZE)/ block_mig_state.total_time;} |
0 | size_t v9fs_unmarshal(struct iovec *out_sg, int out_num, size_t offset, int bswap, const char *fmt, ...){ int i; va_list ap; size_t old_offset = offset; va_start(ap, fmt); for (i = 0; fmt[i]; i++) { switch (fmt[i]) { case 'b': { uint8_t *valp = va_arg(ap, uint8_t *); offset += v9fs_unpack(valp, out_sg, out_num, offset,... |
0 | int coroutine_fn thread_pool_submit_co(ThreadPool *pool, ThreadPoolFunc *func, void *arg){ ThreadPoolCo tpc = { .co = qemu_coroutine_self(), .ret = -EINPROGRESS }; assert(qemu_in_coroutine()); thread_pool_submit_aio(pool, func, arg, thread_pool_co_cb, &tpc); qemu_coroutine_yield(); return tpc.ret;} |
0 | int qcrypto_init(Error **errp G_GNUC_UNUSED){ return 0;} |
0 | static av_cold int MPA_encode_init(AVCodecContext *avctx){ MpegAudioContext *s = avctx->priv_data; int freq = avctx->sample_rate; int bitrate = avctx->bit_rate; int channels = avctx->channels; int i, v, table; float a; if (channels <= 0 || channels > 2){ av_log(avctx, AV_LOG_ERROR, "encoding %d channel(s) is not allowe... |
0 | BlockDriverState *check_to_replace_node(const char *node_name, Error **errp){ BlockDriverState *to_replace_bs = bdrv_find_node(node_name); AioContext *aio_context; if (!to_replace_bs) { error_setg(errp, "Node name '%s' not found", node_name); return NULL; } aio_context = bdrv_get_aio_context(to_replace_bs); aio_context... |
0 | static uint32_t ecc_mem_readb(void *opaque, target_phys_addr_t addr){ printf("ECC: Unsupported read 0x" TARGET_FMT_plx " 00\n", addr); return 0;} |
0 | static inline void gen_op_mov_reg_v(int ot, int reg, TCGv t0){ switch(ot) { case OT_BYTE: if (reg < 4 X86_64_DEF( || reg >= 8 || x86_64_hregs)) { tcg_gen_deposit_tl(cpu_regs[reg], cpu_regs[reg], t0, 0, 8); } else { tcg_gen_deposit_tl(cpu_regs[reg - 4], cpu_regs[reg - 4], t0, 8, 8); } break; case OT_WORD: tcg_gen_deposi... |
0 | static int local_symlink(FsContext *fs_ctx, const char *oldpath, V9fsPath *dir_path, const char *name, FsCred *credp){ int err = -1; int serrno = 0; char *newpath; V9fsString fullname; char buffer[PATH_MAX]; v9fs_string_init(&fullname); v9fs_string_sprintf(&fullname, "%s/%s", dir_path->data, name); newpath = fullname.d... |
0 | int socket_listen(SocketAddress *addr, Error **errp){ QemuOpts *opts; int fd; opts = qemu_opts_create(&socket_optslist, NULL, 0, &error_abort); switch (addr->kind) { case SOCKET_ADDRESS_KIND_INET: inet_addr_to_opts(opts, addr->inet); fd = inet_listen_opts(opts, 0, errp); break; case SOCKET_ADDRESS_KIND_UNIX: qemu_opt_s... |
0 | static int qcow_open(BlockDriverState *bs, QDict *options, int flags, Error **errp){ BDRVQcowState *s = bs->opaque; unsigned int len, i, shift; int ret; QCowHeader header; Error *local_err = NULL; bs->file = bdrv_open_child(NULL, options, "file", bs, &child_file, false, errp); if (!bs->file) { return -EINVAL; } ret = b... |
0 | static void sigp_restart(CPUState *cs, run_on_cpu_data arg){ S390CPU *cpu = S390_CPU(cs); SigpInfo *si = arg.host_ptr; struct kvm_s390_irq irq = { .type = KVM_S390_RESTART, }; switch (s390_cpu_get_state(cpu)) { case CPU_STATE_STOPPED: /* the restart irq has to be delivered prior to any other pending irq */ cpu_synchron... |
0 | void qemu_purge_queued_packets(VLANClientState *vc){ VLANPacket *packet, *next; TAILQ_FOREACH_SAFE(packet, &vc->vlan->send_queue, entry, next) { if (packet->sender == vc) { TAILQ_REMOVE(&vc->vlan->send_queue, packet, entry); qemu_free(packet); } }} |
0 | static void mips_tlb_flush_extra (CPUState *env, int first){ /* Discard entries from env->tlb[first] onwards. */ while (env->tlb_in_use > first) { invalidate_tlb(--env->tlb_in_use, 0); }} |
0 | void ff_avg_h264_qpel8_mc32_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride){ avc_luma_midh_qrt_and_aver_dst_8w_msa(src - (2 * stride) - 2, stride, dst, stride, 8, 1);} |
0 | DeviceState *exynos4210_uart_create(target_phys_addr_t addr, int fifo_size, int channel, CharDriverState *chr, qemu_irq irq){ DeviceState *dev; SysBusDevice *bus; const char chr_name[] = "serial"; char label[ARRAY_SIZE(chr_name) + 1]; dev = qdev_create(NULL, "exynos4210.uart"); if (!chr) { if (channel >= MAX_SERIAL_POR... |
0 | static VncClientInfo *qmp_query_vnc_client(const VncState *client){ struct sockaddr_storage sa; socklen_t salen = sizeof(sa); char host[NI_MAXHOST]; char serv[NI_MAXSERV]; VncClientInfo *info; if (getpeername(client->csock, (struct sockaddr *)&sa, &salen) < 0) { return NULL; } if (getnameinfo((struct sockaddr *)&sa, sa... |
0 | static void deblocking_filter_CTB(HEVCContext *s, int x0, int y0){ uint8_t *src; int x, y, x_end, y_end, chroma; int c_tc[2], beta[2], tc[2]; uint8_t no_p[2] = { 0 }; uint8_t no_q[2] = { 0 }; int log2_ctb_size = s->sps->log2_ctb_size; int ctb_size = 1 << log2_ctb_size; int ctb = (x0 >> log2_ctb_size) + (y0 >> log2_ctb_... |
0 | static inline void mix_2f_2r_to_dolby(AC3DecodeContext *ctx){ int i; float (*output)[256] = ctx->audio_block.block_output; for (i = 0; i < 256; i++) { output[1][i] -= output[3][i]; output[2][i] += output[4][i]; } memset(output[3], 0, sizeof(output[3])); memset(output[4], 0, sizeof(output[4]));} |
0 | int ff_qsv_enc_close(AVCodecContext *avctx, QSVEncContext *q){ QSVFrame *cur; MFXVideoENCODE_Close(q->session); if (q->internal_session) MFXClose(q->internal_session); q->session = NULL; q->internal_session = NULL; cur = q->work_frames; while (cur) { q->work_frames = cur->next; av_frame_free(&cur->frame); av_freep(&cur... |
0 | static av_cold int raw_encode_init(AVCodecContext *avctx){ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); avctx->coded_frame = av_frame_alloc(); if (!avctx->coded_frame) return AVERROR(ENOMEM); avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; avctx->coded_frame->key_frame = 1; avctx->bits_per_c... |
1 | int ff_audio_mix(AudioMix *am, AudioData *src){ int use_generic = 1; int len = src->nb_samples; int i, j; /* determine whether to use the optimized function based on pointer and samples alignment in both the input and output */ if (am->has_optimized_func) { int aligned_len = FFALIGN(len, am->samples_align); if (!(src->... |
1 | static int ahci_dma_set_inactive(IDEDMA *dma){ AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma); DPRINTF(ad->port_no, "dma done\n"); /* update d2h status */ ahci_write_fis_d2h(ad, NULL); ad->dma_cb = NULL; /* maybe we still have something to process, check later */ ad->check_bh = qemu_bh_new(ahci_check_cmd_bh, ad); qem... |
1 | DriveInfo *drive_init(QemuOpts *opts, void *opaque, int *fatal_error){ const char *buf; const char *file = NULL; char devname[128]; const char *serial; const char *mediastr = ""; BlockInterfaceType type; enum { MEDIA_DISK, MEDIA_CDROM } media; int bus_id, unit_id; int cyls, heads, secs, translation; BlockDriver *drv = ... |
0 | static void mm_decode_intra(MmContext * s, int half_horiz, int half_vert, const uint8_t *buf, int buf_size){ int i, x, y; i=0; x=0; y=0; while(i<buf_size) { int run_length, color; if (buf[i] & 0x80) { run_length = 1; color = buf[i]; i++; }else{ run_length = (buf[i] & 0x7f) + 2; color = buf[i+1]; i+=2; } if (half_horiz)... |
1 | milkymist_init(QEMUMachineInitArgs *args){ 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; LM32CPU *cpu; CPULM32State *env; int kernel_size; DriveInfo *dinfo; MemoryRegio... |
1 | void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl){ static int print_prefix=1; static int count; static char line[1024], prev[1024]; static int is_atty; AVClass* avc= ptr ? *(AVClass**)ptr : NULL; if(level>av_log_level) return; line[0]=0;#undef fprintf if(print_prefix && avc) { if (avc->par... |
1 | static int bt_hci_name_req(struct bt_hci_s *hci, bdaddr_t *bdaddr){ struct bt_device_s *slave; evt_remote_name_req_complete params; int len; for (slave = hci->device.net->slave; slave; slave = slave->next) if (slave->page_scan && !bacmp(&slave->bd_addr, bdaddr)) break; if (!slave) return -ENODEV; bt_hci_event_status(hc... |
0 | int av_opt_is_set_to_default(void *obj, const AVOption *o){ int64_t i64; double d, d2; float f; AVRational q; int ret, w, h; char *str; void *dst; if (!o || !obj) return AVERROR(EINVAL); dst = ((uint8_t*)obj) + o->offset; switch (o->type) { case AV_OPT_TYPE_CONST: return 1; case AV_OPT_TYPE_FLAGS: case AV_OPT_TYPE_PIXE... |
0 | static int indeo3_decode_frame(AVCodecContext *avctx, void *data, int *data_size, unsigned char *buf, int buf_size){ Indeo3DecodeContext *s=avctx->priv_data; unsigned char *src, *dest; int y; /* no supplementary picture */ if (buf_size == 0) { return 0; } iv_decode_frame(s, buf, buf_size); if(s->frame.data[0]) avctx->r... |
0 | void ff_h261_loop_filter(MpegEncContext *s){ H261Context * h= (H261Context*)s; const int linesize = s->linesize; const int uvlinesize= s->uvlinesize; uint8_t *dest_y = s->dest[0]; uint8_t *dest_cb= s->dest[1]; uint8_t *dest_cr= s->dest[2]; if(!(IS_FIL (h->mtype))) return; s->dsp.h261_loop_filter(dest_y , linesize); s->... |
0 | static gboolean check_old_packet_regular(void *opaque){ CompareState *s = opaque; /* if have old packet we will notify checkpoint */ colo_old_packet_check(s); return TRUE;} |
0 | float64 helper_fsqrtd(CPUSPARCState *env, float64 src){ float64 ret; clear_float_exceptions(env); ret = float64_sqrt(src, &env->fp_status); check_ieee_exceptions(env); return ret;} |
0 | static int local_mknod(FsContext *ctx, const char *path, mode_t mode, dev_t dev){ return mknod(rpath(ctx, path), mode, dev);} |
0 | int ioinst_handle_msch(CPUS390XState *env, uint64_t reg1, uint32_t ipb){ int cssid, ssid, schid, m; SubchDev *sch; SCHIB *schib; uint64_t addr; int ret = -ENODEV; int cc; hwaddr len = sizeof(*schib); if (ioinst_disassemble_sch_ident(reg1, &m, &cssid, &ssid, &schid)) { program_interrupt(env, PGM_OPERAND, 2); return -EIO... |
0 | static void v9fs_readlink(void *opaque){ V9fsPDU *pdu = opaque; size_t offset = 7; V9fsString target; int32_t fid; int err = 0; V9fsFidState *fidp; pdu_unmarshal(pdu, offset, "d", &fid); trace_v9fs_readlink(pdu->tag, pdu->id, fid); fidp = get_fid(pdu, fid); if (fidp == NULL) { err = -ENOENT; goto out_nofid; } v9fs_stri... |
0 | static void gt64120_write_config(PCIDevice *d, uint32_t address, uint32_t val, int len){#ifdef TARGET_WORDS_BIGENDIAN val = bswap32(val);#endif pci_default_write_config(d, address, val, len);} |
0 | static void arm_thiswdog_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size){ arm_mptimer_state *s = (arm_mptimer_state *)opaque; int id = get_current_cpu(s); timerblock_write(&s->timerblock[id * 2 + 1], addr, value, size);} |
0 | static void rtc_save_td(QEMUFile *f, void *opaque){ RTCState *s = opaque; qemu_put_be32(f, s->irq_coalesced); qemu_put_be32(f, s->period);} |
0 | static void scsi_realize(SCSIDevice *dev, Error **errp){ SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, dev); Error *err = NULL; if (!s->qdev.conf.bs) { error_setg(errp, "drive property not set"); return; } if (!(s->features & (1 << SCSI_DISK_F_REMOVABLE)) && !bdrv_is_inserted(s->qdev.conf.bs)) { error_setg(errp, "D... |
0 | static void ahci_shutdown(AHCIQState *ahci){ QOSState *qs = ahci->parent; ahci_clean_mem(ahci); free_ahci_device(ahci->dev); g_free(ahci); qtest_shutdown(qs);} |
0 | int udp_set_remote_url(URLContext *h, const char *uri){ UDPContext *s = h->priv_data; char hostname[256]; int port; url_split(NULL, 0, hostname, sizeof(hostname), &port, NULL, 0, uri); /* set the destination address */ if (resolve_host(&s->dest_addr.sin_addr, hostname) < 0) return AVERROR_IO; s->dest_addr.sin_family = ... |
0 | int cpu_signal_handler(int host_signum, void *pinfo, void *puc){ siginfo_t *info = pinfo;#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ucontext_t *uc = puc;#else ucontext_t *uc = puc;#endif unsigned long pc; int is_write; pc = IAR_sig(uc); is_write = 0;#if 0 /* ppc 4xx case */ if (DSISR_sig(uc) & 0x00800000) ... |
0 | static void net_socket_connected(int fd, Error *err, void *opaque){ socket_connect_data *c = opaque; NetSocketState *s; char *addr_str = NULL; Error *local_error = NULL; addr_str = socket_address_to_string(c->saddr, &local_error); if (addr_str == NULL) { error_report_err(local_error); closesocket(fd); goto end; } s = n... |
0 | void OPPROTO op_decw_ECX(void){ ECX = (ECX & ~0xffff) | ((ECX - 1) & 0xffff);} |
0 | static int vnc_auth_sasl_check_access(VncState *vs){ const void *val; int err; err = sasl_getprop(vs->sasl.conn, SASL_USERNAME, &val); if (err != SASL_OK) {VNC_DEBUG("cannot query SASL username on connection %d (%s)\n", err, sasl_errstring(err, NULL, NULL));return -1; } if (val == NULL) {VNC_DEBUG("no client username w... |
0 | ssize_t nbd_send_request(QIOChannel *ioc, struct nbd_request *request){ uint8_t buf[NBD_REQUEST_SIZE]; ssize_t ret; TRACE("Sending request to server: " "{ .from = %" PRIu64", .len = %" PRIu32 ", .handle = %" PRIu64 ", .type=%" PRIu32 " }", request->from, request->len, request->handle, request->type); stl_be_p(buf, NBD_... |
1 | static void json_message_process_token(JSONLexer *lexer, QString *token, JSONTokenType type, int x, int y){ JSONMessageParser *parser = container_of(lexer, JSONMessageParser, lexer); QDict *dict; if (type == JSON_OPERATOR) { switch (qstring_get_str(token)[0]) { case '{': parser->brace_count++; break; case '}': parser->... |
1 | static bool gen_wsr_ccompare(DisasContext *dc, uint32_t sr, TCGv_i32 v){ uint32_t id = sr - CCOMPARE; bool ret = false; if (id < dc->config->nccompare) { uint32_t int_bit = 1 << dc->config->timerint[id]; TCGv_i32 tmp = tcg_const_i32(id); tcg_gen_mov_i32(cpu_SR[sr], v); tcg_gen_andi_i32(cpu_SR[INTSET], cpu_SR[INTSET], ~... |
1 | static void vnc_write_pixels_generic(VncState *vs, void *pixels1, int size){ uint8_t buf[4]; if (vs->depth == 4) { uint32_t *pixels = pixels1; int n, i; n = size >> 2; for(i = 0; i < n; i++) { vnc_convert_pixel(vs, buf, pixels[i]); vnc_write(vs, buf, vs->pix_bpp); } } else if (vs->depth == 2) { uint16_t *pixels = pixel... |
1 | static int parse_tonal(DCALbrDecoder *s, int group){ unsigned int amp[DCA_LBR_CHANNELS_TOTAL]; unsigned int phs[DCA_LBR_CHANNELS_TOTAL]; unsigned int diff, main_amp, shift; int sf, sf_idx, ch, main_ch, freq; int ch_nbits = av_ceil_log2(s->nchannels_total); // Parse subframes for this group for (sf = 0; sf < 1 << group;... |
1 | static uint64_t mv88w8618_eth_read(void *opaque, hwaddr offset, unsigned size){ mv88w8618_eth_state *s = opaque; switch (offset) { case MP_ETH_SMIR: if (s->smir & MP_ETH_SMIR_OPCODE) { switch (s->smir & MP_ETH_SMIR_ADDR) { case MP_ETH_PHY1_BMSR: return MP_PHY_BMSR_LINK | MP_PHY_BMSR_AUTONEG | MP_ETH_SMIR_RDVALID; case ... |
1 | static int make_cdt16_entry(int p1, int p2, int16_t *cdt){ int r, b, lo; b = cdt[p2]; r = cdt[p1] << 11; lo = b + r; return (lo + (lo << 16)) << 1;} |
1 | static void monitor_call_handler(Monitor *mon, const mon_cmd_t *cmd, const QDict *params){ QObject *data = NULL; cmd->mhandler.cmd_new(mon, params, &data); if (is_async_return(data)) { /* * Asynchronous commands have no initial return data but they can * generate errors. Data is returned via the async completion handle... |
1 | static inline int64_t get_image_offset(BlockDriverState *bs, uint64_t offset, bool write){ BDRVVPCState *s = bs->opaque; uint64_t bitmap_offset, block_offset; uint32_t pagetable_index, offset_in_block; pagetable_index = offset / s->block_size; offset_in_block = offset % s->block_size; if (pagetable_index >= s->max_tabl... |
1 | static void openpic_tmr_write(void *opaque, hwaddr addr, uint64_t val, unsigned len){ OpenPICState *opp = opaque; int idx; DPRINTF("%s: addr %08x <= %08x\n", __func__, addr, val); if (addr & 0xF) return; idx = (addr >> 6) & 0x3; addr = addr & 0x30; if (addr == 0x0) { /* TIFR (TFRR) */ opp->tifr = val; return; } switch ... |
1 | int load_vmstate(const char *name, Error **errp){ BlockDriverState *bs, *bs_vm_state; QEMUSnapshotInfo sn; QEMUFile *f; int ret; AioContext *aio_context; MigrationIncomingState *mis = migration_incoming_get_current(); if (!bdrv_all_can_snapshot(&bs)) { error_setg(errp, "Device '%s' is writable but does not support snap... |
1 | CharDriverState *qemu_chr_new_from_opts(QemuOpts *opts, void (*init)(struct CharDriverState *s), Error **errp){ CharDriver *cd; CharDriverState *chr; GSList *i; if (qemu_opts_id(opts) == NULL) { error_setg(errp, "chardev: no id specified"); goto err; } if (qemu_opt_get(opts, "backend") == NULL) { error_setg(errp, "char... |
1 | void ff_estimate_p_frame_motion(MpegEncContext * s, int mb_x, int mb_y){ MotionEstContext * const c= &s->me; uint8_t *pix, *ppix; int sum, mx, my, dmin; int varc; ///< the variance of the block (sum of squared (p[y][x]-average)) int vard; ///< sum of squared differences with the estimated motion vector int P[10][2]; co... |
1 | static int init_directory(BDRVVVFATState* s,const char* dirname){ bootsector_t* bootsector=(bootsector_t*)&(s->first_sectors[(s->first_sectors_number-1)*0x200]); unsigned int i; unsigned int cluster; memset(&(s->first_sectors[0]),0,0x40*0x200); /* TODO: if FAT32, this is probably wrong */ s->sectors_per_fat=0xfc; s->se... |
0 | static void filter_mb_mbaff_edgecv( H264Context *h, uint8_t *pix, int stride, int16_t bS[8], int qp[2] ) { int i; for( i = 0; i < 8; i++, pix += stride) { int index_a; int alpha; int beta; int qp_index; int bS_index = i; if( bS[bS_index] == 0 ) { continue; } qp_index = MB_FIELD ? (i >> 2) : (i & 1); index_a = qp[qp_ind... |
0 | int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int flags){ int ret; AVStream *st; ff_read_frame_flush(s); if(flags & AVSEEK_FLAG_BYTE) return seek_frame_byte(s, stream_index, timestamp, flags); if(stream_index < 0){ stream_index= av_find_default_stream_index(s); if(stream_index < 0) return -... |
0 | static const char *srt_to_ass(AVCodecContext *avctx, char *out, char *out_end, const char *in, int x1, int y1, int x2, int y2){ char c, *param, buffer[128], tmp[128]; int len, tag_close, sptr = 1, line_start = 1, an = 0, end = 0; SrtStack stack[16]; stack[0].tag[0] = 0; strcpy(stack[0].param[PARAM_SIZE], "{\\fs}"); str... |
0 | int av_metadata_set(AVMetadata **pm, const char *key, const char *value){ AVMetadata *m= *pm; AVMetadataTag *tag= av_metadata_get(m, key, NULL, AV_METADATA_MATCH_CASE); if(!m) m=*pm= av_mallocz(sizeof(*m)); if(tag){ av_free(tag->value); av_free(tag->key); *tag= m->elems[--m->count]; }else{ AVMetadataTag *tmp= av_reallo... |
0 | static void zynq_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; ObjectClass *cpu_oc; AR... |
0 | static void tcg_out_brcond(TCGContext *s, TCGMemOp ext, TCGCond c, TCGArg a, TCGArg b, bool b_const, int label){ TCGLabel *l = &s->labels[label]; intptr_t offset; bool need_cmp; if (b_const && b == 0 && (c == TCG_COND_EQ || c == TCG_COND_NE)) { need_cmp = false; } else { need_cmp = true; tcg_out_cmp(s, ext, a, b, b_con... |
0 | static target_ulong h_vio_signal(CPUState *env, sPAPREnvironment *spapr, target_ulong opcode, target_ulong *args){ target_ulong reg = args[0]; target_ulong mode = args[1]; VIOsPAPRDevice *dev = spapr_vio_find_by_reg(spapr->vio_bus, reg); VIOsPAPRDeviceInfo *info; if (!dev) { return H_PARAMETER; } info = (VIOsPAPRDevice... |
0 | static TCGArg do_constant_folding(int op, TCGArg x, TCGArg y){ TCGArg res = do_constant_folding_2(op, x, y);#if TCG_TARGET_REG_BITS == 64 if (op_bits(op) == 32) { res &= 0xffffffff; }#endif return res;} |
0 | static int64_t seek_to_sector(BDRVParallelsState *s, int64_t sector_num){ uint32_t index, offset; index = sector_num / s->tracks; offset = sector_num % s->tracks; /* not allocated */ if ((index >= s->catalog_size) || (s->catalog_bitmap[index] == 0)) return -1; return (uint64_t)s->catalog_bitmap[index] * s->off_multipli... |
0 | int load_image_targphys(const char *filename, target_phys_addr_t addr, uint64_t max_sz){ int size; size = get_image_size(filename); if (size > max_sz) { return -1; } if (size > 0) { rom_add_file_fixed(filename, addr, -1); } return size;} |
0 | static uint64_t vfio_bar_read(void *opaque, hwaddr addr, unsigned size){ VFIOBAR *bar = opaque; union { uint8_t byte; uint16_t word; uint32_t dword; uint64_t qword; } buf; uint64_t data = 0; if (pread(bar->fd, &buf, size, bar->fd_offset + addr) != size) { error_report("%s(,0x%"HWADDR_PRIx", %d) failed: %m", __func__, a... |
0 | static int l2tpv3_can_send(void *opaque){ NetL2TPV3State *s = opaque; return qemu_can_send_packet(&s->nc);} |
0 | static void extract_common_blockdev_options(QemuOpts *opts, int *bdrv_flags, const char **throttling_group, ThrottleConfig *throttle_cfg, BlockdevDetectZeroesOptions *detect_zeroes, Error **errp){ const char *discard; Error *local_error = NULL; const char *aio; if (bdrv_flags) { if (!qemu_opt_get_bool(opts, "read-only"... |
0 | static inline void tcg_out_dat_rI(TCGContext *s, int cond, int opc, TCGArg dst, TCGArg lhs, TCGArg rhs, int rhs_is_const){ /* Emit either the reg,imm or reg,reg form of a data-processing insn. * rhs must satisfy the "rI" constraint. */ if (rhs_is_const) { int rot = encode_imm(rhs); assert(rot >= 0); tcg_out_dat_imm(s, ... |
0 | static always_inline void gen_bcond (DisasContext *ctx, TCGCond cond, int ra, int32_t disp16, int mask){ int l1, l2; l1 = gen_new_label(); l2 = gen_new_label(); if (likely(ra != 31)) { if (mask) { TCGv tmp = tcg_temp_new(TCG_TYPE_I64); tcg_gen_andi_i64(tmp, cpu_ir[ra], 1); tcg_gen_brcondi_i64(cond, tmp, 0, l1); tcg_tem... |
0 | void qemu_aio_set_event_notifier(EventNotifier *notifier, EventNotifierHandler *io_read, AioFlushEventNotifierHandler *io_flush){ qemu_aio_set_fd_handler(event_notifier_get_fd(notifier), (IOHandler *)io_read, NULL, (AioFlushHandler *)io_flush, notifier);} |
0 | uint32_t HELPER(lpebr)(CPUS390XState *env, uint32_t f1, uint32_t f2){ float32 v1; float32 v2 = env->fregs[f2].d; v1 = float32_abs(v2); env->fregs[f1].d = v1; return set_cc_nz_f32(v1);} |
0 | uint64_t helper_fsel (uint64_t arg1, uint64_t arg2, uint64_t arg3){ CPU_DoubleU farg1; farg1.ll = arg1; if ((!float64_is_neg(farg1.d) || float64_is_zero(farg1.d)) && !float64_is_nan(farg1.d)) return arg2; else return arg3;} |
0 | static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed){ int dir; size_t len = 0, pktlen = 0;#ifdef DEBUG_PACKET const char *str = NULL;#endif int pid; int ret; int i; USBDevice *dev; struct ohci_td td; uint32_t addr; int flag_r; int completion; addr = ed->head & OHCI_DPTR_MASK; /* See if this TD has already be... |
0 | static int txd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { GetByteContext gb; AVFrame * const p = data; unsigned int version, w, h, d3d_format, depth, stride, flags; unsigned int y, v; uint8_t *ptr; uint32_t *pal; int ret; bytestream2_init(&gb, avpkt->data, avpkt->size); version =... |
0 | static int read_packet(AVFormatContext* ctx, AVPacket *pkt){ al_data *ad = ctx->priv_data; int error=0; const char *error_msg; ALCint nb_samples; /* Get number of samples available */ alcGetIntegerv(ad->device, ALC_CAPTURE_SAMPLES, (ALCsizei) sizeof(ALCint), &nb_samples); if (error = al_get_error(ad->device, &error_msg... |
0 | static int read_header(FFV1Context *f){ uint8_t state[CONTEXT_SIZE]; int i, j, context_count; RangeCoder * const c= &f->slice_context[0]->c; memset(state, 128, sizeof(state)); if(f->version < 2){ f->version= get_symbol(c, state, 0); f->ac= f->avctx->coder_type= get_symbol(c, state, 0); if(f->ac>1){ for(i=1; i<256; i++)... |
0 | static void avc_loopfilter_cb_or_cr_intra_edge_hor_msa(uint8_t *data_cb_or_cr, uint8_t alpha_in, uint8_t beta_in, uint32_t img_width){ v16u8 alpha, beta; v16u8 is_less_than; v8i16 p0_or_q0, q0_or_p0; v16u8 p1_or_q1_org, p0_or_q0_org, q0_or_p0_org, q1_or_p1_org; v16i8 zero = { 0 }; v16u8 p0_asub_q0, p1_asub_p0, q1_asub_... |
1 | static void gen_cli(DisasContext *ctx){ /* Cache line invalidate: privileged and treated as no-op */#if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);#else if (unlikely(ctx->pr)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); return; }#endif} |
1 | void palette8tobgr15(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette){unsigned i;for(i=0; i<num_pixels; i++)((uint16_t *)dst)[i] = bswap_16(((uint16_t *)palette)[ src[i] ]);} |
1 | static int decode_interrupt_cb(void *ctx){ return received_nb_signals > transcode_init_done;} |
1 | static int mxf_read_content_storage(void *arg, AVIOContext *pb, int tag, int size, UID uid, int64_t klv_offset){ MXFContext *mxf = arg; switch (tag) { case 0x1901: mxf->packages_count = avio_rb32(pb); mxf->packages_refs = av_calloc(mxf->packages_count, sizeof(UID)); if (!mxf->packages_refs) return AVERROR(ENOMEM); avio... |
1 | void qmp_cont(Error **errp){ Error *local_err = NULL; if (runstate_check(RUN_STATE_INMIGRATE)) { error_set(errp, QERR_MIGRATION_EXPECTED); return; } else if (runstate_check(RUN_STATE_INTERNAL_ERROR) || runstate_check(RUN_STATE_SHUTDOWN)) { error_set(errp, QERR_RESET_REQUIRED); return; } else if (runstate_check(RUN_STAT... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.