label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
0 | static int xan_decode_frame_type1(AVCodecContext *avctx){ XanContext *s = avctx->priv_data; uint8_t *ybuf, *src = s->scratch_buffer; int cur, last; int i, j; int ret; if ((ret = xan_decode_chroma(avctx, bytestream2_get_le32(&s->gb))) != 0) return ret; bytestream2_seek(&s->gb, 16, SEEK_SET); ret = xan_unpack_luma(s, src... |
0 | static void vtd_context_device_invalidate(IntelIOMMUState *s, uint16_t source_id, uint16_t func_mask){ uint16_t mask; VTDAddressSpace **pvtd_as; VTDAddressSpace *vtd_as; uint16_t devfn; uint16_t devfn_it; switch (func_mask & 3) { case 0: mask = 0; /* No bits in the SID field masked */ break; case 1: mask = 4; /* Mask b... |
0 | static int raw_open(BlockDriverState *bs, QDict *options, int flags, Error **errp){ BDRVRawState *s = bs->opaque; int access_flags; DWORD overlapped; QemuOpts *opts; Error *local_err = NULL; const char *filename; int ret; s->type = FTYPE_FILE; opts = qemu_opts_create(&raw_runtime_opts, NULL, 0, &error_abort); qemu_opts... |
0 | static struct omap_watchdog_timer_s *omap_wd_timer_init(MemoryRegion *memory, target_phys_addr_t base, qemu_irq irq, omap_clk clk){ struct omap_watchdog_timer_s *s = (struct omap_watchdog_timer_s *) g_malloc0(sizeof(struct omap_watchdog_timer_s)); s->timer.irq = irq; s->timer.clk = clk; s->timer.timer = qemu_new_timer_... |
0 | void qmp_block_job_cancel(const char *device, bool has_force, bool force, Error **errp){ BlockJob *job = find_block_job(device); if (!has_force) { force = false; } if (!job) { error_set(errp, QERR_BLOCK_JOB_NOT_ACTIVE, device); return; } if (job->paused && !force) { error_setg(errp, "The block job for device '%s' is cu... |
0 | static void gen_flt3_ldst (DisasContext *ctx, uint32_t opc, int fd, int fs, int base, int index){ const char *opn = "extended float load/store"; int store = 0; TCGv t0 = tcg_temp_new(); if (base == 0) { gen_load_gpr(t0, index); } else if (index == 0) { gen_load_gpr(t0, base); } else { gen_load_gpr(t0, index); gen_op_ad... |
0 | static ioreq_t *cpu_get_ioreq(XenIOState *state){ int i; evtchn_port_t port; port = xc_evtchn_pending(state->xce_handle); if (port == state->bufioreq_local_port) { timer_mod(state->buffered_io_timer, BUFFER_IO_MAX_DELAY + qemu_clock_get_ms(QEMU_CLOCK_REALTIME)); return NULL; } if (port != -1) { for (i = 0; i < max_cpus... |
0 | BlockDriverAIOCB *bdrv_aio_read(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sectors, BlockDriverCompletionFunc *cb, void *opaque){ BlockDriver *drv = bs->drv; BlockDriverAIOCB *ret; if (!drv) return NULL; /* XXX: we assume that nb_sectors == 0 is suppored by the async read */ if (sector_num == 0 && b... |
0 | static void tcp_chr_tls_init(Chardev *chr){ SocketChardev *s = SOCKET_CHARDEV(chr); QIOChannelTLS *tioc; Error *err = NULL; gchar *name; if (s->is_listen) { tioc = qio_channel_tls_new_server( s->ioc, s->tls_creds, NULL, /* XXX Use an ACL */ &err); } else { tioc = qio_channel_tls_new_client( s->ioc, s->tls_creds, s->add... |
0 | static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info, int *need_next_header, int *new_frame_start){ GetBitContext bits; int size, rdb, ch, sr; union { uint64_t u64; uint8_t u8[8]; } tmp; tmp.u64 = be2me_64(state); init_get_bits(&bits, tmp.u8+8-AAC_HEADER_SIZE, AAC_HEADER_SIZE * 8); if(get_bits(&bits, 12) !=... |
1 | static int local_post_create_passthrough(FsContext *fs_ctx, const char *path, FsCred *credp){ char buffer[PATH_MAX]; if (chmod(rpath(fs_ctx, path, buffer), credp->fc_mode & 07777) < 0) { return -1; } if (lchown(rpath(fs_ctx, path, buffer), credp->fc_uid, credp->fc_gid) < 0) { /* * If we fail to change ownership and if ... |
1 | void vga_reset(void *opaque){ VGAState *s = (VGAState *) opaque; s->lfb_addr = 0; s->lfb_end = 0; s->map_addr = 0; s->map_end = 0; s->lfb_vram_mapped = 0; s->bios_offset = 0; s->bios_size = 0; s->sr_index = 0; memset(s->sr, '\0', sizeof(s->sr)); s->gr_index = 0; memset(s->gr, '\0', sizeof(s->gr)); s->ar_index = 0; mems... |
1 | void decode_mb_mode(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y, uint8_t *segment, uint8_t *ref, int layout, int is_vp7){ VP56RangeCoder *c = &s->c; static const char *vp7_feature_name[] = { "q-index", "lf-delta", "partial-golden-update", "blit-pitch" }; if (is_vp7) { int i; *segment = 0; for (i = 0; i < 4; i+... |
1 | static void asfrtp_close_context(PayloadContext *asf){ ffio_free_dyn_buf(&asf->pktbuf); av_freep(&asf->buf); av_free(asf);} |
1 | static av_cold int dilate_init(AVFilterContext *ctx, const char *args){ OCVContext *ocv = ctx->priv; DilateContext *dilate = ocv->priv; char default_kernel_str[] = "3x3+0x0/rect"; char *kernel_str; const char *buf = args; int ret; dilate->nb_iterations = 1; if (args) kernel_str = av_get_token(&buf, "|"); if ((ret = par... |
1 | BlockDriverState *bdrv_new(void){ BlockDriverState *bs; int i; bs = g_new0(BlockDriverState, 1); QLIST_INIT(&bs->dirty_bitmaps); for (i = 0; i < BLOCK_OP_TYPE_MAX; i++) { QLIST_INIT(&bs->op_blockers[i]); } notifier_with_return_list_init(&bs->before_write_notifiers); bs->refcnt = 1; bs->aio_context = qemu_get_aio_contex... |
1 | static inline void RENAME(bgr32ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width){int i; assert(src1 == src2);for(i=0; i<width; i++){const int a= ((uint32_t*)src1)[2*i+0];const int e= ((uint32_t*)src1)[2*i+1];const int l= (a&0xFF00FF) + (e&0xFF00FF);const int h= (a&0x00FF00) + (e&0x00FF00); co... |
1 | static int qemu_rdma_init_ram_blocks(RDMAContext *rdma){ RDMALocalBlocks *local = &rdma->local_ram_blocks; assert(rdma->blockmap == NULL); rdma->blockmap = g_hash_table_new(g_direct_hash, g_direct_equal); memset(local, 0, sizeof *local); qemu_ram_foreach_block(qemu_rdma_init_one_block, rdma); DPRINTF("Allocated %d loca... |
1 | static always_inline void gen_op_subfeo (void){ gen_op_move_T2_T0(); gen_op_subfe(); gen_op_check_subfo();} |
1 | void commit_start(BlockDriverState *bs, BlockDriverState *base, BlockDriverState *top, int64_t speed, BlockdevOnError on_error, BlockDriverCompletionFunc *cb, void *opaque, Error **errp){ CommitBlockJob *s; BlockReopenQueue *reopen_queue = NULL; int orig_overlay_flags; int orig_base_flags; BlockDriverState *overlay_bs;... |
1 | static void check_guest_output(const testdef_t *test, int fd){ bool output_ok = false; int i, nbr, pos = 0; char ch; /* Poll serial output... Wait at most 60 seconds */ for (i = 0; i < 6000; ++i) { while ((nbr = read(fd, &ch, 1)) == 1) { if (ch == test->expect[pos]) { pos += 1; if (test->expect[pos] == '\0') { /* We've... |
1 | static void do_subtitle_out(AVFormatContext *s, AVOutputStream *ost, AVInputStream *ist, AVSubtitle *sub, int64_t pts){ static uint8_t *subtitle_out = NULL; int subtitle_out_max_size = 65536; int subtitle_out_size, nb, i; AVCodecContext *enc; AVPacket pkt; if (pts == AV_NOPTS_VALUE) { fprintf(stderr, "Subtitle packets ... |
1 | static int handle_sw_breakpoint(S390CPU *cpu, struct kvm_run *run){ CPUS390XState *env = &cpu->env; unsigned long pc; cpu_synchronize_state(CPU(cpu)); pc = env->psw.addr - 4; if (kvm_find_sw_breakpoint(CPU(cpu), pc)) { env->psw.addr = pc; return EXCP_DEBUG; } return -ENOENT;} |
1 | static void vhost_dev_sync_region(struct vhost_dev *dev, MemoryRegionSection *section, uint64_t mfirst, uint64_t mlast, uint64_t rfirst, uint64_t rlast){ uint64_t start = MAX(mfirst, rfirst); uint64_t end = MIN(mlast, rlast); vhost_log_chunk_t *from = dev->log + start / VHOST_LOG_CHUNK; vhost_log_chunk_t *to = dev->log... |
1 | int nbd_client_co_pdiscard(BlockDriverState *bs, int64_t offset, int count){ NBDClientSession *client = nbd_get_client_session(bs); NBDRequest request = { .type = NBD_CMD_TRIM, .from = offset, .len = count, }; NBDReply reply; ssize_t ret; if (!(client->nbdflags & NBD_FLAG_SEND_TRIM)) { return 0; } nbd_coroutine_start(c... |
1 | int qcow2_check_refcounts(BlockDriverState *bs){ BDRVQcowState *s = bs->opaque; int64_t size; int nb_clusters, refcount1, refcount2, i; QCowSnapshot *sn; uint16_t *refcount_table; int ret, errors = 0; size = bdrv_getlength(bs->file); nb_clusters = size_to_clusters(s, size); refcount_table = qemu_mallocz(nb_clusters * s... |
1 | static int caf_write_trailer(AVFormatContext *s){ AVIOContext *pb = s->pb; AVCodecContext *enc = s->streams[0]->codec; if (pb->seekable) { CAFContext *caf = s->priv_data; int64_t file_size = avio_tell(pb); avio_seek(pb, caf->data, SEEK_SET); avio_wb64(pb, file_size - caf->data - 8); avio_seek(pb, file_size, SEEK_SET); ... |
1 | static void init_proc_970GX (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 | static int find_marker(const uint8_t **pbuf_ptr, const uint8_t *buf_end){ const uint8_t *buf_ptr; unsigned int v, v2; int val; int skipped = 0; buf_ptr = *pbuf_ptr; while (buf_ptr < buf_end) { v = *buf_ptr++; v2 = *buf_ptr; if ((v == 0xff) && (v2 >= 0xc0) && (v2 <= 0xfe) && buf_ptr < buf_end) { val = *buf_ptr++; goto f... |
1 | static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; AVSContext *h = avctx->priv_data; MpegEncContext *s = &h->s; int input_size; const uint8_t *buf_end; const uint8_t *buf_ptr; AVFrame *picture = data; uint32_t ... |
1 | static int get_pci_config_device(QEMUFile *f, void *pv, size_t size){ PCIDevice *s = container_of(pv, PCIDevice, config); uint8_t config[size]; int i; qemu_get_buffer(f, config, size); for (i = 0; i < size; ++i) if ((config[i] ^ s->config[i]) & s->cmask[i] & ~s->wmask[i]) return -EINVAL; memcpy(s->config, config, size)... |
0 | static void update_md5_sum(FlacEncodeContext *s, const int16_t *samples){#if HAVE_BIGENDIAN int i; for (i = 0; i < s->frame.blocksize * s->channels; i++) { int16_t smp = av_le2ne16(samples[i]); av_md5_update(s->md5ctx, (uint8_t *)&smp, 2); }#else av_md5_update(s->md5ctx, (const uint8_t *)samples, s->frame.blocksize*s->... |
0 | static int cuvid_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt){ CuvidContext *ctx = avctx->priv_data; AVHWDeviceContext *device_ctx = (AVHWDeviceContext*)ctx->hwdevice->data; AVCUDADeviceContext *device_hwctx = device_ctx->hwctx; CUcontext dummy, cuda_ctx = device_hwctx->cuda_ctx; AVF... |
0 | static void intra_predict_mad_cow_dc_0lt_8x8_msa(uint8_t *src, int32_t stride){ uint8_t lp_cnt; uint32_t src0, src1, src2 = 0, src3; uint32_t out0, out1, out2, out3; v16u8 src_top; v8u16 add; v4u32 sum; src_top = LD_UB(src - stride); add = __msa_hadd_u_h(src_top, src_top); sum = __msa_hadd_u_w(add, add); src0 = __msa_c... |
0 | static int img_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags){ VideoDemuxData *s1 = s->priv_data; if (timestamp < 0 || timestamp > s1->img_last - s1->img_first) return -1; s1->img_number = timestamp + s1->img_first; return 0;} |
0 | static int read_filter_params(MLPDecodeContext *m, GetBitContext *gbp, unsigned int channel, unsigned int filter){ FilterParams *fp = &m->channel_params[channel].filter_params[filter]; const int max_order = filter ? MAX_IIR_ORDER : MAX_FIR_ORDER; const char fchar = filter ? 'I' : 'F'; int i, order; // Filter is 0 for F... |
0 | static int mov_read_sv3d(MOVContext *c, AVIOContext *pb, MOVAtom atom){ AVStream *st; MOVStreamContext *sc; int size; int32_t yaw, pitch, roll; size_t l = 0, t = 0, r = 0, b = 0; size_t padding = 0; uint32_t tag; enum AVSphericalProjection projection; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc->nb_s... |
0 | struct tm *brktimegm(time_t secs, struct tm *tm){ int days, y, ny, m; int md[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; days = secs / 86400; secs %= 86400; tm->tm_hour = secs / 3600; tm->tm_min = (secs % 3600) / 60; tm->tm_sec = secs % 60; /* oh well, may be someone some day will invent a formula for this ... |
0 | static int dnxhd_decode_macroblock(const DNXHDContext *ctx, RowContext *row, AVFrame *frame, int x, int y){ int shift1 = ctx->bit_depth >= 10; int dct_linesize_luma = frame->linesize[0]; int dct_linesize_chroma = frame->linesize[1]; uint8_t *dest_y, *dest_u, *dest_v; int dct_y_offset, dct_x_offset; int qscale, i, act; ... |
0 | static int get_audio_flags(AVCodecContext *enc){ int flags = (enc->bits_per_coded_sample == 16) ? FLV_SAMPLESSIZE_16BIT : FLV_SAMPLESSIZE_8BIT; if (enc->codec_id == CODEC_ID_AAC) // specs force these parameters return FLV_CODECID_AAC | FLV_SAMPLERATE_44100HZ | FLV_SAMPLESSIZE_16BIT | FLV_STEREO; else if (enc->codec_id ... |
0 | static int init_output_stream_encode(OutputStream *ost){ InputStream *ist = get_input_stream(ost); AVCodecContext *enc_ctx = ost->enc_ctx; AVCodecContext *dec_ctx = NULL; AVFormatContext *oc = output_files[ost->file_index]->ctx; int j, ret; set_encoder_id(output_files[ost->file_index], ost); if (ist) { ost->st->disposi... |
0 | int avio_put_str16le(AVIOContext *s, const char *str){ const uint8_t *q = str; int ret = 0; while (*q) { uint32_t ch; uint16_t tmp; GET_UTF8(ch, *q++, break;) PUT_UTF16(ch, tmp, avio_wl16(s, tmp); ret += 2;) } avio_wl16(s, 0); ret += 2; return ret;} |
0 | void init_get_bits(GetBitContext *s, UINT8 *buffer, int buffer_size){ s->buffer= buffer; s->size= buffer_size; s->buffer_end= buffer + buffer_size;#ifdef ALT_BITSTREAM_READER s->index=0;#elif defined LIBMPEG2_BITSTREAM_READER s->buffer_ptr = buffer; s->bit_count = 16; s->cache = 0;#elif defined A32_BITSTREAM_READER s->... |
0 | static int sdp_parse_rtpmap(AVCodecContext *codec, RTSPStream *rtsp_st, int payload_type, const char *p){ char buf[256]; int i; AVCodec *c; const char *c_name; /* Loop into AVRtpDynamicPayloadTypes[] and AVRtpPayloadTypes[] and see if we can handle this kind of payload */ get_word_sep(buf, sizeof(buf), "/", &p); if (pa... |
1 | static void virtio_net_device_realize(DeviceState *dev, Error **errp){ VirtIODevice *vdev = VIRTIO_DEVICE(dev); VirtIONet *n = VIRTIO_NET(dev); NetClientState *nc; int i; virtio_init(vdev, "virtio-net", VIRTIO_ID_NET, n->config_size); n->max_queues = MAX(n->nic_conf.peers.queues, 1); n->vqs = g_malloc0(sizeof(VirtIONet... |
1 | static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags){ AVIContext *avi = s->priv_data; AVStream *st; int i, index; int64_t pos, pos_min; AVIStream *ast; /* Does not matter which stream is requested dv in avi has the * stream information in the first video stream. */ if (avi->dv_de... |
1 | void ff_aac_coder_init_mips(AACEncContext *c) {#if HAVE_INLINE_ASM AACCoefficientsEncoder *e = c->coder; int option = c->options.aac_coder; if (option == 2) { e->quantize_and_encode_band = quantize_and_encode_band_mips; e->encode_window_bands_info = codebook_trellis_rate;#if HAVE_MIPSFPU e->search_for_quantizers = sear... |
1 | static void gen_wsr_ps(DisasContext *dc, uint32_t sr, TCGv_i32 v){ uint32_t mask = PS_WOE | PS_CALLINC | PS_OWB | PS_UM | PS_EXCM | PS_INTLEVEL; if (option_enabled(dc, XTENSA_OPTION_MMU)) { mask |= PS_RING; } tcg_gen_andi_i32(cpu_SR[sr], v, mask); /* This can change mmu index, so exit tb */ gen_jumpi(dc, dc->next_pc, -... |
1 | uint64_t HELPER(neon_abdl_s32)(uint32_t a, uint32_t b){ uint64_t tmp; uint64_t result; DO_ABD(result, a, b, int16_t); DO_ABD(tmp, a >> 16, b >> 16, int16_t); return result | (tmp << 32);} |
1 | static int get_cox(J2kDecoderContext *s, J2kCodingStyle *c){ if (s->buf_end - s->buf < 5) return AVERROR(EINVAL); c->nreslevels = bytestream_get_byte(&s->buf) + 1; // num of resolution levels - 1 c->log2_cblk_width = bytestream_get_byte(&s->buf) + 2; // cblk width c->log2_cblk_height = bytestream_get_byte(&s->buf) + 2;... |
1 | QFloat *qobject_to_qfloat(const QObject *obj){ if (qobject_type(obj) != QTYPE_QFLOAT) return NULL; return container_of(obj, QFloat, base);} |
1 | void HELPER(divu)(CPUM68KState *env, uint32_t word){ uint32_t num; uint32_t den; uint32_t quot; uint32_t rem; num = env->div1; den = env->div2; /* ??? This needs to make sure the throwing location is accurate. */ if (den == 0) { raise_exception(env, EXCP_DIV0); } quot = num / den; rem = num % den; env->cc_v = (word && ... |
1 | void cpu_dump_state(CPUState *env, FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...), int flags){ int i, x; cpu_fprintf(f, "pc: " TARGET_FMT_lx " npc: " TARGET_FMT_lx "\n", env->pc, env->npc); cpu_fprintf(f, "General Registers:\n"); for (i = 0; i < 4; i++) cpu_fprintf(f, "%%g%c: " TARGET_FMT_lx "\t", i + '0', ... |
1 | static uint16_t nvme_set_feature(NvmeCtrl *n, NvmeCmd *cmd, NvmeRequest *req){ uint32_t dw10 = le32_to_cpu(cmd->cdw10); uint32_t dw11 = le32_to_cpu(cmd->cdw11); switch (dw10) { case NVME_VOLATILE_WRITE_CACHE: blk_set_enable_write_cache(n->conf.blk, dw11 & 1); break; case NVME_NUMBER_OF_QUEUES: req->cqe.result = cpu_to_... |
1 | static int flic_decode_frame_8BPP(AVCodecContext *avctx, void *data, int *got_frame, const uint8_t *buf, int buf_size){ FlicDecodeContext *s = avctx->priv_data; GetByteContext g2; int pixel_ptr; int palette_ptr; unsigned char palette_idx1; unsigned char palette_idx2; unsigned int frame_size; int num_chunks; unsigned in... |
1 | static int pci_read_devaddr(Monitor *mon, const char *addr, int *busp, unsigned *slotp){ int dom; /* strip legacy tag */ if (!strncmp(addr, "pci_addr=", 9)) { addr += 9; } if (pci_parse_devaddr(addr, &dom, busp, slotp, NULL)) { monitor_printf(mon, "Invalid pci address\n"); return -1; } if (dom != 0) { monitor_printf(mo... |
0 | static void write_streaminfo(FlacEncodeContext *s, uint8_t *header){ PutBitContext pb; memset(header, 0, FLAC_STREAMINFO_SIZE); init_put_bits(&pb, header, FLAC_STREAMINFO_SIZE); /* streaminfo metadata block */ put_bits(&pb, 16, s->avctx->frame_size); put_bits(&pb, 16, s->avctx->frame_size); put_bits(&pb, 24, 0); put_bi... |
1 | static void slavio_check_interrupts(SLAVIO_INTCTLState *s, int set_irqs){ uint32_t pending = s->intregm_pending, pil_pending; unsigned int i, j; pending &= ~s->intregm_disabled; trace_slavio_check_interrupts(pending, s->intregm_disabled); for (i = 0; i < MAX_CPUS; i++) { pil_pending = 0; /* If we are the current interr... |
1 | static struct ioreq *ioreq_start(struct XenBlkDev *blkdev){ struct ioreq *ioreq = NULL; if (QLIST_EMPTY(&blkdev->freelist)) { if (blkdev->requests_total >= max_requests) { goto out; } /* allocate new struct */ ioreq = g_malloc0(sizeof(*ioreq)); ioreq->blkdev = blkdev; blkdev->requests_total++; qemu_iovec_init(&ioreq->v... |
1 | static void dequantize_slice_buffered(SnowContext *s, slice_buffer * sb, SubBand *b, IDWTELEM *src, int stride, int start_y, int end_y){ const int w= b->width; const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16); const int qmul= ff_qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT); const int qadd= (s->qbias*qmul)>>QBIAS_SHIFT; ... |
1 | static int kvm_irqchip_create(MachineState *machine, KVMState *s){ int ret; if (!machine_kernel_irqchip_allowed(machine) || (!kvm_check_extension(s, KVM_CAP_IRQCHIP) && (kvm_vm_enable_cap(s, KVM_CAP_S390_IRQCHIP, 0) < 0))) { return 0; } /* First probe and see if there's a arch-specific hook to create the * in-kernel ir... |
1 | static void qemu_clock_init(QEMUClockType type){ QEMUClock *clock = qemu_clock_ptr(type); clock->type = type; clock->enabled = true; clock->last = INT64_MIN; QLIST_INIT(&clock->timerlists); notifier_list_init(&clock->reset_notifiers); main_loop_tlg.tl[type] = timerlist_new(type, NULL, NULL);} |
1 | static void gen_mfdcr(DisasContext *ctx){#if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_REG);#else TCGv dcrn; if (unlikely(ctx->pr)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_REG); return; } /* NIP cannot be restored if the memory exception comes from an helper */ gen_update_nip(ctx, ctx->n... |
0 | static int wav_write_header(AVFormatContext *s){ WAVContext *wav = s->priv_data; AVIOContext *pb = s->pb; int64_t fmt, fact; ffio_wfourcc(pb, "RIFF"); avio_wl32(pb, 0); /* file length */ ffio_wfourcc(pb, "WAVE"); /* format header */ fmt = ff_start_tag(pb, "fmt "); if (ff_put_wav_header(pb, s->streams[0]->codec) < 0) { ... |
0 | void ff_llviddsp_init_x86(LLVidDSPContext *c){ int cpu_flags = av_get_cpu_flags();#if HAVE_INLINE_ASM && HAVE_7REGS && ARCH_X86_32 if (cpu_flags & AV_CPU_FLAG_CMOV) c->add_median_pred = add_median_pred_cmov;#endif if (ARCH_X86_32 && EXTERNAL_MMX(cpu_flags)) { c->add_bytes = ff_add_bytes_mmx; } if (ARCH_X86_32 && EXTERN... |
0 | static av_cold int libgsm_init(AVCodecContext *avctx) { if (avctx->channels > 1) { av_log(avctx, AV_LOG_ERROR, "Mono required for GSM, got %d channels\n", avctx->channels); return -1; } if(avctx->codec->decode){ if(!avctx->channels) avctx->channels= 1; if(!avctx->sample_rate) avctx->sample_rate= 8000; avctx->sample_fmt... |
0 | static int h261_decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size){ H261Context *h= avctx->priv_data; MpegEncContext *s = &h->s; int ret; AVFrame *pict = data;#ifdef DEBUG printf("*****frame %d size=%d\n", avctx->frame_number, buf_size); printf("bytes=%x %x %x %x\n", buf[0], buf... |
0 | static int mov_read_uuid(MOVContext *c, AVIOContext *pb, MOVAtom atom){ AVStream *st; MOVStreamContext *sc; int64_t ret; uint8_t uuid[16]; static const uint8_t uuid_isml_manifest[] = { 0xa5, 0xd4, 0x0b, 0x30, 0xe8, 0x14, 0x11, 0xdd, 0xba, 0x2f, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 }; static const uint8_t uuid_xmp[] = { 0... |
1 | uint64_t HELPER(neon_abdl_u16)(uint32_t a, uint32_t b){ uint64_t tmp; uint64_t result; DO_ABD(result, a, b, uint8_t); DO_ABD(tmp, a >> 8, b >> 8, uint8_t); result |= tmp << 16; DO_ABD(tmp, a >> 16, b >> 16, uint8_t); result |= tmp << 32; DO_ABD(tmp, a >> 24, b >> 24, uint8_t); result |= tmp << 48; return result;} |
1 | static int ipvideo_decode_block_opcode_0xA(IpvideoContext *s, AVFrame *frame){ int x, y; unsigned char P[8]; int flags = 0; bytestream2_get_buffer(&s->stream_ptr, P, 4); /* 4-color encoding for each 4x4 quadrant, or 4-color encoding on * either top and bottom or left and right halves */ if (P[0] <= P[1]) { /* 4-color e... |
1 | static av_cold int truemotion1_decode_init(AVCodecContext *avctx){ TrueMotion1Context *s = avctx->priv_data; s->avctx = avctx; // FIXME: it may change ?// if (avctx->bits_per_sample == 24)// avctx->pix_fmt = AV_PIX_FMT_RGB24;// else// avctx->pix_fmt = AV_PIX_FMT_RGB555; s->frame = av_frame_alloc(); if (!s->frame) retur... |
1 | static uint32_t suov32(CPUTriCoreState *env, int64_t arg){ uint32_t ret; int64_t max_pos = UINT32_MAX; if (arg > max_pos) { env->PSW_USB_V = (1 << 31); env->PSW_USB_SV = (1 << 31); ret = (target_ulong)max_pos; } else { if (arg < 0) { env->PSW_USB_V = (1 << 31); env->PSW_USB_SV = (1 << 31); ret = 0; } else { env->PSW_US... |
0 | static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *pkt){ DiracContext *s = avctx->priv_data; AVFrame *picture = data; uint8_t *buf = pkt->data; int buf_size = pkt->size; int i, data_unit_size, buf_idx = 0; int ret; /* release unused frames */ for (i = 0; i < MAX_FRAMES; i++) if (... |
0 | static int decode_svq1_block (bit_buffer_t *bitbuf, uint8_t *pixels, int pitch, int intra) { uint32_t bit_cache; vlc_code_t *vlc; uint8_t *list[63]; uint32_t *dst; uint32_t *codebook; int entries[6]; int i, j, m, n; int mean, stages; int x, y, width, height, level; uint32_t n1, n2, n3, n4; /* initialize list for breadt... |
0 | static int mov_init(AVFormatContext *s){ MOVMuxContext *mov = s->priv_data; AVDictionaryEntry *global_tcr = av_dict_get(s->metadata, "timecode", NULL, 0); int i, ret; mov->fc = s; /* Default mode == MP4 */ mov->mode = MODE_MP4; if (s->oformat) { if (!strcmp("3gp", s->oformat->name)) mov->mode = MODE_3GP; else if (!strc... |
1 | static GThread *trace_thread_create(GThreadFunc fn){ GThread *thread;#ifndef _WIN32 sigset_t set, oldset; sigfillset(&set); pthread_sigmask(SIG_SETMASK, &set, &oldset);#endif thread = g_thread_create(writeout_thread, NULL, FALSE, NULL);#ifndef _WIN32 pthread_sigmask(SIG_SETMASK, &oldset, NULL);#endif return thread;} |
1 | static void visit_type_TestStruct(Visitor *v, TestStruct **obj, const char *name, Error **errp){ Error *err = NULL; visit_start_struct(v, (void **)obj, "TestStruct", name, sizeof(TestStruct), &err); if (err) { goto out; } visit_type_int(v, &(*obj)->integer, "integer", &err); visit_type_bool(v, &(*obj)->boolean, "boolea... |
1 | static float get_band_cost_ZERO_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){ int i; float cost = 0; for (i = 0; i < size; i += 4) { cost += in[i ] * in[i ]; cost += in[i+1] * in[i+1]; cost += in... |
1 | static int decode_thread(void *arg){ VideoState *is = arg; AVFormatContext *ic; int err, i, ret; int st_index[AVMEDIA_TYPE_NB]; AVPacket pkt1, *pkt = &pkt1; AVFormatParameters params, *ap = ¶ms; int eof=0; int pkt_in_play_range = 0; ic = avformat_alloc_context(); memset(st_index, -1, sizeof(st_index)); is->video_st... |
1 | static int restore_sigcontext(CPUSH4State *regs, struct target_sigcontext *sc, target_ulong *r0_p){ unsigned int err = 0; int i;#define COPY(x) __get_user(regs->x, &sc->sc_##x) COPY(gregs[1]); COPY(gregs[2]); COPY(gregs[3]); COPY(gregs[4]); COPY(gregs[5]); COPY(gregs[6]); COPY(gregs[7]); COPY(gregs[8]); COPY(gregs[9]);... |
1 | void do_rfi (void){ env->nip = env->spr[SPR_SRR0] & ~0x00000003; T0 = env->spr[SPR_SRR1] & ~0xFFFF0000UL; do_store_msr(env, T0);#if defined (DEBUG_OP) dump_rfi();#endif env->interrupt_request |= CPU_INTERRUPT_EXITTB;} |
1 | restore_sigcontext(CPUX86State *env, struct target_sigcontext *sc, int *peax){unsigned int err = 0; abi_ulong fpstate_addr; unsigned int tmpflags; cpu_x86_load_seg(env, R_GS, tswap16(sc->gs)); cpu_x86_load_seg(env, R_FS, tswap16(sc->fs)); cpu_x86_load_seg(env, R_ES, tswap16(sc->es)); cpu_x86_load_seg(env, R_DS, tswap16... |
1 | static ssize_t local_readlink(FsContext *fs_ctx, V9fsPath *fs_path, char *buf, size_t bufsz){ ssize_t tsize = -1; char *buffer; char *path = fs_path->data; if ((fs_ctx->export_flags & V9FS_SM_MAPPED) || (fs_ctx->export_flags & V9FS_SM_MAPPED_FILE)) { int fd; buffer = rpath(fs_ctx, path); fd = open(buffer, O_RDONLY | O_... |
1 | static void htab_save_first_pass(QEMUFile *f, sPAPRMachineState *spapr, int64_t max_ns){ bool has_timeout = max_ns != -1; int htabslots = HTAB_SIZE(spapr) / HASH_PTE_SIZE_64; int index = spapr->htab_save_index; int64_t starttime = qemu_clock_get_ns(QEMU_CLOCK_REALTIME); assert(spapr->htab_first_pass); do { int chunksta... |
1 | void OPPROTO op_check_addo_64 (void){ if (likely(!(((uint64_t)T2 ^ (uint64_t)T1 ^ UINT64_MAX) & ((uint64_t)T2 ^ (uint64_t)T0) & (1ULL << 63)))) { xer_ov = 0; } else { xer_so = 1; xer_ov = 1; } RETURN();} |
1 | static void vnc_dpy_resize(DisplayChangeListener *dcl, DisplayState *ds){ VncDisplay *vd = ds->opaque; VncState *vs; vnc_abort_display_jobs(vd); /* server surface */ qemu_pixman_image_unref(vd->server); vd->server = pixman_image_create_bits(VNC_SERVER_FB_FORMAT, ds_get_width(ds), ds_get_height(ds), NULL, 0); /* guest s... |
1 | void hbitmap_iter_init(HBitmapIter *hbi, const HBitmap *hb, uint64_t first){ unsigned i, bit; uint64_t pos; hbi->hb = hb; pos = first >> hb->granularity; hbi->pos = pos >> BITS_PER_LEVEL; hbi->granularity = hb->granularity; for (i = HBITMAP_LEVELS; i-- > 0; ) { bit = pos & (BITS_PER_LONG - 1); pos >>= BITS_PER_LEVEL; /... |
1 | print_ipc_cmd(int cmd){#define output_cmd(val) \if( cmd == val ) { \ gemu_log(#val); \ return; \} cmd &= 0xff; /* General IPC commands */ output_cmd( IPC_RMID ); output_cmd( IPC_SET ); output_cmd( IPC_STAT ); output_cmd( IPC_INFO ); /* msgctl() commands */ #ifdef __USER_MISC output_cmd( MSG_STAT ); output_cmd( MSG_INFO... |
1 | static void extract_mpeg4_header(AVFormatContext *infile){ int mpeg4_count, i, size; AVPacket pkt; AVStream *st; const uint8_t *p; mpeg4_count = 0; for(i=0;i<infile->nb_streams;i++) { st = infile->streams[i]; if (st->codec.codec_id == CODEC_ID_MPEG4 && st->codec.extradata_size == 0) { mpeg4_count++; } } if (!mpeg4_coun... |
1 | void avfilter_unref_buffer(AVFilterBufferRef *ref){ if (!ref) return; av_assert0(ref->buf->refcount > 0); if (!(--ref->buf->refcount)) { if (!ref->buf->free) { store_in_pool(ref); return; } ref->buf->free(ref->buf); } if (ref->extended_data != ref->data) av_freep(&ref->extended_data); if (ref->video) av_freep(&ref->vid... |
1 | QmpInputVisitor *qmp_input_visitor_new(QObject *obj, bool strict){ QmpInputVisitor *v; v = g_malloc0(sizeof(*v)); v->visitor.type = VISITOR_INPUT; v->visitor.start_struct = qmp_input_start_struct; v->visitor.end_struct = qmp_input_end_struct; v->visitor.start_list = qmp_input_start_list; v->visitor.next_list = qmp_inpu... |
1 | static void imx_eth_enable_rx(IMXFECState *s){ IMXFECBufDesc bd; bool rx_ring_full; imx_fec_read_bd(&bd, s->rx_descriptor); rx_ring_full = !(bd.flags & ENET_BD_E); if (rx_ring_full) { FEC_PRINTF("RX buffer full\n"); } else if (!s->regs[ENET_RDAR]) { qemu_flush_queued_packets(qemu_get_queue(s->nic)); } s->regs[ENET_RDAR... |
1 | static inline void FUNC(idctSparseColAdd)(pixel *dest, int line_size, DCTELEM *col){ int a0, a1, a2, a3, b0, b1, b2, b3; INIT_CLIP; IDCT_COLS; dest[0] = CLIP(dest[0] + ((a0 + b0) >> COL_SHIFT)); dest += line_size; dest[0] = CLIP(dest[0] + ((a1 + b1) >> COL_SHIFT)); dest += line_size; dest[0] = CLIP(dest[0] + ((a2 + b2)... |
1 | static int bfi_read_packet(AVFormatContext * s, AVPacket * pkt){ BFIContext *bfi = s->priv_data; AVIOContext *pb = s->pb; int ret, audio_offset, video_offset, chunk_size, audio_size = 0; if (bfi->nframes == 0 || pb->eof_reached) { return AVERROR(EIO); /* If all previous chunks were completely read, then find a new one.... |
1 | static int mpc7_decode_frame(AVCodecContext * avctx, void *data, int *data_size, AVPacket *avpkt){ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; MPCContext *c = avctx->priv_data; GetBitContext gb; uint8_t *bits; int i, ch, t; int mb = -1; Band *bands = c->bands; int off; int bits_used, bits_avail; memse... |
1 | static void qpeg_decode_intra(uint8_t *src, uint8_t *dst, int size, int stride, int width, int height){ int i; int code; int c0, c1; int run, copy; int filled = 0; height--; dst = dst + height * stride; while(size > 0) {code = *src++;size--;run = copy = 0;if(code == 0xFC) /* end-of-picture code */ break;if(code >= 0xF8... |
1 | static void usb_mtp_handle_reset(USBDevice *dev){ MTPState *s = USB_MTP(dev); trace_usb_mtp_reset(s->dev.addr);#ifdef __linux__ usb_mtp_inotify_cleanup(s);#endif usb_mtp_object_free(s, QTAILQ_FIRST(&s->objects)); s->session = 0; usb_mtp_data_free(s->data_in); s->data_in = NULL; usb_mtp_data_free(s->data_out); s->data_o... |
0 | int vfio_region_mmap(VFIORegion *region){ int i, prot = 0; char *name; if (!region->mem) { return 0; } prot |= region->flags & VFIO_REGION_INFO_FLAG_READ ? PROT_READ : 0; prot |= region->flags & VFIO_REGION_INFO_FLAG_WRITE ? PROT_WRITE : 0; for (i = 0; i < region->nr_mmaps; i++) { region->mmaps[i].mmap = mmap(NULL, reg... |
0 | float64 HELPER(ucf64_subd)(float64 a, float64 b, CPUUniCore32State *env){ return float64_sub(a, b, &env->ucf64.fp_status);} |
0 | static void text_console_do_init(CharDriverState *chr, DisplayState *ds){ TextConsole *s; static int color_inited; s = chr->opaque; chr->chr_write = console_puts; chr->chr_send_event = console_send_event; s->out_fifo.buf = s->out_fifo_buf; s->out_fifo.buf_size = sizeof(s->out_fifo_buf); s->kbd_timer = qemu_new_timer(rt... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.