label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
0 | static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output){ AVFrame *decoded_frame, *f; void *buffer_to_free = NULL; int i, ret = 0, err = 0, resample_changed; int64_t best_effort_timestamp; AVRational *frame_sample_aspect; if (!ist->decoded_frame && !(ist->decoded_frame = av_frame_alloc())) return AVERR... |
0 | static void audio_encode_example(const char *filename){ AVCodec *codec; AVCodecContext *c= NULL; AVFrame *frame; AVPacket pkt; int i, j, k, ret, got_output; int buffer_size; FILE *f; uint16_t *samples; float t, tincr; printf("Encode audio file %s\n", filename); /* find the MP2 encoder */ codec = avcodec_find_encoder(AV... |
0 | static void avconv_cleanup(int ret){ int i, j; for (i = 0; i < nb_filtergraphs; i++) { FilterGraph *fg = filtergraphs[i]; avfilter_graph_free(&fg->graph); for (j = 0; j < fg->nb_inputs; j++) { while (av_fifo_size(fg->inputs[j]->frame_queue)) { AVFrame *frame; av_fifo_generic_read(fg->inputs[j]->frame_queue, &frame, siz... |
0 | static void dump_stream_format(AVFormatContext *ic, int i, int index, int is_output){ char buf[256]; int flags = (is_output ? ic->oformat->flags : ic->iformat->flags); AVStream *st = ic->streams[i]; int g = ff_gcd(st->time_base.num, st->time_base.den); avcodec_string(buf, sizeof(buf), st->codec, is_output); av_log(NULL... |
0 | static inline void rv34_decode_block(DCTELEM *dst, GetBitContext *gb, RV34VLC *rvlc, int fc, int sc, int q_dc, int q_ac1, int q_ac2){ int code, pattern; code = get_vlc2(gb, rvlc->first_pattern[fc].table, 9, 2); pattern = code & 0x7; code >>= 3; decode_subblock3(dst, code, 0, gb, &rvlc->coefficient, q_dc, q_ac1, q_ac2);... |
1 | static int kvm_set_ioeventfd_mmio(int fd, hwaddr addr, uint32_t val, bool assign, uint32_t size, bool datamatch){ int ret; struct kvm_ioeventfd iofd; iofd.datamatch = datamatch ? adjust_ioeventfd_endianness(val, size) : 0; iofd.addr = addr; iofd.len = size; iofd.flags = 0; iofd.fd = fd; if (!kvm_enabled()) { return -EN... |
1 | AVFrameSideData *av_frame_new_side_data(AVFrame *frame, enum AVFrameSideDataType type, int size){ AVFrameSideData *ret, **tmp; if (frame->nb_side_data > INT_MAX / sizeof(*frame->side_data) - 1) return NULL; tmp = av_realloc(frame->side_data, (frame->nb_side_data + 1) * sizeof(*frame->side_data)); if (!tmp) return NULL;... |
1 | DriveInfo *drive_init(QemuOpts *all_opts, BlockInterfaceType block_default_type){ const char *value; DriveInfo *dinfo = NULL; QDict *bs_opts; QemuOpts *legacy_opts; DriveMediaType media = MEDIA_DISK; BlockInterfaceType type; int cyls, heads, secs, translation; int max_devs, bus_id, unit_id, index; const char *devaddr; ... |
1 | static int connect_to_ssh(BDRVSSHState *s, QDict *options, int ssh_flags, int creat_mode, Error **errp){ int r, ret; const char *host, *user, *path, *host_key_check; int port; if (!qdict_haskey(options, "host")) { ret = -EINVAL; error_setg(errp, "No hostname was specified"); goto err; } host = qdict_get_str(options, "h... |
1 | void ff_configure_buffers_for_index(AVFormatContext *s, int64_t time_tolerance){ int ist1, ist2; int64_t pos_delta = 0; //We could use URLProtocol flags here but as many user applications do not use URLProtocols this would be unreliable const char *proto = avio_find_protocol_name(s->filename); if (!(strcmp(proto, "file... |
1 | int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, const AVPacket *avpkt){ AVCodecInternal *avci = avctx->internal; int planar, channels; int ret = 0; *got_frame_ptr = 0; if (!avpkt->data && avpkt->size) { av_log(avctx, AV_LOG_ERROR, "invalid packet: NULL data, size... |
1 | static void s390_cpu_realizefn(DeviceState *dev, Error **errp){ S390CPU *cpu = S390_CPU(dev); S390CPUClass *scc = S390_CPU_GET_CLASS(dev); cpu_reset(CPU(cpu)); scc->parent_realize(dev, errp);} |
1 | static void vp56_decode_mb(VP56Context *s, int row, int col, int is_alpha){ AVFrame *frame_current, *frame_ref; VP56mb mb_type; VP56Frame ref_frame; int b, ab, b_max, plane, off; if (s->frames[VP56_FRAME_CURRENT]->key_frame) mb_type = VP56_MB_INTRA; else mb_type = vp56_decode_mv(s, row, col); ref_frame = ff_vp56_refere... |
1 | static int qemu_rbd_create(const char *filename, QemuOpts *opts, Error **errp){ Error *local_err = NULL; int64_t bytes = 0; int64_t objsize; int obj_order = 0; const char *pool, *name, *conf, *clientname, *keypairs; const char *secretid; rados_t cluster; rados_ioctx_t io_ctx; QDict *options = NULL; int ret = 0; secreti... |
0 | void av_force_cpu_flags(int arg){ if ( (arg & ( AV_CPU_FLAG_3DNOW | AV_CPU_FLAG_3DNOWEXT | AV_CPU_FLAG_MMXEXT | AV_CPU_FLAG_SSE | AV_CPU_FLAG_SSE2 | AV_CPU_FLAG_SSE2SLOW | AV_CPU_FLAG_SSE3 | AV_CPU_FLAG_SSE3SLOW | AV_CPU_FLAG_SSSE3 | AV_CPU_FLAG_SSE4 | AV_CPU_FLAG_SSE42 | AV_CPU_FLAG_AVX | AV_CPU_FLAG_AVXSLOW | AV_CPU_... |
0 | static int select_frame(AVFilterContext *ctx, AVFilterBufferRef *picref){ SelectContext *select = ctx->priv; AVFilterLink *inlink = ctx->inputs[0]; double res; if (isnan(select->var_values[VAR_START_PTS])) select->var_values[VAR_START_PTS] = TS2D(picref->pts); if (isnan(select->var_values[VAR_START_T])) select->var_val... |
0 | static int mov_write_identification(AVIOContext *pb, AVFormatContext *s){ MOVMuxContext *mov = s->priv_data; int i; mov_write_ftyp_tag(pb,s); if (mov->mode == MODE_PSP) { int video_streams_nb = 0, audio_streams_nb = 0, other_streams_nb = 0; for (i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; if (st->cod... |
0 | static QIOChannel *nbd_negotiate_handle_starttls(NBDClient *client, uint32_t length, Error **errp){ QIOChannel *ioc; QIOChannelTLS *tioc; struct NBDTLSHandshakeData data = { 0 }; trace_nbd_negotiate_handle_starttls(); ioc = client->ioc; if (length) { if (nbd_drop(ioc, length, errp) < 0) { return NULL; } nbd_negotiate_s... |
0 | static void vnc_write_u32(VncState *vs, uint32_t value){ uint8_t buf[4]; buf[0] = (value >> 24) & 0xFF; buf[1] = (value >> 16) & 0xFF; buf[2] = (value >> 8) & 0xFF; buf[3] = value & 0xFF; vnc_write(vs, buf, 4);} |
0 | static int tcg_cpu_exec(CPUState *cpu){ int ret;#ifdef CONFIG_PROFILER int64_t ti;#endif#ifdef CONFIG_PROFILER ti = profile_getclock();#endif if (use_icount) { int64_t count; int64_t deadline; int decr; timers_state.qemu_icount -= (cpu->icount_decr.u16.low + cpu->icount_extra); cpu->icount_decr.u16.low = 0; cpu->icount... |
0 | vcard_emul_login(VCard *card, unsigned char *pin, int pin_len){ PK11SlotInfo *slot; unsigned char *pin_string = NULL; int i; SECStatus rv; if (!nss_emul_init) { return VCARD7816_STATUS_ERROR_CONDITION_NOT_SATISFIED; } slot = vcard_emul_card_get_slot(card); /* We depend on the PKCS #11 module internal login state here b... |
0 | static int motion_inter_block (bit_buffer_t *bitbuf, uint8_t *current, uint8_t *previous, int pitch, svq1_pmv_t *motion, int x, int y) { uint8_t *src; uint8_t *dst; svq1_pmv_t mv; svq1_pmv_t *pmv[3]; int result; /* predict and decode motion vector */ pmv[0] = &motion[0]; pmv[1] = &motion[(x / 8) + 2]; pmv[2] = &motion[... |
0 | vreader_list_delete(VReaderList *list){ VReaderListEntry *current_entry; VReaderListEntry *next_entry = NULL; for (current_entry = vreader_list_get_first(list); current_entry; current_entry = next_entry) { next_entry = vreader_list_get_next(current_entry); vreader_list_entry_delete(current_entry); } list->head = NULL; ... |
0 | static uint32_t cadence_ttc_read_imp(void *opaque, target_phys_addr_t offset){ CadenceTimerState *s = cadence_timer_from_addr(opaque, offset); uint32_t value; cadence_timer_sync(s); cadence_timer_run(s); switch (offset) { case 0x00: /* clock control */ case 0x04: case 0x08: return s->reg_clock; case 0x0c: /* counter co... |
0 | static int coroutine_fn bdrv_co_do_writev(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov, BdrvRequestFlags flags){ if (nb_sectors < 0 || nb_sectors > BDRV_REQUEST_MAX_SECTORS) { return -EINVAL; } return bdrv_co_do_pwritev(bs, sector_num << BDRV_SECTOR_BITS, nb_sectors << BDRV_SECTOR_BITS, ... |
0 | static int vnc_display_connect(VncDisplay *vd, SocketAddress **saddr, size_t nsaddr, SocketAddress **wsaddr, size_t nwsaddr, Error **errp){ /* connect to viewer */ QIOChannelSocket *sioc = NULL; if (nwsaddr != 0) { error_setg(errp, "Cannot use websockets in reverse mode"); return -1; } if (nsaddr != 1) { error_setg(err... |
0 | static int vfio_add_ext_cap(VFIOPCIDevice *vdev){ PCIDevice *pdev = &vdev->pdev; uint32_t header; uint16_t cap_id, next, size; uint8_t cap_ver; uint8_t *config; /* * pcie_add_capability always inserts the new capability at the tail * of the chain. Therefore to end up with a chain that matches the * physical device, we ... |
0 | void desc_ring_free(DescRing *ring){ if (ring->info) { g_free(ring->info); } g_free(ring);} |
0 | setup_return(CPUState *env, struct emulated_sigaction *ka, abi_ulong *rc, void *frame, int usig){abi_ulong handler = (abi_ulong)ka->sa._sa_handler;abi_ulong retcode;int thumb = 0;#if defined(TARGET_CONFIG_CPU_32)#if 0abi_ulong cpsr = env->cpsr;/* * Maybe we need to deliver a 32-bit signal to a 26-bit task. */if (ka->sa... |
0 | BlockStatsList *qmp_query_blockstats(bool has_query_nodes, bool query_nodes, Error **errp){ BlockStatsList *head = NULL, **p_next = &head; BlockBackend *blk = NULL; BlockDriverState *bs = NULL; /* Just to be safe if query_nodes is not always initialized */ query_nodes = has_query_nodes && query_nodes; while (next_query... |
0 | static void dp8393x_writel(void *opaque, target_phys_addr_t addr, uint32_t val){ dp8393x_writew(opaque, addr, val & 0xffff); dp8393x_writew(opaque, addr + 2, (val >> 16) & 0xffff);} |
0 | void usb_register_port(USBBus *bus, USBPort *port, void *opaque, int index, usb_attachfn attach){ port->opaque = opaque; port->index = index; port->attach = attach; TAILQ_INSERT_TAIL(&bus->free, port, next); bus->nfree++;} |
0 | static void scsi_read_data(SCSIRequest *req){ SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req); SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev); bool first; DPRINTF("Read sector_count=%d\n", r->sector_count); if (r->sector_count == 0) { /* This also clears the sense buffer for REQUEST SENSE. */ scsi_req_... |
0 | void qmp_cont(Error **errp){ Error *local_err = NULL; BlockBackend *blk; BlockDriverState *bs; BdrvNextIterator it; /* if there is a dump in background, we should wait until the dump * finished */ if (dump_in_progress()) { error_setg(errp, "There is a dump in process, please wait."); return; } if (runstate_needs_reset(... |
0 | static void ehci_queues_rip_unused(EHCIState *ehci, int async, int flush){ EHCIQueueHead *head = async ? &ehci->aqueues : &ehci->pqueues; uint64_t maxage = FRAME_TIMER_NS * ehci->maxframes * 4; EHCIQueue *q, *tmp; QTAILQ_FOREACH_SAFE(q, head, next, tmp) { if (q->seen) { q->seen = 0; q->ts = ehci->last_run_ns; continue;... |
0 | static uint32_t mipid_txrx(void *opaque, uint32_t cmd, int len){ struct mipid_s *s = (struct mipid_s *) opaque; uint8_t ret; if (len > 9) { hw_error("%s: FIXME: bad SPI word width %i\n", __FUNCTION__, len); } if (s->p >= ARRAY_SIZE(s->resp)) { ret = 0; } else { ret = s->resp[s->p++]; } if (s->pm-- > 0) { s->param[s->pm... |
0 | static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings){ int i; unsigned int enc = 0; vnc_zlib_init(vs); vs->features = 0; vs->vnc_encoding = -1; vs->tight_compression = 9; vs->tight_quality = 9; vs->absolute = -1; for (i = n_encodings - 1; i >= 0; i--) { enc = encodings[i]; switch (enc) { case ... |
0 | static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model){ unsigned int i; x86_def_t *def; char *s = strdup(cpu_model); char *featurestr, *name = strtok(s, ","); uint32_t plus_features = 0, plus_ext_features = 0, plus_ext2_features = 0, plus_ext3_features = 0; uint32_t minus_features = 0, minus_ext... |
0 | static void ppc_spapr_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model){ CPUState *env; int i; MemoryRegion *sysmem = get_system_memory(); MemoryRegion *ram = g_new(MemoryRegion, 1); target_phys_addr_t rma_allo... |
1 | static int swf_write_video(AVFormatContext *s, AVCodecContext *enc, const uint8_t *buf, int size){ ByteIOContext *pb = &s->pb; static int tag_id = 0; if (enc->frame_number > 1) { /* remove the shape */ put_swf_tag(s, TAG_REMOVEOBJECT); put_le16(pb, SHAPE_ID); /* shape ID */ put_le16(pb, 1); /* depth */ put_swf_end_tag(... |
1 | static int ehci_state_writeback(EHCIQueue *q){ EHCIPacket *p = QTAILQ_FIRST(&q->packets); int again = 0; /* Write back the QTD from the QH area */ assert(p != NULL); assert(p->qtdaddr == q->qtdaddr); ehci_trace_qtd(q, NLPTR_GET(p->qtdaddr), (EHCIqtd *) &q->qh.next_qtd); put_dwords(q->ehci, NLPTR_GET(p->qtdaddr), (uint3... |
1 | static int mov_skip_multiple_stsd(MOVContext *c, AVIOContext *pb, int codec_tag, int format, int size){ int video_codec_id = ff_codec_get_id(ff_codec_movvideo_tags, format); if (codec_tag && (codec_tag != format && (c->fc->video_codec_id ? video_codec_id != c->fc->video_codec_id : codec_tag != MKTAG('j','p','e','g'))))... |
1 | static uint32_t cas_check_pvr(PowerPCCPU *cpu, target_ulong *addr, Error **errp){ bool explicit_match = false; /* Matched the CPU's real PVR */ uint32_t max_compat = cpu->max_compat; uint32_t best_compat = 0; int i; /* * We scan the supplied table of PVRs looking for two things * 1. Is our real CPU PVR in the list? * 2... |
1 | void ff_slice_thread_free(AVCodecContext *avctx){ SliceThreadContext *c = avctx->internal->thread_ctx; int i; pthread_mutex_lock(&c->current_job_lock); c->done = 1; pthread_cond_broadcast(&c->current_job_cond); for (i = 0; i < c->thread_count; i++) pthread_cond_broadcast(&c->progress_cond[i]); pthread_mutex_unlock(&c->... |
1 | RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, RTPPayloadData *rtp_payload_data){ RTPDemuxContext *s; s = av_mallocz(sizeof(RTPDemuxContext)); if (!s) return NULL; s->payload_type = payload_type; s->last_rtcp_ntp_time = AV_NOPTS_VALUE; s->first_rtcp_ntp_time = AV_... |
1 | static int http_send_data(HTTPContext *c, long cur_time){ int len, ret; while (c->buffer_ptr >= c->buffer_end) { ret = http_prepare_data(c, cur_time); if (ret < 0) return -1; else if (ret == 0) { continue; } else { /* state change requested */ return 0; } } if (c->buffer_end > c->buffer_ptr) { len = write(c->fd, c->buf... |
1 | static void virgl_cmd_resource_unref(VirtIOGPU *g, struct virtio_gpu_ctrl_command *cmd){ struct virtio_gpu_resource_unref unref; VIRTIO_GPU_FILL_CMD(unref); trace_virtio_gpu_cmd_res_unref(unref.resource_id); virgl_renderer_resource_unref(unref.resource_id); |
1 | static void perf_yield(void){ unsigned int i, maxcycles; double duration; maxcycles = 100000000; i = maxcycles; Coroutine *coroutine = qemu_coroutine_create(yield_loop); g_test_timer_start(); while (i > 0) { qemu_coroutine_enter(coroutine, &i); } duration = g_test_timer_elapsed(); g_test_message("Yield %u iterations: %... |
1 | static void fill_picture_parameters(AVCodecContext *avctx, struct dxva_context *ctx, const struct MpegEncContext *s, DXVA_PictureParameters *pp){ const Picture *current_picture = s->current_picture_ptr; int is_field = s->picture_structure != PICT_FRAME; memset(pp, 0, sizeof(*pp)); pp->wDecodedPictureIndex = ff_dxva2_ge... |
1 | static int virtio_balloon_load(QEMUFile *f, void *opaque, int version_id){ VirtIOBalloon *s = opaque; if (version_id != 1) return -EINVAL; virtio_load(&s->vdev, f); s->num_pages = qemu_get_be32(f); s->actual = qemu_get_be32(f); qemu_get_buffer(f, (uint8_t *)&s->stats_vq_elem, sizeof(VirtQueueElement)); qemu_get_buffer(... |
1 | static inline void init_thread(struct target_pt_regs *_regs, struct image_info *infop){ _regs->gpr[1] = infop->start_stack;#if defined(TARGET_PPC64) && !defined(TARGET_ABI32) if (get_ppc64_abi(infop) < 2) { _regs->gpr[2] = ldq_raw(infop->entry + 8) + infop->load_bias; infop->entry = ldq_raw(infop->entry) + infop->load_... |
1 | static int mov_read_custom_2plus(MOVContext *c, AVIOContext *pb, int size){ int64_t end = avio_tell(pb) + size; uint8_t *key = NULL, *val = NULL; int i; AVStream *st; MOVStreamContext *sc; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc->nb_streams-1]; sc = st->priv_data; for (i = 0; i < 2; i++) { uint8_... |
1 | static void softusb_usbdev_datain(void *opaque){ MilkymistSoftUsbState *s = opaque; USBPacket p; p.pid = USB_TOKEN_IN; p.devep = 1; p.data = s->kbd_usb_buffer; p.len = sizeof(s->kbd_usb_buffer); s->usbdev->info->handle_data(s->usbdev, &p); softusb_kbd_changed(s);} |
0 | static int a52_decode_init(AVCodecContext *avctx){ AC3DecodeState *s = avctx->priv_data;#ifdef CONFIG_LIBA52BIN s->handle = dlopen(liba52name, RTLD_LAZY); if (!s->handle) { av_log( avctx, AV_LOG_ERROR, "A52 library %s could not be opened! \n%s\n", liba52name, dlerror()); return -1; } s->a52_init = (a52_state_t* (*)(uin... |
1 | static void release_drive(Object *obj, const char *name, void *opaque){ DeviceState *dev = DEVICE(obj); Property *prop = opaque; BlockBackend **ptr = qdev_get_prop_ptr(dev, prop); if (*ptr) { blk_detach_dev(*ptr, dev); blockdev_auto_del(*ptr); }} |
1 | static inline int decode_picture_parameter_set(H264Context *h, int bit_length){ MpegEncContext * const s = &h->s; unsigned int pps_id= get_ue_golomb(&s->gb); PPS *pps; if(pps_id>=MAX_PPS_COUNT){ av_log(h->s.avctx, AV_LOG_ERROR, "pps_id out of range\n"); return -1; } pps = &h->pps_buffer[pps_id]; pps->sps_id= get_ue_gol... |
1 | static uint64_t watch_mem_read(void *opaque, hwaddr addr, unsigned size){ check_watchpoint(addr & ~TARGET_PAGE_MASK, size, BP_MEM_READ); switch (size) { case 1: return ldub_phys(&address_space_memory, addr); case 2: return lduw_phys(&address_space_memory, addr); case 4: return ldl_phys(&address_space_memory, addr); def... |
0 | static int tcp_open(URLContext *h, const char *uri, int flags){ struct sockaddr_in dest_addr; char hostname[1024], *q; int port, fd = -1; TCPContext *s; const char *p; fd_set wfds; int fd_max, ret; struct timeval tv; socklen_t optlen; s = av_malloc(sizeof(TCPContext)); if (!s) return -ENOMEM; h->priv_data = s; p = uri;... |
0 | static int mov_write_mvhd_tag(AVIOContext *pb, MOVMuxContext *mov){ int max_track_id = 1, i; int64_t max_track_len_temp, max_track_len = 0; int version; for (i = 0; i < mov->nb_streams; i++) { if (mov->tracks[i].entry > 0) { max_track_len_temp = av_rescale_rnd(mov->tracks[i].track_duration, MOV_TIMESCALE, mov->tracks[i... |
0 | static inline void idct4col_put(uint8_t *dest, int line_size, const DCTELEM *col){ int c0, c1, c2, c3, a0, a1, a2, a3; const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; a0 = col[8*0]; a1 = col[8*2]; a2 = col[8*4]; a3 = col[8*6]; c0 = ((a0 + a2) << (CN_SHIFT - 1)) + (1 << (C_SHIFT - 1)); c2 = ((a0 - a2) << (CN_SHIFT - 1)) ... |
0 | static void print_final_stats(int64_t total_size){ uint64_t video_size = 0, audio_size = 0, extra_size = 0, other_size = 0; uint64_t subtitle_size = 0; uint64_t data_size = 0; float percent = -1.0; int i, j; for (i = 0; i < nb_output_streams; i++) { OutputStream *ost = output_streams[i]; switch (ost->st->codec->codec_t... |
1 | static void read_sbr_channel_pair_element(AACContext *ac, SpectralBandReplication *sbr, GetBitContext *gb){ if (get_bits1(gb)) // bs_data_extra skip_bits(gb, 8); // bs_reserved if ((sbr->bs_coupling = get_bits1(gb))) { read_sbr_grid(ac, sbr, gb, &sbr->data[0]); copy_sbr_grid(&sbr->data[1], &sbr->data[0]); read_sbr_dtdf... |
1 | static void qtrle_decode_16bpp(QtrleContext *s, int stream_ptr, int row_ptr, int lines_to_change){ int rle_code; int pixel_ptr; int row_inc = s->frame.linesize[0]; unsigned short rgb16; unsigned char *rgb = s->frame.data[0]; int pixel_limit = s->frame.linesize[0] * s->avctx->height; while (lines_to_change--) { CHECK_ST... |
1 | static void v9fs_mknod(void *opaque){ int mode; gid_t gid; int32_t fid; V9fsQID qid; int err = 0; int major, minor; size_t offset = 7; V9fsString name; struct stat stbuf; V9fsFidState *fidp; V9fsPDU *pdu = opaque; V9fsState *s = pdu->s; pdu_unmarshal(pdu, offset, "dsdddd", &fid, &name, &mode, &major, &minor, &gid); fid... |
1 | void HELPER(cpsr_write_eret)(CPUARMState *env, uint32_t val){ cpsr_write(env, val, CPSR_ERET_MASK, CPSRWriteExceptionReturn); arm_call_el_change_hook(arm_env_get_cpu(env));} |
1 | static void vp7_decode_mb_row_no_filter(AVCodecContext *avctx, void *tdata, int jobnr, int threadnr){ decode_mb_row_no_filter(avctx, tdata, jobnr, threadnr, 1);} |
1 | static void test_parse_path_subprocess(void){ /* All these should work without issue */ qemu_set_log_filename("/tmp/qemu.log"); qemu_set_log_filename("/tmp/qemu-%d.log"); qemu_set_log_filename("/tmp/qemu.log.%d");} |
0 | static inline void RENAME(hScale)(int16_t *dst, int dstW, uint8_t *src, int srcW, int xInc, int16_t *filter, int16_t *filterPos, long filterSize){#ifdef HAVE_MMXassert(filterSize % 4 == 0 && filterSize>0);if(filterSize==4) // allways true for upscaling, sometimes for down too{long counter= -2*dstW;filter-= counter*2;fi... |
0 | int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples){ int i, nb_samples1; short *bufin[2]; short *bufout[2]; short *buftmp2[2], *buftmp3[2]; int lenout; if (s->input_channels == s->output_channels && s->ratio == 1.0 && 0) { /* nothing to do */ memcpy(output, input, nb_samples * s->input_c... |
0 | static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs){ TransContext *s = ctx->priv; ThreadData *td = arg; AVFrame *out = td->out; AVFrame *in = td->in; int plane; for (plane = 0; out->data[plane]; plane++) { int hsub = plane == 1 || plane == 2 ? s->hsub : 0; int vsub = plane == 1 || plane == ... |
1 | static int expand_rle_row(const uint8_t *in_buf, const uint8_t* in_end, unsigned char *out_buf, uint8_t* out_end, int pixelstride){ unsigned char pixel, count; unsigned char *orig = out_buf; while (1) { if(in_buf + 1 > in_end) return -1; pixel = bytestream_get_byte(&in_buf); if (!(count = (pixel & 0x7f))) { return (out... |
0 | static void encode_exponents_blk_ch(uint8_t *exp, int nb_exps, int exp_strategy, uint8_t *num_exp_groups){ int group_size, nb_groups, i, j, k, exp_min; group_size = exp_strategy + (exp_strategy == EXP_D45); *num_exp_groups = (nb_exps + (group_size * 3) - 4) / (3 * group_size); nb_groups = *num_exp_groups * 3; /* for ea... |
0 | static void ac3_update_bap_counts_c(uint16_t mant_cnt[16], uint8_t *bap, int len){ while (len-- >= 0) mant_cnt[bap[len]]++;} |
0 | static av_cold int adpcm_decode_init(AVCodecContext * avctx){ ADPCMDecodeContext *c = avctx->priv_data; unsigned int min_channels = 1; unsigned int max_channels = 2; switch(avctx->codec->id) { case AV_CODEC_ID_ADPCM_DTK: case AV_CODEC_ID_ADPCM_EA: min_channels = 2; break; case AV_CODEC_ID_ADPCM_AFC: case AV_CODEC_ID_AD... |
1 | static void test2_fill_picture(AVFilterContext *ctx, AVFrame *frame){ TestSourceContext *s = ctx->priv; FFDrawColor color; unsigned alpha = (uint32_t)s->alpha << 24; /* colored background */ { unsigned i, x = 0, x2; x = 0; for (i = 1; i < 7; i++) { x2 = av_rescale(i, s->w, 6); x2 = ff_draw_round_to_sub(&s->draw, 0, 0, ... |
1 | static int iv_decode_frame(AVCodecContext *avctx, const uint8_t *buf, int buf_size){ Indeo3DecodeContext *s = avctx->priv_data; unsigned int image_width, image_height, chroma_width, chroma_height; unsigned long flags, cb_offset, data_size, y_offset, v_offset, u_offset, mc_vector_count; const uint8_t *hdr_pos, *buf_pos;... |
1 | static void output_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost){ int ret = 0; /* apply the output bitstream filters, if any */ if (ost->nb_bitstream_filters) { int idx; ret = av_bsf_send_packet(ost->bsf_ctx[0], pkt); if (ret < 0) goto finish; idx = 1; while (idx) { /* get a packet from the previous filter u... |
1 | static void audio_pp_nb_voices (const char *typ, int nb){ switch (nb) { case 0: printf ("Does not support %s\n", typ); break; case 1: printf ("One %s voice\n", typ); break; case INT_MAX: printf ("Theoretically supports many %s voices\n", typ); break; default: printf ("Theoretically supports upto %d %s voices\n", nb, ty... |
1 | int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt){ RTSPState *rt = s->priv_data; int ret, len; RTSPStream *rtsp_st, *first_queue_st = NULL; int64_t wait_end = 0; if (rt->nb_byes == rt->nb_rtsp_streams) return AVERROR_EOF; /* get next frames from the same RTP packet */ if (rt->cur_transport_priv) { if (rt->tra... |
1 | static void assign_failed_examine(AssignedDevice *dev){ char name[PATH_MAX], dir[PATH_MAX], driver[PATH_MAX] = {}, *ns; uint16_t vendor_id, device_id; int r; snprintf(dir, sizeof(dir), "/sys/bus/pci/devices/%04x:%02x:%02x.%01x/", dev->host.domain, dev->host.bus, dev->host.slot, dev->host.function); snprintf(name, sizeo... |
1 | av_cold void ff_h264_free_context(H264Context *h){ int i; free_tables(h); //FIXME cleanup init stuff perhaps for(i = 0; i < MAX_SPS_COUNT; i++) av_freep(h->sps_buffers + i); for(i = 0; i < MAX_PPS_COUNT; i++) av_freep(h->pps_buffers + i);} |
1 | static int nbd_co_receive_request(NBDRequest *req, struct nbd_request *request){ NBDClient *client = req->client; int csock = client->sock; int rc; client->recv_coroutine = qemu_coroutine_self(); if (nbd_receive_request(csock, request) == -1) { rc = -EIO; goto out; } if (request->len > NBD_BUFFER_SIZE) { LOG("len (%u) ... |
1 | static inline int hpel_motion(MpegEncContext *s, uint8_t *dest, uint8_t *src, int src_x, int src_y, op_pixels_func *pix_op, int motion_x, int motion_y){ int dxy = 0; int emu = 0; src_x += motion_x >> 1; src_y += motion_y >> 1; /* WARNING: do no forget half pels */ src_x = av_clip(src_x, -16, s->width); // FIXME unneede... |
0 | static void inline xan_wc3_copy_pixel_run(XanContext *s, 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; unsigned char *palette_plane, *prev_palette_plane; unsigned char *y_plane, *u_plan... |
0 | static int set_format(void *obj, const char *name, int fmt, int search_flags, enum AVOptionType type, const char *desc, int nb_fmts){ void *target_obj; const AVOption *o = av_opt_find2(obj, name, NULL, 0, search_flags, &target_obj); int min, max; const AVClass *class = *(AVClass **)obj; if (!o || !target_obj) return AV... |
0 | void ff_put_h264_qpel4_mc01_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride){ avc_luma_vt_qrt_4w_msa(src - (stride * 2), stride, dst, stride, 4, 0);} |
0 | static void dump_cook_context(COOKContext *q, COOKextradata *e){ //int i=0;#define PRINT(a,b) av_log(NULL,AV_LOG_ERROR," %s = %d\n", a, b); av_log(NULL,AV_LOG_ERROR,"COOKextradata\n"); av_log(NULL,AV_LOG_ERROR,"cookversion=%x\n",e->cookversion); if (e->cookversion > MONO_COOK2) { PRINT("js_subband_start",e->js_subband_... |
0 | static void ffm_set_write_index(AVFormatContext *s, int64_t pos, int64_t file_size){ FFMContext *ffm = s->priv_data; ffm->write_index = pos; ffm->file_size = file_size;} |
1 | static void usb_msd_class_initfn_bot(ObjectClass *klass, void *data){ USBDeviceClass *uc = USB_DEVICE_CLASS(klass); uc->realize = usb_msd_realize_bot; uc->attached_settable = true;} |
1 | uint64_t HELPER(get_cp_reg64)(CPUARMState *env, void *rip){ const ARMCPRegInfo *ri = rip; return ri->readfn(env, ri);} |
1 | static USBDevice *usb_try_create_simple(USBBus *bus, const char *name, Error **errp){ Error *err = NULL; USBDevice *dev; dev = USB_DEVICE(qdev_try_create(&bus->qbus, name)); if (!dev) { error_setg(errp, "Failed to create USB device '%s'", name); return NULL; } object_property_set_bool(OBJECT(dev), true, "realized", &er... |
1 | static int decode_chunks(AVCodecContext *avctx, AVFrame *picture, int *got_output, const uint8_t *buf, int buf_size){ Mpeg1Context *s = avctx->priv_data; MpegEncContext *s2 = &s->mpeg_enc_ctx; const uint8_t *buf_ptr = buf; const uint8_t *buf_end = buf + buf_size; int ret, input_size; int last_code = 0; for (;;) { /* fi... |
1 | static inline int mdec_decode_block_intra(MDECContext *a, int16_t *block, int n){ int level, diff, i, j, run; int component; RLTable *rl = &ff_rl_mpeg1; uint8_t * const scantable = a->scantable.permutated; const uint16_t *quant_matrix = ff_mpeg1_default_intra_matrix; const int qscale = a->qscale; /* DC coefficient */ i... |
1 | static int raw_open_common(BlockDriverState *bs, QDict *options, int bdrv_flags, int open_flags, Error **errp){ BDRVRawState *s = bs->opaque; QemuOpts *opts; Error *local_err = NULL; const char *filename = NULL; const char *str; BlockdevAioOptions aio, aio_default; int fd, ret; struct stat st; OnOffAuto locking; opts =... |
1 | av_cold int ff_vp8_decode_init(AVCodecContext *avctx){ VP8Context *s = avctx->priv_data; int ret; s->avctx = avctx; avctx->pix_fmt = AV_PIX_FMT_YUV420P; avctx->internal->allocate_progress = 1; ff_videodsp_init(&s->vdsp, 8); ff_h264_pred_init(&s->hpc, AV_CODEC_ID_VP8, 8, 1); ff_vp8dsp_init(&s->vp8dsp); if ((ret = vp8_in... |
1 | static inline void json_print_item_str(WriterContext *wctx, const char *key, const char *value, const char *indent){ char *key_esc = json_escape_str(key); char *value_esc = json_escape_str(value); printf("%s\"%s\": \"%s\"", indent, key_esc ? key_esc : "", value_esc ? value_esc : ""); av_free(key_esc); av_free(value_esc... |
1 | static void handle_keydown(SDL_Event *ev){ int mod_state, win; struct sdl2_console *scon = get_scon_from_window(ev->key.windowID); if (alt_grab) { mod_state = (SDL_GetModState() & (gui_grab_code | KMOD_LSHIFT)) == (gui_grab_code | KMOD_LSHIFT); } else if (ctrl_grab) { mod_state = (SDL_GetModState() & KMOD_RCTRL) == KMO... |
1 | AVRational ff_choose_timebase(AVFormatContext *s, AVStream *st, int min_precission){ AVRational q; int j; if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { q = (AVRational){1, st->codec->sample_rate}; } else { q = st->codec->time_base; } for (j=2; j<2000; j+= 1+(j>2)) while (q.den / q.num < min_precission && q.num % j... |
1 | static int pcm_decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size){ PCMDecode *s = avctx->priv_data; int c, n; short *samples; uint8_t *src, *src2[MAX_CHANNELS]; samples = data; src = buf; n= av_get_bits_per_sample(avctx->codec_id)/8; if((n && buf_size % n) || avctx->channels > M... |
1 | static int h264_slice_init(H264Context *h, H264SliceContext *sl, const H2645NAL *nal){ int i, j, ret = 0; if (h->picture_idr && nal->type != H264_NAL_IDR_SLICE) { av_log(h->avctx, AV_LOG_ERROR, "Invalid mix of IDR and non-IDR slices\n"); return AVERROR_INVALIDDATA; } av_assert1(h->mb_num == h->mb_width * h->mb_height);... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.