label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
0 | yuv2mono_2_c_template(SwsContext *c, const uint16_t *buf0, const uint16_t *buf1, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, const uint16_t *abuf1, uint8_t *dest, int dstW, int yalpha, int uvalpha, int y, enum PixelFormat target) { const uint8_t * c... | 12,475 |
0 | static void acpi_set_cpu_present_bit(AcpiCpuHotplug *g, CPUState *cpu, Error **errp) { CPUClass *k = CPU_GET_CLASS(cpu); int64_t cpu_id; cpu_id = k->get_arch_id(cpu); if ((cpu_id / 8) >= ACPI_GPE_PROC_LEN) { error_setg(errp, "acpi: invalid cpu id: %" PRIi64, cpu_id); return; } g->sts[cpu_id / 8] |= (1 << (cpu_id % 8));... | 12,476 |
0 | uint32_t HELPER(get_cp15)(CPUARMState *env, uint32_t insn) { int op1; int op2; int crm; op1 = (insn >> 21) & 7; op2 = (insn >> 5) & 7; crm = insn & 0xf; switch ((insn >> 16) & 0xf) { case 0: /* ID codes. */ switch (op1) { case 0: switch (crm) { case 0: switch (op2) { case 0: /* Device ID. */ return env->cp15.c0_cpuid; ... | 12,478 |
0 | static void hpet_ram_writel(void *opaque, target_phys_addr_t addr, uint32_t value) { int i; HPETState *s = opaque; uint64_t old_val, new_val, val, index; DPRINTF("qemu: Enter hpet_ram_writel at %" PRIx64 " = %#x\n", addr, value); index = addr; old_val = hpet_ram_readl(opaque, addr); new_val = value; /*address range of ... | 12,479 |
0 | static void create_pcie(const VirtBoardInfo *vbi, qemu_irq *pic, bool use_highmem) { hwaddr base_mmio = vbi->memmap[VIRT_PCIE_MMIO].base; hwaddr size_mmio = vbi->memmap[VIRT_PCIE_MMIO].size; hwaddr base_mmio_high = vbi->memmap[VIRT_PCIE_MMIO_HIGH].base; hwaddr size_mmio_high = vbi->memmap[VIRT_PCIE_MMIO_HIGH].size; hwa... | 12,480 |
0 | int omap_validate_emifs_addr(struct omap_mpu_state_s *s, target_phys_addr_t addr) { return addr >= OMAP_EMIFS_BASE && addr < OMAP_EMIFF_BASE; } | 12,481 |
0 | static int ppc_hash64_get_physical_address(CPUPPCState *env, struct mmu_ctx_hash64 *ctx, target_ulong eaddr, int rw, int access_type) { bool real_mode = (access_type == ACCESS_CODE && msr_ir == 0) || (access_type != ACCESS_CODE && msr_dr == 0); if (real_mode) { ctx->raddr = eaddr & 0x0FFFFFFFFFFFFFFFULL; ctx->prot = PA... | 12,482 |
0 | void cpu_resume_from_signal(CPUState *env1, void *puc) { env = env1; /* XXX: restore cpu registers saved in host registers */ env->exception_index = -1; longjmp(env->jmp_env, 1); } | 12,483 |
0 | static void minimac2_cleanup(NetClientState *nc) { MilkymistMinimac2State *s = qemu_get_nic_opaque(nc); s->nic = NULL; } | 12,484 |
0 | static int webp_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { AVFrame * const p = data; WebPContext *s = avctx->priv_data; GetByteContext gb; int ret; uint32_t chunk_type, chunk_size; int vp8x_flags = 0; s->avctx = avctx; s->width = 0; s->height = 0; *got_frame = 0; s->has_alpha = 0... | 12,486 |
0 | static int find_hw_breakpoint(target_ulong addr, int len, int type) { int n; for (n = 0; n < nb_hw_breakpoint; n++) if (hw_breakpoint[n].addr == addr && hw_breakpoint[n].type == type && (hw_breakpoint[n].len == len || len == -1)) return n; return -1; } | 12,487 |
1 | static void qobject_input_start_struct(Visitor *v, const char *name, void **obj, size_t size, Error **errp) { QObjectInputVisitor *qiv = to_qiv(v); QObject *qobj = qobject_input_get_object(qiv, name, true, errp); if (obj) { *obj = NULL; } if (!qobj) { return; } if (qobject_type(qobj) != QTYPE_QDICT) { error_setg(errp, ... | 12,488 |
1 | static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length) { int i, consumed, ret = 0; s->ref = NULL; s->last_eos = s->eos; s->eos = 0; /* split the input packet into NAL units, so we know the upper bound on the * number of slices in the frame */ s->nb_nals = 0; while (length >= 4) { HEVCNAL *nal; int ... | 12,489 |
1 | static uint64_t vfio_rom_read(void *opaque, hwaddr addr, unsigned size) { VFIODevice *vdev = opaque; uint64_t val = ((uint64_t)1 << (size * 8)) - 1; /* Load the ROM lazily when the guest tries to read it */ if (unlikely(!vdev->rom)) { memcpy(&val, vdev->rom + addr, (addr < vdev->rom_size) ? MIN(size, vdev->rom_size - a... | 12,490 |
1 | static void vtd_handle_gcmd_qie(IntelIOMMUState *s, bool en) { uint64_t iqa_val = vtd_get_quad_raw(s, DMAR_IQA_REG); trace_vtd_inv_qi_enable(en); if (en) { if (vtd_queued_inv_enable_check(s)) { s->iq = iqa_val & VTD_IQA_IQA_MASK; /* 2^(x+8) entries */ s->iq_size = 1UL << ((iqa_val & VTD_IQA_QS) + 8); s->qi_enabled = tr... | 12,491 |
1 | static int get_qPy_pred(HEVCContext *s, int xC, int yC, int xBase, int yBase, int log2_cb_size) { HEVCLocalContext *lc = s->HEVClc; int ctb_size_mask = (1 << s->sps->log2_ctb_size) - 1; int MinCuQpDeltaSizeMask = (1 << (s->sps->log2_ctb_size - s->pps->diff_cu_qp_delta_depth)) - 1; int xQgBase = xBase - (xBase & MinCuQp... | 12,492 |
1 | static void framebuffer_update_request(VncState *vs, int incremental, int x_position, int y_position, int w, int h) { if (x_position > ds_get_width(vs->ds)) x_position = ds_get_width(vs->ds); if (y_position > ds_get_height(vs->ds)) y_position = ds_get_height(vs->ds); if (x_position + w >= ds_get_width(vs->ds)) w = ds_g... | 12,494 |
1 | static void vnc_connect(VncDisplay *vd, int csock) { VncState *vs = qemu_mallocz(sizeof(VncState)); vs->csock = csock; VNC_DEBUG("New client on socket %d\n", csock); dcl->idle = 0; socket_set_nonblock(vs->csock); qemu_set_fd_handler2(vs->csock, NULL, vnc_client_read, NULL, vs); vs->vd = vd; vs->ds = vd->ds; vs->timer =... | 12,495 |
1 | static uint32_t get_elf_hwcap(void) { CPUState *e = thread_env; uint32_t features = 0; /* We don't have to be terribly complete here; the high points are Altivec/FP/SPE support. Anything else is just a bonus. */ #define GET_FEATURE(flag, feature) \ do {if (e->insns_flags & flag) features |= feature; } while(0) GET_FEAT... | 12,496 |
1 | static inline void RENAME(rgb24tobgr24)(const uint8_t *src, uint8_t *dst, unsigned int src_size) { unsigned i; #ifdef HAVE_MMX long mmx_size= 23 - src_size; asm volatile ( "movq "MANGLE(mask24r)", %%mm5 \n\t" "movq "MANGLE(mask24g)", %%mm6 \n\t" "movq "MANGLE(mask24b)", %%mm7 \n\t" ".balign 16 \n\t" "1: \n\t" PREFETCH"... | 12,497 |
1 | static void ff_amf_tag_contents(void *ctx, const uint8_t *data, const uint8_t *data_end) { int size; char buf[1024]; if (data >= data_end) return; switch (*data++) { case AMF_DATA_TYPE_NUMBER: av_log(ctx, AV_LOG_DEBUG, " number %g\n", av_int2double(AV_RB64(data))); return; case AMF_DATA_TYPE_BOOL: av_log(ctx, AV_LOG_DE... | 12,498 |
1 | static int mov_read_extradata(MOVContext *c, AVIOContext *pb, MOVAtom atom, enum AVCodecID codec_id) { AVStream *st; uint64_t size; uint8_t *buf; int err; if (c->fc->nb_streams < 1) // will happen with jp2 files return 0; st= c->fc->streams[c->fc->nb_streams-1]; if (st->codec->codec_id != codec_id) return 0; /* unexpec... | 12,500 |
1 | int ff_h263_decode_picture_header(MpegEncContext *s) { int format, width, height, i; uint32_t startcode; align_get_bits(&s->gb); startcode= get_bits(&s->gb, 22-8); for(i= get_bits_left(&s->gb); i>24; i-=8) { startcode = ((startcode << 8) | get_bits(&s->gb, 8)) & 0x003FFFFF; if(startcode == 0x20) break; } if (startcode ... | 12,501 |
1 | static uint64_t get_cluster_offset(BlockDriverState *bs, uint64_t offset, int allocate, int compressed_size, int n_start, int n_end) { BDRVQcowState *s = bs->opaque; int min_index, i, j, l1_index, l2_index; uint64_t l2_offset, *l2_table, cluster_offset, tmp; uint32_t min_count; int new_l2_table; l1_index = offset >> (s... | 12,502 |
1 | static BlockAIOCB *blkverify_aio_flush(BlockDriverState *bs, BlockCompletionFunc *cb, void *opaque) { BDRVBlkverifyState *s = bs->opaque; /* Only flush test file, the raw file is not important */ return bdrv_aio_flush(s->test_file->bs, cb, opaque); } | 12,503 |
1 | static int del_existing_snapshots(Monitor *mon, const char *name) { BlockDriverState *bs; QEMUSnapshotInfo sn1, *snapshot = &sn1; int ret; bs = NULL; while ((bs = bdrv_next(bs))) { if (bdrv_can_snapshot(bs) && bdrv_snapshot_find(bs, snapshot, name) >= 0) { ret = bdrv_snapshot_delete(bs, name); if (ret < 0) { monitor_pr... | 12,504 |
1 | static void wavpack_decode_flush(AVCodecContext *avctx) { WavpackContext *s = avctx->priv_data; int i; for (i = 0; i < s->fdec_num; i++) wv_reset_saved_context(s->fdec[i]); } | 12,505 |
1 | inline static void RENAME(hcscale)(SwsContext *c, uint16_t *dst, long dstWidth, uint8_t *src1, uint8_t *src2, int srcW, int xInc, int flags, int canMMX2BeUsed, int16_t *hChrFilter, int16_t *hChrFilterPos, int hChrFilterSize, void *funnyUVCode, int srcFormat, uint8_t *formatConvBuffer, int16_t *mmx2Filter, int32_t *mmx2... | 12,506 |
1 | static int qcow2_check(BlockDriverState *bs, BdrvCheckResult *result, BdrvCheckMode fix) { int ret = qcow2_check_refcounts(bs, result, fix); if (ret < 0) { return ret; } if (fix && result->check_errors == 0 && result->corruptions == 0) { return qcow2_mark_clean(bs); } return ret; } | 12,507 |
1 | static inline void gen_sync_flags(DisasContext *dc) { /* Sync the tb dependent flag between translate and runtime. */ if (dc->tb_flags != dc->synced_flags) { tcg_gen_movi_tl(env_flags, dc->tb_flags); dc->synced_flags = dc->tb_flags; } } | 12,508 |
1 | void avcodec_flush_buffers(AVCodecContext *avctx) { if(HAVE_PTHREADS && avctx->active_thread_type&FF_THREAD_FRAME) ff_thread_flush(avctx); if(avctx->codec->flush) avctx->codec->flush(avctx); } | 12,509 |
0 | static int ipvideo_decode_block_opcode_0x5(IpvideoContext *s) { signed char x, y; /* copy a block from the previous frame using an expanded range; * need 2 more bytes */ CHECK_STREAM_PTR(2); x = *s->stream_ptr++; y = *s->stream_ptr++; debug_interplay (" motion bytes = %d, %d\n", x, y); return copy_from(s, &s->last_fram... | 12,510 |
1 | void smc91c111_init(NICInfo *nd, uint32_t base, qemu_irq irq) { smc91c111_state *s; int iomemtype; qemu_check_nic_model(nd, "smc91c111"); s = (smc91c111_state *)qemu_mallocz(sizeof(smc91c111_state)); iomemtype = cpu_register_io_memory(0, smc91c111_readfn, smc91c111_writefn, s); cpu_register_physical_memory(base, 16, io... | 12,511 |
0 | static av_cold int vc2_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) { int ret; int max_frame_bytes, sig_size = 256; VC2EncContext *s = avctx->priv_data; const char aux_data[] = "FFmpeg version "FFMPEG_VERSION; const int aux_data_size = sizeof(aux_data); const int heade... | 12,512 |
0 | static int estimate_best_b_count(MpegEncContext *s) { AVCodec *codec = avcodec_find_encoder(s->avctx->codec_id); AVCodecContext *c = avcodec_alloc_context3(NULL); AVFrame input[FF_MAX_B_FRAMES + 2]; const int scale = s->avctx->brd_scale; int i, j, out_size, p_lambda, b_lambda, lambda2; int64_t best_rd = INT64_MAX; int ... | 12,513 |
0 | static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_idx) { AVStream *stream = fmt_ctx->streams[stream_idx]; AVCodecContext *dec_ctx; AVCodec *dec; char val_str[128]; AVRational display_aspect_ratio; struct print_buf pbuf = {.s = NULL}; print_section_header("stream"); print_int("index", stream... | 12,514 |
1 | static void spapr_cpu_reset(void *opaque) { PowerPCCPU *cpu = opaque; CPUState *cs = CPU(cpu); CPUPPCState *env = &cpu->env; cpu_reset(cs); /* All CPUs start halted. CPU0 is unhalted from the machine level * reset code and the rest are explicitly started up by the guest * using an RTAS call */ cs->halted = 1; env->spr[... | 12,515 |
1 | static void exynos4210_fimd_update(void *opaque) { Exynos4210fimdState *s = (Exynos4210fimdState *)opaque; DisplaySurface *surface = qemu_console_surface(s->console); Exynos4210fimdWindow *w; int i, line; hwaddr fb_line_addr, inc_size; int scrn_height; int first_line = -1, last_line = -1, scrn_width; bool blend = false... | 12,516 |
1 | static void gen_waiti(DisasContext *dc, uint32_t imm4) { TCGv_i32 pc = tcg_const_i32(dc->next_pc); TCGv_i32 intlevel = tcg_const_i32(imm4); if (dc->tb->cflags & CF_USE_ICOUNT) { gen_io_start(); } gen_helper_waiti(cpu_env, pc, intlevel); if (dc->tb->cflags & CF_USE_ICOUNT) { gen_io_end(); } tcg_temp_free(pc); tcg_temp_f... | 12,517 |
1 | static void spr_read_hdecr(DisasContext *ctx, int gprn, int sprn) { if (ctx->tb->cflags & CF_USE_ICOUNT) { gen_io_start(); } gen_helper_load_hdecr(cpu_gpr[gprn], cpu_env); if (ctx->tb->cflags & CF_USE_ICOUNT) { gen_io_end(); gen_stop_exception(ctx); } } | 12,519 |
1 | static int get_physical_address (CPUState *env, target_ulong *physical, int *prot, target_ulong address, int rw, int access_type) { /* User mode can only access useg/xuseg */ int user_mode = (env->hflags & MIPS_HFLAG_MODE) == MIPS_HFLAG_UM; int supervisor_mode = (env->hflags & MIPS_HFLAG_MODE) == MIPS_HFLAG_SM; int ker... | 12,521 |
1 | void palette8tobgr32(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette) { unsigned i; for(i=0; i<num_pixels; i++) { #ifdef WORDS_BIGENDIAN dst[3]= palette[ src[i]*4+0 ]; dst[2]= palette[ src[i]*4+1 ]; dst[1]= palette[ src[i]*4+2 ]; #else //FIXME slow? dst[0]= palette[ src[i]*4+0 ]; dst[1]= p... | 12,523 |
1 | int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts, int flags){ AVInputFormat *avif= s->iformat; int64_t av_uninit(pos_min), av_uninit(pos_max), pos, pos_limit; int64_t ts_min, ts_max, ts; int index; AVStream *st; if (stream_index < 0) return -1; #ifdef DEBUG_SEEK av_log(s, AV_LOG_DEBUG, "... | 12,524 |
1 | static abi_long do_ipc(unsigned int call, abi_long first, abi_long second, abi_long third, abi_long ptr, abi_long fifth) { int version; abi_long ret = 0; version = call >> 16; call &= 0xffff; switch (call) { case IPCOP_semop: ret = do_semop(first, ptr, second); break; case IPCOP_semget: ret = get_errno(semget(first, se... | 12,525 |
0 | static int virtcon_parse(const char *devname) { QemuOptsList *device = qemu_find_opts("device"); static int index = 0; char label[32]; QemuOpts *bus_opts, *dev_opts; if (strcmp(devname, "none") == 0) return 0; if (index == MAX_VIRTIO_CONSOLES) { fprintf(stderr, "qemu: too many virtio consoles\n"); exit(1); } bus_opts =... | 12,526 |
0 | void helper_lcall_protected(int new_cs, target_ulong new_eip, int shift, int next_eip_addend) { int new_stack, i; uint32_t e1, e2, cpl, dpl, rpl, selector, offset, param_count; uint32_t ss = 0, ss_e1 = 0, ss_e2 = 0, sp, type, ss_dpl, sp_mask; uint32_t val, limit, old_sp_mask; target_ulong ssp, old_ssp, next_eip; next_e... | 12,527 |
0 | static void raw_reopen_abort(BDRVReopenState *state) { g_free(state->opaque); state->opaque = NULL; } | 12,528 |
0 | void err (const char *s) { perror (s); abort (); } | 12,529 |
0 | static void hda_audio_command(HDACodecDevice *hda, uint32_t nid, uint32_t data) { HDAAudioState *a = HDA_AUDIO(hda); HDAAudioStream *st; const desc_node *node = NULL; const desc_param *param; uint32_t verb, payload, response, count, shift; if ((data & 0x70000) == 0x70000) { /* 12/8 id/payload */ verb = (data >> 8) & 0x... | 12,530 |
0 | static void sdp_parse_fmtp_config(AVCodecContext * codec, void *ctx, char *attr, char *value) { switch (codec->codec_id) { case CODEC_ID_MPEG4: case CODEC_ID_AAC: if (!strcmp(attr, "config")) { /* decode the hexa encoded parameter */ int len = hex_to_data(NULL, value); if (codec->extradata) av_free(codec->extradata); c... | 12,531 |
0 | static void mux_print_help(CharDriverState *chr) { int i, j; char ebuf[15] = "Escape-Char"; char cbuf[50] = "\n\r"; if (term_escape_char > 0 && term_escape_char < 26) { snprintf(cbuf, sizeof(cbuf), "\n\r"); snprintf(ebuf, sizeof(ebuf), "C-%c", term_escape_char - 1 + 'a'); } else { snprintf(cbuf, sizeof(cbuf), "\n\rEsca... | 12,532 |
0 | void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict) { struct in_addr host_addr = { .s_addr = INADDR_ANY }; int host_port; char buf[256] = ""; const char *src_str, *p; SlirpState *s; int is_udp = 0; int err; const char *arg1 = qdict_get_str(qdict, "arg1"); const char *arg2 = qdict_get_try_str(qdict, "arg2");... | 12,533 |
0 | static QObject *parse_object(JSONParserContext *ctxt, va_list *ap) { QDict *dict = NULL; QObject *token, *peek; JSONParserContext saved_ctxt = parser_context_save(ctxt); token = parser_context_pop_token(ctxt); if (token == NULL) { goto out; } if (!token_is_operator(token, '{')) { goto out; } dict = qdict_new(); peek = ... | 12,534 |
0 | static void qemu_chr_parse_mux(QemuOpts *opts, ChardevBackend *backend, Error **errp) { const char *chardev = qemu_opt_get(opts, "chardev"); ChardevMux *mux; if (chardev == NULL) { error_setg(errp, "chardev: mux: no chardev given"); return; } mux = backend->u.mux = g_new0(ChardevMux, 1); qemu_chr_parse_common(opts, qap... | 12,535 |
0 | static void do_flush_queued_data(VirtIOSerialPort *port, VirtQueue *vq, VirtIODevice *vdev) { VirtIOSerialPortClass *vsc; assert(port); assert(virtio_queue_ready(vq)); vsc = VIRTIO_SERIAL_PORT_GET_CLASS(port); while (!port->throttled) { unsigned int i; /* Pop an elem only if we haven't left off a previous one mid-way *... | 12,536 |
0 | static void l2cap_command(struct l2cap_instance_s *l2cap, int code, int id, const uint8_t *params, int len) { int err; #if 0 /* TODO: do the IDs really have to be in sequence? */ if (!id || (id != l2cap->last_id && id != l2cap->next_id)) { fprintf(stderr, "%s: out of sequence command packet ignored.\n", __func__); retu... | 12,537 |
0 | static int curl_aio_flush(void *opaque) { BDRVCURLState *s = opaque; int i, j; for (i=0; i < CURL_NUM_STATES; i++) { for(j=0; j < CURL_NUM_ACB; j++) { if (s->states[i].acb[j]) { return 1; } } } return 0; } | 12,538 |
0 | static void test_dynamic_globalprop_subprocess(void) { MyType *mt; static GlobalProperty props[] = { { TYPE_DYNAMIC_PROPS, "prop1", "101", true }, { TYPE_DYNAMIC_PROPS, "prop2", "102", true }, { TYPE_DYNAMIC_PROPS"-bad", "prop3", "103", true }, /* .not_used=false to emulate what qdev_add_one_global() does: */ { TYPE_UN... | 12,539 |
0 | void bdrv_aio_cancel(BlockDriverAIOCB *acb) { if (acb->cb == bdrv_aio_rw_vector_cb) { VectorTranslationState *s = acb->opaque; acb = s->aiocb; } acb->pool->cancel(acb); } | 12,540 |
0 | static void omap_mcbsp_writeh(void *opaque, hwaddr addr, uint32_t value) { struct omap_mcbsp_s *s = (struct omap_mcbsp_s *) opaque; int offset = addr & OMAP_MPUI_REG_MASK; switch (offset) { case 0x00: /* DRR2 */ case 0x02: /* DRR1 */ OMAP_RO_REG(addr); return; case 0x04: /* DXR2 */ if (((s->xcr[0] >> 5) & 7) < 3) /* XW... | 12,541 |
0 | BlockDriverAIOCB *paio_ioctl(BlockDriverState *bs, int fd, unsigned long int req, void *buf, BlockDriverCompletionFunc *cb, void *opaque) { struct qemu_paiocb *acb; acb = qemu_aio_get(&raw_aio_pool, bs, cb, opaque); if (!acb) return NULL; acb->aio_type = QEMU_AIO_IOCTL; acb->aio_fildes = fd; acb->ev_signo = SIGUSR2; ac... | 12,543 |
1 | static void object_get_link_property(Object *obj, Visitor *v, void *opaque, const char *name, Error **errp) { Object **child = opaque; gchar *path; if (*child) { path = object_get_canonical_path(*child); visit_type_str(v, &path, name, errp); g_free(path); } else { path = (gchar *)""; visit_type_str(v, &path, name, errp... | 12,546 |
1 | void FUNCC(ff_h264_idct_dc_add)(uint8_t *_dst, DCTELEM *block, int stride){ int i, j; int dc = (((dctcoef*)block)[0] + 32) >> 6; INIT_CLIP pixel *dst = (pixel*)_dst; stride /= sizeof(pixel); for( j = 0; j < 4; j++ ) { for( i = 0; i < 4; i++ ) dst[i] = CLIP( dst[i] + dc ); dst += stride; } } | 12,547 |
1 | int av_read_frame(AVFormatContext *s, AVPacket *pkt) { const int genpts = s->flags & AVFMT_FLAG_GENPTS; int eof = 0; int ret; AVStream *st; if (!genpts) { ret = s->packet_buffer ? read_from_packet_buffer(&s->packet_buffer, &s->packet_buffer_end, pkt) : read_frame_internal(s, pkt); if (ret < 0) return ret; goto return_p... | 12,549 |
1 | static int buf_get_buffer(void *opaque, uint8_t *buf, int64_t pos, int size) { QEMUBuffer *s = opaque; ssize_t len = qsb_get_length(s->qsb) - pos; if (len <= 0) { return 0; } if (len > size) { len = size; } return qsb_get_buffer(s->qsb, pos, len, buf); } | 12,550 |
1 | int unix_listen(const char *str, char *ostr, int olen) { QemuOpts *opts; char *path, *optstr; int sock, len; opts = qemu_opts_create(&dummy_opts, NULL, 0); optstr = strchr(str, ','); if (optstr) { len = optstr - str; if (len) { path = g_malloc(len+1); snprintf(path, len+1, "%.*s", len, str); qemu_opt_set(opts, "path", ... | 12,551 |
0 | static void render_fragments(Vp3DecodeContext *s, int first_fragment, int width, int height, int plane /* 0 = Y, 1 = U, 2 = V */) { int x, y; int m, n; int i = first_fragment; int j; int16_t *dequantizer; DCTELEM dequant_block[64]; unsigned char *output_plane; unsigned char *last_plane; unsigned char *golden_plane; int... | 12,552 |
0 | static av_cold int color_init(AVFilterContext *ctx, const char *args, void *opaque) { ColorContext *color = ctx->priv; char color_string[128] = "black"; char frame_size [128] = "320x240"; char frame_rate [128] = "25"; AVRational frame_rate_q; char *colon = 0, *equal = 0; int ret = 0; color->class = &color_class; if (ar... | 12,553 |
0 | static int parse_ffconfig(const char *filename) { FILE *f; char line[1024]; char cmd[64]; char arg[1024]; const char *p; int val, errors, line_num; FFStream **last_stream, *stream, *redirect; FFStream **last_feed, *feed, *s; AVCodecContext audio_enc, video_enc; enum CodecID audio_id, video_id; f = fopen(filename, "r");... | 12,554 |
0 | void ff_put_h264_qpel16_mc03_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_vt_qrt_16w_msa(src - (stride * 2), stride, dst, stride, 16, 1); } | 12,555 |
1 | static int ccw_dstream_rw_noflags(CcwDataStream *cds, void *buff, int len, CcwDataStreamOp op) { int ret; ret = cds_check_len(cds, len); if (ret <= 0) { return ret; if (op == CDS_OP_A) { goto incr; ret = address_space_rw(&address_space_memory, cds->cda, MEMTXATTRS_UNSPECIFIED, buff, len, op); if (ret != MEMTX_OK) { cds... | 12,557 |
1 | static void grlib_apbuart_write(void *opaque, hwaddr addr, uint64_t value, unsigned size) { UART *uart = opaque; unsigned char c = 0; addr &= 0xff; /* Unit registers */ switch (addr) { case DATA_OFFSET: case DATA_OFFSET + 3: /* When only one byte write */ /* Transmit when character device available and transmitter enab... | 12,559 |
1 | static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y, const uint8_t **buf, int buf_size) { MpegEncContext *s = &s1->mpeg_enc_ctx; AVCodecContext *avctx= s->avctx; int ret; const int field_pic= s->picture_structure != PICT_FRAME; s->resync_mb_x= s->resync_mb_y= -1; if (mb_y >= s->mb_height){ av_log(s->avctx, AV_LOG_E... | 12,560 |
1 | av_cold void ff_schro_queue_init(FFSchroQueue *queue) { queue->p_head = queue->p_tail = NULL; queue->size = 0; } | 12,561 |
1 | static int ffm_write_header(AVFormatContext *s) { FFMContext *ffm = s->priv_data; AVStream *st; ByteIOContext *pb = s->pb; AVCodecContext *codec; int bit_rate, i; ffm->packet_size = FFM_PACKET_SIZE; /* header */ put_le32(pb, MKTAG('F', 'F', 'M', '1')); put_be32(pb, ffm->packet_size); /* XXX: store write position in oth... | 12,562 |
1 | static int assigned_device_pci_cap_init(PCIDevice *pci_dev, Error **errp) { AssignedDevice *dev = DO_UPCAST(AssignedDevice, dev, pci_dev); PCIRegion *pci_region = dev->real_device.regions; int ret, pos; Error *local_err = NULL; /* Clear initial capabilities pointer and status copied from hw */ pci_set_byte(pci_dev->con... | 12,563 |
1 | int avfilter_graph_send_command(AVFilterGraph *graph, const char *target, const char *cmd, const char *arg, char *res, int res_len, int flags) { int i, r = AVERROR(ENOSYS); if(!graph) return r; if((flags & AVFILTER_CMD_FLAG_ONE) && !(flags & AVFILTER_CMD_FLAG_FAST)) { r=avfilter_graph_send_command(graph, target, cmd, a... | 12,564 |
1 | static void dct_unquantize_mpeg2_c(MpegEncContext *s, DCTELEM *block, int n, int qscale) { int i, level, nCoeffs; const UINT16 *quant_matrix; if(s->alternate_scan) nCoeffs= 64; else nCoeffs= s->block_last_index[n]+1; if (s->mb_intra) { if (n < 4) block[0] = block[0] * s->y_dc_scale; else block[0] = block[0] * s->c_dc_s... | 12,565 |
1 | static void destroy_l2_mapping(PhysPageEntry *lp, unsigned level) { unsigned i; PhysPageEntry *p; if (lp->ptr == PHYS_MAP_NODE_NIL) { return; } p = phys_map_nodes[lp->ptr]; for (i = 0; i < L2_SIZE; ++i) { if (!p[i].is_leaf) { destroy_l2_mapping(&p[i], level - 1); } else { destroy_page_desc(p[i].ptr); } } lp->is_leaf = ... | 12,566 |
1 | static int apply_window_and_mdct(vorbis_enc_context *venc, float **audio, int samples) { int channel; const float * win = venc->win[0]; int window_len = 1 << (venc->log2_blocksize[0] - 1); float n = (float)(1 << venc->log2_blocksize[0]) / 4.0; AVFloatDSPContext *fdsp = venc->fdsp; if (!venc->have_saved && !samples) ret... | 12,568 |
0 | static int transcode(void) { int ret, i; AVFormatContext *is, *os; OutputStream *ost; InputStream *ist; uint8_t *no_packet; int no_packet_count = 0; int64_t timer_start; int key; if (!(no_packet = av_mallocz(nb_input_files))) exit_program(1); ret = transcode_init(); if (ret < 0) goto fail; if (!using_stdin) { av_log(NU... | 12,569 |
0 | static int rtsp_write_packet(AVFormatContext *s, AVPacket *pkt) { RTSPState *rt = s->priv_data; RTSPStream *rtsp_st; fd_set rfds; int n, tcp_fd; struct timeval tv; AVFormatContext *rtpctx; int ret; tcp_fd = url_get_file_handle(rt->rtsp_hd); while (1) { FD_ZERO(&rfds); FD_SET(tcp_fd, &rfds); tv.tv_sec = 0; tv.tv_usec = ... | 12,570 |
1 | static inline TCGv load_reg(DisasContext *s, int reg) { TCGv tmp = new_tmp(); load_reg_var(s, tmp, reg); return tmp; } | 12,571 |
1 | static void ppc_spapr_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 = ar... | 12,572 |
1 | static void hmp_info_cpustats(Monitor *mon, const QDict *qdict) { cpu_dump_statistics(mon_get_cpu(), (FILE *)mon, &monitor_fprintf, 0); } | 12,573 |
1 | static int read_decode_block(ALSDecContext *ctx, ALSBlockData *bd) { int ret; ret = read_block(ctx, bd); if (ret) return ret; ret = decode_block(ctx, bd); return ret; } | 12,574 |
1 | DeviceState *aux_create_slave(AUXBus *bus, const char *type, uint32_t addr) { DeviceState *dev; dev = DEVICE(object_new(type)); assert(dev); qdev_set_parent_bus(dev, &bus->qbus); qdev_init_nofail(dev); aux_bus_map_device(AUX_BUS(qdev_get_parent_bus(dev)), AUX_SLAVE(dev), addr); return dev; } | 12,575 |
1 | static int get_uint64_equal(QEMUFile *f, void *pv, size_t size, VMStateField *field) { uint64_t *v = pv; uint64_t v2; qemu_get_be64s(f, &v2); if (*v == v2) { return 0; error_report("%" PRIx64 " != %" PRIx64, *v, v2); return -EINVAL; | 12,576 |
1 | static void vhost_net_stop_one(struct vhost_net *net, VirtIODevice *dev) { struct vhost_vring_file file = { .fd = -1 }; if (net->nc->info->type == NET_CLIENT_DRIVER_TAP) { for (file.index = 0; file.index < net->dev.nvqs; ++file.index) { const VhostOps *vhost_ops = net->dev.vhost_ops; int r = vhost_ops->vhost_net_set_ba... | 12,577 |
1 | static int pci_init_multifunction(PCIBus *bus, PCIDevice *dev) { uint8_t slot = PCI_SLOT(dev->devfn); uint8_t func; if (dev->cap_present & QEMU_PCI_CAP_MULTIFUNCTION) { dev->config[PCI_HEADER_TYPE] |= PCI_HEADER_TYPE_MULTI_FUNCTION; } /* * multifunction bit is interpreted in two ways as follows. * - all functions must ... | 12,578 |
0 | static int mpeg_mux_init(AVFormatContext *ctx) { MpegMuxContext *s = ctx->priv_data; int bitrate, i, mpa_id, mpv_id, mps_id, ac3_id, dts_id, lpcm_id, j; AVStream *st; StreamInfo *stream; int audio_bitrate; int video_bitrate; s->packet_number = 0; s->is_vcd = (CONFIG_MPEG1VCD_MUXER && ctx->oformat == &mpeg1vcd_muxer); s... | 12,580 |
0 | static av_cold int initFilter(int16_t **outFilter, int32_t **filterPos, int *outFilterSize, int xInc, int srcW, int dstW, int filterAlign, int one, int flags, int cpu_flags, SwsVector *srcFilter, SwsVector *dstFilter, double param[2], int srcPos, int dstPos) { int i; int filterSize; int filter2Size; int minFilterSize; ... | 12,581 |
1 | static av_cold int vorbis_encode_init(AVCodecContext *avccontext) { vorbis_enc_context *venc = avccontext->priv_data; if (avccontext->channels != 2) { av_log(avccontext, AV_LOG_ERROR, "Current Libav Vorbis encoder only supports 2 channels.\n"); return -1; } create_vorbis_context(venc, avccontext); if (avccontext->flags... | 12,582 |
1 | struct omap_gp_timer_s *omap_gp_timer_init(struct omap_target_agent_s *ta, qemu_irq irq, omap_clk fclk, omap_clk iclk) { struct omap_gp_timer_s *s = (struct omap_gp_timer_s *) g_malloc0(sizeof(struct omap_gp_timer_s)); s->ta = ta; s->irq = irq; s->clk = fclk; s->timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, omap_gp_timer_ti... | 12,583 |
1 | ISADevice *isa_try_create(ISABus *bus, const char *name) { DeviceState *dev; if (!bus) { hw_error("Tried to create isa device %s with no isa bus present.", name); } dev = qdev_try_create(BUS(bus), name); return ISA_DEVICE(dev); } | 12,584 |
1 | static int spapr_tce_table_realize(DeviceState *dev) { sPAPRTCETable *tcet = SPAPR_TCE_TABLE(dev); if (kvm_enabled()) { tcet->table = kvmppc_create_spapr_tce(tcet->liobn, tcet->nb_table << tcet->page_shift, &tcet->fd, tcet->vfio_accel); } if (!tcet->table) { size_t table_size = tcet->nb_table * sizeof(uint64_t); tcet->... | 12,586 |
1 | static bool get_phys_addr_pmsav7(CPUARMState *env, uint32_t address, MMUAccessType access_type, ARMMMUIdx mmu_idx, hwaddr *phys_ptr, int *prot, ARMMMUFaultInfo *fi) { ARMCPU *cpu = arm_env_get_cpu(env); int n; bool is_user = regime_is_user(env, mmu_idx); *phys_ptr = address; *prot = 0; if (regime_translation_disabled(e... | 12,587 |
1 | bool address_space_access_valid(AddressSpace *as, hwaddr addr, int len, bool is_write) { MemoryRegion *mr; hwaddr l, xlat; rcu_read_lock(); while (len > 0) { l = len; mr = address_space_translate(as, addr, &xlat, &l, is_write); if (!memory_access_is_direct(mr, is_write)) { l = memory_access_size(mr, l, addr); if (!memo... | 12,588 |
1 | static int restore_sigcontext(CPUAlphaState *env, struct target_sigcontext *sc) { uint64_t fpcr; int i, err = 0; __get_user(env->pc, &sc->sc_pc); for (i = 0; i < 31; ++i) { __get_user(env->ir[i], &sc->sc_regs[i]); } for (i = 0; i < 31; ++i) { __get_user(env->fir[i], &sc->sc_fpregs[i]); } __get_user(fpcr, &sc->sc_fpcr);... | 12,589 |
1 | static void qxl_realize_secondary(PCIDevice *dev, Error **errp) { static int device_id = 1; PCIQXLDevice *qxl = PCI_QXL(dev); qxl->id = device_id++; qxl_init_ramsize(qxl); memory_region_init_ram(&qxl->vga.vram, OBJECT(dev), "qxl.vgavram", qxl->vga.vram_size, &error_abort); vmstate_register_ram(&qxl->vga.vram, &qxl->pci... | 12,590 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.