project
stringclasses
2 values
commit_id
stringlengths
40
40
target
int64
0
1
func
stringlengths
26
142k
idx
int64
0
27.3k
FFmpeg
0a39c9ac0bfd7345fe676b4e2707d9cec3cbb553
0
av_cold void ff_hpeldsp_vp3_init_x86(HpelDSPContext *c, int cpu_flags, int flags) { if (EXTERNAL_AMD3DNOW(cpu_flags)) { if (flags & AV_CODEC_FLAG_BITEXACT) { c->put_no_rnd_pixels_tab[1][1] = ff_put_no_rnd_pixels8_x2_exact_3dnow; c->put_no_rnd_pixels_tab[1][2] = ff_put_no_rnd_pix...
27,005
qemu
61007b316cd71ee7333ff7a0a749a8949527575f
0
const char *bdrv_get_device_name(const BlockDriverState *bs) { return bs->blk ? blk_name(bs->blk) : ""; }
27,006
qemu
36778660d7fd0748a6129916e47ecedd67bdb758
0
static void mmu6xx_dump_mmu(FILE *f, fprintf_function cpu_fprintf, CPUPPCState *env) { ppc6xx_tlb_t *tlb; target_ulong sr; int type, way, entry, i; cpu_fprintf(f, "HTAB base = 0x%"HWADDR_PRIx"\n", env->htab_base); cpu_fprintf(f, "HTAB mask = 0x%"HWADDR_PRIx"\n", ...
27,009
qemu
dfd100f242370886bb6732f70f1f7cbd8eb9fedc
0
static SocketAddress *nbd_build_socket_address(const char *sockpath, const char *bindto, const char *port) { SocketAddress *saddr; saddr = g_new0(SocketAddress, 1); if (sockpath) { saddr->type = SO...
27,010
qemu
8c9a2b71de67742b40870da22abeccab57c81924
0
static void select_vgahw (const char *p) { const char *opts; assert(vga_interface_type == VGA_NONE); if (strstart(p, "std", &opts)) { if (vga_available()) { vga_interface_type = VGA_STD; } else { error_report("standard VGA not available"); exit(...
27,011
qemu
1ec26c757d5996468afcc0dced4fad04139574b3
0
static target_ulong h_resize_hpt_commit(PowerPCCPU *cpu, sPAPRMachineState *spapr, target_ulong opcode, target_ulong *args) { target_ulong flags = args[0]; target_ulong shift = args[1]; ...
27,012
qemu
c6bf8e0e0cf04b40a8a22426e00ebbd727331d8b
0
static inline void migration_bitmap_set_dirty(MemoryRegion *mr, int length) { ram_addr_t addr; for (addr = 0; addr < length; addr += TARGET_PAGE_SIZE) { if (!memory_region_get_dirty(mr, addr, TARGET_PAGE_SIZE, DIRTY_MEMORY_MIGRATION)) { memory_reg...
27,013
qemu
fd56e0612b6454a282fa6a953fdb09281a98c589
0
static int piix3_pre_save(void *opaque) { int i; PIIX3State *piix3 = opaque; for (i = 0; i < ARRAY_SIZE(piix3->pci_irq_levels_vmstate); i++) { piix3->pci_irq_levels_vmstate[i] = pci_bus_get_irq_level(piix3->dev.bus, i); } return 0; }
27,014
qemu
61007b316cd71ee7333ff7a0a749a8949527575f
0
static void send_qmp_error_event(BlockDriverState *bs, BlockErrorAction action, bool is_read, int error) { IoOperationType optype; optype = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE; qapi_event_send_block_io_error(bdr...
27,015
FFmpeg
205046420d5a4d389adb705538df3d6158be1fdb
0
static int expand(AVFilterContext *ctx, double *pz, int nb, double *coeffs) { int i; coeffs[0] = 1.0; coeffs[1] = 0.0; for (i = 0; i < nb; i++) { coeffs[2 * (i + 1) ] = 0.0; coeffs[2 * (i + 1) + 1] = 0.0; } for (i = 0; i < nb; i++) multiply(pz[2 * i], p...
27,016
qemu
bd269ebc82fbaa5fe7ce5bc7c1770ac8acecd884
0
static int vnc_display_get_address(const char *addrstr, bool websocket, bool reverse, int displaynum, int to, bool has_ipv4, ...
27,017
FFmpeg
229843aa359ae0c9519977d7fa952688db63f559
0
static int64_t ffm_seek1(AVFormatContext *s, int64_t pos1) { FFMContext *ffm = s->priv_data; AVIOContext *pb = s->pb; int64_t pos; pos = FFMIN(pos1, ffm->file_size - FFM_PACKET_SIZE); pos = FFMAX(pos, FFM_PACKET_SIZE); av_dlog(s, "seek to %"PRIx64" -> %"PRIx64"\n", pos1, pos); retu...
27,018
FFmpeg
c04c3282b4334ff64cfd69d40fea010602e830fd
0
static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap) { AVStream *st; int id; st = av_new_stream(s, 0); if (!st) return AVERROR_NOMEM; if (ap) { id = s->iformat->value; if (id == CODEC_ID_RAWVIDEO) { st->codec->codec_type = CODEC_TYPE_...
27,019
qemu
3494d650273e619606c6cb2c38aa9b8b7bed98e2
1
static size_t curl_size_cb(void *ptr, size_t size, size_t nmemb, void *opaque) { CURLState *s = ((CURLState*)opaque); size_t realsize = size * nmemb; size_t fsize; if(sscanf(ptr, "Content-Length: %zd", &fsize) == 1) { s->s->len = fsize; } return realsize; }
27,020
FFmpeg
a8a6da4a0e059b2aab66627a96b63c3632c477c2
1
static av_cold int twin_decode_close(AVCodecContext *avctx) { TwinContext *tctx = avctx->priv_data; int i; for (i = 0; i < 3; i++) { ff_mdct_end(&tctx->mdct_ctx[i]); av_free(tctx->cos_tabs[i]); } av_free(tctx->curr_frame); av_free(tctx->spectrum); av_free(tctx...
27,022
qemu
efec3dd631d94160288392721a5f9c39e50fb2bc
1
static void fw_cfg_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); dc->realize = fw_cfg_realize; dc->no_user = 1; dc->reset = fw_cfg_reset; dc->vmsd = &vmstate_fw_cfg; dc->props = fw_cfg_properties; }
27,023
qemu
f3c75d42adbba553eaf218a832d4fbea32c8f7b8
1
static target_ulong h_read(PowerPCCPU *cpu, sPAPREnvironment *spapr, target_ulong opcode, target_ulong *args) { CPUPPCState *env = &cpu->env; target_ulong flags = args[0]; target_ulong pte_index = args[1]; uint8_t *hpte; int i, ridx, n_entries = 1; if ((pte_i...
27,024
qemu
c8a9fd80719e63615dac12e3625223fb54aa8430
1
static int bdrv_co_do_ioctl(BlockDriverState *bs, int req, void *buf) { BlockDriver *drv = bs->drv; BdrvTrackedRequest tracked_req; CoroutineIOCompletion co = { .coroutine = qemu_coroutine_self(), }; BlockAIOCB *acb; tracked_request_begin(&tracked_req, bs, 0, 0, BDRV_TRACKED_IO...
27,027
FFmpeg
0ebb523f072322972ea446616676fff32e9603c6
1
static int asf_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int flags) { ASFContext *asf = s->priv_data; AVStream *st = s->streams[stream_index]; int64_t pos; int index; if (s->packet_size <= 0) return -1; /* Try using the protocol...
27,028
FFmpeg
f6774f905fb3cfdc319523ac640be30b14c1bc55
1
void ff_mpeg_unref_picture(MpegEncContext *s, Picture *pic) { int off = offsetof(Picture, mb_mean) + sizeof(pic->mb_mean); pic->tf.f = &pic->f; /* WM Image / Screen codecs allocate internal buffers with different * dimensions / colorspaces; ignore user-defined callbacks for these. */ if (s-...
27,029
qemu
0c9390d978cbf61e8f16c9f580fa96b305c43568
1
void nbd_client_new(NBDExport *exp, QIOChannelSocket *sioc, QCryptoTLSCreds *tlscreds, const char *tlsaclname, void (*close_fn)(NBDClient *)) { NBDClient *client; NBDClientNewData *data = g_new(NBDClientNewData, 1); cl...
27,030
qemu
0e321191224c8cd137eef41da3257e096965c3d6
1
void hbitmap_set(HBitmap *hb, uint64_t start, uint64_t count) { /* Compute range in the last layer. */ uint64_t last = start + count - 1; trace_hbitmap_set(hb, start, count, start >> hb->granularity, last >> hb->granularity); start >>= hb->granularity; last >>= hb->...
27,031
FFmpeg
ad22767cb61cdc75541b21154d65fd1ad6351025
1
static int shorten_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) { AVFrame *frame = data; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; ShortenContext *s = avctx->priv_data; int i, input_buf_size...
27,032
FFmpeg
de6c150444159a26fe2555089d384ddd2d6459aa
1
int64_t ff_lsb2full(StreamContext *stream, int64_t lsb){ int64_t mask = (1<<stream->msb_pts_shift)-1; int64_t delta= stream->last_pts - mask/2; return ((lsb - delta)&mask) + delta; }
27,033
qemu
016d2e1dfa21b64a524d3629fdd317d4c25bc3b8
1
long do_sigreturn(CPUAlphaState *env) { struct target_sigcontext *sc; abi_ulong sc_addr = env->ir[IR_A0]; target_sigset_t target_set; sigset_t set; if (!lock_user_struct(VERIFY_READ, sc, sc_addr, 1)) { goto badframe; } target_sigemptyset(&target_set); if (__get_user...
27,034
qemu
6460440f34c709461b84375cfd8a86b27d433225
1
static void coroutine_fn wait_serialising_requests(BdrvTrackedRequest *self) { BlockDriverState *bs = self->bs; BdrvTrackedRequest *req; bool retry; if (!bs->serialising_in_flight) { return; } do { retry = false; QLIST_FOREACH(req, &bs->tracked_requests, lis...
27,035
qemu
48b3ed0a68b8c1b288b4e15743ea39b7b5b318c3
1
void qemu_spice_init(void) { QemuOpts *opts = QTAILQ_FIRST(&qemu_spice_opts.head); const char *password, *str, *x509_dir, *addr, *x509_key_password = NULL, *x509_dh_file = NULL, *tls_ciphers = NULL; char *x509_key_file = NULL, *x509_cert_file = NULL, *x509_ca...
27,037
qemu
d9bce9d99f4656ae0b0127f7472db9067b8f84ab
1
void do_store_601_batu (int nr) { do_store_ibatu(env, nr, T0); env->DBAT[0][nr] = env->IBAT[0][nr]; env->DBAT[1][nr] = env->IBAT[1][nr]; }
27,038
qemu
52579c681cb12bf64de793e85edc50d990f4d42f
1
static void dp8393x_realize(DeviceState *dev, Error **errp) { dp8393xState *s = DP8393X(dev); int i, checksum; uint8_t *prom; address_space_init(&s->as, s->dma_mr, "dp8393x"); memory_region_init_io(&s->mmio, OBJECT(dev), &dp8393x_ops, s, "dp8393x-regs", 0x40 << s->...
27,039
qemu
7cfd527525a7d6b1c904890a6b84c1227846415e
1
void bdrv_round_to_clusters(BlockDriverState *bs, int64_t offset, unsigned int bytes, int64_t *cluster_offset, unsigned int *cluster_bytes) { BlockDriverInfo bdi; if (bdrv_get_info(bs, &bdi) < 0 || bdi.cluster_size == 0)...
27,040
FFmpeg
324ff59444ff5470bb325ff1e2be7c4b054fc944
0
int ff_audio_rechunk_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush, int (*get_packet)(AVFormatContext *, AVPacket *, AVPacket *, int), int (*compare_ts)(AVFormatContext *, AVPacket *, AVPacket *)) { int i; if (pkt) { AVStre...
27,041
FFmpeg
d150a147dac67faeaf6b1f25a523ae330168ee1e
0
static av_cold int init_decoder(AVCodecContext *avctx) { avctx->pix_fmt = PIX_FMT_PAL8; return 0; }
27,042
FFmpeg
55815edca038997ec283569a192a3eca7f2143bc
0
static void opt_output_file(const char *filename) { AVFormatContext *oc; int err, use_video, use_audio, use_subtitle; int input_has_video, input_has_audio, input_has_subtitle; AVFormatParameters params, *ap = &params; AVOutputFormat *file_oformat; if (!strcmp(filename, "-")) fi...
27,043
qemu
786a4ea82ec9c87e3a895cf41081029b285a5fe5
0
static uint32_t bonito_sbridge_pciaddr(void *opaque, hwaddr addr) { PCIBonitoState *s = opaque; PCIHostState *phb = PCI_HOST_BRIDGE(s->pcihost); uint32_t cfgaddr; uint32_t idsel; uint32_t devno; uint32_t funno; uint32_t regno; uint32_t pciaddr; /* support type0 pci config...
27,044
qemu
72cf2d4f0e181d0d3a3122e04129c58a95da713e
0
const char *drive_get_serial(BlockDriverState *bdrv) { DriveInfo *dinfo; TAILQ_FOREACH(dinfo, &drives, next) { if (dinfo->bdrv == bdrv) return dinfo->serial; } return "\0"; }
27,047
qemu
5fb6c7a8b26eab1a22207d24b4784bd2b39ab54b
0
static void vnc_read_when(VncState *vs, VncReadEvent *func, size_t expecting) { vs->read_handler = func; vs->read_handler_expect = expecting; }
27,049
qemu
620e48f66350991918dd78e9a686a9b159fec111
0
static int decode_mips16_opc (CPUState *env, DisasContext *ctx, int *is_branch) { int rx, ry; int sa; int op, cnvt_op, op1, offset; int funct; int n_bytes; op = (ctx->opcode >> 11) & 0x1f; sa = (ctx->opcode >> 2) & 0x7; sa = sa == 0 ? 8 : sa; ...
27,050
FFmpeg
140f48b90fbe32a88423aad473bccc72c3bb450e
0
static int smc_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; SmcContext *s = avctx->priv_data; const uint8_t *pal = av_packet_get_side_data(...
27,051
qemu
494a8ebe713055d3946183f4b395f85a18b43e9e
0
static void proxy_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off) { seekdir(fs->dir, off); }
27,052
qemu
97b83deb557679c909465456acaa723c2ba34948
0
void virtio_notify(VirtIODevice *vdev, VirtQueue *vq) { /* Always notify when queue is empty */ if ((vq->inuse || vring_avail_idx(vq) != vq->last_avail_idx) && (vring_avail_flags(vq) & VRING_AVAIL_F_NO_INTERRUPT)) return; vdev->isr |= 0x01; virtio_update_irq(vdev); }
27,053
qemu
369f7de9d57e4dd2f312255fc12271d5749c0a4e
0
static int64_t allocate_cluster(BlockDriverState *bs, int64_t sector_num) { BDRVParallelsState *s = bs->opaque; uint32_t idx, offset, tmp; int64_t pos; int ret; idx = sector_num / s->tracks; offset = sector_num % s->tracks; if (idx >= s->catalog_size) { return -EINVAL; ...
27,054
qemu
76abe4071d111a9ca6dcc9b9689a831c39ffa718
0
static int vdi_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { BDRVVdiState *s = bs->opaque; VdiHeader header; size_t bmap_size; int ret; logout("\n"); ret = bdrv_read(bs->file, 0, (uint8_t *)&header, 1); if (ret < 0) { goto fai...
27,055
qemu
c2b38b277a7882a592f4f2ec955084b2b756daaa
0
ThreadPool *aio_get_thread_pool(AioContext *ctx) { if (!ctx->thread_pool) { ctx->thread_pool = thread_pool_new(ctx); } return ctx->thread_pool; }
27,057
qemu
3b098d56979d2f7fd707c5be85555d114353a28d
0
static void string_serialize(void *native_in, void **datap, VisitorFunc visit, Error **errp) { StringSerializeData *d = g_malloc0(sizeof(*d)); d->sov = string_output_visitor_new(false); visit(string_output_get_visitor(d->sov), &native_in, errp); *datap = d; }
27,059
qemu
1ac157da77c863b62b1d2f467626a440d57cf17d
0
void cpu_x86_update_cr3(CPUX86State *env) { if (env->cr[0] & CR0_PG_MASK) { #if defined(DEBUG_MMU) printf("CR3 update: CR3=%08x\n", env->cr[3]); #endif tlb_flush(env); } }
27,061
FFmpeg
8849c4ceac0f35e88b2dc406bf5ffc4173a38ffe
0
static inline void apply_8x8(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int dir, uint8_t **ref_picture, qpel_mc...
27,062
FFmpeg
0242351390643d176b10600c2eb854414f9559e6
0
void mpeg_motion_internal(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int field_based, int bottom_field, int field_select, ...
27,063
FFmpeg
253d0be6a1ecc343d29ff8e1df0ddf961ab9c772
0
static void parse_palette_segment(AVCodecContext *avctx, const uint8_t *buf, int buf_size) { PGSSubContext *ctx = avctx->priv_data; const uint8_t *buf_end = buf + buf_size; const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP; int color_id; int y, cb, cr, al...
27,064
FFmpeg
29034e65039ef6b1854ceeb76ffe4092992d9fd5
0
static int transcode(OutputFile *output_files, int nb_output_files, InputFile *input_files, int nb_input_files) { int ret, i; AVFormatContext *is, *os; OutputStream *ost; InputStream *ist; uint8_t *no_packet; int no_packet_count = 0; int64_t timer_start; ...
27,065
FFmpeg
fc11927890f38445a950b453d24928525da0e61a
0
void *av_realloc(void *ptr, size_t size) { #if CONFIG_MEMALIGN_HACK int diff; #endif /* let's disallow possible ambiguous cases */ if (size > (MAX_MALLOC_SIZE-16)) return NULL; #if CONFIG_MEMALIGN_HACK //FIXME this isn't aligned correctly, though it probably isn't needed if(!pt...
27,066
FFmpeg
6184fa2067ccf88e68a7009442cf01440e59d99c
0
static av_cold int raw_close_decoder(AVCodecContext *avctx) { RawVideoContext *context = avctx->priv_data; av_freep(&context->buffer); return 0; }
27,068
FFmpeg
b8598f6ce61ccda3f2ff0c730b009fb650e42986
1
static int mc_subpel(DiracContext *s, DiracBlock *block, const uint8_t *src[5], int x, int y, int ref, int plane) { Plane *p = &s->plane[plane]; uint8_t **ref_hpel = s->ref_pics[ref]->hpel[plane]; int motion_x = block->u.mv[ref][0]; int motion_y = block->u.mv[ref][1]; int...
27,070
qemu
ef4cbe14342c1f63b3c754e306218f004f4e26c4
1
int kvm_arch_init_vcpu(CPUState *cs) { struct { struct kvm_cpuid2 cpuid; struct kvm_cpuid_entry2 entries[KVM_MAX_CPUID_ENTRIES]; } QEMU_PACKED cpuid_data; X86CPU *cpu = X86_CPU(cs); CPUX86State *env = &cpu->env; uint32_t limit, i, j, cpuid_i; uint32_t unused; struct...
27,071
qemu
b5937f297819bec5bf704dda1df9807fc7f0a766
1
static QObject *pci_get_dev_dict(PCIDevice *dev, PCIBus *bus, int bus_num) { int class; QObject *obj; obj = qobject_from_jsonf("{ 'bus': %d, 'slot': %d, 'function': %d," "'class_info': %p, 'id': %p, 'regions': %p," " 'qdev_id': %s }"...
27,073
FFmpeg
c9220d5b06536ac359166214b4131a1f15244617
1
static int decode_block_progressive(MJpegDecodeContext *s, int16_t *block, uint8_t *last_nnz, int ac_index, int16_t *quant_matrix, int ss, int se, int Al, int *EOBRUN) { int code, i, j, level, val, run; ...
27,074
qemu
b7b5233ad7fdd9985bb6d05b7919f3a20723ff2c
1
static void *bsd_vmalloc(size_t size) { void *p; mmap_lock(); /* Use map and mark the pages as used. */ p = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); if (h2g_valid(p)) { /* Allocated region overlaps guest address space. This ...
27,075
FFmpeg
6e42e6c4b410dbef8b593c2d796a5dad95f89ee4
1
void rgb32tobgr24(const uint8_t *src, uint8_t *dst, long src_size) { long i; long num_pixels = src_size >> 2; for(i=0; i<num_pixels; i++) { #ifdef WORDS_BIGENDIAN /* RGB32 (= A,B,G,R) -> BGR24 (= B,G,R) */ dst[3*i + 0] = src[4*i + 1]; dst[3*i + 1] = src[4*i + 2]; dst[3*i + 2] = src[4*i + 3];...
27,076
FFmpeg
dae2ce361a2b5fd9be1d43e5e8c00bdbc5f03e3d
1
static int initFilter(int16_t **outFilter, int16_t **filterPos, int *outFilterSize, int xInc, int srcW, int dstW, int filterAlign, int one, int flags, int cpu_flags, SwsVector *srcFilter, SwsVector *dstFilter, double param[2], int is_horizontal) { int i; int filt...
27,077
qemu
e7852674d5013bffd0bb8e822a7521f76677a60b
1
static ssize_t usbnet_receive(VLANClientState *nc, const uint8_t *buf, size_t size) { USBNetState *s = DO_UPCAST(NICState, nc, nc)->opaque; struct rndis_packet_msg_type *msg; if (is_rndis(s)) { msg = (struct rndis_packet_msg_type *) s->in_buf; if (!s->rndis_state == RNDIS_DATA_INITIA...
27,078
qemu
8be7e7e4c72c048b90e3482557954a24bba43ba7
1
int unix_connect(const char *path) { QemuOpts *opts; int sock; opts = qemu_opts_create(&dummy_opts, NULL, 0); qemu_opt_set(opts, "path", path); sock = unix_connect_opts(opts); qemu_opts_del(opts); return sock; }
27,079
qemu
62593718d77c06ad2b5e942727cead40775d2395
1
static inline bool regime_translation_disabled(CPUARMState *env, ARMMMUIdx mmu_idx) { if (arm_feature(env, ARM_FEATURE_M)) { switch (env->v7m.mpu_ctrl[regime_is_secure(env, mmu_idx)] & (R_V7M_MPU_CTRL_ENABLE_MASK | R_V7M_MPU_CTRL_HFNMIENA_M...
27,080
qemu
8b0b29dcec59730e6b21b253a6b43271cb3d831b
0
static void migration_instance_init(Object *obj) { MigrationState *ms = MIGRATION_OBJ(obj); ms->state = MIGRATION_STATUS_NONE; ms->xbzrle_cache_size = DEFAULT_MIGRATE_CACHE_SIZE; ms->mbps = -1; ms->parameters.tls_creds = g_strdup(""); ms->parameters.tls_hostname = g_strdup(""); }
27,082
qemu
72cf2d4f0e181d0d3a3122e04129c58a95da713e
0
static void do_stop_capture(Monitor *mon, const QDict *qdict) { int i; int n = qdict_get_int(qdict, "n"); CaptureState *s; for (s = capture_head.lh_first, i = 0; s; s = s->entries.le_next, ++i) { if (i == n) { s->ops.destroy (s->opaque); LIST_REMOVE (s, entries)...
27,084
qemu
4cdd01d32ee6fe04f8d909bfd3708be6864873a2
0
static void nbd_refresh_filename(BlockDriverState *bs) { QDict *opts = qdict_new(); const char *path = qdict_get_try_str(bs->options, "path"); const char *host = qdict_get_try_str(bs->options, "host"); const char *port = qdict_get_try_str(bs->options, "port"); const char *export = qdict_...
27,085
FFmpeg
0e6c8532215790bbe560a9eea4f3cc82bb55cf92
0
static int select_input_picture(MpegEncContext *s) { int i, ret; for (i = 1; i < MAX_PICTURE_COUNT; i++) s->reordered_input_picture[i - 1] = s->reordered_input_picture[i]; s->reordered_input_picture[MAX_PICTURE_COUNT - 1] = NULL; /* set next picture type & ordering */ if (!s->reor...
27,086
qemu
a7812ae412311d7d47f8aa85656faadac9d64b56
0
static inline void iwmmxt_store_reg(TCGv var, int reg) { tcg_gen_st_i64(var, cpu_env, offsetof(CPUState, iwmmxt.regs[reg])); }
27,087
qemu
5b5cb08683b6715a2aca5314168e68ff0665912b
0
static int msix_is_masked(PCIDevice *dev, int vector) { unsigned offset = vector * MSIX_ENTRY_SIZE + MSIX_VECTOR_CTRL; return dev->msix_table_page[offset] & MSIX_VECTOR_MASK; }
27,089
qemu
018598747c775394471ce4a341a1ce225a1738dc
0
static void qed_aio_next_io(QEDAIOCB *acb) { BDRVQEDState *s = acb_to_s(acb); uint64_t offset; size_t len; int ret; trace_qed_aio_next_io(s, acb, 0, acb->cur_pos + acb->cur_qiov.size); if (acb->backing_qiov) { qemu_iovec_destroy(acb->backing_qiov); g_free(acb->backin...
27,090
qemu
cf070d7ec0b8fb21faa9a630ed5cc66f90844a08
0
writev_f(int argc, char **argv) { struct timeval t1, t2; int Cflag = 0, qflag = 0; int c, cnt; char *buf; int64_t offset; int total; int nr_iov; int pattern = 0xcd; QEMUIOVector qiov; while ((c = getopt(argc, argv, "CqP:")) != EOF) { switch (c) { case 'C': Cflag = 1; break; case ...
27,091
qemu
bc7c08a2c375acb7ae4d433054415588b176d34c
0
static void test_qemu_strtoull_decimal(void) { const char *str = "0123"; char f = 'X'; const char *endptr = &f; uint64_t res = 999; int err; err = qemu_strtoull(str, &endptr, 10, &res); g_assert_cmpint(err, ==, 0); g_assert_cmpint(res, ==, 123); g_assert(endptr == str +...
27,092
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
0
static uint64_t imx_timerp_read(void *opaque, target_phys_addr_t offset, unsigned size) { IMXTimerPState *s = (IMXTimerPState *)opaque; DPRINTF("p-read(offset=%x)", offset >> 2); switch (offset >> 2) { case 0: /* Control Register */ DPRINTF("cr %x\n", s->...
27,093
qemu
bec1631100323fac0900aea71043d5c4e22fc2fa
0
static void tcg_out_brcond2(TCGContext *s, TCGCond cond, TCGReg al, TCGReg ah, TCGReg bl, TCGReg bh, int label_index) { TCGCond b_cond = TCG_COND_NE; TCGReg tmp = TCG_TMP1; /* With branches, we emit between 4 and 9 insns with 2 or 3 branches. With setcond, we emit ...
27,094
qemu
32bafa8fdd098d52fbf1102d5a5e48d29398c0aa
0
static void legacy_mouse_event(DeviceState *dev, QemuConsole *src, InputEvent *evt) { static const int bmap[INPUT_BUTTON__MAX] = { [INPUT_BUTTON_LEFT] = MOUSE_EVENT_LBUTTON, [INPUT_BUTTON_MIDDLE] = MOUSE_EVENT_MBUTTON, [INPUT_BUTTON_RIGHT] = MOUSE_EVEN...
27,096
FFmpeg
3176217c60ca7828712985092d9102d331ea4f3d
0
static int h264_slice_header_init(H264Context *h) { int nb_slices = (HAVE_THREADS && h->avctx->active_thread_type & FF_THREAD_SLICE) ? h->avctx->thread_count : 1; int i, ret; ff_set_sar(h->avctx, h->sps.sar); av_pix_fmt_get_chroma_sub_sample(h->avctx->pi...
27,097
FFmpeg
dcc39ee10e82833ce24aa57926c00ffeb1948198
0
int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx) { int i, ret; Picture *pic; s->mb_skipped = 0; /* mark & release old frames */ if (s->pict_type != AV_PICTURE_TYPE_B && s->last_picture_ptr && s->last_picture_ptr != s->next_picture_ptr && s->last_picture_ptr-...
27,098
qemu
1e885b25275fb6763eb947b1e53b2d6911b967a8
0
static guint io_add_watch_poll(GIOChannel *channel, IOCanReadHandler *fd_can_read, GIOFunc fd_read, gpointer user_data) { IOWatchPoll *iwp; iwp = (IOWatchPoll *) g_source_new(&io_watch_poll_funcs, sizeof(IOWatch...
27,099
qemu
dfd100f242370886bb6732f70f1f7cbd8eb9fedc
0
int qio_channel_socket_dgram_sync(QIOChannelSocket *ioc, SocketAddress *localAddr, SocketAddress *remoteAddr, Error **errp) { int fd; trace_qio_channel_socket_dgram_sync(ioc, localAddr, remoteAddr); ...
27,101
FFmpeg
3a48e38ad0e37d89065843548414d367e70593bf
0
int ff_init_me(MpegEncContext *s){ MotionEstContext * const c= &s->me; int cache_size= FFMIN(ME_MAP_SIZE>>ME_MAP_SHIFT, 1<<ME_MAP_SHIFT); int dia_size= FFMAX(FFABS(s->avctx->dia_size)&255, FFABS(s->avctx->pre_dia_size)&255); if(FFMIN(s->avctx->dia_size, s->avctx->pre_dia_size) < -ME_MAP_SIZE){ ...
27,103
qemu
326b9e98a391d542cc33c4c91782ff4ba51edfc5
1
float32 float32_scalbn( float32 a, int n STATUS_PARAM ) { flag aSign; int16 aExp; uint32_t aSig; a = float32_squash_input_denormal(a STATUS_VAR); aSig = extractFloat32Frac( a ); aExp = extractFloat32Exp( a ); aSign = extractFloat32Sign( a ); if ( aExp == 0xFF ) { re...
27,105
qemu
64e69d50a394a48de7607f178d53c192443f9066
1
void net_check_clients(void) { VLANState *vlan; VLANClientState *vc; int has_nic, has_host_dev; QTAILQ_FOREACH(vlan, &vlans, next) { QTAILQ_FOREACH(vc, &vlan->clients, next) { switch (vc->info->type) { case NET_CLIENT_TYPE_NIC: has_nic = 1; ...
27,106
qemu
d17008bc2914d62fd0af6a8f313604ae9f9a102c
1
static uint32_t hpet_time_after64(uint64_t a, uint64_t b) { return ((int64_t)(b) - (int64_t)(a) < 0); }
27,108
qemu
d19a4d4ef448e736d341df47bd1adc78c8e40814
1
static void kvm_arm_gicv3_realize(DeviceState *dev, Error **errp) { GICv3State *s = KVM_ARM_GICV3(dev); KVMARMGICv3Class *kgc = KVM_ARM_GICV3_GET_CLASS(s); Error *local_err = NULL; DPRINTF("kvm_arm_gicv3_realize\n"); kgc->parent_realize(dev, &local_err); if (local_err) { err...
27,109
qemu
b061dc41f62048acd4a34c6570c0ea396cd9d0b4
1
static TypeImpl *type_register_internal(const TypeInfo *info) { TypeImpl *ti = g_malloc0(sizeof(*ti)); int i; g_assert(info->name != NULL); if (type_table_lookup(info->name) != NULL) { fprintf(stderr, "Registering `%s' which already exists\n", info->name); abort(); } ...
27,110
qemu
71b3c3dea21a310c5df7406cdc1cffc64cf14c18
1
static int disas_vfp_insn(CPUState * env, DisasContext *s, uint32_t insn) { uint32_t rd, rn, rm, op, i, n, offset, delta_d, delta_m, bank_mask; int dp, veclen; TCGv addr; TCGv tmp; TCGv tmp2; if (!arm_feature(env, ARM_FEATURE_VFP)) return 1; if (!vfp_enabled(env)) { ...
27,111
qemu
30d335d68d93705eb346387c03bb6aca0f52454a
1
void drive_hot_add(Monitor *mon, const QDict *qdict) { int dom, pci_bus; unsigned slot; int type, bus; PCIDevice *dev; DriveInfo *dinfo = NULL; const char *pci_addr = qdict_get_str(qdict, "pci_addr"); const char *opts = qdict_get_str(qdict, "opts"); BusState *scsibus; din...
27,112
FFmpeg
55078332495d879ad4aeb23ae2bada75130431c6
1
static inline int msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block, int n, int coded) { int level, i, last, run, run_diff; int dc_pred_dir; RLTable *rl; RL_VLC_ELEM *rl_vlc; const UINT8 *scan_table; int qmul, qadd; if (s->mb_intra) { ...
27,113
qemu
c60174e847082ab9f70720f86509a3353f816fad
1
static int usb_device_post_load(void *opaque, int version_id) { USBDevice *dev = opaque; if (dev->state == USB_STATE_NOTATTACHED) { dev->attached = 0; } else { dev->attached = 1; return 0;
27,114
qemu
3de3d698d942d1116152417f882c897b26b44e41
1
int inet_listen_opts(QemuOpts *opts, int port_offset, Error **errp) { struct addrinfo ai,*res,*e; const char *addr; char port[33]; char uaddr[INET6_ADDRSTRLEN+1]; char uport[33]; int slisten, rc, to, port_min, port_max, p; memset(&ai,0, sizeof(ai)); ai.ai_flags = AI_PASSIVE | ...
27,116
FFmpeg
7c2fa13df9a6130b3f258c7513933cbdca2fe23b
1
static int oma_read_packet(AVFormatContext *s, AVPacket *pkt) { OMAContext *oc = s->priv_data; AVStream *st = s->streams[0]; int packet_size = st->codec->block_align; int byte_rate = st->codec->bit_rate >> 3; int64_t pos = avio_tell(s->pb); int ret = av_get_packet(s->pb,...
27,117
FFmpeg
08d0969c1402ccec4dce44bd430128fb59d7b790
0
void av_opt_set_defaults2(void *s, int mask, int flags) { #endif const AVOption *opt = NULL; while ((opt = av_opt_next(s, opt)) != NULL) { #if FF_API_OLD_AVOPTIONS if ((opt->flags & mask) != flags) continue; #endif switch (opt->type) { case AV_OPT_TYPE_CONST: ...
27,118
FFmpeg
65e33d8e23277bb96809842656482e0e3fe8746f
1
static int RENAME(resample_common)(ResampleContext *c, void *dest, const void *source, int n, int update_ctx) { DELEM *dst = dest; const DELEM *src = source; int dst_index; int index= c->index; int frac= c->frac; int ...
27,119
qemu
88be7b4be4aa17c88247e162bdd7577ea79db94f
1
BdrvNextIterator *bdrv_next(BdrvNextIterator *it, BlockDriverState **bs) { if (!it) { it = g_new(BdrvNextIterator, 1); *it = (BdrvNextIterator) { .phase = BDRV_NEXT_BACKEND_ROOTS, }; } /* First, return all root nodes of BlockBackends. In order to avoid * r...
27,120
FFmpeg
1afd7a118fd71536971f991b823c89f1c9e87509
1
static int channelmap_filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf) { AVFilterContext *ctx = inlink->dst; AVFilterLink *outlink = ctx->outputs[0]; const ChannelMapContext *s = ctx->priv; const int nch_in = av_get_channel_layout_nb_channels(inlink->channel_layout); const int nch...
27,121
FFmpeg
0bd485300e1a8bb0ba95df53da34562816120e31
0
static int encode_thread(AVCodecContext *c, void *arg){ MpegEncContext *s= *(void**)arg; int mb_x, mb_y, pdif = 0; int chr_h= 16>>s->chroma_y_shift; int i, j; MpegEncContext best_s, backup_s; uint8_t bit_buf[2][MAX_MB_BYTES]; uint8_t bit_buf2[2][MAX_MB_BYTES]; uint8_t bit_buf_tex...
27,122
FFmpeg
a9eb4f0899de04a3093a04f461611c6f0664398e
0
static void new_audio_stream(AVFormatContext *oc, int file_idx) { AVStream *st; OutputStream *ost; AVCodec *codec= NULL; AVCodecContext *audio_enc; enum CodecID codec_id = CODEC_ID_NONE; if(!audio_stream_copy){ if (audio_codec_name) { codec_id = find_codec_or_die(a...
27,123
qemu
8fd2a2f1a9048b9e37a898c2a5e9ef59d0c1a095
1
static int virtio_net_handle_mac(VirtIONet *n, uint8_t cmd, VirtQueueElement *elem) { struct virtio_net_ctrl_mac mac_data; if (cmd != VIRTIO_NET_CTRL_MAC_TABLE_SET || elem->out_num != 3 || elem->out_sg[1].iov_len < sizeof(mac_data) || elem->out_sg[2].iov_...
27,124
qemu
3e305e4a4752f70c0b5c3cf5b43ec957881714f7
1
static ssize_t vnc_tls_pull(gnutls_transport_ptr_t transport, void *data, size_t len) { VncState *vs = (VncState *)transport; int ret; retry: ret = qemu_recv(vs->csock, data, len, 0); if (ret < 0) { if (errno == EINTR) ...
27,125
qemu
696b55017d90b3237ca9d656aa4904d6b5c46c7a
1
file_backend_memory_alloc(HostMemoryBackend *backend, Error **errp) { HostMemoryBackendFile *fb = MEMORY_BACKEND_FILE(backend); if (!backend->size) { error_setg(errp, "can't create backend with size 0"); return; } if (!fb->mem_path) { error_setg(errp, "mem-path property...
27,126
qemu
bfb1ac14029ee72b19296109fba880c0551755d5
1
sorecvoob(struct socket *so) { struct tcpcb *tp = sototcpcb(so); DEBUG_CALL("sorecvoob"); DEBUG_ARG("so = %p", so); /* * We take a guess at how much urgent data has arrived. * In most situations, when urgent data arrives, the next * read() should get all the urgent data. This guess will * be w...
27,127
qemu
93b665693dd4afd32c89b0d5ee2b407b26a7a3bc
1
static uint32_t cmos_ioport_read(void *opaque, uint32_t addr) { RTCState *s = opaque; int ret; if ((addr & 1) == 0) { return 0xff; } else { switch(s->cmos_index) { case RTC_SECONDS: case RTC_MINUTES: case RTC_HOURS: case RTC_DAY_OF_WEEK: ...
27,128