label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
0 | static uint16_t md_common_read(PCMCIACardState *card, uint32_t at){ MicroDriveState *s = MICRODRIVE(card); IDEState *ifs; uint16_t ret; at -= s->io_base; switch (s->opt & OPT_MODE) { case OPT_MODE_MMAP: if ((at & ~0x3ff) == 0x400) { at = 0; } break; case OPT_MODE_IOMAP16: at &= 0xf; break; case OPT_MODE_IOMAP1: if ((at... |
0 | static void usb_msd_handle_data(USBDevice *dev, USBPacket *p){ MSDState *s = (MSDState *)dev; uint32_t tag; struct usb_msd_cbw cbw; uint8_t devep = p->ep->nr; switch (p->pid) { case USB_TOKEN_OUT: if (devep != 2) goto fail; switch (s->mode) { case USB_MSDM_CBW: if (p->iov.size != 31) { fprintf(stderr, "usb-msd: Bad CBW... |
0 | void optimize_flags_init(void){ cpu_env = tcg_global_reg_new_ptr(TCG_AREG0, "env"); cpu_cc_op = tcg_global_mem_new_i32(TCG_AREG0, offsetof(CPUX86State, cc_op), "cc_op"); cpu_cc_src = tcg_global_mem_new(TCG_AREG0, offsetof(CPUX86State, cc_src), "cc_src"); cpu_cc_dst = tcg_global_mem_new(TCG_AREG0, offsetof(CPUX86State, ... |
0 | static size_t handle_aiocb_rw(struct qemu_paiocb *aiocb){ size_t nbytes; char *buf; if (!(aiocb->aio_type & QEMU_AIO_MISALIGNED)) { /* * If there is just a single buffer, and it is properly aligned * we can just use plain pread/pwrite without any problems. */ if (aiocb->aio_niov == 1) return handle_aiocb_rw_linear(aioc... |
0 | static int coroutine_fn bdrv_co_do_copy_on_readv(BlockDriverState *bs, int64_t offset, unsigned int bytes, 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 ... |
0 | static int sector_limits_lun2qemu(int64_t sector, IscsiLun *iscsilun){ int limit = MIN(sector_lun2qemu(sector, iscsilun), INT_MAX / 2 + 1); return limit < BDRV_REQUEST_MAX_SECTORS ? limit : 0;} |
0 | static ssize_t test_block_init_func(QCryptoBlock *block, size_t headerlen, Error **errp, void *opaque){ Buffer *header = opaque; g_assert_cmpint(header->capacity, ==, 0); buffer_reserve(header, headerlen); return headerlen;} |
0 | e1000_mmio_write(void *opaque, hwaddr addr, uint64_t val, unsigned size){ E1000State *s = opaque; unsigned int index = (addr & 0x1ffff) >> 2; if (index < NWRITEOPS && macreg_writeops[index]) { macreg_writeops[index](s, index, val); } else if (index < NREADOPS && macreg_readops[index]) { DBGOUT(MMIO, "e1000_mmio_writel ... |
0 | void vnc_hextile_set_pixel_conversion(VncState *vs, int generic){ if (!generic) { switch (vs->ds->surface->pf.bits_per_pixel) { case 8: vs->send_hextile_tile = send_hextile_tile_8; break; case 16: vs->send_hextile_tile = send_hextile_tile_16; break; case 32: vs->send_hextile_tile = send_hextile_tile_32; break; } } else... |
0 | static void qemu_rbd_aio_event_reader(void *opaque){ BDRVRBDState *s = opaque; ssize_t ret; do { char *p = (char *)&s->event_rcb; /* now read the rcb pointer that was sent from a non qemu thread */ if ((ret = read(s->fds[RBD_FD_READ], p + s->event_reader_pos, sizeof(s->event_rcb) - s->event_reader_pos)) > 0) { if (ret ... |
0 | static coroutine_fn int send_co_req(int sockfd, SheepdogReq *hdr, void *data, unsigned int *wlen){ int ret; ret = qemu_co_send(sockfd, hdr, sizeof(*hdr)); if (ret < sizeof(*hdr)) { error_report("failed to send a req, %s", strerror(errno)); return ret; } ret = qemu_co_send(sockfd, data, *wlen); if (ret < *wlen) { error_... |
0 | static inline void start_exclusive(void){ CPUState *other; pthread_mutex_lock(&exclusive_lock); exclusive_idle(); pending_cpus = 1; /* Make all other cpus stop executing. */ for (other = first_cpu; other; other = other->next_cpu) { if (other->running) { pending_cpus++; cpu_interrupt(other, CPU_INTERRUPT_EXIT); } } if (... |
0 | matroska_parse_cluster (MatroskaDemuxContext *matroska){ int res = 0; uint32_t id; uint64_t cluster_time = 0; uint8_t *data; int64_t pos; int size; av_log(matroska->ctx, AV_LOG_DEBUG, "parsing cluster at %"PRId64"\n", url_ftell(&matroska->ctx->pb)); while (res == 0) { if (!(id = ebml_peek_id(matroska, &matroska->level_... |
0 | static inline void gen_evsel(DisasContext *ctx){ int l1 = gen_new_label(); int l2 = gen_new_label(); int l3 = gen_new_label(); int l4 = gen_new_label(); TCGv_i32 t0 = tcg_temp_local_new_i32(); tcg_gen_andi_i32(t0, cpu_crf[ctx->opcode & 0x07], 1 << 3); tcg_gen_brcondi_i32(TCG_COND_EQ, t0, 0, l1); tcg_gen_mov_tl(cpu_gprh... |
1 | static void x86_cpu_realizefn(DeviceState *dev, Error **errp){ CPUState *cs = CPU(dev); X86CPU *cpu = X86_CPU(dev); X86CPUClass *xcc = X86_CPU_GET_CLASS(dev); CPUX86State *env = &cpu->env; Error *local_err = NULL; static bool ht_warned; if (xcc->kvm_required && !kvm_enabled()) { char *name = x86_cpu_class_get_model_nam... |
1 | static int http_proxy_open(URLContext *h, const char *uri, int flags){ HTTPContext *s = h->priv_data; char hostname[1024], hoststr[1024]; char auth[1024], pathbuf[1024], *path; char line[1024], lower_url[100]; int port, ret = 0; HTTPAuthType cur_auth_type; char *authstr; h->is_streamed = 1; av_url_split(NULL, 0, auth, ... |
1 | void rtp_parse_close(RTPDemuxContext *s){ // TODO: fold this into the protocol specific data fields. if (!strcmp(ff_rtp_enc_name(s->payload_type), "MP2T")) { ff_mpegts_parse_close(s->ts); } av_free(s);} |
1 | static long gethugepagesize(const char *path, Error **errp){ struct statfs fs; int ret; do { ret = statfs(path, &fs); } while (ret != 0 && errno == EINTR); if (ret != 0) { error_setg_errno(errp, errno, "failed to get page size of file %s", path); return 0; } return fs.f_bsize;} |
1 | void qpci_device_foreach(QPCIBus *bus, int vendor_id, int device_id, void (*func)(QPCIDevice *dev, int devfn, void *data), void *data){ int slot; for (slot = 0; slot < 32; slot++) { int fn; for (fn = 0; fn < 8; fn++) { QPCIDevice *dev; dev = qpci_device_find(bus, QPCI_DEVFN(slot, fn)); if (!dev) { continue; } if (vendo... |
1 | static int vc1_decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size){ VC1Context *v = avctx->priv_data; MpegEncContext *s = &v->s; AVFrame *pict = data; uint8_t *buf2 = NULL; /* no supplementary picture */ if (buf_size == 0) { /* special case for last picture */ if (s->low_de... |
1 | static int configuration_post_load(void *opaque, int version_id){ SaveState *state = opaque; const char *current_name = MACHINE_GET_CLASS(current_machine)->name; if (strncmp(state->name, current_name, state->len) != 0) { error_report("Machine type received is '%s' and local is '%s'", state->name, current_name); return ... |
1 | static inline void vmsvga_copy_rect(struct vmsvga_state_s *s, int x0, int y0, int x1, int y1, int w, int h){ DisplaySurface *surface = qemu_console_surface(s->vga.con); uint8_t *vram = s->vga.vram_ptr; int bypl = surface_stride(surface); int bypp = surface_bytes_per_pixel(surface); int width = bypp * w; int line = h; u... |
1 | static inline int decode_mb(MDECContext *a, DCTELEM block[6][64]){ int i; const int block_index[6]= {5,4,0,1,2,3}; a->dsp.clear_blocks(block[0]); for(i=0; i<6; i++){ if( mdec_decode_block_intra(a, block[ block_index[i] ], block_index[i]) < 0) return -1; } return 0;} |
1 | static int vnc_start_vencrypt_handshake(VncState *vs){ int ret; if ((ret = gnutls_handshake(vs->tls.session)) < 0) { if (!gnutls_error_is_fatal(ret)) { VNC_DEBUG("Handshake interrupted (blocking)\n"); if (!gnutls_record_get_direction(vs->tls.session)) qemu_set_fd_handler(vs->csock, vnc_tls_handshake_io, NULL, vs); else... |
1 | static VirtIOBlockReq *virtio_blk_alloc_request(VirtIOBlock *s){ VirtIOBlockReq *req = g_slice_new(VirtIOBlockReq); req->dev = s; req->qiov.size = 0; req->next = NULL; req->elem = g_slice_new(VirtQueueElement); return req;} |
1 | static int decompress_i(AVCodecContext *avctx, uint32_t *dst, int linesize){ SCPRContext *s = avctx->priv_data; GetByteContext *gb = &s->gb; int cx = 0, cx1 = 0, k = 0, clr = 0; int run, r, g, b, off, y = 0, x = 0, z, ret; unsigned backstep = linesize - avctx->width; const int cxshift = s->cxshift; unsigned lx, ly, pty... |
1 | static int scale_vector(int16_t *vector, int length){ int bits, max = 0; int64_t scale; int i; for (i = 0; i < length; i++) max = FFMAX(max, FFABS(vector[i])); max = FFMIN(max, 0x7FFF); bits = normalize_bits(max, 15); scale = (bits == 15) ? 0x7FFF : (1 << bits); for (i = 0; i < length; i++) vector[i] = av_clipl_int32(v... |
1 | static int fileTest(uint8_t *ref[4], int refStride[4], int w, int h, FILE *fp, enum AVPixelFormat srcFormat_in, enum AVPixelFormat dstFormat_in){ char buf[256]; while (fgets(buf, sizeof(buf), fp)) { struct Results r; enum AVPixelFormat srcFormat; char srcStr[12]; int srcW, srcH; enum AVPixelFormat dstFormat; char dstSt... |
1 | static int lut2_config_output(AVFilterLink *outlink){ AVFilterContext *ctx = outlink->src; LUT2Context *s = ctx->priv; AVFilterLink *srcx = ctx->inputs[0]; AVFilterLink *srcy = ctx->inputs[1]; FFFrameSyncIn *in; int ret; if (srcx->format != srcy->format) { av_log(ctx, AV_LOG_ERROR, "inputs must be of same pixel format\... |
1 | void do_subfe (void){ T0 = T1 + ~T0 + xer_ca; if (likely(T0 >= T1 && (xer_ca == 0 || T0 != T1))) { xer_ca = 0; } else { xer_ca = 1; }} |
0 | static inline void unpack_coeffs(SnowContext *s, SubBand *b, SubBand * parent, int orientation){ const int w= b->width; const int h= b->height; int x,y; if(1){ int run; x_and_coeff *xc= b->x_coeff; x_and_coeff *prev_xc= NULL; x_and_coeff *prev2_xc= xc; x_and_coeff *parent_xc= parent ? parent->x_coeff : NULL; x_and_coef... |
0 | static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt){ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; VmncContext * const c = avctx->priv_data; GetByteContext *gb = &c->gb; uint8_t *outptr; int dx, dy, w, h, depth, enc, chunks, res, size_left, ret; if ((ret = ff_rege... |
0 | void ff_fft_calc_sse(FFTContext *s, FFTComplex *z){ int ln = s->nbits; long i, j; long nblocks, nloops; FFTComplex *p, *cptr; asm volatile( "movaps %0, %%xmm4 \n\t" "movaps %1, %%xmm5 \n\t" ::"m"(*p1p1m1m1), "m"(*(s->inverse ? p1p1m1p1 : p1p1p1m1)) ); i = 8 << ln; asm volatile( "1: \n\t" "sub $32, %0 \n\t" /* do the pa... |
0 | static av_cold int cfhd_decode_init(AVCodecContext *avctx){ CFHDContext *s = avctx->priv_data; avctx->bits_per_raw_sample = 10; s->avctx = avctx; avctx->width = 0; avctx->height = 0; return ff_cfhd_init_vlcs(s);} |
0 | static int dump_init(DumpState *s, int fd, bool paging, bool has_filter, int64_t begin, int64_t length, Error **errp){ CPUState *cpu; int nr_cpus; Error *err = NULL; int ret; if (runstate_is_running()) { vm_stop(RUN_STATE_SAVE_VM); s->resume = true; } else { s->resume = false; } /* If we use KVM, we should synchronize ... |
0 | qemu_irq xics_assign_irq(struct icp_state *icp, int irq, enum xics_irq_type type){ if ((irq < icp->ics->offset) || (irq >= (icp->ics->offset + icp->ics->nr_irqs))) { return NULL; } assert((type == XICS_MSI) || (type == XICS_LSI)); icp->ics->irqs[irq - icp->ics->offset].type = type; return icp->ics->qirqs[irq - icp->ics... |
0 | int load_aout(const char *filename, target_phys_addr_t addr, int max_sz, int bswap_needed, target_phys_addr_t target_page_size){ int fd, size, ret; struct exec e; uint32_t magic; fd = open(filename, O_RDONLY | O_BINARY); if (fd < 0) return -1; size = read(fd, &e, sizeof(e)); if (size < 0) goto fail; if (bswap_needed) {... |
0 | SH7750State *sh7750_init(CPUSH4State * cpu){ SH7750State *s; int sh7750_io_memory; int cpu_model = SH_CPU_SH7751R; /* for now */ s = qemu_mallocz(sizeof(SH7750State)); s->cpu = cpu; s->periph_freq = 60000000;/* 60MHz */ sh7750_io_memory = cpu_register_io_memory(0, sh7750_mem_read, sh7750_mem_write, s); cpu_register_phy... |
0 | static void *buffered_file_thread(void *opaque){ MigrationState *s = opaque; int64_t initial_time = qemu_get_clock_ms(rt_clock); int64_t sleep_time = 0; int64_t max_size = 0; bool last_round = false; int ret; qemu_mutex_lock_iothread(); DPRINTF("beginning savevm\n"); ret = qemu_savevm_state_begin(s->file, &s->params); ... |
0 | static void test_qemu_strtoul_trailing(void){ const char *str = "123xxx"; char f = 'X'; const char *endptr = &f; unsigned long res = 999; int err; err = qemu_strtoul(str, &endptr, 0, &res); g_assert_cmpint(err, ==, 0); g_assert_cmpint(res, ==, 123); g_assert(endptr == str + 3);} |
0 | static inline void downmix_3f_2r_to_stereo(float *samples){ int i; for (i = 0; i < 256; i++) { samples[i] += (samples[i + 256] + samples[i + 768]); samples[i + 256] = (samples[i + 512] + samples[i + 1024]); samples[i + 512] = samples[i + 768] = samples[i + 1024] = 0; }} |
0 | static void mirror_write_complete(void *opaque, int ret){ MirrorOp *op = opaque; MirrorBlockJob *s = op->s; aio_context_acquire(blk_get_aio_context(s->common.blk)); if (ret < 0) { BlockErrorAction action; bdrv_set_dirty_bitmap(s->dirty_bitmap, op->sector_num, op->nb_sectors); action = mirror_error_action(s, false, -ret... |
0 | static void qemu_remap_bucket(MapCacheEntry *entry, target_phys_addr_t size, target_phys_addr_t address_index){ uint8_t *vaddr_base; xen_pfn_t *pfns; int *err; unsigned int i, j; target_phys_addr_t nb_pfn = size >> XC_PAGE_SHIFT; trace_qemu_remap_bucket(address_index); pfns = qemu_mallocz(nb_pfn * sizeof (xen_pfn_t)); ... |
0 | uint64_t kvmppc_hash64_read_pteg(PowerPCCPU *cpu, target_ulong pte_index){ int htab_fd; struct kvm_get_htab_fd ghf; struct kvm_get_htab_buf *hpte_buf; ghf.flags = 0; ghf.start_index = pte_index; htab_fd = kvm_vm_ioctl(kvm_state, KVM_PPC_GET_HTAB_FD, &ghf); if (htab_fd < 0) { goto error_out; } hpte_buf = g_malloc0(sizeo... |
0 | static void xenfb_guest_copy(struct XenFB *xenfb, int x, int y, int w, int h){ DisplaySurface *surface = qemu_console_surface(xenfb->c.con); int line, oops = 0; int bpp = surface_bits_per_pixel(surface); int linesize = surface_stride(surface); uint8_t *data = surface_data(surface); if (!is_buffer_shared(surface)) { swi... |
0 | DISAS_INSN(fbcc){ uint32_t offset; uint32_t addr; TCGv flag; int l1; addr = s->pc; offset = cpu_ldsw_code(env, s->pc); s->pc += 2; if (insn & (1 << 6)) { offset = (offset << 16) | cpu_lduw_code(env, s->pc); s->pc += 2; } l1 = gen_new_label(); /* TODO: Raise BSUN exception. */ flag = tcg_temp_new(); gen_helper_compare_f... |
0 | int omap_validate_local_addr(struct omap_mpu_state_s *s, target_phys_addr_t addr){ return addr >= OMAP_LOCALBUS_BASE && addr < OMAP_LOCALBUS_BASE + 0x1000000;} |
0 | static void build_pci_bus_state_init(AcpiBuildPciBusHotplugState *state, AcpiBuildPciBusHotplugState *parent, bool pcihp_bridge_en){ state->parent = parent; state->device_table = build_alloc_array(); state->notify_table = build_alloc_array(); state->pcihp_bridge_en = pcihp_bridge_en;} |
0 | int ff_MPV_encode_picture(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pic_arg, int *got_packet){ MpegEncContext *s = avctx->priv_data; int i, stuffing_count, ret; int context_count = s->slice_context_count; s->picture_in_gop_number++; if (load_input_picture(s, pic_arg) < 0) return -1; if (select_input_picture(... |
0 | void s390x_cpu_debug_excp_handler(CPUState *cs){ S390CPU *cpu = S390_CPU(cs); CPUS390XState *env = &cpu->env; CPUWatchpoint *wp_hit = cs->watchpoint_hit; if (wp_hit && wp_hit->flags & BP_CPU) { /* FIXME: When the storage-alteration-space control bit is set, the exception should only be triggered if the memory access is... |
0 | static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int depth, AVFormatContext *s){ AVIOContext *pb; WtvFile *wf; uint8_t *buffer; if (seek_by_sector(s->pb, first_sector, 0) < 0) return NULL; wf = av_mallocz(sizeof(WtvFile)); if (!wf) return NULL; if (depth == 0) { wf->sectors = av_malloc(sizeof... |
0 | static int smacker_probe(AVProbeData *p){ if (p->buf_size < 4) return 0; if(p->buf[0] == 'S' && p->buf[1] == 'M' && p->buf[2] == 'K' && (p->buf[3] == '2' || p->buf[3] == '4')) return AVPROBE_SCORE_MAX; else return 0;} |
0 | int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque)#endif{ AVDictionary *options = NULL; AVDictionaryEntry *e; int ret=0; if (args && *args) { if (!filter->filter->priv_class) { av_log(filter, AV_LOG_ERROR, "This filter does not take any " "options, but options were provided: %s.\n", args)... |
1 | void audio_encode_example(const char *filename){ AVCodec *codec; AVCodecContext *c= NULL; int frame_size, i, j, out_size, outbuf_size; FILE *f; short *samples; float t, tincr; uint8_t *outbuf; printf("Audio encoding\n"); /* find the MP2 encoder */ codec = avcodec_find_encoder(CODEC_ID_MP2); if (!codec) { fprintf(stderr... |
1 | static int w64_read_header(AVFormatContext *s){ int64_t size, data_ofs = 0; AVIOContext *pb = s->pb; WAVDemuxContext *wav = s->priv_data; AVStream *st; uint8_t guid[16]; int ret; avio_read(pb, guid, 16); if (memcmp(guid, ff_w64_guid_riff, 16)) /* riff + wave + fmt + sizes */ if (avio_rl64(pb) < 16 + 8 + 16 + 8 + 16 + 8... |
0 | static void floor_fit(venc_context_t * venc, floor_t * fc, float * coeffs, int * posts, int samples) { int range = 255 / fc->multiplier + 1; int i; for (i = 0; i < fc->values; i++) { int position = fc->list[fc->list[i].sort].x; int begin = fc->list[fc->list[FFMAX(i-1, 0)].sort].x; int end = fc->list[fc->list[FFMIN(i+1,... |
0 | static int audio_decode_frame(VideoState *is){ AVPacket *pkt_temp = &is->audio_pkt_temp; AVPacket *pkt = &is->audio_pkt; AVCodecContext *dec = is->audio_st->codec; int len1, data_size, resampled_data_size; int64_t dec_channel_layout; int got_frame; av_unused double audio_clock0; int new_packet = 0; int flush_complete =... |
1 | static hwaddr ppc_hash64_pte_raddr(ppc_slb_t *slb, ppc_hash_pte64_t pte, target_ulong eaddr){ hwaddr mask; int target_page_bits; hwaddr rpn = pte.pte1 & HPTE64_R_RPN; /* * We support 4K, 64K and 16M now */ target_page_bits = ppc_hash64_page_shift(slb); mask = (1ULL << target_page_bits) - 1; return (rpn & ~mask) | (eadd... |
1 | static void nfs_file_close(BlockDriverState *bs){ NFSClient *client = bs->opaque; nfs_client_close(client); qemu_mutex_destroy(&client->mutex);} |
1 | static int mp3_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags){ MP3Context *mp3 = s->priv_data; AVIndexEntry *ie; AVStream *st = s->streams[0]; int64_t ret = av_index_search_timestamp(st, timestamp, flags); uint32_t header = 0; if (!mp3->xing_toc) { st->skip_samples = timestamp <= 0 ? mp3->star... |
1 | static void test_bmdma_no_busmaster(void){ QPCIDevice *dev; void *bmdma_base, *ide_base; uint8_t status; dev = get_pci_device(&bmdma_base, &ide_base); /* No PRDT_EOT, each entry addr 0/size 64k, and in theory qemu shouldn't be * able to access it anyway because the Bus Master bit in the PCI command * register isn't set... |
1 | static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out){ char *pix_fmts; OutputStream *ost = ofilter->ost; AVCodecContext *codec = ost->st->codec; AVFilterContext *last_filter = out->filter_ctx; int pad_idx = out->pad_idx; int ret; char name[255]; snprintf(name, sizeof(name)... |
1 | static inline int handle_cpu_signal(uintptr_t pc, siginfo_t *info, int is_write, sigset_t *old_set){ CPUState *cpu = current_cpu; CPUClass *cc; int ret; unsigned long address = (unsigned long)info->si_addr; /* We must handle PC addresses from two different sources: * a call return address and a signal frame address. * ... |
1 | static void vc1_sprite_flush(AVCodecContext *avctx){ VC1Context *v = avctx->priv_data; MpegEncContext *s = &v->s; AVFrame *f = &s->current_picture.f; int plane, i; /* Windows Media Image codecs have a convergence interval of two keyframes. Since we can't enforce it, clear to black the missing sprite. This is wrong but ... |
1 | void pause_all_vcpus(void){} |
0 | static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags){ OverlayContext *over = ctx->priv; int ret; if (!strcmp(cmd, "x")) ret = set_expr(&over->x_pexpr, args, ctx); else if (!strcmp(cmd, "y")) ret = set_expr(&over->y_pexpr, args, ctx); else if (!strcmp(cmd... |
1 | static int rv20_decode_picture_header(RVDecContext *rv){ MpegEncContext *s = &rv->m; int seq, mb_pos, i; int rpr_bits;#if 0 GetBitContext gb= s->gb; for(i=0; i<64; i++){ av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&gb)); if(i%4==3) av_log(s->avctx, AV_LOG_DEBUG, " "); } av_log(s->avctx, AV_LOG_DEBUG, "\n");#endif#if... |
1 | void qio_channel_test_validate(QIOChannelTest *test){ g_assert_cmpint(memcmp(test->input, test->output, test->len), ==, 0); g_assert(test->readerr == NULL); g_assert(test->writeerr == NULL); g_free(test->inputv); g_free(test->outputv); g_free(test->input); g_free(test->output); g_free(test);} |
1 | static void vapic_map_rom_writable(VAPICROMState *s){ hwaddr rom_paddr = s->rom_state_paddr & ROM_BLOCK_MASK; MemoryRegionSection section; MemoryRegion *as; size_t rom_size; uint8_t *ram; as = sysbus_address_space(&s->busdev); if (s->rom_mapped_writable) { memory_region_del_subregion(as, &s->rom); memory_region_destroy... |
1 | static int handle_intercept(S390CPU *cpu){ CPUState *cs = CPU(cpu); struct kvm_run *run = cs->kvm_run; int icpt_code = run->s390_sieic.icptcode; int r = 0; DPRINTF("intercept: 0x%x (at 0x%lx)\n", icpt_code, (long)cs->kvm_run->psw_addr); switch (icpt_code) { case ICPT_INSTRUCTION: r = handle_instruction(cpu, run); break... |
1 | static void dump_op_count(void){ int i; FILE *f; f = fopen("/tmp/op.log", "w"); for(i = INDEX_op_end; i < NB_OPS; i++) { fprintf(f, "%s %" PRId64 "\n", tcg_op_defs[i].name, tcg_table_op_count[i]); } fclose(f);} |
1 | static void qed_check_for_leaks(QEDCheck *check){ BDRVQEDState *s = check->s; size_t i; for (i = s->header.header_size; i < check->nclusters; i++) { if (!qed_test_bit(check->used_clusters, i)) { check->result->leaks++; } }} |
1 | static void test_qemu_strtol_full_max(void){ const char *str = g_strdup_printf("%ld", LONG_MAX); long res; int err; err = qemu_strtol(str, NULL, 0, &res); g_assert_cmpint(err, ==, 0); g_assert_cmpint(res, ==, LONG_MAX);} |
1 | char *spapr_get_cpu_core_type(const char *model){ char *core_type; gchar **model_pieces = g_strsplit(model, ",", 2); core_type = g_strdup_printf("%s-%s", model_pieces[0], TYPE_SPAPR_CPU_CORE); g_strfreev(model_pieces); /* Check whether it exists or whether we have to look up an alias name */ if (!object_class_by_name(c... |
1 | static int get_refcount(BlockDriverState *bs, int64_t cluster_index){ BDRVQcowState *s = bs->opaque; int refcount_table_index, block_index; int64_t refcount_block_offset; int ret; uint16_t *refcount_block; uint16_t refcount; refcount_table_index = cluster_index >> (s->cluster_bits - REFCOUNT_SHIFT); if (refcount_table_... |
1 | static void openpic_irq_raise(OpenPICState *opp, int n_CPU, IRQ_src_t *src){ int n_ci = IDR_CI0_SHIFT - n_CPU; if ((opp->flags & OPENPIC_FLAG_IDE_CRIT) && (src->ide & (1 << n_ci))) { qemu_irq_raise(opp->dst[n_CPU].irqs[OPENPIC_OUTPUT_CINT]); } else { qemu_irq_raise(opp->dst[n_CPU].irqs[OPENPIC_OUTPUT_INT]); }} |
1 | static int dx2_decode_slice_420(GetBitContext *gb, AVFrame *frame, int line, int left, uint8_t lru[3][8]){ int x, y; int width = frame->width; int ystride = frame->linesize[0]; int ustride = frame->linesize[1]; int vstride = frame->linesize[2]; uint8_t *Y = frame->data[0] + ystride * line; uint8_t *U = frame->data[1] +... |
1 | static inline void RENAME(bgr16ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width){int i; assert(src1==src2);for(i=0; i<width; i++){int d0= ((uint32_t*)src1)[i];int dl= (d0&0x07E0F81F);int dh= ((d0>>5)&0x07C0F83F);int dh2= (dh>>11) + (dh<<21);int d= dh2 + dl;int b= d&0x7F;int r= (d>>11)&0x7F;in... |
0 | static int file_close_dir(URLContext *h){#if HAVE_DIRENT_H FileContext *c = h->priv_data; closedir(c->dir); return 0;#else return AVERROR(ENOSYS);#endif /* HAVE_DIRENT_H */} |
0 | static int sdp_read_header(AVFormatContext *s, AVFormatParameters *ap){ RTSPState *rt = s->priv_data; RTSPStream *rtsp_st; int size, i, err; char *content; char url[1024]; /* read the whole sdp file */ /* XXX: better loading */ content = av_malloc(SDP_MAX_SIZE); size = get_buffer(s->pb, content, SDP_MAX_SIZE - 1); if (... |
0 | static void ff_h264_idct_add16intra_mmx2(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); else if(block[i*16]) ff_h264_idct_dc_add_mmx2(dst + block_offset[i], ... |
1 | static void floor_encode(vorbis_enc_context *venc, vorbis_enc_floor *fc, PutBitContext *pb, uint16_t *posts, float *floor, int samples){ int range = 255 / fc->multiplier + 1; int coded[MAX_FLOOR_VALUES]; // first 2 values are unused int i, counter; put_bits(pb, 1, 1); // non zero put_bits(pb, ilog(range - 1), posts[0])... |
1 | void qtest_quit(QTestState *s){ int status; pid_t pid = qtest_qemu_pid(s); if (pid != -1) { kill(pid, SIGTERM); waitpid(pid, &status, 0); } unlink(s->pid_file); unlink(s->socket_path); unlink(s->qmp_socket_path); g_free(s->pid_file); g_free(s->socket_path); g_free(s->qmp_socket_path);} |
1 | static void guess_mv(MpegEncContext *s){ uint8_t fixed[s->mb_stride * s->mb_height];#define MV_FROZEN 3#define MV_CHANGED 2#define MV_UNCHANGED 1 const int mb_stride = s->mb_stride; const int mb_width = s->mb_width; const int mb_height= s->mb_height; int i, depth, num_avail; int mb_x, mb_y, mot_step, mot_stride; set_mv... |
1 | void qemu_bh_delete(QEMUBH *bh){ qemu_bh_cancel(bh); qemu_free(bh);} |
1 | static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd){ ALSSpecificConfig *sconf = &ctx->sconf; AVCodecContext *avctx = ctx->avctx; GetBitContext *gb = &ctx->gb; unsigned int k; unsigned int s[8]; unsigned int sx[8]; unsigned int sub_blocks, log2_sub_blocks, sb_length; unsigned int start = 0; unsigned int... |
0 | void select_soundhw(const char *optarg){} |
0 | static void cpu_exec_nocache(CPUState *cpu, int max_cycles, TranslationBlock *orig_tb){ TranslationBlock *tb; /* Should never happen. We only end up here when an existing TB is too long. */ if (max_cycles > CF_COUNT_MASK) max_cycles = CF_COUNT_MASK; tb = tb_gen_code(cpu, orig_tb->pc, orig_tb->cs_base, orig_tb->flags, m... |
0 | static int xhci_submit(XHCIState *xhci, XHCITransfer *xfer, XHCIEPContext *epctx){ uint64_t mfindex; DPRINTF("xhci_submit(slotid=%d,epid=%d)\n", xfer->slotid, xfer->epid); xfer->in_xfer = epctx->type>>2; switch(epctx->type) { case ET_INTR_OUT: case ET_INTR_IN: xfer->pkts = 0; xfer->iso_xfer = false; xfer->timed_xfer = ... |
0 | static void nvram_writel (void *opaque, target_phys_addr_t addr, uint32_t value){ M48t59State *NVRAM = opaque; m48t59_write(NVRAM, addr, (value >> 24) & 0xff); m48t59_write(NVRAM, addr + 1, (value >> 16) & 0xff); m48t59_write(NVRAM, addr + 2, (value >> 8) & 0xff); m48t59_write(NVRAM, addr + 3, value & 0xff);} |
0 | static QIOChannelSocket *nbd_establish_connection(SocketAddress *saddr, Error **errp){ QIOChannelSocket *sioc; Error *local_err = NULL; sioc = qio_channel_socket_new(); qio_channel_set_name(QIO_CHANNEL(sioc), "nbd-client"); qio_channel_socket_connect_sync(sioc, saddr, &local_err); if (local_err) { error_propagate(errp,... |
0 | static int write_abst(AVFormatContext *s, OutputStream *os, int final){ HDSContext *c = s->priv_data; AVIOContext *out; char filename[1024], temp_filename[1024]; int i, ret; int64_t asrt_pos, afrt_pos; int start = 0, fragments; int index = s->streams[os->first_stream]->id; int64_t cur_media_time = 0; if (c->window_size... |
0 | static int mptsas_process_scsi_io_request(MPTSASState *s, MPIMsgSCSIIORequest *scsi_io, hwaddr addr){ MPTSASRequest *req; MPIMsgSCSIIOReply reply; SCSIDevice *sdev; int status; mptsas_fix_scsi_io_endianness(scsi_io); trace_mptsas_process_scsi_io_request(s, scsi_io->Bus, scsi_io->TargetID, scsi_io->LUN[1], scsi_io->Data... |
0 | bool s390_cpu_exec_interrupt(CPUState *cs, int interrupt_request){ if (interrupt_request & CPU_INTERRUPT_HARD) { S390CPU *cpu = S390_CPU(cs); CPUS390XState *env = &cpu->env; if (env->ex_value) { /* Execution of the target insn is indivisible from the parent EXECUTE insn. */ return false; } if (env->psw.mask & PSW_MASK_... |
0 | ioapic_mem_read(void *opaque, target_phys_addr_t addr, unsigned int size){ IOAPICCommonState *s = opaque; int index; uint32_t val = 0; switch (addr & 0xff) { case IOAPIC_IOREGSEL: val = s->ioregsel; break; case IOAPIC_IOWIN: if (size != 4) { break; } switch (s->ioregsel) { case IOAPIC_REG_ID: val = s->id << IOAPIC_ID_S... |
0 | static void piix4_pm_machine_ready(Notifier *n, void *opaque){ PIIX4PMState *s = container_of(n, PIIX4PMState, machine_ready); PCIDevice *d = PCI_DEVICE(s); MemoryRegion *io_as = pci_address_space_io(d); uint8_t *pci_conf; pci_conf = d->config; pci_conf[0x5f] = 0x10 | (memory_region_present(io_as, 0x378) ? 0x80 : 0); p... |
0 | static void vnc_dpy_resize(DisplayState *ds){ int size_changed; VncDisplay *vd = ds->opaque; VncState *vs; /* server surface */ if (!vd->server) vd->server = qemu_mallocz(sizeof(*vd->server)); if (vd->server->data) qemu_free(vd->server->data); *(vd->server) = *(ds->surface); vd->server->data = qemu_mallocz(vd->server->... |
0 | bool hpet_find(void){ return object_resolve_path_type("", TYPE_HPET, NULL);} |
0 | static void gen_load_exclusive(DisasContext *s, int rt, int rt2, TCGv_i32 addr, int size){ TCGv_i32 tmp = tcg_temp_new_i32(); s->is_ldex = true; switch (size) { case 0: gen_aa32_ld8u(tmp, addr, get_mem_index(s)); break; case 1: gen_aa32_ld16u(tmp, addr, get_mem_index(s)); break; case 2: case 3: gen_aa32_ld32u(tmp, addr... |
0 | static inline void RENAME(bgr24ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused){#if COMPILE_TEMPLATE_MMX RENAME(bgr24ToUV_mmx)(dstU, dstV, src1, width, PIX_FMT_BGR24);#else int i; for (i=0; i<width; i++) { int b= src1[3*i + 0]; int g= src1[3*i + 1]; int r= src1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.