project
stringclasses
2 values
commit_id
stringlengths
40
40
target
int64
0
1
func
stringlengths
26
142k
idx
int64
0
27.3k
FFmpeg
0c32e19d584ba6ddbc27f0a796260404daaf4b6a
0
static void av_noinline filter_mb_edgecv( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h ) { const unsigned int index_a = 52 + qp + h->slice_alpha_c0_offset; const int alpha = alpha_table[index_a]; const int beta = (beta_table+52)[qp + h->slice_beta_offset]; if (alpha ==0 ...
12,341
qemu
3e80bf9351f8fec9085c46df6da075efd5e71003
1
int qemu_recvv(int sockfd, struct iovec *iov, int len, int iov_offset) { return do_sendv_recvv(sockfd, iov, len, iov_offset, 0); }
12,342
qemu
fdda170e50b8af062cf5741e12c4fb5e57a2eacf
1
static void vmxnet3_complete_packet(VMXNET3State *s, int qidx, uint32_t tx_ridx) { struct Vmxnet3_TxCompDesc txcq_descr; PCIDevice *d = PCI_DEVICE(s); VMXNET3_RING_DUMP(VMW_RIPRN, "TXC", qidx, &s->txq_descr[qidx].comp_ring); txcq_descr.txdIdx = tx_ridx; txcq_descr.gen = vmxnet3_ring_curr_...
12,343
qemu
cec56a733dd2c3fa81dbedbecf03922258747f7d
1
static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel) { const char *rn = "invalid"; if (sel != 0) check_insn(ctx, ISA_MIPS32); if (ctx->tb->cflags & CF_USE_ICOUNT) { gen_io_start(); } switch (reg) { case 0: switch (sel) { case 0: ...
12,344
qemu
d8fd2954996255ba6ad610917e7849832d0120b7
1
void cpu_loop(CPUARMState *env) { int trapnr; unsigned int n, insn; target_siginfo_t info; uint32_t addr; for(;;) { cpu_exec_start(env); trapnr = cpu_arm_exec(env); cpu_exec_end(env); switch(trapnr) { case EXCP_UDEF: { ...
12,345
qemu
2aaa1940684a3bf2b381fd2a8ff26c287a05109d
1
static uint32_t cc_calc_abs_32(int32_t dst) { if ((uint32_t)dst == 0x80000000UL) { return 3; } else if (dst) { return 1; } else { return 0; } }
12,346
qemu
1f51470d044852592922f91000e741c381582cdc
1
static int qemu_chr_open_pipe(QemuOpts *opts, CharDriverState **_chr) { int fd_in, fd_out; char filename_in[256], filename_out[256]; const char *filename = qemu_opt_get(opts, "path"); if (filename == NULL) { fprintf(stderr, "chardev: pipe: no filename given\n"); return -EINVAL; ...
12,348
FFmpeg
9e6a2427558a718be0c1fffacffd935f630a7a8d
1
static void vp5_parse_coeff(VP56Context *s) { VP56RangeCoder *c = &s->c; VP56Model *model = s->modelp; uint8_t *permute = s->idct_scantable; uint8_t *model1, *model2; int coeff, sign, coeff_idx; int b, i, cg, idx, ctx, ctx_last; int pt = 0; /* plane type (0 for Y, 1 for U or V) */...
12,349
FFmpeg
4c7b023d56e09a78a587d036db1b64bf7c493b3d
0
static int nvdec_vc1_end_frame(AVCodecContext *avctx) { NVDECContext *ctx = avctx->internal->hwaccel_priv_data; int ret = ff_nvdec_end_frame(avctx); ctx->bitstream = NULL; return ret; }
12,350
FFmpeg
4bff9ef9d0781c4de228bf1f85634d2706fc589b
0
static inline void RENAME(yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, long width, long height, long lumStride, long chromStride, long srcStride) { long y; const long chromWidth= width>>1; for(y=0; y<height; y+=2) { #ifdef HAVE_MMX asm volatile( "xor %%"REG_a", %%"RE...
12,352
FFmpeg
32c3047cac9294bb56d23c89a40a22409db5cc70
0
static int qtrle_decode_init(AVCodecContext *avctx) { QtrleContext *s = avctx->priv_data; s->avctx = avctx; switch (avctx->bits_per_sample) { case 1: case 2: case 4: case 8: case 33: case 34: case 36: case 40: avctx->pix_fmt = PIX_FMT_PAL8; bre...
12,354
FFmpeg
5ad4335c2233d5a6d9487d2d56387b7484aecded
0
void vp8_mc_part(VP8Context *s, uint8_t *dst[3], AVFrame *ref_frame, int x_off, int y_off, int bx_off, int by_off, int block_w, int block_h, int width, int height, VP56mv *mv) { VP56mv uvmv = *mv; /* Y */ vp8_mc(s, 1, dst[0] + by_...
12,355
FFmpeg
bc78ceec2be6613c265387017221c7ceda15aa7d
0
static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length){ int x, y; const int width= f->avctx->width; const int height= f->avctx->height; uint16_t *src= (uint16_t*)f->last_picture.data[0]; uint16_t *dst= (uint16_t*)f->current_picture.data[0]; const int stride= f->current_...
12,356
FFmpeg
0d21a84605bad4e75dacb8196e5859902ed36f01
0
static inline int halfpel_motion_search(MpegEncContext * s, int *mx_ptr, int *my_ptr, int dmin, int xmin, int ymin, int xmax, int ymax, int pred_x, int pred_y, uint8_t *ref_picture) { UINT16 *mv_penalty= s->mv_penalty[s->f_code] + MAX_MV; // f_code of the prev fram...
12,358
FFmpeg
72dbc610be3272ba36603f78a39cc2d2d8fe0cc3
0
void ff_avg_h264_qpel16_mc02_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_vt_and_aver_dst_16x16_msa(src - (stride * 2), stride, dst, stride); }
12,359
FFmpeg
ae1dbde1cf6a9a96d802dc38b6741824857b24c5
0
static inline int check_input_motion(MpegEncContext * s, int mb_x, int mb_y, int p_type){ MotionEstContext * const c= &s->me; Picture *p= s->current_picture_ptr; int mb_xy= mb_x + mb_y*s->mb_stride; int xy= 2*mb_x + 2*mb_y*s->b8_stride; int mb_type= s->current_picture.mb_type[mb_xy]; int f...
12,360
FFmpeg
2ab65b652dc5e69fb738f1afdc55f7a2f9cbc0e0
0
void *checkasm_check_func(void *func, const char *name, ...) { char name_buf[256]; void *ref = func; CheckasmFuncVersion *v; int name_length; va_list arg; va_start(arg, name); name_length = vsnprintf(name_buf, sizeof(name_buf), name, arg); va_end(arg); if (!func || name...
12,361
FFmpeg
ef6ba1f2378ac1e40c3c1d606b4ace47ea119ac8
0
void ff_dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx) { int mm_flags = av_get_cpu_flags(); if (mm_flags & AV_CPU_FLAG_MMX) { #if HAVE_INLINE_ASM const int idct_algo = avctx->idct_algo; if (avctx->bits_per_raw_sample <= 8) { if (idct_algo == FF_IDCT_AUTO || idct_al...
12,363
qemu
dc523cd348c47372faa7271c9aab2030f94c290d
0
QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename) { char host[65], port[33], width[8], height[8]; int pos; const char *p; QemuOpts *opts; Error *local_err = NULL; opts = qemu_opts_create(qemu_find_opts("chardev"), label, 1, &local_err); if (local_err) { ...
12,366
qemu
afdf0abe779f4b11712eb306ab2d4299820457b8
0
static int check_refcounts_l1(BlockDriverState *bs, BdrvCheckResult *res, uint16_t *refcount_table, int refcount_table_size, int64_t l1_table_offset, int l1_size, in...
12,368
qemu
a7812ae412311d7d47f8aa85656faadac9d64b56
0
static always_inline void gen_qemu_lds (TCGv t0, TCGv t1, int flags) { TCGv tmp = tcg_temp_new(TCG_TYPE_I32); tcg_gen_qemu_ld32u(tmp, t1, flags); tcg_gen_helper_1_1(helper_memory_to_s, t0, tmp); tcg_temp_free(tmp); }
12,369
qemu
4be746345f13e99e468c60acbd3a355e8183e3ce
0
static void pmac_ide_flush(DBDMA_io *io) { MACIOIDEState *m = io->opaque; if (m->aiocb) { bdrv_drain_all(); } }
12,370
qemu
dfd100f242370886bb6732f70f1f7cbd8eb9fedc
0
static void socket_start_outgoing_migration(MigrationState *s, SocketAddress *saddr, Error **errp) { QIOChannelSocket *sioc = qio_channel_socket_new(); struct SocketConnectData *data = g_new0(struct SocketConnectData, 1...
12,371
qemu
bd269ebc82fbaa5fe7ce5bc7c1770ac8acecd884
0
void qio_dns_resolver_lookup_async(QIODNSResolver *resolver, SocketAddressLegacy *addr, QIOTaskFunc func, gpointer opaque, GDestroyNotify notify) { QIOTask *task; st...
12,372
FFmpeg
19b41f86457d945e98c236f67faf59d560861a4c
0
int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { AVFrame *frame = data; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; MJpegDecodeContext *s = avctx->priv_data; const uint8_t *buf_end, *buf_ptr; ...
12,374
qemu
c169998802505c244b8bcad562633f29de7d74a4
0
void hpet_init(qemu_irq *irq) { int i, iomemtype; HPETState *s; dprintf ("hpet_init\n"); s = qemu_mallocz(sizeof(HPETState)); hpet_statep = s; s->irqs = irq; for (i=0; i<HPET_NUM_TIMERS; i++) { HPETTimer *timer = &s->timer[i]; timer->qemu_timer = qemu_new_timer(v...
12,380
qemu
42ecabaae16c0054dde6d8b0fdf90a8c7cce270d
0
static void x86_cpu_initfn(Object *obj) { CPUState *cs = CPU(obj); X86CPU *cpu = X86_CPU(obj); X86CPUClass *xcc = X86_CPU_GET_CLASS(obj); CPUX86State *env = &cpu->env; FeatureWord w; cs->env_ptr = env; cpu_exec_init(cs, &error_abort); object_property_add(obj, "family", "int"...
12,381
qemu
37ad223c515da2fe9f1c679768cb5ccaa42e57e1
0
build_dsdt(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info) { Aml *scope, *dsdt; const MemMapEntry *memmap = guest_info->memmap; const int *irqmap = guest_info->irqmap; dsdt = init_aml_allocator(); /* Reserve space for header */ acpi_data_push(dsdt->buf, sizeof(AcpiTableHe...
12,382
FFmpeg
e981de81fea7b2c07ae178b917305184f6596430
0
static int lag_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; unsigned int buf_size = avpkt->size; LagarithContext *l = avctx->priv_data; ThreadFrame frame = { .f = data }; AVFrame *const p = da...
12,385
qemu
5706db1deb061ee9affdcea81e59c4c2cad7c41e
1
static int line_in_init (HWVoiceIn *hw, struct audsettings *as) { SpiceVoiceIn *in = container_of (hw, SpiceVoiceIn, hw); struct audsettings settings; #if SPICE_INTERFACE_RECORD_MAJOR > 2 || SPICE_INTERFACE_RECORD_MINOR >= 3 settings.freq = spice_server_get_best_record_rate(NULL); #else s...
12,387
qemu
83d768b5640946b7da55ce8335509df297e2c7cd
1
static void virtio_queue_guest_notifier_read(EventNotifier *n) { VirtQueue *vq = container_of(n, VirtQueue, guest_notifier); if (event_notifier_test_and_clear(n)) { virtio_irq(vq); } }
12,388
qemu
ad0ebb91cd8b5fdc4a583b03645677771f420a46
1
int spapr_tce_dma_zero(VIOsPAPRDevice *dev, uint64_t taddr, uint32_t size) { /* FIXME: allocating a temp buffer is nasty, but just stepping * through writing zeroes is awkward. This will do for now. */ uint8_t zeroes[size]; #ifdef DEBUG_TCE fprintf(stderr, "spapr_tce_dma_zero taddr=0x%llx size...
12,389
FFmpeg
544286b3d39365b30298ae07e66a755200b0895c
1
static void do_video_out(AVFormatContext *s, AVOutputStream *ost, AVInputStream *ist, AVPicture *picture1) { int n1, n2, nb, i, ret, frame_number; AVPicture *picture, *picture2, *pict; AVPicture picture_tmp1, picture_tmp2; ...
12,390
qemu
0184543814354d37eab75132712c3874d71dd776
1
static void test_visitor_in_fuzz(TestInputVisitorData *data, const void *unused) { int64_t ires; bool bres; double nres; char *sres; EnumOne eres; Error *errp = NULL; Visitor *v; unsigned int i; char buf[10000]; for (i = 0; i < 100; ...
12,391
qemu
decb471488dd9e7e7ab9957f120cb501c4489f63
1
static inline int _find_pte(CPUState *env, mmu_ctx_t *ctx, int is_64b, int h, int rw, int type, int target_page_bits) { target_phys_addr_t pteg_off; target_ulong pte0, pte1; int i, good = -1; int ret, r; ret = -1; /* No entry found */ pteg_off = get_pteg_off...
12,392
FFmpeg
e5540b3fd30367ce3cc33b2f34a04b660dbc4b38
0
static int decode_sequence_header(AVCodecContext *avctx, GetBitContext *gb) { VC9Context *v = avctx->priv_data; v->profile = get_bits(gb, 2); av_log(avctx, AV_LOG_DEBUG, "Profile: %i\n", v->profile); #if HAS_ADVANCED_PROFILE if (v->profile > PROFILE_MAIN) { v->level = get_bits(gb...
12,393
FFmpeg
7abf394814d818973db562102f21ab9d10540840
0
static int mov_probe(AVProbeData *p) { int64_t offset; uint32_t tag; int score = 0; /* check file header */ offset = 0; for (;;) { /* ignore invalid offset */ if ((offset + 8) > (unsigned int)p->buf_size) return score; tag = AV_RL32(p->buf + offse...
12,394
FFmpeg
4bff9ef9d0781c4de228bf1f85634d2706fc589b
0
static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, long src_size) { const uint8_t *s = src; const uint8_t *end; #ifdef HAVE_MMX const uint8_t *mm_end; #endif uint16_t *d = (uint16_t *)dst; end = s + src_size; #ifdef HAVE_MMX mm_end = end - 15; #if 1 //is faster only if multiplies ar...
12,398
FFmpeg
1dc42050185d63c1de5d16146fbaee92640af187
0
static int source_request_frame(AVFilterLink *outlink) { Frei0rContext *frei0r = outlink->src->priv; AVFilterBufferRef *picref = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h); int ret; picref->video->pixel_aspect = (AVRational) {1, 1}; picref->pts = frei0r->pts++; ...
12,400
qemu
630530a6529bc3da9ab8aead7053dc753cb9ac77
1
static int vmdk_is_allocated(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum) { BDRVVmdkState *s = bs->opaque; int index_in_cluster, n; uint64_t cluster_offset; cluster_offset = get_cluster_offset(bs, sector_num << 9, 0); index_in_cluster = ...
12,401
FFmpeg
e0e46cae377347cbe1cd27c0d85568921b12c2ad
1
void put_vp8_epel_h_altivec_core(uint8_t *dst, int dst_stride, uint8_t *src, int src_stride, int h, int mx, int w, int is6tap) { LOAD_H_SUBPEL_FILTER(mx-1); vec_u8 align_vec0, align_vec8, permh0, permh8, filt; vec_u8 perm_6tap0, perm_6t...
12,403
qemu
78dbbbe4dff95369c63bf77ee0df23371e1d6602
1
static int mpidr_read(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t *value) { CPUState *cs = CPU(arm_env_get_cpu(env)); uint32_t mpidr = cs->cpu_index; /* We don't support setting cluster ID ([8..11]) * so these bits always RAZ. */ if (arm_feature(env, ARM_FE...
12,404
qemu
8194f35a0c71a3bf169459bf715bea53b7bbc904
1
void cpu_loop (CPUSPARCState *env) { int trapnr, ret; target_siginfo_t info; while (1) { trapnr = cpu_sparc_exec (env); switch (trapnr) { #ifndef TARGET_SPARC64 case 0x88: case 0x90: #else case 0x110: case 0x16d: #endif ret = do_s...
12,405
FFmpeg
e3a1eb9edf65edda301f3a727f11e0224b9f5ae2
1
static av_cold int init(AVFilterContext *ctx, const char *args0) { PanContext *const pan = ctx->priv; char *arg, *arg0, *tokenizer, *args = av_strdup(args0); int out_ch_id, in_ch_id, len, named, ret; int nb_in_channels[2] = { 0, 0 }; // number of unnamed and named input channels double gain; ...
12,406
qemu
bc3e6a0d6c8ab6cd7cd4b576ed567756f1dcabd2
1
static void pvpanic_isa_realizefn(DeviceState *dev, Error **errp) { ISADevice *d = ISA_DEVICE(dev); PVPanicState *s = ISA_PVPANIC_DEVICE(dev); static bool port_configured; FWCfgState *fw_cfg; isa_register_ioport(d, &s->io, s->ioport); if (!port_configured) { fw_cfg = fw_cfg_f...
12,407
qemu
a67188743bc30a3ad1358b8cd0a2a3cb64c10ff9
1
static TRBCCode xhci_address_slot(XHCIState *xhci, unsigned int slotid, uint64_t pictx, bool bsr) { XHCISlot *slot; USBPort *uport; USBDevice *dev; dma_addr_t ictx, octx, dcbaap; uint64_t poctx; uint32_t ictl_ctx[2]; uint32_t slot_ctx[4]; uint32_t ep0_ct...
12,408
FFmpeg
92e483f8ed70d88d4f64337f65bae212502735d4
1
static int compare_ocl_device_desc(const void *a, const void *b) { return ((const OpenCLDeviceBenchmark*)a)->runtime - ((const OpenCLDeviceBenchmark*)b)->runtime; }
12,410
FFmpeg
f2fd167835b6f039a593e46ab3a84e1b9a453660
0
void ff_vc1dsp_init_mmx(VC1DSPContext *dsp) { int mm_flags = av_get_cpu_flags(); #if HAVE_INLINE_ASM if (mm_flags & AV_CPU_FLAG_MMX) { dsp->put_vc1_mspel_pixels_tab[ 0] = ff_put_vc1_mspel_mc00_mmx; dsp->put_vc1_mspel_pixels_tab[ 4] = put_vc1_mspel_mc01_mmx; dsp->put_vc1_mspel_pi...
12,411
FFmpeg
d6604b29ef544793479d7fb4e05ef6622bb3e534
0
static av_cold int ffv1_encode_close(AVCodecContext *avctx) { av_frame_free(&avctx->coded_frame); ffv1_close(avctx); return 0; }
12,413
FFmpeg
f20b67173ca6a05b8c3dee02dad3b7243b96292b
0
static inline void conv_to_float(float *arr, int32_t *cof, int num) { int i; for (i = 0; i < num; i++) arr[i] = (float)cof[i]/INT32_MAX; }
12,414
FFmpeg
46cbb4c2312c654c44a94054e870840913a80024
0
static int process_input(int file_index) { InputFile *ifile = input_files[file_index]; AVFormatContext *is; InputStream *ist; AVPacket pkt; int ret, i, j; int64_t duration; int64_t pkt_dts; is = ifile->ctx; ret = get_input_packet(ifile, &pkt); if (ret == AVERROR(E...
12,415
FFmpeg
662234a9a22f1cd0f0ac83b8bb1ffadedca90c0a
0
void ff_put_h264_qpel4_mc23_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_midv_qrt_4w_msa(src - (2 * stride) - 2, stride, dst, stride, 4, 1); }
12,416
FFmpeg
1dc42050185d63c1de5d16146fbaee92640af187
0
static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref) { AVFilterLink *outlink = inlink->dst->outputs[0]; AVFilterBufferRef *outpicref = NULL; int ret = 0; if (inpicref->perms & AV_PERM_PRESERVE) { outpicref = ff_get_video_buffer(outlink, AV_PERM_WRITE, ...
12,417
qemu
1e356fc14beaa3ece6c0e961bd479af58be3198b
1
host_memory_backend_memory_complete(UserCreatable *uc, Error **errp) { HostMemoryBackend *backend = MEMORY_BACKEND(uc); HostMemoryBackendClass *bc = MEMORY_BACKEND_GET_CLASS(uc); Error *local_err = NULL; void *ptr; uint64_t sz; if (bc->alloc) { bc->alloc(backend, &local_err); ...
12,420
FFmpeg
cccb45751e93142d71be78f6bb90bbfb50ee13be
1
static void fill_gv_table(int table[256 + 2*YUVRGB_TABLE_HEADROOM], const int elemsize, const int inc) { int i; int off = -(inc >> 9); for (i = 0; i < 256 + 2*YUVRGB_TABLE_HEADROOM; i++) { int64_t cb = av_clip(i-YUVRGB_TABLE_HEADROOM, 0, 255)*inc; table[i] = elemsize * (off + (cb ...
12,421
qemu
6ab3fc32ea640026726bc5f9f4db622d0954fb8a
1
static ssize_t write_console_data(SCLPEvent *event, const uint8_t *buf, size_t len) { SCLPConsole *scon = SCLP_CONSOLE(event); if (!scon->chr) { /* If there's no backend, we can just say we consumed all data. */ return len; } return qemu_ch...
12,422
qemu
078a458e077d6b0db262c4b05fee51d01de2d1d2
1
static int rewrite_footer(BlockDriverState* bs) { int ret; BDRVVPCState *s = bs->opaque; int64_t offset = s->free_data_block_offset; ret = bdrv_pwrite(bs->file, offset, s->footer_buf, HEADER_SIZE); if (ret < 0) return ret; return 0; }
12,423
qemu
8be487d8f184f2f721cabeac559fb7a6cba18c95
1
static uint32_t sdhci_read_dataport(SDHCIState *s, unsigned size) { uint32_t value = 0; int i; /* first check that a valid data exists in host controller input buffer */ if ((s->prnsts & SDHC_DATA_AVAILABLE) == 0) { ERRPRINT("Trying to read from empty buffer\n"); return 0; ...
12,424
qemu
5839e53bbc0fec56021d758aab7610df421ed8c8
1
static int archipelago_aio_segmented_rw(BDRVArchipelagoState *s, size_t count, off_t offset, ArchipelagoAIOCB *aio_cb, int op) { int i, ret, segments_...
12,425
qemu
94fb0909645de18481cc726ee0ec9b5afa861394
1
static int ram_load_dead(QEMUFile *f, void *opaque) { RamDecompressState s1, *s = &s1; uint8_t buf[10]; ram_addr_t i; if (ram_decompress_open(s, f) < 0) return -EINVAL; for(i = 0; i < last_ram_offset; i+= BDRV_HASH_BLOCK_SIZE) { if (ram_decompress_buf(s, buf, 1) < 0) { ...
12,427
qemu
c572f23a3e7180dbeab5e86583e43ea2afed6271
1
static void v9fs_attach(void *opaque) { V9fsPDU *pdu = opaque; V9fsState *s = pdu->s; int32_t fid, afid, n_uname; V9fsString uname, aname; V9fsFidState *fidp; size_t offset = 7; V9fsQID qid; ssize_t err; pdu_unmarshal(pdu, offset, "ddssd", &fid, &afid, &uname, &aname, &n_...
12,428
qemu
f897bf751fbd95e4015b95d202c706548586813a
1
static void virtio_blk_free_request(VirtIOBlockReq *req) { if (req) { g_slice_free(VirtQueueElement, req->elem); g_slice_free(VirtIOBlockReq, req); } }
12,430
FFmpeg
f07ca542e371ec137d7192ccecf61ea889c13510
1
static int vmd_decode(VmdVideoContext *s, AVFrame *frame) { int i; unsigned int *palette32; unsigned char r, g, b; GetByteContext gb; unsigned char meth; unsigned char *dp; /* pointer to current frame */ unsigned char *pp; /* pointer to previous frame */ unsigned char le...
12,431
FFmpeg
e87190f5d20d380608f792ceb14d0def1d80e24b
0
static void show_program(WriterContext *w, AVFormatContext *fmt_ctx, AVProgram *program) { int i; writer_print_section_header(w, SECTION_ID_PROGRAM); print_int("program_id", program->id); print_int("program_num", program->program_num); print_int("nb_streams", program->nb_stream_indexes); ...
12,432
FFmpeg
620f88a0b94a651c6cc912b1fb32d308762d59b5
0
static int vaapi_encode_h264_write_extra_header(AVCodecContext *avctx, VAAPIEncodePicture *pic, int index, int *type, char *data, size_t *data_len) { VAAPIEncodeContex...
12,433
qemu
f090c9d4ad5812fb92843d6470a1111c15190c4c
0
unsigned int DoubleCPDO(const unsigned int opcode) { FPA11 *fpa11 = GET_FPA11(); float64 rFm, rFn = 0; unsigned int Fd, Fm, Fn, nRc = 1; //printk("DoubleCPDO(0x%08x)\n",opcode); Fm = getFm(opcode); if (CONSTANT_FM(opcode)) { rFm = getDoubleConstant(Fm); } else { ...
12,435
qemu
a980f7f2c2f4d7e9a1eba4f804cd66dbd458b6d4
0
static void pci_nop(void) { qvirtio_scsi_start(NULL); qvirtio_scsi_stop(); }
12,436
qemu
1c275925bfbbc2de84a8f0e09d1dd70bbefb6da3
0
long do_sigreturn(CPUS390XState *env) { sigframe *frame; abi_ulong frame_addr = env->regs[15]; qemu_log("%s: frame_addr 0x%llx\n", __FUNCTION__, (unsigned long long)frame_addr); target_sigset_t target_set; sigset_t set; if (!lock_user_struct(VERIFY_READ, frame, frame_addr,...
12,437
qemu
81cf8d8adc64203567e03326c13ea4abec9fe5df
0
void helper_check_iow(CPUX86State *env, uint32_t t0) { check_io(env, t0, 2); }
12,438
FFmpeg
61138c43e08b7bb039fbcf50f1e71d6e735e04a5
0
AVStream *av_new_stream(AVFormatContext *s, int id) { AVStream *st; int i; #if LIBAVFORMAT_VERSION_MAJOR >= 53 AVStream **streams; if (s->nb_streams >= INT_MAX/sizeof(*streams)) return NULL; streams = av_realloc(s->streams, (s->nb_streams + 1) * sizeof(*streams)); if (!streams...
12,439
qemu
23dceda62a3643f734b7aa474fa6052593ae1a70
0
void tcg_prologue_init(TCGContext *s) { size_t prologue_size, total_size; void *buf0, *buf1; /* Put the prologue at the beginning of code_gen_buffer. */ buf0 = s->code_gen_buffer; s->code_ptr = buf0; s->code_buf = buf0; s->code_gen_prologue = buf0; /* Generate the prologue....
12,441
qemu
efab87cf79077a9624f675fc5fc8f034eaedfe4d
0
void qemu_clock_warp(QEMUClockType type) { int64_t clock; int64_t deadline; /* * There are too many global variables to make the "warp" behavior * applicable to other clocks. But a clock argument removes the * need for if statements all over the place. */ if (type != QEMU...
12,442
qemu
8297be80f7cf71e09617669a8bd8b2836dcfd4c3
0
static void report_unavailable_features(FeatureWord w, uint32_t mask) { FeatureWordInfo *f = &feature_word_info[w]; int i; for (i = 0; i < 32; ++i) { if ((1UL << i) & mask) { const char *reg = get_register_name_32(f->cpuid_reg); assert(reg); fprintf(stde...
12,443
qemu
3736cc5be31f0399999e37d8b28ca9a3ed0b4ccb
0
static int nbd_receive_option_reply(QIOChannel *ioc, uint32_t opt, nbd_opt_reply *reply, Error **errp) { QEMU_BUILD_BUG_ON(sizeof(*reply) != 20); if (nbd_read(ioc, reply, sizeof(*reply), errp) < 0) { error_prepend(errp, "failed to read option reply"); nb...
12,444
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
0
void omap_badwidth_write8(void *opaque, target_phys_addr_t addr, uint32_t value) { uint8_t val8 = value; OMAP_8B_REG(addr); cpu_physical_memory_write(addr, (void *) &val8, 1); }
12,445
qemu
49bd1458da8909434eb83c5cda472c63ff6a529c
0
static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon, const char *devaddr, const char *opts) { PCIDevice *dev; DriveInfo *dinfo = NULL; int type = -1; char buf[128]; if (get_param_value(buf, sizeof(buf...
12,447
qemu
7385aed20db5d83979f683b9d0048674411e963c
0
static inline void clear_float_exceptions(CPUSPARCState *env) { set_float_exception_flags(0, &env->fp_status); }
12,448
qemu
7385aed20db5d83979f683b9d0048674411e963c
0
void helper_ldxfsr(CPUSPARCState *env, uint64_t new_fsr) { env->fsr = (new_fsr & FSR_LDXFSR_MASK) | (env->fsr & FSR_LDXFSR_OLDMASK); set_fsr(env); }
12,449
FFmpeg
b9029997d4694b6533556480fe0ab1f3f9779a56
0
static void apply_motion_4x4(RoqContext *ri, int x, int y, unsigned char mv, signed char mean_x, signed char mean_y) { int i, hw, mx, my; unsigned char *pa, *pb; mx = x + 8 - (mv >> 4) - mean_x; my = y + 8 - (mv & 0xf) - mean_y; pa = ri->current_frame.data[0] + (y * ri->y_stride) + x;...
12,450
qemu
9005b2a7589540a3733b3abdcfbccfe7746cd1a1
0
static void pty_chr_update_read_handler(CharDriverState *chr) { PtyCharDriver *s = chr->opaque; GPollFD pfd; pfd.fd = g_io_channel_unix_get_fd(s->fd); pfd.events = G_IO_OUT; pfd.revents = 0; g_poll(&pfd, 1, 0); if (pfd.revents & G_IO_HUP) { pty_chr_state(chr, 0); } el...
12,453
qemu
adc5ec856c557f75adc60b310e5b1d38210a289c
1
static int protocol_client_vencrypt_auth(VncState *vs, uint8_t *data, size_t len) { int auth = read_u32(data, 0); if (auth != vs->vd->subauth) { VNC_DEBUG("Rejecting auth %d\n", auth); vnc_write_u8(vs, 0); /* Reject auth */ vnc_flush(vs); vnc_client_error(vs); } else { VNC_DEBUG("Accepting a...
12,454
qemu
d83c951cce14dd3c7600c386d3791c4993744622
1
static int ata_passthrough_16_xfer_size(SCSIDevice *dev, uint8_t *buf) { int extend = buf[1] & 0x1; int length = buf[2] & 0x3; int xfer; int unit = ata_passthrough_xfer_unit(dev, buf); switch (length) { case 0: case 3: /* USB-specific. */ xfer = 0; break; c...
12,455
FFmpeg
9be6f0d2f8393100a11c8527c7ba18c1dc2f1450
0
void dsputil_init(DSPContext* c, AVCodecContext *avctx) { int i; ff_check_alignment(); #if CONFIG_ENCODERS if(avctx->dct_algo==FF_DCT_FASTINT) { c->fdct = fdct_ifast; c->fdct248 = fdct_ifast248; } else if(avctx->dct_algo==FF_DCT_FAAN) { c->fdct = ff_faandct; ...
12,456
qemu
7fc3fcefe2fc5966c6aa1ef4f10e9740d8d73bf2
1
static void qio_channel_websock_handshake_send_res_ok(QIOChannelWebsock *ioc, const char *key, Error **errp) { char combined_key[QIO_CHANNEL_WEBSOCK_CLIENT_KEY_LEN + QIO_CHANNEL_WEB...
12,457
FFmpeg
8731c86d03d062ad19f098b77ab1f1bc4ad7c406
1
static int a64_write_trailer(struct AVFormatContext *s) { A64MuxerContext *c = s->priv_data; AVPacket pkt; /* need to flush last packet? */ if(c->interleaved) a64_write_packet(s, &pkt); return 0; }
12,458
qemu
274c3b52e10466a4771d591f6298ef61e8354ce0
1
void vnc_display_open(const char *id, Error **errp) { VncDisplay *vs = vnc_display_find(id); QemuOpts *opts = qemu_opts_find(&qemu_vnc_opts, id); QemuOpts *sopts, *wsopts; const char *share, *device_id; QemuConsole *con; bool password = false; bool reverse = false; const char *v...
12,459
FFmpeg
bf87908cd8da31e8f8fe75c06577170928ea70a8
1
static int rm_read_header(AVFormatContext *s) { RMDemuxContext *rm = s->priv_data; AVStream *st; AVIOContext *pb = s->pb; unsigned int tag; int tag_size; unsigned int start_time, duration; unsigned int data_off = 0, indx_off = 0; char buf[128], mime[128]; int flags = 0; ...
12,460
FFmpeg
b0c7f5a9d82feb7f4c4cdf77f1537193670ab58b
0
int av_write_frame(AVFormatContext *s, int stream_index, const uint8_t *buf, int size) { AVStream *st; int64_t pts_mask; int ret, frame_size; st = s->streams[stream_index]; pts_mask = (1LL << s->pts_wrap_bits) - 1; ret = s->oformat->write_packet(s, stream_index, buf...
12,461
FFmpeg
752e6dfa3ea97e7901870bdd9e5a51f860607240
0
static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt) { CCaptionSubContext *ctx = avctx->priv_data; AVSubtitle *sub = data; const int64_t start_time = sub->pts; uint8_t *bptr = NULL; int len = avpkt->size; int ret = 0; int i; if (ctx->pktbuf->size...
12,462
FFmpeg
04001767728fd4ed8b4f9d2ebbb9f9a8c9a7be0d
0
static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { switch (vf->priv->mode) { case 0: case 3: return ff_vf_next_config(vf,width,height*2,d_width,d_height*2,flags,outfmt); case 1: /* odd ...
12,463
FFmpeg
341404f753fdbcddebb9fbce51f2ef057cceb79c
0
static av_cold int vqa_decode_init(AVCodecContext *avctx) { VqaContext *s = avctx->priv_data; unsigned char *vqa_header; int i, j, codebook_index; s->avctx = avctx; avctx->pix_fmt = PIX_FMT_PAL8; /* make sure the extradata made it */ if (s->avctx->extradata_size != VQA_HEADER_SIZ...
12,464
qemu
bae8196d9f97916de6323e70e3e374362ee16ec4
0
static int coroutine_fn mirror_dirty_init(MirrorBlockJob *s) { int64_t sector_num, end; BlockDriverState *base = s->base; BlockDriverState *bs = blk_bs(s->common.blk); BlockDriverState *target_bs = blk_bs(s->target); int ret, n; end = s->bdev_length / BDRV_SECTOR_SIZE; if (base =...
12,465
qemu
acdc3f0c59d076099c63425158c4811aaee984b6
0
int xen_domain_build_pv(const char *kernel, const char *ramdisk, const char *cmdline) { uint32_t ssidref = 0; uint32_t flags = 0; xen_domain_handle_t uuid; unsigned int xenstore_port = 0, console_port = 0; unsigned long xenstore_mfn = 0, console_mfn = 0; int rc; ...
12,466
qemu
a426e122173f36f05ea2cb72dcff77b7408546ce
0
static int kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr, target_phys_addr_t end_addr) { KVMState *s = kvm_state; unsigned long size, allocated_size = 0; KVMDirtyLog d; KVMSlot *mem; int ret = 0; d.dirty_bitmap = NULL; while (start_addr < end_addr) { ...
12,467
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
0
static void gic_dist_writew(void *opaque, target_phys_addr_t offset, uint32_t value) { gic_dist_writeb(opaque, offset, value & 0xff); gic_dist_writeb(opaque, offset + 1, value >> 8); }
12,468
qemu
f090c9d4ad5812fb92843d6470a1111c15190c4c
0
static float64 roundAndPackFloat64( flag zSign, int16 zExp, bits64 zSig STATUS_PARAM) { int8 roundingMode; flag roundNearestEven; int16 roundIncrement, roundBits; flag isTiny; roundingMode = STATUS(float_rounding_mode); roundNearestEven = ( roundingMode == float_round_nearest_even ); ...
12,469
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
0
static void intel_hda_parse_bdl(IntelHDAState *d, IntelHDAStream *st) { target_phys_addr_t addr; uint8_t buf[16]; uint32_t i; addr = intel_hda_addr(st->bdlp_lbase, st->bdlp_ubase); st->bentries = st->lvi +1; g_free(st->bpl); st->bpl = g_malloc(sizeof(bpl) * st->bentries); for ...
12,471
qemu
06630554ccbdd25780aa03c3548aaff1eb56dffd
0
static void mptsas_fetch_request(MPTSASState *s) { PCIDevice *pci = (PCIDevice *) s; char req[MPTSAS_MAX_REQUEST_SIZE]; MPIRequestHeader *hdr = (MPIRequestHeader *)req; hwaddr addr; int size; if (s->state != MPI_IOC_STATE_OPERATIONAL) { mptsas_set_fault(s, MPI_IOCSTATUS_INVALID...
12,472
qemu
bc7c08a2c375acb7ae4d433054415588b176d34c
0
static void test_qemu_strtoull_full_max(void) { char *str = g_strdup_printf("%lld", ULLONG_MAX); uint64_t res = 999; int err; err = qemu_strtoull(str, NULL, 0, &res); g_assert_cmpint(err, ==, 0); g_assert_cmpint(res, ==, ULLONG_MAX); g_free(str); }
12,473
qemu
99b9cc0679585b2d495d7d31ce556549b6b2721c
0
static void mem_add(MemoryListener *listener, MemoryRegionSection *section) { AddressSpaceDispatch *d = container_of(listener, AddressSpaceDispatch, listener); MemoryRegionSection now = limit(*section), remain = limit(*section); if ((now.offset_within_address_space & ~TARGET_PAGE_MASK) || (no...
12,474