project
stringclasses
2 values
commit_id
stringlengths
40
40
target
int64
0
1
func
stringlengths
26
142k
idx
int64
0
27.3k
qemu
47405ab642101c8ea0472ae434ab4bd2bc1fa41f
0
void cpu_loop(CPUS390XState *env) { CPUState *cs = CPU(s390_env_get_cpu(env)); int trapnr, n, sig; target_siginfo_t info; target_ulong addr; while (1) { cpu_exec_start(cs); trapnr = cpu_s390x_exec(cs); cpu_exec_end(cs); switch (trapnr) { case EXCP...
25,633
qemu
64607d088132abdb25bf30d93e97d0c8df7b364c
0
Object *object_resolve_path_component(Object *parent, const gchar *part) { ObjectProperty *prop = object_property_find(parent, part, NULL); if (prop == NULL) { return NULL; } if (object_property_is_link(prop)) { LinkProperty *lprop = prop->opaque; return *lprop->child; ...
25,634
qemu
36b15c79aa1bef5fe7543f9f2629b6413720bbfb
0
static void *virtio_scsi_load_request(QEMUFile *f, SCSIRequest *sreq) { SCSIBus *bus = sreq->bus; VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus); VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s); VirtIOSCSIReq *req; uint32_t n; req = g_malloc(sizeof(*req)); qemu_get_be32s(f, &n); ...
25,635
qemu
53cb28cbfea038f8ad50132dc8a684e638c7d48b
0
static void phys_sections_free(PhysPageMap *map) { while (map->sections_nb > 0) { MemoryRegionSection *section = &map->sections[--map->sections_nb]; phys_section_destroy(section->mr); } g_free(map->sections); g_free(map->nodes); g_free(map); }
25,637
FFmpeg
602dd8f6c4d4f7e1b5f48cc580fd9b694d41d602
0
static void fill_buffer(ByteIOContext *s) { int len; /* no need to do anything if EOF already reached */ if (s->eof_reached) return; if(s->update_checksum){ if(s->buf_end > s->checksum_ptr) s->checksum= s->update_checksum(s->checksum, s->checksum_ptr, s->buf_end -...
25,638
FFmpeg
754ebd1a5b68dd63ccceb50a8a852fe8d0c94354
0
static int adx_encode_frame(AVCodecContext *avctx, uint8_t *frame, int buf_size, void *data) { ADXContext *c = avctx->priv_data; const int16_t *samples = data; uint8_t *dst = frame; int ch; if (!c->header_parsed) { int hdrsize = adx_en...
25,639
FFmpeg
43a4276c6964a2ec57e08c3c622bb94d35c0441f
0
static int bmp_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size) { BMPParseContext *bpc = s->priv_data; uint64_t state = bpc->pc.state64; int next = END_NOT_FOUND; int i = 0...
25,640
FFmpeg
570a4a0189946c2c983da41d37fdd67fa13266e7
0
static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { AVIContext *avi = s->priv_data; AVStream *st; int i, index; int64_t pos; AVIStream *ast; if (!avi->index_loaded) { /* we only load the index on demand */ avi_load_index(s); ...
25,641
FFmpeg
c31a5b23b4cd566724743685e5ea158b0c818647
0
static int opt_streamid(const char *opt, const char *arg) { int idx; char *p; char idx_str[16]; av_strlcpy(idx_str, arg, sizeof(idx_str)); p = strchr(idx_str, ':'); if (!p) { fprintf(stderr, "Invalid value '%s' for option '%s', required syntax is 'index:value'\...
25,642
FFmpeg
662234a9a22f1cd0f0ac83b8bb1ffadedca90c0a
0
static void avc_luma_midv_qrt_16w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height, uint8_t vert_offset) { uint32_t multiple8_cnt; for (multiple8_cnt = 2; multiple8_cnt--;) { a...
25,643
FFmpeg
13a099799e89a76eb921ca452e1b04a7a28a9855
0
static void RENAME(yuv2rgb32_1)(SwsContext *c, const uint16_t *buf0, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, uint8_t *dest, ...
25,645
FFmpeg
68f593b48433842f3407586679fe07f3e5199ab9
0
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size){ HYuvContext *s = avctx->priv_data; const int width= s->width; const int width2= s->width>>1; const int height= s->height; int fake_ystride, fake_ustride, fake_vstride; AVFrame * const p=...
25,646
qemu
cb77d1925ac4d673e19be58aa39fc53c5d2fed10
1
static QemuOpts *opts_parse(QemuOptsList *list, const char *params, int permit_abbrev, bool defaults) { const char *firstname; char value[1024], *id = NULL; const char *p; QemuOpts *opts; Error *local_err = NULL; assert(!permit_abbrev || list->implied_opt_name); f...
25,647
qemu
60fe637bf0e4d7989e21e50f52526444765c63b4
1
static int get_bool(QEMUFile *f, void *pv, size_t size) { bool *v = pv; *v = qemu_get_byte(f); return 0; }
25,648
FFmpeg
1bc64c2814d409d3cc129c27c493ee915bebdc4a
1
int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt) { int planar, channels; int ret = 0; *got_frame_...
25,649
FFmpeg
9ea242962c4093a5523deef124a98193bbb36730
1
int ff_j2k_init_component(Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty, Jpeg2000QuantStyle *qntsty, int cbps, int dx, int dy) { int reslevelno, bandno, gbandno = 0, ret, i, j, csize = 1; if (ret=ff_j2k_dwt_init(&comp->dwt, comp->coord, codsty->nreslevels-1, codsty->transform)) return ret; ...
25,650
qemu
7d1b0095bff7157e856d1d0e6c4295641ced2752
1
static int disas_cp_insn(CPUState *env, DisasContext *s, uint32_t insn) { TCGv tmp, tmp2; uint32_t rd = (insn >> 12) & 0xf; uint32_t cp = (insn >> 8) & 0xf; if (IS_USER(s)) { return 1; } if (insn & ARM_CP_RW_BIT) { if (!env->cp[cp].cp_read) return 1; ...
25,651
FFmpeg
d64066f6e88c827e33002b2c7740efd62cd5ba7f
1
static int read_frame_internal(AVFormatContext *s, AVPacket *pkt) { AVStream *st; int len, ret, i; av_init_packet(pkt); for(;;) { /* select current input stream component */ st = s->cur_st; if (st) { if (!st->need_parsing || !st->parser) { ...
25,652
qemu
1b7f01d966f97b7820f3cdd471461cf0799a93cc
1
void qemu_co_rwlock_unlock(CoRwlock *lock) { assert(qemu_in_coroutine()); if (lock->writer) { lock->writer = false; qemu_co_queue_restart_all(&lock->queue); } else { lock->reader--; assert(lock->reader >= 0); /* Wakeup only one waiting writer */ if (!lock->rea...
25,653
qemu
d9bce9d99f4656ae0b0127f7472db9067b8f84ab
1
void do_addzeo (void) { T1 = T0; T0 += xer_ca; if (likely(!((T1 ^ (-1)) & (T1 ^ T0) & (1 << 31)))) { xer_ov = 0; } else { xer_so = 1; xer_ov = 1; } if (likely(T0 >= T1)) { xer_ca = 0; } else { xer_ca = 1; } }
25,654
qemu
5f81724d80a1492c73d329242663962139db739b
1
void ide_atapi_cmd_reply_end(IDEState *s) { int byte_count_limit, size, ret; #ifdef DEBUG_IDE_ATAPI printf("reply: tx_size=%d elem_tx_size=%d index=%d\n", s->packet_transfer_size, s->elementary_transfer_size, s->io_buffer_index); #endif if (s->packet_transfer_size <...
25,655
FFmpeg
552adf1dd3a38fb7a1a6109dd2b517d63290f20e
1
static int read_filter_params(MLPDecodeContext *m, GetBitContext *gbp, unsigned int substr, unsigned int channel, unsigned int filter) { SubStream *s = &m->substream[substr]; FilterParams *fp = &s->channel_params[channel].filter_params[filter]; ...
25,656
FFmpeg
63a99622876ff79a07862167f243a7d3823b7315
1
static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref) { IlContext *il = inlink->dst->priv; AVFilterLink *outlink = inlink->dst->outputs[0]; AVFilterBufferRef *out; int ret; out = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h); if (!out) { ...
25,657
FFmpeg
dae7ff04160901a30a35af05f2f149b289c4f0b1
1
decode_lpc(WmallDecodeCtx *s) { int ch, i, cbits; s->lpc_order = get_bits(&s->gb, 5) + 1; s->lpc_scaling = get_bits(&s->gb, 4); s->lpc_intbits = get_bits(&s->gb, 3) + 1; cbits = s->lpc_scaling + s->lpc_intbits; for(ch = 0; ch < s->num_channels; ch++) { for(i = 0; i < s->lpc_order; i++) ...
25,658
FFmpeg
e403e4bdbea08af0c4a068eb560b577d1b64cf7a
1
static double get_scene_score(AVFilterContext *ctx, AVFrame *crnt, AVFrame *next) { FrameRateContext *s = ctx->priv; double ret = 0; ff_dlog(ctx, "get_scene_score()\n"); if (crnt->height == next->height && crnt->width == next->width) { int64_t sad; double mafd, diff;...
25,659
FFmpeg
1e90317b655699a2877478e335e998fb5e4b79d8
0
int main(int argc,char* argv[]){ int i, j; uint64_t sse=0; uint64_t dev; FILE *f[2]; uint8_t buf[2][SIZE]; uint64_t psnr; int len= argc<4 ? 1 : atoi(argv[3]); int64_t max= (1<<(8*len))-1; int shift= argc<5 ? 0 : atoi(argv[4]); int skip_bytes = argc<6 ? 0 : atoi(argv[5])...
25,660
qemu
4482e05cbbb7e50e476f6a9500cf0b38913bd939
1
StrongARMState *sa1110_init(MemoryRegion *sysmem, unsigned int sdram_size, const char *rev) { StrongARMState *s; int i; s = g_new0(StrongARMState, 1); if (!rev) { rev = "sa1110-b5"; } if (strncmp(rev, "sa1110", 6)) { error_report("Machi...
25,661
FFmpeg
7140761481e4296723a592019a0244ebe6c1a8cf
1
static int celt_header(AVFormatContext *s, int idx) { struct ogg *ogg = s->priv_data; struct ogg_stream *os = ogg->streams + idx; AVStream *st = s->streams[idx]; struct oggcelt_private *priv = os->private; uint8_t *p = os->buf + os->pstart; if (os->psize == 60 && !memcmp(p, ff_...
25,662
qemu
7d61d892327d803ae43d14500601e48031b4632c
1
static abi_long do_sendrecvmsg_locked(int fd, struct target_msghdr *msgp, int flags, int send) { abi_long ret, len; struct msghdr msg; int count; struct iovec *vec; abi_ulong target_vec; if (msgp->msg_name) { msg.msg_namelen = tswap32(msgp...
25,663
FFmpeg
d68542f019c89e7938297a18da282e3a892718aa
0
static int decode_group3_1d_line(AVCodecContext *avctx, GetBitContext *gb, int pix_left, int *runs) { int mode = 0, run = 0; unsigned int t; for(;;){ t = get_vlc2(gb, ccitt_vlc[mode].table, 9, 2); run += t; if(t < 64){ pix_left -=...
25,664
FFmpeg
0b42631641d998e509cde6fa344edc6ab5cb4ac8
0
static int get_qcx(Jpeg2000DecoderContext *s, int n, Jpeg2000QuantStyle *q) { int i, x; if (s->buf_end - s->buf < 1) return AVERROR(EINVAL); x = bytestream_get_byte(&s->buf); // Sqcd q->nguardbits = x >> 5; q->quantsty = x & 0x1f; if (q->quantsty == JPEG2000_QSTY_NONE) ...
25,665
qemu
70afb8ff90e9d922ed729e6dbabaff6d67c461aa
1
void do_compare_and_swap32(void *cpu_env, int num) { #ifdef TARGET_I386 uint32_t old = ((CPUX86State*)cpu_env)->regs[R_EAX]; uint32_t *value = (uint32_t*)((CPUX86State*)cpu_env)->regs[R_ECX]; DPRINTF("commpage: compare_and_swap32(%x,new,%p)\n", old, value); if(value && old == tswap32(*value)) ...
25,666
FFmpeg
be8d812c9635f31f69c30dff9ebf565a07a7dab7
1
static void ready_residue(vorbis_enc_residue *rc, vorbis_enc_context *venc) { int i; assert(rc->type == 2); rc->maxes = av_mallocz(sizeof(float[2]) * rc->classifications); for (i = 0; i < rc->classifications; i++) { int j; vorbis_enc_codebook * cb; for (j = 0; j < 8; j++)...
25,667
qemu
88be7b4be4aa17c88247e162bdd7577ea79db94f
1
BlockDriverState *bdrv_all_find_vmstate_bs(void) { bool not_found = true; BlockDriverState *bs; BdrvNextIterator *it = NULL; while (not_found && (it = bdrv_next(it, &bs))) { AioContext *ctx = bdrv_get_aio_context(bs); aio_context_acquire(ctx); not_found = !bdrv_can_sn...
25,668
FFmpeg
f61bece684d9685b07895508e6c1c733b5564ccf
0
static av_cold int initFilter(int16_t **outFilter, int32_t **filterPos, int *outFilterSize, int xInc, int srcW, int dstW, int filterAlign, int one, int flags, int cpu_flags, SwsVector *srcFilter, ...
25,671
FFmpeg
aa74810fc6b9afe21c9be3725e3d078d10633670
1
int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes, const void *bits, int bits_wrap, int bits_size, const void *codes, int codes_wrap, int codes_size, const void *symbols, int symbols_wrap, int symbols_size, int flag...
25,673
qemu
2f448e415f364d0ec4c5556993e44ca183e31c5c
1
static uint64_t macio_nvram_readb(void *opaque, hwaddr addr, unsigned size) { MacIONVRAMState *s = opaque; uint32_t value; addr = (addr >> s->it_shift) & (s->size - 1); value = s->data[addr]; NVR_DPRINTF("readb addr %04x val %x\n", (int)addr, value); ...
25,674
qemu
58117c9bb429cd9552d998687aa99088eb1d8528
1
void HELPER(v7m_msr)(CPUARMState *env, uint32_t reg, uint32_t val) { ARMCPU *cpu = arm_env_get_cpu(env); switch (reg) { case 0: /* APSR */ xpsr_write(env, val, 0xf8000000); break; case 1: /* IAPSR */ xpsr_write(env, val, 0xf8000000); break; case 2: /* EAPS...
25,675
FFmpeg
7dabc78ce13e3baa37292f42df2364b4ccd2aa78
0
AVRational av_d2q(double d, int max) { AVRational a; int exponent; int64_t den; if (isnan(d)) return (AVRational) { 0,0 }; if (fabs(d) > INT_MAX + 3LL) return (AVRational) { d < 0 ? -1 : 1, 0 }; frexp(d, &exponent); exponent = FFMAX(exponent-1, 0); den = 1LL <<...
25,677
FFmpeg
ce1ebb31a9a0e556a89cd7681082af19fbc1cced
0
static unsigned tget(GetByteContext *gb, int type, int le) { switch (type) { case TIFF_BYTE : return bytestream2_get_byteu(gb); case TIFF_SHORT: return tget_short(gb, le); case TIFF_LONG : return tget_long(gb, le); default : return UINT_MAX; } }
25,678
qemu
b946a1533209f61a93e34898aebb5b43154b99c3
1
PCIDevice *pci_pcnet_init(PCIBus *bus, NICInfo *nd, int devfn) { PCNetState *d; uint8_t *pci_conf; #if 0 printf("sizeof(RMD)=%d, sizeof(TMD)=%d\n", sizeof(struct pcnet_RMD), sizeof(struct pcnet_TMD)); #endif d = (PCNetState *)pci_register_device(bus, "PCNet", sizeof(PCNetState), ...
25,679
qemu
eabc977973103527bbb8fed69c91cfaa6691f8ab
1
void aio_notify(AioContext *ctx) { /* Write e.g. bh->scheduled before reading ctx->dispatching. */ smp_mb(); if (!ctx->dispatching) { event_notifier_set(&ctx->notifier); } }
25,680
qemu
d02532f08e207419e412ea7cd4eb8b36f04f426d
1
static void tb_invalidate_phys_page(tb_page_addr_t addr, uintptr_t pc, void *puc) { TranslationBlock *tb; PageDesc *p; int n; #ifdef TARGET_HAS_PRECISE_SMC TranslationBlock *current_tb = NULL; CPUState *cpu = current_cpu; CPUArchState *env = NULL; ...
25,681
FFmpeg
a7ba3244131d96d9ab7a99ef30dc7276efd05cc7
1
static int rtp_parse_mp4_au(PayloadContext *data, const uint8_t *buf) { int au_headers_length, au_header_size, i; GetBitContext getbitcontext; /* decode the first 2 bytes where the AUHeader sections are stored length in bits */ au_headers_length = AV_RB16(buf); if (au_headers_lengt...
25,683
FFmpeg
2da0d70d5eebe42f9fcd27ee554419ebe2a5da06
1
static inline void RENAME(palToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, int width, uint32_t *pal) { int i; assert(src1 == src2); for(i=0; i<width; i++) { int p= pal[src1[i]]; dstU[i]= p>>8; dstV[i]= p>>16; } }
25,684
qemu
0d4abda8f7328c8911c1d020bb6961650eaf7801
1
static uint64_t pl011_read(void *opaque, target_phys_addr_t offset, unsigned size) { pl011_state *s = (pl011_state *)opaque; uint32_t c; if (offset >= 0xfe0 && offset < 0x1000) { return s->id[(offset - 0xfe0) >> 2]; } switch (offset >> 2) { case 0: /...
25,685
qemu
cba933b2257ef0ad241756a0ff86bc0acda685ca
1
static void icp_pit_write(void *opaque, hwaddr offset, uint64_t value, unsigned size) { icp_pit_state *s = (icp_pit_state *)opaque; int n; n = offset >> 8; if (n > 2) { qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad timer %d\n", __func__, n); } arm_timer_...
25,688
FFmpeg
7782cb207a09f4acf0b2a935ca81076b117660a2
1
static void targa_decode_rle(AVCodecContext *avctx, TargaContext *s, const uint8_t *src, uint8_t *dst, int w, int h, int stride, int bpp) { int i, x, y; int depth = (bpp + 1) >> 3; int type, count; int diff; diff = stride - w * depth; x = y = 0; while(y < h){ type = *src++...
25,689
FFmpeg
e1631f8ebe9a8f2a9cca85d60160b9be94eb63f3
1
static int aasc_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; AascContext *s = avctx->priv_data; int compr, i, stride, psize; s->frame.refere...
25,690
qemu
adb435522b86b3fca2324cb8c94e17b55ae071f1
1
int qcow2_pre_write_overlap_check(BlockDriverState *bs, int ign, int64_t offset, int64_t size) { int ret = qcow2_check_metadata_overlap(bs, ign, offset, size); if (ret < 0) { return ret; } else if (ret > 0) { int metadata_ol_bitnr = ffs(ret) - 1; ...
25,691
qemu
c165f7758009a4f793c1fc19ebb69cf55313450b
1
static int dmg_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { BDRVDMGState *s = bs->opaque; uint64_t info_begin, info_end, last_in_offset, last_out_offset; uint32_t count, tmp; uint32_t max_compressed_size = 1, max_sectors_per_chunk = 1, i; int64_t offset; ...
25,692
FFmpeg
a2f680c7bc7642c687aeb4e14d00ac74833c7a09
0
int ff_mjpeg_decode_sof(MJpegDecodeContext *s) { int len, nb_components, i, width, height, pix_fmt_id; s->cur_scan = 0; s->upscale_h = s->upscale_v = 0; /* XXX: verify len field validity */ len = get_bits(&s->gb, 16); s->bits = get_bits(&s->gb, 8); if (s->pegasus_rct) ...
25,695
qemu
61007b316cd71ee7333ff7a0a749a8949527575f
0
void bdrv_set_on_error(BlockDriverState *bs, BlockdevOnError on_read_error, BlockdevOnError on_write_error) { bs->on_read_error = on_read_error; bs->on_write_error = on_write_error; }
25,696
qemu
4500bc98a6aab1734d865afaeade3509eb65b560
0
static void test_acpi_one(const char *params, test_data *data) { char *args; uint8_t signature_low; uint8_t signature_high; uint16_t signature; int i; const char *device = ""; if (!g_strcmp0(data->machine, MACHINE_Q35)) { device = ",id=hd -device ide-hd,drive=hd"; } ...
25,697
qemu
8caed3d564672e8bc6d2e4c6a35228afd01f4723
0
static void rocker_io_writel(void *opaque, hwaddr addr, uint32_t val) { Rocker *r = opaque; if (rocker_addr_is_desc_reg(r, addr)) { unsigned index = ROCKER_RING_INDEX(addr); unsigned offset = addr & ROCKER_DMA_DESC_MASK; switch (offset) { case ROCKER_DMA_DESC_ADDR_OFFS...
25,698
qemu
5151355898699eb66fad0a710b8b6011690a0dfc
0
build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets) { AcpiRsdtDescriptorRev1 *rsdt; size_t rsdt_len; int i; const int table_data_len = (sizeof(uint32_t) * table_offsets->len); rsdt_len = sizeof(*rsdt) + table_data_len; rsdt = acpi_data_push(table_data, rsdt_len); ...
25,699
qemu
f53a829bb9ef14be800556cbc02d8b20fc1050a7
0
int nbd_client_session_co_writev(NbdClientSession *client, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov) { int offset = 0; int ret; while (nb_sectors > NBD_MAX_SECTORS) { ret = nbd_co_writev_1(client, sector_num, NBD_MAX...
25,700
qemu
4be746345f13e99e468c60acbd3a355e8183e3ce
0
static int scsi_disk_emulate_mode_sense(SCSIDiskReq *r, uint8_t *outbuf) { SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev); uint64_t nb_sectors; bool dbd; int page, buflen, ret, page_control; uint8_t *p; uint8_t dev_specific_param; dbd = (r->req.cmd.buf[1] & 0x8) != 0...
25,701
qemu
32bafa8fdd098d52fbf1102d5a5e48d29398c0aa
0
static void qemu_chr_parse_pipe(QemuOpts *opts, ChardevBackend *backend, Error **errp) { const char *device = qemu_opt_get(opts, "path"); ChardevHostdev *dev; if (device == NULL) { error_setg(errp, "chardev: pipe: no device path given"); return; ...
25,702
FFmpeg
6a63ff19b6a7fe3bc32c7fb4a62fca8f65786432
0
static int mov_read_stts(MOVContext *c, ByteIOContext *pb, MOVAtom atom) { AVStream *st = c->fc->streams[c->fc->nb_streams-1]; MOVStreamContext *sc = st->priv_data; unsigned int i, entries; int64_t duration=0; int64_t total_sample_count=0; get_byte(pb); /* version */ get_be24(pb); ...
25,703
qemu
a89f364ae8740dfc31b321eed9ee454e996dc3c1
0
static void bt_submit_sco(struct HCIInfo *info, const uint8_t *data, int length) { struct bt_hci_s *hci = hci_from_info(info); uint16_t handle; int datalen; if (length < 3) return; handle = acl_handle((data[1] << 8) | data[0]); datalen = data[2]; length ...
25,705
qemu
334e8dad7a109d15cb20b090131374ae98682a50
0
static void do_v7m_exception_exit(ARMCPU *cpu) { CPUARMState *env = &cpu->env; uint32_t type; uint32_t xpsr; bool ufault = false; bool return_to_sp_process = false; bool return_to_handler = false; bool rettobase = false; /* We can only get here from an EXCP_EXCEPTION_EXIT, and...
25,707
qemu
713d9675e0e31c627d08b6a33d3a92e4b8505b40
0
static int check_refcounts_l2(BlockDriverState *bs, BdrvCheckResult *res, uint16_t *refcount_table, int refcount_table_size, int64_t l2_offset, int flags) { BDRVQcowState *s = bs->opaque; uint64_t *l2_table, l2_entry; uint64_t next_contiguous_offset = 0; int i, l2_size, nb_csectors; ...
25,708
qemu
7385aed20db5d83979f683b9d0048674411e963c
0
static inline void gen_op_fcmpq(int fccno) { switch (fccno) { case 0: gen_helper_fcmpq(cpu_env); break; case 1: gen_helper_fcmpq_fcc1(cpu_env); break; case 2: gen_helper_fcmpq_fcc2(cpu_env); break; case 3: gen_helper_fcmpq_fcc3(cpu...
25,709
qemu
494a8ebe713055d3946183f4b395f85a18b43e9e
0
static int proxy_closedir(FsContext *ctx, V9fsFidOpenState *fs) { return closedir(fs->dir); }
25,712
qemu
d861b05ea30e6ac177de9b679da96194ebe21afc
1
static int ne2000_can_receive(void *opaque) { NE2000State *s = opaque; int avail, index, boundary; if (s->cmd & E8390_STOP) return 0; index = s->curpag << 8; boundary = s->boundary << 8; if (index < boundary) avail = boundary - index; else avail = (s-...
25,715
qemu
47d4be12c3997343e436c6cca89aefbbbeb70863
1
static void test_qemu_strtoll_invalid(void) { const char *str = " xxxx \t abc"; char f = 'X'; const char *endptr = &f; int64_t res = 999; int err; err = qemu_strtoll(str, &endptr, 0, &res); g_assert_cmpint(err, ==, 0); g_assert(endptr == str); }
25,716
FFmpeg
7cc84d241ba6ef8e27e4d057176a4ad385ad3d59
1
static int decode_i_picture_secondary_header(VC9Context *v) { int status; #if HAS_ADVANCED_PROFILE if (v->profile > PROFILE_MAIN) { v->s.ac_pred = get_bits(&v->s.gb, 1); if (v->postprocflag) v->postproc = get_bits(&v->s.gb, 1); /* 7.1.1.34 + 8.5.2 */ if (v->overlap &...
25,718
qemu
297a3646c2947ee64a6d42ca264039732c6218e0
1
void visit_type_enum(Visitor *v, int *obj, const char *strings[], const char *kind, const char *name, Error **errp) { if (!error_is_set(errp)) { v->type_enum(v, obj, strings, kind, name, errp); } }
25,719
FFmpeg
4ed899f2c5848b75b61d13ad42942ecc2a4386f9
1
static AVStream *get_subtitle_pkt(AVFormatContext *s, AVStream *next_st, AVPacket *pkt) { AVIStream *ast, *next_ast = next_st->priv_data; int64_t ts, next_ts, ts_min = INT64_MAX; AVStream *st, *sub_st = NULL; int i; next_ts = av_rescale_q(next_ast->frame_of...
25,720
qemu
77cb0f5aafc8e6d0c6d3c339f381c9b7921648e0
1
static void adb_keyboard_event(DeviceState *dev, QemuConsole *src, InputEvent *evt) { KBDState *s = (KBDState *)dev; int qcode, keycode; qcode = qemu_input_key_value_to_qcode(evt->u.key.data->key); if (qcode >= ARRAY_SIZE(qcode_to_adb_keycode)) { return; ...
25,721
FFmpeg
daa1ea049a9445b7bed03963cb789497065dd1eb
0
void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) { mm_flags = mm_support(); if (avctx->dsp_mask) { if (avctx->dsp_mask & FF_MM_FORCE) mm_flags |= (avctx->dsp_mask & 0xffff); else mm_flags &= ~(avctx->dsp_mask & 0xffff); } #if 0 av_log(avct...
25,722
qemu
0b8b8753e4d94901627b3e86431230f2319215c4
1
static void iscsi_retry_timer_expired(void *opaque) { struct IscsiTask *iTask = opaque; iTask->complete = 1; if (iTask->co) { qemu_coroutine_enter(iTask->co, NULL); } }
25,723
qemu
aedbe19297907143f17b733a7ff0e0534377bed1
1
int qemu_shutdown_requested_get(void) { return shutdown_requested; }
25,725
FFmpeg
2da0d70d5eebe42f9fcd27ee554419ebe2a5da06
1
static inline void RENAME(rgb15ToY)(uint8_t *dst, uint8_t *src, int width) { int i; for(i=0; i<width; i++) { int d= ((uint16_t*)src)[i]; int r= d&0x1F; int g= (d>>5)&0x1F; int b= (d>>10)&0x1F; dst[i]= ((RY*r + GY*g + BY*b)>>(RGB2YUV_SHIFT-3)) + 16; } }
25,727
qemu
d3f8d37fe2d0c24ec8bac9c94d5b0e2dc09c0d2a
1
static int kvm_dirty_pages_log_change(target_phys_addr_t phys_addr, target_phys_addr_t end_addr, unsigned flags, unsigned mask) { KVMState *s = kvm_state; KVMSlot *mem = kvm_lookup_slot(s, phys_addr); if (mem == NULL) { ...
25,728
FFmpeg
d1adad3cca407f493c3637e20ecd4f7124e69212
0
static void RENAME(uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, long width, long height, long lumStride, long chromStride, long srcStride) { long y; const long chromWidth= -((-width)>>1); fo...
25,730
FFmpeg
757248ea3cd917a7755cb15f817a9b1f15578718
0
static int bayer_to_yv12_wrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]) { const uint8_t *srcPtr= src[0]; uint8_t *dstY= dst[0]; uint8_t *dstU= dst[1]; uint8_t *dstV= dst[2]; int i; ...
25,731
FFmpeg
e72662e131e5099e34d5a7519c5690d2fff7b83f
0
static int vaapi_encode_h264_init_picture_params(AVCodecContext *avctx, VAAPIEncodePicture *pic) { VAAPIEncodeContext *ctx = avctx->priv_data; VAEncSequenceParameterBufferH264 *vseq = ctx->codec_sequence_params; VAEncPictureParameterBuffer...
25,733
qemu
b0ad5a455d7e5352d4c86ba945112011dbeadfb8
1
static inline int is_bit_set(BlockDriverState *bs, int64_t bitnum) { uint64_t offset = sizeof(struct cow_header_v2) + bitnum / 8; uint8_t bitmap; if (bdrv_pread(bs->file, offset, &bitmap, sizeof(bitmap)) != sizeof(bitmap)) { return -errno; } return !!(bitmap & (1 << (bitnum %...
25,735
qemu
e4858974ec36afd8a6b3a9e2b0ad8f357f28efc7
1
bool st_init(const char *file) { pthread_t thread; pthread_attr_t attr; sigset_t set, oldset; int ret; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); sigfillset(&set); pthread_sigmask(SIG_SETMASK, &set, &oldset); ret = pthread_cre...
25,736
FFmpeg
2d40a09b6e73230b160a505f01ed1acf169e1d9f
1
static int libquvi_close(AVFormatContext *s) { LibQuviContext *qc = s->priv_data; if (qc->fmtctx) avformat_close_input(&qc->fmtctx); return 0; }
25,739
qemu
469f3da42ef4af347fa7831e1cc0bd35d17f5b83
1
static void aspeed_soc_class_init(ObjectClass *oc, void *data) { DeviceClass *dc = DEVICE_CLASS(oc); AspeedSoCClass *sc = ASPEED_SOC_CLASS(oc); sc->info = (AspeedSoCInfo *) data; dc->realize = aspeed_soc_realize; }
25,740
FFmpeg
ea4f8aabab2a5a7ebd232b45557c11c4c59c332b
1
static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer, struct in_addr my_ip) { AVFormatContext *avc; AVStream avs[MAX_STREAMS]; int i; avc = avformat_alloc_context(); if (avc == NULL) { return -1; } av_metadata_set2(&av...
25,742
FFmpeg
816577716bc6170bccfea3b9e865618b69a4b426
1
static int dvdsub_decode(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { DVDSubContext *ctx = avctx->priv_data; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; AVSubtitle *sub = data; int is_menu; if...
25,745
qemu
4482e05cbbb7e50e476f6a9500cf0b38913bd939
1
static void ibm_40p_init(MachineState *machine) { CPUPPCState *env = NULL; uint16_t cmos_checksum; PowerPCCPU *cpu; DeviceState *dev; SysBusDevice *pcihost; Nvram *m48t59 = NULL; PCIBus *pci_bus; ISABus *isa_bus; void *fw_cfg; int i; uint32_t kernel_base = 0, init...
25,746
qemu
e23a1b33b53d25510320b26d9f154e19c6c99725
1
static void *iommu_init(target_phys_addr_t addr, uint32_t version, qemu_irq irq) { DeviceState *dev; SysBusDevice *s; dev = qdev_create(NULL, "iommu"); qdev_prop_set_uint32(dev, "version", version); qdev_init(dev); s = sysbus_from_qdev(dev); sysbus_connect_irq(s, 0, irq); sysb...
25,747
qemu
47d4be12c3997343e436c6cca89aefbbbeb70863
1
static void test_qemu_strtoull_full_empty(void) { const char *str = ""; uint64_t res = 999; int err; err = qemu_strtoull(str, NULL, 0, &res); g_assert_cmpint(err, ==, 0); g_assert_cmpint(res, ==, 0); }
25,749
FFmpeg
9bcbb250e23959075765edd3cb4c1fcb46736d7d
0
static inline void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2, int dstWidth, const uint8_t *src1, const uint8_t *src2, int srcW, int xInc) { int32_t *filterPos = c->hChrFilterPos; int16_t *filter = c->h...
25,750
qemu
d4d34b0d3f5af5c8e09980da0de2eebe9a27dc71
0
static void get_pointer(Object *obj, Visitor *v, Property *prop, const char *(*print)(void *ptr), const char *name, Error **errp) { DeviceState *dev = DEVICE(obj); void **ptr = qdev_get_prop_ptr(dev, prop); char *p; p = (char *) (*ptr ? print(*ptr...
25,751
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
0
static uint64_t jazz_led_read(void *opaque, target_phys_addr_t addr, unsigned int size) { LedState *s = opaque; uint8_t val; val = s->segments; trace_jazz_led_read(addr, val); return val; }
25,752
qemu
e8ede0a8bb5298a6979bcf7ed84ef64a64a4e3fe
0
float32 HELPER(ucf64_divs)(float32 a, float32 b, CPUUniCore32State *env) { return float32_div(a, b, &env->ucf64.fp_status); }
25,754
qemu
fb7b5c0df6e3c501973ce4d57eb2b1d4344a519d
0
static void scsi_generic_class_initfn(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); SCSIDeviceClass *sc = SCSI_DEVICE_CLASS(klass); sc->realize = scsi_generic_realize; sc->unrealize = scsi_unrealize; sc->alloc_req = scsi_new_request; sc->parse_cdb ...
25,755
qemu
91479dd0b5bd3b087b92ddd7bc3f2c54982cfe17
0
START_TEST(qlist_destroy_test) { int i; QList *qlist; qlist = qlist_new(); for (i = 0; i < 42; i++) qlist_append(qlist, qint_from_int(i)); QDECREF(qlist); }
25,756
qemu
5fb6c7a8b26eab1a22207d24b4784bd2b39ab54b
0
static void vnc_client_read(void *opaque) { VncState *vs = opaque; long ret; buffer_reserve(&vs->input, 4096); #ifdef CONFIG_VNC_TLS if (vs->tls_session) { ret = gnutls_read(vs->tls_session, buffer_end(&vs->input), 4096); if (ret < 0) { if (ret == GNUTLS_E_AGAIN) errno = EAGAIN; ...
25,757
qemu
4171853cf4dfb88da93bf77a4c9d319d6ba2bdc6
0
POWERPC_FAMILY(e5500)(ObjectClass *oc, void *data) { DeviceClass *dc = DEVICE_CLASS(oc); PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc); dc->desc = "e5500 core"; pcc->init_proc = init_proc_e5500; pcc->check_pow = check_pow_none; pcc->insns_flags = PPC_INSNS_BASE | PPC_ISEL | ...
25,758
FFmpeg
a67304d05f11b2377bf157a356d7ebb00f3e06dd
0
void av_md5_update(AVMD5 *ctx, const uint8_t *src, int len) { const uint8_t *end; int j; j = ctx->len & 63; ctx->len += len; if (j) { int cnt = FFMIN(len, 64 - j); memcpy(ctx->block + j, src, cnt); src += cnt; len -= cnt; if (j + cnt < 64) ...
25,759
qemu
beb3faaa0027c114e37317fdba38a8a7facf3f9b
0
int main() { int rt, rs; int achi, acli; int dsp; int acho, aclo; int resulth, resultl; int resdsp; achi = 0x05; acli = 0xB4CB; rs = 0xFF06; rt = 0xCB00; resulth = 0x04; resultl = 0x947438CB; __asm ("mthi %2, $ac1\n\t" "mtlo %3, ...
25,760
qemu
27e0c9a1bbd166a67c16291016fba298a8e47140
0
int ide_init_drive(IDEState *s, BlockDriverState *bs, IDEDriveKind kind, const char *version, const char *serial) { int cylinders, heads, secs; uint64_t nb_sectors; s->bs = bs; s->drive_kind = kind; bdrv_get_geometry(bs, &nb_sectors); bdrv_guess_geometry(bs, &cylin...
25,761
qemu
517ff12c7d000fa1f5b1e989b22fb86a286f9cc2
0
int subch_device_load(SubchDev *s, QEMUFile *f) { SubchDev *old_s; Error *err = NULL; uint16_t old_schid = s->schid; uint16_t old_devno = s->devno; int i; s->cssid = qemu_get_byte(f); s->ssid = qemu_get_byte(f); s->schid = qemu_get_be16(f); s->devno = qemu_get_be16(f); ...
25,762