Dataset Viewer
Auto-converted to Parquet Duplicate
func_cleaned
string
label
int64
void cpu_check_irqs(CPUSPARCState *env) { CPUState *cs; if (env->pil_in && (env->interrupt_index == 0 || (env->interrupt_index & ~15) == TT_EXTINT)) { unsigned int i; for (i = 15; i > 0; i--) { if (env->pil_in & (1 << i)) { int old_interrupt = env->interrupt_index; env->interrupt_index = TT_EXTINT | i; if (old_interrup...
1
static int vnc_display_listen(VncDisplay *vd, SocketAddressLegacy **saddr, size_t nsaddr, SocketAddressLegacy **wsaddr, size_t nwsaddr, Error **errp) { size_t i; for (i = 0; i < nsaddr; i++) { if (vnc_display_listen_addr(vd, saddr[i], "vnc-listen", &vd->lsock, &vd->lsock_tag, &vd->nlsock, errp) < 0) { return -1; } } fo...
0
int load_image_targphys(const char *filename, target_phys_addr_t addr, int max_sz) { int size; size = get_image_size(filename); if (size > 0) rom_add_file_fixed(filename, addr, -1); return size; }
1
static int nbd_send_negotiate(NBDClient *client) { int csock = client->sock; char buf[8 + 8 + 8 + 128]; int rc; const int myflags = (NBD_FLAG_HAS_FLAGS | NBD_FLAG_SEND_TRIM | NBD_FLAG_SEND_FLUSH | NBD_FLAG_SEND_FUA); socket_set_block(csock); rc = -EINVAL; TRACE("Beginning negotiation."); memcpy(buf, "NBDMAGIC", 8); if ...
1
PCIBus *pci_apb_init(target_phys_addr_t special_base, target_phys_addr_t mem_base, qemu_irq *pic, PCIBus **bus2, PCIBus **bus3) { DeviceState *dev; SysBusDevice *s; APBState *d; dev = qdev_create(NULL, "pbm"); qdev_init(dev); s = sysbus_from_qdev(dev); sysbus_mmio_map(s, 0, special_base + 0x2000ULL); sysbus_mmio_map(s,...
1
static void envelope_peak16(WaveformContext *s, AVFrame *out, int plane, int component) { const int dst_linesize = out->linesize[component] / 2; const int bg = s->bg_color[component] * (s->size / 256); const int limit = s->size - 1; const int is_chroma = (component == 1 || component == 2); const int shift_w = (is_chrom...
0
static void get_seg(SegmentCache *lhs, const struct kvm_segment *rhs) { lhs->selector = rhs->selector; lhs->base = rhs->base; lhs->limit = rhs->limit; lhs->flags = (rhs->type << DESC_TYPE_SHIFT) | (rhs->present * DESC_P_MASK) | (rhs->dpl << DESC_DPL_SHIFT) | (rhs->db << DESC_B_SHIFT) | (rhs->s * DESC_S_MASK) | (rhs->l ...
0
static hwaddr ppc_hash64_pteg_search(PowerPCCPU *cpu, hwaddr hash, ppc_slb_t *slb, target_ulong ptem, ppc_hash_pte64_t *pte) { CPUPPCState *env = &cpu->env; int i; uint64_t token; target_ulong pte0, pte1; target_ulong pte_index; pte_index = (hash & env->htab_mask) * HPTES_PER_GROUP; token = ppc_hash64_start_access(cpu,...
1
static int thp_read_packet(AVFormatContext *s, AVPacket *pkt) { ThpDemuxContext *thp = s->priv_data; AVIOContext *pb = s->pb; unsigned int size; int ret; if (thp->audiosize == 0) { if (thp->frame >= thp->framecnt) return AVERROR_EOF; avio_seek(pb, thp->next_frame, SEEK_SET); thp->next_frame += thp->next_framesz; thp->n...
0
bool qemu_co_queue_next(CoQueue *queue) { struct unlock_bh *unlock_bh; Coroutine *next; next = QTAILQ_FIRST(&queue->entries); if (next) { QTAILQ_REMOVE(&queue->entries, next, co_queue_next); QTAILQ_INSERT_TAIL(&unlock_bh_queue, next, co_queue_next); trace_qemu_co_queue_next(next); unlock_bh = qemu_malloc(sizeof(*unlock...
1
void input_type_enum(Visitor *v, int *obj, const char *strings[], const char *kind, const char *name, Error **errp) { int64_t value = 0; char *enum_str; assert(strings); visit_type_str(v, &enum_str, name, errp); if (error_is_set(errp)) { return; } while (strings[value] != NULL) { if (strcmp(strings[value], enum_str) ==...
0
int ff_h264_fill_default_ref_list(H264Context *h) { int i, len; if (h->slice_type_nos == AV_PICTURE_TYPE_B) { Picture *sorted[32]; int cur_poc, list; int lens[2]; if (FIELD_PICTURE(h)) cur_poc = h->cur_pic_ptr->field_poc[h->picture_structure == PICT_BOTTOM_FIELD]; else cur_poc = h->cur_pic_ptr->poc; for (list = 0; list...
0
static void *qpa_thread_out (void *arg) { PAVoiceOut *pa = arg; HWVoiceOut *hw = &pa->hw; int threshold; threshold = conf.divisor ? hw->samples / conf.divisor : 0; if (audio_pt_lock (&pa->pt, AUDIO_FUNC)) { return NULL; } for (;;) { int decr, to_mix, rpos; for (;;) { if (pa->done) { goto exit; } if (pa->live > threshol...
1
static void do_change(const char *device, const char *target, const char *fmt) { if (strcmp(device, "vnc") == 0) { do_change_vnc(target); } else { do_change_block(device, target, fmt); } }
0
static void opt_new_stream(const char *opt, const char *arg) { AVFormatContext *oc; if (nb_output_files <= 0) { fprintf(stderr, "At least one output file must be specified\n"); ffmpeg_exit(1); } oc = output_files[nb_output_files - 1]; if (!strcmp(opt, "newvideo" )) new_video_stream (oc); else if (!strcmp(opt, "newaudio...
0
static int vhost_dev_set_features(struct vhost_dev *dev, bool enable_log) { uint64_t features = dev->acked_features; int r; if (enable_log) { features |= 0x1ULL << VHOST_F_LOG_ALL; } r = dev->vhost_ops->vhost_set_features(dev, features); if (r < 0) { VHOST_OPS_DEBUG("vhost_set_features failed"); } return r < 0 ? -errno...
0
static int read_line(AVIOContext * pb, char* line, int bufsize) { int i; for (i = 0; i < bufsize - 1; i++) { int b = avio_r8(pb); if (b == 0) break; if (b == '\n') { line[i] = '\0'; return 0; } line[i] = b; } line[i] = '\0'; return -1; }
0
void ppc6xx_irq_init (CPUState *env) { env->irq_inputs = (void **)qemu_allocate_irqs(&ppc6xx_set_irq, env, 6); }
1
static void vtd_iotlb_page_invalidate_notify(IntelIOMMUState *s, uint16_t domain_id, hwaddr addr, uint8_t am) { IntelIOMMUNotifierNode *node; VTDContextEntry ce; int ret; QLIST_FOREACH(node, &(s->notifiers_list), next) { VTDAddressSpace *vtd_as = node->vtd_as; ret = vtd_dev_to_context_entry(s, pci_bus_num(vtd_as->bus),...
0
void bdrv_set_in_use(BlockDriverState *bs, int in_use) { assert(bs->in_use != in_use); bs->in_use = in_use; }
0
static int print_block_option_help(const char *filename, const char *fmt) { BlockDriver *drv, *proto_drv; QEMUOptionParameter *create_options = NULL; drv = bdrv_find_format(fmt); if (!drv) { error_report("Unknown file format '%s'", fmt); return 1; } create_options = append_option_parameters(create_options, drv->create_...
1
static int field_end(H264Context *h, int in_setup) { MpegEncContext *const s = &h->s; AVCodecContext *const avctx = s->avctx; int err = 0; s->mb_y = 0; if (!in_setup && !s->dropable) ff_thread_report_progress(&s->current_picture_ptr->f, (16 * s->mb_height >> FIELD_PICTURE) - 1, s->picture_structure == PICT_BOTTOM_FIELD...
1
static void test_qemu_strtosz_simple(void) { const char *str; char *endptr = NULL; int64_t res; str = "0"; res = qemu_strtosz(str, &endptr); g_assert_cmpint(res, ==, 0); g_assert(endptr == str + 1); str = "12345"; res = qemu_strtosz(str, &endptr); g_assert_cmpint(res, ==, 12345); g_assert(endptr == str + 5); res = qemu...
0
static inline void gen_op_jz_ecx(TCGMemOp size, int label1) { tcg_gen_mov_tl(cpu_tmp0, cpu_regs[R_ECX]); gen_extu(size, cpu_tmp0); tcg_gen_brcondi_tl(TCG_COND_EQ, cpu_tmp0, 0, label1); }
0
static int mpeg_decode_postinit(AVCodecContext *avctx) { Mpeg1Context *s1 = avctx->priv_data; MpegEncContext *s = &s1->mpeg_enc_ctx; uint8_t old_permutation[64]; int ret; if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO) { avctx->sample_aspect_ratio = av_d2q(1.0 / ff_mpeg1_aspect[s->aspect_ratio_info], 255); } else { if (...
0
int64_t qemu_file_set_rate_limit(QEMUFile *f, int64_t new_rate) { if (f && f->ops->set_rate_limit) return f->ops->set_rate_limit(f->opaque, new_rate); return 0; }
0
static int read_bfraction(VC1Context *v, GetBitContext* gb) { v->bfraction_lut_index = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1); v->bfraction = ff_vc1_bfraction_lut[v->bfraction_lut_index]; return 0; }
0
static void arm_gic_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(klass); ARMGICClass *agc = ARM_GIC_CLASS(klass); agc->parent_init = sbc->init; sbc->init = arm_gic_init; dc->no_user = 1; }
1
static void blk_mig_cleanup(Monitor *mon) { BlkMigDevState *bmds; BlkMigBlock *blk; set_dirty_tracking(0); while ((bmds = QSIMPLEQ_FIRST(&block_mig_state.bmds_list)) != NULL) { QSIMPLEQ_REMOVE_HEAD(&block_mig_state.bmds_list, entry); bdrv_set_in_use(bmds->bs, 0); drive_put_ref(drive_get_by_blockdev(bmds->bs)); g_free(b...
0
size_t qemu_mempath_getpagesize(const char *mem_path) { #ifdef CONFIG_LINUX struct statfs fs; int ret; do { ret = statfs(mem_path, &fs); } while (ret != 0 && errno == EINTR); if (ret != 0) { fprintf(stderr, "Couldn't statfs() memory path: %s\n", strerror(errno)); exit(1); } if (fs.f_type == HUGETLBFS_MAGIC) { return fs...
1
static void ffm_set_write_index(AVFormatContext *s, int64_t pos, int64_t file_size) { av_opt_set_int(s, "server_attached", 1, AV_OPT_SEARCH_CHILDREN); av_opt_set_int(s, "write_index", pos, AV_OPT_SEARCH_CHILDREN); av_opt_set_int(s, "file_size", file_size, AV_OPT_SEARCH_CHILDREN); }
1
static void gen_divu(DisasContext *dc, TCGv dest, TCGv srca, TCGv srcb) { TCGv sr_cy = tcg_temp_new(); TCGv t0 = tcg_temp_new(); tcg_gen_setcondi_tl(TCG_COND_EQ, sr_cy, srcb, 0); tcg_gen_or_tl(t0, srcb, sr_cy); tcg_gen_divu_tl(dest, srca, t0); tcg_temp_free(t0); tcg_gen_deposit_tl(cpu_sr, cpu_sr, sr_cy, ctz32(SR_CY), 1...
1
int init_vlc(VLC *vlc, int nb_bits, int nb_codes, const void *bits, int bits_wrap, int bits_size, const void *codes, int codes_wrap, int codes_size) { vlc->bits = nb_bits; vlc->table = NULL; vlc->table_allocated = 0; vlc->table_size = 0; #ifdef DEBUG_VLC printf("build table nb_codes=%d\n", nb_codes); #endif if (build_t...
1
static uint8_t *advance_line(uint8_t *start, uint8_t *line, int stride, int *y, int h, int interleave) { *y += interleave; if (*y < h) { return line + interleave * stride; } else { *y = (*y + 1) & (interleave - 1); if (*y) { return start + *y * stride; } else { return NULL; } } }
0
static int parse_pair(JSONParserContext *ctxt, QDict *dict, QList **tokens, va_list *ap) { QObject *key = NULL, *token = NULL, *value, *peek; QList *working = qlist_copy(*tokens); peek = qlist_peek(working); if (peek == NULL) { parse_error(ctxt, NULL, "premature EOI"); goto out; } key = parse_value(ctxt, &working, ap);...
0
static int check_protocol_support(bool *has_ipv4, bool *has_ipv6) { #ifdef HAVE_IFADDRS_H struct ifaddrs *ifaddr = NULL, *ifa; struct addrinfo hints = { 0 }; struct addrinfo *ai = NULL; int gaierr; *has_ipv4 = *has_ipv6 = false; if (getifaddrs(&ifaddr) < 0) { g_printerr("Failed to lookup interface addresses: %s\n", str...
0
static av_cold int omx_encode_init(AVCodecContext *avctx) { OMXCodecContext *s = avctx->priv_data; int ret = AVERROR_ENCODER_NOT_FOUND; const char *role; OMX_BUFFERHEADERTYPE *buffer; OMX_ERRORTYPE err; #if CONFIG_OMX_RPI s->input_zerocopy = 1; #endif s->omx_context = omx_init(avctx, s->libname, s->libprefix); if (!s->...
0
static void escaped_string(void) { int i; struct { const char *encoded; const char *decoded; int skip; } test_cases[] = { { "\"\\b\"", "\b" }, { "\"\\f\"", "\f" }, { "\"\\n\"", "\n" }, { "\"\\r\"", "\r" }, { "\"\\t\"", "\t" }, { "\"/\"", "/" }, { "\"\\/\"", "/", .skip = 1 }, { "\"\\\\\"", "\\" }, { "\"\\\"\"", "\"" }, ...
0
static void gen_nabso(DisasContext *ctx) { int l1 = gen_new_label(); int l2 = gen_new_label(); tcg_gen_brcondi_tl(TCG_COND_GT, cpu_gpr[rA(ctx->opcode)], 0, l1); tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)], cpu_gpr[rA(ctx->opcode)]); tcg_gen_br(l2); gen_set_label(l1); tcg_gen_neg_tl(cpu_gpr[rD(ctx->opcode)], cpu_gpr[rA(ctx-...
0
struct MUSBState *musb_init(qemu_irq *irqs) { MUSBState *s = g_malloc0(sizeof(*s)); int i; s->irqs = irqs; s->faddr = 0x00; s->power = MGC_M_POWER_HSENAB; s->tx_intr = 0x0000; s->rx_intr = 0x0000; s->tx_mask = 0xffff; s->rx_mask = 0xffff; s->intr = 0x00; s->mask = 0x06; s->idx = 0; s->ep[0].config = MGC_M_CONFIGDATA_SO...
0
static void qobject_input_optional(Visitor *v, const char *name, bool *present) { QObjectInputVisitor *qiv = to_qiv(v); QObject *qobj = qobject_input_get_object(qiv, name, false, NULL); if (!qobj) { *present = false; return; } *present = true; }
1
static void boston_flash_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { }
1
sd_co_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum) { BDRVSheepdogState *s = bs->opaque; SheepdogInode *inode = &s->inode; uint32_t object_size = (UINT32_C(1) << inode->block_size_shift); uint64_t offset = sector_num * BDRV_SECTOR_SIZE; unsigned long start = offset / object_size,...
0
static int realloc_refcount_array(BDRVQcow2State *s, void **array, int64_t *size, int64_t new_size) { size_t old_byte_size, new_byte_size; void *new_ptr; old_byte_size = size_to_clusters(s, refcount_array_byte_size(s, *size)) * s->cluster_size; new_byte_size = size_to_clusters(s, refcount_array_byte_size(s, new_size)) ...
0
static bool msix_vector_masked(PCIDevice *dev, int vector, bool fmask) { unsigned offset = vector * PCI_MSIX_ENTRY_SIZE + PCI_MSIX_ENTRY_VECTOR_CTRL; return fmask || dev->msix_table[offset] & PCI_MSIX_ENTRY_CTRL_MASKBIT; }
0
int url_open_dyn_packet_buf(AVIOContext **s, int max_packet_size) { if (max_packet_size <= 0) return -1; return url_open_dyn_buf_internal(s, max_packet_size); }
0
int av_cold ff_ivi_init_tiles(IVIPlaneDesc *planes, int tile_width, int tile_height) { int p, b, x, y, x_tiles, y_tiles, t_width, t_height; IVIBandDesc *band; IVITile *tile, *ref_tile; for (p = 0; p < 3; p++) { t_width = !p ? tile_width : (tile_width + 3) >> 2; t_height = !p ? tile_height : (tile_height + 3) >> 2; if (...
1
static uint64_t pl050_read(void *opaque, hwaddr offset, unsigned size) { pl050_state *s = (pl050_state *)opaque; if (offset >= 0xfe0 && offset < 0x1000) return pl050_id[(offset - 0xfe0) >> 2]; switch (offset >> 2) { case 0: return s->cr; case 1: { uint8_t val; uint32_t stat; val = s->last; val = val ^ (val >> 4); val =...
0
void qemu_clock_warp(QEMUClockType type) { int64_t clock; int64_t deadline; if (type != QEMU_CLOCK_VIRTUAL || !use_icount) { return; } if (icount_sleep) { icount_warp_rt(NULL); timer_del(icount_warp_timer); } if (!all_cpu_threads_idle()) { return; } if (qtest_enabled()) { return; } clock = qemu_clock_get_ns(QEMU_CLOCK_...
0
void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) { struct socket *so, *so_next; int ret; global_readfds = readfds; global_writefds = writefds; global_xfds = xfds; updtime(); if (link_up) { if (time_fasttimo && ((curtime - time_fasttimo) >= 2)) { tcp_fasttimo(); time_fasttimo = 0; } if (do_slowtim...
0
av_cold int ff_nvenc_encode_init(AVCodecContext *avctx) { int ret; if ((ret = nvenc_load_libraries(avctx)) < 0) return ret; if ((ret = nvenc_setup_device(avctx)) < 0) return ret; if ((ret = nvenc_setup_encoder(avctx)) < 0) return ret; if ((ret = nvenc_setup_surfaces(avctx)) < 0) return ret; if (avctx->flags & CODEC_FLA...
0
static int hnm_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { AVFrame *frame = data; Hnm4VideoContext *hnm = avctx->priv_data; int ret; uint16_t chunk_id; if (avpkt->size < 8) { if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; chunk_id = AV_RL16(avpkt->data + 4); if (chunk...
1
static void fill_table(uint8_t* table[256 + 2*YUVRGB_TABLE_HEADROOM], const int elemsize, const int inc, void *y_tab) { int i; uint8_t *y_table = y_tab; y_table -= elemsize * (inc >> 9); for (i = 0; i < 256 + 2*YUVRGB_TABLE_HEADROOM; i++) { int64_t cb = av_clip(i-YUVRGB_TABLE_HEADROOM, 0, 255)*inc; table[i] = y_table +...
1
uint32_t ssi_transfer(SSIBus *bus, uint32_t val) { DeviceState *dev; SSISlave *slave; dev = LIST_FIRST(&bus->qbus.children); if (!dev) { return 0; } slave = SSI_SLAVE_FROM_QDEV(dev); return slave->info->transfer(slave, val); }
0
static int need_output(void) { int i; for (i = 0; i < nb_output_streams; i++) { OutputStream *ost = output_streams[i]; OutputFile *of = output_files[ost->file_index]; AVFormatContext *os = output_files[ost->file_index]->ctx; if (ost->is_past_recording_time || (os->pb && avio_tell(os->pb) >= of->limit_filesize)) continu...
0
static int decode_b_picture_header(VC9Context *v) { int pqindex; if (v->profile == PROFILE_SIMPLE) { av_log(v, AV_LOG_ERROR, "Found a B frame while in Simple Profile!\n"); return FRAME_SKIPED; } v->bfraction = vc9_bfraction_lut[get_vlc2(&v->gb, vc9_bfraction_vlc.table, VC9_BFRACTION_VLC_BITS, 2)]; if (v->bfraction < -1...
0
static int parse_cookie(HTTPContext *s, const char *p, AVDictionary **cookies) { AVDictionary *new_params = NULL; AVDictionaryEntry *e, *cookie_entry; char *eql, *name; if (parse_set_cookie(p, &new_params)) return -1; cookie_entry = av_dict_get(new_params, "", NULL, AV_DICT_IGNORE_SUFFIX); if (!cookie_entry || !cookie_...
1
static qemu_irq *icp_pic_init(uint32_t base, qemu_irq parent_irq, qemu_irq parent_fiq) { icp_pic_state *s; int iomemtype; qemu_irq *qi; s = (icp_pic_state *)qemu_mallocz(sizeof(icp_pic_state)); if (!s) return NULL; qi = qemu_allocate_irqs(icp_pic_set_irq, s, 32); s->base = base; s->parent_irq = parent_irq; s->parent_fi...
1
envlist_free(envlist_t *envlist) { struct envlist_entry *entry; assert(envlist != NULL); while (envlist->el_entries.lh_first != NULL) { entry = envlist->el_entries.lh_first; QLIST_REMOVE(entry, ev_link); free((char *)entry->ev_var); free(entry); } free(envlist); }
1
static void icp_pit_write(void *opaque, target_phys_addr_t offset, uint64_t value, unsigned size) { icp_pit_state *s = (icp_pit_state *)opaque; int n; n = offset >> 8; if (n > 3) { hw_error("sp804_write: Bad timer %d\n", n); } arm_timer_write(s->timer[n], offset & 0xff, value); }
1
vcard_emul_login(VCard *card, unsigned char *pin, int pin_len) { PK11SlotInfo *slot; unsigned char *pin_string = NULL; int i; SECStatus rv; if (!nss_emul_init) { return VCARD7816_STATUS_ERROR_CONDITION_NOT_SATISFIED; } slot = vcard_emul_card_get_slot(card); pin_string = g_malloc(pin_len+1); memcpy(pin_string, pin, pin_...
0
opts_next_list(Visitor *v, GenericList **list, Error **errp) { OptsVisitor *ov = DO_UPCAST(OptsVisitor, visitor, v); GenericList **link; if (ov->repeated_opts_first) { ov->repeated_opts_first = false; link = list; } else { const QemuOpt *opt; opt = g_queue_pop_head(ov->repeated_opts); if (g_queue_is_empty(ov->repeated_...
0
static bool check_solid_tile(VncState *vs, int x, int y, int w, int h, uint32_t* color, bool samecolor) { VncDisplay *vd = vs->vd; switch(vd->server->pf.bytes_per_pixel) { case 4: return check_solid_tile32(vs, x, y, w, h, color, samecolor); case 2: return check_solid_tile16(vs, x, y, w, h, color, samecolor); default: r...
0
I2CAdapter *omap_i2c_create(uint64_t addr) { OMAPI2C *s = g_malloc0(sizeof(*s)); I2CAdapter *i2c = (I2CAdapter *)s; uint16_t data; s->addr = addr; i2c->send = omap_i2c_send; i2c->recv = omap_i2c_recv; memread(addr + OMAP_I2C_REV, &data, 2); g_assert_cmphex(data, ==, 0x34); return i2c; }
1
static int vc1_decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size) { VC1Context *v = avctx->priv_data; MpegEncContext *s = &v->s; AVFrame *pict = data; uint8_t *buf2 = NULL; if (buf_size == 0) { if (s->low_delay==0 && s->next_picture_ptr) { *pict= *(AVFrame*)s->next_picture...
1
static int xen_pt_config_reg_init(XenPCIPassthroughState *s, XenPTRegGroup *reg_grp, XenPTRegInfo *reg) { XenPTReg *reg_entry; uint32_t data = 0; int rc = 0; reg_entry = g_new0(XenPTReg, 1); reg_entry->reg = reg; if (reg->init) { uint32_t host_mask, size_mask; unsigned int offset; uint32_t val; rc = reg->init(s, reg_en...
0
DECL_IMDCT_BLOCKS(sse,sse) DECL_IMDCT_BLOCKS(sse2,sse) DECL_IMDCT_BLOCKS(sse3,sse) DECL_IMDCT_BLOCKS(ssse3,sse) DECL_IMDCT_BLOCKS(avx,avx) #endif void ff_mpadsp_init_mmx(MPADSPContext *s) { int mm_flags = av_get_cpu_flags(); int i, j; for (j = 0; j < 4; j++) { for (i = 0; i < 40; i ++) { mdct_win_sse[0][j][4*i ] = ff_m...
0
static int file_read_dir(URLContext *h, AVIODirEntry **next) { #if HAVE_DIRENT_H FileContext *c = h->priv_data; struct dirent *dir; char *fullpath = NULL; *next = ff_alloc_dir_entry(); if (!*next) return AVERROR(ENOMEM); do { errno = 0; dir = readdir(c->dir); if (!dir) { av_freep(next); return AVERROR(errno); } } while...
0
static void blkdebug_refresh_limits(BlockDriverState *bs, Error **errp) { BDRVBlkdebugState *s = bs->opaque; if (s->align) { bs->request_alignment = s->align; } }
0
static void spapr_phb_class_init(ObjectClass *klass, void *data) { PCIHostBridgeClass *hc = PCI_HOST_BRIDGE_CLASS(klass); DeviceClass *dc = DEVICE_CLASS(klass); HotplugHandlerClass *hp = HOTPLUG_HANDLER_CLASS(klass); hc->root_bus_path = spapr_phb_root_bus_path; dc->realize = spapr_phb_realize; dc->props = spapr_phb_pro...
1
int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){ int i; int w= s->width; int h= s->height; InternalBuffer *buf; int *picture_number; if(pic->data[0]!=NULL) { av_log(s, AV_LOG_ERROR, "pic->data[0]!=NULL in avcodec_default_get_buffer\n"); return -1; } if(s->internal_buffer_count >= INTERNAL_BUFFER_SIZE) {...
1
static void fill_picture_parameters(AVCodecContext *avctx, struct dxva_context *ctx, const struct MpegEncContext *s, DXVA_PictureParameters *pp) { const Picture *current_picture = s->current_picture_ptr; int is_field = s->picture_structure != PICT_FRAME; memset(pp, 0, sizeof(*pp)); pp->wDecodedPictureIndex = ff_dxva2_g...
1
static av_cold int a64multi_close_encoder(AVCodecContext *avctx) { A64Context *c = avctx->priv_data; av_frame_free(&avctx->coded_frame); av_free(c->mc_meta_charset); av_free(c->mc_best_cb); av_free(c->mc_charset); av_free(c->mc_charmap); av_free(c->mc_colram); return 0; }
0
void fork_end(int child) { mmap_fork_end(child); if (child) { CPUState *cpu, *next_cpu; CPU_FOREACH_SAFE(cpu, next_cpu) { if (cpu != thread_cpu) { QTAILQ_REMOVE(&cpus, cpu, node); } } qemu_mutex_init(&tb_ctx.tb_lock); qemu_init_cpu_list(); gdbserver_fork(thread_cpu); } else { qemu_mutex_unlock(&tb_ctx.tb_lock); cpu_lis...
1
static void release_drive(Object *obj, const char *name, void *opaque) { DeviceState *dev = DEVICE(obj); Property *prop = opaque; BlockBackend **ptr = qdev_get_prop_ptr(dev, prop); if (*ptr) { blk_detach_dev(*ptr, dev); blockdev_auto_del(*ptr); } }
1
uint32_t HELPER(lcdbr)(CPUS390XState *env, uint32_t f1, uint32_t f2) { env->fregs[f1].d = float64_chs(env->fregs[f2].d); return set_cc_nz_f64(env->fregs[f1].d); }
0
static int init_image(TiffContext *s) { int i, ret; uint32_t *pal; switch (s->bpp * 10 + s->bppcount) { case 11: if (!s->palette_is_set) { s->avctx->pix_fmt = AV_PIX_FMT_MONOBLACK; break; } case 21: case 41: case 81: s->avctx->pix_fmt = AV_PIX_FMT_PAL8; break; case 243: s->avctx->pix_fmt = AV_PIX_FMT_RGB24; break; case...
1
static int ppc_hash32_pp_check(int key, int pp, int nx) { int access; access = 0; if (key == 0) { switch (pp) { case 0x0: case 0x1: case 0x2: access |= PAGE_WRITE; case 0x3: access |= PAGE_READ; break; } } else { switch (pp) { case 0x0: access = 0; break; case 0x1: case 0x3: access = PAGE_READ; break; case 0x2: access ...
0
static void gen_iccci(DisasContext *ctx) { #if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); #else if (unlikely(ctx->pr)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); return; } #endif }
1
int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int size) { if (size < 0 || avpkt->size < 0 || size > INT_MAX - FF_INPUT_BUFFER_PADDING_SIZE) { av_log(avctx, AV_LOG_ERROR, "Size %d invalid\n", size); return AVERROR(EINVAL); } if (avctx) { av_assert0(!avpkt->data || avpkt->data != avctx->internal->byte_buff...
0
static int can_safely_read(GetBitContext* gb, int bits) { return get_bits_left(gb) >= bits; }
1
static void add_ptimer_tests(uint8_t policy) { uint8_t *ppolicy = g_malloc(1); char *policy_name = g_malloc0(256); *ppolicy = policy; if (policy == PTIMER_POLICY_DEFAULT) { g_sprintf(policy_name, "default"); } if (policy & PTIMER_POLICY_WRAP_AFTER_ONE_PERIOD) { g_strlcat(policy_name, "wrap_after_one_period,", 256); } i...
1
static int filter_packet(void *log_ctx, AVPacket *pkt, AVFormatContext *fmt_ctx, AVBitStreamFilterContext *bsf_ctx) { AVCodecContext *enc_ctx = fmt_ctx->streams[pkt->stream_index]->codec; int ret; while (bsf_ctx) { AVPacket new_pkt = *pkt; ret = av_bitstream_filter_filter(bsf_ctx, enc_ctx, NULL, &new_pkt.data, &new_pkt...
1
static void xics_kvm_cpu_setup(XICSState *xics, PowerPCCPU *cpu) { CPUState *cs; ICPState *ss; KVMXICSState *xicskvm = XICS_SPAPR_KVM(xics); cs = CPU(cpu); ss = &xics->ss[cs->cpu_index]; assert(cs->cpu_index < xics->nr_servers); if (xicskvm->kernel_xics_fd == -1) { abort(); } if (ss->cap_irq_xics_enabled) { return; } i...
0
blkdebug_co_preadv(BlockDriverState *bs, uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int flags) { BDRVBlkdebugState *s = bs->opaque; BlkdebugRule *rule = NULL; QSIMPLEQ_FOREACH(rule, &s->active_rules, active_next) { uint64_t inject_offset = rule->options.inject.offset; if (inject_offset == -1 || (inject_offset...
1
static void cirrus_linear_write(void *opaque, target_phys_addr_t addr, uint64_t val, unsigned size) { CirrusVGAState *s = opaque; unsigned mode; addr &= s->cirrus_addr_mask; if (((s->vga.sr[0x17] & 0x44) == 0x44) && ((addr & s->linear_mmio_mask) == s->linear_mmio_mask)) { cirrus_mmio_blt_write(s, addr & 0xff, val); } e...
0
static void xhci_class_init(ObjectClass *klass, void *data) { PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); DeviceClass *dc = DEVICE_CLASS(klass); dc->vmsd = &vmstate_xhci; dc->props = xhci_properties; dc->reset = xhci_reset; k->init = usb_xhci_initfn; k->vendor_id = PCI_VENDOR_ID_NEC; k->device_id = PCI_DEVICE_ID_NEC_U...
1
void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx) { if (mm_flags & FF_MM_MMX) { const int dct_algo = avctx->dct_algo; if(dct_algo==FF_DCT_AUTO || dct_algo==FF_DCT_MMX){ if(mm_flags & FF_MM_SSE2){ c->fdct = ff_fdct_sse2; }else if(mm_flags & FF_MM_MMX2){ c->fdct = ff_fdct_mmx2; }else{ c->fdct = ff_fdct_mmx; ...
0
static int opt_preset(const char *opt, const char *arg) { FILE *f=NULL; char filename[1000], tmp[1000], tmp2[1000], line[1000]; int i; const char *base[3]= { getenv("HOME"), "/usr/local/share", "/usr/share", }; for(i=!base[0]; i<3 && !f; i++){ snprintf(filename, sizeof(filename), "%s/%sffmpeg/%s.ffpreset", base[i], i ?...
0
static TranslationBlock *tb_find_slow(target_ulong pc, target_ulong cs_base, uint64_t flags) { TranslationBlock *tb, **ptb1; int code_gen_size; unsigned int h; target_ulong phys_pc, phys_page1, phys_page2, virt_page2; uint8_t *tc_ptr; spin_lock(&tb_lock); tb_invalidated_flag = 0; regs_to_env(); phys_pc = get_phys_addr_...
1
static void free_drive(DeviceState *dev, Property *prop) { DriveInfo **ptr = qdev_get_prop_ptr(dev, prop); if (*ptr) { blockdev_auto_del((*ptr)->bdrv); } }
0
static int decode_dc_progressive(MJpegDecodeContext *s, int16_t *block, int component, int dc_index, int16_t *quant_matrix, int Al) { int val; s->bdsp.clear_block(block); val = mjpeg_decode_dc(s, dc_index); if (val == 0xfffff) { av_log(s->avctx, AV_LOG_ERROR, "error dc\n"); return AVERROR_INVALIDDATA; } val = (val * (q...
1
static void arm_idct_put(UINT8 *dest, int line_size, DCTELEM *block) { j_rev_dct_ARM (block); put_pixels_clamped(block, dest, line_size); }
0
static int libquvi_close(AVFormatContext *s) { LibQuviContext *qc = s->priv_data; if (qc->fmtctx) avformat_close_input(&qc->fmtctx); return 0; }
1
static CharDriverState *text_console_init(ChardevVC *vc) { CharDriverState *chr; QemuConsole *s; unsigned width = 0; unsigned height = 0; chr = g_malloc0(sizeof(CharDriverState)); if (vc->has_width) { width = vc->width; } else if (vc->has_cols) { width = vc->cols * FONT_WIDTH; } if (vc->has_height) { height = vc->heigh...
0
int qemu_timedate_diff(struct tm *tm) { time_t seconds; if (rtc_date_offset == -1) if (rtc_utc) seconds = mktimegm(tm); else { struct tm tmp = *tm; tmp.tm_isdst = -1; seconds = mktime(&tmp); } else seconds = mktimegm(tm) + rtc_date_offset; return seconds - time(NULL); }
0
static int virtio_blk_exit_pci(PCIDevice *pci_dev) { VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev); blockdev_mark_auto_del(proxy->block.dinfo->bdrv); return virtio_exit_pci(pci_dev); }
0
static void coroutine_fn mirror_pause(BlockJob *job) { MirrorBlockJob *s = container_of(job, MirrorBlockJob, common); mirror_drain(s); }
0
static void qemu_chr_fe_write_log(CharDriverState *s, const uint8_t *buf, size_t len) { size_t done = 0; ssize_t ret; if (s->logfd < 0) { return; } while (done < len) { do { ret = write(s->logfd, buf + done, len - done); if (ret == -1 && errno == EAGAIN) { g_usleep(100); } } while (ret == -1 && errno == EAGAIN); if (re...
1
static inline void RENAME(LEToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused) { #if COMPILE_TEMPLATE_MMX __asm__ volatile( "mov %0, %%"REG_a" \n\t" "1: \n\t" "movq (%1, %%"REG_a",2), %%mm0 \n\t" "movq 8(%1, %%"REG_a",2), %%mm1 \n\t" "movq (%2, %%"REG_a",2), %%mm...
0
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
6