label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
1 | static int dnxhd_init_vlc(DNXHDContext *ctx, int cid) { if (cid != ctx->cid) { int index; if ((index = ff_dnxhd_get_cid_table(cid)) < 0) { av_log(ctx->avctx, AV_LOG_ERROR, "unsupported cid %d\n", cid); return -1; } if (ff_dnxhd_cid_table[index].bit_depth != ctx->bit_depth) { av_log(ctx->avctx, AV_LOG_ERROR, "bit depth ... | 13,216 |
1 | static int flv_set_video_codec(AVFormatContext *s, AVStream *vstream, int flv_codecid) { AVCodecContext *vcodec = vstream->codec; switch(flv_codecid) { case FLV_CODECID_H263 : vcodec->codec_id = CODEC_ID_FLV1 ; break; case FLV_CODECID_REALH263: vcodec->codec_id = CODEC_ID_H263 ; break; // Really mean it this time case ... | 13,217 |
1 | static void vc1_mspel_mc(uint8_t *dst, const uint8_t *src, int stride, int mode, int rnd) { int i, j; uint8_t tmp[8*11], *tptr; int m, r; m = (mode & 3); r = rnd; src -= stride; tptr = tmp; for(j = 0; j < 11; j++) { for(i = 0; i < 8; i++) tptr[i] = vc1_mspel_filter(src + i, 1, m, r); src += stride; tptr += 8; } r = 1 -... | 13,218 |
1 | static av_cold int bfi_decode_init(AVCodecContext *avctx) { BFIContext *bfi = avctx->priv_data; avctx->pix_fmt = AV_PIX_FMT_PAL8; bfi->dst = av_mallocz(avctx->width * avctx->height); return 0; } | 13,219 |
1 | static void vmxnet3_set_events(VMXNET3State *s, uint32_t val) { uint32_t events; VMW_CBPRN("Setting events: 0x%x", val); events = VMXNET3_READ_DRV_SHARED32(s->drv_shmem, ecr) | val; VMXNET3_WRITE_DRV_SHARED32(s->drv_shmem, ecr, events); } | 13,220 |
1 | static int qemu_rbd_send_pipe(BDRVRBDState *s, RADOSCB *rcb) { int ret = 0; while (1) { fd_set wfd; int fd = s->fds[RBD_FD_WRITE]; /* send the op pointer to the qemu thread that is responsible for the aio/op completion. Must do it in a qemu thread context */ ret = write(fd, (void *)&rcb, sizeof(rcb)); if (ret >= 0) { b... | 13,221 |
1 | static void tcx_init(target_phys_addr_t addr, int vram_size, int width, int height, int depth) { DeviceState *dev; SysBusDevice *s; dev = qdev_create(NULL, "SUNW,tcx"); qdev_prop_set_taddr(dev, "addr", addr); qdev_prop_set_uint32(dev, "vram_size", vram_size); qdev_prop_set_uint16(dev, "width", width); qdev_prop_set_uin... | 13,222 |
1 | int kvm_init_vcpu(CPUState *env) { KVMState *s = kvm_state; long mmap_size; int ret; DPRINTF("kvm_init_vcpu\n"); ret = kvm_vm_ioctl(s, KVM_CREATE_VCPU, env->cpu_index); if (ret < 0) { DPRINTF("kvm_create_vcpu failed\n"); goto err; } env->kvm_fd = ret; env->kvm_state = s; mmap_size = kvm_ioctl(s, KVM_GET_VCPU_MMAP_SIZE,... | 13,224 |
1 | static inline void RENAME(rgb24ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused) { #if COMPILE_TEMPLATE_MMX assert(src1==src2); RENAME(bgr24ToUV_mmx)(dstU, dstV, src1, width, PIX_FMT_RGB24); #else int i; assert(src1==src2); for (i=0; i<width; i++) { int r= src1[3... | 13,226 |
1 | int net_init_tap(const NetClientOptions *opts, const char *name, NetClientState *peer) { const NetdevTapOptions *tap; int fd, vnet_hdr = 0, i = 0, queues; /* for the no-fd, no-helper case */ const char *script = NULL; /* suppress wrong "uninit'd use" gcc warning */ const char *downscript = NULL; const char *vhostfdname... | 13,227 |
1 | static void spr_read_decr(DisasContext *ctx, int gprn, int sprn) { if (ctx->tb->cflags & CF_USE_ICOUNT) { gen_io_start(); } gen_helper_load_decr(cpu_gpr[gprn], cpu_env); if (ctx->tb->cflags & CF_USE_ICOUNT) { gen_io_end(); gen_stop_exception(ctx); } } | 13,228 |
1 | static double get_scene_score(AVFilterContext *ctx, AVFilterBufferRef *picref) { double ret = 0; SelectContext *select = ctx->priv; AVFilterBufferRef *prev_picref = select->prev_picref; if (prev_picref && picref->video->h == prev_picref->video->h && picref->video->w == prev_picref->video->w && picref->linesize[0] == pr... | 13,229 |
1 | static int do_req(int sockfd, AioContext *aio_context, SheepdogReq *hdr, void *data, unsigned int *wlen, unsigned int *rlen) { Coroutine *co; SheepdogReqCo srco = { .sockfd = sockfd, .aio_context = aio_context, .hdr = hdr, .data = data, .wlen = wlen, .rlen = rlen, .ret = 0, .finished = false, }; if (qemu_in_coroutine()... | 13,231 |
1 | static void gen_mtsrin(DisasContext *ctx) { #if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_REG); #else TCGv t0; if (unlikely(ctx->pr)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_REG); return; } t0 = tcg_temp_new(); tcg_gen_shri_tl(t0, cpu_gpr[rB(ctx->opcode)], 28); tcg_gen_andi_tl(t0, t0, 0x... | 13,232 |
1 | void s390_pci_iommu_enable(S390PCIBusDevice *pbdev) { uint64_t size = pbdev->pal - pbdev->pba + 1; memory_region_init_iommu(&pbdev->iommu_mr, OBJECT(&pbdev->mr), &s390_iommu_ops, "iommu-s390", size); memory_region_add_subregion(&pbdev->mr, pbdev->pba, &pbdev->iommu_mr); pbdev->iommu_enabled = true; } | 13,233 |
1 | strdup(str) const char *str; { char *bptr; bptr = (char *)malloc(strlen(str)+1); strcpy(bptr, str); return bptr; } | 13,234 |
1 | static void gen_tlbli_6xx(DisasContext *ctx) { #if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); #else if (unlikely(ctx->pr)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); return; } gen_helper_6xx_tlbi(cpu_env, cpu_gpr[rB(ctx->opcode)]); #endif } | 13,235 |
1 | QemuOpts *qemu_opts_parse(QemuOptsList *list, const char *params, int permit_abbrev) { const char *firstname; char value[1024], *id = NULL; const char *p; QemuOpts *opts; assert(!permit_abbrev || list->implied_opt_name); firstname = permit_abbrev ? list->implied_opt_name : NULL; if (strncmp(params, "id=", 3) == 0) { ge... | 13,237 |
1 | static always_inline int get_segment (CPUState *env, mmu_ctx_t *ctx, target_ulong eaddr, int rw, int type) { target_phys_addr_t sdr, hash, mask, sdr_mask, htab_mask; target_ulong sr, vsid, vsid_mask, pgidx, page_mask; #if defined(TARGET_PPC64) int attr; #endif int ds, vsid_sh, sdr_sh, pr; int ret, ret2; pr = msr_pr; #i... | 13,238 |
1 | AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_frame(const AVFrame *frame, int perms) { AVFilterBufferRef *samplesref = avfilter_get_audio_buffer_ref_from_arrays((uint8_t **)frame->data, frame->linesize[0], perms, frame->nb_samples, frame->format, av_frame_get_channel_layout(frame)); if (!samplesref) return NULL... | 13,239 |
1 | int ff_wmv2_decode_secondary_picture_header(MpegEncContext *s) { Wmv2Context *const w = (Wmv2Context *) s; if (s->pict_type == AV_PICTURE_TYPE_I) { if (w->j_type_bit) w->j_type = get_bits1(&s->gb); else w->j_type = 0; // FIXME check if (!w->j_type) { if (w->per_mb_rl_bit) s->per_mb_rl_table = get_bits1(&s->gb); else s-... | 13,240 |
1 | static void vp8_decode_flush_impl(AVCodecContext *avctx, int force, int is_close) { VP8Context *s = avctx->priv_data; int i; if (!avctx->is_copy || force) { for (i = 0; i < 5; i++) if (s->frames[i].data[0]) vp8_release_frame(s, &s->frames[i], is_close); } memset(s->framep, 0, sizeof(s->framep)); free_buffers(s); s->map... | 13,241 |
1 | static CharDriverState *qemu_chr_open_stdio(QemuOpts *opts) { CharDriverState *chr; if (stdio_nb_clients >= STDIO_MAX_CLIENTS) { if (stdio_nb_clients == 0) { old_fd0_flags = fcntl(0, F_GETFL); tcgetattr (0, &oldtty); fcntl(0, F_SETFL, O_NONBLOCK); atexit(term_exit); chr = qemu_chr_open_fd(0, 1); chr->chr_close = qemu_c... | 13,242 |
1 | static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) { LclContext * const c = (LclContext *)avctx->priv_data; unsigned char *encoded = (unsigned char *)buf; int pixel_ptr; int row, col; unsigned char *outptr; unsigned int width = avctx->width; // Real image width unsign... | 13,243 |
1 | static int ram_save_host_page(RAMState *rs, PageSearchStatus *pss, bool last_stage) { int tmppages, pages = 0; size_t pagesize_bits = qemu_ram_pagesize(pss->block) >> TARGET_PAGE_BITS; do { tmppages = ram_save_target_page(rs, pss, last_stage); if (tmppages < 0) { return tmppages; } pages += tmppages; pss->page++; } whi... | 13,244 |
1 | static int qemu_rdma_exchange_recv(RDMAContext *rdma, RDMAControlHeader *head, int expecting) { RDMAControlHeader ready = { .len = 0, .type = RDMA_CONTROL_READY, .repeat = 1, }; int ret; /* * Inform the source that we're ready to receive a message. */ ret = qemu_rdma_post_send_control(rdma, NULL, &ready); if (ret < 0) ... | 13,245 |
1 | static int qxl_track_command(PCIQXLDevice *qxl, struct QXLCommandExt *ext) { switch (le32_to_cpu(ext->cmd.type)) { case QXL_CMD_SURFACE: { QXLSurfaceCmd *cmd = qxl_phys2virt(qxl, ext->cmd.data, ext->group_id); if (!cmd) { uint32_t id = le32_to_cpu(cmd->surface_id); if (id >= qxl->ssd.num_surfaces) { qxl_set_guest_bug(q... | 13,246 |
1 | int tcp_fconnect(struct socket *so) { Slirp *slirp = so->slirp; int ret=0; DEBUG_CALL("tcp_fconnect"); DEBUG_ARG("so = %lx", (long )so); if( (ret=so->s=socket(AF_INET,SOCK_STREAM,0)) >= 0) { int opt, s=so->s; struct sockaddr_in addr; fd_nonblock(s); opt = 1; setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(opt ... | 13,247 |
1 | static void cloop_close(BlockDriverState *bs) { BDRVCloopState *s = bs->opaque; if (s->n_blocks > 0) { g_free(s->offsets); } g_free(s->compressed_block); g_free(s->uncompressed_block); inflateEnd(&s->zstream); } | 13,249 |
0 | PROTO4(_pack_2ch_) PROTO4(_pack_6ch_) PROTO4(_pack_8ch_) PROTO4(_unpack_2ch_) PROTO4(_unpack_6ch_) av_cold void swri_audio_convert_init_x86(struct AudioConvert *ac, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels){ int mm_flags = av_get_cpu_flags(); ac->simd_f= NULL; //FIXME add memcpy case #defin... | 13,251 |
0 | int ff_unlock_avcodec(const AVCodec *codec) { _Bool exp = 1; if (codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE || !codec->init) return 0; av_assert0(atomic_compare_exchange_strong(&ff_avcodec_locked, &exp, 0)); atomic_fetch_add(&entangled_thread_counter, -1); if (lockmgr_cb) { if ((*lockmgr_cb)(&codec_mutex, AV_L... | 13,252 |
0 | static int ivi_decode_coded_blocks(GetBitContext *gb, IVIBandDesc *band, ivi_mc_func mc, int mv_x, int mv_y, int *prev_dc, int is_intra, int mc_type, uint32_t quant, int offs, AVCodecContext *avctx) { const uint16_t *base_tab = is_intra ? band->intra_base : band->inter_base; RVMapDesc *rvmap = band->rv_map; uint8_t col... | 13,253 |
1 | static void continue_send(IPMIBmcExtern *ibe) { if (ibe->outlen == 0) { goto check_reset; } send: ibe->outpos += qemu_chr_fe_write(ibe->chr, ibe->outbuf + ibe->outpos, ibe->outlen - ibe->outpos); if (ibe->outpos < ibe->outlen) { /* Not fully transmitted, try again in a 10ms */ timer_mod_ns(ibe->extern_timer, qemu_clock... | 13,254 |
1 | static void sdhci_do_adma(SDHCIState *s) { unsigned int n, begin, length; const uint16_t block_size = s->blksize & 0x0fff; ADMADescr dscr; int i; for (i = 0; i < SDHC_ADMA_DESCS_PER_DELAY; ++i) { s->admaerr &= ~SDHC_ADMAERR_LENGTH_MISMATCH; get_adma_description(s, &dscr); DPRINT_L2("ADMA loop: addr=" TARGET_FMT_plx ", ... | 13,255 |
1 | static int copy_sectors(BlockDriverState *bs, uint64_t start_sect, uint64_t cluster_offset, int n_start, int n_end) { BDRVQcowState *s = bs->opaque; int n, ret; void *buf; /* * If this is the last cluster and it is only partially used, we must only * copy until the end of the image, or bdrv_check_request will fail for ... | 13,256 |
1 | void arm_cpu_do_transaction_failed(CPUState *cs, hwaddr physaddr, vaddr addr, unsigned size, MMUAccessType access_type, int mmu_idx, MemTxAttrs attrs, MemTxResult response, uintptr_t retaddr) { ARMCPU *cpu = ARM_CPU(cs); ARMMMUFaultInfo fi = {}; /* now we have a real cpu fault */ cpu_restore_state(cs, retaddr); /* The ... | 13,257 |
1 | static int truemotion1_decode_header(TrueMotion1Context *s) { int i, ret; int width_shift = 0; int new_pix_fmt; struct frame_header header; uint8_t header_buffer[128] = { 0 }; /* logical maximum size of the header */ const uint8_t *sel_vector_table; header.header_size = ((s->buf[0] >> 5) | (s->buf[0] << 3)) & 0x7f; if ... | 13,258 |
1 | static av_always_inline void RENAME(decode_line)(FFV1Context *s, int w, TYPE *sample[2], int plane_index, int bits) { PlaneContext *const p = &s->plane[plane_index]; RangeCoder *const c = &s->c; int x; int run_count = 0; int run_mode = 0; int run_index = s->run_index; if (s->slice_coding_mode == 1) { int i; for (x = 0;... | 13,259 |
1 | static int bochs_open(BlockDriverState *bs, int flags) { BDRVBochsState *s = bs->opaque; int i; struct bochs_header bochs; struct bochs_header_v1 header_v1; bs->read_only = 1; // no write support yet if (bdrv_pread(bs->file, 0, &bochs, sizeof(bochs)) != sizeof(bochs)) { goto fail; } if (strcmp(bochs.magic, HEADER_MAGIC... | 13,260 |
1 | static void set_alarm (m48t59_t *NVRAM, struct tm *tm) { NVRAM->alarm = mktime(tm); if (NVRAM->alrm_timer != NULL) { qemu_del_timer(NVRAM->alrm_timer); NVRAM->alrm_timer = NULL; } if (NVRAM->alarm - time(NULL) > 0) qemu_mod_timer(NVRAM->alrm_timer, NVRAM->alarm * 1000); } | 13,261 |
1 | static void i440fx_pcihost_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); PCIHostBridgeClass *hc = PCI_HOST_BRIDGE_CLASS(klass); hc->root_bus_path = i440fx_pcihost_root_bus_path; dc->realize = i440fx_pcihost_realize; dc->fw_name = "pci"; dc->props = i440fx_props; } | 13,262 |
1 | static void init_parse_context(OptionParseContext *octx, const OptionGroupDef *groups, int nb_groups) { static const OptionGroupDef global_group = { "global" }; int i; memset(octx, 0, sizeof(*octx)); octx->nb_groups = nb_groups; octx->groups = av_mallocz(sizeof(*octx->groups) * octx->nb_groups); if (!octx->groups) exit... | 13,263 |
1 | int ff_mov_read_chan(AVFormatContext *s, AVStream *st, int64_t size) { AVIOContext *pb = s->pb; uint32_t layout_tag, bitmap, num_descr, label_mask; int i; if (size < 12) return AVERROR_INVALIDDATA; layout_tag = avio_rb32(pb); bitmap = avio_rb32(pb); num_descr = avio_rb32(pb); av_dlog(s, "chan: layout=%u bitmap=%u num_d... | 13,264 |
1 | void microblaze_load_kernel(MicroBlazeCPU *cpu, hwaddr ddr_base, uint32_t ramsize, const char *initrd_filename, const char *dtb_filename, void (*machine_cpu_reset)(MicroBlazeCPU *)) { QemuOpts *machine_opts; const char *kernel_filename; const char *kernel_cmdline; const char *dtb_arg; machine_opts = qemu_get_machine_op... | 13,265 |
1 | static int kvm_ppc_register_host_cpu_type(void) { TypeInfo type_info = { .name = TYPE_HOST_POWERPC_CPU, .class_init = kvmppc_host_cpu_class_init, }; PowerPCCPUClass *pvr_pcc; DeviceClass *dc; int i; pvr_pcc = kvm_ppc_get_host_cpu_class(); if (pvr_pcc == NULL) { return -1; } type_info.parent = object_class_get_name(OBJE... | 13,266 |
1 | static int av_encode(AVFormatContext **output_files, int nb_output_files, AVFormatContext **input_files, int nb_input_files, AVStreamMap *stream_maps, int nb_stream_maps) { int ret, i, j, k, n, nb_istreams = 0, nb_ostreams = 0, pts_set; AVFormatContext *is, *os; AVCodecContext *codec, *icodec; AVOutputStream *ost, **os... | 13,267 |
1 | static void RENAME(mix8to2)(SAMPLE **out, const SAMPLE **in, COEFF *coeffp, integer len){ int i; for(i=0; i<len; i++) { INTER t = in[2][i]*coeffp[0*8+2] + in[3][i]*coeffp[0*8+3]; out[0][i] = R(t + in[0][i]*(INTER)coeffp[0*8+0] + in[4][i]*(INTER)coeffp[0*8+4] + in[6][i]*(INTER)coeffp[0*8+6]); out[1][i] = R(t + in[1][i]*... | 13,269 |
1 | static CharDriverState *qemu_chr_open_pp_fd(int fd, ChardevCommon *backend, Error **errp) { CharDriverState *chr; ParallelCharDriver *drv; if (ioctl(fd, PPCLAIM) < 0) { error_setg_errno(errp, errno, "not a parallel port"); close(fd); return NULL; } drv = g_new0(ParallelCharDriver, 1); drv->fd = fd; drv->mode = IEEE1284... | 13,271 |
1 | static void pprint_data(V9fsPDU *pdu, int rx, size_t *offsetp, const char *name) { struct iovec *sg = get_sg(pdu, rx); size_t offset = *offsetp; unsigned int count; int32_t size; int total, i, j; ssize_t len; if (rx) { count = pdu->elem.in_num; } else count = pdu->elem.out_num; } | 13,272 |
1 | static void put_audio_specific_config(AVCodecContext *avctx) { PutBitContext pb; AACEncContext *s = avctx->priv_data; init_put_bits(&pb, avctx->extradata, avctx->extradata_size*8); put_bits(&pb, 5, 2); //object type - AAC-LC put_bits(&pb, 4, s->samplerate_index); //sample rate index put_bits(&pb, 4, s->channels); //GAS... | 13,274 |
1 | static void error_setv(Error **errp, ErrorClass err_class, const char *fmt, va_list ap) { Error *err; int saved_errno = errno; if (errp == NULL) { return; } assert(*errp == NULL); err = g_malloc0(sizeof(*err)); err->msg = g_strdup_vprintf(fmt, ap); err->err_class = err_class; if (errp == &error_abort) { error_report_er... | 13,275 |
1 | static QObject *qdict_get_obj(const QDict *qdict, const char *key, QType type) { QObject *obj; obj = qdict_get(qdict, key); assert(obj != NULL); assert(qobject_type(obj) == type); return obj; } | 13,276 |
1 | static av_cold int libschroedinger_encode_init(AVCodecContext *avctx) { SchroEncoderParams *p_schro_params = avctx->priv_data; SchroVideoFormatEnum preset; /* Initialize the libraries that libschroedinger depends on. */ schro_init(); /* Create an encoder object. */ p_schro_params->encoder = schro_encoder_new(); if (!p_... | 13,277 |
1 | static int dca_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; int channel_mask; int channel_layout; int lfe_samples; int num_core_channels = 0; int i, ret; float **samples_flt; float *src_chan; float *dst_chan; DCACont... | 13,279 |
1 | static int tiff_unpack_strip(TiffContext *s, uint8_t *dst, int stride, const uint8_t *src, int size, int lines) { int c, line, pixels, code, ret; const uint8_t *ssrc = src; int width = ((s->width * s->bpp) + 7) >> 3; if (size <= 0) return AVERROR_INVALIDDATA; if (s->compr == TIFF_DEFLATE || s->compr == TIFF_ADOBE_DEFLA... | 13,280 |
1 | AVBitStreamFilterContext *av_bitstream_filter_init(const char *name){ AVBitStreamFilter *bsf= first_bitstream_filter; while(bsf){ if(!strcmp(name, bsf->name)){ AVBitStreamFilterContext *bsfc= av_mallocz(sizeof(AVBitStreamFilterContext)); bsfc->filter= bsf; bsfc->priv_data= av_mallocz(bsf->priv_data_size); return bsfc; ... | 13,281 |
0 | void ff_avg_h264_qpel8_mc22_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_mid_and_aver_dst_8w_msa(src - (2 * stride) - 2, stride, dst, stride, 8); } | 13,283 |
0 | static int ac3_decode_init(AVCodecContext *avctx) { AC3DecodeContext *ctx = avctx->priv_data; ac3_common_init(); ff_mdct_init(&ctx->imdct_ctx_256, 8, 1); ff_mdct_init(&ctx->imdct_ctx_512, 9, 1); ctx->samples = av_mallocz(6 * 256 * sizeof (float)); if (!ctx->samples) { av_log(avctx, AV_LOG_ERROR, "Cannot allocate memory... | 13,284 |
0 | static av_cold int flashsv_encode_init(AVCodecContext *avctx) { FlashSVContext *s = avctx->priv_data; s->avctx = avctx; if (avctx->width > 4095 || avctx->height > 4095) { av_log(avctx, AV_LOG_ERROR, "Input dimensions too large, input must be max 4096x4096 !\n"); return AVERROR_INVALIDDATA; } // Needed if zlib unused or... | 13,285 |
0 | static int subtitle_thread(void *arg) { VideoState *is = arg; Frame *sp; int got_subtitle; double pts; int i; for (;;) { if (!(sp = frame_queue_peek_writable(&is->subpq))) return 0; if ((got_subtitle = decoder_decode_frame(&is->subdec, NULL, &sp->sub)) < 0) break; pts = 0; if (got_subtitle && sp->sub.format == 0) { if ... | 13,286 |
0 | static int vb_decode_framedata(VBDecContext *c, const uint8_t *buf, int offset) { uint8_t *prev, *cur; int blk, blocks, t, blk2; int blocktypes = 0; int x, y, a, b; int pattype, pattern; const int width = c->avctx->width; uint8_t *pstart = c->prev_frame; uint8_t *pend = c->prev_frame + width*c->avctx->height; prev = c-... | 13,287 |
0 | static void pre_calc_cosmod(DCAContext * s) { int i, j, k; static int cosmod_inited = 0; if(cosmod_inited) return; for (j = 0, k = 0; k < 16; k++) for (i = 0; i < 16; i++) cos_mod[j++] = cos((2 * i + 1) * (2 * k + 1) * M_PI / 64); for (k = 0; k < 16; k++) for (i = 0; i < 16; i++) cos_mod[j++] = cos((i) * (2 * k + 1) * ... | 13,288 |
0 | static int RENAME(dct_quantize)(MpegEncContext *s, DCTELEM *block, int n, int qscale, int *overflow) { int level=0, last_non_zero_p1, q; //=0 is cuz gcc says uninitalized ... const uint16_t *qmat, *bias; static __align8 int16_t temp_block[64]; //s->fdct (block); ff_fdct_mmx (block); //cant be anything else ... if (s->m... | 13,289 |
1 | void ff_put_pixels_clamped_c(const DCTELEM *block, uint8_t *restrict pixels, int line_size) { int i; uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; /* read the pixels */ for(i=0;i<8;i++) { pixels[0] = cm[block[0]]; pixels[1] = cm[block[1]]; pixels[2] = cm[block[2]]; pixels[3] = cm[block[3]]; pixels[4] = cm[block[4]]; pixels[... | 13,290 |
1 | int has_altivec(void) { #ifdef __AMIGAOS4__ ULONG result = 0; extern struct ExecIFace *IExec; IExec->GetCPUInfoTags(GCIT_VectorUnit, &result, TAG_DONE); if (result == VECTORTYPE_ALTIVEC) return 1; #elif __APPLE__ int sels[2] = {CTL_HW, HW_VECTORUNIT}; int has_vu = 0; size_t len = sizeof(has_vu); int err; err = sysctl(s... | 13,292 |
1 | static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int keyframe) { GetBitContext gb; PutBitContext pb; AACADTSHeaderInfo hdr; AACBSFContext *ctx = bsfc->priv_data; init_get_bits(&gb, buf, AAC_AD... | 13,294 |
1 | static int tgv_decode_inter(TgvContext * s, const uint8_t *buf, const uint8_t *buf_end){ unsigned char *frame0_end = s->last_frame.data[0] + s->avctx->width*s->last_frame.linesize[0]; int num_mvs; int num_blocks_raw; int num_blocks_packed; int vector_bits; int i,j,x,y; GetBitContext gb; int mvbits; const unsigned char ... | 13,295 |
1 | static void generic_loader_realize(DeviceState *dev, Error **errp) { GenericLoaderState *s = GENERIC_LOADER(dev); hwaddr entry; int big_endian; int size = 0; s->set_pc = false; /* Perform some error checking on the user's options */ if (s->data || s->data_len || s->data_be) { /* User is loading memory values */ if (s->... | 13,296 |
0 | static inline void RENAME(nvXXtoUV)(uint8_t *dst1, uint8_t *dst2, const uint8_t *src, long width) { #if COMPILE_TEMPLATE_MMX __asm__ volatile( "movq "MANGLE(bm01010101)", %%mm4 \n\t" "mov %0, %%"REG_a" \n\t" "1: \n\t" "movq (%1, %%"REG_a",2), %%mm0 \n\t" "movq 8(%1, %%"REG_a",2), %%mm1 \n\t" "movq %%mm0, %%mm2 \n\t" "m... | 13,297 |
0 | static int mpc7_decode_init(AVCodecContext * avctx) { int i, j; MPCContext *c = avctx->priv_data; GetBitContext gb; uint8_t buf[16]; static int vlc_inited = 0; if(avctx->extradata_size < 16){ av_log(avctx, AV_LOG_ERROR, "Too small extradata size (%i)!\n", avctx->extradata_size); return -1; } memset(c->oldDSCF, 0, sizeo... | 13,298 |
0 | void ff_vp3_idct_altivec(DCTELEM block[64]) { IDCT_START IDCT_1D(NOP, NOP) TRANSPOSE8(b0, b1, b2, b3, b4, b5, b6, b7); IDCT_1D(ADD8, SHIFT4) vec_st(b0, 0x00, block); vec_st(b1, 0x10, block); vec_st(b2, 0x20, block); vec_st(b3, 0x30, block); vec_st(b4, 0x40, block); vec_st(b5, 0x50, block); vec_st(b6, 0x60, block); vec_... | 13,299 |
0 | static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom) { AVStream *st; MOVStreamContext *sc; unsigned int i, j, entries, ctts_count = 0; 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 */ entries = avio... | 13,300 |
1 | static void gen_mfsrin(DisasContext *ctx) { #if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_REG); #else TCGv t0; if (unlikely(ctx->pr)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_REG); return; } t0 = tcg_temp_new(); tcg_gen_shri_tl(t0, cpu_gpr[rB(ctx->opcode)], 28); tcg_gen_andi_tl(t0, t0, 0x... | 13,301 |
1 | void qemu_sem_wait(QemuSemaphore *sem) { #if defined(__APPLE__) || defined(__NetBSD__) pthread_mutex_lock(&sem->lock); --sem->count; while (sem->count < 0) { pthread_cond_wait(&sem->cond, &sem->lock); } pthread_mutex_unlock(&sem->lock); #else int rc; do { rc = sem_wait(&sem->sem); } while (rc == -1 && errno == EINTR); ... | 13,304 |
0 | static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t flags) { int isv34, tlen, unsync; char tag[5]; int64_t next, end = avio_tell(s->pb) + len; int taghdrlen; const char *reason = NULL; AVIOContext pb; unsigned char *buffer = NULL; int buffer_size = 0; switch (version) { case 2: if (flags & ... | 13,305 |
1 | void palette8torgb24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette) { long i; /* writes 1 byte o much and might cause alignment issues on some architectures? for(i=0; i<num_pixels; i++) ((unsigned *)(&dst[i*3])) = ((unsigned *)palette)[ src[i] ]; */ for(i=0; i<num_pixels; i++) { //FIXME slow... | 13,306 |
1 | static int m25p80_init(SSISlave *ss) { DriveInfo *dinfo; Flash *s = M25P80(ss); M25P80Class *mc = M25P80_GET_CLASS(s); s->pi = mc->pi; s->size = s->pi->sector_size * s->pi->n_sectors; s->dirty_page = -1; s->storage = blk_blockalign(s->blk, s->size); /* FIXME use a qdev drive property instead of drive_get_next() */ dinf... | 13,308 |
1 | void visit_start_list(Visitor *v, const char *name, GenericList **list, size_t size, Error **errp) { Error *err = NULL; assert(!list || size >= sizeof(GenericList)); v->start_list(v, name, list, size, &err); if (list && v->type == VISITOR_INPUT) { assert(!(err && *list)); } error_propagate(errp, err); } | 13,309 |
1 | static unsigned __stdcall win32_start_routine(void *arg) { struct QemuThreadData data = *(struct QemuThreadData *) arg; QemuThread *thread = data.thread; free(arg); TlsSetValue(qemu_thread_tls_index, thread); /* * Use DuplicateHandle instead of assigning thread->thread in the * creating thread to avoid races. It's simp... | 13,310 |
0 | static int mov_read_stss(MOVContext *c, ByteIOContext *pb, MOVAtom atom) { AVStream *st = c->fc->streams[c->fc->nb_streams-1]; MOVStreamContext *sc = st->priv_data; unsigned int i, entries; get_byte(pb); /* version */ get_be24(pb); /* flags */ entries = get_be32(pb); dprintf(c->fc, "keyframe_count = %d\n", entries); if... | 13,312 |
1 | static float pvq_band_cost(CeltPVQ *pvq, CeltFrame *f, OpusRangeCoder *rc, int band, float *bits, float lambda) { int i, b = 0; uint32_t cm[2] = { (1 << f->blocks) - 1, (1 << f->blocks) - 1 }; const int band_size = ff_celt_freq_range[band] << f->size; float buf[176 * 2], lowband_scratch[176], norm1[176], norm2[176]; fl... | 13,313 |
1 | static int r3d_seek(AVFormatContext *s, int stream_index, int64_t sample_time, int flags) { AVStream *st = s->streams[0]; // video stream R3DContext *r3d = s->priv_data; int frame_num; if (!st->codec->time_base.num || !st->time_base.den) return -1; frame_num = sample_time*st->codec->time_base.den/ ((int64_t)st->codec->... | 13,314 |
1 | m48t59_t *m48t59_init (qemu_irq IRQ, target_phys_addr_t mem_base, uint32_t io_base, uint16_t size, int type) { DeviceState *dev; SysBusDevice *s; M48t59SysBusState *d; dev = qdev_create(NULL, "m48t59"); qdev_prop_set_uint32(dev, "type", type); qdev_prop_set_uint32(dev, "size", size); qdev_prop_set_uint32(dev, "io_base"... | 13,315 |
1 | static int decode_frame_header(ProresContext *ctx, const uint8_t *buf, const int data_size, AVCodecContext *avctx) { int hdr_size, width, height, flags; int version; const uint8_t *ptr; hdr_size = AV_RB16(buf); av_dlog(avctx, "header size %d\n", hdr_size); if (hdr_size > data_size) { av_log(avctx, AV_LOG_ERROR, "error,... | 13,317 |
1 | static inline int GetCode(GifState * s) { int c, sizbuf; uint8_t *ptr; while (s->bbits < s->cursize) { ptr = s->pbuf; if (ptr >= s->ebuf) { if (!s->eob_reached) { sizbuf = get_byte(s->f); s->ebuf = s->buf + sizbuf; s->pbuf = s->buf; if (sizbuf > 0) { get_buffer(s->f, s->buf, sizbuf); } else { s->eob_reached = 1; } } pt... | 13,318 |
1 | static void filter(SPPContext *p, uint8_t *dst, uint8_t *src, int dst_linesize, int src_linesize, int width, int height, const uint8_t *qp_table, int qp_stride, int is_luma, int sample_bytes) { int x, y, i; const int count = 1 << p->log2_count; const int linesize = is_luma ? p->temp_linesize : FFALIGN(width+16, 16); DE... | 13,319 |
1 | static int vp8_alloc_frame(VP8Context *s, AVFrame *f) { int ret; if ((ret = ff_thread_get_buffer(s->avctx, f)) < 0) return ret; if (!s->maps_are_invalid && s->num_maps_to_be_freed) { f->ref_index[0] = s->segmentation_maps[--s->num_maps_to_be_freed]; } else if (!(f->ref_index[0] = av_mallocz(s->mb_width * s->mb_height))... | 13,320 |
1 | static int64_t read_ts(const char *s) { int hh, mm, ss, ms; if (sscanf(s, "%u:%u:%u.%u", &hh, &mm, &ss, &ms) == 4) return (hh*3600 + mm*60 + ss) * 1000 + ms; if (sscanf(s, "%u:%u.%u", &mm, &ss, &ms) == 3) return ( mm*60 + ss) * 1000 + ms; return AV_NOPTS_VALUE; } | 13,321 |
1 | static void i82374_init(I82374State *s) { DMA_init(1, NULL); memset(s->commands, 0, sizeof(s->commands)); } | 13,322 |
1 | static void qxl_destroy_primary(PCIQXLDevice *d) { if (d->mode == QXL_MODE_UNDEFINED) { return; } dprint(d, 1, "%s\n", __FUNCTION__); d->mode = QXL_MODE_UNDEFINED; d->ssd.worker->destroy_primary_surface(d->ssd.worker, 0); } | 13,323 |
1 | void isa_ne2000_init(int base, int irq, NICInfo *nd) { ISADevice *dev; qemu_check_nic_model(nd, "ne2k_isa"); dev = isa_create("ne2k_isa"); dev->qdev.nd = nd; /* hack alert */ qdev_prop_set_uint32(&dev->qdev, "iobase", base); qdev_prop_set_uint32(&dev->qdev, "irq", irq); qdev_init(&dev->qdev); } | 13,325 |
1 | static int allocate_buffers(ShortenContext *s) { int i, chan, err; for (chan = 0; chan < s->channels; chan++) { if (FFMAX(1, s->nmean) >= UINT_MAX / sizeof(int32_t)) { av_log(s->avctx, AV_LOG_ERROR, "nmean too large\n"); return AVERROR_INVALIDDATA; } if (s->blocksize + s->nwrap >= UINT_MAX / sizeof(int32_t) || s->block... | 13,326 |
1 | static av_always_inline int rv40_loop_filter_strength(uint8_t *src, int step, int stride, int beta, int beta2, int edge, int *p1, int *q1) { int sum_p1p0 = 0, sum_q1q0 = 0, sum_p1p2 = 0, sum_q1q2 = 0; int strong0 = 0, strong1 = 0; uint8_t *ptr; int i; for (i = 0, ptr = src; i < 4; i++, ptr += stride) { sum_p1p0 += ptr[... | 13,327 |
1 | static void encode_window_bands_info(AACEncContext *s, SingleChannelElement *sce, int win, int group_len, const float lambda) { BandCodingPath path[120][CB_TOT_ALL]; int w, swb, cb, start, size; int i, j; const int max_sfb = sce->ics.max_sfb; const int run_bits = sce->ics.num_windows == 1 ? 5 : 3; const int run_esc = (... | 13,328 |
1 | callback(void *priv_data, int index, uint8_t *buf, int buf_size, int64_t time) { AVFormatContext *s = priv_data; struct dshow_ctx *ctx = s->priv_data; AVPacketList **ppktl, *pktl_next; // dump_videohdr(s, vdhdr); WaitForSingleObject(ctx->mutex, INFINITE); if(shall_we_drop(s, index)) goto fail; pktl_next = av_mallocz(si... | 13,329 |
1 | void fw_cfg_add_string(FWCfgState *s, uint16_t key, const char *value) { size_t sz = strlen(value) + 1; return fw_cfg_add_bytes(s, key, (uint8_t *)g_memdup(value, sz), sz); } | 13,330 |
1 | static void ide_flush_cache(IDEState *s) { if (s->blk == NULL) { ide_flush_cb(s, 0); return; } s->status |= BUSY_STAT; ide_set_retry(s); block_acct_start(blk_get_stats(s->blk), &s->acct, 0, BLOCK_ACCT_FLUSH); s->pio_aiocb = blk_aio_flush(s->blk, ide_flush_cb, s); } | 13,331 |
1 | void helper_st_asi(target_ulong addr, target_ulong val, int asi, int size) { #ifdef DEBUG_ASI dump_asi("write", addr, asi, size, val); #endif asi &= 0xff; if ((asi < 0x80 && (env->pstate & PS_PRIV) == 0) || ((env->def->features & CPU_FEATURE_HYPV) && asi >= 0x30 && asi < 0x80 && !(env->hpstate & HS_PRIV))) raise_except... | 13,332 |
1 | static int xan_decode_frame_type0(AVCodecContext *avctx, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; XanContext *s = avctx->priv_data; uint8_t *ybuf, *prev_buf, *src = s->scratch_buffer; unsigned chroma_off, corr_off; int cur, last, size; int i, j; int ret; corr_off = AV_RL32(buf + 8); chroma_off = AV_RL32(buf... | 13,333 |
1 | static void set_chr(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { DeviceState *dev = DEVICE(obj); Error *local_err = NULL; Property *prop = opaque; CharBackend *be = qdev_get_prop_ptr(dev, prop); CharDriverState *s; char *str; if (dev->realized) { qdev_prop_set_after_realize(dev, name, errp);... | 13,335 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.