label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
1 | static void initMMX2HScaler(int dstW, int xInc, uint8_t *funnyCode) { uint8_t *fragment; int imm8OfPShufW1; int imm8OfPShufW2; int fragmentLength; int xpos, i; // create an optimized horizontal scaling routine //code fragment asm volatile( "jmp 9f \n\t" // Begin "0: \n\t" "movq (%%esi), %%mm0 \n\t" //FIXME Alignment "m... | 9,838 |
1 | static void *acpi_add_rom_blob(AcpiBuildState *build_state, GArray *blob, const char *name) { return rom_add_blob(name, blob->data, acpi_data_len(blob), -1, name, acpi_build_update, build_state); } | 9,839 |
1 | static void reclaim_ramblock(RAMBlock *block) { if (block->flags & RAM_PREALLOC) { ; } else if (xen_enabled()) { xen_invalidate_map_cache_entry(block->host); #ifndef _WIN32 } else if (block->fd >= 0) { munmap(block->host, block->max_length); close(block->fd); #endif } else { qemu_anon_ram_free(block->host, block->max_l... | 9,840 |
1 | static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet) { const AVFrame *const p = pict; const int near = avctx->prediction_method; PutBitContext pb, pb2; GetBitContext gb; uint8_t *buf2, *zero, *cur, *last; JLSState *state; int i, size, ret; int comps; if (avctx->pix_fm... | 9,841 |
1 | static int bmp_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; BMPContext *s = avctx->priv_data; AVFrame *picture = data; AVFrame *p = &s->picture; unsigned int fsize, hsize; int width, height; unsigned int depth; BiCompres... | 9,843 |
1 | static void raven_realize(PCIDevice *d, Error **errp) { RavenPCIState *s = RAVEN_PCI_DEVICE(d); char *filename; int bios_size = -1; d->config[0x0C] = 0x08; // cache_line_size d->config[0x0D] = 0x10; // latency_timer d->config[0x34] = 0x00; // capabilities_pointer memory_region_init_ram(&s->bios, OBJECT(s), "bios", BIOS... | 9,844 |
0 | minimac2_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size) { MilkymistMinimac2State *s = opaque; trace_milkymist_minimac2_memory_read(addr, value); addr >>= 2; switch (addr) { case R_MDIO: { /* MDIO_DI is read only */ int mdio_di = (s->regs[R_MDIO] & MDIO_DI); s->regs[R_MDIO] = value; if (mdio... | 9,847 |
0 | int bdrv_in_use(BlockDriverState *bs) { return bs->in_use; } | 9,848 |
0 | static void vhost_log_start(MemoryListener *listener, MemoryRegionSection *section) { /* FIXME: implement */ } | 9,849 |
0 | static inline void tcg_out_addi(TCGContext *s, int reg, tcg_target_long val) { if (val != 0) { if (val == (val & 0xfff)) tcg_out_arithi(s, reg, reg, val, ARITH_ADD); else fprintf(stderr, "unimplemented addi %ld\n", (long)val); } } | 9,850 |
0 | static void pl110_update_display(void *opaque) { PL110State *s = (PL110State *)opaque; SysBusDevice *sbd; DisplaySurface *surface = qemu_console_surface(s->con); drawfn* fntable; drawfn fn; int dest_width; int src_width; int bpp_offset; int first; int last; if (!pl110_enabled(s)) { return; } sbd = SYS_BUS_DEVICE(s); sw... | 9,851 |
0 | static void nvdimm_build_nvdimm_devices(GSList *device_list, Aml *root_dev) { for (; device_list; device_list = device_list->next) { DeviceState *dev = device_list->data; int slot = object_property_get_int(OBJECT(dev), PC_DIMM_SLOT_PROP, NULL); uint32_t handle = nvdimm_slot_to_handle(slot); Aml *nvdimm_dev; nvdimm_dev ... | 9,852 |
0 | int coroutine_fn bdrv_co_readv(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov) { trace_bdrv_co_readv(bs, sector_num, nb_sectors); return bdrv_co_do_readv(bs, sector_num, nb_sectors, qiov, 0); } | 9,853 |
0 | static void test_qemu_strtosz_float(void) { const char *str = "12.345M"; char *endptr = NULL; int64_t res; res = qemu_strtosz(str, &endptr); g_assert_cmpint(res, ==, 12.345 * M_BYTE); g_assert(endptr == str + 7); } | 9,854 |
0 | int i2c_start_transfer(I2CBus *bus, uint8_t address, int recv) { BusChild *kid; I2CSlaveClass *sc; I2CNode *node; if (address == I2C_BROADCAST) { /* * This is a broadcast, the current_devs will be all the devices of the * bus. */ bus->broadcast = true; } QTAILQ_FOREACH(kid, &bus->qbus.children, sibling) { DeviceState *... | 9,855 |
0 | static BlockAIOCB *raw_aio_submit(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockCompletionFunc *cb, void *opaque, int type) { BDRVRawState *s = bs->opaque; if (fd_open(bs) < 0) return NULL; /* * Check if the underlying device requires requests to be aligned, * and if the request we ... | 9,856 |
0 | static int v4l2_set_parameters(AVFormatContext *s1) { struct video_data *s = s1->priv_data; struct v4l2_standard standard = { 0 }; struct v4l2_streamparm streamparm = { 0 }; struct v4l2_fract *tpf = &streamparm.parm.capture.timeperframe; AVRational framerate_q = { 0 }; int i, ret; streamparm.type = V4L2_BUF_TYPE_VIDEO_... | 9,857 |
0 | static int vpc_create(const char *filename, QEMUOptionParameter *options) { uint8_t buf[1024]; struct vhd_footer *footer = (struct vhd_footer *) buf; QEMUOptionParameter *disk_type_param; int fd, i; uint16_t cyls = 0; uint8_t heads = 0; uint8_t secs_per_cyl = 0; int64_t total_sectors; int64_t total_size; int disk_type;... | 9,858 |
0 | void kvm_s390_interrupt_internal(S390CPU *cpu, int type, uint32_t parm, uint64_t parm64, int vm) { CPUState *cs = CPU(cpu); struct kvm_s390_interrupt kvmint; int r; if (!cs->kvm_state) { return; } kvmint.type = type; kvmint.parm = parm; kvmint.parm64 = parm64; if (vm) { r = kvm_vm_ioctl(cs->kvm_state, KVM_S390_INTERRUP... | 9,859 |
0 | static void *build_pci_bus_begin(PCIBus *bus, void *parent_state) { AcpiBuildPciBusHotplugState *parent = parent_state; AcpiBuildPciBusHotplugState *child = g_malloc(sizeof *child); build_pci_bus_state_init(child, parent, parent->pcihp_bridge_en); return child; } | 9,862 |
0 | static unsigned long copy_strings(int argc,char ** argv,unsigned long *page, unsigned long p) { char *tmp, *tmp1, *pag = NULL; int len, offset = 0; if (!p) { return 0; /* bullet-proofing */ } while (argc-- > 0) { if (!(tmp1 = tmp = get_user(argv+argc))) { fprintf(stderr, "VFS: argc is wrong"); exit(-1); } while (get_us... | 9,863 |
0 | void tb_set_jmp_target1(uintptr_t jmp_addr, uintptr_t addr) { uint32_t *ptr = (uint32_t *)jmp_addr; uintptr_t disp = addr - jmp_addr; /* We can reach the entire address space for 32-bit. For 64-bit the code_gen_buffer can't be larger than 2GB. */ assert(disp == (int32_t)disp); *ptr = CALL | (uint32_t)disp >> 2; flush_i... | 9,865 |
0 | void mmio_ide_init (target_phys_addr_t membase, target_phys_addr_t membase2, MemoryRegion *address_space, qemu_irq irq, int shift, DriveInfo *hd0, DriveInfo *hd1) { MMIOState *s = g_malloc0(sizeof(MMIOState)); ide_init2_with_non_qdev_drives(&s->bus, hd0, hd1, irq); s->shift = shift; memory_region_init_io(&s->iomem1, &m... | 9,867 |
0 | void ff_mpc_dequantize_and_synth(MPCContext * c, int maxband, void *data, int channels) { int i, j, ch; Band *bands = c->bands; int off; float mul; /* dequantize */ memset(c->sb_samples, 0, sizeof(c->sb_samples)); off = 0; for(i = 0; i <= maxband; i++, off += SAMPLES_PER_BAND){ for(ch = 0; ch < 2; ch++){ if(bands[i].re... | 9,868 |
0 | static int raw_probe_blocksizes(BlockDriverState *bs, BlockSizes *bsz) { BDRVRawState *s = bs->opaque; int ret; ret = bdrv_probe_blocksizes(bs->file->bs, bsz); if (ret < 0) { return ret; } if (!QEMU_IS_ALIGNED(s->offset, MAX(bsz->log, bsz->phys))) { return -ENOTSUP; } return 0; } | 9,869 |
0 | BlockJobInfo *block_job_query(BlockJob *job) { BlockJobInfo *info = g_new0(BlockJobInfo, 1); info->type = g_strdup(BlockJobType_lookup[job->driver->job_type]); info->device = g_strdup(bdrv_get_device_name(job->bs)); info->len = job->len; info->busy = job->busy; info->paused = job->paused; info->offset = job->offset; in... | 9,871 |
1 | vcard_emul_options(const char *args) { int reader_count = 0; VCardEmulOptions *opts; /* Allow the future use of allocating the options structure on the fly */ memcpy(&options, &default_options, sizeof(options)); opts = &options; do { args = strip(args); /* strip off the leading spaces */ if (*args == ',') { continue; }... | 9,873 |
1 | static int pci_qdev_init(DeviceState *qdev) { PCIDevice *pci_dev = (PCIDevice *)qdev; PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(pci_dev); PCIBus *bus; int rc; bool is_default_rom; /* initialize cap_present for pci_is_express() and pci_config_size() */ if (pc->is_express) { pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS; ... | 9,874 |
1 | static void report_unavailable_features(FeatureWord w, uint32_t mask) { FeatureWordInfo *f = &feature_word_info[w]; int i; for (i = 0; i < 32; ++i) { if (1 << i & mask) { const char *reg = get_register_name_32(f->cpuid_reg); assert(reg); fprintf(stderr, "warning: %s doesn't support requested feature: " "CPUID.%02XH:%s%... | 9,875 |
1 | ISADevice *isa_create(ISABus *bus, const char *name) { DeviceState *dev; if (!bus) { hw_error("Tried to create isa device %s with no isa bus present.", name); } dev = qdev_create(BUS(bus), name); return ISA_DEVICE(dev); } | 9,876 |
1 | static int decode_slice_luma(AVCodecContext *avctx, SliceContext *slice, uint16_t *dst, int dst_stride, const uint8_t *buf, unsigned buf_size, const int16_t *qmat) { ProresContext *ctx = avctx->priv_data; LOCAL_ALIGNED_16(int16_t, blocks, [8*4*64]); int16_t *block; GetBitContext gb; int i, blocks_per_slice = slice->mb_... | 9,877 |
1 | static int read_uncompressed_sgi(const SGIInfo *si, AVPicture *pict, ByteIOContext *f) { int x, y, z, chan_offset, ret = 0; uint8_t *dest_row, *tmp_row = NULL; tmp_row = av_malloc(si->xsize); /* skip header */ url_fseek(f, SGI_HEADER_SIZE, SEEK_SET); pict->linesize[0] = si->xsize; for (z = 0; z < si->zsize; z++) { #ifn... | 9,878 |
1 | static int coroutine_fn bdrv_driver_pwritev(BlockDriverState *bs, uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int flags) { BlockDriver *drv = bs->drv; int64_t sector_num; unsigned int nb_sectors; int ret; if (drv->bdrv_co_pwritev) { ret = drv->bdrv_co_pwritev(bs, offset, bytes, qiov, flags & bs->supported_writ... | 9,879 |
1 | static void host_signal_handler(int host_signum, siginfo_t *info, void *puc) { CPUArchState *env = thread_cpu->env_ptr; CPUState *cpu = ENV_GET_CPU(env); TaskState *ts = cpu->opaque; int sig; target_siginfo_t tinfo; ucontext_t *uc = puc; struct emulated_sigtable *k; /* the CPU emulator uses some host signals to detect ... | 9,881 |
1 | static int nbd_co_send_request(BlockDriverState *bs, struct nbd_request *request, QEMUIOVector *qiov, int offset) { NbdClientSession *s = nbd_get_client_session(bs); AioContext *aio_context; int rc, ret; qemu_co_mutex_lock(&s->send_mutex); s->send_coroutine = qemu_coroutine_self(); aio_context = bdrv_get_aio_context(bs... | 9,882 |
1 | qio_channel_socket_accept(QIOChannelSocket *ioc, Error **errp) { QIOChannelSocket *cioc; cioc = qio_channel_socket_new(); cioc->remoteAddrLen = sizeof(ioc->remoteAddr); cioc->localAddrLen = sizeof(ioc->localAddr); retry: trace_qio_channel_socket_accept(ioc); cioc->fd = qemu_accept(ioc->fd, (struct sockaddr *)&cioc->rem... | 9,883 |
1 | static void io_write(IPackDevice *ip, uint8_t addr, uint16_t val) { IPOctalState *dev = IPOCTAL(ip); unsigned reg = val & 0xFF; /* addr[7:6]: block (A-D) addr[7:5]: channel (a-h) addr[5:0]: register */ unsigned block = addr >> 5; unsigned channel = addr >> 4; /* Big endian, accessed using 8-bit bytes at odd locations *... | 9,884 |
0 | int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags) { AVDictionary *m = *pm; AVDictionaryEntry *tag = av_dict_get(m, key, NULL, flags); char *oldval = NULL, *copy_key = NULL, *copy_value = NULL; if (flags & AV_DICT_DONT_STRDUP_KEY) copy_key = (void *)key; else copy_key = av_strdup(key); if... | 9,885 |
1 | static av_cold int dfa_decode_init(AVCodecContext *avctx) { DfaContext *s = avctx->priv_data; avctx->pix_fmt = PIX_FMT_PAL8; s->frame_buf = av_mallocz(avctx->width * avctx->height + AV_LZO_OUTPUT_PADDING); if (!s->frame_buf) return AVERROR(ENOMEM); return 0; } | 9,886 |
1 | static int vnc_tls_initialize(void) { static int tlsinitialized = 0; if (tlsinitialized) return 1; if (gnutls_global_init () < 0) return 0; /* XXX ought to re-generate diffie-hellman params periodically */ if (gnutls_dh_params_init (&dh_params) < 0) return 0; if (gnutls_dh_params_generate2 (dh_params, DH_BITS) < 0) ret... | 9,887 |
1 | char *socket_address_to_string(struct SocketAddress *addr, Error **errp) { char *buf; InetSocketAddress *inet; char host_port[INET6_ADDRSTRLEN + 5 + 4]; switch (addr->type) { case SOCKET_ADDRESS_KIND_INET: inet = addr->u.inet.data; if (strchr(inet->host, ':') == NULL) { snprintf(host_port, sizeof(host_port), "%s:%s", i... | 9,888 |
1 | aio_write_done(void *opaque, int ret) { struct aio_ctx *ctx = opaque; struct timeval t2; gettimeofday(&t2, NULL); if (ret < 0) { printf("aio_write failed: %s\n", strerror(-ret)); return; } if (ctx->qflag) { return; } /* Finally, report back -- -C gives a parsable format */ t2 = tsub(t2, ctx->t1); print_report("wrote", ... | 9,891 |
1 | static void usb_msd_realize_storage(USBDevice *dev, Error **errp) { MSDState *s = DO_UPCAST(MSDState, dev, dev); BlockDriverState *bs = s->conf.bs; SCSIDevice *scsi_dev; Error *err = NULL; if (!bs) { error_setg(errp, "drive property not set"); return; } blkconf_serial(&s->conf, &dev->serial); /* * Hack alert: this pret... | 9,892 |
1 | static int local_chown(FsContext *fs_ctx, V9fsPath *fs_path, FsCred *credp) { char *buffer; int ret = -1; char *path = fs_path->data; if ((credp->fc_uid == -1 && credp->fc_gid == -1) || (fs_ctx->export_flags & V9FS_SM_PASSTHROUGH) || (fs_ctx->export_flags & V9FS_SM_NONE)) { buffer = rpath(fs_ctx, path); ret = lchown(bu... | 9,895 |
1 | static void gen_mtsrin_64b(DisasContext *ctx) { #if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_REG); #else TCGv t0; if (unlikely(ctx->pr)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_REG); return; } t0 = tcg_temp_new(); tcg_gen_shri_tl(t0, cpu_gpr[rB(ctx->opcode)], 28); tcg_gen_andi_tl(t0, t0... | 9,897 |
1 | static pid_t qtest_qemu_pid(QTestState *s) { FILE *f; char buffer[1024]; pid_t pid = -1; f = fopen(s->pid_file, "r"); if (f) { if (fgets(buffer, sizeof(buffer), f)) { pid = atoi(buffer); } fclose(f); } return pid; } | 9,898 |
1 | ssize_t pt_getxattr(FsContext *ctx, const char *path, const char *name, void *value, size_t size) { char *buffer; ssize_t ret; buffer = rpath(ctx, path); ret = lgetxattr(buffer, name, value, size); g_free(buffer); return ret; } | 9,899 |
1 | int qdev_device_help(QemuOpts *opts) { Error *local_err = NULL; const char *driver; DevicePropertyInfoList *prop_list; DevicePropertyInfoList *prop; driver = qemu_opt_get(opts, "driver"); if (driver && is_help_option(driver)) { qdev_print_devinfos(false); return 1; } if (!driver || !qemu_opt_has_help_opt(opts)) { retur... | 9,902 |
1 | static void free_stream(AVStream **pst) { AVStream *st = *pst; int i; if (!st) return; for (i = 0; i < st->nb_side_data; i++) av_freep(&st->side_data[i].data); av_freep(&st->side_data); if (st->parser) av_parser_close(st->parser); if (st->attached_pic.data) av_packet_unref(&st->attached_pic); if (st->internal) { avcode... | 9,903 |
1 | static void FUNCC(pred16x16_horizontal)(uint8_t *_src, int stride){ int i; pixel *src = (pixel*)_src; stride /= sizeof(pixel); for(i=0; i<16; i++){ ((pixel4*)(src+i*stride))[0] = ((pixel4*)(src+i*stride))[1] = ((pixel4*)(src+i*stride))[2] = ((pixel4*)(src+i*stride))[3] = PIXEL_SPLAT_X4(src[-1+i*stride]); } } | 9,905 |
1 | static void virtio_queue_host_notifier_read(EventNotifier *n) { VirtQueue *vq = container_of(n, VirtQueue, host_notifier); if (event_notifier_test_and_clear(n)) { virtio_queue_notify_vq(vq); } } | 9,906 |
1 | static int get_uint16_equal(QEMUFile *f, void *pv, size_t size, VMStateField *field) { uint16_t *v = pv; uint16_t v2; qemu_get_be16s(f, &v2); if (*v == v2) { return 0; error_report("%x != %x", *v, v2); return -EINVAL; | 9,907 |
1 | static struct scoop_info_s *spitz_scoop_init(struct pxa2xx_state_s *cpu, int count) { int iomemtype; struct scoop_info_s *s; s = (struct scoop_info_s *) qemu_mallocz(sizeof(struct scoop_info_s) * 2); memset(s, 0, sizeof(struct scoop_info_s) * count); s[0].target_base = 0x10800000; s[1].target_base = 0x08800040; /* Read... | 9,908 |
1 | static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) { AVFilterContext *ctx = inlink->dst; AVFilterLink *outlink = ctx->outputs[0]; ShowCQTContext *s = ctx->priv; int remaining, step, ret, x, i, j, m; float *audio_data; AVFrame *out = NULL; if (!insamples) { while (s->remaining_fill < s->fft_len / 2) { mem... | 9,909 |
1 | static void rearm_sensor_evts(IPMIBmcSim *ibs, uint8_t *cmd, unsigned int cmd_len, uint8_t *rsp, unsigned int *rsp_len, unsigned int max_rsp_len) { IPMISensor *sens; IPMI_CHECK_CMD_LEN(4); if ((cmd[2] >= MAX_SENSORS) || !IPMI_SENSOR_GET_PRESENT(ibs->sensors + cmd[2])) { rsp[2] = IPMI_CC_REQ_ENTRY_NOT_PRESENT; return; }... | 9,910 |
1 | CharDriverState *qemu_chr_open_opts(QemuOpts *opts, void (*init)(struct CharDriverState *s)) { CharDriverState *chr; int i; if (qemu_opts_id(opts) == NULL) { fprintf(stderr, "chardev: no id specified\n"); for (i = 0; i < ARRAY_SIZE(backend_table); i++) { if (strcmp(backend_table[i].name, qemu_opt_get(opts, "backend")) ... | 9,912 |
1 | QVirtioPCIDevice *qvirtio_pci_device_find(QPCIBus *bus, uint16_t device_type) { QVirtioPCIDevice *dev = NULL; qvirtio_pci_foreach(bus, device_type, qvirtio_pci_assign_device, &dev); dev->vdev.bus = &qvirtio_pci; return dev; } | 9,914 |
1 | static int get_dimension(GetBitContext *gb, const int *dim) { int t = get_bits(gb, 3); int val = dim[t]; if(val < 0) val = dim[get_bits1(gb) - val]; if(!val){ do{ t = get_bits(gb, 8); val += t << 2; }while(t == 0xFF); } return val; } | 9,915 |
1 | static int slirp_smb(SlirpState* s, const char *exported_dir, struct in_addr vserver_addr) { static int instance; char smb_conf[128]; char smb_cmdline[128]; struct passwd *passwd; FILE *f; passwd = getpwuid(geteuid()); if (!passwd) { error_report("failed to retrieve user name"); snprintf(s->smb_dir, sizeof(s->smb_dir),... | 9,916 |
1 | static always_inline void gen_op_arith_compute_ca(DisasContext *ctx, TCGv arg1, TCGv arg2, int sub) { int l1 = gen_new_label(); #if defined(TARGET_PPC64) if (!(ctx->sf_mode)) { TCGv t0, t1; t0 = tcg_temp_new(TCG_TYPE_TL); t1 = tcg_temp_new(TCG_TYPE_TL); tcg_gen_ext32u_tl(t0, arg1); tcg_gen_ext32u_tl(t1, arg2); if (sub)... | 9,917 |
0 | const char *avformat_configuration(void) { return FFMPEG_CONFIGURATION; } | 9,918 |
0 | int ff_framesync_dualinput_get_writable(FFFrameSync *fs, AVFrame **f0, AVFrame **f1) { int ret; ret = ff_framesync_dualinput_get(fs, f0, f1); if (ret < 0) return ret; ret = ff_inlink_make_frame_writable(fs->parent->inputs[0], f0); if (ret < 0) { av_frame_free(f0); av_frame_free(f1); return ret; } return 0; } | 9,920 |
1 | static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, int size, int64_t pos, uint64_t cluster_time, uint64_t duration, int is_keyframe, int64_t cluster_pos) { uint64_t timecode = AV_NOPTS_VALUE; MatroskaTrack *track; int res = 0; AVStream *st; AVPacket *pkt; int16_t block_time; uint32_t *lace_s... | 9,921 |
1 | void tcg_optimize(TCGContext *s) { int oi, oi_next, nb_temps, nb_globals; TCGOp *prev_mb = NULL; struct tcg_temp_info *infos; TCGTempSet temps_used; /* Array VALS has an element for each temp. If this temp holds a constant then its value is kept in VALS' element. If this temp is a copy of other ones then the other copi... | 9,923 |
1 | void ff_mpeg_set_erpic(ERPicture *dst, Picture *src) { int i; if (!src) return; dst->f = &src->f; dst->tf = &src->tf; for (i = 0; i < 2; i++) { dst->motion_val[i] = src->motion_val[i]; dst->ref_index[i] = src->ref_index[i]; } dst->mb_type = src->mb_type; dst->field_picture = src->field_picture; } | 9,924 |
1 | static uint8_t qvirtio_pci_get_status(QVirtioDevice *d) { QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d; return qpci_io_readb(dev->pdev, dev->addr + VIRTIO_PCI_STATUS); } | 9,925 |
1 | static void synthfilt_build_sb_samples (QDM2Context *q, GetBitContext *gb, int length, int sb_min, int sb_max) { int sb, j, k, n, ch, run, channels; int joined_stereo, zero_encoding, chs; int type34_first; float type34_div = 0; float type34_predictor; float samples[10], sign_bits[16]; if (length == 0) { // If no data u... | 9,926 |
1 | static void test_keyval_visit_alternate(void) { Error *err = NULL; Visitor *v; QDict *qdict; AltNumStr *ans; AltNumInt *ani; /* * Can't do scalar alternate variants other than string. You get * the string variant if there is one, else an error. */ qdict = keyval_parse("a=1,b=2", NULL, &error_abort); v = qobject_input_v... | 9,927 |
0 | static int svq3_decode_slice_header(AVCodecContext *avctx) { SVQ3Context *svq3 = avctx->priv_data; H264Context *h = &svq3->h; MpegEncContext *s = &h->s; const int mb_xy = h->mb_xy; int i, header; header = get_bits(&s->gb, 8); if (((header & 0x9F) != 1 && (header & 0x9F) != 2) || (header & 0x60) == 0) { /* TODO: what? *... | 9,928 |
1 | void avfilter_default_start_frame(AVFilterLink *link, AVFilterPicRef *picref) { AVFilterLink *out = NULL; if(link->dst->output_count) out = link->dst->outputs[0]; if(out) { out->outpic = avfilter_get_video_buffer(out, AV_PERM_WRITE, link->w, link->h); out->outpic->pts = picref->pts; avfilter_start_frame(out, avfilter_r... | 9,930 |
1 | int load_aout(const char *filename, target_phys_addr_t addr, int max_sz, int bswap_needed, target_phys_addr_t target_page_size) { int fd, size, ret; struct exec e; uint32_t magic; fd = open(filename, O_RDONLY | O_BINARY); if (fd < 0) return -1; size = read(fd, &e, sizeof(e)); if (size < 0) goto fail; if (bswap_needed) ... | 9,931 |
1 | int64_t cache_resize(PageCache *cache, int64_t new_num_pages) { PageCache *new_cache; int64_t i; CacheItem *old_it, *new_it; g_assert(cache); /* cache was not inited */ if (cache->page_cache == NULL) { return -1; } /* same size */ if (pow2floor(new_num_pages) == cache->max_num_items) { return cache->max_num_items; } ne... | 9,932 |
1 | static void choose_sample_fmt(AVStream *st, AVCodec *codec) { if (codec && codec->sample_fmts) { const enum AVSampleFormat *p = codec->sample_fmts; for (; *p != -1; p++) { if (*p == st->codec->sample_fmt) break; } if (*p == -1) { av_log(NULL, AV_LOG_WARNING, "Incompatible sample format '%s' for codec '%s', auto-selecti... | 9,933 |
1 | static void unin_data_write(void *opaque, hwaddr addr, uint64_t val, unsigned len) { UNINState *s = opaque; PCIHostState *phb = PCI_HOST_BRIDGE(s); UNIN_DPRINTF("write addr %" TARGET_FMT_plx " len %d val %"PRIx64"\n", addr, len, val); pci_data_write(phb->bus, unin_get_config_reg(phb->config_reg, addr), val, len); } | 9,935 |
1 | static bool vhost_section(MemoryRegionSection *section) { return memory_region_is_ram(section->mr); } | 9,936 |
1 | void do_subfzeo (void) { T1 = T0; T0 = ~T0 + xer_ca; if (likely(!((~T1 ^ (-1)) & ((~T1) ^ T0) & (1 << 31)))) { xer_ov = 0; } else { xer_ov = 1; xer_so = 1; } if (likely(T0 >= ~T1)) { xer_ca = 0; } else { xer_ca = 1; } } | 9,937 |
0 | static void test_visitor_out_native_list_int(TestOutputVisitorData *data, const void *unused) { test_native_list(data, unused, USER_DEF_NATIVE_LIST_UNION_KIND_INTEGER); } | 9,938 |
0 | QList *qlist_new(void) { QList *qlist; qlist = g_malloc(sizeof(*qlist)); QTAILQ_INIT(&qlist->head); QOBJECT_INIT(qlist, &qlist_type); return qlist; } | 9,939 |
0 | static int decode_wdlt(GetByteContext *gb, uint8_t *frame, int width, int height) { const uint8_t *frame_end = frame + width * height; uint8_t *line_ptr; int count, i, v, lines, segments; lines = bytestream2_get_le16(gb); if (lines > height) return -1; while (lines--) { if (bytestream2_get_bytes_left(gb) < 2) return -1... | 9,940 |
0 | static void fw_cfg_comb_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size) { switch (size) { case 1: fw_cfg_write(opaque, (uint8_t)value); break; case 2: fw_cfg_select(opaque, (uint16_t)value); break; } } | 9,941 |
0 | void virtio_queue_notify(VirtIODevice *vdev, int n) { if (n < VIRTIO_PCI_QUEUE_MAX && vdev->vq[n].vring.desc) { trace_virtio_queue_notify(vdev, n, &vdev->vq[n]); vdev->vq[n].handle_output(vdev, &vdev->vq[n]); } } | 9,942 |
0 | void ioinst_handle_stcrw(S390CPU *cpu, uint32_t ipb) { CRW *crw; uint64_t addr; int cc; hwaddr len = sizeof(*crw); CPUS390XState *env = &cpu->env; addr = decode_basedisp_s(env, ipb); if (addr & 3) { program_interrupt(env, PGM_SPECIFICATION, 2); return; } crw = s390_cpu_physical_memory_map(env, addr, &len, 1); if (!crw ... | 9,944 |
0 | void sysbus_mmio_map_overlap(SysBusDevice *dev, int n, hwaddr addr, unsigned priority) { sysbus_mmio_map_common(dev, n, addr, true, priority); } | 9,945 |
0 | static int tpm_passthrough_test_tpmdev(int fd) { struct tpm_req_hdr req = { .tag = cpu_to_be16(TPM_TAG_RQU_COMMAND), .len = cpu_to_be32(sizeof(req)), .ordinal = cpu_to_be32(TPM_ORD_GetTicks), }; struct tpm_resp_hdr *resp; fd_set readfds; int n; struct timeval tv = { .tv_sec = 1, .tv_usec = 0, }; unsigned char buf[1024]... | 9,946 |
0 | static int tight_palette_insert(QDict *palette, uint32_t rgb, int bpp, int max) { uint8_t key[6]; int idx = qdict_size(palette); bool present; tight_palette_rgb2buf(rgb, bpp, key); present = qdict_haskey(palette, (char *)key); if (idx >= max && !present) { return 0; } if (!present) { qdict_put(palette, (char *)key, qin... | 9,947 |
0 | static void vnc_connect(VncDisplay *vd, int csock, bool skipauth, bool websocket) { VncState *vs = g_malloc0(sizeof(VncState)); int i; vs->csock = csock; vs->vd = vd; if (skipauth) { vs->auth = VNC_AUTH_NONE; vs->subauth = VNC_AUTH_INVALID; } else { if (websocket) { vs->auth = vd->ws_auth; vs->subauth = VNC_AUTH_INVALI... | 9,948 |
0 | static void lsi_command_complete(SCSIRequest *req, uint32_t status, size_t resid) { LSIState *s = DO_UPCAST(LSIState, dev.qdev, req->bus->qbus.parent); int out; out = (s->sstat1 & PHASE_MASK) == PHASE_DO; DPRINTF("Command complete status=%d\n", (int)status); s->status = status; s->command_complete = 2; if (s->waiting &... | 9,949 |
0 | static ssize_t test_block_init_func(QCryptoBlock *block, void *opaque, size_t headerlen, Error **errp) { Buffer *header = opaque; g_assert_cmpint(header->capacity, ==, 0); buffer_reserve(header, headerlen); return headerlen; } | 9,950 |
0 | static inline void decode_hrd_parameters(H264Context *h, SPS *sps){ MpegEncContext * const s = &h->s; int cpb_count, i; cpb_count = get_ue_golomb(&s->gb) + 1; get_bits(&s->gb, 4); /* bit_rate_scale */ get_bits(&s->gb, 4); /* cpb_size_scale */ for(i=0; i<cpb_count; i++){ get_ue_golomb(&s->gb); /* bit_rate_value_minus1 *... | 9,951 |
0 | void OPPROTO op_addw_ESI_T0(void) { ESI = (ESI & ~0xffff) | ((ESI + T0) & 0xffff); } | 9,952 |
0 | uint8_t *xen_map_cache(target_phys_addr_t phys_addr, target_phys_addr_t size, uint8_t lock) { MapCacheEntry *entry, *pentry = NULL; target_phys_addr_t address_index = phys_addr >> MCACHE_BUCKET_SHIFT; target_phys_addr_t address_offset = phys_addr & (MCACHE_BUCKET_SIZE - 1); target_phys_addr_t __size = size; trace_xen_m... | 9,953 |
0 | static unsigned int dec_move_pm(DisasContext *dc) { TCGv t0; int memsize; memsize = preg_sizes[dc->op2]; DIS(fprintf (logfile, "move.%c $p%u, [$r%u%s\n", memsize_char(memsize), dc->op2, dc->op1, dc->postinc ? "+]" : "]")); /* prepare store. Address in T0, value in T1. */ if (dc->op2 == PR_CCS) cris_evaluate_flags(dc); ... | 9,954 |
0 | static void test_event_d(TestEventData *data, const void *unused) { UserDefOne struct1; EventStructOne a; UserDefZero z; QDict *d, *d_data, *d_a, *d_struct1; z.integer = 2; struct1.base = &z; struct1.string = g_strdup("test1"); struct1.has_enum1 = true; struct1.enum1 = ENUM_ONE_VALUE1; a.struct1 = &struct1; a.string = ... | 9,955 |
0 | void ide_init2(IDEBus *bus, DriveInfo *hd0, DriveInfo *hd1, qemu_irq irq) { IDEState *s; static int drive_serial = 1; int i, cylinders, heads, secs; uint64_t nb_sectors; for(i = 0; i < 2; i++) { s = bus->ifs + i; s->bus = bus; s->unit = i; if (i == 0 && hd0) s->bs = hd0->bdrv; if (i == 1 && hd1) s->bs = hd1->bdrv; s->i... | 9,957 |
0 | BdrvChild *bdrv_root_attach_child(BlockDriverState *child_bs, const char *child_name, const BdrvChildRole *child_role, uint64_t perm, uint64_t shared_perm, void *opaque, Error **errp) { BdrvChild *child; int ret; ret = bdrv_check_update_perm(child_bs, perm, shared_perm, NULL, errp); if (ret < 0) { return NULL; } child ... | 9,958 |
0 | static void do_eject(int argc, const char **argv) { BlockDriverState *bs; const char **parg; int force; parg = argv + 1; if (!*parg) { fail: help_cmd(argv[0]); return; } force = 0; if (!strcmp(*parg, "-f")) { force = 1; parg++; } if (!*parg) goto fail; bs = bdrv_find(*parg); if (!bs) { term_printf("device not found\n")... | 9,959 |
0 | long do_sigreturn(CPUSH4State *regs) { struct target_sigframe *frame; abi_ulong frame_addr; sigset_t blocked; target_sigset_t target_set; target_ulong r0; int i; int err = 0; #if defined(DEBUG_SIGNAL) fprintf(stderr, "do_sigreturn\n"); #endif frame_addr = regs->gregs[15]; if (!lock_user_struct(VERIFY_READ, frame, frame... | 9,960 |
0 | static uint64_t pcnet_ioport_read(void *opaque, target_phys_addr_t addr, unsigned size) { PCNetState *d = opaque; if (addr < 16 && size == 1) { return pcnet_aprom_readb(d, addr); } else if (addr >= 0x10 && addr < 0x20 && size == 2) { return pcnet_ioport_readw(d, addr); } else if (addr >= 0x10 && addr < 0x20 && size == ... | 9,962 |
0 | int cpu_x86_gen_code(uint8_t *gen_code_buf, int max_code_size, int *gen_code_size_ptr, uint8_t *pc_start, uint8_t *cs_base, int flags) { DisasContext dc1, *dc = &dc1; uint8_t *pc_ptr; uint16_t *gen_opc_end; int gen_code_size; long ret; #ifdef DEBUG_DISAS struct disassemble_info disasm_info; #endif /* generate intermedi... | 9,963 |
0 | static void parse_type_int64(Visitor *v, const char *name, int64_t *obj, Error **errp) { StringInputVisitor *siv = to_siv(v); if (!siv->string) { error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name ? name : "null", "integer"); return; } if (parse_str(siv, name, errp) < 0) { return; } if (!siv->ranges) { goto error; } if... | 9,965 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.