label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
1 | static const unsigned char *seq_decode_op1(SeqVideoContext *seq, const unsigned char *src, unsigned char *dst) { const unsigned char *color_table; int b, i, len, bits; GetBitContext gb; unsigned char block[8 * 8]; len = *src++; if (len & 0x80) { switch (len & 3) { case 1: src = seq_unpack_rle_block(src, block, sizeof(b... | 12,591 |
1 | static void qed_commit_l2_update(void *opaque, int ret) { QEDAIOCB *acb = opaque; BDRVQEDState *s = acb_to_s(acb); CachedL2Table *l2_table = acb->request.l2_table; qed_commit_l2_cache_entry(&s->l2_cache, l2_table); /* This is guaranteed to succeed because we just committed the entry to the * cache. */ acb->request.l2_t... | 12,592 |
1 | static void pci_qdev_unrealize(DeviceState *dev, Error **errp) { PCIDevice *pci_dev = PCI_DEVICE(dev); PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(pci_dev); pci_unregister_io_regions(pci_dev); pci_del_option_rom(pci_dev); if (pc->exit) { pc->exit(pci_dev); } do_pci_unregister_device(pci_dev); } | 12,593 |
1 | static int start_frame(AVFilterLink *link, AVFilterBufferRef *picref) { SliceContext *slice = link->dst->priv; if (slice->use_random_h) { slice->lcg_state = slice->lcg_state * 1664525 + 1013904223; slice->h = 8 + (uint64_t)slice->lcg_state * 25 / UINT32_MAX; } /* ensure that slices play nice with chroma subsampling, an... | 12,594 |
1 | static void virtio_balloon_save(QEMUFile *f, void *opaque) { VirtIOBalloon *s = opaque; virtio_save(&s->vdev, f); qemu_put_be32(f, s->num_pages); qemu_put_be32(f, s->actual); qemu_put_buffer(f, (uint8_t *)&s->stats_vq_elem, sizeof(VirtQueueElement)); qemu_put_buffer(f, (uint8_t *)&s->stats_vq_offset, sizeof(size_t)); q... | 12,595 |
1 | static int inject_error(BlockDriverState *bs, BlkdebugRule *rule) { BDRVBlkdebugState *s = bs->opaque; int error = rule->options.inject.error; bool immediately = rule->options.inject.immediately; if (rule->options.inject.once) { QSIMPLEQ_REMOVE(&s->active_rules, rule, BlkdebugRule, active_next); remove_rule(rule); } if... | 12,597 |
0 | static void output_segment_list(OutputStream *os, AVIOContext *out, DASHContext *c, int representation_id, int final) { int i, start_index = 0, start_number = 1; if (c->window_size) { start_index = FFMAX(os->nb_segments - c->window_size, 0); start_number = FFMAX(os->segment_index - c->window_size, 1); } if (c->use_temp... | 12,598 |
0 | static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; const uint8_t *buf_end = avpkt->data + avpkt->size; PTXContext * const s = avctx->priv_data; AVFrame *picture = data; AVFrame * const p = &s->picture; unsigned int offset, w, h, y, stride,... | 12,599 |
0 | static int alloc_sequence_buffers(DiracContext *s) { int sbwidth = DIVRNDUP(s->source.width, 4); int sbheight = DIVRNDUP(s->source.height, 4); int i, w, h, top_padding; /* todo: think more about this / use or set Plane here */ for (i = 0; i < 3; i++) { int max_xblen = MAX_BLOCKSIZE >> (i ? s->chroma_x_shift : 0); int m... | 12,600 |
0 | static av_cold int vpx_init(AVCodecContext *avctx, const struct vpx_codec_iface *iface) { VP8Context *ctx = avctx->priv_data; struct vpx_codec_enc_cfg enccfg = { 0 }; int res; av_log(avctx, AV_LOG_INFO, "%s\n", vpx_codec_version_str()); av_log(avctx, AV_LOG_VERBOSE, "%s\n", vpx_codec_build_config()); if ((res = vpx_cod... | 12,601 |
1 | static int virtio_pci_start_ioeventfd(VirtIOPCIProxy *proxy) { int n, r; if (!(proxy->flags & VIRTIO_PCI_FLAG_USE_IOEVENTFD) || proxy->ioeventfd_disabled || proxy->ioeventfd_started) { return 0; } for (n = 0; n < VIRTIO_PCI_QUEUE_MAX; n++) { if (!virtio_queue_get_num(proxy->vdev, n)) { continue; } r = virtio_pci_set_ho... | 12,602 |
1 | static void block_set_params(const MigrationParams *params, void *opaque) { block_mig_state.blk_enable = params->blk; block_mig_state.shared_base = params->shared; /* shared base means that blk_enable = 1 */ block_mig_state.blk_enable |= params->shared; } | 12,603 |
1 | static void show_packets(WriterContext *w, AVFormatContext *fmt_ctx) { AVPacket pkt; AVFrame frame; int i = 0; av_init_packet(&pkt); while (!av_read_frame(fmt_ctx, &pkt)) { if (do_show_packets) show_packet(w, fmt_ctx, &pkt, i++); if (do_show_frames && get_video_frame(fmt_ctx, &frame, &pkt)) { show_frame(w, &frame, fmt_... | 12,604 |
1 | static void bios_supports_mode(const char *pmutils_bin, const char *pmutils_arg, const char *sysfile_str, Error **err) { pid_t pid; ssize_t ret; char *pmutils_path; int status, pipefds[2]; if (pipe(pipefds) < 0) { error_set(err, QERR_UNDEFINED_ERROR); return; } pmutils_path = g_find_program_in_path(pmutils_bin); pid = ... | 12,605 |
1 | void tlb_reset_dirty_range(CPUTLBEntry *tlb_entry, uintptr_t start, uintptr_t length) { uintptr_t addr; if (tlb_is_dirty_ram(tlb_entry)) { addr = (tlb_entry->addr_write & TARGET_PAGE_MASK) + tlb_entry->addend; if ((addr - start) < length) { tlb_entry->addr_write |= TLB_NOTDIRTY; } } } | 12,606 |
1 | static const char *scsi_command_name(uint8_t cmd) { static const char *names[] = { [ TEST_UNIT_READY ] = "TEST_UNIT_READY", [ REQUEST_SENSE ] = "REQUEST_SENSE", [ FORMAT_UNIT ] = "FORMAT_UNIT", [ READ_BLOCK_LIMITS ] = "READ_BLOCK_LIMITS", [ REASSIGN_BLOCKS ] = "REASSIGN_BLOCKS", [ READ_6 ] = "READ_6", [ WRITE_6 ] = "WR... | 12,608 |
1 | X264_close(AVCodecContext *avctx) { X264Context *x4 = avctx->priv_data; if(x4->enc) x264_encoder_close(x4->enc); return 0; } | 12,609 |
0 | static void synthfilt_build_sb_samples (QDM2Context *q, GetBitContext *gb, int length, int sb_min, int sb_max) { int sb, j, k, n, ch, run, channels; int joined_stereo, zero_encoding, chs; int type34_first; float type34_div = 0; float type34_predictor; float samples[10], sign_bits[16]; if (length == 0) { // If no data u... | 12,610 |
0 | static void opt_target(const char *arg) { enum { PAL, NTSC, FILM, UNKNOWN } norm = UNKNOWN; static const char *const frame_rates[] = {"25", "30000/1001", "24000/1001"}; if(!strncmp(arg, "pal-", 4)) { norm = PAL; arg += 4; } else if(!strncmp(arg, "ntsc-", 5)) { norm = NTSC; arg += 5; } else if(!strncmp(arg, "film-", 5))... | 12,611 |
1 | static int decode_init(AVCodecContext *avctx) { LclContext * const c = (LclContext *)avctx->priv_data; int basesize = avctx->width * avctx->height; int zret; // Zlib return code c->avctx = avctx; avctx->has_b_frames = 0; c->pic.data[0] = NULL; #ifdef CONFIG_ZLIB // Needed if zlib unused or init aborted before inflateIn... | 12,612 |
1 | static void lsi_do_command(LSIState *s) { SCSIDevice *dev; uint8_t buf[16]; uint32_t id; int n; DPRINTF("Send command len=%d\n", s->dbc); if (s->dbc > 16) s->dbc = 16; pci_dma_read(PCI_DEVICE(s), s->dnad, buf, s->dbc); s->sfbr = buf[0]; s->command_complete = 0; id = (s->select_tag >> 8) & 0xf; dev = scsi_device_find(&s... | 12,613 |
1 | static void use_high_update_speed(WmallDecodeCtx *s, int ich) { int ilms, recent, icoef; s->update_speed[ich] = 16; for (ilms = s->cdlms_ttl[ich]; ilms >= 0; ilms--) { recent = s->cdlms[ich][ilms].recent; if (s->bV3RTM) { for (icoef = 0; icoef < s->cdlms[ich][ilms].order; icoef++) s->cdlms[ich][ilms].lms_updates[icoef ... | 12,615 |
1 | static void dump_json_image_check(ImageCheck *check, bool quiet) { Error *local_err = NULL; QString *str; QmpOutputVisitor *ov = qmp_output_visitor_new(); QObject *obj; visit_type_ImageCheck(qmp_output_get_visitor(ov), NULL, &check, &local_err); obj = qmp_output_get_qobject(ov); str = qobject_to_json_pretty(obj); asser... | 12,617 |
1 | static bool aux_bus_is_bridge(AUXBus *bus, DeviceState *dev) { return (dev == DEVICE(bus->bridge)); } | 12,618 |
0 | void ff_estimate_b_frame_motion(MpegEncContext * s, int mb_x, int mb_y) { MotionEstContext * const c= &s->me; const int penalty_factor= c->mb_penalty_factor; int fmin, bmin, dmin, fbmin, bimin, fimin; int type=0; const int xy = mb_y*s->mb_stride + mb_x; init_ref(c, s->new_picture.f->data, s->last_picture.f->data, s->ne... | 12,619 |
0 | static inline int mpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr) { int level, pred, code; uint16_t *dc_val; if (n < 4) code = get_vlc2(&s->gb, dc_lum.table, DC_VLC_BITS, 1); else code = get_vlc2(&s->gb, dc_chrom.table, DC_VLC_BITS, 1); if (code < 0 || code > 9 /* && s->nbit<9 */){ fprintf(stderr, "illegal dc ... | 12,620 |
0 | static void check_pred8x8(H264PredContext *h, uint8_t *buf0, uint8_t *buf1, int codec, int chroma_format, int bit_depth) { int pred_mode; for (pred_mode = 0; pred_mode < 11; pred_mode++) { if (check_pred_func(h->pred8x8[pred_mode], (chroma_format == 2) ? "8x16" : "8x8", pred8x8_modes[codec][pred_mode])) { randomize_buf... | 12,621 |
0 | int kvm_arch_remove_sw_breakpoint(CPUState *env, struct kvm_sw_breakpoint *bp) { uint8_t int3; if (cpu_memory_rw_debug(env, bp->pc, &int3, 1, 0) || int3 != 0xcc || cpu_memory_rw_debug(env, bp->pc, (uint8_t *)&bp->saved_insn, 1, 1)) return -EINVAL; return 0; } | 12,622 |
0 | static void rtas_nvram_fetch(sPAPREnvironment *spapr, uint32_t token, uint32_t nargs, target_ulong args, uint32_t nret, target_ulong rets) { sPAPRNVRAM *nvram = spapr->nvram; hwaddr offset, buffer, len; int alen; void *membuf; if ((nargs != 3) || (nret != 2)) { rtas_st(rets, 0, -3); return; } if (!nvram) { rtas_st(rets... | 12,623 |
0 | int socket_connect(SocketAddressLegacy *addr, NonBlockingConnectHandler *callback, void *opaque, Error **errp) { int fd; switch (addr->type) { case SOCKET_ADDRESS_LEGACY_KIND_INET: fd = inet_connect_saddr(addr->u.inet.data, callback, opaque, errp); break; case SOCKET_ADDRESS_LEGACY_KIND_UNIX: fd = unix_connect_saddr(ad... | 12,625 |
0 | static void validate_numa_cpus(void) { int i; unsigned long *seen_cpus = bitmap_new(max_cpus); for (i = 0; i < nb_numa_nodes; i++) { if (bitmap_intersects(seen_cpus, numa_info[i].node_cpu, max_cpus)) { bitmap_and(seen_cpus, seen_cpus, numa_info[i].node_cpu, max_cpus); error_report("CPU(s) present in multiple NUMA nodes... | 12,626 |
0 | void hmp_nbd_server_start(Monitor *mon, const QDict *qdict) { const char *uri = qdict_get_str(qdict, "uri"); bool writable = qdict_get_try_bool(qdict, "writable", false); bool all = qdict_get_try_bool(qdict, "all", false); Error *local_err = NULL; BlockInfoList *block_list, *info; SocketAddressLegacy *addr; if (writabl... | 12,627 |
0 | static void RENAME(yuv2bgr24_2)(SwsContext *c, const uint16_t *buf0, const uint16_t *buf1, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, const uint16_t *abuf1, uint8_t *dest, int dstW, int yalpha, int uvalpha, int y) { //Note 8280 == DSTW_OFFSET but t... | 12,629 |
0 | void cpu_dump_statistics (CPUState *env, FILE*f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...), int flags) { #if defined(DO_PPC_STATISTICS) opc_handler_t **t1, **t2, **t3, *handler; int op1, op2, op3; t1 = env->opcodes; for (op1 = 0; op1 < 64; op1++) { handler = t1[op1]; if (is_indirect_opcode(handler)) { t2 = ind_... | 12,630 |
0 | static Suite *qint_suite(void) { Suite *s; TCase *qint_public_tcase; s = suite_create("QInt test-suite"); qint_public_tcase = tcase_create("Public Interface"); suite_add_tcase(s, qint_public_tcase); tcase_add_test(qint_public_tcase, qint_from_int_test); tcase_add_test(qint_public_tcase, qint_destroy_test); tcase_add_te... | 12,631 |
0 | static void qmp_input_type_int64(Visitor *v, const char *name, int64_t *obj, Error **errp) { QmpInputVisitor *qiv = to_qiv(v); QObject *qobj = qmp_input_get_object(qiv, name, true, errp); QInt *qint; if (!qobj) { return; } qint = qobject_to_qint(qobj); if (!qint) { error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name ? n... | 12,632 |
0 | static gint ppc_cpu_compare_class_pvr_mask(gconstpointer a, gconstpointer b) { ObjectClass *oc = (ObjectClass *)a; uint32_t pvr = *(uint32_t *)b; PowerPCCPUClass *pcc = (PowerPCCPUClass *)a; gint ret; /* -cpu host does a PVR lookup during construction */ if (unlikely(strcmp(object_class_get_name(oc), TYPE_HOST_POWERPC_... | 12,633 |
0 | void cpu_resume_from_signal(CPUState *cpu, void *puc) { /* XXX: restore cpu registers saved in host registers */ cpu->exception_index = -1; siglongjmp(cpu->jmp_env, 1); } | 12,634 |
0 | void bdrv_replace_in_backing_chain(BlockDriverState *old, BlockDriverState *new) { assert(!bdrv_requests_pending(old)); assert(!bdrv_requests_pending(new)); bdrv_ref(old); change_parent_backing_link(old, new); bdrv_unref(old); } | 12,636 |
0 | unsigned long virtio_load_direct(ulong rec_list1, ulong rec_list2, ulong subchan_id, void *load_addr) { u8 status; int sec = rec_list1; int sec_num = ((rec_list2 >> 32) & 0xffff) + 1; int sec_len = rec_list2 >> 48; ulong addr = (ulong)load_addr; if (sec_len != SECTOR_SIZE) { return -1; } sclp_print("."); status = virti... | 12,637 |
0 | void xen_init_display(int domid) { struct XenDevice *xfb, *xin; struct XenFB *fb; struct XenInput *in; int i = 0; wait_more: i++; main_loop_wait(true); xfb = xen_be_find_xendev("vfb", domid, 0); xin = xen_be_find_xendev("vkbd", domid, 0); if (!xfb || !xin) { if (i < 256) { usleep(10000); goto wait_more; } xen_be_printf... | 12,638 |
0 | static int musicpal_lcd_init(SysBusDevice *dev) { musicpal_lcd_state *s = FROM_SYSBUS(musicpal_lcd_state, dev); s->brightness = 7; memory_region_init_io(&s->iomem, &musicpal_lcd_ops, s, "musicpal-lcd", MP_LCD_SIZE); sysbus_init_mmio(dev, &s->iomem); s->con = graphic_console_init(lcd_refresh, lcd_invalidate, NULL, NULL,... | 12,639 |
0 | static int mov_write_gmhd_tag(AVIOContext *pb) { avio_wb32(pb, 0x20); /* size */ ffio_wfourcc(pb, "gmhd"); avio_wb32(pb, 0x18); /* gmin size */ ffio_wfourcc(pb, "gmin");/* generic media info */ avio_wb32(pb, 0); /* version & flags */ avio_wb16(pb, 0x40); /* graphics mode = */ avio_wb16(pb, 0x8000); /* opColor (r?) */ a... | 12,640 |
0 | int float64_le( float64 a, float64 b STATUS_PARAM ) { flag aSign, bSign; if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) ) { float_raise( float_flag_invalid STATUS_VAR); return 0; } aSign = extractFloat64Sign( a ); bSign = ext... | 12,641 |
0 | static int usb_qdev_init(DeviceState *qdev, DeviceInfo *base) { USBDevice *dev = DO_UPCAST(USBDevice, qdev, qdev); USBDeviceInfo *info = DO_UPCAST(USBDeviceInfo, qdev, base); int rc; pstrcpy(dev->product_desc, sizeof(dev->product_desc), info->product_desc); dev->info = info; dev->auto_attach = 1; QLIST_INIT(&dev->strin... | 12,643 |
0 | static int64_t coroutine_fn bdrv_co_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum) { int64_t length; int64_t n; int64_t ret, ret2; length = bdrv_getlength(bs); if (length < 0) { return length; } if (sector_num >= (length >> BDRV_SECTOR_BITS)) { *pnum = 0; return 0; } n = bs->total... | 12,644 |
0 | void *qemu_try_blockalign(BlockDriverState *bs, size_t size) { size_t align = bdrv_opt_mem_align(bs); /* Ensure that NULL is never returned on success */ assert(align > 0); if (size == 0) { size = align; } return qemu_try_memalign(align, size); } | 12,646 |
0 | float32 helper_fxtos(CPUSPARCState *env, int64_t src) { float32 ret; clear_float_exceptions(env); ret = int64_to_float32(src, &env->fp_status); check_ieee_exceptions(env); return ret; } | 12,647 |
0 | VirtIOSCSIReq *virtio_scsi_pop_req_vring(VirtIOSCSI *s, VirtIOSCSIVring *vring) { VirtIOSCSIReq *req = virtio_scsi_init_req(s, NULL); int r; req->vring = vring; r = vring_pop((VirtIODevice *)s, &vring->vring, &req->elem); if (r < 0) { virtio_scsi_free_req(req); req = NULL; } return req; } | 12,649 |
0 | uint64_t helper_fctiwz (uint64_t arg) { CPU_DoubleU farg; farg.ll = arg; if (unlikely(float64_is_signaling_nan(farg.d))) { /* sNaN conversion */ farg.ll = fload_invalid_op_excp(POWERPC_EXCP_FP_VXSNAN | POWERPC_EXCP_FP_VXCVI); } else if (unlikely(float64_is_nan(farg.d) || float64_is_infinity(farg.d))) { /* qNan / infini... | 12,650 |
0 | void list_cpus(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...), const char *optarg) { /* XXX: implement xxx_cpu_list for targets that still miss it */ #if defined(cpu_list_id) cpu_list_id(f, cpu_fprintf, optarg); #elif defined(cpu_list) cpu_list(f, cpu_fprintf); /* deprecated */ #endif } | 12,652 |
0 | static void qmp_deserialize(void **native_out, void *datap, VisitorFunc visit, Error **errp) { QmpSerializeData *d = datap; QString *output_json; QObject *obj_orig, *obj; obj_orig = qmp_output_get_qobject(d->qov); output_json = qobject_to_json(obj_orig); obj = qobject_from_json(qstring_get_str(output_json)); QDECREF(ou... | 12,653 |
0 | static void scsi_read_complete(void * opaque, int ret) { SCSIGenericReq *r = (SCSIGenericReq *)opaque; SCSIDevice *s = r->req.dev; int len; r->req.aiocb = NULL; if (ret || r->req.io_canceled) { scsi_command_complete(r, ret); return; } len = r->io_header.dxfer_len - r->io_header.resid; DPRINTF("Data ready tag=0x%x len=%... | 12,654 |
0 | static void filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr) { MpegEncContext * const s = &h->s; const int mb_xy= mb_x + mb_y*s->mb_stride; int linesize, uvlinesize; int dir; /* FIXME Implement deblocking filter for field MB */ if( h->sps.mb_aff ) { return; } linesize = s... | 12,655 |
0 | int ff_qsv_encode(AVCodecContext *avctx, QSVEncContext *q, AVPacket *pkt, const AVFrame *frame, int *got_packet) { int ret; ret = encode_frame(avctx, q, frame); if (ret < 0) return ret; if (!av_fifo_space(q->async_fifo) || (!frame && av_fifo_size(q->async_fifo))) { AVPacket new_pkt; mfxBitstream *bs; mfxSyncPoint sync;... | 12,656 |
0 | static int test_vector_dmul_scalar(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, const double *v1, double scale) { LOCAL_ALIGNED(32, double, cdst, [LEN]); LOCAL_ALIGNED(32, double, odst, [LEN]); int ret; cdsp->vector_dmul_scalar(cdst, v1, scale, LEN); fdsp->vector_dmul_scalar(odst, v1, scale, LEN); if (ret = compar... | 12,657 |
0 | static int mpegps_read_pes_header(AVFormatContext *s, int64_t *ppos, int *pstart_code, int64_t *ppts, int64_t *pdts) { MpegDemuxContext *m = s->priv_data; int len, size, startcode, c, flags, header_len; int64_t pts, dts, last_pos; last_pos = -1; redo: /* next start code (should be immediately after) */ m->header_state ... | 12,658 |
0 | static void decode_sigpass(Jpeg2000T1Context *t1, int width, int height, int bpno, int bandno, int vert_causal_ctx_csty_symbol) { int mask = 3 << (bpno - 1), y0, x, y; for (y0 = 0; y0 < height; y0 += 4) for (x = 0; x < width; x++) for (y = y0; y < height && y < y0 + 4; y++) { int flags_mask = -1; if (vert_causal_ctx_cs... | 12,659 |
0 | static AVPacket *add_to_pktbuf(AVPacketList **packet_buffer, AVPacket *pkt, AVPacketList **plast_pktl) { AVPacketList *pktl = av_mallocz(sizeof(AVPacketList)); if (!pktl) return NULL; if (*packet_buffer) (*plast_pktl)->next = pktl; else *packet_buffer = pktl; /* Add the packet in the buffered packet list. */ *plast_pkt... | 12,660 |
0 | static av_always_inline void h264_filter_mb_fast_internal(const H264Context *h, H264SliceContext *sl, int mb_x, int mb_y, uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr, unsigned int linesize, unsigned int uvlinesize, int pixel_shift) { int chroma = !(CONFIG_GRAY && (h->flags & AV_CODEC_FLAG_GRAY)); int chroma444 = C... | 12,661 |
0 | static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb){ ASFContext *asf = s->priv_data; ASFStream *asfst; int rsize = 1; int num = avio_r8(pb); int i; int64_t ts0, ts1 av_unused; asf->packet_segments--; asf->packet_key_frame = num >> 7; asf->stream_index = asf->asfid2avid[num & 0x7f]; asfst = &asf->strea... | 12,662 |
0 | void HELPER(set_r13_banked)(CPUState *env, uint32_t mode, uint32_t val) { env->banked_r13[bank_number(mode)] = val; } | 12,665 |
0 | static int query_formats(AVFilterContext *ctx) { static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_GRAY8, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ440P, AV_PIX_FMT_YUVJ444P, AV... | 12,669 |
0 | static void monitor_call_handler(Monitor *mon, const mon_cmd_t *cmd, const QDict *params) { QObject *data = NULL; cmd->mhandler.cmd_new(mon, params, &data); if (data) cmd->user_print(mon, data); qobject_decref(data); } | 12,670 |
0 | static void m5206_mbar_update(m5206_mbar_state *s) { int irq; int vector; int level; irq = m5206_find_pending_irq(s); if (irq) { int tmp; tmp = s->icr[irq]; level = (tmp >> 2) & 7; if (tmp & 0x80) { /* Autovector. */ vector = 24 + level; } else { switch (irq) { case 8: /* SWT */ vector = s->swivr; break; case 12: /* UA... | 12,673 |
0 | aio_ctx_check(GSource *source) { AioContext *ctx = (AioContext *) source; QEMUBH *bh; atomic_and(&ctx->notify_me, ~1); aio_notify_accept(ctx); for (bh = ctx->first_bh; bh; bh = bh->next) { if (!bh->deleted && bh->scheduled) { return true; } } return aio_pending(ctx) || (timerlistgroup_deadline_ns(&ctx->tlg) == 0); } | 12,675 |
0 | static bool vmxnet3_peer_has_vnet_hdr(VMXNET3State *s) { NetClientState *nc = qemu_get_queue(s->nic); if (qemu_peer_has_vnet_hdr(nc)) { return true; } VMW_WRPRN("Peer has no virtio extension. Task offloads will be emulated."); return false; } | 12,676 |
0 | static int get_cluster_offset(BlockDriverState *bs, VmdkExtent *extent, VmdkMetaData *m_data, uint64_t offset, bool allocate, uint64_t *cluster_offset, uint64_t skip_start_bytes, uint64_t skip_end_bytes) { unsigned int l1_index, l2_offset, l2_index; int min_index, i, j; uint32_t min_count, *l2_table; bool zeroed = fals... | 12,677 |
0 | static void qxl_log_image(PCIQXLDevice *qxl, QXLPHYSICAL addr, int group_id) { QXLImage *image; QXLImageDescriptor *desc; image = qxl_phys2virt(qxl, addr, group_id); desc = &image->descriptor; fprintf(stderr, " (id %" PRIx64 " type %d flags %d width %d height %d", desc->id, desc->type, desc->flags, desc->width, desc->h... | 12,678 |
0 | static BOOTPClient *get_new_addr(struct in_addr *paddr) { BOOTPClient *bc; int i; for(i = 0; i < NB_ADDR; i++) { if (!bootp_clients[i].allocated) goto found; } return NULL; found: bc = &bootp_clients[i]; bc->allocated = 1; paddr->s_addr = htonl(ntohl(special_addr.s_addr) | (i + START_ADDR)); return bc; } | 12,679 |
0 | static uint64_t cchip_read(void *opaque, hwaddr addr, unsigned size) { CPUState *cpu = current_cpu; TyphoonState *s = opaque; uint64_t ret = 0; if (addr & 4) { return s->latch_tmp; } switch (addr) { case 0x0000: /* CSC: Cchip System Configuration Register. */ /* All sorts of data here; probably the only thing relevant ... | 12,681 |
0 | static int blk_init(struct XenDevice *xendev) { struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev); int index, qflags, have_barriers, info = 0; char *h; /* read xenstore entries */ if (blkdev->params == NULL) { blkdev->params = xenstore_read_be_str(&blkdev->xendev, "params"); h = strchr(blkdev->p... | 12,682 |
0 | static void register_subpage(AddressSpaceDispatch *d, MemoryRegionSection *section) { subpage_t *subpage; hwaddr base = section->offset_within_address_space & TARGET_PAGE_MASK; MemoryRegionSection *existing = phys_page_find(d->phys_map, base, next_map.nodes, next_map.sections); MemoryRegionSection subsection = { .offse... | 12,683 |
0 | static void smbios_encode_uuid(struct smbios_uuid *uuid, const uint8_t *buf) { memcpy(uuid, buf, 16); if (smbios_uuid_encoded) { uuid->time_low = bswap32(uuid->time_low); uuid->time_mid = bswap16(uuid->time_mid); uuid->time_hi_and_version = bswap16(uuid->time_hi_and_version); } } | 12,684 |
0 | static gboolean qemu_chr_be_generic_open_bh(gpointer opaque) { CharDriverState *s = opaque; qemu_chr_be_event(s, CHR_EVENT_OPENED); s->idle_tag = 0; return FALSE; } | 12,687 |
0 | static void smc91c111_receive(void *opaque, const uint8_t *buf, size_t size) { smc91c111_state *s = (smc91c111_state *)opaque; int status; int packetsize; uint32_t crc; int packetnum; uint8_t *p; if ((s->rcr & RCR_RXEN) == 0 || (s->rcr & RCR_SOFT_RST)) return; /* Short packets are padded with zeros. Receiving a packet ... | 12,688 |
0 | void acpi_add_table(GArray *table_offsets, GArray *table_data) { uint32_t offset = cpu_to_le32(table_data->len); g_array_append_val(table_offsets, offset); } | 12,689 |
0 | int cpu_is_bsp(CPUState *env) { return env->cpuid_apic_id == 0; } | 12,690 |
0 | static int mov_read_default(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) { int64_t total_size = 0; MOV_atom_t a; int i; int err = 0; a.offset = atom.offset; if (atom.size < 0) atom.size = INT64_MAX; while(((total_size + 8) < atom.size) && !url_feof(pb) && !err) { a.size = atom.size; a.type=0L; if(atom.size >= 8) ... | 12,691 |
0 | static int hyperv_handle_properties(CPUState *cs) { X86CPU *cpu = X86_CPU(cs); CPUX86State *env = &cpu->env; if (cpu->hyperv_relaxed_timing) { env->features[FEAT_HYPERV_EAX] |= HV_X64_MSR_HYPERCALL_AVAILABLE; } if (cpu->hyperv_vapic) { env->features[FEAT_HYPERV_EAX] |= HV_X64_MSR_HYPERCALL_AVAILABLE; env->features[FEAT... | 12,692 |
1 | static void network_to_compress(RDMACompress *comp) { comp->value = ntohl(comp->value); comp->block_idx = ntohl(comp->block_idx); comp->offset = ntohll(comp->offset); comp->length = ntohll(comp->length); } | 12,693 |
1 | void spapr_drc_attach(sPAPRDRConnector *drc, DeviceState *d, void *fdt, int fdt_start_offset, Error **errp) { trace_spapr_drc_attach(spapr_drc_index(drc)); if (drc->isolation_state != SPAPR_DR_ISOLATION_STATE_ISOLATED) { error_setg(errp, "an attached device is still awaiting release"); return; } if (spapr_drc_type(drc)... | 12,694 |
1 | int avfilter_graph_queue_command(AVFilterGraph *graph, const char *target, const char *command, const char *arg, int flags, double ts) { int i; if(!graph) return 0; for (i = 0; i < graph->nb_filters; i++) { AVFilterContext *filter = graph->filters[i]; if(filter && (!strcmp(target, "all") || !strcmp(target, filter->name... | 12,695 |
1 | static av_cold int hevc_decode_init(AVCodecContext *avctx) { HEVCContext *s = avctx->priv_data; int ret; avctx->internal->allocate_progress = 1; ret = hevc_init_context(avctx); if (ret < 0) return ret; s->enable_parallel_tiles = 0; s->sei.picture_timing.picture_struct = 0; s->eos = 1; atomic_init(&s->wpp_err, 0); if(av... | 12,696 |
1 | void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx) { const int idct_algo= avctx->idct_algo; ff_put_pixels_clamped = c->put_pixels_clamped; ff_add_pixels_clamped = c->add_pixels_clamped; if(idct_algo==FF_IDCT_ARM){ if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_ARM){ c->idct_put= j_rev_dct_ARM_put; c->idct... | 12,697 |
0 | static void test_qemu_strtoull_underflow(void) { const char *str = "-99999999999999999999999999999999999999999999"; char f = 'X'; const char *endptr = &f; uint64_t res = 999; int err; err = qemu_strtoull(str, &endptr, 0, &res); g_assert_cmpint(err, ==, -ERANGE); g_assert_cmpint(res, ==, -1); g_assert(endptr == str + st... | 12,698 |
0 | static int vtd_remap_irq_get(IntelIOMMUState *iommu, uint16_t index, VTDIrq *irq) { VTD_IRTE irte = {}; int ret = 0; ret = vtd_irte_get(iommu, index, &irte); if (ret) { return ret; } irq->trigger_mode = irte.trigger_mode; irq->vector = irte.vector; irq->delivery_mode = irte.delivery_mode; irq->dest = le32_to_cpu(irte.d... | 12,699 |
0 | static void nvdimm_build_ssdt(GSList *device_list, GArray *table_offsets, GArray *table_data, GArray *linker) { Aml *ssdt, *sb_scope, *dev; acpi_add_table(table_offsets, table_data); ssdt = init_aml_allocator(); acpi_data_push(ssdt->buf, sizeof(AcpiTableHeader)); sb_scope = aml_scope("\\_SB"); dev = aml_device("NVDR");... | 12,700 |
0 | static void nvdimm_build_structure_dcr(GArray *structures, DeviceState *dev) { NvdimmNfitControlRegion *nfit_dcr; int slot = object_property_get_int(OBJECT(dev), PC_DIMM_SLOT_PROP, NULL); uint32_t sn = nvdimm_slot_to_sn(slot); nfit_dcr = acpi_data_push(structures, sizeof(*nfit_dcr)); nfit_dcr->type = cpu_to_le16(4 /* N... | 12,703 |
0 | static void nam_writew (void *opaque, uint32_t addr, uint32_t val) { PCIAC97LinkState *d = opaque; AC97LinkState *s = &d->ac97; uint32_t index = addr - s->base[0]; s->cas = 0; switch (index) { case AC97_Reset: mixer_reset (s); break; case AC97_Powerdown_Ctrl_Stat: val &= ~0xf; val |= mixer_load (s, index) & 0xf; mixer_... | 12,705 |
0 | pvscsi_cleanup_msi(PVSCSIState *s) { PCIDevice *d = PCI_DEVICE(s); if (s->msi_used) { msi_uninit(d); } } | 12,706 |
0 | static void exponents_from_scale_factors(MPADecodeContext *s, GranuleDef *g, int16_t *exponents) { const uint8_t *bstab, *pretab; int len, i, j, k, l, v0, shift, gain, gains[3]; int16_t *exp_ptr; exp_ptr = exponents; gain = g->global_gain - 210; shift = g->scalefac_scale + 1; bstab = band_size_long[s->sample_rate_index... | 12,707 |
0 | static always_inline void check_cp1_3d(CPUState *env, DisasContext *ctx) { if (unlikely(!(env->fpu->fcr0 & (1 << FCR0_3D)))) generate_exception(ctx, EXCP_RI); } | 12,708 |
0 | static bool linked_bp_matches(ARMCPU *cpu, int lbn) { CPUARMState *env = &cpu->env; uint64_t bcr = env->cp15.dbgbcr[lbn]; int brps = extract32(cpu->dbgdidr, 24, 4); int ctx_cmps = extract32(cpu->dbgdidr, 20, 4); int bt; uint32_t contextidr; /* Links to unimplemented or non-context aware breakpoints are * CONSTRAINED UN... | 12,709 |
0 | static int vnc_display_disable_login(DisplayState *ds) { VncDisplay *vs = vnc_display; if (!vs) { return -1; } if (vs->password) { g_free(vs->password); } vs->password = NULL; if (vs->auth == VNC_AUTH_NONE) { vs->auth = VNC_AUTH_VNC; } return 0; } | 12,711 |
0 | int scsi_build_sense(uint8_t *in_buf, int in_len, uint8_t *buf, int len, bool fixed) { bool fixed_in; SCSISense sense; if (!fixed && len < 8) { return 0; } if (in_len == 0) { sense.key = NO_SENSE; sense.asc = 0; sense.ascq = 0; } else { fixed_in = (in_buf[0] & 2) == 0; if (fixed == fixed_in) { memcpy(buf, in_buf, MIN(l... | 12,712 |
0 | static int compare_sectors(const uint8_t *buf1, const uint8_t *buf2, int n, int *pnum) { bool res; int i; if (n <= 0) { *pnum = 0; return 0; } res = !!memcmp(buf1, buf2, 512); for(i = 1; i < n; i++) { buf1 += 512; buf2 += 512; if (!!memcmp(buf1, buf2, 512) != res) { break; } } *pnum = i; return res; } | 12,713 |
0 | static void coroutine_fn bdrv_get_block_status_above_co_entry(void *opaque) { BdrvCoGetBlockStatusData *data = opaque; data->ret = bdrv_co_get_block_status_above(data->bs, data->base, data->sector_num, data->nb_sectors, data->pnum); data->done = true; } | 12,714 |
0 | static inline int target_rt_restore_ucontext(CPUM68KState *env, struct target_ucontext *uc, int *pd0) { int temp; target_greg_t *gregs = uc->tuc_mcontext.gregs; __get_user(temp, &uc->tuc_mcontext.version); if (temp != TARGET_MCONTEXT_VERSION) goto badframe; /* restore passed registers */ __get_user(env->dregs[0], &greg... | 12,715 |
0 | void memory_region_init_ram_ptr(MemoryRegion *mr, const char *name, uint64_t size, void *ptr) { memory_region_init(mr, name, size); mr->ram = true; mr->terminates = true; mr->destructor = memory_region_destructor_ram_from_ptr; mr->ram_addr = qemu_ram_alloc_from_ptr(size, ptr, mr); mr->backend_registered = true; } | 12,716 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.