label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
0 | ChardevReturn *qmp_chardev_add(const char *id, ChardevBackend *backend, Error **errp) { ChardevReturn *ret = g_new0(ChardevReturn, 1); CharDriverState *base, *chr = NULL; chr = qemu_chr_find(id); if (chr) { error_setg(errp, "Chardev '%s' already exists", id); g_free(ret); return NULL; } switch (backend->kind) { case CH... | 18,995 |
0 | static int pbm_pci_host_init(PCIDevice *d) { pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_SUN); pci_config_set_device_id(d->config, PCI_DEVICE_ID_SUN_SABRE); pci_set_word(d->config + PCI_COMMAND, PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); pci_set_word(d->config + PCI_STATUS, PCI_STATUS_FAST_BACK | PCI_STATUS_66MHZ ... | 18,996 |
0 | static int32_t read_s32(uint8_t *data, size_t offset) { return (int32_t)((data[offset] << 24) | (data[offset + 1] << 16) | (data[offset + 2] << 8) | data[offset + 3]); } | 18,998 |
0 | CPUSPARCState *cpu_sparc_init(void) { CPUSPARCState *env; cpu_exec_init(); if (!(env = malloc(sizeof(CPUSPARCState)))) return (NULL); memset(env, 0, sizeof(*env)); env->cwp = 0; env->wim = 1; env->regwptr = env->regbase + (env->cwp * 16); env->access_type = ACCESS_DATA; #if defined(CONFIG_USER_ONLY) env->user_mode_only... | 19,000 |
0 | void timer_init_tl(QEMUTimer *ts, QEMUTimerList *timer_list, int scale, QEMUTimerCB *cb, void *opaque) { ts->timer_list = timer_list; ts->cb = cb; ts->opaque = opaque; ts->scale = scale; ts->expire_time = -1; } | 19,001 |
0 | static uint32_t virtio_net_get_features(VirtIODevice *vdev, uint32_t features) { VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); features |= (1 << VIRTIO_NET_F_MAC); if (!peer_has_vnet_hdr(n)) { features &= ~(0x1 << VIRTIO_NET_F_CSUM); features &= ~(0x1 << VIRTIO_NET_F_HOST_TSO4); features... | 19,004 |
0 | static int64_t mkv_write_cues(AVFormatContext *s, mkv_cues *cues, mkv_track *tracks, int num_tracks) { MatroskaMuxContext *mkv = s->priv_data; AVIOContext *dyn_cp, *pb = s->pb; ebml_master cues_element; int64_t currentpos; int i, j, ret; currentpos = avio_tell(pb); ret = start_ebml_master_crc32(pb, &dyn_cp, &cues_eleme... | 19,007 |
0 | av_cold int ff_vaapi_encode_init(AVCodecContext *avctx, const VAAPIEncodeType *type) { VAAPIEncodeContext *ctx = avctx->priv_data; AVVAAPIFramesContext *recon_hwctx = NULL; AVVAAPIHWConfig *hwconfig = NULL; AVHWFramesConstraints *constraints = NULL; enum AVPixelFormat recon_format; VAStatus vas; int err, i; if (!avctx-... | 19,008 |
0 | void ff_print_debug_info(MpegEncContext *s, AVFrame *pict) { if ( s->avctx->hwaccel || !pict || !pict->mb_type || (s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)) return; if (s->avctx->debug & (FF_DEBUG_SKIP | FF_DEBUG_QP | FF_DEBUG_MB_TYPE)) { int x,y; av_log(s->avctx, AV_LOG_DEBUG, "New frame, type: %c\n", av... | 19,010 |
1 | static uint8_t qvirtio_pci_config_readb(QVirtioDevice *d, uint64_t off) { QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d; return qpci_io_readb(dev->pdev, CONFIG_BASE(dev) + off); } | 19,013 |
1 | int cpu_ppc_register_internal (CPUPPCState *env, const ppc_def_t *def) { env->msr_mask = def->msr_mask; env->mmu_model = def->mmu_model; env->excp_model = def->excp_model; env->bus_model = def->bus_model; env->insns_flags = def->insns_flags; env->insns_flags2 = def->insns_flags2; env->flags = def->flags; env->bfd_mach ... | 19,015 |
1 | static void set_dirty_bitmap(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int dirty) { int64_t start, end; start = sector_num / BDRV_SECTORS_PER_DIRTY_CHUNK; end = (sector_num + nb_sectors) / BDRV_SECTORS_PER_DIRTY_CHUNK; for (; start <= end; start++) { bs->dirty_bitmap[start] = dirty; } } | 19,016 |
1 | static void pc_dimm_unplug(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { PCMachineState *pcms = PC_MACHINE(hotplug_dev); PCDIMMDevice *dimm = PC_DIMM(dev); PCDIMMDeviceClass *ddc = PC_DIMM_GET_CLASS(dimm); MemoryRegion *mr = ddc->get_memory_region(dimm); HotplugHandlerClass *hhc; Error *local_err = NUL... | 19,017 |
1 | uint64_t ram_bytes_remaining(void) { return ram_state->migration_dirty_pages * TARGET_PAGE_SIZE; } | 19,018 |
1 | QEMU_BUILD_BUG_ON(ARRAY_SIZE(monitor_event_names) != QEVENT_MAX) /** * monitor_protocol_event(): Generate a Monitor event * * Event-specific data can be emitted through the (optional) 'data' parameter. */ void monitor_protocol_event(MonitorEvent event, QObject *data) { QDict *qmp; const char *event_name; Monitor *mon; ... | 19,019 |
1 | static int preallocate(BlockDriverState *bs) { uint64_t nb_sectors; uint64_t offset; int num; int ret; QCowL2Meta meta; nb_sectors = bdrv_getlength(bs) >> 9; offset = 0; QLIST_INIT(&meta.dependent_requests); meta.cluster_offset = 0; while (nb_sectors) { num = MIN(nb_sectors, INT_MAX >> 9); ret = qcow2_alloc_cluster_off... | 19,020 |
1 | static int msix_is_masked(PCIDevice *dev, int vector) { unsigned offset = vector * PCI_MSIX_ENTRY_SIZE + PCI_MSIX_ENTRY_VECTOR_CTRL; return dev->msix_function_masked || dev->msix_table_page[offset] & PCI_MSIX_ENTRY_CTRL_MASKBIT; } | 19,021 |
1 | static int vmdk_add_extent(BlockDriverState *bs, BlockDriverState *file, bool flat, int64_t sectors, int64_t l1_offset, int64_t l1_backup_offset, uint32_t l1_size, int l2_size, uint64_t cluster_sectors, VmdkExtent **new_extent) { VmdkExtent *extent; BDRVVmdkState *s = bs->opaque; if (cluster_sectors > 0x200000) { /* 0x... | 19,022 |
1 | static int get_stream_info(AVCodecContext *avctx) { FDKAACDecContext *s = avctx->priv_data; CStreamInfo *info = aacDecoder_GetStreamInfo(s->handle); int channel_counts[0x24] = { 0 }; int i, ch_error = 0; uint64_t ch_layout = 0; if (!info) { av_log(avctx, AV_LOG_ERROR, "Unable to get stream info\n"); return AVERROR_UNKN... | 19,024 |
1 | static void *qemu_rdma_data_init(const char *host_port, Error **errp) { RDMAContext *rdma = NULL; InetSocketAddress *addr; if (host_port) { rdma = g_malloc0(sizeof(RDMAContext)); memset(rdma, 0, sizeof(RDMAContext)); rdma->current_index = -1; rdma->current_chunk = -1; addr = inet_parse(host_port, NULL); if (addr != NUL... | 19,025 |
1 | static void test_tco_second_timeout_pause(void) { TestData td; const uint16_t ticks = TCO_SECS_TO_TICKS(32); QDict *ad; td.args = "-watchdog-action pause"; td.noreboot = false; test_init(&td); stop_tco(&td); clear_tco_status(&td); reset_on_second_timeout(true); set_tco_timeout(&td, TCO_SECS_TO_TICKS(16)); load_tco(&td)... | 19,026 |
0 | static void filter_mb_mbaff_edgev( H264Context *h, uint8_t *pix, int stride, const int16_t bS[7], int bsi, int qp ) { const int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8); int index_a = qp - qp_bd_offset + h->slice_alpha_c0_offset; int alpha = alpha_table[index_a]; int beta = beta_table[qp - qp_bd_offset + h->slice... | 19,028 |
0 | static int rtsp_read_packet(AVFormatContext *s, AVPacket *pkt) { RTSPState *rt = s->priv_data; int ret; RTSPMessageHeader reply1, *reply = &reply1; char cmd[1024]; if (rt->server_type == RTSP_SERVER_REAL) { int i; enum AVDiscard cache[MAX_STREAMS]; for (i = 0; i < s->nb_streams; i++) cache[i] = s->streams[i]->discard; ... | 19,029 |
0 | static int cudaupload_query_formats(AVFilterContext *ctx) { static const enum AVPixelFormat input_pix_fmts[] = { AV_PIX_FMT_NV12, AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_NONE, }; static const enum AVPixelFormat output_pix_fmts[] = { AV_PIX_FMT_CUDA, AV_PIX_FMT_NONE, }; AVFilterFormats *in_fmts = ff_make_form... | 19,030 |
0 | static void opt_audio_sample_fmt(const char *arg) { if (strcmp(arg, "list")) audio_sample_fmt = av_get_sample_fmt(arg); else { list_fmts(av_get_sample_fmt_string, AV_SAMPLE_FMT_NB); ffmpeg_exit(0); } } | 19,032 |
0 | static int wsvqa_read_header(AVFormatContext *s) { WsVqaDemuxContext *wsvqa = s->priv_data; AVIOContext *pb = s->pb; AVStream *st; unsigned char *header; unsigned char scratch[VQA_PREAMBLE_SIZE]; unsigned int chunk_tag; unsigned int chunk_size; int fps; /* initialize the video decoder stream */ st = avformat_new_stream... | 19,033 |
0 | static void flat_print_str(WriterContext *wctx, const char *key, const char *value) { FlatContext *flat = wctx->priv; AVBPrint buf; flat_print_key_prefix(wctx); av_bprint_init(&buf, 1, AV_BPRINT_SIZE_UNLIMITED); printf("%s=", flat_escape_key_str(&buf, key, flat->sep)); av_bprint_clear(&buf); printf("\"%s\"\n", flat_esc... | 19,034 |
0 | static int nut_write_packet(AVFormatContext *s, AVPacket *pkt){ NUTContext *nut = s->priv_data; StreamContext *nus= &nut->stream[pkt->stream_index]; AVIOContext *bc = s->pb, *dyn_bc; FrameCode *fc; int64_t coded_pts; int best_length, frame_code, flags, needed_flags, i, header_idx, best_header_idx; int key_frame = !!(pk... | 19,035 |
0 | ff_rm_parse_packet (AVFormatContext *s, ByteIOContext *pb, AVStream *st, RMStream *ast, int len, AVPacket *pkt, int *seq, int *flags, int64_t *timestamp) { RMDemuxContext *rm = s->priv_data; if (st->codec->codec_type == CODEC_TYPE_VIDEO) { rm->current_stream= st->id; if(rm_assemble_video_frame(s, pb, rm, ast, pkt, len)... | 19,036 |
0 | static int tiff_unpack_strip(TiffContext *s, uint8_t* dst, int stride, const uint8_t *src, int size, int lines){ int c, line, pixels, code; const uint8_t *ssrc = src; int width = ((s->width * s->bpp) + 7) >> 3; #if CONFIG_ZLIB uint8_t *zbuf; unsigned long outlen; if(s->compr == TIFF_DEFLATE || s->compr == TIFF_ADOBE_DE... | 19,037 |
0 | inline static void RENAME(hcscale)(SwsContext *c, uint16_t *dst, long dstWidth, const uint8_t *src1, const uint8_t *src2, int srcW, int xInc, int flags, const int16_t *hChrFilter, const int16_t *hChrFilterPos, int hChrFilterSize, enum PixelFormat srcFormat, uint8_t *formatConvBuffer, uint32_t *pal) { int32_t av_unused ... | 19,038 |
1 | static void user_async_cmd_handler(Monitor *mon, const mon_cmd_t *cmd, const QDict *params) { int ret; MonitorCompletionData *cb_data = g_malloc(sizeof(*cb_data)); cb_data->mon = mon; cb_data->user_print = cmd->user_print; monitor_suspend(mon); ret = cmd->mhandler.cmd_async(mon, params, user_monitor_complete, cb_data);... | 19,039 |
1 | static int rm_write_audio(AVFormatContext *s, const uint8_t *buf, int size, int flags) { uint8_t *buf1; RMMuxContext *rm = s->priv_data; AVIOContext *pb = s->pb; StreamInfo *stream = rm->audio_stream; int i; /* XXX: suppress this malloc */ buf1 = av_malloc(size * sizeof(uint8_t)); write_packet_header(s, stream, size, !... | 19,040 |
1 | static int lag_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; LagarithContext *l = avctx->priv_data; ThreadFrame frame = { .f = data }; AVFrame *const p = data; uint8_t frametype = 0; uint32_t offset_gu = 0, offset_bv = 0,... | 19,042 |
1 | void do_divdo (void) { if (likely(!(((int64_t)T0 == INT64_MIN && (int64_t)T1 == -1ULL) || (int64_t)T1 == 0))) { xer_ov = 0; T0 = (int64_t)T0 / (int64_t)T1; } else { xer_so = 1; xer_ov = 1; T0 = (-1ULL) * ((uint64_t)T0 >> 63); } } | 19,043 |
1 | void framebuffer_update_display( DisplaySurface *ds, MemoryRegionSection *mem_section, int cols, /* Width in pixels. */ int rows, /* Height in pixels. */ int src_width, /* Length of source line, in bytes. */ int dest_row_pitch, /* Bytes between adjacent horizontal output pixels. */ int dest_col_pitch, /* Bytes between ... | 19,044 |
1 | SPARCCPU *sparc64_cpu_devinit(const char *cpu_model, const char *default_cpu_model, uint64_t prom_addr) { SPARCCPU *cpu; CPUSPARCState *env; ResetData *reset_info; uint32_t tick_frequency = 100 * 1000000; uint32_t stick_frequency = 100 * 1000000; uint32_t hstick_frequency = 100 * 1000000; if (cpu_model == NULL) { cpu_m... | 19,045 |
1 | int ff_lzw_decode(LZWState *p, uint8_t *buf, int len){ int l, c, code, oc, fc; uint8_t *sp; struct LZWState *s = (struct LZWState *)p; if (s->end_code < 0) return 0; l = len; sp = s->sp; oc = s->oc; fc = s->fc; for (;;) { while (sp > s->stack) { *buf++ = *(--sp); if ((--l) == 0) goto the_end; } c = lzw_get_code(s); if ... | 19,046 |
1 | void ff_hyscale_fast_mmxext(SwsContext *c, int16_t *dst, int dstWidth, const uint8_t *src, int srcW, int xInc) { int32_t *filterPos = c->hLumFilterPos; int16_t *filter = c->hLumFilter; void *mmxextFilterCode = c->lumMmxextFilterCode; int i; #if ARCH_X86_64 uint64_t retsave; #else #if defined(PIC) uint64_t ebxsave; #end... | 19,047 |
1 | static int get_int32_equal(QEMUFile *f, void *pv, size_t size) { int32_t *v = pv; int32_t v2; qemu_get_sbe32s(f, &v2); if (*v == v2) { return 0; } return -EINVAL; } | 19,048 |
1 | static void FUNCC(pred4x4_vertical)(uint8_t *_src, const uint8_t *topright, int _stride){ pixel *src = (pixel*)_src; int stride = _stride/sizeof(pixel); const pixel4 a= ((pixel4*)(src-stride))[0]; ((pixel4*)(src+0*stride))[0]= a; ((pixel4*)(src+1*stride))[0]= a; ((pixel4*)(src+2*stride))[0]= a; ((pixel4*)(src+3*stride)... | 19,049 |
1 | static OfDpaGroup *of_dpa_group_alloc(uint32_t id) { OfDpaGroup *group = g_malloc0(sizeof(OfDpaGroup)); if (!group) { return NULL; } group->id = id; return group; } | 19,050 |
1 | static float get_band_cost_UQUAD_mips(struct AACEncContext *s, PutBitContext *pb, const float *in, const float *scaled, int size, int scale_idx, int cb, const float lambda, const float uplim, int *bits) { const float Q34 = ff_aac_pow34sf_tab[POW_SF2_ZERO - scale_idx + SCALE_ONE_POS - SCALE_DIV_512]; const float IQ = ff... | 19,052 |
1 | static void sdl_grab_start(void) { /* * If the application is not active, do not try to enter grab state. This * prevents 'SDL_WM_GrabInput(SDL_GRAB_ON)' from blocking all the * application (SDL bug). */ if (!(SDL_GetAppState() & SDL_APPINPUTFOCUS)) { return; } if (guest_cursor) { SDL_SetCursor(guest_sprite); if (!kbd_... | 19,053 |
1 | static void libschroedinger_free_frame(void *data) { FFSchroEncodedFrame *enc_frame = data; av_freep(&enc_frame->p_encbuf); av_free(enc_frame); } | 19,054 |
1 | static float quantize_band_cost(struct AACEncContext *s, const float *in, const float *scaled, int size, int scale_idx, int cb, const float lambda, const float uplim, int *bits, int rtz) { return get_band_cost(s, NULL, in, scaled, size, scale_idx, cb, lambda, uplim, bits); } | 19,055 |
1 | static void xhci_er_reset(XHCIState *xhci, int v) { XHCIInterrupter *intr = &xhci->intr[v]; XHCIEvRingSeg seg; if (intr->erstsz == 0) { /* disabled */ intr->er_start = 0; intr->er_size = 0; return; } /* cache the (sole) event ring segment location */ if (intr->erstsz != 1) { DPRINTF("xhci: invalid value for ERSTSZ: %d\... | 19,056 |
1 | DeviceState *qdev_try_create(BusState *bus, const char *type) { DeviceState *dev; if (object_class_by_name(type) == NULL) { return NULL; } dev = DEVICE(object_new(type)); if (!dev) { return NULL; } if (!bus) { bus = sysbus_get_default(); } qdev_set_parent_bus(dev, bus); object_unref(OBJECT(dev)); return dev; } | 19,057 |
1 | static int iscsi_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { IscsiLun *iscsilun = bs->opaque; struct iscsi_context *iscsi = NULL; struct iscsi_url *iscsi_url = NULL; struct scsi_task *task = NULL; struct scsi_inquiry_standard *inq = NULL; struct scsi_inquiry_supported_pages *inq_vpd; char *ini... | 19,058 |
1 | type_init(macio_register_types) void macio_init(PCIDevice *d, MemoryRegion *pic_mem, MemoryRegion *escc_mem) { MacIOState *macio_state = MACIO(d); macio_state->pic_mem = pic_mem; macio_state->escc_mem = escc_mem; /* Note: this code is strongly inspirated from the corresponding code in PearPC */ qdev_init_nofail(DEVICE(... | 19,059 |
1 | int net_client_init(QemuOpts *opts, int is_netdev, Error **errp) { const char *name; const char *type; int i; type = qemu_opt_get(opts, "type"); if (!type) { error_set(errp, QERR_MISSING_PARAMETER, "type"); return -1; } if (is_netdev) { if (strcmp(type, "tap") != 0 && #ifdef CONFIG_NET_BRIDGE strcmp(type, "bridge") != ... | 19,060 |
1 | static void usbredir_handle_interrupt_out_data(USBRedirDevice *dev, USBPacket *p, uint8_t ep) { /* Output interrupt endpoint, normal async operation */ struct usb_redir_interrupt_packet_header interrupt_packet; uint8_t buf[p->iov.size]; DPRINTF("interrupt-out ep %02X len %zd id %"PRIu64"\n", ep, p->iov.size, p->id); if... | 19,061 |
1 | static void push_output_configuration(AACContext *ac) { if (ac->oc[1].status == OC_LOCKED || ac->oc[0].status == OC_NONE) { ac->oc[0] = ac->oc[1]; } ac->oc[1].status = OC_NONE; } | 19,063 |
1 | dshow_cycle_devices(AVFormatContext *avctx, ICreateDevEnum *devenum, enum dshowDeviceType devtype, IBaseFilter **pfilter) { struct dshow_ctx *ctx = avctx->priv_data; IBaseFilter *device_filter = NULL; IEnumMoniker *classenum = NULL; IMoniker *m = NULL; const char *device_name = ctx->device_name[devtype]; int r; const G... | 19,064 |
1 | pp_context *pp_get_context(int width, int height, int cpuCaps){ PPContext *c= av_mallocz(sizeof(PPContext)); int stride= FFALIGN(width, 16); //assumed / will realloc if needed int qpStride= (width+15)/16 + 2; //assumed / will realloc if needed c->av_class = &av_codec_context_class; if(cpuCaps&PP_FORMAT){ c->hChromaSubS... | 19,066 |
1 | static void store_slice_c(uint8_t *dst, const int16_t *src, int dst_stride, int src_stride, int width, int height, int log2_scale) { int y, x; #define STORE(pos) do { \ temp = ((src[x + y * src_stride + pos] << log2_scale) + d[pos]) >> 8; \ if (temp & 0x100) temp = ~(temp >> 31); \ dst[x + y * dst_stride + pos] = temp;... | 19,067 |
1 | void helper_fxtract(void) { CPU86_LDoubleU temp; unsigned int expdif; temp.d = ST0; expdif = EXPD(temp) - EXPBIAS; /*DP exponent bias*/ ST0 = expdif; fpush(); BIASEXPONENT(temp); ST0 = temp.d; } | 19,068 |
1 | static void usb_msd_cancel_io(USBPacket *p, void *opaque) { MSDState *s = opaque; s->scsi_dev->info->cancel_io(s->scsi_dev, s->tag); s->packet = NULL; s->scsi_len = 0; } | 19,069 |
1 | static CharDriverState *qmp_chardev_open_udp(ChardevUdp *udp, Error **errp) { int fd; fd = socket_dgram(udp->remote, udp->local, errp); if (error_is_set(errp)) { return NULL; } return qemu_chr_open_udp_fd(fd); } | 19,070 |
1 | static av_always_inline void MPV_motion_internal(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int dir, uint8_t **ref_picture, op_pixels_func (*pix_op)[4], qpel_mc_func (*qpix_op)[16], int is_mpeg12) { int i; int mb_y = s->mb_y; prefetch_motion(s, ref_picture, dir); if (!is_mpeg12 && s->obmc &... | 19,071 |
1 | static av_cold int imc_decode_init(AVCodecContext * avctx) { int i, j; IMCContext *q = avctx->priv_data; double r1, r2; q->decoder_reset = 1; for(i = 0; i < BANDS; i++) q->old_floor[i] = 1.0; /* Build mdct window, a simple sine window normalized with sqrt(2) */ ff_sine_window_init(q->mdct_sine_window, COEFFS); for(i = ... | 19,072 |
1 | int av_append_packet(AVIOContext *s, AVPacket *pkt, int size) { int ret; int old_size; if (!pkt->size) return av_get_packet(s, pkt, size); old_size = pkt->size; ret = av_grow_packet(pkt, size); if (ret < 0) return ret; ret = avio_read(s, pkt->data + old_size, size); av_shrink_packet(pkt, old_size + FFMAX(ret, 0)); retu... | 19,073 |
1 | int ff_j2k_init_component(Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty, Jpeg2000QuantStyle *qntsty, int cbps, int dx, int dy, AVCodecContext *avctx) { uint8_t log2_band_prec_width, log2_band_prec_height; int reslevelno, bandno, gbandno = 0, ret, i, j, csize = 1; if (ret=ff_jpeg2000_dwt_init(&comp->dwt, comp->co... | 19,074 |
1 | static void gen_stx(DisasContext *dc, uint32_t code, uint32_t flags) { I_TYPE(instr, code); TCGv val = load_gpr(dc, instr.b); TCGv addr = tcg_temp_new(); tcg_gen_addi_tl(addr, load_gpr(dc, instr.a), instr.imm16s); tcg_gen_qemu_st_tl(val, addr, dc->mem_idx, flags); tcg_temp_free(addr); } | 19,076 |
1 | static void down_heap(uint32_t nr_heap, uint32_t *heap, uint32_t *weights) { uint32_t val = 1; uint32_t val2; uint32_t initial_val = heap[val]; while (1) { val2 = val << 1; if (val2 > nr_heap) break; if (val2 < nr_heap && weights[heap[val2 + 1]] < weights[heap[val2]]) val2++; if (weights[initial_val] < weights[heap[val... | 19,077 |
1 | static void dct_unquantize_mpeg1_mmx(MpegEncContext *s, DCTELEM *block, int n, int qscale) { int nCoeffs; const UINT16 *quant_matrix; if(s->alternate_scan) nCoeffs= 64; else nCoeffs= nCoeffs= zigzag_end[ s->block_last_index[n] ]; if (s->mb_intra) { int block0; if (n < 4) block0 = block[0] * s->y_dc_scale; else block0 =... | 19,078 |
1 | void RENAME(ff_init_mpadsp_tabs)(void) { int i, j; /* compute mdct windows */ for (i = 0; i < 36; i++) { for (j = 0; j < 4; j++) { double d; if (j == 2 && i % 3 != 1) continue; d = sin(M_PI * (i + 0.5) / 36.0); if (j == 1) { if (i >= 30) d = 0; else if (i >= 24) d = sin(M_PI * (i - 18 + 0.5) / 12.0); else if (i >= 18) ... | 19,079 |
1 | static int coroutine_fn bdrv_co_do_copy_on_readv(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov) { /* Perform I/O through a temporary buffer so that users who scribble over * their read buffer while the operation is in progress do not end up * modifying the image file. This is critical for... | 19,080 |
1 | static int local_create_mapped_attr_dir(FsContext *ctx, const char *path) { int err; char attr_dir[PATH_MAX]; char *tmp_path = strdup(path); snprintf(attr_dir, PATH_MAX, "%s/%s/%s", ctx->fs_root, dirname(tmp_path), VIRTFS_META_DIR); err = mkdir(attr_dir, 0700); if (err < 0 && errno == EEXIST) { err = 0; } free(tmp_path... | 19,081 |
1 | static int openpic_init(SysBusDevice *dev) { OpenPICState *opp = FROM_SYSBUS(typeof (*opp), dev); int i, j; struct memreg list_le[] = { {"glb", &openpic_glb_ops_le, true, OPENPIC_GLB_REG_START, OPENPIC_GLB_REG_SIZE}, {"tmr", &openpic_tmr_ops_le, true, OPENPIC_TMR_REG_START, OPENPIC_TMR_REG_SIZE}, {"msi", &openpic_msi_o... | 19,083 |
1 | static int tgq_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt){ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; const uint8_t *buf_start = buf; const uint8_t *buf_end = buf + buf_size; TgqContext *s = avctx->priv_data; int x,y; int big_endian = AV_RL32(&buf[4]) > 0x000FFFF... | 19,084 |
1 | static int handle_packet(MpegTSContext *ts, const uint8_t *packet) { MpegTSFilter *tss; int len, pid, cc, expected_cc, cc_ok, afc, is_start, is_discontinuity, has_adaptation, has_payload; const uint8_t *p, *p_end; int64_t pos; pid = AV_RB16(packet + 1) & 0x1fff; if (pid && discard_pid(ts, pid)) return 0; is_start = pac... | 19,085 |
1 | void qmp_guest_suspend_disk(Error **errp) { Error *local_err = NULL; GuestSuspendMode *mode = g_malloc(sizeof(GuestSuspendMode)); *mode = GUEST_SUSPEND_MODE_DISK; check_suspend_mode(*mode, &local_err); acquire_privilege(SE_SHUTDOWN_NAME, &local_err); execute_async(do_suspend, mode, &local_err); if (local_err) { error_p... | 19,086 |
0 | static void kvm_pit_put(PITCommonState *pit) { KVMPITState *s = KVM_PIT(pit); struct kvm_pit_state2 kpit; struct kvm_pit_channel_state *kchan; struct PITChannelState *sc; int i, ret; /* The offset keeps changing as long as the VM is stopped. */ if (s->vm_stopped) { kvm_pit_update_clock_offset(s); } kpit.flags = pit->ch... | 19,088 |
0 | static void vfio_rtl8168_window_quirk_write(void *opaque, hwaddr addr, uint64_t data, unsigned size) { VFIOQuirk *quirk = opaque; VFIOPCIDevice *vdev = quirk->vdev; switch (addr) { case 4: /* address */ if ((data & 0x7fff0000) == 0x10000) { if (data & 0x10000000U && vdev->pdev.cap_present & QEMU_PCI_CAP_MSIX) { trace_v... | 19,089 |
0 | static void hash32_bat_601_size(CPUPPCState *env, target_ulong *blp, int *validp, target_ulong batu, target_ulong batl) { target_ulong bl; int valid; bl = (batl & BATL32_601_BL) << 17; LOG_BATS("b %02x ==> bl " TARGET_FMT_lx " msk " TARGET_FMT_lx "\n", (uint8_t)(batl & BATL32_601_BL), bl, ~bl); valid = !!(batl & BATL32... | 19,091 |
0 | static size_t cache_get_cache_pos(const PageCache *cache, uint64_t address) { size_t pos; g_assert(cache->max_num_items); pos = (address / cache->page_size) & (cache->max_num_items - 1); return pos; } | 19,092 |
0 | void vnc_display_init(DisplayState *ds) { VncState *vs; vs = qemu_mallocz(sizeof(VncState)); if (!vs) exit(1); ds->opaque = vs; vnc_state = vs; vs->display = NULL; vs->password = NULL; vs->lsock = -1; vs->csock = -1; vs->depth = 4; vs->last_x = -1; vs->last_y = -1; vs->ds = ds; if (!keyboard_layout) keyboard_layout = "... | 19,093 |
0 | QemuOpts *qemu_opts_find(QemuOptsList *list, const char *id) { QemuOpts *opts; TAILQ_FOREACH(opts, &list->head, next) { if (!opts->id) { continue; } if (strcmp(opts->id, id) != 0) { continue; } return opts; } return NULL; } | 19,094 |
0 | static inline TranslationBlock *tb_find_fast(void) { TranslationBlock *tb; target_ulong cs_base, pc; int flags; /* we record a subset of the CPU state. It will always be the same before a given translated block is executed. */ cpu_get_tb_cpu_state(env, &pc, &cs_base, &flags); tb = env->tb_jmp_cache[tb_jmp_cache_hash_fu... | 19,095 |
0 | static void aio_timerlist_notify(void *opaque) { aio_notify(opaque); } | 19,096 |
0 | void qdev_free(DeviceState *dev) { #if 0 /* FIXME: need sane vmstate_unregister function */ if (dev->info->vmsd) vmstate_unregister(dev->info->vmsd, dev); #endif if (dev->info->reset) qemu_unregister_reset(dev->info->reset, dev); LIST_REMOVE(dev, sibling); qemu_free(dev); } | 19,097 |
0 | static inline void write_back_motion(H264Context *h, int mb_type){ MpegEncContext * const s = &h->s; const int b_xy = 4*s->mb_x + 4*s->mb_y*h->b_stride; const int b8_xy= 2*s->mb_x + 2*s->mb_y*h->b8_stride; int list; if(!USES_LIST(mb_type, 0)) fill_rectangle(&s->current_picture.ref_index[0][b8_xy], 2, 2, h->b8_stride, (... | 19,098 |
0 | cac_new_pki_applet(int i, const unsigned char *cert, int cert_len, VCardKey *key) { VCardAppletPrivate *applet_private = NULL; VCardApplet *applet = NULL; unsigned char pki_aid[] = { 0xa0, 0x00, 0x00, 0x00, 0x79, 0x01, 0x00 }; int pki_aid_len = sizeof(pki_aid); pki_aid[pki_aid_len-1] = i; applet_private = cac_new_pki_a... | 19,100 |
0 | static void omap_rtc_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size) { struct omap_rtc_s *s = (struct omap_rtc_s *) opaque; int offset = addr & OMAP_MPUI_REG_MASK; struct tm new_tm; time_t ti[2]; if (size != 1) { return omap_badwidth_write8(opaque, addr, value); } switch (offset) { case 0x00... | 19,101 |
0 | static void nbd_recv_coroutines_enter_all(BlockDriverState *bs) { NBDClientSession *s = nbd_get_client_session(bs); int i; for (i = 0; i < MAX_NBD_REQUESTS; i++) { if (s->recv_coroutine[i]) { qemu_coroutine_enter(s->recv_coroutine[i]); } } BDRV_POLL_WHILE(bs, s->read_reply_co); } | 19,103 |
0 | static void serial_xmit(void *opaque) { SerialState *s = opaque; uint64_t new_xmit_ts = qemu_get_clock_ns(vm_clock); if (s->tsr_retry <= 0) { if (s->fcr & UART_FCR_FE) { s->tsr = fifo_get(s,XMIT_FIFO); if (!s->xmit_fifo.count) s->lsr |= UART_LSR_THRE; } else { s->tsr = s->thr; s->lsr |= UART_LSR_THRE; } } if (s->mcr & ... | 19,104 |
0 | static int64_t coroutine_fn bdrv_co_get_block_status_above(BlockDriverState *bs, BlockDriverState *base, bool want_zero, int64_t sector_num, int nb_sectors, int *pnum, BlockDriverState **file) { BlockDriverState *p; int64_t ret = 0; bool first = true; assert(bs != base); for (p = bs; p != base; p = backing_bs(p)) { ret... | 19,105 |
0 | static void socket_start_incoming_migration(SocketAddressLegacy *saddr, Error **errp) { QIOChannelSocket *listen_ioc = qio_channel_socket_new(); qio_channel_set_name(QIO_CHANNEL(listen_ioc), "migration-socket-listener"); if (qio_channel_socket_listen_sync(listen_ioc, saddr, errp) < 0) { object_unref(OBJECT(listen_ioc))... | 19,106 |
0 | QemuOpts *vnc_parse_func(const char *str) { QemuOptsList *olist = qemu_find_opts("vnc"); QemuOpts *opts = qemu_opts_parse(olist, str, 1); const char *id = qemu_opts_id(opts); if (!id) { /* auto-assign id if not present */ vnc_auto_assign_id(olist, opts); } return opts; } | 19,107 |
0 | static void flush_dpb(AVCodecContext *avctx) { H264Context *h = avctx->priv_data; int i; memset(h->delayed_pic, 0, sizeof(h->delayed_pic)); ff_h264_flush_change(h); if (h->DPB) for (i = 0; i < H264_MAX_PICTURE_COUNT; i++) ff_h264_unref_picture(h, &h->DPB[i]); h->cur_pic_ptr = NULL; ff_h264_unref_picture(h, &h->cur_pic)... | 19,109 |
0 | static int64_t coroutine_fn vdi_co_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum) { /* TODO: Check for too large sector_num (in bdrv_is_allocated or here). */ BDRVVdiState *s = (BDRVVdiState *)bs->opaque; size_t bmap_index = sector_num / s->block_sectors; size_t sector_in_block = ... | 19,110 |
0 | static void coroutine_fn bdrv_aio_flush_co_entry(void *opaque) { BlockAIOCBCoroutine *acb = opaque; BlockDriverState *bs = acb->common.bs; acb->req.error = bdrv_co_flush(bs); acb->bh = aio_bh_new(bdrv_get_aio_context(bs), bdrv_co_em_bh, acb); qemu_bh_schedule(acb->bh); } | 19,111 |
0 | int qemu_v9fs_synth_add_file(V9fsSynthNode *parent, int mode, const char *name, v9fs_synth_read read, v9fs_synth_write write, void *arg) { int ret; V9fsSynthNode *node, *tmp; if (!v9fs_synth_fs) { return EAGAIN; } if (!name || (strlen(name) >= NAME_MAX)) { return EINVAL; } if (!parent) { parent = &v9fs_synth_root; } qe... | 19,112 |
0 | static void usage(const char *name) { (printf) ( "Usage: %s [OPTIONS] FILE\n" "QEMU Disk Network Block Device Server\n" "\n" " -h, --help display this help and exit\n" " -V, --version output version information and exit\n" "\n" "Connection properties:\n" " -p, --port=PORT port to listen on (default `%d')\n" " -b, --bin... | 19,113 |
0 | static void run_dependent_requests(QCowL2Meta *m) { QCowAIOCB *req; QCowAIOCB *next; /* Take the request off the list of running requests */ if (m->nb_clusters != 0) { LIST_REMOVE(m, next_in_flight); } /* * Restart all dependent requests. * Can't use LIST_FOREACH here - the next link might not be the same * any more af... | 19,114 |
0 | static void vt82c686b_pm_realize(PCIDevice *dev, Error **errp) { VT686PMState *s = DO_UPCAST(VT686PMState, dev, dev); uint8_t *pci_conf; pci_conf = s->dev.config; pci_set_word(pci_conf + PCI_COMMAND, 0); pci_set_word(pci_conf + PCI_STATUS, PCI_STATUS_FAST_BACK | PCI_STATUS_DEVSEL_MEDIUM); /* 0x48-0x4B is Power Manageme... | 19,117 |
0 | static int load_refcount_block(BlockDriverState *bs, int64_t refcount_block_offset, void **refcount_block) { BDRVQcow2State *s = bs->opaque; int ret; BLKDBG_EVENT(bs->file, BLKDBG_REFBLOCK_LOAD); ret = qcow2_cache_get(bs, s->refcount_block_cache, refcount_block_offset, refcount_block); return ret; } | 19,118 |
0 | static inline void gen_branch_cond(DisasContext *ctx, TCGCond cond, TCGv r1, TCGv r2, int16_t address) { int jumpLabel; jumpLabel = gen_new_label(); tcg_gen_brcond_tl(cond, r1, r2, jumpLabel); gen_goto_tb(ctx, 1, ctx->next_pc); gen_set_label(jumpLabel); gen_goto_tb(ctx, 0, ctx->pc + address * 2); } | 19,121 |
0 | void qmp_drive_mirror(const char *device, const char *target, bool has_format, const char *format, bool has_node_name, const char *node_name, bool has_replaces, const char *replaces, enum MirrorSyncMode sync, bool has_mode, enum NewImageMode mode, bool has_speed, int64_t speed, bool has_granularity, uint32_t granularit... | 19,123 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.