label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
1 | static void formant_postfilter(G723_1_Context *p, int16_t *lpc, int16_t *buf){ int16_t filter_coef[2][LPC_ORDER], *buf_ptr; int filter_signal[LPC_ORDER + FRAME_LEN], *signal_ptr; int i, j, k; memcpy(buf, p->fir_mem, LPC_ORDER * sizeof(*buf)); memcpy(filter_signal, p->iir_mem, LPC_ORDER * sizeof(*filter_signal)); for (i... |
1 | int attribute_align_arg avresample_convert(AVAudioResampleContext *avr, uint8_t **output, int out_plane_size, int out_samples, uint8_t **input, int in_plane_size, int in_samples){ AudioData input_buffer; AudioData output_buffer; AudioData *current_buffer; int ret, direct_output; /* reset internal buffers */ if (avr->in... |
1 | static int ogg_read_header(AVFormatContext *avfcontext, AVFormatParameters *ap){ OggContext *context = avfcontext->priv_data; ogg_packet op ; char *buf ; ogg_page og ; AVStream *ast ; AVCodecContext *codec; uint8_t *p; int i; ogg_sync_init(&context->oy) ; buf = ogg_sync_buffer(&context->oy, DECODER_BUFFER_SIZE) ; if(ge... |
1 | static inline int tcg_temp_new_internal(TCGType type, int temp_local){ TCGContext *s = &tcg_ctx; TCGTemp *ts; int idx, k; k = type; if (temp_local) k += TCG_TYPE_COUNT; idx = s->first_free_temp[k]; if (idx != -1) { /* There is already an available temp with the right type */ ts = &s->temps[idx]; s->first_free_temp[k] =... |
1 | static int vp56_size_changed(VP56Context *s){ AVCodecContext *avctx = s->avctx; int stride = s->frames[VP56_FRAME_CURRENT]->linesize[0]; int i; s->plane_width[0] = s->plane_width[3] = avctx->coded_width; s->plane_width[1] = s->plane_width[2] = avctx->coded_width/2; s->plane_height[0] = s->plane_height[3] = avctx->coded... |
1 | static void rtsp_cmd_teardown(HTTPContext *c, const char *url, RTSPHeader *h){ HTTPContext *rtp_c; rtp_c = find_rtp_session_with_url(url, h->session_id); if (!rtp_c) { rtsp_reply_error(c, RTSP_STATUS_SESSION); return; } /* abort the session */ close_connection(rtp_c); /* now everything is OK, so we can send the connect... |
1 | static CharDriverState *qemu_chr_open_win_path(const char *filename){ CharDriverState *chr; WinCharState *s; chr = qemu_chr_alloc(); s = g_malloc0(sizeof(WinCharState)); chr->opaque = s; chr->chr_write = win_chr_write; chr->chr_close = win_chr_close; if (win_chr_init(chr, filename) < 0) { g_free(s); g_free(chr); return... |
1 | static av_cold int twin_decode_init(AVCodecContext *avctx){ int ret; TwinContext *tctx = avctx->priv_data; int isampf, ibps; tctx->avctx = avctx; avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; if (!avctx->extradata || avctx->extradata_size < 12) { av_log(avctx, AV_LOG_ERROR, "Missing or incomplete extradata\n"); return AVERRO... |
1 | static int mov_read_sidx(MOVContext *c, AVIOContext *pb, MOVAtom atom){ int64_t offset = avio_tell(pb) + atom.size, pts, timestamp; uint8_t version; unsigned i, j, track_id, item_count; AVStream *st = NULL; AVStream *ref_st = NULL; MOVStreamContext *sc, *ref_sc = NULL; AVRational timescale; version = avio_r8(pb); if (v... |
1 | static void shix_init(MachineState *machine){ const char *cpu_model = machine->cpu_model; int ret; SuperHCPU *cpu; struct SH7750State *s; MemoryRegion *sysmem = get_system_memory(); MemoryRegion *rom = g_new(MemoryRegion, 1); MemoryRegion *sdram = g_new(MemoryRegion, 2); if (!cpu_model) cpu_model = "any"; cpu = SUPERH_... |
1 | static inline void gen_addr_imm_index (DisasContext *ctx){ target_long simm = SIMM(ctx->opcode); if (rA(ctx->opcode) == 0) { gen_op_set_T0(simm); } else { gen_op_load_gpr_T0(rA(ctx->opcode)); if (likely(simm != 0)) gen_op_addi(simm); }} |
1 | void qmp_guest_suspend_ram(Error **errp){ Error *local_err = NULL; GuestSuspendMode *mode = g_malloc(sizeof(GuestSuspendMode)); *mode = GUEST_SUSPEND_MODE_RAM; check_suspend_mode(*mode, &local_err); acquire_privilege(SE_SHUTDOWN_NAME, &local_err); execute_async(do_suspend, mode, &local_err); if (local_err) { error_prop... |
1 | void ff_hevc_cabac_init(HEVCContext *s, int ctb_addr_ts){ if (ctb_addr_ts == s->ps.pps->ctb_addr_rs_to_ts[s->sh.slice_ctb_addr_rs]) { cabac_init_decoder(s); if (s->sh.dependent_slice_segment_flag == 0 || (s->ps.pps->tiles_enabled_flag && s->ps.pps->tile_id[ctb_addr_ts] != s->ps.pps->tile_id[ctb_addr_ts - 1])) cabac_ini... |
1 | void lance_init(NICInfo *nd, target_phys_addr_t leaddr, void *dma_opaque, qemu_irq irq, qemu_irq *reset){ PCNetState *d; int lance_io_memory; qemu_check_nic_model(nd, "lance"); d = qemu_mallocz(sizeof(PCNetState)); lance_io_memory = cpu_register_io_memory(0, lance_mem_read, lance_mem_write, d); d->dma_opaque = dma_opaq... |
1 | static inline TCGv gen_load(DisasContext * s, int opsize, TCGv addr, int sign){ TCGv tmp; int index = IS_USER(s); s->is_mem = 1; tmp = tcg_temp_new_i32(); switch(opsize) { case OS_BYTE: if (sign) tcg_gen_qemu_ld8s(tmp, addr, index); else tcg_gen_qemu_ld8u(tmp, addr, index); break; case OS_WORD: if (sign) tcg_gen_qemu_l... |
1 | int ff_snow_frame_start(SnowContext *s){ AVFrame tmp; int i, ret; int w= s->avctx->width; //FIXME round up to x16 ? int h= s->avctx->height; if (s->current_picture.data[0] && !(s->avctx->flags&CODEC_FLAG_EMU_EDGE)) { s->dsp.draw_edges(s->current_picture.data[0], s->current_picture.linesize[0], w , h , EDGE_WIDTH , EDGE... |
1 | static int h264_slice_header_parse(const H264Context *h, H264SliceContext *sl, const H2645NAL *nal){ const SPS *sps; const PPS *pps; int ret; unsigned int slice_type, tmp, i; int field_pic_flag, bottom_field_flag; int first_slice = sl == h->slice_ctx && !h->current_slice; int picture_structure; if (first_slice) av_asse... |
1 | static inline void RENAME(yuv2rgb565_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){ x86_reg uv_off = c->uv_of... |
1 | static int virtio_scsi_parse_req(VirtIOSCSIReq *req, unsigned req_size, unsigned resp_size){ VirtIODevice *vdev = (VirtIODevice *) req->dev; size_t in_size, out_size; if (iov_to_buf(req->elem.out_sg, req->elem.out_num, 0, &req->req, req_size) < req_size) { return -EINVAL; } if (qemu_iovec_concat_iov(&req->resp_iov, req... |
1 | static int mov_write_moov_tag(AVIOContext *pb, MOVMuxContext *mov, AVFormatContext *s){ int i; int64_t pos = avio_tell(pb); avio_wb32(pb, 0); /* size placeholder*/ ffio_wfourcc(pb, "moov"); for (i = 0; i < mov->nb_streams; i++) { if (mov->tracks[i].entry <= 0 && !(mov->flags & FF_MOV_FLAG_FRAGMENT)) continue; mov->trac... |
1 | static void virtio_blk_handle_read(VirtIOBlockReq *req){ BlockDriverAIOCB *acb; uint64_t sector; sector = ldq_p(&req->out->sector); if (sector & req->dev->sector_mask) { acb = bdrv_aio_readv(req->dev->bs, sector, &req->qiov, req->qiov.size / BDRV_SECTOR_SIZE, virtio_blk_rw_complete, req); if (!acb) { |
1 | void FUNC(ff_simple_idct_put)(uint8_t *dest_, int line_size, DCTELEM *block){ pixel *dest = (pixel *)dest_; int i; line_size /= sizeof(pixel); for (i = 0; i < 8; i++) FUNC(idctRowCondDC)(block + i*8); for (i = 0; i < 8; i++) FUNC(idctSparseColPut)(dest + i, line_size, block + i);} |
1 | static void quantize_and_encode_band_cost_UPAIR7_mips(struct AACEncContext *s, PutBitContext *pb, const float *in, float *out, const float *scaled, int size, int scale_idx, int cb, const float lambda, const float uplim, int *bits, const float ROUNDING){ const float Q34 = ff_aac_pow34sf_tab[POW_SF2_ZERO - scale_idx + SC... |
1 | static int rtmp_packet_read_one_chunk(URLContext *h, RTMPPacket *p, int chunk_size, RTMPPacket **prev_pkt_ptr, int *nb_prev_pkt, uint8_t hdr){ uint8_t buf[16]; int channel_id, timestamp, size; uint32_t ts_field; // non-extended timestamp or delta field uint32_t extra = 0; enum RTMPPacketType type; int written = 0; int ... |
1 | int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count){ int i, av_uninit(j); int current_ref_assigned = 0, err = 0; Picture *av_uninit(pic); if ((h->avctx->debug & FF_DEBUG_MMCO) && mmco_count == 0) av_log(h->avctx, AV_LOG_DEBUG, "no mmco here\n"); for (i = 0; i < mmco_count; i++) { int av_unin... |
1 | static void pc_init1(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, int pci_enabled){ char *filename; int ret, linux_boot, i; ram_addr_t ram_addr, bios_offset, option_rom_offset; ram_addr_t below_4g_mem_size, abo... |
1 | void *av_tree_insert(AVTreeNode **tp, void *key, int (*cmp)(void *key, const void *b), AVTreeNode **next){ AVTreeNode *t= *tp; if(t){ unsigned int v= cmp(t->elem, key); void *ret; if(!v){ if(*next) return t->elem; else if(t->child[0]||t->child[1]){ int i= !t->child[0]; void *next_elem[2]; av_tree_find(t->child[i], key,... |
1 | static size_t refcount_array_byte_size(BDRVQcow2State *s, uint64_t entries){ /* This assertion holds because there is no way we can address more than * 2^(64 - 9) clusters at once (with cluster size 512 = 2^9, and because * offsets have to be representable in bytes); due to every cluster * corresponding to one refcount... |
1 | static inline void RENAME(hyscale)(SwsContext *c, uint16_t *dst, long dstWidth, uint8_t *src, int srcW, int xInc, int flags, int canMMX2BeUsed, int16_t *hLumFilter, int16_t *hLumFilterPos, int hLumFilterSize, void *funnyYCode, int srcFormat, uint8_t *formatConvBuffer, int16_t *mmx2Filter, int32_t *mmx2FilterPos, uint8_... |
1 | static int applehttp_read_header(AVFormatContext *s, AVFormatParameters *ap){ AppleHTTPContext *c = s->priv_data; int ret = 0, i, j, stream_offset = 0; if ((ret = parse_playlist(c, s->filename, NULL, s->pb)) < 0) goto fail; if (c->n_variants == 0) { av_log(NULL, AV_LOG_WARNING, "Empty playlist\n"); ret = AVERROR_EOF; g... |
1 | static int nvenc_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet){ NVENCSTATUS nv_status; NvencOutputSurface *tmpoutsurf; int res, i = 0; NvencContext *ctx = avctx->priv_data; NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs; NV_ENCODE_API_FUNCTION_LIST *p_nvenc = &dl_fn->... |
0 | static int mov_read_glbl(MOVContext *c, ByteIOContext *pb, MOVAtom atom){ AVStream *st = c->fc->streams[c->fc->nb_streams-1]; if((uint64_t)atom.size > (1<<30)) return -1; av_free(st->codec->extradata); st->codec->extradata = av_mallocz(atom.size + FF_INPUT_BUFFER_PADDING_SIZE); if (!st->codec->extradata) return AVERROR... |
0 | static uint64_t find_any_startcode(ByteIOContext *bc, int64_t pos){ uint64_t state=0; if(pos >= 0) url_fseek(bc, pos, SEEK_SET); //note, this may fail if the stream isnt seekable, but that shouldnt matter, as in this case we simply start where we are currently while(bytes_left(bc)){ state= (state<<8) | get_byte(bc); if... |
0 | static void ape_unpack_stereo(APEContext *ctx, int count){ int32_t left, right; int32_t *decoded0 = ctx->decoded[0]; int32_t *decoded1 = ctx->decoded[1]; if (ctx->frameflags & APE_FRAMECODE_STEREO_SILENCE) { /* We are pure silence, so we're done. */ av_log(ctx->avctx, AV_LOG_DEBUG, "pure silence stereo\n"); return; } e... |
0 | static void jpeg_init_destination(j_compress_ptr cinfo){ VncState *vs = cinfo->client_data; Buffer *buffer = &vs->tight_jpeg; cinfo->dest->next_output_byte = (JOCTET *)buffer->buffer + buffer->offset; cinfo->dest->free_in_buffer = (size_t)(buffer->capacity - buffer->offset);} |
0 | static void ref405ep_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){ char *filename; ppc4xx_bd_info_t bd; CPUPPCState *env; qemu_irq *pic; ram_addr_t sram_offset, bios_offset, bdloc; target_phys_addr_t ram_... |
0 | void ppc_store_sdr1 (CPUPPCState *env, target_ulong value){ LOG_MMU("%s: " TARGET_FMT_lx "\n", __func__, value); if (env->sdr1 != value) { /* XXX: for PowerPC 64, should check that the HTABSIZE value * is <= 28 */ env->sdr1 = value; tlb_flush(env, 1); }} |
0 | static void memory_region_finalize(Object *obj){ MemoryRegion *mr = MEMORY_REGION(obj); assert(QTAILQ_EMPTY(&mr->subregions)); assert(memory_region_transaction_depth == 0); mr->destructor(mr); memory_region_clear_coalescing(mr); g_free((char *)mr->name); g_free(mr->ioeventfds);} |
0 | static void tgen64_ori(TCGContext *s, TCGReg dest, tcg_target_ulong val){ static const S390Opcode oi_insns[4] = { RI_OILL, RI_OILH, RI_OIHL, RI_OIHH }; static const S390Opcode nif_insns[2] = { RIL_OILF, RIL_OIHF }; int i; /* Look for no-op. */ if (val == 0) { return; } if (facilities & FACILITY_EXT_IMM) { /* Try all 32... |
0 | int xen_be_init(void){ xenstore = xs_daemon_open(); if (!xenstore) { xen_be_printf(NULL, 0, "can't connect to xenstored\n"); return -1; } if (qemu_set_fd_handler(xs_fileno(xenstore), xenstore_update, NULL, NULL) < 0) { goto err; } xen_xc = xc_interface_open(); if (xen_xc == -1) { xen_be_printf(NULL, 0, "can't open xen ... |
0 | static void virtio_input_handle_event(DeviceState *dev, QemuConsole *src, InputEvent *evt){ VirtIOInput *vinput = VIRTIO_INPUT(dev); virtio_input_event event; int qcode; switch (evt->kind) { case INPUT_EVENT_KIND_KEY: qcode = qemu_input_key_value_to_qcode(evt->key->key); if (qcode && keymap_qcode[qcode]) { event.type =... |
0 | static int uhci_handle_td(UHCIState *s, uint32_t addr, UHCI_TD *td, uint32_t *int_mask, bool queuing){ UHCIAsync *async; int len = 0, max_len; uint8_t pid; USBDevice *dev; USBEndpoint *ep; /* Is active ? */ if (!(td->ctrl & TD_CTRL_ACTIVE)) return TD_RESULT_NEXT_QH; async = uhci_async_find_td(s, addr, td); if (async) {... |
0 | static void xen_pt_region_update(XenPCIPassthroughState *s, MemoryRegionSection *sec, bool adding){ PCIDevice *d = &s->dev; MemoryRegion *mr = sec->mr; int bar = -1; int rc; int op = adding ? DPCI_ADD_MAPPING : DPCI_REMOVE_MAPPING; struct CheckBarArgs args = { .s = s, .addr = sec->offset_within_address_space, .size = i... |
0 | static void omap_inth_sir_update(struct omap_intr_handler_s *s, int is_fiq){ int i, j, sir_intr, p_intr, p, f; uint32_t level; sir_intr = 0; p_intr = 255; /* Find the interrupt line with the highest dynamic priority. * Note: 0 denotes the hightest priority. * If all interrupts have the same priority, the default order ... |
0 | static int coroutine_fn bdrv_co_do_writev(BdrvChild *child, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov, BdrvRequestFlags flags){ if (nb_sectors < 0 || nb_sectors > BDRV_REQUEST_MAX_SECTORS) { return -EINVAL; } return bdrv_co_pwritev(child->bs, sector_num << BDRV_SECTOR_BITS, nb_sectors << BDRV_SECTOR_BITS, ... |
0 | static int decorrelate(TAKDecContext *s, int c1, int c2, int length){ GetBitContext *gb = &s->gb; int32_t *p1 = s->decoded[c1] + (s->dmode > 5); int32_t *p2 = s->decoded[c2] + (s->dmode > 5); int32_t bp1 = p1[0]; int32_t bp2 = p2[0]; int i; int dshift, dfactor; length += s->dmode < 6; switch (s->dmode) { case 1: /* lef... |
0 | static MegasasCmd *megasas_lookup_frame(MegasasState *s, target_phys_addr_t frame){ MegasasCmd *cmd = NULL; int num = 0, index; index = s->reply_queue_head; while (num < s->fw_cmds) { if (s->frames[index].pa && s->frames[index].pa == frame) { cmd = &s->frames[index]; break; } index = megasas_next_index(s, index, s->fw_... |
1 | static int ebml_parse_elem(MatroskaDemuxContext *matroska, EbmlSyntax *syntax, void *data){ static const uint64_t max_lengths[EBML_TYPE_COUNT] = { [EBML_UINT] = 8, [EBML_FLOAT] = 8, // max. 16 MB for strings [EBML_STR] = 0x1000000, [EBML_UTF8] = 0x1000000, // max. 256 MB for binary data [EBML_BIN] = 0x10000000, // no l... |
1 | static int ehci_init_transfer(EHCIPacket *p){ uint32_t cpage, offset, bytes, plen; dma_addr_t page; cpage = get_field(p->qtd.token, QTD_TOKEN_CPAGE); bytes = get_field(p->qtd.token, QTD_TOKEN_TBYTES); offset = p->qtd.bufptr[0] & ~QTD_BUFPTR_MASK; qemu_sglist_init(&p->sgl, p->queue->ehci->device, 5, p->queue->ehci->as);... |
1 | static target_long monitor_get_pc (const struct MonitorDef *md, int val){ CPUState *env = mon_get_cpu(); if (!env) return 0; return env->eip + env->segs[R_CS].base;} |
1 | static void gen_stswi(DisasContext *ctx){ TCGv t0; TCGv_i32 t1, t2; int nb = NB(ctx->opcode); gen_set_access_type(ctx, ACCESS_INT); /* NIP cannot be restored if the memory exception comes from an helper */ gen_update_nip(ctx, ctx->nip - 4); t0 = tcg_temp_new(); gen_addr_register(ctx, t0); if (nb == 0) nb = 32; t1 = tcg... |
1 | static void bufp_alloc(USBRedirDevice *dev, uint8_t *data, int len, int status, uint8_t ep){ struct buf_packet *bufp; if (!dev->endpoint[EP2I(ep)].bufpq_dropping_packets && dev->endpoint[EP2I(ep)].bufpq_size > 2 * dev->endpoint[EP2I(ep)].bufpq_target_size) { DPRINTF("bufpq overflow, dropping packets ep %02X\n", ep); de... |
1 | static int vmdk_open_vmfs_sparse(BlockDriverState *bs, BlockDriverState *file, int flags, Error **errp){ int ret; uint32_t magic; VMDK3Header header; VmdkExtent *extent; ret = bdrv_pread(file, sizeof(magic), &header, sizeof(header)); if (ret < 0) { error_setg_errno(errp, -ret, "Could not read header from file '%s'", fi... |
1 | static int au_write_header(AVFormatContext *s){ AVIOContext *pb = s->pb; AVCodecContext *enc = s->streams[0]->codec; if (!enc->codec_tag) return AVERROR(EINVAL); ffio_wfourcc(pb, ".snd"); /* magic number */ avio_wb32(pb, AU_HEADER_SIZE); /* header size */ avio_wb32(pb, AU_UNKNOWN_SIZE); /* data size */ avio_wb32(pb, en... |
0 | static ssize_t nbd_co_receive_request(NBDRequest *req, struct nbd_request *request){ NBDClient *client = req->client; int csock = client->sock; ssize_t rc; client->recv_coroutine = qemu_coroutine_self(); if (nbd_receive_request(csock, request) == -1) { rc = -EIO; goto out; } if (request->len > NBD_BUFFER_SIZE) { LOG("l... |
0 | static int pci_vga_initfn(PCIDevice *dev){ PCIVGAState *d = DO_UPCAST(PCIVGAState, dev, dev); VGACommonState *s = &d->vga; uint8_t *pci_conf = d->dev.config; // vga + console init vga_common_init(s, VGA_RAM_SIZE); vga_init(s); s->ds = graphic_console_init(s->update, s->invalidate, s->screen_dump, s->text_update, s); //... |
0 | void portio_list_add(PortioList *piolist, MemoryRegion *address_space, uint32_t start){ const MemoryRegionPortio *pio, *pio_start = piolist->ports; unsigned int off_low, off_high, off_last, count; piolist->address_space = address_space; /* Handle the first entry specially. */ off_last = off_low = pio_start->offset; off... |
0 | void qemu_console_resize(QEMUConsole *console, int width, int height){ if (console->g_width != width || console->g_height != height) { console->g_width = width; console->g_height = height; if (active_console == console) { dpy_resize(console->ds, width, height); } }} |
0 | static void coroutine_fn bdrv_get_block_status_co_entry(void *opaque){ BdrvCoGetBlockStatusData *data = opaque; BlockDriverState *bs = data->bs; data->ret = bdrv_co_get_block_status(bs, data->sector_num, data->nb_sectors, data->pnum); data->done = true;} |
0 | static int process_cc608(CCaptionSubContext *ctx, int64_t pts, uint8_t hi, uint8_t lo){ int ret = 0;#define COR3(var, with1, with2, with3) ( (var) == (with1) || (var) == (with2) || (var) == (with3) ) if ( hi == ctx->prev_cmd[0] && lo == ctx->prev_cmd[1]) { /* ignore redundant command */ } else if ( (hi == 0x10 && (lo >... |
0 | static uint32_t vmsvga_value_read(void *opaque, uint32_t address){ uint32_t caps; struct vmsvga_state_s *s = opaque; switch (s->index) { case SVGA_REG_ID: return s->svgaid; case SVGA_REG_ENABLE: return s->enable; case SVGA_REG_WIDTH: return s->width; case SVGA_REG_HEIGHT: return s->height; case SVGA_REG_MAX_WIDTH: retu... |
0 | static void qemu_chr_parse_file_out(QemuOpts *opts, ChardevBackend *backend, Error **errp){ const char *path = qemu_opt_get(opts, "path"); ChardevFile *file; if (path == NULL) { error_setg(errp, "chardev: file: no filename given"); return; } file = backend->u.file = g_new0(ChardevFile, 1); qemu_chr_parse_common(opts, q... |
0 | nvdimm_dsm_write(void *opaque, hwaddr addr, uint64_t val, unsigned size){ AcpiNVDIMMState *state = opaque; NvdimmDsmIn *in; hwaddr dsm_mem_addr = val; nvdimm_debug("dsm memory address %#" HWADDR_PRIx ".\n", dsm_mem_addr); /* * The DSM memory is mapped to guest address space so an evil guest * can change its content whi... |
0 | static BlockDriverAIOCB *hdev_aio_ioctl(BlockDriverState *bs, unsigned long int req, void *buf, BlockDriverCompletionFunc *cb, void *opaque){ BDRVRawState *s = bs->opaque; if (fd_open(bs) < 0) return NULL; return paio_ioctl(bs, s->fd, req, buf, cb, opaque);} |
0 | static void qxl_init_ramsize(PCIQXLDevice *qxl){ /* vga mode framebuffer / primary surface (bar 0, first part) */ if (qxl->vgamem_size_mb < 8) { qxl->vgamem_size_mb = 8; } /* XXX: we round vgamem_size_mb up to a nearest power of two and it must be * less than vga_common_init()'s maximum on qxl->vga.vram_size (512 now).... |
0 | static int rtl8139_config_writable(RTL8139State *s){ if (s->Cfg9346 & Cfg9346_Unlock) { return 1; } DPRINTF("Configuration registers are write-protected\n"); return 0;} |
0 | static int vfio_container_do_ioctl(AddressSpace *as, int32_t groupid, int req, void *param){ VFIOGroup *group; VFIOContainer *container; int ret = -1; group = vfio_get_group(groupid, as); if (!group) { error_report("vfio: group %d not registered", groupid); return ret; } container = group->container; if (group->contain... |
0 | void vnc_flush(VncState *vs){ vnc_lock_output(vs); if (vs->csock != -1 && (vs->output.offset#ifdef CONFIG_VNC_WS || vs->ws_output.offset#endif )) { vnc_client_write_locked(vs); } vnc_unlock_output(vs);} |
0 | static float32 roundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig STATUS_PARAM){ int8 roundingMode; flag roundNearestEven; int8 roundIncrement, roundBits; flag isTiny; roundingMode = STATUS(float_rounding_mode); roundNearestEven = ( roundingMode == float_round_nearest_even ); roundIncrement = 0x40; if ( ! roundNe... |
0 | static void omap_lpg_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size){ struct omap_lpg_s *s = (struct omap_lpg_s *) opaque; int offset = addr & OMAP_MPUI_REG_MASK; if (size != 1) { return omap_badwidth_write8(opaque, addr, value); } switch (offset) { case 0x00:/* LCR */ if (~value & (1 << 6))... |
0 | static int h264_find_frame_end(H264ParseContext *p, const uint8_t *buf, int buf_size){ int i; uint32_t state; ParseContext *pc = &p->pc;// mb_addr= pc->mb_addr - 1; state = pc->state; if (state > 13) state = 7; for (i = 0; i < buf_size; i++) { if (state == 7) { i += p->h264dsp.startcode_find_candidate(buf + i, buf_size... |
0 | static uint64_t omap_mpu_timer_read(void *opaque, target_phys_addr_t addr, unsigned size){ struct omap_mpu_timer_s *s = (struct omap_mpu_timer_s *) opaque; if (size != 4) { return omap_badwidth_read32(opaque, addr); } switch (addr) { case 0x00:/* CNTL_TIMER */ return (s->enable << 5) | (s->ptv << 2) | (s->ar << 1) | s-... |
0 | void bdrv_close(BlockDriverState *bs){ BdrvAioNotifier *ban, *ban_next; if (bs->job) { block_job_cancel_sync(bs->job); } /* Disable I/O limits and drain all pending throttled requests */ if (bs->io_limits_enabled) { bdrv_io_limits_disable(bs); } bdrv_drain(bs); /* complete I/O */ bdrv_flush(bs); bdrv_drain(bs); /* in c... |
0 | void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds, int select_error){} |
0 | struct omap_mcbsp_s *omap_mcbsp_init(MemoryRegion *system_memory, target_phys_addr_t base, qemu_irq *irq, qemu_irq *dma, omap_clk clk){ struct omap_mcbsp_s *s = (struct omap_mcbsp_s *) g_malloc0(sizeof(struct omap_mcbsp_s)); s->txirq = irq[0]; s->rxirq = irq[1]; s->txdrq = dma[0]; s->rxdrq = dma[1]; s->sink_timer = qem... |
0 | static target_ulong h_rtas(PowerPCCPU *cpu, sPAPREnvironment *spapr, target_ulong opcode, target_ulong *args){ target_ulong rtas_r3 = args[0]; uint32_t token = ldl_be_phys(rtas_r3); uint32_t nargs = ldl_be_phys(rtas_r3 + 4); uint32_t nret = ldl_be_phys(rtas_r3 + 8); return spapr_rtas_call(spapr, token, nargs, rtas_r3 +... |
0 | static void do_info_balloon(Monitor *mon, QObject **ret_data){ ram_addr_t actual; actual = qemu_balloon_status(); if (kvm_enabled() && !kvm_has_sync_mmu()) qemu_error_new(QERR_KVM_MISSING_CAP, "synchronous MMU", "balloon"); else if (actual == 0) qemu_error_new(QERR_DEVICE_NOT_ACTIVE, "balloon"); else *ret_data = qobjec... |
0 | static void virtio_scsi_hotplug(SCSIBus *bus, SCSIDevice *dev){ VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus); if (((s->vdev.guest_features >> VIRTIO_SCSI_F_HOTPLUG) & 1) && (s->vdev.status & VIRTIO_CONFIG_S_DRIVER_OK)) { virtio_scsi_push_event(s, dev, VIRTIO_SCSI_T_TRANSPORT_RESET, VIRTIO_SCSI_EVT_RESET_RESCAN); ... |
0 | void qio_channel_socket_listen_async(QIOChannelSocket *ioc, SocketAddressLegacy *addr, QIOTaskFunc callback, gpointer opaque, GDestroyNotify destroy){ QIOTask *task = qio_task_new( OBJECT(ioc), callback, opaque, destroy); SocketAddressLegacy *addrCopy; addrCopy = QAPI_CLONE(SocketAddressLegacy, addr); /* socket_listen(... |
0 | static void bmdma_write(void *opaque, target_phys_addr_t addr, uint64_t val, unsigned size){ BMDMAState *bm = opaque; if (size != 1) { return; }#ifdef DEBUG_IDE printf("bmdma: writeb 0x%02x : 0x%02x\n", addr, val);#endif switch (addr & 3) { case 0: bmdma_cmd_writeb(bm, val); break; case 2: bm->status = (val & 0x60) | (... |
0 | int bdrv_open(BlockDriverState *bs, const char *filename, int flags, BlockDriver *drv){ int ret, open_flags; char tmp_filename[PATH_MAX]; char backing_filename[PATH_MAX]; bs->is_temporary = 0; bs->encrypted = 0; bs->valid_key = 0; bs->open_flags = flags; /* buffer_alignment defaulted to 512, drivers can change this val... |
0 | static uint32_t omap_l4_io_readw(void *opaque, target_phys_addr_t addr){ unsigned int i = (addr - OMAP2_L4_BASE) >> TARGET_PAGE_BITS; return omap_l4_io_readw_fn[i](omap_l4_io_opaque[i], addr);} |
0 | PCIBus *typhoon_init(ram_addr_t ram_size, ISABus **isa_bus, qemu_irq *p_rtc_irq, AlphaCPU *cpus[4], pci_map_irq_fn sys_map_irq){ const uint64_t MB = 1024 * 1024; const uint64_t GB = 1024 * MB; MemoryRegion *addr_space = get_system_memory(); DeviceState *dev; TyphoonState *s; PCIHostState *phb; PCIBus *b; int i; dev = q... |
0 | static void qmp_output_end_struct(Visitor *v, void **obj){ QmpOutputVisitor *qov = to_qov(v); QObject *value = qmp_output_pop(qov, obj); assert(qobject_type(value) == QTYPE_QDICT);} |
0 | static void pmuserenr_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value){ env->cp15.c9_pmuserenr = value & 1;} |
0 | static int parse_drive(DeviceState *dev, Property *prop, const char *str){ DriveInfo **ptr = qdev_get_prop_ptr(dev, prop); *ptr = drive_get_by_id(str); if (*ptr == NULL) return -ENOENT; return 0;} |
0 | void put_pixels8_xy2_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h){POWERPC_TBL_DECLARE(altivec_put_pixels8_xy2_num, 1);#ifdef ALTIVEC_USE_REFERENCE_C_CODE int j;POWERPC_TBL_START_COUNT(altivec_put_pixels8_xy2_num, 1); for (j = 0; j < 2; j++) { int i; const uint32_t a = (((const struct unaligned_3... |
0 | void cpu_x86_interrupt(CPUX86State *s){ s->interrupt_request = 1;} |
0 | void hmp_block_stream(Monitor *mon, const QDict *qdict){ Error *error = NULL; const char *device = qdict_get_str(qdict, "device"); const char *base = qdict_get_try_str(qdict, "base"); qmp_block_stream(device, base != NULL, base, &error); hmp_handle_error(mon, &error);} |
1 | static int flic_read_packet(AVFormatContext *s, AVPacket *pkt){ FlicDemuxContext *flic = (FlicDemuxContext *)s->priv_data; ByteIOContext *pb = &s->pb; int packet_read = 0; unsigned int size; int magic; int ret = 0; unsigned char preamble[FLIC_PREAMBLE_SIZE]; while (!packet_read) { if ((ret = get_buffer(pb, preamble, FL... |
0 | static int get_ref_idx(AVFrame *frame){ FrameDecodeData *fdd; NVDECFrame *cf; if (!frame || !frame->private_ref) return -1; fdd = (FrameDecodeData*)frame->private_ref->data; cf = (NVDECFrame*)fdd->hwaccel_priv; return cf->idx;} |
0 | static int put_packetheader(NUTContext *nut, ByteIOContext *bc, int max_size, int calculate_checksum){ put_flush_packet(bc); nut->packet_start[2]= url_ftell(bc) - 8; nut->written_packet_size = max_size; if(calculate_checksum) init_checksum(bc, update_adler32, 0); /* packet header */ put_v(bc, nut->written_packet_size);... |
0 | inline static void RENAME(hcscale)(SwsContext *c, uint16_t *dst, long dstWidth, uint8_t *src1, uint8_t *src2, int srcW, int xInc, int flags, int canMMX2BeUsed, int16_t *hChrFilter, int16_t *hChrFilterPos, int hChrFilterSize, void *funnyUVCode, int srcFormat, uint8_t *formatConvBuffer, int16_t *mmx2Filter, int32_t *mmx2... |
1 | int avpriv_unlock_avformat(void){ if (lockmgr_cb) { if ((*lockmgr_cb)(&avformat_mutex, AV_LOCK_RELEASE)) return -1; } return 0;} |
1 | static int disas_neon_ls_insn(CPUState * env, DisasContext *s, uint32_t insn){ int rd, rn, rm; int op; int nregs; int interleave; int spacing; int stride; int size; int reg; int pass; int load; int shift; int n; TCGv addr; TCGv tmp; TCGv tmp2; TCGv_i64 tmp64; if (!s->vfp_enabled) return 1; VFP_DREG_D(rd, insn); rn = (i... |
1 | vu_queue_empty(VuDev *dev, VuVirtq *vq){ if (vq->shadow_avail_idx != vq->last_avail_idx) { return 0; } return vring_avail_idx(vq) == vq->last_avail_idx;} |
1 | static CURLState *curl_init_state(BlockDriverState *bs, BDRVCURLState *s){ CURLState *state = NULL; int i, j; do { for (i=0; i<CURL_NUM_STATES; i++) { for (j=0; j<CURL_NUM_ACB; j++) if (s->states[i].acb[j]) continue; if (s->states[i].in_use) continue; state = &s->states[i]; state->in_use = 1; break; } if (!state) { qem... |
1 | static int ssi_sd_load(QEMUFile *f, void *opaque, int version_id){ SSISlave *ss = SSI_SLAVE(opaque); ssi_sd_state *s = (ssi_sd_state *)opaque; int i; if (version_id != 1) s->mode = qemu_get_be32(f); s->cmd = qemu_get_be32(f); for (i = 0; i < 4; i++) s->cmdarg[i] = qemu_get_be32(f); for (i = 0; i < 5; i++) s->response[i... |
1 | static inline uint8_t *ram_chunk_end(const RDMALocalBlock *rdma_ram_block, uint64_t i){ uint8_t *result = ram_chunk_start(rdma_ram_block, i) + (1UL << RDMA_REG_CHUNK_SHIFT); if (result > (rdma_ram_block->local_host_addr + rdma_ram_block->length)) { result = rdma_ram_block->local_host_addr + rdma_ram_block->length; } re... |
1 | static int build_vlc(VLC *vlc, const uint8_t *bits_table, const uint8_t *val_table, int nb_codes){ uint8_t huff_size[256]; uint16_t huff_code[256]; memset(huff_size, 0, sizeof(huff_size)); build_huffman_codes(huff_size, huff_code, bits_table, val_table); return init_vlc(vlc, 9, nb_codes, huff_size, 1, 1, huff_code, 2, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.