label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
1 | int 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 scale, shift, i; /* for initializing LUT for intensity compensation */ v->numref=0; v->fcm=0; v->field_mode=0; v->p_frame_skip... |
1 | static int decode_mb(MadContext *s, AVFrame *frame, int inter){ int mv_map = 0; int mv_x, mv_y; int j; if (inter) { int v = decode210(&s->gb); if (v < 2) { mv_map = v ? get_bits(&s->gb, 6) : 63; mv_x = decode_motion(&s->gb); mv_y = decode_motion(&s->gb); } } for (j=0; j<6; j++) { if (mv_map & (1<<j)) { // mv_x and mv_y... |
1 | static inline uint16_t vring_avail_idx(VirtQueue *vq){ VRingMemoryRegionCaches *caches = atomic_rcu_read(&vq->vring.caches); hwaddr pa = offsetof(VRingAvail, idx); vq->shadow_avail_idx = virtio_lduw_phys_cached(vq->vdev, &caches->avail, pa); return vq->shadow_avail_idx;} |
1 | USBDevice *usb_create_simple(USBBus *bus, const char *name){ USBDevice *dev = usb_create(bus, name); qdev_init(&dev->qdev); return dev;} |
1 | static void qvirtio_pci_foreach_callback( QPCIDevice *dev, int devfn, void *data){ QVirtioPCIForeachData *d = data; QVirtioPCIDevice *vpcidev = qpcidevice_to_qvirtiodevice(dev); if (vpcidev->vdev.device_type == d->device_type && (!d->has_slot || vpcidev->pdev->devfn == d->slot << 3)) { d->func(&vpcidev->vdev, d->user_d... |
1 | static inline void qpel_motion(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int field_based, int bottom_field, int field_select, uint8_t **ref_picture, op_pixels_func (*pix_op)[4], qpel_mc_func (*qpix_op)[16], int motion_x, int motion_y, int h){ uint8_t *ptr_y, *ptr_cb, *ptr_cr; int dxy, uvdx... |
1 | static int host_pci_config_read(int pos, int len, uint32_t val){ char path[PATH_MAX]; int config_fd; ssize_t size = sizeof(path); /* Access real host bridge. */ int rc = snprintf(path, size, "/sys/bus/pci/devices/%04x:%02x:%02x.%d/%s", 0, 0, 0, 0, "config"); if (rc >= size || rc < 0) { return -ENODEV; } config_fd = ope... |
1 | static inline void read_mem(IVState *s, uint64_t off, void *buf, size_t len){ QTestState *qtest = global_qtest; global_qtest = s->qtest; qpci_memread(s->dev, s->mem_base + off, buf, len); global_qtest = qtest;} |
1 | static void sdhci_initfn(Object *obj){ SDHCIState *s = SDHCI(obj); DriveInfo *di; di = drive_get_next(IF_SD); s->card = sd_init(di ? di->bdrv : NULL, false); if (s->card == NULL) { exit(1); } s->eject_cb = qemu_allocate_irqs(sdhci_insert_eject_cb, s, 1)[0]; s->ro_cb = qemu_allocate_irqs(sdhci_card_readonly_cb, s, 1)[0]... |
1 | static int decode_packet(AVCodecContext *avctx, void *data, int *data_size, AVPacket* avpkt){ WmallDecodeCtx *s = avctx->priv_data; GetBitContext* gb = &s->pgb; const uint8_t* buf = avpkt->data; int buf_size = avpkt->size; int num_bits_prev_frame; int packet_sequence_number; s->samples = data; s->samples_end = (float*)... |
1 | int vhost_backend_update_device_iotlb(struct vhost_dev *dev, uint64_t iova, uint64_t uaddr, uint64_t len, IOMMUAccessFlags perm){ struct vhost_iotlb_msg imsg; imsg.iova = iova; imsg.uaddr = uaddr; imsg.size = len; imsg.type = VHOST_IOTLB_UPDATE; switch (perm) { case IOMMU_RO: imsg.perm = VHOST_ACCESS_RO; break; case IO... |
1 | void qemu_set_log_filename(const char *filename){ char *pidstr; g_free(logfilename); pidstr = strstr(filename, "%"); if (pidstr) { /* We only accept one %d, no other format strings */ if (pidstr[1] != 'd' || strchr(pidstr + 2, '%')) { error_report("Bad logfile format: %s", filename); logfilename = NULL; } else { logfil... |
1 | static void virtio_scsi_handle_event(VirtIODevice *vdev, VirtQueue *vq){ VirtIOSCSI *s = VIRTIO_SCSI(vdev); if (s->ctx && !s->dataplane_started) { virtio_scsi_dataplane_start(s); return; } if (s->events_dropped) { virtio_scsi_push_event(s, NULL, VIRTIO_SCSI_T_NO_EVENT, 0); }} |
1 | static int gdb_set_spe_reg(CPUState *env, uint8_t *mem_buf, int n){ if (n < 32) {#if defined(TARGET_PPC64) target_ulong lo = (uint32_t)env->gpr[n]; target_ulong hi = (target_ulong)ldl_p(mem_buf) << 32; env->gpr[n] = lo | hi;#else env->gprh[n] = ldl_p(mem_buf);#endif return 4; } if (n == 33) { env->spe_acc = ldq_p(mem_b... |
1 | int pci_bridge_initfn(PCIDevice *dev){ PCIBus *parent = dev->bus; PCIBridge *br = DO_UPCAST(PCIBridge, dev, dev); PCIBus *sec_bus = &br->sec_bus; pci_word_test_and_set_mask(dev->config + PCI_STATUS, PCI_STATUS_66MHZ | PCI_STATUS_FAST_BACK); pci_config_set_class(dev->config, PCI_CLASS_BRIDGE_PCI); dev->config[PCI_HEADER... |
1 | static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap){ ASFContext *asf = s->priv_data; ff_asf_guid g; ByteIOContext *pb = s->pb; AVStream *st; ASFStream *asf_st; int size, i; int64_t gsize; AVRational dar[128]; uint32_t bitrate[128]; memset(dar, 0, sizeof(dar)); memset(bitrate, 0, sizeof(bitrate)); get... |
1 | int64_t qmp_guest_file_open(const char *path, bool has_mode, const char *mode, Error **errp){ FILE *fh; Error *local_err = NULL; int fd; int64_t ret = -1, handle; if (!has_mode) { mode = "r"; } slog("guest-file-open called, filepath: %s, mode: %s", path, mode); fh = safe_open_or_create(path, mode, &local_err); if (loca... |
1 | static av_cold int rl2_read_header(AVFormatContext *s){ AVIOContext *pb = s->pb; AVStream *st; unsigned int frame_count; unsigned int audio_frame_counter = 0; unsigned int video_frame_counter = 0; unsigned int back_size; unsigned short sound_rate; unsigned short rate; unsigned short channels; unsigned short def_sound_s... |
1 | static int cdxl_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *pkt){ CDXLVideoContext *c = avctx->priv_data; AVFrame * const p = data; int ret, w, h, encoding, aligned_width, buf_size = pkt->size; const uint8_t *buf = pkt->data; if (buf_size < 32) return AVERROR_INVALIDDATA; encoding = buf[1]... |
1 | int32 floatx80_to_int32_round_to_zero( floatx80 a STATUS_PARAM ){ flag aSign; int32 aExp, shiftCount; uint64_t aSig, savedASig; int32 z; aSig = extractFloatx80Frac( a ); aExp = extractFloatx80Exp( a ); aSign = extractFloatx80Sign( a ); if ( 0x401E < aExp ) { if ( ( aExp == 0x7FFF ) && (uint64_t) ( aSig<<1 ) ) aSign = 0... |
1 | static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt){ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); RawVideoContext *context = avctx->priv_data; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; int linesize_align = 4; int res, len; int need_copy ... |
1 | int ff_vaapi_mpeg_end_frame(AVCodecContext *avctx){ struct vaapi_context * const vactx = avctx->hwaccel_context; MpegEncContext *s = avctx->priv_data; int ret; ret = ff_vaapi_commit_slices(vactx); if (ret < 0) goto finish; ret = ff_vaapi_render_picture(vactx, ff_vaapi_get_surface_id(&s->current_picture_ptr->f)); if (re... |
1 | static void usb_uas_command(UASDevice *uas, uas_ui *ui){ UASRequest *req; uint32_t len; uint16_t tag = be16_to_cpu(ui->hdr.tag); if (uas_using_streams(uas) && tag > UAS_MAX_STREAMS) { goto invalid_tag; } req = usb_uas_find_request(uas, tag); if (req) { goto overlapped_tag; } req = usb_uas_alloc_request(uas, ui); if (re... |
1 | static int rscc_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt){ RsccContext *ctx = avctx->priv_data; GetByteContext *gbc = &ctx->gbc; GetByteContext tiles_gbc; AVFrame *frame = data; const uint8_t *pixels, *raw; uint8_t *inflated_tiles = NULL; int tiles_nb, packed_size, pixel_size = 0;... |
1 | static void swap_channel_layouts_on_filter(AVFilterContext *filter){ AVFilterLink *link = NULL; int i, j, k; for (i = 0; i < filter->nb_inputs; i++) { link = filter->inputs[i]; if (link->type == AVMEDIA_TYPE_AUDIO && link->out_channel_layouts->nb_channel_layouts == 1) break; } if (i == filter->nb_inputs) return; for (i... |
0 | int img_convert(AVPicture *dst, int dst_pix_fmt, const AVPicture *src, int src_pix_fmt, int src_width, int src_height){ static int inited; int i, ret, dst_width, dst_height, int_pix_fmt; const PixFmtInfo *src_pix, *dst_pix; const ConvertEntry *ce; AVPicture tmp1, *tmp = &tmp1; if (src_pix_fmt < 0 || src_pix_fmt >= PIX_... |
1 | static void nal_send(AVFormatContext *ctx, const uint8_t *buf, int len, int last_packet_of_frame){ RTPMuxContext *rtp_ctx = ctx->priv_data; int rtp_payload_size = rtp_ctx->max_payload_size - RTP_HEVC_HEADERS_SIZE; int nal_type = (buf[0] >> 1) & 0x3F; /* send it as one single NAL unit? */ if (len <= rtp_ctx->max_payload... |
1 | static void decode_band_structure(GetBitContext *gbc, int blk, int eac3, int ecpl, int start_subband, int end_subband, const uint8_t *default_band_struct, uint8_t *band_struct, int *num_subbands, int *num_bands, int *band_sizes){ int subbnd, bnd, n_subbands, n_bands, bnd_sz[22]; n_subbands = end_subband - start_subband... |
1 | static void init_coef_vlc(VLC *vlc, uint16_t **prun_table, uint16_t **plevel_table, const CoefVLCTable *vlc_table){ int n = vlc_table->n; const uint8_t *table_bits = vlc_table->huffbits; const uint32_t *table_codes = vlc_table->huffcodes; const uint16_t *levels_table = vlc_table->levels; uint16_t *run_table, *level_tab... |
0 | static int avisynth_read_packet_video(AVFormatContext *s, AVPacket *pkt, int discard){ AviSynthContext *avs = s->priv_data; AVS_VideoFrame *frame; unsigned char *dst_p; const unsigned char *src_p; int n, i, plane, rowsize, planeheight, pitch, bits; const char *error; if (avs->curr_frame >= avs->vi->num_frames) return A... |
0 | static void avc_luma_midh_qrt_and_aver_dst_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height, uint8_t horiz_offset){ uint32_t multiple8_cnt; for (multiple8_cnt = 4; multiple8_cnt--;) { avc_luma_midh_qrt_and_aver_dst_4w_msa(src, src_stride, dst, dst_stride, height, horiz_of... |
1 | static int tiff_decode_tag(TiffContext *s, AVFrame *frame){ unsigned tag, type, count, off, value = 0, value2 = 0; int i, start; int pos; int ret; double *dp; ret = ff_tread_tag(&s->gb, s->le, &tag, &type, &count, &start); if (ret < 0) { goto end; off = bytestream2_tell(&s->gb); if (count == 1) { switch (type) { case T... |
1 | int kvmppc_get_htab_fd(bool write){ struct kvm_get_htab_fd s = { .flags = write ? KVM_GET_HTAB_WRITE : 0, .start_index = 0, }; if (!cap_htab_fd) { fprintf(stderr, "KVM version doesn't support saving the hash table\n"); return -1; } return kvm_vm_ioctl(kvm_state, KVM_PPC_GET_HTAB_FD, &s);} |
1 | static void machine_set_loadparm(Object *obj, const char *val, Error **errp){ S390CcwMachineState *ms = S390_CCW_MACHINE(obj); int i; for (i = 0; i < sizeof(ms->loadparm) && val[i]; i++) { uint8_t c = toupper(val[i]); /* mimic HMC */ if (('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || (c == '.') || (c == ' ')) { ms... |
1 | static void eepro100_cu_command(EEPRO100State * s, uint8_t val){ eepro100_tx_t tx; uint32_t cb_address; switch (val) { case CU_NOP: /* No operation. */ break; case CU_START: if (get_cu_state(s) != cu_idle) { /* Intel documentation says that CU must be idle for the CU * start command. Intel driver for Linux also starts ... |
1 | static av_cold int fieldmatch_init(AVFilterContext *ctx){ const FieldMatchContext *fm = ctx->priv; AVFilterPad pad = { .name = av_strdup("main"), .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, .config_props = config_input, }; if (!pad.name) return AVERROR(ENOMEM); ff_insert_inpad(ctx, INPUT_MAIN, &pad); if (... |
1 | static int count_contiguous_clusters(uint64_t nb_clusters, int cluster_size, uint64_t *l2_table, uint64_t start, uint64_t mask){ int i; uint64_t offset = be64_to_cpu(l2_table[0]) & ~mask; if (!offset) return 0; for (i = start; i < start + nb_clusters; i++) if (offset + i * cluster_size != (be64_to_cpu(l2_table[i]) & ~m... |
1 | static void gen_ove_ov(DisasContext *dc, TCGv ov){ gen_helper_ove(cpu_env, ov);} |
0 | void avpriv_tak_parse_streaminfo(GetBitContext *gb, TAKStreamInfo *s){ uint64_t channel_mask = 0; int frame_type, i; s->codec = get_bits(gb, TAK_ENCODER_CODEC_BITS); skip_bits(gb, TAK_ENCODER_PROFILE_BITS); frame_type = get_bits(gb, TAK_SIZE_FRAME_DURATION_BITS); s->samples = get_bits64(gb, TAK_SIZE_SAMPLES_NUM_BITS); ... |
0 | int show_formats(void *optctx, const char *opt, const char *arg){ AVInputFormat *ifmt = NULL; AVOutputFormat *ofmt = NULL; const char *last_name; printf("File formats:\n" " D. = Demuxing supported\n" " .E = Muxing supported\n" " --\n"); last_name = "000"; for (;;) { int decode = 0; int encode = 0; const char *name = NU... |
0 | static void SET_TYPE(resample_nearest)(void *dst0, int dst_index, const void *src0, int index){ FELEM *dst = dst0; const FELEM *src = src0; dst[dst_index] = src[index];} |
0 | static inline void mc_dir_part(H264Context *h, Picture *pic, int n, int square, int chroma_height, int delta, int list, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int src_x_offset, int src_y_offset, qpel_mc_func *qpix_op, h264_chroma_mc_func chroma_op){ MpegEncContext * const s = &h->s; const int mx= h->mv_ca... |
0 | static void rtsp_send_cmd(AVFormatContext *s, const char *cmd, RTSPMessageHeader *reply, unsigned char **content_ptr){ RTSPState *rt = s->priv_data; char buf[4096], buf1[1024]; rt->seq++; av_strlcpy(buf, cmd, sizeof(buf)); snprintf(buf1, sizeof(buf1), "CSeq: %d\r\n", rt->seq); av_strlcat(buf, buf1, sizeof(buf)); if (rt... |
0 | static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const char *vfilters){ static const enum PixelFormat pix_fmts[] = { PIX_FMT_YUV420P, PIX_FMT_NONE }; char sws_flags_str[128]; char buffersrc_args[256]; int ret; AVBufferSinkParams *buffersink_params = av_buffersink_params_alloc(); AVFilterContext ... |
1 | int dyngen_code(TCGContext *s, uint8_t *gen_code_buf){#ifdef CONFIG_PROFILER { extern int64_t dyngen_op_count; extern int dyngen_op_count_max; int n; n = (gen_opc_ptr - gen_opc_buf); dyngen_op_count += n; if (n > dyngen_op_count_max) dyngen_op_count_max = n; }#endif tcg_gen_code_common(s, gen_code_buf, 0, NULL); /* flu... |
1 | static int alloc_refcount_block(BlockDriverState *bs, int64_t cluster_index, void **refcount_block){ BDRVQcow2State *s = bs->opaque; unsigned int refcount_table_index; int64_t ret; BLKDBG_EVENT(bs->file, BLKDBG_REFBLOCK_ALLOC); /* Find the refcount block for the given cluster */ refcount_table_index = cluster_index >> ... |
1 | static int x8_setup_spatial_predictor(IntraX8Context * const w, const int chroma){ MpegEncContext * const s= w->s; int range; int sum; int quant; w->dsp.setup_spatial_compensation(s->dest[chroma], s->edge_emu_buffer, s->current_picture.f.linesize[chroma>0], &range, &sum, w->edges); if(chroma){ w->orient=w->chroma_orien... |
1 | static void vc1_mc_4mv_chroma4(VC1Context *v, int dir, int dir2, int avg){ MpegEncContext *s = &v->s; H264ChromaContext *h264chroma = &v->h264chroma; uint8_t *srcU, *srcV; int uvsrc_x, uvsrc_y; int uvmx_field[4], uvmy_field[4]; int i, off, tx, ty; int fieldmv = v->blk_mv_type[s->block_index[0]]; static const int s_rndt... |
1 | static void moxie_cpu_initfn(Object *obj){ CPUState *cs = CPU(obj); MoxieCPU *cpu = MOXIE_CPU(obj); static int inited; cs->env_ptr = &cpu->env; cpu_exec_init(cs, &error_abort); if (tcg_enabled() && !inited) { inited = 1; moxie_translate_init(); }} |
1 | static int rtp_asf_fix_header(uint8_t *buf, int len){ uint8_t *p = buf, *end = buf + len; if (len < sizeof(ff_asf_guid) * 2 + 22 || memcmp(p, ff_asf_header, sizeof(ff_asf_guid))) { return -1; } p += sizeof(ff_asf_guid) + 14; do { uint64_t chunksize = AV_RL64(p + sizeof(ff_asf_guid)); if (memcmp(p, ff_asf_file_header, s... |
1 | static int vmdk_open(BlockDriverState *bs, const char *filename, int flags){ BDRVVmdkState *s = bs->opaque; uint32_t magic; int l1_size, i, ret; if (parent_open) // Parent must be opened as RO. flags = BDRV_O_RDONLY; fprintf(stderr, "(VMDK) image open: flags=0x%x filename=%s\n", flags, bs->filename); ret = bdrv_file_op... |
1 | static SocketAddress *nbd_config(BDRVNBDState *s, QDict *options, Error **errp){ SocketAddress *saddr = NULL; QDict *addr = NULL; QObject *crumpled_addr = NULL; Visitor *iv = NULL; Error *local_err = NULL; qdict_extract_subqdict(options, &addr, "server."); if (!qdict_size(addr)) { error_setg(errp, "NBD server address m... |
1 | static inline void RENAME(uyvyToY)(uint8_t *dst, uint8_t *src, long width){#ifdef HAVE_MMXasm volatile("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""psrlw $8, %%mm0\n\t""psrlw $8, %%mm1\n\t""packuswb %%mm1, %%mm0\n\t""movq %%mm0, (%2, %%"REG_a")\n\t""add $8, %%"R... |
1 | static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, const uint8_t *src, int src_size){ int width, height; int hdr, zsize, npal, tidx = -1, ret; int i, j; const uint8_t *src_end = src + src_size; uint8_t pal[768], transp[3]; uLongf dlen = (c->tile_width + 1) * c->tile_height; int sub_type; int nblocks, c... |
1 | static void interpolate_refplane(DiracContext *s, DiracFrame *ref, int plane, int width, int height){ /* chroma allocates an edge of 8 when subsampled which for 4:2:2 means an h edge of 16 and v edge of 8 just use 8 for everything for the moment */ int i, edge = EDGE_WIDTH/2; ref->hpel[plane][0] = ref->avframe->data[pl... |
1 | static void scsi_read_complete(void * opaque, int ret){ SCSIGenericReq *r = (SCSIGenericReq *)opaque; int len; if (ret) { DPRINTF("IO error ret %d\n", ret); scsi_command_complete(r, ret); return; } len = r->io_header.dxfer_len - r->io_header.resid; DPRINTF("Data ready tag=0x%x len=%d\n", r->req.tag, len); r->len = -1; ... |
1 | int avfilter_process_command(AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags){ if(!strcmp(cmd, "ping")){ av_strlcatf(res, res_len, "pong from:%s %s\n", filter->filter->name, filter->name); return 0; }else if(!strcmp(cmd, "enable")) { return set_enable_expr(filter, arg); }els... |
0 | static void decode_clnpass(Jpeg2000DecoderContext *s, Jpeg2000T1Context *t1, int width, int height, int bpno, int bandno, int seg_symbols){ int mask = 3 << (bpno - 1), y0, x, y, runlen, dec; for (y0 = 0; y0 < height; y0 += 4) for (x = 0; x < width; x++) { if (y0 + 3 < height && !((t1->flags[y0 + 1][x + 1] & (JPEG2000_T... |
0 | void ff_put_h264_qpel8_mc03_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride){ avc_luma_vt_qrt_8w_msa(src - (stride * 2), stride, dst, stride, 8, 1);} |
0 | static av_cold int audio_write_header(AVFormatContext *s1){ AlsaData *s = s1->priv_data; AVStream *st; unsigned int sample_rate; enum AVCodecID codec_id; int res; st = s1->streams[0]; sample_rate = st->codec->sample_rate; codec_id = st->codec->codec_id; res = ff_alsa_open(s1, SND_PCM_STREAM_PLAYBACK, &sample_rate, st->... |
0 | int ff_jpegls_decode_lse(MJpegDecodeContext *s){ int id; int tid, wt, maxtab, i, j; int len = get_bits(&s->gb, 16); /* length: FIXME: verify field validity */ id = get_bits(&s->gb, 8); switch (id) { case 1: s->maxval = get_bits(&s->gb, 16); s->t1 = get_bits(&s->gb, 16); s->t2 = get_bits(&s->gb, 16); s->t3 = get_bits(&s... |
0 | static int mov_read_stss(MOVContext *c, AVIOContext *pb, MOVAtom atom){ AVStream *st; MOVStreamContext *sc; unsigned int i, entries; 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_rb32(pb); av_dlog(c... |
0 | void swr_compensate(struct SwrContext *s, int sample_delta, int compensation_distance){ ResampleContext *c= s->resample;// sample_delta += (c->ideal_dst_incr - c->dst_incr)*(int64_t)c->compensation_distance / c->ideal_dst_incr; c->compensation_distance= compensation_distance; c->dst_incr = c->ideal_dst_incr - c->ideal_... |
0 | int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx){ int i; Picture *pic; s->mb_skipped = 0; assert(s->last_picture_ptr==NULL || s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3); /* mark&release old frames */ if (s->pict_type != FF_B_TYPE && s->last_picture_ptr && s->last_picture_ptr != s->next_pict... |
1 | udp_listen(Slirp *slirp, uint32_t haddr, u_int hport, uint32_t laddr, u_int lport, int flags){struct sockaddr_in addr;struct socket *so;socklen_t addrlen = sizeof(struct sockaddr_in);so = socreate(slirp);if (!so) {so->s = qemu_socket(AF_INET,SOCK_DGRAM,0);so->so_expire = curtime + SO_EXPIRE;insque(so, &slirp->udb);addr... |
1 | static int local_post_create_passthrough(FsContext *fs_ctx, const char *path, FsCred *credp){ if (chmod(rpath(fs_ctx, path), credp->fc_mode & 07777) < 0) { return -1; } if (chown(rpath(fs_ctx, path), credp->fc_uid, credp->fc_gid) < 0) { return -1; } return 0;} |
1 | static int piix4_device_hotplug(DeviceState *qdev, PCIDevice *dev,PCIHotplugState state){ int slot = PCI_SLOT(dev->devfn); PIIX4PMState *s = DO_UPCAST(PIIX4PMState, dev, PCI_DEVICE(qdev)); /* Don't send event when device is enabled during qemu machine creation: * it is present on boot, no hotplug event is necessary. We... |
1 | static int pcm_dvd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt){ AVFrame *frame = data; const uint8_t *src = avpkt->data; int buf_size = avpkt->size; PCMDVDContext *s = avctx->priv_data; int retval; int blocks; void *dst; if (buf_size < 3) { av_log(avctx, AV_LOG_ERROR, "PCM packe... |
1 | void qmp_migrate_set_cache_size(int64_t value, Error **errp){ MigrationState *s = migrate_get_current(); int64_t new_size; /* Check for truncation */ if (value != (size_t)value) { error_set(errp, QERR_INVALID_PARAMETER_VALUE, "cache size", "exceeding address space"); return; } /* Cache should not be larger than guest r... |
1 | static inline void ls_decode_line(JLSState *state, MJpegDecodeContext *s, void *last, void *dst, int last2, int w, int stride, int comp, int bits){ int i, x = 0; int Ra, Rb, Rc, Rd; int D0, D1, D2; while (x < w) { int err, pred; /* compute gradients */ Ra = x ? R(dst, x - stride) : R(last, x); Rb = R(last, x); Rc = x ?... |
0 | static void do_video_out(AVFormatContext *s, OutputStream *ost, AVFrame *in_picture, float quality){ int ret, format_video_sync; AVPacket pkt; AVCodecContext *enc = ost->st->codec; int nb_frames; double sync_ipts, delta; double duration = 0; int frame_size = 0; InputStream *ist = NULL; if (ost->source_index >= 0) ist =... |
1 | int opt_loglevel(void *optctx, const char *opt, const char *arg){ const struct { const char *name; int level; } log_levels[] = { { "quiet" , AV_LOG_QUIET }, { "panic" , AV_LOG_PANIC }, { "fatal" , AV_LOG_FATAL }, { "error" , AV_LOG_ERROR }, { "warning", AV_LOG_WARNING }, { "info" , AV_LOG_INFO }, { "verbose", AV_LOG_VE... |
1 | static void ram_save_cleanup(void *opaque){ RAMState **rsp = opaque; RAMBlock *block; /* caller have hold iothread lock or is in a bh, so there is * no writing race against this migration_bitmap */ memory_global_dirty_log_stop(); QLIST_FOREACH_RCU(block, &ram_list.blocks, next) { g_free(block->bmap); block->bmap = NULL... |
0 | const AVOption *av_opt_next(void *obj, const AVOption *last){ AVClass *class = *(AVClass**)obj; if (!last && class->option && class->option[0].name) return class->option; if (last && last[1].name) return ++last; return NULL;} |
0 | int avfilter_graph_create_filter(AVFilterContext **filt_ctx, AVFilter *filt, const char *name, const char *args, void *opaque, AVFilterGraph *graph_ctx){ int ret; *filt_ctx = avfilter_graph_alloc_filter(graph_ctx, filt, name); if (!*filt_ctx) return AVERROR(ENOMEM); ret = avfilter_init_filter(*filt_ctx, args, opaque); ... |
1 | static void es1370_class_init (ObjectClass *klass, void *data){ DeviceClass *dc = DEVICE_CLASS (klass); PCIDeviceClass *k = PCI_DEVICE_CLASS (klass); k->realize = es1370_realize; k->vendor_id = PCI_VENDOR_ID_ENSONIQ; k->device_id = PCI_DEVICE_ID_ENSONIQ_ES1370; k->class_id = PCI_CLASS_MULTIMEDIA_AUDIO; k->subsystem_ven... |
1 | static inline int64_t add64(const int64_t a, const int64_t b){return a + b;} |
1 | static void slavio_timer_init_all(target_phys_addr_t addr, qemu_irq master_irq, qemu_irq *cpu_irqs, unsigned int num_cpus){ DeviceState *dev; SysBusDevice *s; unsigned int i; dev = qdev_create(NULL, "slavio_timer"); qdev_prop_set_uint32(dev, "num_cpus", num_cpus); qdev_init(dev); s = sysbus_from_qdev(dev); sysbus_conne... |
1 | int ff_pred_weight_table(H264Context *h){ int list, i; int luma_def, chroma_def; h->use_weight = 0; h->use_weight_chroma = 0; h->luma_log2_weight_denom = get_ue_golomb(&h->gb); if (h->sps.chroma_format_idc) h->chroma_log2_weight_denom = get_ue_golomb(&h->gb); luma_def = 1 << h->luma_log2_weight_denom; chroma_def = 1 <<... |
1 | static int mpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_output, AVPacket *avpkt){ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; Mpeg1Context *s = avctx->priv_data; AVFrame *picture = data; MpegEncContext *s2 = &s->mpeg_enc_ctx; av_dlog(avctx, "fill_buffer\n"); if (buf_size == 0 || (buf_... |
1 | static void blur(CoverContext *cover, AVFrame *in, int offx, int offy){ int x, y, p; for (p=0; p<3; p++) { int ox = offx>>!!p; int oy = offy>>!!p; int stride = in->linesize[p]; uint8_t *data = in->data[p] + ox + oy * stride; int w = FF_CEIL_RSHIFT(cover->width , !!p); int h = FF_CEIL_RSHIFT(cover->height, !!p); int iw ... |
1 | static int wav_read_header(AVFormatContext *s){ int64_t size, av_uninit(data_size); int64_t sample_count = 0; int rf64 = 0; char start_code[32]; uint32_t tag; AVIOContext *pb = s->pb; AVStream *st = NULL; WAVDemuxContext *wav = s->priv_data; int ret, got_fmt = 0; int64_t next_tag_ofs, data_ofs = -1; wav->unaligned = av... |
1 | static int parse_bsfs(void *log_ctx, const char *bsfs_spec, AVBitStreamFilterContext **bsfs){ char *bsf_name, *buf, *saveptr; int ret = 0; if (!(buf = av_strdup(bsfs_spec))) return AVERROR(ENOMEM); while (bsf_name = av_strtok(buf, ",", &saveptr)) { AVBitStreamFilterContext *bsf = av_bitstream_filter_init(bsf_name); if ... |
1 | void ff_ivi_output_plane(IVIPlaneDesc *plane, uint8_t *dst, int dst_pitch){ int x, y; const int16_t *src = plane->bands[0].buf; uint32_t pitch = plane->bands[0].pitch; for (y = 0; y < plane->height; y++) { for (x = 0; x < plane->width; x++) dst[x] = av_clip_uint8(src[x] + 128); src += pitch; dst += dst_pitch; }} |
1 | static void secondary_do_checkpoint(BDRVReplicationState *s, Error **errp){ Error *local_err = NULL; int ret; if (!s->secondary_disk->bs->job) { error_setg(errp, "Backup job was cancelled unexpectedly"); backup_do_checkpoint(s->secondary_disk->bs->job, &local_err); if (local_err) { error_propagate(errp, local_err); ret... |
1 | static void vnc_dpy_update(DisplayChangeListener *dcl, DisplayState *ds, int x, int y, int w, int h){ int i; VncDisplay *vd = ds->opaque; struct VncSurface *s = &vd->guest; int width = ds_get_width(ds); int height = ds_get_height(ds); h += y; /* round x down to ensure the loop only spans one 16-pixel block per, iterati... |
1 | static int aio_read_f(BlockBackend *blk, int argc, char **argv){ int nr_iov, c; struct aio_ctx *ctx = g_new0(struct aio_ctx, 1); ctx->blk = blk; while ((c = getopt(argc, argv, "CP:qv")) != -1) { switch (c) { case 'C': ctx->Cflag = 1; break; case 'P': ctx->Pflag = 1; ctx->pattern = parse_pattern(optarg); if (ctx->patter... |
0 | static int ff_estimate_motion_b(MpegEncContext * s, int mb_x, int mb_y, int16_t (*mv_table)[2], int ref_index, int f_code){ MotionEstContext * const c= &s->me; int mx, my, dmin; int P[10][2]; const int shift= 1+s->quarter_sample; const int mot_stride = s->mb_stride; const int mot_xy = mb_y*mot_stride + mb_x; uint8_t * ... |
1 | static int count_contiguous_clusters(uint64_t nb_clusters, int cluster_size, uint64_t *l2_table, uint64_t stop_flags){ int i; uint64_t mask = stop_flags | L2E_OFFSET_MASK | QCOW2_CLUSTER_COMPRESSED; uint64_t first_entry = be64_to_cpu(l2_table[0]); uint64_t offset = first_entry & mask; if (!offset) return 0; assert(qcow... |
1 | AddressSpace *pci_device_iommu_address_space(PCIDevice *dev){ PCIBus *bus = PCI_BUS(dev->bus); if (bus->iommu_fn) { return bus->iommu_fn(bus, bus->iommu_opaque, dev->devfn); } if (bus->parent_dev) { /** We are ignoring the bus master DMA bit of the bridge * as it would complicate things such as VFIO for no good reason ... |
1 | static int vc1_decode_b_mb_intfr(VC1Context *v){ MpegEncContext *s = &v->s; GetBitContext *gb = &s->gb; int i, j; int mb_pos = s->mb_x + s->mb_y * s->mb_stride; int cbp = 0; /* cbp decoding stuff */ int mqdiff, mquant; /* MB quantization */ int ttmb = v->ttfrm; /* MB Transform type */ int mvsw = 0; /* motion vector swi... |
1 | static void attach(sPAPRDRConnector *drc, DeviceState *d, void *fdt, int fdt_start_offset, bool coldplug, Error **errp){ DPRINTFN("drc: %x, attach", get_index(drc)); if (drc->isolation_state != SPAPR_DR_ISOLATION_STATE_ISOLATED) { error_setg(errp, "an attached device is still awaiting release"); return; if (drc->type =... |
1 | static void coroutine_fn sd_write_done(SheepdogAIOCB *acb){ BDRVSheepdogState *s = acb->common.bs->opaque; struct iovec iov; AIOReq *aio_req; uint32_t offset, data_len, mn, mx; mn = s->min_dirty_data_idx; mx = s->max_dirty_data_idx; if (mn <= mx) { /* we need to update the vdi object. */ offset = sizeof(s->inode) - siz... |
1 | static int execute_code(AVCodecContext * avctx, int c){ AnsiContext *s = avctx->priv_data; int ret, i, width, height; switch(c) { case 'A': //Cursor Up s->y = FFMAX(s->y - (s->nb_args > 0 ? s->args[0]*s->font_height : s->font_height), 0); break; case 'B': //Cursor Down s->y = FFMIN(s->y + (s->nb_args > 0 ? s->args[0]*s... |
1 | void migration_bitmap_extend(ram_addr_t old, ram_addr_t new){ /* called in qemu main thread, so there is * no writing race against this migration_bitmap */ if (migration_bitmap) { unsigned long *old_bitmap = migration_bitmap, *bitmap; bitmap = bitmap_new(new); /* prevent migration_bitmap content from being set bit * by... |
1 | static void coroutine_fn v9fs_walk(void *opaque){ int name_idx; V9fsQID *qids = NULL; int i, err = 0; V9fsPath dpath, path; uint16_t nwnames; struct stat stbuf; size_t offset = 7; int32_t fid, newfid; V9fsString *wnames = NULL; V9fsFidState *fidp; V9fsFidState *newfidp = NULL; V9fsPDU *pdu = opaque; V9fsState *s = pdu-... |
1 | int avpicture_layout(const AVPicture* src, int pix_fmt, int width, int height, unsigned char *dest, int dest_size){ PixFmtInfo* pf = &pix_fmt_info[pix_fmt]; int i, j, w, h, data_planes; const unsigned char* s; int size = avpicture_get_size(pix_fmt, width, height); if (size > dest_size) return -1; if (pf->pixel_type == ... |
1 | static int vnc_update_stats(VncDisplay *vd, struct timeval * tv){ int width = pixman_image_get_width(vd->guest.fb); int height = pixman_image_get_height(vd->guest.fb); int x, y; struct timeval res; int has_dirty = 0; for (y = 0; y < height; y += VNC_STAT_RECT) { for (x = 0; x < width; x += VNC_STAT_RECT) { VncRectStat ... |
1 | static void iscsi_readcapacity_sync(IscsiLun *iscsilun, Error **errp){ struct scsi_task *task = NULL; struct scsi_readcapacity10 *rc10 = NULL; struct scsi_readcapacity16 *rc16 = NULL; int retries = ISCSI_CMD_RETRIES; do { if (task != NULL) { scsi_free_scsi_task(task); task = NULL; } switch (iscsilun->type) { case TYPE_... |
1 | static int read_access_unit(AVCodecContext *avctx, void* data, int *got_frame_ptr, AVPacket *avpkt){ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; MLPDecodeContext *m = avctx->priv_data; GetBitContext gb; unsigned int length, substr; unsigned int substream_start; unsigned int header_size = 4; unsigned i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.