label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
0 | void ff_init_elbg(int *points, int dim, int numpoints, int *codebook, int numCB, int max_steps, int *closest_cb, AVLFG *rand_state){ int i, k; if (numpoints > 24*numCB) { /* ELBG is very costly for a big number of points. So if we have a lot of them, get a good initial codebook to save on iterations */ int *temp_points... |
0 | av_cold void ff_lpc_init_x86(LPCContext *c){#if HAVE_SSE2_INLINE int cpu_flags = av_get_cpu_flags(); if (INLINE_SSE2(cpu_flags) && (cpu_flags & AV_CPU_FLAG_SSE2SLOW)) { c->lpc_apply_welch_window = lpc_apply_welch_window_sse2; c->lpc_compute_autocorr = lpc_compute_autocorr_sse2; }#endif /* HAVE_SSE2_INLINE */} |
0 | int ff_pcm_read_packet(AVFormatContext *s, AVPacket *pkt){ int ret, size; size= RAW_SAMPLES*s->streams[0]->codec->block_align; if (size <= 0) return AVERROR(EINVAL); ret= av_get_packet(s->pb, pkt, size); pkt->flags &= ~AV_PKT_FLAG_CORRUPT; pkt->stream_index = 0; if (ret < 0) return ret; return ret;} |
0 | static int decode_cabac_mb_skip( H264Context *h, int mb_x, int mb_y ) { MpegEncContext * const s = &h->s; int mba_xy, mbb_xy; int ctx = 0; if(FRAME_MBAFF){ //FIXME merge with the stuff in fill_caches? int mb_xy = mb_x + (mb_y&~1)*s->mb_stride; mba_xy = mb_xy - 1; if( (mb_y&1) && h->slice_table[mba_xy] == h->slice_num &... |
0 | static int handle_packets(AVFormatContext *s, int nb_packets){ MpegTSContext *ts = s->priv_data; ByteIOContext *pb = &s->pb; uint8_t packet[TS_FEC_PACKET_SIZE]; int packet_num, len; ts->stop_parse = 0; packet_num = 0; for(;;) { if (ts->stop_parse) break; packet_num++; if (nb_packets != 0 && packet_num >= nb_packets) br... |
1 | QTestState *qtest_init(const char *extra_args){ QTestState *s; int sock, qmpsock, i; gchar *socket_path; gchar *qmp_socket_path; gchar *command; const char *qemu_binary; struct sigaction sigact; qemu_binary = getenv("QTEST_QEMU_BINARY"); g_assert(qemu_binary != NULL); s = g_malloc(sizeof(*s)); socket_path = g_strdup_pr... |
1 | static void qxl_init_ramsize(PCIQXLDevice *qxl){ /* vga mode framebuffer / primary surface (bar 0, first part) */ if (qxl->vgamem_size_mb < 8) { qxl->vgamem_size_mb = 8; qxl->vgamem_size = qxl->vgamem_size_mb * 1024 * 1024; /* vga ram (bar 0, total) */ if (qxl->ram_size_mb != -1) { qxl->vga.vram_size = qxl->ram_size_mb... |
1 | static int decode_packet(J2kDecoderContext *s, J2kCodingStyle *codsty, J2kResLevel *rlevel, int precno, int layno, uint8_t *expn, int numgbits){ int bandno, cblkny, cblknx, cblkno, ret; if (!(ret = get_bits(s, 1))){ j2k_flush(s); return 0; } else if (ret < 0) return ret; for (bandno = 0; bandno < rlevel->nbands; bandno... |
1 | static SoftFloat sbr_sum_square_c(int (*x)[2], int n){ SoftFloat ret; uint64_t accu = 0, round; int i, nz; unsigned u; for (i = 0; i < n; i += 2) { // Larger values are inavlid and could cause overflows of accu. av_assert2(FFABS(x[i + 0][0]) >> 29 == 0); accu += (int64_t)x[i + 0][0] * x[i + 0][0]; av_assert2(FFABS(x[i ... |
1 | int kvm_log_stop(target_phys_addr_t phys_addr, target_phys_addr_t end_addr){ return kvm_dirty_pages_log_change(phys_addr, end_addr, 0, KVM_MEM_LOG_DIRTY_PAGES);} |
1 | int qemu_strtoll(const char *nptr, const char **endptr, int base, int64_t *result){ char *p; int err = 0; if (!nptr) { if (endptr) { *endptr = nptr; } err = -EINVAL; } else { errno = 0; *result = strtoll(nptr, &p, base); err = check_strtox_error(endptr, p, errno); } return err;} |
1 | static int sofalizer_convolute(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs){ SOFAlizerContext *s = ctx->priv; ThreadData *td = arg; AVFrame *in = td->in, *out = td->out; int offset = jobnr; int *write = &td->write[jobnr]; const int *const delay = td->delay[jobnr]; const float *const ir = td->ir[jobnr]; int ... |
1 | int ff_htmlmarkup_to_ass(void *log_ctx, AVBPrint *dst, const char *in){ char *param, buffer[128], tmp[128]; int len, tag_close, sptr = 1, line_start = 1, an = 0, end = 0; SrtStack stack[16]; int closing_brace_missing = 0; stack[0].tag[0] = 0; strcpy(stack[0].param[PARAM_SIZE], "{\\fs}"); strcpy(stack[0].param[PARAM_COL... |
1 | void qemu_mutex_destroy(QemuMutex *mutex){ assert(mutex->owner == 0); DeleteCriticalSection(&mutex->lock);} |
1 | static int usb_host_handle_iso_data(USBHostDevice *s, USBPacket *p, int in){ AsyncURB *aurb; int i, j, ret, max_packet_size, offset, len = 0; max_packet_size = get_max_packet_size(s, p->devep); if (max_packet_size == 0) return USB_RET_NAK; aurb = get_iso_urb(s, p->devep); if (!aurb) { aurb = usb_host_alloc_iso(s, p->de... |
1 | static void pcie_pci_bridge_realize(PCIDevice *d, Error **errp){ PCIBridge *br = PCI_BRIDGE(d); PCIEPCIBridge *pcie_br = PCIE_PCI_BRIDGE_DEV(d); int rc, pos; pci_bridge_initfn(d, TYPE_PCI_BUS); d->config[PCI_INTERRUPT_PIN] = 0x1; memory_region_init(&pcie_br->shpc_bar, OBJECT(d), "shpc-bar", shpc_bar_size(d)); rc = shpc... |
1 | static int qcrypto_cipher_init_aes(QCryptoCipher *cipher, const uint8_t *key, size_t nkey, Error **errp){ QCryptoCipherBuiltin *ctxt; if (cipher->mode != QCRYPTO_CIPHER_MODE_CBC && cipher->mode != QCRYPTO_CIPHER_MODE_ECB) { error_setg(errp, "Unsupported cipher mode %d", cipher->mode); return -1; } ctxt = g_new0(QCrypto... |
1 | static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size, UID uid){ MXFContext *mxf = arg; MXFPartition *partition; UID op; uint64_t footer_partition; if (mxf->partitions_count+1 >= UINT_MAX / sizeof(*mxf->partitions)) return AVERROR(ENOMEM); mxf->partitions = av_realloc(mxf->partitions, (mxf->p... |
1 | static uint64_t getSSD(uint8_t *src1, uint8_t *src2, int stride1, int stride2, int w, int h){int x,y;uint64_t ssd=0;//printf("%d %d\n", w, h);for(y=0; y<h; y++){for(x=0; x<w; x++){int d= src1[x + y*stride1] - src2[x + y*stride2];ssd+= d*d;//printf("%d", abs(src1[x + y*stride1] - src2[x + y*stride2])/26 );}//printf("\n"... |
1 | static inline void test_server_connect(TestServer *server){ test_server_create_chr(server, ",reconnect=1");} |
0 | static int put_system_header(AVFormatContext *ctx, uint8_t *buf,int only_for_stream_id){ MpegMuxContext *s = ctx->priv_data; int size, i, private_stream_coded, id; PutBitContext pb; init_put_bits(&pb, buf, 128); put_bits(&pb, 32, SYSTEM_HEADER_START_CODE); put_bits(&pb, 16, 0); put_bits(&pb, 1, 1); put_bits(&pb, 22, s-... |
0 | static int standard_decode_i_mbs(VC9Context *v){ int x, y, ac_pred, cbpcy; /* Select ttmb table depending on pq */ if (v->pq < 5) v->ttmb_vlc = &vc9_ttmb_vlc[0]; else if (v->pq < 13) v->ttmb_vlc = &vc9_ttmb_vlc[1]; else v->ttmb_vlc = &vc9_ttmb_vlc[2]; for (y=0; y<v->height_mb; y++) { for (x=0; x<v->width_mb; x++) { cbp... |
0 | static void ff_h264_idct8_dc_add_mmx2(uint8_t *dst, int16_t *block, int stride){ int dc = (block[0] + 32) >> 6; int y; __asm__ volatile( "movd %0, %%mm0 \n\t" "pshufw $0, %%mm0, %%mm0 \n\t" "pxor %%mm1, %%mm1 \n\t" "psubw %%mm0, %%mm1 \n\t" "packuswb %%mm0, %%mm0 \n\t" "packuswb %%mm1, %%mm1 \n\t" ::"r"(dc) ); for(y=2;... |
0 | static int movie_get_frame(AVFilterLink *outlink){ MovieContext *movie = outlink->src->priv; AVPacket pkt; int ret, frame_decoded; AVStream *st = movie->format_ctx->streams[movie->stream_index]; if (movie->is_done == 1) return 0; while ((ret = av_read_frame(movie->format_ctx, &pkt)) >= 0) { // Is this a packet from the... |
1 | static void do_io_interrupt(CPUS390XState *env){ S390CPU *cpu = s390_env_get_cpu(env); LowCore *lowcore; IOIntQueue *q; uint8_t isc; int disable = 1; int found = 0; if (!(env->psw.mask & PSW_MASK_IO)) { cpu_abort(CPU(cpu), "I/O int w/o I/O mask\n"); } for (isc = 0; isc < ARRAY_SIZE(env->io_index); isc++) { uint64_t isc... |
1 | static int rtp_new_av_stream(HTTPContext *c, int stream_index, struct sockaddr_in *dest_addr, HTTPContext *rtsp_c){ AVFormatContext *ctx; AVStream *st; char *ipaddr; URLContext *h = NULL; uint8_t *dummy_buf; int max_packet_size; /* now we can open the relevant output stream */ ctx = avformat_alloc_context(); if (!ctx) ... |
1 | void unix_start_outgoing_migration(MigrationState *s, const char *path, Error **errp){ unix_nonblocking_connect(path, unix_wait_for_connect, s, errp);} |
1 | static void *mptsas_load_request(QEMUFile *f, SCSIRequest *sreq){ SCSIBus *bus = sreq->bus; MPTSASState *s = container_of(bus, MPTSASState, bus); PCIDevice *pci = PCI_DEVICE(s); MPTSASRequest *req; int i, n; req = g_new(MPTSASRequest, 1); qemu_get_buffer(f, (unsigned char *)&req->scsi_io, sizeof(req->scsi_io)); n = qem... |
1 | static int dvbsub_parse_clut_segment(AVCodecContext *avctx, const uint8_t *buf, int buf_size){ DVBSubContext *ctx = avctx->priv_data; const uint8_t *buf_end = buf + buf_size; int i, clut_id; int version; DVBSubCLUT *clut; int entry_id, depth , full_range; int y, cr, cb, alpha; int r, g, b, r_add, g_add, b_add; ff_dlog(... |
1 | VLANClientState *qemu_new_vlan_client(VLANState *vlan, IOReadHandler *fd_read, void *opaque){ VLANClientState *vc, **pvc; vc = qemu_mallocz(sizeof(VLANClientState)); if (!vc) return NULL; vc->fd_read = fd_read; vc->opaque = opaque; vc->vlan = vlan; vc->next = NULL; pvc = &vlan->first_client; while (*pvc != NULL) pvc = ... |
1 | static void unterminated_escape(void){ QObject *obj = qobject_from_json("\"abc\\\"", NULL); g_assert(obj == NULL);} |
1 | struct omap_gpmc_s *omap_gpmc_init(struct omap_mpu_state_s *mpu, hwaddr base, qemu_irq irq, qemu_irq drq){ int cs; struct omap_gpmc_s *s = (struct omap_gpmc_s *) g_malloc0(sizeof(struct omap_gpmc_s)); memory_region_init_io(&s->iomem, NULL, &omap_gpmc_ops, s, "omap-gpmc", 0x1000); memory_region_add_subregion(get_system_... |
1 | bool trace_backend_init(const char *events, const char *file){ GThread *thread; if (!g_thread_supported()) { g_thread_init(NULL); } trace_available_cond = g_cond_new(); trace_empty_cond = g_cond_new(); thread = trace_thread_create(writeout_thread); if (!thread) { fprintf(stderr, "warning: unable to initialize simple tr... |
1 | static inline void vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y, int mvn, int r_x, int r_y, uint8_t* is_intra){ MpegEncContext *s = &v->s; int xy, wrap, off = 0; int A[2], B[2], C[2]; int px, py; int a_valid = 0, b_valid = 0, c_valid = 0; int field_a, field_b, field_c; // 0: same, 1: opposit int total_v... |
1 | ip_reass(register struct ip *ip, register struct ipq *fp){register struct mbuf *m = dtom(ip);register struct ipasfrag *q;int hlen = ip->ip_hl << 2;int i, next;DEBUG_CALL("ip_reass");DEBUG_ARG("ip = %lx", (long)ip);DEBUG_ARG("fp = %lx", (long)fp);DEBUG_ARG("m = %lx", (long)m);/* * Presence of header sizes in mbufs * wou... |
1 | static void qtrle_encode_line(QtrleEncContext *s, AVFrame *p, int line, uint8_t **buf){ int width=s->logical_width; int i; signed char rlecode; /* We will use it to compute the best bulk copy sequence */ unsigned int bulkcount; /* This will be the number of pixels equal to the preivous frame one's * starting from the i... |
1 | static void rv34_idct_add_c(uint8_t *dst, ptrdiff_t stride, DCTELEM *block){ int temp[16]; uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; int i; rv34_row_transform(temp, block); memset(block, 0, 16*sizeof(DCTELEM)); for(i = 0; i < 4; i++){ const int z0 = 13*(temp[4*0+i] + temp[4*2+i]) + 0x200; const int z1 = 13*(temp[4*0+i] ... |
1 | int ff_lpc_calc_coefs(DSPContext *s, const int32_t *samples, int blocksize, int min_order, int max_order, int precision, int32_t coefs[][MAX_LPC_ORDER], int *shift, int use_lpc, int omethod, int max_shift, int zero_shift){ double autoc[MAX_LPC_ORDER+1]; double ref[MAX_LPC_ORDER]; double lpc[MAX_LPC_ORDER][MAX_LPC_ORDER... |
1 | av_cold void ff_cavsdsp_init_x86(CAVSDSPContext *c, AVCodecContext *avctx){ av_unused int cpu_flags = av_get_cpu_flags(); cavsdsp_init_mmx(c, avctx);#if HAVE_AMD3DNOW_INLINE if (INLINE_AMD3DNOW(cpu_flags)) cavsdsp_init_3dnow(c, avctx);#endif /* HAVE_AMD3DNOW_INLINE */#if HAVE_MMXEXT_INLINE if (INLINE_MMXEXT(cpu_flags))... |
1 | static bool object_create_initial(const char *type){ if (g_str_equal(type, "rng-egd")) { /* * return false for concrete netfilters since * they depend on netdevs already existing if (g_str_equal(type, "filter-buffer") || g_str_equal(type, "filter-dump") || g_str_equal(type, "filter-mirror") || g_str_equal(type, "filter... |
1 | static int bochs_open(BlockDriverState *bs, QDict *options, int flags, Error **errp){ BDRVBochsState *s = bs->opaque; int i; struct bochs_header bochs; struct bochs_header_v1 header_v1; int ret; bs->read_only = 1; // no write support yet ret = bdrv_pread(bs->file, 0, &bochs, sizeof(bochs)); if (ret < 0) { return ret; }... |
1 | static int svq3_decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) { MpegEncContext *const s = avctx->priv_data; H264Context *const h = avctx->priv_data; int m, mb_type; unsigned char *extradata; unsigned int size; s->flags = avctx->flags; s->flags2 = avctx->flags2; s->unrestri... |
1 | static inline void elf_core_copy_regs(target_elf_gregset_t *regs, const CPUSH4State *env){ int i; for (i = 0; i < 16; i++) { (*regs[i]) = tswapreg(env->gregs[i]); } (*regs)[TARGET_REG_PC] = tswapreg(env->pc); (*regs)[TARGET_REG_PR] = tswapreg(env->pr); (*regs)[TARGET_REG_SR] = tswapreg(env->sr); (*regs)[TARGET_REG_GBR]... |
0 | static int vorbis_parse_id_hdr(vorbis_context *vc){ GetBitContext *gb=&vc->gb; uint_fast8_t bl0, bl1; if ((get_bits(gb, 8)!='v') || (get_bits(gb, 8)!='o') || (get_bits(gb, 8)!='r') || (get_bits(gb, 8)!='b') || (get_bits(gb, 8)!='i') || (get_bits(gb, 8)!='s')) { av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis id header pa... |
1 | static void tcg_out_ld (TCGContext *s, TCGType type, int ret, int arg1, tcg_target_long arg2){ if (type == TCG_TYPE_I32) tcg_out_ldst (s, ret, arg1, arg2, LWZ, LWZX); else tcg_out_ldst (s, ret, arg1, arg2, LD, LDX);} |
1 | void fw_cfg_add_i64(FWCfgState *s, uint16_t key, uint64_t value){ uint64_t *copy; copy = g_malloc(sizeof(value)); *copy = cpu_to_le64(value); fw_cfg_add_bytes(s, key, (uint8_t *)copy, sizeof(value));} |
1 | static NetSocketState *net_socket_fd_init_stream(VLANState *vlan, int fd, int is_connected){ NetSocketState *s; s = qemu_mallocz(sizeof(NetSocketState)); if (!s) return NULL; s->fd = fd; s->vc = qemu_new_vlan_client(vlan, net_socket_receive, s); snprintf(s->vc->info_str, sizeof(s->vc->info_str), "socket: fd=%d", fd); i... |
0 | static int add_string_metadata(int count, const char *name, TiffContext *s){ char *value; if (bytestream2_get_bytes_left(&s->gb) < count) return AVERROR_INVALIDDATA; value = av_malloc(count + 1); if (!value) return AVERROR(ENOMEM); bytestream2_get_bufferu(&s->gb, value, count); value[count] = 0; av_dict_set(&s->picture... |
0 | static int idcin_read_header(AVFormatContext *s){ AVIOContext *pb = s->pb; IdcinDemuxContext *idcin = s->priv_data; AVStream *st; unsigned int width, height; unsigned int sample_rate, bytes_per_sample, channels; int ret; /* get the 5 header parameters */ width = avio_rl32(pb); height = avio_rl32(pb); sample_rate = avio... |
0 | static int decode_profile_tier_level(GetBitContext *gb, AVCodecContext *avctx, PTLCommon *ptl){ int i; if (get_bits_left(gb) < 2+1+5 + 32 + 4 + 16 + 16 + 12) return -1; ptl->profile_space = get_bits(gb, 2); ptl->tier_flag = get_bits1(gb); ptl->profile_idc = get_bits(gb, 5); if (ptl->profile_idc == FF_PROFILE_HEVC_MAIN)... |
0 | int ff_dca_lbr_parse(DCALbrDecoder *s, uint8_t *data, DCAExssAsset *asset){ struct { LBRChunk lfe; LBRChunk tonal; LBRChunk tonal_grp[5]; LBRChunk grid1[DCA_LBR_CHANNELS / 2]; LBRChunk hr_grid[DCA_LBR_CHANNELS / 2]; LBRChunk ts1[DCA_LBR_CHANNELS / 2]; LBRChunk ts2[DCA_LBR_CHANNELS / 2]; } chunk = { }; GetByteContext gb... |
0 | static av_cold int wmv2_decode_init(AVCodecContext *avctx){ Wmv2Context *const w = avctx->priv_data; int ret; if ((ret = ff_msmpeg4_decode_init(avctx)) < 0) return ret; ff_wmv2_common_init(w); return ff_intrax8_common_init(&w->x8, &w->s.idsp, &w->s);} |
0 | static int amovie_get_samples(AVFilterLink *outlink){ MovieContext *movie = outlink->src->priv; AVPacket pkt; int ret, got_frame = 0; if (!movie->pkt.size && movie->is_done == 1) return AVERROR_EOF; /* check for another frame, in case the previous one was completely consumed */ if (!movie->pkt.size) { while ((ret = av_... |
0 | static int h264_init_context(AVCodecContext *avctx, H264Context *h){ int i; h->avctx = avctx; h->picture_structure = PICT_FRAME; h->slice_context_count = 1; h->workaround_bugs = avctx->workaround_bugs; h->flags = avctx->flags; h->prev_poc_msb = 1 << 16; h->x264_build = -1; h->recovery_frame = -1; h->frame_recovered = 0... |
0 | static uint32_t nvic_readl(NVICState *s, uint32_t offset){ ARMCPU *cpu = s->cpu; uint32_t val; switch (offset) { case 4: /* Interrupt Control Type. */ return ((s->num_irq - NVIC_FIRST_IRQ) / 32) - 1; case 0xd00: /* CPUID Base. */ return cpu->midr; case 0xd04: /* Interrupt Control State. */ /* VECTACTIVE */ val = cpu->e... |
0 | static void parse_cmdline(const char *cmdline, int *pnb_args, char **args){ const char *p; int nb_args, ret; char buf[1024]; p = cmdline; nb_args = 0; for(;;) { while (qemu_isspace(*p)) p++; if (*p == '\0') break; if (nb_args >= MAX_ARGS) break; ret = get_str(buf, sizeof(buf), &p); args[nb_args] = g_strdup(buf); nb_arg... |
0 | void portio_list_destroy(PortioList *piolist){ g_free(piolist->regions); g_free(piolist->aliases);} |
0 | INLINE flag extractFloat32Sign( float32 a ){ return a>>31;} |
0 | static int proxy_mknod(FsContext *fs_ctx, V9fsPath *dir_path, const char *name, FsCred *credp){ int retval; V9fsString fullname; v9fs_string_init(&fullname); v9fs_string_sprintf(&fullname, "%s/%s", dir_path->data, name); retval = v9fs_request(fs_ctx->private, T_MKNOD, NULL, "sdqdd", &fullname, credp->fc_mode, credp->fc... |
0 | static bool memory_region_get_may_overlap(Object *obj, Error **errp){ MemoryRegion *mr = MEMORY_REGION(obj); return mr->may_overlap;} |
0 | static void DBDMA_run (DBDMA_channel *ch){ int channel; for (channel = 0; channel < DBDMA_CHANNELS; channel++, ch++) { uint32_t status = be32_to_cpu(ch->regs[DBDMA_STATUS]); if (!ch->processing && (status & RUN) && (status & ACTIVE)) channel_run(ch); }} |
0 | void helper_fstoq(CPUSPARCState *env, float32 src){ clear_float_exceptions(env); QT0 = float32_to_float128(src, &env->fp_status); check_ieee_exceptions(env);} |
0 | static void process_incoming_migration_bh(void *opaque){ Error *local_err = NULL; MigrationIncomingState *mis = opaque; /* Make sure all file formats flush their mutable metadata. * If we get an error here, just don't restart the VM yet. */ bdrv_invalidate_cache_all(&local_err); if (!local_err) { blk_resume_after_migra... |
0 | int float64_lt_quiet( float64 a, float64 b STATUS_PARAM ){ flag aSign, bSign; if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) ) { if ( float64_is_signaling_nan( a ) || float64_is_signaling_nan( b ) ) { float_raise( float_flag_... |
0 | static void machine_class_init(ObjectClass *oc, void *data){ MachineClass *mc = MACHINE_CLASS(oc); QEMUMachine *qm = data; mc->name = qm->name; mc->desc = qm->desc; mc->init = qm->init; mc->kvm_type = qm->kvm_type; mc->block_default_type = qm->block_default_type; mc->max_cpus = qm->max_cpus; mc->no_sdcard = qm->no_sdca... |
0 | int kvm_irqchip_add_msi_route(KVMState *s, int vector, PCIDevice *dev){ struct kvm_irq_routing_entry kroute = {}; int virq; MSIMessage msg = {0, 0}; if (dev) { msg = pci_get_msi_message(dev, vector); } if (kvm_gsi_direct_mapping()) { return kvm_arch_msi_data_to_gsi(msg.data); } if (!kvm_gsi_routing_enabled()) { return ... |
0 | gen_intermediate_code_internal(TriCoreCPU *cpu, struct TranslationBlock *tb, int search_pc){ CPUState *cs = CPU(cpu); CPUTriCoreState *env = &cpu->env; DisasContext ctx; target_ulong pc_start; int num_insns; uint16_t *gen_opc_end; if (search_pc) { qemu_log("search pc %d\n", search_pc); } num_insns = 0; pc_start = tb->p... |
0 | static int raw_pread_aligned(BlockDriverState *bs, int64_t offset, uint8_t *buf, int count){ BDRVRawState *s = bs->opaque; int ret; ret = fd_open(bs); if (ret < 0) return ret; ret = pread(s->fd, buf, count, offset); if (ret == count) goto label__raw_read__success; /* Allow reads beyond the end (needed for pwrite) */ if... |
0 | static void tcg_out_qemu_st_slow_path (TCGContext *s, TCGLabelQemuLdst *label){ int s_bits; int ir; int opc = label->opc; int mem_index = label->mem_index; int data_reg = label->datalo_reg; int data_reg2 = label->datahi_reg; int addr_reg = label->addrlo_reg; uint8_t *raddr = label->raddr; uint8_t **label_ptr = &label->... |
0 | static int mpegaudio_parse(AVCodecParserContext *s1, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size){ MpegAudioParseContext *s = s1->priv_data; int len, ret, sr; uint32_t header; const uint8_t *buf_ptr; *poutbuf = NULL; *poutbuf_size = 0; buf_ptr = buf; while (buf_si... |
0 | int ff_replaygain_export_raw(AVStream *st, int32_t tg, uint32_t tp, int32_t ag, uint32_t ap){ AVReplayGain *replaygain; if (tg == INT32_MIN && ag == INT32_MIN) return 0; replaygain = (AVReplayGain*)ff_stream_new_side_data(st, AV_PKT_DATA_REPLAYGAIN, sizeof(*replaygain)); if (!replaygain) return AVERROR(ENOMEM); replayg... |
0 | static void dead_tmp(TCGv tmp){ int i; num_temps--; i = num_temps; if (GET_TCGV(temps[i]) == GET_TCGV(tmp)) return; /* Shuffle this temp to the last slot. */ while (GET_TCGV(temps[i]) != GET_TCGV(tmp)) i--; while (i < num_temps) { temps[i] = temps[i + 1]; i++; } temps[i] = tmp;} |
0 | pvscsi_update_irq_status(PVSCSIState *s){ PCIDevice *d = PCI_DEVICE(s); bool should_raise = s->reg_interrupt_enabled & s->reg_interrupt_status; trace_pvscsi_update_irq_level(should_raise, s->reg_interrupt_enabled, s->reg_interrupt_status); if (s->msi_used && msi_enabled(d)) { if (should_raise) { trace_pvscsi_update_irq... |
0 | static inline void check_io(CPUX86State *env, int addr, int size){ int io_offset, val, mask; /* TSS must be a valid 32 bit one */ if (!(env->tr.flags & DESC_P_MASK) || ((env->tr.flags >> DESC_TYPE_SHIFT) & 0xf) != 9 || env->tr.limit < 103) { goto fail; } io_offset = cpu_lduw_kernel(env, env->tr.base + 0x66); io_offset ... |
0 | void page_set_flags(target_ulong start, target_ulong end, int flags){ PageDesc *p; target_ulong addr; /* mmap_lock should already be held. */ start = start & TARGET_PAGE_MASK; end = TARGET_PAGE_ALIGN(end); if (flags & PAGE_WRITE) flags |= PAGE_WRITE_ORG; for(addr = start; addr < end; addr += TARGET_PAGE_SIZE) { p = pag... |
1 | static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size, int parse_extradata){ AVCodecContext *const avctx = h->avctx; H264SliceContext *sl; int buf_index; unsigned context_count; int next_avc; int nals_needed = 0; ///< number of NALs that need decoding before the next frame thread starts int nal_i... |
1 | static int check_tag(AVIOContext *s, int offset, unsigned int len){ char tag[4]; if (len > 4 || avio_seek(s, offset, SEEK_SET) < 0 || avio_read(s, tag, len) < len) return -1; else if (!AV_RB32(tag) || is_tag(tag, len)) return 1; return 0;} |
1 | static void fw_cfg_bootsplash(FWCfgState *s){ int boot_splash_time = -1; const char *boot_splash_filename = NULL; char *p; char *filename, *file_data; int file_size; int file_type = -1; const char *temp; /* get user configuration */ QemuOptsList *plist = qemu_find_opts("boot-opts"); QemuOpts *opts = QTAILQ_FIRST(&plist... |
1 | static ssize_t handle_aiocb_rw(RawPosixAIOData *aiocb){ ssize_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(aio... |
1 | static inline void set_txint(ChannelState *s){ s->txint = 1; if (!s->rxint_under_svc) { s->txint_under_svc = 1; if (s->chn == chn_a) { s->rregs[R_INTR] |= INTR_TXINTA; if (s->wregs[W_MINTR] & MINTR_STATUSHI) s->otherchn->rregs[R_IVEC] = IVEC_HITXINTA; else s->otherchn->rregs[R_IVEC] = IVEC_LOTXINTA; } else { s->rregs[R... |
0 | static int rm_probe(AVProbeData *p){ /* check file header */ if (p->buf_size <= 32) return 0; if ((p->buf[0] == '.' && p->buf[1] == 'R' && p->buf[2] == 'M' && p->buf[3] == 'F' && p->buf[4] == 0 && p->buf[5] == 0) || (p->buf[0] == '.' && p->buf[1] == 'r' && p->buf[2] == 'a' && p->buf[3] == 0xfd)) return AVPROBE_SCORE_MA... |
0 | static int read_sm_data(AVFormatContext *s, AVIOContext *bc, AVPacket *pkt, int is_meta, int64_t maxpos){ int count = ffio_read_varlen(bc); int skip_start = 0; int skip_end = 0; int channels = 0; int64_t channel_layout = 0; int sample_rate = 0; int width = 0; int height = 0; int i; for (i=0; i<count; i++) { uint8_t nam... |
0 | static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx, const float *audio, const float *la, int channel, int prev_type){ AacPsyContext *pctx = (AacPsyContext*) ctx->model_priv_data; AacPsyChannel *pch = &pctx->ch[channel]; int grouping = 0; int uselongblock = 1; int attacks[AAC_NUM_BLOCKS_SHORT + 1] = { 0 }; float c... |
0 | static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,long width, long height,long lumStride, long chromStride, long dstStride, long vertLumPerChroma){long y;const long chromWidth= width>>1;for(y=0; y<height; y++){#ifdef HAVE_MMX//FIXME handle 2 lines a o... |
0 | static int ass_get_duration(const uint8_t *p){ int sh, sm, ss, sc, eh, em, es, ec; uint64_t start, end; if (sscanf(p, "%*[^,],%d:%d:%d%*c%d,%d:%d:%d%*c%d", &sh, &sm, &ss, &sc, &eh, &em, &es, &ec) != 8) return 0; start = 3600000 * sh + 60000 * sm + 1000 * ss + 10 * sc; end = 3600000 * eh + 60000 * em + 1000 * es + 10 * ... |
1 | static inline abi_long host_to_target_cmsg(struct target_msghdr *target_msgh, struct msghdr *msgh){ struct cmsghdr *cmsg = CMSG_FIRSTHDR(msgh); abi_long msg_controllen; abi_ulong target_cmsg_addr; struct target_cmsghdr *target_cmsg, *target_cmsg_start; socklen_t space = 0; msg_controllen = tswapal(target_msgh->msg_cont... |
1 | static void ib700_pc_init(PCIBus *unused){ register_savevm("ib700_wdt", -1, 0, ib700_save, ib700_load, NULL); register_ioport_write(0x441, 2, 1, ib700_write_disable_reg, NULL); register_ioport_write(0x443, 2, 1, ib700_write_enable_reg, NULL);} |
1 | static int vscsi_srp_indirect_data(VSCSIState *s, vscsi_req *req, uint8_t *buf, uint32_t len){ struct srp_direct_buf *td = &req->ind_desc->table_desc; struct srp_direct_buf *md = req->cur_desc; int rc = 0; uint32_t llen, total = 0; dprintf("VSCSI: indirect segment 0x%x bytes, td va=0x%llx len=0x%x\n", len, (unsigned lo... |
1 | static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt){ BinkAudioContext *s = avctx->priv_data; AVFrame *frame = data; GetBitContext *gb = &s->gb; int ret, consumed = 0; if (!get_bits_left(gb)) { uint8_t *buf; /* handle end-of-stream */ if (!avpkt->size) { *got_frame_ptr = 0; re... |
0 | static int decode_cabac_intra_mb_type(H264Context *h, int ctx_base, int intra_slice) { uint8_t *state= &h->cabac_state[ctx_base]; int mb_type; if(intra_slice){ MpegEncContext * const s = &h->s; const int mba_xy = h->left_mb_xy[0]; const int mbb_xy = h->top_mb_xy; int ctx=0; if( h->slice_table[mba_xy] == h->slice_num &&... |
0 | static int decode_p_picture_header(VC9Context *v){ /* INTERFRM, FRMCNT, RANGEREDFRM read in caller */ int lowquant, pqindex; pqindex = get_bits(&v->gb, 5); if (v->quantizer_mode == QUANT_FRAME_IMPLICIT) v->pq = pquant_table[0][pqindex]; else { v->pq = pquant_table[v->quantizer_mode-1][pqindex]; } if (pqindex < 9) v->ha... |
0 | void ff_avg_h264_qpel8_mc12_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride){ avc_luma_midh_qrt_and_aver_dst_8w_msa(src - (2 * stride) - 2, stride, dst, stride, 8, 0);} |
0 | static void sbr_hf_assemble(float Y[2][38][64][2], const float X_high[64][40][2], SpectralBandReplication *sbr, SBRData *ch_data, const int e_a[2]){ int e, i, j, m; const int h_SL = 4 * !sbr->bs_smoothing_mode; const int kx = sbr->kx[1]; const int m_max = sbr->m[1]; static const float h_smooth[5] = { 0.33333333333333, ... |
0 | int ff_init_poc(H264Context *h, int pic_field_poc[2], int *pic_poc){ const SPS *sps = h->ps.sps; const int max_frame_num = 1 << sps->log2_max_frame_num; int field_poc[2]; h->frame_num_offset = h->prev_frame_num_offset; if (h->frame_num < h->prev_frame_num) h->frame_num_offset += max_frame_num; if (sps->poc_type == 0) {... |
1 | static void mirror_start_job(BlockDriverState *bs, BlockDriverState *target, int64_t speed, int64_t granularity, int64_t buf_size, BlockdevOnError on_source_error, BlockdevOnError on_target_error, BlockDriverCompletionFunc *cb, void *opaque, Error **errp, const BlockJobDriver *driver, bool is_none_mode, BlockDriverStat... |
1 | static int sdp_parse_rtpmap(AVFormatContext *s, AVStream *st, RTSPStream *rtsp_st, int payload_type, const char *p){ AVCodecContext *codec = st->codec; char buf[256]; int i; AVCodec *c; const char *c_name; /* See if we can handle this kind of payload. * The space should normally not be there but some Real streams or * ... |
0 | void ff_dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx){ const int high_bit_depth = avctx->bits_per_raw_sample > 8; // Common optimizations whether AltiVec is available or not c->prefetch = prefetch_ppc; if (!high_bit_depth) { switch (check_dcbzl_effect()) { case 32: c->clear_blocks = clear_blocks_dcbz32_ppc; br... |
1 | bool hbitmap_get(const HBitmap *hb, uint64_t item){ /* Compute position and bit in the last layer. */ uint64_t pos = item >> hb->granularity; unsigned long bit = 1UL << (pos & (BITS_PER_LONG - 1)); return (hb->levels[HBITMAP_LEVELS - 1][pos >> BITS_PER_LEVEL] & bit) != 0;} |
1 | static int ffm_is_avail_data(AVFormatContext *s, int size){ FFMContext *ffm = s->priv_data; int64_t pos, avail_size; int len; len = ffm->packet_end - ffm->packet_ptr; if (size <= len) return 1; pos = avio_tell(s->pb); if (!ffm->write_index) { if (pos == ffm->file_size) return AVERROR_EOF; avail_size = ffm->file_size - ... |
1 | int fw_cfg_add_bytes(FWCfgState *s, uint16_t key, uint8_t *data, uint32_t len){ int arch = !!(key & FW_CFG_ARCH_LOCAL); key &= FW_CFG_ENTRY_MASK; if (key >= FW_CFG_MAX_ENTRY) return 0; s->entries[arch][key].data = data; s->entries[arch][key].len = len; return 1;} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.