label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
1 | static void pc_init_pci_1_3(QEMUMachineInitArgs *args){ enable_compat_apic_id_mode(); pc_sysfw_flash_vs_rom_bug_compatible = true; has_pvpanic = false; pc_init_pci(args);} |
0 | static uint8_t get_sot(Jpeg2000DecoderContext *s, int n){ Jpeg2000TilePart *tp; uint16_t Isot; uint32_t Psot; uint8_t TPsot; if (s->buf_end - s->buf < 4) return AVERROR(EINVAL); Isot = bytestream_get_be16(&s->buf); // Isot if (Isot) { av_log(s->avctx, AV_LOG_ERROR, "Not a DCINEMA JP2K file: more than one tile\n"); retu... |
1 | static int xa_probe(AVProbeData *p){ switch(AV_RL32(p->buf)) { case XA00_TAG: case XAI0_TAG: case XAJ0_TAG: return AVPROBE_SCORE_MAX; } return 0;} |
1 | static void qemu_chr_fe_write_log(CharDriverState *s, const uint8_t *buf, size_t len){ size_t done = 0; ssize_t ret; if (s->logfd < 0) { return; } while (done < len) { do { ret = write(s->logfd, buf + done, len - done); if (ret == -1 && errno == EAGAIN) { g_usleep(100); } } while (ret == -1 && errno == EAGAIN); if (ret... |
1 | void av_vlog(void* avcl, int level, const char *fmt, va_list vl){ if(av_log_callback) av_log_callback(avcl, level, fmt, vl);} |
1 | void kvm_setup_guest_memory(void *start, size_t size){ if (!kvm_has_sync_mmu()) {#ifdef MADV_DONTFORK int ret = madvise(start, size, MADV_DONTFORK); if (ret) { perror("madvice"); exit(1); }#else fprintf(stderr, "Need MADV_DONTFORK in absence of synchronous KVM MMU\n"); exit(1);#endif }} |
0 | static int read_packet(AVFormatContext *s, AVPacket *pkt){ ASSContext *ass = s->priv_data; uint8_t *p, *end; if (ass->event_index >= ass->event_count) return AVERROR(EIO); p = ass->event[ass->event_index]; end = strchr(p, '\n'); av_new_packet(pkt, end ? end - p + 1 : strlen(p)); pkt->flags |= AV_PKT_FLAG_KEY; pkt->pos ... |
0 | static av_cold int xwd_encode_close(AVCodecContext *avctx){ av_freep(&avctx->coded_frame); return 0;} |
1 | av_cold void ff_idctdsp_init_x86(IDCTDSPContext *c, AVCodecContext *avctx, unsigned high_bit_depth){ int cpu_flags = av_get_cpu_flags(); if (INLINE_MMX(cpu_flags)) { if (!high_bit_depth && avctx->lowres == 0 && (avctx->idct_algo == FF_IDCT_AUTO || avctx->idct_algo == FF_IDCT_SIMPLEAUTO || avctx->idct_algo == FF_IDCT_SI... |
1 | static void send_msg(IPMIBmcSim *ibs, uint8_t *cmd, unsigned int cmd_len, uint8_t *rsp, unsigned int *rsp_len, unsigned int max_rsp_len){ IPMIInterface *s = ibs->parent.intf; IPMIInterfaceClass *k = IPMI_INTERFACE_GET_CLASS(s); IPMIRcvBufEntry *msg; uint8_t *buf; uint8_t netfn, rqLun, rsLun, rqSeq; IPMI_CHECK_CMD_LEN(3... |
1 | static void render_slice(Vp3DecodeContext *s, int slice){ int x, y, i, j, fragment; LOCAL_ALIGNED_16(DCTELEM, block, [64]); int motion_x = 0xdeadbeef, motion_y = 0xdeadbeef; int motion_halfpel_index; uint8_t *motion_source; int plane, first_pixel; if (slice >= s->c_superblock_height) return; for (plane = 0; plane < 3; ... |
1 | static void disas_xtensa_insn(DisasContext *dc){#define HAS_OPTION(opt) do { \ if (!option_enabled(dc, opt)) { \ qemu_log("Option %d is not enabled %s:%d\n", \ (opt), __FILE__, __LINE__); \ goto invalid_opcode; \ } \ } while (0)#ifdef TARGET_WORDS_BIGENDIAN#define OP0 (((b0) & 0xf0) >> 4)#define OP1 (((b2) & 0xf0) >> 4... |
1 | void bdrv_invalidate_cache(BlockDriverState *bs, Error **errp){ BdrvChild *child; Error *local_err = NULL; int ret; if (!bs->drv) { return; } if (!(bs->open_flags & BDRV_O_INACTIVE)) { return; } bs->open_flags &= ~BDRV_O_INACTIVE; if (bs->drv->bdrv_invalidate_cache) { bs->drv->bdrv_invalidate_cache(bs, &local_err); if ... |
1 | static int context_init(H264Context *h){ MpegEncContext * const s = &h->s; CHECKED_ALLOCZ(h->top_borders[0], h->s.mb_width * (16+8+8) * sizeof(uint8_t)) CHECKED_ALLOCZ(h->top_borders[1], h->s.mb_width * (16+8+8) * sizeof(uint8_t)) // edge emu needs blocksize + filter length - 1 (=17x17 for halfpel / 21x21 for h264) CHE... |
1 | int ff_MPV_encode_picture(AVCodecContext *avctx, AVPacket *pkt, AVFrame *pic_arg, int *got_packet){ MpegEncContext *s = avctx->priv_data; int i, stuffing_count, ret; int context_count = s->slice_context_count; s->picture_in_gop_number++; if (load_input_picture(s, pic_arg) < 0) return -1; if (select_input_picture(s) < 0... |
0 | static int check_slice_end(RV34DecContext *r, MpegEncContext *s){ int bits; if(s->mb_y >= s->mb_height) return 1; if(!s->mb_num_left) return 1; if(r->s.mb_skip_run > 1) return 0; bits = get_bits_left(&s->gb); if(bits < 0 || (bits < 8 && !show_bits(&s->gb, bits))) return 1; return 0;} |
0 | static int alloc_frame_buffer(AVCodecContext *avctx, Picture *pic, MotionEstContext *me, ScratchpadContext *sc, int chroma_x_shift, int chroma_y_shift, int linesize, int uvlinesize){ int edges_needed = av_codec_is_encoder(avctx->codec); int r, ret; pic->tf.f = pic->f; if (avctx->codec_id != AV_CODEC_ID_WMV3IMAGE && avc... |
0 | void ff_avg_h264_qpel4_mc32_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride){ avc_luma_midh_qrt_and_aver_dst_4w_msa(src - (2 * stride) - 2, stride, dst, stride, 4, 1);} |
0 | static void show_programs(WriterContext *w, AVFormatContext *fmt_ctx){ int i; writer_print_section_header(w, SECTION_ID_PROGRAMS); for (i = 0; i < fmt_ctx->nb_programs; i++) { AVProgram *program = fmt_ctx->programs[i]; if (!program) continue; show_program(w, fmt_ctx, program); } writer_print_section_footer(w);} |
0 | static int put_flac_codecpriv(AVFormatContext *s, AVIOContext *pb, AVCodecContext *codec){ int write_comment = (codec->channel_layout && !(codec->channel_layout & ~0x3ffffULL) && !ff_flac_is_native_layout(codec->channel_layout)); int ret = ff_flac_write_header(pb, codec->extradata, codec->extradata_size, !write_comment... |
1 | static uint64_t get_cluster_offset(BlockDriverState *bs, uint64_t offset, int *num){ BDRVQcowState *s = bs->opaque; int l1_index, l2_index; uint64_t l2_offset, *l2_table, cluster_offset; int l1_bits, c; int index_in_cluster, nb_available, nb_needed, nb_clusters; index_in_cluster = (offset >> 9) & (s->cluster_sectors - ... |
1 | static int rscc_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt){ RsccContext *ctx = avctx->priv_data; GetByteContext *gbc = &ctx->gbc; GetByteContext tiles_gbc; AVFrame *frame = data; const uint8_t *pixels, *raw; uint8_t *inflated_tiles = NULL; int tiles_nb, packed_size, pixel_size = 0;... |
1 | static int64_t wrap_timestamp(AVStream *st, int64_t timestamp){ if (st->pts_wrap_behavior != AV_PTS_WRAP_IGNORE && st->pts_wrap_bits < 64 && st->pts_wrap_reference != AV_NOPTS_VALUE && timestamp != AV_NOPTS_VALUE) { if (st->pts_wrap_behavior == AV_PTS_WRAP_ADD_OFFSET && timestamp < st->pts_wrap_reference) return timest... |
1 | static void write_section_data(AVFormatContext *s, MpegTSFilter *tss1, const uint8_t *buf, int buf_size, int is_start){ MpegTSContext *ts = s->priv_data; MpegTSSectionFilter *tss = &tss1->u.section_filter; int len; if (is_start) { memcpy(tss->section_buf, buf, buf_size); tss->section_index = buf_size; tss->section_h_si... |
1 | bool migrate_auto_converge(void){ MigrationState *s; s = migrate_get_current(); return s->enabled_capabilities[MIGRATION_CAPABILITY_AUTO_CONVERGE];} |
1 | static int dpcm_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt){ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; const uint8_t *buf_end = buf + buf_size; DPCMContext *s = avctx->priv_data; int out = 0, ret; int predictor[2]; int ch = 0; int stereo = s->channels - 1; in... |
1 | static int get_cluster_table(BlockDriverState *bs, uint64_t offset, uint64_t **new_l2_table, uint64_t *new_l2_offset, int *new_l2_index){ BDRVQcowState *s = bs->opaque; unsigned int l1_index, l2_index; uint64_t l2_offset; uint64_t *l2_table = NULL; int ret; /* seek the the l2 offset in the l1 table */ l1_index = offset... |
1 | static int decode_dds1(GetByteContext *gb, uint8_t *frame, int width, int height){ const uint8_t *frame_start = frame; const uint8_t *frame_end = frame + width * height; int mask = 0x10000, bitbuf = 0; int i, v, offset, count, segments; segments = bytestream2_get_le16(gb); while (segments--) { if (bytestream2_get_bytes... |
1 | int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx, ShortTermRPS *rps, const HEVCSPS *sps, int is_slice_header){ uint8_t rps_predict = 0; int delta_poc; int k0 = 0; int k1 = 0; int k = 0; int i; if (rps != sps->st_rps && sps->nb_st_rps) rps_predict = get_bits1(gb); if (rps_predict) { const Short... |
1 | static ssize_t nic_receive(VLANClientState *vc, const uint8_t * buf, size_t size){ /* TODO: * - Magic packets should set bit 30 in power management driver register. * - Interesting packets should set bit 29 in power management driver register. */ EEPRO100State *s = vc->opaque; uint16_t rfd_status = 0xa000; static const... |
1 | static BlockAIOCB *read_quorum_children(QuorumAIOCB *acb){ BDRVQuorumState *s = acb->common.bs->opaque; int i; for (i = 0; i < s->num_children; i++) { acb->qcrs[i].buf = qemu_blockalign(s->children[i]->bs, acb->qiov->size); qemu_iovec_init(&acb->qcrs[i].qiov, acb->qiov->niov); qemu_iovec_clone(&acb->qcrs[i].qiov, acb->... |
1 | static int flac_decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size){ FLACContext *s = avctx->priv_data; int metadata_last, metadata_type, metadata_size; int tmp = 0, i, j = 0, input_buf_size = 0; int16_t *samples = data; if(s->max_framesize == 0){ s->max_framesize= 8192; // shoul... |
0 | static void dump_video_param(AVCodecContext *avctx, QSVEncContext *q, mfxExtBuffer **coding_opts){ mfxInfoMFX *info = &q->param.mfx; mfxExtCodingOption *co = (mfxExtCodingOption*)coding_opts[0];#if QSV_HAVE_CO2 mfxExtCodingOption2 *co2 = (mfxExtCodingOption2*)coding_opts[1];#endif#if QSV_HAVE_CO3 mfxExtCodingOption3 *c... |
0 | static void *alloc_buffer(FFVAContext *vactx, int type, unsigned int size, uint32_t *buf_id){ void *data = NULL; *buf_id = 0; if (vaCreateBuffer(vactx->display, vactx->context_id, type, size, 1, NULL, buf_id) == VA_STATUS_SUCCESS) vaMapBuffer(vactx->display, *buf_id, &data); return data;} |
0 | void ff_http_auth_handle_header(HTTPAuthState *state, const char *key, const char *value){ if (!strcmp(key, "WWW-Authenticate") || !strcmp(key, "Proxy-Authenticate")) { const char *p; if (av_stristart(value, "Basic ", &p) && state->auth_type <= HTTP_AUTH_BASIC) { state->auth_type = HTTP_AUTH_BASIC; state->realm[0] = 0;... |
0 | void ff_thread_report_progress(ThreadFrame *f, int n, int field){ PerThreadContext *p; atomic_int *progress = f->progress ? (atomic_int*)f->progress->data : NULL; if (!progress || atomic_load_explicit(&progress[field], memory_order_acquire) >= n) return; p = f->owner->internal->thread_ctx; if (f->owner->debug&FF_DEBUG_... |
1 | static void mxf_write_system_item(AVFormatContext *s){ MXFContext *mxf = s->priv_data; AVIOContext *pb = s->pb; unsigned frame; uint32_t time_code; frame = mxf->last_indexed_edit_unit + mxf->edit_units_count; // write system metadata pack avio_write(pb, system_metadata_pack_key, 16); klv_encode_ber4_length(pb, 57); avi... |
1 | petalogix_ml605_init(MachineState *machine){ ram_addr_t ram_size = machine->ram_size; MemoryRegion *address_space_mem = get_system_memory(); DeviceState *dev, *dma, *eth0; Object *ds, *cs; MicroBlazeCPU *cpu; SysBusDevice *busdev; DriveInfo *dinfo; int i; MemoryRegion *phys_lmb_bram = g_new(MemoryRegion, 1); MemoryRegi... |
1 | static FILE *probe_splashfile(char *filename, int *file_sizep, int *file_typep){ FILE *fp = NULL; int fop_ret; int file_size; int file_type = -1; unsigned char buf[2] = {0, 0}; unsigned int filehead_value = 0; int bmp_bpp; fp = fopen(filename, "rb"); if (fp == NULL) { error_report("failed to open file '%s'.", filename)... |
1 | vmxnet3_read_next_rx_descr(VMXNET3State *s, int qidx, int ridx, struct Vmxnet3_RxDesc *dbuf, uint32_t *didx){ Vmxnet3Ring *ring = &s->rxq_descr[qidx].rx_ring[ridx]; *didx = vmxnet3_ring_curr_cell_idx(ring); vmxnet3_ring_read_curr_cell(ring, dbuf);} |
1 | static av_cold int aac_encode_end(AVCodecContext *avctx){ AACEncContext *s = avctx->priv_data; ff_mdct_end(&s->mdct1024); ff_mdct_end(&s->mdct128); ff_psy_end(&s->psy); ff_psy_preprocess_end(s->psypp); av_freep(&s->samples); av_freep(&s->cpe); return 0;} |
1 | static int rice_count_exact(int32_t *res, int n, int k){ int i; int count = 0; for (i = 0; i < n; i++) { int32_t v = -2 * res[i] - 1; v ^= v >> 31; count += (v >> k) + 1 + k; } return count;} |
1 | static uint64_t boston_lcd_read(void *opaque, hwaddr addr, unsigned size){ BostonState *s = opaque; uint64_t val = 0; switch (size) { case 8: val |= (uint64_t)s->lcd_content[(addr + 7) & 0x7] << 56; val |= (uint64_t)s->lcd_content[(addr + 6) & 0x7] << 48; val |= (uint64_t)s->lcd_content[(addr + 5) & 0x7] << 40; val |= ... |
1 | static inline int mix_core(uint32_t multbl[][256], int a, int b, int c, int d){#if CONFIG_SMALL#define ROT(x,s) ((x<<s)|(x>>(32-s))) return multbl[0][a] ^ ROT(multbl[0][b], 8) ^ ROT(multbl[0][c], 16) ^ ROT(multbl[0][d], 24);#else return multbl[0][a] ^ multbl[1][b] ^ multbl[2][c] ^ multbl[3][d];#endif} |
1 | 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... |
1 | static unsigned long copy_elf_strings(int argc,char ** argv, void **page, unsigned long p){ char *tmp, *tmp1, *pag = NULL; int len, offset = 0; if (!p) {return 0; /* bullet-proofing */ } while (argc-- > 0) { tmp = argv[argc]; if (!tmp) { fprintf(stderr, "VFS: argc is wrong"); exit(-1);} tmp1 = tmp;while (*tmp++);len = ... |
1 | void fork_end(int child){ mmap_fork_end(child); if (child) { CPUState *cpu, *next_cpu; /* Child processes created by fork() only have a single thread. Discard information about the parent threads. */ CPU_FOREACH_SAFE(cpu, next_cpu) { if (cpu != thread_cpu) { QTAILQ_REMOVE(&cpus, cpu, node); } } qemu_mutex_init(&tb_ctx.... |
1 | static int mpc8_probe(AVProbeData *p){ const uint8_t *bs = p->buf + 4; const uint8_t *bs_end = bs + p->buf_size; int64_t size; if (p->buf_size < 16) return 0; if (AV_RL32(p->buf) != TAG_MPCK) return 0; while (bs < bs_end + 3) { int header_found = (bs[0] == 'S' && bs[1] == 'H'); if (bs[0] < 'A' || bs[0] > 'Z' || bs[1] <... |
1 | static TranslationBlock *tb_find_slow(target_ulong pc, target_ulong cs_base, uint64_t flags){ TranslationBlock *tb, **ptb1; int code_gen_size; unsigned int h; target_ulong phys_pc, phys_page1, phys_page2, virt_page2; uint8_t *tc_ptr; spin_lock(&tb_lock); tb_invalidated_flag = 0; regs_to_env(); /* XXX: do it just before... |
0 | static int decode_block(MJpegDecodeContext *s, DCTELEM *block, int component, int dc_index, int ac_index, int16_t *quant_matrix){ int code, i, j, level, val; VLC *ac_vlc; /* DC coef */ val = mjpeg_decode_dc(s, dc_index); if (val == 0xffff) { dprintf("error dc\n"); return -1; } val = val * quant_matrix[0] + s->last_dc[c... |
0 | static int gif_read_image(GifState *s, AVFrame *frame){ int left, top, width, height, bits_per_pixel, code_size, flags; int is_interleaved, has_local_palette, y, pass, y1, linesize, n, i; uint8_t *ptr, *spal, *palette, *ptr1; left = bytestream_get_le16(&s->bytestream); top = bytestream_get_le16(&s->bytestream); width =... |
1 | static int oss_poll_in (HWVoiceIn *hw){ OSSVoiceIn *oss = (OSSVoiceIn *) hw; return qemu_set_fd_handler (oss->fd, oss_helper_poll_in, NULL, NULL);} |
1 | static int parse_fade(struct sbg_parser *p, struct sbg_fade *fr){ struct sbg_fade f; if (lex_char(p, '<')) f.in = SBG_FADE_SILENCE; else if (lex_char(p, '-')) f.in = SBG_FADE_SAME; else if (lex_char(p, '=')) f.in = SBG_FADE_ADAPT; else return 0; if (lex_char(p, '>')) f.out = SBG_FADE_SILENCE; else if (lex_char(p, '-'))... |
1 | void qdev_prop_register_global(GlobalProperty *prop){ QTAILQ_INSERT_TAIL(&global_props, prop, next);} |
1 | int ff_hevc_decode_short_term_rps(HEVCContext *s, ShortTermRPS *rps, const HEVCSPS *sps, int is_slice_header){ HEVCLocalContext *lc = s->HEVClc; uint8_t rps_predict = 0; int delta_poc; int k0 = 0; int k1 = 0; int k = 0; int i; GetBitContext *gb = &lc->gb; if (rps != sps->st_rps && sps->nb_st_rps) rps_predict = get_bits... |
1 | iscsi_aio_readv(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockDriverCompletionFunc *cb, void *opaque){ IscsiLun *iscsilun = bs->opaque; IscsiAIOCB *acb; acb = qemu_aio_get(&iscsi_aiocb_info, bs, cb, opaque); trace_iscsi_aio_readv(iscsilun->iscsi, sector_num, nb_sectors, opaque, acb)... |
1 | static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc, QemuConsole *con, int idx, GSList *group, GtkWidget *view_menu){ Error *local_err = NULL; Object *obj; obj = object_property_get_link(OBJECT(con), "device", &local_err); if (obj) { vc->label = g_strdup_printf("%s", object_get_typename(obj)); } else {... |
1 | int ff_tls_open_underlying(TLSShared *c, URLContext *parent, const char *uri, AVDictionary **options){ int port; const char *p; char buf[200], opts[50] = ""; struct addrinfo hints = { 0 }, *ai = NULL; const char *proxy_path; int use_proxy; set_options(c, uri); if (c->listen) snprintf(opts, sizeof(opts), "?listen=1"); a... |
1 | static void x86_cpu_apic_init(X86CPU *cpu, Error **errp){ static int apic_mapped; CPUX86State *env = &cpu->env; APICCommonState *apic; const char *apic_type = "apic"; if (kvm_irqchip_in_kernel()) { apic_type = "kvm-apic"; } else if (xen_enabled()) { apic_type = "xen-apic"; } env->apic_state = qdev_try_create(NULL, apic... |
0 | static inline int clamp(int value, int min, int max){ if (value < min) return min; else if (value > max) return max; else return value;} |
0 | void audio_init(ISABus *isa_bus, PCIBus *pci_bus){} |
0 | static void nand_command(NANDFlashState *s){ unsigned int offset; switch (s->cmd) { case NAND_CMD_READ0: s->iolen = 0; break; case NAND_CMD_READID: s->ioaddr = s->io; s->iolen = 0; nand_pushio_byte(s, s->manf_id); nand_pushio_byte(s, s->chip_id); nand_pushio_byte(s, 'Q'); /* Don't-care byte (often 0xa5) */ if (nand_fla... |
0 | int64_t qemu_clock_deadline_ns_all(QEMUClockType type){ int64_t deadline = -1; QEMUTimerList *timer_list; QEMUClock *clock = qemu_clock_ptr(type); QLIST_FOREACH(timer_list, &clock->timerlists, list) { deadline = qemu_soonest_timeout(deadline, timerlist_deadline_ns(timer_list)); } return deadline;} |
0 | UserDefTwo *qmp_user_def_cmd2(UserDefOne *ud1a, bool has_udb1, UserDefOne *ud1b, Error **errp){ UserDefTwo *ret; UserDefOne *ud1c = g_malloc0(sizeof(UserDefOne)); UserDefOne *ud1d = g_malloc0(sizeof(UserDefOne)); ud1c->string = strdup(ud1a->string); ud1c->base = g_new0(UserDefZero, 1); ud1c->base->integer = ud1a->base-... |
0 | static void vmsa_ttbcr_raw_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value){ int maskshift = extract32(value, 0, 3); if (arm_feature(env, ARM_FEATURE_LPAE) && (value & (1 << 31))) { value &= ~((7 << 19) | (3 << 14) | (0xf << 3)); } else { value &= 7; } /* Note that we always calculate c2_mask and c2_base... |
0 | static uint32_t openpic_cpu_read_internal(void *opaque, hwaddr addr, int idx){ openpic_t *opp = opaque; IRQ_src_t *src; IRQ_dst_t *dst; uint32_t retval; int n_IRQ; DPRINTF("%s: cpu %d addr " TARGET_FMT_plx "\n", __func__, idx, addr); retval = 0xFFFFFFFF; if (addr & 0xF) return retval; dst = &opp->dst[idx]; addr &= 0xFF... |
0 | static int faac_decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size){ FAACContext *s = (FAACContext *) avctx->priv_data;#ifndef FAAD2_VERSION unsigned long bytesconsumed; short *sample_buffer = NULL; unsigned long samples; int out;#else faacDecFrameInfo frame_info; void *out;#endi... |
0 | void pc_dimm_memory_plug(DeviceState *dev, MemoryHotplugState *hpms, MemoryRegion *mr, uint64_t align, Error **errp){ int slot; MachineState *machine = MACHINE(qdev_get_machine()); PCDIMMDevice *dimm = PC_DIMM(dev); Error *local_err = NULL; uint64_t existing_dimms_capacity = 0; uint64_t addr; addr = object_property_get... |
0 | static BOOL WINAPI qemu_ctrl_handler(DWORD type){ exit(STATUS_CONTROL_C_EXIT); return TRUE;} |
0 | static int spapr_phb_init(SysBusDevice *s){ sPAPRPHBState *sphb = SPAPR_PCI_HOST_BRIDGE(s); PCIHostState *phb = PCI_HOST_BRIDGE(s); char *namebuf; int i; PCIBus *bus; sphb->dtbusname = g_strdup_printf("pci@%" PRIx64, sphb->buid); namebuf = alloca(strlen(sphb->dtbusname) + 32); /* Initialize memory regions */ sprintf(na... |
0 | static void imx_epit_write(void *opaque, hwaddr offset, uint64_t value, unsigned size){ IMXEPITState *s = IMX_EPIT(opaque); uint32_t reg = offset >> 2; uint64_t oldcr; DPRINTF("(%s, value = 0x%08x)\n", imx_epit_reg_name(reg), (uint32_t)value); switch (reg) { case 0: /* CR */ oldcr = s->cr; s->cr = value & 0x03ffffff; i... |
0 | uint32_t HELPER(rrbe)(uint32_t r1, uint64_t r2){ if (r2 > ram_size) { return 0; } /* XXX implement */#if 0 env->storage_keys[r2 / TARGET_PAGE_SIZE] &= ~SK_REFERENCED;#endif /* * cc * * 0 Reference bit zero; change bit zero * 1 Reference bit zero; change bit one * 2 Reference bit one; change bit zero * 3 Reference bit o... |
0 | static void ivshmem_io_write(void *opaque, target_phys_addr_t addr, uint64_t val, unsigned size){ IVShmemState *s = opaque; uint16_t dest = val >> 16; uint16_t vector = val & 0xff; addr &= 0xfc; IVSHMEM_DPRINTF("writing to addr " TARGET_FMT_plx "\n", addr); switch (addr) { case INTRMASK: ivshmem_IntrMask_write(s, val);... |
0 | SpiceInfo *qmp_query_spice(Error **errp){ QemuOpts *opts = QTAILQ_FIRST(&qemu_spice_opts.head); int port, tls_port; const char *addr; SpiceInfo *info; char version_string[20]; /* 12 = |255.255.255\0| is the max */ info = g_malloc0(sizeof(*info)); if (!spice_server || !opts) { info->enabled = false; return info; } info-... |
0 | void memory_region_init_rom_device(MemoryRegion *mr, const MemoryRegionOps *ops, void *opaque, const char *name, uint64_t size){ memory_region_init(mr, name, size); mr->ops = ops; mr->opaque = opaque; mr->terminates = true; mr->destructor = memory_region_destructor_rom_device; mr->ram_addr = qemu_ram_alloc(size, mr); m... |
0 | av_cold int ff_rv34_decode_init(AVCodecContext *avctx){ RV34DecContext *r = avctx->priv_data; MpegEncContext *s = &r->s; MPV_decode_defaults(s); s->avctx= avctx; s->out_format = FMT_H263; s->codec_id= avctx->codec_id; s->width = avctx->width; s->height = avctx->height; r->s.avctx = avctx; avctx->flags |= CODEC_FLAG_EMU... |
0 | static inline void mix_2f_2r_to_stereo(AC3DecodeContext *ctx){ int i; float (*output)[256] = ctx->audio_block.block_output; for (i = 0; i < 256; i++) { output[1][i] += output[3][i]; output[2][i] += output[4][i]; } memset(output[3], 0, sizeof(output[3])); memset(output[4], 0, sizeof(output[4]));} |
0 | void *qemu_vmalloc(size_t size){ void *p; unsigned long addr; mmap_lock(); /* Use map and mark the pages as used. */ p = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); addr = (unsigned long)p; if (addr == (target_ulong) addr) { /* Allocated region overlaps guest address space. This may recurse... |
0 | static void rtas_query_cpu_stopped_state(sPAPREnvironment *spapr, uint32_t token, uint32_t nargs, target_ulong args, uint32_t nret, target_ulong rets){ target_ulong id; CPUState *cpu; if (nargs != 1 || nret != 2) { rtas_st(rets, 0, -3); return; } id = rtas_ld(args, 0); cpu = qemu_get_cpu(id); if (cpu != NULL) { if (cpu... |
0 | static void nvic_recompute_state(NVICState *s){ int i; int pend_prio = NVIC_NOEXC_PRIO; int active_prio = NVIC_NOEXC_PRIO; int pend_irq = 0; for (i = 1; i < s->num_irq; i++) { VecInfo *vec = &s->vectors[i]; if (vec->enabled && vec->pending && vec->prio < pend_prio) { pend_prio = vec->prio; pend_irq = i; } if (vec->acti... |
0 | static int local_fsync(FsContext *ctx, int fd){ if (0) /* Just to supress the warning. Will be removed in next patch. */ (void)local_set_xattr(NULL, NULL); return fsync(fd);} |
0 | void qmp_blockdev_add(BlockdevOptions *options, Error **errp){ BlockDriverState *bs; QObject *obj; Visitor *v = qmp_output_visitor_new(&obj); QDict *qdict; Error *local_err = NULL; visit_type_BlockdevOptions(v, NULL, &options, &local_err); if (local_err) { error_propagate(errp, local_err); goto fail; } visit_complete(v... |
0 | static int segment_start(AVFormatContext *s){ SegmentContext *seg = s->priv_data; AVFormatContext *oc = seg->avf; int err = 0; if (seg->wrap) seg->number %= seg->wrap; if (av_get_frame_filename(oc->filename, sizeof(oc->filename), s->filename, seg->number++) < 0) return AVERROR(EINVAL); if ((err = avio_open2(&oc->pb, oc... |
0 | static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; if (vf->priv->in.fmt == vf->priv->out.fmt) { //nothing to do dmpi = mpi; } else { int out_off_left, out_off_right; int in_off_left = vf->priv->in.row_left * mpi->stride[0] + vf->priv->in.off_left; int in_off_right = vf->priv->i... |
0 | static void vfio_platform_realize(DeviceState *dev, Error **errp){ VFIOPlatformDevice *vdev = VFIO_PLATFORM_DEVICE(dev); SysBusDevice *sbdev = SYS_BUS_DEVICE(dev); VFIODevice *vbasedev = &vdev->vbasedev; int i, ret; vbasedev->type = VFIO_DEVICE_TYPE_PLATFORM; vbasedev->ops = &vfio_platform_ops; trace_vfio_platform_real... |
0 | void json_lexer_destroy(JSONLexer *lexer){ QDECREF(lexer->token);} |
0 | static void pcnet_ioport_write(void *opaque, target_phys_addr_t addr, uint64_t data, unsigned size){ PCNetState *d = opaque; if (addr < 16 && size == 1) { return pcnet_aprom_writeb(d, addr, data); } else if (addr >= 0x10 && addr < 0x20 && size == 2) { return pcnet_ioport_writew(d, addr, data); } else if (addr >= 0x10 &... |
0 | build_hash_table (const sparc_opcode **opcode_table, sparc_opcode_hash **hash_table, int num_opcodes){ int i; int hash_count[HASH_SIZE]; static sparc_opcode_hash *hash_buf = NULL; /* Start at the end of the table and work backwards so that each chain is sorted. */ memset (hash_table, 0, HASH_SIZE * sizeof (hash_table[0... |
0 | void nbd_export_close(NBDExport *exp){ NBDClient *client, *next; nbd_export_get(exp); QTAILQ_FOREACH_SAFE(client, &exp->clients, next, next) { nbd_client_close(client); } nbd_export_set_name(exp, NULL); nbd_export_put(exp); if (exp->blk) { blk_remove_aio_context_notifier(exp->blk, blk_aio_attached, blk_aio_detach, exp)... |
0 | static void gen_spr_power8_book4(CPUPPCState *env){ /* Add a number of P8 book4 registers */#if !defined(CONFIG_USER_ONLY) spr_register_kvm(env, SPR_ACOP, "ACOP", SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, &spr_write_generic, KVM_REG_PPC_ACOP, 0); spr_register_kvm(env, SPR_BOOKS_PID, "PID", SPR_NOACCESS, SPR_NOACCE... |
0 | int cpu_m68k_handle_mmu_fault (CPUState *env, target_ulong address, int rw, int mmu_idx, int is_softmmu){ int prot; address &= TARGET_PAGE_MASK; prot = PAGE_READ | PAGE_WRITE; return tlb_set_page(env, address, address, prot, mmu_idx, is_softmmu);} |
0 | void helper_movl_crN_T0(int reg){ env->cr[reg] = T0; switch(reg) { case 0: cpu_x86_update_cr0(env); break; case 3: cpu_x86_update_cr3(env); break; }} |
0 | static bool pmsav7_needed(void *opaque){ ARMCPU *cpu = opaque; CPUARMState *env = &cpu->env; return arm_feature(env, ARM_FEATURE_PMSA) && arm_feature(env, ARM_FEATURE_V7);} |
0 | int mmu40x_get_physical_address (CPUState *env, mmu_ctx_t *ctx, target_ulong address, int rw, int access_type){ ppcemb_tlb_t *tlb; target_phys_addr_t raddr; int i, ret, zsel, zpr; ret = -1; raddr = -1; for (i = 0; i < env->nb_tlb; i++) { tlb = &env->tlb[i].tlbe; if (ppcemb_tlb_check(env, tlb, &raddr, address, env->spr[... |
0 | static struct dirent *local_readdir(FsContext *ctx, V9fsFidOpenState *fs){ struct dirent *entry;again: entry = readdir(fs->dir.stream); if (!entry) { return NULL; } if (ctx->export_flags & V9FS_SM_MAPPED) { entry->d_type = DT_UNKNOWN; } else if (ctx->export_flags & V9FS_SM_MAPPED_FILE) { if (local_is_mapped_file_metada... |
1 | static void tricore_cpu_class_init(ObjectClass *c, void *data){ TriCoreCPUClass *mcc = TRICORE_CPU_CLASS(c); CPUClass *cc = CPU_CLASS(c); DeviceClass *dc = DEVICE_CLASS(c); mcc->parent_realize = dc->realize; dc->realize = tricore_cpu_realizefn; mcc->parent_reset = cc->reset; cc->reset = tricore_cpu_reset; cc->class_by_... |
1 | static int udp_open(URLContext *h, const char *uri, int flags){ char hostname[1024], localaddr[1024] = ""; int port, udp_fd = -1, tmp, bind_ret = -1; UDPContext *s = h->priv_data; int is_output; const char *p; char buf[256]; struct sockaddr_storage my_addr; int len; int reuse_specified = 0; int i, include = 0, num_sour... |
1 | static int vc1_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt){ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size, n_slices = 0, i; VC1Context *v = avctx->priv_data; MpegEncContext *s = &v->s; AVFrame *pict = data; uint8_t *buf2 = NULL; const uint8_t *buf_start = buf; int mb_... |
1 | int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt){ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; MpegEncContext *s = avctx->priv_data; int ret; AVFrame *pict = data; s->flags= avctx->flags; s->flags2= avctx->flags2; /* no supplementary picture */ if (buf_size =... |
1 | void avcodec_free_context(AVCodecContext **pavctx){ AVCodecContext *avctx = *pavctx; if (!avctx) return; avcodec_close(avctx); av_freep(&avctx->extradata); av_freep(&avctx->subtitle_header); av_freep(pavctx);} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.