label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
1 | static av_cold int fdk_aac_decode_init(AVCodecContext *avctx) { FDKAACDecContext *s = avctx->priv_data; AAC_DECODER_ERROR err; int ret; s->handle = aacDecoder_Open(avctx->extradata_size ? TT_MP4_RAW : TT_MP4_ADTS, 1); if (!s->handle) { av_log(avctx, AV_LOG_ERROR, "Error opening decoder\n"); return AVERROR_UNKNOWN; } if... | 6,216 |
1 | int ff_hevc_decode_extradata(const uint8_t *data, int size, HEVCParamSets *ps, int *is_nalff, int *nal_length_size, int err_recognition, void *logctx) { int ret = 0; GetByteContext gb; bytestream2_init(&gb, data, size); if (size > 3 && (data[0] || data[1] || data[2] > 1)) { /* It seems the extradata is encoded as hvcC ... | 6,218 |
1 | static void frame_thread_free(AVCodecContext *avctx, int thread_count) { FrameThreadContext *fctx = avctx->thread_opaque; AVCodec *codec = avctx->codec; int i; park_frame_worker_threads(fctx, thread_count); if (fctx->prev_thread && fctx->prev_thread != fctx->threads) update_context_from_thread(fctx->threads->avctx, fct... | 6,219 |
0 | int qio_dns_resolver_lookup_sync(QIODNSResolver *resolver, SocketAddress *addr, size_t *naddrs, SocketAddress ***addrs, Error **errp) { switch (addr->type) { case SOCKET_ADDRESS_KIND_INET: return qio_dns_resolver_lookup_sync_inet(resolver, addr, naddrs, addrs, errp); case SOCKET_ADDRESS_KIND_UNIX: case SOCKET_ADDRESS_K... | 6,220 |
0 | int fw_cfg_add_file(FWCfgState *s, const char *dir, const char *filename, uint8_t *data, uint32_t len) { const char *basename; int index; if (!s->files) { int dsize = sizeof(uint32_t) + sizeof(FWCfgFile) * FW_CFG_FILE_SLOTS; s->files = qemu_mallocz(dsize); fw_cfg_add_bytes(s, FW_CFG_FILE_DIR, (uint8_t*)s->files, dsize)... | 6,221 |
0 | static void mov_text_text_cb(void *priv, const char *text, int len) { MovTextContext *s = priv; av_strlcpy(s->ptr, text, FFMIN(s->end - s->ptr, len + 1)); s->ptr += len; } | 6,222 |
0 | void qmp_balloon(int64_t value, Error **errp) { if (kvm_enabled() && !kvm_has_sync_mmu()) { error_set(errp, QERR_KVM_MISSING_CAP, "synchronous MMU", "balloon"); return; } if (value <= 0) { error_set(errp, QERR_INVALID_PARAMETER_VALUE, "target", "a size"); return; } if (qemu_balloon(value) == 0) { error_set(errp, QERR_D... | 6,223 |
0 | struct GuestFileSeek *qmp_guest_file_seek(int64_t handle, int64_t offset, int64_t whence, Error **errp) { GuestFileHandle *gfh = guest_file_handle_find(handle, errp); GuestFileSeek *seek_data = NULL; FILE *fh; int ret; if (!gfh) { return NULL; } fh = gfh->fh; ret = fseek(fh, offset, whence); if (ret == -1) { error_setg... | 6,224 |
0 | static bool virtio_device_endian_needed(void *opaque) { VirtIODevice *vdev = opaque; assert(vdev->device_endian != VIRTIO_DEVICE_ENDIAN_UNKNOWN); if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) { return vdev->device_endian != virtio_default_endian(); } /* Devices conforming to VIRTIO 1.0 or later are always LE. */ r... | 6,225 |
0 | static int uhci_handle_td(UHCIState *s, uint32_t addr, UHCI_TD *td, uint32_t *int_mask) { UHCIAsync *async; int len = 0, max_len; uint8_t pid; /* Is active ? */ if (!(td->ctrl & TD_CTRL_ACTIVE)) return 1; async = uhci_async_find_td(s, addr, td->token); if (async) { /* Already submitted */ async->valid = 32; if (!async-... | 6,226 |
0 | static void omap_pwt_write(void *opaque, hwaddr addr, uint64_t value, unsigned size) { struct omap_pwt_s *s = (struct omap_pwt_s *) opaque; int offset = addr & OMAP_MPUI_REG_MASK; if (size != 1) { omap_badwidth_write8(opaque, addr, value); return; } switch (offset) { case 0x00: /* FRC */ s->frc = value & 0x3f; break; c... | 6,227 |
0 | START_TEST(unterminated_array_comma) { QObject *obj = qobject_from_json("[32,"); fail_unless(obj == NULL); } | 6,228 |
0 | uint64_t ppc_hash64_start_access(PowerPCCPU *cpu, target_ulong pte_index) { uint64_t token = 0; hwaddr pte_offset; pte_offset = pte_index * HASH_PTE_SIZE_64; if (cpu->env.external_htab == MMU_HASH64_KVM_MANAGED_HPT) { /* * HTAB is controlled by KVM. Fetch the PTEG into a new buffer. */ token = kvmppc_hash64_read_pteg(c... | 6,229 |
0 | static inline void gen_neon_negl(TCGv var, int size) { switch (size) { case 0: gen_helper_neon_negl_u16(var, var); break; case 1: gen_helper_neon_negl_u32(var, var); break; case 2: gen_helper_neon_negl_u64(var, var); break; default: abort(); } } | 6,230 |
0 | void curses_display_init(DisplayState *ds, int full_screen) { #ifndef _WIN32 if (!isatty(1)) { fprintf(stderr, "We need a terminal output\n"); exit(1); } #endif curses_setup(); curses_keyboard_setup(); atexit(curses_atexit); #ifndef _WIN32 signal(SIGINT, SIG_DFL); signal(SIGQUIT, SIG_DFL); #if defined(SIGWINCH) && defi... | 6,231 |
0 | void qio_channel_socket_dgram_async(QIOChannelSocket *ioc, SocketAddress *localAddr, SocketAddress *remoteAddr, QIOTaskFunc callback, gpointer opaque, GDestroyNotify destroy) { QIOTask *task = qio_task_new( OBJECT(ioc), callback, opaque, destroy); struct QIOChannelSocketDGramWorkerData *data = g_new0( struct QIOChannel... | 6,232 |
0 | static av_cold int libx265_encode_init(AVCodecContext *avctx) { libx265Context *ctx = avctx->priv_data; ctx->api = x265_api_get(av_pix_fmt_desc_get(avctx->pix_fmt)->comp[0].depth_minus1 + 1); if (!ctx->api) ctx->api = x265_api_get(0); if (avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL && !av_pix_fmt_desc_get... | 6,233 |
0 | static uint32_t set_allocation_state(sPAPRDRConnector *drc, sPAPRDRAllocationState state) { sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc); trace_spapr_drc_set_allocation_state(get_index(drc), state); if (state == SPAPR_DR_ALLOCATION_STATE_USABLE) { /* if there's no resource/device associated with the ... | 6,234 |
0 | static void vfio_pci_reset_handler(void *opaque) { VFIOGroup *group; VFIOPCIDevice *vdev; QLIST_FOREACH(group, &group_list, next) { QLIST_FOREACH(vdev, &group->device_list, next) { if (!vdev->reset_works || (!vdev->has_flr && vdev->has_pm_reset)) { vdev->needs_reset = true; } } } QLIST_FOREACH(group, &group_list, next)... | 6,235 |
0 | static void virt_machine_class_init(ObjectClass *oc, void *data) { MachineClass *mc = MACHINE_CLASS(oc); mc->init = machvirt_init; /* Start max_cpus at the maximum QEMU supports. We'll further restrict * it later in machvirt_init, where we have more information about the * configuration of the particular instance. */ m... | 6,236 |
0 | static void xtensa_lx60_init(MachineState *machine) { static const LxBoardDesc lx60_board = { .flash_base = 0xf8000000, .flash_size = 0x00400000, .flash_sector_size = 0x10000, .sram_size = 0x20000, }; lx_init(&lx60_board, machine); } | 6,237 |
0 | int udp_output2(struct socket *so, struct mbuf *m, struct sockaddr_in *saddr, struct sockaddr_in *daddr, int iptos) { register struct udpiphdr *ui; int error = 0; DEBUG_CALL("udp_output"); DEBUG_ARG("so = %p", so); DEBUG_ARG("m = %p", m); DEBUG_ARG("saddr = %lx", (long)saddr->sin_addr.s_addr); DEBUG_ARG("daddr = %lx", ... | 6,238 |
0 | static void sigp_initial_cpu_reset(CPUState *cs, run_on_cpu_data arg) { S390CPU *cpu = S390_CPU(cs); S390CPUClass *scc = S390_CPU_GET_CLASS(cpu); SigpInfo *si = arg.host_ptr; cpu_synchronize_state(cs); scc->initial_cpu_reset(cs); cpu_synchronize_post_reset(cs); si->cc = SIGP_CC_ORDER_CODE_ACCEPTED; } | 6,239 |
0 | void cris_cpu_list(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...)) { unsigned int i; (*cpu_fprintf)(f, "Available CPUs:\n"); for (i = 0; i < ARRAY_SIZE(cris_cores); i++) { (*cpu_fprintf)(f, " %s\n", cris_cores[i].name); } } | 6,240 |
0 | void GCC_FMT_ATTR(2, 3) virtio_error(VirtIODevice *vdev, const char *fmt, ...) { va_list ap; va_start(ap, fmt); error_vreport(fmt, ap); va_end(ap); vdev->broken = true; if (virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1)) { virtio_set_status(vdev, vdev->status | VIRTIO_CONFIG_S_NEEDS_RESET); virtio_notify_config(vdev... | 6,242 |
0 | const char *avcodec_configuration(void) { return FFMPEG_CONFIGURATION; } | 6,244 |
0 | av_cold void ff_ps_ctx_init(PSContext *ps) { ipdopd_reset(ps->ipd_hist, ps->opd_hist); } | 6,245 |
0 | void omap_mpuio_key(struct omap_mpuio_s *s, int row, int col, int down) { if (row >= 5 || row < 0) hw_error("%s: No key %i-%i\n", __FUNCTION__, col, row); if (down) s->buttons[row] |= 1 << col; else s->buttons[row] &= ~(1 << col); omap_mpuio_kbd_update(s); } | 6,246 |
0 | int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc) { int bps, blkalign, bytespersec; int hdrsize = 18; int waveformatextensible; uint8_t temp[256]; uint8_t *riff_extradata= temp; uint8_t *riff_extradata_start= temp; if(!enc->codec_tag || enc->codec_tag > 0xffff) return -1; waveformatextensible = (enc->channels... | 6,247 |
0 | static void check_watchpoint(int offset, int len, MemTxAttrs attrs, int flags) { CPUState *cpu = current_cpu; CPUClass *cc = CPU_GET_CLASS(cpu); CPUArchState *env = cpu->env_ptr; target_ulong pc, cs_base; target_ulong vaddr; CPUWatchpoint *wp; uint32_t cpu_flags; assert(tcg_enabled()); if (cpu->watchpoint_hit) { /* We ... | 6,248 |
0 | dbdma_control_write(DBDMA_channel *ch) { uint16_t mask, value; uint32_t status; mask = (ch->regs[DBDMA_CONTROL] >> 16) & 0xffff; value = ch->regs[DBDMA_CONTROL] & 0xffff; value &= (RUN | PAUSE | FLUSH | WAKE | DEVSTAT); status = ch->regs[DBDMA_STATUS]; status = (value & mask) | (status & ~mask); if (status & WAKE) stat... | 6,249 |
0 | static bool get_phys_addr_lpae(CPUARMState *env, target_ulong address, int access_type, ARMMMUIdx mmu_idx, hwaddr *phys_ptr, MemTxAttrs *txattrs, int *prot, target_ulong *page_size_ptr, uint32_t *fsr, ARMMMUFaultInfo *fi) { ARMCPU *cpu = arm_env_get_cpu(env); CPUState *cs = CPU(cpu); /* Read an LPAE long-descriptor tra... | 6,250 |
0 | static void monitor_parse(const char *optarg, const char *mode, bool pretty) { static int monitor_device_index = 0; Error *local_err = NULL; QemuOpts *opts; const char *p; char label[32]; int def = 0; if (strstart(optarg, "chardev:", &p)) { snprintf(label, sizeof(label), "%s", p); } else { snprintf(label, sizeof(label)... | 6,252 |
0 | void drive_hot_add(Monitor *mon, const QDict *qdict) { int dom, pci_bus; unsigned slot; int type, bus; int success = 0; PCIDevice *dev; DriveInfo *dinfo; const char *pci_addr = qdict_get_str(qdict, "pci_addr"); const char *opts = qdict_get_str(qdict, "opts"); BusState *scsibus; if (pci_read_devaddr(mon, pci_addr, &dom,... | 6,253 |
0 | build_append_notify(GArray *device, const char *name, const char *format, int skip, int count) { int i; GArray *method = build_alloc_array(); uint8_t op = 0x14; /* MethodOp */ build_append_nameseg(method, "%s", name); build_append_byte(method, 0x02); /* MethodFlags: ArgCount */ for (i = skip; i < count; i++) { GArray *... | 6,254 |
0 | void virtio_input_send(VirtIOInput *vinput, virtio_input_event *event) { VirtQueueElement *elem; unsigned have, need; int i, len; if (!vinput->active) { return; } /* queue up events ... */ if (vinput->qindex == vinput->qsize) { vinput->qsize++; vinput->queue = g_realloc(vinput->queue, vinput->qsize * sizeof(virtio_inpu... | 6,255 |
0 | int bdrv_aio_multiwrite(BlockDriverState *bs, BlockRequest *reqs, int num_reqs) { MultiwriteCB *mcb; int i; /* don't submit writes if we don't have a medium */ if (bs->drv == NULL) { for (i = 0; i < num_reqs; i++) { reqs[i].error = -ENOMEDIUM; } return -1; } if (num_reqs == 0) { return 0; } // Create MultiwriteCB struc... | 6,256 |
0 | static void omap_sti_fifo_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size) { struct omap_sti_s *s = (struct omap_sti_s *) opaque; int ch = addr >> 6; uint8_t byte = value; if (size != 1) { return omap_badwidth_write8(opaque, addr, size); } if (ch == STI_TRACE_CONTROL_CHANNEL) { /* Flush chann... | 6,257 |
0 | static void active_parameter_sets(HEVCContext *s) { GetBitContext *gb = &s->HEVClc->gb; int num_sps_ids_minus1; int i; get_bits(gb, 4); // active_video_parameter_set_id get_bits(gb, 1); // self_contained_cvs_flag get_bits(gb, 1); // num_sps_ids_minus1 num_sps_ids_minus1 = get_ue_golomb_long(gb); // num_sps_ids_minus1 s... | 6,258 |
0 | static void term_backward_char(void) { if (term_cmd_buf_index > 0) { term_cmd_buf_index--; } } | 6,259 |
0 | static int omap_validate_tipb_mpui_addr(struct omap_mpu_state_s *s, target_phys_addr_t addr) { return range_covers_byte(0xe1010000, 0xe1020004 - 0xe1010000, addr); } | 6,260 |
0 | static void notdirty_mem_writeb(void *opaque, target_phys_addr_t ram_addr, uint32_t val) { int dirty_flags; dirty_flags = phys_ram_dirty[ram_addr >> TARGET_PAGE_BITS]; if (!(dirty_flags & CODE_DIRTY_FLAG)) { #if !defined(CONFIG_USER_ONLY) tb_invalidate_phys_page_fast(ram_addr, 1); dirty_flags = phys_ram_dirty[ram_addr ... | 6,261 |
0 | BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs, BlockDriverState *target, int64_t speed, MirrorSyncMode sync_mode, BdrvDirtyBitmap *sync_bitmap, bool compress, BlockdevOnError on_source_error, BlockdevOnError on_target_error, int creation_flags, BlockCompletionFunc *cb, void *opaque, BlockJobTxn *... | 6,262 |
0 | void helper_vmrun(CPUX86State *env, int aflag, int next_eip_addend) { CPUState *cs = CPU(x86_env_get_cpu(env)); target_ulong addr; uint32_t event_inj; uint32_t int_ctl; cpu_svm_check_intercept_param(env, SVM_EXIT_VMRUN, 0); if (aflag == 2) { addr = env->regs[R_EAX]; } else { addr = (uint32_t)env->regs[R_EAX]; } qemu_lo... | 6,263 |
0 | static void spr_write_ibatu (void *opaque, int sprn) { DisasContext *ctx = opaque; gen_op_store_ibatu((sprn - SPR_IBAT0U) / 2); RET_STOP(ctx); } | 6,264 |
0 | static void machine_numa_validate(MachineState *machine) { int i; GString *s = g_string_new(NULL); MachineClass *mc = MACHINE_GET_CLASS(machine); const CPUArchIdList *possible_cpus = mc->possible_cpu_arch_ids(machine); assert(nb_numa_nodes); for (i = 0; i < possible_cpus->len; i++) { const CPUArchId *cpu_slot = &possib... | 6,265 |
1 | int qcow2_refcount_init(BlockDriverState *bs) { BDRVQcowState *s = bs->opaque; unsigned int refcount_table_size2, i; int ret; assert(s->refcount_table_size <= INT_MAX / sizeof(uint64_t)); refcount_table_size2 = s->refcount_table_size * sizeof(uint64_t); s->refcount_table = g_try_malloc(refcount_table_size2); if (s->ref... | 6,266 |
0 | static int unpack_vectors(Vp3DecodeContext *s, GetBitContext *gb) { int j, k, l, sb_x, sb_y; int coding_mode; int motion_x[6]; int motion_y[6]; int last_motion_x = 0; int last_motion_y = 0; int prior_last_motion_x = 0; int prior_last_motion_y = 0; int current_macroblock; int current_fragment; if (s->keyframe) return 0;... | 6,267 |
1 | void visit_type_int32(Visitor *v, int32_t *obj, const char *name, Error **errp) { int64_t value; if (!error_is_set(errp)) { if (v->type_int32) { v->type_int32(v, obj, name, errp); } else { value = *obj; v->type_int(v, &value, name, errp); if (value < INT32_MIN || value > INT32_MAX) { error_set(errp, QERR_INVALID_PARAME... | 6,268 |
1 | static inline void gen_bx_im(DisasContext *s, uint32_t addr) { TCGv tmp; s->is_jmp = DISAS_UPDATE; if (s->thumb != (addr & 1)) { tmp = new_tmp(); tcg_gen_movi_i32(tmp, addr & 1); tcg_gen_st_i32(tmp, cpu_env, offsetof(CPUState, thumb)); dead_tmp(tmp); } tcg_gen_movi_i32(cpu_R[15], addr & ~1); } | 6,270 |
1 | int qemu_get_buffer(QEMUFile *f, uint8_t *buf, int size) { int pending = size; int done = 0; while (pending > 0) { int res; res = qemu_peek_buffer(f, buf, pending, 0); if (res == 0) { return done; } qemu_file_skip(f, res); buf += res; pending -= res; done += res; } return done; } | 6,271 |
1 | static void buffer_append(Buffer *buffer, const void *data, size_t len) { memcpy(buffer->buffer + buffer->offset, data, len); buffer->offset += len; } | 6,273 |
1 | void av_dump_format(AVFormatContext *ic, int index, const char *url, int is_output) { int i; uint8_t *printed = av_mallocz(ic->nb_streams); if (ic->nb_streams && !printed) return; av_log(NULL, AV_LOG_INFO, "%s #%d, %s, %s '%s':\n", is_output ? "Output" : "Input", index, is_output ? ic->oformat->name : ic->iformat->name... | 6,276 |
0 | static int r3d_read_redv(AVFormatContext *s, AVPacket *pkt, Atom *atom) { AVStream *st = s->streams[0]; int tmp; int av_unused tmp2; uint64_t pos = avio_tell(s->pb); unsigned dts; int ret; dts = avio_rb32(s->pb); tmp = avio_rb32(s->pb); av_dlog(s, "frame num %d\n", tmp); tmp = avio_r8(s->pb); // major version tmp2 = av... | 6,278 |
0 | void vnc_sent_lossy_rect(VncState *vs, int x, int y, int w, int h) { int i, j; w = (x + w) / VNC_STAT_RECT; h = (y + h) / VNC_STAT_RECT; x /= VNC_STAT_RECT; y /= VNC_STAT_RECT; for (j = y; j <= y + h; j++) { for (i = x; i <= x + w; i++) { vs->lossy_rect[j][i] = 1; } } } | 6,279 |
0 | static void slow_bar_writeb(void *opaque, target_phys_addr_t addr, uint32_t val) { AssignedDevRegion *d = opaque; uint8_t *out = d->u.r_virtbase + addr; DEBUG("slow_bar_writeb addr=0x" TARGET_FMT_plx " val=0x%02x\n", addr, val); *out = val; } | 6,280 |
0 | static void exynos4210_i2c_write(void *opaque, target_phys_addr_t offset, uint64_t value, unsigned size) { Exynos4210I2CState *s = (Exynos4210I2CState *)opaque; uint8_t v = value & 0xff; DPRINT("write %s [0x%02x] <- 0x%02x\n", exynos4_i2c_get_regname(offset), (unsigned int)offset, v); switch (offset) { case I2CCON_ADDR... | 6,281 |
0 | static void virtio_net_apply_guest_offloads(VirtIONet *n) { qemu_peer_set_offload(qemu_get_subqueue(n->nic, 0), !!(n->curr_guest_offloads & (1ULL << VIRTIO_NET_F_GUEST_CSUM)), !!(n->curr_guest_offloads & (1ULL << VIRTIO_NET_F_GUEST_TSO4)), !!(n->curr_guest_offloads & (1ULL << VIRTIO_NET_F_GUEST_TSO6)), !!(n->curr_guest... | 6,283 |
0 | static int xen_pt_msixctrl_reg_write(XenPCIPassthroughState *s, XenPTReg *cfg_entry, uint16_t *val, uint16_t dev_value, uint16_t valid_mask) { XenPTRegInfo *reg = cfg_entry->reg; uint16_t writable_mask = 0; uint16_t throughable_mask = get_throughable_mask(s, reg, valid_mask); int debug_msix_enabled_old; /* modify emula... | 6,284 |
0 | int v9fs_co_mknod(V9fsState *s, V9fsString *path, uid_t uid, gid_t gid, dev_t dev, mode_t mode) { int err; FsCred cred; cred_init(&cred); cred.fc_uid = uid; cred.fc_gid = gid; cred.fc_mode = mode; cred.fc_rdev = dev; v9fs_co_run_in_worker( { err = s->ops->mknod(&s->ctx, path->data, &cred); if (err < 0) { err = -errno; ... | 6,285 |
0 | static uint64_t icp_control_read(void *opaque, target_phys_addr_t offset, unsigned size) { switch (offset >> 2) { case 0: /* CP_IDFIELD */ return 0x41034003; case 1: /* CP_FLASHPROG */ return 0; case 2: /* CP_INTREG */ return 0; case 3: /* CP_DECODE */ return 0x11; default: hw_error("icp_control_read: Bad offset %x\n",... | 6,288 |
0 | int64_t bdrv_get_block_status_above(BlockDriverState *bs, BlockDriverState *base, int64_t sector_num, int nb_sectors, int *pnum, BlockDriverState **file) { Coroutine *co; BdrvCoGetBlockStatusData data = { .bs = bs, .base = base, .file = file, .sector_num = sector_num, .nb_sectors = nb_sectors, .pnum = pnum, .done = fal... | 6,289 |
0 | static int block_save_complete(QEMUFile *f, void *opaque) { int ret; DPRINTF("Enter save live complete submitted %d transferred %d\n", block_mig_state.submitted, block_mig_state.transferred); ret = flush_blks(f); if (ret) { blk_mig_cleanup(); return ret; } blk_mig_reset_dirty_cursor(); /* we know for sure that save bul... | 6,290 |
0 | static void omap_pwl_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size) { struct omap_pwl_s *s = (struct omap_pwl_s *) opaque; int offset = addr & OMAP_MPUI_REG_MASK; if (size != 1) { return omap_badwidth_write8(opaque, addr, value); } switch (offset) { case 0x00: /* PWL_LEVEL */ s->level = val... | 6,291 |
0 | static int id_wellformed(const char *id) { int i; if (!qemu_isalpha(id[0])) { return 0; } for (i = 1; id[i]; i++) { if (!qemu_isalnum(id[i]) && !strchr("-._", id[i])) { return 0; } } return 1; } | 6,292 |
0 | static void memory_region_iorange_destructor(IORange *iorange) { g_free(container_of(iorange, MemoryRegionIORange, iorange)); } | 6,294 |
0 | static int qemu_rbd_open(BlockDriverState *bs, const char *filename, int flags) { BDRVRBDState *s = bs->opaque; char pool[RBD_MAX_POOL_NAME_SIZE]; char snap_buf[RBD_MAX_SNAP_NAME_SIZE]; char conf[RBD_MAX_CONF_SIZE]; int r; if (qemu_rbd_parsename(filename, pool, sizeof(pool), snap_buf, sizeof(snap_buf), s->name, sizeof(... | 6,295 |
0 | static void net_socket_receive_dgram(void *opaque, const uint8_t *buf, size_t size) { NetSocketState *s = opaque; sendto(s->fd, buf, size, 0, (struct sockaddr *)&s->dgram_dst, sizeof(s->dgram_dst)); } | 6,296 |
0 | int cpu_ppc_register (CPUPPCState *env, ppc_def_t *def) { env->msr_mask = def->msr_mask; env->mmu_model = def->mmu_model; env->excp_model = def->excp_model; env->bus_model = def->bus_model; env->bfd_mach = def->bfd_mach; if (create_ppc_opcodes(env, def) < 0) return -1; init_ppc_proc(env, def); #if defined(PPC_DUMP_CPU)... | 6,297 |
0 | static char *get_human_readable_size(char *buf, int buf_size, int64_t size) { static const char suffixes[NB_SUFFIXES] = "KMGT"; int64_t base; int i; if (size <= 999) { snprintf(buf, buf_size, "%" PRId64, size); } else { base = 1024; for (i = 0; i < NB_SUFFIXES; i++) { if (size < (10 * base)) { snprintf(buf, buf_size, "... | 6,298 |
0 | static coroutine_fn int cloop_co_read(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sectors) { int ret; BDRVCloopState *s = bs->opaque; qemu_co_mutex_lock(&s->lock); ret = cloop_read(bs, sector_num, buf, nb_sectors); qemu_co_mutex_unlock(&s->lock); return ret; } | 6,299 |
0 | static void disas_sparc_insn(DisasContext * dc, unsigned int insn) { unsigned int opc, rs1, rs2, rd; TCGv cpu_src1, cpu_src2; TCGv_i32 cpu_src1_32, cpu_src2_32, cpu_dst_32; TCGv_i64 cpu_src1_64, cpu_src2_64, cpu_dst_64; target_long simm; if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP | CPU_LOG_TB_OP_OPT))) { tcg_gen_deb... | 6,300 |
0 | int use_gdb_syscalls(void) { if (gdb_syscall_mode == GDB_SYS_UNKNOWN) { gdb_syscall_mode = (gdb_syscall_state ? GDB_SYS_ENABLED : GDB_SYS_DISABLED); } return gdb_syscall_mode == GDB_SYS_ENABLED; } | 6,301 |
0 | static void s390_hot_add_cpu(const int64_t id, Error **errp) { MachineState *machine = MACHINE(qdev_get_machine()); s390x_new_cpu(machine->cpu_model, id, errp); } | 6,302 |
0 | static bool virtio_pci_modern_state_needed(void *opaque) { VirtIOPCIProxy *proxy = opaque; return !(proxy->flags & VIRTIO_PCI_FLAG_DISABLE_MODERN); } | 6,303 |
0 | static int on2avc_decode_band_types(On2AVCContext *c, GetBitContext *gb) { int bits_per_sect = c->is_long ? 5 : 3; int esc_val = (1 << bits_per_sect) - 1; int num_bands = c->num_bands * c->num_windows; int band = 0, i, band_type, run_len, run; while (band < num_bands) { band_type = get_bits(gb, 4); run_len = 1; do { ru... | 6,304 |
0 | static float pvq_band_cost(CeltPVQ *pvq, CeltFrame *f, OpusRangeCoder *rc, int band, float *bits, float lambda) { int i, b = 0; uint32_t cm[2] = { (1 << f->blocks) - 1, (1 << f->blocks) - 1 }; const int band_size = ff_celt_freq_range[band] << f->size; float buf[176 * 2], lowband_scratch[176], norm1[176], norm2[176]; fl... | 6,305 |
0 | static int mpegts_read_header(AVFormatContext *s) { MpegTSContext *ts = s->priv_data; AVIOContext *pb = s->pb; uint8_t buf[8 * 1024] = {0}; int len; int64_t pos, probesize = #if AV_HAVE_INCOMPATIBLE_LIBAV_ABI s->probesize ? s->probesize : s->probesize2; #else s->probesize; #endif if (ffio_ensure_seekback(pb, probesize)... | 6,306 |
1 | static void apply_tns(float coef[1024], TemporalNoiseShaping *tns, IndividualChannelStream *ics, int decode) { const int mmm = FFMIN(ics->tns_max_bands, ics->max_sfb); int w, filt, m, i; int bottom, top, order, start, end, size, inc; float lpc[TNS_MAX_ORDER]; float tmp[TNS_MAX_ORDER]; for (w = 0; w < ics->num_windows; ... | 6,309 |
1 | void do_info_snapshots(Monitor *mon) { DriveInfo *dinfo; BlockDriverState *bs, *bs1; QEMUSnapshotInfo *sn_tab, *sn; int nb_sns, i; char buf[256]; bs = get_bs_snapshots(); if (!bs) { monitor_printf(mon, "No available block device supports snapshots\n"); return; } monitor_printf(mon, "Snapshot devices:"); QTAILQ_FOREACH(... | 6,310 |
1 | static int activate(AVFilterContext *ctx) { PreMultiplyContext *s = ctx->priv; if (s->inplace) { AVFrame *frame = NULL; AVFrame *out = NULL; int ret, status; int64_t pts; if ((ret = ff_inlink_consume_frame(ctx->inputs[0], &frame)) > 0) { if ((ret = filter_frame(ctx, &out, frame, frame)) < 0) return ret; av_frame_free(&... | 6,311 |
1 | int kvm_arch_remove_sw_breakpoint(CPUState *cpu, struct kvm_sw_breakpoint *bp) { return -EINVAL; } | 6,312 |
1 | static int unix_open(URLContext *h, const char *filename, int flags) { UnixContext *s = h->priv_data; int fd, ret; av_strstart(filename, "unix:", &filename); s->addr.sun_family = AF_UNIX; av_strlcpy(s->addr.sun_path, filename, sizeof(s->addr.sun_path)); if ((fd = ff_socket(AF_UNIX, s->type, 0)) < 0) return ff_neterrno(... | 6,313 |
1 | static void gen_rfe(DisasContext *s, TCGv pc, TCGv cpsr) { gen_set_cpsr(cpsr, 0xffffffff); dead_tmp(cpsr); store_reg(s, 15, pc); s->is_jmp = DISAS_UPDATE; } | 6,315 |
1 | static inline void RENAME(rgb16ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width) { int i; assert(src1 == src2); for(i=0; i<width; i++) { int d0= ((uint32_t*)src1)[i]; int dl= (d0&0x07E0F81F); int dh= ((d0>>5)&0x07C0F83F); int dh2= (dh>>11) + (dh<<21); int d= dh2 + dl; int r= d&0x7F; int b= (d... | 6,316 |
1 | static int rtl8139_cplus_transmit_one(RTL8139State *s) { if (!rtl8139_transmitter_enabled(s)) { DPRINTF("+++ C+ mode: transmitter disabled\n"); return 0; } if (!rtl8139_cp_transmitter_enabled(s)) { DPRINTF("+++ C+ mode: C+ transmitter disabled\n"); return 0 ; } int descriptor = s->currCPlusTxDesc; dma_addr_t cplus_tx_r... | 6,317 |
1 | static int adpcm_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; ADPCMDecodeContext *c = avctx->priv_data; ADPCMChannelStatus *cs; int n, m, channel, i; int block_predictor[2]; short *samples; short *samples_end; const uint... | 6,318 |
0 | int DCT_common_init(MpegEncContext *s) { int i; ff_put_pixels_clamped = s->dsp.put_pixels_clamped; ff_add_pixels_clamped = s->dsp.add_pixels_clamped; s->dct_unquantize_h263 = dct_unquantize_h263_c; s->dct_unquantize_mpeg1 = dct_unquantize_mpeg1_c; s->dct_unquantize_mpeg2 = dct_unquantize_mpeg2_c; s->dct_quantize= dct_q... | 6,319 |
0 | static void yuv2yuvX_c(SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t *dest, uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, int dstW, int chrDstW) { //FIXM... | 6,320 |
0 | static int dxva2_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size) { const struct MpegEncContext *s = avctx->priv_data; AVDXVAContext *ctx = avctx->hwaccel_context; struct dxva2_picture_context *ctx_pic = s->current_picture_ptr->hwaccel_picture_private; if (!DXVA_CONTEXT... | 6,321 |
0 | static void avc_luma_vt_and_aver_dst_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride) { int16_t filt_const0 = 0xfb01; int16_t filt_const1 = 0x1414; int16_t filt_const2 = 0x1fb; v16u8 dst0, dst1, dst2, dst3; v16i8 src0, src1, src2, src3, src4, src5, src6, src7, src8; v16i8 src10_r, src32... | 6,323 |
0 | static int decode_frame_mp3on4(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) { AVFrame *frame = data; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; MP3On4DecodeContext *s = avctx->priv_data; MPADecodeContext *m; int fsize, len = buf_size, out_size = 0; uint32_t header; OUT_INT ... | 6,324 |
0 | static int dxva2_h264_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size) { const H264Context *h = avctx->priv_data; AVDXVAContext *ctx = avctx->hwaccel_context; struct dxva2_picture_context *ctx_pic = h->cur_pic_ptr->hwaccel_picture_private; if (DXVA_CONTEXT_DECODER(avctx, ctx)... | 6,325 |
0 | static inline void RENAME(yuv2yuvX)(SwsContext *c, int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize, int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize, uint8_t *dest, uint8_t *uDest, uint8_t *vDest, long dstW, long chrDstW) { #ifdef HAVE_MMX if(uDest != NULL) { asm volatile( YSCALEYUV2YV12X(0, CHR_MMX_FILT... | 6,326 |
0 | static inline void dv_encode_video_segment(DVVideoContext *s, uint8_t *dif, const uint16_t *mb_pos_ptr) { int mb_index, i, j, v; int mb_x, mb_y, c_offset, linesize; uint8_t* y_ptr; uint8_t* data; uint8_t* ptr; int do_edge_wrap; DCTELEM block[64] __align8; DCTELEM sblock[5*6][64] __align8; EncBlockInfo enc_blks[5*6]; Pu... | 6,327 |
0 | static double fade_gain(int curve, int64_t index, int range) { double gain; gain = av_clipd(1.0 * index / range, 0, 1.0); switch (curve) { case QSIN: gain = sin(gain * M_PI / 2.0); break; case IQSIN: gain = 0.636943 * asin(gain); break; case ESIN: gain = 1.0 - cos(M_PI / 4.0 * (pow(2.0*gain - 1, 3) + 1)); break; case H... | 6,328 |
0 | static int get_cv_ycbcr_matrix(AVCodecContext *avctx, CFStringRef *matrix) { switch(avctx->colorspace) { case AVCOL_SPC_BT709: *matrix = kCVImageBufferYCbCrMatrix_ITU_R_709_2; break; case AVCOL_SPC_UNSPECIFIED: *matrix = NULL; break; case AVCOL_SPC_BT470BG: case AVCOL_SPC_SMPTE170M: *matrix = kCVImageBufferYCbCrMatrix_... | 6,329 |
0 | static AVStream *add_av_stream1(FFStream *stream, AVCodecContext *codec, int copy) { AVStream *fst; fst = av_mallocz(sizeof(AVStream)); if (!fst) return NULL; if (copy) { fst->codec= avcodec_alloc_context(); memcpy(fst->codec, codec, sizeof(AVCodecContext)); if (codec->extradata_size) { fst->codec->extradata = av_mallo... | 6,330 |
1 | static void buffer_reserve(Buffer *buffer, size_t len) { if ((buffer->capacity - buffer->offset) < len) { buffer->capacity += (len + 1024); buffer->buffer = qemu_realloc(buffer->buffer, buffer->capacity); if (buffer->buffer == NULL) { fprintf(stderr, "vnc: out of memory\n"); exit(1); } } } | 6,331 |
1 | static void qmp_input_end_struct(Visitor *v, Error **errp) { QmpInputVisitor *qiv = to_qiv(v); qmp_input_pop(qiv, errp); } | 6,332 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.