label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
1 | static int parse_picture_segment(AVCodecContext *avctx, const uint8_t *buf, int buf_size){ PGSSubContext *ctx = avctx->priv_data; uint8_t sequence_desc; unsigned int rle_bitmap_len, width, height; uint16_t picture_id; if (buf_size <= 4) return -1; buf_size -= 4; picture_id = bytestream_get_be16(&buf); /* skip 1 unknown... |
1 | static void sun4m_fdc_class_init(ObjectClass *klass, void *data){ DeviceClass *dc = DEVICE_CLASS(klass); dc->props = sun4m_fdc_properties; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);} |
1 | static int64_t get_pts(const char *buf, int *duration){ int i, hour, min, sec, hsec; int he, me, se, mse; for (i=0; i<2; i++) { int64_t start, end; if (sscanf(buf, "%d:%2d:%2d%*1[,.]%3d --> %d:%2d:%2d%*1[,.]%3d", &hour, &min, &sec, &hsec, &he, &me, &se, &mse) == 8) { min += 60*hour; sec += 60*min; start = sec*1000+hsec... |
1 | void qemu_savevm_state_begin(QEMUFile *f, const MigrationParams *params){ SaveStateEntry *se; int ret; trace_savevm_state_begin(); QTAILQ_FOREACH(se, &savevm_state.handlers, entry) { if (!se->ops || !se->ops->set_params) { continue; } se->ops->set_params(params, se->opaque); } QTAILQ_FOREACH(se, &savevm_state.handlers,... |
1 | static int gd_vc_chr_write(CharDriverState *chr, const uint8_t *buf, int len){ VirtualConsole *vc = chr->opaque; return vc ? write(vc->fd, buf, len) : len;} |
0 | int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx){ if (!strcasecmp(color_string, "random") || !strcasecmp(color_string, "bikeshed")) { int rgba = av_get_random_seed(); rgba_color[0] = rgba >> 24; rgba_color[1] = rgba >> 16; rgba_color[2] = rgba >> 8; rgba_color[3] = rgba; } else if (!strn... |
0 | av_cold int ff_mjpeg_encode_init(MpegEncContext *s){ MJpegContext *m; av_assert0(s->slice_context_count == 1); if (s->width > 65500 || s->height > 65500) { av_log(s, AV_LOG_ERROR, "JPEG does not support resolutions above 65500x65500\n"); return AVERROR(EINVAL); } m = av_malloc(sizeof(MJpegContext)); if (!m) return AVER... |
0 | void fft_calc_altivec(FFTContext *s, FFTComplex *z){POWERPC_TBL_DECLARE(altivec_fft_num, s->nbits >= 6);#ifdef ALTIVEC_USE_REFERENCE_C_CODE int ln = s->nbits; intj, np, np2; intnblocks, nloops; register FFTComplex *p, *q; FFTComplex *exptab = s->exptab; int l; FFTSample tmp_re, tmp_im; POWERPC_TBL_START_COUNT(altivec_f... |
0 | Aml *aml_and(Aml *arg1, Aml *arg2){ Aml *var = aml_opcode(0x7B /* AndOp */); aml_append(var, arg1); aml_append(var, arg2); build_append_byte(var->buf, 0x00 /* NullNameOp */); return var;} |
0 | static QObject *parser_context_peek_token(JSONParserContext *ctxt){ assert(!g_queue_is_empty(ctxt->buf)); return g_queue_peek_head(ctxt->buf);} |
0 | static int nbd_handle_reply_err(QIOChannel *ioc, nbd_opt_reply *reply, Error **errp){ char *msg = NULL; int result = -1; if (!(reply->type & (1 << 31))) { return 1; } if (reply->length) { if (reply->length > NBD_MAX_BUFFER_SIZE) { error_setg(errp, "server's error message is too long"); goto cleanup; } msg = g_malloc(re... |
0 | static void gen_jmp_tb(DisasContext *s, target_ulong eip, int tb_num){ gen_update_cc_op(s); set_cc_op(s, CC_OP_DYNAMIC); if (s->jmp_opt) { gen_goto_tb(s, tb_num, eip); s->is_jmp = DISAS_TB_JUMP; } else { gen_jmp_im(eip); gen_eob(s); }} |
0 | void helper_movl_sreg_reg (uint32_t sreg, uint32_t reg){uint32_t srs;srs = env->pregs[PR_SRS];srs &= 3;env->sregs[srs][sreg] = env->regs[reg];#if !defined(CONFIG_USER_ONLY)if (srs == 1 || srs == 2) {if (sreg == 6) {/* Writes to tlb-hi write to mm_cause as a side effect. */env->sregs[SFR_RW_MM_TLB_HI] = env->regs[reg];e... |
0 | static inline void gen_intermediate_code_internal(CPUX86State *env, TranslationBlock *tb, int search_pc){ DisasContext dc1, *dc = &dc1; target_ulong pc_ptr; uint16_t *gen_opc_end; CPUBreakpoint *bp; int j, lj; uint64_t flags; target_ulong pc_start; target_ulong cs_base; int num_insns; int max_insns; /* generate interme... |
0 | static void vfio_probe_nvidia_bar5_quirk(VFIOPCIDevice *vdev, int nr){ VFIOQuirk *quirk; VFIONvidiaBAR5Quirk *bar5; VFIOConfigWindowQuirk *window; if (!vfio_pci_is(vdev, PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID) || !vdev->has_vga || nr != 5) { return; } quirk = g_malloc0(sizeof(*quirk)); quirk->mem = g_new0(MemoryRegion, 4); q... |
0 | static void RENAME(lumRangeToJpeg)(int16_t *dst, int width){ int i; for (i = 0; i < width; i++) dst[i] = (FFMIN(dst[i],30189)*19077 - 39057361)>>14;} |
0 | Coroutine *qemu_coroutine_create(CoroutineEntry *entry){ Coroutine *co; co = QSLIST_FIRST(&pool); if (co) { QSLIST_REMOVE_HEAD(&pool, pool_next); pool_size--; } else { co = qemu_coroutine_new(); } co->entry = entry; return co;} |
0 | static size_t write_to_port(VirtIOSerialPort *port, const uint8_t *buf, size_t size){ VirtQueueElement elem; VirtQueue *vq; size_t offset = 0; size_t len = 0; vq = port->ivq; if (!virtio_queue_ready(vq)) { return 0; } if (!size) { return 0; } while (offset < size) { int i; if (!virtqueue_pop(vq, &elem)) { break; } for ... |
0 | static char *tcg_get_arg_str_idx(TCGContext *s, char *buf, int buf_size, int idx){ TCGTemp *ts; assert(idx >= 0 && idx < s->nb_temps); ts = &s->temps[idx]; assert(ts); if (idx < s->nb_globals) { pstrcpy(buf, buf_size, ts->name); } else { if (ts->temp_local) snprintf(buf, buf_size, "loc%d", idx - s->nb_globals); else sn... |
0 | static ImageInfoSpecific *qcow2_get_specific_info(BlockDriverState *bs){ BDRVQcow2State *s = bs->opaque; ImageInfoSpecific *spec_info = g_new(ImageInfoSpecific, 1); *spec_info = (ImageInfoSpecific){ .kind = IMAGE_INFO_SPECIFIC_KIND_QCOW2, { .qcow2 = g_new(ImageInfoSpecificQCow2, 1), }, }; if (s->qcow_version == 2) { *s... |
0 | static void kvm_cpu_fill_host(x86_def_t *x86_cpu_def){ uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0; assert(kvm_enabled()); x86_cpu_def->name = "host"; host_cpuid(0x0, 0, &eax, &ebx, &ecx, &edx); x86_cpu_def->level = eax; x86_cpu_def->vendor1 = ebx; x86_cpu_def->vendor2 = edx; x86_cpu_def->vendor3 = ecx; host_cpuid(0x1,... |
0 | static uint32_t scsi_init_iovec(SCSIDiskReq *r, size_t size){ SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev); if (!r->iov.iov_base) { r->buflen = size; r->iov.iov_base = qemu_blockalign(s->qdev.conf.bs, r->buflen); } r->iov.iov_len = MIN(r->sector_count * 512, r->buflen); qemu_iovec_init_external(&r->qio... |
0 | static void hax_process_section(MemoryRegionSection *section, uint8_t flags){ MemoryRegion *mr = section->mr; hwaddr start_pa = section->offset_within_address_space; ram_addr_t size = int128_get64(section->size); unsigned int delta; uint64_t host_va; /* We only care about RAM and ROM regions */ if (!memory_region_is_ra... |
0 | void avcodec_get_context_defaults(AVCodecContext *s){ memset(s, 0, sizeof(AVCodecContext)); s->av_class= &av_codec_context_class; s->bit_rate= 800*1000; s->bit_rate_tolerance= s->bit_rate*10; s->qmin= 2; s->qmax= 31; s->mb_qmin= 2; s->mb_qmax= 31; s->rc_eq= "tex^qComp"; s->qcompress= 0.5; s->max_qdiff= 3; s->b_quant_fa... |
0 | static void gen_sraiq(DisasContext *ctx){ int sh = SH(ctx->opcode); int l1 = gen_new_label(); TCGv t0 = tcg_temp_new(); TCGv t1 = tcg_temp_new(); tcg_gen_shri_tl(t0, cpu_gpr[rS(ctx->opcode)], sh); tcg_gen_shli_tl(t1, cpu_gpr[rS(ctx->opcode)], 32 - sh); tcg_gen_or_tl(t0, t0, t1); gen_store_spr(SPR_MQ, t0); tcg_gen_movi_... |
0 | static const mon_cmd_t *monitor_parse_command(Monitor *mon, const char *cmdline, int start, mon_cmd_t *table, QDict *qdict){ const char *p, *typestr; int c; const mon_cmd_t *cmd; char cmdname[256]; char buf[1024]; char *key; /* extract the command name */ p = get_command_name(cmdline + start, cmdname, sizeof(cmdname));... |
0 | opts_start_struct(Visitor *v, void **obj, const char *kind, const char *name, size_t size, Error **errp){ OptsVisitor *ov = DO_UPCAST(OptsVisitor, visitor, v); const QemuOpt *opt; *obj = g_malloc0(size > 0 ? size : 1); if (ov->depth++ > 0) { return; } ov->unprocessed_opts = g_hash_table_new_full(&g_str_hash, &g_str_equ... |
0 | static UserDefTwo *nested_struct_create(void){ UserDefTwo *udnp = g_malloc0(sizeof(*udnp)); udnp->string0 = strdup("test_string0"); udnp->dict1 = g_malloc0(sizeof(*udnp->dict1)); udnp->dict1->string1 = strdup("test_string1"); udnp->dict1->dict2 = g_malloc0(sizeof(*udnp->dict1->dict2)); udnp->dict1->dict2->userdef = g_n... |
0 | static void gem_write(void *opaque, hwaddr offset, uint64_t val, unsigned size){ GemState *s = (GemState *)opaque; uint32_t readonly; DB_PRINT("offset: 0x%04x write: 0x%08x ", (unsigned)offset, (unsigned)val); offset >>= 2; /* Squash bits which are read only in write value */ val &= ~(s->regs_ro[offset]); /* Preserve (... |
0 | uint32_t cpu_ppc_load_decr (CPUState *env){ ppc_tb_t *tb_env = env->tb_env; uint32_t decr; decr = muldiv64(tb_env->decr_next - qemu_get_clock(vm_clock), tb_env->tb_freq, ticks_per_sec);#if defined(DEBUG_TB) printf("%s: 0x%08x\n", __func__, decr);#endif return decr;} |
0 | static int wm8750_event(I2CSlave *i2c, enum i2c_event event){ WM8750State *s = WM8750(i2c); switch (event) { case I2C_START_SEND: s->i2c_len = 0; break; case I2C_FINISH:#ifdef VERBOSE if (s->i2c_len < 2) printf("%s: message too short (%i bytes)\n", __FUNCTION__, s->i2c_len);#endif break; default: break; } return 0;} |
0 | static int amr_wb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr){ AMRWBContext *s = avctx->priv_data; const int16_t *samples = (const int16_t *)frame->data[0]; int size, ret; if ((ret = ff_alloc_packet2(avctx, avpkt, MAX_PACKET_SIZE))) return ret; if (s->last_bitrate != ... |
0 | static int decode_2(SANMVideoContext *ctx){ int cx, cy, ret; for (cy = 0; cy != ctx->aligned_height; cy += 8) { for (cx = 0; cx != ctx->aligned_width; cx += 8) { if (ret = codec2subblock(ctx, cx, cy, 8)) return ret; } } return 0;} |
0 | static bool cmd_write_pio(IDEState *s, uint8_t cmd){ bool lba48 = (cmd == WIN_WRITE_EXT); if (!s->bs) { ide_abort_command(s); return true; } ide_cmd_lba48_transform(s, lba48); s->req_nb_sectors = 1; s->status = SEEK_STAT | READY_STAT; ide_transfer_start(s, s->io_buffer, 512, ide_sector_write); s->media_changed = 1; ret... |
0 | static uint64_t cirrus_mmio_read(void *opaque, target_phys_addr_t addr, unsigned size){ CirrusVGAState *s = opaque; if (addr >= 0x100) { return cirrus_mmio_blt_read(s, addr - 0x100); } else { return cirrus_vga_ioport_read(s, addr + 0x3c0); }} |
0 | static int ffv1_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet){ FFV1Context *f = avctx->priv_data; RangeCoder *const c = &f->slice_context[0]->c; int used_count = 0; uint8_t keystate = 128; uint8_t *buf_p; int i, ret; f->frame = pict; if ((ret = ff_alloc_packet(pkt, avctx->widt... |
0 | static void setup_frame(int usig, struct emulated_sigaction *ka,target_sigset_t *set, CPUState *regs){struct sigframe *frame;abi_ulong frame_addr = get_sigframe(ka, regs, sizeof(*frame));int i, err = 0;if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 0))return;err |= setup_sigcontext(&frame->sc, /*&frame->fpstate... |
0 | int qemu_uuid_parse(const char *str, uint8_t *uuid){ int ret; if(strlen(str) != 36) return -1; ret = sscanf(str, UUID_FMT, &uuid[0], &uuid[1], &uuid[2], &uuid[3], &uuid[4], &uuid[5], &uuid[6], &uuid[7], &uuid[8], &uuid[9], &uuid[10], &uuid[11], &uuid[12], &uuid[13], &uuid[14], &uuid[15]); if(ret != 16) return -1;#ifdef... |
0 | QError *qerror_from_info(const char *file, int linenr, const char *func, const char *fmt, va_list *va){ QError *qerr; qerr = qerror_new(); loc_save(&qerr->loc); qerr->linenr = linenr; qerr->file = file; qerr->func = func; if (!fmt) { qerror_abort(qerr, "QDict not specified"); } qerror_set_data(qerr, fmt, va); qerror_se... |
0 | fork_exec(struct socket *so, const char *ex, int do_pty){int s;struct sockaddr_in addr;int addrlen = sizeof(addr);int opt; int master = -1;char *argv[256];#if 0char buff[256];#endif/* don't want to clobber the original */char *bptr;const char *curarg;int c, i, ret;DEBUG_CALL("fork_exec");DEBUG_ARG("so = %lx", (long)so)... |
0 | static int bmdma_prepare_buf(IDEDMA *dma, int is_write){ BMDMAState *bm = DO_UPCAST(BMDMAState, dma, dma); IDEState *s = bmdma_active_if(bm); struct { uint32_t addr; uint32_t size; } prd; int l, len; qemu_sglist_init(&s->sg, s->nsector / (BMDMA_PAGE_SIZE / 512) + 1); s->io_buffer_size = 0; for(;;) { if (bm->cur_prd_len... |
0 | void timer_mod(QEMUTimer *ts, int64_t expire_time){ timer_mod_ns(ts, expire_time * ts->scale);} |
0 | ram_addr_t qemu_ram_alloc_from_ptr(DeviceState *dev, const char *name, ram_addr_t size, void *host){ RAMBlock *new_block, *block; size = TARGET_PAGE_ALIGN(size); new_block = qemu_mallocz(sizeof(*new_block)); if (dev && dev->parent_bus && dev->parent_bus->info->get_dev_path) { char *id = dev->parent_bus->info->get_dev_p... |
0 | static bool qemu_opt_get_bool_helper(QemuOpts *opts, const char *name, bool defval, bool del){ QemuOpt *opt = qemu_opt_find(opts, name); bool ret = defval; if (opt == NULL) { const QemuOptDesc *desc = find_desc_by_name(opts->list->desc, name); if (desc && desc->def_value_str) { parse_option_bool(name, desc->def_value_s... |
0 | static void tcg_out_reloc(TCGContext *s, tcg_insn_unit *code_ptr, int type, int label_index, intptr_t addend){ TCGLabel *l; TCGRelocation *r; l = &s->labels[label_index]; if (l->has_value) { /* FIXME: This may break relocations on RISC targets that modify instruction fields in place. The caller may not have written the... |
0 | static int mov_write_packet(AVFormatContext *s, int stream_index, const uint8_t *buf, int size, int64_t pts){ MOVContext *mov = s->priv_data; ByteIOContext *pb = &s->pb; AVCodecContext *enc = &s->streams[stream_index]->codec; MOVTrack* trk = &mov->tracks[stream_index]; int cl, id; unsigned int samplesInChunk = 0; if (u... |
0 | static uint32_t nvdimm_get_max_xfer_label_size(void){ uint32_t max_get_size, max_set_size, dsm_memory_size = 4096; /* * the max data ACPI can read one time which is transferred by * the response of 'Get Namespace Label Data' function. */ max_get_size = dsm_memory_size - sizeof(NvdimmFuncGetLabelDataOut); /* * the max d... |
0 | static void imx_fec_write(void *opaque, hwaddr addr, uint64_t value, unsigned size){ IMXFECState *s = IMX_FEC(opaque); FEC_PRINTF("writing 0x%08x @ 0x%" HWADDR_PRIx "\n", (int)value, addr); switch (addr & 0x3ff) { case 0x004: /* EIR */ s->eir &= ~value; break; case 0x008: /* EIMR */ s->eimr = value; break; case 0x010: ... |
0 | static void replay_enable(const char *fname, int mode){ const char *fmode = NULL; assert(!replay_file); switch (mode) { case REPLAY_MODE_RECORD: fmode = "wb"; break; case REPLAY_MODE_PLAY: fmode = "rb"; break; default: fprintf(stderr, "Replay: internal error: invalid replay mode\n"); exit(1); } atexit(replay_finish); r... |
0 | static bool raw_is_inserted(BlockDriverState *bs){ return bdrv_is_inserted(bs->file->bs);} |
0 | static int block_save_live(Monitor *mon, QEMUFile *f, int stage, void *opaque){ int ret; DPRINTF("Enter save live stage %d submitted %d transferred %d\n", stage, block_mig_state.submitted, block_mig_state.transferred); if (stage < 0) { blk_mig_cleanup(mon); return 0; } if (block_mig_state.blk_enable != 1) { /* no need ... |
0 | int qemu_config_parse(FILE *fp, QemuOptsList **lists, const char *fname){ char line[1024], group[64], id[64], arg[64], value[1024]; Location loc; QemuOptsList *list = NULL; Error *local_err = NULL; QemuOpts *opts = NULL; int res = -1, lno = 0; loc_push_none(&loc); while (fgets(line, sizeof(line), fp) != NULL) { loc_set... |
0 | static void qmp_input_check_struct(Visitor *v, Error **errp){ QmpInputVisitor *qiv = to_qiv(v); StackObject *tos = &qiv->stack[qiv->nb_stack - 1]; assert(qiv->nb_stack > 0); if (qiv->strict) { GHashTable *const top_ht = tos->h; if (top_ht) { GHashTableIter iter; const char *key; g_hash_table_iter_init(&iter, top_ht); i... |
0 | int ff_get_line(AVIOContext *s, char *buf, int maxlen){ int i = 0; char c; do { c = avio_r8(s); if (c && i < maxlen-1) buf[i++] = c; } while (c != '\n' && c != '\r' && c); if (c == '\r' && avio_r8(s) != '\n') avio_skip(s, -1); buf[i] = 0; return i;} |
0 | e1000e_intrmgr_delay_tx_causes(E1000ECore *core, uint32_t *causes){ static const uint32_t delayable_causes = E1000_ICR_TXQ0 | E1000_ICR_TXQ1 | E1000_ICR_TXQE | E1000_ICR_TXDW; if (msix_enabled(core->owner)) { return false; } /* Clean up all causes that may be delayed */ core->delayed_causes |= *causes & delayable_cause... |
0 | static int qcow2_make_empty(BlockDriverState *bs){ BDRVQcow2State *s = bs->opaque; uint64_t start_sector; int sector_step = INT_MAX / BDRV_SECTOR_SIZE; int l1_clusters, ret = 0; l1_clusters = DIV_ROUND_UP(s->l1_size, s->cluster_size / sizeof(uint64_t)); if (s->qcow_version >= 3 && !s->snapshots && 3 + l1_clusters <= s-... |
0 | static void s390_cpu_full_reset(CPUState *s){ S390CPU *cpu = S390_CPU(s); S390CPUClass *scc = S390_CPU_GET_CLASS(cpu); CPUS390XState *env = &cpu->env; int i; scc->parent_reset(s); cpu->env.sigp_order = 0; s390_cpu_set_state(CPU_STATE_STOPPED, cpu); memset(env, 0, offsetof(CPUS390XState, end_reset_fields)); /* architect... |
0 | static bool ufd_version_check(int ufd){ struct uffdio_api api_struct; uint64_t ioctl_mask; api_struct.api = UFFD_API; api_struct.features = 0; if (ioctl(ufd, UFFDIO_API, &api_struct)) { error_report("postcopy_ram_supported_by_host: UFFDIO_API failed: %s", strerror(errno)); return false; } ioctl_mask = (__u64)1 << _UFFD... |
0 | static void string_output_append(StringOutputVisitor *sov, int64_t a){ Range *r = g_malloc0(sizeof(*r)); r->begin = a; r->end = a + 1; sov->ranges = range_list_insert(sov->ranges, r);} |
0 | static void aarch64_cpu_register(const ARMCPUInfo *info){ TypeInfo type_info = { .parent = TYPE_AARCH64_CPU, .instance_size = sizeof(ARMCPU), .instance_init = info->initfn, .class_size = sizeof(ARMCPUClass), .class_init = info->class_init, }; /* TODO: drop when we support more CPUs - all entries will have name set */ i... |
0 | static void tx_fifo_push(lan9118_state *s, uint32_t val){ int n; if (s->txp->fifo_used == s->tx_fifo_size) { s->int_sts |= TDFO_INT; return; } switch (s->txp->state) { case TX_IDLE: s->txp->cmd_a = val & 0x831f37ff; s->txp->fifo_used++; s->txp->state = TX_B; s->txp->buffer_size = extract32(s->txp->cmd_a, 0, 11); s->txp... |
0 | int ff_h264_decode_ref_pic_list_reordering(H264Context *h){ int list, index, pic_structure, i; print_short_term(h); print_long_term(h); for (list = 0; list < h->list_count; list++) { for (i = 0; i < h->ref_count[list]; i++) COPY_PICTURE(&h->ref_list[list][i], &h->default_ref_list[list][i]); if (get_bits1(&h->gb)) { int... |
0 | static enum AVHWDeviceType hw_device_match_type_by_hwaccel(enum HWAccelID hwaccel_id){ int i; if (hwaccel_id == HWACCEL_NONE) return AV_HWDEVICE_TYPE_NONE; for (i = 0; hwaccels[i].name; i++) { if (hwaccels[i].id == hwaccel_id) return hwaccels[i].device_type; } return AV_HWDEVICE_TYPE_NONE;} |
0 | int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_count, const uint8_t *in_arg [SWR_CH_MAX], int in_count){ AudioData * in= &s->in; AudioData *out= &s->out; if(s->drop_output > 0){ int ret; uint8_t *tmp_arg[SWR_CH_MAX]; if((ret=swri_realloc_audio(&s->drop_temp, s->drop_output))<0) return ret; ... |
0 | av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx){ MJpegDecodeContext *s = avctx->priv_data; int ret; if (!s->picture_ptr) { s->picture = av_frame_alloc(); if (!s->picture) return AVERROR(ENOMEM); s->picture_ptr = s->picture; } s->avctx = avctx; ff_blockdsp_init(&s->bdsp, avctx); ff_hpeldsp_init(&s->hdsp, avctx->... |
0 | static int seg_write_trailer(struct AVFormatContext *s){ SegmentContext *seg = s->priv_data; AVFormatContext *oc = seg->avf; int ret = 0; if (!oc) goto fail; if (!seg->write_header_trailer) { if ((ret = segment_end(oc, 0)) < 0) goto fail; open_null_ctx(&oc->pb); ret = av_write_trailer(oc); close_null_ctx(oc->pb); } els... |
0 | int ff_tempfile(const char *prefix, char **filename) { int fd=-1;#if !HAVE_MKSTEMP *filename = tempnam(".", prefix);#else size_t len = strlen(prefix) + 12; /* room for "/tmp/" and "XXXXXX\0" */ *filename = av_malloc(len);#endif /* -----common section-----*/ if (*filename == NULL) { av_log(NULL, AV_LOG_ERROR, "ff_tempfi... |
0 | static void ffm_seek1(AVFormatContext *s, int64_t pos1){ FFMContext *ffm = s->priv_data; ByteIOContext *pb = s->pb; int64_t pos; pos = pos1 + ffm->write_index; if (pos >= ffm->file_size) pos -= (ffm->file_size - FFM_PACKET_SIZE);#ifdef DEBUG_SEEK av_log(s, AV_LOG_DEBUG, "seek to %"PRIx64" -> %"PRIx64"\n", pos1, pos);#e... |
0 | static int decode_init(AVCodecContext * avctx){ MPADecodeContext *s = avctx->priv_data; static int init=0; int i, j, k;#if defined(USE_HIGHPRECISION) && defined(CONFIG_AUDIO_NONSHORT) avctx->sample_fmt= SAMPLE_FMT_S32;#else avctx->sample_fmt= SAMPLE_FMT_S16;#endif if(avctx->antialias_algo != FF_AA_FLOAT) s->compute_ant... |
0 | void checkasm_check_vf_threshold(void){ check_threshold_8(); report("threshold8");} |
1 | int loader_exec(const char * filename, char ** argv, char ** envp, struct target_pt_regs * regs, struct image_info *infop, struct linux_binprm *bprm){ int retval; int i; bprm->p = TARGET_PAGE_SIZE*MAX_ARG_PAGES-sizeof(unsigned int); memset(bprm->page, 0, sizeof(bprm->page)); retval = open(filename, O_RDONLY); if (retva... |
1 | static int mp_get_vlc(MotionPixelsContext *mp, GetBitContext *gb){ int i; i = (mp->codes_count == 1) ? 0 : get_vlc2(gb, mp->vlc.table, mp->max_codes_bits, 1); return mp->codes[i].delta;} |
1 | uint64_t helper_mulqv(CPUAlphaState *env, uint64_t op1, uint64_t op2){ uint64_t tl, th; muls64(&tl, &th, op1, op2); /* If th != 0 && th != -1, then we had an overflow */ if (unlikely((th + 1) > 1)) { arith_excp(env, GETPC(), EXC_M_IOV, 0); } return tl;} |
1 | PCIDevice *pci_rtl8139_init(PCIBus *bus, NICInfo *nd, int devfn){ PCIRTL8139State *d; RTL8139State *s; uint8_t *pci_conf; d = (PCIRTL8139State *)pci_register_device(bus, "RTL8139", sizeof(PCIRTL8139State), devfn, NULL, NULL); pci_conf = d->dev.config; pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_REALTEK); pci_confi... |
1 | void usb_wakeup(USBEndpoint *ep, unsigned int stream){ USBDevice *dev = ep->dev; USBBus *bus = usb_bus_from_device(dev); if (dev->remote_wakeup && dev->port && dev->port->ops->wakeup) { dev->port->ops->wakeup(dev->port); if (bus->ops->wakeup_endpoint) { bus->ops->wakeup_endpoint(bus, ep, stream); |
1 | target_ulong helper_load_slb_vsid(CPUPPCState *env, target_ulong rb){ target_ulong rt; if (ppc_load_slb_vsid(env, rb, &rt) < 0) { helper_raise_exception_err(env, POWERPC_EXCP_PROGRAM, POWERPC_EXCP_INVAL); } return rt;} |
1 | static int mov_get_h264_codec_tag(AVFormatContext *s, MOVTrack *track){ int tag = track->par->codec_tag; int interlaced = track->par->field_order > AV_FIELD_PROGRESSIVE; AVStream *st = track->st; int rate = av_q2d(find_fps(s, st)); if (!tag) tag = MKTAG('a', 'v', 'c', 'i'); //fallback tag if (track->par->format == AV_P... |
0 | static int64_t get_dts(AVFormatContext *s, int64_t pos){ AVIOContext *pb = s->pb; int64_t dts; ffm_seek1(s, pos); avio_skip(pb, 4); dts = avio_rb64(pb); av_dlog(s, "dts=%0.6f\n", dts / 1000000.0); return dts;} |
0 | static void apply_channel_coupling(AC3EncodeContext *s){ LOCAL_ALIGNED_16(CoefType, cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]);#if CONFIG_AC3ENC_FLOAT LOCAL_ALIGNED_16(int32_t, fixed_cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]);#else int32_t (*fixed_cpl_coords)[AC3_MAX_CHANNELS][16] = cpl_coords;#en... |
0 | static int write_packet(AVFormatContext *s, AVPacket *pkt){ WVMuxContext *wc = s->priv_data; AVCodecContext *codec = s->streams[0]->codec; AVIOContext *pb = s->pb; uint64_t size; uint32_t flags; uint32_t left = pkt->size; uint8_t *ptr = pkt->data; int off = codec->channels > 2 ? 4 : 0; /* FIXME: Simplify decoder/demuxe... |
1 | static void compute_antialias_integer(MPADecodeContext *s, GranuleDef *g){ int32_t *ptr, *csa; int n, i; /* we antialias only "long" bands */ if (g->block_type == 2) { if (!g->switch_point) return; /* XXX: check this for 8000Hz case */ n = 1; } else { n = SBLIMIT - 1; } ptr = g->sb_hybrid + 18; for(i = n;i > 0;i--) { i... |
1 | static int receive_filter(VirtIONet *n, const uint8_t *buf, int size){ static const uint8_t bcast[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; static const uint8_t vlan[] = {0x81, 0x00}; uint8_t *ptr = (uint8_t *)buf; int i; if (n->promisc) return 1; if (!memcmp(&ptr[12], vlan, sizeof(vlan))) { int vid = be16_to_cpup((uin... |
1 | static void expand_rle_row(unsigned char *optr, unsigned char *iptr, int chan_offset, int pixelstride){ unsigned char pixel, count; #ifndef WORDS_BIGENDIAN /* rgba -> bgra for rgba32 on little endian cpus */ if (pixelstride == 4 && chan_offset != 3) { chan_offset = 2 - chan_offset; }#endif optr += chan_offset; while (1... |
1 | static void rtsp_cmd_describe(HTTPContext *c, const char *url){ FFStream *stream; char path1[1024]; const char *path; uint8_t *content; int content_length, len; struct sockaddr_in my_addr; /* find which url is asked */ url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url); path = path1; if (*path == '/'... |
1 | av_cold int ff_vp8_decode_free(AVCodecContext *avctx){ VP8Context *s = avctx->priv_data; int i; vp8_decode_flush_impl(avctx, 1); for (i = 0; i < FF_ARRAY_ELEMS(s->frames); i++) av_frame_free(&s->frames[i].tf.f);} |
1 | static void spapr_alloc_htab(sPAPRMachineState *spapr){ long shift; int index; /* allocate hash page table. For now we always make this 16mb, * later we should probably make it scale to the size of guest * RAM */ shift = kvmppc_reset_htab(spapr->htab_shift); if (shift > 0) { /* Kernel handles htab, we don't need to all... |
1 | static int qemu_rdma_get_buffer(void *opaque, uint8_t *buf, int64_t pos, int size){ QEMUFileRDMA *r = opaque; RDMAContext *rdma = r->rdma; RDMAControlHeader head; int ret = 0; CHECK_ERROR_STATE(); /* * First, we hold on to the last SEND message we * were given and dish out the bytes until we run * out of bytes. */ r->l... |
1 | static int ebml_read_binary(AVIOContext *pb, int length, EbmlBin *bin){ av_free(bin->data); if (!(bin->data = av_malloc(length))) return AVERROR(ENOMEM); bin->size = length; bin->pos = avio_tell(pb); if (avio_read(pb, bin->data, length) != length) { av_freep(&bin->data); return AVERROR(EIO); } return 0;} |
0 | void avcodec_init(void){ static int inited = 0; if (inited != 0) return; inited = 1; dsputil_static_init();} |
0 | void swri_get_dither(SwrContext *s, void *dst, int len, unsigned seed, enum AVSampleFormat noise_fmt) { double scale = s->dither.noise_scale;#define TMP_EXTRA 2 double *tmp = av_malloc_array(len + TMP_EXTRA, sizeof(double)); int i; for(i=0; i<len + TMP_EXTRA; i++){ double v; seed = seed* 1664525 + 1013904223; switch(s-... |
1 | static int hls_coding_quadtree(HEVCContext *s, int x0, int y0, int log2_cb_size, int cb_depth){ HEVCLocalContext *lc = s->HEVClc; const int cb_size = 1 << log2_cb_size; int ret; lc->ct.depth = cb_depth; if (x0 + cb_size <= s->sps->width && y0 + cb_size <= s->sps->height && log2_cb_size > s->sps->log2_min_cb_size) { SAM... |
1 | static void test_uuid_unparse_strdup(void){ int i; for (i = 0; i < ARRAY_SIZE(uuid_test_data); i++) { char *out; if (!uuid_test_data[i].check_unparse) { continue; } out = qemu_uuid_unparse_strdup(&uuid_test_data[i].uuid); g_assert_cmpstr(uuid_test_data[i].uuidstr, ==, out); }} |
1 | static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size){ SmackVContext * const smk = avctx->priv_data; uint8_t *out; uint32_t *pal; GetBitContext gb; int blocks, blk, bw, bh; int i; int stride; if(buf_size == 769) return 0; if(smk->pic.data[0]) avctx->release_buffer(... |
1 | static void core_region_del(MemoryListener *listener, MemoryRegionSection *section){ cpu_register_physical_memory_log(section, false);} |
1 | void do_store_msr (CPUPPCState *env, target_ulong value){ int enter_pm; value &= env->msr_mask; if (((value >> MSR_IR) & 1) != msr_ir || ((value >> MSR_DR) & 1) != msr_dr) { /* Flush all tlb when changing translation mode */ tlb_flush(env, 1); env->interrupt_request |= CPU_INTERRUPT_EXITTB; }#if 0 if (loglevel != 0) { ... |
1 | static int dv_extract_audio_info(DVDemuxContext* c, uint8_t* frame){ const uint8_t* as_pack; int freq, stype, smpls, quant, i, ach; as_pack = dv_extract_pack(frame, dv_audio_source); if (!as_pack || !c->sys) { /* No audio ? */ c->ach = 0; smpls = as_pack[1] & 0x3f; /* samples in this frame - min. samples */ freq = (as_... |
1 | QEMUFile *qemu_fopen_socket(int fd, const char *mode){ QEMUFileSocket *s; if (qemu_file_mode_is_not_valid(mode)) { return NULL; } s = g_malloc0(sizeof(QEMUFileSocket)); s->fd = fd; if (mode[0] == 'w') { qemu_set_block(s->fd); s->file = qemu_fopen_ops(s, &socket_write_ops); } else { s->file = qemu_fopen_ops(s, &socket_r... |
1 | static void aio_rfifolock_cb(void *opaque){ /* Kick owner thread in case they are blocked in aio_poll() */ aio_notify(opaque);} |
1 | int nbd_receive_negotiate(QIOChannel *ioc, const char *name, QCryptoTLSCreds *tlscreds, const char *hostname, QIOChannel **outioc, NBDExportInfo *info, Error **errp){ char buf[256]; uint64_t magic; int rc; bool zeroes = true; bool structured_reply = info->structured_reply; trace_nbd_receive_negotiate(tlscreds, hostname... |
1 | static int get_codec_data(AVIOContext *pb, AVStream *vst, AVStream *ast, int myth){ nuv_frametype frametype; if (!vst && !myth) return 1; // no codec data needed while (!pb->eof_reached) { int size, subtype; frametype = avio_r8(pb); switch (frametype) { case NUV_EXTRADATA: subtype = avio_r8(pb); avio_skip(pb, 6); size ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.