label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
0 | static int get_qcc(Jpeg2000DecoderContext *s, int n, Jpeg2000QuantStyle *q, uint8_t *properties) { int compno; if (s->buf_end - s->buf < 1) return AVERROR(EINVAL); compno = bytestream_get_byte(&s->buf); properties[compno] |= HAD_QCC; return get_qcx(s, n - 1, q + compno); } | 11,575 |
0 | static int mkv_write_tracks(AVFormatContext *s) { MatroskaMuxContext *mkv = s->priv_data; AVIOContext *dyn_cp, *pb = s->pb; ebml_master tracks; int i, ret, default_stream_exists = 0; ret = mkv_add_seekhead_entry(mkv->main_seekhead, MATROSKA_ID_TRACKS, avio_tell(pb)); if (ret < 0) return ret; ret = start_ebml_master_crc... | 11,576 |
1 | static void v9fs_stat(void *opaque) { int32_t fid; V9fsStat v9stat; ssize_t err = 0; size_t offset = 7; struct stat stbuf; V9fsFidState *fidp; V9fsPDU *pdu = opaque; V9fsState *s = pdu->s; pdu_unmarshal(pdu, offset, "d", &fid); fidp = get_fid(pdu, fid); if (fidp == NULL) { err = -ENOENT; goto out_nofid; } err = v9fs_co... | 11,577 |
1 | static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah, int Al){ int i, mb_x, mb_y; uint8_t* data[MAX_COMPONENTS]; int linesize[MAX_COMPONENTS]; for(i=0; i < nb_components; i++) { int c = s->comp_index[i]; data[c] = s->picture.data[c]; linesize[c]=s->linesize[c]; s->coefs_finished[c] |= 1; if(s->... | 11,578 |
0 | static double eval_expr(Parser *p, AVExpr *e) { switch (e->type) { case e_value: return e->value; case e_const: return e->value * p->const_values[e->a.const_index]; case e_func0: return e->value * e->a.func0(eval_expr(p, e->param[0])); case e_func1: return e->value * e->a.func1(p->opaque, eval_expr(p, e->param[0])); ca... | 11,579 |
1 | static int deband_16_coupling_c(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) { DebandContext *s = ctx->priv; ThreadData *td = arg; AVFrame *in = td->in; AVFrame *out = td->out; const int start = (s->planeheight[0] * jobnr ) / nb_jobs; const int end = (s->planeheight[0] * (jobnr+1)) / nb_jobs; int x, y, p, z... | 11,580 |
1 | static int tiff_decode_tag(TiffContext *s) { unsigned tag, type, count, off, value = 0; int i, j, k, pos, start; int ret; uint32_t *pal; double *dp; tag = tget_short(&s->gb, s->le); type = tget_short(&s->gb, s->le); count = tget_long(&s->gb, s->le); off = tget_long(&s->gb, s->le); start = bytestream2_tell(&s->gb); if (... | 11,581 |
1 | static void FUNC(put_hevc_epel_bi_w_v)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int16_t *src2, int height, int denom, int wx0, int wx1, int ox0, int ox1, intptr_t mx, intptr_t my, int width) { int x, y; pixel *src = (pixel *)_src; ptrdiff_t srcstride = _srcstride / sizeof(pixel); const ... | 11,582 |
1 | DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi) { const char *buf; const char *file = NULL; char devname[128]; const char *serial; const char *mediastr = ""; BlockInterfaceType type; enum { MEDIA_DISK, MEDIA_CDROM } media; int bus_id, unit_id; int cyls, heads, secs, translation; BlockDriver *drv = NULL; int ... | 11,583 |
1 | bool vhost_net_query(VHostNetState *net, VirtIODevice *dev) { return false; } | 11,584 |
1 | static int init_input(AVFormatContext *s, const char *filename) { int ret; AVProbeData pd = {filename, NULL, 0}; if (s->pb) { s->flags |= AVFMT_FLAG_CUSTOM_IO; if (!s->iformat) return av_probe_input_buffer(s->pb, &s->iformat, filename, s, 0, 0); else if (s->iformat->flags & AVFMT_NOFILE) av_log(s, AV_LOG_WARNING, "Cust... | 11,585 |
1 | void *etraxfs_eth_init(NICInfo *nd, CPUState *env, qemu_irq *irq, target_phys_addr_t base, int phyaddr) { struct etraxfs_dma_client *dma = NULL; struct fs_eth *eth = NULL; qemu_check_nic_model(nd, "fseth"); dma = qemu_mallocz(sizeof *dma * 2); eth = qemu_mallocz(sizeof *eth); dma[0].client.push = eth_tx_push; dma[0].cl... | 11,586 |
1 | static int gif_read_extension(GifState *s) { ByteIOContext *f = s->f; int ext_code, ext_len, i, gce_flags, gce_transparent_index; /* extension */ ext_code = get_byte(f); ext_len = get_byte(f); #ifdef DEBUG printf("gif: ext_code=0x%x len=%d\n", ext_code, ext_len); #endif switch(ext_code) { case 0xf9: if (ext_len != 4) g... | 11,587 |
1 | altivec_packIntArrayToCharArray(int *val, uint8_t* dest, int dstW) { register int i; vector unsigned int altivec_vectorShiftInt19 = vec_add(vec_splat_u32(10),vec_splat_u32(9)); if ((unsigned long)dest % 16) { /* badly aligned store, we force store alignement */ /* and will handle load misalignement on val w/ vec_perm *... | 11,588 |
1 | static void virtio_pci_realize(PCIDevice *pci_dev, Error **errp) { VirtIOPCIProxy *proxy = VIRTIO_PCI(pci_dev); VirtioPCIClass *k = VIRTIO_PCI_GET_CLASS(pci_dev); /* * virtio pci bar layout used by default. * subclasses can re-arrange things if needed. * * region 0 -- virtio legacy io bar * region 1 -- msi-x bar * regi... | 11,589 |
0 | static HTTPContext *find_rtp_session_with_url(const char *url, const char *session_id) { HTTPContext *rtp_c; char path1[1024]; const char *path; char buf[1024]; int s; rtp_c = find_rtp_session(session_id); if (!rtp_c) return NULL; /* find which url is asked */ url_split(NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url... | 11,590 |
0 | static void write_header(FFV1Context *f) { uint8_t state[CONTEXT_SIZE]; int i, j; RangeCoder *const c = &f->slice_context[0]->c; memset(state, 128, sizeof(state)); if (f->version < 2) { put_symbol(c, state, f->version, 0); put_symbol(c, state, f->ac, 0); if (f->ac > 1) { for (i = 1; i < 256; i++) put_symbol(c, state, f... | 11,591 |
0 | static void __attribute__((constructor)) init_main_loop(void) { init_clocks(); init_timer_alarm(); qemu_clock_enable(vm_clock, false); } | 11,593 |
0 | static unsigned tget_long(const uint8_t **p, int le) { unsigned v = le ? AV_RL32(*p) : AV_RB32(*p); *p += 4; return v; } | 11,594 |
0 | tcp_input(struct mbuf *m, int iphlen, struct socket *inso) { struct ip save_ip, *ip; register struct tcpiphdr *ti; caddr_t optp = NULL; int optlen = 0; int len, tlen, off; register struct tcpcb *tp = NULL; register int tiflags; struct socket *so = NULL; int todrop, acked, ourfinisacked, needoutput = 0; int iss = 0; u_l... | 11,596 |
0 | static bool cmd_identify(IDEState *s, uint8_t cmd) { if (s->bs && s->drive_kind != IDE_CD) { if (s->drive_kind != IDE_CFATA) { ide_identify(s); } else { ide_cfata_identify(s); } s->status = READY_STAT | SEEK_STAT; ide_transfer_start(s, s->io_buffer, 512, ide_transfer_stop); ide_set_irq(s->bus); return false; } else { i... | 11,598 |
0 | static coroutine_fn int dmg_co_read(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sectors) { int ret; BDRVDMGState *s = bs->opaque; qemu_co_mutex_lock(&s->lock); ret = dmg_read(bs, sector_num, buf, nb_sectors); qemu_co_mutex_unlock(&s->lock); return ret; } | 11,599 |
0 | static void cmd_read_cdvd_capacity(IDEState *s, uint8_t* buf) { uint64_t total_sectors = s->nb_sectors >> 2; if (total_sectors == 0) { ide_atapi_cmd_error(s, SENSE_NOT_READY, ASC_MEDIUM_NOT_PRESENT); return; } /* NOTE: it is really the number of sectors minus 1 */ cpu_to_ube32(buf, total_sectors - 1); cpu_to_ube32(buf ... | 11,600 |
0 | int64 float32_to_int64_round_to_zero( float32 a STATUS_PARAM ) { flag aSign; int16 aExp, shiftCount; bits32 aSig; bits64 aSig64; int64 z; aSig = extractFloat32Frac( a ); aExp = extractFloat32Exp( a ); aSign = extractFloat32Sign( a ); shiftCount = aExp - 0xBE; if ( 0 <= shiftCount ) { if ( a != 0xDF000000 ) { float_rais... | 11,601 |
0 | putsum(uint8_t *data, uint32_t n, uint32_t sloc, uint32_t css, uint32_t cse) { if (cse && cse < n) n = cse + 1; if (sloc < n-1) cpu_to_be16wu((uint16_t *)(data + sloc), do_cksum(data + css, data + n)); } | 11,602 |
0 | uint32_t HELPER(lcxbr)(CPUS390XState *env, uint32_t f1, uint32_t f2) { CPU_QuadU x1, x2; x2.ll.upper = env->fregs[f2].ll; x2.ll.lower = env->fregs[f2 + 2].ll; x1.q = float128_chs(x2.q); env->fregs[f1].ll = x1.ll.upper; env->fregs[f1 + 2].ll = x1.ll.lower; return set_cc_nz_f128(x1.q); } | 11,603 |
0 | static void pc_machine_set_nvdimm(Object *obj, bool value, Error **errp) { PCMachineState *pcms = PC_MACHINE(obj); pcms->nvdimm = value; } | 11,604 |
0 | static int dca_exss_parse_asset_header(DCAContext *s) { int header_pos = get_bits_count(&s->gb); int header_size; int channels; int embedded_stereo = 0; int embedded_6ch = 0; int drc_code_present; int extensions_mask; int i, j; if (get_bits_left(&s->gb) < 16) return -1; /* We will parse just enough to get to the extens... | 11,605 |
0 | static int uhci_broadcast_packet(UHCIState *s, USBPacket *p) { UHCIPort *port; USBDevice *dev; int i, ret; #ifdef DEBUG_PACKET { const char *pidstr; switch(p->pid) { case USB_TOKEN_SETUP: pidstr = "SETUP"; break; case USB_TOKEN_IN: pidstr = "IN"; break; case USB_TOKEN_OUT: pidstr = "OUT"; break; default: pidstr = "?"; ... | 11,606 |
0 | static inline PageDesc *page_find_alloc(target_ulong index) { PageDesc **lp, *p; lp = page_l1_map(index); if (!lp) return NULL; p = *lp; if (!p) { /* allocate if not found */ #if defined(CONFIG_USER_ONLY) unsigned long addr; size_t len = sizeof(PageDesc) * L2_SIZE; /* Don't use qemu_malloc because it may recurse. */ p ... | 11,607 |
0 | static void x86_cpu_apic_create(X86CPU *cpu, Error **errp) { DeviceState *dev = DEVICE(cpu); APICCommonState *apic; const char *apic_type = "apic"; if (kvm_irqchip_in_kernel()) { apic_type = "kvm-apic"; } else if (xen_enabled()) { apic_type = "xen-apic"; } cpu->apic_state = qdev_try_create(qdev_get_parent_bus(dev), api... | 11,609 |
0 | int select_watchdog_action(const char *p) { int action; char *qapi_value; qapi_value = g_ascii_strdown(p, -1); action = qapi_enum_parse(&WatchdogAction_lookup, qapi_value, -1, NULL); g_free(qapi_value); if (action < 0) return -1; watchdog_action = action; return 0; } | 11,610 |
0 | static void pty_chr_read(void *opaque) { CharDriverState *chr = opaque; PtyCharDriver *s = chr->opaque; int size, len; uint8_t buf[1024]; len = sizeof(buf); if (len > s->read_bytes) len = s->read_bytes; if (len == 0) return; size = read(s->fd, buf, len); if ((size == -1 && errno == EIO) || (size == 0)) { pty_chr_state(... | 11,614 |
0 | static void test_visitor_out_struct(TestOutputVisitorData *data, const void *unused) { TestStruct test_struct = { .integer = 42, .boolean = false, .string = (char *) "foo"}; TestStruct *p = &test_struct; QObject *obj; QDict *qdict; visit_type_TestStruct(data->ov, NULL, &p, &error_abort); obj = visitor_get(data); g_asse... | 11,615 |
0 | static inline int check_ap(CPUARMState *env, ARMMMUIdx mmu_idx, int ap, int domain_prot, int access_type) { int prot_ro; bool is_user = regime_is_user(env, mmu_idx); if (domain_prot == 3) { return PAGE_READ | PAGE_WRITE; } if (access_type == 1) { prot_ro = 0; } else { prot_ro = PAGE_READ; } switch (ap) { case 0: if (ar... | 11,617 |
0 | static int posix_aio_flush(void *opaque) { PosixAioState *s = opaque; return !!s->first_aio; } | 11,618 |
0 | static MemoryRegionSection *address_space_lookup_region(AddressSpaceDispatch *d, hwaddr addr, bool resolve_subpage) { MemoryRegionSection *section; subpage_t *subpage; section = phys_page_find(d->phys_map, addr, d->map.nodes, d->map.sections); if (resolve_subpage && section->mr->subpage) { subpage = container_of(sectio... | 11,619 |
0 | static void finish_read_pci_config(sPAPREnvironment *spapr, uint64_t buid, uint32_t addr, uint32_t size, target_ulong rets) { PCIDevice *pci_dev; uint32_t val; if ((size != 1) && (size != 2) && (size != 4)) { /* access must be 1, 2 or 4 bytes */ rtas_st(rets, 0, RTAS_OUT_HW_ERROR); return; } pci_dev = find_dev(spapr, b... | 11,620 |
0 | static void RENAME(interleaveBytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dest, long width, long height, long src1Stride, long src2Stride, long dstStride) { long h; for (h=0; h < height; h++) { long w; #if COMPILE_TEMPLATE_MMX #if COMPILE_TEMPLATE_SSE2 __asm__( "xor %%"REG_a", %%"REG_a" \n\t" "1: \n\t" PRE... | 11,621 |
0 | static int spapr_nvram_init(VIOsPAPRDevice *dev) { sPAPRNVRAM *nvram = VIO_SPAPR_NVRAM(dev); if (nvram->drive) { nvram->size = bdrv_getlength(nvram->drive); } else { nvram->size = DEFAULT_NVRAM_SIZE; nvram->buf = g_malloc0(nvram->size); } if ((nvram->size < MIN_NVRAM_SIZE) || (nvram->size > MAX_NVRAM_SIZE)) { fprintf(s... | 11,622 |
0 | static void test_io_channel_setup_async(SocketAddress *listen_addr, SocketAddress *connect_addr, QIOChannel **src, QIOChannel **dst) { QIOChannelSocket *lioc; struct TestIOChannelData data; data.loop = g_main_loop_new(g_main_context_default(), TRUE); lioc = qio_channel_socket_new(); qio_channel_socket_listen_async( lio... | 11,623 |
0 | iscsi_process_read(void *arg) { IscsiLun *iscsilun = arg; struct iscsi_context *iscsi = iscsilun->iscsi; aio_context_acquire(iscsilun->aio_context); iscsi_service(iscsi, POLLIN); iscsi_set_events(iscsilun); aio_context_release(iscsilun->aio_context); } | 11,625 |
0 | static int local_open2(FsContext *ctx, const char *path, int flags, mode_t mode) { return open(rpath(ctx, path), flags, mode); } | 11,626 |
0 | static int cpu_common_load(QEMUFile *f, void *opaque, int version_id) { CPUState *env = opaque; if (version_id != CPU_COMMON_SAVE_VERSION) return -EINVAL; qemu_get_be32s(f, &env->halted); qemu_get_be32s(f, &env->interrupt_request); env->interrupt_request &= ~CPU_INTERRUPT_EXIT; tlb_flush(env, 1); return 0; } | 11,627 |
0 | static void xhci_port_reset(XHCIPort *port) { trace_usb_xhci_port_reset(port->portnr); if (!xhci_port_have_device(port)) { return; } usb_device_reset(port->uport->dev); switch (port->uport->dev->speed) { case USB_SPEED_LOW: case USB_SPEED_FULL: case USB_SPEED_HIGH: set_field(&port->portsc, PLS_U0, PORTSC_PLS); trace_us... | 11,629 |
0 | static int block_crypto_create_generic(QCryptoBlockFormat format, const char *filename, QemuOpts *opts, Error **errp) { int ret = -EINVAL; QCryptoBlockCreateOptions *create_opts = NULL; QCryptoBlock *crypto = NULL; struct BlockCryptoCreateData data = { .size = ROUND_UP(qemu_opt_get_size_del(opts, BLOCK_OPT_SIZE, 0), BD... | 11,630 |
0 | static void vertical_filter(unsigned char *first_pixel, int stride, int *bounding_values) { int i; int filter_value; for (i = 0; i < 8; i++, first_pixel++) { filter_value = (first_pixel[-(2 * stride)] * 1) - (first_pixel[-(1 * stride)] * 3) + (first_pixel[ (0 )] * 3) - (first_pixel[ (1 * stride)] * 1); filter_value = b... | 11,632 |
0 | POWERPC_FAMILY(POWER8)(ObjectClass *oc, void *data) { DeviceClass *dc = DEVICE_CLASS(oc); PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc); dc->fw_name = "PowerPC,POWER8"; dc->desc = "POWER8"; dc->props = powerpc_servercpu_properties; pcc->pvr_match = ppc_pvr_match_power8; pcc->pcr_mask = PCR_COMPAT_2_05 | PCR_COMPAT_2_06;... | 11,633 |
0 | void qemu_aio_set_fd_handler(int fd, IOHandler *io_read, IOHandler *io_write, AioFlushHandler *io_flush, void *opaque) { aio_set_fd_handler(qemu_aio_context, fd, io_read, io_write, io_flush, opaque); qemu_set_fd_handler2(fd, NULL, io_read, io_write, opaque); } | 11,634 |
0 | static void apb_pci_config_write(void *opaque, target_phys_addr_t addr, uint64_t val, unsigned size) { APBState *s = opaque; val = qemu_bswap_len(val, size); APB_DPRINTF("%s: addr " TARGET_FMT_lx " val %" PRIx64 "\n", __func__, addr, val); pci_data_write(s->bus, addr, val, size); } | 11,636 |
0 | static inline bool extended_addresses_enabled(CPUARMState *env) { return arm_el_is_aa64(env, 1) || ((arm_feature(env, ARM_FEATURE_LPAE) && (env->cp15.c2_control & (1U << 31)))); } | 11,637 |
0 | void qmp_block_job_pause(const char *device, Error **errp) { BlockJob *job = find_block_job(device); if (!job) { error_set(errp, QERR_BLOCK_JOB_NOT_ACTIVE, device); return; } trace_qmp_block_job_pause(job); block_job_pause(job); } | 11,638 |
0 | void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) { struct socket *so, *so_next; int ret; global_readfds = readfds; global_writefds = writefds; global_xfds = xfds; /* Update time */ updtime(); /* * See if anything has timed out */ if (link_up) { if (time_fasttimo && ((curtime - time_fasttimo) >= 2... | 11,639 |
0 | static void raise_mmu_exception(CPUMIPSState *env, target_ulong address, int rw, int tlb_error) { CPUState *cs = CPU(mips_env_get_cpu(env)); int exception = 0, error_code = 0; switch (tlb_error) { default: case TLBRET_BADADDR: /* Reference to kernel address from user mode or supervisor mode */ /* Reference to superviso... | 11,640 |
0 | void ff_put_h264_qpel4_mc20_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_hz_4w_msa(src - 2, stride, dst, stride, 4); } | 11,643 |
0 | static int roq_encode_video(RoqContext *enc) { RoqTempdata *tempData = enc->tmpData; int i, ret; memset(tempData, 0, sizeof(*tempData)); ret = create_cel_evals(enc, tempData); if (ret < 0) return ret; ret = generate_new_codebooks(enc, tempData); if (ret < 0) return ret; if (enc->framesSinceKeyframe >= 1) { motion_searc... | 11,644 |
0 | static int raw_read_packet(AVFormatContext *s, AVPacket *pkt) { TAKDemuxContext *tc = s->priv_data; int ret; if (tc->mlast_frame) { AVIOContext *pb = s->pb; int64_t size, left; left = tc->data_end - avio_tell(s->pb); size = FFMIN(left, 1024); if (size <= 0) return AVERROR_EOF; ret = av_get_packet(pb, pkt, size); if (re... | 11,645 |
1 | uint64_t helper_mullv (uint64_t op1, uint64_t op2) { int64_t res = (int64_t)op1 * (int64_t)op2; if (unlikely((int32_t)res != res)) { arith_excp(env, GETPC(), EXC_M_IOV, 0); } return (int64_t)((int32_t)res); } | 11,647 |
1 | uint32_t hpet_in_legacy_mode(void) { if (hpet_statep) return hpet_statep->config & HPET_CFG_LEGACY; else return 0; } | 11,648 |
1 | make_setup_request (AVFormatContext *s, const char *host, int port, int lower_transport, const char *real_challenge) { RTSPState *rt = s->priv_data; int j, i, err; RTSPStream *rtsp_st; RTSPHeader reply1, *reply = &reply1; char cmd[2048]; const char *trans_pref; if (rt->server_type == RTSP_SERVER_REAL) trans_pref = "x-p... | 11,649 |
1 | static int ipvideo_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; IpvideoContext *s = avctx->priv_data; AVFrame *frame = data; int ret; int send_buffer; int frame_format; int video_data_size; if (av_packet_get_side_data(av... | 11,650 |
1 | static int qio_channel_websock_handshake_process(QIOChannelWebsock *ioc, char *buffer, Error **errp) { QIOChannelWebsockHTTPHeader hdrs[32]; size_t nhdrs = G_N_ELEMENTS(hdrs); const char *protocols = NULL, *version = NULL, *key = NULL, *host = NULL, *connection = NULL, *upgrade = NULL; nhdrs = qio_channel_websock_extra... | 11,651 |
0 | int attribute_align_arg avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, AVPacket *avpkt) { AVFrame frame; int ret, got_frame = 0; if (avctx->get_buffer != avcodec_default_get_buffer) { av_log(avctx, AV_LOG_ERROR, "Custom get_buffer() for use with" "avcodec_decode_audio3() detected. O... | 11,652 |
0 | void ff_put_h264_qpel16_mc02_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_vt_16w_msa(src - (stride * 2), stride, dst, stride, 16); } | 11,653 |
0 | int img_convert(AVPicture *dst, int dst_pix_fmt, AVPicture *src, int src_pix_fmt, int src_width, int src_height) { static int inited; int i, ret, dst_width, dst_height, int_pix_fmt; PixFmtInfo *src_pix, *dst_pix; ConvertEntry *ce; AVPicture tmp1, *tmp = &tmp1; if (src_pix_fmt < 0 || src_pix_fmt >= PIX_FMT_NB || dst_pix... | 11,654 |
1 | static void render_fragments(Vp3DecodeContext *s, int first_fragment, int fragment_width, int fragment_height, int plane /* 0 = Y, 1 = U, 2 = V */) { int x, y; int m, n; int i = first_fragment; int j; int16_t *dequantizer; DCTELEM dequant_block[64]; unsigned char *output_plane; unsigned char *last_plane; unsigned char ... | 11,655 |
1 | static int qemu_rbd_open(BlockDriverState *bs, QDict *options, int flags) { BDRVRBDState *s = bs->opaque; char pool[RBD_MAX_POOL_NAME_SIZE]; char snap_buf[RBD_MAX_SNAP_NAME_SIZE]; char conf[RBD_MAX_CONF_SIZE]; char clientname_buf[RBD_MAX_CONF_SIZE]; char *clientname; QemuOpts *opts; Error *local_err = NULL; const char ... | 11,656 |
1 | static void vnc_client_read(VncState *vs) { ssize_t ret; #ifdef CONFIG_VNC_SASL if (vs->sasl.conn && vs->sasl.runSSF) ret = vnc_client_read_sasl(vs); else #endif /* CONFIG_VNC_SASL */ ret = vnc_client_read_plain(vs); if (!ret) { if (vs->disconnecting) { vnc_disconnect_finish(vs); } return; } while (vs->read_handler && ... | 11,658 |
1 | static int wav_read_packet(AVFormatContext *s, AVPacket *pkt) { int ret, size; int64_t left; AVStream *st; WAVDemuxContext *wav = s->priv_data; if (CONFIG_SPDIF_DEMUXER && wav->spdif == 0 && s->streams[0]->codec->codec_tag == 1) { enum AVCodecID codec; ret = ff_spdif_probe(s->pb->buffer, s->pb->buf_end - s->pb->buffer,... | 11,659 |
1 | static uint32_t hpet_time_after(uint64_t a, uint64_t b) { return ((int32_t)(b) - (int32_t)(a) < 0); } | 11,660 |
1 | static int xenfb_map_fb(struct XenFB *xenfb) { struct xenfb_page *page = xenfb->c.page; char *protocol = xenfb->c.xendev.protocol; int n_fbdirs; xen_pfn_t *pgmfns = NULL; xen_pfn_t *fbmfns = NULL; void *map, *pd; int mode, ret = -1; /* default to native */ pd = page->pd; mode = sizeof(unsigned long) * 8; if (!protocol)... | 11,661 |
0 | static int queue_picture(VideoState *is, AVFrame *src_frame, double pts) { VideoPicture *vp; int dst_pix_fmt; AVPicture pict; static struct SwsContext *img_convert_ctx; /* wait until we have space to put a new picture */ SDL_LockMutex(is->pictq_mutex); while (is->pictq_size >= VIDEO_PICTURE_QUEUE_SIZE && !is->videoq.ab... | 11,663 |
0 | static int mov_write_wave_tag(AVIOContext *pb, MOVTrack *track) { int64_t pos = avio_tell(pb); avio_wb32(pb, 0); /* size */ ffio_wfourcc(pb, "wave"); if (track->enc->codec_id != AV_CODEC_ID_QDM2) { avio_wb32(pb, 12); /* size */ ffio_wfourcc(pb, "frma"); avio_wl32(pb, track->tag); } if (track->enc->codec_id == AV_CODEC_... | 11,664 |
0 | int av_read_frame(AVFormatContext *s, AVPacket *pkt) { const int genpts = s->flags & AVFMT_FLAG_GENPTS; int eof = 0; if (!genpts) return s->internal->packet_buffer ? read_from_packet_buffer(&s->internal->packet_buffer, &s->internal->packet_buffer_end, pkt) : read_frame_internal(s, pkt); for (;;) { int ret; AVPacketList... | 11,666 |
0 | static int coroutine_fn nfs_co_flush(BlockDriverState *bs) { NFSClient *client = bs->opaque; NFSRPC task; nfs_co_init_task(client, &task); if (nfs_fsync_async(client->context, client->fh, nfs_co_generic_cb, &task) != 0) { return -ENOMEM; } while (!task.complete) { nfs_set_events(client); qemu_coroutine_yield(); } retur... | 11,667 |
0 | static int qemu_rbd_create(const char *filename, QemuOpts *opts, Error **errp) { Error *local_err = NULL; int64_t bytes = 0; int64_t objsize; int obj_order = 0; const char *pool, *name, *conf, *clientname, *keypairs; const char *secretid; rados_t cluster; rados_ioctx_t io_ctx; QDict *options = NULL; QemuOpts *rbd_opts ... | 11,668 |
0 | static void port92_init(ISADevice *dev, qemu_irq *a20_out) { Port92State *s = PORT92(dev); s->a20_out = a20_out; } | 11,669 |
0 | static TCGv gen_mulu_i64_i32(TCGv a, TCGv b) { TCGv tmp1 = tcg_temp_new(TCG_TYPE_I64); TCGv tmp2 = tcg_temp_new(TCG_TYPE_I64); tcg_gen_extu_i32_i64(tmp1, a); dead_tmp(a); tcg_gen_extu_i32_i64(tmp2, b); dead_tmp(b); tcg_gen_mul_i64(tmp1, tmp1, tmp2); return tmp1; } | 11,670 |
0 | static void pxa2xx_rtc_piupdate(PXA2xxRTCState *s) { int64_t rt = qemu_get_clock(rt_clock); if (s->rtsr & (1 << 15)) s->last_swcr += rt - s->last_pi; s->last_pi = rt; } | 11,671 |
0 | int ioinst_handle_ssch(CPUS390XState *env, uint64_t reg1, uint32_t ipb) { int cssid, ssid, schid, m; SubchDev *sch; ORB *orig_orb, orb; uint64_t addr; int ret = -ENODEV; int cc; hwaddr len = sizeof(*orig_orb); if (ioinst_disassemble_sch_ident(reg1, &m, &cssid, &ssid, &schid)) { program_interrupt(env, PGM_OPERAND, 2); r... | 11,672 |
0 | int ioinst_handle_tpi(S390CPU *cpu, uint32_t ipb) { CPUS390XState *env = &cpu->env; uint64_t addr; int lowcore; IOIntCode int_code; hwaddr len; int ret; uint8_t ar; trace_ioinst("tpi"); addr = decode_basedisp_s(env, ipb, &ar); if (addr & 3) { program_interrupt(env, PGM_SPECIFICATION, 2); return -EIO; } lowcore = addr ?... | 11,673 |
0 | static int do_quit(Monitor *mon, const QDict *qdict, QObject **ret_data) { exit(0); return 0; } | 11,675 |
0 | void helper_ctc1(CPUMIPSState *env, target_ulong arg1, uint32_t fs, uint32_t rt) { switch (fs) { case 1: /* UFR Alias - Reset Status FR */ if (!((env->active_fpu.fcr0 & (1 << FCR0_UFRP)) && (rt == 0))) { return; } if (env->CP0_Config5 & (1 << CP0C5_UFR)) { env->CP0_Status &= ~(1 << CP0St_FR); compute_hflags(env); } els... | 11,676 |
0 | static void predictor_decode_stereo(APEContext *ctx, int count) { APEPredictor *p = &ctx->predictor; int32_t *decoded0 = ctx->decoded[0]; int32_t *decoded1 = ctx->decoded[1]; while (count--) { /* Predictor Y */ *decoded0 = predictor_update_filter(p, *decoded0, 0, YDELAYA, YDELAYB, YADAPTCOEFFSA, YADAPTCOEFFSB); decoded... | 11,677 |
0 | static bool rtas_event_log_contains(uint32_t event_mask, bool exception) { sPAPRMachineState *spapr = SPAPR_MACHINE(qdev_get_machine()); sPAPREventLogEntry *entry = NULL; /* we only queue EPOW events atm. */ if ((event_mask & EVENT_MASK_EPOW) == 0) { return false; } QTAILQ_FOREACH(entry, &spapr->pending_events, next) {... | 11,678 |
0 | void helper_ldq_raw(uint64_t t0, uint64_t t1) { ldq_raw(t1, t0); } | 11,679 |
0 | void qemu_bh_update_timeout(int *timeout) { QEMUBH *bh; for (bh = async_context->first_bh; bh; bh = bh->next) { if (!bh->deleted && bh->scheduled) { if (bh->idle) { /* idle bottom halves will be polled at least * every 10ms */ *timeout = MIN(10, *timeout); } else { /* non-idle bottom halves will be executed * immediate... | 11,680 |
0 | i2c_bus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base, qemu_irq sci_irq, qemu_irq cmos_s3, qemu_irq smi_irq, int kvm_enabled) { PCIDevice *dev; PIIX4PMState *s; dev = pci_create(bus, devfn, "PIIX4_PM"); qdev_prop_set_uint32(&dev->qdev, "smb_io_base", smb_io_base); s = DO_UPCAST(PIIX4PMState, dev, dev); s-... | 11,681 |
0 | static int get_phys_addr_v6(CPUARMState *env, uint32_t address, int access_type, ARMMMUIdx mmu_idx, hwaddr *phys_ptr, int *prot, target_ulong *page_size) { CPUState *cs = CPU(arm_env_get_cpu(env)); int code; uint32_t table; uint32_t desc; uint32_t xn; uint32_t pxn = 0; int type; int ap; int domain = 0; int domain_prot;... | 11,682 |
0 | static int vpc_create(const char *filename, QemuOpts *opts, Error **errp) { uint8_t buf[1024]; VHDFooter *footer = (VHDFooter *) buf; char *disk_type_param; int fd, i; uint16_t cyls = 0; uint8_t heads = 0; uint8_t secs_per_cyl = 0; int64_t total_sectors; int64_t total_size; int disk_type; int ret = -EIO; bool nocow = f... | 11,684 |
0 | static int rate_get_samples (struct audio_pcm_info *info, SpiceRateCtl *rate) { int64_t now; int64_t ticks; int64_t bytes; int64_t samples; now = qemu_get_clock (vm_clock); ticks = now - rate->start_ticks; bytes = muldiv64 (ticks, info->bytes_per_second, get_ticks_per_sec ()); samples = (bytes - rate->bytes_sent) >> in... | 11,686 |
0 | static void test_visitor_out_native_list_uint8(TestOutputVisitorData *data, const void *unused) { test_native_list(data, unused, USER_DEF_NATIVE_LIST_UNION_KIND_U8); } | 11,689 |
0 | static int alsa_run_out (HWVoiceOut *hw) { ALSAVoiceOut *alsa = (ALSAVoiceOut *) hw; int rpos, live, decr; int samples; uint8_t *dst; st_sample_t *src; snd_pcm_sframes_t avail; live = audio_pcm_hw_get_live_out (hw); if (!live) { return 0; } avail = alsa_get_avail (alsa->handle); if (avail < 0) { dolog ("Could not get n... | 11,690 |
0 | static int local_symlink(FsContext *ctx, const char *oldpath, const char *newpath) { return symlink(oldpath, rpath(ctx, newpath)); } | 11,694 |
1 | static void setup_rt_frame(int sig, struct target_sigaction *ka, target_siginfo_t *info, target_sigset_t *set, CPUX86State *env) { abi_ulong frame_addr, addr; struct rt_sigframe *frame; int i, err = 0; frame_addr = get_sigframe(ka, env, sizeof(*frame)); if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 0)) goto gi... | 11,695 |
1 | static void search_for_pns(AACEncContext *s, AVCodecContext *avctx, SingleChannelElement *sce) { FFPsyBand *band; int w, g, w2, i; float *PNS = &s->scoefs[0*128], *PNS34 = &s->scoefs[1*128]; float *NOR34 = &s->scoefs[3*128]; const float lambda = s->lambda; const float freq_mult = avctx->sample_rate/(1024.0f/sce->ics.nu... | 11,697 |
1 | static inline void dv_decode_video_segment(DVVideoContext *s, const uint8_t *buf_ptr1, const uint16_t *mb_pos_ptr) { int quant, dc, dct_mode, class1, j; int mb_index, mb_x, mb_y, v, last_index; int y_stride, i; DCTELEM *block, *block1; int c_offset; uint8_t *y_ptr; const uint8_t *buf_ptr; PutBitContext pb, vs_pb; GetBi... | 11,698 |
1 | static void set_sensor_evt_enable(IPMIBmcSim *ibs, uint8_t *cmd, unsigned int cmd_len, uint8_t *rsp, unsigned int *rsp_len, unsigned int max_rsp_len) { IPMISensor *sens; IPMI_CHECK_CMD_LEN(4); if ((cmd[2] > MAX_SENSORS) || !IPMI_SENSOR_GET_PRESENT(ibs->sensors + cmd[2])) { rsp[2] = IPMI_CC_REQ_ENTRY_NOT_PRESENT; return... | 11,699 |
1 | static inline void *host_from_stream_offset(QEMUFile *f, ram_addr_t offset, int flags) { static RAMBlock *block = NULL; char id[256]; uint8_t len; if (flags & RAM_SAVE_FLAG_CONTINUE) { if (!block) { error_report("Ack, bad migration stream!"); return NULL; } return memory_region_get_ram_ptr(block->mr) + offset; } len = ... | 11,700 |
1 | static int decode_hq_slice_row(AVCodecContext *avctx, void *arg, int jobnr, int threadnr) { int i; DiracContext *s = avctx->priv_data; DiracSlice *slices = ((DiracSlice *)arg) + s->num_x*jobnr; for (i = 0; i < s->num_x; i++) decode_hq_slice(avctx, &slices[i]); return 0; } | 11,701 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.