label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
1 | static inline void xan_wc3_copy_pixel_run(XanContext *s, AVFrame *frame, int x, int y, int pixel_count, int motion_x, int motion_y) { int stride; int line_inc; int curframe_index, prevframe_index; int curframe_x, prevframe_x; int width = s->avctx->width; uint8_t *palette_plane, *prev_palette_plane; if (y + motion_y < 0... | 17,725 |
1 | static av_cold int on2avc_decode_init(AVCodecContext *avctx) { On2AVCContext *c = avctx->priv_data; int i; c->avctx = avctx; avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; avctx->channel_layout = (avctx->channels == 2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO; c->is_av500 = (avctx->codec_tag == 0x500); if (c->is_av500 && avc... | 17,726 |
1 | static uint64_t ahci_alloc(AHCIQState *ahci, size_t bytes) { return qmalloc(ahci->parent, bytes); } | 17,727 |
1 | static int ea_probe(AVProbeData *p) { switch (AV_RL32(&p->buf[0])) { case ISNh_TAG: case SCHl_TAG: case SEAD_TAG: case SHEN_TAG: case kVGT_TAG: case MADk_TAG: case MPCh_TAG: case MVhd_TAG: case MVIh_TAG: break; default: return 0; } if (AV_RL32(&p->buf[4]) > 0xfffff && AV_RB32(&p->buf[4]) > 0xfffff) return 0; return AVP... | 17,728 |
1 | static int ulti_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; UltimotionDecodeContext *s=avctx->priv_data; int modifier = 0; int uniq = 0; int mode = 0; int blocks = 0; int done = 0; int x = 0, y = 0; int i; int skip; int... | 17,729 |
0 | int locate_option(int argc, char **argv, const OptionDef *options, const char *optname) { const OptionDef *po; int i; for (i = 1; i < argc; i++) { const char *cur_opt = argv[i]; if (*cur_opt++ != '-') continue; po = find_option(options, cur_opt); if (!po->name && cur_opt[0] == 'n' && cur_opt[1] == 'o') po = find_option... | 17,730 |
1 | iscsi_set_events(IscsiLun *iscsilun) { struct iscsi_context *iscsi = iscsilun->iscsi; int ev = iscsi_which_events(iscsi); if (ev != iscsilun->events) { aio_set_fd_handler(iscsilun->aio_context, iscsi_get_fd(iscsi), (ev & POLLIN) ? iscsi_process_read : NULL, (ev & POLLOUT) ? iscsi_process_write : NULL, iscsilun); iscsil... | 17,731 |
1 | static struct omap_watchdog_timer_s *omap_wd_timer_init(MemoryRegion *memory, hwaddr 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 = timer_new_ns(QEMU_CLOCK_VI... | 17,732 |
1 | static target_ulong h_enter(PowerPCCPU *cpu, sPAPREnvironment *spapr, target_ulong opcode, target_ulong *args) { CPUPPCState *env = &cpu->env; target_ulong flags = args[0]; target_ulong pte_index = args[1]; target_ulong pteh = args[2]; target_ulong ptel = args[3]; target_ulong page_shift = 12; target_ulong raddr; targe... | 17,733 |
1 | static inline int asym_quant(int c, int e, int qbits) { int m; c = (((c << e) >> (24 - qbits)) + 1) >> 1; m = (1 << (qbits-1)); if (c >= m) c = m - 1; av_assert2(c >= -m); return c; } | 17,736 |
1 | void virtqueue_get_avail_bytes(VirtQueue *vq, unsigned int *in_bytes, unsigned int *out_bytes, unsigned max_in_bytes, unsigned max_out_bytes) { VirtIODevice *vdev = vq->vdev; unsigned int max, idx; unsigned int total_bufs, in_total, out_total; VRingMemoryRegionCaches *caches; MemoryRegionCache indirect_desc_cache = MEM... | 17,738 |
0 | static inline int compress_coef(int *coefs, int num) { int i, res = 0; for (i = 0; i < num; i++) res += coef_test_compression(coefs[i]); return res == num ? 1 : 0; } | 17,740 |
1 | static char *sysbus_get_fw_dev_path(DeviceState *dev) { SysBusDevice *s = SYS_BUS_DEVICE(dev); char path[40]; int off; off = snprintf(path, sizeof(path), "%s", qdev_fw_name(dev)); if (s->num_mmio) { snprintf(path + off, sizeof(path) - off, "@"TARGET_FMT_plx, s->mmio[0].addr); } else if (s->num_pio) { snprintf(path + of... | 17,741 |
1 | static void init_pipe_signaling(PCIQXLDevice *d) { if (pipe(d->pipe) < 0) { dprint(d, 1, "%s: pipe creation failed\n", __FUNCTION__); return; } #ifdef CONFIG_IOTHREAD fcntl(d->pipe[0], F_SETFL, O_NONBLOCK); #else fcntl(d->pipe[0], F_SETFL, O_NONBLOCK /* | O_ASYNC */); #endif fcntl(d->pipe[1], F_SETFL, O_NONBLOCK); fcnt... | 17,743 |
1 | void ff_simple_idct248_put(uint8_t *dest, int line_size, DCTELEM *block) { int i; DCTELEM *ptr; /* butterfly */ ptr = block; for(i=0;i<4;i++) { BF(0); BF(1); BF(2); BF(3); BF(4); BF(5); BF(6); BF(7); ptr += 2 * 8; } /* IDCT8 on each line */ for(i=0; i<8; i++) { idctRowCondDC_8(block + i*8); } /* IDCT4 and store */ for(... | 17,744 |
1 | static int vc1_decode_intra_block(VC1Context *v, int16_t block[64], int n, int coded, int mquant, int codingset) { GetBitContext *gb = &v->s.gb; MpegEncContext *s = &v->s; int dc_pred_dir = 0; /* Direction of the DC prediction used */ int i; int16_t *dc_val; int16_t *ac_val, *ac_val2; int dcdiff; int mb_pos = s->mb_x +... | 17,745 |
1 | static int64_t coroutine_fn vvfat_co_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *n, BlockDriverState **file) { BDRVVVFATState* s = bs->opaque; *n = s->sector_count - sector_num; if (*n > nb_sectors) { *n = nb_sectors; } else if (*n < 0) { return 0; } return BDRV_BLOCK_DATA; } | 17,746 |
1 | static void gen_rot_rm_T1(DisasContext *s, int ot, int op1, int is_right) { target_ulong mask = (ot == OT_QUAD ? 0x3f : 0x1f); TCGv_i32 t0, t1; /* load */ if (op1 == OR_TMP0) { gen_op_ld_T0_A0(ot + s->mem_index); } else { gen_op_mov_TN_reg(ot, 0, op1); } tcg_gen_andi_tl(cpu_T[1], cpu_T[1], mask); switch (ot) { case OT_... | 17,747 |
1 | int rtjpeg_decode_frame_yuv420(RTJpegContext *c, AVFrame *f, const uint8_t *buf, int buf_size) { GetBitContext gb; int w = c->w / 16, h = c->h / 16; int x, y; uint8_t *y1 = f->data[0], *y2 = f->data[0] + 8 * f->linesize[0]; uint8_t *u = f->data[1], *v = f->data[2]; init_get_bits(&gb, buf, buf_size * 8); for (y = 0; y <... | 17,748 |
1 | static void virgl_resource_attach_backing(VirtIOGPU *g, struct virtio_gpu_ctrl_command *cmd) { struct virtio_gpu_resource_attach_backing att_rb; struct iovec *res_iovs; int ret; VIRTIO_GPU_FILL_CMD(att_rb); trace_virtio_gpu_cmd_res_back_attach(att_rb.resource_id); ret = virtio_gpu_create_mapping_iov(&att_rb, cmd, NULL,... | 17,750 |
1 | static int dvbsub_probe(AVProbeData *p) { int i, j, k; const uint8_t *end = p->buf + p->buf_size; int type, len; int max_score = 0; for(i=0; i<p->buf_size; i++){ if (p->buf[i] == 0x0f) { const uint8_t *ptr = p->buf + i; uint8_t histogram[6] = {0}; int min = 255; for(j=0; ptr + 6 < end; j++) { if (*ptr != 0x0f) break; t... | 17,753 |
1 | static void gen_hrfid(DisasContext *ctx) { #if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); #else /* Restore CPU state */ if (unlikely(ctx->pr || !ctx->hv)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); return; } gen_helper_hrfid(cpu_env); gen_sync_exception(ctx); #endif } | 17,754 |
1 | static void coroutine_fn v9fs_write(void *opaque) { ssize_t err; int32_t fid; uint64_t off; uint32_t count; int32_t len = 0; int32_t total = 0; size_t offset = 7; V9fsFidState *fidp; V9fsPDU *pdu = opaque; V9fsState *s = pdu->s; QEMUIOVector qiov_full; QEMUIOVector qiov; err = pdu_unmarshal(pdu, offset, "dqd", &fid, &o... | 17,755 |
1 | Qcow2Cache *qcow2_cache_create(BlockDriverState *bs, int num_tables) { BDRVQcowState *s = bs->opaque; Qcow2Cache *c; int i; c = g_malloc0(sizeof(*c)); c->size = num_tables; c->entries = g_malloc0(sizeof(*c->entries) * num_tables); for (i = 0; i < c->size; i++) { c->entries[i].table = qemu_try_blockalign(bs->file, s->cl... | 17,756 |
1 | int bdrv_commit(BlockDriverState *bs) { BlockDriver *drv = bs->drv; int64_t sector, total_sectors; int n, ro, open_flags; int ret = 0; uint8_t *buf; char filename[1024]; if (!drv) return -ENOMEDIUM; if (!bs->backing_hd) { return -ENOTSUP; } if (bdrv_in_use(bs) || bdrv_in_use(bs->backing_hd)) { return -EBUSY; } ro = bs-... | 17,757 |
1 | static int cinepak_decode (CinepakContext *s) { const uint8_t *eod = (s->data + s->size); int i, result, strip_size, frame_flags, num_strips; int y0 = 0; int encoded_buf_size; if (s->size < 10) return -1; frame_flags = s->data[0]; num_strips = AV_RB16 (&s->data[8]); encoded_buf_size = ((s->data[1] << 16) | AV_RB16 (&s-... | 17,758 |
1 | int ff_mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size, AVCodecParserContext *s) { int i; uint32_t state = pc->state; /* EOF considered as end of frame */ if (buf_size == 0) return 0; /* 0 frame start -> 1/4 1 first_SEQEXT -> 0/2 2 first field start -> 3/0 3 second_SEQEXT -> 2/0 4 searching end ... | 17,759 |
1 | static void dec_barrel(DisasContext *dc) { TCGv t0; bool s, t; if ((dc->tb_flags & MSR_EE_FLAG) && (dc->cpu->env.pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK) && !dc->cpu->cfg.use_barrel) { tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP); t_gen_raise_exception(dc, EXCP_HW_EXCP); return; } s = extract32(dc->imm, 10, 1); t ... | 17,760 |
1 | static int hwmap_config_output(AVFilterLink *outlink) { AVFilterContext *avctx = outlink->src; HWMapContext *ctx = avctx->priv; AVFilterLink *inlink = avctx->inputs[0]; AVHWFramesContext *hwfc; AVBufferRef *device; const AVPixFmtDescriptor *desc; int err; av_log(avctx, AV_LOG_DEBUG, "Configure hwmap %s -> %s.\n", av_ge... | 17,761 |
1 | static int ram_find_and_save_block(RAMState *rs, bool last_stage) { PageSearchStatus pss; int pages = 0; bool again, found; ram_addr_t dirty_ram_abs; /* Address of the start of the dirty page in ram_addr_t space */ /* No dirty page as there is zero RAM */ if (!ram_bytes_total()) { return pages; } pss.block = rs->last_s... | 17,762 |
1 | int msix_init(struct PCIDevice *dev, unsigned short nentries, MemoryRegion *table_bar, uint8_t table_bar_nr, unsigned table_offset, MemoryRegion *pba_bar, uint8_t pba_bar_nr, unsigned pba_offset, uint8_t cap_pos) { int cap; unsigned table_size, pba_size; uint8_t *config; /* Nothing to do if MSI is not supported by inte... | 17,763 |
1 | static bool gen_wsr_ccount(DisasContext *dc, uint32_t sr, TCGv_i32 v) { if (dc->tb->cflags & CF_USE_ICOUNT) { gen_io_start(); } gen_helper_wsr_ccount(cpu_env, v); if (dc->tb->cflags & CF_USE_ICOUNT) { gen_io_end(); gen_jumpi_check_loop_end(dc, 0); return true; } return false; } | 17,764 |
1 | static void common_unbind(struct common *c) { xen_be_unbind_evtchn(&c->xendev); if (c->page) { munmap(c->page, XC_PAGE_SIZE); c->page = NULL; } } | 17,769 |
1 | static int ape_tag_read_field(AVFormatContext *s) { AVIOContext *pb = s->pb; uint8_t key[1024], *value; uint32_t size, flags; int i, c; size = avio_rl32(pb); /* field size */ flags = avio_rl32(pb); /* field flags */ for (i = 0; i < sizeof(key) - 1; i++) { c = avio_r8(pb); if (c < 0x20 || c > 0x7E) break; else key[i] = ... | 17,770 |
1 | static NetSocketState *net_socket_fd_init_stream(VLANState *vlan, const char *model, const char *name, int fd, int is_connected) { NetSocketState *s; s = qemu_mallocz(sizeof(NetSocketState)); s->fd = fd; s->vc = qemu_new_vlan_client(vlan, model, name, net_socket_receive, NULL, s); snprintf(s->vc->info_str, sizeof(s->vc... | 17,771 |
1 | static void vfio_platform_realize(DeviceState *dev, Error **errp) { VFIOPlatformDevice *vdev = VFIO_PLATFORM_DEVICE(dev); SysBusDevice *sbdev = SYS_BUS_DEVICE(dev); VFIODevice *vbasedev = &vdev->vbasedev; VFIOINTp *intp; int i, ret; vbasedev->type = VFIO_DEVICE_TYPE_PLATFORM; vbasedev->ops = &vfio_platform_ops; trace_v... | 17,772 |
0 | void v_resample16_altivec(uint8_t *dst, int dst_width, const uint8_t *src, int wrap, int16_t *filter) { int sum, i; const uint8_t *s; vector unsigned char *tv, tmp, dstv, zero; vec_ss_t srchv[4], srclv[4], fv[4]; vector signed short zeros, sumhv, sumlv; s = src; for(i=0;i<4;i++) { /* The vec_madds later on does an impl... | 17,773 |
1 | static void kmvc_decode_intra_8x8(KmvcContext * ctx, const uint8_t * src, int w, int h) { BitBuf bb; int res, val; int i, j; int bx, by; int l0x, l1x, l0y, l1y; int mx, my; kmvc_init_getbits(bb, src); for (by = 0; by < h; by += 8) for (bx = 0; bx < w; bx += 8) { kmvc_getbit(bb, src, res); if (!res) { // fill whole 8x8 ... | 17,774 |
1 | static void handle_windowevent(SDL_Event *ev) { struct sdl2_console *scon = get_scon_from_window(ev->window.windowID); switch (ev->window.event) { case SDL_WINDOWEVENT_RESIZED: { QemuUIInfo info; memset(&info, 0, sizeof(info)); info.width = ev->window.data1; info.height = ev->window.data2; dpy_set_ui_info(scon->dcl.con... | 17,775 |
1 | static int uhci_handle_td(UHCIState *s, UHCIQueue *q, UHCI_TD *td, uint32_t td_addr, uint32_t *int_mask) { UHCIAsync *async; int len = 0, max_len; bool spd; bool queuing = (q != NULL); uint8_t pid = td->token & 0xff; /* Is active ? */ if (!(td->ctrl & TD_CTRL_ACTIVE)) { /* * ehci11d spec page 22: "Even if the Active bi... | 17,776 |
1 | int qtest_init(void) { CharDriverState *chr; g_assert(qtest_chrdev != NULL); configure_icount("0"); chr = qemu_chr_new("qtest", qtest_chrdev, NULL); qemu_chr_add_handlers(chr, qtest_can_read, qtest_read, qtest_event, chr); qemu_chr_fe_set_echo(chr, true); inbuf = g_string_new(""); if (qtest_log) { if (strcmp(qtest_log,... | 17,777 |
1 | static av_cold int smvjpeg_decode_end(AVCodecContext *avctx) { SMVJpegDecodeContext *s = avctx->priv_data; MJpegDecodeContext *jpg = &s->jpg; int ret; jpg->picture_ptr = NULL; av_frame_free(&s->picture[0]); av_frame_free(&s->picture[1]); ret = avcodec_close(s->avctx); av_freep(&s->avctx); return ret; } | 17,778 |
1 | static void check_native_list(QObject *qobj, UserDefNativeListUnionKind kind) { QDict *qdict; QList *qlist; int i; qdict = qobject_to_qdict(qobj); g_assert(qdict); g_assert(qdict_haskey(qdict, "data")); qlist = qlist_copy(qobject_to_qlist(qdict_get(qdict, "data"))); switch (kind) { case USER_DEF_NATIVE_LIST_UNION_KIND_... | 17,780 |
1 | int net_init_vde(QemuOpts *opts, const char *name, VLANState *vlan) { const char *sock; const char *group; int port, mode; sock = qemu_opt_get(opts, "sock"); group = qemu_opt_get(opts, "group"); port = qemu_opt_get_number(opts, "port", 0); mode = qemu_opt_get_number(opts, "mode", 0700); if (net_vde_init(vlan, "vde", na... | 17,781 |
1 | static void stellaris_enet_unrealize(DeviceState *dev, Error **errp) { stellaris_enet_state *s = STELLARIS_ENET(dev); unregister_savevm(DEVICE(s), "stellaris_enet", s); memory_region_destroy(&s->mmio); } | 17,782 |
1 | static bool memory_region_dispatch_read(MemoryRegion *mr, hwaddr addr, uint64_t *pval, unsigned size) { if (!memory_region_access_valid(mr, addr, size, false)) { *pval = unassigned_mem_read(mr, addr, size); return true; } *pval = memory_region_dispatch_read1(mr, addr, size); adjust_endianness(mr, pval, size); return fa... | 17,784 |
1 | static void merge_context_after_encode(MpegEncContext *dst, MpegEncContext *src){ int i; MERGE(dct_count[0]); //note, the other dct vars are not part of the context MERGE(dct_count[1]); MERGE(mv_bits); MERGE(i_tex_bits); MERGE(p_tex_bits); MERGE(i_count); MERGE(f_count); MERGE(b_count); MERGE(skip_count); MERGE(misc_bi... | 17,785 |
0 | int ff_h264_decode_seq_parameter_set(H264Context *h) { int profile_idc, level_idc, constraint_set_flags = 0; unsigned int sps_id; int i, log2_max_frame_num_minus4; SPS *sps; profile_idc = get_bits(&h->gb, 8); constraint_set_flags |= get_bits1(&h->gb) << 0; // constraint_set0_flag constraint_set_flags |= get_bits1(&h->g... | 17,788 |
0 | static av_cold int nvenc_dyload_nvenc(AVCodecContext *avctx) { PNVENCODEAPICREATEINSTANCE nvEncodeAPICreateInstance = 0; NVENCSTATUS nvstatus; NvencContext *ctx = avctx->priv_data; NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs; if (!nvenc_check_cuda(avctx)) return 0; if (dl_fn->nvenc_lib) return 1; #if defined... | 17,789 |
0 | static inline void h264_loop_filter_chroma_intra_c(uint8_t *pix, int xstride, int ystride, int alpha, int beta) { int d; for( d = 0; d < 8; d++ ) { const int p0 = pix[-1*xstride]; const int p1 = pix[-2*xstride]; const int q0 = pix[0]; const int q1 = pix[1*xstride]; if( FFABS( p0 - q0 ) < alpha && FFABS( p1 - p0 ) < bet... | 17,790 |
0 | real_parse_asm_rulebook(AVFormatContext *s, AVStream *orig_st, const char *p) { const char *end; int n_rules, odd = 0; AVStream *st; /** * The ASMRuleBook contains a list of comma-separated strings per rule, * and each rule is separated by a ;. The last one also has a ; at the * end so we can use it as delimiter. * Eve... | 17,791 |
0 | int ff_get_cpu_flags_ppc(void) { #if HAVE_ALTIVEC #ifdef __AMIGAOS4__ ULONG result = 0; extern struct ExecIFace *IExec; IExec->GetCPUInfoTags(GCIT_VectorUnit, &result, TAG_DONE); if (result == VECTORTYPE_ALTIVEC) return AV_CPU_FLAG_ALTIVEC; return 0; #elif defined(__APPLE__) || defined(__OpenBSD__) #ifdef __OpenBSD__ i... | 17,793 |
0 | static void decode_delta_j(uint8_t *dst, const uint8_t *buf, const uint8_t *buf_end, int w, int h, int bpp, int dst_size) { int32_t pitch; uint8_t *ptr; uint32_t type, flag, cols, groups, rows, bytes; uint32_t offset; int planepitch_byte = (w + 7) / 8; int planepitch = ((w + 15) / 16) * 2; int kludge_j, b, g, r, d; Get... | 17,794 |
0 | static int dshow_read_header(AVFormatContext *avctx) { struct dshow_ctx *ctx = avctx->priv_data; IGraphBuilder *graph = NULL; ICreateDevEnum *devenum = NULL; IMediaControl *control = NULL; int ret = AVERROR(EIO); int r; if (!ctx->list_devices && !parse_device_name(avctx)) { av_log(avctx, AV_LOG_ERROR, "Malformed dshow ... | 17,796 |
1 | static void init_timetables( FM_OPL *OPL , int ARRATE , int DRRATE ) { int i; double rate; /* make attack rate & decay rate tables */ for (i = 0;i < 4;i++) OPL->AR_TABLE[i] = OPL->DR_TABLE[i] = 0; for (i = 4;i <= 60;i++){ rate = OPL->freqbase; /* frequency rate */ if( i < 60 ) rate *= 1.0+(i&3)*0.25; /* b0-1 : x1 , x1.... | 17,797 |
1 | static void dwt_decode97_float(DWTContext *s, float *t) { int lev; int w = s->linelen[s->ndeclevels - 1][0]; float *line = s->f_linebuf; float *data = t; /* position at index O of line range [0-5,w+5] cf. extend function */ line += 5; for (lev = 0; lev < s->ndeclevels; lev++) { int lh = s->linelen[lev][0], lv = s->line... | 17,798 |
1 | void FUNCC(ff_h264_idct8_add)(uint8_t *_dst, int16_t *_block, int stride){ int i; pixel *dst = (pixel*)_dst; dctcoef *block = (dctcoef*)_block; stride >>= sizeof(pixel)-1; block[0] += 32; for( i = 0; i < 8; i++ ) { const int a0 = block[i+0*8] + block[i+4*8]; const int a2 = block[i+0*8] - block[i+4*8]; const int a4 = (b... | 17,799 |
1 | void hmp_info_migrate(Monitor *mon, const QDict *qdict) { MigrationInfo *info; MigrationCapabilityStatusList *caps, *cap; info = qmp_query_migrate(NULL); caps = qmp_query_migrate_capabilities(NULL); /* do not display parameters during setup */ if (info->has_status && caps) { monitor_printf(mon, "capabilities: "); for (... | 17,800 |
1 | static void quantize_and_encode_band(struct AACEncContext *s, PutBitContext *pb, const float *in, int size, int scale_idx, int cb, const float lambda) { const float IQ = ff_aac_pow2sf_tab[200 + scale_idx - SCALE_ONE_POS + SCALE_DIV_512]; const float Q = ff_aac_pow2sf_tab[200 - scale_idx + SCALE_ONE_POS - SCALE_DIV_512]... | 17,801 |
1 | int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) { int pqindex, lowquant; int status; int mbmodetab, imvtab, icbptab, twomvbptab, fourmvbptab; /* useful only for debugging */ int field_mode, fcm; v->numref = 0; v->p_frame_skipped = 0; if (v->second_field) { v->s.pict_type = (v->fptype & 1) ? AV_PICTU... | 17,802 |
1 | static void isa_cirrus_vga_realizefn(DeviceState *dev, Error **errp) { ISADevice *isadev = ISA_DEVICE(dev); ISACirrusVGAState *d = ISA_CIRRUS_VGA(dev); VGACommonState *s = &d->cirrus_vga.vga; vga_common_init(s, OBJECT(dev), true); cirrus_init_common(&d->cirrus_vga, OBJECT(dev), CIRRUS_ID_CLGD5430, 0, isa_address_space(... | 17,804 |
1 | static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header, const uint8_t *buf, int buf_size) { int cmd_pos, pos, cmd, x1, y1, x2, y2, offset1, offset2, next_cmd_pos; int big_offsets, offset_size, is_8bit = 0; const uint8_t *yuv_palette = NULL; uint8_t *colormap = ctx->colormap, *alpha = ctx->alpha; int... | 17,806 |
0 | static void encode_rgb_frame(FFV1Context *s, uint8_t *src[3], int w, int h, int stride[3]) { int x, y, p, i; const int ring_size = s->avctx->context_model ? 3 : 2; int16_t *sample[4][3]; int lbd = s->bits_per_raw_sample <= 8; int bits = s->bits_per_raw_sample > 0 ? s->bits_per_raw_sample : 8; int offset = 1 << bits; s-... | 17,809 |
1 | static DisplayType select_display(const char *p) { const char *opts; DisplayType display = DT_DEFAULT; if (strstart(p, "sdl", &opts)) { #ifdef CONFIG_SDL display = DT_SDL; while (*opts) { const char *nextopt; if (strstart(opts, ",frame=", &nextopt)) { opts = nextopt; if (strstart(opts, "on", &nextopt)) { no_frame = 0; ... | 17,810 |
1 | PPC_OP(subfme) { T0 = ~T0 + xer_ca - 1; if (T0 != -1) xer_ca = 1; RETURN(); } | 17,811 |
1 | static int bitpacked_decode_yuv422p10(AVCodecContext *avctx, AVFrame *frame, AVPacket *avpkt) { uint64_t frame_size = (uint64_t)avctx->width * (uint64_t)avctx->height * 20; uint64_t packet_size = avpkt->size * 8; GetBitContext bc; uint16_t *y, *u, *v; int ret, i; ret = ff_get_buffer(avctx, frame, 0); if (ret < 0) retur... | 17,812 |
1 | static void qed_read_l2_table_cb(void *opaque, int ret) { QEDReadL2TableCB *read_l2_table_cb = opaque; QEDRequest *request = read_l2_table_cb->request; BDRVQEDState *s = read_l2_table_cb->s; CachedL2Table *l2_table = request->l2_table; if (ret) { /* can't trust loaded L2 table anymore */ qed_unref_l2_cache_entry(l2_tab... | 17,813 |
1 | void input_type_enum(Visitor *v, int *obj, const char *strings[], const char *kind, const char *name, Error **errp) { int64_t value = 0; char *enum_str; assert(strings); visit_type_str(v, &enum_str, name, errp); if (error_is_set(errp)) { return; } while (strings[value] != NULL) { if (strcmp(strings[value], enum_str) ==... | 17,814 |
1 | 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: { AVPicture picture; int size[4] = { 0 }; int w = frame->width; int h = frame->height; int tmpsize, unaligned; if (pool->format == frame->forma... | 17,815 |
1 | static void prom_init(target_phys_addr_t addr, const char *bios_name) { DeviceState *dev; SysBusDevice *s; char *filename; int ret; dev = qdev_create(NULL, "openprom"); qdev_init(dev); s = sysbus_from_qdev(dev); sysbus_mmio_map(s, 0, addr); /* load boot prom */ if (bios_name == NULL) { bios_name = PROM_FILENAME; } file... | 17,816 |
1 | static void qemu_rdma_move_header(RDMAContext *rdma, int idx, RDMAControlHeader *head) { rdma->wr_data[idx].control_len = head->len; rdma->wr_data[idx].control_curr = rdma->wr_data[idx].control + sizeof(RDMAControlHeader); } | 17,817 |
1 | static void v9fs_symlink(void *opaque) { V9fsPDU *pdu = opaque; V9fsString name; V9fsString symname; V9fsFidState *dfidp; V9fsQID qid; struct stat stbuf; int32_t dfid; int err = 0; gid_t gid; size_t offset = 7; v9fs_string_init(&name); v9fs_string_init(&symname); err = pdu_unmarshal(pdu, offset, "dssd", &dfid, &name, &... | 17,819 |
1 | void ff_tls_init(void) { avpriv_lock_avformat(); #if CONFIG_OPENSSL if (!openssl_init) { SSL_library_init(); SSL_load_error_strings(); #if HAVE_THREADS if (!CRYPTO_get_locking_callback()) { int i; openssl_mutexes = av_malloc_array(sizeof(pthread_mutex_t), CRYPTO_num_locks()); for (i = 0; i < CRYPTO_num_locks(); i++) pt... | 17,820 |
1 | uint64_t helper_cvttq(CPUAlphaState *env, uint64_t a) { return inline_cvttq(env, a, FP_STATUS.float_rounding_mode, 1); } | 17,821 |
1 | void ppc_store_msr_32 (CPUPPCState *env, uint32_t value) { do_store_msr(env, (do_load_msr(env) & ~0xFFFFFFFFULL) | (value & 0xFFFFFFFF)); } | 17,822 |
1 | static void usb_serial_read(void *opaque, const uint8_t *buf, int size) { USBSerialState *s = opaque; int first_size = RECV_BUF - s->recv_ptr; if (first_size > size) first_size = size; memcpy(s->recv_buf + s->recv_ptr + s->recv_used, buf, first_size); if (size > first_size) memcpy(s->recv_buf, buf + first_size, size - ... | 17,823 |
1 | struct omap_mpu_state_s *omap2420_mpu_init(MemoryRegion *sysmem, unsigned long sdram_size, const char *core) { struct omap_mpu_state_s *s = g_new0(struct omap_mpu_state_s, 1); qemu_irq dma_irqs[4]; DriveInfo *dinfo; int i; SysBusDevice *busdev; struct omap_target_agent_s *ta; /* Core */ s->mpu_model = omap2420; s->cpu ... | 17,824 |
1 | static void test_dealloc_partial(void) { static const char text[] = "don't leak me"; UserDefTwo *ud2 = NULL; Error *err = NULL; /* create partial object */ { QDict *ud2_dict; QmpInputVisitor *qiv; ud2_dict = qdict_new(); qdict_put_obj(ud2_dict, "string0", QOBJECT(qstring_from_str(text))); qiv = qmp_input_visitor_new(QO... | 17,826 |
1 | static int bdrv_qed_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { BDRVQEDState *s = bs->opaque; QEDHeader le_header; int64_t file_size; int ret; s->bs = bs; QSIMPLEQ_INIT(&s->allocating_write_reqs); ret = bdrv_pread(bs->file, 0, &le_header, sizeof(le_header)); if (ret < 0) { return ret; qed_head... | 17,827 |
1 | void gen_intermediate_code(CPUAlphaState *env, struct TranslationBlock *tb) { AlphaCPU *cpu = alpha_env_get_cpu(env); CPUState *cs = CPU(cpu); DisasContext ctx, *ctxp = &ctx; target_ulong pc_start; target_ulong pc_mask; uint32_t insn; ExitStatus ret; int num_insns; int max_insns; pc_start = tb->pc; ctx.tb = tb; ctx.pc ... | 17,828 |
1 | static int vble_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { VBLEContext *ctx = avctx->priv_data; AVFrame *pic = avctx->coded_frame; GetBitContext gb; const uint8_t *src = avpkt->data; int version; int offset = 0; int width_uv = avctx->width / 2, height_uv = avctx->height / 2; pic-... | 17,829 |
1 | static int virtio_balloon_device_exit(DeviceState *qdev) { VirtIOBalloon *s = VIRTIO_BALLOON(qdev); VirtIODevice *vdev = VIRTIO_DEVICE(qdev); balloon_stats_destroy_timer(s); qemu_remove_balloon_handler(s); unregister_savevm(qdev, "virtio-balloon", s); virtio_cleanup(vdev); return 0; } | 17,830 |
1 | uint8_t* ff_AMediaCodec_getInputBuffer(FFAMediaCodec* codec, size_t idx, size_t *out_size) { uint8_t *ret = NULL; JNIEnv *env = NULL; jobject buffer = NULL; JNI_GET_ENV_OR_RETURN(env, codec, NULL); if (codec->has_get_i_o_buffer) { buffer = (*env)->CallObjectMethod(env, codec->object, codec->jfields.get_input_buffer_id,... | 17,831 |
1 | static int fic_decode_slice(AVCodecContext *avctx, void *tdata) { FICContext *ctx = avctx->priv_data; FICThreadContext *tctx = tdata; GetBitContext gb; uint8_t *src = tctx->src; int slice_h = tctx->slice_h; int src_size = tctx->src_size; int y_off = tctx->y_off; int x, y, p; init_get_bits(&gb, src, src_size * 8); for (... | 17,832 |
1 | fdctrl_t *sun4m_fdctrl_init (qemu_irq irq, target_phys_addr_t io_base, DriveInfo **fds, qemu_irq *fdc_tc) { DeviceState *dev; fdctrl_sysbus_t *sys; fdctrl_t *fdctrl; dev = qdev_create(NULL, "SUNW,fdtwo"); qdev_prop_set_drive(dev, "drive", fds[0]); if (qdev_init(dev) != 0) return NULL; sys = DO_UPCAST(fdctrl_sysbus_t, b... | 17,834 |
1 | static av_cold int XAVS_init(AVCodecContext *avctx) { XavsContext *x4 = avctx->priv_data; x4->sei_size = 0; xavs_param_default(&x4->params); x4->params.pf_log = XAVS_log; x4->params.p_log_private = avctx; x4->params.i_keyint_max = avctx->gop_size; if (avctx->bit_rate) { x4->params.rc.i_bitrate = avctx->bit_rate / 1000;... | 17,836 |
1 | av_cold int ff_huffyuv_alloc_temp(HYuvContext *s) { int i; if (s->bitstream_bpp<24 || s->version > 2) { for (i=0; i<3; i++) { s->temp[i]= av_malloc(2*s->width + 16); if (!s->temp[i]) return AVERROR(ENOMEM); s->temp16[i] = (uint16_t*)s->temp[i]; } } else { s->temp[0]= av_mallocz(4*s->width + 16); if (!s->temp[0]) return... | 17,837 |
1 | void dump_mmu(FILE *f, fprintf_function cpu_fprintf, CPUPPCState *env) { switch (env->mmu_model) { case POWERPC_MMU_BOOKE: mmubooke_dump_mmu(f, cpu_fprintf, env); break; case POWERPC_MMU_BOOKE206: mmubooke206_dump_mmu(f, cpu_fprintf, env); break; case POWERPC_MMU_SOFT_6xx: case POWERPC_MMU_SOFT_74xx: mmu6xx_dump_mmu(f,... | 17,838 |
1 | static void monitor_qapi_event_handler(void *opaque) { MonitorQAPIEventState *evstate = opaque; MonitorQAPIEventConf *evconf = &monitor_qapi_event_conf[evstate->event]; trace_monitor_protocol_event_handler(evstate->event, evstate->qdict); qemu_mutex_lock(&monitor_lock); if (evstate->qdict) { int64_t now = qemu_clock_ge... | 17,839 |
0 | static void body(uint32_t ABCD[4], uint32_t X[16]) { int i av_unused; uint32_t t; uint32_t a = ABCD[3]; uint32_t b = ABCD[2]; uint32_t c = ABCD[1]; uint32_t d = ABCD[0]; #if HAVE_BIGENDIAN for (i = 0; i < 16; i++) X[i] = av_bswap32(X[i]); #endif #if CONFIG_SMALL for (i = 0; i < 64; i++) { CORE(i, a, b, c, d); t = d; d ... | 17,840 |
0 | static int v210_read_header(AVFormatContext *ctx) { V210DemuxerContext *s = ctx->priv_data; AVStream *st; st = avformat_new_stream(ctx, NULL); if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = ctx->iformat->raw_codec_id; avpriv_set_pts_info(st, 64, s->framerate.den, s->f... | 17,841 |
1 | int ff_h263_decode_mb(MpegEncContext *s, int16_t block[6][64]) { int cbpc, cbpy, i, cbp, pred_x, pred_y, mx, my, dquant; int16_t *mot_val; const int xy= s->mb_x + s->mb_y * s->mb_stride; int cbpb = 0, pb_mv_count = 0; assert(!s->h263_pred); if (s->pict_type == AV_PICTURE_TYPE_P) { do{ if (get_bits1(&s->gb)) { /* skip m... | 17,843 |
1 | const QEMUSizedBuffer *qemu_buf_get(QEMUFile *f) { QEMUBuffer *p; qemu_fflush(f); p = f->opaque; return p->qsb; } | 17,844 |
1 | static int vncws_start_tls_handshake(struct VncState *vs) { int ret = gnutls_handshake(vs->tls.session); if (ret < 0) { if (!gnutls_error_is_fatal(ret)) { VNC_DEBUG("Handshake interrupted (blocking)\n"); if (!gnutls_record_get_direction(vs->tls.session)) { qemu_set_fd_handler(vs->csock, vncws_tls_handshake_io, NULL, vs... | 17,845 |
1 | static uint8_t *read_huffman_tables(FourXContext *f, uint8_t * const buf){ int frequency[512]; uint8_t flag[512]; int up[512]; uint8_t len_tab[257]; int bits_tab[257]; int start, end; uint8_t *ptr= buf; int j; memset(frequency, 0, sizeof(frequency)); memset(up, -1, sizeof(up)); start= *ptr++; end= *ptr++; for(;;){ int ... | 17,846 |
1 | static bool ohci_eof_timer_needed(void *opaque) { OHCIState *ohci = opaque; return ohci->eof_timer != NULL; } | 17,847 |
1 | static int decode_frame_apng(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { PNGDecContext *const s = avctx->priv_data; int ret; AVFrame *p; ff_thread_release_buffer(avctx, &s->last_picture); FFSWAP(ThreadFrame, s->picture, s->last_picture); p = s->picture.f; if (!(s->state & PNG_IHDR)) { int side... | 17,848 |
1 | static abi_ulong mmap_find_vma_reserved(abi_ulong start, abi_ulong size) { abi_ulong addr; abi_ulong end_addr; int prot; int looped = 0; if (size > reserved_va) { return (abi_ulong)-1; } size = HOST_PAGE_ALIGN(size); end_addr = start + size; if (end_addr > reserved_va) { end_addr = reserved_va; } addr = end_addr - qemu... | 17,849 |
0 | static av_always_inline int process_frame(WriterContext *w, InputFile *ifile, AVFrame *frame, AVPacket *pkt) { AVFormatContext *fmt_ctx = ifile->fmt_ctx; AVCodecContext *dec_ctx = ifile->streams[pkt->stream_index].dec_ctx; AVCodecParameters *par = ifile->streams[pkt->stream_index].st->codecpar; AVSubtitle sub; int ret ... | 17,850 |
0 | static int mov_read_stsd(MOVContext *c, AVIOContext *pb, MOVAtom atom) { AVStream *st; MOVStreamContext *sc; int ret; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc->nb_streams - 1]; sc = st->priv_data; avio_r8(pb); /* version */ avio_rb24(pb); /* flags */ sc->stsd_count = avio_rb32(pb); /* entries */ /... | 17,851 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.