label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
0 | static QDictEntry *qdict_find(const QDict *qdict, const char *key, unsigned int hash){ QDictEntry *entry; LIST_FOREACH(entry, &qdict->table[hash], next) if (!strcmp(entry->key, key)) return entry; return NULL;} |
1 | int css_do_tsch(SubchDev *sch, IRB *target_irb){ SCSW *s = &sch->curr_status.scsw; PMCW *p = &sch->curr_status.pmcw; uint16_t stctl; uint16_t fctl; uint16_t actl; IRB irb; int ret; if (!(p->flags & (PMCW_FLAGS_MASK_DNV | PMCW_FLAGS_MASK_ENA))) { ret = 3; goto out; } stctl = s->ctrl & SCSW_CTRL_MASK_STCTL; fctl = s->ctr... |
1 | int ff_mpeg4_frame_end(AVCodecContext *avctx, const uint8_t *buf, int buf_size){ Mpeg4DecContext *ctx = avctx->priv_data; MpegEncContext *s = &ctx->m; /* divx 5.01+ bitstream reorder stuff */ /* Since this clobbers the input buffer and hwaccel codecs still need the * data during hwaccel->end_frame we should not do this... |
1 | static void pxb_host_class_init(ObjectClass *class, void *data){ DeviceClass *dc = DEVICE_CLASS(class); SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(class); PCIHostBridgeClass *hc = PCI_HOST_BRIDGE_CLASS(class); dc->fw_name = "pci"; sbc->explicit_ofw_unit_address = pxb_host_ofw_unit_address; hc->root_bus_path = pxb_ho... |
1 | static int vmsa_ttbcr_raw_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value){ if (arm_feature(env, ARM_FEATURE_LPAE)) { value &= ~((7 << 19) | (3 << 14) | (0xf << 3)); } else { value &= 7; } /* Note that we always calculate c2_mask and c2_base_mask, but * they are only used for short-descriptor tables (ie ... |
1 | av_cold int ff_dcaadpcm_init(DCAADPCMEncContext *s){ if (!s) return -1; s->private_data = av_malloc(sizeof(premultiplied_coeffs) * DCA_ADPCM_VQCODEBOOK_SZ); precalc(s->private_data); return 0;} |
1 | static void null_draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) { } |
0 | static int dirac_unpack_idwt_params(DiracContext *s){ GetBitContext *gb = &s->gb; int i, level; unsigned tmp;#define CHECKEDREAD(dst, cond, errmsg) \ tmp = svq3_get_ue_golomb(gb); \ if (cond) { \ av_log(s->avctx, AV_LOG_ERROR, errmsg); \ return -1; \ }\ dst = tmp; align_get_bits(gb); s->zero_res = s->num_refs ? get_bit... |
0 | static int yop_probe(AVProbeData *probe_packet){ if (AV_RB16(probe_packet->buf) == AV_RB16("YO") && probe_packet->buf[6] && probe_packet->buf[7] && !(probe_packet->buf[8] & 1) && !(probe_packet->buf[10] & 1)) return AVPROBE_SCORE_MAX * 3 / 4; return 0;} |
0 | av_cold int ff_vp8_decode_init(AVCodecContext *avctx){ VP8Context *s = avctx->priv_data; int ret; s->avctx = avctx; avctx->pix_fmt = AV_PIX_FMT_YUV420P; avctx->internal->allocate_progress = 1; ff_videodsp_init(&s->vdsp, 8); ff_h264_pred_init(&s->hpc, AV_CODEC_ID_VP8, 8, 1); ff_vp8dsp_init(&s->vp8dsp); if ((ret = vp8_in... |
1 | static int decode_unk6(uint8_t *frame, int width, int height, const uint8_t *src, const uint8_t *src_end){ return -1;} |
1 | int ga_install_service(const char *path, const char *logfile, const char *state_dir){ int ret = EXIT_FAILURE; SC_HANDLE manager; SC_HANDLE service; TCHAR module_fname[MAX_PATH]; GString *cmdline; SERVICE_DESCRIPTION desc = { (char *)QGA_SERVICE_DESCRIPTION }; if (GetModuleFileName(NULL, module_fname, MAX_PATH) == 0) { ... |
1 | static size_t curl_read_cb(void *ptr, size_t size, size_t nmemb, void *opaque){ CURLState *s = ((CURLState*)opaque); size_t realsize = size * nmemb; int i; DPRINTF("CURL: Just reading %zd bytes\n", realsize); if (!s || !s->orig_buf) goto read_end; memcpy(s->orig_buf + s->buf_off, ptr, realsize); s->buf_off += realsize;... |
1 | void qemu_sem_post(QemuSemaphore *sem){ int rc;#if defined(__APPLE__) || defined(__NetBSD__) pthread_mutex_lock(&sem->lock); if (sem->count == INT_MAX) { rc = EINVAL; } else if (sem->count++ < 0) { rc = pthread_cond_signal(&sem->cond); } else { rc = 0; } pthread_mutex_unlock(&sem->lock); if (rc != 0) { error_exit(rc, _... |
1 | int scsi_convert_sense(uint8_t *in_buf, int in_len, uint8_t *buf, int len, bool fixed){ SCSISense sense; bool fixed_in; fixed_in = (in_buf[0] & 2) == 0; if (in_len && fixed == fixed_in) { memcpy(buf, in_buf, MIN(len, in_len)); return MIN(len, in_len); } if (in_len == 0) { sense = SENSE_CODE(NO_SENSE); } else { sense = ... |
1 | static int encode_codebook(CinepakEncContext *s, int *codebook, int size, int chunk_type_yuv, int chunk_type_gray, unsigned char *buf){ int x, y, ret, entry_size = s->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4; ret = write_chunk_header(buf, s->pix_fmt == AV_PIX_FMT_YUV420P ? chunk_type_yuv : chunk_type_gray, entry_size * si... |
0 | static int ir2_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt){ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; Ir2Context * const s = avctx->priv_data; AVFrame *picture = data; AVFrame * const p= (AVFrame*)&s->picture; int start; if(p->data[0]) avctx->release_buffer(avctx... |
0 | void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width, int height, INT64 pts){ ContextInfo *ci = (ContextInfo *) ctx; AVPicture picture1; Imlib_Image image; DATA32 *data; image = get_cached_image(ci, width, height); if (!image) { image = imlib_create_image(width, height); put_cached_image(ci, ... |
1 | static void host_signal_handler(int host_signum, siginfo_t *info, void *puc){ CPUArchState *env = thread_cpu->env_ptr; int sig; target_siginfo_t tinfo; /* the CPU emulator uses some host signals to detect exceptions, we forward to it some signals */ if ((host_signum == SIGSEGV || host_signum == SIGBUS) && info->si_code... |
1 | void stellaris_gamepad_init(int n, qemu_irq *irq, const int *keycode){ gamepad_state *s; int i; s = (gamepad_state *)g_malloc0(sizeof (gamepad_state)); s->buttons = (gamepad_button *)g_malloc0(n * sizeof (gamepad_button)); for (i = 0; i < n; i++) { s->buttons[i].irq = irq[i]; s->buttons[i].keycode = keycode[i]; } s->nu... |
1 | static void arm_cpu_initfn(Object *obj){ CPUState *cs = CPU(obj); ARMCPU *cpu = ARM_CPU(obj); static bool inited; uint32_t Aff1, Aff0; cs->env_ptr = &cpu->env; cpu_exec_init(cs, &error_abort); cpu->cp_regs = g_hash_table_new_full(g_int_hash, g_int_equal, g_free, g_free); /* This cpu-id-to-MPIDR affinity is used only fo... |
1 | static int vmdk_create(const char *filename, QEMUOptionParameter *options, Error **errp){ int idx = 0; BlockDriverState *new_bs = NULL; Error *local_err; char *desc = NULL; int64_t total_size = 0, filesize; const char *adapter_type = NULL; const char *backing_file = NULL; const char *fmt = NULL; int flags = 0; int ret ... |
1 | int vmstate_register_with_alias_id(DeviceState *dev, int instance_id, const VMStateDescription *vmsd, void *opaque, int alias_id, int required_for_version){ SaveStateEntry *se; /* If this triggers, alias support can be dropped for the vmsd. */ assert(alias_id == -1 || required_for_version >= vmsd->minimum_version_id); ... |
1 | void visit_start_alternate(Visitor *v, const char *name, GenericAlternate **obj, size_t size, bool promote_int, Error **errp){ Error *err = NULL; assert(obj && size >= sizeof(GenericAlternate)); assert(v->type != VISITOR_OUTPUT || *obj); if (v->start_alternate) { v->start_alternate(v, name, obj, size, promote_int, &err... |
1 | void kvm_ioapic_dump_state(Monitor *mon, const QDict *qdict){ IOAPICCommonState s; kvm_ioapic_get(&s); ioapic_print_redtbl(mon, &s);} |
1 | milkymist_init(MachineState *machine){ const char *cpu_model = machine->cpu_model; const char *kernel_filename = machine->kernel_filename; const char *kernel_cmdline = machine->kernel_cmdline; const char *initrd_filename = machine->initrd_filename; LM32CPU *cpu; CPULM32State *env; int kernel_size; DriveInfo *dinfo; Mem... |
1 | static int read_probe(AVProbeData *pd){ if (pd->buf[0] == 'J' && pd->buf[1] == 'V' && strlen(MAGIC) <= pd->buf_size - 4 && !memcmp(pd->buf + 4, MAGIC, strlen(MAGIC))) return AVPROBE_SCORE_MAX; return 0;} |
1 | static void ich9_lpc_class_init(ObjectClass *klass, void *data){ DeviceClass *dc = DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); dc->reset = ich9_lpc_reset; k->init = ich9_lpc_initfn; dc->vmsd = &vmstate_ich9_lpc; dc->no_user = 1; k->config_write = ic... |
1 | hwaddr cpu_mips_translate_address(CPUMIPSState *env, target_ulong address, int rw){ hwaddr physical; int prot; int access_type; int ret = 0; /* data access */ access_type = ACCESS_INT; ret = get_physical_address(env, &physical, &prot, address, rw, access_type); if (ret != TLBRET_MATCH) { raise_mmu_exception(env, addres... |
1 | static int h263_decode_frame(AVCodecContext *avctx, void *data, int *data_size, UINT8 *buf, int buf_size){ MpegEncContext *s = avctx->priv_data; int ret; AVPicture *pict = data; #ifdef DEBUG printf("*****frame %d size=%d\n", avctx->frame_number, buf_size); printf("bytes=%x %x %x %x\n", buf[0], buf[1], buf[2], buf[3]);#... |
1 | PPC_OP(setlr){ regs->lr = PARAM1; RETURN();} |
1 | static int mlib_YUV2ABGR420_32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]){ if(c->srcFormat == PIX_FMT_YUV422P){srcStride[1] *= 2;srcStride[2] *= 2; } assert(srcStride[1] == srcStride[2]); mlib_VideoColorYUV2ABGR420(dst[0]+srcSliceY*dstStride[0], src[0]... |
1 | BlockDriverAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *iov, int nb_sectors, BlockDriverCompletionFunc *cb, void *opaque){ return bdrv_aio_rw_vector(bs, sector_num, iov, nb_sectors, cb, opaque, 0);} |
1 | static int init(AVFilterContext *ctx, const char *args){ EvalContext *eval = ctx->priv; char *args1 = av_strdup(args); char *expr, *buf, *bufptr; int ret, i; eval->class = &aevalsrc_class; av_opt_set_defaults(eval); /* parse expressions */ buf = args1; i = 0; while (expr = av_strtok(buf, ":", &bufptr)) { ret = av_expr_... |
1 | BlockAIOCB *bdrv_aio_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors, BlockCompletionFunc *cb, void *opaque){ Coroutine *co; BlockAIOCBCoroutine *acb; trace_bdrv_aio_discard(bs, sector_num, nb_sectors, opaque); acb = qemu_aio_get(&bdrv_em_co_aiocb_info, bs, cb, opaque); acb->need_bh = true; acb->req.er... |
1 | static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt){ TiffContext *const s = avctx->priv_data; AVFrame *const p = data; ThreadFrame frame = { .f = data }; unsigned off; int le, ret, plane, planes; int i, j, entries, stride; unsigned soff, ssize; uint8_t *dst; GetByteContext strips... |
1 | static int process_video_header_vp6(AVFormatContext *s){ EaDemuxContext *ea = s->priv_data; AVIOContext *pb = s->pb; avio_skip(pb, 8); ea->nb_frames = avio_rl32(pb); avio_skip(pb, 4); ea->time_base.den = avio_rl32(pb); ea->time_base.num = avio_rl32(pb); ea->video_codec = AV_CODEC_ID_VP6; return 1; |
1 | void cpu_reset (CPUCRISState *env){memset(env, 0, offsetof(CPUCRISState, breakpoints));tlb_flush(env, 1);env->pregs[PR_VR] = 32;#if defined(CONFIG_USER_ONLY)/* start in user mode with interrupts enabled. */env->pregs[PR_CCS] |= U_FLAG | I_FLAG;#elseenv->pregs[PR_CCS] = 0;#endif |
1 | static int coroutine_fn bdrv_co_do_readv(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov){ BlockDriver *drv = bs->drv; if (!drv) { return -ENOMEDIUM; } if (bdrv_check_request(bs, sector_num, nb_sectors)) { return -EIO; } /* throttling disk read I/O */ if (bs->io_limits_enabled) { bdrv_io_li... |
1 | av_cold static int auto_matrix(SwrContext *s){ int i, j, out_i; double matrix[NUM_NAMED_CHANNELS][NUM_NAMED_CHANNELS]={{0}}; int64_t unaccounted, in_ch_layout, out_ch_layout; double maxcoef=0; char buf[128]; const int matrix_encoding = s->matrix_encoding; float maxval; in_ch_layout = clean_layout(s, s->in_ch_layout); o... |
1 | void av_thread_message_queue_set_err_recv(AVThreadMessageQueue *mq, int err){#if HAVE_THREADS pthread_mutex_lock(&mq->lock); mq->err_recv = err; pthread_cond_broadcast(&mq->cond); pthread_mutex_unlock(&mq->lock);#endif /* HAVE_THREADS */} |
1 | static int local_renameat(FsContext *ctx, V9fsPath *olddir, const char *old_name, V9fsPath *newdir, const char *new_name){ int ret; int odirfd, ndirfd; odirfd = local_opendir_nofollow(ctx, olddir->data); if (odirfd == -1) { return -1; } ndirfd = local_opendir_nofollow(ctx, newdir->data); if (ndirfd == -1) { close_prese... |
1 | static bool blit_is_unsafe(struct CirrusVGAState *s){ /* should be the case, see cirrus_bitblt_start */ assert(s->cirrus_blt_width > 0); assert(s->cirrus_blt_height > 0); if (blit_region_is_unsafe(s, s->cirrus_blt_dstpitch, s->cirrus_blt_dstaddr & s->cirrus_addr_mask)) { if (blit_region_is_unsafe(s, s->cirrus_blt_srcpi... |
1 | static void update_error_limit(WavpackFrameContext *ctx){ int i, br[2], sl[2]; for (i = 0; i <= ctx->stereo_in; i++) { ctx->ch[i].bitrate_acc += ctx->ch[i].bitrate_delta; br[i] = ctx->ch[i].bitrate_acc >> 16; sl[i] = LEVEL_DECAY(ctx->ch[i].slow_level); } if (ctx->stereo_in && ctx->hybrid_bitrate) { int balance = (sl[1]... |
1 | static int do_token_setup(USBDevice *s, USBPacket *p){ int request, value, index; int ret = 0; if (p->len != 8) memcpy(s->setup_buf, p->data, 8); s->setup_len = (s->setup_buf[7] << 8) | s->setup_buf[6]; s->setup_index = 0; request = (s->setup_buf[0] << 8) | s->setup_buf[1]; value = (s->setup_buf[3] << 8) | s->setup_buf... |
1 | static int colo_packet_compare_common(Packet *ppkt, Packet *spkt, int offset){ if (trace_event_get_state(TRACE_COLO_COMPARE_MISCOMPARE)) { char pri_ip_src[20], pri_ip_dst[20], sec_ip_src[20], sec_ip_dst[20]; strcpy(pri_ip_src, inet_ntoa(ppkt->ip->ip_src)); strcpy(pri_ip_dst, inet_ntoa(ppkt->ip->ip_dst)); strcpy(sec_ip_... |
1 | static void nbd_coroutine_end(NbdClientSession *s, struct nbd_request *request){ int i = HANDLE_TO_INDEX(s, request->handle); s->recv_coroutine[i] = NULL; if (s->in_flight-- == MAX_NBD_REQUESTS) { qemu_co_mutex_unlock(&s->free_sema); }} |
1 | static char *read_splashfile(char *filename, int *file_sizep, int *file_typep){ GError *err = NULL; gboolean res; gchar *content; int file_type = -1; unsigned int filehead = 0; int bmp_bpp; res = g_file_get_contents(filename, &content, (gsize *)file_sizep, &err); if (res == FALSE) { error_report("failed to read splash ... |
1 | int av_bsf_list_parse_str(const char *str, AVBSFContext **bsf_lst){ AVBSFList *lst; char *bsf_str, *buf, *dup, *saveptr; int ret; if (!str) return av_bsf_get_null_filter(bsf_lst); lst = av_bsf_list_alloc(); if (!lst) return AVERROR(ENOMEM); if (!(dup = buf = av_strdup(str))) return AVERROR(ENOMEM); while (1) { bsf_str ... |
1 | static int decode_spectrum_and_dequant(AACContext * ac, float coef[1024], GetBitContext * gb, float sf[120], int pulse_present, const Pulse * pulse, const IndividualChannelStream * ics, enum BandType band_type[120]) { int i, k, g, idx = 0; const int c = 1024/ics->num_windows; const uint16_t * offsets = ics->swb_offset;... |
1 | struct pxa2xx_lcdc_s *pxa2xx_lcdc_init(target_phys_addr_t base, qemu_irq irq, DisplayState *ds){ int iomemtype; struct pxa2xx_lcdc_s *s; s = (struct pxa2xx_lcdc_s *) qemu_mallocz(sizeof(struct pxa2xx_lcdc_s)); s->base = base; s->invalidated = 1; s->irq = irq; s->ds = ds; pxa2xx_lcdc_orientation(s, graphic_rotate); iome... |
1 | static int stdio_get_fd(void *opaque){ QEMUFileStdio *s = opaque; return fileno(s->stdio_file);} |
1 | static inline void cris_fidx_d(unsigned int x){register unsigned int v asm("$r10") = x;asm ("fidxd\t[%0]\n" : : "r" (v) );} |
0 | void *av_malloc(size_t size){ void *ptr = NULL;#if CONFIG_MEMALIGN_HACK long diff;#endif /* let's disallow possible ambiguous cases */ if (size > (max_alloc_size - 32)) return NULL;#if CONFIG_MEMALIGN_HACK ptr = malloc(size + ALIGN); if (!ptr) return ptr; diff = ((~(long)ptr)&(ALIGN - 1)) + 1; ptr = (char *)ptr + diff;... |
0 | static int mov_write_audio_tag(AVIOContext *pb, MOVTrack *track){ int64_t pos = avio_tell(pb); int version = 0; uint32_t tag = track->tag; if (track->mode == MODE_MOV) { if (track->timescale > UINT16_MAX) { if (mov_get_lpcm_flags(track->enc->codec_id)) tag = AV_RL32("lpcm"); version = 2; } else if (track->audio_vbr || ... |
0 | static int metadata_parse(FLACContext *s){ int i, metadata_last, metadata_type, metadata_size; int initial_pos= get_bits_count(&s->gb); if (show_bits_long(&s->gb, 32) == MKBETAG('f','L','a','C')) { skip_bits_long(&s->gb, 32); do { metadata_last = get_bits1(&s->gb); metadata_type = get_bits(&s->gb, 7); metadata_size = g... |
1 | static int coroutine_fn v9fs_complete_rename(V9fsPDU *pdu, V9fsFidState *fidp, int32_t newdirfid, V9fsString *name){ char *end; int err = 0; V9fsPath new_path; V9fsFidState *tfidp; V9fsState *s = pdu->s; V9fsFidState *dirfidp = NULL; char *old_name, *new_name; v9fs_path_init(&new_path); if (newdirfid != -1) { dirfidp =... |
1 | static av_cold int alac_decode_close(AVCodecContext *avctx){ ALACContext *alac = avctx->priv_data; int chan; for (chan = 0; chan < alac->numchannels; chan++) { av_freep(&alac->predicterror_buffer[chan]); av_freep(&alac->outputsamples_buffer[chan]); av_freep(&alac->wasted_bits_buffer[chan]); } return 0;} |
1 | void OPPROTO op_fdiv_ST0_FT0(void){ ST0 /= FT0;} |
1 | static void ipmi_sim_handle_command(IPMIBmc *b, uint8_t *cmd, unsigned int cmd_len, unsigned int max_cmd_len, uint8_t msg_id){ IPMIBmcSim *ibs = IPMI_BMC_SIMULATOR(b); IPMIInterface *s = ibs->parent.intf; IPMIInterfaceClass *k = IPMI_INTERFACE_GET_CLASS(s); unsigned int netfn; uint8_t rsp[MAX_IPMI_MSG_SIZE]; unsigned i... |
1 | void OPPROTO op_divw (void){ if (unlikely(((int32_t)T0 == INT32_MIN && (int32_t)T1 == -1) || (int32_t)T1 == 0)) { T0 = (int32_t)((-1) * ((uint32_t)T0 >> 31)); } else { T0 = (int32_t)T0 / (int32_t)T1; } RETURN();} |
1 | static void qed_read_backing_file(BDRVQEDState *s, uint64_t pos, QEMUIOVector *qiov, BlockDriverCompletionFunc *cb, void *opaque){ uint64_t backing_length = 0; size_t size; /* If there is a backing file, get its length. Treat the absence of a * backing file like a zero length backing file. */ if (s->bs->backing_hd) { i... |
1 | int av_parse_cpu_caps(unsigned *flags, const char *s){ static const AVOption cpuflags_opts[] = { { "flags" , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, INT64_MAX, .unit = "flags" },#if ARCH_PPC { "altivec" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_ALTIVEC }, .unit = "flags" },#elif ARCH_X86 { "mmx" ,... |
1 | static int nbd_handle_reply_err(QIOChannel *ioc, nbd_opt_reply *reply, Error **errp){ char *msg = NULL; int result = -1; if (!(reply->type & (1 << 31))) { return 1; } if (reply->length) { if (reply->length > NBD_MAX_BUFFER_SIZE) { error_setg(errp, "server error 0x%" PRIx32 " (%s) message is too long", reply->type, nbd_... |
1 | static int check_refcounts_l1(BlockDriverState *bs, BdrvCheckResult *res, uint16_t *refcount_table, int refcount_table_size, int64_t l1_table_offset, int l1_size, int flags){ BDRVQcowState *s = bs->opaque; uint64_t *l1_table, l2_offset, l1_size2; int i, ret; l1_size2 = l1_size * sizeof(uint64_t); /* Mark L1 table as us... |
1 | static inline int mpeg2_decode_block_non_intra(MpegEncContext *s, int16_t *block, int n){ int level, i, j, run; RLTable *rl = &ff_rl_mpeg1; uint8_t * const scantable = s->intra_scantable.permutated; const uint16_t *quant_matrix; const int qscale = s->qscale; int mismatch; mismatch = 1; { OPEN_READER(re, &s->gb); i = -1... |
1 | static void channel_out_run(struct fs_dma_ctrl *ctrl, int c){uint32_t len;uint32_t saved_data_buf;unsigned char buf[2 * 1024];if (ctrl->channels[c].eol == 1)return;saved_data_buf = channel_reg(ctrl, c, RW_SAVED_DATA_BUF);D(fprintf(logfile, "ch=%d buf=%x after=%x saved_data_buf=%x\n", c, (uint32_t)ctrl->channels[c].curr... |
1 | static int dvbsub_parse_region_segment(AVCodecContext *avctx, const uint8_t *buf, int buf_size){ DVBSubContext *ctx = avctx->priv_data; const uint8_t *buf_end = buf + buf_size; int region_id, object_id; int av_unused version; DVBSubRegion *region; DVBSubObject *object; DVBSubObjectDisplay *display; int fill; int ret; i... |
1 | static void x86_cpu_parse_featurestr(CPUState *cs, char *features, Error **errp){ X86CPU *cpu = X86_CPU(cs); char *featurestr; /* Single 'key=value" string being parsed */ /* Features to be added */ FeatureWordArray plus_features = { 0 }; /* Features to be removed */ FeatureWordArray minus_features = { 0 }; uint32_t nu... |
1 | static int flashsv_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt){ int buf_size = avpkt->size; FlashSVContext *s = avctx->priv_data; int h_blocks, v_blocks, h_part, v_part, i, j; GetBitContext gb; /* no supplementary picture */ if (buf_size == 0) return 0; if (buf_size < 4) return -1; ... |
1 | static void setup_window(AVFormatContext *s){ XCBGrabContext *c = s->priv_data; uint32_t mask = XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK; uint32_t values[] = { 1, XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_STRUCTURE_NOTIFY }; xcb_rectangle_t rect = { 0, 0, c->width, c->height }; c->window = xcb_generate_id(c->conn); ... |
1 | static inline void RENAME(rgb16to15)(const uint8_t *src, uint8_t *dst, int src_size){ register const uint8_t* s=src; register uint8_t* d=dst; register const uint8_t *end; const uint8_t *mm_end; end = s + src_size; __asm__ volatile(PREFETCH" %0"::"m"(*s)); __asm__ volatile("movq %0, %%mm7"::"m"(mask15rg)); __asm__ volat... |
1 | void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst, const int dst_pitch, const int num_bands){ int x, y, indx; int32_t p0, p1, p2, p3, tmp0, tmp1, tmp2; int32_t b0_1, b0_2, b1_1, b1_2, b1_3, b2_1, b2_2, b2_3, b2_4, b2_5, b2_6; int32_t b3_1, b3_2, b3_3, b3_4, b3_5, b3_6, b3_7, b3_8, b3_9; int32_t pitch, bac... |
1 | void select_soundhw(const char *optarg){ struct soundhw *c; if (*optarg == '?') { show_valid_cards: printf("Valid sound card names (comma separated):\n"); for (c = soundhw; c->name; ++c) { printf ("%-11s %s\n", c->name, c->descr); } printf("\n-soundhw all will enable all of the above\n"); exit(*optarg != '?'); } else {... |
1 | int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush){ AVPacketList *pktl; int stream_count=0, noninterleaved_count=0; int64_t delta_dts_max = 0; int i; if(pkt){ ff_interleave_add_packet(s, pkt, ff_interleave_compare_dts); } for(i=0; i < s->nb_streams; i++) { if (s->streams[i]->l... |
0 | static int read_header(AVFormatContext *s){ WtvContext *wtv = s->priv_data; int root_sector, root_size; uint8_t root[WTV_SECTOR_SIZE]; AVIOContext *pb; int64_t timeline_pos; int64_t ret; wtv->epoch = wtv->pts = wtv->last_valid_pts = AV_NOPTS_VALUE; /* read root directory sector */ avio_skip(s->pb, 0x30); root_size = av... |
0 | SwsVector *sws_getGaussianVec(double variance, double quality){ const int length = (int)(variance * quality + 0.5) | 1; int i; double middle = (length - 1) * 0.5; SwsVector *vec = sws_allocVec(length); if (!vec) return NULL; for (i = 0; i < length; i++) { double dist = i - middle; vec->coeff[i] = exp(-dist * dist / (2 ... |
0 | static void h261_h_loop_filter_c(uint8_t *dest,uint8_t *src, int stride){ int i,j,xy,yz; int res; for(i=1; i<7; i++){ for(j=0; j<8; j++){ xy = j * stride + i; yz = j * 8 + i; res = (int)src[yz-1] + ((int)(src[yz]) *2) + (int)src[yz+1]; res+=2; res>>=2; dest[xy] = (uint8_t)res; } }} |
1 | PcGuestInfo *pc_guest_info_init(ram_addr_t below_4g_mem_size, ram_addr_t above_4g_mem_size){ PcGuestInfoState *guest_info_state = g_malloc0(sizeof *guest_info_state); PcGuestInfo *guest_info = &guest_info_state->info; guest_info->pci_info.w32.end = IO_APIC_DEFAULT_ADDRESS; if (sizeof(hwaddr) == 4) { guest_info->pci_inf... |
1 | static void escaped_string(void){ int i; struct { const char *encoded; const char *decoded; int skip; } test_cases[] = { { "\"\\b\"", "\b" }, { "\"\\f\"", "\f" }, { "\"\\n\"", "\n" }, { "\"\\r\"", "\r" }, { "\"\\t\"", "\t" }, { "\"/\"", "/" }, { "\"\\/\"", "/", .skip = 1 }, { "\"\\\\\"", "\\" }, { "\"\\\"\"", "\"" }, {... |
1 | ogg_read_header (AVFormatContext * s, AVFormatParameters * ap){ struct ogg *ogg = s->priv_data; ogg->curidx = -1; //linear headers seek from start if (ogg_get_headers (s) < 0){ return -1; } //linear granulepos seek from end ogg_get_length (s); //fill the extradata in the per codec callbacks return 0;} |
1 | static void print_net_client(Monitor *mon, VLANClientState *vc){ monitor_printf(mon, "%s: type=%s,%s\n", vc->name, net_client_types[vc->info->type].type, vc->info_str);} |
1 | static int apng_read_close(AVFormatContext *s){ APNGDemuxContext *ctx = s->priv_data; av_freep(&ctx->extra_data); ctx->extra_data_size = 0; return 0;} |
1 | static void br(DisasContext *dc, uint32_t code, uint32_t flags){ I_TYPE(instr, code); gen_goto_tb(dc, 0, dc->pc + 4 + (instr.imm16s & -4)); dc->is_jmp = DISAS_TB_JUMP;} |
1 | static int dnxhd_write_header(AVCodecContext *avctx, uint8_t *buf){ DNXHDEncContext *ctx = avctx->priv_data; const uint8_t header_prefix[5] = { 0x00,0x00,0x02,0x80,0x01 }; memcpy(buf, header_prefix, 5); buf[5] = ctx->interlaced ? ctx->cur_field+2 : 0x01; buf[6] = 0x80; // crc flag off buf[7] = 0xa0; // reserved AV_WB16... |
1 | static int slirp_smb(SlirpState* s, const char *exported_dir, struct in_addr vserver_addr){ static int instance; char smb_conf[128]; char smb_cmdline[128]; FILE *f; snprintf(s->smb_dir, sizeof(s->smb_dir), "/tmp/qemu-smb.%ld-%d", (long)getpid(), instance++); if (mkdir(s->smb_dir, 0700) < 0) { error_report("could not cr... |
1 | static int write_memory(DumpState *s, RAMBlock *block, ram_addr_t start, int64_t size){ int64_t i; int ret; for (i = 0; i < size / TARGET_PAGE_SIZE; i++) { ret = write_data(s, block->host + start + i * TARGET_PAGE_SIZE, TARGET_PAGE_SIZE); if (ret < 0) { return ret; } } if ((size % TARGET_PAGE_SIZE) != 0) { ret = write_... |
1 | static int rtmp_handshake(URLContext *s, RTMPContext *rt){ AVLFG rnd; uint8_t tosend [RTMP_HANDSHAKE_PACKET_SIZE+1] = { 3, // unencrypted data 0, 0, 0, 0, // client uptime RTMP_CLIENT_VER1, RTMP_CLIENT_VER2, RTMP_CLIENT_VER3, RTMP_CLIENT_VER4, }; uint8_t clientdata[RTMP_HANDSHAKE_PACKET_SIZE]; uint8_t serverdata[RTMP_H... |
1 | static int qemu_rdma_reg_control(RDMAContext *rdma, int idx){ rdma->wr_data[idx].control_mr = ibv_reg_mr(rdma->pd, rdma->wr_data[idx].control, RDMA_CONTROL_MAX_BUFFER, IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_WRITE); if (rdma->wr_data[idx].control_mr) { rdma->total_registrations++; return 0; } fprintf(stderr, "qemu_r... |
1 | static hwaddr ppc_hash64_pteg_search(PowerPCCPU *cpu, hwaddr hash, ppc_slb_t *slb, bool secondary, target_ulong ptem, ppc_hash_pte64_t *pte){ CPUPPCState *env = &cpu->env; int i; uint64_t token; target_ulong pte0, pte1; target_ulong pte_index; pte_index = (hash & env->htab_mask) * HPTES_PER_GROUP; token = ppc_hash64_st... |
1 | static int vmdk_write_extent(VmdkExtent *extent, int64_t cluster_offset, int64_t offset_in_cluster, const uint8_t *buf, int nb_sectors, int64_t sector_num){ int ret; VmdkGrainMarker *data = NULL; uLongf buf_len; const uint8_t *write_buf = buf; int write_len = nb_sectors * 512; if (extent->compressed) { if (!extent->has... |
0 | int ff_scale_eval_dimensions(void *log_ctx, const char *w_expr, const char *h_expr, AVFilterLink *inlink, AVFilterLink *outlink, int *ret_w, int *ret_h){ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format); const AVPixFmtDescriptor *out_desc = av_pix_fmt_desc_get(outlink->format); const char *expr; int... |
0 | static int adpcm_decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size){ ADPCMContext *c = avctx->priv_data; ADPCMChannelStatus *cs; int n, m, channel, i; int block_predictor[2]; short *samples; short *samples_end; const uint8_t *src; int st; /* stereo */ /* DK3 ADPCM accounti... |
1 | int tap_win32_init(VLANState *vlan, const char *model, const char *name, const char *ifname){ TAPState *s; s = qemu_mallocz(sizeof(TAPState)); if (!s) return -1; if (tap_win32_open(&s->handle, ifname) < 0) { printf("tap: Could not open '%s'\n", ifname); return -1; } s->vc = qemu_new_vlan_client(vlan, model, name, tap_r... |
1 | static int parse_netdev(DeviceState *dev, const char *str, void **ptr){ NICPeers *peers_ptr = (NICPeers *)ptr; NICConf *conf = container_of(peers_ptr, NICConf, peers); NetClientState **ncs = peers_ptr->ncs; NetClientState *peers[MAX_QUEUE_NUM]; int queues, i = 0; int ret; queues = qemu_find_net_clients_except(str, peer... |
1 | static void property_get_str(Object *obj, Visitor *v, void *opaque, const char *name, Error **errp){ StringProperty *prop = opaque; char *value; value = prop->get(obj, errp); if (value) { visit_type_str(v, &value, name, errp); g_free(value); }} |
1 | static void setup_frame(int sig, struct target_sigaction *ka, target_sigset_t *set, CPUCRISState *env){struct target_signal_frame *frame;abi_ulong frame_addr;int err = 0;int i;frame_addr = get_sigframe(env, sizeof *frame);if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 0))goto badframe;/* * The CRIS signal retur... |
1 | static int filter_frame(AVFilterLink *link, AVFrame *in){ AVFilterContext *ctx = link->dst; AVFilterLink *outlink = ctx->outputs[0]; ColorSpaceContext *s = ctx->priv; // FIXME if yuv2yuv_passthrough, don't get a new buffer but use the // input one if it is writable *OR* the actual literal values of in_* // and out_* ar... |
1 | static struct glfs *qemu_gluster_glfs_init(BlockdevOptionsGluster *gconf, Error **errp){ struct glfs *glfs; int ret; int old_errno; GlusterServerList *server; glfs = glfs_new(gconf->volume); if (!glfs) { goto out; } for (server = gconf->server; server; server = server->next) { if (server->value->type == GLUSTER_TRANSPO... |
1 | void virtio_queue_set_notification(VirtQueue *vq, int enable){ vq->notification = enable; if (vq->vdev->guest_features & (1 << VIRTIO_RING_F_EVENT_IDX)) { vring_avail_event(vq, vring_avail_idx(vq)); } else if (enable) { vring_used_flags_unset_bit(vq, VRING_USED_F_NO_NOTIFY); } else { vring_used_flags_set_bit(vq, VRING_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.