project
stringclasses
2 values
commit_id
stringlengths
40
40
target
int64
0
1
func
stringlengths
26
142k
idx
int64
0
27.3k
qemu
57285302af51a8bae334c03e1f8243e935373953
1
static int spapr_vty_init(VIOsPAPRDevice *sdev) { VIOsPAPRVTYDevice *dev = (VIOsPAPRVTYDevice *)sdev; qemu_chr_add_handlers(dev->chardev, vty_can_receive, vty_receive, NULL, dev); return 0;
22,496
qemu
c3a699be3c63f75b6ea5877080ea9b96b37524c4
1
static void exynos4210_ltick_recalc_count(struct tick_timer *s) { uint64_t to_count; if ((s->cnt_run && s->last_tcnto) || (s->int_run && s->last_icnto)) { /* * one or both timers run and not counted to the end; * distance is not passed, recalculate with last_tcnto * last_icnto ...
22,497
qemu
d3c8c67469ee70fcae116d5abc277a7ebc8a19fd
1
static void mirror_start_job(const char *job_id, BlockDriverState *bs, int creation_flags, BlockDriverState *target, const char *replaces, int64_t speed, uint32_t granularity, int64_t buf_size, BlockM...
22,498
FFmpeg
b6eaae39b4913db81d9e3d0ad6a2f6261757d83d
1
static int asf_read_packet(AVFormatContext *s, AVPacket *pkt) { ASFContext *asf = s->priv_data; ASFStream *asf_st = 0; ByteIOContext *pb = &s->pb; //static int pc = 0; for (;;) { int rsize = 0; if (asf->packet_size_left < FRAME_HEADER_SIZE || asf->packet_segments...
22,499
FFmpeg
1ec83d9a9e472f485897ac92bad9631d551a8c5b
0
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; TiffContext *const s = avctx->priv_data; AVFrame *picture = data; AVFrame *const p = &s->picture; const uint...
22,500
FFmpeg
5688fd77b57f1dd454990dc6fe48c6a3a1729eca
0
void ff_limiter_init_x86(LimiterDSPContext *dsp, int bpp) { int cpu_flags = av_get_cpu_flags(); if (ARCH_X86_64 && EXTERNAL_SSE2(cpu_flags)) { if (bpp <= 8) { dsp->limiter = ff_limiter_8bit_sse2; } } if (ARCH_X86_64 && EXTERNAL_SSE4(cpu_flags)) { if (bpp > ...
22,501
qemu
afd9096eb1882f23929f5b5c177898ed231bac66
1
void *virtqueue_pop(VirtQueue *vq, size_t sz) { unsigned int i, head, max; hwaddr desc_pa = vq->vring.desc; VirtIODevice *vdev = vq->vdev; VirtQueueElement *elem; unsigned out_num, in_num; hwaddr addr[VIRTQUEUE_MAX_SIZE]; struct iovec iov[VIRTQUEUE_MAX_SIZE]; VRingDesc desc; if (virt...
22,502
qemu
788cf9f8c8cbda53843e060540f3e91a060eb744
1
static int img_open_password(BlockBackend *blk, const char *filename, int flags, bool quiet) { BlockDriverState *bs; char password[256]; bs = blk_bs(blk); if (bdrv_is_encrypted(bs) && bdrv_key_required(bs) && !(flags & BDRV_O_NO_IO)) { qprintf(quiet...
22,504
FFmpeg
f19af812a32c1398d48c3550d11dbc6aafbb2bfc
1
static void dump(unsigned char *buf,size_t len) { int i; for(i=0;i<len;i++) { if ((i&15)==0) printf("%04x ",i); printf("%02x ",buf[i]); if ((i&15)==15) printf("\n"); } printf("\n"); }
22,505
FFmpeg
74e4948235bc8f8946eeca20525258bbf383f75d
1
static int hls_decode_entry_wpp(AVCodecContext *avctxt, void *input_ctb_row, int job, int self_id) { HEVCContext *s1 = avctxt->priv_data, *s; HEVCLocalContext *lc; int ctb_size = 1<< s1->ps.sps->log2_ctb_size; int more_data = 1; int *ctb_row_p = input_ctb_row; int ctb_row = ctb_r...
22,506
FFmpeg
5afe1d27912be9b643ffb4ddc21f6d920260dbb0
1
static int mpegts_raw_read_packet(AVFormatContext *s, AVPacket *pkt) { MpegTSContext *ts = s->priv_data; int ret, i; int64_t pcr_h, next_pcr_h, pos; int pcr_l, next_pcr_l; uint8_t pcr_buf[12]; uint8_t *data; if (av_new_packet(pkt, TS_PACKET_SIZE) ...
22,508
FFmpeg
90540c2d5ace46a1e9789c75fde0b1f7dbb12a9b
1
static inline void RENAME(rgb24tobgr16)(const uint8_t *src, uint8_t *dst, int src_size) { const uint8_t *s = src; const uint8_t *end; const uint8_t *mm_end; uint16_t *d = (uint16_t *)dst; end = s + src_size; __asm__ volatile(PREFETCH" %0"::"m"(*src):"memory"); __asm__ volatile( ...
22,509
qemu
9b2fadda3e0196ffd485adde4fe9cdd6fae35300
1
static void gen_mfdcrx(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; } /* NIP cannot be restored if the memory exception comes from an he...
22,510
FFmpeg
e1c48b7aaedc5deb6f22ced02dfe4f356bf3f421
0
static void png_save2(const char *filename, uint32_t *bitmap, int w, int h) { int x, y, v; FILE *f; char fname[40], fname2[40]; char command[1024]; snprintf(fname, 40, "%s.ppm", filename); f = fopen(fname, "w"); if (!f) { perror(fname); exit(1); } fpri...
22,512
FFmpeg
af1e8ffdad4ae0a6d73e8d26d5893739e3c7a389
0
static int spdif_write_packet(struct AVFormatContext *s, AVPacket *pkt) { IEC61937Context *ctx = s->priv_data; int ret, padding; ctx->out_buf = pkt->data; ctx->out_bytes = pkt->size; ctx->length_code = FFALIGN(pkt->size, 2) << 3; ctx->use_preamble = 1; ctx->extra_bswap = 0; ...
22,513
FFmpeg
1b1bb2c4efc126d74d44d8c421860c85f932ecb1
0
av_cold void ff_rl_init(RLTable *rl, uint8_t static_store[2][2 * MAX_RUN + MAX_LEVEL + 3]) { int8_t max_level[MAX_RUN + 1], max_run[MAX_LEVEL + 1]; uint8_t index_run[MAX_RUN + 1]; int last, run, level, start, end, i; /* If table is static, we can quit if rl->max_level[0]...
22,514
qemu
9b2fadda3e0196ffd485adde4fe9cdd6fae35300
1
static void gen_slbie(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; } gen_helper_slbie(cpu_env, cpu_gpr[rB(ctx->opcode)]); #endif }
22,515
qemu
4f4321c11ff6e98583846bfd6f0e81954924b003
1
static int usb_hid_handle_data(USBDevice *dev, USBPacket *p) { USBHIDState *s = (USBHIDState *)dev; int ret = 0; switch(p->pid) { case USB_TOKEN_IN: if (p->devep == 1) { int64_t curtime = qemu_get_clock_ns(vm_clock); if (!s->changed && (!s->idle || s->next_idle_...
22,516
FFmpeg
322428c851980396485d4c6bb4cfe79db43467f8
1
int av_opencl_init(AVDictionary *options, AVOpenCLExternalEnv *ext_opencl_env) { int ret = 0; AVDictionaryEntry *opt_build_entry; AVDictionaryEntry *opt_platform_entry; AVDictionaryEntry *opt_device_entry; LOCK_OPENCL if (!gpu_env.init_count) { opt_platform_entry = av_dict_get(op...
22,517
FFmpeg
689a8674131c3852fc78eff1d7c044850d263e22
1
static int msf_read_header(AVFormatContext *s) { unsigned codec, align, size; AVStream *st; avio_skip(s->pb, 4); st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; codec = avio_rb32(s->pb); ...
22,518
qemu
b125f9dc7bd68cd4c57189db4da83b0620b28a72
1
void dump_exec_info(FILE *f, fprintf_function cpu_fprintf) { int i, target_code_size, max_target_code_size; int direct_jmp_count, direct_jmp2_count, cross_page; TranslationBlock *tb; target_code_size = 0; max_target_code_size = 0; cross_page = 0; direct_jmp_count = 0; direct_j...
22,519
qemu
39e594dbcd897849f2ca95b3310ea00fff29ea99
1
static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req) { uint32_t rca = 0x0000; uint64_t addr = (sd->ocr & (1 << 30)) ? (uint64_t) req.arg << 9 : req.arg; if (sd_cmd_type[req.cmd] == sd_ac || sd_cmd_type[req.cmd] == sd_adtc) rca = req.arg >> 16; ...
22,520
FFmpeg
84a6bc23570c17ce91071e41431103f709c0d595
0
static int32_t tag_tree_size(uint16_t w, uint16_t h) { uint32_t res = 0; while (w > 1 || h > 1) { res += w * h; if (res + 1 >= INT32_MAX) return -1; w = (w + 1) >> 1; h = (h + 1) >> 1; } return (int32_t)(res + 1); }
22,521
FFmpeg
e95580e70a8c0102cc2a399dff25307211a9b7ca
0
static int mov_write_packet(AVFormatContext *s, AVPacket *pkt) { MOVContext *mov = s->priv_data; ByteIOContext *pb = s->pb; MOVTrack *trk = &mov->tracks[pkt->stream_index]; AVCodecContext *enc = trk->enc; unsigned int samplesInChunk = 0; int size= pkt->size; if (url_is_streamed(s->...
22,522
FFmpeg
d1adad3cca407f493c3637e20ecd4f7124e69212
0
static inline void RENAME(rgb24tobgr24)(const uint8_t *src, uint8_t *dst, long src_size) { unsigned i; #if COMPILE_TEMPLATE_MMX x86_reg mmx_size= 23 - src_size; __asm__ volatile ( "test %%"REG_a", %%"REG_a" \n\t" "jns 2f \n\...
22,523
FFmpeg
486637af8ef29ec215e0e0b7ecd3b5470f0e04e5
0
static inline void mix_2f_2r_to_mono(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[3][i] + output[4][i]); memset(output[2], 0, sizeof(output[2])); memset(output[3], 0, sizeof(outp...
22,524
qemu
c3e10c7b4377c1cbc0a4fbc12312c2cf41c0cda7
1
void OPPROTO op_405_check_ov (void) { do_405_check_ov(); RETURN(); }
22,525
qemu
60fe637bf0e4d7989e21e50f52526444765c63b4
1
static void put_int32(QEMUFile *f, void *pv, size_t size) { int32_t *v = pv; qemu_put_sbe32s(f, v); }
22,526
qemu
eff235eb2bcd7092901f4698a7907e742f3b7f2f
1
static ExitStatus trans_fop_wew_0c(DisasContext *ctx, uint32_t insn, const DisasInsn *di) { unsigned rt = extract32(insn, 0, 5); unsigned ra = extract32(insn, 21, 5); return do_fop_wew(ctx, rt, ra, di->f_wew); }
22,527
FFmpeg
18b94669372d3d4b6c51e347587ea64acef9dbb8
1
static void ebml_free(EbmlSyntax *syntax, void *data) { int i, j; for (i = 0; syntax[i].id; i++) { void *data_off = (char *) data + syntax[i].data_offset; switch (syntax[i].type) { case EBML_STR: case EBML_UTF8: av_freep(data_off); break; ...
22,528
qemu
9ed257d1d1c65dbe5a08f207e5106e98384e1860
1
static int common_bind(struct common *c) { uint64_t mfn; if (xenstore_read_fe_uint64(&c->xendev, "page-ref", &mfn) == -1) return -1; assert(mfn == (xen_pfn_t)mfn); if (xenstore_read_fe_int(&c->xendev, "event-channel", &c->xendev.remote_port) == -1) return -1; c->page = xc_map_foreign...
22,529
FFmpeg
bd5c860fdbc33d19d2ff0f6d1f06de07c17560dd
1
int av_thread_message_queue_alloc(AVThreadMessageQueue **mq, unsigned nelem, unsigned elsize) { #if HAVE_THREADS AVThreadMessageQueue *rmq; int ret = 0; if (nelem > INT_MAX / elsize) return AVERROR(EINVAL); if (!(rmq ...
22,530
FFmpeg
32baeafeee4f8446c2c3720b9223ad2166ca9d30
1
static void xvid_idct_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block) { ff_xvid_idct(block); ff_put_pixels_clamped(block, dest, line_size); }
22,532
FFmpeg
3c6607eb6f946ed3e108db3f0694cab7e5a5df7e
1
int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) { int ret; int user_packet = !!avpkt->d...
22,533
FFmpeg
568e18b15e2ddf494fd8926707d34ca08c8edce5
1
static int get_str(ByteIOContext *bc, char *string, int maxlen){ int len= get_v(bc); if(len && maxlen) get_buffer(bc, string, FFMIN(len, maxlen)); while(len > maxlen){ get_byte(bc); len--; } if(maxlen) string[FFMIN(len, maxlen-1)]= 0; if(ma...
22,535
FFmpeg
493aa30adf88baf5bc734072592a22db586f0cfb
1
static int dvbsub_decode(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; DVBSubContext *ctx = avctx->priv_data; AVSubtitle *sub = data; const uint8_t *p, *p_e...
22,536
FFmpeg
09d5929f3721613fbb9ac9e74265c89c70df2ce0
1
static int tag_tree_decode(Jpeg2000DecoderContext *s, Jpeg2000TgtNode *node, int threshold) { Jpeg2000TgtNode *stack[30]; int sp = -1, curval = 0; while (node && !node->vis) { stack[++sp] = node; node = node->parent; } if (node) curval = node...
22,537
FFmpeg
590863876d1478547640304a31c15809c3618090
1
static int output_configure(AACContext *ac, uint8_t layout_map[MAX_ELEM_ID * 4][3], int tags, enum OCStatus oc_type, int get_new_frame) { AVCodecContext *avctx = ac->avctx; int i, channels = 0, ret; uint64_t layout = 0; uint8_t id_map[TYPE_E...
22,538
qemu
9ef91a677110ec200d7b2904fc4bcae5a77329ad
0
static int qemu_paio_submit(struct qemu_paiocb *aiocb, int type) { aiocb->aio_type = type; aiocb->ret = -EINPROGRESS; aiocb->active = 0; mutex_lock(&lock); if (idle_threads == 0 && cur_threads < max_threads) spawn_thread(); TAILQ_INSERT_TAIL(&request_list, aiocb, node); mute...
22,539
qemu
59800ec8e52bcfa271fa61fb0aae19205ef1b7f1
0
uint64_t helper_fnmadd(CPUPPCState *env, uint64_t arg1, uint64_t arg2, uint64_t arg3) { CPU_DoubleU farg1, farg2, farg3; farg1.ll = arg1; farg2.ll = arg2; farg3.ll = arg3; if (unlikely((float64_is_infinity(farg1.d) && float64_is_zero(farg2.d)) || (...
22,540
qemu
61007b316cd71ee7333ff7a0a749a8949527575f
0
static BlockAIOCB *bdrv_aio_writev_em(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockCompletionFunc *cb, void *opaque) { return bdrv_aio_rw_vector(bs, sector_num, qiov, nb_sectors, cb, opaque, 1); }
22,541
qemu
b02ef3d92b19ad304a84433d3817f0903296ebc7
0
static void attach_storage_element(SCLPDevice *sclp, SCCB *sccb, uint16_t element) { int i, assigned, subincrement_id; AttachStorageElement *attach_info = (AttachStorageElement *) sccb; sclpMemoryHotplugDev *mhd = get_sclp_memory_hotplug_dev(); assert(mhd); ...
22,542
qemu
1ec26c757d5996468afcc0dced4fad04139574b3
0
static void kvmppc_pivot_hpt_cpu(CPUState *cs, run_on_cpu_data arg) { target_ulong sdr1 = arg.target_ptr; PowerPCCPU *cpu = POWERPC_CPU(cs); CPUPPCState *env = &cpu->env; /* This is just for the benefit of PR KVM */ cpu_synchronize_state(cs); env->spr[SPR_SDR1] = sdr1; if (kvmppc_p...
22,543
qemu
245f7b51c0ea04fb2224b1127430a096c91aee70
0
static int send_rect_simple(VncState *vs, int x, int y, int w, int h) { int max_size, max_width; int max_sub_width, max_sub_height; int dx, dy; int rw, rh; int n = 0; max_size = tight_conf[vs->tight_compression].max_rect_size; max_width = tight_conf[vs->tight_compression].max_rect_...
22,544
FFmpeg
fd7af82c53ea8a2577ea8952d35fb158db594592
0
static int decompress_i(AVCodecContext *avctx, uint32_t *dst, int linesize) { SCPRContext *s = avctx->priv_data; GetByteContext *gb = &s->gb; int cx = 0, cx1 = 0, k = 0, clr = 0; int run, r, g, b, off, y = 0, x = 0, ret; const int cxshift = s->cxshift; unsigned lx, ly, ptype; reini...
22,548
qemu
6e0d8677cb443e7408c0b7a25a93c6596d7fa380
0
static void gen_extu(int ot, TCGv reg) { switch(ot) { case OT_BYTE: tcg_gen_ext8u_tl(reg, reg); break; case OT_WORD: tcg_gen_ext16u_tl(reg, reg); break; case OT_LONG: tcg_gen_ext32u_tl(reg, reg); break; default: break; } }
22,549
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
0
ssize_t read_targphys(const char *name, int fd, target_phys_addr_t dst_addr, size_t nbytes) { uint8_t *buf; ssize_t did; buf = g_malloc(nbytes); did = read(fd, buf, nbytes); if (did > 0) rom_add_blob_fixed("read", buf, did, dst_addr); g_free(buf); re...
22,550
qemu
6acbe4c6f18e7de00481ff30574262b58526de45
0
DeviceState *qdev_device_add(QemuOpts *opts) { DeviceClass *k; const char *driver, *path, *id; DeviceState *qdev; BusState *bus; driver = qemu_opt_get(opts, "driver"); if (!driver) { qerror_report(QERR_MISSING_PARAMETER, "driver"); return NULL; } /* find dr...
22,551
qemu
ac531cb6e542b1e61d668604adf9dc5306a948c0
0
static void qdict_teardown(void) { QDECREF(tests_dict); tests_dict = NULL; }
22,554
qemu
bec1631100323fac0900aea71043d5c4e22fc2fa
0
static void tcg_out_brcond(TCGContext *s, TCGCond cond, TCGArg arg1, TCGArg arg2, int const_arg2, int label_index, TCGType type) { tcg_out_cmp(s, cond, arg1, arg2, const_arg2, 7, type); tcg_out_bc(s, tcg_to_bc[cond], label_index); }
22,555
qemu
fae2afb10e3fdceab612c62a2b1e8b944ff578d9
0
static void qxl_track_command(PCIQXLDevice *qxl, struct QXLCommandExt *ext) { switch (le32_to_cpu(ext->cmd.type)) { case QXL_CMD_SURFACE: { QXLSurfaceCmd *cmd = qxl_phys2virt(qxl, ext->cmd.data, ext->group_id); uint32_t id = le32_to_cpu(cmd->surface_id); PANIC_ON(id >= NUM_SUR...
22,556
qemu
c2fa30757a2ba1bb5b053883773a9a61fbdd7082
0
static void nvdimm_dsm_label_size(NVDIMMDevice *nvdimm, hwaddr dsm_mem_addr) { NvdimmFuncGetLabelSizeOut label_size_out = { .len = cpu_to_le32(sizeof(label_size_out)), }; uint32_t label_size, mxfer; label_size = nvdimm->label_size; mxfer = nvdimm_get_max_xfer_label_size(); nv...
22,557
qemu
bdb11366b9370e97fb436444c697c01fe839dc11
0
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; uint6...
22,558
qemu
72cf2d4f0e181d0d3a3122e04129c58a95da713e
0
int monitor_get_fd(Monitor *mon, const char *fdname) { mon_fd_t *monfd; LIST_FOREACH(monfd, &mon->fds, next) { int fd; if (strcmp(monfd->name, fdname) != 0) { continue; } fd = monfd->fd; /* caller takes ownership of fd */ LIST_REMOVE(...
22,560
qemu
fdfab37dfeffefbd4533b4158055c9b82d7c3e69
0
static int count_cow_clusters(BDRVQcow2State *s, int nb_clusters, uint64_t *l2_table, int l2_index) { int i; for (i = 0; i < nb_clusters; i++) { uint64_t l2_entry = be64_to_cpu(l2_table[l2_index + i]); QCow2ClusterType cluster_type = qcow2_get_cluster_type(l2_entry); switc...
22,561
qemu
74c85296dc880568005b8e7572e08a39d66bcdca
0
VirtIOS390Device *s390_virtio_bus_find_vring(VirtIOS390Bus *bus, ram_addr_t mem, int *vq_num) { BusChild *kid; int i; QTAILQ_FOREACH(kid, &bus->bus.children, sibling) { VirtIOS390Device *dev = (VirtIOS...
22,562
FFmpeg
1c088632e98af96f9cbe8129c5d7eb7274f8d4ed
0
static inline int parse_nal_units(AVCodecParserContext *s, const uint8_t *buf, int buf_size, AVCodecContext *avctx) { HEVCParserContext *ctx = s->priv_data; HEVCContext *h = &ctx->h; GetBitContext *gb; SliceHeader *sh = &h->sh; HEVCParamSets *ps ...
22,563
FFmpeg
e549933a270dd2cfc36f2cf9bb6b29acf3dc6d08
0
void ff_put_h264_qpel4_mc22_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_mid_4w_msa(src - (2 * stride) - 2, stride, dst, stride, 4); }
22,564
FFmpeg
61bd0ed781b56eea1e8e851aab34a2ee3b59fbac
0
int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length, void *logctx, int is_nalff, int nal_length_size, enum AVCodecID codec_id) { int consumed, ret = 0; const uint8_t *next_avc = buf + (is_nalff ? 0 : length); pkt->nb_nals = 0...
22,566
FFmpeg
3c895fc098f7637f6d5ec3a9d6766e724a8b9e41
0
static int output_packet(AVInputStream *ist, int ist_index, AVOutputStream **ost_table, int nb_ostreams, const AVPacket *pkt) { AVFormatContext *os; AVOutputStream *ost; uint8_t *ptr; int len, ret, i; uint8_t *data_buf; int data_size, go...
22,567
FFmpeg
08a747afb98c11da48b89339c2f1c5fdc56ced7e
0
static void count_frame_bits(AC3EncodeContext *s) { AC3EncOptions *opt = &s->options; int blk, ch; int frame_bits = 0; /* header */ if (s->eac3) { /* coupling */ if (s->channel_mode > AC3_CHMODE_MONO) { frame_bits++; for (blk = 1; blk < AC3_MAX_BLO...
22,568
qemu
187337f8b0ec0813dd3876d1efe37d415fb81c2e
1
void sp804_init(uint32_t base, qemu_irq irq) { int iomemtype; sp804_state *s; qemu_irq *qi; s = (sp804_state *)qemu_mallocz(sizeof(sp804_state)); qi = qemu_allocate_irqs(sp804_set_irq, s, 2); s->base = base; s->irq = irq; /* ??? The timers are actually configurable between 32k...
22,569
qemu
07caea315a85ebfe90851f9c2e4ef3fdd24117b5
1
static void network_init(void) { int i; for(i = 0; i < nb_nics; i++) { NICInfo *nd = &nd_table[i]; const char *default_devaddr = NULL; if (i == 0 && (!nd->model || strcmp(nd->model, "pcnet") == 0)) /* The malta board has a PCNet card using PCI SLOT 11 */ ...
22,570
qemu
2f9606b3736c3be4dbd606c46525c7b770ced119
1
static uint8_t *buffer_end(Buffer *buffer) { return buffer->buffer + buffer->offset; }
22,571
qemu
b45c03f585ea9bb1af76c73e82195418c294919d
1
PXA2xxState *pxa270_init(MemoryRegion *address_space, unsigned int sdram_size, const char *revision) { PXA2xxState *s; int i; DriveInfo *dinfo; s = (PXA2xxState *) g_malloc0(sizeof(PXA2xxState)); if (revision && strncmp(revision, "pxa27", 5)) { fprintf(stde...
22,572
qemu
51cc2e783af5586b2e742ce9e5b2762dc50ad325
1
static int cpu_mips_register (CPUMIPSState *env, const mips_def_t *def) { env->CP0_PRid = def->CP0_PRid; env->CP0_Config0 = def->CP0_Config0; #ifdef TARGET_WORDS_BIGENDIAN env->CP0_Config0 |= (1 << CP0C0_BE); #endif env->CP0_Config1 = def->CP0_Config1; env->CP0_Config2 = def->CP0_Config2; ...
22,574
qemu
21ef45d71221b4577330fe3aacfb06afad91ad46
1
static void gd_update(DisplayChangeListener *dcl, DisplayState *ds, int x, int y, int w, int h) { GtkDisplayState *s = ds->opaque; int x1, x2, y1, y2; int mx, my; int fbw, fbh; int ww, wh; DPRINTF("update(x=%d, y=%d, w=%d, h=%d)\n", x, y, w, h); x1 = floor(...
22,575
FFmpeg
2192f89368d837a4d960a1cabf5475fdeff697e7
1
static void load_module(const char *filename) { void *dll; void (*init_func)(void); dll = dlopen(filename, RTLD_NOW); if (!dll) { fprintf(stderr, "Could not load module '%s' - %s\n", filename, dlerror()); } init_func = dlsym(dll, "ffserver_module_init"); ...
22,576
FFmpeg
0a41f47dc17b49acaff6fe469a6ab358986cc449
0
DVDemuxContext* avpriv_dv_init_demux(AVFormatContext *s) { DVDemuxContext *c; c = av_mallocz(sizeof(DVDemuxContext)); if (!c) return NULL; c->vst = avformat_new_stream(s, NULL); if (!c->vst) { av_free(c); return NULL; } c->sys = NULL; c->fctx = ...
22,577
FFmpeg
15cea3695daf3f6363794594982e3816ddc8d90b
1
int ff_read_riff_info(AVFormatContext *s, int64_t size) { int64_t start, end, cur; AVIOContext *pb = s->pb; start = avio_tell(pb); end = start + size; while ((cur = avio_tell(pb)) >= 0 && cur <= end - 8 /* = tag + size */) { uint32_t chunk_code; int64_t chunk_size; ...
22,578
FFmpeg
f6774f905fb3cfdc319523ac640be30b14c1bc55
1
static int h261_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; H261Context *h = avctx->priv_data; MpegEncContext *s = &h->s; int ret; AVFrame *pict = ...
22,579
qemu
54e6814360ab2110ed3ed07b2b9a3f9907e1202a
1
int qcow2_alloc_cluster_offset(BlockDriverState *bs, uint64_t offset, int n_start, int n_end, int *num, QCowL2Meta *m) { BDRVQcowState *s = bs->opaque; int l2_index, ret, sectors; uint64_t *l2_table; unsigned int nb_clusters, keep_clusters; uint64_t cluster_offset; trace_qcow2_allo...
22,580
qemu
d07bde88a52bf293c3f8846cfd162e0a57e1557c
1
static void tb_gen_code(CPUState *env, target_ulong pc, target_ulong cs_base, int flags, int cflags) { TranslationBlock *tb; uint8_t *tc_ptr; target_ulong phys_pc, phys_page2, virt_page2; int code_gen_size; phys_pc = get_phys_addr_code(env, p...
22,581
qemu
c0532a76b407af4b276dc5a62d8178db59857ea6
1
void cpu_inject_x86_mce(CPUState *cenv, int bank, uint64_t status, uint64_t mcg_status, uint64_t addr, uint64_t misc) { uint64_t mcg_cap = cenv->mcg_cap; unsigned bank_num = mcg_cap & 0xff; uint64_t *banks = cenv->mce_banks; if (bank >= bank_num || !(status & MCI_STATUS_V...
22,582
qemu
baf35cb90204d75404892aa4e52628ae7a00669b
1
void qemu_aio_poll(void) { }
22,583
qemu
8059feee004111534c4c0652e2f0715e9b4e0754
1
void virtqueue_map_sg(struct iovec *sg, hwaddr *addr, size_t num_sg, int is_write) { unsigned int i; hwaddr len; if (num_sg > VIRTQUEUE_MAX_SIZE) { error_report("virtio: map attempt out of bounds: %zd > %d", num_sg, VIRTQUEUE_MAX_SIZE); exit(1); } ...
22,584
FFmpeg
62b1e3b1031e901105d78e831120de8e4c3e0013
1
static int aasc_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; AascContext *s = avctx->priv_data; int compr, i, stride, ret; if ((re...
22,585
FFmpeg
ac4b32df71bd932838043a4838b86d11e169707f
1
static av_always_inline void filter_common(uint8_t *p, ptrdiff_t stride, int is4tap) { LOAD_PIXELS int a, f1, f2; const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP; a = 3 * (q0 - p0); if (is4tap) a += clip_int8(p1 - q1); a = clip_int...
22,586
qemu
ac0c14d71b68ac18f03a876028e332534e1e6a3e
1
static int virtio_blk_init_pci(PCIDevice *pci_dev) { VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev); VirtIODevice *vdev; if (proxy->class_code != PCI_CLASS_STORAGE_SCSI && proxy->class_code != PCI_CLASS_STORAGE_OTHER) proxy->class_code = PCI_CLASS_STORAGE_SCSI; ...
22,587
qemu
6a5b69a959483c7404576a7dc54221ced41e6515
1
static target_ulong helper_sdiv_common(CPUSPARCState *env, target_ulong a, target_ulong b, int cc) { SPARCCPU *cpu = sparc_env_get_cpu(env); int overflow = 0; int64_t x0; int32_t x1; x0 = (a & 0xffffffff) | ((int64_t) (env->y) << 32); x1 = (b & 0x...
22,588
FFmpeg
c2c4cee866926cb95b2b1a4b28fff9caa4177c7e
0
static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv, int i, AVIOContext *pb, int default_stream_exists) { AVStream *st = s->streams[i]; AVCodecContext *codec = st->codec; ebml_master subinfo, track; int native_id = 0; int qt_id = 0; int bit_d...
22,589
FFmpeg
87e8788680e16c51f6048af26f3f7830c35207a5
0
static int ffm_probe(AVProbeData *p) { if (p->buf_size >= 4 && p->buf[0] == 'F' && p->buf[1] == 'F' && p->buf[2] == 'M' && p->buf[3] == '1') return AVPROBE_SCORE_MAX + 1; return 0; }
22,590
qemu
e8bccad5ac6095b5af7946cd72d9aacb57f7c0a3
1
static void win32_aio_process_completion(QEMUWin32AIOState *s, QEMUWin32AIOCB *waiocb, DWORD count) { int ret; s->count--; if (waiocb->ov.Internal != 0) { ret = -EIO; } else { ret = 0; if (count < waiocb->nbytes) { /* Short reads mean EOF, pad with zer...
22,592
FFmpeg
a5e5959d52860678d028df07ad1351a11aaf47f7
1
static void compute_pkt_fields(AVFormatContext *s, AVStream *st, AVCodecParserContext *pc, AVPacket *pkt, int64_t next_dts, int64_t next_pts) { int num, den, presentation_delayed, delay, i; int64_t offset; AVRational duration; int onei...
22,593
FFmpeg
a2a17d3f879436182bcc52c2986a56acd81e7e92
1
static inline int vertClassify_altivec(uint8_t src[], int stride, PPContext *c) { /* this code makes no assumption on src or stride. One could remove the recomputation of the perm vector by assuming (stride % 16) == 0, unfortunately this is not always true. */ DECLARE_ALIGNED(16, shor...
22,594
FFmpeg
f6774f905fb3cfdc319523ac640be30b14c1bc55
1
static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size) { VC1Context * const v = avctx->priv_data; MpegEncContext * const s = &v->s; struct vaapi_context * const vactx = avctx->hwaccel_context; VAPictureParameterBufferVC1 *pic_param; ...
22,595
FFmpeg
eb5049227033d946add93c0714bb8a28d94166f1
1
static int dxv_decompress_raw(AVCodecContext *avctx) { DXVContext *ctx = avctx->priv_data; GetByteContext *gbc = &ctx->gbc; bytestream2_get_buffer(gbc, ctx->tex_data, ctx->tex_size); return 0; }
22,596
qemu
107e4b352cc309f9bd7588ef1a44549200620078
1
static int of_dpa_cmd_group_add(OfDpa *of_dpa, uint32_t group_id, RockerTlv **group_tlvs) { OfDpaGroup *group = of_dpa_group_find(of_dpa, group_id); int err; if (group) { return -ROCKER_EEXIST; } group = of_dpa_group_alloc(group_id); if (!grou...
22,598
FFmpeg
6e3ea4461fa9a77964efd2fa7ed1250dd1c8d43d
0
static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, int (*read_child)(), int ctx_size, enum MXFMetadataSetType type) { ByteIOContext *pb = mxf->fc->pb; MXFMetadataSet *ctx = ctx_size ? av_mallocz(ctx_size) : mxf; uint64_t klv_end = url_ftell(pb) + klv->length; if (!ctx) retur...
22,599
FFmpeg
89f704cabab446afc8ba6ecea76714a51b1df32b
0
static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, int *got_packet) { X264Context *x4 = ctx->priv_data; x264_nal_t *nal; int nnal, i, ret; x264_picture_t pic_out = {0}; int pict_type; x264_picture_init( &x4->pic ); x4->pic.img.i_c...
22,602
FFmpeg
332f9ac4e31ce5e6d0c42ac9e0229d7d1b2b4d60
0
int flv_h263_decode_picture_header(MpegEncContext *s) { int format, width, height; /* picture header */ if (get_bits_long(&s->gb, 17) != 1) { av_log(s->avctx, AV_LOG_ERROR, "Bad picture start code\n"); return -1; } format = get_bits(&s->gb, 5); if (format != 0 && forma...
22,603
qemu
f1d3b99154138741161fc52f5a8c373bf71613c6
1
static void pci_msix(void) { QVirtioPCIDevice *dev; QPCIBus *bus; QVirtQueuePCI *vqpci; QGuestAllocator *alloc; QVirtioBlkReq req; int n_size = TEST_IMAGE_SIZE / 2; void *addr; uint64_t req_addr; uint64_t capacity; uint32_t features; uint32_t free_head; uint8...
22,604
qemu
0b8b8753e4d94901627b3e86431230f2319215c4
1
static void test_co_queue(void) { Coroutine *c1; Coroutine *c2; c1 = qemu_coroutine_create(c1_fn); c2 = qemu_coroutine_create(c2_fn); qemu_coroutine_enter(c1, c2); memset(c1, 0xff, sizeof(Coroutine)); qemu_coroutine_enter(c2, NULL); }
22,605
FFmpeg
56706ac0d5723cb549fec2602e798ab1bf6004cd
1
static int libopenjpeg_copy_unpacked8(AVCodecContext *avctx, const AVFrame *frame, opj_image_t *image) { int compno; int x; int y; int width; int height; int *image_line; int frame_index; const int numcomps = image->numcomps; for (compno = 0; compno < numcomps; ++compno) ...
22,606
FFmpeg
984d58a3440d513f66344b5332f6b589c0a6bbc6
1
static int url_alloc_for_protocol(URLContext **puc, struct URLProtocol *up, const char *filename, int flags, const AVIOInterruptCB *int_cb) { URLContext *uc; int err; #if CONFIG_NETWORK if (up->flags & URL_PROTOCOL_FLAG_NETWORK && ...
22,607
FFmpeg
e92a78a4095d69d876bef189225608a35166dc4a
1
void ff_write_pass1_stats(MpegEncContext *s) { snprintf(s->avctx->stats_out, 256, "in:%d out:%d type:%d q:%d itex:%d ptex:%d mv:%d misc:%d " "fcode:%d bcode:%d mc-var:%d var:%d icount:%d skipcount:%d hbits:%d;\n", s->current_picture_ptr->f.display_picture_number, ...
22,608
qemu
f575f145f4fa97fdbb9bbb4df62dfeada3f15dc4
1
static bool is_zero_cluster(BlockDriverState *bs, int64_t start) { BDRVQcow2State *s = bs->opaque; int nr; BlockDriverState *file; int64_t res = bdrv_get_block_status_above(bs, NULL, start, s->cluster_sectors, &nr, &file); return res >= 0 && ((res...
22,609
qemu
cdeaf1f15909e2e8af38f45aea7cfa467a729c52
1
static int get_cluster_offset(BlockDriverState *bs, VmdkExtent *extent, VmdkMetaData *m_data, uint64_t offset, int allocate, uint64_t *...
22,610
qemu
357d1e3bc7d2d80e5271bc4f3ac8537e30dc8046
1
QPCIBus *qpci_init_spapr(QGuestAllocator *alloc) { QPCIBusSPAPR *ret; ret = g_malloc(sizeof(*ret)); ret->alloc = alloc; ret->bus.io_readb = qpci_spapr_io_readb; ret->bus.io_readw = qpci_spapr_io_readw; ret->bus.io_readl = qpci_spapr_io_readl; ret->bus.io_writeb = qpci_spapr_i...
22,611
FFmpeg
2ce4f28431623cdde4aa496fd10430f6c7bdef63
1
static int ff_vp56_decode_mbs(AVCodecContext *avctx, void *data, int jobnr, int threadnr) { VP56Context *s0 = avctx->priv_data; int is_alpha = (jobnr == 1); VP56Context *s = is_alpha ? s0->alpha_context : s0; AVFrame *const p = s->frames[VP56_FRAME_CURRENT]; int ...
22,612