project
stringclasses
2 values
commit_id
stringlengths
40
40
target
int64
0
1
func
stringlengths
26
142k
idx
int64
0
27.3k
FFmpeg
4257b804e2354db07e66ebfd966d7d13f49c7895
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...
4,680
FFmpeg
b2a4316287ea814168b0b794bd7ab0063fd1dd0f
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); ...
4,682
FFmpeg
e46a6fb7732a7caef97a916a4f765ec0f779d195
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)) { AVFra...
4,683
FFmpeg
5fba300d02f693de3c741e07740a851b2b3a94c7
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->cod...
4,684
FFmpeg
3faa303a47e0c3b59a53988e0f76018930c6cb1a
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->...
4,687
qemu
03a96b83b539498510e22aab585e41015ba18247
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...
4,688
FFmpeg
5804201cbac2de8824013a8294e381e93bbe45f2
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; t...
4,689
qemu
3cb0e25c4b417b7336816bd92de458f0770d49ff
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...
4,690
qemu
8a6a80896d6af03b8ee0c17cdf37219eca2588a7
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 h...
4,691
FFmpeg
130a8e0eef2f81e0d853117e417b650c3e16d1b7
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); ...
4,692
FFmpeg
b42bcaef29e6ffcd9513e1ad92dbff07bea84c94
1
int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, const AVPacket *avpkt) { AVCodecInternal *avci = avctx->internal; ...
4,693
qemu
14a10fc39923b3af07c8c46d22cb20843bee3a72
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); }
4,694
FFmpeg
9e6a2427558a718be0c1fffacffd935f630a7a8d
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 = vp5...
4,695
qemu
129c7d1c536d0c67a8781cb09fb5bdb3d0f6a2d0
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; ...
4,696
FFmpeg
29fb49194bedc74ac9be0b49b6b42dcfeb6222d9
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 | A...
4,699
FFmpeg
43fab7aafc3efc3d88e23a1ba27b939be09b3bd3
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...
4,700
FFmpeg
ed2112fb36d7407d960b4f44475a700a7c44344c
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++) {...
4,702
qemu
e68c35cfb8088a11300371751e3987f67cac15b1
0
static QIOChannel *nbd_negotiate_handle_starttls(NBDClient *client, uint32_t length, Error **errp) { QIOChannel *ioc; QIOChannelTLS *tioc; struct NBDTLSHandshakeData data = { 0 }; trace_nbd_negotia...
4,703
qemu
5fb6c7a8b26eab1a22207d24b4784bd2b39ab54b
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); }
4,704
qemu
8b42704441865611a5ee241ac9fc5cabc47a079b
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...
4,705
qemu
1687a089f103f9b7a1b4a1555068054cb46ee9e9
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 dep...
4,706
FFmpeg
82dd7d0dec29ee59af91ce18c29eb151b363ff37
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] = &m...
4,707
qemu
1687a089f103f9b7a1b4a1555068054cb46ee9e9
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...
4,709
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
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:...
4,710
qemu
61007b316cd71ee7333ff7a0a749a8949527575f
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_...
4,711
qemu
dfd100f242370886bb6732f70f1f7cbd8eb9fedc
0
static int vnc_display_connect(VncDisplay *vd, SocketAddress **saddr, size_t nsaddr, SocketAddress **wsaddr, size_t nwsaddr, Error **errp) { /* connect to...
4,712
qemu
e37dac06dc4e85a2f46c24261c0dfdf2a30b50e3
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 ...
4,714
qemu
ef1e1e0782e99c9dcf2b35e5310cdd8ca9211374
0
void desc_ring_free(DescRing *ring) { if (ring->info) { g_free(ring->info); } g_free(ring); }
4,715
qemu
f8b0aa25599782eef91edc00ebf620bd14db720c
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 0 abi_ulong cpsr = env->cpsr; /* * Maybe we need to deliver a 32-bit sign...
4,716
qemu
a6baa60807f88ba7d97b1787797fb58882ccbfb9
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 quer...
4,717
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
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); }
4,719
qemu
72cf2d4f0e181d0d3a3122e04129c58a95da713e
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++; }
4,720
qemu
cd723b85601baa7a0eeffbac83421357a70d81ee
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 ...
4,721
qemu
4417ab7adf1613799054be5afedf810fc2524ee8
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, pl...
4,722
qemu
9bc3a3a216e2689bfcdd36c3e079333bbdbf3ba0
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->...
4,724
qemu
a89f364ae8740dfc31b321eed9ee454e996dc3c1
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 { ...
4,725
qemu
a9f20d31a8332ea4d6a0c90b9731f11a51cff6db
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 >=...
4,726
qemu
a8a358bf35e660b1c0bf5adc5446836c6c0d1c73
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; uint...
4,727
qemu
92c93a816a8c04071264f9fb47cbc90a5e1ae5d8
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...
4,728
FFmpeg
747a0554ea8ad09404c1f5b80239ebd8d71b291e
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(...
4,730
qemu
4ed1c57a64992d84376b446b0c60edff2486681b
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_dwo...
4,731
FFmpeg
a9f3bb14ba8b303cf87c42b8fe7e423571176d54
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 && ...
4,732
qemu
7843c0d60db694b6d97e14ec5538fb97424016c1
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 PVR...
4,733
FFmpeg
b505f15b1530d72682b3314e84936f80fe6e43b2
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->p...
4,735
FFmpeg
fc78b0cb7e115ae494861c37a9928cff74df8db9
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_NOP...
4,736
FFmpeg
5eb765ef341c3ec1bea31914c897750f88476ede
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 ...
4,737
qemu
5e8e3c4c75c199aa1017db816fca02be2a9f8798
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.reso...
4,738
qemu
0b8b8753e4d94901627b3e86431230f2319215c4
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_...
4,739
FFmpeg
f6774f905fb3cfdc319523ac640be30b14c1bc55
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;...
4,740
qemu
6d0ee85040e4d238e2483191fe6e74aebbecd5d5
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_el...
4,741
qemu
2ccf97ec0f1b7a62a3220064f305454f3932c55a
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_...
4,742
FFmpeg
b71528d8967c1e10f499432fe26ff4713d1fd3b6
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]; ...
4,743
qemu
4f4321c11ff6e98583846bfd6f0e81954924b003
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); }
4,744
FFmpeg
95e5323510aa9526b7771d20deadc80c19f215eb
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()); retu...
4,745
qemu
8daea510951dd309a44cea8de415c685c43851cf
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); } }
4,746
FFmpeg
88e7a4d18c63799a21dff4a570ceb8008e310820
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...
4,747
qemu
66b9b43c42049bcae37668e890fedde9a72c8167
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); ...
4,748
FFmpeg
6ba5cbc699e77cae66bb719354fa142114b64eab
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(TCPCon...
4,749
FFmpeg
22de0f8369f1f3edf1a55e1d275f3c07c617b53e
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...
4,750
FFmpeg
689f65126be8a55e8a1e706cb56b19bb975c20ce
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...
4,751
FFmpeg
b3f461508176236bd9d7c2762fd70e339b1494f8
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_...
4,752
FFmpeg
58b1cba0c9173741cf769117a735b429356d83c0
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_bit...
4,753
FFmpeg
de64d8cf171c6ecdca22d57f0bdd7efec95d0c0e
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; ...
4,754
qemu
c572f23a3e7180dbeab5e86583e43ea2afed6271
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_unmarsha...
4,755
qemu
fb0e8e79a9d77ee240dbca036fa8698ce654e5d1
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)); }
4,756
FFmpeg
7b5ff7d57355dc608f0fd86e3ab32a2fda65e752
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); }
4,758
qemu
daa76aa416b1e18ab1fac650ff53d966d8f21f68
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"); }
4,759
FFmpeg
4bff9ef9d0781c4de228bf1f85634d2706fc589b
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_MMX assert(filterSize % 4 == 0 && filterSize>0); if(filterSize==4) // allways true for upscaling, sometimes for down too { long counter= -2*ds...
4,763
FFmpeg
90901860c21468d6e9ae437c2bacb099c7bd3acf
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 */ ...
4,764
FFmpeg
c6939f65a116b1ffed345d29d8621ee4ffb32235
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 = pla...
4,765
FFmpeg
4cd0bdae9a62d1f0366e60603222762af31e5289
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_...
4,771
FFmpeg
cdedf7e6254024c643532d45ac7c68e84e50eb01
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 = (n...
4,772
FFmpeg
dc0ad40de2b0d6995eb842e56b22f9096bd539ff
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]]++; }
4,773
FFmpeg
3f9fa2d0b58b142b165d4a8eaa61d7e837a76838
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; br...
4,774
FFmpeg
a8305b0ea3ccfe00a50cd3312bfcc455c78aacb5
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++) { ...
4,775
FFmpeg
16c831851384ab59e73579fdd9913fbff3c0284a
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, ...
4,776
FFmpeg
11f24e71ff2b598d973fd24bcf950eebaea9b3e6
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; ...
4,777
qemu
e7d81004e486b0e80a674d164d8aec0e83fa812f
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); ...
4,778
FFmpeg
604c9b1196c70d79bbbc1f23e75f6a8253a74da3
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...
4,779
qemu
82d07945652f16078b172d2bd46659e8f5f30d8e
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, ...
4,780
FFmpeg
2ed0f76655a76cc49f8a1a1d59e545f5906e7924
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); }
4,782
qemu
94e7340b5db8bce7866e44e700ffa8fd26585c7e
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; } ...
4,784
FFmpeg
136f55207521f0b03194ef5b55ba70f1635d6aee
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; ...
4,785
FFmpeg
ca16618b01abfde44b4eaf92dc89b01aa1b4a91e
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_...
4,786
FFmpeg
e2b54464c6a9de5d6b9ad4307696b0215d5e05a4
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, ...
4,787
FFmpeg
6796a1dd8c14843b77925cb83a3ef88706ae1dd0
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); }
4,788
FFmpeg
702200358197a0ea5ea82d1d6540c785bb04fae4
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(...
4,789
FFmpeg
e33d3720239314d28a48c64c1071ba9c048280d1
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; }
4,790
qemu
cd7bc87868d534f95e928cad98e2a52df7695771
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; }
4,791
qemu
8d04fb55dec381bc5105cb47f29d918e579e8cbd
1
uint64_t HELPER(get_cp_reg64)(CPUARMState *env, void *rip) { const ARMCPRegInfo *ri = rip; return ri->readfn(env, ri); }
4,792
qemu
f3b2bea3c76ba9283b957f1373e7cebdbf863059
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); ...
4,793
FFmpeg
f1d8763a02b5fce9a7d9789e049d74a45b15e1e8
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 ...
4,795
FFmpeg
6ca82975b7a8eaf676a52738ec8e7e36732327cc
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...
4,796
qemu
7c9e527659c67d4d7b41d9504f93d2d7ee482488
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; ...
4,797
FFmpeg
ac4b32df71bd932838043a4838b86d11e169707f
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); ...
4,799
FFmpeg
2f3b028c7117e03267ea7f88d0d612e70f1afc06
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\"...
4,802
qemu
56f289f383a871e871f944c7226920b35794efe6
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_st...
4,803
FFmpeg
5e6439a12508f8f7f30aeef64eb96c2311b7f573
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)...
4,804
FFmpeg
3426d575bf46edc0f52d15f7e7c1d199e8688faa
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;...
4,805
FFmpeg
7f05c5cea04112471d8147487aa3b44141922d09
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_INVALID...
4,806