label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
0 | e1000_can_receive(void *opaque) { E1000State *s = opaque; return (s->mac_reg[RCTL] & E1000_RCTL_EN); } | 22,734 |
0 | static uint32_t intel_hda_mmio_readl(void *opaque, target_phys_addr_t addr) { IntelHDAState *d = opaque; const IntelHDAReg *reg = intel_hda_reg_find(d, addr); return intel_hda_reg_read(d, reg, 0xffffffff); } | 22,735 |
0 | void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd) { if (backing_hd) { bdrv_ref(backing_hd); } if (bs->backing) { assert(bs->backing_blocker); bdrv_op_unblock_all(bs->backing->bs, bs->backing_blocker); bdrv_unref_child(bs, bs->backing); } else if (backing_hd) { error_setg(&bs->backing_blocker,... | 22,736 |
0 | void bdrv_parent_drained_end(BlockDriverState *bs) { BdrvChild *c; QLIST_FOREACH(c, &bs->parents, next_parent) { if (c->role->drained_end) { c->role->drained_end(c); } } } | 22,737 |
0 | static void virtio_ccw_crypto_instance_init(Object *obj) { VirtIOCryptoCcw *dev = VIRTIO_CRYPTO_CCW(obj); VirtioCcwDevice *ccw_dev = VIRTIO_CCW_DEVICE(obj); ccw_dev->force_revision_1 = true; virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev), TYPE_VIRTIO_CRYPTO); object_property_add_alias(obj, "cryptodev", ... | 22,738 |
1 | static void gen_bxx(DisasContext *dc, uint32_t code, uint32_t flags) { I_TYPE(instr, code); TCGLabel *l1 = gen_new_label(); tcg_gen_brcond_tl(flags, dc->cpu_R[instr.a], dc->cpu_R[instr.b], l1); gen_goto_tb(dc, 0, dc->pc + 4); gen_set_label(l1); gen_goto_tb(dc, 1, dc->pc + 4 + (instr.imm16s & -4)); dc->is_jmp = DISAS_TB... | 22,740 |
1 | static int flic_decode_frame_8BPP(AVCodecContext *avctx, void *data, int *got_frame, const uint8_t *buf, int buf_size) { FlicDecodeContext *s = avctx->priv_data; GetByteContext g2; int pixel_ptr; int palette_ptr; unsigned char palette_idx1; unsigned char palette_idx2; unsigned int frame_size; int num_chunks; unsigned i... | 22,742 |
1 | static void print_type_size(Visitor *v, const char *name, uint64_t *obj, Error **errp) { StringOutputVisitor *sov = to_sov(v); static const char suffixes[] = { 'B', 'K', 'M', 'G', 'T', 'P', 'E' }; uint64_t div, val; char *out; int i; if (!sov->human) { out = g_strdup_printf("%"PRIu64, *obj); string_output_set(sov, out)... | 22,743 |
1 | static int cmp_color(const void *a, const void *b) { const struct range_box *box1 = a; const struct range_box *box2 = b; return box1->color - box2->color; } | 22,744 |
1 | static void iommu_config_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { IOMMUState *is = opaque; IOMMU_DPRINTF("IOMMU config write: 0x%" HWADDR_PRIx " val: %" PRIx64 " size: %d\n", addr, val, size); switch (addr) { case IOMMU_CTRL: if (size == 4) { is->regs[IOMMU_CTRL >> 3] &= 0xffffffffULL; is->regs[I... | 22,745 |
1 | static void piix3_ide_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); k->no_hotplug = 1; k->init = pci_piix_ide_initfn; k->exit = pci_piix_ide_exitfn; k->vendor_id = PCI_VENDOR_ID_INTEL; k->device_id = PCI_DEVICE_ID_INTEL_82371SB_1; k->cla... | 22,746 |
0 | static void reconstruct_stereo_16(int32_t *buffer[MAX_CHANNELS], int16_t *buffer_out, int numchannels, int numsamples, uint8_t interlacing_shift, uint8_t interlacing_leftweight) { int i; if (numsamples <= 0) return; /* weighted interlacing */ if (interlacing_leftweight) { for (i = 0; i < numsamples; i++) { int32_t a, b... | 22,747 |
0 | av_cold void ff_vp9_init_static(AVCodec *codec) { if ( vpx_codec_version_major() < 1 || (vpx_codec_version_major() == 1 && vpx_codec_version_minor() < 3)) codec->capabilities |= AV_CODEC_CAP_EXPERIMENTAL; codec->pix_fmts = vp9_pix_fmts_def; #if CONFIG_LIBVPX_VP9_ENCODER if ( vpx_codec_version_major() > 1 || (vpx_codec_... | 22,748 |
0 | void ioinst_handle_rsch(S390CPU *cpu, uint64_t reg1) { int cssid, ssid, schid, m; SubchDev *sch; int ret = -ENODEV; int cc; if (ioinst_disassemble_sch_ident(reg1, &m, &cssid, &ssid, &schid)) { program_interrupt(&cpu->env, PGM_OPERAND, 2); return; } trace_ioinst_sch_id("rsch", cssid, ssid, schid); sch = css_find_subch(m... | 22,749 |
0 | int kvm_arch_process_irqchip_events(CPUState *env) { return 0; } | 22,750 |
0 | static void decode_tones_amplitude(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, int band_has_tones[]) { int mode, sb, j, i, diff, maxdiff, fi, delta, pred; Atrac3pWaveParam *wsrc, *wref; int refwaves[48]; Atrac3pWavesData *dst = ctx->channels[ch_num].tones_info; Atrac3pWavesData *ref = ctx->channels[0].tones... | 22,751 |
0 | static int vhost_net_set_vnet_endian(VirtIODevice *dev, NetClientState *peer, bool set) { int r = 0; if (virtio_has_feature(dev, VIRTIO_F_VERSION_1) || (virtio_legacy_is_cross_endian(dev) && !virtio_is_big_endian(dev))) { r = qemu_set_vnet_le(peer, set); if (r) { error_report("backend does not support LE vnet headers")... | 22,754 |
0 | static void virtio_net_add_queue(VirtIONet *n, int index) { VirtIODevice *vdev = VIRTIO_DEVICE(n); n->vqs[index].rx_vq = virtio_add_queue(vdev, n->net_conf.rx_queue_size, virtio_net_handle_rx); if (n->net_conf.tx && !strcmp(n->net_conf.tx, "timer")) { n->vqs[index].tx_vq = virtio_add_queue(vdev, 256, virtio_net_handle_... | 22,755 |
0 | int virtqueue_avail_bytes(VirtQueue *vq, unsigned int in_bytes, unsigned int out_bytes) { unsigned int in_total, out_total; virtqueue_get_avail_bytes(vq, &in_total, &out_total); if ((in_bytes && in_bytes < in_total) || (out_bytes && out_bytes < out_total)) { return 1; } return 0; } | 22,756 |
0 | static always_inline void gen_load_spr(TCGv t, int reg) { tcg_gen_ld_tl(t, cpu_env, offsetof(CPUState, spr[reg])); } | 22,757 |
0 | void *qemu_aio_get(const AIOCBInfo *aiocb_info, BlockDriverState *bs, BlockCompletionFunc *cb, void *opaque) { BlockAIOCB *acb; acb = g_slice_alloc(aiocb_info->aiocb_size); acb->aiocb_info = aiocb_info; acb->bs = bs; acb->cb = cb; acb->opaque = opaque; acb->refcnt = 1; return acb; } | 22,758 |
0 | char *socket_address_to_string(struct SocketAddress *addr, Error **errp) { char *buf; InetSocketAddress *inet; switch (addr->type) { case SOCKET_ADDRESS_KIND_INET: inet = addr->u.inet.data; if (strchr(inet->host, ':') == NULL) { buf = g_strdup_printf("%s:%s", inet->host, inet->port); } else { buf = g_strdup_printf("[%s... | 22,760 |
0 | static int local_mkdir(FsContext *fs_ctx, V9fsPath *dir_path, const char *name, FsCred *credp) { char *path; int err = -1; int serrno = 0; V9fsString fullname; char buffer[PATH_MAX]; v9fs_string_init(&fullname); v9fs_string_sprintf(&fullname, "%s/%s", dir_path->data, name); path = fullname.data; /* Determine the securi... | 22,761 |
0 | int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, const AVPacket *avpkt) { AVCodecInternal *avci = avctx->internal; int ret; // copy to ensure we do not change avpkt AVPacket tmp = *avpkt; if (!avctx->codec) return AVERROR(EINVAL); if (avctx->codec->type != AVM... | 22,762 |
0 | static void blk_mig_cleanup(Monitor *mon) { BlkMigDevState *bmds; BlkMigBlock *blk; set_dirty_tracking(0); while ((bmds = QSIMPLEQ_FIRST(&block_mig_state.bmds_list)) != NULL) { QSIMPLEQ_REMOVE_HEAD(&block_mig_state.bmds_list, entry); bdrv_set_in_use(bmds->bs, 0); drive_put_ref(drive_get_by_blockdev(bmds->bs)); g_free(b... | 22,763 |
0 | void ram_control_load_hook(QEMUFile *f, uint64_t flags) { int ret = 0; if (f->ops->hook_ram_load) { ret = f->ops->hook_ram_load(f, f->opaque, flags); if (ret < 0) { qemu_file_set_error(f, ret); } } else { qemu_file_set_error(f, ret); } } | 22,764 |
0 | static void usb_host_handle_destroy(USBDevice *udev) { USBHostDevice *s = USB_HOST_DEVICE(udev); qemu_remove_exit_notifier(&s->exit); QTAILQ_REMOVE(&hostdevs, s, next); usb_host_close(s); } | 22,765 |
0 | static void *qpa_thread_out (void *arg) { PAVoiceOut *pa = arg; HWVoiceOut *hw = &pa->hw; int threshold; threshold = conf.divisor ? hw->samples / conf.divisor : 0; if (audio_pt_lock (&pa->pt, AUDIO_FUNC)) { return NULL; } for (;;) { int decr, to_mix, rpos; for (;;) { if (pa->done) { goto exit; } if (pa->live > threshol... | 22,766 |
0 | static void bench_undrained_flush_cb(void *opaque, int ret) { if (ret < 0) { error_report("Failed flush request: %s\n", strerror(-ret)); exit(EXIT_FAILURE); } } | 22,767 |
0 | static uint32_t nabm_readw (void *opaque, uint32_t addr) { PCIAC97LinkState *d = opaque; AC97LinkState *s = &d->ac97; AC97BusMasterRegs *r = NULL; uint32_t index = addr - s->base[1]; uint32_t val = ~0U; switch (index) { case PI_SR: case PO_SR: case MC_SR: r = &s->bm_regs[GET_BM (index)]; val = r->sr; dolog ("SR[%d] -> ... | 22,768 |
0 | static int ehci_state_executing(EHCIQueue *q, int async) { int again = 0; int reload, nakcnt; ehci_execute_complete(q); if (q->usb_status == USB_RET_ASYNC) { goto out; } if (q->usb_status == USB_RET_PROCERR) { again = -1; goto out; } // 4.10.3 if (!async) { int transactCtr = get_field(q->qh.epcap, QH_EPCAP_MULT); trans... | 22,769 |
0 | static void gd_change_page(GtkNotebook *nb, gpointer arg1, guint arg2, gpointer data) { GtkDisplayState *s = data; VirtualConsole *vc; gboolean on_vga; if (!gtk_widget_get_realized(s->notebook)) { return; } vc = gd_vc_find_by_page(s, arg2); if (!vc) { return; } gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(vc->men... | 22,770 |
0 | static void address_space_update_topology(AddressSpace *as) { FlatView *old_view = as->current_map; FlatView *new_view = generate_memory_topology(as->root); address_space_update_topology_pass(as, old_view, new_view, false); address_space_update_topology_pass(as, old_view, new_view, true); as->current_map = new_view; fl... | 22,771 |
0 | static void ptimer_reload(ptimer_state *s) { if (s->delta == 0) { ptimer_trigger(s); s->delta = s->limit; } if (s->delta == 0 || s->period == 0) { fprintf(stderr, "Timer with period zero, disabling\n"); s->enabled = 0; return; } s->last_event = s->next_event; s->next_event = s->last_event + s->delta * s->period; if (s-... | 22,772 |
0 | static int init(AVFilterContext *ctx, const char *args, void *opaque) { GraphContext *gctx = ctx->priv; if(!args) return 0; if(!(gctx->link_filter = avfilter_open(&vf_graph_dummy, NULL))) return -1; if(avfilter_init_filter(gctx->link_filter, NULL, ctx)) goto fail; return graph_load_chain_from_string(ctx, args, NULL, NU... | 22,773 |
0 | void kvm_arch_init_irq_routing(KVMState *s) { if (!kvm_check_extension(s, KVM_CAP_IRQ_ROUTING)) { /* If kernel can't do irq routing, interrupt source * override 0->2 cannot be set up as required by HPET. * So we have to disable it. */ no_hpet = 1; } /* We know at this point that we're using the in-kernel * irqchip, so ... | 22,776 |
0 | static void output_visitor_test_add(const char *testpath, TestOutputVisitorData *data, void (*test_func)(TestOutputVisitorData *data, const void *user_data)) { g_test_add(testpath, TestOutputVisitorData, data, visitor_output_setup, test_func, visitor_output_teardown); } | 22,777 |
0 | void cpu_loop (CPUState *env) { int trapnr; target_siginfo_t info; while (1) { trapnr = cpu_alpha_exec (env); switch (trapnr) { case EXCP_RESET: fprintf(stderr, "Reset requested. Exit\n"); exit(1); break; case EXCP_MCHK: fprintf(stderr, "Machine check exception. Exit\n"); exit(1); break; case EXCP_ARITH: fprintf(stderr... | 22,778 |
0 | int rom_load_all(void) { target_phys_addr_t addr = 0; MemoryRegionSection section; Rom *rom; QTAILQ_FOREACH(rom, &roms, next) { if (rom->fw_file) { continue; } if (addr > rom->addr) { fprintf(stderr, "rom: requested regions overlap " "(rom %s. free=0x" TARGET_FMT_plx ", addr=0x" TARGET_FMT_plx ")\n", rom->name, addr, r... | 22,779 |
0 | static int alsa_init_in (HWVoiceIn *hw, audsettings_t *as) { ALSAVoiceIn *alsa = (ALSAVoiceIn *) hw; struct alsa_params_req req; struct alsa_params_obt obt; snd_pcm_t *handle; audsettings_t obt_as; req.fmt = aud_to_alsafmt (as->fmt); req.freq = as->freq; req.nchannels = as->nchannels; req.period_size = conf.period_size... | 22,780 |
0 | static void rtas_power_off(sPAPREnvironment *spapr, uint32_t token, uint32_t nargs, target_ulong args, uint32_t nret, target_ulong rets) { if (nargs != 2 || nret != 1) { rtas_st(rets, 0, -3); return; } qemu_system_shutdown_request(); rtas_st(rets, 0, 0); } | 22,781 |
0 | static uint64_t omap_id_read(void *opaque, target_phys_addr_t addr, unsigned size) { struct omap_mpu_state_s *s = (struct omap_mpu_state_s *) opaque; if (size != 4) { return omap_badwidth_read32(opaque, addr); } switch (addr) { case 0xfffe1800: /* DIE_ID_LSB */ return 0xc9581f0e; case 0xfffe1804: /* DIE_ID_MSB */ retur... | 22,782 |
0 | ram_addr_t xen_ram_addr_from_mapcache(void *ptr) { MapCacheEntry *entry = NULL; MapCacheRev *reventry; hwaddr paddr_index; hwaddr size; int found = 0; QTAILQ_FOREACH(reventry, &mapcache->locked_entries, next) { if (reventry->vaddr_req == ptr) { paddr_index = reventry->paddr_index; size = reventry->size; found = 1; brea... | 22,783 |
0 | static void hpdmc_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size) { MilkymistHpdmcState *s = opaque; trace_milkymist_hpdmc_memory_write(addr, value); addr >>= 2; switch (addr) { case R_SYSTEM: case R_BYPASS: case R_TIMING: s->regs[addr] = value; break; case R_IODELAY: /* ignore writes */ bre... | 22,784 |
0 | static int write_elf32_note(DumpState *s) { target_phys_addr_t begin = s->memory_offset - s->note_size; Elf32_Phdr phdr; int endian = s->dump_info.d_endian; int ret; memset(&phdr, 0, sizeof(Elf32_Phdr)); phdr.p_type = cpu_convert_to_target32(PT_NOTE, endian); phdr.p_offset = cpu_convert_to_target32(begin, endian); phdr... | 22,785 |
0 | int rom_add_vga(const char *file) { if (!rom_enable_driver_roms) return 0; return rom_add_file(file, "vgaroms", file, 0); } | 22,786 |
0 | static void external_snapshot_prepare(BlkActionState *common, Error **errp) { int flags = 0, ret; QDict *options = NULL; Error *local_err = NULL; /* Device and node name of the image to generate the snapshot from */ const char *device; const char *node_name; /* Reference to the new image (for 'blockdev-snapshot') */ co... | 22,788 |
0 | void helper_ldl_data(uint64_t t0, uint64_t t1) { ldl_data(t1, t0); } | 22,789 |
0 | matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, int size, int64_t pos, uint64_t cluster_time, int is_keyframe, int *ptrack, AVPacket **ppkt) { int res = 0; int track; AVPacket *pkt; uint8_t *origdata = data; int16_t block_time; uint32_t *lace_size = NULL; int n, flags, laces = 0; uint64_t num; /* fi... | 22,790 |
0 | Visitor *qmp_input_visitor_new(QObject *obj, bool strict) { QmpInputVisitor *v; assert(obj); v = g_malloc0(sizeof(*v)); v->visitor.type = VISITOR_INPUT; v->visitor.start_struct = qmp_input_start_struct; v->visitor.check_struct = qmp_input_check_struct; v->visitor.end_struct = qmp_input_pop; v->visitor.start_list = qmp_... | 22,791 |
0 | static gboolean tcp_chr_accept(QIOChannel *channel, GIOCondition cond, void *opaque) { CharDriverState *chr = opaque; TCPCharDriver *s = chr->opaque; QIOChannelSocket *sioc; sioc = qio_channel_socket_accept(QIO_CHANNEL_SOCKET(channel), NULL); if (!sioc) { return TRUE; } if (s->do_telnetopt) { tcp_chr_telnet_init(QIO_CH... | 22,792 |
0 | void qemu_timer_notify_cb(void *opaque, QEMUClockType type) { qemu_notify_event(); } | 22,793 |
0 | static void return_frame(AVFilterContext *ctx, int is_second) { YADIFContext *yadif = ctx->priv; AVFilterLink *link= ctx->outputs[0]; int tff; if (yadif->parity == -1) { tff = yadif->cur->video->interlaced ? yadif->cur->video->top_field_first : 1; } else { tff = yadif->parity^1; } if (is_second) { yadif->out = ff_get_v... | 22,795 |
0 | static void quantize_and_encode_band(struct AACEncContext *s, PutBitContext *pb, const float *in, int size, int scale_idx, int cb, const float lambda) { const float IQ = ff_aac_pow2sf_tab[200 + scale_idx - SCALE_ONE_POS + SCALE_DIV_512]; const float Q = ff_aac_pow2sf_tab[200 - scale_idx + SCALE_ONE_POS - SCALE_DIV_512]... | 22,796 |
0 | static int seg_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) { SegmentContext *seg = s->priv_data; AVFormatContext *oc = seg->avf; if (oc->oformat->check_bitstream) { int ret = oc->oformat->check_bitstream(oc, pkt); if (ret == 1) { AVStream *st = s->streams[pkt->stream_index]; AVStream *ost = oc->stre... | 22,797 |
0 | static int gen_check_bw(URLContext *s, RTMPContext *rt) { RTMPPacket pkt; uint8_t *p; int ret; if ((ret = ff_rtmp_packet_create(&pkt, RTMP_SYSTEM_CHANNEL, RTMP_PT_INVOKE, 0, 21)) < 0) return ret; p = pkt.data; ff_amf_write_string(&p, "_checkbw"); ff_amf_write_number(&p, ++rt->nb_invokes); ff_amf_write_null(&p); ret = f... | 22,798 |
1 | static void scsi_generic_purge_requests(SCSIGenericState *s) { SCSIGenericReq *r; while (!QTAILQ_EMPTY(&s->qdev.requests)) { r = DO_UPCAST(SCSIGenericReq, req, QTAILQ_FIRST(&s->qdev.requests)); if (r->req.aiocb) { bdrv_aio_cancel(r->req.aiocb); } scsi_remove_request(r); } } | 22,799 |
1 | static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output) { AVFrame *decoded_frame, *f; int i, ret = 0, err = 0; if (!ist->decoded_frame && !(ist->decoded_frame = av_frame_alloc())) return AVERROR(ENOMEM); if (!ist->filter_frame && !(ist->filter_frame = av_frame_alloc())) return AVERROR(ENOMEM); decoded... | 22,800 |
1 | int boot_sector_init(const char *fname) { FILE *f = fopen(fname, "w"); size_t len = sizeof boot_sector; if (!f) { fprintf(stderr, "Couldn't open \"%s\": %s", fname, strerror(errno)); return 1; } /* For Open Firmware based system, we can use a Forth script instead */ if (strcmp(qtest_get_arch(), "ppc64") == 0) { len = s... | 22,802 |
1 | static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { AVIContext *avi = s->priv_data; AVStream *st; int i, index; int64_t pos, pos_min; AVIStream *ast; if (!avi->index_loaded) { /* we only load the index on demand */ avi_load_index(s); avi->index_loaded = 1; } assert(stream_inde... | 22,803 |
1 | static void timer_enable(struct xlx_timer *xt) { uint64_t count; D(printf("%s timer=%d down=%d\n", __func__, xt->nr, xt->regs[R_TCSR] & TCSR_UDT)); ptimer_stop(xt->ptimer); if (xt->regs[R_TCSR] & TCSR_UDT) count = xt->regs[R_TLR]; else count = ~0 - xt->regs[R_TLR]; ptimer_set_count(xt->ptimer, count); ptimer_run(xt->pt... | 22,804 |
1 | static int colo_packet_compare_tcp(Packet *spkt, Packet *ppkt) { struct tcphdr *ptcp, *stcp; int res; trace_colo_compare_main("compare tcp"); ptcp = (struct tcphdr *)ppkt->transport_header; stcp = (struct tcphdr *)spkt->transport_header; /* * The 'identification' field in the IP header is *very* random * it almost neve... | 22,805 |
1 | static int dfa_read_packet(AVFormatContext *s, AVPacket *pkt) { AVIOContext *pb = s->pb; uint32_t frame_size; int ret, first = 1; if (avio_feof(pb)) return AVERROR_EOF; if (av_get_packet(pb, pkt, 12) != 12) return AVERROR(EIO); while (!avio_feof(pb)) { if (!first) { ret = av_append_packet(pb, pkt, 12); if (ret < 0) { r... | 22,806 |
1 | static int nut_read_close(AVFormatContext *s) { NUTContext *nut = s->priv_data; av_freep(&nut->time_base); av_freep(&nut->stream); return 0; } | 22,807 |
1 | static int64_t pva_read_timestamp(struct AVFormatContext *s, int stream_index, int64_t *pos, int64_t pos_limit) { ByteIOContext *pb = s->pb; PVAContext *pvactx = s->priv_data; int length, streamid; int64_t res; pos_limit = FFMIN(*pos+PVA_MAX_PAYLOAD_LENGTH*8, (uint64_t)*pos+pos_limit); while (*pos < pos_limit) { res = ... | 22,808 |
1 | static ssize_t handle_aiocb_ioctl(struct qemu_paiocb *aiocb) { int ret; ret = ioctl(aiocb->aio_fildes, aiocb->aio_ioctl_cmd, aiocb->aio_ioctl_buf); if (ret == -1) return -errno; /* * This looks weird, but the aio code only consideres a request * successful if it has written the number full number of bytes. * * Now we o... | 22,809 |
1 | static int filter_slice(AVFilterContext *ctx, void *arg, int job, int nb_jobs) { FrameRateContext *s = ctx->priv; ThreadData *td = arg; uint16_t src1_factor = td->src1_factor; uint16_t src2_factor = td->src2_factor; int plane; for (plane = 0; plane < 4 && td->copy_src1->data[plane] && td->copy_src2->data[plane]; plane+... | 22,810 |
1 | static void update_initial_timestamps(AVFormatContext *s, int stream_index, int64_t dts, int64_t pts, AVPacket *pkt) { AVStream *st = s->streams[stream_index]; AVPacketList *pktl = s->internal->packet_buffer ? s->internal->packet_buffer : s->internal->parse_queue; int64_t pts_buffer[MAX_REORDER_DELAY+1]; int64_t shift;... | 22,812 |
1 | static void ide_test_quit(void) { qtest_end(); } | 22,813 |
1 | static int update_prob(VP56RangeCoder *c, int p) { static const int inv_map_table[254] = { 7, 20, 33, 46, 59, 72, 85, 98, 111, 124, 137, 150, 163, 176, 189, 202, 215, 228, 241, 254, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40... | 22,814 |
1 | static void mcf5208evb_init(MachineState *machine) { ram_addr_t ram_size = machine->ram_size; const char *cpu_model = machine->cpu_model; const char *kernel_filename = machine->kernel_filename; M68kCPU *cpu; CPUM68KState *env; int kernel_size; uint64_t elf_entry; hwaddr entry; qemu_irq *pic; MemoryRegion *address_space... | 22,816 |
1 | static void vga_get_text_resolution(VGACommonState *s, int *pwidth, int *pheight, int *pcwidth, int *pcheight) { int width, cwidth, height, cheight; /* total width & height */ cheight = (s->cr[VGA_CRTC_MAX_SCAN] & 0x1f) + 1; cwidth = 8; if (!(s->sr[VGA_SEQ_CLOCK_MODE] & VGA_SR01_CHAR_CLK_8DOTS)) { cwidth = 9; } if (s->... | 22,817 |
1 | int ff_write_chained(AVFormatContext *dst, int dst_stream, AVPacket *pkt, AVFormatContext *src) { AVPacket local_pkt; local_pkt = *pkt; local_pkt.stream_index = dst_stream; if (pkt->pts != AV_NOPTS_VALUE) local_pkt.pts = av_rescale_q(pkt->pts, src->streams[pkt->stream_index]->time_base, dst->streams[dst_stream]->time_b... | 22,819 |
0 | static int tm2_read_stream(TM2Context *ctx, const uint8_t *buf, int stream_id, int buf_size) { int i; int skip = 0; int len, toks, pos; TM2Codes codes; GetByteContext gb; if (buf_size < 4) { av_log(ctx->avctx, AV_LOG_ERROR, "not enough space for len left\n"); return AVERROR_INVALIDDATA; } /* get stream length in dwords... | 22,820 |
0 | static int parse_section_header(GetByteContext *gbc, int *section_size, enum HapSectionType *section_type) { if (bytestream2_get_bytes_left(gbc) < 4) return AVERROR_INVALIDDATA; *section_size = bytestream2_get_le24(gbc); *section_type = bytestream2_get_byte(gbc); if (*section_size == 0) { if (bytestream2_get_bytes_left... | 22,821 |
0 | static int pps_range_extensions(GetBitContext *gb, AVCodecContext *avctx, HEVCPPS *pps, HEVCSPS *sps) { int i; if (pps->transform_skip_enabled_flag) { pps->log2_max_transform_skip_block_size = get_ue_golomb_long(gb) + 2; } pps->cross_component_prediction_enabled_flag = get_bits1(gb); pps->chroma_qp_offset_list_enabled_... | 22,823 |
0 | av_cold int ff_wma_init(AVCodecContext *avctx, int flags2) { WMACodecContext *s = avctx->priv_data; int i; float bps1, high_freq; volatile float bps; int sample_rate1; int coef_vlc_table; if (avctx->sample_rate <= 0 || avctx->sample_rate > 50000 || avctx->channels <= 0 || avctx->channels > 2 || avctx->bit_rate <= 0) re... | 22,824 |
0 | void ff_put_h264_qpel4_mc13_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_hv_qrt_4w_msa(src + stride - 2, src - (stride * 2), stride, dst, stride, 4); } | 22,827 |
0 | static int flv_same_audio_codec(AVCodecContext *acodec, int flags) { int bits_per_coded_sample = (flags & FLV_AUDIO_SAMPLESIZE_MASK) ? 16 : 8; int flv_codecid = flags & FLV_AUDIO_CODECID_MASK; int codec_id; if (!acodec->codec_id && !acodec->codec_tag) return 1; if (acodec->bits_per_coded_sample != bits_per_coded_sample... | 22,829 |
1 | static inline void gen_op_clear_ieee_excp_and_FTT(void) { tcg_gen_andi_tl(cpu_fsr, cpu_fsr, ~(FSR_FTT_MASK | FSR_CEXC_MASK)); } | 22,830 |
1 | int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, int bit_size, int sync_extension) { GetBitContext gb; int specific_config_bitindex; if(bit_size<=0) return AVERROR_INVALIDDATA; init_get_bits(&gb, buf, bit_size); c->object_type = get_object_type(&gb); c->sample_rate = get_sample_rate(&gb, &c->sa... | 22,831 |
1 | static void object_set_link_property(Object *obj, Visitor *v, void *opaque, const char *name, Error **errp) { Object **child = opaque; bool ambiguous = false; const char *type; char *path; type = object_property_get_type(obj, name, NULL); visit_type_str(v, &path, name, errp); if (*child) { object_unref(*child); } if (s... | 22,832 |
1 | vorbis_header (AVFormatContext * s, int idx) { ogg_t *ogg = s->priv_data; ogg_stream_t *os = ogg->streams + idx; AVStream *st = s->streams[idx]; oggvorbis_private_t *priv; if (os->seq > 2) return 0; if (os->seq == 0) { os->private = av_mallocz(sizeof(oggvorbis_private_t)); if (!os->private) return 0; } priv = os->priva... | 22,835 |
1 | static void json_message_process_token(JSONLexer *lexer, GString *input, JSONTokenType type, int x, int y) { JSONMessageParser *parser = container_of(lexer, JSONMessageParser, lexer); JSONToken *token; switch (type) { case JSON_LCURLY: parser->brace_count++; break; case JSON_RCURLY: parser->brace_count--; break; case J... | 22,836 |
1 | static void test_blk_write(BlockBackend *blk, long pattern, int64_t offset, int64_t count, bool expect_failed) { void *pattern_buf = NULL; QEMUIOVector qiov; int async_ret = NOT_DONE; pattern_buf = g_malloc(count); if (pattern) { memset(pattern_buf, pattern, count); } else { memset(pattern_buf, 0x00, count); } qemu_iov... | 22,838 |
1 | void usb_packet_set_state(USBPacket *p, USBPacketState state) { static const char *name[] = { [USB_PACKET_UNDEFINED] = "undef", [USB_PACKET_SETUP] = "setup", [USB_PACKET_QUEUED] = "queued", [USB_PACKET_ASYNC] = "async", [USB_PACKET_COMPLETE] = "complete", [USB_PACKET_CANCELED] = "canceled", }; USBDevice *dev = p->ep->d... | 22,839 |
1 | static struct URLProtocol *url_find_protocol(const char *filename) { URLProtocol *up = NULL; char proto_str[128], proto_nested[128], *ptr; size_t proto_len = strspn(filename, URL_SCHEME_CHARS); if (filename[proto_len] != ':' && (filename[proto_len] != ',' || !strchr(filename + proto_len + 1, ':')) || is_dos_path(filena... | 22,840 |
1 | void qmp_drive_mirror(const char *device, const char *target, bool has_format, const char *format, enum MirrorSyncMode sync, bool has_mode, enum NewImageMode mode, bool has_speed, int64_t speed, Error **errp) { BlockDriverInfo bdi; BlockDriverState *bs; BlockDriverState *source, *target_bs; BlockDriver *proto_drv; Bloc... | 22,841 |
0 | static av_cold int sonic_decode_init(AVCodecContext *avctx) { SonicContext *s = avctx->priv_data; GetBitContext gb; int i; s->channels = avctx->channels; s->samplerate = avctx->sample_rate; if (!avctx->extradata) { av_log(avctx, AV_LOG_ERROR, "No mandatory headers present\n"); return AVERROR_INVALIDDATA; } init_get_bit... | 22,842 |
1 | static void spapr_cpu_init(sPAPRMachineState *spapr, PowerPCCPU *cpu, Error **errp) { CPUPPCState *env = &cpu->env; CPUState *cs = CPU(cpu); int i; /* 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); if (cpu->max_compat) { Error... | 22,843 |
1 | int ppc_find_by_name (const unsigned char *name, ppc_def_t **def) { int i, ret; ret = -1; *def = NULL; for (i = 0; strcmp(ppc_defs[i].name, "default") != 0; i++) { if (strcasecmp(name, ppc_defs[i].name) == 0) { *def = &ppc_defs[i]; ret = 0; break; } } return ret; } | 22,845 |
1 | static void spitz_gpio_setup(PXA2xxState *cpu, int slots) { qemu_irq lcd_hsync; /* * Bad hack: We toggle the LCD hsync GPIO on every GPIO status * read to satisfy broken guests that poll-wait for hsync. * Simulating a real hsync event would be less practical and * wouldn't guarantee that a guest ever exits the loop. */... | 22,846 |
1 | int vnc_display_pw_expire(DisplayState *ds, time_t expires) { VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display; vs->expires = expires; return 0; | 22,847 |
1 | static int usb_hub_handle_data(USBDevice *dev, USBPacket *p) { USBHubState *s = (USBHubState *)dev; int ret; switch(p->pid) { case USB_TOKEN_IN: if (p->devep == 1) { USBHubPort *port; unsigned int status; int i, n; n = (NUM_PORTS + 1 + 7) / 8; if (p->len == 1) { /* FreeBSD workaround */ n = 1; } else if (n > p->len) { ... | 22,848 |
1 | void bdrv_drain_all(void) { /* Always run first iteration so any pending completion BHs run */ bool busy = true; BlockDriverState *bs; while (busy) { /* FIXME: We do not have timer support here, so this is effectively * a busy wait. */ QTAILQ_FOREACH(bs, &bdrv_states, list) { if (bdrv_start_throttled_reqs(bs)) { busy =... | 22,849 |
0 | static void do_fbranch(DisasContext *dc, int32_t offset, uint32_t insn, int cc, TCGv r_cond) { unsigned int cond = GET_FIELD(insn, 3, 6), a = (insn & (1 << 29)); target_ulong target = dc->pc + offset; if (cond == 0x0) { /* unconditional not taken */ if (a) { dc->pc = dc->npc + 4; dc->npc = dc->pc + 4; } else { dc->pc =... | 22,851 |
0 | static inline uint32_t vtd_slpt_level_shift(uint32_t level) { return VTD_PAGE_SHIFT_4K + (level - 1) * VTD_SL_LEVEL_BITS; } | 22,852 |
0 | static int vtd_iova_to_slpte(VTDContextEntry *ce, uint64_t iova, bool is_write, uint64_t *slptep, uint32_t *slpte_level, bool *reads, bool *writes) { dma_addr_t addr = vtd_get_slpt_base_from_context(ce); uint32_t level = vtd_get_level_from_context_entry(ce); uint32_t offset; uint64_t slpte; uint32_t ce_agaw = vtd_get_a... | 22,853 |
0 | PCIBus *ppce500_pci_init(qemu_irq pci_irqs[4], target_phys_addr_t registers) { PPCE500PCIState *controller; PCIDevice *d; int index; static int ppce500_pci_id; controller = qemu_mallocz(sizeof(PPCE500PCIState)); controller->pci_state.bus = pci_register_bus(NULL, "pci", mpc85xx_pci_set_irq, mpc85xx_pci_map_irq, pci_irqs... | 22,854 |
0 | int omap_validate_tipb_addr(struct omap_mpu_state_s *s, target_phys_addr_t addr) { return addr >= 0xfffb0000 && addr < 0xffff0000; } | 22,856 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.