label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
0 | static unsigned int dec_addu_r(DisasContext *dc) { TCGv t0; int size = memsize_z(dc); DIS(fprintf (logfile, "addu.%c $r%u, $r%u\n", memsize_char(size), dc->op1, dc->op2)); cris_cc_mask(dc, CC_MASK_NZVC); t0 = tcg_temp_new(TCG_TYPE_TL); /* Size can only be qi or hi. */ t_gen_zext(t0, cpu_R[dc->op1], size); cris_alu(dc, ... | 18,874 |
0 | static void net_rx_packet(void *opaque, const uint8_t *buf, size_t size) { struct XenNetDev *netdev = opaque; netif_rx_request_t rxreq; RING_IDX rc, rp; void *page; if (netdev->xendev.be_state != XenbusStateConnected) return; rc = netdev->rx_ring.req_cons; rp = netdev->rx_ring.sring->req_prod; xen_rmb(); /* Ensure we s... | 18,875 |
0 | static void mcf_fec_receive(void *opaque, const uint8_t *buf, size_t size) { mcf_fec_state *s = (mcf_fec_state *)opaque; mcf_fec_bd bd; uint32_t flags = 0; uint32_t addr; uint32_t crc; uint32_t buf_addr; uint8_t *crc_ptr; unsigned int buf_len; DPRINTF("do_rx len %d\n", size); if (!s->rx_enabled) { fprintf(stderr, "mcf_... | 18,876 |
0 | static BlockDriverAIOCB *paio_submit(BlockDriverState *bs, int fd, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockDriverCompletionFunc *cb, void *opaque, int type) { RawPosixAIOData *acb = g_slice_new(RawPosixAIOData); acb->bs = bs; acb->aio_type = type; acb->aio_fildes = fd; if (qiov) { acb->aio_iov = qi... | 18,877 |
0 | static void fdt_add_pmu_nodes(const VirtMachineState *vms) { CPUState *cpu; ARMCPU *armcpu; uint32_t irqflags = GIC_FDT_IRQ_FLAGS_LEVEL_HI; CPU_FOREACH(cpu) { armcpu = ARM_CPU(cpu); if (!arm_feature(&armcpu->env, ARM_FEATURE_PMU) || !kvm_arm_pmu_create(cpu, PPI(VIRTUAL_PMU_IRQ))) { return; } } if (vms->gic_version == 2... | 18,878 |
0 | static int usb_ohci_initfn_pci(struct PCIDevice *dev) { OHCIPCIState *ohci = DO_UPCAST(OHCIPCIState, pci_dev, dev); int num_ports = 3; pci_config_set_vendor_id(ohci->pci_dev.config, PCI_VENDOR_ID_APPLE); pci_config_set_device_id(ohci->pci_dev.config, PCI_DEVICE_ID_APPLE_IPID_USB); ohci->pci_dev.config[PCI_CLASS_PROG] =... | 18,879 |
0 | static int nbd_negotiate_read(QIOChannel *ioc, void *buffer, size_t size) { ssize_t ret; guint watch; assert(qemu_in_coroutine()); /* Negotiation are always in main loop. */ watch = qio_channel_add_watch(ioc, G_IO_IN, nbd_negotiate_continue, qemu_coroutine_self(), NULL); ret = read_sync(ioc, buffer, size, NULL); g_sour... | 18,880 |
0 | static inline void sdhci_reset_write(SDHCIState *s, uint8_t value) { switch (value) { case SDHC_RESET_ALL: DEVICE_GET_CLASS(s)->reset(DEVICE(s)); break; case SDHC_RESET_CMD: s->prnsts &= ~SDHC_CMD_INHIBIT; s->norintsts &= ~SDHC_NIS_CMDCMP; break; case SDHC_RESET_DATA: s->data_count = 0; s->prnsts &= ~(SDHC_SPACE_AVAILA... | 18,881 |
0 | static void print_report(OutputFile *output_files, OutputStream *ost_table, int nb_ostreams, int is_last_report, int64_t timer_start) { char buf[1024]; OutputStream *ost; AVFormatContext *oc; int64_t total_size; AVCodecContext *enc; int frame_number, vid, i; double bitrate; int64_t pts = INT64_MAX; static int64_t last_... | 18,882 |
0 | static int ohci_bus_start(OHCIState *ohci) { ohci->eof_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, ohci_frame_boundary, ohci); if (ohci->eof_timer == NULL) { trace_usb_ohci_bus_eof_timer_failed(ohci->name); ohci_die(ohci); return 0; } trace_usb_ohci_start(ohci->name); ohci_sof(ohci); return 1; } | 18,884 |
0 | static void arm_thistimer_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size) { arm_mptimer_state *s = (arm_mptimer_state *)opaque; int id = get_current_cpu(s); timerblock_write(&s->timerblock[id * 2], addr, value, size); } | 18,885 |
0 | long do_rt_sigreturn(CPUX86State *env) { abi_ulong frame_addr; struct rt_sigframe *frame; sigset_t set; int eax; frame_addr = env->regs[R_ESP] - 4; if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1)) goto badframe; target_to_host_sigset(&set, &frame->uc.tuc_sigmask); sigprocmask(SIG_SETMASK, &set, NULL); if (rest... | 18,886 |
0 | int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src) { const AVCodec *orig_codec = dest->codec; uint8_t *orig_priv_data = dest->priv_data; if (avcodec_is_open(dest)) { // check that the dest context is uninitialized av_log(dest, AV_LOG_ERROR, "Tried to copy AVCodecContext %p into already-initialize... | 18,887 |
0 | target_ulong helper_rdhwr_synci_step(CPUMIPSState *env) { if ((env->hflags & MIPS_HFLAG_CP0) || (env->CP0_HWREna & (1 << 1))) return env->SYNCI_Step; else do_raise_exception(env, EXCP_RI, GETPC()); return 0; } | 18,888 |
0 | static void coroutine_fn bdrv_aio_discard_co_entry(void *opaque) { BlockDriverAIOCBCoroutine *acb = opaque; BlockDriverState *bs = acb->common.bs; acb->req.error = bdrv_co_discard(bs, acb->req.sector, acb->req.nb_sectors); acb->bh = qemu_bh_new(bdrv_co_em_bh, acb); qemu_bh_schedule(acb->bh); } | 18,889 |
0 | POWERPC_FAMILY(POWER7)(ObjectClass *oc, void *data) { DeviceClass *dc = DEVICE_CLASS(oc); PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc); dc->fw_name = "PowerPC,POWER7"; dc->desc = "POWER7"; dc->props = powerpc_servercpu_properties; pcc->pvr_match = ppc_pvr_match_power7; pcc->pcr_mask = PCR_COMPAT_2_05 | PCR_COMPAT_2_06;... | 18,890 |
0 | static void configure_rtc(QemuOpts *opts) { const char *value; value = qemu_opt_get(opts, "base"); if (value) { if (!strcmp(value, "utc")) { rtc_utc = 1; } else if (!strcmp(value, "localtime")) { rtc_utc = 0; } else { configure_rtc_date_offset(value, 0); } } value = qemu_opt_get(opts, "clock"); if (value) { if (!strcmp... | 18,894 |
0 | static inline void t_gen_zext(TCGv d, TCGv s, int size) { if (size == 1) tcg_gen_ext8u_i32(d, s); else if (size == 2) tcg_gen_ext16u_i32(d, s); else if (GET_TCGV(d) != GET_TCGV(s)) tcg_gen_mov_tl(d, s); } | 18,895 |
0 | static ssize_t virtio_net_receive(VLANClientState *nc, const uint8_t *buf, size_t size) { VirtIONet *n = DO_UPCAST(NICState, nc, nc)->opaque; struct virtio_net_hdr_mrg_rxbuf *mhdr = NULL; size_t hdr_len, offset, i; if (!virtio_net_can_receive(&n->nic->nc)) return -1; /* hdr_len refers to the header we supply to the gue... | 18,896 |
0 | static InputEvent *qapi_clone_InputEvent(InputEvent *src) { QmpOutputVisitor *qov; QmpInputVisitor *qiv; Visitor *ov, *iv; QObject *obj; InputEvent *dst = NULL; qov = qmp_output_visitor_new(); ov = qmp_output_get_visitor(qov); visit_type_InputEvent(ov, NULL, &src, &error_abort); obj = qmp_output_get_qobject(qov); qmp_o... | 18,897 |
0 | static void stop(DBDMA_channel *ch) { ch->regs[DBDMA_STATUS] &= cpu_to_be32(~(ACTIVE|DEAD|FLUSH)); /* the stop command does not increment command pointer */ } | 18,899 |
0 | 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, bool has_granularity, uint32_t granularity, bool has_buf_size, int64_t buf_size, bool has_on_source_error, BlockdevOnError on... | 18,900 |
0 | static void gen_delayed_conditional_jump(DisasContext * ctx) { int l1; TCGv ds; l1 = gen_new_label(); ds = tcg_temp_new(); tcg_gen_andi_i32(ds, cpu_flags, DELAY_SLOT_TRUE); tcg_gen_brcondi_i32(TCG_COND_NE, ds, 0, l1); gen_goto_tb(ctx, 1, ctx->pc + 2); gen_set_label(l1); tcg_gen_andi_i32(cpu_flags, cpu_flags, ~DELAY_SLO... | 18,901 |
0 | static void qmp_input_type_number(Visitor *v, const char *name, double *obj, Error **errp) { QmpInputVisitor *qiv = to_qiv(v); QObject *qobj = qmp_input_get_object(qiv, name, true, errp); QInt *qint; QFloat *qfloat; if (!qobj) { return; } qint = qobject_to_qint(qobj); if (qint) { *obj = qint_get_int(qobject_to_qint(qob... | 18,902 |
0 | static void test_dynamic_globalprop(void) { g_test_trap_subprocess("/qdev/properties/dynamic/global/subprocess", 0, 0); g_test_trap_assert_passed(); g_test_trap_assert_stderr_unmatched("*prop1*"); g_test_trap_assert_stderr_unmatched("*prop2*"); g_test_trap_assert_stderr("*Warning: \"-global dynamic-prop-type-bad.prop3=... | 18,903 |
0 | static void audio_init (void) { size_t i; int done = 0; const char *drvname; VMChangeStateEntry *e; AudioState *s = &glob_audio_state; if (s->drv) { return; } QLIST_INIT (&s->hw_head_out); QLIST_INIT (&s->hw_head_in); QLIST_INIT (&s->cap_head); atexit (audio_atexit); s->ts = qemu_new_timer (vm_clock, audio_timer, s); i... | 18,904 |
0 | void build_memory_hotplug_aml(Aml *table, uint32_t nr_mem, uint16_t io_base, uint16_t io_len, const char *res_root, const char *event_handler_method) { int i; Aml *ifctx; Aml *method; Aml *sb_scope; Aml *mem_ctrl_dev; char *scan_path; char *mhp_res_path = g_strdup_printf("%s." MEMORY_HOTPLUG_DEVICE, res_root); mem_ctrl... | 18,906 |
0 | char *g_strdup_printf(const char *format, ...) { char ch, *s; size_t len; __coverity_string_null_sink__(format); __coverity_string_size_sink__(format); ch = *format; s = __coverity_alloc_nosize__(); __coverity_writeall__(s); __coverity_mark_as_afm_allocated__(s, AFM_free); return s; } | 18,907 |
0 | static int check_features_against_host(x86_def_t *guest_def) { x86_def_t host_def; uint32_t mask; int rv, i; struct model_features_t ft[] = { {&guest_def->features, &host_def.features, ~0, feature_name, 0x00000000}, {&guest_def->ext_features, &host_def.ext_features, ~CPUID_EXT_HYPERVISOR, ext_feature_name, 0x00000001},... | 18,908 |
0 | static int rkmpp_retrieve_frame(AVCodecContext *avctx, AVFrame *frame) { RKMPPDecodeContext *rk_context = avctx->priv_data; RKMPPDecoder *decoder = (RKMPPDecoder *)rk_context->decoder_ref->data; RKMPPFrameContext *framecontext = NULL; AVBufferRef *framecontextref = NULL; int ret; MppFrame mppframe = NULL; MppBuffer buf... | 18,909 |
0 | START_TEST(qfloat_from_double_test) { QFloat *qf; const double value = -42.23423; qf = qfloat_from_double(value); fail_unless(qf != NULL); fail_unless(qf->value == value); fail_unless(qf->base.refcnt == 1); fail_unless(qobject_type(QOBJECT(qf)) == QTYPE_QFLOAT); // destroy doesn't exit yet g_free(qf); } | 18,910 |
0 | static int vnc_start_vencrypt_handshake(struct VncState *vs) { int ret; if ((ret = gnutls_handshake(vs->tls.session)) < 0) { if (!gnutls_error_is_fatal(ret)) { VNC_DEBUG("Handshake interrupted (blocking)\n"); if (!gnutls_record_get_direction(vs->tls.session)) qemu_set_fd_handler(vs->csock, vnc_tls_handshake_io, NULL, v... | 18,911 |
0 | static void spapr_powerdown_req(Notifier *n, void *opaque) { sPAPRMachineState *spapr = SPAPR_MACHINE(qdev_get_machine()); struct rtas_error_log *hdr; struct rtas_event_log_v6 *v6hdr; struct rtas_event_log_v6_maina *maina; struct rtas_event_log_v6_mainb *mainb; struct rtas_event_log_v6_epow *epow; struct epow_log_full ... | 18,912 |
0 | static int bdrv_open_common(BlockDriverState *bs, BlockDriverState *file, QDict *options, int flags, BlockDriver *drv, Error **errp) { int ret, open_flags; const char *filename; const char *node_name = NULL; Error *local_err = NULL; assert(drv != NULL); assert(bs->file == NULL); assert(options != NULL && bs->options !=... | 18,913 |
0 | static uint32_t bonito_spciconf_readl(void *opaque, target_phys_addr_t addr) { PCIBonitoState *s = opaque; PCIDevice *d = PCI_DEVICE(s); PCIHostState *phb = PCI_HOST_BRIDGE(s->pcihost); uint32_t pciaddr; uint16_t status; DPRINTF("bonito_spciconf_readl "TARGET_FMT_plx"\n", addr); assert((addr & 0x3) == 0); pciaddr = bon... | 18,914 |
0 | static VirtIOSerialPort *find_port_by_name(char *name) { VirtIOSerial *vser; QLIST_FOREACH(vser, &vserdevices.devices, next) { VirtIOSerialPort *port; QTAILQ_FOREACH(port, &vser->ports, next) { if (!strcmp(port->name, name)) { return port; } } } return NULL; } | 18,917 |
0 | void op_mtc0_status (void) { uint32_t val, old; uint32_t mask = env->Status_rw_bitmask; /* No reverse endianness, no MDMX/DSP, no 64bit ops implemented. */ val = T0 & mask; old = env->CP0_Status; if (!(val & (1 << CP0St_EXL)) && !(val & (1 << CP0St_ERL)) && !(env->hflags & MIPS_HFLAG_DM) && (val & (1 << CP0St_UM))) env... | 18,918 |
0 | static inline uint32_t ldl_phys_internal(target_phys_addr_t addr, enum device_endian endian) { uint8_t *ptr; uint32_t val; MemoryRegionSection *section; section = phys_page_find(address_space_memory.dispatch, addr >> TARGET_PAGE_BITS); if (!(memory_region_is_ram(section->mr) || memory_region_is_romd(section->mr))) { /*... | 18,919 |
0 | static int vtd_irte_get(IntelIOMMUState *iommu, uint16_t index, VTD_IRTE *entry) { dma_addr_t addr = 0x00; addr = iommu->intr_root + index * sizeof(*entry); if (dma_memory_read(&address_space_memory, addr, entry, sizeof(*entry))) { VTD_DPRINTF(GENERAL, "error: fail to access IR root at 0x%"PRIx64 " + %"PRIu16, iommu->i... | 18,920 |
0 | static CharDriverState *qemu_chr_open_pty(void) { struct termios tty; int master_fd, slave_fd; if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) < 0) { return NULL; } /* Set raw attributes on the pty. */ cfmakeraw(&tty); tcsetattr(slave_fd, TCSAFLUSH, &tty); fprintf(stderr, "char device redirected to %s\n", ptsname(... | 18,921 |
0 | static int xen_pt_long_reg_read(XenPCIPassthroughState *s, XenPTReg *cfg_entry, uint32_t *value, uint32_t valid_mask) { XenPTRegInfo *reg = cfg_entry->reg; uint32_t valid_emu_mask = 0; /* emulate long register */ valid_emu_mask = reg->emu_mask & valid_mask; *value = XEN_PT_MERGE_VALUE(*value, cfg_entry->data, ~valid_em... | 18,922 |
0 | static void tgen_setcond(TCGContext *s, TCGType type, TCGCond cond, TCGReg dest, TCGReg c1, TCGArg c2, int c2const) { int cc; switch (cond) { case TCG_COND_GTU: case TCG_COND_GT: do_greater: /* The result of a compare has CC=2 for GT and CC=3 unused. ADD LOGICAL WITH CARRY considers (CC & 2) the carry bit. */ tgen_cmp(... | 18,923 |
0 | static CharDriverState *qemu_chr_open_pty(const char *id, ChardevReturn *ret) { CharDriverState *chr; PtyCharDriver *s; int master_fd, slave_fd; char pty_name[PATH_MAX]; master_fd = qemu_openpty_raw(&slave_fd, pty_name); if (master_fd < 0) { return NULL; } close(slave_fd); chr = g_malloc0(sizeof(CharDriverState)); chr-... | 18,924 |
0 | static target_ulong h_set_dabr(PowerPCCPU *cpu, sPAPRMachineState *spapr, target_ulong opcode, target_ulong *args) { /* FIXME: actually implement this */ return H_HARDWARE; } | 18,925 |
0 | static uint32_t arm_timer_read(void *opaque, target_phys_addr_t offset) { arm_timer_state *s = (arm_timer_state *)opaque; switch (offset >> 2) { case 0: /* TimerLoad */ case 6: /* TimerBGLoad */ return s->limit; case 1: /* TimerValue */ return ptimer_get_count(s->timer); case 2: /* TimerControl */ return s->control; ca... | 18,926 |
0 | char *string_output_get_string(StringOutputVisitor *sov) { char *string = g_string_free(sov->string, false); sov->string = NULL; return string; } | 18,927 |
0 | static void css_init(void) { QTAILQ_INIT(&channel_subsys.pending_crws); channel_subsys.sei_pending = false; channel_subsys.do_crw_mchk = true; channel_subsys.crws_lost = false; channel_subsys.chnmon_active = false; QTAILQ_INIT(&channel_subsys.io_adapters); QTAILQ_INIT(&channel_subsys.indicator_addresses); } | 18,928 |
0 | static void test_validate_struct(TestInputVisitorData *data, const void *unused) { TestStruct *p = NULL; Visitor *v; v = validate_test_init(data, "{ 'integer': -42, 'boolean': true, 'string': 'foo' }"); visit_type_TestStruct(v, NULL, &p, &error_abort); g_free(p->string); g_free(p); } | 18,929 |
0 | static uint32_t ecc_mem_readw(void *opaque, target_phys_addr_t addr) { printf("ECC: Unsupported read 0x" TARGET_FMT_plx " 0000\n", addr); return 0; } | 18,932 |
0 | static av_cold int libssh_authentication(LIBSSHContext *libssh, const char *user, const char *password) { int authorized = 0; int auth_methods; if (user) ssh_options_set(libssh->session, SSH_OPTIONS_USER, user); if (ssh_userauth_none(libssh->session, NULL) == SSH_AUTH_SUCCESS) return 0; auth_methods = ssh_userauth_list... | 18,933 |
0 | int gif_write(ByteIOContext *pb, AVImageInfo *info) { gif_image_write_header(pb, info->width, info->height, (uint32_t *)info->pict.data[1]); gif_image_write_image(pb, 0, 0, info->width, info->height, info->pict.data[0], info->pict.linesize[0], PIX_FMT_PAL8); put_byte(pb, 0x3b); put_flush_packet(pb); return 0; } | 18,934 |
0 | void monitor_init(CharDriverState *chr, int flags) { static int is_first_init = 1; Monitor *mon; if (is_first_init) { key_timer = qemu_new_timer(vm_clock, release_keys, NULL); is_first_init = 0; } mon = qemu_mallocz(sizeof(*mon)); mon->chr = chr; mon->flags = flags; if (flags & MONITOR_USE_READLINE) { mon->rs = readlin... | 18,935 |
0 | static void dsound_write_sample (HWVoiceOut *hw, uint8_t *dst, int dst_len) { int src_len1 = dst_len; int src_len2 = 0; int pos = hw->rpos + dst_len; st_sample_t *src1 = hw->mix_buf + hw->rpos; st_sample_t *src2 = NULL; if (pos > hw->samples) { src_len1 = hw->samples - hw->rpos; src2 = hw->mix_buf; src_len2 = dst_len -... | 18,936 |
0 | static void n8x0_init(QEMUMachineInitArgs *args, struct arm_boot_info *binfo, int model) { MemoryRegion *sysmem = get_system_memory(); struct n800_s *s = (struct n800_s *) g_malloc0(sizeof(*s)); int sdram_size = binfo->ram_size; s->mpu = omap2420_mpu_init(sysmem, sdram_size, args->cpu_model); /* Setup peripherals * * B... | 18,937 |
0 | build_fadt(GArray *table_data, GArray *linker, unsigned dsdt) { AcpiFadtDescriptorRev5_1 *fadt = acpi_data_push(table_data, sizeof(*fadt)); /* Hardware Reduced = 1 and use PSCI 0.2+ and with HVC */ fadt->flags = cpu_to_le32(1 << ACPI_FADT_F_HW_REDUCED_ACPI); fadt->arm_boot_flags = cpu_to_le16((1 << ACPI_FADT_ARM_USE_PS... | 18,938 |
0 | static int config_input_overlay(AVFilterLink *inlink) { AVFilterContext *ctx = inlink->dst; OverlayContext *over = inlink->dst->priv; char *expr; double var_values[VAR_VARS_NB], res; int ret; const AVPixFmtDescriptor *pix_desc = av_pix_fmt_desc_get(inlink->format); av_image_fill_max_pixsteps(over->overlay_pix_step, NUL... | 18,939 |
0 | static int dvdsub_decode(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { DVDSubContext *ctx = avctx->priv_data; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; AVSubtitle *sub = data; int is_menu; if (ctx->buf_size) { int ret = append_to_cached_buf(avctx, buf, buf_size); if (ret < 0)... | 18,940 |
0 | static int mov_write_moov_tag(ByteIOContext *pb, MOVContext *mov, AVFormatContext *s) { int i; offset_t pos = url_ftell(pb); put_be32(pb, 0); /* size placeholder*/ put_tag(pb, "moov"); mov->timescale = globalTimescale; for (i=0; i<MAX_STREAMS; i++) { if(mov->tracks[i].entry <= 0) continue; if(mov->tracks[i].enc->codec_... | 18,941 |
1 | int vncws_decode_frame(Buffer *input, uint8_t **payload, size_t *payload_size, size_t *frame_size) { unsigned char opcode = 0, fin = 0, has_mask = 0; size_t header_size = 0; uint32_t *payload32; WsHeader *header = (WsHeader *)input->buffer; WsMask mask; int i; if (input->offset < WS_HEAD_MIN_LEN + 4) { /* header not co... | 18,944 |
1 | static void send_framebuffer_update_raw(VncState *vs, int x, int y, int w, int h) { int i; uint8_t *row; row = ds_get_data(vs->ds) + y * ds_get_linesize(vs->ds) + x * ds_get_bytes_per_pixel(vs->ds); for (i = 0; i < h; i++) { vs->write_pixels(vs, row, w * ds_get_bytes_per_pixel(vs->ds)); row += ds_get_linesize(vs->ds); ... | 18,945 |
1 | static int alloc_frame_buffer(MpegEncContext *s, Picture *pic) { int r; if (s->avctx->hwaccel) { assert(!pic->f.hwaccel_picture_private); if (s->avctx->hwaccel->priv_data_size) { pic->f.hwaccel_picture_private = av_mallocz(s->avctx->hwaccel->priv_data_size); if (!pic->f.hwaccel_picture_private) { av_log(s->avctx, AV_LO... | 18,947 |
1 | static void pflash_write (pflash_t *pfl, target_ulong offset, uint32_t value, int width) { target_ulong boff; uint8_t *p; uint8_t cmd; /* WARNING: when the memory area is in ROMD mode, the offset is a ram offset, not a physical address */ if (pfl->wcycle == 0) offset -= (target_ulong)(long)pfl->storage; else offset -= ... | 18,948 |
1 | void cpu_loop(CPUPPCState *env) { CPUState *cs = CPU(ppc_env_get_cpu(env)); target_siginfo_t info; int trapnr; target_ulong ret; for(;;) { cpu_exec_start(cs); trapnr = cpu_ppc_exec(cs); cpu_exec_end(cs); switch(trapnr) { case POWERPC_EXCP_NONE: /* Just go on */ break; case POWERPC_EXCP_CRITICAL: /* Critical input */ cp... | 18,949 |
1 | static int check_video_codec_tag(int codec_tag) { if (codec_tag <= 0 || codec_tag > 15) { return AVERROR(ENOSYS); } else return 0; } | 18,950 |
1 | static int announce_self_create(uint8_t *buf, uint8_t *mac_addr) { uint32_t magic = EXPERIMENTAL_MAGIC; uint16_t proto = htons(ETH_P_EXPERIMENTAL); /* FIXME: should we send a different packet (arp/rarp/ping)? */ memset(buf, 0, 64); memset(buf, 0xff, 6); /* h_dst */ memcpy(buf + 6, mac_addr, 6); /* h_src */ memcpy(buf +... | 18,951 |
1 | static int slirp_hostfwd(SlirpState *s, const char *redir_str, int legacy_format, Error **errp) { struct in_addr host_addr = { .s_addr = INADDR_ANY }; struct in_addr guest_addr = { .s_addr = 0 }; int host_port, guest_port; const char *p; char buf[256]; int is_udp; char *end; p = redir_str; if (!p || get_str_sep(buf, si... | 18,952 |
1 | void RENAME(interleaveBytes)(uint8_t *src1, uint8_t *src2, uint8_t *dest, long width, long height, long src1Stride, long src2Stride, long dstStride){ long h; for(h=0; h < height; h++) { long w; #ifdef HAVE_MMX #ifdef HAVE_SSE2 asm( "xor %%"REG_a", %%"REG_a" \n\t" "1: \n\t" PREFETCH" 64(%1, %%"REG_a") \n\t" PREFETCH" 64... | 18,953 |
1 | static inline void RENAME(yuv2rgb555_1)(SwsContext *c, const uint16_t *buf0, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, uint8_t *dest, int dstW, int uvalpha, enum PixelFormat dstFormat, int flags, int y) { x86_reg uv_off = c->uv_off << 1; const uin... | 18,954 |
1 | static int vhdx_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { BDRVVHDXState *s = bs->opaque; int ret = 0; uint32_t i; uint64_t signature; bool log_flushed = false; s->bat = NULL; s->first_visible_write = true; qemu_co_mutex_init(&s->lock); QLIST_INIT(&s->regions); /* validate the file signature ... | 18,956 |
1 | FFAMediaCodec* ff_AMediaCodec_createEncoderByType(const char *mime) { JNIEnv *env = NULL; FFAMediaCodec *codec = NULL; jstring mime_type = NULL; codec = av_mallocz(sizeof(FFAMediaCodec)); if (!codec) { return NULL; } codec->class = &amediacodec_class; env = ff_jni_get_env(codec); if (!env) { av_freep(&codec); return NU... | 18,957 |
1 | static int mov_write_uuidprof_tag(AVIOContext *pb, AVFormatContext *s) { AVStream *video_st = s->streams[0]; AVCodecParameters *video_par = s->streams[0]->codecpar; AVCodecParameters *audio_par = s->streams[1]->codecpar; int audio_rate = audio_par->sample_rate; int64_t frame_rate = (video_st->avg_frame_rate.num * 0x100... | 18,958 |
1 | void av_thread_message_queue_free(AVThreadMessageQueue **mq) { #if HAVE_THREADS if (*mq) { av_thread_message_flush(*mq); av_fifo_freep(&(*mq)->fifo); pthread_cond_destroy(&(*mq)->cond); pthread_mutex_destroy(&(*mq)->lock); av_freep(mq); } #endif } | 18,960 |
1 | static void vhdx_parse_header(BlockDriverState *bs, BDRVVHDXState *s, Error **errp) { int ret; VHDXHeader *header1; VHDXHeader *header2; bool h1_valid = false; bool h2_valid = false; uint64_t h1_seq = 0; uint64_t h2_seq = 0; uint8_t *buffer; /* header1 & header2 are freed in vhdx_close() */ header1 = qemu_blockalign(bs... | 18,961 |
1 | int ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt, int (*compare)(AVFormatContext *, AVPacket *, AVPacket *)) { int ret; AVPacketList **next_point, *this_pktl; AVStream *st = s->streams[pkt->stream_index]; int chunked = s->max_chunk_size || s->max_chunk_duration; this_pktl = av_mallocz(sizeof(AVPacketList)... | 18,962 |
1 | static void x8_init_block_index(MpegEncContext *s){ //FIXME maybe merge with ff_* //not s->linesize as this would be wrong for field pics //not that IntraX8 has interlacing support ;) const int linesize = s->current_picture.f.linesize[0]; const int uvlinesize = s->current_picture.f.linesize[1]; s->dest[0] = s->current_... | 18,964 |
1 | static int qemu_rdma_search_ram_block(RDMAContext *rdma, uint64_t block_offset, uint64_t offset, uint64_t length, uint64_t *block_index, uint64_t *chunk_index) { uint64_t current_addr = block_offset + offset; RDMALocalBlock *block = g_hash_table_lookup(rdma->blockmap, (void *) block_offset); assert(block); assert(curre... | 18,966 |
1 | static int decode_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 context_reinitialized = 0; int i, ret; if (dst == src) return 0; if (inited && (h->width != h1->width || h->height != h1->hei... | 18,967 |
1 | static bool use_exit_tb(DisasContext *ctx) { return ((ctx->base.tb->cflags & CF_LAST_IO) || ctx->base.singlestep_enabled || singlestep); } | 18,968 |
1 | static int register_insn (opc_handler_t **ppc_opcodes, opcode_t *insn) { if (insn->opc2 != 0xFF) { if (insn->opc3 != 0xFF) { if (register_dblind_insn(ppc_opcodes, insn->opc1, insn->opc2, insn->opc3, &insn->handler) < 0) return -1; } else { if (register_ind_insn(ppc_opcodes, insn->opc1, insn->opc2, &insn->handler) < 0) ... | 18,970 |
1 | static ssize_t stellaris_enet_receive(NetClientState *nc, const uint8_t *buf, size_t size) { stellaris_enet_state *s = qemu_get_nic_opaque(nc); int n; uint8_t *p; uint32_t crc; if ((s->rctl & SE_RCTL_RXEN) == 0) return -1; if (s->np >= 31) { return 0; } DPRINTF("Received packet len=%zu\n", size); n = s->next_packet + s... | 18,971 |
1 | int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext *pb) { int len, tag; int object_type_id = avio_r8(pb); avio_r8(pb); /* stream type */ avio_rb24(pb); /* buffer size db */ avio_rb32(pb); /* max bitrate */ avio_rb32(pb); /* avg bitrate */ if(avcodec_is_open(st->codec)) { av_log(fc, AV_LOG_D... | 18,972 |
1 | static int swr_convert_internal(struct SwrContext *s, AudioData *out, int out_count, AudioData *in , int in_count){ AudioData *postin, *midbuf, *preout; int ret/*, in_max*/; AudioData preout_tmp, midbuf_tmp; if(s->full_convert){ av_assert0(!s->resample); swri_audio_convert(s->full_convert, out, in, in_count); return ou... | 18,973 |
0 | 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 ret = 0, probe_size; if (!max_probe_size) { max_probe_size = PROBE_BUF_M... | 18,974 |
0 | static int metasound_read_bitstream(AVCodecContext *avctx, TwinVQContext *tctx, const uint8_t *buf, int buf_size) { TwinVQFrameData *bits = &tctx->bits; const TwinVQModeTab *mtab = tctx->mtab; int channels = tctx->avctx->channels; int sub; GetBitContext gb; int i, j, k; if (buf_size * 8 < avctx->bit_rate * mtab->size /... | 18,975 |
0 | static inline void yuv2packedXinC(SwsContext *c, int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize, int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize, uint8_t *dest, int dstW, int y) { int i; switch(c->dstFormat) { case IMGFMT_RGB32: case IMGFMT_BGR32: YSCALE_YUV_2_RGBX_C(uint32_t) ((uint32_t*)dest)[i2+0]= ... | 18,976 |
0 | static int protocol_client_vencrypt_init(VncState *vs, uint8_t *data, size_t len) { if (data[0] != 0 || data[1] != 2) { VNC_DEBUG("Unsupported VeNCrypt protocol %d.%d\n", (int)data[0], (int)data[1]); vnc_write_u8(vs, 1); /* Reject version */ vnc_flush(vs); vnc_client_error(vs); } else { VNC_DEBUG("Sending allowed auth ... | 18,977 |
0 | static int qemu_rdma_exchange_send(RDMAContext *rdma, RDMAControlHeader *head, uint8_t *data, RDMAControlHeader *resp, int *resp_idx, int (*callback)(RDMAContext *rdma)) { int ret = 0; /* * Wait until the dest is ready before attempting to deliver the message * by waiting for a READY message. */ if (rdma->control_ready... | 18,978 |
0 | static void isa_ne2000_set_bootindex(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { ISANE2000State *isa = ISA_NE2000(obj); NE2000State *s = &isa->ne2000; int32_t boot_index; Error *local_err = NULL; visit_type_int32(v, name, &boot_index, &local_err); if (local_err) { goto out; } /* check wheth... | 18,979 |
0 | static void dynticks_rearm_timer(struct qemu_alarm_timer *t) { timer_t host_timer = (timer_t)(long)t->priv; struct itimerspec timeout; int64_t nearest_delta_us = INT64_MAX; int64_t current_us; if (!active_timers[QEMU_TIMER_REALTIME] && !active_timers[QEMU_TIMER_VIRTUAL]) return; nearest_delta_us = qemu_next_deadline_dy... | 18,980 |
0 | static int64_t coroutine_fn bdrv_co_get_block_status_above(BlockDriverState *bs, BlockDriverState *base, int64_t sector_num, int nb_sectors, int *pnum) { BlockDriverState *p; int64_t ret = 0; assert(bs != base); for (p = bs; p != base; p = backing_bs(p)) { ret = bdrv_co_get_block_status(p, sector_num, nb_sectors, pnum)... | 18,981 |
0 | timer_write(void *opaque, hwaddr addr, uint64_t val64, unsigned int size) { struct timerblock *t = opaque; struct xlx_timer *xt; unsigned int timer; uint32_t value = val64; addr >>= 2; timer = timer_from_addr(addr); xt = &t->timers[timer]; D(fprintf(stderr, "%s addr=%x val=%x (timer=%d off=%d)\n", __func__, addr * 4, v... | 18,982 |
0 | int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) { int i, count, ret, read_size, j; AVStream *st; AVPacket pkt1, *pkt; int64_t old_offset = avio_tell(ic->pb); int orig_nb_streams = ic->nb_streams; // new streams might appear, no options for those for(i=0;i<ic->nb_streams;i++) { AVCodec *codec;... | 18,983 |
0 | static void dcr_write_sdram (void *opaque, int dcrn, uint32_t val) { ppc4xx_sdram_t *sdram; sdram = opaque; switch (dcrn) { case SDRAM0_CFGADDR: sdram->addr = val; break; case SDRAM0_CFGDATA: switch (sdram->addr) { case 0x00: /* SDRAM_BESR0 */ sdram->besr0 &= ~val; break; case 0x08: /* SDRAM_BESR1 */ sdram->besr1 &= ~v... | 18,984 |
0 | void object_property_add_alias(Object *obj, const char *name, Object *target_obj, const char *target_name, Error **errp) { AliasProperty *prop; ObjectProperty *target_prop; target_prop = object_property_find(target_obj, target_name, errp); if (!target_prop) { return; } prop = g_malloc(sizeof(*prop)); prop->target_obj =... | 18,985 |
0 | static inline int tcg_global_reg_new_internal(TCGType type, int reg, const char *name) { TCGContext *s = &tcg_ctx; TCGTemp *ts; int idx; #if TCG_TARGET_REG_BITS == 32 if (type != TCG_TYPE_I32) tcg_abort(); #endif if (tcg_regset_test_reg(s->reserved_regs, reg)) tcg_abort(); idx = s->nb_globals; tcg_temp_alloc(s, s->nb_g... | 18,986 |
0 | static SocketAddressLegacy *sd_socket_address(const char *path, const char *host, const char *port) { SocketAddressLegacy *addr = g_new0(SocketAddressLegacy, 1); if (path) { addr->type = SOCKET_ADDRESS_LEGACY_KIND_UNIX; addr->u.q_unix.data = g_new0(UnixSocketAddress, 1); addr->u.q_unix.data->path = g_strdup(path); } el... | 18,987 |
0 | void tcg_target_init(TCGContext *s) { tcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I32], 0, 0xffffffff); #if defined(__sparc_v9__) && !defined(__sparc_v8plus__) tcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I64], 0, 0xffffffff); #endif tcg_regset_set32(tcg_target_call_clobber_regs, 0, (1 << TCG_REG_G1) | (... | 18,989 |
0 | int kvm_has_sync_mmu(void) { return kvm_check_extension(kvm_state, KVM_CAP_SYNC_MMU); } | 18,991 |
0 | static void cirrus_do_copy(CirrusVGAState *s, int dst, int src, int w, int h) { int sx = 0, sy = 0; int dx = 0, dy = 0; int depth = 0; int notify = 0; /* make sure to only copy if it's a plain copy ROP */ if (*s->cirrus_rop == cirrus_bitblt_rop_fwd_src || *s->cirrus_rop == cirrus_bitblt_rop_bkwd_src) { int width, heigh... | 18,992 |
0 | static uint64_t pic_ioport_read(void *opaque, target_phys_addr_t addr, unsigned size) { PICCommonState *s = opaque; int ret; if (s->poll) { ret = pic_get_irq(s); if (ret >= 0) { pic_intack(s, ret); ret |= 0x80; } else { ret = 0; } s->poll = 0; } else { if (addr == 0) { if (s->read_reg_select) { ret = s->isr; } else { r... | 18,993 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.