label int64 0 1 | func stringlengths 21 96.3k |
|---|---|
0 | static int read_decoding_params(MLPDecodeContext *m, GetBitContext *gbp, unsigned int substr){ SubStream *s = &m->substream[substr]; unsigned int ch; if (s->param_presence_flags & PARAM_PRESENCE) if (get_bits1(gbp)) s->param_presence_flags = get_bits(gbp, 8); if (s->param_presence_flags & PARAM_BLOCKSIZE) if (get_bits1... |
0 | static uint64_t pxa2xx_pic_mem_read(void *opaque, hwaddr offset, unsigned size){ PXA2xxPICState *s = (PXA2xxPICState *) opaque; switch (offset) { case ICIP:/* IRQ Pending register */ return s->int_pending[0] & ~s->is_fiq[0] & s->int_enabled[0]; case ICIP2:/* IRQ Pending register 2 */ return s->int_pending[1] & ~s->is_f... |
0 | static inline void gen_op_addl_A0_seg(DisasContext *s, int reg){ tcg_gen_ld_tl(cpu_tmp0, cpu_env, offsetof(CPUX86State, segs[reg].base)); if (CODE64(s)) { tcg_gen_ext32u_tl(cpu_A0, cpu_A0); tcg_gen_add_tl(cpu_A0, cpu_A0, cpu_tmp0); } else { tcg_gen_add_tl(cpu_A0, cpu_A0, cpu_tmp0); tcg_gen_ext32u_tl(cpu_A0, cpu_A0); }} |
0 | void vm_start(void){ if (!vm_running) { cpu_enable_ticks(); vm_running = 1; vm_state_notify(1, 0); qemu_rearm_alarm_timer(alarm_timer); resume_all_vcpus(); }} |
0 | static int raw_pread(BlockDriverState *bs, int64_t offset, uint8_t *buf, int count){ BDRVRawState *s = bs->opaque; int size, ret, shift, sum; sum = 0; if (s->aligned_buf != NULL) { if (offset & 0x1ff) { /* align offset on a 512 bytes boundary */ shift = offset & 0x1ff; size = (shift + count + 0x1ff) & ~0x1ff; if (size ... |
0 | address_space_translate_internal(AddressSpaceDispatch *d, hwaddr addr, hwaddr *xlat, hwaddr *plen, bool resolve_subpage){ MemoryRegionSection *section; Int128 diff, diff_page; section = address_space_lookup_region(d, addr, resolve_subpage); /* Compute offset within MemoryRegionSection */ addr -= section->offset_within_... |
0 | void checkasm_report(const char *name, ...){ static int prev_checked, prev_failed, max_length; if (state.num_checked > prev_checked) { print_cpu_name(); if (*name) { int pad_length = max_length; va_list arg; fprintf(stderr, " - "); va_start(arg, name); pad_length -= vfprintf(stderr, name, arg); va_end(arg); fprintf(std... |
0 | static int rtp_new_av_stream(HTTPContext *c, int stream_index, struct sockaddr_in *dest_addr, HTTPContext *rtsp_c){ AVFormatContext *ctx; AVStream *st; char *ipaddr; URLContext *h = NULL; uint8_t *dummy_buf; int max_packet_size; /* now we can open the relevant output stream */ ctx = avformat_alloc_context(); if (!ctx) ... |
0 | float32 HELPER(ucf64_muls)(float32 a, float32 b, CPUUniCore32State *env){ return float32_mul(a, b, &env->ucf64.fp_status);} |
0 | static void qemu_chr_parse_serial(QemuOpts *opts, ChardevBackend *backend, Error **errp){ const char *device = qemu_opt_get(opts, "path"); if (device == NULL) { error_setg(errp, "chardev: serial/tty: no device path given"); return; } backend->serial = g_new0(ChardevHostdev, 1); backend->serial->device = g_strdup(device... |
0 | static void *rcu_update_perf_test(void *arg){ long long n_updates_local = 0; rcu_register_thread(); *(struct rcu_reader_data **)arg = &rcu_reader; atomic_inc(&nthreadsrunning); while (goflag == GOFLAG_INIT) { g_usleep(1000); } while (goflag == GOFLAG_RUN) { synchronize_rcu(); n_updates_local++; } atomic_add(&n_updates,... |
0 | static int tpm_passthrough_unix_transfer(TPMPassthruState *tpm_pt, const TPMLocality *locty_data){ return tpm_passthrough_unix_tx_bufs(tpm_pt, locty_data->w_buffer.buffer, locty_data->w_offset, locty_data->r_buffer.buffer, locty_data->r_buffer.size);} |
0 | static void lsi_transfer_data(SCSIRequest *req, uint32_t len){ LSIState *s = DO_UPCAST(LSIState, dev.qdev, req->bus->qbus.parent); int out; if (s->waiting == 1 || !s->current || req->hba_private != s->current || (lsi_irq_on_rsl(s) && !(s->scntl1 & LSI_SCNTL1_CON))) { if (lsi_queue_req(s, req, len)) { return; } } out = ... |
0 | void tlb_set_page(CPUArchState *env, target_ulong vaddr, hwaddr paddr, int prot, int mmu_idx, target_ulong size){ MemoryRegionSection *section; unsigned int index; target_ulong address; target_ulong code_address; uintptr_t addend; CPUTLBEntry *te; hwaddr iotlb; assert(size >= TARGET_PAGE_SIZE); if (size != TARGET_PAGE_... |
0 | void memory_region_set_address(MemoryRegion *mr, hwaddr addr){ MemoryRegion *parent = mr->parent; int priority = mr->priority; bool may_overlap = mr->may_overlap; if (addr == mr->addr || !parent) { mr->addr = addr; return; } memory_region_transaction_begin(); memory_region_ref(mr); memory_region_del_subregion(parent, m... |
0 | void put_signed_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size){ int i; unsigned char __align8 vector128[8] = { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 }; movq_m2r(*vector128, mm1); for (i = 0; i < 8; i++) { movq_m2r(*(block), mm0); packsswb_m2r(*(block + 4), mm0); block += 8; paddb_r2r(... |
0 | static void gd_mouse_mode_change(Notifier *notify, void *data){ gd_update_cursor(container_of(notify, GtkDisplayState, mouse_mode_notifier), FALSE);} |
0 | static void loop_filter(H264Context *h, int start_x, int end_x){ MpegEncContext * const s = &h->s; uint8_t *dest_y, *dest_cb, *dest_cr; int linesize, uvlinesize, mb_x, mb_y; const int end_mb_y= s->mb_y + FRAME_MBAFF; const int old_slice_type= h->slice_type; const int pixel_shift = h->pixel_shift; if(h->deblocking_filte... |
0 | static int to_integer(char *p, int len){ int ret; char *q = av_malloc(sizeof(char) * len); if (!q) return -1; strncpy(q, p, len); ret = atoi(q); av_free(q); return ret;} |
0 | void checkasm_check_blend(void){ uint8_t *top1 = av_malloc(BUF_SIZE); uint8_t *top2 = av_malloc(BUF_SIZE); uint8_t *bot1 = av_malloc(BUF_SIZE); uint8_t *bot2 = av_malloc(BUF_SIZE); uint8_t *dst1 = av_malloc(BUF_SIZE); uint8_t *dst2 = av_malloc(BUF_SIZE); FilterParams param = { .opacity = 1.0, };#define check_and_report... |
1 | qemu_irq *armv7m_init(int flash_size, int sram_size, const char *kernel_filename, const char *cpu_model){ CPUState *env; DeviceState *nvic; /* FIXME: make this local state. */ static qemu_irq pic[64]; qemu_irq *cpu_pic; uint32_t pc; int image_size; uint64_t entry; uint64_t lowaddr; int i; int big_endian; flash_size *= ... |
1 | static int svq3_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt){ SVQ3Context *svq3 = avctx->priv_data; H264Context *h = &svq3->h; MpegEncContext *s = &h->s; int buf_size = avpkt->size; int m, mb_type, left; uint8_t *buf; /* special case for last picture */ if (buf_size == 0) { if (s->ne... |
1 | int mpeg4_decode_video_packet_header(MpegEncContext *s){ int mb_num_bits= av_log2(s->mb_num - 1) + 1; int header_extension=0, mb_num, len; /* is there enough space left for a video packet + header */ if( get_bits_count(&s->gb) > s->gb.size_in_bits-20) return -1; for(len=0; len<32; len++){ if(get_bits1(&s->gb)) break; }... |
0 | static void opt_video_rc_override_string(char *arg){ video_rc_override_string = arg;} |
1 | av_cold int ff_dvvideo_init(AVCodecContext *avctx){ DVVideoContext *s = avctx->priv_data; DSPContext dsp; static int done = 0; int i, j; if (!done) { VLC dv_vlc; uint16_t new_dv_vlc_bits[NB_DV_VLC*2]; uint8_t new_dv_vlc_len[NB_DV_VLC*2]; uint8_t new_dv_vlc_run[NB_DV_VLC*2]; int16_t new_dv_vlc_level[NB_DV_VLC*2]; done =... |
1 | static inline void RENAME(hyscale)(uint16_t *dst, int dstWidth, uint8_t *src, int srcW, int xInc, int flags, int canMMX2BeUsed, int16_t *hLumFilter, int16_t *hLumFilterPos, int hLumFilterSize, void *funnyYCode, int srcFormat, uint8_t *formatConvBuffer){ if(srcFormat==IMGFMT_YUY2) {RENAME(yuy2ToY)(formatConvBuffer, src,... |
1 | int32 float128_to_int32_round_to_zero( float128 a STATUS_PARAM ){ flag aSign; int32 aExp, shiftCount; uint64_t aSig0, aSig1, savedASig; int32 z; aSig1 = extractFloat128Frac1( a ); aSig0 = extractFloat128Frac0( a ); aExp = extractFloat128Exp( a ); aSign = extractFloat128Sign( a ); aSig0 |= ( aSig1 != 0 ); if ( 0x401E < ... |
1 | static int decode_ihdr_chunk(AVCodecContext *avctx, PNGDecContext *s, uint32_t length){ if (length != 13) return AVERROR_INVALIDDATA; if (s->state & PNG_IDAT) { av_log(avctx, AV_LOG_ERROR, "IHDR after IDAT\n"); return AVERROR_INVALIDDATA; if (s->state & PNG_IHDR) { av_log(avctx, AV_LOG_ERROR, "Multiple IHDR\n"); return... |
1 | int page_unprotect(target_ulong address, uintptr_t pc){ unsigned int prot; bool current_tb_invalidated; PageDesc *p; target_ulong host_start, host_end, addr; /* Technically this isn't safe inside a signal handler. However we know this only ever happens in a synchronous SEGV handler, so in practice it seems to be ok. */... |
1 | static void v9fs_readlink(void *opaque){ V9fsPDU *pdu = opaque; size_t offset = 7; V9fsString target; int32_t fid; int err = 0; V9fsFidState *fidp; pdu_unmarshal(pdu, offset, "d", &fid); fidp = get_fid(pdu, fid); if (fidp == NULL) { err = -ENOENT; goto out_nofid; } v9fs_string_init(&target); err = v9fs_co_readlink(pdu,... |
1 | int kvm_init(MachineClass *mc){ static const char upgrade_note[] = "Please upgrade to at least kernel 2.6.29 or recent kvm-kmod\n" "(see http://sourceforge.net/projects/kvm).\n"; struct { const char *name; int num; } num_cpus[] = { { "SMP", smp_cpus }, { "hotpluggable", max_cpus }, { NULL, } }, *nc = num_cpus; int soft... |
1 | static void openpic_msi_write(void *opaque, hwaddr addr, uint64_t val, unsigned size){ OpenPICState *opp = opaque; int idx = opp->irq_msi; int srs, ibs; DPRINTF("%s: addr " TARGET_FMT_plx " <= %08x\n", __func__, addr, val); if (addr & 0xF) { return; } switch (addr) { case MSIIR_OFFSET: srs = val >> MSIIR_SRS_SHIFT; idx... |
1 | static int eval_refl(const int16_t *coefs, int *refl, RA144Context *ractx){ int retval = 0; int b, c, i; unsigned int u; int buffer1[10]; int buffer2[10]; int *bp1 = buffer1; int *bp2 = buffer2; for (i=0; i < 10; i++) buffer2[i] = coefs[i]; u = refl[9] = bp2[9]; if (u + 0x1000 > 0x1fff) { av_log(ractx, AV_LOG_ERROR, "O... |
1 | static void vfio_disable_interrupts(VFIOPCIDevice *vdev){ switch (vdev->interrupt) { case VFIO_INT_INTx: vfio_disable_intx(vdev); break; case VFIO_INT_MSI: vfio_disable_msi(vdev); break; case VFIO_INT_MSIX: vfio_disable_msix(vdev); break; }} |
1 | static inline int get_ue_code(GetBitContext *gb, int order){ if (order) { int ret = get_ue_golomb(gb) << order; return ret + get_bits(gb, order); } return get_ue_golomb(gb);} |
1 | int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples){ int i, nb_samples1; short *bufin[2]; short *bufout[2]; short *buftmp2[2], *buftmp3[2]; short *output_bak = NULL; int lenout; if (s->input_channels == s->output_channels && s->ratio == 1.0 && 0) { /* nothing to do */ memcpy(output, inpu... |
1 | int ff_h264_decode_extradata(H264Context *h){ AVCodecContext *avctx = h->s.avctx; if (avctx->extradata[0] == 1) { int i, cnt, nalsize; unsigned char *p = avctx->extradata; h->is_avc = 1; if (avctx->extradata_size < 7) { av_log(avctx, AV_LOG_ERROR, "avcC too short\n"); return -1; } /* sps and pps in the avcC always have... |
1 | void video_encode_example(const char *filename){ AVCodec *codec; AVCodecContext *c= NULL; int i, out_size, size, x, y, outbuf_size; FILE *f; AVFrame *picture; uint8_t *outbuf, *picture_buf; printf("Video encoding\n"); /* find the mpeg1 video encoder */ codec = avcodec_find_encoder(CODEC_ID_MPEG1VIDEO); if (!codec) { fp... |
1 | static void socket_outgoing_migration(Object *src, Error *err, gpointer opaque){ MigrationState *s = opaque; QIOChannel *sioc = QIO_CHANNEL(src); if (err) { trace_migration_socket_outgoing_error(error_get_pretty(err)); s->to_dst_file = NULL; migrate_fd_error(s, err); } else { trace_migration_socket_outgoing_connected()... |
1 | static void apic_common_class_init(ObjectClass *klass, void *data){ ICCDeviceClass *idc = ICC_DEVICE_CLASS(klass); DeviceClass *dc = DEVICE_CLASS(klass); dc->vmsd = &vmstate_apic_common; dc->reset = apic_reset_common; dc->no_user = 1; dc->props = apic_properties_common; idc->init = apic_init_common;} |
1 | static void do_unassigned_access(target_ulong addr, int is_write, int is_exec, int is_asi, int size)#elsevoid do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec, int is_asi, int size)#endif{ CPUState *saved_env; /* XXX: hack to restore env in all cases, even if not called from generated code */ sav... |
1 | int qemu_fsdev_add(QemuOpts *opts){ int i; struct FsDriverListEntry *fsle; const char *fsdev_id = qemu_opts_id(opts); const char *fsdriver = qemu_opt_get(opts, "fsdriver"); const char *writeout = qemu_opt_get(opts, "writeout"); bool ro = qemu_opt_get_bool(opts, "readonly", 0); if (!fsdev_id) { fprintf(stderr, "fsdev: N... |
1 | void OPPROTO op_set_Rc0 (void){ env->crf[0] = T0 | xer_ov; RETURN();} |
1 | static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt){ AVStream *st; int len, ret; for(;;) { /* select current input stream component */ st = s->cur_st; if (st) { if (!st->parser) { /* no parsing needed: we just output the packet as is */ /* raw data support */ *pkt = s->cur_pkt; compute_pkt_fields(s, st... |
1 | static void monitor_data_destroy(Monitor *mon){ QDECREF(mon->outbuf); qemu_mutex_destroy(&mon->out_lock); |
1 | static void qio_channel_websock_encode(QIOChannelWebsock *ioc){ size_t header_size; union { char buf[QIO_CHANNEL_WEBSOCK_HEADER_LEN_64_BIT]; QIOChannelWebsockHeader ws; } header; if (!ioc->rawoutput.offset) { return; } header.ws.b0 = (1 << QIO_CHANNEL_WEBSOCK_HEADER_SHIFT_FIN) | (QIO_CHANNEL_WEBSOCK_OPCODE_BINARY_FRAME... |
1 | static void process_frame(AVFilterLink *inlink, AVFilterBufferRef *buf){ AVFilterContext *ctx = inlink->dst; ConcatContext *cat = ctx->priv; unsigned in_no = FF_INLINK_IDX(inlink); if (in_no < cat->cur_idx) { av_log(ctx, AV_LOG_ERROR, "Frame after EOF on input %s\n", ctx->input_pads[in_no].name); avfilter_unref_buffer(... |
1 | static int make_ydt15_entry(int p2, int p1, int16_t *ydt)#elsestatic int make_ydt15_entry(int p1, int p2, int16_t *ydt)#endif{ int lo, hi; lo = ydt[p1]; lo += (lo * 32) + (lo * 1024); hi = ydt[p2]; hi += (hi * 32) + (hi * 1024); return (lo + (hi * (1 << 16))) * 2;} |
1 | static void coroutine_fn v9fs_xattrwalk(void *opaque){ int64_t size; V9fsString name; ssize_t err = 0; size_t offset = 7; int32_t fid, newfid; V9fsFidState *file_fidp; V9fsFidState *xattr_fidp = NULL; V9fsPDU *pdu = opaque; V9fsState *s = pdu->s; v9fs_string_init(&name); err = pdu_unmarshal(pdu, offset, "dds", &fid, &n... |
1 | static void gen_slbmfev(DisasContext *ctx){#if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_REG);#else if (unlikely(ctx->pr)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_REG); return; } gen_helper_load_slb_vsid(cpu_gpr[rS(ctx->opcode)], cpu_env, cpu_gpr[rB(ctx->opcode)]);#endif} |
1 | void vga_common_init(VGACommonState *s, Object *obj, bool global_vmstate){ int i, j, v, b; for(i = 0;i < 256; i++) { v = 0; for(j = 0; j < 8; j++) { v |= ((i >> j) & 1) << (j * 4); } expand4[i] = v; v = 0; for(j = 0; j < 4; j++) { v |= ((i >> (2 * j)) & 3) << (j * 4); } expand2[i] = v; } for(i = 0; i < 16; i++) { v = 0... |
1 | static void dss_sp_scale_vector(int32_t *vec, int bits, int size){ int i; if (bits < 0) for (i = 0; i < size; i++) vec[i] = vec[i] >> -bits; else for (i = 0; i < size; i++) vec[i] = vec[i] << bits;} |
1 | void OPPROTO op_store_msr (void){ do_store_msr(env, T0); RETURN();} |
1 | static void rac_normalise(RangeCoder *c){ for (;;) { c->range <<= 8; c->low <<= 8; if (c->src < c->src_end) { c->low |= *c->src++; } else if (!c->low) { c->got_error = 1; return; } if (c->range >= RAC_BOTTOM) return; }} |
1 | static int64_t scene_sad16(FrameRateContext *s, const uint16_t *p1, int p1_linesize, const uint16_t* p2, int p2_linesize, int height){ int64_t sad; int x, y; for (sad = y = 0; y < height; y += 8) { for (x = 0; x < p1_linesize; x += 8) { sad += sad_8x8_16(p1 + y * p1_linesize + x, p1_linesize, p2 + y * p2_linesize + x, ... |
1 | static int hds_write_packet(AVFormatContext *s, AVPacket *pkt){ HDSContext *c = s->priv_data; AVStream *st = s->streams[pkt->stream_index]; OutputStream *os = &c->streams[s->streams[pkt->stream_index]->id]; int64_t end_dts = (os->fragment_index) * c->min_frag_duration; int ret; if (st->first_dts == AV_NOPTS_VALUE) st->... |
0 | static int gif_read_extension(GifState *s){ int ext_code, ext_len, gce_flags, gce_transparent_index; /* There must be at least 2 bytes: * 1 for extension label and 1 for extension length. */ if (bytestream2_get_bytes_left(&s->gb) < 2) return AVERROR_INVALIDDATA; ext_code = bytestream2_get_byteu(&s->gb); ext_len = bytes... |
0 | yuv2rgb_2_c_template(SwsContext *c, const uint16_t *buf0, const uint16_t *buf1, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, const uint16_t *abuf1, uint8_t *dest, int dstW, int yalpha, int uvalpha, int y, enum PixelFormat target, int hasAlpha){ int y... |
0 | static inline void mix_3f_to_stereo(AC3DecodeContext *ctx){ int i; float (*output)[256] = ctx->audio_block.block_output; for (i = 0; i < 256; i++) { output[1][i] += output[2][i]; output[2][i] += output[3][i]; } memset(output[3], 0, sizeof(output[3]));} |
0 | static void decode_sigpass(Jpeg2000T1Context *t1, int width, int height, int bpno, int bandno, int bpass_csty_symbol, int vert_causal_ctx_csty_symbol){ int mask = 3 << (bpno - 1), y0, x, y; for (y0 = 0; y0 < height; y0 += 4) for (x = 0; x < width; x++) for (y = y0; y < height && y < y0 + 4; y++) { if ((t1->flags[y+1][x... |
0 | void ff_fix_long_p_mvs(MpegEncContext * s){ const int f_code= s->f_code; int y; UINT8 * fcode_tab= s->fcode_tab; /* clip / convert to intra 16x16 type MVs */ for(y=0; y<s->mb_height; y++){ int x; int xy= (y+1)* (s->mb_width+2)+1; int i= y*s->mb_width; for(x=0; x<s->mb_width; x++){ if(s->mb_type[i]&MB_TYPE_INTER){ if( f... |
0 | static av_cold int pcm_dvd_decode_init(AVCodecContext *avctx){ PCMDVDContext *s = avctx->priv_data; /* Invalid header to force parsing of the first header */ s->last_header = -1; /* reserve space for 8 channels, 3 bytes/sample, 4 samples/block */ if (!(s->extra_samples = av_malloc(8 * 3 * 4))) return AVERROR(ENOMEM); s... |
0 | void ff_h264_v_lpf_chroma_inter_msa(uint8_t *data, int img_width, int alpha, int beta, int8_t *tc){ uint8_t bs0 = 1; uint8_t bs1 = 1; uint8_t bs2 = 1; uint8_t bs3 = 1; if (tc[0] < 0) bs0 = 0; if (tc[1] < 0) bs1 = 0; if (tc[2] < 0) bs2 = 0; if (tc[3] < 0) bs3 = 0; avc_loopfilter_cb_or_cr_inter_edge_hor_msa(data, bs0, bs... |
0 | static AVFrame *get_palette_frame(AVFilterContext *ctx){ AVFrame *out; PaletteGenContext *s = ctx->priv; AVFilterLink *outlink = ctx->outputs[0]; double ratio; int box_id = 0; struct range_box *box; /* reference only the used colors from histogram */ s->refs = load_color_refs(s->histogram, s->nb_refs); if (!s->refs) { ... |
1 | static void sun4uv_init(MemoryRegion *address_space_mem, MachineState *machine, const struct hwdef *hwdef){ SPARCCPU *cpu; M48t59State *nvram; unsigned int i; uint64_t initrd_addr, initrd_size, kernel_addr, kernel_size, kernel_entry; PCIBus *pci_bus, *pci_bus2, *pci_bus3; ISABus *isa_bus; qemu_irq *ivec_irqs, *pbm_irqs... |
1 | static int dss_read_metadata_date(AVFormatContext *s, unsigned int offset, const char *key){ AVIOContext *pb = s->pb; char datetime[64], string[DSS_TIME_SIZE + 1] = { 0 }; int y, month, d, h, minute, sec; int ret; avio_seek(pb, offset, SEEK_SET); ret = avio_read(s->pb, string, DSS_TIME_SIZE); if (ret < DSS_TIME_SIZE) r... |
1 | static void fdctrl_start_transfer(FDCtrl *fdctrl, int direction){ FDrive *cur_drv; uint8_t kh, kt, ks; SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK); cur_drv = get_cur_drv(fdctrl); kt = fdctrl->fifo[2]; kh = fdctrl->fifo[3]; ks = fdctrl->fifo[4]; FLOPPY_DPRINTF("Start transfer at %d %d %02x %02x (%d)\n", GET_CU... |
1 | static int mxf_write_footer(AVFormatContext *s){ MXFContext *mxf = s->priv_data; AVIOContext *pb = s->pb; int err = 0; mxf->duration = mxf->last_indexed_edit_unit + mxf->edit_units_count; mxf_write_klv_fill(s); mxf->footer_partition_offset = avio_tell(pb); if (mxf->edit_unit_byte_count && s->oformat != &ff_mxf_opatom_m... |
1 | static int inet_listen_saddr(InetSocketAddress *saddr, int port_offset, bool update_addr, Error **errp){ struct addrinfo ai,*res,*e; char port[33]; char uaddr[INET6_ADDRSTRLEN+1]; char uport[33]; int rc, port_min, port_max, p; int slisten = 0; int saved_errno = 0; bool socket_created = false; Error *err = NULL; memset(... |
0 | static void *circular_buffer_task( void *_URLContext){ URLContext *h = _URLContext; UDPContext *s = h->priv_data; int old_cancelstate; pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old_cancelstate); ff_socket_nonblock(s->udp_fd, 0); while(1) { int left; int len; /* How much do we have left to the end of the buffer */... |
0 | static void FUNCC(pred8x8l_horizontal)(uint8_t *_src, int has_topleft, int has_topright, int _stride){ pixel *src = (pixel*)_src; int stride = _stride/sizeof(pixel); PREDICT_8x8_LOAD_LEFT;#define ROW(y) ((pixel4*)(src+y*stride))[0] =\ ((pixel4*)(src+y*stride))[1] = PIXEL_SPLAT_X4(l##y) ROW(0); ROW(1); ROW(2); ROW(3); R... |
0 | static int g726_init(AVCodecContext * avctx){ AVG726Context* c = (AVG726Context*)avctx->priv_data; if (avctx->sample_rate != 8000 || avctx->channels != 1 || (avctx->bit_rate != 16000 && avctx->bit_rate != 24000 && avctx->bit_rate != 32000 && avctx->bit_rate != 40000)) { av_log(avctx, AV_LOG_ERROR, "G726: unsupported au... |
0 | static int decode_user_data(Mpeg4DecContext *ctx, GetBitContext *gb){ MpegEncContext *s = &ctx->m; char buf[256]; int i; int e; int ver = 0, build = 0, ver2 = 0, ver3 = 0; char last; for (i = 0; i < 255 && get_bits_count(gb) < gb->size_in_bits; i++) { if (show_bits(gb, 23) == 0) break; buf[i] = get_bits(gb, 8); } buf[i... |
0 | int ff_get_wav_header(AVFormatContext *s, AVIOContext *pb, AVCodecContext *codec, int size){ int id; if (size < 14) return AVERROR_INVALIDDATA; id = avio_rl16(pb); codec->codec_type = AVMEDIA_TYPE_AUDIO; codec->channels = avio_rl16(pb); codec->sample_rate = avio_rl32(pb); codec->bit_rate = avio_rl32(pb) * 8; codec->blo... |
0 | static int mkv_write_packet_internal(AVFormatContext *s, AVPacket *pkt, int add_cue){ MatroskaMuxContext *mkv = s->priv_data; AVIOContext *pb = s->pb; AVCodecParameters *par = s->streams[pkt->stream_index]->codecpar; int keyframe = !!(pkt->flags & AV_PKT_FLAG_KEY); int duration = pkt->duration; int ret; int64_t ts = mk... |
0 | static av_cold int XAVS_init(AVCodecContext *avctx){ XavsContext *x4 = avctx->priv_data; x4->sei_size = 0; xavs_param_default(&x4->params); x4->params.pf_log = XAVS_log; x4->params.p_log_private = avctx; x4->params.i_keyint_max = avctx->gop_size; if (avctx->bit_rate) { x4->params.rc.i_bitrate = avctx->bit_rate / 1000; ... |
0 | static int film_read_close(AVFormatContext *s){ FilmDemuxContext *film = s->priv_data; av_freep(&film->sample_table); av_freep(&film->stereo_buffer); return 0;} |
0 | static av_cold int png_enc_close(AVCodecContext *avctx){ av_frame_free(&avctx->coded_frame); return 0;} |
1 | int opt_opencl_bench(void *optctx, const char *opt, const char *arg){ int i, j, nb_devices = 0, count = 0; int64_t score = 0; AVOpenCLDeviceList *device_list; AVOpenCLDeviceNode *device_node = NULL; OpenCLDeviceBenchmark *devices = NULL; cl_platform_id platform; av_opencl_get_device_list(&device_list); for (i = 0; i < ... |
1 | void ppc_tlb_invalidate_one (CPUPPCState *env, target_ulong addr){#if !defined(FLUSH_ALL_TLBS) addr &= TARGET_PAGE_MASK; switch (env->mmu_model) { case POWERPC_MMU_SOFT_6xx: case POWERPC_MMU_SOFT_74xx: ppc6xx_tlb_invalidate_virt(env, addr, 0); if (env->id_tlbs == 1) ppc6xx_tlb_invalidate_virt(env, addr, 1); break; case... |
1 | static void test_visitor_in_fail_list(TestInputVisitorData *data, const void *unused){ int64_t i64 = -1; Error *err = NULL; Visitor *v; /* Unvisited list tail */ v = visitor_input_test_init(data, "[ 1, 2, 3 ]"); visit_type_int(v, NULL, &i64, &error_abort); g_assert_cmpint(i64, ==, 1); visit_type_int(v, NULL, &i64, &err... |
1 | int stpcifc_service_call(S390CPU *cpu, uint8_t r1, uint64_t fiba, uint8_t ar){ CPUS390XState *env = &cpu->env; uint32_t fh; ZpciFib fib; S390PCIBusDevice *pbdev; uint32_t data; uint64_t cc = ZPCI_PCI_LS_OK; if (env->psw.mask & PSW_MASK_PSTATE) { program_interrupt(env, PGM_PRIVILEGED, 6); return 0; } fh = env->regs[r1] ... |
1 | static void mips_cpu_initfn(Object *obj){ CPUState *cs = CPU(obj); MIPSCPU *cpu = MIPS_CPU(obj); CPUMIPSState *env = &cpu->env; cs->env_ptr = env; cpu_exec_init(cs, &error_abort); if (tcg_enabled()) { mips_tcg_init(); }} |
1 | static av_cold int omx_try_load(OMXContext *s, void *logctx, const char *libname, const char *prefix){ s->lib = dlopen(libname, RTLD_NOW | RTLD_GLOBAL); if (!s->lib) { av_log(logctx, AV_LOG_WARNING, "%s not found\n", libname); return AVERROR_ENCODER_NOT_FOUND; } s->ptr_Init = dlsym_prefixed(s->lib, "OMX_Init", prefix);... |
1 | static void encode_cblk(Jpeg2000EncoderContext *s, Jpeg2000T1Context *t1, Jpeg2000Cblk *cblk, Jpeg2000Tile *tile, int width, int height, int bandpos, int lev){ int pass_t = 2, passno, x, y, max=0, nmsedec, bpno; int64_t wmsedec = 0; memset(t1->flags, 0, t1->stride * (height + 2) * sizeof(*t1->flags)); for (y = 0; y < h... |
1 | static void gic_dist_writeb(void *opaque, hwaddr offset, uint32_t value, MemTxAttrs attrs){ GICState *s = (GICState *)opaque; int irq; int i; int cpu; cpu = gic_get_current_cpu(s); if (offset < 0x100) { if (offset == 0) { if (s->security_extn && !attrs.secure) { /* NS version is just an alias of the S version's bit 1 *... |
1 | static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt){ GifState *s = avctx->priv_data; AVFrame *picture = data; int ret; bytestream2_init(&s->gb, avpkt->data, avpkt->size); s->picture.pts = avpkt->pts; s->picture.pkt_pts = avpkt->pts; s->picture.pkt_dts = avpkt->dts; s->picture... |
1 | static GSList *gd_vc_init(GtkDisplayState *s, VirtualConsole *vc, int index, GSList *group, GtkWidget *view_menu){#if defined(CONFIG_VTE) const char *label; char buffer[32]; char path[32];#if VTE_CHECK_VERSION(0, 26, 0) VtePty *pty;#endif GIOChannel *chan; GtkWidget *scrolled_window; GtkAdjustment *vadjustment; int mas... |
1 | static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index){ AVPacket out_pkt = { 0 }, flush_pkt = { 0 }; AVStream *st = s->streams[stream_index]; uint8_t *data = pkt ? pkt->data : NULL; int size = pkt ? pkt->size : 0; int ret = 0, got_output = 0; if (!pkt) { av_init_packet(&flush_pkt); pkt = &flush_pk... |
1 | int ff_frame_thread_init(AVCodecContext *avctx){ int thread_count = avctx->thread_count; const AVCodec *codec = avctx->codec; AVCodecContext *src = avctx; FrameThreadContext *fctx; int i, err = 0;#if HAVE_W32THREADS w32thread_init();#endif if (!thread_count) { int nb_cpus = av_cpu_count(); av_log(avctx, AV_LOG_DEBUG, "... |
1 | CPUState *cpu_generic_init(const char *typename, const char *cpu_model){ /* TODO: all callers of cpu_generic_init() need to be converted to * call cpu_parse_features() only once, before calling cpu_generic_init(). */ const char *cpu_type = cpu_parse_cpu_model(typename, cpu_model); if (cpu_type) { return cpu_create(cpu_... |
1 | static int handle_metadata(RTMPContext *rt, RTMPPacket *pkt){ int ret, old_flv_size, type; const uint8_t *next; uint8_t *p; uint32_t size; uint32_t ts, cts, pts = 0; old_flv_size = update_offset(rt, pkt->size); if ((ret = av_reallocp(&rt->flv_data, rt->flv_size)) < 0) { rt->flv_size = rt->flv_off = 0; return ret; } nex... |
1 | static void gen_sub_carry(TCGv dest, TCGv t0, TCGv t1){ TCGv tmp; tcg_gen_sub_i32(dest, t0, t1); tmp = load_cpu_field(CF); tcg_gen_add_i32(dest, dest, tmp); tcg_gen_subi_i32(dest, dest, 1); dead_tmp(tmp);} |
1 | static void gen_dstst(DisasContext *ctx){ if (rA(ctx->opcode) == 0) { gen_inval_exception(ctx, POWERPC_EXCP_INVAL_LSWX); } else { /* interpreted as no-op */ }} |
1 | static MMSSCPacketType get_tcp_server_response(MMSTContext *mmst){ int read_result; MMSSCPacketType packet_type= -1; MMSContext *mms = &mmst->mms; for(;;) { read_result = url_read_complete(mms->mms_hd, mms->in_buffer, 8); if (read_result != 8) { if(read_result < 0) { av_log(NULL, AV_LOG_ERROR, "Error reading packet hea... |
1 | static void invalid_dict_comma(void){ QObject *obj = qobject_from_json("{'abc':32,}", NULL); g_assert(obj == NULL);} |
1 | static void type_initialize(TypeImpl *ti){ TypeImpl *parent; if (ti->class) { return; } ti->class_size = type_class_get_size(ti); ti->instance_size = type_object_get_size(ti); ti->class = g_malloc0(ti->class_size); parent = type_get_parent(ti); if (parent) { type_initialize(parent); GSList *e; int i; g_assert(parent->c... |
1 | static av_cold int decode_close_mp3on4(AVCodecContext * avctx){ MP3On4DecodeContext *s = avctx->priv_data; int i; for (i = 0; i < s->frames; i++) av_freep(&s->mp3decctx[i]); return 0;} |
1 | static inline void encode_vlc_codeword(PutBitContext *pb, unsigned codebook, int val){ unsigned int rice_order, exp_order, switch_bits, switch_val; int exponent; /* number of prefix bits to switch between Rice and expGolomb */ switch_bits = (codebook & 3) + 1; rice_order = codebook >> 5; /* rice code order */ exp_order... |
1 | static int decoder_decode_frame(Decoder *d, void *fframe) { int got_frame = 0; AVFrame *frame = fframe; d->flushed = 0; do { int ret = -1; if (d->queue->abort_request) return -1; if (!d->packet_pending || d->queue->serial != d->pkt_serial) { AVPacket pkt; do { if (d->queue->nb_packets == 0) SDL_CondSignal(d->empty_queu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.