label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
1 | void qemu_spice_destroy_host_primary(SimpleSpiceDisplay *ssd) { dprint(1, "%s:\n", __FUNCTION__); qemu_mutex_unlock_iothread(); ssd->worker->destroy_primary_surface(ssd->worker, 0); qemu_mutex_lock_iothread(); } | 13,470 |
1 | static void copy_context_reset(AVCodecContext *avctx) { av_opt_free(avctx); av_freep(&avctx->rc_override); av_freep(&avctx->intra_matrix); av_freep(&avctx->inter_matrix); av_freep(&avctx->extradata); av_freep(&avctx->subtitle_header); av_buffer_unref(&avctx->hw_frames_ctx); avctx->subtitle_header_size = 0; avctx->extra... | 13,471 |
1 | int ff_audio_mix_init(AVAudioResampleContext *avr) { int ret; if (avr->internal_sample_fmt != AV_SAMPLE_FMT_S16P && avr->internal_sample_fmt != AV_SAMPLE_FMT_FLTP) { av_log(avr, AV_LOG_ERROR, "Unsupported internal format for " "mixing: %s\n", av_get_sample_fmt_name(avr->internal_sample_fmt)); return AVERROR(EINVAL); } ... | 13,472 |
1 | static inline void RENAME(rgb16ToY)(uint8_t *dst, uint8_t *src, int width) { int i; for(i=0; i<width; i++) { int d= ((uint16_t*)src)[i]; int r= d&0x1F; int g= (d>>5)&0x3F; int b= (d>>11)&0x1F; dst[i]= ((2*RY*r + GY*g + 2*BY*b)>>(RGB2YUV_SHIFT-2)) + 16; } } | 13,473 |
1 | static void aux_slave_dev_print(Monitor *mon, DeviceState *dev, int indent) { AUXBus *bus = AUX_BUS(qdev_get_parent_bus(dev)); AUXSlave *s; /* Don't print anything if the device is I2C "bridge". */ if (aux_bus_is_bridge(bus, dev)) { return; } s = AUX_SLAVE(dev); monitor_printf(mon, "%*smemory " TARGET_FMT_plx "/" TARGE... | 13,474 |
1 | void palette8tobgr16(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette) { unsigned i; for(i=0; i<num_pixels; i++) ((uint16_t *)dst)[i] = bswap_16(((uint16_t *)palette)[ src[i] ]); } | 13,475 |
0 | static int vda_h264_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) { VDAContext *vda = avctx->internal->hwaccel_priv_data; struct vda_context *vda_ctx = avctx->hwaccel_context; void *tmp; if (!vda_ctx->decoder) return -1; tmp = av_fast_realloc(vda->bitstream, &vda->allocated_size, vda->bitstr... | 13,476 |
0 | static void print_tag(const char *str, unsigned int tag, int size) { dprintf(NULL, "%s: tag=%c%c%c%c size=0x%x\n", str, tag & 0xff, (tag >> 8) & 0xff, (tag >> 16) & 0xff, (tag >> 24) & 0xff, size); } | 13,477 |
0 | static void h264_loop_filter_strength_mmx2( int16_t bS[2][4][4], uint8_t nnz[40], int8_t ref[2][40], int16_t mv[2][40][2], int bidir, int edges, int step, int mask_mv0, int mask_mv1, int field ) { __asm__ volatile( "movq %0, %%mm7 \n" "movq %1, %%mm6 \n" ::"m"(ff_pb_1), "m"(ff_pb_3) ); if(field) __asm__ volatile( "movq... | 13,478 |
1 | void float_to_int16_vfp(int16_t *dst, const float *src, int len) { asm volatile( "fldmias %[src]!, {s16-s23}\n\t" "ftosis s0, s16\n\t" "ftosis s1, s17\n\t" "ftosis s2, s18\n\t" "ftosis s3, s19\n\t" "ftosis s4, s20\n\t" "ftosis s5, s21\n\t" "ftosis s6, s22\n\t" "ftosis s7, s23\n\t" "1:\n\t" "subs %[len], %[len], #8\n\t"... | 13,479 |
1 | int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src) { dst->pts = src->pts; dst->pos = av_frame_get_pkt_pos(src); dst->format = src->format; switch (dst->type) { case AVMEDIA_TYPE_VIDEO: dst->video->w = src->width; dst->video->h = src->height; dst->video->sample_aspect_ratio = src->sample_aspect_ra... | 13,480 |
1 | void coroutine_fn qemu_coroutine_yield(void) { Coroutine *self = qemu_coroutine_self(); Coroutine *to = self->caller; trace_qemu_coroutine_yield(self, to); if (!to) { fprintf(stderr, "Co-routine is yielding to no one\n"); abort(); } self->caller = NULL; coroutine_swap(self, to); } | 13,481 |
1 | int ff_probe_input_buffer(ByteIOContext **pb, AVInputFormat **fmt, const char *filename, void *logctx, unsigned int offset, unsigned int max_probe_size) { AVProbeData pd = { filename ? filename : "", NULL, -offset }; unsigned char *buf = NULL; int probe_size; if (!max_probe_size) { max_probe_size = PROBE_BUF_MAX; } els... | 13,482 |
1 | void hmp_sendkey(Monitor *mon, const QDict *qdict) { const char *keys = qdict_get_str(qdict, "keys"); KeyValueList *keylist, *head = NULL, *tmp = NULL; int has_hold_time = qdict_haskey(qdict, "hold-time"); int hold_time = qdict_get_try_int(qdict, "hold-time", -1); Error *err = NULL; char keyname_buf[16]; char *separato... | 13,484 |
1 | static void s390_cpu_class_init(ObjectClass *oc, void *data) { S390CPUClass *scc = S390_CPU_CLASS(oc); CPUClass *cc = CPU_CLASS(scc); DeviceClass *dc = DEVICE_CLASS(oc); scc->parent_realize = dc->realize; dc->realize = s390_cpu_realizefn; scc->parent_reset = cc->reset; cc->reset = s390_cpu_reset; cc->do_interrupt = s39... | 13,485 |
1 | static void hpet_device_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); dc->realize = hpet_realize; dc->reset = hpet_reset; dc->vmsd = &vmstate_hpet; dc->props = hpet_device_properties; } | 13,486 |
1 | static void vp8_filter_mb_row(AVCodecContext *avctx, void *tdata, int jobnr, int threadnr) { VP8Context *s = avctx->priv_data; VP8ThreadData *td = &s->thread_data[threadnr]; int mb_x, mb_y = td->thread_mb_pos >> 16, num_jobs = s->num_jobs; AVFrame *curframe = s->curframe->tf.f; VP8Macroblock *mb; VP8ThreadData *prev_td... | 13,487 |
0 | static int cllc_decode_frame(AVCodecContext *avctx, void *data, int *got_picture_ptr, AVPacket *avpkt) { CLLCContext *ctx = avctx->priv_data; AVFrame *pic = data; uint8_t *src = avpkt->data; uint32_t info_tag, info_offset; int data_size; GetBitContext gb; int coding_type, ret; /* Skip the INFO header if present */ info... | 13,489 |
0 | static void test_event_c(TestEventData *data, const void *unused) { QDict *d, *d_data, *d_b; UserDefOne b; UserDefZero z; z.integer = 2; b.base = &z; b.string = g_strdup("test1"); b.has_enum1 = false; d_b = qdict_new(); qdict_put(d_b, "integer", qint_from_int(2)); qdict_put(d_b, "string", qstring_from_str("test1")); d_... | 13,490 |
0 | static void enable_logging(void) { ga_enable_logging(ga_state); } | 13,491 |
0 | static void h264_v_loop_filter_luma_c(uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0) { h264_loop_filter_luma_c(pix, stride, 1, alpha, beta, tc0); } | 13,492 |
0 | static void qemu_aio_wait_nonblocking(void) { qemu_notify_event(); qemu_aio_wait(); } | 13,493 |
0 | void qmp_block_job_set_speed(const char *device, int64_t value, Error **errp) { BlockJob *job = find_block_job(device); if (!job) { error_set(errp, QERR_DEVICE_NOT_ACTIVE, device); return; } if (block_job_set_speed(job, value) < 0) { error_set(errp, QERR_NOT_SUPPORTED); } } | 13,495 |
0 | int virtqueue_pop(VirtQueue *vq, VirtQueueElement *elem) { unsigned int i, head, max; hwaddr desc_pa = vq->vring.desc; VirtIODevice *vdev = vq->vdev; 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->vri... | 13,496 |
0 | void qemu_main_loop_start(void) { qemu_system_ready = 1; qemu_cond_broadcast(&qemu_system_cond); } | 13,497 |
0 | static void spr_read_tbl (DisasContext *ctx, int gprn, int sprn) { if (use_icount) { gen_io_start(); } gen_helper_load_tbl(cpu_gpr[gprn], cpu_env); if (use_icount) { gen_io_end(); gen_stop_exception(ctx); } } | 13,498 |
0 | static void arm_cpu_initfn(Object *obj) { CPUState *cs = CPU(obj); ARMCPU *cpu = ARM_CPU(obj); static bool inited; cs->env_ptr = &cpu->env; cpu_exec_init(&cpu->env); cpu->cp_regs = g_hash_table_new_full(g_int_hash, g_int_equal, g_free, g_free); #ifndef CONFIG_USER_ONLY /* Our inbound IRQ and FIQ lines */ if (kvm_enable... | 13,500 |
0 | uint32_t ide_status_read(void *opaque, uint32_t addr) { IDEBus *bus = opaque; IDEState *s = idebus_active_if(bus); int ret; if ((!bus->ifs[0].bs && !bus->ifs[1].bs) || (s != bus->ifs && !s->bs)) ret = 0; else ret = s->status; #ifdef DEBUG_IDE printf("ide: read status addr=0x%x val=%02x\n", addr, ret); #endif return ret... | 13,501 |
0 | static int net_slirp_init(Monitor *mon, VLANState *vlan, const char *model, const char *name, int restricted, const char *vnetwork, const char *vhost, const char *vhostname, const char *tftp_export, const char *bootfile, const char *vdhcp_start, const char *vnameserver, const char *smb_export, const char *vsmbserver) {... | 13,502 |
0 | int av_opt_set_pixel_fmt(void *obj, const char *name, enum AVPixelFormat fmt, int search_flags) { return set_format(obj, name, fmt, search_flags, AV_OPT_TYPE_PIXEL_FMT, "pixel", AV_PIX_FMT_NB-1); } | 13,503 |
0 | static void eval_cond_jmp(DisasContext *dc, TCGv pc_true, TCGv pc_false) { int l1; l1 = gen_new_label(); /* Conditional jmp. */ tcg_gen_mov_tl(cpu_SR[SR_PC], pc_false); tcg_gen_brcondi_tl(TCG_COND_EQ, env_btaken, 0, l1); tcg_gen_mov_tl(cpu_SR[SR_PC], pc_true); gen_set_label(l1); } | 13,505 |
0 | void parse_numa_opts(MachineState *ms) { int i; const CPUArchIdList *possible_cpus; MachineClass *mc = MACHINE_GET_CLASS(ms); for (i = 0; i < MAX_NODES; i++) { numa_info[i].node_cpu = bitmap_new(max_cpus); } if (qemu_opts_foreach(qemu_find_opts("numa"), parse_numa, ms, NULL)) { exit(1); } assert(max_numa_nodeid <= MAX_... | 13,506 |
0 | void tcg_dump_ops(TCGContext *s) { char buf[128]; TCGOp *op; int oi; for (oi = s->gen_first_op_idx; oi >= 0; oi = op->next) { int i, k, nb_oargs, nb_iargs, nb_cargs; const TCGOpDef *def; const TCGArg *args; TCGOpcode c; op = &s->gen_op_buf[oi]; c = op->opc; def = &tcg_op_defs[c]; args = &s->gen_opparam_buf[op->args]; i... | 13,507 |
0 | static void spapr_cpu_init(sPAPRMachineState *spapr, PowerPCCPU *cpu, Error **errp) { CPUPPCState *env = &cpu->env; /* Set time-base frequency to 512 MHz */ cpu_ppc_tb_init(env, SPAPR_TIMEBASE_FREQ); /* Enable PAPR mode in TCG or KVM */ cpu_ppc_set_papr(cpu, PPC_VIRTUAL_HYPERVISOR(spapr)); if (spapr->max_compat_pvr) { ... | 13,508 |
0 | uint32_t HELPER(lcdbr)(CPUS390XState *env, uint32_t f1, uint32_t f2) { env->fregs[f1].d = float64_chs(env->fregs[f2].d); return set_cc_nz_f64(env->fregs[f1].d); } | 13,509 |
0 | static int no_run_out (HWVoiceOut *hw, int live) { NoVoiceOut *no = (NoVoiceOut *) hw; int decr, samples; int64_t now; int64_t ticks; int64_t bytes; now = qemu_get_clock (vm_clock); ticks = now - no->old_ticks; bytes = muldiv64 (ticks, hw->info.bytes_per_second, get_ticks_per_sec ()); bytes = audio_MIN (bytes, INT_MAX)... | 13,510 |
0 | void do_interrupt(int intno, int is_int, int error_code, unsigned int next_eip, int is_hw) { #ifdef DEBUG_PCALL if (loglevel) { static int count; fprintf(logfile, "%d: interrupt: vector=%02x error_code=%04x int=%d\n", count, intno, error_code, is_int); cpu_x86_dump_state(env, logfile, X86_DUMP_CCOP); #if 0 { int i; uin... | 13,511 |
0 | static void coroutine_fn wait_for_overlapping_requests(BlockDriverState *bs, int64_t offset, unsigned int bytes) { BdrvTrackedRequest *req; int64_t cluster_offset; unsigned int cluster_bytes; bool retry; /* If we touch the same cluster it counts as an overlap. This guarantees * that allocating writes will be serialized... | 13,512 |
0 | static int parse_source_parameters(AVCodecContext *avctx, GetBitContext *gb, dirac_source_params *source) { AVRational frame_rate = {0,0}; unsigned luma_depth = 8, luma_offset = 16; int idx; int chroma_x_shift, chroma_y_shift; /* [DIRAC_STD] 10.3.2 Frame size. frame_size(video_params) */ /* [DIRAC_STD] custom_dimension... | 13,514 |
0 | static void grlib_gptimer_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size) { GPTimerUnit *unit = opaque; target_phys_addr_t timer_addr; int id; addr &= 0xff; /* Unit registers */ switch (addr) { case SCALER_OFFSET: value &= 0xFFFF; /* clean up the value */ unit->scaler = value; trace_grlib_gp... | 13,516 |
0 | static bool cmd_write_multiple(IDEState *s, uint8_t cmd) { bool lba48 = (cmd == WIN_MULTWRITE_EXT); int n; if (!s->bs || !s->mult_sectors) { ide_abort_command(s); return true; } ide_cmd_lba48_transform(s, lba48); s->req_nb_sectors = s->mult_sectors; n = MIN(s->nsector, s->req_nb_sectors); s->status = SEEK_STAT | READY_... | 13,518 |
0 | static int pxb_map_irq_fn(PCIDevice *pci_dev, int pin) { PCIDevice *pxb = pci_dev->bus->parent_dev; /* * The bios does not index the pxb slot number when * it computes the IRQ because it resides on bus 0 * and not on the current bus. * However QEMU routes the irq through bus 0 and adds * the pxb slot to the IRQ computa... | 13,519 |
0 | static int flac_read_header(AVFormatContext *s, AVFormatParameters *ap) { int ret, metadata_last=0, metadata_type, metadata_size, found_streaminfo=0; uint8_t header[4]; uint8_t *buffer=NULL; AVStream *st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->cod... | 13,520 |
0 | static void vc1_loop_filter(uint8_t* src, int step, int stride, int len, int pq) { int i; int filt3; for(i = 0; i < len; i += 4){ filt3 = vc1_filter_line(src + 2*step, stride, pq); if(filt3){ vc1_filter_line(src + 0*step, stride, pq); vc1_filter_line(src + 1*step, stride, pq); vc1_filter_line(src + 3*step, stride, pq);... | 13,522 |
0 | static av_cold int nvenc_open_session(AVCodecContext *avctx) { NvencContext *ctx = avctx->priv_data; NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs; NV_ENCODE_API_FUNCTION_LIST *p_nvenc = &dl_fn->nvenc_funcs; NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS encode_session_params = { 0 }; NVENCSTATUS nv_status; encode_sessi... | 13,523 |
0 | static int parse_playlist(HLSContext *c, const char *url, struct variant *var, AVIOContext *in) { int ret = 0, is_segment = 0, is_variant = 0, bandwidth = 0; int64_t duration = 0; enum KeyType key_type = KEY_NONE; uint8_t iv[16] = ""; int has_iv = 0; char key[MAX_URL_SIZE] = ""; char line[1024]; const char *ptr; int cl... | 13,525 |
1 | static int decode_mb_i(AVSContext *h, int cbp_code) { GetBitContext *gb = &h->s.gb; int block, pred_mode_uv; uint8_t top[18]; uint8_t *left = NULL; uint8_t *d; ff_cavs_init_mb(h); /* get intra prediction modes from stream */ for(block=0;block<4;block++) { int nA,nB,predpred; int pos = ff_cavs_scan3x3[block]; nA = h->pr... | 13,526 |
1 | static void test_visitor_in_alternate(TestInputVisitorData *data, const void *unused) { Visitor *v; Error *err = NULL; UserDefAlternate *tmp; v = visitor_input_test_init(data, "42"); visit_type_UserDefAlternate(v, &tmp, NULL, &error_abort); g_assert_cmpint(tmp->type, ==, USER_DEF_ALTERNATE_KIND_I); g_assert_cmpint(tmp-... | 13,527 |
1 | void qht_statistics_init(struct qht *ht, struct qht_stats *stats) { struct qht_map *map; int i; map = atomic_rcu_read(&ht->map); stats->head_buckets = map->n_buckets; stats->used_head_buckets = 0; stats->entries = 0; qdist_init(&stats->chain); qdist_init(&stats->occupancy); for (i = 0; i < map->n_buckets; i++) { struct... | 13,528 |
1 | void qemu_system_vmstop_request(RunState state) { vmstop_requested = state; qemu_notify_event(); } | 13,530 |
1 | static int decode_bmv_frame(const uint8_t *source, int src_len, uint8_t *frame, int frame_off) { unsigned val, saved_val = 0; int tmplen = src_len; const uint8_t *src, *source_end = source + src_len; uint8_t *frame_end = frame + SCREEN_WIDE * SCREEN_HIGH; uint8_t *dst, *dst_end; int len, mask; int forward = (frame_off ... | 13,531 |
1 | static size_t save_page_header(RAMState *rs, RAMBlock *block, ram_addr_t offset) { size_t size, len; if (block == rs->last_sent_block) { offset |= RAM_SAVE_FLAG_CONTINUE; } qemu_put_be64(rs->f, offset); size = 8; if (!(offset & RAM_SAVE_FLAG_CONTINUE)) { len = strlen(block->idstr); qemu_put_byte(rs->f, len); qemu_put_b... | 13,532 |
1 | static void ebus_mmio_mapfunc(PCIDevice *pci_dev, int region_num, pcibus_t addr, pcibus_t size, int type) { EBUS_DPRINTF("Mapping region %d registers at %" FMT_PCIBUS "\n", region_num, addr); switch (region_num) { case 0: isa_mmio_init(addr, 0x1000000); break; case 1: isa_mmio_init(addr, 0x800000); break; } } | 13,533 |
1 | int ff_wma_end(AVCodecContext *avctx) { WMACodecContext *s = avctx->priv_data; int i; for(i = 0; i < s->nb_block_sizes; i++) ff_mdct_end(&s->mdct_ctx[i]); for(i = 0; i < s->nb_block_sizes; i++) av_free(s->windows[i]); if (s->use_exp_vlc) { free_vlc(&s->exp_vlc); } if (s->use_noise_coding) { free_vlc(&s->hgain_vlc); } f... | 13,534 |
1 | int ff_h264_ref_picture(H264Context *h, H264Picture *dst, H264Picture *src) { int ret, i; av_assert0(!dst->f->buf[0]); av_assert0(src->f->buf[0]); av_assert0(src->tf.f == src->f); dst->tf.f = dst->f; ret = ff_thread_ref_frame(&dst->tf, &src->tf); if (ret < 0) goto fail; dst->qscale_table_buf = av_buffer_ref(src->qscale... | 13,535 |
1 | static void arm926_initfn(Object *obj) { ARMCPU *cpu = ARM_CPU(obj); cpu->dtb_compatible = "arm,arm926"; set_feature(&cpu->env, ARM_FEATURE_V5); set_feature(&cpu->env, ARM_FEATURE_VFP); set_feature(&cpu->env, ARM_FEATURE_DUMMY_C15_REGS); set_feature(&cpu->env, ARM_FEATURE_CACHE_TEST_CLEAN); cpu->midr = 0x41069265; cpu-... | 13,536 |
1 | static int get_cluster_offset(BlockDriverState *bs, VmdkExtent *extent, VmdkMetaData *m_data, uint64_t offset, bool allocate, uint64_t *cluster_offset, uint64_t skip_start_sector, uint64_t skip_end_sector) { unsigned int l1_index, l2_offset, l2_index; int min_index, i, j; uint32_t min_count, *l2_table; bool zeroed = fa... | 13,537 |
1 | static int check(AVIOContext *pb, int64_t pos, uint32_t *ret_header) { int64_t ret = avio_seek(pb, pos, SEEK_SET); uint8_t header_buf[4]; unsigned header; MPADecodeHeader sd; if (ret < 0) return CHECK_SEEK_FAILED; ret = avio_read(pb, &header_buf[0], 4); if (ret < 0) return CHECK_SEEK_FAILED; header = AV_RB32(&header_bu... | 13,538 |
1 | static uint64_t icp_pit_read(void *opaque, hwaddr offset, unsigned size) { icp_pit_state *s = (icp_pit_state *)opaque; int n; /* ??? Don't know the PrimeCell ID for this device. */ n = offset >> 8; if (n > 2) { qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad timer %d\n", __func__, n); } return arm_timer_read(s->timer[n], offse... | 13,539 |
0 | static void get_aac_sample_rates(AVFormatContext *s, AVCodecContext *codec, int *sample_rate, int *output_sample_rate) { MPEG4AudioConfig mp4ac; if (avpriv_mpeg4audio_get_config(&mp4ac, codec->extradata, codec->extradata_size * 8, 1) < 0) { av_log(s, AV_LOG_WARNING, "Error parsing AAC extradata, unable to determine sam... | 13,540 |
1 | static void inter_recon(AVCodecContext *ctx) { static const uint8_t bwlog_tab[2][N_BS_SIZES] = { { 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 }, { 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4 }, }; VP9Context *s = ctx->priv_data; VP9Block *b = s->b; int row = s->row, col = s->col; ThreadFrame *tref1 = &s->refs[s->refidx[b->ref[0]]... | 13,541 |
1 | static void matroska_merge_packets(AVPacket *out, AVPacket *in) { out->data = av_realloc(out->data, out->size+in->size); memcpy(out->data+out->size, in->data, in->size); out->size += in->size; av_destruct_packet(in); av_free(in); } | 13,542 |
1 | static int decode_pal(MSS12Context *ctx, ArithCoder *acoder) { int i, ncol, r, g, b; uint32_t *pal = ctx->pal + 256 - ctx->free_colours; if (!ctx->free_colours) return 0; ncol = arith_get_number(acoder, ctx->free_colours + 1); for (i = 0; i < ncol; i++) { r = arith_get_bits(acoder, 8); g = arith_get_bits(acoder, 8); b ... | 13,543 |
1 | int ff_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_in_bits-20) return -1; for(len=0; len<32; len++){ if(get_bits1(&s->gb)) brea... | 13,544 |
1 | static inline void gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb, int search_pc) { DisasContext dc1, *dc = &dc1; CPUBreakpoint *bp; uint16_t *gen_opc_end; int j, lj; target_ulong pc_start; uint32_t next_page_start; int num_insns; int max_insns; /* generate intermediate code */ num_temps = 0; pc_sta... | 13,545 |
1 | static int write_representation(AVFormatContext *s, AVStream *stream, int id, int output_width, int output_height, int output_sample_rate) { AVDictionaryEntry *irange = av_dict_get(stream->metadata, INITIALIZATION_RANGE, NULL, 0); AVDictionaryEntry *cues_start = av_dict_get(stream->metadata, CUES_START, NULL, 0); AVDic... | 13,547 |
0 | static int thp_read_header(AVFormatContext *s, AVFormatParameters *ap) { ThpDemuxContext *thp = s->priv_data; AVStream *st; AVIOContext *pb = s->pb; int64_t fsize= avio_size(pb); int i; /* Read the file header. */ avio_rb32(pb); /* Skip Magic. */ thp->version = avio_rb32(pb); avio_rb32(pb); /* Max buf size. */ avio_rb3... | 13,549 |
0 | void av_free(void *ptr) { #if CONFIG_MEMALIGN_HACK if (ptr) free((char *)ptr - ((char *)ptr)[-1]); #elif HAVE_ALIGNED_MALLOC _aligned_free(ptr); #else free(ptr); #endif } | 13,550 |
0 | static inline int check_bidir_mv(MpegEncContext * s, int motion_fx, int motion_fy, int motion_bx, int motion_by, int pred_fx, int pred_fy, int pred_bx, int pred_by, int size, int h) { //FIXME optimize? //FIXME better f_code prediction (max mv & distance) //FIXME pointers MotionEstContext * const c= &s->me; uint8_t * co... | 13,551 |
1 | static int init_prec(Jpeg2000Band *band, Jpeg2000ResLevel *reslevel, Jpeg2000Component *comp, int precno, int bandno, int reslevelno, int log2_band_prec_width, int log2_band_prec_height) { Jpeg2000Prec *prec = band->prec + precno; int nb_codeblocks, cblkno; prec->decoded_layers = 0; /* TODO: Explain formula for JPEG200... | 13,553 |
1 | static int qcow2_write_compressed(BlockDriverState *bs, int64_t sector_num, const uint8_t *buf, int nb_sectors) { BDRVQcowState *s = bs->opaque; z_stream strm; int ret, out_len; uint8_t *out_buf; uint64_t cluster_offset; if (nb_sectors == 0) { /* align end of file to a sector boundary to ease reading with sector based ... | 13,557 |
1 | static void test_init(void) { uint64_t barsize; dev = get_device(); dev_base = qpci_iomap(dev, 0, &barsize); g_assert(dev_base != NULL); qpci_device_enable(dev); test_timer(); } | 13,558 |
1 | void gen_intermediate_code(CPUPPCState *env, struct TranslationBlock *tb) { PowerPCCPU *cpu = ppc_env_get_cpu(env); CPUState *cs = CPU(cpu); DisasContext ctx, *ctxp = &ctx; opc_handler_t **table, *handler; target_ulong pc_start; int num_insns; int max_insns; pc_start = tb->pc; ctx.nip = pc_start; ctx.tb = tb; ctx.excep... | 13,559 |
1 | static void smptebars_fill_picture(AVFilterContext *ctx, AVFrame *picref) { TestSourceContext *test = ctx->priv; FFDrawColor color; int r_w, r_h, w_h, p_w, p_h, i, tmp, x = 0; const AVPixFmtDescriptor *pixdesc = av_pix_fmt_desc_get(picref->format); r_w = FFALIGN((test->w + 6) / 7, 1 << pixdesc->log2_chroma_w); r_h = FF... | 13,560 |
0 | static coroutine_fn void nbd_read_reply_entry(void *opaque) { NBDClientSession *s = opaque; uint64_t i; int ret; for (;;) { assert(s->reply.handle == 0); ret = nbd_receive_reply(s->ioc, &s->reply); if (ret < 0) { break; } /* There's no need for a mutex on the receive side, because the * handler acts as a synchronizatio... | 13,561 |
0 | static int mp_pacl_removexattr(FsContext *ctx, const char *path, const char *name) { int ret; char buffer[PATH_MAX]; ret = lremovexattr(rpath(ctx, path, buffer), MAP_ACL_ACCESS); if (ret == -1 && errno == ENODATA) { /* * We don't get ENODATA error when trying to remove a * posix acl that is not present. So don't throw ... | 13,562 |
0 | float32 HELPER(ucf64_adds)(float32 a, float32 b, CPUUniCore32State *env) { return float32_add(a, b, &env->ucf64.fp_status); } | 13,563 |
0 | static void test_validate_fail_struct(TestInputVisitorData *data, const void *unused) { TestStruct *p = NULL; Error *err = NULL; Visitor *v; v = validate_test_init(data, "{ 'integer': -42, 'boolean': true, 'string': 'foo', 'extra': 42 }"); visit_type_TestStruct(v, NULL, &p, &err); error_free_or_abort(&err); g_assert(!p... | 13,564 |
0 | static int ram_load_postcopy(QEMUFile *f) { int flags = 0, ret = 0; bool place_needed = false; bool matching_page_sizes = qemu_host_page_size == TARGET_PAGE_SIZE; MigrationIncomingState *mis = migration_incoming_get_current(); /* Temporary page that is later 'placed' */ void *postcopy_host_page = postcopy_get_tmp_page(... | 13,566 |
0 | static uint64_t pmsav7_read(CPUARMState *env, const ARMCPRegInfo *ri) { uint32_t *u32p = *(uint32_t **)raw_ptr(env, ri); if (!u32p) { return 0; } u32p += env->pmsav7.rnr; return *u32p; } | 13,567 |
0 | static int gt64120_pci_init(PCIDevice *d) { /* FIXME: Malta specific hw assumptions ahead */ pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_MARVELL); pci_config_set_device_id(d->config, PCI_DEVICE_ID_MARVELL_GT6412X); pci_set_word(d->config + PCI_COMMAND, 0); pci_set_word(d->config + PCI_STATUS, PCI_STATUS_FAST_BACK... | 13,568 |
0 | static int vtd_page_walk(VTDContextEntry *ce, uint64_t start, uint64_t end, vtd_page_walk_hook hook_fn, void *private, bool notify_unmap) { dma_addr_t addr = vtd_ce_get_slpt_base(ce); uint32_t level = vtd_ce_get_level(ce); if (!vtd_iova_range_check(start, ce)) { return -VTD_FR_ADDR_BEYOND_MGAW; } if (!vtd_iova_range_ch... | 13,570 |
0 | static int omx_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet) { OMXCodecContext *s = avctx->priv_data; int ret = 0; OMX_BUFFERHEADERTYPE* buffer; OMX_ERRORTYPE err; if (frame) { uint8_t *dst[4]; int linesize[4]; int need_copy; buffer = get_buffer(&s->input_mutex, &s->input_con... | 13,572 |
0 | void kvm_arm_reset_vcpu(ARMCPU *cpu) { /* Feed the kernel back its initial register state */ memmove(cpu->cpreg_values, cpu->cpreg_reset_values, cpu->cpreg_array_len * sizeof(cpu->cpreg_values[0])); if (!write_list_to_kvmstate(cpu)) { abort(); } } | 13,573 |
0 | static void vmsvga_update_display(void *opaque) { struct vmsvga_state_s *s = opaque; DisplaySurface *surface; bool dirty = false; if (!s->enable) { s->vga.hw_ops->gfx_update(&s->vga); return; } vmsvga_check_size(s); surface = qemu_console_surface(s->vga.con); vmsvga_fifo_run(s); vmsvga_update_rect_flush(s); /* * Is it ... | 13,574 |
0 | static void bdrv_io_limits_intercept(BlockDriverState *bs, int nb_sectors, bool is_write) { /* does this io must wait */ bool must_wait = throttle_schedule_timer(&bs->throttle_state, is_write); /* if must wait or any request of this type throttled queue the IO */ if (must_wait || !qemu_co_queue_empty(&bs->throttled_req... | 13,575 |
0 | static void ide_cfata_identify(IDEState *s) { uint16_t *p; uint32_t cur_sec; p = (uint16_t *) s->identify_data; if (s->identify_set) goto fill_buffer; memset(p, 0, sizeof(s->identify_data)); cur_sec = s->cylinders * s->heads * s->sectors; put_le16(p + 0, 0x848a); /* CF Storage Card signature */ put_le16(p + 1, s->cylin... | 13,576 |
0 | static void test_qga_file_ops(gconstpointer fix) { const TestFixture *fixture = fix; const unsigned char helloworld[] = "Hello World!\n"; const char *b64; gchar *cmd, *path, *enc; unsigned char *dec; QDict *ret, *val; int64_t id, eof; gsize count; FILE *f; char tmp[100]; /* open */ ret = qmp_fd(fixture->fd, "{'execute'... | 13,577 |
0 | static inline uint64_t tcg_opc_movi_a(int qp, TCGReg dst, int64_t src) { assert(src == sextract64(src, 0, 22)); return tcg_opc_a5(qp, OPC_ADDL_A5, dst, src, TCG_REG_R0); } | 13,578 |
0 | bool qemu_clock_run_timers(QEMUClockType type) { return timerlist_run_timers(main_loop_tlg.tl[type]); } | 13,579 |
0 | static int net_slirp_init(VLANState *vlan, const char *model, const char *name) { if (!slirp_inited) { slirp_inited = 1; slirp_init(slirp_restrict, slirp_ip); } slirp_vc = qemu_new_vlan_client(vlan, model, name, slirp_receive, NULL, NULL, NULL); slirp_vc->info_str[0] = '\0'; return 0; } | 13,580 |
0 | static int assigned_device_pci_cap_init(PCIDevice *pci_dev, Error **errp) { AssignedDevice *dev = PCI_ASSIGN(pci_dev); PCIRegion *pci_region = dev->real_device.regions; int ret, pos; /* Clear initial capabilities pointer and status copied from hw */ pci_set_byte(pci_dev->config + PCI_CAPABILITY_LIST, 0); pci_set_word(p... | 13,581 |
0 | static inline void gen_intermediate_code_internal(UniCore32CPU *cpu, TranslationBlock *tb, bool search_pc) { CPUState *cs = CPU(cpu); CPUUniCore32State *env = &cpu->env; DisasContext dc1, *dc = &dc1; CPUBreakpoint *bp; uint16_t *gen_opc_end; int j, lj; target_ulong pc_start; uint32_t next_page_start; int num_insns; int... | 13,582 |
0 | static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx, DECODER_BUFFER_DESC *bs, DECODER_BUFFER_DESC *sc) { const struct MpegEncContext *s = avctx->priv_data; AVDXVAContext *ctx = avctx->hwaccel_context; struct dxva2_picture_context *ctx_pic = s->current_picture_ptr->hwaccel_picture_private; const int is_fi... | 13,583 |
0 | static void piix4_reset(void *opaque) { PIIX4PMState *s = opaque; uint8_t *pci_conf = s->dev.config; pci_conf[0x58] = 0; pci_conf[0x59] = 0; pci_conf[0x5a] = 0; pci_conf[0x5b] = 0; } | 13,584 |
0 | static void vgafb_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size) { MilkymistVgafbState *s = opaque; trace_milkymist_vgafb_memory_write(addr, value); addr >>= 2; switch (addr) { case R_CTRL: s->regs[addr] = value; vgafb_resize(s); break; case R_HSYNC_START: case R_HSYNC_END: case R_HSCAN: ca... | 13,585 |
0 | static int get_phys_addr_v5(CPUARMState *env, uint32_t address, int access_type, ARMMMUIdx mmu_idx, hwaddr *phys_ptr, int *prot, target_ulong *page_size) { CPUState *cs = CPU(arm_env_get_cpu(env)); int code; uint32_t table; uint32_t desc; int type; int ap; int domain = 0; int domain_prot; hwaddr phys_addr; uint32_t dac... | 13,586 |
0 | static void qjson_initfn(Object *obj) { QJSON *json = QJSON(obj); json->str = qstring_from_str("{ "); json->omit_comma = true; } | 13,587 |
0 | cac_applet_pki_reset(VCard *card, int channel) { VCardAppletPrivate *applet_private = NULL; CACPKIAppletData *pki_applet = NULL; applet_private = vcard_get_current_applet_private(card, channel); assert(applet_private); pki_applet = &(applet_private->u.pki_data); pki_applet->cert_buffer = NULL; if (pki_applet->sign_buff... | 13,588 |
0 | static void coroutine_fn bdrv_rw_co_entry(void *opaque) { RwCo *rwco = opaque; if (!rwco->is_write) { rwco->ret = bdrv_co_do_preadv(rwco->bs, rwco->offset, rwco->qiov->size, rwco->qiov, rwco->flags); } else { rwco->ret = bdrv_co_do_pwritev(rwco->bs, rwco->offset, rwco->qiov->size, rwco->qiov, rwco->flags); } } | 13,590 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.