label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
0 | int pit_get_initial_count(PITState *pit, int channel) { PITChannelState *s = &pit->channels[channel]; return s->count; } | 9,569 |
0 | static void net_socket_update_fd_handler(NetSocketState *s) { qemu_set_fd_handler2(s->fd, s->read_poll ? net_socket_can_send : NULL, s->read_poll ? s->send_fn : NULL, s->write_poll ? net_socket_writable : NULL, s); } | 9,570 |
0 | static void bdrv_throttle_read_timer_cb(void *opaque) { BlockDriverState *bs = opaque; qemu_co_enter_next(&bs->throttled_reqs[0]); } | 9,571 |
0 | static void host_x86_cpu_initfn(Object *obj) { X86CPU *cpu = X86_CPU(obj); CPUX86State *env = &cpu->env; KVMState *s = kvm_state; /* We can't fill the features array here because we don't know yet if * "migratable" is true or false. */ cpu->host_features = true; /* If KVM is disabled, cpu_x86_create() will already repo... | 9,572 |
0 | void usb_device_attach(USBDevice *dev, Error **errp) { USBBus *bus = usb_bus_from_device(dev); USBPort *port = dev->port; char devspeed[32], portspeed[32]; assert(port != NULL); assert(!dev->attached); usb_mask_to_str(devspeed, sizeof(devspeed), dev->speedmask); usb_mask_to_str(portspeed, sizeof(portspeed), port->speed... | 9,573 |
0 | static void gen_store_exclusive(DisasContext *s, int rd, int rt, int rt2, TCGv_i32 addr, int size) { TCGv_i32 tmp; TCGv_i64 val64, extaddr; int done_label; int fail_label; /* if (env->exclusive_addr == addr && env->exclusive_val == [addr]) { [addr] = {Rt}; {Rd} = 0; } else { {Rd} = 1; } */ fail_label = gen_new_label();... | 9,575 |
0 | static int gdbserver_open(int port) { struct sockaddr_in sockaddr; int fd, ret; fd = socket(PF_INET, SOCK_STREAM, 0); if (fd < 0) { perror("socket"); return -1; } #ifndef _WIN32 fcntl(fd, F_SETFD, FD_CLOEXEC); #endif socket_set_fast_reuse(fd); sockaddr.sin_family = AF_INET; sockaddr.sin_port = htons(port); sockaddr.sin... | 9,578 |
0 | void bdrv_get_geometry_hint(BlockDriverState *bs, int *pcyls, int *pheads, int *psecs) { *pcyls = bs->cyls; *pheads = bs->heads; *psecs = bs->secs; } | 9,580 |
0 | static uint64_t arm_thiswdog_read(void *opaque, target_phys_addr_t addr, unsigned size) { arm_mptimer_state *s = (arm_mptimer_state *)opaque; int id = get_current_cpu(s); return timerblock_read(&s->timerblock[id * 2 + 1], addr, size); } | 9,581 |
0 | e1000_set_link_status(NetClientState *nc) { E1000State *s = qemu_get_nic_opaque(nc); uint32_t old_status = s->mac_reg[STATUS]; if (nc->link_down) { e1000_link_down(s); } else { if (s->compat_flags & E1000_FLAG_AUTONEG && s->phy_reg[PHY_CTRL] & MII_CR_AUTO_NEG_EN && s->phy_reg[PHY_CTRL] & MII_CR_RESTART_AUTO_NEG && !(s-... | 9,582 |
0 | static inline void backup_mb_border(H264Context *h, uint8_t *src_y, uint8_t *src_cb, uint8_t *src_cr, int linesize, int uvlinesize, int simple){ MpegEncContext * const s = &h->s; int i; int step = 1; int offset = 1; int uvoffset= 1; int top_idx = 1; int skiplast= 0; src_y -= linesize; src_cb -= uvlinesize; src_cr -= uv... | 9,587 |
0 | static ssize_t qio_channel_file_readv(QIOChannel *ioc, const struct iovec *iov, size_t niov, int **fds, size_t *nfds, Error **errp) { QIOChannelFile *fioc = QIO_CHANNEL_FILE(ioc); ssize_t ret; retry: ret = readv(fioc->fd, iov, niov); if (ret < 0) { if (errno == EAGAIN || errno == EWOULDBLOCK) { return QIO_CHANNEL_ERR_B... | 9,588 |
0 | int mmap_frag(unsigned long host_start, unsigned long start, unsigned long end, int prot, int flags, int fd, unsigned long offset) { unsigned long host_end, ret, addr; int prot1, prot_new; host_end = host_start + qemu_host_page_size; /* get the protection of the target pages outside the mapping */ prot1 = 0; for(addr =... | 9,589 |
0 | static int decode_cabac_field_decoding_flag(H264Context *h) { MpegEncContext * const s = &h->s; const int mb_x = s->mb_x; const int mb_y = s->mb_y & ~1; const int mba_xy = mb_x - 1 + mb_y *s->mb_stride; const int mbb_xy = mb_x + (mb_y-2)*s->mb_stride; unsigned int ctx = 0; if( h->slice_table[mba_xy] == h->slice_num && ... | 9,590 |
0 | static int bayer_to_rgb24_wrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]) { uint8_t *dstPtr= dst[0]; const uint8_t *srcPtr= src[0]; int i; void (*copy) (const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int width); void (*inter... | 9,591 |
0 | static void ff_h264_idct_add16_mmx(uint8_t *dst, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]){ int i; for(i=0; i<16; i++){ if(nnzc[ scan8[i] ]) ff_h264_idct_add_mmx(dst + block_offset[i], block + i*16, stride); } } | 9,592 |
0 | static char *make_digest_auth(HTTPAuthState *state, const char *username, const char *password, const char *uri, const char *method) { DigestParams *digest = &state->digest_params; int len; uint32_t cnonce_buf[2]; char cnonce[17]; char nc[9]; int i; char A1hash[33], A2hash[33], response[33]; struct AVMD5 *md5ctx; uint8... | 9,593 |
1 | static void vector_fmul_vfp(float *dst, const float *src, int len) { int tmp; asm volatile( "fmrx %[tmp], fpscr\n\t" "orr %[tmp], %[tmp], #(3 << 16)\n\t" /* set vector size to 4 */ "fmxr fpscr, %[tmp]\n\t" "fldmias %[dst_r]!, {s0-s3}\n\t" "fldmias %[src]!, {s8-s11}\n\t" "fldmias %[dst_r]!, {s4-s7}\n\t" "fldmias %[src]!... | 9,594 |
1 | static void decode_opc (CPUState *env, DisasContext *ctx, int *is_branch) { int32_t offset; int rs, rt, rd, sa; uint32_t op, op1, op2; int16_t imm; /* make sure instructions are on a word boundary */ if (ctx->pc & 0x3) { env->CP0_BadVAddr = ctx->pc; generate_exception(ctx, EXCP_AdEL); return; } /* Handle blikely not ta... | 9,595 |
1 | static void generate_2_noise_channels(MLPDecodeContext *m, unsigned int substr) { SubStream *s = &m->substream[substr]; unsigned int i; uint32_t seed = s->noisegen_seed; unsigned int maxchan = s->max_matrix_channel; for (i = 0; i < s->blockpos; i++) { uint16_t seed_shr7 = seed >> 7; m->sample_buffer[i][maxchan+1] = ((i... | 9,596 |
1 | static int filter_frame(AVFilterLink *inlink, AVFrame *frame) { AVFilterContext *ctx = inlink->dst; AudioEchoContext *s = ctx->priv; AVFrame *out_frame; if (av_frame_is_writable(frame)) { out_frame = frame; } else { out_frame = ff_get_audio_buffer(inlink, frame->nb_samples); if (!out_frame) return AVERROR(ENOMEM); av_f... | 9,597 |
1 | static int pci_add_option_rom(PCIDevice *pdev, bool is_default_rom) { int size; char *path; void *ptr; char name[32]; if (!pdev->romfile) return 0; if (strlen(pdev->romfile) == 0) return 0; if (!pdev->rom_bar) { /* * Load rom via fw_cfg instead of creating a rom bar, * for 0.11 compatibility. */ int class = pci_get_wor... | 9,599 |
1 | void qemu_system_reset_request(void) { if (no_reboot) { shutdown_requested = 1; } else { reset_requested = 1; } cpu_stop_current(); qemu_notify_event(); } | 9,600 |
1 | static void encode_frame(VC2EncContext *s, const AVFrame *frame, const char *aux_data, int field) { int i; /* Sequence header */ encode_parse_info(s, DIRAC_PCODE_SEQ_HEADER); encode_seq_header(s); /* Encoder version */ if (aux_data) { encode_parse_info(s, DIRAC_PCODE_AUX); avpriv_put_string(&s->pb, aux_data, 1); } /* P... | 9,601 |
1 | static void gen_tlbre_booke206(DisasContext *ctx) { #if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); #else if (unlikely(ctx->pr)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); return; } gen_helper_booke206_tlbre(cpu_env); #endif } | 9,602 |
1 | static inline av_flatten int get_symbol_inline(RangeCoder *c, uint8_t *state, int is_signed) { if (get_rac(c, state + 0)) return 0; else { int i, e, a; e = 0; while (get_rac(c, state + 1 + FFMIN(e, 9))) { // 1..10 e++; if (e > 31) return AVERROR_INVALIDDATA; } a = 1; for (i = e - 1; i >= 0; i--) a += a + get_rac(c, sta... | 9,603 |
1 | static int mpeg_mux_end(AVFormatContext *ctx) { MpegMuxContext *s = ctx->priv_data; StreamInfo *stream; int i; /* flush each packet */ for(i=0;i<ctx->nb_streams;i++) { stream = ctx->streams[i]->priv_data; while (stream->buffer_ptr > 0) { flush_packet(ctx, i, AV_NOPTS_VALUE, AV_NOPTS_VALUE, s->last_scr); } } /* End head... | 9,604 |
1 | static coroutine_fn int hdev_co_write_zeroes(BlockDriverState *bs, int64_t sector_num, int nb_sectors, BdrvRequestFlags flags) { BDRVRawState *s = bs->opaque; int rc; rc = fd_open(bs); if (rc < 0) { return rc; } if (!(flags & BDRV_REQ_MAY_UNMAP)) { return -ENOTSUP; } if (!s->discard_zeroes) { return -ENOTSUP; } return ... | 9,605 |
1 | theora_gptopts(AVFormatContext *ctx, int idx, uint64_t gp, int64_t *dts) { struct ogg *ogg = ctx->priv_data; struct ogg_stream *os = ogg->streams + idx; struct theora_params *thp = os->private; uint64_t iframe = gp >> thp->gpshift; uint64_t pframe = gp & thp->gpmask; if (thp->version < 0x030201) iframe++; if(!pframe) o... | 9,606 |
1 | static void qtrle_decode_32bpp(QtrleContext *s, int stream_ptr, int row_ptr, int lines_to_change) { int rle_code; int pixel_ptr; int row_inc = s->frame.linesize[0]; unsigned char a, r, g, b; unsigned int argb; unsigned char *rgb = s->frame.data[0]; int pixel_limit = s->frame.linesize[0] * s->avctx->height; while (lines... | 9,608 |
1 | int loader_exec(const char * filename, char ** argv, char ** envp, struct target_pt_regs * regs, struct image_info *infop) { struct linux_binprm bprm; int retval; int i; bprm.p = TARGET_PAGE_SIZE*MAX_ARG_PAGES-sizeof(unsigned int); for (i=0 ; i<MAX_ARG_PAGES ; i++) /* clear page-table */ bprm.page[i] = NULL; retval = o... | 9,609 |
1 | static av_always_inline SoftFloat autocorr_calc(int64_t accu) { int nz, mant, expo, round; int i = (int)(accu >> 32); if (i == 0) { nz = 1; } else { nz = 0; while (FFABS(i) < 0x40000000) { i <<= 1; nz++; } nz = 32-nz; } round = 1 << (nz-1); mant = (int)((accu + round) >> nz); mant = (mant + 0x40)>>7; mant <<= 6; expo =... | 9,610 |
1 | static void search_for_ms(AACEncContext *s, ChannelElement *cpe, const float lambda) { int start = 0, i, w, w2, g; float M[128], S[128]; float *L34 = s->scoefs, *R34 = s->scoefs + 128, *M34 = s->scoefs + 128*2, *S34 = s->scoefs + 128*3; SingleChannelElement *sce0 = &cpe->ch[0]; SingleChannelElement *sce1 = &cpe->ch[1];... | 9,612 |
1 | struct SwrContext *swr_alloc_set_opts(struct SwrContext *s, int64_t out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate, int64_t in_ch_layout, enum AVSampleFormat in_sample_fmt, int in_sample_rate, int log_offset, void *log_ctx){ if(!s) s= swr_alloc(); if(!s) return NULL; s->log_level_offset= log_off... | 9,614 |
1 | static int ipvideo_decode_block_opcode_0x8(IpvideoContext *s, AVFrame *frame) { int x, y; unsigned char P[4]; unsigned int flags = 0; /* 2-color encoding for each 4x4 quadrant, or 2-color encoding on * either top and bottom or left and right halves */ P[0] = bytestream2_get_byte(&s->stream_ptr); P[1] = bytestream2_get_... | 9,615 |
1 | FpPort *fp_port_alloc(Rocker *r, char *sw_name, MACAddr *start_mac, unsigned int index, NICPeers *peers) { FpPort *port = g_malloc0(sizeof(FpPort)); if (!port) { return NULL; } port->r = r; port->index = index; port->pport = index + 1; /* front-panel switch port names are 1-based */ port->name = g_strdup_printf("%sp%d"... | 9,617 |
1 | static void show_stream(AVFormatContext *fmt_ctx, int stream_idx) { AVStream *stream = fmt_ctx->streams[stream_idx]; AVCodecContext *dec_ctx; AVCodec *dec; const char *profile; char val_str[128]; AVRational display_aspect_ratio; probe_object_header("stream"); probe_int("index", stream->index); if ((dec_ctx = stream->co... | 9,618 |
0 | static int is_not_zero(const uint8_t *sector, int len) { /* * Use long as the biggest available internal data type that fits into the * CPU register and unroll the loop to smooth out the effect of memory * latency. */ int i; long d0, d1, d2, d3; const long * const data = (const long *) sector; len /= sizeof(long); for(... | 9,620 |
0 | static void taihu_405ep_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; CPUPPCState *env; qemu_irq *pic; ram_addr_t bios_offset; target_phys_addr_t ram_bases[2], ram_sizes[2]; target_ulong b... | 9,621 |
0 | static int decode_frame_header (bit_buffer_t *bitbuf,MpegEncContext *s) { int frame_size_code; /* unknown field */ get_bits (bitbuf, 8); /* frame type */ s->pict_type = get_bits (bitbuf, 2); if (s->pict_type == 3) return -1; if (s->pict_type == SVQ1_FRAME_INTRA) { /* unknown fields */ if (s->f_code == 0x50 || s->f_code... | 9,622 |
0 | static void posix_aio_read(void *opaque) { PosixAioState *s = opaque; RawAIOCB *acb, **pacb; int ret; ssize_t len; /* read all bytes from signal pipe */ for (;;) { char bytes[16]; len = read(s->rfd, bytes, sizeof(bytes)); if (len == -1 && errno == EINTR) continue; /* try again */ if (len == sizeof(bytes)) continue; /* ... | 9,623 |
0 | static int usbredir_handle_data(USBDevice *udev, USBPacket *p) { USBRedirDevice *dev = DO_UPCAST(USBRedirDevice, dev, udev); uint8_t ep; ep = p->devep; if (p->pid == USB_TOKEN_IN) { ep |= USB_DIR_IN; } switch (dev->endpoint[EP2I(ep)].type) { case USB_ENDPOINT_XFER_CONTROL: ERROR("handle_data called for control transfer... | 9,624 |
0 | int kvm_s390_vcpu_interrupt_post_load(S390CPU *cpu) { CPUState *cs = CPU(cpu); struct kvm_s390_irq_state irq_state; int r; if (!kvm_check_extension(kvm_state, KVM_CAP_S390_IRQ_STATE)) { return -ENOSYS; } if (cpu->irqstate_saved_size == 0) { return 0; } irq_state.buf = (uint64_t) cpu->irqstate; irq_state.len = cpu->irqs... | 9,625 |
0 | void do_info_roms(Monitor *mon) { Rom *rom; QTAILQ_FOREACH(rom, &roms, next) { if (!rom->fw_file) { monitor_printf(mon, "addr=" TARGET_FMT_plx " size=0x%06zx mem=%s name=\"%s\" \n", rom->addr, rom->romsize, rom->isrom ? "rom" : "ram", rom->name); } else { monitor_printf(mon, "fw=%s%s%s" " size=0x%06zx name=\"%s\" \n", ... | 9,626 |
0 | static void do_smbios_option(const char *optarg) { if (smbios_entry_add(optarg) < 0) { fprintf(stderr, "Wrong smbios provided\n"); exit(1); } } | 9,628 |
0 | static ExitStatus gen_store_conditional(DisasContext *ctx, int ra, int rb, int32_t disp16, int quad) { TCGv addr; if (ra == 31) { /* ??? Don't bother storing anything. The user can't tell the difference, since the zero register always reads zero. */ return NO_EXIT; } #if defined(CONFIG_USER_ONLY) addr = cpu_lock_st_add... | 9,631 |
0 | static int mp_pacl_setxattr(FsContext *ctx, const char *path, const char *name, void *value, size_t size, int flags) { char buffer[PATH_MAX]; return lsetxattr(rpath(ctx, path, buffer), MAP_ACL_ACCESS, value, size, flags); } | 9,632 |
0 | static int mkv_write_attachments(AVFormatContext *s) { MatroskaMuxContext *mkv = s->priv_data; AVIOContext *dyn_cp, *pb = s->pb; ebml_master attachments; AVLFG c; int i, ret; if (!mkv->have_attachments) return 0; mkv->attachments = av_mallocz(sizeof(*mkv->attachments)); if (!mkv->attachments) return ret; av_lfg_init(&c... | 9,633 |
0 | static void spr_write_dbatu (void *opaque, int sprn) { DisasContext *ctx = opaque; gen_op_store_dbatu((sprn - SPR_DBAT0U) / 2); RET_STOP(ctx); } | 9,634 |
0 | void vga_hw_invalidate(void) { if (active_console->hw_invalidate) active_console->hw_invalidate(active_console->hw); } | 9,635 |
0 | static uint32_t pmac_ide_readw (void *opaque,target_phys_addr_t addr) { uint16_t retval; MACIOIDEState *d = opaque; addr = (addr & 0xFFF) >> 4; if (addr == 0) { retval = ide_data_readw(&d->bus, 0); } else { retval = 0xFFFF; } retval = bswap16(retval); return retval; } | 9,636 |
0 | DeviceState *pxa2xx_gpio_init(target_phys_addr_t base, CPUState *env, qemu_irq *pic, int lines) { DeviceState *dev; dev = qdev_create(NULL, "pxa2xx-gpio"); qdev_prop_set_int32(dev, "lines", lines); qdev_prop_set_int32(dev, "ncpu", env->cpu_index); qdev_init_nofail(dev); sysbus_mmio_map(sysbus_from_qdev(dev), 0, base); ... | 9,637 |
0 | static void v9fs_renameat(void *opaque) { ssize_t err = 0; size_t offset = 7; V9fsPDU *pdu = opaque; V9fsState *s = pdu->s; int32_t olddirfid, newdirfid; V9fsString old_name, new_name; pdu_unmarshal(pdu, offset, "dsds", &olddirfid, &old_name, &newdirfid, &new_name); v9fs_path_write_lock(s); err = v9fs_complete_renameat... | 9,638 |
0 | static int ssi_sd_init(SSISlave *d) { DeviceState *dev = DEVICE(d); ssi_sd_state *s = FROM_SSI_SLAVE(ssi_sd_state, d); DriveInfo *dinfo; s->mode = SSI_SD_CMD; dinfo = drive_get_next(IF_SD); s->sd = sd_init(dinfo ? blk_bs(blk_by_legacy_dinfo(dinfo)) : NULL, true); if (s->sd == NULL) { return -1; } register_savevm(dev, "... | 9,640 |
0 | static int vfio_mmap_bar(VFIOBAR *bar, MemoryRegion *mem, MemoryRegion *submem, void **map, size_t size, off_t offset, const char *name) { int ret = 0; if (size && bar->flags & VFIO_REGION_INFO_FLAG_MMAP) { int prot = 0; if (bar->flags & VFIO_REGION_INFO_FLAG_READ) { prot |= PROT_READ; } if (bar->flags & VFIO_REGION_IN... | 9,641 |
0 | int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic){ AVFrame temp_pic; int i; assert(s->codec_type == AVMEDIA_TYPE_VIDEO); if (pic->data[0] && (pic->width != s->width || pic->height != s->height || pic->format != s->pix_fmt)) { av_log(s, AV_LOG_WARNING, "Picture changed from size:%dx%d fmt:%s to size:%dx%... | 9,644 |
0 | void helper_ldfsr(CPUSPARCState *env, uint32_t new_fsr) { env->fsr = (new_fsr & FSR_LDFSR_MASK) | (env->fsr & FSR_LDFSR_OLDMASK); set_fsr(env); } | 9,645 |
0 | void qemu_thread_self(QemuThread *thread) { thread->thread = pthread_self(); } | 9,646 |
1 | static int create_shared_memory_BAR(IVShmemState *s, int fd, uint8_t attr, Error **errp) { void * ptr; ptr = mmap(0, s->ivshmem_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); if (ptr == MAP_FAILED) { error_setg_errno(errp, errno, "Failed to mmap shared memory"); return -1; } s->shm_fd = fd; memory_region_init_ram_ptr(... | 9,648 |
1 | static av_always_inline int vc1_filter_line(uint8_t* src, int stride, int pq){ uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; int a0 = (2*(src[-2*stride] - src[ 1*stride]) - 5*(src[-1*stride] - src[ 0*stride]) + 4) >> 3; int a0_sign = a0 >> 31; /* Store sign */ a0 = (a0 ^ a0_sign) - a0_sign; /* a0 = FFABS(a0); */ if(a0 < pq)... | 9,652 |
0 | static AVCodec *choose_codec(OptionsContext *o, AVFormatContext *s, AVStream *st, enum AVMediaType type) { char *codec_name = NULL; MATCH_PER_STREAM_OPT(codec_names, str, codec_name, s, st); if (!codec_name) { if (s->oformat) { st->codec->codec_id = av_guess_codec(s->oformat, NULL, s->filename, NULL, type); return avco... | 9,653 |
1 | static uint16_t nvme_create_cq(NvmeCtrl *n, NvmeCmd *cmd) { NvmeCQueue *cq; NvmeCreateCq *c = (NvmeCreateCq *)cmd; uint16_t cqid = le16_to_cpu(c->cqid); uint16_t vector = le16_to_cpu(c->irq_vector); uint16_t qsize = le16_to_cpu(c->qsize); uint16_t qflags = le16_to_cpu(c->cq_flags); uint64_t prp1 = le64_to_cpu(c->prp1);... | 9,654 |
1 | static void FUNC(put_hevc_epel_bi_w_hv)(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); pixel... | 9,655 |
1 | static int vc1_decode_p_mb(VC1Context *v, DCTELEM block[6][64]) { MpegEncContext *s = &v->s; GetBitContext *gb = &s->gb; int i, j; int mb_pos = s->mb_x + s->mb_y * s->mb_stride; int cbp; /* cbp decoding stuff */ int mqdiff, mquant; /* MB quantization */ int ttmb = v->ttfrm; /* MB Transform type */ int status; static co... | 9,656 |
1 | void qemu_co_rwlock_rdlock(CoRwlock *lock) { while (lock->writer) { qemu_co_queue_wait(&lock->queue); } lock->reader++; } | 9,657 |
1 | static Qcow2BitmapList *bitmap_list_load(BlockDriverState *bs, uint64_t offset, uint64_t size, Error **errp) { int ret; BDRVQcow2State *s = bs->opaque; uint8_t *dir, *dir_end; Qcow2BitmapDirEntry *e; uint32_t nb_dir_entries = 0; Qcow2BitmapList *bm_list = NULL; if (size == 0) { error_setg(errp, "Requested bitmap direct... | 9,658 |
0 | static void test_copy(const AVCodec *c1, const AVCodec *c2) { AVCodecContext *ctx1, *ctx2; printf("%s -> %s\nclosed:\n", c1 ? c1->name : "NULL", c2 ? c2->name : "NULL"); ctx1 = avcodec_alloc_context3(c1); ctx2 = avcodec_alloc_context3(c2); ctx1->width = ctx1->height = 128; if (ctx2->codec && ctx2->codec->priv_class && ... | 9,662 |
0 | static int process_audio_header_elements(AVFormatContext *s) { int inHeader = 1; EaDemuxContext *ea = s->priv_data; ByteIOContext *pb = &s->pb; int compression_type; ea->num_channels = 1; while (inHeader) { int inSubheader; uint8_t byte; byte = get_byte(pb); switch (byte) { case 0xFD: av_log (s, AV_LOG_INFO, "entered a... | 9,663 |
0 | static int vc1_decode_b_mb_intfr(VC1Context *v) { MpegEncContext *s = &v->s; GetBitContext *gb = &s->gb; int i, j; int mb_pos = s->mb_x + s->mb_y * s->mb_stride; int cbp = 0; /* cbp decoding stuff */ int mqdiff, mquant; /* MB quantization */ int ttmb = v->ttfrm; /* MB Transform type */ int mvsw = 0; /* motion vector sw... | 9,664 |
0 | static void search_for_pns(AACEncContext *s, AVCodecContext *avctx, SingleChannelElement *sce) { int start = 0, w, w2, g; const float lambda = s->lambda; const float freq_mult = avctx->sample_rate/(1024.0f/sce->ics.num_windows)/2.0f; const float spread_threshold = NOISE_SPREAD_THRESHOLD*(lambda/120.f); const float thr_... | 9,665 |
0 | static void curses_calc_pad(void) { if (is_graphic_console()) { width = gwidth; height = gheight; } else { width = COLS; height = LINES; } if (screenpad) delwin(screenpad); clear(); refresh(); screenpad = newpad(height, width); if (width > COLS) { px = (width - COLS) / 2; sminx = 0; smaxx = COLS; } else { px = 0; sminx... | 9,667 |
0 | static void fpu_dump_state(CPUState *env, FILE *f, int (*fpu_fprintf)(FILE *f, const char *fmt, ...), int flags) { int i; int is_fpu64 = !!(env->hflags & MIPS_HFLAG_F64); #define printfpr(fp) \ do { \ if (is_fpu64) \ fpu_fprintf(f, "w:%08x d:%016" PRIx64 \ " fd:%13g fs:%13g psu: %13g\n", \ (fp)->w[FP_ENDIAN_IDX], (fp)-... | 9,668 |
0 | static void qxl_hw_screen_dump(void *opaque, const char *filename, bool cswitch, Error **errp) { PCIQXLDevice *qxl = opaque; VGACommonState *vga = &qxl->vga; switch (qxl->mode) { case QXL_MODE_COMPAT: case QXL_MODE_NATIVE: qxl_render_update(qxl); ppm_save(filename, qxl->ssd.ds, errp); break; case QXL_MODE_VGA: vga->scr... | 9,671 |
0 | void qmp_input_send_event(int64_t console, InputEventList *events, Error **errp) { InputEventList *e; QemuConsole *con; con = qemu_console_lookup_by_index(console); if (!con) { error_setg(errp, "console %" PRId64 " not found", console); return; } if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) { err... | 9,672 |
0 | static av_cold int cuvid_decode_init(AVCodecContext *avctx) { CuvidContext *ctx = avctx->priv_data; AVCUDADeviceContext *device_hwctx; AVHWDeviceContext *device_ctx; AVHWFramesContext *hwframe_ctx; CUVIDSOURCEDATAPACKET seq_pkt; CUcontext cuda_ctx = NULL; CUcontext dummy; const AVBitStreamFilter *bsf; int ret = 0; enum... | 9,673 |
0 | static void default_end_frame(AVFilterLink *inlink) { AVFilterLink *outlink = NULL; if (inlink->dst->nb_outputs) outlink = inlink->dst->outputs[0]; if (outlink) { if (outlink->out_buf) { avfilter_unref_buffer(outlink->out_buf); outlink->out_buf = NULL; } ff_end_frame(outlink); } } | 9,674 |
0 | static inline void gen_op_addq_ESP_im(int32_t val) { tcg_gen_ld_tl(cpu_tmp0, cpu_env, offsetof(CPUState, regs[R_ESP])); tcg_gen_addi_tl(cpu_tmp0, cpu_tmp0, val); tcg_gen_st_tl(cpu_tmp0, cpu_env, offsetof(CPUState, regs[R_ESP])); } | 9,675 |
0 | static int img_snapshot(int argc, char **argv) { BlockDriverState *bs; QEMUSnapshotInfo sn; char *filename, *snapshot_name = NULL; int c, ret = 0, bdrv_oflags; int action = 0; qemu_timeval tv; bdrv_oflags = BDRV_O_FLAGS | BDRV_O_RDWR; /* Parse commandline parameters */ for(;;) { c = getopt(argc, argv, "la:c:d:h"); if (... | 9,676 |
0 | static void pcnet_aprom_writeb(void *opaque, uint32_t addr, uint32_t val) { PCNetState *s = opaque; #ifdef PCNET_DEBUG printf("pcnet_aprom_writeb addr=0x%08x val=0x%02x\n", addr, val); #endif /* Check APROMWE bit to enable write access */ if (pcnet_bcr_readw(s,2) & 0x100) s->prom[addr & 15] = val; } | 9,677 |
0 | static int qcow2_create2(const char *filename, int64_t total_size, const char *backing_file, const char *backing_format, int flags, size_t cluster_size, PreallocMode prealloc, QemuOpts *opts, int version, int refcount_order, const char *encryptfmt, Error **errp) { int cluster_bits; QDict *options; /* Calculate cluster_... | 9,679 |
0 | static int protocol_version(VncState *vs, char *version, size_t len) { char local[13]; int maj, min; memcpy(local, version, 12); local[12] = 0; if (sscanf(local, "RFB %03d.%03d\n", &maj, &min) != 2) { vnc_client_error(vs); return 0; } vnc_write_u32(vs, 1); /* None */ vnc_flush(vs); vnc_read_when(vs, protocol_client_ini... | 9,680 |
0 | void ppce500_init(MachineState *machine, PPCE500Params *params) { MemoryRegion *address_space_mem = get_system_memory(); MemoryRegion *ram = g_new(MemoryRegion, 1); PCIBus *pci_bus; CPUPPCState *env = NULL; uint64_t elf_entry; uint64_t elf_lowaddr; hwaddr entry=0; hwaddr loadaddr=UIMAGE_LOAD_BASE; target_long kernel_si... | 9,681 |
0 | static void virtio_net_set_mrg_rx_bufs(VirtIONet *n, int mergeable_rx_bufs) { int i; NetClientState *nc; n->mergeable_rx_bufs = mergeable_rx_bufs; n->guest_hdr_len = n->mergeable_rx_bufs ? sizeof(struct virtio_net_hdr_mrg_rxbuf) : sizeof(struct virtio_net_hdr); for (i = 0; i < n->max_queues; i++) { nc = qemu_get_subque... | 9,682 |
0 | void qemu_acl_reset(qemu_acl *acl) { qemu_acl_entry *entry; /* Put back to deny by default, so there is no window * of "open access" while the user re-initializes the * access control list */ acl->defaultDeny = 1; TAILQ_FOREACH(entry, &acl->entries, next) { TAILQ_REMOVE(&acl->entries, entry, next); free(entry->match); ... | 9,684 |
0 | static void mov_fix_index(MOVContext *mov, AVStream *st) { MOVStreamContext *msc = st->priv_data; AVIndexEntry *e_old = st->index_entries; int nb_old = st->nb_index_entries; const AVIndexEntry *e_old_end = e_old + nb_old; const AVIndexEntry *current = NULL; MOVStts *ctts_data_old = msc->ctts_data; int64_t ctts_index_ol... | 9,685 |
0 | int scsi_bus_legacy_handle_cmdline(SCSIBus *bus) { Location loc; DriveInfo *dinfo; int res = 0, unit; loc_push_none(&loc); for (unit = 0; unit < MAX_SCSI_DEVS; unit++) { dinfo = drive_get(IF_SCSI, bus->busnr, unit); if (dinfo == NULL) { continue; } qemu_opts_loc_restore(dinfo->opts); if (!scsi_bus_legacy_add_drive(bus,... | 9,686 |
0 | static void hda_codec_device_class_init(ObjectClass *klass, void *data) { DeviceClass *k = DEVICE_CLASS(klass); k->realize = hda_codec_dev_realize; k->exit = hda_codec_dev_exit; set_bit(DEVICE_CATEGORY_SOUND, k->categories); k->bus_type = TYPE_HDA_BUS; k->props = hda_props; } | 9,687 |
0 | static inline void downmix_stereo_to_mono(float *samples) { int i; for (i = 0; i < 256; i++) { samples[i] += samples[i + 256]; samples[i + 256] = 0; } } | 9,690 |
0 | static int thread_execute2(AVCodecContext *avctx, action_func2* func2, void *arg, int *ret, int job_count) { ThreadContext *c= avctx->thread_opaque; c->func2 = func2; return thread_execute(avctx, NULL, arg, ret, job_count, 0); } | 9,691 |
0 | static void flat_print_section_header(WriterContext *wctx) { FlatContext *flat = wctx->priv; AVBPrint *buf = &flat->section_header[wctx->level]; int i; /* build section header */ av_bprint_clear(buf); for (i = 1; i <= wctx->level; i++) { if (flat->hierarchical || !(wctx->section[i]->flags & (SECTION_FLAG_IS_ARRAY|SECTI... | 9,692 |
0 | static int write_header(AVFormatContext *s) { AVCodecContext *codec = s->streams[0]->codec; if (s->nb_streams > 1) { av_log(s, AV_LOG_ERROR, "only one stream is supported\n"); return AVERROR(EINVAL); } if (codec->codec_id != AV_CODEC_ID_WAVPACK) { av_log(s, AV_LOG_ERROR, "unsupported codec\n"); return AVERROR(EINVAL); ... | 9,693 |
0 | static int default_start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref) { AVFilterLink *outlink = NULL; if (inlink->dst->nb_outputs) outlink = inlink->dst->outputs[0]; if (outlink) { outlink->out_buf = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h); if (!outlink->out_buf) return AVERROR(ENO... | 9,694 |
0 | static uint64_t ivshmem_io_read(void *opaque, target_phys_addr_t addr, unsigned size) { IVShmemState *s = opaque; uint32_t ret; switch (addr) { case INTRMASK: ret = ivshmem_IntrMask_read(s); break; case INTRSTATUS: ret = ivshmem_IntrStatus_read(s); break; case IVPOSITION: /* return my VM ID if the memory is mapped */ i... | 9,695 |
0 | static void omap_os_timer_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size) { struct omap_32khz_timer_s *s = (struct omap_32khz_timer_s *) opaque; int offset = addr & OMAP_MPUI_REG_MASK; if (size != 4) { return omap_badwidth_write32(opaque, addr, value); } switch (offset) { case 0x00: /* TVR *... | 9,696 |
0 | static void tcg_out_setcond(TCGContext *s, TCGType type, TCGCond cond, TCGArg arg0, TCGArg arg1, TCGArg arg2, int const_arg2) { int crop, sh; assert(TCG_TARGET_REG_BITS == 64 || type == TCG_TYPE_I32); /* Ignore high bits of a potential constant arg2. */ if (type == TCG_TYPE_I32) { arg2 = (uint32_t)arg2; } /* Handle com... | 9,698 |
0 | static void qmp_input_optional(Visitor *v, const char *name, bool *present) { QmpInputVisitor *qiv = to_qiv(v); QObject *qobj = qmp_input_get_object(qiv, name, false, NULL); if (!qobj) { *present = false; return; } *present = true; } | 9,702 |
0 | static int intel_hda_send_command(IntelHDAState *d, uint32_t verb) { uint32_t cad, nid, data; HDACodecDevice *codec; HDACodecDeviceClass *cdc; cad = (verb >> 28) & 0x0f; if (verb & (1 << 27)) { /* indirect node addressing, not specified in HDA 1.0 */ dprint(d, 1, "%s: indirect node addressing (guest bug?)\n", __FUNCTIO... | 9,703 |
0 | static void timerblock_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size) { timerblock *tb = (timerblock *)opaque; int64_t old; switch (addr) { case 0: /* Load */ tb->load = value; /* Fall through. */ case 4: /* Counter. */ if ((tb->control & 1) && tb->count) { /* Cancel the previous timer. */ ... | 9,704 |
0 | int av_find_best_stream(AVFormatContext *ic, enum AVMediaType type, int wanted_stream_nb, int related_stream, AVCodec **decoder_ret, int flags) { int i, nb_streams = ic->nb_streams, stream_number = 0; int ret = AVERROR_STREAM_NOT_FOUND, best_count = -1; unsigned *program = NULL; AVCodec *decoder = NULL, *best_decoder =... | 9,705 |
0 | BlockDriverState *bdrv_new(const char *device_name, Error **errp) { BlockDriverState *bs; int i; if (*device_name && !bdrv_is_valid_name(device_name)) { error_setg(errp, "Invalid device name"); return NULL; } if (bdrv_find(device_name)) { error_setg(errp, "Device with id '%s' already exists", device_name); return NULL;... | 9,708 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.