label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
0 | static always_inline void gen_arith3 (void *helper, int ra, int rb, int rc, int islit, uint8_t lit){ if (unlikely(rc == 31)) return; if (ra != 31) { if (islit) { TCGv tmp = tcg_const_i64(lit); tcg_gen_helper_1_2(helper, cpu_ir[rc], cpu_ir[ra], tmp); tcg_temp_free(tmp); } else tcg_gen_helper_1_2(helper, cpu_ir[rc], cpu_... |
0 | int cpu_get_dump_info(ArchDumpInfo *info, const struct GuestPhysBlockList *guest_phys_blocks){ PowerPCCPU *cpu = POWERPC_CPU(first_cpu); PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu); info->d_machine = PPC_ELF_MACHINE; info->d_class = ELFCLASS; if ((*pcc->interrupts_big_endian)(cpu)) { info->d_endian = ELFDATA2MSB;... |
0 | static CharDriverState *qemu_chr_open_pty(QemuOpts *opts){ CharDriverState *chr; PtyCharDriver *s; struct termios tty; const char *label; int master_fd, slave_fd, len;#if defined(__OpenBSD__) || defined(__DragonFly__) char pty_name[PATH_MAX];#define q_ptsname(x) pty_name#else char *pty_name = NULL;#define q_ptsname(x) ... |
0 | static void put_frame( AVFormatContext *s, ASFStream *stream, int timestamp, const uint8_t *buf, int m_obj_size){ ASFContext *asf = s->priv_data; int m_obj_offset, payload_len, frag_len1; m_obj_offset = 0; while (m_obj_offset < m_obj_size) { payload_len = m_obj_size - m_obj_offset; if (asf->packet_timestamp_start == -1... |
0 | static char *print_drive(void *ptr){ return g_strdup(bdrv_get_device_name(ptr));} |
0 | static int disas_neon_data_insn(CPUState * env, DisasContext *s, uint32_t insn){ int op; int q; int rd, rn, rm; int size; int shift; int pass; int count; int pairwise; int u; uint32_t imm, mask; TCGv tmp, tmp2, tmp3, tmp4, tmp5; TCGv_i64 tmp64; if (!s->vfp_enabled) return 1; q = (insn & (1 << 6)) != 0; u = (insn >> 24)... |
0 | static void rtas_nvram_store(PowerPCCPU *cpu, sPAPREnvironment *spapr, uint32_t token, uint32_t nargs, target_ulong args, uint32_t nret, target_ulong rets){ sPAPRNVRAM *nvram = spapr->nvram; hwaddr offset, buffer, len; int alen; void *membuf; if ((nargs != 3) || (nret != 2)) { rtas_st(rets, 0, RTAS_OUT_PARAM_ERROR); re... |
0 | int coroutine_fn qed_find_cluster(BDRVQEDState *s, QEDRequest *request, uint64_t pos, size_t *len, uint64_t *img_offset){ uint64_t l2_offset; uint64_t offset = 0; unsigned int index; unsigned int n; int ret; /* Limit length to L2 boundary. Requests are broken up at the L2 boundary * so that a request acts on one L2 tab... |
0 | static int send_solid_rect(VncState *vs){ size_t bytes; vnc_write_u8(vs, VNC_TIGHT_FILL << 4); /* no flushing, no filter */ if (vs->tight_pixel24) { tight_pack24(vs, vs->tight.buffer, 1, &vs->tight.offset); bytes = 3; } else { bytes = vs->clientds.pf.bytes_per_pixel; } vnc_write(vs, vs->tight.buffer, bytes); return 1;} |
0 | int DMA_read_memory (int nchan, void *buf, int pos, int len){ struct dma_regs *r = &dma_controllers[nchan > 3].regs[nchan & 3]; target_phys_addr_t addr = ((r->pageh & 0x7f) << 24) | (r->page << 16) | r->now[ADDR]; if (r->mode & 0x20) { int i; uint8_t *p = buf; cpu_physical_memory_read (addr - pos - len, buf, len); /* W... |
0 | static ssize_t nc_sendv_compat(NetClientState *nc, const struct iovec *iov, int iovcnt){ uint8_t buffer[4096]; size_t offset; offset = iov_to_buf(iov, iovcnt, 0, buffer, sizeof(buffer)); return nc->info->receive(nc, buffer, offset);} |
0 | static uint32_t gic_dist_readl(void *opaque, target_phys_addr_t offset){ uint32_t val; val = gic_dist_readw(opaque, offset); val |= gic_dist_readw(opaque, offset + 2) << 16; return val;} |
0 | static int ftp_flush_control_input(FTPContext *s){ char buf[CONTROL_BUFFER_SIZE]; int err, ori_block_flag = s->conn_control_block_flag; s->conn_control_block_flag = 1; do { err = ftp_get_line(s, buf, sizeof(buf)); } while (!err); s->conn_control_block_flag = ori_block_flag; if (err < 0 && err != AVERROR_EXIT) return er... |
0 | static void virtio_rng_device_realize(DeviceState *dev, Error **errp){ VirtIODevice *vdev = VIRTIO_DEVICE(dev); VirtIORNG *vrng = VIRTIO_RNG(dev); Error *local_err = NULL; if (!vrng->conf.period_ms > 0) { error_setg(errp, "'period' parameter expects a positive integer"); return; } /* Workaround: Property parsing does n... |
0 | void arm_sysctl_init(uint32_t base, uint32_t sys_id){ DeviceState *dev; dev = qdev_create(NULL, "realview_sysctl"); qdev_prop_set_uint32(dev, "sys_id", sys_id); qdev_init_nofail(dev); sysbus_mmio_map(sysbus_from_qdev(dev), 0, base);} |
0 | fdctrl_t *sun4m_fdctrl_init (qemu_irq irq, target_phys_addr_t io_base, BlockDriverState **fds){ fdctrl_t *fdctrl; fdctrl = fdctrl_init(irq, 0, 1, io_base, fds); fdctrl->sun4m = 1; return fdctrl;} |
0 | void cpu_loop(CPUUniCore32State *env){ CPUState *cs = CPU(uc32_env_get_cpu(env)); int trapnr; unsigned int n, insn; target_siginfo_t info; for (;;) { cpu_exec_start(cs); trapnr = uc32_cpu_exec(cs); cpu_exec_end(cs); switch (trapnr) { case UC32_EXCP_PRIV: { /* system call */ get_user_u32(insn, env->regs[31] - 4); n = in... |
1 | static int tm2_read_stream(TM2Context *ctx, const uint8_t *buf, int stream_id, int buf_size){ int i; int cur = 0; int skip = 0; int len, toks; TM2Codes codes; /* get stream length in dwords */ len = AV_RB32(buf); buf += 4; cur += 4; skip = len * 4 + 4; if(len == 0) return 4; if (len >= INT_MAX/4-1 || len < 0 || len > b... |
1 | int64_t av_gcd(int64_t a, int64_t b){ if (b) return av_gcd(b, a % b); else return a;} |
1 | static inline int ape_decode_value_3900(APEContext *ctx, APERice *rice){ unsigned int x, overflow; int tmpk; overflow = range_get_symbol(ctx, counts_3970, counts_diff_3970); if (overflow == (MODEL_ELEMENTS - 1)) { tmpk = range_decode_bits(ctx, 5); overflow = 0; } else tmpk = (rice->k < 1) ? 0 : rice->k - 1; if (tmpk <=... |
1 | int avcodec_decode_video(AVCodecContext *avctx, AVPicture *picture, int *got_picture_ptr, UINT8 *buf, int buf_size){ int ret; ret = avctx->codec->decode(avctx, picture, got_picture_ptr, buf, buf_size); avctx->frame_number++; return ret;} |
1 | static void nbd_teardown_connection(NbdClientSession *client){ struct nbd_request request = { .type = NBD_CMD_DISC, .from = 0, .len = 0 }; nbd_send_request(client->sock, &request); /* finish any pending coroutines */ shutdown(client->sock, 2); nbd_recv_coroutines_enter_all(client); qemu_aio_set_fd_handler(client->sock,... |
0 | static void do_bit_allocation(AC3DecodeContext *ctx, int flags){ ac3_audio_block *ab = &ctx->audio_block; int i, snroffst = 0; if (!flags) /* bit allocation is not required */ return; if (ab->flags & AC3_AB_SNROFFSTE) { /* check whether snroffsts are zero */ snroffst += ab->csnroffst; if (ab->flags & AC3_AB_CPLINU) snr... |
0 | static int adx_decode_header(AVCodecContext *avctx, const uint8_t *buf, int bufsize){ int offset; if (buf[0] != 0x80) return 0; offset = (AV_RB32(buf) ^ 0x80000000) + 4; if (bufsize < offset || memcmp(buf + offset - 6, "(c)CRI", 6)) return 0; avctx->channels = buf[7]; avctx->sample_rate = AV_RB32(buf + 8); avctx->bit_r... |
0 | static void scsi_write_complete(void * opaque, int ret){ SCSIDiskReq *r = (SCSIDiskReq *)opaque; SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev); uint32_t n; if (r->req.aiocb != NULL) { r->req.aiocb = NULL; block_acct_done(bdrv_get_stats(s->qdev.conf.bs), &r->acct); } if (r->req.io_canceled) { goto done; ... |
0 | static void mark_request_serialising(BdrvTrackedRequest *req, uint64_t align){ int64_t overlap_offset = req->offset & ~(align - 1); unsigned int overlap_bytes = ROUND_UP(req->offset + req->bytes, align) - overlap_offset; if (!req->serialising) { req->bs->serialising_in_flight++; req->serialising = true; } req->overlap_... |
0 | STATIC void DEF(avg, pixels8_xy2)(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h){ MOVQ_ZERO(mm7); SET_RND(mm6); // =2 for rnd and =1 for no_rnd version __asm__ volatile( "movq (%1), %%mm0 \n\t" "movq 1(%1), %%mm4 \n\t" "movq %%mm0, %%mm1 \n\t" "movq %%mm4, %%mm5 \n\t" "punpcklbw %%mm7, %%mm0 \n\t" "... |
0 | start_list(Visitor *v, const char *name, Error **errp){ StringInputVisitor *siv = to_siv(v); if (parse_str(siv, name, errp) < 0) { return; } siv->cur_range = g_list_first(siv->ranges); if (siv->cur_range) { Range *r = siv->cur_range->data; if (r) { siv->cur = r->begin; } }} |
0 | static int check_arg(const CmdArgs *cmd_args, QDict *args){ QObject *value; const char *name; name = qstring_get_str(cmd_args->name); if (!args) { return check_opt(cmd_args, name, args); } value = qdict_get(args, name); if (!value) { return check_opt(cmd_args, name, args); } switch (cmd_args->type) { case 'F': case 'B'... |
0 | static void blkdebug_refresh_filename(BlockDriverState *bs){ QDict *opts; const QDictEntry *e; bool force_json = false; for (e = qdict_first(bs->options); e; e = qdict_next(bs->options, e)) { if (strcmp(qdict_entry_key(e), "config") && strcmp(qdict_entry_key(e), "x-image") && strcmp(qdict_entry_key(e), "image") && strn... |
0 | static void memory_region_initfn(Object *obj){ MemoryRegion *mr = MEMORY_REGION(obj); ObjectProperty *op; mr->ops = &unassigned_mem_ops; mr->enabled = true; mr->romd_mode = true; mr->global_locking = true; mr->destructor = memory_region_destructor_none; QTAILQ_INIT(&mr->subregions); QTAILQ_INIT(&mr->coalesced); op = ob... |
0 | static void curl_setup_preadv(BlockDriverState *bs, CURLAIOCB *acb){ CURLState *state; int running; BDRVCURLState *s = bs->opaque; uint64_t start = acb->offset; uint64_t end; qemu_mutex_lock(&s->mutex); // In case we have the requested data already (e.g. read-ahead), // we can just call the callback and be done. if (cu... |
0 | static int local_rename(FsContext *ctx, const char *oldpath, const char *newpath){ char *tmp; int err; tmp = qemu_strdup(rpath(ctx, oldpath)); if (tmp == NULL) { return -1; } err = rename(tmp, rpath(ctx, newpath)); if (err == -1) { int serrno = errno; qemu_free(tmp); errno = serrno; } else { qemu_free(tmp); } return er... |
0 | static Visitor *validate_test_init_raw(TestInputVisitorData *data, const char *json_string){ return validate_test_init_internal(data, json_string, NULL);} |
0 | static void gen_compute_branch (DisasContext *ctx, uint32_t opc, int insn_bytes, int rs, int rt, int32_t offset){ target_ulong btgt = -1; int blink = 0; int bcond_compute = 0; TCGv t0 = tcg_temp_new(); TCGv t1 = tcg_temp_new(); if (ctx->hflags & MIPS_HFLAG_BMASK) {#ifdef MIPS_DEBUG_DISAS LOG_DISAS("Branch in delay slot... |
0 | static int tak_read_header(AVFormatContext *s){ TAKDemuxContext *tc = s->priv_data; AVIOContext *pb = s->pb; GetBitContext gb; AVStream *st; uint8_t *buffer = NULL; int ret; st = avformat_new_stream(s, 0); if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_id = AV_CODEC_ID_TAK... |
0 | int bdrv_make_zero(BdrvChild *child, BdrvRequestFlags flags){ int64_t target_size, ret, bytes, offset = 0; BlockDriverState *bs = child->bs; int n; /* sectors */ target_size = bdrv_getlength(bs); if (target_size < 0) { return target_size; } for (;;) { bytes = MIN(target_size - offset, BDRV_REQUEST_MAX_BYTES); if (bytes... |
0 | void HELPER(wsr_ibreaka)(uint32_t i, uint32_t v){ if (env->sregs[IBREAKENABLE] & (1 << i) && env->sregs[IBREAKA + i] != v) { tb_invalidate_phys_page_range( env->sregs[IBREAKA + i], env->sregs[IBREAKA + i] + 1, 0); tb_invalidate_phys_page_range(v, v + 1, 0); } env->sregs[IBREAKA + i] = v;} |
0 | static unsigned syborg_virtio_get_features(void *opaque){ unsigned ret = 0; ret |= (1 << VIRTIO_F_NOTIFY_ON_EMPTY); return ret;} |
0 | static int check_strtox_error(const char *p, char *endptr, const char **next, int err){ if (err == 0 && endptr == p) { err = EINVAL; } if (!next && *endptr) { return -EINVAL; } if (next) { *next = endptr; } return -err;} |
0 | void spapr_setup_hpt_and_vrma(sPAPRMachineState *spapr){ int hpt_shift; if ((spapr->resize_hpt == SPAPR_RESIZE_HPT_DISABLED) || (spapr->cas_reboot && !spapr_ovec_test(spapr->ov5_cas, OV5_HPT_RESIZE))) { hpt_shift = spapr_hpt_shift_for_ramsize(MACHINE(spapr)->maxram_size); } else { hpt_shift = spapr_hpt_shift_for_ramsiz... |
0 | static CharDriverState *qmp_chardev_open_udp(const char *id, ChardevBackend *backend, ChardevReturn *ret, Error **errp){ ChardevUdp *udp = backend->u.udp; ChardevCommon *common = qapi_ChardevUdp_base(udp); QIOChannelSocket *sioc = qio_channel_socket_new(); if (qio_channel_socket_dgram_sync(sioc, udp->local, udp->remote... |
0 | static inline int vec_reg_offset(int regno, int element, TCGMemOp size){ int offs = offsetof(CPUARMState, vfp.regs[regno * 2]);#ifdef HOST_WORDS_BIGENDIAN /* This is complicated slightly because vfp.regs[2n] is * still the low half and vfp.regs[2n+1] the high half * of the 128 bit vector, even on big endian systems. * ... |
0 | static void gen_doz(DisasContext *ctx){ int l1 = gen_new_label(); int l2 = gen_new_label(); tcg_gen_brcond_tl(TCG_COND_GE, cpu_gpr[rB(ctx->opcode)], cpu_gpr[rA(ctx->opcode)], l1); tcg_gen_sub_tl(cpu_gpr[rD(ctx->opcode)], cpu_gpr[rB(ctx->opcode)], cpu_gpr[rA(ctx->opcode)]); tcg_gen_br(l2); gen_set_label(l1); tcg_gen_mov... |
0 | static av_cold int nvenc_alloc_surface(AVCodecContext *avctx, int idx){ NvencContext *ctx = avctx->priv_data; NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs; NV_ENCODE_API_FUNCTION_LIST *p_nvenc = &dl_fn->nvenc_funcs; NVENCSTATUS nv_status; NV_ENC_CREATE_BITSTREAM_BUFFER allocOut = { 0 }; allocOut.version = NV_... |
0 | void host_cpuid(uint32_t function, uint32_t count, uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx){#if defined(CONFIG_KVM) uint32_t vec[4];#ifdef __x86_64__ asm volatile("cpuid" : "=a"(vec[0]), "=b"(vec[1]), "=c"(vec[2]), "=d"(vec[3]) : "0"(function), "c"(count) : "cc");#else asm volatile("pusha \n\t" "cpui... |
0 | int qemu_add_child_watch(pid_t pid){ ChildProcessRecord *rec; if (!sigchld_bh) { qemu_init_child_watch(); } QLIST_FOREACH(rec, &child_watches, next) { if (rec->pid == pid) { return 1; } } rec = g_malloc0(sizeof(ChildProcessRecord)); rec->pid = pid; QLIST_INSERT_HEAD(&child_watches, rec, next); return 0;} |
0 | static void bitband_writew(void *opaque, target_phys_addr_t offset, uint32_t value){ uint32_t addr; uint16_t mask; uint16_t v; addr = bitband_addr(opaque, offset) & ~1; mask = (1 << ((offset >> 2) & 15)); mask = tswap16(mask); cpu_physical_memory_read(addr, (uint8_t *)&v, 2); if (value & 1) v |= mask; else v &= ~mask; ... |
0 | static int write_console_data(SCLPEvent *event, const uint8_t *buf, int len){ int ret = 0; const uint8_t *buf_offset; SCLPConsoleLM *scon = SCLPLM_CONSOLE(event); if (!scon->chr) { /* If there's no backend, we can just say we consumed all data. */ return len; } buf_offset = buf; while (len > 0) { ret = qemu_chr_fe_writ... |
0 | static int mirror_do_read(MirrorBlockJob *s, int64_t sector_num, int nb_sectors){ BlockBackend *source = s->common.blk; int sectors_per_chunk, nb_chunks; int ret; MirrorOp *op; int max_sectors; sectors_per_chunk = s->granularity >> BDRV_SECTOR_BITS; max_sectors = sectors_per_chunk * s->max_iov; /* We can only handle as... |
0 | static void tcg_target_init(TCGContext *s){#ifdef CONFIG_GETAUXVAL unsigned long hwcap = getauxval(AT_HWCAP); if (hwcap & PPC_FEATURE_ARCH_2_06) { have_isa_2_06 = true; }#endif tcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I32], 0, 0xffffffff); tcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I64], 0, 0xffffff... |
0 | static void test_validate_alternate(TestInputVisitorData *data, const void *unused){ UserDefAlternate *tmp = NULL; Visitor *v; v = validate_test_init(data, "42"); visit_type_UserDefAlternate(v, NULL, &tmp, &error_abort); qapi_free_UserDefAlternate(tmp);} |
0 | static void parse_chap(struct iscsi_context *iscsi, const char *target, Error **errp){ QemuOptsList *list; QemuOpts *opts; const char *user = NULL; const char *password = NULL; const char *secretid; char *secret = NULL; list = qemu_find_opts("iscsi"); if (!list) { return; } opts = qemu_opts_find(list, target); if (opts... |
0 | static void mips_fulong2e_init(MachineState *machine){ ram_addr_t ram_size = machine->ram_size; const char *cpu_model = machine->cpu_model; const char *kernel_filename = machine->kernel_filename; const char *kernel_cmdline = machine->kernel_cmdline; const char *initrd_filename = machine->initrd_filename; char *filename... |
0 | static inline void downmix_dualmono_to_stereo(float *samples){ int i; float tmp; for (i = 0; i < 256; i++) { tmp = samples[i] + samples[i + 256]; samples[i] = samples[i + 256] = tmp; }} |
0 | static int64_t mmsh_read_seek(URLContext *h, int stream_index, int64_t timestamp, int flags){ MMSHContext *mmsh = h->priv_data; MMSContext *mms = &mmsh->mms; int ret; ret= mmsh_open_internal(h, mmsh->location, 0, timestamp, 0); if(ret>=0){ if (mms->mms_hd) ffurl_close(mms->mms_hd); av_freep(&mms->streams); av_freep(&mm... |
1 | static int get_current_cpu(void){ return cpu_single_env->cpu_index;} |
1 | static void bonito_cop_writel(void *opaque, hwaddr addr, uint64_t val, unsigned size){ PCIBonitoState *s = opaque; ((uint32_t *)(&s->boncop))[addr/sizeof(uint32_t)] = val & 0xffffffff; |
1 | static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, MXFMetadataReadFunc *read_child, int ctx_size, enum MXFMetadataSetType type){ AVIOContext *pb = mxf->fc->pb; MXFMetadataSet *ctx = ctx_size ? av_mallocz(ctx_size) : mxf; uint64_t klv_end = avio_tell(pb) + klv->length; if (!ctx) return AVERROR(ENOMEM); mxf_... |
1 | static int vhost_client_migration_log(CPUPhysMemoryClient *client, int enable){ struct vhost_dev *dev = container_of(client, struct vhost_dev, client); int r; if (!!enable == dev->log_enabled) { return 0; } if (!dev->started) { dev->log_enabled = enable; return 0; } if (!enable) { r = vhost_dev_set_log(dev, false); if ... |
1 | long do_rt_sigreturn(CPUS390XState *env){ rt_sigframe *frame; abi_ulong frame_addr = env->regs[15]; sigset_t set; trace_user_do_rt_sigreturn(env, frame_addr); if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1)) { goto badframe; } target_to_host_sigset(&set, &frame->uc.tuc_sigmask); set_sigmask(&set); /* ~_BLOCKAB... |
1 | static int no_init_out (HWVoiceOut *hw, struct audsettings *as){ audio_pcm_init_info (&hw->info, as); hw->samples = 1024; return 0;} |
1 | static int protocol_client_vencrypt_init(VncState *vs, uint8_t *data, size_t len){ if (data[0] != 0 || data[1] != 2) { VNC_DEBUG("Unsupported VeNCrypt protocol %d.%d\n", (int)data[0], (int)data[1]); vnc_write_u8(vs, 1); /* Reject version */ vnc_flush(vs); vnc_client_error(vs); } else { VNC_DEBUG("Sending allowed auth %... |
1 | static always_inline int _pte_check (mmu_ctx_t *ctx, int is_64b, target_ulong pte0, target_ulong pte1, int h, int rw, int type){ target_ulong ptem, mmask; int access, ret, pteh, ptev, pp; access = 0; ret = -1; /* Check validity and table match */#if defined(TARGET_PPC64) if (is_64b) { ptev = pte64_is_valid(pte0); pteh ... |
0 | static int h264_slice_header_parse(const H264Context *h, H264SliceContext *sl, const H2645NAL *nal){ const SPS *sps; const PPS *pps; int ret; unsigned int slice_type, tmp, i; int field_pic_flag, bottom_field_flag; int droppable, picture_structure; sl->first_mb_addr = get_ue_golomb(&sl->gb); slice_type = get_ue_golomb_3... |
0 | static int nut_read_header(AVFormatContext * avf, AVFormatParameters * ap) { NUTContext * priv = avf->priv_data; ByteIOContext * bc = &avf->pb; nut_demuxer_opts_t dopts = { .input = { .priv = bc, .seek = av_seek, .read = av_read, .eof = NULL, .file_pos = 0, }, .alloc = { av_malloc, av_realloc, av_free }, .read_index = ... |
0 | static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length){ GetBitContext gb; int i; init_get_bits(&gb, src, length * 8); for (i = 0; i < 3; i++) { if (read_len_table(s->len[i], &gb) < 0) return -1; if (ff_huffyuv_generate_bits_table(s->bits[i], s->len[i]) < 0) { return -1; } ff_free_vlc(&s->vlc[i])... |
0 | static int h264_slice_header_init(H264Context *h, int reinit){ int nb_slices = (HAVE_THREADS && h->avctx->active_thread_type & FF_THREAD_SLICE) ? h->avctx->thread_count : 1; int i, ret; h->avctx->sample_aspect_ratio = h->sps.sar; av_assert0(h->avctx->sample_aspect_ratio.den); av_pix_fmt_get_chroma_sub_sample(h->avctx->... |
0 | static unsigned tget_long(GetByteContext *gb, int le){ unsigned v = le ? bytestream2_get_le32u(gb) : bytestream2_get_be32u(gb); return v;} |
1 | static int ir2_decode_plane(Ir2Context *ctx, int width, int height, uint8_t *dst, int pitch, const uint8_t *table){ int i; int j; int out = 0; if (width & 1) return AVERROR_INVALIDDATA; /* first line contain absolute values, other lines contain deltas */ while (out < width) { int c = ir2_get_code(&ctx->gb); if (c >= 0x... |
1 | void hmp_change(Monitor *mon, const QDict *qdict){ const char *device = qdict_get_str(qdict, "device"); const char *target = qdict_get_str(qdict, "target"); const char *arg = qdict_get_try_str(qdict, "arg"); const char *read_only = qdict_get_try_str(qdict, "read-only-mode"); BlockdevChangeReadOnlyMode read_only_mode = ... |
1 | static CharDriverState *text_console_init(ChardevVC *vc){ CharDriverState *chr; QemuConsole *s; unsigned width = 0; unsigned height = 0; chr = g_malloc0(sizeof(CharDriverState)); if (vc->has_width) { width = vc->width; } else if (vc->has_cols) { width = vc->cols * FONT_WIDTH; } if (vc->has_height) { height = vc->height... |
1 | static int codec_reinit(AVCodecContext *avctx, int width, int height, int quality) { NuvContext *c = avctx->priv_data; width = (width + 1) & ~1; height = (height + 1) & ~1; if (quality >= 0) get_quant_quality(c, quality); if (width != c->width || height != c->height) { if (av_image_check_size(height, width, 0, avctx) <... |
1 | int av_open_input_stream(AVFormatContext **ic_ptr, ByteIOContext *pb, const char *filename, AVInputFormat *fmt, AVFormatParameters *ap){ int err; AVFormatContext *ic; AVFormatParameters default_ap; if(!ap){ ap=&default_ap; memset(ap, 0, sizeof(default_ap)); } if(!ap->prealloced_context) ic = avformat_alloc_context(); e... |
1 | static void network_to_control(RDMAControlHeader *control){ control->type = ntohl(control->type); control->len = ntohl(control->len); control->repeat = ntohl(control->repeat);} |
1 | void ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size){ int id; id = avio_rl16(pb); codec->codec_type = AVMEDIA_TYPE_AUDIO; codec->codec_tag = id; codec->channels = avio_rl16(pb); codec->sample_rate = avio_rl32(pb); codec->bit_rate = avio_rl32(pb) * 8; codec->block_align = avio_rl16(pb); if (size == 1... |
0 | static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp, const uint8_t *buf, unsigned int substr){ SubStream *s = &m->substream[substr]; unsigned int ch; int sync_word, tmp; uint8_t checksum; uint8_t lossless_check; int start_count = get_bits_count(gbp); const int max_matrix_channel = m->avctx->codec_id ... |
1 | static void init_blk_migration(Monitor *mon, QEMUFile *f){ BlkMigDevState *bmds; BlockDriverState *bs; block_mig_state.submitted = 0; block_mig_state.read_done = 0; block_mig_state.transferred = 0; block_mig_state.total_sector_sum = 0; block_mig_state.prev_progress = -1; for (bs = bdrv_first; bs != NULL; bs = bs->next)... |
1 | static void vmgenid_device_class_init(ObjectClass *klass, void *data){ DeviceClass *dc = DEVICE_CLASS(klass); dc->vmsd = &vmstate_vmgenid; dc->realize = vmgenid_realize; dc->hotpluggable = false; dc->props = vmgenid_properties; set_bit(DEVICE_CATEGORY_MISC, dc->categories); object_class_property_add_str(klass, VMGENID_... |
1 | static void run_block_job(BlockJob *job, Error **errp){ AioContext *aio_context = blk_get_aio_context(job->blk); /* FIXME In error cases, the job simply goes away and we access a dangling * pointer below. */ aio_context_acquire(aio_context); do { aio_poll(aio_context, true); qemu_progress_print(job->len ? ((float)job->... |
1 | static int dxtory_decode_v1_420(AVCodecContext *avctx, AVFrame *pic, const uint8_t *src, int src_size){ int h, w; uint8_t *Y1, *Y2, *U, *V; int ret; if (src_size < avctx->width * avctx->height * 3 / 2) { av_log(avctx, AV_LOG_ERROR, "packet too small\n"); return AVERROR_INVALIDDATA; } avctx->pix_fmt = AV_PIX_FMT_YUV420P... |
1 | int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr){ int ret; AVPacket user_pkt = *avpkt; int needs_realloc = !user_pkt.data; *got_packet_ptr = 0; if(CONFIG_FRAME_THREAD_ENCODER && avctx->internal->frame_thread_encoder && (avctx->active_thread... |
0 | static int dxva2_hevc_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size){ const HEVCContext *h = avctx->priv_data; AVDXVAContext *ctx = avctx->hwaccel_context; struct hevc_dxva2_picture_context *ctx_pic = h->ref->hwaccel_picture_private; if (!DXVA_CONTEXT_VALID(avctx, ctx)) ret... |
0 | static uint8_t *ogg_write_vorbiscomment(int offset, int bitexact, int *header_len, AVDictionary **m, int framing_bit){ const char *vendor = bitexact ? "ffmpeg" : LIBAVFORMAT_IDENT; int size; uint8_t *p, *p0; ff_metadata_conv(m, ff_vorbiscomment_metadata_conv, NULL); size = offset + ff_vorbiscomment_length(*m, vendor) +... |
0 | static void envelope_peak16(WaveformContext *s, AVFrame *out, int plane, int component){ const int dst_linesize = out->linesize[component] / 2; const int bg = s->bg_color[component] * (s->size / 256); const int limit = s->size - 1; const int is_chroma = (component == 1 || component == 2); const int shift_w = (is_chroma... |
0 | int sws_setColorspaceDetails(SwsContext *c, const int inv_table[4], int srcRange, const int table[4], int dstRange, int brightness, int contrast, int saturation){ int64_t crv = inv_table[0]; int64_t cbu = inv_table[1]; int64_t cgu = -inv_table[2]; int64_t cgv = -inv_table[3]; int64_t cy = 1<<16; int64_t oy = 0; memcpy(... |
0 | static int decode_mb_info(IVI5DecContext *ctx, IVIBandDesc *band, IVITile *tile, AVCodecContext *avctx){ int x, y, mv_x, mv_y, mv_delta, offs, mb_offset, mv_scale, blks_per_mb; IVIMbInfo *mb, *ref_mb; int row_offset = band->mb_size * band->pitch; mb = tile->mbs; ref_mb = tile->ref_mbs; offs = tile->ypos * band->pitch +... |
1 | void ff_imdct_calc(MDCTContext *s, FFTSample *output, const FFTSample *input, FFTSample *tmp){ int k, n8, n4, n2, n, j; 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 >> 1;... |
1 | ISADevice *isa_create(const char *name){ DeviceState *dev; if (!isabus) { fprintf(stderr, "Tried to create isa device %s with no isa bus present.\n", name); return NULL; } dev = qdev_create(&isabus->qbus, name); return DO_UPCAST(ISADevice, qdev, dev);} |
1 | static int applehttp_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags){ AppleHTTPContext *c = s->priv_data; int i, j, ret; if ((flags & AVSEEK_FLAG_BYTE) || !c->variants[0]->finished) return AVERROR(ENOSYS); timestamp = av_rescale_rnd(timestamp, 1, stream_index >= 0 ? s->streams[stream_index... |
1 | int coroutine_fn qemu_co_recvv(int sockfd, struct iovec *iov, int len, int iov_offset){ int total = 0; int ret; while (len) { ret = qemu_recvv(sockfd, iov, len, iov_offset + total); if (ret < 0) { if (errno == EAGAIN) { qemu_coroutine_yield(); continue; } if (total == 0) { total = -1; } break; } if (ret == 0) { break; ... |
1 | static void vc1_decode_p_blocks(VC1Context *v){ MpegEncContext *s = &v->s; int apply_loop_filter; /* select codingmode used for VLC tables selection */ switch (v->c_ac_table_index) { case 0: v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA; break; case 1: v->codingset = CS_HIGH_MOT_INTRA; break;... |
1 | static int get_metadata(AVFormatContext *s, const char *const tag, const unsigned data_size){ uint8_t *buf = ((data_size + 1) == 0) ? NULL : av_malloc(data_size + 1); if (!buf) return AVERROR(ENOMEM); if (avio_read(s->pb, buf, data_size) < 0) { av_free(buf); return AVERROR(EIO); } buf[data_size] = 0; av_dict_set(&s->me... |
0 | static int set_sps(HEVCContext *s, const HEVCSPS *sps){ int ret; int num = 0, den = 0; pic_arrays_free(s); ret = pic_arrays_init(s, sps); if (ret < 0) goto fail; s->avctx->coded_width = sps->width; s->avctx->coded_height = sps->height; s->avctx->width = sps->output_width; s->avctx->height = sps->output_height; s->avctx... |
0 | yuv2mono_2_c_template(SwsContext *c, const int16_t *buf[2], const int16_t *ubuf[2], const int16_t *vbuf[2], const int16_t *abuf[2], uint8_t *dest, int dstW, int yalpha, int uvalpha, int y, enum AVPixelFormat target){ const int16_t *buf0 = buf[0], *buf1 = buf[1]; const uint8_t * const d128 = dither_8x8_220[y & 7]; int y... |
0 | static double eval_expr(Parser * p, AVEvalExpr * e) { switch (e->type) { case e_value: return e->value; case e_const: return e->value * p->const_value[e->a.const_index]; case e_func0: return e->value * e->a.func0(eval_expr(p, e->param[0])); case e_func1: return e->value * e->a.func1(p->opaque, eval_expr(p, e->param[0])... |
1 | static int build_filter(ResampleContext *c, void *filter, double factor, int tap_count, int alloc, int phase_count, int scale, int filter_type, int kaiser_beta){ int ph, i; double x, y, w; double *tab = av_malloc_array(tap_count, sizeof(*tab)); const int center= (tap_count-1)/2; if (!tab) return AVERROR(ENOMEM); /* if ... |
1 | void avcodec_get_context_defaults2(AVCodecContext *s, enum CodecType codec_type){ int flags=0; memset(s, 0, sizeof(AVCodecContext)); s->av_class= &av_codec_context_class; s->codec_type = codec_type; if(codec_type == CODEC_TYPE_AUDIO) flags= AV_OPT_FLAG_AUDIO_PARAM; else if(codec_type == CODEC_TYPE_VIDEO) flags= AV_OPT_... |
1 | static void dec_float(DisasContext *dc, uint32_t insn){ uint32_t op0; uint32_t ra, rb, rd; op0 = extract32(insn, 0, 8); ra = extract32(insn, 16, 5); rb = extract32(insn, 11, 5); rd = extract32(insn, 21, 5); switch (op0) { case 0x00: /* lf.add.s */ LOG_DIS("lf.add.s r%d, r%d, r%d\n", rd, ra, rb); gen_helper_float_add_s(... |
1 | void rng_backend_open(RngBackend *s, Error **errp){ object_property_set_bool(OBJECT(s), true, "opened", errp);} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.