label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
1 | void rgb15tobgr32(const uint8_t *src, uint8_t *dst, long src_size){const uint16_t *end;uint8_t *d = (uint8_t *)dst;const uint16_t *s = (const uint16_t *)src;end = s + src_size/2;while(s < end){register uint16_t bgr;bgr = *s++;#ifdef WORDS_BIGENDIAN*d++ = 0;*d++ = (bgr&0x1F)<<3;*d++ = (bgr&0x3E0)>>2;*d++ = (bgr&0x7C00)>... |
1 | static inline int ff_fast_malloc(void *ptr, unsigned int *size, size_t min_size, int zero_realloc){ void *val; if (min_size < *size) return 0; min_size = FFMAX(17 * min_size / 16 + 32, min_size); av_freep(ptr); val = zero_realloc ? av_mallocz(min_size) : av_malloc(min_size); memcpy(ptr, &val, sizeof(val)); if (!val) mi... |
1 | int qcow2_update_header(BlockDriverState *bs) BDRVQcowState *s = bs->opaque; QCowHeader *header; char *buf; size_t buflen = s->cluster_size; int ret; uint64_t total_size; uint32_t refcount_table_clusters; size_t header_length; Qcow2UnknownHeaderExtension *uext; buf = qemu_blockalign(bs, buflen); /* Header structure */ ... |
0 | void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp){#if HAVE_YASM int mm_flags = av_get_cpu_flags(); if (mm_flags & AV_CPU_FLAG_SSE && HAVE_SSE) { fdsp->vector_fmul = ff_vector_fmul_sse; fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_sse; } if (mm_flags & AV_CPU_FLAG_AVX && HAVE_AVX) { fdsp->vector_fmul = ff_vector_f... |
0 | static void dequantization_float(int x, int y, Jpeg2000Cblk *cblk, Jpeg2000Component *comp, Jpeg2000T1Context *t1, Jpeg2000Band *band){ int i, j; int w = cblk->coord[0][1] - cblk->coord[0][0]; for (j = 0; j < (cblk->coord[1][1] - cblk->coord[1][0]); ++j) { float *datap = &comp->f_data[(comp->coord[0][1] - comp->coord[0... |
0 | static int read_extra_header(FFV1Context *f){ RangeCoder *const c = &f->c; uint8_t state[CONTEXT_SIZE]; int i, j, k, ret; uint8_t state2[32][CONTEXT_SIZE]; memset(state2, 128, sizeof(state2)); memset(state, 128, sizeof(state)); ff_init_range_decoder(c, f->avctx->extradata, f->avctx->extradata_size); ff_build_rac_states... |
1 | int ff_v4l2_m2m_codec_end(AVCodecContext *avctx){ V4L2m2mContext* s = avctx->priv_data; int ret; ret = ff_v4l2_context_set_status(&s->output, VIDIOC_STREAMOFF); if (ret) av_log(avctx, AV_LOG_ERROR, "VIDIOC_STREAMOFF %s\n", s->output.name); ret = ff_v4l2_context_set_status(&s->capture, VIDIOC_STREAMOFF); if (ret) av_log... |
1 | static void spr_read_tbl(DisasContext *ctx, int gprn, int sprn){ if (ctx->tb->cflags & CF_USE_ICOUNT) { gen_io_start(); } gen_helper_load_tbl(cpu_gpr[gprn], cpu_env); if (ctx->tb->cflags & CF_USE_ICOUNT) { gen_io_end(); gen_stop_exception(ctx); }} |
1 | void vnc_client_read(void *opaque){ VncState *vs = opaque; long ret; buffer_reserve(&vs->input, 4096);#ifdef CONFIG_VNC_TLS if (vs->tls.session) {ret = gnutls_read(vs->tls.session, buffer_end(&vs->input), 4096);if (ret < 0) { if (ret == GNUTLS_E_AGAIN)errno = EAGAIN; elseerrno = EIO; ret = -1;} } else#endif /* CONFIG_V... |
1 | static void test_bmdma_short_prdt(void){ QPCIDevice *dev; QPCIBar bmdma_bar, ide_bar; uint8_t status; PrdtEntry prdt[] = { { .addr = 0, .size = cpu_to_le32(0x10 | PRDT_EOT), }, }; dev = get_pci_device(&bmdma_bar, &ide_bar); /* Normal request */ status = send_dma_request(CMD_READ_DMA, 0, 1, prdt, ARRAY_SIZE(prdt), NULL)... |
1 | int ff_mpeg4_decode_picture_header(MpegEncContext * s, GetBitContext *gb){ int startcode, v; /* search next start code */ align_get_bits(gb); if(s->avctx->codec_tag == ff_get_fourcc("WV1F") && show_bits(gb, 24) == 0x575630){ skip_bits(gb, 24); if(get_bits(gb, 8) == 0xF0) return decode_vop_header(s, gb); } startcode = 0... |
1 | SwsFunc yuv2rgb_init_altivec (SwsContext *c){ if (!(c->flags & SWS_CPU_CAPS_ALTIVEC)) return NULL; /* and this seems not to matter too much I tried a bunch of videos with abnormal widths and mplayer crashes else where. mplayer -vo x11 -rawvideo on:w=350:h=240 raw-350x240.eyuv boom with X11 bad match. */ if ((c->srcW & ... |
1 | static void string_output_append(StringOutputVisitor *sov, int64_t a){ Range *r = g_malloc0(sizeof(*r)); r->begin = a; r->end = a + 1; sov->ranges = g_list_insert_sorted_merged(sov->ranges, r, range_compare);} |
0 | static void run_postproc(AVCodecContext *avctx, AVFrame *frame){ DDSContext *ctx = avctx->priv_data; int i, x_off; switch (ctx->postproc) { case DDS_ALPHA_EXP: /* Alpha-exponential mode divides each channel by the maximum * R, G or B value, and stores the multiplying factor in the * alpha channel. */ av_log(avctx, AV_L... |
0 | static void ipvideo_decode_format_10_opcodes(IpvideoContext *s, AVFrame *frame){ int pass, x, y, changed_block; int16_t opcode, skip; GetByteContext decoding_map_ptr; GetByteContext skip_map_ptr; bytestream2_skip(&s->stream_ptr, 14); /* data starts 14 bytes in */ /* this is PAL8, so make the palette available */ memcpy... |
0 | static uint64_t omap_clkm_read(void *opaque, target_phys_addr_t addr, unsigned size){ struct omap_mpu_state_s *s = (struct omap_mpu_state_s *) opaque; if (size != 2) { return omap_badwidth_read16(opaque, addr); } switch (addr) { case 0x00:/* ARM_CKCTL */ return s->clkm.arm_ckctl; case 0x04:/* ARM_IDLECT1 */ return s->c... |
0 | static int xen_pt_msgaddr32_reg_write(XenPCIPassthroughState *s, XenPTReg *cfg_entry, uint32_t *val, uint32_t dev_value, uint32_t valid_mask){ XenPTRegInfo *reg = cfg_entry->reg; uint32_t writable_mask = 0; uint32_t old_addr = cfg_entry->data; /* modify emulate register */ writable_mask = reg->emu_mask & ~reg->ro_mask ... |
0 | static void bdrv_qed_refresh_limits(BlockDriverState *bs, Error **errp){ BDRVQEDState *s = bs->opaque; bs->bl.write_zeroes_alignment = s->header.cluster_size >> BDRV_SECTOR_BITS;} |
0 | int block_signals(void){ TaskState *ts = (TaskState *)thread_cpu->opaque; sigset_t set; int pending; /* It's OK to block everything including SIGSEGV, because we won't * run any further guest code before unblocking signals in * process_pending_signals(). */ sigfillset(&set); sigprocmask(SIG_SETMASK, &set, 0); pending =... |
0 | static void poll_set_started(AioContext *ctx, bool started){ AioHandler *node; if (started == ctx->poll_started) { return; } ctx->poll_started = started; qemu_lockcnt_inc(&ctx->list_lock); QLIST_FOREACH_RCU(node, &ctx->aio_handlers, node) { IOHandler *fn; if (node->deleted) { continue; } if (started) { fn = node->io_po... |
0 | void qemu_iohandler_fill(GArray *pollfds){ IOHandlerRecord *ioh; QLIST_FOREACH(ioh, &io_handlers, next) { int events = 0; if (ioh->deleted) continue; if (ioh->fd_read && (!ioh->fd_read_poll || ioh->fd_read_poll(ioh->opaque) != 0)) { events |= G_IO_IN | G_IO_HUP | G_IO_ERR; } if (ioh->fd_write) { events |= G_IO_OUT | G_... |
0 | static void powernv_create_core_node(PnvChip *chip, PnvCore *pc, void *fdt){ CPUState *cs = CPU(DEVICE(pc->threads)); DeviceClass *dc = DEVICE_GET_CLASS(cs); PowerPCCPU *cpu = POWERPC_CPU(cs); int smt_threads = CPU_CORE(pc)->nr_threads; CPUPPCState *env = &cpu->env; PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cs); uin... |
0 | static void test_bh_flush(void){ BHTestData data = { .n = 0 }; data.bh = aio_bh_new(ctx, bh_test_cb, &data); qemu_bh_schedule(data.bh); g_assert_cmpint(data.n, ==, 0); wait_for_aio(); g_assert_cmpint(data.n, ==, 1); g_assert(!aio_poll(ctx, false)); g_assert_cmpint(data.n, ==, 1); qemu_bh_delete(data.bh);} |
0 | static int spapr_tce_table_realize(DeviceState *dev){ sPAPRTCETable *tcet = SPAPR_TCE_TABLE(dev); if (kvm_enabled()) { tcet->table = kvmppc_create_spapr_tce(tcet->liobn, tcet->window_size, &tcet->fd); } if (!tcet->table) { size_t table_size = (tcet->window_size >> SPAPR_TCE_PAGE_SHIFT) * sizeof(uint64_t); tcet->table =... |
0 | static int avi_write_header(AVFormatContext *s){ AVIContext *avi = s->priv_data; AVIOContext *pb = s->pb; int bitrate, n, i, nb_frames, au_byterate, au_ssize, au_scale; AVCodecContext *stream, *video_enc; int64_t list1, list2, strh, strf; AVDictionaryEntry *t = NULL; if (s->nb_streams > AVI_MAX_STREAM_COUNT) { av_log(s... |
0 | void ide_dma_cb(void *opaque, int ret){ IDEState *s = opaque; int n; int64_t sector_num; bool stay_active = false; if (ret == -ECANCELED) { return; } if (ret < 0) { int op = IDE_RETRY_DMA; if (s->dma_cmd == IDE_DMA_READ) op |= IDE_RETRY_READ; else if (s->dma_cmd == IDE_DMA_TRIM) op |= IDE_RETRY_TRIM; if (ide_handle_rw_... |
0 | int load_elf(const char *filename, int64_t address_offset, uint64_t *pentry, uint64_t *lowaddr, uint64_t *highaddr, int big_endian, int elf_machine, int clear_lsb){ int fd, data_order, target_data_order, must_swab, ret; uint8_t e_ident[EI_NIDENT]; fd = open(filename, O_RDONLY | O_BINARY); if (fd < 0) { perror(filename)... |
0 | static CharDriverState *qemu_chr_open_pty(const char *id, ChardevBackend *backend, ChardevReturn *ret, Error **errp){ CharDriverState *chr; PtyCharDriver *s; int master_fd, slave_fd; char pty_name[PATH_MAX]; master_fd = qemu_openpty_raw(&slave_fd, pty_name); if (master_fd < 0) { error_setg_errno(errp, errno, "Failed to... |
0 | static uint64_t cirrus_linear_read(void *opaque, target_phys_addr_t addr, unsigned size){ CirrusVGAState *s = opaque; uint32_t ret; addr &= s->cirrus_addr_mask; if (((s->vga.sr[0x17] & 0x44) == 0x44) && ((addr & s->linear_mmio_mask) == s->linear_mmio_mask)) {/* memory-mapped I/O */ret = cirrus_mmio_blt_read(s, addr & 0... |
0 | static int qemu_gluster_create(const char *filename, QemuOpts *opts, Error **errp){ BlockdevOptionsGluster *gconf; struct glfs *glfs; struct glfs_fd *fd; int ret = 0; int prealloc = 0; int64_t total_size = 0; char *tmp = NULL; gconf = g_new0(BlockdevOptionsGluster, 1); gconf->debug = qemu_opt_get_number_del(opts, GLUST... |
0 | static void memory_region_iorange_read(IORange *iorange, uint64_t offset, unsigned width, uint64_t *data){ MemoryRegion *mr = container_of(iorange, MemoryRegion, iorange); if (mr->ops->old_portio) { const MemoryRegionPortio *mrp = find_portio(mr, offset, width, false); *data = ((uint64_t)1 << (width * 8)) - 1; if (mrp)... |
0 | static int ide_drive_initfn(IDEDevice *dev){ return ide_dev_initfn(dev, bdrv_get_type_hint(dev->conf.bs) == BDRV_TYPE_CDROM ? IDE_CD : IDE_HD);} |
0 | static av_cold void h264dsp_init_neon(H264DSPContext *c, const int bit_depth, const int chroma_format_idc){#if HAVE_NEON if (bit_depth == 8) { c->h264_v_loop_filter_luma = ff_h264_v_loop_filter_luma_neon; c->h264_h_loop_filter_luma = ff_h264_h_loop_filter_luma_neon; if(chroma_format_idc == 1){ c->h264_v_loop_filter_chr... |
0 | int load_vmstate(Monitor *mon, const char *name){ DriveInfo *dinfo; BlockDriverState *bs, *bs1; QEMUSnapshotInfo sn; QEMUFile *f; int ret; bs = get_bs_snapshots(); if (!bs) { monitor_printf(mon, "No block device supports snapshots\n"); return -EINVAL; } /* Flush all IO requests so they don't interfere with the new stat... |
0 | static void spapr_tce_reset(DeviceState *dev){ sPAPRTCETable *tcet = SPAPR_TCE_TABLE(dev); size_t table_size = tcet->nb_table * sizeof(uint64_t); tcet->bypass = false; memset(tcet->table, 0, table_size);} |
1 | AVIOContext *avio_alloc_context( unsigned char *buffer, int buffer_size, int write_flag, void *opaque, int (*read_packet)(void *opaque, uint8_t *buf, int buf_size), int (*write_packet)(void *opaque, uint8_t *buf, int buf_size), int64_t (*seek)(void *opaque, int64_t offset, int whence)){ AVIOContext *s = av_mallocz(size... |
1 | static void slirp_guestfwd(SlirpState *s, Monitor *mon, const char *config_str, int legacy_format){ struct in_addr server = { .s_addr = 0 }; struct GuestFwd *fwd; const char *p; char buf[128]; char *end; int port; p = config_str; if (legacy_format) { if (get_str_sep(buf, sizeof(buf), &p, ':') < 0) { goto fail_syntax; }... |
1 | int s390_virtio_hypercall(CPUState *env, uint64_t mem, uint64_t hypercall){ int r = 0, i; dprintf("KVM hypercall: %ld\n", hypercall); switch (hypercall) { case KVM_S390_VIRTIO_NOTIFY: if (mem > ram_size) { VirtIOS390Device *dev = s390_virtio_bus_find_vring(s390_bus, mem, &i); if (dev) { virtio_queue_notify(dev->vdev, i... |
1 | PXA2xxPCMCIAState *pxa2xx_pcmcia_init(MemoryRegion *sysmem, hwaddr base){ DeviceState *dev; PXA2xxPCMCIAState *s; dev = qdev_create(NULL, TYPE_PXA2XX_PCMCIA); sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base); s = PXA2XX_PCMCIA(dev); if (base == 0x30000000) { s->slot.slot_string = "PXA PC Card Socket 1"; } else { s->slot.s... |
1 | static void qxl_exit_vga_mode(PCIQXLDevice *d){ if (d->mode != QXL_MODE_VGA) { return; } trace_qxl_exit_vga_mode(d->id); qxl_destroy_primary(d, QXL_SYNC);} |
1 | static int synth_frame(AVCodecContext *ctx, GetBitContext *gb, int frame_idx, float *samples, const double *lsps, const double *prev_lsps, float *excitation, float *synth){ WMAVoiceContext *s = ctx->priv_data; int n, n_blocks_x2, log_n_blocks_x2, cur_pitch_val; int pitch[MAX_BLOCKS], last_block_pitch; /* Parse frame ty... |
0 | int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd){ int64_t r = 0; av_assert2(c > 0); av_assert2(b >=0); av_assert2((unsigned)(rnd&~AV_ROUND_PASS_MINMAX)<=5 && (rnd&~AV_ROUND_PASS_MINMAX)!=4); if (c <= 0 || b < 0 || !((unsigned)(rnd&~AV_ROUND_PASS_MINMAX)<=5 && (rnd&~AV_ROUND_PASS_MINMAX)!=4))... |
0 | static inline void RENAME(rgb24tobgr32)(const uint8_t *src, uint8_t *dst, long src_size){ uint8_t *dest = dst; const uint8_t *s = src; const uint8_t *end;#if COMPILE_TEMPLATE_MMX const uint8_t *mm_end;#endif end = s + src_size;#if COMPILE_TEMPLATE_MMX __asm__ volatile(PREFETCH" %0"::"m"(*s):"memory"); mm_end = end - 23... |
0 | static void FUNC(transquant_bypass16x16)(uint8_t *_dst, int16_t *coeffs, ptrdiff_t stride){ int x, y; pixel *dst = (pixel *)_dst; stride /= sizeof(pixel); for (y = 0; y < 16; y++) { for (x = 0; x < 16; x++) { dst[x] += *coeffs; coeffs++; } dst += stride; }} |
0 | static int CUDAAPI cuvid_handle_video_sequence(void *opaque, CUVIDEOFORMAT* format){ AVCodecContext *avctx = opaque; CuvidContext *ctx = avctx->priv_data; AVHWFramesContext *hwframe_ctx = (AVHWFramesContext*)ctx->hwframe->data; CUVIDDECODECREATEINFO cuinfo; int surface_fmt; enum AVPixelFormat pix_fmts[3] = { AV_PIX_FMT... |
0 | static void set_stream_info_from_input_stream(AVStream *st, struct playlist *pls, AVStream *ist){ avcodec_parameters_copy(st->codecpar, ist->codecpar); if (pls->is_id3_timestamped) /* custom timestamps via id3 */ avpriv_set_pts_info(st, 33, 1, MPEG_TIME_BASE); else avpriv_set_pts_info(st, ist->pts_wrap_bits, ist->time_... |
1 | void ff_rtp_send_h264(AVFormatContext *s1, const uint8_t *buf1, int size){ const uint8_t *r, *end = buf1 + size; RTPMuxContext *s = s1->priv_data; s->timestamp = s->cur_timestamp; s->buf_ptr = s->buf; if (s->nal_length_size) r = ff_avc_mp4_find_startcode(buf1, end, s->nal_length_size) ? buf1 : end; else r = ff_avc_find... |
1 | static inline void idct4col_put(uint8_t *dest, int line_size, const DCTELEM *col){ int c0, c1, c2, c3, a0, a1, a2, a3; const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; a0 = col[8*0]; a1 = col[8*2]; a2 = col[8*4]; a3 = col[8*6]; c0 = ((a0 + a2) << (CN_SHIFT - 1)) + (1 << (C_SHIFT - 1)); c2 = ((a0 - a2) << (CN_SHIFT - 1)) ... |
1 | static ExitStatus gen_fbcond(DisasContext *ctx, TCGCond cond, int ra, int32_t disp){ TCGv cmp_tmp = tcg_temp_new(); gen_fold_mzero(cond, cmp_tmp, load_fpr(ctx, ra)); return gen_bcond_internal(ctx, cond, cmp_tmp, disp);} |
1 | int cpu_ppc_handle_mmu_fault (CPUState *env, target_ulong address, int rw, int is_user, int is_softmmu){ mmu_ctx_t ctx; int access_type; int ret = 0; if (rw == 2) { /* code access */ rw = 0; access_type = ACCESS_CODE; } else { /* data access */ /* XXX: put correct access by using cpu_restore_state() correctly */ access... |
0 | static inline void writer_print_string(WriterContext *wctx, const char *key, const char *val){ wctx->writer->print_string(wctx, key, val); wctx->nb_item++;} |
0 | static av_cold int cinvideo_decode_init(AVCodecContext *avctx){ CinVideoContext *cin = avctx->priv_data; unsigned int i; cin->avctx = avctx; avctx->pix_fmt = AV_PIX_FMT_PAL8; cin->frame.data[0] = NULL; cin->bitmap_size = avctx->width * avctx->height; for (i = 0; i < 3; ++i) { cin->bitmap_table[i] = av_mallocz(cin->bitm... |
0 | static int add_file(AVFormatContext *avf, char *filename, ConcatFile **rfile, unsigned *nb_files_alloc){ ConcatContext *cat = avf->priv_data; ConcatFile *file; char *url; size_t url_len; url_len = strlen(avf->filename) + strlen(filename) + 16; if (!(url = av_malloc(url_len))) return AVERROR(ENOMEM); ff_make_absolute_ur... |
1 | int kvm_arch_remove_hw_breakpoint(target_ulong addr, target_ulong len, int type){ return -EINVAL;} |
1 | static double compute_target_time(double frame_current_pts, VideoState *is){ double delay, sync_threshold, diff; /* compute nominal delay */ delay = frame_current_pts - is->frame_last_pts; if (delay <= 0 || delay >= 10.0) { /* if incorrect delay, use previous one */ delay = is->frame_last_delay; } else { is->frame_last... |
1 | long target_mmap(target_ulong start, target_ulong len, int prot, int flags, int fd, target_ulong offset){ target_ulong ret, end, real_start, real_end, retaddr, host_offset, host_len; long host_start;#if defined(__alpha__) || defined(__sparc__) || defined(__x86_64__) || \ defined(__ia64) || defined(__mips__) static targ... |
1 | read_f(int argc, char **argv){struct timeval t1, t2;int Cflag = 0, pflag = 0, qflag = 0, vflag = 0;int Pflag = 0, sflag = 0, lflag = 0;int c, cnt;char *buf;int64_t offset;int count; /* Some compilers get confused and warn if this is not initialized. */ int total = 0;int pattern = 0, pattern_offset = 0, pattern_count = ... |
1 | e1000_receive(VLANClientState *nc, const uint8_t *buf, size_t size){ E1000State *s = DO_UPCAST(NICState, nc, nc)->opaque; struct e1000_rx_desc desc; target_phys_addr_t base; unsigned int n, rdt; uint32_t rdh_start; uint16_t vlan_special = 0; uint8_t vlan_status = 0, vlan_offset = 0; uint8_t min_buf[MIN_BUF_SIZE]; size_... |
1 | static void ehci_update_frindex(EHCIState *ehci, int uframes){ int i; if (!ehci_enabled(ehci) && ehci->pstate == EST_INACTIVE) { return; } for (i = 0; i < uframes; i++) { ehci->frindex++; if (ehci->frindex == 0x00002000) { ehci_raise_irq(ehci, USBSTS_FLR); } if (ehci->frindex == 0x00004000) { ehci_raise_irq(ehci, USBST... |
1 | static int tee_write_header(AVFormatContext *avf){ TeeContext *tee = avf->priv_data; unsigned nb_slaves = 0, i; const char *filename = avf->filename; char *slaves[MAX_SLAVES]; int ret; while (*filename) { if (nb_slaves == MAX_SLAVES) { av_log(avf, AV_LOG_ERROR, "Maximum %d slave muxers reached.\n", MAX_SLAVES); ret = A... |
1 | static int css_add_virtual_chpid(uint8_t cssid, uint8_t chpid, uint8_t type){ CssImage *css; trace_css_chpid_add(cssid, chpid, type); if (cssid > MAX_CSSID) { return -EINVAL; } css = channel_subsys.css[cssid]; if (!css) { return -EINVAL; } if (css->chpids[chpid].in_use) { return -EEXIST; } css->chpids[chpid].in_use = 1... |
1 | iscsi_readcapacity10_cb(struct iscsi_context *iscsi, int status, void *command_data, void *opaque){ struct IscsiTask *itask = opaque; struct scsi_readcapacity10 *rc10; struct scsi_task *task = command_data; if (status != 0) { error_report("iSCSI: Failed to read capacity of iSCSI lun. %s", iscsi_get_error(iscsi)); itask... |
1 | bool qemu_net_queue_flush(NetQueue *queue){ while (!QTAILQ_EMPTY(&queue->packets)) { NetPacket *packet; int ret; packet = QTAILQ_FIRST(&queue->packets); QTAILQ_REMOVE(&queue->packets, packet, entry); ret = qemu_net_queue_deliver(queue, packet->sender, packet->flags, packet->data, packet->size); if (ret == 0) { queue->n... |
1 | void ffserver_parse_acl_row(FFServerStream *stream, FFServerStream* feed, FFServerIPAddressACL *ext_acl, const char *p, const char *filename, int line_num){ char arg[1024]; FFServerIPAddressACL acl; FFServerIPAddressACL *nacl; FFServerIPAddressACL **naclp; ffserver_get_arg(arg, sizeof(arg), &p); if (av_strcasecmp(arg, ... |
1 | static int check_refblocks(BlockDriverState *bs, BdrvCheckResult *res, BdrvCheckMode fix, uint16_t **refcount_table, int64_t *nb_clusters){ BDRVQcowState *s = bs->opaque; int64_t i, size; int ret; for(i = 0; i < s->refcount_table_size; i++) { uint64_t offset, cluster; offset = s->refcount_table[i]; cluster = offset >> ... |
1 | static void handle_sys(DisasContext *s, uint32_t insn, bool isread, unsigned int op0, unsigned int op1, unsigned int op2, unsigned int crn, unsigned int crm, unsigned int rt){ const ARMCPRegInfo *ri; TCGv_i64 tcg_rt; ri = get_arm_cp_reginfo(s->cp_regs, ENCODE_AA64_CP_REG(CP_REG_ARM64_SYSREG_CP, crn, crm, op0, op1, op2)... |
1 | soread(so)struct socket *so;{int n, nn, lss, total;struct sbuf *sb = &so->so_snd;int len = sb->sb_datalen - sb->sb_cc;struct iovec iov[2];int mss = so->so_tcpcb->t_maxseg;DEBUG_CALL("soread");DEBUG_ARG("so = %lx", (long )so);/* * No need to check if there's enough room to read. * soread wouldn't have been called if the... |
1 | static void decode_422_bitstream(HYuvContext *s, int count){ int i; count /= 2; if (count >= (get_bits_left(&s->gb)) / (31 * 4)) { for (i = 0; i < count && get_bits_left(&s->gb) > 0; i++) { READ_2PIX(s->temp[0][2 * i ], s->temp[1][i], 1); READ_2PIX(s->temp[0][2 * i + 1], s->temp[2][i], 2); } } else { for (i = 0; i < co... |
1 | static int dv_extract_audio(uint8_t* frame, uint8_t* ppcm[4], const DVprofile *sys){ int size, chan, i, j, d, of, smpls, freq, quant, half_ch; uint16_t lc, rc; const uint8_t* as_pack; uint8_t *pcm, ipcm; as_pack = dv_extract_pack(frame, dv_audio_source); if (!as_pack) /* No audio ? */ return 0; smpls = as_pack[1] & 0x3... |
1 | void ff_mpeg4_encode_picture_header(MpegEncContext *s, int picture_number){ int time_incr; int time_div, time_mod; if (s->pict_type == AV_PICTURE_TYPE_I) { if (!(s->avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER)) { if (s->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT) // HACK, the reference sw is buggy mpeg4_encode_vi... |
1 | static int hls_slice_data_wpp(HEVCContext *s, const HEVCNAL *nal){ const uint8_t *data = nal->data; int length = nal->size; HEVCLocalContext *lc = s->HEVClc; int *ret = av_malloc_array(s->sh.num_entry_point_offsets + 1, sizeof(int)); int *arg = av_malloc_array(s->sh.num_entry_point_offsets + 1, sizeof(int)); int64_t of... |
1 | void qemu_file_reset_rate_limit(QEMUFile *f){ f->bytes_xfer = 0;} |
1 | static struct mmsghdr *build_l2tpv3_vector(NetL2TPV3State *s, int count){ int i; struct iovec *iov; struct mmsghdr *msgvec, *result; msgvec = g_malloc(sizeof(struct mmsghdr) * count); result = msgvec; for (i = 0; i < count ; i++) { msgvec->msg_hdr.msg_name = NULL; msgvec->msg_hdr.msg_namelen = 0; iov = g_malloc(sizeof(... |
0 | int64_t bdrv_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum){ Coroutine *co; BdrvCoGetBlockStatusData data = { .bs = bs, .sector_num = sector_num, .nb_sectors = nb_sectors, .pnum = pnum, .done = false, }; if (qemu_in_coroutine()) { /* Fast-path if already in coroutine context */ bd... |
0 | static BlockDriverState *bdrv_new_open(const char *filename, const char *fmt, int flags, bool require_io, bool quiet){ BlockDriverState *bs; BlockDriver *drv; char password[256]; Error *local_err = NULL; int ret; bs = bdrv_new("image"); if (fmt) { drv = bdrv_find_format(fmt); if (!drv) { error_report("Unknown file form... |
0 | void monitor_init(CharDriverState *hd, int show_banner){ int i; if (is_first_init) { key_timer = qemu_new_timer(vm_clock, release_keys, NULL); if (!key_timer) return; for (i = 0; i < MAX_MON; i++) { monitor_hd[i] = NULL; } is_first_init = 0; } for (i = 0; i < MAX_MON; i++) { if (monitor_hd[i] == NULL) { monitor_hd[i] =... |
0 | void OPPROTO op_jz_T0_label(void){ if (!T0) GOTO_LABEL_PARAM(1); FORCE_RET();} |
0 | struct omap_lcd_panel_s *omap_lcdc_init(MemoryRegion *sysmem, hwaddr base, qemu_irq irq, struct omap_dma_lcd_channel_s *dma, omap_clk clk){ struct omap_lcd_panel_s *s = (struct omap_lcd_panel_s *) g_malloc0(sizeof(struct omap_lcd_panel_s)); s->irq = irq; s->dma = dma; s->sysmem = sysmem; omap_lcdc_reset(s); memory_regi... |
0 | int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush){ AVPacketList *pktl, **next_point, *this_pktl; int stream_count=0; int streams[MAX_STREAMS]; if(pkt){ AVStream *st= s->streams[ pkt->stream_index];// assert(pkt->destruct != av_destruct_packet); //FIXME this_pktl = av_mallocz(... |
0 | int cpu_mb_handle_mmu_fault (CPUState *env, target_ulong address, int rw, int mmu_idx, int is_softmmu){ unsigned int hit; unsigned int mmu_available; int r = 1; int prot; mmu_available = 0; if (env->pvr.regs[0] & PVR0_USE_MMU) { mmu_available = 1; if ((env->pvr.regs[0] & PVR0_PVR_FULL_MASK) && (env->pvr.regs[11] & PVR1... |
0 | static uint64_t grlib_irqmp_read(void *opaque, target_phys_addr_t addr, unsigned size){ IRQMP *irqmp = opaque; IRQMPState *state; assert(irqmp != NULL); state = irqmp->state; assert(state != NULL); addr &= 0xff; /* global registers */ switch (addr) { case LEVEL_OFFSET: return state->level; case PENDING_OFFSET: return s... |
0 | Object *object_new_with_propv(const char *typename, Object *parent, const char *id, Error **errp, va_list vargs){ Object *obj; ObjectClass *klass; Error *local_err = NULL; klass = object_class_by_name(typename); if (!klass) { error_setg(errp, "invalid object type: %s", typename); return NULL; } if (object_class_is_abst... |
0 | void start_auth_sasl(VncState *vs){ const char *mechlist = NULL; sasl_security_properties_t secprops; int err; char *localAddr, *remoteAddr; int mechlistlen; VNC_DEBUG("Initialize SASL auth %d\n", vs->csock); /* Get local & remote client addresses in form IPADDR;PORT */ if (!(localAddr = vnc_socket_local_addr("%s;%s", ... |
0 | static void visitor_output_teardown(TestOutputVisitorData *data, const void *unused){ visit_free(data->ov); data->sov = NULL; data->ov = NULL; g_free(data->str); data->str = NULL;} |
0 | static void megasas_port_write(void *opaque, target_phys_addr_t addr, uint64_t val, unsigned size){ megasas_mmio_write(opaque, addr & 0xff, val, size);} |
0 | static inline void os_host_main_loop_wait(int *timeout){} |
0 | uint32_t HELPER(ucf64_get_fpscr)(CPUUniCore32State *env){ int i; uint32_t fpscr; fpscr = (env->ucf64.xregs[UC32_UCF64_FPSCR] & UCF64_FPSCR_MASK); i = get_float_exception_flags(&env->ucf64.fp_status); fpscr |= ucf64_exceptbits_from_host(i); return fpscr;} |
0 | static int img_resize(int argc, char **argv){ int c, ret, relative; const char *filename, *fmt, *size; int64_t n, total_size; BlockDriverState *bs = NULL; QemuOpts *param; static QemuOptsList resize_options = { .name = "resize_options", .head = QTAILQ_HEAD_INITIALIZER(resize_options.head), .desc = { { .name = BLOCK_OPT... |
0 | void dump_exec_info(FILE *f, fprintf_function cpu_fprintf){ int i, target_code_size, max_target_code_size; int direct_jmp_count, direct_jmp2_count, cross_page; TranslationBlock *tb; struct qht_stats hst; tb_lock(); if (!tcg_enabled()) { cpu_fprintf(f, "TCG not enabled\n"); return; } target_code_size = 0; max_target_cod... |
0 | build_fadt(GArray *table_data, BIOSLinker *linker, AcpiPmInfo *pm, unsigned facs, unsigned dsdt, const char *oem_id, const char *oem_table_id){ AcpiFadtDescriptorRev1 *fadt = acpi_data_push(table_data, sizeof(*fadt)); fadt->firmware_ctrl = cpu_to_le32(facs); /* FACS address to be filled by Guest linker */ bios_linker_l... |
0 | void arm_cpu_do_unaligned_access(CPUState *cs, vaddr vaddr, int is_write, int is_user, uintptr_t retaddr){ ARMCPU *cpu = ARM_CPU(cs); CPUARMState *env = &cpu->env; int target_el; bool same_el; if (retaddr) { /* now we have a real cpu fault */ cpu_restore_state(cs, retaddr); } target_el = exception_target_el(env); same_... |
0 | static void flash_sync_page(Flash *s, int page){ int bdrv_sector, nb_sectors; QEMUIOVector iov; if (!s->bdrv || bdrv_is_read_only(s->bdrv)) { return; } bdrv_sector = (page * s->pi->page_size) / BDRV_SECTOR_SIZE; nb_sectors = DIV_ROUND_UP(s->pi->page_size, BDRV_SECTOR_SIZE); qemu_iovec_init(&iov, 1); qemu_iovec_add(&iov... |
0 | static int proxy_lstat(FsContext *fs_ctx, V9fsPath *fs_path, struct stat *stbuf){ int retval; retval = v9fs_request(fs_ctx->private, T_LSTAT, stbuf, "s", fs_path); if (retval < 0) { errno = -retval; return -1; } return retval;} |
0 | void bios_linker_loader_add_checksum(GArray *linker, const char *file, GArray *table, void *start, unsigned size, uint8_t *checksum){ BiosLinkerLoaderEntry entry; ptrdiff_t checksum_offset = (gchar *)checksum - table->data; ptrdiff_t start_offset = (gchar *)start - table->data; assert(checksum_offset >= 0); assert(star... |
0 | void backup_do_checkpoint(BlockJob *job, Error **errp){ BackupBlockJob *backup_job = container_of(job, BackupBlockJob, common); int64_t len; assert(job->driver->job_type == BLOCK_JOB_TYPE_BACKUP); if (backup_job->sync_mode != MIRROR_SYNC_MODE_NONE) { error_setg(errp, "The backup job only supports block checkpoint in" "... |
0 | int floatx80_is_nan( floatx80 a1 ){ floatx80u u; u.f = a1; return ( ( u.i.high & 0x7FFF ) == 0x7FFF ) && (bits64) ( u.i.low<<1 );} |
0 | static void taihu_cpld_writel (void *opaque, hwaddr addr, uint32_t value){ taihu_cpld_writel(opaque, addr, (value >> 24) & 0xFF); taihu_cpld_writel(opaque, addr + 1, (value >> 16) & 0xFF); taihu_cpld_writel(opaque, addr + 2, (value >> 8) & 0xFF); taihu_cpld_writeb(opaque, addr + 3, value & 0xFF);} |
0 | static int mov_write_stts_tag(AVIOContext *pb, MOVTrack *track){ MOVStts *stts_entries; uint32_t entries = -1; uint32_t atom_size; int i; if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO && !track->audio_vbr) { stts_entries = av_malloc(sizeof(*stts_entries)); /* one entry */ if (!stts_entries) return AVERROR(ENOMEM); s... |
0 | void qcrypto_cipher_free(QCryptoCipher *cipher){ QCryptoCipherBuiltin *ctxt = cipher->opaque; if (!cipher) { return; } ctxt->free(cipher); g_free(cipher);} |
0 | static uint64_t omap_wd_timer_read(void *opaque, target_phys_addr_t addr, unsigned size){ struct omap_watchdog_timer_s *s = (struct omap_watchdog_timer_s *) opaque; if (size != 2) { return omap_badwidth_read16(opaque, addr); } switch (addr) { case 0x00:/* CNTL_TIMER */ return (s->timer.ptv << 9) | (s->timer.ar << 8) | ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.