label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
0 | void idct_put_altivec(uint8_t* dest, int stride, vector_s16_t* block){POWERPC_TBL_DECLARE(altivec_idct_put_num, 1);#ifdef ALTIVEC_USE_REFERENCE_C_CODEPOWERPC_TBL_START_COUNT(altivec_idct_put_num, 1); void simple_idct_put(uint8_t *dest, int line_size, int16_t *block); simple_idct_put(dest, stride, (int16_t*)block);POWER... |
0 | static void opt_top_field_first(const char *arg){ top_field_first= atoi(arg);} |
1 | static int mjpegb_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt){ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; MJpegDecodeContext *s = avctx->priv_data; const uint8_t *buf_end, *buf_ptr; AVFrame *picture = data; GetBitContext hgb; /* for the header */ uint32_t dqt_offs... |
1 | static void pl110_class_init(ObjectClass *klass, void *data){ DeviceClass *dc = DEVICE_CLASS(klass); SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); k->init = pl110_initfn; set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories); dc->no_user = 1; dc->vmsd = &vmstate_pl110;} |
1 | static always_inline void fload_invalid_op_excp (int op){ int ve; ve = fpscr_ve; if (op & POWERPC_EXCP_FP_VXSNAN) { /* Operation on signaling NaN */ env->fpscr |= 1 << FPSCR_VXSNAN; } if (op & POWERPC_EXCP_FP_VXSOFT) { /* Software-defined condition */ env->fpscr |= 1 << FPSCR_VXSOFT; } switch (op & ~(POWERPC_EXCP_FP_VX... |
1 | void gd_egl_scanout(DisplayChangeListener *dcl, uint32_t backing_id, bool backing_y_0_top, uint32_t x, uint32_t y, uint32_t w, uint32_t h){ VirtualConsole *vc = container_of(dcl, VirtualConsole, gfx.dcl); vc->gfx.x = x; vc->gfx.y = y; vc->gfx.w = w; vc->gfx.h = h; vc->gfx.tex_id = backing_id; vc->gfx.y0_top = backing_y... |
0 | static av_cold int vaapi_encode_check_config(AVCodecContext *avctx){ VAAPIEncodeContext *ctx = avctx->priv_data; VAStatus vas; int i, n, err; VAProfile *profiles = NULL; VAEntrypoint *entrypoints = NULL; VAConfigAttrib attr[] = { { VAConfigAttribRateControl }, { VAConfigAttribEncMaxRefFrames }, }; n = vaMaxNumProfiles(... |
1 | static int64_t qemu_icount_delta(void){ if (!use_icount) { return 5000 * (int64_t) 1000000; } else if (use_icount == 1) { /* When not using an adaptive execution frequency we tend to get badly out of sync with real time, so just delay for a reasonable amount of time. */ return 0; } else { return cpu_get_icount() - cpu_... |
1 | static int unpack_parse_unit(DiracParseUnit *pu, DiracParseContext *pc, int offset){ uint8_t *start = pc->buffer + offset; uint8_t *end = pc->buffer + pc->index; if (start < pc->buffer || (start + 13 > end)) return 0; pu->pu_type = start[4]; pu->next_pu_offset = AV_RB32(start + 5); pu->prev_pu_offset = AV_RB32(start + ... |
1 | int qcow2_get_refcount(BlockDriverState *bs, int64_t cluster_index, uint64_t *refcount){ BDRVQcowState *s = bs->opaque; uint64_t refcount_table_index, block_index; int64_t refcount_block_offset; int ret; uint16_t *refcount_block; refcount_table_index = cluster_index >> s->refcount_block_bits; if (refcount_table_index >... |
1 | static int protocol_client_auth_vnc(VncState *vs, uint8_t *data, size_t len){ unsigned char response[VNC_AUTH_CHALLENGE_SIZE]; size_t i, pwlen; unsigned char key[8]; time_t now = time(NULL); QCryptoCipher *cipher = NULL; Error *err = NULL; if (!vs->vd->password) { VNC_DEBUG("No password configured on server"); goto rej... |
1 | QapiDeallocVisitor *qapi_dealloc_visitor_new(void){ QapiDeallocVisitor *v; v = g_malloc0(sizeof(*v)); v->visitor.start_struct = qapi_dealloc_start_struct; v->visitor.end_struct = qapi_dealloc_end_struct; v->visitor.start_implicit_struct = qapi_dealloc_start_implicit_struct; v->visitor.end_implicit_struct = qapi_dealloc... |
1 | static void test_qemu_strtoll_empty(void){ const char *str = ""; char f = 'X'; const char *endptr = &f; int64_t res = 999; int err; err = qemu_strtoll(str, &endptr, 0, &res); g_assert_cmpint(err, ==, 0); g_assert_cmpint(res, ==, 0); g_assert(endptr == str);} |
1 | static void adb_kbd_realizefn(DeviceState *dev, Error **errp){ ADBKeyboardClass *akc = ADB_KEYBOARD_GET_CLASS(dev); akc->parent_realize(dev, errp); qemu_input_handler_register(dev, &adb_keyboard_handler);} |
1 | static int h264_init_context(AVCodecContext *avctx, H264Context *h){ int i; h->avctx = avctx; h->picture_structure = PICT_FRAME; h->workaround_bugs = avctx->workaround_bugs; h->flags = avctx->flags; h->poc.prev_poc_msb = 1 << 16; h->recovery_frame = -1; h->frame_recovered = 0; h->next_outputed_poc = INT_MIN; for (i = 0... |
0 | static int xcbgrab_reposition(AVFormatContext *s, xcb_query_pointer_reply_t *p, xcb_get_geometry_reply_t *geo){ XCBGrabContext *c = s->priv_data; int x = c->x, y = c->y, p_x = p->win_x, p_y = p->win_y; int w = c->width, h = c->height, f = c->follow_mouse; if (!p || !geo) return AVERROR(EIO); if (f == FOLLOW_CENTER) { x... |
1 | clk_setup_cb cpu_ppc_tb_init (CPUPPCState *env, uint32_t freq){ PowerPCCPU *cpu = ppc_env_get_cpu(env); ppc_tb_t *tb_env; tb_env = g_malloc0(sizeof(ppc_tb_t)); env->tb_env = tb_env; tb_env->flags = PPC_DECR_UNDERFLOW_TRIGGERED; if (env->insns_flags & PPC_SEGMENT_64B) { /* All Book3S 64bit CPUs implement level based DEC... |
1 | static int tscc2_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt){ const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; TSCC2Context *c = avctx->priv_data; GetByteContext gb; uint32_t frame_type, size; int i, val, len, pos = 0; int num_mb = c->mb_width * c->mb_height; int ret; b... |
1 | static void test_ide_mbr(bool use_device, MBRcontents mbr){ char *argv[256]; int argc; Backend i; const char *dev; argc = setup_common(argv, ARRAY_SIZE(argv)); for (i = 0; i < backend_last; i++) { cur_ide[i] = &hd_chst[i][mbr]; dev = use_device ? (is_hd(cur_ide[i]) ? "ide-hd" : "ide-cd") : NULL; argc = setup_ide(argc, ... |
1 | static int ram_save_block(QEMUFile *f, bool last_stage){ RAMBlock *block = last_seen_block; ram_addr_t offset = last_offset; bool complete_round = false; int bytes_sent = 0; MemoryRegion *mr; ram_addr_t current_addr; if (!block) block = QTAILQ_FIRST(&ram_list.blocks); while (true) { mr = block->mr; offset = migration_b... |
1 | static inline void RENAME(rgb32tobgr15)(const uint8_t *src, uint8_t *dst, unsigned src_size){const uint8_t *s = src;const uint8_t *end;#ifdef HAVE_MMXconst uint8_t *mm_end;#endifuint16_t *d = (uint16_t *)dst;end = s + src_size;#ifdef HAVE_MMX__asm __volatile(PREFETCH"%0"::"m"(*src):"memory");__asm __volatile( "movq%0, ... |
1 | static int vp3_decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size){ Vp3DecodeContext *s = avctx->priv_data; GetBitContext gb; static int counter = 0; *data_size = 0; init_get_bits(&gb, buf, buf_size * 8); s->keyframe = get_bits(&gb, 1); s->keyframe ^= 1; skip_bits(&gb, 1); s->las... |
1 | static int ccid_handle_bulk_out(USBCCIDState *s, USBPacket *p){ CCID_Header *ccid_header; if (p->len + s->bulk_out_pos > BULK_OUT_DATA_SIZE) { return USB_RET_STALL; } ccid_header = (CCID_Header *)s->bulk_out_data; memcpy(s->bulk_out_data + s->bulk_out_pos, p->data, p->len); s->bulk_out_pos += p->len; if (p->len == CCID... |
1 | static int vp9_alloc_frame(AVCodecContext *ctx, VP9Frame *f){ VP9Context *s = ctx->priv_data; int ret, sz; if ((ret = ff_thread_get_buffer(ctx, &f->tf, AV_GET_BUFFER_FLAG_REF)) < 0) return ret; sz = 64 * s->sb_cols * s->sb_rows; if (!(f->extradata = av_buffer_allocz(sz * (1 + sizeof(struct VP9mvrefPair))))) { ff_thread... |
1 | static int usbredir_handle_bulk_data(USBRedirDevice *dev, USBPacket *p, uint8_t ep){ AsyncURB *aurb = async_alloc(dev, p); struct usb_redir_bulk_packet_header bulk_packet; DPRINTF("bulk-out ep %02X len %d id %u\n", ep, p->len, aurb->packet_id); bulk_packet.endpoint = ep; bulk_packet.length = p->len; bulk_packet.stream_... |
1 | void do_info_vnc(void){ if (vnc_state == NULL)term_printf("VNC server disabled\n"); else {term_printf("VNC server active on: ");term_print_filename(vnc_state->display);term_printf("\n");if (vnc_state->csock == -1) term_printf("No client connected\n");else term_printf("Client connected\n"); }} |
0 | static int read_frame_internal(AVFormatContext *s, AVPacket *pkt){ int ret = 0, i, got_packet = 0; AVDictionary *metadata = NULL; av_init_packet(pkt); while (!got_packet && !s->parse_queue) { AVStream *st; AVPacket cur_pkt; /* read next packet */ ret = ff_read_packet(s, &cur_pkt); if (ret < 0) { if (ret == AVERROR(EAGA... |
0 | void ff_hevcdsp_init_x86(HEVCDSPContext *c, const int bit_depth){ int mm_flags = av_get_cpu_flags(); if (bit_depth == 8) { if (EXTERNAL_MMX(mm_flags)) { if (EXTERNAL_MMXEXT(mm_flags)) { if (EXTERNAL_SSSE3(mm_flags) && ARCH_X86_64) { EPEL_LINKS(c->put_hevc_epel, 0, 0, pel_pixels, 8); EPEL_LINKS(c->put_hevc_epel, 0, 1, e... |
0 | static void postfilter(EVRCContext *e, float *in, const float *coeff, float *out, int idx, const struct PfCoeff *pfc, int length){ float wcoef1[FILTER_ORDER], wcoef2[FILTER_ORDER], scratch[SUBFRAME_SIZE], temp[SUBFRAME_SIZE], mem[SUBFRAME_SIZE]; float sum1 = 0.0, sum2 = 0.0, gamma, gain; float tilt = pfc->tilt; int i, ... |
0 | int ff_get_best_fcode(MpegEncContext * s, int16_t (*mv_table)[2], int type){ int f_code; if(s->me_method>=ME_EPZS){ int mv_num[8]; int i, y; int loose=0; UINT8 * fcode_tab= s->fcode_tab; for(i=0; i<8; i++) mv_num[i]=0; for(y=0; y<s->mb_height; y++){ int x; int xy= (y+1)* (s->mb_width+2) + 1; i= y*s->mb_width; for(x=0; ... |
0 | static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom){ AVStream *st; MOVStreamContext *sc; unsigned int i, entries; int64_t duration=0; int64_t total_sample_count=0; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc->nb_streams-1]; sc = st->priv_data; avio_r8(pb); /* version */ avio_rb24(p... |
0 | static void start_frame(AVFilterLink *link, AVFilterPicRef *picref){ CropContext *crop = link->dst->priv; AVFilterPicRef *ref2 = avfilter_ref_pic(picref, ~0); int i; ref2->w = crop->w; ref2->h = crop->h; ref2->data[0] += crop->y * ref2->linesize[0]; ref2->data[0] += (crop->x * crop->bpp) >> 3; if (link->format != PIX_F... |
1 | static void lsi_execute_script(LSIState *s){ uint32_t insn; uint32_t addr; int opcode; s->istat1 |= LSI_ISTAT1_SRUN;again: insn = read_dword(s, s->dsp); addr = read_dword(s, s->dsp + 4); DPRINTF("SCRIPTS dsp=%08x opcode %08x arg %08x\n", s->dsp, insn, addr); s->dsps = addr; s->dcmd = insn >> 24; s->dsp += 8; switch (in... |
1 | static void handle_arg_cpu(const char *arg){ cpu_model = strdup(arg); if (cpu_model == NULL || strcmp(cpu_model, "?") == 0) { /* XXX: implement xxx_cpu_list for targets that still miss it */#if defined(cpu_list_id) cpu_list_id(stdout, &fprintf, "");#elif defined(cpu_list) cpu_list(stdout, &fprintf); /* deprecated */#en... |
1 | static int run_test(AVCodec *enc, AVCodec *dec, AVCodecContext *enc_ctx, AVCodecContext *dec_ctx){ AVPacket enc_pkt; AVFrame *in_frame, *out_frame; uint8_t *raw_in = NULL, *raw_out = NULL; int in_offset = 0, out_offset = 0; int frame_data_size = 0; int result = 0; int got_output = 0; int i = 0; in_frame = av_frame_allo... |
1 | static av_cold int pcm_encode_init(AVCodecContext *avctx){ avctx->frame_size = 0; switch(avctx->codec->id) { case CODEC_ID_PCM_ALAW: pcm_alaw_tableinit(); break; case CODEC_ID_PCM_MULAW: pcm_ulaw_tableinit(); break; default: break; } avctx->bits_per_coded_sample = av_get_bits_per_sample(avctx->codec->id); avctx->block_... |
1 | static int vorbis_encode_frame(AVCodecContext *avccontext, unsigned char *packets, int buf_size, void *data){ vorbis_enc_context *venc = avccontext->priv_data; const signed short *audio = data; int samples = data ? avccontext->frame_size : 0; vorbis_enc_mode *mode; vorbis_enc_mapping *mapping; PutBitContext pb; int i; ... |
1 | void net_tx_pkt_init(struct NetTxPkt **pkt, PCIDevice *pci_dev, uint32_t max_frags, bool has_virt_hdr){ struct NetTxPkt *p = g_malloc0(sizeof *p); p->pci_dev = pci_dev; p->vec = g_malloc((sizeof *p->vec) * (max_frags + NET_TX_PKT_PL_START_FRAG)); p->raw = g_malloc((sizeof *p->raw) * max_frags); p->max_payload_frags = m... |
1 | static int xen_pt_cmd_reg_write(XenPCIPassthroughState *s, XenPTReg *cfg_entry, uint16_t *val, uint16_t dev_value, uint16_t valid_mask){ XenPTRegInfo *reg = cfg_entry->reg; uint16_t writable_mask = 0; uint16_t throughable_mask = 0; uint16_t emu_mask = reg->emu_mask; if (s->is_virtfn) { emu_mask |= PCI_COMMAND_MEMORY; }... |
0 | static int rv34_decode_cbp(GetBitContext *gb, RV34VLC *vlc, int table){ int pattern, code, cbp=0; int ones; static const int cbp_masks[3] = {0x100000, 0x010000, 0x110000}; static const int shifts[4] = { 0, 2, 8, 10 }; const int *curshift = shifts; int i, t, mask; code = get_vlc2(gb, vlc->cbppattern[table].table, 9, 2);... |
1 | static int mtv_read_header(AVFormatContext *s){ MTVDemuxContext *mtv = s->priv_data; AVIOContext *pb = s->pb; AVStream *st; unsigned int audio_subsegments; avio_skip(pb, 3); mtv->file_size = avio_rl32(pb); mtv->segments = avio_rl32(pb); avio_skip(pb, 32); mtv->audio_identifier = avio_rl24(pb); mtv->audio_br = avio_rl16... |
1 | static int check_refcounts_l2(BlockDriverState *bs, uint16_t *refcount_table, int refcount_table_size, int64_t l2_offset, int check_copied){ BDRVQcowState *s = bs->opaque; uint64_t *l2_table, offset; int i, l2_size, nb_csectors, refcount; int errors = 0; /* Read L2 table from disk */ l2_size = s->l2_size * sizeof(uint6... |
0 | static int bink_decode_plane(BinkContext *c, AVFrame *frame, GetBitContext *gb, int plane_idx, int is_chroma){ int blk, ret; int i, j, bx, by; uint8_t *dst, *prev, *ref, *ref_start, *ref_end; int v, col[2]; const uint8_t *scan; int xoff, yoff; LOCAL_ALIGNED_16(int16_t, block, [64]); LOCAL_ALIGNED_16(uint8_t, ublock, [6... |
1 | static void unterminated_string(void){ QObject *obj = qobject_from_json("\"abc", NULL); g_assert(obj == NULL);} |
1 | int kvm_coalesce_mmio_region(target_phys_addr_t start, ram_addr_t size){ int ret = -ENOSYS;#ifdef KVM_CAP_COALESCED_MMIO KVMState *s = kvm_state; if (s->coalesced_mmio) { struct kvm_coalesced_mmio_zone zone; zone.addr = start; zone.size = size; ret = kvm_vm_ioctl(s, KVM_REGISTER_COALESCED_MMIO, &zone); }#endif return r... |
1 | void do_srad (void){ int64_t ret; if (likely(!(T1 & 0x40UL))) { if (likely((uint64_t)T1 != 0)) { ret = (int64_t)T0 >> (T1 & 0x3FUL); if (likely(ret >= 0 || ((int64_t)T0 & ((1 << T1) - 1)) == 0)) { xer_ca = 0; } else { xer_ca = 1; } } else { ret = T0; xer_ca = 0; } } else { ret = (-1) * ((uint64_t)T0 >> 63); if (likely(... |
1 | static void test_visitor_in_errors(TestInputVisitorData *data, const void *unused){ TestStruct *p = NULL; Error *err = NULL; Visitor *v; v = visitor_input_test_init(data, "{ 'integer': false, 'boolean': 'foo', 'string': -42 }"); visit_type_TestStruct(v, &p, NULL, &err); error_free_or_abort(&err); /* FIXME - a failed pa... |
0 | static int wmavoice_decode_packet(AVCodecContext *ctx, void *data, int *got_frame_ptr, AVPacket *avpkt){ WMAVoiceContext *s = ctx->priv_data; GetBitContext *gb = &s->gb; int size, res, pos; /* Packets are sometimes a multiple of ctx->block_align, with a packet * header at each ctx->block_align bytes. However, FFmpeg's ... |
0 | static int mov_read_packet(AVFormatContext *s, AVPacket *pkt){ MOVContext *mov = s->priv_data; MOVStreamContext *sc; AVIndexEntry *sample; AVStream *st = NULL; int ret; mov->fc = s; retry: sample = mov_find_next_sample(s, &st); if (!sample) { mov->found_mdat = 0; if (!mov->next_root_atom) return AVERROR_EOF; avio_seek(... |
0 | static int test_vector_fmac_scalar(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, const float *v1, const float *src0, float scale){ LOCAL_ALIGNED(32, float, cdst, [LEN]); LOCAL_ALIGNED(32, float, odst, [LEN]); int ret; memcpy(cdst, v1, LEN * sizeof(*v1)); memcpy(odst, v1, LEN * sizeof(*v1)); cdsp->vector_fmac_scalar... |
1 | static void add_pc_test_cases(void){ QDict *response, *minfo; QList *list; const QListEntry *p; QObject *qobj; QString *qstr; const char *mname, *path; PCTestData *data; qtest_start("-machine none"); response = qmp("{ 'execute': 'query-machines' }"); g_assert(response); list = qdict_get_qlist(response, "return"); g_ass... |
1 | static void test_qga_set_time(gconstpointer fix){ const TestFixture *fixture = fix; QDict *ret; int64_t current, time; gchar *cmd; /* get current time */ ret = qmp_fd(fixture->fd, "{'execute': 'guest-get-time'}"); g_assert_nonnull(ret); qmp_assert_no_error(ret); current = qdict_get_int(ret, "return"); g_assert_cmpint(c... |
1 | static void bus_set_realized(Object *obj, bool value, Error **errp){ BusState *bus = BUS(obj); BusClass *bc = BUS_GET_CLASS(bus); Error *local_err = NULL; if (value && !bus->realized) { if (bc->realize) { bc->realize(bus, &local_err); } } else if (!value && bus->realized) { if (bc->unrealize) { bc->unrealize(bus, &loca... |
1 | static inline void asv2_encode_block(ASV1Context *a, int16_t block[64]){ int i; int count = 0; for (count = 63; count > 3; count--) { const int index = ff_asv_scantab[count]; if ((block[index] * a->q_intra_matrix[index] + (1 << 15)) >> 16) break; } count >>= 2; asv2_put_bits(&a->pb, 4, count); asv2_put_bits(&a->pb, 8, ... |
1 | static void gen_tlbilx_booke206(DisasContext *ctx){#if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);#else TCGv t0; if (unlikely(ctx->pr)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); return; } t0 = tcg_temp_new(); gen_addr_reg_index(ctx, t0); switch((ctx->opcode >> 21) & 0x3) { case 0... |
1 | static void probe_codec(AVFormatContext *s, AVStream *st, const AVPacket *pkt){ if(st->request_probe>0){ AVProbeData *pd = &st->probe_data; int end; av_log(s, AV_LOG_DEBUG, "probing stream %d pp:%d\n", st->index, st->probe_packets); --st->probe_packets; if (pkt) { pd->buf = av_realloc(pd->buf, pd->buf_size+pkt->size+AV... |
1 | static void pci_basic(void){ QVirtioPCIDevice *dev; QPCIBus *bus; QVirtQueuePCI *vqpci; QGuestAllocator *alloc; void *addr; bus = pci_test_start(); dev = virtio_blk_pci_init(bus, PCI_SLOT); alloc = pc_alloc_init(); vqpci = (QVirtQueuePCI *)qvirtqueue_setup(&qvirtio_pci, &dev->vdev, alloc, 0); /* MSI-X is not enabled */... |
0 | static void gen_spr_440 (CPUPPCState *env){ /* Cache control */ /* XXX : not implemented */ spr_register(env, SPR_440_DNV0, "DNV0", SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, &spr_write_generic, 0x00000000); /* XXX : not implemented */ spr_register(env, SPR_440_DNV1, "DNV1", SPR_NOACCESS, SPR_NOACCESS, &spr_read_ge... |
0 | static void get_cpuid_vendor(CPUX86State *env, uint32_t *ebx, uint32_t *ecx, uint32_t *edx){ *ebx = env->cpuid_vendor1; *edx = env->cpuid_vendor2; *ecx = env->cpuid_vendor3; /* sysenter isn't supported on compatibility mode on AMD, syscall * isn't supported in compatibility mode on Intel. * Normally we advertise the ac... |
0 | void qmp_blockdev_change_medium(const char *device, const char *filename, bool has_format, const char *format, bool has_read_only, BlockdevChangeReadOnlyMode read_only, Error **errp){ BlockBackend *blk; BlockDriverState *medium_bs = NULL; int bdrv_flags, ret; QDict *options = NULL; Error *err = NULL; blk = blk_by_name(... |
0 | static inline int ppcemb_tlb_check(CPUState *env, ppcemb_tlb_t *tlb, target_phys_addr_t *raddrp, target_ulong address, uint32_t pid, int ext, int i){ target_ulong mask; /* Check valid flag */ if (!(tlb->prot & PAGE_VALID)) { qemu_log("%s: TLB %d not valid\n", __func__, i); return -1; } mask = ~(tlb->size - 1); LOG_SWTL... |
0 | void ppc_slb_invalidate_one (CPUPPCState *env, uint64_t T0){ /* XXX: TODO */ tlb_flush(env, 1);} |
0 | static void validate_test_add(const char *testpath, TestInputVisitorData *data, void (*test_func)(TestInputVisitorData *data, const void *user_data)){ g_test_add(testpath, TestInputVisitorData, data, NULL, test_func, validate_teardown);} |
0 | static void omap_ulpd_pm_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size){ struct omap_mpu_state_s *s = (struct omap_mpu_state_s *) opaque; int64_t now, ticks; int div, mult; static const int bypass_div[4] = { 1, 2, 4, 4 }; uint16_t diff; if (size != 2) { return omap_badwidth_write16(opaque, ... |
0 | void cpu_dump_state (CPUState *env, FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...), int flags){#define RGPL 4#define RFPL 4 int i; cpu_fprintf(f, "NIP " ADDRX " LR " ADDRX " CTR " ADDRX " XER %08x\n", env->nip, env->lr, env->ctr, env->xer); cpu_fprintf(f, "MSR " ADDRX " HID0 " ADDRX " HF " ADDRX " idx %d\n"... |
0 | static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque){ UnsharpContext *unsharp = ctx->priv; int lmsize_x = 5, cmsize_x = 0; int lmsize_y = 5, cmsize_y = 0; double lamount = 1.0f, camount = 0.0f; if (args) sscanf(args, "%d:%d:%lf:%d:%d:%lf", &lmsize_x, &lmsize_y, &lamount, &cmsize_x, &cmsize_y, &... |
0 | int ff_h264_update_thread_context(AVCodecContext *dst, const AVCodecContext *src){ H264Context *h = dst->priv_data, *h1 = src->priv_data; int inited = h->context_initialized, err = 0; int need_reinit = 0; int i, ret; if (dst == src || !h1->context_initialized) return 0; if (!h1->ps.sps) return AVERROR_INVALIDDATA; if (... |
0 | static int find_partition(BlockDriverState *bs, int partition, off_t *offset, off_t *size){ struct partition_record mbr[4]; uint8_t data[512]; int i; int ext_partnum = 4; int ret; if ((ret = bdrv_read(bs, 0, data, 1)) < 0) { errno = -ret; err(EXIT_FAILURE, "error while reading"); } if (data[510] != 0x55 || data[511] !=... |
0 | static void thread_pool_cancel(BlockDriverAIOCB *acb){ ThreadPoolElement *elem = (ThreadPoolElement *)acb; ThreadPool *pool = elem->pool; trace_thread_pool_cancel(elem, elem->common.opaque); qemu_mutex_lock(&pool->lock); if (elem->state == THREAD_QUEUED && /* No thread has yet started working on elem. we can try to "st... |
0 | void qemu_fflush(QEMUFile *f){ if (!f->is_writable) return; if (f->buf_index > 0) { if (f->is_file) { fseek(f->outfile, f->buf_offset, SEEK_SET); fwrite(f->buf, 1, f->buf_index, f->outfile); } else { bdrv_pwrite(f->bs, f->base_offset + f->buf_offset, f->buf, f->buf_index); } f->buf_offset += f->buf_index; f->buf_index ... |
0 | uint64_t ram_bytes_transferred(void){ return bytes_transferred;} |
0 | static void qxl_spice_destroy_surface_wait(PCIQXLDevice *qxl, uint32_t id, qxl_async_io async){ if (async) {#if SPICE_INTERFACE_QXL_MINOR < 1 abort();#else spice_qxl_destroy_surface_async(&qxl->ssd.qxl, id, (uint64_t)id);#endif } else { qxl->ssd.worker->destroy_surface_wait(qxl->ssd.worker, id); qxl_spice_destroy_surfa... |
1 | static inline void copy_backptr(LZOContext *c, int back, int cnt){ register const uint8_t *src = &c->out[-back]; register uint8_t *dst = c->out; if (src < c->out_start || src > dst) { c->error |= AV_LZO_INVALID_BACKPTR; return; } if (cnt > c->out_end - dst) { cnt = FFMAX(c->out_end - dst, 0); c->error |= AV_LZO_OUTPUT_... |
1 | bool guest_validate_base(unsigned long guest_base){ return 1;} |
1 | static inline int mpeg1_decode_block_intra(MpegEncContext *s, int16_t *block, int n){ int level, dc, diff, i, j, run; int component; RLTable *rl = &ff_rl_mpeg1; uint8_t * const scantable = s->intra_scantable.permutated; const uint16_t *quant_matrix = s->intra_matrix; const int qscale = s->qscale; /* DC coefficient */ c... |
1 | int qemu_strtoull(const char *nptr, const char **endptr, int base, uint64_t *result){ char *p; int err = 0; if (!nptr) { if (endptr) { *endptr = nptr; } err = -EINVAL; } else { errno = 0; *result = strtoull(nptr, &p, base); err = check_strtox_error(endptr, p, errno); } return err;} |
1 | static void gen_rac(DisasContext *ctx){#if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);#else TCGv t0; if (unlikely(ctx->pr)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); return; } t0 = tcg_temp_new(); gen_addr_reg_index(ctx, t0); gen_helper_rac(cpu_gpr[rD(ctx->opcode)], cpu_env, t0);... |
1 | static void kvm_s390_stattrib_synchronize(S390StAttribState *sa){ KVMS390StAttribState *sas = KVM_S390_STATTRIB(sa); MachineState *machine = MACHINE(qdev_get_machine()); unsigned long max = machine->maxram_size / TARGET_PAGE_SIZE; unsigned long cx, len = 1 << 19; int r; struct kvm_s390_cmma_log clog = { .flags = 0, .ma... |
1 | static void handle_qmp_command(JSONMessageParser *parser, GQueue *tokens){ QObject *req, *rsp = NULL, *id = NULL; QDict *qdict = NULL; const char *cmd_name; Monitor *mon = cur_mon; Error *err = NULL; req = json_parser_parse_err(tokens, NULL, &err); if (!req && !err) { /* json_parser_parse_err() sucks: can fail without ... |
1 | static void test_blk_read(BlockBackend *blk, long pattern, int64_t pattern_offset, int64_t pattern_count, int64_t offset, int64_t count, bool expect_failed){ void *pattern_buf = NULL; QEMUIOVector qiov; void *cmp_buf = NULL; int async_ret = NOT_DONE; if (pattern) { cmp_buf = g_malloc(pattern_count); memset(cmp_buf, pat... |
1 | int ff_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx, H264ParamSets *ps, int ignore_truncation){ AVBufferRef *sps_buf; int profile_idc, level_idc, constraint_set_flags = 0; unsigned int sps_id; int i, log2_max_frame_num_minus4; SPS *sps; sps_buf = av_buffer_allocz(sizeof(*sps)); if (!sps_buf) r... |
1 | static int vhost_user_start(VhostUserState *s){ VhostNetOptions options; if (vhost_user_running(s)) { return 0; } options.backend_type = VHOST_BACKEND_TYPE_USER; options.net_backend = &s->nc; options.opaque = s->chr; options.force = true; s->vhost_net = vhost_net_init(&options); return vhost_user_running(s) ? 0 : -1;} |
1 | FWCfgState *fw_cfg_init_mem_wide(hwaddr ctl_addr, hwaddr data_addr, uint32_t data_width, hwaddr dma_addr, AddressSpace *dma_as){ DeviceState *dev; SysBusDevice *sbd; FWCfgState *s; bool dma_requested = dma_addr && dma_as; dev = qdev_create(NULL, TYPE_FW_CFG_MEM); qdev_prop_set_uint32(dev, "data_width", data_width); if ... |
1 | static int protocol_client_auth_sasl_step(VncState *vs, uint8_t *data, size_t len){ uint32_t datalen = len; const char *serverout; unsigned int serveroutlen; int err; char *clientdata = NULL; /* NB, distinction of NULL vs "" is *critical* in SASL */ if (datalen) { clientdata = (char*)data; clientdata[datalen-1] = '\0';... |
1 | static void sdl_switch(DisplayChangeListener *dcl, DisplaySurface *new_surface){ PixelFormat pf = qemu_pixelformat_from_pixman(new_surface->format); /* temporary hack: allows to call sdl_switch to handle scaling changes */ if (new_surface) { surface = new_surface; } if (!scaling_active) { do_sdl_resize(surface_width(su... |
1 | static inline uint16_t mipsdsp_sat16_sub(int16_t a, int16_t b, CPUMIPSState *env){ int16_t temp; temp = a - b; if (MIPSDSP_OVERFLOW(a, -b, temp, 0x8000)) { if (a > 0) { temp = 0x7FFF; } else { temp = 0x8000; } set_DSPControl_overflow_flag(1, 20, env); } return temp;} |
1 | void vhost_net_ack_features(struct vhost_net *net, unsigned features){ vhost_ack_features(&net->dev, vhost_net_get_feature_bits(net), features);} |
1 | void scsi_req_unref(SCSIRequest *req){ assert(req->refcount > 0); if (--req->refcount == 0) { BusState *qbus = req->dev->qdev.parent_bus; SCSIBus *bus = DO_UPCAST(SCSIBus, qbus, qbus); if (bus->info->free_request && req->hba_private) { bus->info->free_request(bus, req->hba_private); } if (req->ops->free_req) { req->ops... |
1 | static void gen_tlbwe_440(DisasContext *ctx){#if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);#else if (unlikely(ctx->pr)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); return; } switch (rB(ctx->opcode)) { case 0: case 1: case 2: { TCGv_i32 t0 = tcg_const_i32(rB(ctx->opcode)); gen_help... |
1 | static void tcg_out_tlb_check (TCGContext *s, int r0, int r1, int r2, int addr_reg, int addr_reg2, int s_bits, int offset1, int offset2, uint8_t **label_ptr){ uint16_t retranst; tcg_out32 (s, (RLWINM | RA (r0) | RS (addr_reg) | SH (32 - (TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS)) | MB (32 - (CPU_TLB_BITS + CPU_TLB_ENTRY_B... |
1 | rgb48funcs(rgb, LE, PIX_FMT_RGB48LE)rgb48funcs(rgb, BE, PIX_FMT_RGB48BE)rgb48funcs(bgr, LE, PIX_FMT_BGR48LE)rgb48funcs(bgr, BE, PIX_FMT_BGR48BE)#define input_pixel(i) ((origin == PIX_FMT_RGBA || origin == PIX_FMT_BGRA || \ origin == PIX_FMT_ARGB || origin == PIX_FMT_ABGR) ? AV_RN32A(&src[(i)*4]) : \ (isBE(origin) ? AV_... |
1 | static void patch_reloc(tcg_insn_unit *code_ptr, int type, intptr_t value, intptr_t addend){ tcg_insn_unit *target; tcg_insn_unit old; value += addend; target = (tcg_insn_unit *)value; switch (type) { case R_PPC_REL14: reloc_pc14(code_ptr, target); break; case R_PPC_REL24: reloc_pc24(code_ptr, target); break; case R_PP... |
1 | static int decode_scalefactors(AACContext *ac, float sf[120], GetBitContext *gb, unsigned int global_gain, IndividualChannelStream *ics, enum BandType band_type[120], int band_type_run_end[120]){ int g, i, idx = 0; int offset[3] = { global_gain, global_gain - 90, 0 }; int clipped_offset; int noise_flag = 1; static cons... |
1 | void qdev_init_gpio_out_named(DeviceState *dev, qemu_irq *pins, const char *name, int n){ NamedGPIOList *gpio_list = qdev_get_named_gpio_list(dev, name); assert(gpio_list->num_in == 0 || !name); assert(gpio_list->num_out == 0); gpio_list->num_out = n; gpio_list->out = pins; |
1 | static av_always_inline int check_block(SnowContext *s, int mb_x, int mb_y, int p[3], int intra, const uint8_t *obmc_edged, int *best_rd){ const int b_stride= s->b_width << s->block_max_depth; BlockNode *block= &s->block[mb_x + mb_y * b_stride]; BlockNode backup= *block; int rd, index, value; assert(mb_x>=0 && mb_y>=0)... |
1 | static int vp3_decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size){ Vp3DecodeContext *s = avctx->priv_data; GetBitContext gb; static int counter = 0; int i; init_get_bits(&gb, buf, buf_size * 8); if (s->theora && get_bits1(&gb)) {#if 1 av_log(avctx, AV_LOG_ERROR, "Header packet p... |
1 | static int swScale(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]){ /* load a few things into local vars to make the code more readable? and faster */ const int srcW= c->srcW; const int dstW= c->dstW; const int dstH= c->dstH; const int chrDstW= c->chr... |
1 | void tcg_op_remove(TCGContext *s, TCGOp *op){ int next = op->next; int prev = op->prev; /* We should never attempt to remove the list terminator. */ tcg_debug_assert(op != &s->gen_op_buf[0]); s->gen_op_buf[next].prev = prev; s->gen_op_buf[prev].next = next; memset(op, 0, sizeof(*op));#ifdef CONFIG_PROFILER atomic_set(&... |
0 | static void avc_luma_midv_qrt_8w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height, uint8_t ver_offset){ uint32_t loop_cnt; v16i8 src0, src1, src2, src3, src4; v16i8 mask0, mask1, mask2; v8i16 hz_out0, hz_out1, hz_out2, hz_out3; v8i16 hz_out4, hz_out5, hz_out6, hz_out7, hz_out... |
0 | static int gif_parse_next_image(GifState *s){ for (;;) { int code = bytestream_get_byte(&s->bytestream);#ifdef DEBUG dprintf(s->avctx, "gif: code=%02x '%c'\n", code, code);#endif switch (code) { case ',': if (gif_read_image(s) < 0) return -1; return 0; case ';': /* end of image */ return -1; case '!': if (gif_read_exte... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.