label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
0 | void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, int64_t channel_layout){ int i; if (nb_channels <= 0) nb_channels = av_get_channel_layout_nb_channels(channel_layout); for (i = 0; channel_layout_map[i].name; i++) if (nb_channels == channel_layout_map[i].nb_channels && channel_layout == channe... |
1 | void qemu_co_queue_run_restart(Coroutine *co){ Coroutine *next; trace_qemu_co_queue_run_restart(co); while ((next = QSIMPLEQ_FIRST(&co->co_queue_wakeup))) { QSIMPLEQ_REMOVE_HEAD(&co->co_queue_wakeup, co_queue_next); qemu_coroutine_enter(next, NULL); }} |
1 | static inline void RENAME(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width){#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)asm volatile("movq "MANGLE(bm01010101)", %%mm4\n\t""mov %0, %%"REG_a"\n\t""1:\n\t""movq (%1, %%"REG_a",4), %%mm0\n\t""movq 8(%1, %%"REG_a",4), %%mm1\n\t""movq (%2, %%... |
0 | static void default_show_tags(WriterContext *wctx, AVDictionary *dict){ AVDictionaryEntry *tag = NULL; while ((tag = av_dict_get(dict, "", tag, AV_DICT_IGNORE_SUFFIX))) { printf("TAG:"); writer_print_string(wctx, tag->key, tag->value); }} |
1 | static int decode_block(ALSDecContext *ctx, ALSBlockData *bd){ unsigned int smp; // read block type flag and read the samples accordingly if (*bd->const_block) decode_const_block_data(ctx, bd); else if (decode_var_block_data(ctx, bd)) return -1; // TODO: read RLSLMS extension data if (*bd->shift_lsbs) for (smp = 0; smp... |
1 | static void hdcd_reset(hdcd_state *state, unsigned rate, unsigned cdt_ms){ int i; state->window = 0; state->readahead = 32; state->arg = 0; state->control = 0; state->running_gain = 0; state->sustain = 0; state->sustain_reset = cdt_ms*rate/1000; state->code_counterA = 0; state->code_counterA_almost = 0; state->code_cou... |
1 | static int ehci_register_companion(USBBus *bus, USBPort *ports[], uint32_t portcount, uint32_t firstport){ EHCIState *s = container_of(bus, EHCIState, bus); uint32_t i; if (firstport + portcount > NB_PORTS) { qerror_report(QERR_INVALID_PARAMETER_VALUE, "firstport", "firstport on masterbus"); error_printf_unless_qmp( "f... |
1 | static int ehci_execute(EHCIPacket *p, const char *action){ USBEndpoint *ep; int ret; int endp; if (!(p->qtd.token & QTD_TOKEN_ACTIVE)) { fprintf(stderr, "Attempting to execute inactive qtd\n"); return USB_RET_PROCERR; } p->tbytes = (p->qtd.token & QTD_TOKEN_TBYTES_MASK) >> QTD_TOKEN_TBYTES_SH; if (p->tbytes > BUFF_SIZ... |
1 | int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt){ IVI45DecContext *ctx = avctx->priv_data; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; int result, p, b; init_get_bits(&ctx->gb, buf, buf_size * 8); ctx->frame_data = buf; ctx->frame_size = buf_size; result = ct... |
1 | static int avcodec_find_best_pix_fmt1(int64_t pix_fmt_mask, int src_pix_fmt, int has_alpha, int loss_mask){ int dist, i, loss, min_dist, dst_pix_fmt; /* find exact color match with smallest size */ dst_pix_fmt = -1; min_dist = 0x7fffffff; for(i = 0;i < PIX_FMT_NB; i++) { if (pix_fmt_mask & (1 << i)) { loss = avcodec_ge... |
1 | static int vorbis_parse_audio_packet(vorbis_context *vc){ GetBitContext *gb = &vc->gb; FFTContext *mdct; unsigned previous_window = vc->previous_window; unsigned mode_number, blockflag, blocksize; int i, j; uint8_t no_residue[255]; uint8_t do_not_decode[255]; vorbis_mapping *mapping; float *ch_res_ptr = vc->channel_res... |
1 | static int mpc8_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags){ AVStream *st = s->streams[stream_index]; MPCContext *c = s->priv_data; int index = av_index_search_timestamp(st, timestamp, flags); if(index < 0) return -1; avio_seek(s->pb, st->index_entries[index].pos, SEEK_SET); c->frame =... |
1 | static void pred8x8_left_dc_rv40_c(uint8_t *src, int stride){ int i; int dc0; dc0=0; for(i=0;i<8; i++) dc0+= src[-1+i*stride]; dc0= 0x01010101*((dc0 + 4)>>3); for(i=0; i<8; i++){ ((uint32_t*)(src+i*stride))[0]= ((uint32_t*)(src+i*stride))[1]= dc0; }} |
1 | static void usb_msd_command_complete(SCSIBus *bus, int reason, uint32_t tag, uint32_t arg){ MSDState *s = DO_UPCAST(MSDState, dev.qdev, bus->qbus.parent); USBPacket *p = s->packet; if (tag != s->tag) { fprintf(stderr, "usb-msd: Unexpected SCSI Tag 0x%x\n", tag); } if (reason == SCSI_REASON_DONE) { DPRINTF("Command comp... |
1 | static int latm_decode_frame(AVCodecContext *avctx, void *out, int *out_size, AVPacket *avpkt){ struct LATMContext *latmctx = avctx->priv_data; int muxlength, err; GetBitContext gb; if (avpkt->size == 0) return 0; init_get_bits(&gb, avpkt->data, avpkt->size * 8); // check for LOAS sync word if (get_bits(&gb, 11) != LOA... |
1 | static void quantize_and_encode_band_mips(struct AACEncContext *s, PutBitContext *pb, const float *in, float *out, int size, int scale_idx, int cb, const float lambda, int rtz){ quantize_and_encode_band_cost(s, pb, in, out, NULL, size, scale_idx, cb, lambda, INFINITY, NULL, (rtz) ? ROUND_TO_ZERO : ROUND_STANDARD);} |
1 | void visit_type_number(Visitor *v, double *obj, const char *name, Error **errp){ if (!error_is_set(errp)) { v->type_number(v, obj, name, errp); }} |
1 | static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch){ int32_t offset; int rs, rt, rd, sa; uint32_t op, op1, op2; int16_t imm; /* make sure instructions are on a word boundary */ if (ctx->pc & 0x3) { env->CP0_BadVAddr = ctx->pc; generate_exception(ctx, EXCP_AdEL); return; } /* Handle blikely not... |
1 | static int lzw_get_code(struct LZWState * s){ int c; if(s->mode == FF_LZW_GIF) { while (s->bbits < s->cursize) { if (!s->bs) { s->bs = *s->pbuf++; if(!s->bs) { s->eob_reached = 1; break; } } s->bbuf |= (*s->pbuf++) << s->bbits; s->bbits += 8; s->bs--; } c = s->bbuf & s->curmask; s->bbuf >>= s->cursize; } else { // TIFF... |
1 | static av_cold int yop_decode_init(AVCodecContext *avctx){ YopDecContext *s = avctx->priv_data; s->avctx = avctx; if (avctx->width & 1 || avctx->height & 1 || av_image_check_size(avctx->width, avctx->height, 0, avctx) < 0) { av_log(avctx, AV_LOG_ERROR, "YOP has invalid dimensions\n"); return -1; avctx->pix_fmt = PIX_FM... |
1 | static int local_open(FsContext *ctx, V9fsPath *fs_path, int flags, V9fsFidOpenState *fs){ char *buffer; char *path = fs_path->data; int fd; buffer = rpath(ctx, path); fd = open(buffer, flags | O_NOFOLLOW); g_free(buffer); if (fd == -1) { return -1; } fs->fd = fd; return fs->fd;} |
1 | static int local_lstat(FsContext *fs_ctx, V9fsPath *fs_path, struct stat *stbuf){ int err; char *buffer; char *path = fs_path->data; buffer = rpath(fs_ctx, path); err = lstat(buffer, stbuf); if (err) { goto err_out; } if (fs_ctx->export_flags & V9FS_SM_MAPPED) { /* Actual credentials are part of extended attrs */ uid_t... |
1 | int vnc_tls_set_x509_creds_dir(VncDisplay *vd, const char *certdir){ if (vnc_set_x509_credential(vd, certdir, X509_CA_CERT_FILE, &vd->tls.x509cacert, 0) < 0) goto cleanup; if (vnc_set_x509_credential(vd, certdir, X509_CA_CRL_FILE, &vd->tls.x509cacrl, 1) < 0) goto cleanup; if (vnc_set_x509_credential(vd, certdir, X509_S... |
0 | int mm_support(void){ int rval; int eax, ebx, ecx, edx; __asm__ __volatile__ ( /* See if CPUID instruction is supported ... */ /* ... Get copies of EFLAGS into eax and ecx */ "pushf\n\t" "pop %0\n\t" "movl %0, %1\n\t" /* ... Toggle the ID bit in one copy and store */ /* to the EFLAGS reg */ "xorl $0x200000, %0\n\t" "pu... |
1 | static uint64_t xscom_read(void *opaque, hwaddr addr, unsigned width){ PnvChip *chip = opaque; uint32_t pcba = pnv_xscom_pcba(chip, addr); uint64_t val = 0; MemTxResult result; /* Handle some SCOMs here before dispatch */ val = xscom_read_default(chip, pcba); if (val != -1) { goto complete; } val = address_space_ldq(&c... |
1 | static int remove_mapping(BDRVVVFATState* s, int mapping_index){ mapping_t* mapping = array_get(&(s->mapping), mapping_index); mapping_t* first_mapping = array_get(&(s->mapping), 0); /* free mapping */ if (mapping->first_mapping_index < 0)free(mapping->path); /* remove from s->mapping */ array_remove(&(s->mapping), map... |
1 | static void test_redirector_tx(void){#ifndef _WIN32/* socketpair(PF_UNIX) which does not exist on windows */ int backend_sock[2], recv_sock; char *cmdline; uint32_t ret = 0, len = 0; char send_buf[] = "Hello!!"; char sock_path0[] = "filter-redirector0.XXXXXX"; char sock_path1[] = "filter-redirector1.XXXXXX"; char *recv... |
1 | void do_divduo (void){ if (likely((uint64_t)T1 != 0)) { xer_ov = 0; T0 = (uint64_t)T0 / (uint64_t)T1; } else { xer_so = 1; xer_ov = 1; T0 = 0; }} |
1 | static int megasas_dcmd_cfg_read(MegasasState *s, MegasasCmd *cmd){ uint8_t data[4096]; struct mfi_config_data *info; int num_pd_disks = 0, array_offset, ld_offset; BusChild *kid; if (cmd->iov_size > 4096) { return MFI_STAT_INVALID_PARAMETER; } QTAILQ_FOREACH(kid, &s->bus.qbus.children, sibling) { num_pd_disks++; } inf... |
1 | static void lsi_do_msgout(LSIState *s){ uint8_t msg; int len; uint32_t current_tag; SCSIDevice *current_dev; lsi_request *p, *p_next; int id; if (s->current) { current_tag = s->current->tag; } else { current_tag = s->select_tag; } id = (current_tag >> 8) & 0xf; current_dev = s->bus.devs[id]; DPRINTF("MSG out len=%d\n",... |
0 | static void local_mapped_file_attr(FsContext *ctx, const char *path, struct stat *stbuf){ FILE *fp; char buf[ATTR_MAX]; char attr_path[PATH_MAX]; local_mapped_attr_path(ctx, path, attr_path); fp = local_fopen(attr_path, "r"); if (!fp) { return; } memset(buf, 0, ATTR_MAX); while (fgets(buf, ATTR_MAX, fp)) { if (!strncmp... |
0 | static int qemu_rbd_parsename(const char *filename, char *pool, int pool_len, char *snap, int snap_len, char *name, int name_len, char *conf, int conf_len, Error **errp){ const char *start; char *p, *buf; int ret = 0; char *found_str; Error *local_err = NULL; if (!strstart(filename, "rbd:", &start)) { error_setg(errp, ... |
0 | static void vtd_realize(DeviceState *dev, Error **errp){ MachineState *ms = MACHINE(qdev_get_machine()); MachineClass *mc = MACHINE_GET_CLASS(ms); PCMachineState *pcms = PC_MACHINE(object_dynamic_cast(OBJECT(ms), TYPE_PC_MACHINE)); PCIBus *bus; IntelIOMMUState *s = INTEL_IOMMU_DEVICE(dev); X86IOMMUState *x86_iommu = X8... |
0 | void s390x_cpu_timer(void *opaque){ S390CPU *cpu = opaque; CPUS390XState *env = &cpu->env; env->pending_int |= INTERRUPT_CPUTIMER; cpu_interrupt(CPU(cpu), CPU_INTERRUPT_HARD);} |
0 | static int ahci_dma_prepare_buf(IDEDMA *dma, int is_write){ AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma); IDEState *s = &ad->port.ifs[0]; ahci_populate_sglist(ad, &s->sg, 0); s->io_buffer_size = s->sg.size; DPRINTF(ad->port_no, "len=%#x\n", s->io_buffer_size); return s->io_buffer_size != 0;} |
0 | void tcp_start_incoming_migration(const char *host_port, Error **errp){ Error *err = NULL; SocketAddressLegacy *saddr = tcp_build_address(host_port, &err); if (!err) { socket_start_incoming_migration(saddr, &err); } error_propagate(errp, err);} |
0 | static void init_quantization(Jpeg2000EncoderContext *s){ int compno, reslevelno, bandno; Jpeg2000QuantStyle *qntsty = &s->qntsty; Jpeg2000CodingStyle *codsty = &s->codsty; for (compno = 0; compno < s->ncomponents; compno++){ int gbandno = 0; for (reslevelno = 0; reslevelno < codsty->nreslevels; reslevelno++){ int nban... |
0 | static BlockDriverState *bdrv_open_inherit(const char *filename, const char *reference, QDict *options, int flags, BlockDriverState *parent, const BdrvChildRole *child_role, Error **errp){ int ret; BdrvChild *file = NULL; BlockDriverState *bs; BlockDriver *drv = NULL; const char *drvname; const char *backing; Error *lo... |
0 | AlphaCPU *cpu_alpha_init(const char *cpu_model){ AlphaCPU *cpu; ObjectClass *cpu_class; cpu_class = alpha_cpu_class_by_name(cpu_model); if (cpu_class == NULL) { /* Default to ev67; no reason not to emulate insns by default. */ cpu_class = object_class_by_name(TYPE("ev67")); } cpu = ALPHA_CPU(object_new(object_class_get... |
0 | static void xen_pt_pci_write_config(PCIDevice *d, uint32_t addr, uint32_t val, int len){ XenPCIPassthroughState *s = DO_UPCAST(XenPCIPassthroughState, dev, d); int index = 0; XenPTRegGroup *reg_grp_entry = NULL; int rc = 0; uint32_t read_val = 0, wb_mask; int emul_len = 0; XenPTReg *reg_entry = NULL; uint32_t find_addr... |
0 | static void test_hash_base64(void){ size_t i; g_assert(qcrypto_init(NULL) == 0); for (i = 0; i < G_N_ELEMENTS(expected_outputs) ; i++) { int ret; char *digest; ret = qcrypto_hash_base64(i, INPUT_TEXT, strlen(INPUT_TEXT), &digest, NULL); g_assert(ret == 0); g_assert(g_str_equal(digest, expected_outputs_b64[i])); g_free(... |
0 | static void virtio_ccw_serial_realize(VirtioCcwDevice *ccw_dev, Error **errp){ VirtioSerialCcw *dev = VIRTIO_SERIAL_CCW(ccw_dev); DeviceState *vdev = DEVICE(&dev->vdev); DeviceState *proxy = DEVICE(ccw_dev); Error *err = NULL; char *bus_name; /* * For command line compatibility, this sets the virtio-serial-device bus *... |
0 | uint32_t kvmppc_get_vmx(void){ return kvmppc_read_int_cpu_dt("ibm,vmx");} |
0 | static void check_reserved_space (target_phys_addr_t *start, target_phys_addr_t *length){ target_phys_addr_t begin = *start; target_phys_addr_t end = *start + *length; if (end >= 0x1e000000LL && end < 0x1f100000LL) end = 0x1e000000LL; if (begin >= 0x1e000000LL && begin < 0x1f100000LL) begin = 0x1f100000LL; if (end >= 0... |
0 | CharDriverState *qemu_chr_open_msmouse(void){ CharDriverState *chr; chr = g_malloc0(sizeof(CharDriverState)); chr->chr_write = msmouse_chr_write; chr->chr_close = msmouse_chr_close; chr->explicit_be_open = true; qemu_add_mouse_event_handler(msmouse_event, chr, 0, "QEMU Microsoft Mouse"); return chr;} |
0 | void vfio_pci_write_config(PCIDevice *pdev, uint32_t addr, uint32_t val, int len){ VFIOPCIDevice *vdev = DO_UPCAST(VFIOPCIDevice, pdev, pdev); uint32_t val_le = cpu_to_le32(val); trace_vfio_pci_write_config(vdev->vbasedev.name, addr, val, len); /* Write everything to VFIO, let it filter out what we can't write */ if (p... |
0 | static int sap_fetch_packet(AVFormatContext *s, AVPacket *pkt){ struct SAPState *sap = s->priv_data; int fd = url_get_file_handle(sap->ann_fd); int n, ret; fd_set rfds; struct timeval tv; uint8_t recvbuf[1500]; if (sap->eof) return AVERROR_EOF; while (1) { FD_ZERO(&rfds); FD_SET(fd, &rfds); tv.tv_sec = tv.tv_usec = 0; ... |
0 | static void run_dependent_requests(BDRVQcowState *s, QCowL2Meta *m){ /* Take the request off the list of running requests */ if (m->nb_clusters != 0) { QLIST_REMOVE(m, next_in_flight); } /* Restart all dependent requests */ if (!qemu_co_queue_empty(&m->dependent_requests)) { qemu_co_mutex_unlock(&s->lock); while(qemu_c... |
0 | uint32_t kvm_arch_get_supported_cpuid(KVMState *s, uint32_t function, uint32_t index, int reg){ struct kvm_cpuid2 *cpuid; int max; uint32_t ret = 0; uint32_t cpuid_1_edx; bool found = false; max = 1; while ((cpuid = try_get_cpuid(s, max)) == NULL) { max *= 2; } struct kvm_cpuid_entry2 *entry = cpuid_find_entry(cpuid, f... |
0 | static abi_long do_socketcall(int num, abi_ulong vptr){ abi_long ret; const int n = sizeof(abi_ulong); switch(num) { case SOCKOP_socket:{ abi_ulong domain, type, protocol; if (get_user_ual(domain, vptr) || get_user_ual(type, vptr + n) || get_user_ual(protocol, vptr + 2 * n)) return -TARGET_EFAULT; ret = do_socket(domai... |
0 | static int nbd_send_rep_list(int csock, NBDExport *exp){ uint64_t magic, name_len; uint32_t opt, type, len; name_len = strlen(exp->name); magic = cpu_to_be64(NBD_REP_MAGIC); if (write_sync(csock, &magic, sizeof(magic)) != sizeof(magic)) { LOG("write failed (magic)"); return -EINVAL; } opt = cpu_to_be32(NBD_OPT_LIST); i... |
0 | static int nic_init(PCIDevice *pci_dev, uint32_t device){ PCIEEPRO100State *d = DO_UPCAST(PCIEEPRO100State, dev, pci_dev); EEPRO100State *s; logout("\n"); d->dev.unregister = pci_nic_uninit; s = &d->eepro100; s->device = device; s->pci_dev = &d->dev; pci_reset(s); /* Add 64 * 2 EEPROM. i82557 and i82558 support a 64 wo... |
0 | static uint64_t pchip_read(void *opaque, target_phys_addr_t addr, unsigned size){ TyphoonState *s = opaque; uint64_t ret = 0; if (addr & 4) { return s->latch_tmp; } switch (addr) { case 0x0000: /* WSBA0: Window Space Base Address Register. */ ret = s->pchip.win[0].base_addr; break; case 0x0040: /* WSBA1 */ ret = s->pch... |
1 | static void curl_close(BlockDriverState *bs){ BDRVCURLState *s = bs->opaque; DPRINTF("CURL: Close\n"); curl_detach_aio_context(bs); qemu_mutex_destroy(&s->mutex); g_free(s->cookie); g_free(s->url);} |
1 | int get_partial_buffer(ByteIOContext *s, unsigned char *buf, int size){ int len; len = s->buf_end - s->buf_ptr; if (len == 0) { fill_buffer(s); len = s->buf_end - s->buf_ptr; } if (len > size) len = size; memcpy(buf, s->buf_ptr, len); s->buf_ptr += len; return len;} |
1 | static int decode_cce(AACContext *ac, GetBitContext *gb, ChannelElement *che){ int num_gain = 0; int c, g, sfb, ret; int sign; INTFLOAT scale; SingleChannelElement *sce = &che->ch[0]; ChannelCoupling *coup = &che->coup; coup->coupling_point = 2 * get_bits1(gb); coup->num_coupled = get_bits(gb, 3); for (c = 0; c <= coup... |
1 | static gboolean gd_key_event(GtkWidget *widget, GdkEventKey *key, void *opaque){ VirtualConsole *vc = opaque; GtkDisplayState *s = vc->s; int gdk_keycode = key->hardware_keycode; int qemu_keycode; int i; if (key->keyval == GDK_KEY_Pause) { qemu_input_event_send_key_qcode(vc->gfx.dcl.con, Q_KEY_CODE_PAUSE, key->type == ... |
1 | void *pl110_init(DisplayState *ds, uint32_t base, qemu_irq irq, int versatile){ pl110_state *s; int iomemtype; s = (pl110_state *)qemu_mallocz(sizeof(pl110_state)); iomemtype = cpu_register_io_memory(0, pl110_readfn, pl110_writefn, s); cpu_register_physical_memory(base, 0x00000fff, iomemtype); s->base = base; s->ds = d... |
1 | void rgb16tobgr15(const uint8_t *src, uint8_t *dst, long src_size){long i;long num_pixels = src_size >> 1;for(i=0; i<num_pixels; i++){ unsigned b,g,r; register uint16_t rgb; rgb = src[2*i]; r = rgb&0x1F; g = (rgb&0x7E0)>>5; b = (rgb&0xF800)>>11; dst[2*i] = (b&0x1F) | ((g&0x1F)<<5) | ((r&0x1F)<<10);}} |
1 | static void replication_start(ReplicationState *rs, ReplicationMode mode, Error **errp){ BlockDriverState *bs = rs->opaque; BDRVReplicationState *s; BlockDriverState *top_bs; int64_t active_length, hidden_length, disk_length; AioContext *aio_context; Error *local_err = NULL; aio_context = bdrv_get_aio_context(bs); aio_... |
1 | static inline void RENAME(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused){#if COMPILE_TEMPLATE_MMX __asm__ volatile( "movq "MANGLE(bm01010101)", %%mm4 \n\t" "mov %0, %%"REG_a" \n\t" "1: \n\t" "movq (%1, %%"REG_a",4), %%mm0 \n\t" "movq 8(%1, %%"REG_a",4), %%... |
1 | uint32_t vga_mem_readb(VGACommonState *s, hwaddr addr){ int memory_map_mode, plane; uint32_t ret; /* convert to VGA memory offset */ memory_map_mode = (s->gr[VGA_GFX_MISC] >> 2) & 3; addr &= 0x1ffff; switch(memory_map_mode) { case 0: break; case 1: if (addr >= 0x10000) return 0xff; addr += s->bank_offset; break; case 2... |
0 | static av_cold int libx265_encode_close(AVCodecContext *avctx){ libx265Context *ctx = avctx->priv_data; av_frame_free(&avctx->coded_frame); ctx->api->param_free(ctx->params); if (ctx->encoder) ctx->api->encoder_close(ctx->encoder); return 0;} |
0 | static void dvbsub_parse_pixel_data_block(AVCodecContext *avctx, DVBSubObjectDisplay *display, const uint8_t *buf, int buf_size, int top_bottom, int non_mod){ DVBSubContext *ctx = avctx->priv_data; DVBSubRegion *region = get_region(ctx, display->region_id); const uint8_t *buf_end = buf + buf_size; uint8_t *pbuf; int x_... |
0 | static void assert_file_overwrite(const char *filename){ if (file_overwrite && file_skip) { fprintf(stderr, "Error, both -y and -n supplied. Exiting.\n"); exit_program(1); } if (!file_overwrite && (strchr(filename, ':') == NULL || filename[1] == ':' || av_strstart(filename, "file:", NULL))) { if (avio_check(filename, 0... |
1 | static void tlb_info(Monitor *mon){ CPUState *env; int l1, l2; uint32_t pgd, pde, pte; env = mon_get_cpu(); if (!(env->cr[0] & CR0_PG_MASK)) { monitor_printf(mon, "PG disabled\n"); return; } pgd = env->cr[3] & ~0xfff; for(l1 = 0; l1 < 1024; l1++) { cpu_physical_memory_read(pgd + l1 * 4, (uint8_t *)&pde, 4); pde = le32_... |
1 | static void parse_option_number(const char *name, const char *value, uint64_t *ret, Error **errp){ char *postfix; uint64_t number; number = strtoull(value, &postfix, 0); if (*postfix != '\0') { error_setg(errp, QERR_INVALID_PARAMETER_VALUE, name, "a number"); return; } *ret = number;} |
1 | static int decode_vol_header(MpegEncContext *s, GetBitContext *gb){ int width, height, vo_ver_id; /* vol header */ skip_bits(gb, 1); /* random access */ s->vo_type= get_bits(gb, 8); if (get_bits1(gb) != 0) { /* is_ol_id */ vo_ver_id = get_bits(gb, 4); /* vo_ver_id */ skip_bits(gb, 3); /* vo_priority */ } else { vo_ver_... |
1 | static int scsi_disk_initfn(SCSIDevice *dev){ SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, dev); int is_cd; DriveInfo *dinfo; if (!s->qdev.conf.bs) { error_report("scsi-disk: drive property not set"); s->bs = s->qdev.conf.bs; is_cd = bdrv_get_type_hint(s->bs) == BDRV_TYPE_CDROM; if (bdrv_get_on_error(s->bs, 1) != ... |
1 | static av_cold int dvdsub_init(AVCodecContext *avctx){ DVDSubContext *ctx = avctx->priv_data; char *data, *cur; if (!avctx->extradata || !avctx->extradata_size) return 0; data = av_malloc(avctx->extradata_size + 1); if (!data) return AVERROR(ENOMEM); memcpy(data, avctx->extradata, avctx->extradata_size); data[avctx->ex... |
1 | static void mxf_write_random_index_pack(AVFormatContext *s){ MXFContext *mxf = s->priv_data; AVIOContext *pb = s->pb; uint64_t pos = avio_tell(pb); int i; avio_write(pb, random_index_pack_key, 16); klv_encode_ber_length(pb, 28 + 12*mxf->body_partitions_count); if (mxf->edit_unit_byte_count) avio_wb32(pb, 1); // BodySID... |
1 | static int qcow2_mark_clean(BlockDriverState *bs){ BDRVQcowState *s = bs->opaque; if (s->incompatible_features & QCOW2_INCOMPAT_DIRTY) { int ret = bdrv_flush(bs); if (ret < 0) { return ret; } s->incompatible_features &= ~QCOW2_INCOMPAT_DIRTY; return qcow2_update_header(bs); } return 0;} |
1 | static int config_props(AVFilterLink *link){ YADIFContext *yadif = link->src->priv; link->time_base.num = link->src->inputs[0]->time_base.num; link->time_base.den = link->src->inputs[0]->time_base.den * 2; link->w = link->src->inputs[0]->w; link->h = link->src->inputs[0]->h; if(yadif->mode&1) link->frame_rate = av_mul_... |
1 | void qemu_system_powerdown(void){ if(pm_state->pmen & PWRBTN_EN) { pm_state->pmsts |= PWRBTN_EN;pm_update_sci(pm_state); }} |
1 | static int alloc_table(VLC *vlc, int size){ int index; index = vlc->table_size; vlc->table_size += size; if (vlc->table_size > vlc->table_allocated) { vlc->table_allocated += (1 << vlc->bits); vlc->table = av_realloc(vlc->table, sizeof(VLC_TYPE) * 2 * vlc->table_allocated); if (!vlc->table) return -1; } return index;} |
1 | int net_slirp_smb(const char *exported_dir){ struct in_addr vserver_addr = { .s_addr = 0 }; if (legacy_smb_export) { fprintf(stderr, "-smb given twice\n"); return -1; } legacy_smb_export = exported_dir; if (!QTAILQ_EMPTY(&slirp_stacks)) { return slirp_smb(QTAILQ_FIRST(&slirp_stacks), exported_dir, vserver_addr); } retu... |
1 | static void set_int32(Object *obj, Visitor *v, void *opaque, const char *name, Error **errp){ DeviceState *dev = DEVICE(obj); Property *prop = opaque; int32_t *ptr = qdev_get_prop_ptr(dev, prop); Error *local_err = NULL; int64_t value; if (dev->state != DEV_STATE_CREATED) { error_set(errp, QERR_PERMISSION_DENIED); retu... |
1 | static av_cold int smvjpeg_decode_init(AVCodecContext *avctx){ SMVJpegDecodeContext *s = avctx->priv_data; AVCodec *codec; AVDictionary *thread_opt = NULL; int ret = 0; s->frames_per_jpeg = 0; s->picture[0] = av_frame_alloc(); if (!s->picture[0]) return AVERROR(ENOMEM); s->picture[1] = av_frame_alloc(); if (!s->picture... |
1 | static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const char *vfilters){ static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }; char sws_flags_str[128]; char buffersrc_args[256]; int ret; AVBufferSinkParams *buffersink_params = av_buffersink_params_alloc(); AVFilter... |
1 | static void pxa2xx_pcmcia_class_init(ObjectClass *oc, void *data){ DeviceClass *dc = DEVICE_CLASS(oc); dc->realize = pxa2xx_pcmcia_realize;} |
0 | static void cuvid_flush(AVCodecContext *avctx){ CuvidContext *ctx = avctx->priv_data; AVHWDeviceContext *device_ctx = (AVHWDeviceContext*)ctx->hwdevice->data; AVCUDADeviceContext *device_hwctx = device_ctx->hwctx; CUcontext dummy, cuda_ctx = device_hwctx->cuda_ctx; CUVIDSOURCEDATAPACKET seq_pkt = { 0 }; int ret; ctx->e... |
0 | void ff_avg_h264_qpel8_mc00_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride){ avg_width8_msa(src, stride, dst, stride, 8);} |
0 | static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet){ TiffEncoderContext *s = avctx->priv_data; const AVFrame *const p = pict; int i; uint8_t *ptr; uint8_t *offset; uint32_t strips; uint32_t *strip_sizes = NULL; uint32_t *strip_offsets = NULL; int bytes_per_row; uint32_t r... |
1 | static int parse_key(DBEContext *s){ int key = 0; if (s->key_present && s->input_size > 0) key = AV_RB24(s->input) >> 24 - s->word_bits; skip_input(s, s->key_present); return key;} |
1 | static int vaapi_encode_issue(AVCodecContext *avctx, VAAPIEncodePicture *pic){ VAAPIEncodeContext *ctx = avctx->priv_data; VAAPIEncodeSlice *slice; VAStatus vas; int err, i; char data[MAX_PARAM_BUFFER_SIZE]; size_t bit_len; av_log(avctx, AV_LOG_DEBUG, "Issuing encode for pic %"PRId64"/%"PRId64" " "as type %s.\n", pic->... |
1 | static void pc_q35_machine_options(MachineClass *m){ m->family = "pc_q35"; m->desc = "Standard PC (Q35 + ICH9, 2009)"; m->hot_add_cpu = pc_hot_add_cpu; m->units_per_default_bus = 1; m->default_machine_opts = "firmware=bios-256k.bin"; m->default_display = "std"; m->no_floppy = 1;} |
1 | static int check_protocol_support(bool *has_ipv4, bool *has_ipv6){ struct sockaddr_in sin = { .sin_family = AF_INET, .sin_addr = { .s_addr = htonl(INADDR_LOOPBACK) }, }; struct sockaddr_in6 sin6 = { .sin6_family = AF_INET6, .sin6_addr = IN6ADDR_LOOPBACK_INIT, }; if (check_bind((struct sockaddr *)&sin, sizeof(sin), has_... |
1 | static inline void RENAME(rgb24to32)(const uint8_t *src,uint8_t *dst,unsigned src_size){ uint8_t *dest = dst; const uint8_t *s = src; const uint8_t *end;#ifdef HAVE_MMX const uint8_t *mm_end;#endif end = s + src_size;#ifdef HAVE_MMX __asm __volatile(PREFETCH"%0"::"m"(*s):"memory"); mm_end = end - 23; __asm __volatile("... |
1 | static int encode_picture(MpegEncContext *s, int picture_number){ int i, ret; int bits; int context_count = s->slice_context_count; s->picture_number = picture_number; /* Reset the average MB variance */ s->me.mb_var_sum_temp = s->me.mc_mb_var_sum_temp = 0; /* we need to initialize some time vars before we can encode b... |
1 | static inline int compare_masked(uint64_t x, uint64_t y, uint64_t mask){ return (x & mask) == (y & mask);} |
1 | static int asf_build_simple_index(AVFormatContext *s, int stream_index){ ff_asf_guid g; ASFContext *asf = s->priv_data; int64_t current_pos = avio_tell(s->pb); int64_t ret; if((ret = avio_seek(s->pb, asf->data_object_offset + asf->data_object_size, SEEK_SET)) < 0) { return ret; if ((ret = ff_get_guid(s->pb, &g)) < 0) /... |
1 | static void ppc_cpu_initfn(Object *obj){ CPUState *cs = CPU(obj); PowerPCCPU *cpu = POWERPC_CPU(obj); PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu); CPUPPCState *env = &cpu->env; cs->env_ptr = env; cpu_exec_init(env, &error_abort); cpu->cpu_dt_id = cs->cpu_index; env->msr_mask = pcc->msr_mask; env->mmu_model = pcc-... |
1 | static void vhost_user_cleanup(NetClientState *nc){ VhostUserState *s = DO_UPCAST(VhostUserState, nc, nc); if (s->vhost_net) { vhost_net_cleanup(s->vhost_net); g_free(s->vhost_net); s->vhost_net = NULL; if (nc->queue_index == 0) { qemu_chr_fe_deinit(&s->chr, true); qemu_purge_queued_packets(nc); |
1 | int av_base64_decode(uint8_t *out, const char *in, int out_size){ int i, v; uint8_t *dst = out; v = 0; for (i = 0; in[i] && in[i] != '='; i++) { unsigned int index= in[i]-43; if (index>=FF_ARRAY_ELEMS(map2) || map2[index] == 0xff) return -1; v = (v << 6) + map2[index]; if (i & 3) { if (dst - out < out_size) { *dst++ = ... |
1 | static int process_input(int file_index){ InputFile *ifile = input_files[file_index]; AVFormatContext *is; InputStream *ist; AVPacket pkt; int ret, i, j; is = ifile->ctx; ret = get_input_packet(ifile, &pkt); if (ret == AVERROR(EAGAIN)) { ifile->eagain = 1; return ret; } if (ret < 0) { if (ret != AVERROR_EOF) { print_er... |
1 | void visit_type_int8(Visitor *v, int8_t *obj, const char *name, Error **errp){ int64_t value; if (!error_is_set(errp)) { if (v->type_int8) { v->type_int8(v, obj, name, errp); } else { value = *obj; v->type_int(v, &value, name, errp); if (value < INT8_MIN || value > INT8_MAX) { error_set(errp, QERR_INVALID_PARAMETER_VAL... |
0 | static void roq_encode_video(RoqContext *enc){ RoqTempdata *tempData = enc->tmpData; int i; memset(tempData, 0, sizeof(*tempData)); create_cel_evals(enc, tempData); generate_new_codebooks(enc, tempData); if (enc->framesSinceKeyframe >= 1) { motion_search(enc, 8); motion_search(enc, 4); } retry_encode: for (i=0; i<enc->... |
1 | static int packet_alloc(AVBufferRef **buf, int size){ int ret; if ((unsigned)size >= (unsigned)size + AV_INPUT_BUFFER_PADDING_SIZE) return AVERROR(EINVAL); ret = av_buffer_realloc(buf, size + AV_INPUT_BUFFER_PADDING_SIZE); if (ret < 0) return ret; memset((*buf)->data + size, 0, AV_INPUT_BUFFER_PADDING_SIZE); return 0;} |
0 | static void m4sl_cb(MpegTSFilter *filter, const uint8_t *section, int section_len){ MpegTSContext *ts = filter->u.section_filter.opaque; MpegTSSectionFilter *tssf = &filter->u.section_filter; SectionHeader h; const uint8_t *p, *p_end; AVIOContext pb; int mp4_descr_count = 0; Mp4Descr mp4_descr[MAX_MP4_DESCR_COUNT] = { ... |
0 | static int ffat_encode(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr){ ATDecodeContext *at = avctx->priv_data; OSStatus ret; AudioBufferList out_buffers = { .mNumberBuffers = 1, .mBuffers = { { .mNumberChannels = avctx->channels, .mDataByteSize = at->pkt_size, } } }; AudioStreamPacke... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.