label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
1 | static void handle_arg_log_filename(const char *arg){ qemu_set_log_filename(arg);} |
1 | static int32_t scsi_target_send_command(SCSIRequest *req, uint8_t *buf){ SCSITargetReq *r = DO_UPCAST(SCSITargetReq, req, req); switch (buf[0]) { case REPORT_LUNS: if (!scsi_target_emulate_report_luns(r)) { goto illegal_request; } break; case INQUIRY: if (!scsi_target_emulate_inquiry(r)) { goto illegal_request; } break... |
1 | 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; av_log(avctx, AV_LOG_TRACE, "pfnSequenceCallback\n"); ctx->int... |
1 | static void test_leak_bucket(void){ throttle_config_init(&cfg); bkt = cfg.buckets[THROTTLE_BPS_TOTAL]; /* set initial value */ bkt.avg = 150; bkt.max = 15; bkt.level = 1.5; /* leak an op work of time */ throttle_leak_bucket(&bkt, NANOSECONDS_PER_SECOND / 150); g_assert(bkt.avg == 150); g_assert(bkt.max == 15); g_assert... |
1 | static BlockAIOCB *blkverify_aio_readv(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockCompletionFunc *cb, void *opaque){ BDRVBlkverifyState *s = bs->opaque; BlkverifyAIOCB *acb = blkverify_aio_get(bs, false, sector_num, qiov, nb_sectors, cb, opaque); acb->verify = blkverify_verify_re... |
1 | void ff_put_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size){ const DCTELEM *p; uint8_t *pix; /* read the pixels */ p = block; pix = pixels; /* unrolled loop */ __asm__ volatile ( "movq %3, %%mm0 \n\t" "movq 8%3, %%mm1 \n\t" "movq 16%3, %%mm2 \n\t" "movq 24%3, %%mm3 \n\t" "movq 32%3, %%mm4 \n\t"... |
1 | static target_ulong h_enter(CPUPPCState *env, sPAPREnvironment *spapr, target_ulong opcode, target_ulong *args){ target_ulong flags = args[0]; target_ulong pte_index = args[1]; target_ulong pteh = args[2]; target_ulong ptel = args[3]; target_ulong page_shift = 12; target_ulong raddr; target_ulong i; uint8_t *hpte; /* o... |
1 | static void exynos4210_gic_init(Object *obj){ DeviceState *dev = DEVICE(obj); Exynos4210GicState *s = EXYNOS4210_GIC(obj); SysBusDevice *sbd = SYS_BUS_DEVICE(obj); uint32_t i; const char cpu_prefix[] = "exynos4210-gic-alias_cpu"; const char dist_prefix[] = "exynos4210-gic-alias_dist"; char cpu_alias_name[sizeof(cpu_pre... |
1 | static av_cold void compute_alpha_vlcs(void){ uint16_t run_code[129], level_code[256]; uint8_t run_bits[129], level_bits[256]; int run, level; for (run = 0; run < 128; run++) { if (!run) { /* 0 -> 0. */ run_code[run] = 0; run_bits[run] = 1; } else if (run <= 4) { /* 10xx -> xx plus 1. */ run_code[run] = ((run - 1) << 2... |
1 | static void pci_info_device(PCIBus *bus, PCIDevice *d){ Monitor *mon = cur_mon; int i, class; PCIIORegion *r; const pci_class_desc *desc; monitor_printf(mon, " Bus %2d, device %3d, function %d:\n", pci_bus_num(d->bus), PCI_SLOT(d->devfn), PCI_FUNC(d->devfn)); class = pci_get_word(d->config + PCI_CLASS_DEVICE); monitor_... |
1 | int av_write_frame(AVFormatContext *s, AVPacket *pkt){ int ret; compute_pkt_fields2(s->streams[pkt->stream_index], pkt); truncate_ts(s->streams[pkt->stream_index], pkt); ret= s->oformat->write_packet(s, pkt); if(!ret) ret= url_ferror(&s->pb); return ret;} |
1 | static void revert_cdlms(WmallDecodeCtx *s, int tile_size){ int icoef, ich; int32_t pred, channel_coeff; int ilms, num_lms; for (ich = 0; ich < s->num_channels; ich++) { if (!s->is_channel_coded[ich]) continue; for (icoef = 0; icoef < tile_size; icoef++) { num_lms = s->cdlms_ttl[ich]; channel_coeff = s->channel_residue... |
1 | static void decode_mb_b(AVSContext *h, enum cavs_mb mb_type) { int block; enum cavs_sub_mb sub_type[4]; int flags; ff_cavs_init_mb(h); /* reset all MVs */ h->mv[MV_FWD_X0] = ff_cavs_dir_mv; set_mvs(&h->mv[MV_FWD_X0], BLK_16X16); h->mv[MV_BWD_X0] = ff_cavs_dir_mv; set_mvs(&h->mv[MV_BWD_X0], BLK_16X16); switch(mb_type) {... |
1 | static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output){ AVFrame *decoded_frame; AVCodecContext *avctx = ist->st->codec; int bps = av_get_bytes_per_sample(ist->st->codec->sample_fmt); int i, ret; if (!ist->decoded_frame && !(ist->decoded_frame = avcodec_alloc_frame())) return AVERROR(ENOMEM); else ... |
1 | static inline void store_cpu_offset(TCGv var, int offset){ tcg_gen_st_i32(var, cpu_env, offset); dead_tmp(var);} |
1 | static void test_cipher_speed(const void *opaque){ QCryptoCipher *cipher; Error *err = NULL; double total = 0.0; size_t chunk_size = (size_t)opaque; uint8_t *key = NULL, *iv = NULL; uint8_t *plaintext = NULL, *ciphertext = NULL; size_t nkey = qcrypto_cipher_get_key_len(QCRYPTO_CIPHER_ALG_AES_128); size_t niv = qcrypto_... |
1 | static void s390_init(ram_addr_t my_ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model){ CPUState *env = NULL; MemoryRegion *sysmem = get_system_memory(); MemoryRegion *ram = g_new(MemoryRegion, 1); ram_addr_t kernel_size = 0; r... |
1 | void host_to_target_siginfo(target_siginfo_t *tinfo, const siginfo_t *info){ host_to_target_siginfo_noswap(tinfo, info); tswap_siginfo(tinfo, tinfo);} |
1 | static void ioapic_common_class_init(ObjectClass *klass, void *data){ DeviceClass *dc = DEVICE_CLASS(klass); dc->realize = ioapic_common_realize; dc->vmsd = &vmstate_ioapic_common; dc->no_user = 1;} |
1 | uint64_t helper_cmpbge(uint64_t op1, uint64_t op2){#if defined(__SSE2__) uint64_t r; /* The cmpbge instruction is heavily used in the implementation of every string function on Alpha. We can do much better than either the default loop below, or even an unrolled version by using the native vector support. */ { typedef u... |
1 | int nbd_client_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset, int bytes, BdrvRequestFlags flags){ NBDClientSession *client = nbd_get_client_session(bs); NBDRequest request = { .type = NBD_CMD_WRITE_ZEROES, .from = offset, .len = bytes, }; if (!(client->info.flags & NBD_FLAG_SEND_WRITE_ZEROES)) { return -ENOTSUP... |
1 | static uint32_t get_cmd(ESPState *s, uint8_t *buf){ uint32_t dmalen; int target; dmalen = s->rregs[ESP_TCLO] | (s->rregs[ESP_TCMID] << 8); target = s->wregs[ESP_WBUSID] & 7; DPRINTF("get_cmd: len %d target %d\n", dmalen, target); if (s->dma) { s->dma_memory_read(s->dma_opaque, buf, dmalen); } else { buf[0] = 0; memcpy(... |
1 | static int opt_preset(const char *opt, const char *arg){ FILE *f=NULL; char tmp[1000], tmp2[1000], line[1000]; int i; const char *base[3]= { getenv("HOME"), "/usr/local/share", "/usr/share", }; for(i=!base[0]; i<3 && !f; i++){ snprintf(tmp, sizeof(tmp), "%s/%sffmpeg/%s.ffpreset", base[i], i ? "" : ".", arg); f= fopen(t... |
1 | static USBDevice *usb_msd_init(USBBus *bus, const char *filename){ static int nr=0; char id[8]; QemuOpts *opts; DriveInfo *dinfo; USBDevice *dev; const char *p1; char fmt[32]; /* parse -usbdevice disk: syntax into drive opts */ snprintf(id, sizeof(id), "usb%d", nr++); opts = qemu_opts_create(qemu_find_opts("drive"), id... |
1 | static void codebook_trellis_rate(AACEncContext *s, SingleChannelElement *sce, int win, int group_len, const float lambda){ BandCodingPath path[120][12]; int w, swb, cb, start, size; int i, j; const int max_sfb = sce->ics.max_sfb; const int run_bits = sce->ics.num_windows == 1 ? 5 : 3; const int run_esc = (1 << run_bit... |
1 | av_cold void ff_mlpdsp_init_arm(MLPDSPContext *c){ int cpu_flags = av_get_cpu_flags(); if (have_armv5te(cpu_flags)) { c->mlp_filter_channel = ff_mlp_filter_channel_arm; }} |
1 | void slirp_pollfds_poll(GArray *pollfds, int select_error){ Slirp *slirp; struct socket *so, *so_next; int ret; if (QTAILQ_EMPTY(&slirp_instances)) { return; } curtime = qemu_clock_get_ms(QEMU_CLOCK_REALTIME); QTAILQ_FOREACH(slirp, &slirp_instances, entry) { /* * See if anything has timed out */ if (slirp->time_fasttim... |
1 | SwsFunc yuv2rgb_init_mlib(SwsContext *c){switch(c->dstFormat){case PIX_FMT_RGB24: return mlib_YUV2RGB420_24;case PIX_FMT_BGR32: return mlib_YUV2ARGB420_32;case PIX_FMT_RGB32: return mlib_YUV2ABGR420_32;default: return NULL;}} |
1 | int ffio_ensure_seekback(AVIOContext *s, int64_t buf_size){ uint8_t *buffer; int max_buffer_size = s->max_packet_size ? s->max_packet_size : IO_BUFFER_SIZE; int filled = s->buf_end - s->buffer; ptrdiff_t checksum_ptr_offset = s->checksum_ptr ? s->checksum_ptr - s->buffer : -1; buf_size += s->buf_ptr - s->buffer + max_b... |
1 | static void raise_mmu_exception(CPUMIPSState *env, target_ulong address, int rw, int tlb_error){ CPUState *cs = CPU(mips_env_get_cpu(env)); int exception = 0, error_code = 0; if (rw == MMU_INST_FETCH) { error_code |= EXCP_INST_NOTAVAIL; } switch (tlb_error) { default: case TLBRET_BADADDR: /* Reference to kernel address... |
1 | static int decode_frame(WmallDecodeCtx *s){ GetBitContext* gb = &s->gb; int more_frames = 0; int len = 0; int i; /** check for potential output buffer overflow */ if (s->num_channels * s->samples_per_frame > s->samples_end - s->samples) { /** return an error if no frame could be decoded at all */ av_log(s->avctx, AV_LO... |
1 | static void rv34_idct_dc_add_c(uint8_t *dst, int stride, int dc){ const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; int i, j; cm += (13*13*dc + 0x200) >> 10; for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) dst[j] = cm[ dst[j] ]; dst += stride; }} |
1 | static void monitor_event(void *opaque, int event){ Monitor *mon = opaque; switch (event) { case CHR_EVENT_MUX_IN: qemu_mutex_lock(&mon->out_lock); mon->mux_out = 0; qemu_mutex_unlock(&mon->out_lock); if (mon->reset_seen) { monitor_resume(mon); monitor_flush(mon); } else { mon->suspend_cnt = 0; } break; case CHR_EVENT_... |
1 | static ExitStatus gen_mtpr(DisasContext *ctx, TCGv vb, int regno){ TCGv tmp; int data; switch (regno) { case 255: /* TBIA */ gen_helper_tbia(cpu_env); break; case 254: /* TBIS */ gen_helper_tbis(cpu_env, vb); break; case 253: /* WAIT */ tmp = tcg_const_i64(1); tcg_gen_st32_i64(tmp, cpu_env, -offsetof(AlphaCPU, env) + o... |
1 | static bool key_is_missing(const BlockInfo *bdev){ return (bdev->inserted && bdev->inserted->encryption_key_missing);} |
1 | static int64_t ivshmem_recv_msg(IVShmemState *s, int *pfd, Error **errp){ int64_t msg; int n, ret; n = 0; do { ret = qemu_chr_fe_read_all(&s->server_chr, (uint8_t *)&msg + n, sizeof(msg) - n); if (ret < 0) { if (ret == -EINTR) { continue; } error_setg_errno(errp, -ret, "read from server failed"); return INT64_MIN; } n ... |
1 | static USBDevice *usb_bt_init(USBBus *bus, const char *cmdline){ USBDevice *dev; struct USBBtState *s; HCIInfo *hci; const char *name = "usb-bt-dongle"; if (*cmdline) { hci = hci_init(cmdline); } else { hci = bt_new_hci(qemu_find_bt_vlan(0)); } if (!hci) return NULL; dev = usb_create(bus, name); s = DO_UPCAST(struct US... |
0 | static void pre_process_video_frame(InputStream *ist, AVPicture *picture, void **bufp){ AVCodecContext *dec; AVPicture *picture2; AVPicture picture_tmp; uint8_t *buf = 0; dec = ist->st->codec; /* deinterlace : must be done before any resize */ if (FF_API_DEINTERLACE && do_deinterlace) { int size; /* create temporary pi... |
0 | static int vc1_decode_p_mb_intfi(VC1Context *v){ MpegEncContext *s = &v->s; GetBitContext *gb = &s->gb; int i; 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 mb_has_coeffs = 1; /* last_flag *... |
1 | static bool virtio_scsi_data_plane_handle_ctrl(VirtIODevice *vdev, VirtQueue *vq){ VirtIOSCSI *s = VIRTIO_SCSI(vdev); assert(s->ctx && s->dataplane_started); return virtio_scsi_handle_ctrl_vq(s, vq);} |
1 | static void start_tcg_kick_timer(void){ if (!tcg_kick_vcpu_timer && CPU_NEXT(first_cpu)) { tcg_kick_vcpu_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, kick_tcg_thread, NULL); timer_mod(tcg_kick_vcpu_timer, qemu_tcg_next_kick()); }} |
1 | static void rtc_periodic_timer(void *opaque){ RTCState *s = opaque; rtc_timer_update(s, s->next_periodic_time);#ifdef TARGET_I386 if ((s->cmos_data[RTC_REG_C] & 0xc0) && rtc_td_hack) { s->irq_coalesced++; return; }#endif if (s->cmos_data[RTC_REG_B] & REG_B_PIE) { s->cmos_data[RTC_REG_C] |= 0xc0; rtc_irq_raise(s->irq); ... |
1 | void do_m68k_semihosting(CPUM68KState *env, int nr){ uint32_t args; void *p; void *q; uint32_t len; uint32_t result; args = env->dregs[1]; switch (nr) { case HOSTED_EXIT: gdb_exit(env, env->dregs[0]); exit(env->dregs[0]); case HOSTED_OPEN: if (use_gdb_syscalls()) { gdb_do_syscall(m68k_semi_cb, "open,%s,%x,%x", ARG(0), ... |
1 | static uint8_t get_tlm(Jpeg2000DecoderContext *s, int n){ uint8_t Stlm, ST, SP, tile_tlm, i; bytestream_get_byte(&s->buf); /* Ztlm: skipped */ Stlm = bytestream_get_byte(&s->buf); // too complex ? ST = ((Stlm >> 4) & 0x01) + ((Stlm >> 4) & 0x02); ST = (Stlm >> 4) & 0x03; // TODO: Manage case of ST = 0b11 --> raise erro... |
1 | static int decode_seq_header(AVSContext *h) { MpegEncContext *s = &h->s; int frame_rate_code; int width, height; h->profile = get_bits(&s->gb,8); h->level = get_bits(&s->gb,8); skip_bits1(&s->gb); //progressive sequence width = get_bits(&s->gb,14); height = get_bits(&s->gb,14); if ((s->width || s->height) && (s->width ... |
1 | static int qemu_chr_open_win_pipe(QemuOpts *opts, CharDriverState **_chr){ const char *filename = qemu_opt_get(opts, "path"); CharDriverState *chr; WinCharState *s; chr = g_malloc0(sizeof(CharDriverState)); s = g_malloc0(sizeof(WinCharState)); chr->opaque = s; chr->chr_write = win_chr_write; chr->chr_close = win_chr_cl... |
1 | SnapshotInfo *qmp_blockdev_snapshot_delete_internal_sync(const char *device, bool has_id, const char *id, bool has_name, const char *name, Error **errp){ BlockDriverState *bs = bdrv_find(device); QEMUSnapshotInfo sn; Error *local_err = NULL; SnapshotInfo *info = NULL; int ret; if (!bs) { error_set(errp, QERR_DEVICE_NOT... |
1 | static int proxy_socket(const char *path, uid_t uid, gid_t gid){ int sock, client; struct sockaddr_un proxy, qemu; socklen_t size; /* requested socket already exists, refuse to start */ if (!access(path, F_OK)) { do_log(LOG_CRIT, "socket already exists\n"); return -1; } sock = socket(AF_UNIX, SOCK_STREAM, 0); if (sock ... |
1 | void *qemu_ram_mmap(int fd, size_t size, size_t align, bool shared){ /* * Note: this always allocates at least one extra page of virtual address * space, even if size is already aligned. */ size_t total = size + align; void *ptr = mmap(0, total, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); size_t offset = QEMU_ALIGN... |
1 | start_list(Visitor *v, const char *name, Error **errp){ StringInputVisitor *siv = to_siv(v); parse_str(siv, errp); siv->cur_range = g_list_first(siv->ranges); if (siv->cur_range) { Range *r = siv->cur_range->data; if (r) { siv->cur = r->begin; } }} |
1 | void fw_cfg_add_i16(FWCfgState *s, uint16_t key, uint16_t value){ uint16_t *copy; copy = g_malloc(sizeof(value)); *copy = cpu_to_le16(value); fw_cfg_add_bytes(s, key, (uint8_t *)copy, sizeof(value));} |
1 | void FUNC(ff_emulated_edge_mc)(uint8_t *buf, const uint8_t *src, ptrdiff_t linesize_arg, int block_w, int block_h, int src_x, int src_y, int w, int h){ int x, y; int start_y, start_x, end_y, end_x; emuedge_linesize_type linesize = linesize_arg; if (!w || !h) return; if (src_y >= h) { src -= src_y * linesize; src += (h ... |
0 | static int draw_glyphs(DrawTextContext *s, AVFrame *frame, int width, int height, const uint8_t rgbcolor[4], const uint8_t yuvcolor[4], int x, int y){ char *text = HAVE_LOCALTIME_R ? s->expanded_text : s->text; uint32_t code = 0; int i; uint8_t *p; Glyph *glyph = NULL; for (i = 0, p = text; *p; i++) { Glyph dummy = { 0... |
1 | static void test_lifecycle(void){ Coroutine *coroutine; bool done = false; /* Create, enter, and return from coroutine */ coroutine = qemu_coroutine_create(set_and_exit); qemu_coroutine_enter(coroutine, &done); g_assert(done); /* expect done to be true (first time) */ /* Repeat to check that no state affects this test ... |
1 | static void decode_pitch_lag_low(int *lag_int, int *lag_frac, int pitch_index, uint8_t *base_lag_int, int subframe, enum Mode mode){ if (subframe == 0 || (subframe == 2 && mode != MODE_6k60)) { if (pitch_index < 116) { *lag_int = (pitch_index + 69) >> 1; *lag_frac = (pitch_index - (*lag_int << 1) + 68) << 1; } else { *... |
1 | void qpci_io_writel(QPCIDevice *dev, void *data, uint32_t value){ uintptr_t addr = (uintptr_t)data; if (addr < QPCI_PIO_LIMIT) { dev->bus->pio_writel(dev->bus, addr, value); } else { value = cpu_to_le32(value); dev->bus->memwrite(dev->bus, addr, &value, sizeof(value)); }} |
1 | void do_store_xer (void){ xer_so = (T0 >> XER_SO) & 0x01; xer_ov = (T0 >> XER_OV) & 0x01; xer_ca = (T0 >> XER_CA) & 0x01; xer_cmp = (T0 >> XER_CMP) & 0xFF; xer_bc = (T0 >> XER_BC) & 0x3F;} |
0 | int ffurl_open(URLContext **puc, const char *filename, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options){ int ret = ffurl_alloc(puc, filename, flags, int_cb); if (ret < 0) return ret; if (options && (*puc)->prot->priv_data_class && (ret = av_opt_set_dict((*puc)->priv_data, options)) < 0) goto fail; if (... |
0 | static int mpeg4_decode_video_packet_header(MpegEncContext *s){ int mb_num_bits= av_log2(s->mb_num - 1) + 1; int header_extension=0, mb_num, len; /* is there enough space left for a video packet + header */ if( get_bits_count(&s->gb) > s->gb.size*8-20) return -1; for(len=0; len<32; len++){ if(get_bits1(&s->gb)) break; ... |
0 | int avfilter_link(AVFilterContext *src, unsigned srcpad, AVFilterContext *dst, unsigned dstpad){ AVFilterLink *link; if (src->nb_outputs <= srcpad || dst->nb_inputs <= dstpad || src->outputs[srcpad] || dst->inputs[dstpad]) return -1; if (src->output_pads[srcpad].type != dst->input_pads[dstpad].type) { av_log(src, AV_LO... |
0 | static void usage(void){ printf("Escape an input string, adopting the av_get_token() escaping logic\n"); printf("usage: ffescape [OPTIONS]\n"); printf("\n" "Options:\n" "-e echo each input line on output\n" "-h print this help\n" "-i INFILE set INFILE as input file, stdin if omitted\n" "-l LEVEL set the number of escap... |
0 | static inline void mpeg_motion(MpegEncContext *s, UINT8 *dest_y, UINT8 *dest_cb, UINT8 *dest_cr, int dest_offset, UINT8 **ref_picture, int src_offset, int field_based, op_pixels_func *pix_op, int motion_x, int motion_y, int h){ UINT8 *ptr; int dxy, offset, mx, my, src_x, src_y, height, linesize;if(s->quarter_sample){ m... |
0 | av_cold void ff_audio_convert_init_x86(AudioConvert *ac){ int cpu_flags = av_get_cpu_flags(); if (EXTERNAL_MMX(cpu_flags)) { ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, 0, 1, 8, "MMX", ff_conv_s32_to_s16_mmx); ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, 6, 1, 4, "MMX", f... |
1 | static void virtio_pci_config_write(void *opaque, hwaddr addr, uint64_t val, unsigned size){ VirtIOPCIProxy *proxy = opaque; uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev); VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus); if (addr < config) { virtio_ioport_write(proxy, addr, val); return; } addr -= config... |
1 | void *qpci_iomap(QPCIDevice *dev, int barno, uint64_t *sizeptr){ QPCIBus *bus = dev->bus; static const int bar_reg_map[] = { PCI_BASE_ADDRESS_0, PCI_BASE_ADDRESS_1, PCI_BASE_ADDRESS_2, PCI_BASE_ADDRESS_3, PCI_BASE_ADDRESS_4, PCI_BASE_ADDRESS_5, }; int bar_reg; uint32_t addr, size; uint32_t io_type; uint64_t loc; g_asse... |
1 | int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near, int point_transform, int ilv){ int i, t = 0; uint8_t *zero, *last, *cur; JLSState *state; int off = 0, stride = 1, width, shift, ret = 0; zero = av_mallocz(s->picture_ptr->linesize[0]); if (!zero) return AVERROR(ENOMEM); last = zero; cur = s->picture_ptr->da... |
1 | void FUNCC(ff_h264_chroma_dc_dequant_idct)(int16_t *_block, int qmul){ const int stride= 16*2; const int xStride= 16; int a,b,c,d,e; dctcoef *block = (dctcoef*)_block; a= block[stride*0 + xStride*0]; b= block[stride*0 + xStride*1]; c= block[stride*1 + xStride*0]; d= block[stride*1 + xStride*1]; e= a-b; a= a+b; b= c-d; ... |
1 | static inline int mpeg2_decode_block_intra(MpegEncContext *s, int16_t *block, int n){ int level, dc, diff, i, j, run; int component; RLTable *rl; uint8_t *const scantable = s->intra_scantable.permutated; const uint16_t *quant_matrix; const int qscale = s->qscale; int mismatch; /* DC coefficient */ if (n < 4) { quant_ma... |
1 | static void vc1_draw_sprites(VC1Context *v, SpriteData* sd){ int i, plane, row, sprite; int sr_cache[2][2] = { { -1, -1 }, { -1, -1 } }; uint8_t* src_h[2][2]; int xoff[2], xadv[2], yoff[2], yadv[2], alpha; int ysub[2]; MpegEncContext *s = &v->s; for (i = 0; i < 2; i++) { xoff[i] = av_clip(sd->coefs[i][2], 0, v->sprite_... |
1 | static int vhdx_log_flush(BlockDriverState *bs, BDRVVHDXState *s, VHDXLogSequence *logs){ int ret = 0; int i; uint32_t cnt, sectors_read; uint64_t new_file_size; void *data = NULL; VHDXLogDescEntries *desc_entries = NULL; VHDXLogEntryHeader hdr_tmp = { 0 }; cnt = logs->count; data = qemu_blockalign(bs, VHDX_LOG_SECTOR_... |
1 | static void unterminated_array(void){ QObject *obj = qobject_from_json("[32", NULL); g_assert(obj == NULL);} |
1 | static av_cold int xan_decode_init(AVCodecContext *avctx){ XanContext *s = avctx->priv_data; s->avctx = avctx; s->frame_size = 0; if ((avctx->codec->id == CODEC_ID_XAN_WC3) && (s->avctx->palctrl == NULL)) { av_log(avctx, AV_LOG_ERROR, "palette expected\n"); return AVERROR(EINVAL); } avctx->pix_fmt = PIX_FMT_PAL8; s->bu... |
1 | static void init_uni_ac_vlc(RLTable *rl, uint8_t *uni_ac_vlc_len){ int i; for(i=0; i<128; i++){ int level= i-64; int run; for(run=0; run<64; run++){ int len, bits, code; int alevel= FFABS(level); int sign= (level>>31)&1; if (alevel > rl->max_level[0][run]) code= 111; /*rl->n*/ else code= rl->index_run[0][run] + alevel ... |
1 | int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem){ unsigned int i, head, max; target_phys_addr_t desc_pa = vq->vring.desc; if (!virtqueue_num_heads(vq, vq->last_avail_idx)) return 0; /* When we start there are none of either input nor output. */ elem->out_num = elem->in_num = 0; max = vq->vring.num; i = head = v... |
1 | void qemu_ram_remap(ram_addr_t addr, ram_addr_t length){ RAMBlock *block; ram_addr_t offset; int flags; void *area, *vaddr; QLIST_FOREACH(block, &ram_list.blocks, next) { offset = addr - block->offset; if (offset < block->length) { vaddr = block->host + offset; if (block->flags & RAM_PREALLOC_MASK) { ; } else { flags =... |
1 | static void pnv_chip_power8_class_init(ObjectClass *klass, void *data){ DeviceClass *dc = DEVICE_CLASS(klass); PnvChipClass *k = PNV_CHIP_CLASS(klass); k->cpu_model = "POWER8"; k->chip_type = PNV_CHIP_POWER8; k->chip_cfam_id = 0x220ea04980000000ull; /* P8 Venice DD2.0 */ k->cores_mask = POWER8_CORE_MASK; k->core_pir = ... |
1 | static void multiwrite_user_cb(MultiwriteCB *mcb){ int i; for (i = 0; i < mcb->num_callbacks; i++) { mcb->callbacks[i].cb(mcb->callbacks[i].opaque, mcb->error); qemu_free(mcb->callbacks[i].free_qiov); qemu_free(mcb->callbacks[i].free_buf); }} |
1 | static void pflash_cfi02_realize(DeviceState *dev, Error **errp){ pflash_t *pfl = CFI_PFLASH02(dev); uint32_t chip_len; int ret; Error *local_err = NULL; chip_len = pfl->sector_len * pfl->nb_blocs; /* XXX: to be fixed */#if 0 if (total_len != (8 * 1024 * 1024) && total_len != (16 * 1024 * 1024) && total_len != (32 * 10... |
1 | float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run){ float q; int qmin, qmax; float br_compensation; double diff; double short_term_q; double fps; int picture_number = s->picture_number; int64_t wanted_bits; RateControlContext *rcc = &s->rc_context; AVCodecContext *a = s->avctx; RateControlEntry local_rce, *r... |
1 | static void pred_spatial_direct_motion(H264Context * const h, int *mb_type){ MpegEncContext * const s = &h->s; int b8_stride = 2; int b4_stride = h->b_stride; int mb_xy = h->mb_xy, mb_y = s->mb_y; int mb_type_col[2]; const int16_t (*l1mv0)[2], (*l1mv1)[2]; const int8_t *l1ref0, *l1ref1; const int is_b8x8 = IS_8X8(*mb_t... |
1 | int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags){ if(min_ts > ts || max_ts < ts) return -1; if (s->iformat->read_seek2) { int ret; ff_read_frame_flush(s); if (stream_index == -1 && s->nb_streams == 1) { AVRational time_base = s->streams[0]->time_base; t... |
1 | static inline void render_line_unrolled(intptr_t x, uint8_t y, int x1, intptr_t sy, int ady, int adx, float *buf){ int err = -adx; x -= x1 - 1; buf += x1 - 1; while (++x < 0) { err += ady; if (err >= 0) { err += ady - adx; y += sy; buf[x++] = ff_vorbis_floor1_inverse_db_table[y]; } buf[x] = ff_vorbis_floor1_inverse_db_... |
1 | iscsi_connect_cb(struct iscsi_context *iscsi, int status, void *command_data, void *opaque){ struct IscsiTask *itask = opaque; struct scsi_task *task; if (status != 0) { itask->status = 1; itask->complete = 1; return; } task = iscsi_inquiry_task(iscsi, itask->iscsilun->lun, 0, 0, 36, iscsi_inquiry_cb, opaque); if (task... |
1 | static inline void s_zero(int cur_diff, struct G722Band *band){ int s_zero = 0; #define ACCUM(k, x, d) do { \ int tmp = x; \ band->zero_mem[k] = ((band->zero_mem[k] * 255) >> 8) + \ d*((band->diff_mem[k]^cur_diff) < 0 ? -128 : 128); \ band->diff_mem[k] = tmp; \ s_zero += (tmp * band->zero_mem[k]) >> 15; \ } while (0) i... |
1 | static uint32_t qvirtio_pci_get_features(QVirtioDevice *d){ QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d; return qpci_io_readl(dev->pdev, dev->addr + VIRTIO_PCI_HOST_FEATURES);} |
1 | static av_cold int decode_init(AVCodecContext * avctx){ KmvcContext *const c = avctx->priv_data; int i; c->avctx = avctx; if (avctx->width > 320 || avctx->height > 200) { av_log(avctx, AV_LOG_ERROR, "KMVC supports frames <= 320x200\n"); return -1; } c->frm0 = av_mallocz(320 * 200); c->frm1 = av_mallocz(320 * 200); c->c... |
1 | static uint8_t lag_calc_zero_run(int8_t x){ return (x << 1) ^ (x >> 7);} |
1 | static void patch_reloc(uint8_t *code_ptr, int type, intptr_t value, intptr_t addend){ value += addend; switch(type) { case R_386_PC32: value -= (uintptr_t)code_ptr; if (value != (int32_t)value) { tcg_abort(); } *(uint32_t *)code_ptr = value; break; case R_386_PC8: value -= (uintptr_t)code_ptr; if (value != (int8_t)val... |
0 | static int nut_write_trailer(AVFormatContext *s){ NUTContext *nut = s->priv_data; ByteIOContext *bc = &s->pb; update_packetheader(nut, bc, 0);#if 0 int i; /* WRITE INDEX */ for (i = 0; s->nb_streams; i++) {put_be64(bc, INDEX_STARTCODE);put_packetheader(nut, bc, 64);put_v(bc, s->streams[i]->id);put_v(bc, ...);put_be32(b... |
0 | static void noise(uint8_t *dst, const uint8_t *src, int dst_linesize, int src_linesize, int width, int start, int end, NoiseContext *n, int comp){ FilterParams *p = &n->param[comp]; int8_t *noise = p->noise; const int flags = p->flags; AVLFG *lfg = &p->lfg; int shift, y; if (!noise) { if (dst != src) av_image_copy_plan... |
0 | void ff_generate_sliding_window_mmcos(H264Context *h) { MpegEncContext * const s = &h->s; assert(h->long_ref_count + h->short_ref_count <= h->sps.ref_frame_count); h->mmco_index= 0; if(h->short_ref_count && h->long_ref_count + h->short_ref_count == h->sps.ref_frame_count && !(FIELD_PICTURE && !s->first_field && s->curr... |
0 | static av_cold int X264_init(AVCodecContext *avctx){ X264Context *x4 = avctx->priv_data; AVCPBProperties *cpb_props;#if CONFIG_LIBX262_ENCODER if (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO) { x4->params.b_mpeg2 = 1; x264_param_default_mpeg2(&x4->params); } else#else x264_param_default(&x4->params);#endif x4->params.b_d... |
0 | static void blend_image_rgba_pm(AVFilterContext *ctx, AVFrame *dst, const AVFrame *src, int x, int y){ blend_image_packed_rgb(ctx, dst, src, 1, x, y, 1);} |
0 | int ff_h264_frame_start(H264Context *h){ Picture *pic; int i, ret; const int pixel_shift = h->pixel_shift; int c[4] = { 1<<(h->sps.bit_depth_luma-1), 1<<(h->sps.bit_depth_chroma-1), 1<<(h->sps.bit_depth_chroma-1), -1 }; if (!ff_thread_can_start_frame(h->avctx)) { av_log(h->avctx, AV_LOG_ERROR, "Attempt to start a frame... |
0 | static int probe(AVProbeData *p){ if (p->buf_size < 13) return 0; if (p->buf[0] == 0x01 && p->buf[1] == 0x00 && p->buf[4] == 0x01 + p->buf[2] && p->buf[8] == p->buf[4] + p->buf[6] && p->buf[12] == p->buf[8] + p->buf[10]) return AVPROBE_SCORE_MAX; return 0;} |
0 | void ff_weight_h264_pixels8_8_msa(uint8_t *src, int stride, int height, int log2_denom, int weight_src, int offset){ avc_wgt_8width_msa(src, stride, height, log2_denom, weight_src, offset);} |
0 | void ff_fetch_timestamp(AVCodecParserContext *s, int off, int remove){ int i; s->dts= s->pts= AV_NOPTS_VALUE; s->offset= 0; for(i = 0; i < AV_PARSER_PTS_NB; i++) { if ( s->next_frame_offset + off >= s->cur_frame_offset[i] &&(s-> frame_offset < s->cur_frame_offset[i] || !s->frame_offset) //check is disabled becausue mpe... |
0 | static void new_video_stream(AVFormatContext *oc){ AVStream *st; AVCodecContext *video_enc; enum CodecID codec_id; st = av_new_stream(oc, oc->nb_streams); if (!st) { fprintf(stderr, "Could not alloc stream\n"); av_exit(1); } avcodec_get_context_defaults2(st->codec, AVMEDIA_TYPE_VIDEO); bitstream_filters[nb_output_files... |
0 | static int opt_debug(void *optctx, const char *opt, const char *arg){ av_log_set_level(99); debug = parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX); return 0;} |
0 | static int pulse_set_volume(PulseData *s, double volume){ pa_operation *op; pa_cvolume cvol; pa_volume_t vol; const pa_sample_spec *ss = pa_stream_get_sample_spec(s->stream); vol = pa_sw_volume_multiply(lround(volume * PA_VOLUME_NORM), s->base_volume); pa_cvolume_set(&cvol, ss->channels, PA_VOLUME_NORM); pa_sw_cvolume_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.