label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
1 | static void encode_quant_matrix(VC2EncContext *s){ int level, custom_quant_matrix = 0; if (s->wavelet_depth > 4 || s->quant_matrix != VC2_QM_DEF) custom_quant_matrix = 1; put_bits(&s->pb, 1, custom_quant_matrix); if (custom_quant_matrix) { init_custom_qm(s); put_vc2_ue_uint(&s->pb, s->quant[0][0]); for (level = 0; leve... |
1 | static void fix_bitshift(ShortenContext *s, int32_t *buffer){ int i; if (s->bitshift != 0) for (i = 0; i < s->blocksize; i++) buffer[s->nwrap + i] <<= s->bitshift;} |
1 | static void wav_capture_destroy (void *opaque){ WAVState *wav = opaque; AUD_del_capture (wav->cap, wav);} |
1 | static uint32_t m5206_mbar_readw(void *opaque, target_phys_addr_t offset){ m5206_mbar_state *s = (m5206_mbar_state *)opaque; int width; offset &= 0x3ff; if (offset > 0x200) { hw_error("Bad MBAR read offset 0x%x", (int)offset); } width = m5206_mbar_width[offset >> 2]; if (width > 2) { uint32_t val; val = m5206_mbar_read... |
1 | uint32_t pci_data_read(PCIBus *s, uint32_t addr, int len){ PCIDevice *pci_dev = pci_dev_find_by_addr(s, addr); uint32_t config_addr = addr & (PCI_CONFIG_SPACE_SIZE - 1); uint32_t val; assert(len == 1 || len == 2 || len == 4); if (!pci_dev) { return ~0x0; } val = pci_dev->config_read(pci_dev, config_addr, len); PCI_DPRI... |
1 | static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ MpegEncContext * const s = &h->s; AVCodecContext * const avctx= s->avctx; int buf_index=0; H264Context *hx; ///< thread context int context_count = 0; int next_avc= h->is_avc ? 0 : buf_size; h->max_contexts = (HAVE_THREADS && (s->avctx->acti... |
0 | static int nvdec_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size){ NVDECContext *ctx = avctx->internal->hwaccel_priv_data; void *tmp; tmp = av_fast_realloc(ctx->slice_offsets, &ctx->slice_offsets_allocated, (ctx->nb_slices + 1) * sizeof(*ctx->slice_offsets)); if (!tmp) return AVERROR(ENOMEM... |
0 | static void omap2_inth_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size){ struct omap_intr_handler_s *s = (struct omap_intr_handler_s *) opaque; int offset = addr; int bank_no, line_no; struct omap_intr_handler_bank_s *bank = NULL; if ((offset & 0xf80) == 0x80) { bank_no = (offset & 0x60) >> 5... |
0 | static bool pte32_match(target_ulong pte0, target_ulong pte1, bool secondary, target_ulong ptem){ return (pte0 & HPTE32_V_VALID) && (secondary == !!(pte0 & HPTE32_V_SECONDARY)) && HPTE32_V_COMPARE(pte0, ptem);} |
0 | static int hpet_init(SysBusDevice *dev){ HPETState *s = FROM_SYSBUS(HPETState, dev); int i, iomemtype; HPETTimer *timer; if (hpet_cfg.count == UINT8_MAX) { /* first instance */ hpet_cfg.count = 0; } if (hpet_cfg.count == 8) { fprintf(stderr, "Only 8 instances of HPET is allowed\n"); return -1; } s->hpet_id = hpet_cfg.c... |
0 | static int send_png_rect(VncState *vs, int x, int y, int w, int h, QDict *palette){ png_byte color_type; png_structp png_ptr; png_infop info_ptr; png_colorp png_palette = NULL; size_t offset; int level = tight_conf[vs->tight_compression].raw_zlib_level; uint8_t *buf; int dy; png_ptr = png_create_write_struct_2(PNG_LIBP... |
0 | START_TEST(qdict_put_exists_test){ int value; const char *key = "exists"; qdict_put(tests_dict, key, qint_from_int(1)); qdict_put(tests_dict, key, qint_from_int(2)); value = qdict_get_int(tests_dict, key); fail_unless(value == 2); fail_unless(qdict_size(tests_dict) == 1);} |
0 | static void gt64120_writel (void *opaque, target_phys_addr_t addr, uint64_t val, unsigned size){ GT64120State *s = opaque; PCIHostState *phb = PCI_HOST_BRIDGE(s); uint32_t saddr; if (!(s->regs[GT_CPU] & 0x00001000)) val = bswap32(val); saddr = (addr & 0xfff) >> 2; switch (saddr) { /* CPU Configuration */ case GT_CPU: s... |
0 | static void tcg_constant_folding(TCGContext *s){ int oi, oi_next, nb_temps, nb_globals; /* Array VALS has an element for each temp. If this temp holds a constant then its value is kept in VALS' element. If this temp is a copy of other ones then the other copies are available through the doubly linked circular list. */ ... |
0 | static inline void qpel_motion(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], qpel_mc_func (*qpix_op)[16], int motion_x, int motion_y, int h){ uint8_t *ptr_y, *ptr_cb, *ptr_cr; int dxy, uvdx... |
0 | void do_m68k_simcall(CPUM68KState *env, int nr){ uint32_t *args; args = (uint32_t *)(env->aregs[7] + 4); switch (nr) { case SYS_EXIT: exit(ARG(0)); case SYS_READ: check_err(env, read(ARG(0), (void *)ARG(1), ARG(2))); break; case SYS_WRITE: check_err(env, write(ARG(0), (void *)ARG(1), ARG(2))); break; case SYS_OPEN: che... |
0 | static void do_change(const char *device, const char *target, const char *fmt){ if (strcmp(device, "vnc") == 0) {do_change_vnc(target); } else {do_change_block(device, target, fmt); }} |
0 | aio_ctx_dispatch(GSource *source, GSourceFunc callback, gpointer user_data){ AioContext *ctx = (AioContext *) source; assert(callback == NULL); aio_dispatch(ctx, true); return true;} |
0 | S390PCIBusDevice *s390_pci_find_dev_by_fid(uint32_t fid){ S390PCIBusDevice *pbdev; int i; S390pciState *s = s390_get_phb(); for (i = 0; i < PCI_SLOT_MAX; i++) { pbdev = s->pbdev[i]; if (pbdev && pbdev->fid == fid) { return pbdev; } } return NULL;} |
0 | int qcrypto_pbkdf2_count_iters(QCryptoHashAlgorithm hash, const uint8_t *key, size_t nkey, const uint8_t *salt, size_t nsalt, Error **errp){ uint8_t out[32]; long long int iterations = (1 << 15); unsigned long long delta_ms, start_ms, end_ms; while (1) { if (qcrypto_pbkdf2_get_thread_cpu(&start_ms, errp) < 0) { return ... |
0 | bool write_cpustate_to_list(ARMCPU *cpu){ /* Write the coprocessor state from cpu->env to the (index,value) list. */ int i; bool ok = true; for (i = 0; i < cpu->cpreg_array_len; i++) { uint32_t regidx = kvm_to_cpreg_id(cpu->cpreg_indexes[i]); const ARMCPRegInfo *ri; ri = get_arm_cp_reginfo(cpu->cp_regs, regidx); if (!r... |
0 | void *qemu_malloc(size_t size){ return malloc(size);} |
0 | static void intra_predict_plane_16x16_msa(uint8_t *src, int32_t stride){ uint8_t lpcnt; int32_t res0, res1, res2, res3; uint64_t load0, load1; v16i8 shf_mask = { 7, 8, 6, 9, 5, 10, 4, 11, 3, 12, 2, 13, 1, 14, 0, 15 }; v8i16 short_multiplier = { 1, 2, 3, 4, 5, 6, 7, 8 }; v4i32 int_multiplier = { 0, 1, 2, 3 }; v16u8 src_... |
0 | static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame){ int (*filter_frame)(AVFilterLink *, AVFrame *); AVFilterContext *dstctx = link->dst; AVFilterPad *dst = link->dstpad; AVFrame *out = NULL; int ret; AVFilterCommand *cmd= link->dst->command_queue; int64_t pts; if (link->closed) { av_frame_free(&frame... |
0 | static void predict_plane(SnowContext *s, DWTELEM *buf, int plane_index, int add){ Plane *p= &s->plane[plane_index]; const int mb_w= s->mb_band.width; const int mb_h= s->mb_band.height; const int mb_stride= s->mb_band.stride; int x, y, mb_x, mb_y; int scale = plane_index ? s->mv_scale : 2*s->mv_scale; int block_w = pla... |
1 | static void rocker_test_dma_ctrl(Rocker *r, uint32_t val){ PCIDevice *dev = PCI_DEVICE(r); char *buf; int i; buf = g_malloc(r->test_dma_size); if (!buf) { DPRINTF("test dma buffer alloc failed"); return; } switch (val) { case ROCKER_TEST_DMA_CTRL_CLEAR: memset(buf, 0, r->test_dma_size); break; case ROCKER_TEST_DMA_CTRL... |
1 | xilinx_pcie_init(MemoryRegion *sys_mem, uint32_t bus_nr, hwaddr cfg_base, uint64_t cfg_size, hwaddr mmio_base, uint64_t mmio_size, qemu_irq irq, bool link_up){ DeviceState *dev; MemoryRegion *cfg, *mmio; dev = qdev_create(NULL, TYPE_XILINX_PCIE_HOST); qdev_prop_set_uint32(dev, "bus_nr", bus_nr); qdev_prop_set_uint64(de... |
1 | long do_sigreturn(CPUMIPSState *regs){ struct sigframe *frame; abi_ulong frame_addr; sigset_t blocked; target_sigset_t target_set; int i;#if defined(DEBUG_SIGNAL) fprintf(stderr, "do_sigreturn\n");#endif frame_addr = regs->active_tc.gpr[29]; if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1)) goto badframe; for(i... |
1 | static void pmac_dma_read(BlockBackend *blk, int64_t offset, unsigned int bytes, void (*cb)(void *opaque, int ret), void *opaque){ DBDMA_io *io = opaque; MACIOIDEState *m = io->opaque; IDEState *s = idebus_active_if(&m->bus); dma_addr_t dma_addr, dma_len; void *mem; int64_t sector_num; int nsector; uint64_t align = BDR... |
1 | static void sbr_qmf_analysis(AVFixedDSPContext *dsp, FFTContext *mdct,#elsestatic void sbr_qmf_analysis(AVFloatDSPContext *dsp, FFTContext *mdct,#endif /* USE_FIXED */ SBRDSPContext *sbrdsp, const INTFLOAT *in, INTFLOAT *x, INTFLOAT z[320], INTFLOAT W[2][32][32][2], int buf_idx){ int i; int j; memcpy(x , x+1024, (320-3... |
1 | static CPUArchState *find_cpu(uint32_t thread_id){ CPUState *cpu; cpu = qemu_get_cpu(thread_id); if (cpu == NULL) { return NULL; } return cpu->env_ptr;} |
1 | static void find_block_motion(DeshakeContext *deshake, uint8_t *src1, uint8_t *src2, int cx, int cy, int stride, MotionVector *mv){ int x, y; int diff; int smallest = INT_MAX; int tmp, tmp2; #define CMP(i, j) deshake->c.sad[0](deshake, src1 + cy * stride + cx, \ src2 + (j) * stride + (i), stride, \ deshake->blocksize) ... |
1 | static void replication_close(BlockDriverState *bs){ BDRVReplicationState *s = bs->opaque; if (s->replication_state == BLOCK_REPLICATION_RUNNING) { replication_stop(s->rs, false, NULL); if (s->mode == REPLICATION_MODE_SECONDARY) { g_free(s->top_id); replication_remove(s->rs); |
1 | static int kvm_irqchip_create(KVMState *s){ QemuOptsList *list = qemu_find_opts("machine"); int ret; if (QTAILQ_EMPTY(&list->head) || !qemu_opt_get_bool(QTAILQ_FIRST(&list->head), "kernel_irqchip", true) || !kvm_check_extension(s, KVM_CAP_IRQCHIP)) { return 0; } ret = kvm_vm_ioctl(s, KVM_CREATE_IRQCHIP); if (ret < 0) {... |
1 | uint32_t qpci_io_readl(QPCIDevice *dev, void *data){ uintptr_t addr = (uintptr_t)data; if (addr < QPCI_PIO_LIMIT) { return dev->bus->pio_readl(dev->bus, addr); } else { uint32_t val; dev->bus->memread(dev->bus, addr, &val, sizeof(val)); return le32_to_cpu(val); }} |
1 | static void hid_keyboard_process_keycode(HIDState *hs){ uint8_t hid_code, index, key; int i, keycode, slot; if (hs->n == 0) { return; slot = hs->head & QUEUE_MASK; QUEUE_INCR(hs->head); hs->n--; keycode = hs->kbd.keycodes[slot]; key = keycode & 0x7f; index = key | ((hs->kbd.modifiers & (1 << 8)) >> 1); hid_code = hid_u... |
0 | static int nvdec_vc1_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size){ VC1Context *v = avctx->priv_data; MpegEncContext *s = &v->s; NVDECContext *ctx = avctx->internal->hwaccel_priv_data; CUVIDPICPARAMS *pp = &ctx->pic_params; FrameDecodeData *fdd; NVDECFrame *cf; AVFrame *cur_frame = s->current... |
0 | static int frame_thread_init(AVCodecContext *avctx){ int thread_count = avctx->thread_count; AVCodec *codec = avctx->codec; AVCodecContext *src = avctx; FrameThreadContext *fctx; int i, err = 0; if (!thread_count) { int nb_cpus = get_logical_cpus(avctx); // use number of cores + 1 as thread count if there is motre than... |
1 | static inline void gen_ins(DisasContext *s, TCGMemOp ot){ if (s->base.tb->cflags & CF_USE_ICOUNT) { gen_io_start(); } gen_string_movl_A0_EDI(s); /* Note: we must do this dummy write first to be restartable in case of page fault. */ tcg_gen_movi_tl(cpu_T0, 0); gen_op_st_v(s, ot, cpu_T0, cpu_A0); tcg_gen_trunc_tl_i32(cpu... |
1 | static void qht_bucket_reset__locked(struct qht_bucket *head){ struct qht_bucket *b = head; int i; seqlock_write_begin(&head->sequence); do { for (i = 0; i < QHT_BUCKET_ENTRIES; i++) { if (b->pointers[i] == NULL) { goto done; } b->hashes[i] = 0; atomic_set(&b->pointers[i], NULL); } b = b->next; } while (b); done: seqlo... |
1 | static int read_seek(AVFormatContext *s, int stream_index, int64_t ts, int flags){ WtvContext *wtv = s->priv_data; AVIOContext *pb = wtv->pb; AVStream *st = s->streams[0]; int64_t ts_relative; int i; if ((flags & AVSEEK_FLAG_FRAME) || (flags & AVSEEK_FLAG_BYTE)) return AVERROR(ENOSYS); /* timestamp adjustment is requir... |
0 | static void mov_parse_stsd_audio(MOVContext *c, AVIOContext *pb, AVStream *st, MOVStreamContext *sc){ int bits_per_sample, flags; uint16_t version = avio_rb16(pb); AVDictionaryEntry *compatible_brands = av_dict_get(c->fc->metadata, "compatible_brands", NULL, AV_DICT_MATCH_CASE); avio_rb16(pb); /* revision level */ avio... |
1 | iscsi_aio_ioctl_cb(struct iscsi_context *iscsi, int status, void *command_data, void *opaque){ IscsiAIOCB *acb = opaque; if (acb->canceled) { qemu_aio_release(acb); return; } acb->status = 0; if (status < 0) { error_report("Failed to ioctl(SG_IO) to iSCSI lun. %s", iscsi_get_error(iscsi)); acb->status = -EIO; } acb->io... |
1 | static int mpeg_decode_slice(MpegEncContext *s, int mb_y, const uint8_t **buf, int buf_size){ AVCodecContext *avctx = s->avctx; const int lowres = s->avctx->lowres; const int field_pic = s->picture_structure != PICT_FRAME; int ret; s->resync_mb_x = s->resync_mb_y = -1; av_assert0(mb_y < s->mb_height); init_get_bits(&s-... |
1 | static int poll_filters(void){ AVFilterBufferRef *picref; AVFrame *filtered_frame = NULL; int i, ret, ret_all; unsigned nb_success, nb_eof; int64_t frame_pts; while (1) { /* Reap all buffers present in the buffer sinks */ for (i = 0; i < nb_output_streams; i++) { OutputStream *ost = output_streams[i]; OutputFile *of = ... |
1 | static int parse_hex32(DeviceState *dev, Property *prop, const char *str){ uint32_t *ptr = qdev_get_prop_ptr(dev, prop); if (sscanf(str, "%" PRIx32, ptr) != 1) return -EINVAL; return 0;} |
1 | void helper_retry(CPUSPARCState *env){ trap_state *tsptr = cpu_tsptr(env); env->pc = tsptr->tpc; env->npc = tsptr->tnpc; cpu_put_ccr(env, tsptr->tstate >> 32); env->asi = (tsptr->tstate >> 24) & 0xff; cpu_change_pstate(env, (tsptr->tstate >> 8) & 0xf3f); cpu_put_cwp64(env, tsptr->tstate & 0xff); if (cpu_has_hypervisor(... |
1 | static int unpack_superblocks(Vp3DecodeContext *s, GetBitContext *gb){ int superblock_starts[3] = { 0, s->u_superblock_start, s->v_superblock_start }; int bit = 0; int current_superblock = 0; int current_run = 0; int num_partial_superblocks = 0; int i, j; int current_fragment; int plane; if (s->keyframe) { memset(s->su... |
1 | static av_cold int mov_text_encode_init(AVCodecContext *avctx){ /* * For now, we'll use a fixed default style. When we add styling * support, this will be generated from the ASS style. */ static const uint8_t text_sample_entry[] = { 0x00, 0x00, 0x00, 0x00, // uint32_t displayFlags 0x01, // int8_t horizontal-justificati... |
1 | static ssize_t eth_rx(NetClientState *nc, const uint8_t *buf, size_t size){ struct xlx_ethlite *s = qemu_get_nic_opaque(nc); unsigned int rxbase = s->rxbuf * (0x800 / 4); /* DA filter. */ if (!(buf[0] & 0x80) && memcmp(&s->conf.macaddr.a[0], buf, 6)) return size; if (s->regs[rxbase + R_RX_CTRL0] & CTRL_S) { D(qemu_log(... |
1 | static void init_proc_970MP (CPUPPCState *env){ gen_spr_ne_601(env); gen_spr_7xx(env); /* Time base */ gen_tbl(env); /* Hardware implementation registers */ /* XXX : not implemented */ spr_register(env, SPR_HID0, "HID0", SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, &spr_write_clear, 0x60000000); /* XXX : not implemen... |
1 | void ff_h264_direct_ref_list_init(const H264Context *const h, H264SliceContext *sl){ H264Ref *const ref1 = &sl->ref_list[1][0]; H264Picture *const cur = h->cur_pic_ptr; int list, j, field; int sidx = (h->picture_structure & 1) ^ 1; int ref1sidx = (ref1->reference & 1) ^ 1; for (list = 0; list < sl->list_count; list++) ... |
1 | static coroutine_fn int qcow2_co_write_zeroes(BlockDriverState *bs, int64_t sector_num, int nb_sectors, BdrvRequestFlags flags){ int ret; BDRVQcow2State *s = bs->opaque; int head = sector_num % s->cluster_sectors; int tail = (sector_num + nb_sectors) % s->cluster_sectors; trace_qcow2_write_zeroes_start_req(qemu_corouti... |
1 | static int read_packet(AVFormatContext *s1, AVPacket *pkt){ VideoDemuxData *s = s1->priv_data; char filename[1024]; int i; int size[3]={0}, ret[3]={0}; AVIOContext *f[3]; AVCodecContext *codec= s1->streams[0]->codec; if (!s->is_pipe) { /* loop over input */ if (s->loop && s->img_number > s->img_last) { s->img_number = ... |
0 | static void fill_float_array(AVLFG *lfg, float *a, int len){ int i; double bmg[2], stddev = 10.0, mean = 0.0; for (i = 0; i < len; i += 2) { av_bmg_get(lfg, bmg); a[i] = bmg[0] * stddev + mean; a[i + 1] = bmg[1] * stddev + mean; }} |
0 | static void ff_h264_idct8_add_mmx(uint8_t *dst, int16_t *block, int stride){ int i; DECLARE_ALIGNED(8, int16_t, b2)[64]; block[0] += 32; for(i=0; i<2; i++){ DECLARE_ALIGNED(8, uint64_t, tmp); h264_idct8_1d(block+4*i); __asm__ volatile( "movq %%mm7, %0 \n\t" TRANSPOSE4( %%mm0, %%mm2, %%mm4, %%mm6, %%mm7 ) "movq %%mm0, 8... |
1 | void visit_type_uint32(Visitor *v, uint32_t *obj, const char *name, Error **errp){ int64_t value; if (!error_is_set(errp)) { if (v->type_uint32) { v->type_uint32(v, obj, name, errp); } else { value = *obj; v->type_int(v, &value, name, errp); if (value < 0 || value > UINT32_MAX) { error_set(errp, QERR_INVALID_PARAMETER_... |
1 | static int RENAME(dct_quantize)(MpegEncContext *s, DCTELEM *block, int n, int qscale){ int i, level, last_non_zero_p1, q; const UINT16 *qmat; static __align8 INT16 temp_block[64]; int minLevel, maxLevel; if(s->avctx!=NULL && s->avctx->codec->id==CODEC_ID_MPEG4){/* mpeg4 */ minLevel= -2048;maxLevel= 2047; }else if(s->ou... |
1 | static int mxf_write_packet(AVFormatContext *s, AVPacket *pkt){ MXFContext *mxf = s->priv_data; AVIOContext *pb = s->pb; AVStream *st = s->streams[pkt->stream_index]; MXFStreamContext *sc = st->priv_data; MXFIndexEntry ie = {0}; int err; if (!mxf->edit_unit_byte_count && !(mxf->edit_units_count % EDIT_UNITS_PER_BODY)) ... |
1 | static void set_up_watchdog (m48t59_t *NVRAM, uint8_t value){ uint64_t interval; /* in 1/16 seconds */ if (NVRAM->wd_timer != NULL) { qemu_del_timer(NVRAM->wd_timer);NVRAM->wd_timer = NULL; } NVRAM->buffer[0x1FF0] &= ~0x80; if (value != 0) {interval = (1 << (2 * (value & 0x03))) * ((value >> 2) & 0x1F);qemu_mod_timer(N... |
1 | static float get_band_cost_SQUAD_mips(struct AACEncContext *s, PutBitContext *pb, const float *in, const float *scaled, int size, int scale_idx, int cb, const float lambda, const float uplim, int *bits){ const float Q34 = ff_aac_pow34sf_tab[POW_SF2_ZERO - scale_idx + SCALE_ONE_POS - SCALE_DIV_512]; const float IQ = ff_... |
1 | static target_ulong h_register_logical_lan(CPUPPCState *env, sPAPREnvironment *spapr, target_ulong opcode, target_ulong *args){ target_ulong reg = args[0]; target_ulong buf_list = args[1]; target_ulong rec_queue = args[2]; target_ulong filter_list = args[3]; VIOsPAPRDevice *sdev = spapr_vio_find_by_reg(spapr->vio_bus, ... |
1 | av_cold void ff_psy_preprocess_end(struct FFPsyPreprocessContext *ctx){ int i; ff_iir_filter_free_coeffs(ctx->fcoeffs); if (ctx->fstate) for (i = 0; i < ctx->avctx->channels; i++) ff_iir_filter_free_state(ctx->fstate[i]); av_freep(&ctx->fstate);} |
1 | static int bdrv_open_common(BlockDriverState *bs, const char *filename, int flags, BlockDriver *drv){ int ret, open_flags; assert(drv != NULL); bs->file = NULL; bs->total_sectors = 0; bs->is_temporary = 0; bs->encrypted = 0; bs->valid_key = 0; bs->open_flags = flags; /* buffer_alignment defaulted to 512, drivers can ch... |
0 | void ff_vp3_idct_put_altivec(uint8_t *dst, int stride, DCTELEM block[64]){ vec_u8 t; IDCT_START // pixels are signed; so add 128*16 in addition to the normal 8 vec_s16 v2048 = vec_sl(vec_splat_s16(1), vec_splat_u16(11)); eight = vec_add(eight, v2048); IDCT_1D(NOP, NOP) TRANSPOSE8(b0, b1, b2, b3, b4, b5, b6, b7); IDCT_1... |
0 | static void lowpass16(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 is_chroma = (component == 1 || component == 2); const int shift_w = (is_chroma ? s->desc->log2_chroma_w : ... |
0 | static int qemu_dup_flags(int fd, int flags){ int ret; int serrno; int dup_flags; int setfl_flags;#ifdef F_DUPFD_CLOEXEC ret = fcntl(fd, F_DUPFD_CLOEXEC, 0);#else ret = dup(fd); if (ret != -1) { qemu_set_cloexec(ret); }#endif if (ret == -1) { goto fail; } dup_flags = fcntl(ret, F_GETFL); if (dup_flags == -1) { goto fai... |
0 | void bdrv_query_image_info(BlockDriverState *bs, ImageInfo **p_info, Error **errp){ int64_t size; const char *backing_filename; BlockDriverInfo bdi; int ret; Error *err = NULL; ImageInfo *info; size = bdrv_getlength(bs); if (size < 0) { error_setg_errno(errp, -size, "Can't get size of device '%s'", bdrv_get_device_name... |
0 | static int vnc_set_x509_credential(VncDisplay *vs, const char *certdir, const char *filename, char **cred, int ignoreMissing){ struct stat sb; if (*cred) {qemu_free(*cred);*cred = NULL; } *cred = qemu_malloc(strlen(certdir) + strlen(filename) + 2); strcpy(*cred, certdir); strcat(*cred, "/"); strcat(*cred, filename); VN... |
0 | void stw_le_phys(target_phys_addr_t addr, uint32_t val){ stw_phys_internal(addr, val, DEVICE_LITTLE_ENDIAN);} |
0 | const char *qdev_fw_name(DeviceState *dev){ DeviceClass *dc = DEVICE_GET_CLASS(dev); if (dc->fw_name) { return dc->fw_name; } else if (dc->alias) { return dc->alias; } return object_get_typename(OBJECT(dev));} |
0 | static inline void gen_op_eval_fblg(TCGv dst, TCGv src, unsigned int fcc_offset){ gen_mov_reg_FCC0(dst, src, fcc_offset); gen_mov_reg_FCC1(cpu_tmp0, src, fcc_offset); tcg_gen_xor_tl(dst, dst, cpu_tmp0);} |
0 | uint32_t omap_badwidth_read32(void *opaque, target_phys_addr_t addr){ OMAP_32B_REG(addr); return 0;} |
0 | SocketAddressLegacy *socket_parse(const char *str, Error **errp){ SocketAddressLegacy *addr; addr = g_new0(SocketAddressLegacy, 1); if (strstart(str, "unix:", NULL)) { if (str[5] == '\0') { error_setg(errp, "invalid Unix socket address"); goto fail; } else { addr->type = SOCKET_ADDRESS_LEGACY_KIND_UNIX; addr->u.q_unix.... |
0 | static void do_info_cpus(Monitor *mon, QObject **ret_data){ CPUState *env; QList *cpu_list; cpu_list = qlist_new(); /* just to set the default cpu if not already done */ mon_get_cpu(); for(env = first_cpu; env != NULL; env = env->next_cpu) { QDict *cpu; QObject *obj; cpu_synchronize_state(env); obj = qobject_from_jsonf... |
0 | void slirp_init(int restricted, const char *special_ip){ // debug_init("/tmp/slirp.log", DEBUG_DEFAULT);#ifdef _WIN32 { WSADATA Data; WSAStartup(MAKEWORD(2,0), &Data);atexit(slirp_cleanup); }#endif link_up = 1; slirp_restrict = restricted; if_init(); ip_init(); /* Initialise mbufs *after* setting the MTU */ m_init(); /... |
0 | static void test_io_channel(bool async, SocketAddressLegacy *listen_addr, SocketAddressLegacy *connect_addr, bool passFD){ QIOChannel *src, *dst; QIOChannelTest *test; if (async) { test_io_channel_setup_async(listen_addr, connect_addr, &src, &dst); g_assert(!passFD || qio_channel_has_feature(src, QIO_CHANNEL_FEATURE_FD... |
0 | static int v9fs_synth_name_to_path(FsContext *ctx, V9fsPath *dir_path, const char *name, V9fsPath *target){ V9fsSynthNode *node; V9fsSynthNode *dir_node; /* "." and ".." are not allowed */ if (!strcmp(name, ".") || !strcmp(name, "..")) { errno = EINVAL; return -1; } if (!dir_path) { dir_node = &v9fs_synth_root; } else ... |
0 | static void virtio_ccw_9p_realize(VirtioCcwDevice *ccw_dev, Error **errp){ V9fsCCWState *dev = VIRTIO_9P_CCW(ccw_dev); DeviceState *vdev = DEVICE(&dev->vdev); Error *err = NULL; qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus)); object_property_set_bool(OBJECT(vdev), true, "realized", &err); if (err) { error_propagate(errp... |
0 | static V9fsFidState *lookup_fid(V9fsState *s, int32_t fid){ V9fsFidState *f; for (f = s->fid_list; f; f = f->next) { if (f->fid == fid) { v9fs_do_setuid(s, f->uid); return f; } } return NULL;} |
0 | static int hda_audio_post_load(void *opaque, int version){ HDAAudioState *a = opaque; HDAAudioStream *st; int i; dprint(a, 1, "%s\n", __FUNCTION__); if (version == 1) { /* assume running_compat[] is for output streams */ for (i = 0; i < ARRAY_SIZE(a->running_compat); i++) a->running_real[16 + i] = a->running_compat[i];... |
0 | static av_cold int dfa_decode_init(AVCodecContext *avctx){ DfaContext *s = avctx->priv_data; int ret; avctx->pix_fmt = PIX_FMT_PAL8; if ((ret = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0) return ret; s->frame_buf = av_mallocz(avctx->width * avctx->height + AV_LZO_OUTPUT_PADDING); if (!s->frame_buf)... |
0 | static int mpeg_field_start(MpegEncContext *s){ AVCodecContext *avctx= s->avctx; Mpeg1Context *s1 = (Mpeg1Context*)s; /* start frame decoding */ if(s->first_field || s->picture_structure==PICT_FRAME){ if(MPV_frame_start(s, avctx) < 0) return -1; ff_er_frame_start(s); /* first check if we must repeat the frame */ s->cur... |
1 | static void virtio_scsi_handle_cmd(VirtIODevice *vdev, VirtQueue *vq){ /* use non-QOM casts in the data path */ VirtIOSCSI *s = (VirtIOSCSI *)vdev; VirtIOSCSIReq *req, *next; QTAILQ_HEAD(, VirtIOSCSIReq) reqs = QTAILQ_HEAD_INITIALIZER(reqs); if (s->ctx && !s->dataplane_started) { virtio_scsi_dataplane_start(s); return;... |
1 | static inline void RENAME(bgr24ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused){#if COMPILE_TEMPLATE_MMX RENAME(bgr24ToUV_mmx)(dstU, dstV, src1, width, PIX_FMT_BGR24);#else int i; for (i=0; i<width; i++) { int b= src1[3*i + 0]; int g= src1[3*i + 1]; int r= src1[... |
1 | static QEMUFile *open_test_file(bool write){ int fd = dup(temp_fd); QIOChannel *ioc; lseek(fd, 0, SEEK_SET); if (write) { g_assert_cmpint(ftruncate(fd, 0), ==, 0); } ioc = QIO_CHANNEL(qio_channel_file_new_fd(fd)); if (write) { return qemu_fopen_channel_output(ioc); } else { return qemu_fopen_channel_input(ioc); }} |
1 | static void hScale16_c(SwsContext *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int16_t *filterPos, int filterSize){ int i; int32_t *dst = (int32_t *) _dst; const uint16_t *src = (const uint16_t *) _src; int bits = av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1; int sh = (bit... |
1 | static uint64_t kvmppc_read_int_cpu_dt(const char *propname){ char buf[PATH_MAX]; union { uint32_t v32; uint64_t v64; } u; FILE *f; int len; if (kvmppc_find_cpu_dt(buf, sizeof(buf))) { return -1; } strncat(buf, "/", sizeof(buf) - strlen(buf)); strncat(buf, propname, sizeof(buf) - strlen(buf)); f = fopen(buf, "rb"); if ... |
1 | void icp_pit_init(uint32_t base, qemu_irq *pic, int irq){ int iomemtype; icp_pit_state *s; s = (icp_pit_state *)qemu_mallocz(sizeof(icp_pit_state)); s->base = base; /* Timer 0 runs at the system clock speed (40MHz). */ s->timer[0] = arm_timer_init(40000000, pic[irq]); /* The other two timers run at 1MHz. */ s->timer[1]... |
1 | static int adts_write_header(AVFormatContext *s){ ADTSContext *adts = s->priv_data; AVCodecContext *avc = s->streams[0]->codec; if(avc->extradata_size > 0) decode_extradata(adts, avc->extradata, avc->extradata_size); return 0;} |
1 | start_xmit(E1000State *s){ PCIDevice *d = PCI_DEVICE(s); dma_addr_t base; struct e1000_tx_desc desc; uint32_t tdh_start = s->mac_reg[TDH], cause = E1000_ICS_TXQE; if (!(s->mac_reg[TCTL] & E1000_TCTL_EN)) { DBGOUT(TX, "tx disabled\n"); return; } while (s->mac_reg[TDH] != s->mac_reg[TDT]) { base = tx_desc_base(s) + sizeo... |
1 | static void vector_fmul_window_mips(float *dst, const float *src0, const float *src1, const float *win, int len){ float * dst_j, *win_j, *src0_i, *src1_j, *dst_i, *win_i; float temp, temp1, temp2, temp3; float s0, s01, s1, s11; float wi, wi1, wi2, wi3; float wj, wj1, wj2, wj3; const float * lp_end = win + len; win_i = ... |
1 | PCIBus *typhoon_init(ram_addr_t ram_size, ISABus **isa_bus, qemu_irq *p_rtc_irq, AlphaCPU *cpus[4], pci_map_irq_fn sys_map_irq){ const uint64_t MB = 1024 * 1024; const uint64_t GB = 1024 * MB; MemoryRegion *addr_space = get_system_memory(); MemoryRegion *addr_space_io = get_system_io(); DeviceState *dev; TyphoonState *... |
1 | static int decode_update_thread_context(AVCodecContext *dst, const AVCodecContext *src){ H264Context *h= dst->priv_data, *h1= src->priv_data; MpegEncContext * const s = &h->s, * const s1 = &h1->s; int inited = s->context_initialized, err; int i; if(dst == src || !s1->context_initialized) return 0; err = ff_mpeg_update_... |
1 | static int device_open(AVFormatContext *ctx){ struct v4l2_capability cap; int fd;#if CONFIG_LIBV4L2 int fd_libv4l;#endif int res, err; int flags = O_RDWR; if (ctx->flags & AVFMT_FLAG_NONBLOCK) { flags |= O_NONBLOCK; } fd = v4l2_open(ctx->filename, flags, 0); if (fd < 0) { err = errno; av_log(ctx, AV_LOG_ERROR, "Cannot ... |
1 | int pcie_cap_init(PCIDevice *dev, uint8_t offset, uint8_t type, uint8_t port){ /* PCIe cap v2 init */ int pos; uint8_t *exp_cap; assert(pci_is_express(dev)); pos = pci_add_capability(dev, PCI_CAP_ID_EXP, offset, PCI_EXP_VER2_SIZEOF); if (pos < 0) { return pos; } dev->exp.exp_cap = pos; exp_cap = dev->config + pos; /* F... |
1 | void ff_svq3_add_idct_c(uint8_t *dst, DCTELEM *block, int stride, int qp, int dc){ const int qmul = svq3_dequant_coeff[qp]; int i; uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; if (dc) { dc = 13*13*((dc == 1) ? 1538*block[0] : ((qmul*(block[0] >> 3)) / 2)); block[0] = 0; } for (i = 0; i < 4; i++) { const int z0 = 13*(block[... |
1 | void process_incoming_migration(QEMUFile *f){ if (qemu_loadvm_state(f) < 0) { fprintf(stderr, "load of migration failed\n"); exit(0); } qemu_announce_self(); DPRINTF("successfully loaded vm state\n"); if (autostart) vm_start();} |
1 | void *av_realloc(void *ptr, unsigned int size){#ifdef MEMALIGN_HACK //FIXME this isnt aligned correctly though it probably isnt needed int diff; if(!ptr) return av_malloc(size); diff= ((char*)ptr)[-1]; return realloc(ptr - diff, size + diff) + diff;#else return realloc(ptr, size);#endif} |
1 | static void init_excp_620 (CPUPPCState *env){#if !defined(CONFIG_USER_ONLY) env->excp_vectors[POWERPC_EXCP_RESET] = 0x00000100; env->excp_vectors[POWERPC_EXCP_MCHECK] = 0x00000200; env->excp_vectors[POWERPC_EXCP_DSI] = 0x00000300; env->excp_vectors[POWERPC_EXCP_ISI] = 0x00000400; env->excp_vectors[POWERPC_EXCP_EXTERNAL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.