project
stringclasses
2 values
commit_id
stringlengths
40
40
target
int64
0
1
func
stringlengths
26
142k
idx
int64
0
27.3k
qemu
9e1c2ec8fd8d9a9ee299ea86c5f6c986fe25e838
1
static void pc_init_pci_1_3(QEMUMachineInitArgs *args) { enable_compat_apic_id_mode(); pc_sysfw_flash_vs_rom_bug_compatible = true; has_pvpanic = false; pc_init_pci(args); }
24,767
FFmpeg
0b42631641d998e509cde6fa344edc6ab5cb4ac8
0
static uint8_t get_sot(Jpeg2000DecoderContext *s, int n) { Jpeg2000TilePart *tp; uint16_t Isot; uint32_t Psot; uint8_t TPsot; if (s->buf_end - s->buf < 4) return AVERROR(EINVAL); Isot = bytestream_get_be16(&s->buf); // Isot if (Isot) { av_log(s->avctx, AV...
24,769
FFmpeg
ddbb7c9be2f8a006325ec64cd5b90e1ade5bc476
1
static int xa_probe(AVProbeData *p) { switch(AV_RL32(p->buf)) { case XA00_TAG: case XAI0_TAG: case XAJ0_TAG: return AVPROBE_SCORE_MAX; } return 0; }
24,770
qemu
53628efbc8aa7a7ab5354d24b971f4d69452151d
1
static void qemu_chr_fe_write_log(CharDriverState *s, const uint8_t *buf, size_t len) { size_t done = 0; ssize_t ret; if (s->logfd < 0) { return; } while (done < len) { do { ret = write(s->logfd, buf + done, len - done); ...
24,772
FFmpeg
3ed65d98c616d52e2544c8b81aa3997f28bb88f5
1
void av_vlog(void* avcl, int level, const char *fmt, va_list vl) { if(av_log_callback) av_log_callback(avcl, level, fmt, vl); }
24,773
qemu
e78815a554adaa551d62a71be10ee2fcf128e473
1
void kvm_setup_guest_memory(void *start, size_t size) { if (!kvm_has_sync_mmu()) { #ifdef MADV_DONTFORK int ret = madvise(start, size, MADV_DONTFORK); if (ret) { perror("madvice"); exit(1); } #else fprintf(stderr, "Need MADV_DONTFO...
24,774
FFmpeg
e9ba3098319f78c91470c05da988d865491852c5
0
static int read_packet(AVFormatContext *s, AVPacket *pkt) { ASSContext *ass = s->priv_data; uint8_t *p, *end; if (ass->event_index >= ass->event_count) return AVERROR(EIO); p = ass->event[ass->event_index]; end = strchr(p, '\n'); av_new_packet(pkt, end ? end - p + 1 : strle...
24,775
FFmpeg
d6604b29ef544793479d7fb4e05ef6622bb3e534
0
static av_cold int xwd_encode_close(AVCodecContext *avctx) { av_freep(&avctx->coded_frame); return 0; }
24,776
FFmpeg
7ece8b50b19e140ace13eda6f1a9f45f868c2528
1
av_cold void ff_idctdsp_init_x86(IDCTDSPContext *c, AVCodecContext *avctx, unsigned high_bit_depth) { int cpu_flags = av_get_cpu_flags(); if (INLINE_MMX(cpu_flags)) { if (!high_bit_depth && avctx->lowres == 0 && (avctx->idct_algo == FF_ID...
24,777
qemu
4f298a4b2957b7833bc607c951ca27c458d98d88
1
static void send_msg(IPMIBmcSim *ibs, uint8_t *cmd, unsigned int cmd_len, uint8_t *rsp, unsigned int *rsp_len, unsigned int max_rsp_len) { IPMIInterface *s = ibs->parent.intf; IPMIInterfaceClass *k = IPMI_INTERFACE_GET_CLASS(s); IPMIRcvBu...
24,778
FFmpeg
a2a12e3358c3bbdc0246ffc94973e58eba50ee30
1
static void render_slice(Vp3DecodeContext *s, int slice) { int x, y, i, j, fragment; LOCAL_ALIGNED_16(DCTELEM, block, [64]); int motion_x = 0xdeadbeef, motion_y = 0xdeadbeef; int motion_halfpel_index; uint8_t *motion_source; int plane, first_pixel; if (slice >= s->c_superblock_heig...
24,779
qemu
91a5bb76d47e1b06f0b7b67cae8497d8efc6ab87
1
static void disas_xtensa_insn(DisasContext *dc) { #define HAS_OPTION(opt) do { \ if (!option_enabled(dc, opt)) { \ qemu_log("Option %d is not enabled %s:%d\n", \ (opt), __FILE__, __LINE__); \ goto invalid_opcode; \ } \ } while (0) #ifdef TARGET_...
24,780
qemu
16e977d506bcc2d9f7daa4a9f7cc2b48536d9da6
1
void bdrv_invalidate_cache(BlockDriverState *bs, Error **errp) { BdrvChild *child; Error *local_err = NULL; int ret; if (!bs->drv) { return; } if (!(bs->open_flags & BDRV_O_INACTIVE)) { return; } bs->open_flags &= ~BDRV_O_INACTIVE; if (bs->drv->bdrv...
24,781
FFmpeg
79db7ac6ef235a06c3049d7792eda39da28ee3fd
1
static int context_init(H264Context *h){ MpegEncContext * const s = &h->s; CHECKED_ALLOCZ(h->top_borders[0], h->s.mb_width * (16+8+8) * sizeof(uint8_t)) CHECKED_ALLOCZ(h->top_borders[1], h->s.mb_width * (16+8+8) * sizeof(uint8_t)) // edge emu needs blocksize + filter length - 1 (=17x17 for halfp...
24,782
FFmpeg
f72e0d9a9f516be77d20c6a37dcd34add8f932e3
1
int ff_MPV_encode_picture(AVCodecContext *avctx, AVPacket *pkt, AVFrame *pic_arg, int *got_packet) { MpegEncContext *s = avctx->priv_data; int i, stuffing_count, ret; int context_count = s->slice_context_count; s->picture_in_gop_number++; if (load_input_picture(s...
24,783
FFmpeg
2d0b4bc4cf92dd961dbafbff3f1f4a9e08a9565b
0
static int check_slice_end(RV34DecContext *r, MpegEncContext *s) { int bits; if(s->mb_y >= s->mb_height) return 1; if(!s->mb_num_left) return 1; if(r->s.mb_skip_run > 1) return 0; bits = get_bits_left(&s->gb); if(bits < 0 || (bits < 8 && !show_bits(&s->gb, bits)...
24,784
FFmpeg
bb4c9d0a8ead02f7d943c2bae3e36b30e605b30b
0
static int alloc_frame_buffer(AVCodecContext *avctx, Picture *pic, MotionEstContext *me, ScratchpadContext *sc, int chroma_x_shift, int chroma_y_shift, int linesize, int uvlinesize) { int edges_needed = av_codec_is_encod...
24,785
FFmpeg
72dbc610be3272ba36603f78a39cc2d2d8fe0cc3
0
void ff_avg_h264_qpel4_mc32_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_midh_qrt_and_aver_dst_4w_msa(src - (2 * stride) - 2, stride, dst, stride, 4, 1); }
24,786
FFmpeg
e87190f5d20d380608f792ceb14d0def1d80e24b
0
static void show_programs(WriterContext *w, AVFormatContext *fmt_ctx) { int i; writer_print_section_header(w, SECTION_ID_PROGRAMS); for (i = 0; i < fmt_ctx->nb_programs; i++) { AVProgram *program = fmt_ctx->programs[i]; if (!program) continue; show_program(w, fm...
24,788
FFmpeg
66f26b3e8ec075298e7ba329a55893d085bafe96
0
static int put_flac_codecpriv(AVFormatContext *s, AVIOContext *pb, AVCodecContext *codec) { int write_comment = (codec->channel_layout && !(codec->channel_layout & ~0x3ffffULL) && !ff_flac_is_native_layout(codec->channel_layout)); ...
24,789
qemu
f8de16605cf9864e258d91e95be0ed76bdeac744
1
static uint64_t get_cluster_offset(BlockDriverState *bs, uint64_t offset, int *num) { BDRVQcowState *s = bs->opaque; int l1_index, l2_index; uint64_t l2_offset, *l2_table, cluster_offset; int l1_bits, c; int index_in_cluster, nb_available, nb_needed, nb_clusters; ...
24,791
FFmpeg
b2244fa0a624f7e38893d58265e9c039bed2e4de
1
static int rscc_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { RsccContext *ctx = avctx->priv_data; GetByteContext *gbc = &ctx->gbc; GetByteContext tiles_gbc; AVFrame *frame = data; const uint8_t *pixels, *raw; uint...
24,792
FFmpeg
1662bd350a470f1cbd5c2cc9a0e1bfaa8543033f
1
static int64_t wrap_timestamp(AVStream *st, int64_t timestamp) { if (st->pts_wrap_behavior != AV_PTS_WRAP_IGNORE && st->pts_wrap_bits < 64 && st->pts_wrap_reference != AV_NOPTS_VALUE && timestamp != AV_NOPTS_VALUE) { if (st->pts_wrap_behavior == AV_PTS_WRAP_ADD_OFFSET && timestamp <...
24,793
FFmpeg
8635954335061ea4c03d3f492b7bc803ea740d9c
1
static void write_section_data(AVFormatContext *s, MpegTSFilter *tss1, const uint8_t *buf, int buf_size, int is_start) { MpegTSContext *ts = s->priv_data; MpegTSSectionFilter *tss = &tss1->u.section_filter; int len; if (is_start) { memcpy(tss->section_buf,...
24,795
qemu
60fe637bf0e4d7989e21e50f52526444765c63b4
1
bool migrate_auto_converge(void) { MigrationState *s; s = migrate_get_current(); return s->enabled_capabilities[MIGRATION_CAPABILITY_AUTO_CONVERGE]; }
24,796
FFmpeg
529a25d6e5c3ff889257a57042872d84dc2312d5
1
static int dpcm_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; const uint8_t *buf_end = buf + buf_size; DPCMContext *s = avctx->priv_data; int out = 0, ret; ...
24,797
qemu
16fde5f2c2788232b16c06d34d0459a5c1ec1f6c
1
static int get_cluster_table(BlockDriverState *bs, uint64_t offset, uint64_t **new_l2_table, uint64_t *new_l2_offset, int *new_l2_index) { BDRVQcowState *s = bs->opaque; unsigned int l1_index, l2_index; uint64_t l2...
24,798
FFmpeg
f52fbf4f3ed02a7d872d8a102006f29b4421f360
1
static int decode_dds1(GetByteContext *gb, uint8_t *frame, int width, int height) { const uint8_t *frame_start = frame; const uint8_t *frame_end = frame + width * height; int mask = 0x10000, bitbuf = 0; int i, v, offset, count, segments; segments = bytestream2_get_le16(gb); while (seg...
24,799
FFmpeg
2b44dcbc44e99daf9515753e9fd4c2e1ea53a2fa
1
int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx, ShortTermRPS *rps, const HEVCSPS *sps, int is_slice_header) { uint8_t rps_predict = 0; int delta_poc; int k0 = 0; int k1 = 0; int k = 0; int i; if (rps != sps->st_rps && ...
24,800
qemu
7f1e9d4e138f5baf1e862a1221ba13eee7dcce9e
1
static ssize_t nic_receive(VLANClientState *vc, const uint8_t * buf, size_t size) { /* TODO: * - Magic packets should set bit 30 in power management driver register. * - Interesting packets should set bit 29 in power management driver register. */ EEPRO100State *s = vc->opaque; uint16_...
24,801
qemu
b9c600d20716b3d942cb07188ff998fb236a8365
1
static BlockAIOCB *read_quorum_children(QuorumAIOCB *acb) { BDRVQuorumState *s = acb->common.bs->opaque; int i; for (i = 0; i < s->num_children; i++) { acb->qcrs[i].buf = qemu_blockalign(s->children[i]->bs, acb->qiov->size); qemu_iovec_init(&acb->qcrs[i].qiov, acb->qiov->niov); ...
24,802
FFmpeg
09f20d37867baaa0122ffdd75f0481b2b3a08079
1
static int flac_decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) { FLACContext *s = avctx->priv_data; int metadata_last, metadata_type, metadata_size; int tmp = 0, i, j = 0, input_buf_size = 0; int1...
24,803
FFmpeg
fc4c27c4edfc6a5f9bc7c696e823652474a65ce8
0
static void dump_video_param(AVCodecContext *avctx, QSVEncContext *q, mfxExtBuffer **coding_opts) { mfxInfoMFX *info = &q->param.mfx; mfxExtCodingOption *co = (mfxExtCodingOption*)coding_opts[0]; #if QSV_HAVE_CO2 mfxExtCodingOption2 *co2 = (mfxExtCodingOption2*)coding_...
24,804
FFmpeg
8813d55fa5978660d9f4e7dbe1f50da9922be08d
0
static void *alloc_buffer(FFVAContext *vactx, int type, unsigned int size, uint32_t *buf_id) { void *data = NULL; *buf_id = 0; if (vaCreateBuffer(vactx->display, vactx->context_id, type, size, 1, NULL, buf_id) == VA_STATUS_SUCCESS) vaMapBuffer(vactx->display, *buf_id, ...
24,805
FFmpeg
8f0bd1d9bad5b8aa42b5b4cec103cc4afed5eab6
0
void ff_http_auth_handle_header(HTTPAuthState *state, const char *key, const char *value) { if (!strcmp(key, "WWW-Authenticate") || !strcmp(key, "Proxy-Authenticate")) { const char *p; if (av_stristart(value, "Basic ", &p) && state->auth_type <= HTTP...
24,807
FFmpeg
343e2833994655c252d5236a3394bf6db7a4d8b1
0
void ff_thread_report_progress(ThreadFrame *f, int n, int field) { PerThreadContext *p; atomic_int *progress = f->progress ? (atomic_int*)f->progress->data : NULL; if (!progress || atomic_load_explicit(&progress[field], memory_order_acquire) >= n) return; p = f->owner->interna...
24,808
FFmpeg
3896cd11a107f241f06b06a336322aef2f372fdd
1
static void mxf_write_system_item(AVFormatContext *s) { MXFContext *mxf = s->priv_data; AVIOContext *pb = s->pb; unsigned frame; uint32_t time_code; frame = mxf->last_indexed_edit_unit + mxf->edit_units_count; // write system metadata pack avio_write(pb, system_metadata_pack_key,...
24,809
qemu
f8ed85ac992c48814d916d5df4d44f9a971c5de4
1
petalogix_ml605_init(MachineState *machine) { ram_addr_t ram_size = machine->ram_size; MemoryRegion *address_space_mem = get_system_memory(); DeviceState *dev, *dma, *eth0; Object *ds, *cs; MicroBlazeCPU *cpu; SysBusDevice *busdev; DriveInfo *dinfo; int i; MemoryRegion *phy...
24,810
qemu
257a7375582e4c3b32687c72d0f52279d28b2d85
1
static FILE *probe_splashfile(char *filename, int *file_sizep, int *file_typep) { FILE *fp = NULL; int fop_ret; int file_size; int file_type = -1; unsigned char buf[2] = {0, 0}; unsigned int filehead_value = 0; int bmp_bpp; fp = fopen(filename, "rb"); if (fp == NULL) { ...
24,811
qemu
c508277335e3b6b20cf18e6ea3a35c1fa835c64a
1
vmxnet3_read_next_rx_descr(VMXNET3State *s, int qidx, int ridx, struct Vmxnet3_RxDesc *dbuf, uint32_t *didx) { Vmxnet3Ring *ring = &s->rxq_descr[qidx].rx_ring[ridx]; *didx = vmxnet3_ring_curr_cell_idx(ring); vmxnet3_ring_read_curr_cell(ring, dbuf); }
24,812
FFmpeg
17ae608127324cabd083202a32a8dc210d30c3a1
1
static av_cold int aac_encode_end(AVCodecContext *avctx) { AACEncContext *s = avctx->priv_data; ff_mdct_end(&s->mdct1024); ff_mdct_end(&s->mdct128); ff_psy_end(&s->psy); ff_psy_preprocess_end(s->psypp); av_freep(&s->samples); av_freep(&s->cpe); return 0; }
24,814
FFmpeg
5ff998a233d759d0de83ea6f95c383d03d25d88e
1
static int rice_count_exact(int32_t *res, int n, int k) { int i; int count = 0; for (i = 0; i < n; i++) { int32_t v = -2 * res[i] - 1; v ^= v >> 31; count += (v >> k) + 1 + k; } return count; }
24,816
qemu
2d896b454a0e19ec4c1ddbb0e0b65b7e54fcedf3
1
static uint64_t boston_lcd_read(void *opaque, hwaddr addr, unsigned size) { BostonState *s = opaque; uint64_t val = 0; switch (size) { case 8: val |= (uint64_t)s->lcd_content[(addr + 7) & 0x7] << 56; val |= (uint64_t)s->lcd_content[(addr + 6) & 0...
24,817
FFmpeg
5d20f19be25c973fe10d0d17db9245002585710d
1
static inline int mix_core(uint32_t multbl[][256], int a, int b, int c, int d){ #if CONFIG_SMALL #define ROT(x,s) ((x<<s)|(x>>(32-s))) return multbl[0][a] ^ ROT(multbl[0][b], 8) ^ ROT(multbl[0][c], 16) ^ ROT(multbl[0][d], 24); #else return multbl[0][a] ^ multbl[1][b] ^ multbl[2][c] ^ multbl[3][d]; #endif ...
24,819
FFmpeg
bad446e251405dc250c3cbee199072e083a1e4b9
1
void ff_generate_sliding_window_mmcos(H264Context *h) { MpegEncContext * const s = &h->s; assert(h->long_ref_count + h->short_ref_count <= h->sps.ref_frame_count); h->mmco_index= 0; if(h->short_ref_count && h->long_ref_count + h->short_ref_count == h->sps.ref_frame_count && !(FIELD_PI...
24,820
qemu
4118a97030aa9bd1d520d1d06bbe0655d829df04
1
static unsigned long copy_elf_strings(int argc,char ** argv, void **page, unsigned long p) { char *tmp, *tmp1, *pag = NULL; int len, offset = 0; if (!p) { return 0; /* bullet-proofing */ } while (argc-- > 0) { tmp = argv[argc]; ...
24,821
qemu
06065c451f10c7ef62cfb575a87f323a70ae1c9e
1
void fork_end(int child) { mmap_fork_end(child); if (child) { CPUState *cpu, *next_cpu; /* Child processes created by fork() only have a single thread. Discard information about the parent threads. */ CPU_FOREACH_SAFE(cpu, next_cpu) { if (cpu != thread_cpu...
24,822
FFmpeg
b737a2c52857b214be246ff615c6293730033cfa
1
static int mpc8_probe(AVProbeData *p) { const uint8_t *bs = p->buf + 4; const uint8_t *bs_end = bs + p->buf_size; int64_t size; if (p->buf_size < 16) return 0; if (AV_RL32(p->buf) != TAG_MPCK) return 0; while (bs < bs_end + 3) { int header_found = (bs[0] == 'S...
24,823
qemu
d07bde88a52bf293c3f8846cfd162e0a57e1557c
1
static TranslationBlock *tb_find_slow(target_ulong pc, target_ulong cs_base, uint64_t flags) { TranslationBlock *tb, **ptb1; int code_gen_size; unsigned int h; target_ulong phys_pc, phys_page1, phys_page2, virt_page2; ...
24,825
FFmpeg
002a7414b5852418f9a66245fc414c0416c4b4c1
0
static int decode_block(MJpegDecodeContext *s, DCTELEM *block, int component, int dc_index, int ac_index, int16_t *quant_matrix) { int code, i, j, level, val; VLC *ac_vlc; /* DC coef */ val = mjpeg_decode_dc(s, dc_index); if (val == 0xffff) { dprintf("error ...
24,826
FFmpeg
c453723ad7d14abc5e82677eebaa6025fa598f08
0
static int gif_read_image(GifState *s, AVFrame *frame) { int left, top, width, height, bits_per_pixel, code_size, flags; int is_interleaved, has_local_palette, y, pass, y1, linesize, n, i; uint8_t *ptr, *spal, *palette, *ptr1; left = bytestream_get_le16(&s->bytestream); top = bytestream_get_...
24,828
qemu
b027a538c6790bcfc93ef7f4819fe3e581445959
1
static int oss_poll_in (HWVoiceIn *hw) { OSSVoiceIn *oss = (OSSVoiceIn *) hw; return qemu_set_fd_handler (oss->fd, oss_helper_poll_in, NULL, NULL); }
24,831
FFmpeg
e9b8523d52ca84d5012168db24fec2d50e73cf22
1
static int parse_fade(struct sbg_parser *p, struct sbg_fade *fr) { struct sbg_fade f; if (lex_char(p, '<')) f.in = SBG_FADE_SILENCE; else if (lex_char(p, '-')) f.in = SBG_FADE_SAME; else if (lex_char(p, '=')) f.in = SBG_FADE_ADAPT; else return 0; if (...
24,832
qemu
f9a8b5530d438f836f9697639814f585aaec554d
1
void qdev_prop_register_global(GlobalProperty *prop) { QTAILQ_INSERT_TAIL(&global_props, prop, next); }
24,833
FFmpeg
d13a731fc149d3fdbe679078479ec1950674e762
1
int ff_hevc_decode_short_term_rps(HEVCContext *s, ShortTermRPS *rps, const HEVCSPS *sps, int is_slice_header) { HEVCLocalContext *lc = s->HEVClc; uint8_t rps_predict = 0; int delta_poc; int k0 = 0; int k1 = 0; int k = 0; int i; GetBitContext...
24,834
qemu
91bea4e2bb1a5f7954a3b3a4f2e28e96bd25c458
1
iscsi_aio_readv(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockDriverCompletionFunc *cb, void *opaque) { IscsiLun *iscsilun = bs->opaque; IscsiAIOCB *acb; acb = qemu_aio_get(&iscsi_aiocb_info, bs, cb, opaque); trace_iscs...
24,835
qemu
8a0f9b5263bb3a96d574ca78ad3b8f1d7bf8b12b
1
static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc, QemuConsole *con, int idx, GSList *group, GtkWidget *view_menu) { Error *local_err = NULL; Object *obj; obj = object_property_get_link(OBJECT(con), "device", &local_err);...
24,836
FFmpeg
6dd5371e34c6602591766f73aa647b369d77853b
1
int ff_tls_open_underlying(TLSShared *c, URLContext *parent, const char *uri, AVDictionary **options) { int port; const char *p; char buf[200], opts[50] = ""; struct addrinfo hints = { 0 }, *ai = NULL; const char *proxy_path; int use_proxy; set_options(c, uri); if (c->listen...
24,837
qemu
d3c64d6a1874f94246af91963927fb4d924332f1
1
static void x86_cpu_apic_init(X86CPU *cpu, Error **errp) { static int apic_mapped; CPUX86State *env = &cpu->env; APICCommonState *apic; const char *apic_type = "apic"; if (kvm_irqchip_in_kernel()) { apic_type = "kvm-apic"; } else if (xen_enabled()) { apic_type = "xen-a...
24,838
FFmpeg
eb5b0422b595d488f5c2f2a37a62cd46dfbb6aa7
0
static inline int clamp(int value, int min, int max) { if (value < min) return min; else if (value > max) return max; else return value; }
24,839
qemu
ffa48cf5ab719e1e181e51b87bc0f5d397b791fa
0
void audio_init(ISABus *isa_bus, PCIBus *pci_bus) { }
24,840
qemu
a89f364ae8740dfc31b321eed9ee454e996dc3c1
0
static void nand_command(NANDFlashState *s) { unsigned int offset; switch (s->cmd) { case NAND_CMD_READ0: s->iolen = 0; break; case NAND_CMD_READID: s->ioaddr = s->io; s->iolen = 0; nand_pushio_byte(s, s->manf_id); nand_pushio_byte(s, s->chip_...
24,841
qemu
c2b38b277a7882a592f4f2ec955084b2b756daaa
0
int64_t qemu_clock_deadline_ns_all(QEMUClockType type) { int64_t deadline = -1; QEMUTimerList *timer_list; QEMUClock *clock = qemu_clock_ptr(type); QLIST_FOREACH(timer_list, &clock->timerlists, list) { deadline = qemu_soonest_timeout(deadline, timer...
24,843
qemu
ddf21908961073199f3d186204da4810f2ea150b
0
UserDefTwo *qmp_user_def_cmd2(UserDefOne *ud1a, bool has_udb1, UserDefOne *ud1b, Error **errp) { UserDefTwo *ret; UserDefOne *ud1c = g_malloc0(sizeof(UserDefOne)); UserDefOne *ud1d = g_malloc0(sizeof(UserDefOne)); ud1c->string = strdup...
24,844
qemu
8d5c773e323b22402abdd0beef4c7d2fc91dd0eb
0
static void vmsa_ttbcr_raw_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value) { int maskshift = extract32(value, 0, 3); if (arm_feature(env, ARM_FEATURE_LPAE) && (value & (1 << 31))) { value &= ~((7 << 19) | (3 << 14) | (0xf << 3)); } else { ...
24,845
qemu
1945dbc15f0f1ffdc9a10526448e9eba7c599d98
0
static uint32_t openpic_cpu_read_internal(void *opaque, hwaddr addr, int idx) { openpic_t *opp = opaque; IRQ_src_t *src; IRQ_dst_t *dst; uint32_t retval; int n_IRQ; DPRINTF("%s: cpu %d addr " TARGET_FMT_plx "\n", __func__, idx, addr); retv...
24,846
FFmpeg
980bbb13d653561d83619350db32ccb5e5248f95
0
static int faac_decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) { FAACContext *s = (FAACContext *) avctx->priv_data; #ifndef FAAD2_VERSION unsigned long bytesconsumed; short *sample_buffer = NULL; ...
24,848
qemu
8df1426e44176512be1b6456e90d100d1af907e1
0
void pc_dimm_memory_plug(DeviceState *dev, MemoryHotplugState *hpms, MemoryRegion *mr, uint64_t align, Error **errp) { int slot; MachineState *machine = MACHINE(qdev_get_machine()); PCDIMMDevice *dimm = PC_DIMM(dev); Error *local_err = NULL; uint64_t existing_dimms_ca...
24,849
qemu
b75a02829dde98723dfe16fa098338cb267b28b9
0
static BOOL WINAPI qemu_ctrl_handler(DWORD type) { exit(STATUS_CONTROL_C_EXIT); return TRUE; }
24,850
qemu
a178274efabcbbc5d44805b51def874e47051325
0
static int spapr_phb_init(SysBusDevice *s) { sPAPRPHBState *sphb = SPAPR_PCI_HOST_BRIDGE(s); PCIHostState *phb = PCI_HOST_BRIDGE(s); char *namebuf; int i; PCIBus *bus; sphb->dtbusname = g_strdup_printf("pci@%" PRIx64, sphb->buid); namebuf = alloca(strlen(sphb->dtbusname) + 32); ...
24,851
qemu
203d65a4706be345c209f3408d3a011a3e48f0c9
0
static void imx_epit_write(void *opaque, hwaddr offset, uint64_t value, unsigned size) { IMXEPITState *s = IMX_EPIT(opaque); uint32_t reg = offset >> 2; uint64_t oldcr; DPRINTF("(%s, value = 0x%08x)\n", imx_epit_reg_name(reg), (uint32_t)value); switch (reg) { ...
24,852
qemu
17bb18ce16b45e61248c5238074fa9cf8bc547bf
0
uint32_t HELPER(rrbe)(uint32_t r1, uint64_t r2) { if (r2 > ram_size) { return 0; } /* XXX implement */ #if 0 env->storage_keys[r2 / TARGET_PAGE_SIZE] &= ~SK_REFERENCED; #endif /* * cc * * 0 Reference bit zero; change bit zero * 1 Reference bit zero; cha...
24,854
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
0
static void ivshmem_io_write(void *opaque, target_phys_addr_t addr, uint64_t val, unsigned size) { IVShmemState *s = opaque; uint16_t dest = val >> 16; uint16_t vector = val & 0xff; addr &= 0xfc; IVSHMEM_DPRINTF("writing to addr " TARGET_FMT_plx "\n", addr);...
24,856
qemu
6735aa99a43c70c09b53af190b24600a61178b95
0
SpiceInfo *qmp_query_spice(Error **errp) { QemuOpts *opts = QTAILQ_FIRST(&qemu_spice_opts.head); int port, tls_port; const char *addr; SpiceInfo *info; char version_string[20]; /* 12 = |255.255.255\0| is the max */ info = g_malloc0(sizeof(*info)); if (!spice_server || !opts) { ...
24,857
qemu
26a83ad0e793465b74a8b06a65f2f6fdc5615413
0
void memory_region_init_rom_device(MemoryRegion *mr, const MemoryRegionOps *ops, void *opaque, const char *name, uint64_t size) { memory_region_init(mr, name, size); ...
24,858
FFmpeg
3df18b3ed1177037892ce5b3db113d52dcdcdbf3
0
av_cold int ff_rv34_decode_init(AVCodecContext *avctx) { RV34DecContext *r = avctx->priv_data; MpegEncContext *s = &r->s; MPV_decode_defaults(s); s->avctx= avctx; s->out_format = FMT_H263; s->codec_id= avctx->codec_id; s->width = avctx->width; s->height = avctx->height; ...
24,860
FFmpeg
486637af8ef29ec215e0e0b7ecd3b5470f0e04e5
0
static inline void mix_2f_2r_to_stereo(AC3DecodeContext *ctx) { int i; float (*output)[256] = ctx->audio_block.block_output; for (i = 0; i < 256; i++) { output[1][i] += output[3][i]; output[2][i] += output[4][i]; } memset(output[3], 0, sizeof(output[3])); memset(output...
24,861
qemu
b035ffd11813524d7c0e44354f5c4bdd281f4b37
0
void *qemu_vmalloc(size_t size) { void *p; unsigned long addr; mmap_lock(); /* Use map and mark the pages as used. */ p = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); addr = (unsigned long)p; if (addr == (target_ulong) addr) { /* ...
24,862
qemu
210b580b106fa798149e28aa13c66b325a43204e
0
static void rtas_query_cpu_stopped_state(sPAPREnvironment *spapr, uint32_t token, uint32_t nargs, target_ulong args, uint32_t nret, target_ulong rets) { target_ulong id; CPUState *cpu...
24,864
qemu
5255fcf8e47acd059e2f0d414841c40231c1bd22
0
static void nvic_recompute_state(NVICState *s) { int i; int pend_prio = NVIC_NOEXC_PRIO; int active_prio = NVIC_NOEXC_PRIO; int pend_irq = 0; for (i = 1; i < s->num_irq; i++) { VecInfo *vec = &s->vectors[i]; if (vec->enabled && vec->pending && vec->prio < pend_prio) { ...
24,866
qemu
e95ead32efc48157de12e0a257ea1c52541a6ce1
0
static int local_fsync(FsContext *ctx, int fd) { if (0) /* Just to supress the warning. Will be removed in next patch. */ (void)local_set_xattr(NULL, NULL); return fsync(fd); }
24,867
qemu
7d5e199ade76c53ec316ab6779800581bb47c50a
0
void qmp_blockdev_add(BlockdevOptions *options, Error **errp) { BlockDriverState *bs; QObject *obj; Visitor *v = qmp_output_visitor_new(&obj); QDict *qdict; Error *local_err = NULL; visit_type_BlockdevOptions(v, NULL, &options, &local_err); if (local_err) { error_propagate...
24,868
FFmpeg
d8013f38ab73b15c5041f2489fc0b8bb45512e24
0
static int segment_start(AVFormatContext *s) { SegmentContext *seg = s->priv_data; AVFormatContext *oc = seg->avf; int err = 0; if (seg->wrap) seg->number %= seg->wrap; if (av_get_frame_filename(oc->filename, sizeof(oc->filename), s->filename, seg->n...
24,869
FFmpeg
708ed15d8ccd5ae3d073cbd4dc69dafccec3fcc7
0
static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { mp_image_t *dmpi; if (vf->priv->in.fmt == vf->priv->out.fmt) { //nothing to do dmpi = mpi; } else { int out_off_left, out_off_right; int in_off_left = vf->priv->in.row_left * mpi->stride[0] + ...
24,870
qemu
7df9381b7aa56c897e344f3bfe43bf5848bbd3e0
0
static void vfio_platform_realize(DeviceState *dev, Error **errp) { VFIOPlatformDevice *vdev = VFIO_PLATFORM_DEVICE(dev); SysBusDevice *sbdev = SYS_BUS_DEVICE(dev); VFIODevice *vbasedev = &vdev->vbasedev; int i, ret; vbasedev->type = VFIO_DEVICE_TYPE_PLATFORM; vbasedev->ops = &vfio_plat...
24,871
qemu
d2ca7c0b0d876cf0e219ae7a92252626b0913a28
0
void json_lexer_destroy(JSONLexer *lexer) { QDECREF(lexer->token); }
24,873
qemu
7ba7974197090285fdb413c6e1c41aaacd44b9c4
0
static void pcnet_ioport_write(void *opaque, target_phys_addr_t addr, uint64_t data, unsigned size) { PCNetState *d = opaque; if (addr < 16 && size == 1) { return pcnet_aprom_writeb(d, addr, data); } else if (addr >= 0x10 && addr < 0x20 && size == 2) { ...
24,874
qemu
ef1e1e0782e99c9dcf2b35e5310cdd8ca9211374
0
build_hash_table (const sparc_opcode **opcode_table, sparc_opcode_hash **hash_table, int num_opcodes) { int i; int hash_count[HASH_SIZE]; static sparc_opcode_hash *hash_buf = NULL; /* Start at the end of the table and work backwards so that each chain is sorted...
24,875
qemu
f53a829bb9ef14be800556cbc02d8b20fc1050a7
0
void nbd_export_close(NBDExport *exp) { NBDClient *client, *next; nbd_export_get(exp); QTAILQ_FOREACH_SAFE(client, &exp->clients, next, next) { nbd_client_close(client); } nbd_export_set_name(exp, NULL); nbd_export_put(exp); if (exp->blk) { blk_remove_aio_context_...
24,876
qemu
31b2b0f8463533c32b5ad76e73668e2e9fca8ae2
0
static void gen_spr_power8_book4(CPUPPCState *env) { /* Add a number of P8 book4 registers */ #if !defined(CONFIG_USER_ONLY) spr_register_kvm(env, SPR_ACOP, "ACOP", SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, &spr_write_generic, KVM_REG_PP...
24,877
qemu
d4c430a80f000d722bb70287af4d4c184a8d7006
0
int cpu_m68k_handle_mmu_fault (CPUState *env, target_ulong address, int rw, int mmu_idx, int is_softmmu) { int prot; address &= TARGET_PAGE_MASK; prot = PAGE_READ | PAGE_WRITE; return tlb_set_page(env, address, address, prot, mmu_idx, is_softmmu); }
24,878
qemu
1ac157da77c863b62b1d2f467626a440d57cf17d
0
void helper_movl_crN_T0(int reg) { env->cr[reg] = T0; switch(reg) { case 0: cpu_x86_update_cr0(env); break; case 3: cpu_x86_update_cr3(env); break; } }
24,879
qemu
0e1a46bbd2d6c39614b87f4e88ea305acce8a35f
0
static bool pmsav7_needed(void *opaque) { ARMCPU *cpu = opaque; CPUARMState *env = &cpu->env; return arm_feature(env, ARM_FEATURE_PMSA) && arm_feature(env, ARM_FEATURE_V7); }
24,882
qemu
b227a8e9aa5f27d29f77ba90d5eb9d0662a1175e
0
int mmu40x_get_physical_address (CPUState *env, mmu_ctx_t *ctx, target_ulong address, int rw, int access_type) { ppcemb_tlb_t *tlb; target_phys_addr_t raddr; int i, ret, zsel, zpr; ret = -1; raddr = -1; for (i = 0; i < env->nb_tlb; i++) { tlb =...
24,883
qemu
81ffbf5ab1458e357a761f1272105a55829b351e
0
static struct dirent *local_readdir(FsContext *ctx, V9fsFidOpenState *fs) { struct dirent *entry; again: entry = readdir(fs->dir.stream); if (!entry) { return NULL; } if (ctx->export_flags & V9FS_SM_MAPPED) { entry->d_type = DT_UNKNOWN; } else if (ctx->export_flags ...
24,884
qemu
b190f477e29c7cd03a8fee49c96d27f160e3f5b0
1
static void tricore_cpu_class_init(ObjectClass *c, void *data) { TriCoreCPUClass *mcc = TRICORE_CPU_CLASS(c); CPUClass *cc = CPU_CLASS(c); DeviceClass *dc = DEVICE_CLASS(c); mcc->parent_realize = dc->realize; dc->realize = tricore_cpu_realizefn; mcc->parent_reset = cc->reset; cc-...
24,886
FFmpeg
a8d8e868c6154f63a9229f913434aaa21833e488
1
static int udp_open(URLContext *h, const char *uri, int flags) { char hostname[1024], localaddr[1024] = ""; int port, udp_fd = -1, tmp, bind_ret = -1; UDPContext *s = h->priv_data; int is_output; const char *p; char buf[256]; struct sockaddr_storage my_addr; int len; int re...
24,887
FFmpeg
6f8ef5320f4d435803482ed322f3de45e6ea125c
1
static int vc1_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size, n_slices = 0, i; VC1Context *v = avctx->priv_data; MpegEncContext *s = &v->s; AVFrame *pict = data; ...
24,888
FFmpeg
d47e14b53a3908e5bad82e22129bbd175b49e89b
1
int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; MpegEncContext *s = avctx->priv_data; int ret; AVFrame *pict = data; s...
24,889
FFmpeg
345cfd04d093d9fdec81ea3531e73b1f5c1b6a6c
1
void avcodec_free_context(AVCodecContext **pavctx) { AVCodecContext *avctx = *pavctx; if (!avctx) return; avcodec_close(avctx); av_freep(&avctx->extradata); av_freep(&avctx->subtitle_header); av_freep(pavctx); }
24,890