label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
0 | QInt *qint_from_int(int64_t value){ QInt *qi; qi = g_malloc(sizeof(*qi)); qi->value = value; QOBJECT_INIT(qi, &qint_type); return qi;} |
0 | int bdrv_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors){ Coroutine *co; DiscardCo rwco = { .bs = bs, .sector_num = sector_num, .nb_sectors = nb_sectors, .ret = NOT_DONE, }; if (qemu_in_coroutine()) { /* Fast-path if already in coroutine context */ bdrv_discard_co_entry(&rwco); } else { co = qemu_coro... |
0 | static int tusb6010_init(SysBusDevice *dev){ TUSBState *s = FROM_SYSBUS(TUSBState, dev); qemu_irq *musb_irqs; int i; s->otg_timer = qemu_new_timer_ns(vm_clock, tusb_otg_tick, s); s->pwr_timer = qemu_new_timer_ns(vm_clock, tusb_power_tick, s); memory_region_init_io(&s->iomem[1], &tusb_async_ops, s, "tusb-async", UINT32_... |
0 | void qpci_msix_disable(QPCIDevice *dev){ uint8_t addr; uint16_t val; g_assert(dev->msix_enabled); addr = qpci_find_capability(dev, PCI_CAP_ID_MSIX); g_assert_cmphex(addr, !=, 0); val = qpci_config_readw(dev, addr + PCI_MSIX_FLAGS); qpci_config_writew(dev, addr + PCI_MSIX_FLAGS, val & ~PCI_MSIX_FLAGS_ENABLE); qpci_iounm... |
0 | 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 *vnc; const char *has_to; char *h; bool has_... |
0 | static coroutine_fn int qcow2_co_pdiscard(BlockDriverState *bs, int64_t offset, int count){ int ret; BDRVQcow2State *s = bs->opaque; if (!QEMU_IS_ALIGNED(offset | count, s->cluster_size)) { assert(count < s->cluster_size); /* Ignore partial clusters, except for the special case of the * complete partial cluster at the ... |
0 | static int nbd_handle_list(NBDClient *client, uint32_t length){ int csock; NBDExport *exp; csock = client->sock; if (length) { if (drop_sync(csock, length) != length) { return -EIO; } return nbd_send_rep(csock, NBD_REP_ERR_INVALID, NBD_OPT_LIST); } /* For each export, send a NBD_REP_SERVER reply. */ QTAILQ_FOREACH(exp,... |
0 | static void acpi_build_update(void *build_opaque, uint32_t offset){ AcpiBuildState *build_state = build_opaque; AcpiBuildTables tables; /* No state to update or already patched? Nothing to do. */ if (!build_state || build_state->patched) { return; } build_state->patched = 1; acpi_build_tables_init(&tables); acpi_build(... |
0 | static void disas_cond_select(DisasContext *s, uint32_t insn){ unsigned int sf, else_inv, rm, cond, else_inc, rn, rd; TCGv_i64 tcg_rd, tcg_src; if (extract32(insn, 29, 1) || extract32(insn, 11, 1)) { /* S == 1 or op2<1> == 1 */ unallocated_encoding(s); return; } sf = extract32(insn, 31, 1); else_inv = extract32(insn, 3... |
0 | static FWCfgState *bochs_bios_init(AddressSpace *as, PCMachineState *pcms){ FWCfgState *fw_cfg; uint64_t *numa_fw_cfg; int i; const CPUArchIdList *cpus; MachineClass *mc = MACHINE_GET_CLASS(pcms); fw_cfg = fw_cfg_init_io_dma(FW_CFG_IO_BASE, FW_CFG_IO_BASE + 4, as); fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, pcms->boot_cpus... |
0 | static void init_timers(void){ init_get_clock(); rt_clock = qemu_new_clock(QEMU_TIMER_REALTIME); vm_clock = qemu_new_clock(QEMU_TIMER_VIRTUAL);} |
0 | void qemu_spice_destroy_primary_surface(SimpleSpiceDisplay *ssd, uint32_t id, qxl_async_io async){ if (async != QXL_SYNC) {#if SPICE_INTERFACE_QXL_MINOR >= 1 spice_qxl_destroy_primary_surface_async(&ssd->qxl, id, 0);#else abort();#endif } else { ssd->worker->destroy_primary_surface(ssd->worker, id); }} |
0 | int virtio_blk_handle_scsi_req(VirtIOBlock *blk, VirtQueueElement *elem){ int status = VIRTIO_BLK_S_OK; struct virtio_scsi_inhdr *scsi = NULL; VirtIODevice *vdev = VIRTIO_DEVICE(blk);#ifdef __linux__ int i; struct sg_io_hdr hdr;#endif /* * We require at least one output segment each for the virtio_blk_outhdr * and the ... |
0 | static void test_visitor_out_null(TestOutputVisitorData *data, const void *unused){ QObject *arg; QDict *qdict; QObject *nil; visit_start_struct(data->ov, NULL, NULL, 0, &error_abort); visit_type_null(data->ov, "a", &error_abort); visit_check_struct(data->ov, &error_abort); visit_end_struct(data->ov, NULL); arg = visit... |
0 | struct vhost_net *vhost_net_init(VhostNetOptions *options){ int r; bool backend_kernel = options->backend_type == VHOST_BACKEND_TYPE_KERNEL; struct vhost_net *net = g_malloc(sizeof *net); if (!options->net_backend) { fprintf(stderr, "vhost-net requires net backend to be setup\n"); goto fail; } if (backend_kernel) { r =... |
0 | static void lsi_do_dma(LSIState *s, int out){ uint32_t count; target_phys_addr_t addr; if (!s->current_dma_len) { /* Wait until data is available. */ DPRINTF("DMA no data available\n"); return; } count = s->dbc; if (count > s->current_dma_len) count = s->current_dma_len; addr = s->dnad; if (lsi_dma_40bit(s)) addr |= ((... |
0 | static inline uint64_t ucf64_dtoi(float64 d){ union { uint64_t i; float64 d; } v; v.d = d; return v.i;} |
0 | static ssize_t handle_aiocb_ioctl(RawPosixAIOData *aiocb){ int ret; ret = ioctl(aiocb->aio_fildes, aiocb->aio_ioctl_cmd, aiocb->aio_ioctl_buf); if (ret == -1) { return -errno; } /* * This looks weird, but the aio code only considers a request * successful if it has written the full number of bytes. * * Now we overload ... |
0 | static int dump_init(DumpState *s, int fd, bool has_format, DumpGuestMemoryFormat format, bool paging, bool has_filter, int64_t begin, int64_t length, Error **errp){ CPUState *cpu; int nr_cpus; Error *err = NULL; int ret; /* kdump-compressed is conflict with paging and filter */ if (has_format && format != DUMP_GUEST_M... |
1 | static void test_wait_event_notifier_noflush(void){ EventNotifierTestData data = { .n = 0 }; EventNotifierTestData dummy = { .n = 0, .active = 1 }; event_notifier_init(&data.e, false); aio_set_event_notifier(ctx, &data.e, event_ready_cb, NULL); g_assert(!aio_poll(ctx, false)); g_assert_cmpint(data.n, ==, 0); /* Until t... |
1 | static void celt_search_for_intensity(OpusPsyContext *s, CeltFrame *f){ int i, best_band = CELT_MAX_BANDS - 1; float dist, best_dist = FLT_MAX; /* TODO: fix, make some heuristic up here using the lambda value */ float end_band = 0; for (i = f->end_band; i >= end_band; i--) { f->intensity_stereo = i; bands_dist(s, f, &d... |
1 | unsigned int qemu_get_be32(QEMUFile *f){ unsigned int v; v = qemu_get_byte(f) << 24; v |= qemu_get_byte(f) << 16; v |= qemu_get_byte(f) << 8; v |= qemu_get_byte(f); return v;} |
1 | static int usage(int ret){ fprintf(stderr, "dump (up to maxpkts) AVPackets as they are demuxed by libavformat.\n"); fprintf(stderr, "each packet is dumped in its own file named like `basename file.ext`_$PKTNUM_$STREAMINDEX_$STAMP_$SIZE_$FLAGS.bin\n"); fprintf(stderr, "pktdumper file [maxpkts]\n"); return ret;} |
1 | static void ide_dma_cb(void *opaque, int ret){ IDEState *s = opaque; int n; int64_t sector_num; bool stay_active = false; if (ret == -ECANCELED) { return; } if (ret < 0) { int op = IDE_RETRY_DMA; if (s->dma_cmd == IDE_DMA_READ) op |= IDE_RETRY_READ; else if (s->dma_cmd == IDE_DMA_TRIM) op |= IDE_RETRY_TRIM; if (ide_han... |
1 | static av_noinline void emulated_edge_mc_sse(uint8_t *buf, ptrdiff_t buf_stride, const uint8_t *src, ptrdiff_t src_stride, int block_w, int block_h, int src_x, int src_y, int w, int h){ emulated_edge_mc(buf, buf_stride, src, src_stride, block_w, block_h, src_x, src_y, w, h, vfixtbl_sse, &ff_emu_edge_vvar_sse, hfixtbl_s... |
0 | static int yuv4_read_header(AVFormatContext *s){ char header[MAX_YUV4_HEADER + 10]; // Include headroom for // the longest option char *tokstart, *tokend, *header_end; int i; AVIOContext *pb = s->pb; int width = -1, height = -1, raten = 0, rated = 0, aspectn = 0, aspectd = 0; enum AVPixelFormat pix_fmt = AV_PIX_FMT_NON... |
0 | static int bmp_decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size){ BMPContext *s = avctx->priv_data; AVFrame *picture = data; AVFrame *p = &s->picture; unsigned int fsize, hsize; int width, height; unsigned int depth; BiCompression comp; unsigned int ihsize; int i, j, n, l... |
1 | static int spapr_fixup_cpu_smt_dt(void *fdt, int offset, PowerPCCPU *cpu, int smt_threads){ int i, ret = 0; uint32_t servers_prop[smt_threads]; uint32_t gservers_prop[smt_threads * 2]; int index = ppc_get_vcpu_dt_id(cpu); if (cpu->cpu_version) { ret = fdt_setprop(fdt, offset, "cpu-version", &cpu->cpu_version, sizeof(cp... |
1 | static int net_socket_mcast_create(struct sockaddr_in *mcastaddr){ struct ip_mreq imr; int fd; int val, ret; if (!IN_MULTICAST(ntohl(mcastaddr->sin_addr.s_addr))) {fprintf(stderr, "qemu: error: specified mcastaddr \"%s\" (0x%08x) does not contain a multicast address\n",inet_ntoa(mcastaddr->sin_addr), (int)ntohl(mcastad... |
1 | static void packet_id_queue_add(struct PacketIdQueue *q, uint64_t id){ USBRedirDevice *dev = q->dev; struct PacketIdQueueEntry *e; DPRINTF("adding packet id %"PRIu64" to %s queue\n", id, q->name); e = g_malloc0(sizeof(struct PacketIdQueueEntry)); e->id = id; QTAILQ_INSERT_TAIL(&q->head, e, next); q->size++;} |
1 | static void xtensa_cpu_class_init(ObjectClass *oc, void *data){ DeviceClass *dc = DEVICE_CLASS(oc); CPUClass *cc = CPU_CLASS(oc); XtensaCPUClass *xcc = XTENSA_CPU_CLASS(cc); xcc->parent_realize = dc->realize; dc->realize = xtensa_cpu_realizefn; xcc->parent_reset = cc->reset; cc->reset = xtensa_cpu_reset; cc->class_by_n... |
1 | static void fdt_add_gic_node(const VirtBoardInfo *vbi){ uint32_t gic_phandle; gic_phandle = qemu_fdt_alloc_phandle(vbi->fdt); qemu_fdt_setprop_cell(vbi->fdt, "/", "interrupt-parent", gic_phandle); qemu_fdt_add_subnode(vbi->fdt, "/intc"); /* 'cortex-a15-gic' means 'GIC v2' */ qemu_fdt_setprop_string(vbi->fdt, "/intc", "... |
0 | static inline void downmix_3f_to_mono(float *samples){ int i; for (i = 0; i < 256; i++) { samples[i] += (samples[i + 256] + samples[i + 512]); samples[i + 256] = samples[i + 512] = 0; }} |
1 | static int mov_read_stsd(MOVContext *c, AVIOContext *pb, MOVAtom atom){ AVStream *st; MOVStreamContext *sc; int ret, entries; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc->nb_streams - 1]; sc = st->priv_data; avio_r8(pb); /* version */ avio_rb24(pb); /* flags */ entries = avio_rb32(pb); if (entries <=... |
1 | static void i6300esb_restart_timer(I6300State *d, int stage){ int64_t timeout; if (!d->enabled) return; d->stage = stage; if (d->stage <= 1) timeout = d->timer1_preload; else timeout = d->timer2_preload; if (d->clock_scale == CLOCK_SCALE_1KHZ) timeout <<= 15; else timeout <<= 5; /* Get the timeout in units of ticks_per... |
1 | static void uhci_queue_fill(UHCIQueue *q, UHCI_TD *td){ uint32_t int_mask = 0; uint32_t plink = td->link; UHCI_TD ptd; int ret; while (is_valid(plink)) { uhci_read_td(q->uhci, &ptd, plink); if (!(ptd.ctrl & TD_CTRL_ACTIVE)) { break; } if (uhci_queue_token(&ptd) != q->token) { break; } trace_usb_uhci_td_queue(plink & ~0... |
1 | static int hls_write_trailer(struct AVFormatContext *s){ HLSContext *hls = s->priv_data; AVFormatContext *oc = hls->avf; av_write_trailer(oc); hls->size = avio_tell(hls->avf->pb) - hls->start_pos; avio_closep(&oc->pb); avformat_free_context(oc); av_free(hls->basename); hls_append_segment(hls, hls->duration, hls->start_... |
1 | static int virtqueue_num_heads(VirtQueue *vq, unsigned int idx){ uint16_t num_heads = vring_avail_idx(vq) - idx; /* Check it isn't doing very strange things with descriptor numbers. */ if (num_heads > vq->vring.num) { error_report("Guest moved used index from %u to %u", idx, vring_avail_idx(vq)); exit(1); return num_he... |
1 | static void xhci_port_write(void *ptr, hwaddr reg, uint64_t val, unsigned size){ XHCIPort *port = ptr; uint32_t portsc; trace_usb_xhci_port_write(port->portnr, reg, val); switch (reg) { case 0x00: /* PORTSC */ portsc = port->portsc; /* write-1-to-clear bits*/ portsc &= ~(val & (PORTSC_CSC|PORTSC_PEC|PORTSC_WRC|PORTSC_O... |
1 | static void nbd_restart_write(void *opaque){ BlockDriverState *bs = opaque; qemu_coroutine_enter(nbd_get_client_session(bs)->send_coroutine, NULL);} |
1 | static int rtp_write_header(AVFormatContext *s1){ RTPMuxContext *s = s1->priv_data; int max_packet_size, n; AVStream *st; if (s1->nb_streams != 1) return -1; st = s1->streams[0]; if (!is_supported(st->codec->codec_id)) { av_log(s1, AV_LOG_ERROR, "Unsupported codec %x\n", st->codec->codec_id); return -1; } if (s->payloa... |
1 | PPC_OP(mulhwu){ T0 = ((uint64_t)T0 * (uint64_t)T1) >> 32; RETURN();} |
1 | static int qsv_decode_init(AVCodecContext *avctx, QSVContext *q, AVPacket *avpkt){ mfxVideoParam param = { { 0 } }; mfxBitstream bs = { { { 0 } } }; int ret; enum AVPixelFormat pix_fmts[3] = { AV_PIX_FMT_QSV, AV_PIX_FMT_NV12, AV_PIX_FMT_NONE }; ret = ff_get_format(avctx, pix_fmts); if (ret < 0) return ret; avctx->pix_f... |
1 | static int compat_read(AVFilterContext *ctx, AVFilterBufferRef **pbuf, int nb_samples, int flags){ AVFilterBufferRef *buf; AVFrame *frame; int ret; if (!pbuf) return ff_poll_frame(ctx->inputs[0]); frame = av_frame_alloc(); if (!frame) return AVERROR(ENOMEM); if (!nb_samples) ret = av_buffersink_get_frame_flags(ctx, fra... |
1 | yuv2yuvX16_c_template(const int16_t *lumFilter, const int32_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int32_t **chrUSrc, const int32_t **chrVSrc, int chrFilterSize, const int32_t **alpSrc, uint16_t *dest[4], int dstW, int chrDstW, int big_endian, int output_bits){ //FIXME Optimize (just quickly wri... |
1 | void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr){ CPUState *cpu; PageDesc *p; uint32_t h; tb_page_addr_t phys_pc; assert_tb_locked(); atomic_set(&tb->cflags, tb->cflags | CF_INVALID); /* remove the TB from the hash list */ phys_pc = tb->page_addr[0] + (tb->pc & ~TARGET_PAGE_MASK); h = tb_hash_fun... |
1 | iscsi_synccache10_cb(struct iscsi_context *iscsi, int status, void *command_data, void *opaque){ IscsiAIOCB *acb = opaque; if (acb->canceled != 0) { qemu_aio_release(acb); scsi_free_scsi_task(acb->task); acb->task = NULL; return; } acb->status = 0; if (status < 0) { error_report("Failed to sync10 data on iSCSI lun. %s"... |
1 | static void spectral_to_sample(AACContext *ac){ int i, type; void (*imdct_and_window)(AACContext *ac, SingleChannelElement *sce); switch (ac->oc[1].m4ac.object_type) { case AOT_ER_AAC_LD: imdct_and_window = imdct_and_windowing_ld; break; case AOT_ER_AAC_ELD: imdct_and_window = imdct_and_windowing_eld; break; default: i... |
1 | void qmp_guest_set_user_password(const char *username, const char *password, bool crypted, Error **errp){ NET_API_STATUS nas; char *rawpasswddata = NULL; size_t rawpasswdlen; wchar_t *user, *wpass; USER_INFO_1003 pi1003 = { 0, }; if (crypted) { error_setg(errp, QERR_UNSUPPORTED); return; } rawpasswddata = (char *)qbase... |
1 | static inline void RENAME(hyscale_fast)(SwsContext *c, int16_t *dst, long dstWidth, const uint8_t *src, int srcW, int xInc){ int32_t *filterPos = c->hLumFilterPos; int16_t *filter = c->hLumFilter; int canMMX2BeUsed = c->canMMX2BeUsed; void *mmx2FilterCode= c->lumMmx2FilterCode; int i;#if defined(PIC) DECLARE_ALIGNED(8,... |
1 | static uint64_t imx_serial_read(void *opaque, hwaddr offset, unsigned size){ IMXSerialState *s = (IMXSerialState *)opaque; uint32_t c; DPRINTF("read(offset=%x)\n", offset >> 2); switch (offset >> 2) { case 0x0: /* URXD */ c = s->readbuff; if (!(s->uts1 & UTS1_RXEMPTY)) { /* Character is valid */ c |= URXD_CHARRDY; s->u... |
0 | static int display_end_segment(AVCodecContext *avctx, void *data, const uint8_t *buf, int buf_size){ AVSubtitle *sub = data; PGSSubContext *ctx = avctx->priv_data; /* * The end display time is a timeout value and is only reached * if the next subtitle is later then timeout or subtitle has * not been cleared by a subseq... |
0 | static int mov_write_tkhd_tag(AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track, AVStream *st){ int64_t duration = av_rescale_rnd(track->track_duration, MOV_TIMESCALE, track->timescale, AV_ROUND_UP); int version = duration < INT32_MAX ? 0 : 1; int flags = MOV_TKHD_FLAG_IN_MOVIE; int rotation = 0; int group = 0; uint... |
0 | static int decode_type1(GetByteContext *gb, PutByteContext *pb){ unsigned opcode, len; int high = 0; int i, pos; while (bytestream2_get_bytes_left(gb) > 0) { GetByteContext gbc; while (bytestream2_get_bytes_left(gb) > 0) { while (bytestream2_get_bytes_left(gb) > 0) { opcode = bytestream2_get_byte(gb); high = opcode >= ... |
0 | void ff_avg_h264_qpel8_mc33_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride){ avc_luma_hv_qrt_and_aver_dst_8x8_msa(src + stride - 2, src - (stride * 2) + sizeof(uint8_t), stride, dst, stride);} |
0 | static int check_recording_time(OutputStream *ost){ OutputFile *of = output_files[ost->file_index]; if (of->recording_time != INT64_MAX && av_compare_ts(ost->sync_opts - ost->first_pts, ost->st->codec->time_base, of->recording_time, AV_TIME_BASE_Q) >= 0) { ost->is_past_recording_time = 1; return 0; } return 1;} |
1 | static void chs_filter_band_data(DCAXllDecoder *s, DCAXllChSet *c, int band){ DCAXllBand *b = &c->bands[band]; int nsamples = s->nframesamples; int i, j, k; // Inverse adaptive or fixed prediction for (i = 0; i < c->nchannels; i++) { int32_t *buf = b->msb_sample_buffer[i]; int order = b->adapt_pred_order[i]; if (order ... |
1 | void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst, const int dst_pitch, const int num_bands){ int x, y, indx; int32_t p0, p1, p2, p3, tmp0, tmp1, tmp2; int32_t b0_1, b0_2, b1_1, b1_2, b1_3, b2_1, b2_2, b2_3, b2_4, b2_5, b2_6; int32_t b3_1, b3_2, b3_3, b3_4, b3_5, b3_6, b3_7, b3_8, b3_9; int32_t pitch, bac... |
1 | static void megasas_mmio_write(void *opaque, hwaddr addr, uint64_t val, unsigned size){ MegasasState *s = opaque; PCIDevice *pci_dev = PCI_DEVICE(s); uint64_t frame_addr; uint32_t frame_count; int i; switch (addr) { case MFI_IDB: trace_megasas_mmio_writel("MFI_IDB", val); if (val & MFI_FWINIT_ABORT) { /* Abort all pend... |
1 | static void decode_mode(AVCodecContext *ctx){ static const uint8_t left_ctx[N_BS_SIZES] = { 0x0, 0x8, 0x0, 0x8, 0xc, 0x8, 0xc, 0xe, 0xc, 0xe, 0xf, 0xe, 0xf }; static const uint8_t above_ctx[N_BS_SIZES] = { 0x0, 0x0, 0x8, 0x8, 0x8, 0xc, 0xc, 0xc, 0xe, 0xe, 0xe, 0xf, 0xf }; static const uint8_t max_tx_for_bl_bp[N_BS_SIZE... |
1 | int do_subchannel_work_virtual(SubchDev *sch){ SCSW *s = &sch->curr_status.scsw; if (s->ctrl & SCSW_FCTL_CLEAR_FUNC) { sch_handle_clear_func(sch); } else if (s->ctrl & SCSW_FCTL_HALT_FUNC) { sch_handle_halt_func(sch); } else if (s->ctrl & SCSW_FCTL_START_FUNC) { /* Triggered by both ssch and rsch. */ sch_handle_start_f... |
1 | static int seg_write_header(AVFormatContext *s){ SegmentContext *seg = s->priv_data; AVFormatContext *oc = NULL; int ret, i; seg->segment_count = 0; if (!seg->write_header_trailer) seg->individual_header_trailer = 0; if (seg->time_str && seg->times_str) { av_log(s, AV_LOG_ERROR, "segment_time and segment_times options ... |
1 | void av_parser_close(AVCodecParserContext *s){ if(s){ if (s->parser->parser_close) { ff_lock_avcodec(NULL); s->parser->parser_close(s); ff_unlock_avcodec(); } av_free(s->priv_data); av_free(s); }} |
1 | static uint64_t openpic_msi_read(void *opaque, hwaddr addr, unsigned size){ OpenPICState *opp = opaque; uint64_t r = 0; int i, srs; DPRINTF("%s: addr " TARGET_FMT_plx "\n", __func__, addr); if (addr & 0xF) { return -1; } srs = addr >> 4; switch (addr) { case 0x00: case 0x10: case 0x20: case 0x30: case 0x40: case 0x50: ... |
1 | static inline int wv_unpack_stereo(WavpackFrameContext *s, GetBitContext *gb, void *dst, const int type){ int i, j, count = 0; int last, t; int A, B, L, L2, R, R2; int pos = s->pos; uint32_t crc = s->sc.crc; uint32_t crc_extra_bits = s->extra_sc.crc; int16_t *dst16 = dst; int32_t *dst32 = dst; float *dstfl = dst; const... |
1 | static int get_mmu_address(CPUState * env, target_ulong * physical, int *prot, target_ulong address, int rw, int access_type){ int use_asid, is_code, n; tlb_t *matching = NULL; use_asid = (env->mmucr & MMUCR_SV) == 0 && (env->sr & SR_MD) == 0; is_code = env->pc == address;/* Hack */ /* Use a hack to find if this is an ... |
0 | static inline void mix_2f_1r_to_mono(AC3DecodeContext *ctx){ int i; float (*output)[256] = ctx->audio_block.block_output; for (i = 0; i < 256; i++) output[1][i] += (output[2][i] + output[3][i]); memset(output[2], 0, sizeof(output[2])); memset(output[3], 0, sizeof(output[3]));} |
0 | void mjpeg_picture_header(MpegEncContext *s){ put_marker(&s->pb, SOI); jpeg_table_header(s); put_marker(&s->pb, SOF0); put_bits(&s->pb, 16, 17); put_bits(&s->pb, 8, 8); /* 8 bits/component */ put_bits(&s->pb, 16, s->height); put_bits(&s->pb, 16, s->width); put_bits(&s->pb, 8, 3); /* 3 components */ /* Y component */ pu... |
1 | void qmp_xen_save_devices_state(const char *filename, Error **errp){ QEMUFile *f; QIOChannelFile *ioc; int saved_vm_running; int ret; saved_vm_running = runstate_is_running(); vm_stop(RUN_STATE_SAVE_VM); global_state_store_running(); ioc = qio_channel_file_new_path(filename, O_WRONLY | O_CREAT, 0660, errp); if (!ioc) {... |
1 | static int get_physical_address(CPUState *env, target_phys_addr_t *physical, int *prot, int *access_index, target_ulong address, int rw, int mmu_idx){ int access_perms = 0; target_phys_addr_t pde_ptr; uint32_t pde; int error_code = 0, is_dirty, is_user; unsigned long page_offset; is_user = mmu_idx == MMU_USER_IDX; if (... |
1 | static void pci_bridge_region_cleanup(PCIBridge *br){ PCIBus *parent = br->dev.bus; pci_bridge_cleanup_alias(&br->alias_io, parent->address_space_io); pci_bridge_cleanup_alias(&br->alias_mem, parent->address_space_mem); pci_bridge_cleanup_alias(&br->alias_pref_mem, parent->address_space_mem);} |
1 | static void ide_atapi_cmd_read_dma_cb(void *opaque, int ret){ IDEState *s = opaque; int data_offset, n; if (ret < 0) { ide_atapi_io_error(s, ret); goto eot; } if (s->io_buffer_size > 0) { /* * For a cdrom read sector command (s->lba != -1), * adjust the lba for the next s->io_buffer_size chunk * and dma the current chu... |
1 | static int vfio_ccw_handle_request(ORB *orb, SCSW *scsw, void *data){ S390CCWDevice *cdev = data; VFIOCCWDevice *vcdev = DO_UPCAST(VFIOCCWDevice, cdev, cdev); struct ccw_io_region *region = vcdev->io_region; int ret; QEMU_BUILD_BUG_ON(sizeof(region->orb_area) != sizeof(ORB)); QEMU_BUILD_BUG_ON(sizeof(region->scsw_area)... |
1 | static void sdl_audio_callback(void *opaque, Uint8 *stream, int len){ VideoState *is = opaque; int audio_size, len1, silence = 0; audio_callback_time = av_gettime_relative(); while (len > 0) { if (is->audio_buf_index >= is->audio_buf_size) { audio_size = audio_decode_frame(is); if (audio_size < 0) { /* if error, just o... |
1 | static int wmavoice_decode_packet(AVCodecContext *ctx, void *data, int *got_frame_ptr, AVPacket *avpkt){ WMAVoiceContext *s = ctx->priv_data; GetBitContext *gb = &s->gb; int size, res, pos; /* Packets are sometimes a multiple of ctx->block_align, with a packet * header at each ctx->block_align bytes. However, FFmpeg's ... |
1 | static void ppc_core99_init (ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model){ CPUState *env = NULL; char *filename; qemu_irq *pic, **openpic_irqs; int unin_memory; int linux_boot, i; ram_addr_t ram_offset, bios_of... |
1 | void cpu_physical_memory_unmap(void *buffer, target_phys_addr_t len, int is_write, target_phys_addr_t access_len){ if (buffer != bounce.buffer) { if (is_write) { unsigned long addr1 = (uint8_t *)buffer - phys_ram_base; while (access_len) { unsigned l; l = TARGET_PAGE_SIZE; if (l > access_len) l = access_len; if (!cpu_p... |
1 | static int mov_read_glbl(MOVContext *c, AVIOContext *pb, MOVAtom atom){ AVStream *st; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc->nb_streams-1]; if ((uint64_t)atom.size > (1<<30)) return AVERROR_INVALIDDATA; if (atom.size >= 10) { // Broken files created by legacy versions of libavformat will // wra... |
1 | void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx){ mm_flags = mm_support(); if (avctx->dsp_mask) { if (avctx->dsp_mask & FF_MM_FORCE) mm_flags |= (avctx->dsp_mask & 0xffff); else mm_flags &= ~(avctx->dsp_mask & 0xffff); }#if 0 av_log(avctx, AV_LOG_INFO, "libavcodec: CPU flags:"); if (mm_flags & MM_MMX) av_log... |
1 | static int nppscale_resize(AVFilterContext *ctx, NPPScaleStageContext *stage, AVFrame *out, AVFrame *in){ NPPScaleContext *s = ctx->priv; NppStatus err; int i; for (i = 0; i < FF_ARRAY_ELEMS(in->data) && in->data[i]; i++) { int iw = stage->planes_in[i].width; int ih = stage->planes_in[i].height; int ow = stage->planes_... |
1 | static int init_report(const char *env){ const char *filename_template = "%p-%t.log"; char *key, *val; int ret, count = 0; time_t now; struct tm *tm; AVBPrint filename; if (report_file) /* already opened */ return 0; time(&now); tm = localtime(&now); while (env && *env) { if ((ret = av_opt_get_key_value(&env, "=", ":",... |
1 | void apic_deliver_pic_intr(DeviceState *dev, int level){ APICCommonState *s = APIC_COMMON(dev); if (level) { apic_local_deliver(s, APIC_LVT_LINT0); } else { uint32_t lvt = s->lvt[APIC_LVT_LINT0]; switch ((lvt >> 8) & 7) { case APIC_DM_FIXED: if (!(lvt & APIC_LVT_LEVEL_TRIGGER)) break; apic_reset_bit(s->irr, lvt & 0xff)... |
1 | void rgb15tobgr16(const uint8_t *src, uint8_t *dst, unsigned int src_size){unsigned i;unsigned num_pixels = src_size >> 1;for(i=0; i<num_pixels; i++){ unsigned b,g,r; register uint16_t rgb; rgb = src[2*i]; r = rgb&0x1F; g = (rgb&0x3E0)>>5; b = (rgb&0x7C00)>>10; dst[2*i] = (b&0x1F) | ((g&0x3F)<<5) | ((r&0x1F)<<11);}} |
1 | static void vnc_connect(VncDisplay *vd, int csock, int skipauth){ VncState *vs = g_malloc0(sizeof(VncState)); int i; vs->csock = csock; if (skipauth) {vs->auth = VNC_AUTH_NONE;#ifdef CONFIG_VNC_TLSvs->subauth = VNC_AUTH_INVALID;#endif } else {vs->auth = vd->auth;#ifdef CONFIG_VNC_TLSvs->subauth = vd->subauth;#endif } v... |
1 | void pcnet_h_reset(void *opaque){ PCNetState *s = opaque; int i; uint16_t checksum; /* Initialize the PROM */ memcpy(s->prom, s->conf.macaddr.a, 6); s->prom[12] = s->prom[13] = 0x00; s->prom[14] = s->prom[15] = 0x57; for (i = 0,checksum = 0; i < 16; i++) checksum += s->prom[i]; *(uint16_t *)&s->prom[12] = cpu_to_le16(c... |
0 | void avformat_close_input(AVFormatContext **ps){ AVFormatContext *s = *ps; AVIOContext *pb = (s->iformat->flags & AVFMT_NOFILE) || (s->flags & AVFMT_FLAG_CUSTOM_IO) ? NULL : s->pb; flush_packet_queue(s); if (s->iformat->read_close) s->iformat->read_close(s); avformat_free_context(s); *ps = NULL; if (pb) avio_close(pb);... |
1 | static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size){ H264Context *h = avctx->priv_data; MpegEncContext *s = &h->s; AVFrame *pict = data; int buf_index; s->flags= avctx->flags; s->flags2= avctx->flags2; /* no supplementary picture */ if (buf_size == 0) { return 0; } if(... |
1 | int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, AVInputFormat *fmt, int buf_size, AVFormatParameters *ap){ int err, probe_size; AVProbeData probe_data, *pd = &probe_data; ByteIOContext *pb = NULL; pd->filename = ""; if (filename) pd->filename = filename; pd->buf = NULL; pd->buf_size = 0; if (!fmt... |
1 | static void digic_load_rom(DigicBoardState *s, hwaddr addr, hwaddr max_size, const char *def_filename){ target_long rom_size; const char *filename; if (qtest_enabled()) { /* qtest runs no code so don't attempt a ROM load which * could fail and result in a spurious test failure. */ return; } if (bios_name) { filename = ... |
0 | static int hevc_parse_slice_header(AVCodecParserContext *s, H2645NAL *nal, AVCodecContext *avctx){ HEVCParserContext *ctx = s->priv_data; GetBitContext *gb = &nal->gb; HEVCPPS *pps; HEVCSPS *sps; unsigned int pps_id; get_bits1(gb); // first slice in pic if (IS_IRAP_NAL(nal)) get_bits1(gb); // no output of prior pics pp... |
1 | void helper_store_msr(CPUPPCState *env, target_ulong val){ uint32_t excp = hreg_store_msr(env, val, 0); if (excp != 0) { CPUState *cs = CPU(ppc_env_get_cpu(env)); cs->interrupt_request |= CPU_INTERRUPT_EXITTB; raise_exception(env, excp); }} |
1 | static int do_qsv_decode(AVCodecContext *avctx, QSVContext *q, AVFrame *frame, int *got_frame, AVPacket *avpkt){ QSVFrame *out_frame; mfxFrameSurface1 *insurf; mfxFrameSurface1 *outsurf; mfxSyncPoint *sync; mfxBitstream bs = { { { 0 } } }; int ret; int n_out_frames; int buffered = 0; int flush = !avpkt->size || q->rein... |
1 | static int local_rename(FsContext *ctx, const char *oldpath, const char *newpath){ int err; char *buffer, *buffer1; if (ctx->export_flags & V9FS_SM_MAPPED_FILE) { err = local_create_mapped_attr_dir(ctx, newpath); if (err < 0) { return err; } /* rename the .virtfs_metadata files */ buffer = local_mapped_attr_path(ctx, o... |
0 | static int16_t long_term_filter(DSPContext *dsp, int pitch_delay_int, const int16_t* residual, int16_t *residual_filt, int subframe_size){ int i, k, tmp, tmp2; int sum; int L_temp0; int L_temp1; int64_t L64_temp0; int64_t L64_temp1; int16_t shift; int corr_int_num, corr_int_den; int ener; int16_t sh_ener; int16_t gain_... |
1 | void pc_dimm_memory_plug(DeviceState *dev, MemoryHotplugState *hpms, MemoryRegion *mr, uint64_t align, bool gap, Error **errp){ int slot; MachineState *machine = MACHINE(qdev_get_machine()); PCDIMMDevice *dimm = PC_DIMM(dev); Error *local_err = NULL; uint64_t existing_dimms_capacity = 0; uint64_t addr; addr = object_pr... |
1 | static int64_t asf_read_pts(AVFormatContext *s, int64_t *ppos, int stream_index){ ASFContext *asf = s->priv_data; AVPacket pkt1, *pkt = &pkt1; int64_t pos= *ppos; int64_t pts; // ensure we are on the packet boundry assert(pos % asf->packet_size == 0); url_fseek(&s->pb, pos + s->data_offset, SEEK_SET); do{ pos= url_ftel... |
1 | static void serial_reset(void *opaque){ SerialState *s = opaque; s->divider = 0; s->rbr = 0; s->ier = 0; s->iir = UART_IIR_NO_INT; s->lcr = 0; s->mcr = 0; s->lsr = UART_LSR_TEMT | UART_LSR_THRE; s->msr = UART_MSR_DCD | UART_MSR_DSR | UART_MSR_CTS; s->scr = 0; s->thr_ipending = 0; s->last_break_enable = 0; qemu_irq_lowe... |
1 | static void decode_micromips32_opc (CPUMIPSState *env, DisasContext *ctx, uint16_t insn_hw1, int *is_branch){ int32_t offset; uint16_t insn; int rt, rs, rd, rr; int16_t imm; uint32_t op, minor, mips32_op; uint32_t cond, fmt, cc; insn = lduw_code(ctx->pc + 2); ctx->opcode = (ctx->opcode << 16) | insn; rt = (ctx->opcode ... |
0 | static int xmv_process_packet_header(AVFormatContext *s){ XMVDemuxContext *xmv = s->priv_data; AVIOContext *pb = s->pb; uint8_t data[8]; uint16_t audio_track; uint64_t data_offset; /* Next packet size */ xmv->next_packet_size = avio_rl32(pb); /* Packet video header */ if (avio_read(pb, data, 8) != 8) return AVERROR(EIO... |
0 | static av_cold int qtrle_decode_init(AVCodecContext *avctx){ QtrleContext *s = avctx->priv_data; s->avctx = avctx; switch (avctx->bits_per_coded_sample) { case 1: case 33: avctx->pix_fmt = AV_PIX_FMT_MONOWHITE; break; case 2: case 4: case 8: case 34: case 36: case 40: avctx->pix_fmt = AV_PIX_FMT_PAL8; break; case 16: a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.