label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
1 | static int spapr_vty_init(VIOsPAPRDevice *sdev) { VIOsPAPRVTYDevice *dev = (VIOsPAPRVTYDevice *)sdev; qemu_chr_add_handlers(dev->chardev, vty_can_receive, vty_receive, NULL, dev); return 0; | 22,496 |
1 | static void exynos4210_ltick_recalc_count(struct tick_timer *s) { uint64_t to_count; if ((s->cnt_run && s->last_tcnto) || (s->int_run && s->last_icnto)) { /* * one or both timers run and not counted to the end; * distance is not passed, recalculate with last_tcnto * last_icnto */ if (s->last_tcnto) { to_count = s->last... | 22,497 |
1 | static void mirror_start_job(const char *job_id, BlockDriverState *bs, int creation_flags, BlockDriverState *target, const char *replaces, int64_t speed, uint32_t granularity, int64_t buf_size, BlockMirrorBackingMode backing_mode, BlockdevOnError on_source_error, BlockdevOnError on_target_error, bool unmap, BlockComple... | 22,498 |
1 | static int asf_read_packet(AVFormatContext *s, AVPacket *pkt) { ASFContext *asf = s->priv_data; ASFStream *asf_st = 0; ByteIOContext *pb = &s->pb; //static int pc = 0; for (;;) { int rsize = 0; if (asf->packet_size_left < FRAME_HEADER_SIZE || asf->packet_segments < 1) { //asf->packet_size_left <= asf->packet_padsize) {... | 22,499 |
0 | static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; TiffContext *const s = avctx->priv_data; AVFrame *picture = data; AVFrame *const p = &s->picture; const uint8_t *orig_buf = buf, *end_buf = buf + buf_size; unsigned... | 22,500 |
0 | void ff_limiter_init_x86(LimiterDSPContext *dsp, int bpp) { int cpu_flags = av_get_cpu_flags(); if (ARCH_X86_64 && EXTERNAL_SSE2(cpu_flags)) { if (bpp <= 8) { dsp->limiter = ff_limiter_8bit_sse2; } } if (ARCH_X86_64 && EXTERNAL_SSE4(cpu_flags)) { if (bpp > 8) { dsp->limiter = ff_limiter_16bit_sse4; } } } | 22,501 |
1 | void *virtqueue_pop(VirtQueue *vq, size_t sz) { unsigned int i, head, max; hwaddr desc_pa = vq->vring.desc; VirtIODevice *vdev = vq->vdev; VirtQueueElement *elem; unsigned out_num, in_num; hwaddr addr[VIRTQUEUE_MAX_SIZE]; struct iovec iov[VIRTQUEUE_MAX_SIZE]; VRingDesc desc; if (virtio_queue_empty(vq)) { return NULL; /... | 22,502 |
1 | static int img_open_password(BlockBackend *blk, const char *filename, int flags, bool quiet) { BlockDriverState *bs; char password[256]; bs = blk_bs(blk); if (bdrv_is_encrypted(bs) && bdrv_key_required(bs) && !(flags & BDRV_O_NO_IO)) { qprintf(quiet, "Disk image '%s' is encrypted.\n", filename); if (qemu_read_password(... | 22,504 |
1 | static void dump(unsigned char *buf,size_t len) { int i; for(i=0;i<len;i++) { if ((i&15)==0) printf("%04x ",i); printf("%02x ",buf[i]); if ((i&15)==15) printf("\n"); } printf("\n"); } | 22,505 |
1 | static int hls_decode_entry_wpp(AVCodecContext *avctxt, void *input_ctb_row, int job, int self_id) { HEVCContext *s1 = avctxt->priv_data, *s; HEVCLocalContext *lc; int ctb_size = 1<< s1->ps.sps->log2_ctb_size; int more_data = 1; int *ctb_row_p = input_ctb_row; int ctb_row = ctb_row_p[job]; int ctb_addr_rs = s1->sh.slic... | 22,506 |
1 | static int mpegts_raw_read_packet(AVFormatContext *s, AVPacket *pkt) { MpegTSContext *ts = s->priv_data; int ret, i; int64_t pcr_h, next_pcr_h, pos; int pcr_l, next_pcr_l; uint8_t pcr_buf[12]; uint8_t *data; if (av_new_packet(pkt, TS_PACKET_SIZE) < 0) return AVERROR(ENOMEM); pkt->pos= avio_tell(s->pb); ret = read_packe... | 22,508 |
1 | static inline void RENAME(rgb24tobgr16)(const uint8_t *src, uint8_t *dst, int src_size) { const uint8_t *s = src; const uint8_t *end; const uint8_t *mm_end; uint16_t *d = (uint16_t *)dst; end = s + src_size; __asm__ volatile(PREFETCH" %0"::"m"(*src):"memory"); __asm__ volatile( "movq %0, %%mm7 \n\t" "movq %1, %%mm6 \n\... | 22,509 |
1 | static void gen_mfdcrx(DisasContext *ctx) { #if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_REG); #else if (unlikely(ctx->pr)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_REG); return; } /* NIP cannot be restored if the memory exception comes from an helper */ gen_update_nip(ctx, ctx->nip - 4)... | 22,510 |
0 | static void png_save2(const char *filename, uint32_t *bitmap, int w, int h) { int x, y, v; FILE *f; char fname[40], fname2[40]; char command[1024]; snprintf(fname, 40, "%s.ppm", filename); f = fopen(fname, "w"); if (!f) { perror(fname); exit(1); } fprintf(f, "P6\n" "%d %d\n" "%d\n", w, h, 255); for(y = 0; y < h; y++) {... | 22,512 |
0 | static int spdif_write_packet(struct AVFormatContext *s, AVPacket *pkt) { IEC61937Context *ctx = s->priv_data; int ret, padding; ctx->out_buf = pkt->data; ctx->out_bytes = pkt->size; ctx->length_code = FFALIGN(pkt->size, 2) << 3; ctx->use_preamble = 1; ctx->extra_bswap = 0; ret = ctx->header_info(s, pkt); if (ret < 0) ... | 22,513 |
0 | av_cold void ff_rl_init(RLTable *rl, uint8_t static_store[2][2 * MAX_RUN + MAX_LEVEL + 3]) { int8_t max_level[MAX_RUN + 1], max_run[MAX_LEVEL + 1]; uint8_t index_run[MAX_RUN + 1]; int last, run, level, start, end, i; /* If table is static, we can quit if rl->max_level[0] is not NULL */ if (static_store && rl->max_level... | 22,514 |
1 | static void gen_slbie(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_slbie(cpu_env, cpu_gpr[rB(ctx->opcode)]); #endif } | 22,515 |
1 | static int usb_hid_handle_data(USBDevice *dev, USBPacket *p) { USBHIDState *s = (USBHIDState *)dev; int ret = 0; switch(p->pid) { case USB_TOKEN_IN: if (p->devep == 1) { int64_t curtime = qemu_get_clock_ns(vm_clock); if (!s->changed && (!s->idle || s->next_idle_clock - curtime > 0)) return USB_RET_NAK; usb_hid_set_next... | 22,516 |
1 | int av_opencl_init(AVDictionary *options, AVOpenCLExternalEnv *ext_opencl_env) { int ret = 0; AVDictionaryEntry *opt_build_entry; AVDictionaryEntry *opt_platform_entry; AVDictionaryEntry *opt_device_entry; LOCK_OPENCL if (!gpu_env.init_count) { opt_platform_entry = av_dict_get(options, "platform_idx", NULL, 0); opt_dev... | 22,517 |
1 | static int msf_read_header(AVFormatContext *s) { unsigned codec, align, size; AVStream *st; avio_skip(s->pb, 4); st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; codec = avio_rb32(s->pb); st->codec->channels = avio_rb32(s->pb); if (st->codec->channels <= 0)... | 22,518 |
1 | 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; target_code_size = 0; max_target_code_size = 0; cross_page = 0; direct_jmp_count = 0; direct_jmp2_count = 0; for (i = 0; i < tcg_ctx.tb_c... | 22,519 |
1 | static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req) { uint32_t rca = 0x0000; uint64_t addr = (sd->ocr & (1 << 30)) ? (uint64_t) req.arg << 9 : req.arg; if (sd_cmd_type[req.cmd] == sd_ac || sd_cmd_type[req.cmd] == sd_adtc) rca = req.arg >> 16; DPRINTF("CMD%d 0x%08x state %d\n", req.cmd, req.arg, sd->state... | 22,520 |
0 | static int32_t tag_tree_size(uint16_t w, uint16_t h) { uint32_t res = 0; while (w > 1 || h > 1) { res += w * h; if (res + 1 >= INT32_MAX) return -1; w = (w + 1) >> 1; h = (h + 1) >> 1; } return (int32_t)(res + 1); } | 22,521 |
0 | static int mov_write_packet(AVFormatContext *s, AVPacket *pkt) { MOVContext *mov = s->priv_data; ByteIOContext *pb = s->pb; MOVTrack *trk = &mov->tracks[pkt->stream_index]; AVCodecContext *enc = trk->enc; unsigned int samplesInChunk = 0; int size= pkt->size; if (url_is_streamed(s->pb)) return 0; /* Can't handle that */... | 22,522 |
0 | static inline void RENAME(rgb24tobgr24)(const uint8_t *src, uint8_t *dst, long src_size) { unsigned i; #if COMPILE_TEMPLATE_MMX x86_reg mmx_size= 23 - src_size; __asm__ volatile ( "test %%"REG_a", %%"REG_a" \n\t" "jns 2f \n\t" "movq "MANGLE(mask24r)", %%mm5 \n\t" "movq "MANGLE(mask24g)", %%mm6 \n\t" "movq "MANGLE(mask2... | 22,523 |
0 | static inline void mix_2f_2r_to_mono(AC3DecodeContext *ctx) { int i; float (*output)[256] = ctx->audio_block.block_output; for (i = 0; i < 256; i++) output[1][i] = (output[2][i] + output[3][i] + output[4][i]); memset(output[2], 0, sizeof(output[2])); memset(output[3], 0, sizeof(output[3])); memset(output[4], 0, sizeof(... | 22,524 |
1 | void OPPROTO op_405_check_ov (void) { do_405_check_ov(); RETURN(); } | 22,525 |
1 | static void put_int32(QEMUFile *f, void *pv, size_t size) { int32_t *v = pv; qemu_put_sbe32s(f, v); } | 22,526 |
1 | static ExitStatus trans_fop_wew_0c(DisasContext *ctx, uint32_t insn, const DisasInsn *di) { unsigned rt = extract32(insn, 0, 5); unsigned ra = extract32(insn, 21, 5); return do_fop_wew(ctx, rt, ra, di->f_wew); } | 22,527 |
1 | static void ebml_free(EbmlSyntax *syntax, void *data) { int i, j; for (i = 0; syntax[i].id; i++) { void *data_off = (char *) data + syntax[i].data_offset; switch (syntax[i].type) { case EBML_STR: case EBML_UTF8: av_freep(data_off); break; case EBML_BIN: av_freep(&((EbmlBin *) data_off)->data); break; case EBML_LEVEL1: ... | 22,528 |
1 | static int common_bind(struct common *c) { uint64_t mfn; if (xenstore_read_fe_uint64(&c->xendev, "page-ref", &mfn) == -1) return -1; assert(mfn == (xen_pfn_t)mfn); if (xenstore_read_fe_int(&c->xendev, "event-channel", &c->xendev.remote_port) == -1) return -1; c->page = xc_map_foreign_range(xen_xc, c->xendev.dom, XC_PAG... | 22,529 |
1 | int av_thread_message_queue_alloc(AVThreadMessageQueue **mq, unsigned nelem, unsigned elsize) { #if HAVE_THREADS AVThreadMessageQueue *rmq; int ret = 0; if (nelem > INT_MAX / elsize) return AVERROR(EINVAL); if (!(rmq = av_mallocz(sizeof(*rmq)))) return AVERROR(ENOMEM); if ((ret = pthread_mutex_init(&rmq->lock, NULL))) ... | 22,530 |
1 | static void xvid_idct_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block) { ff_xvid_idct(block); ff_put_pixels_clamped(block, dest, line_size); } | 22,532 |
1 | int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) { int ret; int user_packet = !!avpkt->data; *got_packet_ptr = 0; if (!(avctx->codec->capabilities & CODEC_CAP_DELAY) && !frame) { av_free_packet(avpkt); av_init_packet(avpkt); avpkt->size = 0... | 22,533 |
1 | static int get_str(ByteIOContext *bc, char *string, int maxlen){ int len= get_v(bc); if(len && maxlen) get_buffer(bc, string, FFMIN(len, maxlen)); while(len > maxlen){ get_byte(bc); len--; } if(maxlen) string[FFMIN(len, maxlen-1)]= 0; if(maxlen == len) return -1; else return 0; } | 22,535 |
1 | static int dvbsub_decode(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; DVBSubContext *ctx = avctx->priv_data; AVSubtitle *sub = data; const uint8_t *p, *p_end; int segment_type; int page_id; int segment_length; #ifdef DEBUG_PACKET_CON... | 22,536 |
1 | static int tag_tree_decode(Jpeg2000DecoderContext *s, Jpeg2000TgtNode *node, int threshold) { Jpeg2000TgtNode *stack[30]; int sp = -1, curval = 0; while (node && !node->vis) { stack[++sp] = node; node = node->parent; } if (node) curval = node->val; else curval = stack[sp]->val; while (curval < threshold && sp >= 0) { i... | 22,537 |
1 | static int output_configure(AACContext *ac, uint8_t layout_map[MAX_ELEM_ID * 4][3], int tags, enum OCStatus oc_type, int get_new_frame) { AVCodecContext *avctx = ac->avctx; int i, channels = 0, ret; uint64_t layout = 0; uint8_t id_map[TYPE_END][MAX_ELEM_ID] = {{ 0 }}; uint8_t type_counts[TYPE_END] = { 0 }; if (ac->oc[1... | 22,538 |
0 | static int qemu_paio_submit(struct qemu_paiocb *aiocb, int type) { aiocb->aio_type = type; aiocb->ret = -EINPROGRESS; aiocb->active = 0; mutex_lock(&lock); if (idle_threads == 0 && cur_threads < max_threads) spawn_thread(); TAILQ_INSERT_TAIL(&request_list, aiocb, node); mutex_unlock(&lock); cond_signal(&cond); return 0... | 22,539 |
0 | uint64_t helper_fnmadd(CPUPPCState *env, uint64_t arg1, uint64_t arg2, uint64_t arg3) { CPU_DoubleU farg1, farg2, farg3; farg1.ll = arg1; farg2.ll = arg2; farg3.ll = arg3; if (unlikely((float64_is_infinity(farg1.d) && float64_is_zero(farg2.d)) || (float64_is_zero(farg1.d) && float64_is_infinity(farg2.d)))) { /* Multipl... | 22,540 |
0 | static BlockAIOCB *bdrv_aio_writev_em(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockCompletionFunc *cb, void *opaque) { return bdrv_aio_rw_vector(bs, sector_num, qiov, nb_sectors, cb, opaque, 1); } | 22,541 |
0 | static void attach_storage_element(SCLPDevice *sclp, SCCB *sccb, uint16_t element) { int i, assigned, subincrement_id; AttachStorageElement *attach_info = (AttachStorageElement *) sccb; sclpMemoryHotplugDev *mhd = get_sclp_memory_hotplug_dev(); assert(mhd); if (element != 1) { sccb->h.response_code = cpu_to_be16(SCLP_R... | 22,542 |
0 | static void kvmppc_pivot_hpt_cpu(CPUState *cs, run_on_cpu_data arg) { target_ulong sdr1 = arg.target_ptr; PowerPCCPU *cpu = POWERPC_CPU(cs); CPUPPCState *env = &cpu->env; /* This is just for the benefit of PR KVM */ cpu_synchronize_state(cs); env->spr[SPR_SDR1] = sdr1; if (kvmppc_put_books_sregs(cpu) < 0) { error_repor... | 22,543 |
0 | static int send_rect_simple(VncState *vs, int x, int y, int w, int h) { int max_size, max_width; int max_sub_width, max_sub_height; int dx, dy; int rw, rh; int n = 0; max_size = tight_conf[vs->tight_compression].max_rect_size; max_width = tight_conf[vs->tight_compression].max_rect_width; if (w > max_width || w * h > ma... | 22,544 |
0 | 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, ret; const int cxshift = s->cxshift; unsigned lx, ly, ptype; reinit_tables(s); bytestream2_skip(gb, 2); ... | 22,548 |
0 | static void gen_extu(int ot, TCGv reg) { switch(ot) { case OT_BYTE: tcg_gen_ext8u_tl(reg, reg); break; case OT_WORD: tcg_gen_ext16u_tl(reg, reg); break; case OT_LONG: tcg_gen_ext32u_tl(reg, reg); break; default: break; } } | 22,549 |
0 | ssize_t read_targphys(const char *name, int fd, target_phys_addr_t dst_addr, size_t nbytes) { uint8_t *buf; ssize_t did; buf = g_malloc(nbytes); did = read(fd, buf, nbytes); if (did > 0) rom_add_blob_fixed("read", buf, did, dst_addr); g_free(buf); return did; } | 22,550 |
0 | DeviceState *qdev_device_add(QemuOpts *opts) { DeviceClass *k; const char *driver, *path, *id; DeviceState *qdev; BusState *bus; driver = qemu_opt_get(opts, "driver"); if (!driver) { qerror_report(QERR_MISSING_PARAMETER, "driver"); return NULL; } /* find driver */ k = DEVICE_CLASS(object_class_by_name(driver)); /* find... | 22,551 |
0 | static void qdict_teardown(void) { QDECREF(tests_dict); tests_dict = NULL; } | 22,554 |
0 | static void tcg_out_brcond(TCGContext *s, TCGCond cond, TCGArg arg1, TCGArg arg2, int const_arg2, int label_index, TCGType type) { tcg_out_cmp(s, cond, arg1, arg2, const_arg2, 7, type); tcg_out_bc(s, tcg_to_bc[cond], label_index); } | 22,555 |
0 | static void qxl_track_command(PCIQXLDevice *qxl, struct QXLCommandExt *ext) { switch (le32_to_cpu(ext->cmd.type)) { case QXL_CMD_SURFACE: { QXLSurfaceCmd *cmd = qxl_phys2virt(qxl, ext->cmd.data, ext->group_id); uint32_t id = le32_to_cpu(cmd->surface_id); PANIC_ON(id >= NUM_SURFACES); qemu_mutex_lock(&qxl->track_lock); ... | 22,556 |
0 | static void nvdimm_dsm_label_size(NVDIMMDevice *nvdimm, hwaddr dsm_mem_addr) { NvdimmFuncGetLabelSizeOut label_size_out = { .len = cpu_to_le32(sizeof(label_size_out)), }; uint32_t label_size, mxfer; label_size = nvdimm->label_size; mxfer = nvdimm_get_max_xfer_label_size(); nvdimm_debug("label_size %#x, max_xfer %#x.\n"... | 22,557 |
0 | qemu_irq *armv7m_init(int flash_size, int sram_size, const char *kernel_filename, const char *cpu_model) { CPUState *env; DeviceState *nvic; /* FIXME: make this local state. */ static qemu_irq pic[64]; qemu_irq *cpu_pic; uint32_t pc; int image_size; uint64_t entry; uint64_t lowaddr; int i; flash_size *= 1024; sram_size... | 22,558 |
0 | int monitor_get_fd(Monitor *mon, const char *fdname) { mon_fd_t *monfd; LIST_FOREACH(monfd, &mon->fds, next) { int fd; if (strcmp(monfd->name, fdname) != 0) { continue; } fd = monfd->fd; /* caller takes ownership of fd */ LIST_REMOVE(monfd, next); qemu_free(monfd->name); qemu_free(monfd); return fd; } return -1; } | 22,560 |
0 | static int count_cow_clusters(BDRVQcow2State *s, int nb_clusters, uint64_t *l2_table, int l2_index) { int i; for (i = 0; i < nb_clusters; i++) { uint64_t l2_entry = be64_to_cpu(l2_table[l2_index + i]); QCow2ClusterType cluster_type = qcow2_get_cluster_type(l2_entry); switch(cluster_type) { case QCOW2_CLUSTER_NORMAL: if... | 22,561 |
0 | VirtIOS390Device *s390_virtio_bus_find_vring(VirtIOS390Bus *bus, ram_addr_t mem, int *vq_num) { BusChild *kid; int i; QTAILQ_FOREACH(kid, &bus->bus.children, sibling) { VirtIOS390Device *dev = (VirtIOS390Device *)kid->child; for(i = 0; i < VIRTIO_PCI_QUEUE_MAX; i++) { if (!virtio_queue_get_addr(dev->vdev, i)) break; if... | 22,562 |
0 | static inline int parse_nal_units(AVCodecParserContext *s, const uint8_t *buf, int buf_size, AVCodecContext *avctx) { HEVCParserContext *ctx = s->priv_data; HEVCContext *h = &ctx->h; GetBitContext *gb; SliceHeader *sh = &h->sh; HEVCParamSets *ps = &h->ps; HEVCSEIContext *sei = &h->sei; int is_global = buf == avctx->ext... | 22,563 |
0 | void ff_put_h264_qpel4_mc22_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_mid_4w_msa(src - (2 * stride) - 2, stride, dst, stride, 4); } | 22,564 |
0 | int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length, void *logctx, int is_nalff, int nal_length_size, enum AVCodecID codec_id) { int consumed, ret = 0; const uint8_t *next_avc = buf + (is_nalff ? 0 : length); pkt->nb_nals = 0; while (length >= 4) { H2645NAL *nal; int extract_length = 0; int skip_... | 22,566 |
0 | static int output_packet(AVInputStream *ist, int ist_index, AVOutputStream **ost_table, int nb_ostreams, const AVPacket *pkt) { AVFormatContext *os; AVOutputStream *ost; uint8_t *ptr; int len, ret, i; uint8_t *data_buf; int data_size, got_picture; AVFrame picture; short samples[AVCODEC_MAX_AUDIO_FRAME_SIZE / 2]; void *... | 22,567 |
0 | static void count_frame_bits(AC3EncodeContext *s) { AC3EncOptions *opt = &s->options; int blk, ch; int frame_bits = 0; /* header */ if (s->eac3) { /* coupling */ if (s->channel_mode > AC3_CHMODE_MONO) { frame_bits++; for (blk = 1; blk < AC3_MAX_BLOCKS; blk++) { AC3Block *block = &s->blocks[blk]; frame_bits++; if (block... | 22,568 |
1 | void sp804_init(uint32_t base, qemu_irq irq) { int iomemtype; sp804_state *s; qemu_irq *qi; s = (sp804_state *)qemu_mallocz(sizeof(sp804_state)); qi = qemu_allocate_irqs(sp804_set_irq, s, 2); s->base = base; s->irq = irq; /* ??? The timers are actually configurable between 32kHz and 1MHz, but we don't implement that. *... | 22,569 |
1 | static void network_init(void) { int i; for(i = 0; i < nb_nics; i++) { NICInfo *nd = &nd_table[i]; const char *default_devaddr = NULL; if (i == 0 && (!nd->model || strcmp(nd->model, "pcnet") == 0)) /* The malta board has a PCNet card using PCI SLOT 11 */ default_devaddr = "0b"; pci_nic_init(nd, "pcnet", default_devaddr... | 22,570 |
1 | static uint8_t *buffer_end(Buffer *buffer) { return buffer->buffer + buffer->offset; } | 22,571 |
1 | PXA2xxState *pxa270_init(MemoryRegion *address_space, unsigned int sdram_size, const char *revision) { PXA2xxState *s; int i; DriveInfo *dinfo; s = (PXA2xxState *) g_malloc0(sizeof(PXA2xxState)); if (revision && strncmp(revision, "pxa27", 5)) { fprintf(stderr, "Machine requires a PXA27x processor.\n"); exit(1); } if (!... | 22,572 |
1 | static int cpu_mips_register (CPUMIPSState *env, const mips_def_t *def) { env->CP0_PRid = def->CP0_PRid; env->CP0_Config0 = def->CP0_Config0; #ifdef TARGET_WORDS_BIGENDIAN env->CP0_Config0 |= (1 << CP0C0_BE); #endif env->CP0_Config1 = def->CP0_Config1; env->CP0_Config2 = def->CP0_Config2; env->CP0_Config3 = def->CP0_Co... | 22,574 |
1 | static void gd_update(DisplayChangeListener *dcl, DisplayState *ds, int x, int y, int w, int h) { GtkDisplayState *s = ds->opaque; int x1, x2, y1, y2; int mx, my; int fbw, fbh; int ww, wh; DPRINTF("update(x=%d, y=%d, w=%d, h=%d)\n", x, y, w, h); x1 = floor(x * s->scale_x); y1 = floor(y * s->scale_y); x2 = ceil(x * s->s... | 22,575 |
1 | static void load_module(const char *filename) { void *dll; void (*init_func)(void); dll = dlopen(filename, RTLD_NOW); if (!dll) { fprintf(stderr, "Could not load module '%s' - %s\n", filename, dlerror()); } init_func = dlsym(dll, "ffserver_module_init"); if (!init_func) { fprintf(stderr, "%s: init function 'ffserver_mo... | 22,576 |
0 | DVDemuxContext* avpriv_dv_init_demux(AVFormatContext *s) { DVDemuxContext *c; c = av_mallocz(sizeof(DVDemuxContext)); if (!c) return NULL; c->vst = avformat_new_stream(s, NULL); if (!c->vst) { av_free(c); return NULL; } c->sys = NULL; c->fctx = s; memset(c->ast, 0, sizeof(c->ast)); c->ach = 0; c->frames = 0; c->abytes ... | 22,577 |
1 | int ff_read_riff_info(AVFormatContext *s, int64_t size) { int64_t start, end, cur; AVIOContext *pb = s->pb; start = avio_tell(pb); end = start + size; while ((cur = avio_tell(pb)) >= 0 && cur <= end - 8 /* = tag + size */) { uint32_t chunk_code; int64_t chunk_size; char key[5] = {0}; char *value; chunk_code = avio_rl32... | 22,578 |
1 | static int h261_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; H261Context *h = avctx->priv_data; MpegEncContext *s = &h->s; int ret; AVFrame *pict = data; av_dlog(avctx, "*****frame %d size=%d\n", avctx->frame_number, buf... | 22,579 |
1 | int qcow2_alloc_cluster_offset(BlockDriverState *bs, uint64_t offset, int n_start, int n_end, int *num, QCowL2Meta *m) { BDRVQcowState *s = bs->opaque; int l2_index, ret, sectors; uint64_t *l2_table; unsigned int nb_clusters, keep_clusters; uint64_t cluster_offset; trace_qcow2_alloc_clusters_offset(qemu_coroutine_self(... | 22,580 |
1 | static void tb_gen_code(CPUState *env, target_ulong pc, target_ulong cs_base, int flags, int cflags) { TranslationBlock *tb; uint8_t *tc_ptr; target_ulong phys_pc, phys_page2, virt_page2; int code_gen_size; phys_pc = get_phys_addr_code(env, pc); tb = tb_alloc(pc); if (!tb) { /* flush must be done */ tb_flush(env); /* c... | 22,581 |
1 | void cpu_inject_x86_mce(CPUState *cenv, int bank, uint64_t status, uint64_t mcg_status, uint64_t addr, uint64_t misc) { uint64_t mcg_cap = cenv->mcg_cap; unsigned bank_num = mcg_cap & 0xff; uint64_t *banks = cenv->mce_banks; if (bank >= bank_num || !(status & MCI_STATUS_VAL)) return; if (kvm_enabled()) { kvm_inject_x86... | 22,582 |
1 | void qemu_aio_poll(void) { } | 22,583 |
1 | void virtqueue_map_sg(struct iovec *sg, hwaddr *addr, size_t num_sg, int is_write) { unsigned int i; hwaddr len; if (num_sg > VIRTQUEUE_MAX_SIZE) { error_report("virtio: map attempt out of bounds: %zd > %d", num_sg, VIRTQUEUE_MAX_SIZE); exit(1); } for (i = 0; i < num_sg; i++) { len = sg[i].iov_len; sg[i].iov_base = cpu... | 22,584 |
1 | static int aasc_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; AascContext *s = avctx->priv_data; int compr, i, stride, ret; if ((ret = ff_reget_buffer(avctx, s->frame)) < 0) { av_log(avctx, AV_LOG_ERROR, "reget_buffer() f... | 22,585 |
1 | static av_always_inline void filter_common(uint8_t *p, ptrdiff_t stride, int is4tap) { LOAD_PIXELS int a, f1, f2; const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP; a = 3 * (q0 - p0); if (is4tap) a += clip_int8(p1 - q1); a = clip_int8(a); // We deviate from the spec here with c(a+3) >> 3 // since that's what libvpx does. ... | 22,586 |
1 | static int virtio_blk_init_pci(PCIDevice *pci_dev) { VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev); VirtIODevice *vdev; if (proxy->class_code != PCI_CLASS_STORAGE_SCSI && proxy->class_code != PCI_CLASS_STORAGE_OTHER) proxy->class_code = PCI_CLASS_STORAGE_SCSI; if (!proxy->block.bs) { error_report(... | 22,587 |
1 | static target_ulong helper_sdiv_common(CPUSPARCState *env, target_ulong a, target_ulong b, int cc) { SPARCCPU *cpu = sparc_env_get_cpu(env); int overflow = 0; int64_t x0; int32_t x1; x0 = (a & 0xffffffff) | ((int64_t) (env->y) << 32); x1 = (b & 0xffffffff); if (x1 == 0) { cpu_restore_state(CPU(cpu), GETPC()); helper_ra... | 22,588 |
0 | static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv, int i, AVIOContext *pb, int default_stream_exists) { AVStream *st = s->streams[i]; AVCodecContext *codec = st->codec; ebml_master subinfo, track; int native_id = 0; int qt_id = 0; int bit_depth = av_get_bits_per_sample(codec->codec_id); int sample_... | 22,589 |
0 | static int ffm_probe(AVProbeData *p) { if (p->buf_size >= 4 && p->buf[0] == 'F' && p->buf[1] == 'F' && p->buf[2] == 'M' && p->buf[3] == '1') return AVPROBE_SCORE_MAX + 1; return 0; } | 22,590 |
1 | static void win32_aio_process_completion(QEMUWin32AIOState *s, QEMUWin32AIOCB *waiocb, DWORD count) { int ret; s->count--; if (waiocb->ov.Internal != 0) { ret = -EIO; } else { ret = 0; if (count < waiocb->nbytes) { /* Short reads mean EOF, pad with zeros. */ if (waiocb->is_read) { qemu_iovec_memset(waiocb->qiov, count,... | 22,592 |
1 | static void compute_pkt_fields(AVFormatContext *s, AVStream *st, AVCodecParserContext *pc, AVPacket *pkt, int64_t next_dts, int64_t next_pts) { int num, den, presentation_delayed, delay, i; int64_t offset; AVRational duration; int onein_oneout = st->codec->codec_id != AV_CODEC_ID_H264 && st->codec->codec_id != AV_CODEC... | 22,593 |
1 | static inline int vertClassify_altivec(uint8_t src[], int stride, PPContext *c) { /* this code makes no assumption on src or stride. One could remove the recomputation of the perm vector by assuming (stride % 16) == 0, unfortunately this is not always true. */ DECLARE_ALIGNED(16, short, data)[8] = { ((c->nonBQP*c->ppMo... | 22,594 |
1 | static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size) { VC1Context * const v = avctx->priv_data; MpegEncContext * const s = &v->s; struct vaapi_context * const vactx = avctx->hwaccel_context; VAPictureParameterBufferVC1 *pic_param; av_dlog(avctx, "vaapi_vc1_st... | 22,595 |
1 | static int dxv_decompress_raw(AVCodecContext *avctx) { DXVContext *ctx = avctx->priv_data; GetByteContext *gbc = &ctx->gbc; bytestream2_get_buffer(gbc, ctx->tex_data, ctx->tex_size); return 0; } | 22,596 |
1 | static int of_dpa_cmd_group_add(OfDpa *of_dpa, uint32_t group_id, RockerTlv **group_tlvs) { OfDpaGroup *group = of_dpa_group_find(of_dpa, group_id); int err; if (group) { return -ROCKER_EEXIST; } group = of_dpa_group_alloc(group_id); if (!group) { return -ROCKER_ENOMEM; } err = of_dpa_cmd_group_do(of_dpa, group_id, gro... | 22,598 |
0 | static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, int (*read_child)(), int ctx_size, enum MXFMetadataSetType type) { ByteIOContext *pb = mxf->fc->pb; MXFMetadataSet *ctx = ctx_size ? av_mallocz(ctx_size) : mxf; uint64_t klv_end = url_ftell(pb) + klv->length; if (!ctx) return -1; while (url_ftell(pb) + 4 <... | 22,599 |
0 | static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, int *got_packet) { X264Context *x4 = ctx->priv_data; x264_nal_t *nal; int nnal, i, ret; x264_picture_t pic_out = {0}; int pict_type; x264_picture_init( &x4->pic ); x4->pic.img.i_csp = x4->params.i_csp; if (x264_bit_depth > 8) x4->pic.img.i_... | 22,602 |
0 | int flv_h263_decode_picture_header(MpegEncContext *s) { int format, width, height; /* picture header */ if (get_bits_long(&s->gb, 17) != 1) { av_log(s->avctx, AV_LOG_ERROR, "Bad picture start code\n"); return -1; } format = get_bits(&s->gb, 5); if (format != 0 && format != 1) { av_log(s->avctx, AV_LOG_ERROR, "Bad pictu... | 22,603 |
1 | static void pci_msix(void) { QVirtioPCIDevice *dev; QPCIBus *bus; QVirtQueuePCI *vqpci; QGuestAllocator *alloc; QVirtioBlkReq req; int n_size = TEST_IMAGE_SIZE / 2; void *addr; uint64_t req_addr; uint64_t capacity; uint32_t features; uint32_t free_head; uint8_t status; char *data; bus = pci_test_start(); alloc = pc_all... | 22,604 |
1 | static void test_co_queue(void) { Coroutine *c1; Coroutine *c2; c1 = qemu_coroutine_create(c1_fn); c2 = qemu_coroutine_create(c2_fn); qemu_coroutine_enter(c1, c2); memset(c1, 0xff, sizeof(Coroutine)); qemu_coroutine_enter(c2, NULL); } | 22,605 |
1 | static int libopenjpeg_copy_unpacked8(AVCodecContext *avctx, const AVFrame *frame, opj_image_t *image) { int compno; int x; int y; int width; int height; int *image_line; int frame_index; const int numcomps = image->numcomps; for (compno = 0; compno < numcomps; ++compno) { if (image->comps[compno].w > frame->linesize[c... | 22,606 |
1 | static int url_alloc_for_protocol(URLContext **puc, struct URLProtocol *up, const char *filename, int flags, const AVIOInterruptCB *int_cb) { URLContext *uc; int err; #if CONFIG_NETWORK if (up->flags & URL_PROTOCOL_FLAG_NETWORK && !ff_network_init()) return AVERROR(EIO); #endif if ((flags & AVIO_FLAG_READ) && !up->url_... | 22,607 |
1 | void ff_write_pass1_stats(MpegEncContext *s) { snprintf(s->avctx->stats_out, 256, "in:%d out:%d type:%d q:%d itex:%d ptex:%d mv:%d misc:%d " "fcode:%d bcode:%d mc-var:%d var:%d icount:%d skipcount:%d hbits:%d;\n", s->current_picture_ptr->f.display_picture_number, s->current_picture_ptr->f.coded_picture_number, s->pict_... | 22,608 |
1 | static bool is_zero_cluster(BlockDriverState *bs, int64_t start) { BDRVQcow2State *s = bs->opaque; int nr; BlockDriverState *file; int64_t res = bdrv_get_block_status_above(bs, NULL, start, s->cluster_sectors, &nr, &file); return res >= 0 && ((res & BDRV_BLOCK_ZERO) || !(res & BDRV_BLOCK_DATA)); } | 22,609 |
1 | static int get_cluster_offset(BlockDriverState *bs, VmdkExtent *extent, VmdkMetaData *m_data, uint64_t offset, int allocate, uint64_t *cluster_offset) { unsigned int l1_index, l2_offset, l2_index; int min_index, i, j; uint32_t min_count, *l2_table; bool zeroed = false; if (m_data) { m_data->valid = 0; } if (extent->fla... | 22,610 |
1 | QPCIBus *qpci_init_spapr(QGuestAllocator *alloc) { QPCIBusSPAPR *ret; ret = g_malloc(sizeof(*ret)); ret->alloc = alloc; ret->bus.io_readb = qpci_spapr_io_readb; ret->bus.io_readw = qpci_spapr_io_readw; ret->bus.io_readl = qpci_spapr_io_readl; ret->bus.io_writeb = qpci_spapr_io_writeb; ret->bus.io_writew = qpci_spapr_io... | 22,611 |
1 | static int ff_vp56_decode_mbs(AVCodecContext *avctx, void *data, int jobnr, int threadnr) { VP56Context *s0 = avctx->priv_data; int is_alpha = (jobnr == 1); VP56Context *s = is_alpha ? s0->alpha_context : s0; AVFrame *const p = s->frames[VP56_FRAME_CURRENT]; int mb_row, mb_col, mb_row_flip, mb_offset = 0; int block, y,... | 22,612 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.