label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
0 | static int show_hwaccels(void *optctx, const char *opt, const char *arg) { int i; printf("Hardware acceleration methods:\n"); for (i = 0; hwaccels[i].name; i++) { printf("%s\n", hwaccels[i].name); } printf("\n"); return 0; } | 14,193 |
0 | static int Faac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) { FaacAudioContext *s = avctx->priv_data; int bytes_written, ret; int num_samples = frame ? frame->nb_samples : 0; void *samples = frame ? frame->data[0] : NULL; if ((ret = ff_alloc_packet2(avctx, avpkt, (7 +... | 14,195 |
0 | static int check_mv(H264Context *h, long b_idx, long bn_idx, int mvy_limit){ int v; v = h->ref_cache[0][b_idx] != h->ref_cache[0][bn_idx] | h->mv_cache[0][b_idx][0] - h->mv_cache[0][bn_idx][0] + 3 >= 7U | FFABS( h->mv_cache[0][b_idx][1] - h->mv_cache[0][bn_idx][1] ) >= mvy_limit; if(h->list_count==2){ if(!v) v = h->ref... | 14,196 |
0 | static int decode_band_types(AACContext *ac, enum BandType band_type[120], int band_type_run_end[120], GetBitContext *gb, IndividualChannelStream *ics) { int g, idx = 0; const int bits = (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) ? 3 : 5; for (g = 0; g < ics->num_window_groups; g++) { int k = 0; while (k < ics->... | 14,197 |
1 | static void unassign_storage(SCCB *sccb) { MemoryRegion *mr = NULL; AssignStorage *assign_info = (AssignStorage *) sccb; sclpMemoryHotplugDev *mhd = get_sclp_memory_hotplug_dev(); assert(mhd); ram_addr_t unassign_addr = (assign_info->rn - 1) * mhd->rzm; MemoryRegion *sysmem = get_system_memory(); /* if the addr is a mu... | 14,198 |
1 | static int vpc_read(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sectors) { BDRVVPCState *s = bs->opaque; int ret; int64_t offset; int64_t sectors, sectors_per_block; VHDFooter *footer = (VHDFooter *) s->footer_buf; if (cpu_to_be32(footer->type) == VHD_FIXED) { return bdrv_read(bs->file, sector_num, b... | 14,200 |
1 | BlockDriverAIOCB *dma_bdrv_io( BlockDriverState *bs, QEMUSGList *sg, uint64_t sector_num, DMAIOFunc *io_func, BlockDriverCompletionFunc *cb, void *opaque, bool to_dev) { DMAAIOCB *dbs = qemu_aio_get(&dma_aio_pool, bs, cb, opaque); dbs->acb = NULL; dbs->bs = bs; dbs->sg = sg; dbs->sector_num = sector_num; dbs->sg_cur_in... | 14,201 |
1 | static int avr_probe(AVProbeData *p) { if (AV_RL32(p->buf) == MKTAG('2', 'B', 'I', 'T')) return AVPROBE_SCORE_EXTENSION; return 0; } | 14,202 |
1 | QList *qobject_to_qlist(const QObject *obj) { if (qobject_type(obj) != QTYPE_QLIST) { return NULL; } return container_of(obj, QList, base); } | 14,203 |
1 | static void *spapr_create_fdt_skel(const char *cpu_model, target_phys_addr_t rma_size, target_phys_addr_t initrd_base, target_phys_addr_t initrd_size, target_phys_addr_t kernel_size, const char *boot_device, const char *kernel_cmdline, long hash_shift) { void *fdt; CPUPPCState *env; uint64_t mem_reg_property[2]; uint32... | 14,204 |
0 | void checkasm_check_jpeg2000dsp(void) { LOCAL_ALIGNED_32(uint8_t, ref, [BUF_SIZE*3]); LOCAL_ALIGNED_32(uint8_t, new, [BUF_SIZE*3]); Jpeg2000DSPContext h; ff_jpeg2000dsp_init(&h); if (check_func(h.mct_decode[FF_DWT53], "jpeg2000_rct_int")) check_mct(&ref[BUF_SIZE*0], &ref[BUF_SIZE*1], &ref[BUF_SIZE*2], &new[BUF_SIZE*0],... | 14,205 |
0 | static int skip_check(MpegEncContext *s, Picture *p, Picture *ref){ int x, y, plane; int score=0; int64_t score64=0; for(plane=0; plane<3; plane++){ const int stride= p->linesize[plane]; const int bw= plane ? 1 : 2; for(y=0; y<s->mb_height*bw; y++){ for(x=0; x<s->mb_width*bw; x++){ int v= s->dsp.frame_skip_cmp[1](s, p-... | 14,206 |
0 | static inline void h264_idct8_1d(int16_t *block) { __asm__ volatile( "movq 112(%0), %%mm7 \n\t" "movq 80(%0), %%mm0 \n\t" "movq 48(%0), %%mm3 \n\t" "movq 16(%0), %%mm5 \n\t" "movq %%mm0, %%mm4 \n\t" "movq %%mm5, %%mm1 \n\t" "psraw $1, %%mm4 \n\t" "psraw $1, %%mm1 \n\t" "paddw %%mm0, %%mm4 \n\t" "paddw %%mm5, %%mm1 \n\t... | 14,207 |
1 | static inline int get_segment(CPUState *env, mmu_ctx_t *ctx, target_ulong eaddr, int rw, int type) { target_phys_addr_t hash; target_ulong vsid; int ds, pr, target_page_bits; int ret, ret2; pr = msr_pr; ctx->eaddr = eaddr; #if defined(TARGET_PPC64) if (env->mmu_model & POWERPC_MMU_64) { ppc_slb_t *slb; target_ulong pag... | 14,208 |
1 | static always_inline void gen_op_subfco (void) { gen_op_move_T2_T0(); gen_op_subf(); gen_op_check_subfc(); gen_op_check_subfo(); } | 14,209 |
1 | static void ivshmem_read(void *opaque, const uint8_t *buf, int size) { IVShmemState *s = opaque; int incoming_fd, tmp_fd; int guest_max_eventfd; long incoming_posn; if (fifo8_is_empty(&s->incoming_fifo) && size == sizeof(incoming_posn)) { memcpy(&incoming_posn, buf, size); } else { const uint8_t *p; uint32_t num; IVSHM... | 14,210 |
1 | static void kvm_s390_flic_class_init(ObjectClass *oc, void *data) { DeviceClass *dc = DEVICE_CLASS(oc); S390FLICStateClass *fsc = S390_FLIC_COMMON_CLASS(oc); dc->realize = kvm_s390_flic_realize; dc->vmsd = &kvm_s390_flic_vmstate; dc->reset = kvm_s390_flic_reset; fsc->register_io_adapter = kvm_s390_register_io_adapter; ... | 14,211 |
0 | static bool machine_get_kernel_irqchip(Object *obj, Error **errp) { MachineState *ms = MACHINE(obj); return ms->kernel_irqchip; } | 14,212 |
0 | void bdrv_init_with_whitelist(void) { use_bdrv_whitelist = 1; bdrv_init(); } | 14,213 |
0 | static void gen_cas_asi(DisasContext *dc, TCGv addr, TCGv val2, int insn, int rd) { TCGv val1 = gen_load_gpr(dc, rd); TCGv dst = gen_dest_gpr(dc, rd); TCGv_i32 r_asi = gen_get_asi(dc, insn); gen_helper_cas_asi(dst, cpu_env, addr, val1, val2, r_asi); tcg_temp_free_i32(r_asi); gen_store_gpr(dc, rd, dst); } | 14,215 |
0 | static void rng_random_finalize(Object *obj) { RndRandom *s = RNG_RANDOM(obj); qemu_set_fd_handler(s->fd, NULL, NULL, NULL); if (s->fd != -1) { qemu_close(s->fd); } g_free(s->filename); } | 14,216 |
0 | static void blend_image_rgb(AVFilterContext *ctx, AVFrame *dst, const AVFrame *src, int x, int y) { blend_image_packed_rgb(ctx, dst, src, 0, x, y, 0); } | 14,217 |
0 | static int update_frame_pool(AVCodecContext *avctx, AVFrame *frame) { FramePool *pool = avctx->internal->pool; int i, ret; switch (avctx->codec_type) { case AVMEDIA_TYPE_VIDEO: { uint8_t *data[4]; int linesize[4]; int size[4] = { 0 }; int w = frame->width; int h = frame->height; int tmpsize, unaligned; if (pool->format... | 14,218 |
0 | int vring_pop(VirtIODevice *vdev, Vring *vring, VirtQueueElement *elem) { struct vring_desc desc; unsigned int i, head, found = 0, num = vring->vr.num; uint16_t avail_idx, last_avail_idx; int ret; /* Initialize elem so it can be safely unmapped */ elem->in_num = elem->out_num = 0; /* If there was a fatal error then ref... | 14,219 |
0 | static void cpu_ppc_hdecr_cb(void *opaque) { PowerPCCPU *cpu = opaque; _cpu_ppc_store_hdecr(cpu, 0x00000000, 0xFFFFFFFF, 1); } | 14,221 |
0 | void qemu_system_killed(int signal, pid_t pid) { shutdown_signal = signal; shutdown_pid = pid; no_shutdown = 0; qemu_system_shutdown_request(); } | 14,222 |
0 | static void gen_spr_405 (CPUPPCState *env) { spr_register(env, SPR_4xx_CCR0, "CCR0", SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, &spr_write_generic, 0x00700000); /* Debug */ /* XXX : not implemented */ spr_register(env, SPR_405_DBCR1, "DBCR1", SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, &spr_write_generic, 0x0000... | 14,223 |
0 | static void realtime_init(void) { if (enable_mlock) { if (os_mlock() < 0) { fprintf(stderr, "qemu: locking memory failed\n"); exit(1); } } } | 14,224 |
0 | int net_init_hubport(const NetClientOptions *opts, const char *name, NetClientState *peer, Error **errp) { const NetdevHubPortOptions *hubport; assert(opts->type == NET_CLIENT_OPTIONS_KIND_HUBPORT); assert(!peer); hubport = opts->u.hubport; net_hub_add_port(hubport->hubid, name); return 0; } | 14,225 |
0 | static void switch_v7m_sp(CPUARMState *env, bool new_spsel) { uint32_t tmp; bool old_spsel = env->v7m.control & R_V7M_CONTROL_SPSEL_MASK; if (old_spsel != new_spsel) { tmp = env->v7m.other_sp; env->v7m.other_sp = env->regs[13]; env->regs[13] = tmp; env->v7m.control = deposit32(env->v7m.control, R_V7M_CONTROL_SPSEL_SHIF... | 14,226 |
0 | void qxl_log_cmd_cursor(PCIQXLDevice *qxl, QXLCursorCmd *cmd, int group_id) { QXLCursor *cursor; fprintf(stderr, ": %s", qxl_name(qxl_cursor_cmd, cmd->type)); switch (cmd->type) { case QXL_CURSOR_SET: fprintf(stderr, " +%d+%d visible %s, shape @ 0x%" PRIx64, cmd->u.set.position.x, cmd->u.set.position.y, cmd->u.set.visi... | 14,227 |
0 | static void filter_mb(VP8Context *s, uint8_t *dst[3], VP8Macroblock *mb, int mb_x, int mb_y) { int filter_level, inner_limit, hev_thresh, mbedge_lim, bedge_lim; filter_level_for_mb(s, mb, &filter_level, &inner_limit, &hev_thresh); if (!filter_level) return; mbedge_lim = 2*(filter_level+2) + inner_limit; bedge_lim = 2* ... | 14,229 |
0 | static uint64_t memcard_read(void *opaque, target_phys_addr_t addr, unsigned size) { MilkymistMemcardState *s = opaque; uint32_t r = 0; addr >>= 2; switch (addr) { case R_CMD: if (!s->enabled) { r = 0xff; } else { r = s->response[s->response_read_ptr++]; if (s->response_read_ptr > s->response_len) { error_report("milky... | 14,230 |
0 | START_TEST(qstring_get_str_test) { QString *qstring; const char *ret_str; const char *str = "QEMU/KVM"; qstring = qstring_from_str(str); ret_str = qstring_get_str(qstring); fail_unless(strcmp(ret_str, str) == 0); QDECREF(qstring); } | 14,232 |
0 | static inline void set_bit(uint32_t *field, int bit) { field[bit >> 5] |= 1 << (bit & 0x1F); } | 14,233 |
0 | static int vdi_co_read(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sectors) { BDRVVdiState *s = bs->opaque; uint32_t bmap_entry; uint32_t block_index; uint32_t sector_in_block; uint32_t n_sectors; int ret; logout("\n"); restart: block_index = sector_num / s->block_sectors; sector_in_block = sector_nu... | 14,234 |
0 | static void hmp_cont_cb(void *opaque, int err) { Monitor *mon = opaque; if (!err) { hmp_cont(mon, NULL); } } | 14,235 |
0 | static int64_t buffered_get_rate_limit(void *opaque) { QEMUFileBuffered *s = opaque; return s->xfer_limit; } | 14,237 |
0 | static int mmu_translate_segment(CPUS390XState *env, target_ulong vaddr, uint64_t asc, uint64_t st_entry, target_ulong *raddr, int *flags, int rw) { CPUState *cs = CPU(s390_env_get_cpu(env)); uint64_t origin, offs, pt_entry; if (st_entry & _SEGMENT_ENTRY_RO) { *flags &= ~PAGE_WRITE; } if ((st_entry & _SEGMENT_ENTRY_FC)... | 14,238 |
0 | static int64_t coroutine_fn bdrv_co_get_block_status_above(BlockDriverState *bs, BlockDriverState *base, int64_t sector_num, int nb_sectors, int *pnum, BlockDriverState **file) { BlockDriverState *p; int64_t ret = 0; bool first = true; assert(bs != base); for (p = bs; p != base; p = backing_bs(p)) { ret = bdrv_co_get_b... | 14,239 |
0 | static uint64_t openpic_src_read(void *opaque, uint64_t addr, unsigned len) { OpenPICState *opp = opaque; uint32_t retval; int idx; DPRINTF("%s: addr %#" HWADDR_PRIx "\n", __func__, addr); retval = 0xFFFFFFFF; if (addr & 0xF) { return retval; } addr = addr & 0xFFF0; idx = addr >> 5; if (addr & 0x10) { /* EXDE / IFEDE /... | 14,241 |
0 | static CharDriverState *chr_baum_init(const char *id, ChardevBackend *backend, ChardevReturn *ret, Error **errp) { BaumDriverState *baum; CharDriverState *chr; brlapi_handle_t *handle; #if defined(CONFIG_SDL) #if SDL_COMPILEDVERSION < SDL_VERSIONNUM(2, 0, 0) SDL_SysWMinfo info; #endif #endif int tty; baum = g_malloc0(s... | 14,242 |
1 | QemuOpts *qemu_opts_create(QemuOptsList *list, const char *id, int fail_if_exists) { QemuOpts *opts = NULL; if (id) { if (!id_wellformed(id)) { qerror_report(QERR_INVALID_PARAMETER_VALUE, "id", "an identifier"); error_printf_unless_qmp("Identifiers consist of letters, digits, '-', '.', '_', starting with a letter.\n");... | 14,243 |
1 | static int yuv4_read_header(AVFormatContext *s) { char header[MAX_YUV4_HEADER + 10]; // Include headroom for // the longest option char *tokstart, *tokend, *header_end; int i; AVIOContext *pb = s->pb; int width = -1, height = -1, raten = 0, rated = 0, aspectn = 0, aspectd = 0; enum AVPixelFormat pix_fmt = AV_PIX_FMT_NO... | 14,245 |
1 | static uint64_t uart_read(void *opaque, target_phys_addr_t offset, unsigned size) { UartState *s = (UartState *)opaque; uint32_t c = 0; offset >>= 2; if (offset > R_MAX) { return 0; } else if (offset == R_TX_RX) { uart_read_rx_fifo(s, &c); return c; } return s->r[offset]; } | 14,246 |
1 | static av_cold void alloc_temp(HYuvContext *s) { int i; if (s->bitstream_bpp<24) { for (i=0; i<3; i++) { s->temp[i]= av_malloc(s->width + 16); } } else { s->temp[0]= av_mallocz(4*s->width + 16); } } | 14,247 |
1 | static int r3d_read_red1(AVFormatContext *s) { AVStream *st = avformat_new_stream(s, NULL); char filename[258]; int tmp; int av_unused tmp2; AVRational framerate; if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = CODEC_ID_JPEG2000; tmp = avio_r8(s->pb); // major version ... | 14,249 |
1 | unsigned int avpriv_toupper4(unsigned int x) { return av_toupper(x & 0xFF) + (av_toupper((x >> 8) & 0xFF) << 8) + (av_toupper((x >> 16) & 0xFF) << 16) + (av_toupper((x >> 24) & 0xFF) << 24); } | 14,250 |
1 | void pcie_cap_slot_hot_unplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { uint8_t *exp_cap; pcie_cap_slot_hotplug_common(PCI_DEVICE(hotplug_dev), dev, &exp_cap, errp); object_unparent(OBJECT(dev)); pci_word_test_and_clear_mask(exp_cap + PCI_EXP_SLTSTA, PCI_EXP_SLTSTA_PDS); pcie_cap_slot_event(PCI_... | 14,251 |
0 | int av_write_trailer(AVFormatContext *s) { int ret; while(s->packet_buffer){ int ret; AVPacketList *pktl= s->packet_buffer; //av_log(s, AV_LOG_DEBUG, "write_trailer st:%d dts:%lld\n", pktl->pkt.stream_index, pktl->pkt.dts); truncate_ts(s->streams[pktl->pkt.stream_index], &pktl->pkt); ret= s->oformat->write_packet(s, &p... | 14,252 |
1 | int ff_dca_xll_filter_frame(DCAXllDecoder *s, AVFrame *frame) { AVCodecContext *avctx = s->avctx; DCAContext *dca = avctx->priv_data; DCAExssAsset *asset = &dca->exss.assets[0]; DCAXllChSet *p = &s->chset[0], *c; enum AVMatrixEncoding matrix_encoding = AV_MATRIX_ENCODING_NONE; int i, j, k, ret, shift, nsamples, request... | 14,253 |
1 | static void nbd_refresh_limits(BlockDriverState *bs, Error **errp) { bs->bl.max_discard = UINT32_MAX >> BDRV_SECTOR_BITS; bs->bl.max_transfer_length = UINT32_MAX >> BDRV_SECTOR_BITS; } | 14,255 |
1 | static void posix_aio_read(void *opaque) { PosixAioState *s = opaque; ssize_t len; /* read all bytes from signal pipe */ for (;;) { char bytes[16]; len = read(s->rfd, bytes, sizeof(bytes)); if (len == -1 && errno == EINTR) continue; /* try again */ if (len == sizeof(bytes)) continue; /* more to read */ break; } posix_a... | 14,256 |
1 | static int qemu_rdma_register_and_get_keys(RDMAContext *rdma, RDMALocalBlock *block, uint8_t *host_addr, uint32_t *lkey, uint32_t *rkey, int chunk, uint8_t *chunk_start, uint8_t *chunk_end) { if (block->mr) { if (lkey) { *lkey = block->mr->lkey; } if (rkey) { *rkey = block->mr->rkey; } return 0; } /* allocate memory to... | 14,257 |
0 | static int get_logical_cpus(AVCodecContext *avctx) { int ret, nb_cpus = 1; #if HAVE_SCHED_GETAFFINITY && defined(CPU_COUNT) cpu_set_t cpuset; CPU_ZERO(&cpuset); ret = sched_getaffinity(0, sizeof(cpuset), &cpuset); if (!ret) { nb_cpus = CPU_COUNT(&cpuset); } #elif HAVE_GETSYSTEMINFO SYSTEM_INFO sysinfo; GetSystemInfo(&s... | 14,258 |
0 | static av_cold int ljpeg_encode_close(AVCodecContext *avctx) { LJpegEncContext *s = avctx->priv_data; av_frame_free(&avctx->coded_frame); av_freep(&s->scratch); return 0; } | 14,259 |
0 | bool timerlistgroup_run_timers(QEMUTimerListGroup *tlg) { QEMUClockType type; bool progress = false; for (type = 0; type < QEMU_CLOCK_MAX; type++) { progress |= timerlist_run_timers(tlg->tl[type]); } return progress; } | 14,260 |
0 | static void channel_load_c(struct fs_dma_ctrl *ctrl, int c) { target_phys_addr_t addr = channel_reg(ctrl, c, RW_GROUP_DOWN); /* Load and decode. FIXME: handle endianness. */ cpu_physical_memory_read (addr, (void *) &ctrl->channels[c].current_c, sizeof ctrl->channels[c].current_c); D(dump_c(c, &ctrl->channels[c].current... | 14,261 |
0 | static void sigfd_handler(void *opaque) { int fd = (intptr_t)opaque; struct qemu_signalfd_siginfo info; struct sigaction action; ssize_t len; while (1) { do { len = read(fd, &info, sizeof(info)); } while (len == -1 && errno == EINTR); if (len == -1 && errno == EAGAIN) { break; } if (len != sizeof(info)) { printf("read ... | 14,262 |
0 | build_srat(GArray *table_data, GArray *linker) { AcpiSystemResourceAffinityTable *srat; AcpiSratProcessorAffinity *core; AcpiSratMemoryAffinity *numamem; int i; uint64_t curnode; int srat_start, numa_start, slots; uint64_t mem_len, mem_base, next_base; PCMachineState *pcms = PC_MACHINE(qdev_get_machine()); ram_addr_t h... | 14,264 |
0 | static inline bool gluster_supports_zerofill(void) { return 0; } | 14,265 |
0 | static void trigger_page_fault(CPUS390XState *env, target_ulong vaddr, uint32_t type, uint64_t asc, int rw) { CPUState *cs = CPU(s390_env_get_cpu(env)); int ilen = ILEN_LATER; int bits = trans_bits(env, asc); /* Code accesses have an undefined ilc. */ if (rw == 2) { ilen = 2; } DPRINTF("%s: vaddr=%016" PRIx64 " bits=%d... | 14,266 |
0 | build_dsdt(GArray *table_data, GArray *linker, AcpiCpuInfo *cpu, AcpiPmInfo *pm, AcpiMiscInfo *misc, PcPciInfo *pci, MachineState *machine) { CrsRangeEntry *entry; Aml *dsdt, *sb_scope, *scope, *dev, *method, *field, *pkg, *crs; GPtrArray *mem_ranges = g_ptr_array_new_with_free_func(crs_range_free); GPtrArray *io_range... | 14,268 |
0 | static void setup_frame(int sig, struct target_sigaction * ka, target_sigset_t *set, CPUMIPSState *regs) { struct sigframe *frame; abi_ulong frame_addr; int i; frame_addr = get_sigframe(ka, regs, sizeof(*frame)); if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 0)) goto give_sigsegv; install_sigtramp(frame->sf_co... | 14,269 |
0 | void helper_fcmpo(CPUPPCState *env, uint64_t arg1, uint64_t arg2, uint32_t crfD) { CPU_DoubleU farg1, farg2; uint32_t ret = 0; farg1.ll = arg1; farg2.ll = arg2; if (unlikely(float64_is_any_nan(farg1.d) || float64_is_any_nan(farg2.d))) { ret = 0x01UL; } else if (float64_lt(farg1.d, farg2.d, &env->fp_status)) { ret = 0x0... | 14,270 |
0 | static void taihu_cpld_writew (void *opaque, hwaddr addr, uint32_t value) { taihu_cpld_writeb(opaque, addr, (value >> 8) & 0xFF); taihu_cpld_writeb(opaque, addr + 1, value & 0xFF); } | 14,273 |
0 | void ff_imdct_calc_sse(MDCTContext *s, FFTSample *output, const FFTSample *input, FFTSample *tmp) { long k, n8, n4, n2, n; const uint16_t *revtab = s->fft.revtab; const FFTSample *tcos = s->tcos; const FFTSample *tsin = s->tsin; const FFTSample *in1, *in2; FFTComplex *z = (FFTComplex *)tmp; n = 1 << s->nbits; n2 = n >>... | 14,274 |
0 | QemuConsole *graphic_console_init(graphic_hw_update_ptr update, graphic_hw_invalidate_ptr invalidate, graphic_hw_screen_dump_ptr screen_dump, graphic_hw_text_update_ptr text_update, void *opaque) { int width = 640; int height = 480; QemuConsole *s; DisplayState *ds; ds = get_alloc_displaystate(); trace_console_gfx_new(... | 14,275 |
0 | virtio_crypto_check_cryptodev_is_used(const Object *obj, const char *name, Object *val, Error **errp) { if (cryptodev_backend_is_used(CRYPTODEV_BACKEND(val))) { char *path = object_get_canonical_path_component(val); error_setg(errp, "can't use already used cryptodev backend: %s", path); g_free(path); } else { qdev_prop... | 14,276 |
0 | static void device_unparent(Object *obj) { DeviceState *dev = DEVICE(obj); if (dev->parent_bus != NULL) { bus_remove_child(dev->parent_bus, dev); } } | 14,277 |
0 | static always_inline int isnormal (float64 d) { CPU_DoubleU u; u.d = d; uint32_t exp = (u.ll >> 52) & 0x7FF; return ((0 < exp) && (exp < 0x7FF)); } | 14,278 |
0 | static void virtio_set_status(struct subchannel_id schid, unsigned long dev_addr) { unsigned char status = dev_addr; run_ccw(schid, CCW_CMD_WRITE_STATUS, &status, sizeof(status)); } | 14,279 |
0 | bool has_help_option(const char *param) { size_t buflen = strlen(param) + 1; char *buf = g_malloc(buflen); const char *p = param; bool result = false; while (*p) { p = get_opt_value(buf, buflen, p); if (*p) { p++; } if (is_help_option(buf)) { result = true; goto out; } } out: free(buf); return result; } | 14,280 |
0 | setup_sigcontext(CPUMIPSState *regs, struct target_sigcontext *sc) { int err = 0; int i; __put_user(exception_resume_pc(regs), &sc->sc_pc); regs->hflags &= ~MIPS_HFLAG_BMASK; __put_user(0, &sc->sc_regs[0]); for (i = 1; i < 32; ++i) { __put_user(regs->active_tc.gpr[i], &sc->sc_regs[i]); } __put_user(regs->active_tc.HI[0... | 14,281 |
0 | 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, tswap... | 14,282 |
0 | static void gen_arm_parallel_addsub(int op1, int op2, TCGv a, TCGv b) { TCGv tmp; switch (op1) { #define gen_pas_helper(name) glue(gen_helper_,name)(a, a, b, tmp) case 1: tmp = tcg_temp_new(TCG_TYPE_PTR); tcg_gen_addi_ptr(tmp, cpu_env, offsetof(CPUState, GE)); PAS_OP(s) break; case 5: tmp = tcg_temp_new(TCG_TYPE_PTR); ... | 14,283 |
0 | static void bdrv_dirty_bitmap_truncate(BlockDriverState *bs) { BdrvDirtyBitmap *bitmap; uint64_t size = bdrv_nb_sectors(bs); QLIST_FOREACH(bitmap, &bs->dirty_bitmaps, list) { if (bdrv_dirty_bitmap_frozen(bitmap)) { continue; } hbitmap_truncate(bitmap->bitmap, size); bitmap->size = size; } } | 14,284 |
0 | static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data_chunk_size) { ASFContext *asf = s->priv_data; AVIOContext *pb = s->pb; AVDictionaryEntry *tags[5]; int header_size, n, extra_size, extra_size2, wav_extra_size, file_time; int has_title; int metadata_count; AVCodecContext *enc; int64_t head... | 14,285 |
0 | static void test_primitives(gconstpointer opaque) { TestArgs *args = (TestArgs *) opaque; const SerializeOps *ops = args->ops; PrimitiveType *pt = args->test_data; PrimitiveType *pt_copy = g_malloc0(sizeof(*pt_copy)); Error *err = NULL; void *serialize_data; pt_copy->type = pt->type; ops->serialize(pt, &serialize_data,... | 14,286 |
0 | static inline void tcg_out_ld_ptr(TCGContext *s, TCGReg ret, uintptr_t arg) { TCGReg base = TCG_REG_G0; if (!check_fit_tl(arg, 10)) { tcg_out_movi(s, TCG_TYPE_PTR, ret, arg & ~0x3ff); base = ret; } tcg_out_ld(s, TCG_TYPE_PTR, ret, base, arg & 0x3ff); } | 14,287 |
0 | void json_end_array(QJSON *json) { qstring_append(json->str, " ]"); json->omit_comma = false; } | 14,288 |
0 | static void device_set_bootindex(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { BootIndexProperty *prop = opaque; int32_t boot_index; Error *local_err = NULL; visit_type_int32(v, name, &boot_index, &local_err); if (local_err) { goto out; } /* check whether bootindex is present in fw_boot_order... | 14,290 |
0 | static void q35_host_get_pci_hole_end(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { Q35PCIHost *s = Q35_HOST_DEVICE(obj); uint32_t value = s->mch.pci_hole.end; visit_type_uint32(v, name, &value, errp); } | 14,291 |
1 | static int mp_dacl_setxattr(FsContext *ctx, const char *path, const char *name, void *value, size_t size, int flags) { char *buffer; int ret; buffer = rpath(ctx, path); ret = lsetxattr(buffer, MAP_ACL_DEFAULT, value, size, flags); g_free(buffer); return ret; } | 14,292 |
1 | static void clear_tco_status(const TestData *d) { qpci_io_writew(d->dev, d->tco_io_base + TCO1_STS, 0x0008); qpci_io_writew(d->dev, d->tco_io_base + TCO2_STS, 0x0002); qpci_io_writew(d->dev, d->tco_io_base + TCO2_STS, 0x0004); } | 14,293 |
1 | static int qemu_rdma_registration_stop(QEMUFile *f, void *opaque, uint64_t flags) { Error *local_err = NULL, **errp = &local_err; QEMUFileRDMA *rfile = opaque; RDMAContext *rdma = rfile->rdma; RDMAControlHeader head = { .len = 0, .repeat = 1 }; int ret = 0; CHECK_ERROR_STATE(); qemu_fflush(f); ret = qemu_rdma_drain_cq(... | 14,294 |
1 | static void adpcm_compress_trellis(AVCodecContext *avctx, const int16_t *samples, uint8_t *dst, ADPCMChannelStatus *c, int n, int stride) { //FIXME 6% faster if frontier is a compile-time constant ADPCMEncodeContext *s = avctx->priv_data; const int frontier = 1 << avctx->trellis; const int version = avctx->codec->id; T... | 14,295 |
1 | USBDevice *usbdevice_create(const char *cmdline) { USBBus *bus = usb_bus_find(-1 /* any */); LegacyUSBFactory *f = NULL; Error *err = NULL; GSList *i; char driver[32]; const char *params; int len; USBDevice *dev; ObjectClass *klass; DeviceClass *dc; params = strchr(cmdline,':'); if (params) { params++; len = params - c... | 14,296 |
1 | e1000e_write_ext_rx_descr(E1000ECore *core, uint8_t *desc, struct NetRxPkt *pkt, const E1000E_RSSInfo *rss_info, uint16_t length) { union e1000_rx_desc_extended *d = (union e1000_rx_desc_extended *) desc; memset(d, 0, sizeof(*d)); d->wb.upper.length = cpu_to_le16(length); e1000e_build_rx_metadata(core, pkt, pkt != NULL... | 14,297 |
1 | static inline uint16_t mipsdsp_sub_i16(int16_t a, int16_t b, CPUMIPSState *env) { int16_t temp; temp = a - b; if (MIPSDSP_OVERFLOW(a, -b, temp, 0x8000)) { set_DSPControl_overflow_flag(1, 20, env); } return temp; } | 14,298 |
1 | int ff_g723_1_scale_vector(int16_t *dst, const int16_t *vector, int length) { int bits, max = 0; int i; for (i = 0; i < length; i++) max |= FFABS(vector[i]); bits= 14 - av_log2_16bit(max); bits= FFMAX(bits, 0); for (i = 0; i < length; i++) dst[i] = vector[i] << bits >> 3; return bits - 3; } | 14,299 |
0 | void sws_freeFilter(SwsFilter *filter) { if (!filter) return; if (filter->lumH) sws_freeVec(filter->lumH); if (filter->lumV) sws_freeVec(filter->lumV); if (filter->chrH) sws_freeVec(filter->chrH); if (filter->chrV) sws_freeVec(filter->chrV); av_free(filter); } | 14,301 |
1 | static void phys_sections_clear(void) { phys_sections_nb = 0; } | 14,302 |
1 | void add_codec(FFStream *stream, AVCodecContext *av) { AVStream *st; /* compute default parameters */ switch(av->codec_type) { case CODEC_TYPE_AUDIO: if (av->bit_rate == 0) av->bit_rate = 64000; if (av->sample_rate == 0) av->sample_rate = 22050; if (av->channels == 0) av->channels = 1; break; case CODEC_TYPE_VIDEO: if ... | 14,303 |
0 | static int output_frame(H264Context *h, AVFrame *dst, H264Picture *srcp) { AVFrame *src = srcp->f; int ret; if (src->format == AV_PIX_FMT_VIDEOTOOLBOX && src->buf[0]->size == 1) return AVERROR_EXTERNAL; ret = av_frame_ref(dst, src); if (ret < 0) return ret; av_dict_set(&dst->metadata, "stereo_mode", ff_h264_sei_stereo_... | 14,305 |
0 | int ff_dxva2_is_d3d11(const AVCodecContext *avctx) { if (CONFIG_D3D11VA) return avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD; else return 0; } | 14,307 |
1 | static int nsv_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { NSVContext *nsv = s->priv_data; AVStream *st = s->streams[stream_index]; NSVStream *nst = st->priv_data; int index; index = av_index_search_timestamp(st, timestamp, flags); if(index < 0) return -1; avio_seek(s->pb, st->index_... | 14,310 |
1 | static inline abi_long do_semctl(int semid, int semnum, int cmd, union target_semun target_su) { union semun arg; struct semid_ds dsarg; unsigned short *array; struct seminfo seminfo; abi_long ret = -TARGET_EINVAL; abi_long err; cmd &= 0xff; switch( cmd ) { case GETVAL: case SETVAL: arg.val = tswapl(target_su.val); ret... | 14,311 |
1 | DISAS_INSN(wdebug) { if (IS_USER(s)) { gen_exception(s, s->pc - 2, EXCP_PRIVILEGE); return; } /* TODO: Implement wdebug. */ qemu_assert(0, "WDEBUG not implemented"); } | 14,313 |
1 | static int coroutine_fn cow_read(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sectors) { BDRVCowState *s = bs->opaque; int ret, n; while (nb_sectors > 0) { if (cow_co_is_allocated(bs, sector_num, nb_sectors, &n)) { ret = bdrv_pread(bs->file, s->cow_sectors_offset + sector_num * 512, buf, n * 512); if ... | 14,314 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.