label
int64
0
1
func
stringlengths
21
96.3k
0
static void gen_compute_eflags_z(DisasContext *s, TCGv reg, bool inv){ switch (s->cc_op) { case CC_OP_DYNAMIC: gen_compute_eflags(s); /* FALLTHRU */ case CC_OP_EFLAGS: tcg_gen_shri_tl(reg, cpu_cc_src, 6); tcg_gen_andi_tl(reg, reg, 1); if (inv) { tcg_gen_xori_tl(reg, reg, 1); } break; default: { int size = (s->cc_op - C...
0
uint32_t omap_badwidth_read16(void *opaque, target_phys_addr_t addr){ uint16_t ret; OMAP_16B_REG(addr); cpu_physical_memory_read(addr, (void *) &ret, 2); return ret;}
0
void nelly_decode_block(NellyMoserDecodeContext *s, unsigned char block[NELLY_BLOCK_LEN], float audio[NELLY_SAMPLES]){ int i,j; float buf[NELLY_FILL_LEN], pows[NELLY_FILL_LEN]; float *aptr, *bptr, *pptr, val, pval; int bits[NELLY_BUF_LEN]; unsigned char v; init_get_bits(&s->gb, block, NELLY_BLOCK_LEN * 8); bptr = buf; ...
0
AioContext *qemu_get_aio_context(void){ return qemu_aio_context;}
0
void bios_linker_loader_add_checksum(GArray *linker, const char *file, void *table, void *start, unsigned size, uint8_t *checksum){ BiosLinkerLoaderEntry entry; memset(&entry, 0, sizeof entry); strncpy(entry.cksum.file, file, sizeof entry.cksum.file - 1); entry.command = cpu_to_le32(BIOS_LINKER_LOADER_COMMAND_ADD_CHECK...
0
void build_legacy_cpu_hotplug_aml(Aml *ctx, MachineState *machine, uint16_t io_base, uint16_t io_len){ Aml *dev; Aml *crs; Aml *pkg; Aml *field; Aml *method; Aml *if_ctx; Aml *else_ctx; int i, apic_idx; Aml *sb_scope = aml_scope("_SB"); uint8_t madt_tmpl[8] = {0x00, 0x08, 0x00, 0x00, 0x00, 0, 0, 0}; Aml *cpu_id = aml_a...
0
static int cirrus_bitblt_solidfill(CirrusVGAState *s, int blt_rop){ cirrus_fill_t rop_func; if (blit_is_unsafe(s, true)) { return 0; } rop_func = cirrus_fill[rop_to_index[blt_rop]][s->cirrus_blt_pixelwidth - 1]; rop_func(s, s->vga.vram_ptr + s->cirrus_blt_dstaddr, s->cirrus_blt_dstpitch, s->cirrus_blt_width, s->cirrus_...
0
void OPPROTO op_addw_EDI_T0(void){ EDI = (EDI & ~0xffff) | ((EDI + T0) & 0xffff);}
0
uint64_t helper_fdiv (uint64_t arg1, uint64_t arg2){ CPU_DoubleU farg1, farg2; farg1.ll = arg1; farg2.ll = arg2;#if USE_PRECISE_EMULATION if (unlikely(float64_is_signaling_nan(farg1.d) || float64_is_signaling_nan(farg2.d))) { /* sNaN division */ farg1.ll = fload_invalid_op_excp(POWERPC_EXCP_FP_VXSNAN); } else if (unlik...
1
void gen_intermediate_code(CPUARMState *env, TranslationBlock *tb){ ARMCPU *cpu = arm_env_get_cpu(env); CPUState *cs = CPU(cpu); DisasContext dc1, *dc = &dc1; target_ulong pc_start; target_ulong next_page_start; int num_insns; int max_insns; bool end_of_page; /* generate intermediate code */ /* The A64 decoder has its ...
1
NEON_TYPE4(s8, int8_t)NEON_TYPE4(u8, uint8_t)NEON_TYPE2(s16, int16_t)NEON_TYPE2(u16, uint16_t)NEON_TYPE1(s32, int32_t)NEON_TYPE1(u32, uint32_t)#undef NEON_TYPE4#undef NEON_TYPE2#undef NEON_TYPE1/* Copy from a uint32_t to a vector structure type. */#define NEON_UNPACK(vtype, dest, val) do { \ union { \ vtype v; \ uint32...
1
static int vmdk_create_extent(const char *filename, int64_t filesize, bool flat, bool compress, bool zeroed_grain, Error **errp){ int ret, i; BlockDriverState *bs = NULL; VMDK4Header header; Error *local_err; uint32_t tmp, magic, grains, gd_sectors, gt_size, gt_count; uint32_t *gd_buf = NULL; int gd_buf_size; ret = bdr...
1
static void ppc_prep_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; const char *boot_device = args...
1
int boot_sector_init(char *fname){ int fd, ret; size_t len = sizeof boot_sector; fd = mkstemp(fname); if (fd < 0) { fprintf(stderr, "Couldn't open \"%s\": %s", fname, strerror(errno)); return 1; } /* For Open Firmware based system, we can use a Forth script instead */ if (strcmp(qtest_get_arch(), "ppc64") == 0) { len =...
1
static int usbnet_can_receive(VLANClientState *nc){ USBNetState *s = DO_UPCAST(NICState, nc, nc)->opaque; if (is_rndis(s) && !s->rndis_state == RNDIS_DATA_INITIALIZED) { return 1; } return !s->in_len;}
1
static void virtio_device_realize(DeviceState *dev, Error **errp){ VirtIODevice *vdev = VIRTIO_DEVICE(dev); VirtioDeviceClass *vdc = VIRTIO_DEVICE_GET_CLASS(dev); Error *err = NULL; /* Devices should either use vmsd or the load/save methods */ assert(!vdc->vmsd || !vdc->load); if (vdc->realize != NULL) { vdc->realize(d...
1
int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec, int idx){ int i; AVOutputFormat *ofmt = fmt ? fmt->oformat : NULL; /* Was the payload type already specified for the RTP muxer? */ if (ofmt && ofmt->priv_class && fmt->priv_data) { int64_t payload_type; if (av_opt_get_int(fmt->priv_data, "payload_...
1
static void pit_common_class_init(ObjectClass *klass, void *data){ DeviceClass *dc = DEVICE_CLASS(klass); dc->realize = pit_common_realize; dc->vmsd = &vmstate_pit_common; dc->no_user = 1;}
1
static int filter_frame(AVFilterLink *inlink, AVFrame *in){ AVFilterContext *ctx = inlink->dst; AVFilterLink *outlink = ctx->outputs[0]; QPContext *s = ctx->priv; AVBufferRef *out_qp_table_buf; AVFrame *out; const int8_t *in_qp_table; int type, stride, ret; if (!s->qp_expr_str || ctx->is_disabled) return ff_filter_fram...
1
static int oss_init_out (HWVoiceOut *hw, struct audsettings *as){ OSSVoiceOut *oss = (OSSVoiceOut *) hw; struct oss_params req, obt; int endianness; int err; int fd; audfmt_e effective_fmt; struct audsettings obt_as; oss->fd = -1; req.fmt = aud_to_ossfmt (as->fmt, as->endianness); req.freq = as->freq; req.nchannels = a...
0
static int mov_write_source_reference_tag(AVIOContext *pb, MOVTrack *track, const char *reel_name){ int64_t pos = avio_tell(pb); avio_wb32(pb, 0); /* size */ ffio_wfourcc(pb, "name"); /* Data format */ avio_wb16(pb, strlen(reel_name)); /* string size */ avio_wb16(pb, track->language); /* langcode */ avio_write(pb, reel...
0
static void encode_mb(MpegEncContext *s, int motion_x, int motion_y){ const int mb_x= s->mb_x; const int mb_y= s->mb_y; int i;#if 0 if (s->interlaced_dct) { dct_linesize = s->linesize * 2; dct_offset = s->linesize; } else { dct_linesize = s->linesize; dct_offset = s->linesize * 8; }#endif if (s->mb_intra) { UINT8 *ptr;...
1
static int decode_subframe_fixed(FLACContext *s, int channel, int pred_order){ const int blocksize = s->blocksize; int32_t *decoded = s->decoded[channel]; int a, b, c, d, i; /* warm up samples */ for (i = 0; i < pred_order; i++) { decoded[i] = get_sbits(&s->gb, s->curr_bps); } if (decode_residuals(s, channel, pred_orde...
1
static int bitplane_decoding(uint8_t* data, int *raw_flag, VC1Context *v){ GetBitContext *gb = &v->s.gb; int imode, x, y, code, offset; uint8_t invert, *planep = data; int width, height, stride; width = v->s.mb_width; height = v->s.mb_height >> v->field_mode; stride = v->s.mb_stride; invert = get_bits1(gb); imode = get...
1
int monitor_fdset_dup_fd_remove(int dup_fd){ return monitor_fdset_dup_fd_find_remove(dup_fd, true);}
1
static int virtio_pci_load_config(void * opaque, QEMUFile *f){ VirtIOPCIProxy *proxy = opaque; int ret; ret = pci_device_load(&proxy->pci_dev, f); if (ret) { return ret; } msix_load(&proxy->pci_dev, f); if (msix_present(&proxy->pci_dev)) { qemu_get_be16s(f, &proxy->vdev->config_vector); } else { proxy->vdev->config_vec...
0
static void opt_qmax(const char *arg){ video_qmax = atoi(arg); if (video_qmax < 0 || video_qmax > 31) { fprintf(stderr, "qmax must be >= 1 and <= 31\n"); exit(1); }}
0
hadamard_func(mmx2)hadamard_func(sse2)hadamard_func(ssse3)void ff_dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx){ int mm_flags = av_get_cpu_flags();#if HAVE_INLINE_ASM int bit_depth = avctx->bits_per_raw_sample; if (mm_flags & AV_CPU_FLAG_MMX) { const int dct_algo = avctx->dct_algo; if (avctx->bits_per_raw_s...
0
static int init_opaque_surf(QSVContext *qsv){ AVQSVContext *hwctx_enc = qsv->ost->enc_ctx->hwaccel_context; mfxFrameSurface1 *surfaces; int i; qsv->nb_surfaces = hwctx_enc->nb_opaque_surfaces; qsv->opaque_surfaces_buf = av_buffer_ref(hwctx_enc->opaque_surfaces); qsv->surface_ptrs = av_mallocz_array(qsv->nb_surfaces, si...
0
static int rv20_decode_picture_header(RVDecContext *rv){ MpegEncContext *s = &rv->m; int seq, mb_pos, i; int rpr_bits;#if 0 GetBitContext gb= s->gb; for(i=0; i<64; i++){ av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&gb)); if(i%4==3) av_log(s->avctx, AV_LOG_DEBUG, " "); } av_log(s->avctx, AV_LOG_DEBUG, "\n");#endif#if...
0
int avpriv_vsnprintf(char *restrict s, size_t n, const char *restrict fmt, va_list ap){ int ret; if (n == 0) return 0; else if (n > INT_MAX) return AVERROR(EINVAL); /* we use n - 1 here because if the buffer is not big enough, the MS * runtime libraries don't add a terminating zero at the end. MSDN * recommends to prov...
0
static int qdm2_get_vlc (GetBitContext *gb, VLC *vlc, int flag, int depth){ int value; value = get_vlc2(gb, vlc->table, vlc->bits, depth); /* stage-2, 3 bits exponent escape sequence */ if (value-- == 0) value = get_bits (gb, get_bits (gb, 3) + 1); /* stage-3, optional */ if (flag) { int tmp = vlc_stage3_values[value];...
1
static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap){ MOVContext *mov = (MOVContext *) s->priv_data; ByteIOContext *pb = &s->pb; int i, err; MOV_atom_t atom = { 0, 0, 0 }; mov->fc = s; mov->parse_table = mov_default_parse_table; if(!url_is_streamed(pb)) /* .mov and .mp4 aren't streamable anyway (only ...
1
static void s390_ipl_class_init(ObjectClass *klass, void *data){ DeviceClass *dc = DEVICE_CLASS(klass); SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); k->init = s390_ipl_init; dc->props = s390_ipl_properties; dc->reset = s390_ipl_reset; dc->no_user = 1;}
0
static char *doubles2str(double *dp, int count, const char *sep){ int i; char *ap, *ap0; int component_len; if (!sep) sep = ", "; component_len = 15 + strlen(sep); ap = av_malloc(component_len * count); if (!ap) return NULL; ap0 = ap; ap[0] = '\0'; for (i = 0; i < count; i++) { unsigned l = snprintf(ap, component_len, ...
1
static int vhost_user_get_vring_base(struct vhost_dev *dev, struct vhost_vring_state *ring){ VhostUserMsg msg = { .request = VHOST_USER_GET_VRING_BASE, .flags = VHOST_USER_VERSION, .state = *ring, .size = sizeof(*ring), }; vhost_user_write(dev, &msg, NULL, 0); if (vhost_user_read(dev, &msg) < 0) { return 0; } if (msg.r...
1
static void multipath_pr_init(void){ static struct udev *udev; udev = udev_new(); mpath_lib_init(udev);}
1
static int dot_product(const int16_t *a, const int16_t *b, int length){ int i, sum = 0; for (i = 0; i < length; i++) { int64_t prod = av_clipl_int32(MUL64(a[i], b[i]) << 1); sum = av_clipl_int32(sum + prod); } return sum;}
1
static int console_init(SCLPEvent *event){ static bool console_available; SCLPConsole *scon = DO_UPCAST(SCLPConsole, event, event); if (console_available) { error_report("Multiple VT220 operator consoles are not supported"); return -1; } console_available = true; if (scon->chr) { qemu_chr_add_handlers(scon->chr, chr_ca...
1
static int vnc_worker_thread_loop(VncJobQueue *queue){ VncJob *job; VncRectEntry *entry, *tmp; VncState vs; int n_rectangles; int saved_offset; vnc_lock_queue(queue); while (QTAILQ_EMPTY(&queue->jobs) && !queue->exit) { qemu_cond_wait(&queue->cond, &queue->mutex); } /* Here job can only be NULL if queue->exit is true *...
0
AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_frame(const AVFrame *frame, int perms){ AVFilterBufferRef *samplesref = avfilter_get_audio_buffer_ref_from_arrays((uint8_t **)frame->data, frame->linesize[0], perms, frame->nb_samples, frame->format, av_frame_get_channel_layout(frame)); if (!samplesref) return NULL;...
0
static void input_linux_complete(UserCreatable *uc, Error **errp){ InputLinux *il = INPUT_LINUX(uc); uint8_t evtmap, relmap, absmap, keymap[KEY_CNT / 8]; unsigned int i; int rc, ver; if (!il->evdev) { error_setg(errp, "no input device specified"); return; } il->fd = open(il->evdev, O_RDWR); if (il->fd < 0) { error_setg...
0
int bdrv_get_dirty(BlockDriverState *bs, BdrvDirtyBitmap *bitmap, int64_t sector){ if (bitmap) { return hbitmap_get(bitmap->bitmap, sector); } else { return 0; }}
0
static void v9fs_attach(void *opaque){ V9fsPDU *pdu = opaque; V9fsState *s = pdu->s; int32_t fid, afid, n_uname; V9fsString uname, aname; V9fsFidState *fidp; size_t offset = 7; V9fsQID qid; ssize_t err; pdu_unmarshal(pdu, offset, "ddssd", &fid, &afid, &uname, &aname, &n_uname); trace_v9fs_attach(pdu->tag, pdu->id, fid,...
0
void arm_cpu_list(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...)){ int i; (*cpu_fprintf)(f, "Available CPUs:\n"); for (i = 0; arm_cpu_names[i].name; i++) { (*cpu_fprintf)(f, " %s\n", arm_cpu_names[i].name); }}
0
static void ehci_execute_complete(EHCIQueue *q){ EHCIPacket *p = QTAILQ_FIRST(&q->packets); assert(p != NULL); assert(p->qtdaddr == q->qtdaddr); assert(p->async != EHCI_ASYNC_INFLIGHT); p->async = EHCI_ASYNC_NONE; DPRINTF("execute_complete: qhaddr 0x%x, next %x, qtdaddr 0x%x, status %d\n", q->qhaddr, q->qh.next, q->qtd...
0
static void do_info_history (void){ int i; for (i = 0; i < TERM_MAX_CMDS; i++) {if (term_history[i] == NULL) break;term_printf("%d: '%s'\n", i, term_history[i]); }}
0
static void uhci_async_cancel_all(UHCIState *s){ UHCIQueue *queue; UHCIAsync *curr, *n; QTAILQ_FOREACH(queue, &s->queues, next) { QTAILQ_FOREACH_SAFE(curr, &queue->asyncs, next, n) { uhci_async_unlink(curr); uhci_async_cancel(curr); } uhci_queue_free(queue); }}
0
int ppc_get_compat_smt_threads(PowerPCCPU *cpu){ int ret = smp_threads; PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu); switch (cpu->cpu_version) { case CPU_POWERPC_LOGICAL_2_05: ret = 2; break; case CPU_POWERPC_LOGICAL_2_06: ret = 4; break; case CPU_POWERPC_LOGICAL_2_07: ret = 8; break; default: if (pcc->pcr_mask &...
0
static uint64_t fw_cfg_comb_read(void *opaque, target_phys_addr_t addr, unsigned size){ return fw_cfg_read(opaque);}
0
static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom){ MOVFragment *frag = &c->fragment; AVStream *st = NULL; MOVStreamContext *sc; MOVStts *ctts_data; uint64_t offset; int64_t dts; int data_offset = 0; unsigned entries, first_sample_flags = frag->flags; int flags, distance, i, found_keyframe = 0, err;...
0
static void DEF(put, pixels8_y2)(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h){ MOVQ_BFE(mm6); __asm__ volatile( "lea (%3, %3), %%"REG_a" \n\t" "movq (%1), %%mm0 \n\t" ".p2align 3 \n\t" "1: \n\t" "movq (%1, %3), %%mm1 \n\t" "movq (%1, %%"REG_a"),%%mm2 \n\t" PAVGBP(%%mm1, %%mm0, %%mm4, %%mm2, %%mm1,...
0
static QDict *build_qmp_error_dict(const QError *err){ QObject *obj; obj = qobject_from_jsonf("{ 'error': { 'class': %s, 'desc': %p } }", ErrorClass_lookup[err->err_class], qerror_human(err)); return qobject_to_qdict(obj);}
0
static void gd_update_caption(GtkDisplayState *s){ const char *status = ""; gchar *title; if (!runstate_is_running()) { status = " [Stopped]"; } if (qemu_name) { title = g_strdup_printf("QEMU (%s)%s", qemu_name, status); } else { title = g_strdup_printf("QEMU%s", status); } gtk_window_set_title(GTK_WINDOW(s->window), t...
0
void css_adapter_interrupt(uint8_t isc){ S390CPU *cpu = s390_cpu_addr2state(0); uint32_t io_int_word = (isc << 27) | IO_INT_WORD_AI; trace_css_adapter_interrupt(isc); s390_io_interrupt(cpu, 0, 0, 0, io_int_word);}
0
void tb_check_watchpoint(CPUState *cpu){ TranslationBlock *tb; tb = tb_find_pc(cpu->mem_io_pc); if (!tb) { cpu_abort(cpu, "check_watchpoint: could not find TB for pc=%p", (void *)cpu->mem_io_pc); } cpu_restore_state_from_tb(cpu, tb, cpu->mem_io_pc); tb_phys_invalidate(tb, -1);}
0
static void info_mice_iter(QObject *data, void *opaque){ QDict *mouse; Monitor *mon = opaque; mouse = qobject_to_qdict(data); monitor_printf(mon, "%c Mouse #%" PRId64 ": %s\n", (qdict_get_bool(mouse, "current") ? '*' : ' '), qdict_get_int(mouse, "index"), qdict_get_str(mouse, "name"));}
0
ram_addr_t qemu_ram_addr_from_host(void *ptr){ RAMBlock *prev; RAMBlock **prevp; RAMBlock *block; uint8_t *host = ptr;#ifdef CONFIG_KQEMU if (kqemu_phys_ram_base) { return host - kqemu_phys_ram_base; }#endif prev = NULL; prevp = &ram_blocks; block = ram_blocks; while (block && (block->host > host || block->host + block...
0
static void fdt_add_cpu_nodes(const VirtBoardInfo *vbi){ int cpu; int addr_cells = 1; /* * From Documentation/devicetree/bindings/arm/cpus.txt * On ARM v8 64-bit systems value should be set to 2, * that corresponds to the MPIDR_EL1 register size. * If MPIDR_EL1[63:32] value is equal to 0 on all CPUs * in the system, #a...
0
static void scsi_write_complete_noio(SCSIDiskReq *r, int ret){ uint32_t n; assert (r->req.aiocb == NULL); if (r->req.io_canceled) { scsi_req_cancel_complete(&r->req); goto done; } if (ret < 0) { if (scsi_handle_rw_error(r, -ret, false)) { goto done; } } n = r->qiov.size / 512; r->sector += n; r->sector_count -= n; if (...
0
iscsi_co_writev_flags(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *iov, int flags){ IscsiLun *iscsilun = bs->opaque; struct IscsiTask iTask; uint64_t lba; uint32_t num_sectors; bool fua = flags & BDRV_REQ_FUA; if (fua) { assert(iscsilun->dpofua); } if (!is_sector_request_lun_aligned(sector_nu...
0
void av_set_cpu_flags_mask(int mask){ checked = 0; flags = av_get_cpu_flags() & mask; checked = 1;}
0
static bool cmd_read_multiple(IDEState *s, uint8_t cmd){ bool lba48 = (cmd == WIN_MULTREAD_EXT); if (!s->bs || !s->mult_sectors) { ide_abort_command(s); return true; } ide_cmd_lba48_transform(s, lba48); s->req_nb_sectors = s->mult_sectors; ide_sector_read(s); return false;}
1
static uint64_t arm_ldq_ptw(CPUState *cs, hwaddr addr, bool is_secure, ARMMMUIdx mmu_idx, ARMMMUFaultInfo *fi){ ARMCPU *cpu = ARM_CPU(cs); CPUARMState *env = &cpu->env; MemTxAttrs attrs = {}; AddressSpace *as; attrs.secure = is_secure; as = arm_addressspace(cs, attrs); addr = S1_ptw_translate(env, mmu_idx, addr, attrs,...
1
static void gen_adc(TCGv t0, TCGv t1){ TCGv tmp; tcg_gen_add_i32(t0, t0, t1); tmp = load_cpu_field(CF); tcg_gen_add_i32(t0, t0, tmp); dead_tmp(tmp);}
1
static int g723_1_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt){ G723_1_Context *p = avctx->priv_data; AVFrame *frame = data; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; int dec_mode = buf[0] & 3; PPFParam ppf[SUBFRAMES]; int16_t cur_lsp[LPC_ORDER]; int16_t lpc[S...
1
static int parse_chap(struct iscsi_context *iscsi, const char *target){ QemuOptsList *list; QemuOpts *opts; const char *user = NULL; const char *password = NULL; list = qemu_find_opts("iscsi"); if (!list) { return 0; } opts = qemu_opts_find(list, target); if (opts == NULL) { opts = QTAILQ_FIRST(&list->head); if (!opts)...
1
static int nbd_handle_reply_err(uint32_t opt, uint32_t type, Error **errp){ if (!(type & (1 << 31))) { return 0; } switch (type) { case NBD_REP_ERR_UNSUP: error_setg(errp, "Unsupported option type %x", opt); break; case NBD_REP_ERR_POLICY: error_setg(errp, "Denied by server for option %x", opt); break; case NBD_REP_ERR...
1
static void pop_output_configuration(AACContext *ac) { if (ac->oc[1].status != OC_LOCKED) { if (ac->oc[0].status == OC_LOCKED) { ac->oc[1] = ac->oc[0]; ac->avctx->channels = ac->oc[1].channels; ac->avctx->channel_layout = ac->oc[1].channel_layout; }else{ ac->avctx->channels = 0; ac->avctx->channel_layout = 0; } }}
1
static int mmubooke206_get_physical_address(CPUState *env, mmu_ctx_t *ctx, target_ulong address, int rw, int access_type){ ppcmas_tlb_t *tlb; target_phys_addr_t raddr; int i, j, ret; ret = -1; raddr = (target_phys_addr_t)-1ULL; for (i = 0; i < BOOKE206_MAX_TLBN; i++) { int ways = booke206_tlb_ways(env, i); for (j = 0; ...
1
static int raw_write_scrubbed_bootsect(BlockDriverState *bs, const uint8_t *buf){ uint8_t bootsect[512]; /* scrub the dangerous signature */ memcpy(bootsect, buf, 512); memset(bootsect, 0, 4); return bdrv_write(bs->file, 0, bootsect, 1);}
1
void OPPROTO op_POWER_sllq (void){ uint32_t msk = -1; msk = msk << (T1 & 0x1FUL); if (T1 & 0x20UL) msk = ~msk; T1 &= 0x1FUL; T0 = (T0 << T1) & msk; T0 |= env->spr[SPR_MQ] & ~msk; RETURN();}
1
static void cirrus_bitblt_cputovideo_next(CirrusVGAState * s){ int copy_count; uint8_t *end_ptr; if (s->cirrus_srccounter > 0) { if (s->cirrus_blt_mode & CIRRUS_BLTMODE_PATTERNCOPY) { cirrus_bitblt_common_patterncopy(s, s->cirrus_bltbuf); the_end: s->cirrus_srccounter = 0; cirrus_bitblt_reset(s); } else { /* at least o...
1
static void fsl_imx31_realize(DeviceState *dev, Error **errp){ FslIMX31State *s = FSL_IMX31(dev); uint16_t i; Error *err = NULL; object_property_set_bool(OBJECT(&s->cpu), true, "realized", &err); if (err) { error_propagate(errp, err); return; } object_property_set_bool(OBJECT(&s->avic), true, "realized", &err); if (err...
1
static void inc_refcounts(BlockDriverState *bs, BdrvCheckResult *res, uint16_t *refcount_table, int refcount_table_size, int64_t offset, int64_t size){ BDRVQcowState *s = bs->opaque; int64_t start, last, cluster_offset; int k; if (size <= 0) return; start = start_of_cluster(s, offset); last = start_of_cluster(s, offset...
1
static int read_decoding_params(MLPDecodeContext *m, GetBitContext *gbp, unsigned int substr){ SubStream *s = &m->substream[substr]; unsigned int ch; int ret; if (s->param_presence_flags & PARAM_PRESENCE) if (get_bits1(gbp)) s->param_presence_flags = get_bits(gbp, 8); if (s->param_presence_flags & PARAM_BLOCKSIZE) if (...
1
static bool bdrv_requests_pending_all(void){ BlockDriverState *bs; QTAILQ_FOREACH(bs, &bdrv_states, device_list) { if (bdrv_requests_pending(bs)) { return true; } } return false;}
1
static void mxf_write_package(AVFormatContext *s, enum MXFMetadataSetType type, const char *package_name){ MXFContext *mxf = s->priv_data; AVIOContext *pb = s->pb; int i, track_count = s->nb_streams+1; int name_size = mxf_utf16_local_tag_length(package_name); int user_comment_count = 0; if (type == MaterialPackage) { i...
1
static void rxfilter_notify(NetClientState *nc){ QObject *event_data; VirtIONet *n = qemu_get_nic_opaque(nc); if (nc->rxfilter_notify_enabled) { if (n->netclient_name) { event_data = qobject_from_jsonf("{ 'name': %s, 'path': %s }", n->netclient_name, object_get_canonical_path(OBJECT(n->qdev))); } else { event_data = qo...
1
static void rtas_ibm_change_msi(PowerPCCPU *cpu, sPAPREnvironment *spapr, uint32_t token, uint32_t nargs, target_ulong args, uint32_t nret, target_ulong rets){ uint32_t config_addr = rtas_ld(args, 0); uint64_t buid = ((uint64_t)rtas_ld(args, 1) << 32) | rtas_ld(args, 2); unsigned int func = rtas_ld(args, 3); unsigned i...
1
static void dec_sru(DisasContext *dc){ if (dc->format == OP_FMT_RI) { LOG_DIS("srui r%d, r%d, %d\n", dc->r1, dc->r0, dc->imm5); } else { LOG_DIS("sru r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1); } if (!(dc->env->features & LM32_FEATURE_SHIFT)) { if (dc->format == OP_FMT_RI) { /* TODO: check r1 == 1 during runtime */ } el...
1
int ff_vbv_update(MpegEncContext *s, int frame_size){ RateControlContext *rcc = &s->rc_context; const double fps = get_fps(s->avctx); const int buffer_size = s->avctx->rc_buffer_size; const double min_rate = s->avctx->rc_min_rate / fps; const double max_rate = s->avctx->rc_max_rate / fps; av_dlog(s, "%d %f %d %f %f\n",...
1
void dpy_gl_scanout(QemuConsole *con, uint32_t backing_id, bool backing_y_0_top, uint32_t x, uint32_t y, uint32_t width, uint32_t height){ assert(con->gl); con->gl->ops->dpy_gl_scanout(con->gl, backing_id, backing_y_0_top, x, y, width, height);}
1
void parse_options(int argc, char **argv, const OptionDef *options, void (* parse_arg_function)(const char*)){ const char *opt, *arg; int optindex, handleoptions=1; const OptionDef *po; /* parse options */ optindex = 1; while (optindex < argc) { opt = argv[optindex++]; if (handleoptions && opt[0] == '-' && opt[1] != '\...
1
static int scan_mmco_reset(AVCodecParserContext *s, GetBitContext *gb, void *logctx){ H264PredWeightTable pwt; int slice_type_nos = s->pict_type & 3; H264ParseContext *p = s->priv_data; int list_count, ref_count[2]; if (p->ps.pps->redundant_pic_cnt_present) get_ue_golomb(gb); // redundant_pic_count if (slice_type_nos =...
1
static int transcode(AVFormatContext **output_files, int nb_output_files, AVFormatContext **input_files, int nb_input_files, AVStreamMap *stream_maps, int nb_stream_maps){ int ret = 0, i, j, k, n, nb_istreams = 0, nb_ostreams = 0, step; AVFormatContext *is, *os; AVCodecContext *codec, *icodec; AVOutputStream *ost, **os...
1
static int xan_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt){ XanContext *s = avctx->priv_data; int ftype; int ret; s->pic.reference = 1; s->pic.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; if ((ret = avctx->reget_buffer(avctx, &s->pic)))...
1
static void decode_rowskip(uint8_t* plane, int width, int height, int stride, VC9Context *v){ int x, y; GetBitContext *gb = &v->s.gb; for (y=0; y<height; y++){ if (!get_bits(gb, 1)) //rowskip memset(plane, 0, width); else for (x=0; x<width; x++) plane[x] = get_bits(gb, 1); plane += stride; }}
1
vu_queue_notify(VuDev *dev, VuVirtq *vq){ if (unlikely(dev->broken)) { return; } if (!vring_notify(dev, vq)) { DPRINT("skipped notify...\n"); return; } if (eventfd_write(vq->call_fd, 1) < 0) { vu_panic(dev, "Error writing eventfd: %s", strerror(errno)); }}
1
int ff_rv34_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt){ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; RV34DecContext *r = avctx->priv_data; MpegEncContext *s = &r->s; AVFrame *pict = data; SliceInfo si; int i; int slice_count; const uint8_t *slices_hdr = NULL; int l...
1
static int qemu_chr_open_win_stdio(QemuOpts *opts, CharDriverState **_chr){ CharDriverState *chr; WinStdioCharState *stdio; DWORD dwMode; int is_console = 0; if (stdio_nb_clients >= STDIO_MAX_CLIENTS || ((display_type != DT_NOGRAPHIC) && (stdio_nb_clients != 0))) { return -EIO; } chr = g_malloc0(sizeof(CharDriverState)...
0
int ff_sws_alphablendaway(SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[]){ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->srcFormat); int nb_components = desc->nb_components; int plane, x, y; int plane_count = isGray(c->srcFormat) ? 1 : 3; in...
0
int ff_mov_read_esds(AVFormatContext *fc, AVIOContext *pb){ AVStream *st; int tag; if (fc->nb_streams < 1) return 0; st = fc->streams[fc->nb_streams-1]; avio_rb32(pb); /* version + flags */ ff_mp4_read_descr(fc, pb, &tag); if (tag == MP4ESDescrTag) { ff_mp4_parse_es_descr(pb, NULL); } else avio_rb16(pb); /* ID */ ff_mp...
0
void ff_atrac_iqmf(float *inlo, float *inhi, unsigned int nIn, float *pOut, float *delayBuf, float *temp){ int i, j; float *p1, *p3; memcpy(temp, delayBuf, 46*sizeof(float)); p3 = temp + 46; /* loop1 */ for(i=0; i<nIn; i+=2){ p3[2*i+0] = inlo[i ] + inhi[i ]; p3[2*i+1] = inlo[i ] - inhi[i ]; p3[2*i+2] = inlo[i+1] + inhi...
1
static void uc32_cpu_initfn(Object *obj){ CPUState *cs = CPU(obj); UniCore32CPU *cpu = UNICORE32_CPU(obj); CPUUniCore32State *env = &cpu->env; static bool inited; cs->env_ptr = env; cpu_exec_init(cs, &error_abort);#ifdef CONFIG_USER_ONLY env->uncached_asr = ASR_MODE_USER; env->regs[31] = 0;#else env->uncached_asr = ASR...
1
static int read_rle_sgi(unsigned char* out_buf, const uint8_t *in_buf, const uint8_t *in_end, SgiState* s){ uint8_t *dest_row; unsigned int len = s->height * s->depth * 4; const uint8_t *start_table = in_buf; unsigned int y, z; unsigned int start_offset; /* size of RLE offset and length tables */ if(len * 2 > in_end - ...
1
static inline void RENAME(rgb15to16)(const uint8_t *src,uint8_t *dst,long src_size){ register const uint8_t* s=src; register uint8_t* d=dst; register const uint8_t *end; const uint8_t *mm_end; end = s + src_size;#ifdef HAVE_MMX __asm __volatile(PREFETCH"%0"::"m"(*s)); __asm __volatile("movq%0, %%mm4"::"m"(mask15s)); mm...
1
int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options){ AVFormatContext *s = *ps; int ret = 0; AVFormatParameters ap = { 0 }; AVDictionary *tmp = NULL; if (!s && !(s = avformat_alloc_context())) return AVERROR(ENOMEM); if (fmt) s->iformat = fmt; if (options) av_d...
1
void vp8_mc_luma(VP8Context *s, VP8ThreadData *td, uint8_t *dst, ThreadFrame *ref, const VP56mv *mv, int x_off, int y_off, int block_w, int block_h, int width, int height, int linesize, vp8_mc_func mc_func[3][3]){ uint8_t *src = ref->f->data[0]; if (AV_RN32A(mv)) { int mx = (mv->x << 1)&7, mx_idx = subpel_idx[0][mx]; i...
1
static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset, uint32_t value){ SyborgVirtIOProxy *s = opaque; VirtIODevice *vdev = s->vdev; DPRINTF("writel 0x%x = 0x%x\n", (int)offset, value); if (offset >= SYBORG_VIRTIO_CONFIG) { return virtio_config_writel(vdev, offset - SYBORG_VIRTIO_CONFIG, value); } sw...