project
stringclasses
2 values
commit_id
stringlengths
40
40
target
int64
0
1
func
stringlengths
26
142k
idx
int64
0
27.3k
FFmpeg
2d99101d0964f754822fb4af121c4abc69047dba
0
static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame, AVPacket *avpkt) { KmvcContext *const ctx = avctx->priv_data; AVFrame *frame = data; uint8_t *out, *src; int i, ret; int header; int blocksize; const uint8_t *pal = av_packet_get_side...
11,083
FFmpeg
e53c9065ca08a9153ecc73a6a8940bcc6d667e58
0
static int test_vector_fmul(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, const float *v1, const float *v2) { LOCAL_ALIGNED(32, float, cdst, [LEN]); LOCAL_ALIGNED(32, float, odst, [LEN]); int ret; cdsp->vector_fmul(cdst, v1, v2, LEN); fdsp->vector_fmul(odst, ...
11,085
FFmpeg
f929ab0569ff31ed5a59b0b0adb7ce09df3fca39
0
static int vc1_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size, n_slices = 0, i, ret; VC1Context *v = avctx->priv_data; MpegEncContext *s = &v->s; AVFrame *pict = data; ...
11,086
FFmpeg
40a7700b82aec0036622f8673ce64e070a520891
0
static int flac_write_block_comment(AVIOContext *pb, AVDictionary **m, int last_block, int bitexact) { const char *vendor = bitexact ? "ffmpeg" : LIBAVFORMAT_IDENT; unsigned int len; uint8_t *p, *p0; ff_metadata_conv(m, ff_vorbiscomment_metadata_conv, NULL); ...
11,088
FFmpeg
c131a9fead5bf63215b6e1172b3c5c183cf90b85
0
static void modified_levinson_durbin(int *window, int window_entries, int *out, int out_entries, int channels, int *tap_quant) { int i; int *state = av_calloc(window_entries, sizeof(*state)); memcpy(state, window, 4* window_entries); for (i = 0; i < out_entries; i++) { in...
11,089
FFmpeg
19660a887677bdf22593cb89753f13db7f525358
0
void av_url_split(char *proto, int proto_size, char *authorization, int authorization_size, char *hostname, int hostname_size, int *port_ptr, char *path, int path_size, const char *url) { const char *p, *ls, *ls2, *at, ...
11,090
qemu
fa1298c2d623522eda7b4f1f721fcb935abb7360
1
static void ohci_bus_stop(OHCIState *ohci) { trace_usb_ohci_stop(ohci->name); if (ohci->eof_timer) { timer_del(ohci->eof_timer); timer_free(ohci->eof_timer); } ohci->eof_timer = NULL; }
11,091
FFmpeg
aba232cfa9b193604ed98f3fa505378d006b1b3b
1
static int avisynth_read_header(AVFormatContext *s) { AVISynthContext *avs = s->priv_data; HRESULT res; AVIFILEINFO info; DWORD id; AVStream *st; AVISynthStream *stream; wchar_t filename_wchar[1024] = { 0 }; char filename_char[1024] = { 0 }; AVIFileInit(); /* avisynth can't accept UTF...
11,092
qemu
66dc50f7057b9a0191f54e55764412202306858d
1
void ioinst_handle_rsch(S390CPU *cpu, uint64_t reg1) { int cssid, ssid, schid, m; SubchDev *sch; int ret = -ENODEV; int cc; if (ioinst_disassemble_sch_ident(reg1, &m, &cssid, &ssid, &schid)) { program_interrupt(&cpu->env, PGM_OPERAND, 4); return; } trace_ioinst_sc...
11,093
qemu
ce137829e7e58fcdc5ba63b5e256f972e80be438
1
static int commit_one_file(BDRVVVFATState* s, int dir_index, uint32_t offset) { direntry_t* direntry = array_get(&(s->directory), dir_index); uint32_t c = begin_of_direntry(direntry); uint32_t first_cluster = c; mapping_t* mapping = find_mapping_for_cluster(s, c); uint32_t size = filesize_of...
11,094
qemu
5421f318ecc82294ad089fd54924df787b67c971
1
static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg) { CharDriverState *chr = dev->opaque; uint8_t *p = (uint8_t *) msg; int r, size = VHOST_USER_HDR_SIZE; r = qemu_chr_fe_read_all(chr, p, size); if (r != size) { error_report("Failed to read msg header. Read %d inste...
11,096
FFmpeg
fd8b90f5f63de12c1ee1ec1cbe99791c5629c582
1
av_cold void ff_vp9dsp_init_x86(VP9DSPContext *dsp, int bpp) { #if HAVE_YASM int cpu_flags; if (bpp != 8) return; cpu_flags = av_get_cpu_flags(); #define init_fpel(idx1, idx2, sz, type, opt) \ dsp->mc[idx1][FILTER_8TAP_SMOOTH ][idx2][0][0] = \ dsp->mc[idx1][FILTER_8TAP_REGULAR][idx2][0][...
11,097
qemu
2f6f826e03e09eb3b65b3a764580d66b857e3a23
1
MemdevList *qmp_query_memdev(Error **errp) { Object *obj; MemdevList *list = NULL; obj = object_get_objects_root(); if (obj == NULL) { return NULL; } if (object_child_foreach(obj, query_memdev, &list) != 0) { goto error; } return list; error: qapi...
11,098
qemu
4482e05cbbb7e50e476f6a9500cf0b38913bd939
1
static void create_cpu_without_cps(const char *cpu_model, qemu_irq *cbus_irq, qemu_irq *i8259_irq) { CPUMIPSState *env; MIPSCPU *cpu; int i; for (i = 0; i < smp_cpus; i++) { cpu = cpu_mips_init(cpu_model); if (cpu == NULL) { fprin...
11,099
FFmpeg
559c244d42be7a02c23976216b47fd63b80d6c7f
1
static void qmf_32_subbands(DCAContext * s, int chans, float samples_in[32][8], float *samples_out, float scale) { const float *prCoeff; int i; int sb_act = s->subband_activity[chans]; int subindex; scale *= sqrt(1/8.0); /* S...
11,100
FFmpeg
e7834d29f2a8f572a5bdf173d56b5a9b5af16043
1
static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref) { AVFilterContext *ctx = inlink->dst; SeparateFieldsContext *sf = ctx->priv; AVFilterLink *outlink = ctx->outputs[0]; AVFrame *second; int i, ret; inpicref->height = outlink->h; inpicref->interlaced_frame = 0; ...
11,101
qemu
94e7340b5db8bce7866e44e700ffa8fd26585c7e
1
int nbd_receive_reply(int csock, struct nbd_reply *reply) { uint8_t buf[NBD_REPLY_SIZE]; uint32_t magic; memset(buf, 0xAA, sizeof(buf)); if (read_sync(csock, buf, sizeof(buf)) != sizeof(buf)) { LOG("read failed"); errno = EINVAL; return -1; } /* Reply ...
11,102
FFmpeg
a8f171151f0f027abb06f72e48c44929616a84cb
0
static int file_write(URLContext *h, const unsigned char *buf, int size) { FileContext *c = h->priv_data; int r = write(c->fd, buf, size); return (-1 == r)?AVERROR(errno):r; }
11,103
FFmpeg
3b6c5ad2f67cc8eeeec89fb9d497ec79c1f3948a
0
static void calc_transform_coeffs_cpl(AC3DecodeContext *s) { int bin, band, ch, band_end; bin = s->start_freq[CPL_CH]; for (band = 0; band < s->num_cpl_bands; band++) { band_end = bin + s->cpl_band_sizes[band]; for (; bin < band_end; bin++) { for (ch = 1; ch <= s->fbw_ch...
11,104
FFmpeg
f41e37b84f3d57c29d4a2a21f9337159135b981d
0
int ff_dirac_golomb_read_16bit(DiracGolombLUT *lut_ctx, const uint8_t *buf, int bytes, uint8_t *_dst, int coeffs) { int i, b, c_idx = 0; int16_t *dst = (int16_t *)_dst; DiracGolombLUT *future[4], *l = &lut_ctx[2*LUT_SIZE + buf[0]]; INIT_RESIDUE(res); for (b = ...
11,105
FFmpeg
4678339e745dac8fa4288541b79f1577f19bb4c2
1
void ff_celt_quant_bands(CeltFrame *f, OpusRangeCoder *rc) { float lowband_scratch[8 * 22]; float norm1[2 * 8 * 100]; float *norm2 = norm1 + 8 * 100; int totalbits = (f->framebits << 3) - f->anticollapse_needed; int update_lowband = 1; int lowband_offset = 0; int i, j; f...
11,106
qemu
387eedebf60a463ba30833588f10123da296ba4d
1
MigrationCapabilityStatusList *qmp_query_migrate_capabilities(Error **errp) { MigrationCapabilityStatusList *head = NULL; MigrationCapabilityStatusList *caps; MigrationState *s = migrate_get_current(); int i; for (i = 0; i < MIGRATION_CAPABILITY_MAX; i++) { if (head == NULL) { ...
11,107
qemu
53111180946a56d314a9c1d07d09b9ef91e847b9
1
static void armv7m_nvic_class_init(ObjectClass *klass, void *data) { NVICClass *nc = NVIC_CLASS(klass); DeviceClass *dc = DEVICE_CLASS(klass); SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(klass); nc->parent_reset = dc->reset; nc->parent_init = sdc->init; sdc->init = armv7m_nvic_init; ...
11,108
qemu
ecca3b397d06a957b18913ff9afc63860001cfdf
1
static void ide_sector_write_cb(void *opaque, int ret) { IDEState *s = opaque; int n; if (ret == -ECANCELED) { return; } block_acct_done(blk_get_stats(s->blk), &s->acct); s->pio_aiocb = NULL; s->status &= ~BUSY_STAT; if (ret != 0) { if (ide_handle_rw_erro...
11,109
FFmpeg
494bce6224c7da6a174fb16a49ed26e5aab32af1
1
static int init_ralf_vlc(VLC *vlc, const uint8_t *data, int elems) { uint8_t lens[MAX_ELEMS]; uint16_t codes[MAX_ELEMS]; int counts[17], prefixes[18]; int i, cur_len; int max_bits = 0; GetBitContext gb; init_get_bits(&gb, data, elems * 4); for (i = 0; i <= 16; i++) ...
11,110
qemu
f6ec953ca329d4509e5a1a1ff051365fccdbb6b7
1
static int ioreq_runio_qemu_sync(struct ioreq *ioreq) { struct XenBlkDev *blkdev = ioreq->blkdev; int i, rc, len = 0; off_t pos; if (ioreq->req.nr_segments && ioreq_map(ioreq) == -1) goto err; if (ioreq->presync) bdrv_flush(blkdev->bs); switch (ioreq->req.operation) { case BL...
11,111
FFmpeg
89725a8512721fffd190021ded2d3f5b42e20e2a
1
static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx) { VAAPIEncodeContext *ctx = avctx->priv_data; VAEncSequenceParameterBufferH264 *vseq = ctx->codec_sequence_params; VAEncPictureParameterBufferH264 *vpic = ctx->codec_picture_params; VAAPIEncodeH264Context ...
11,112
qemu
e122636562218b3d442cd2cd18fbc188dd9ce709
1
static void socket_start_outgoing_migration(MigrationState *s, SocketAddress *saddr, Error **errp) { QIOChannelSocket *sioc = qio_channel_socket_new(); qio_channel_socket_connect_async(sioc, ...
11,114
qemu
f9dbc19e8bf58d0cbc830083352475bb16f315c4
1
void qdist_bin__internal(struct qdist *to, const struct qdist *from, size_t n) { double xmin, xmax; double step; size_t i, j; qdist_init(to); if (from->n == 0) { return; } if (n == 0 || from->n == 1) { n = from->n; } /* set equally-sized bins between...
11,115
FFmpeg
0bb5ad7a06ebcda9102357f8755d18b63f56aa29
1
static inline void asv2_put_level(PutBitContext *pb, int level) { unsigned int index = level + 31; if (index <= 62) { put_bits(pb, ff_asv2_level_tab[index][1], ff_asv2_level_tab[index][0]); } else { put_bits(pb, ff_asv2_level_tab[31][1], ff_asv2_level_tab[31][0]); asv2_put_b...
11,116
qemu
d4754a953196516b16beef707dcdfdb35c2eec6e
1
int net_init_l2tpv3(const NetClientOptions *opts, const char *name, NetClientState *peer) { const NetdevL2TPv3Options *l2tpv3; NetL2TPV3State *s; NetClientState *nc; int fd = -1, gairet; struct addrinfo hints; struct addrinfo *result = NULL; ...
11,118
FFmpeg
2ec4a84dca603a24a8131297036dfe30eed33dd7
1
static int subtitle_thread(void *arg) { VideoState *is = arg; Frame *sp; int got_subtitle; double pts; int i, j; int r, g, b, y, u, v, a; for (;;) { while (is->paused && !is->subtitleq.abort_request) { SDL_Delay(10); } if (!(sp = frame_queu...
11,119
FFmpeg
0ed5c3ce81811dcd93f21cdd1204d4c68bca9654
0
static av_cold int avisynth_load_library(void) { avs_library.library = LoadLibrary(AVISYNTH_LIB); if (!avs_library.library) return AVERROR_UNKNOWN; #define LOAD_AVS_FUNC(name, continue_on_fail) \ avs_library.name = \ ...
11,120
FFmpeg
508a24f8dc63e74bd9917e6f0c4cdbb744741ef0
0
static int decode_chunks(AVCodecContext *avctx, AVFrame *picture, int *data_size, const uint8_t *buf, int buf_size) { Mpeg1Context *s = avctx->priv_data; MpegEncContext *s2 = &s->mpeg_enc_ctx; const uint8_t *buf_ptr = buf; const uint8_t *b...
11,121
qemu
e1833e1f96456fd8fc17463246fe0b2050e68efb
0
void cpu_ppc_store_decr (CPUState *env, uint32_t value) { /* TO FIX */ }
11,122
qemu
72cf2d4f0e181d0d3a3122e04129c58a95da713e
0
static void do_closefd(Monitor *mon, const QDict *qdict) { const char *fdname = qdict_get_str(qdict, "fdname"); mon_fd_t *monfd; LIST_FOREACH(monfd, &mon->fds, next) { if (strcmp(monfd->name, fdname) != 0) { continue; } LIST_REMOVE(monfd, next); close...
11,123
qemu
b51daf003aa42c5c23876739ebd0b64dd2075931
0
int ide_init_drive(IDEState *s, BlockDriverState *bs, IDEDriveKind kind, const char *version, const char *serial, const char *model, uint64_t wwn, uint32_t cylinders, uint32_t heads, uint32_t secs, int chs_trans) { uint64_t nb_sectors...
11,125
FFmpeg
8d6947bc7d50732202f5a6c10633169c9d4e08bc
0
static int decode_mb_cabac(H264Context *h) { MpegEncContext * const s = &h->s; const int mb_xy= s->mb_x + s->mb_y*s->mb_stride; int mb_type, partition_count, cbp = 0; int dct8x8_allowed= h->pps.transform_8x8_mode; s->dsp.clear_blocks(h->mb); //FIXME avoid if already clear (move after skip han...
11,129
qemu
d4c430a80f000d722bb70287af4d4c184a8d7006
0
static inline int get_phys_addr(CPUState *env, uint32_t address, int access_type, int is_user, uint32_t *phys_ptr, int *prot) { /* Fast Context Switch Extension. */ if (address < 0x02000000) address += env->cp15.c13_fcse; if (...
11,130
qemu
ad674e53b5cce265fadafbde2c6a4f190345cd00
0
static void conditional_interrupt(DBDMA_channel *ch) { dbdma_cmd *current = &ch->current; uint16_t intr; uint16_t sel_mask, sel_value; uint32_t status; int cond; DBDMA_DPRINTF("conditional_interrupt\n"); intr = le16_to_cpu(current->command) & INTR_MASK; switch(intr) { ...
11,131
qemu
e2b8247a322cd92945785edf25f09e6b3e8285f9
0
static int cloop_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { BDRVCloopState *s = bs->opaque; uint32_t offsets_size, max_compressed_block_size = 1, i; int ret; bs->file = bdrv_open_child(NULL, options, "file", bs, &child_file, ...
11,133
qemu
45416789e8ccced568a4984af61974adfbfa0f62
0
static uint32_t sm501_palette_read(void *opaque, target_phys_addr_t addr) { SM501State * s = (SM501State *)opaque; SM501_DPRINTF("sm501 palette read addr=%x\n", (int)addr); /* TODO : consider BYTE/WORD access */ /* TODO : consider endian */ assert(0 <= addr && addr < 0x400 * 3); retur...
11,134
qemu
0dc083fe10c5cc848f36498b9157a336cbc8c7c1
0
static void gen_spr_amr (CPUPPCState *env) { #ifndef CONFIG_USER_ONLY /* Virtual Page Class Key protection */ /* The AMR is accessible either via SPR 13 or SPR 29. 13 is * userspace accessible, 29 is privileged. So we only need to set * the kvm ONE_REG id on one of them, we use 29 */ spr_...
11,135
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
0
static void set_kernel_args(const struct arm_boot_info *info) { int initrd_size = info->initrd_size; target_phys_addr_t base = info->loader_start; target_phys_addr_t p; p = base + KERNEL_ARGS_ADDR; /* ATAG_CORE */ WRITE_WORD(p, 5); WRITE_WORD(p, 0x54410001); WRITE_WORD(p, 1); ...
11,136
qemu
3dc6f8693694a649a9c83f1e2746565b47683923
0
static void ppc_powernv_init(MachineState *machine) { PnvMachineState *pnv = POWERNV_MACHINE(machine); MemoryRegion *ram; char *fw_filename; long fw_size; int i; char *chip_typename; /* allocate RAM */ if (machine->ram_size < (1 * G_BYTE)) { error_report("Warning: ski...
11,137
qemu
494a8ebe713055d3946183f4b395f85a18b43e9e
0
static int proxy_remove(FsContext *ctx, const char *path) { int retval; V9fsString name; v9fs_string_init(&name); v9fs_string_sprintf(&name, "%s", path); retval = v9fs_request(ctx->private, T_REMOVE, NULL, "s", &name); v9fs_string_free(&name); if (retval < 0) { errno = -retv...
11,138
qemu
a89f364ae8740dfc31b321eed9ee454e996dc3c1
0
static uint64_t pxa2xx_ssp_read(void *opaque, hwaddr addr, unsigned size) { PXA2xxSSPState *s = (PXA2xxSSPState *) opaque; uint32_t retval; switch (addr) { case SSCR0: return s->sscr[0]; case SSCR1: return s->sscr[1]; case SSPSP: ...
11,139
qemu
bec1631100323fac0900aea71043d5c4e22fc2fa
0
static inline void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args, const int *const_args) { int c, vexop, rexw = 0; #if TCG_TARGET_REG_BITS == 64 # define OP_32_64(x) \ case glue(glue(INDEX_op_, x), _i64): \ rexw = P_REXW; /* FALLTHRU */ \ ...
11,144
qemu
75af1f34cd5b07c3c7fcf86dfc99a42de48a600d
0
static int coroutine_fn bdrv_co_do_write_zeroes(BlockDriverState *bs, int64_t sector_num, int nb_sectors, BdrvRequestFlags flags) { BlockDriver *drv = bs->drv; QEMUIOVector qiov; struct iovec iov = {0}; int ret = 0; int max_write_zeroes = bs->bl.max_write_zeroes ? ...
11,145
qemu
74b4c74d5efb0a489bdf0acc5b5d0197167e7649
0
static void sigp_cpu_reset(CPUState *cs, run_on_cpu_data arg) { S390CPU *cpu = S390_CPU(cs); S390CPUClass *scc = S390_CPU_GET_CLASS(cpu); SigpInfo *si = arg.host_ptr; cpu_synchronize_state(cs); scc->cpu_reset(cs); cpu_synchronize_post_reset(cs); si->cc = SIGP_CC_ORDER_CODE_ACCEPTED...
11,146
qemu
9bada8971173345ceb37ed1a47b00a01a4dd48cf
0
static void GCC_FMT_ATTR(3, 4) parse_error(JSONParserContext *ctxt, QObject *token, const char *msg, ...) { va_list ap; char message[1024]; va_start(ap, msg); vsnprintf(message, sizeof(message), msg, ap); va_end(ap); if (ctxt->err) { er...
11,147
qemu
bb0300dc57c10b3721451b0ff566a03f9276cc77
0
static int cpu_x86_register (CPUX86State *env, const char *cpu_model) { x86_def_t def1, *def = &def1; if (cpu_x86_find_by_name(def, cpu_model) < 0) return -1; if (def->vendor1) { env->cpuid_vendor1 = def->vendor1; env->cpuid_vendor2 = def->vendor2; env->cpuid_vendor...
11,148
qemu
430eb509d2d05bd568c1394213fd12cb447467a7
0
void bdrv_info(void) { BlockDriverState *bs; for (bs = bdrv_first; bs != NULL; bs = bs->next) { term_printf("%s:", bs->device_name); term_printf(" type="); switch(bs->type) { case BDRV_TYPE_HD: term_printf("hd"); break; case BDRV_TYPE_C...
11,149
qemu
0c16c056a4f9dec18fdd56feec82a5db9ff3c15e
0
int qcrypto_hash_bytesv(QCryptoHashAlgorithm alg, const struct iovec *iov, size_t niov, uint8_t **result, size_t *resultlen, Error **errp) { int i, ret; gnutls_hash_hd_t dig; if...
11,150
qemu
a9ceb76d55abfed9426a819024aa3a4b87266c9f
0
static void start_input(DBDMA_channel *ch, int key, uint32_t addr, uint16_t req_count, int is_last) { DBDMA_DPRINTF("start_input\n"); /* KEY_REGS, KEY_DEVICE and KEY_STREAM * are not implemented in the mac-io chip */ if (!addr || key > KEY_STREAM3) { kill...
11,152
qemu
318347234d7069b62d38391dd27e269a3107d668
0
static void spapr_core_release(DeviceState *dev, void *opaque) { HotplugHandler *hotplug_ctrl; hotplug_ctrl = qdev_get_hotplug_handler(dev); hotplug_handler_unplug(hotplug_ctrl, dev, &error_abort); }
11,153
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
0
static uint64_t macio_nvram_readb(void *opaque, target_phys_addr_t 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, va...
11,154
FFmpeg
b0cd14fb1dab4b044f7fe6b53ac635409849de77
0
static const HWAccel *get_hwaccel(enum AVPixelFormat pix_fmt, enum HWAccelID selected_hwaccel_id) { int i; for (i = 0; hwaccels[i].name; i++) if (hwaccels[i].pix_fmt == pix_fmt && (!selected_hwaccel_id || selected_hwaccel_id == HWACCEL_AUTO || hwaccels[i].id == selected_hwaccel_id)) ...
11,156
FFmpeg
7b1fbd4729a52dd7c02622dbe7bb81a6a7ed12f8
0
static int ir2_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; Ir2Context * const s = avctx->priv_data; AVFrame *picture = data; AVFrame * const p ...
11,157
FFmpeg
92a26261d1ccc02c4fbdae2031e279009804c159
0
static int rsd_read_packet(AVFormatContext *s, AVPacket *pkt) { AVCodecContext *codec = s->streams[0]->codec; int ret, size = 1024; if (avio_feof(s->pb)) return AVERROR_EOF; if (codec->codec_id == AV_CODEC_ID_ADPCM_IMA_RAD || codec->codec_id == AV_CODEC_ID_ADPCM_IMA_WAV) { ...
11,159
qemu
7d1b0095bff7157e856d1d0e6c4295641ced2752
1
static TCGv_i64 gen_muls_i64_i32(TCGv a, TCGv b) { TCGv_i64 tmp1 = tcg_temp_new_i64(); TCGv_i64 tmp2 = tcg_temp_new_i64(); tcg_gen_ext_i32_i64(tmp1, a); dead_tmp(a); tcg_gen_ext_i32_i64(tmp2, b); dead_tmp(b); tcg_gen_mul_i64(tmp1, tmp1, tmp2); tcg_temp_free_i64(tmp2); ret...
11,161
FFmpeg
3b55429d5692dd782d8b3ce6a19819305157d1b8
1
void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size) { void **p = ptr; if (min_size < *size) return; min_size= FFMAX(17*min_size/16 + 32, min_size); av_free(*p); *p = av_malloc(min_size); if (!*p) min_size = 0; *size= min_size; }
11,162
qemu
c508277335e3b6b20cf18e6ea3a35c1fa835c64a
1
static void vmxnet3_fill_stats(VMXNET3State *s) { int i; if (!s->device_active) return; for (i = 0; i < s->txq_num; i++) { pci_dma_write(PCI_DEVICE(s), s->txq_descr[i].tx_stats_pa, &s->txq_descr[i].txq_stats, size...
11,163
FFmpeg
b2e57eb5a3cb9d5dfab601077fa0edee91e06ca5
1
static int ljpeg_decode_yuv_scan(MJpegDecodeContext *s, int predictor, int point_transform) { int i, mb_x, mb_y; const int nb_components=s->nb_components; int bits= (s->bits+7)&~7; int resync_mb_y = 0; int resync_mb_x = 0; point_transform += bits - s->b...
11,164
qemu
4438c8a9469d79fa2c58189418befb506da54d97
0
static void map_exec(void *addr, long size) { DWORD old_protect; VirtualProtect(addr, size, PAGE_EXECUTE_READWRITE, &old_protect); }
11,165
qemu
8a6b28c7b5104263344508df0f4bce97f22cfcaf
0
static void gen_exception_insn(DisasContext *s, int offset, int excp, int syn, uint32_t target_el) { gen_set_condexec(s); gen_set_pc_im(s, s->pc - offset); gen_exception(excp, syn, target_el); s->is_jmp = DISAS_JUMP; }
11,166
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
0
static int omap2_validate_addr(struct omap_mpu_state_s *s, target_phys_addr_t addr) { return 1; }
11,168
qemu
378bc21756f016abfde16a0de4977be49f499b1c
0
static void htab_save_first_pass(QEMUFile *f, sPAPRMachineState *spapr, int64_t max_ns) { int htabslots = HTAB_SIZE(spapr) / HASH_PTE_SIZE_64; int index = spapr->htab_save_index; int64_t starttime = qemu_clock_get_ns(QEMU_CLOCK_REALTIME); assert(spapr->htab_first...
11,169
qemu
42a268c241183877192c376d03bd9b6d527407c7
0
void tcg_gen_brcondi_i64(TCGCond cond, TCGv_i64 arg1, int64_t arg2, int label) { if (cond == TCG_COND_ALWAYS) { tcg_gen_br(label); } else if (cond != TCG_COND_NEVER) { TCGv_i64 t0 = tcg_const_i64(arg2); tcg_gen_brcond_i64(cond, arg1, t0, label); tcg_temp_free_i64(t0); ...
11,170
qemu
9be385980d37e8f4fd33f605f5fb1c3d144170a8
0
QObject *qlist_peek(QList *qlist) { QListEntry *entry; QObject *ret; if (qlist == NULL || QTAILQ_EMPTY(&qlist->head)) { return NULL; } entry = QTAILQ_FIRST(&qlist->head); ret = entry->value; return ret; }
11,171
FFmpeg
c9614bb22c98c513c010e1e14b12349a8cc74d8c
0
static int wav_read_header(AVFormatContext *s, AVFormatParameters *ap) { int64_t size, av_uninit(data_size); int64_t sample_count=0; int rf64; unsigned int tag; AVIOContext *pb = s->pb; AVStream *st; WAVContext *wav = s->priv_data; int ret, got_fmt = ...
11,172
qemu
b3db211f3c80bb996a704d665fe275619f728bd4
0
static void init_native_list(UserDefNativeListUnion *cvalue) { int i; switch (cvalue->type) { case USER_DEF_NATIVE_LIST_UNION_KIND_INTEGER: { intList **list = &cvalue->u.integer.data; for (i = 0; i < 32; i++) { *list = g_new0(intList, 1); (*list)->value = i; ...
11,173
qemu
6a8f9661dc3c088ed0d2f5b41d940190407cbdc5
0
static void internal_snapshot_prepare(BlkTransactionState *common, Error **errp) { Error *local_err = NULL; const char *device; const char *name; BlockBackend *blk; BlockDriverState *bs; QEMUSnapshotInfo old_sn, *sn; bool ret; qemu_timeval ...
11,174
qemu
c2b38b277a7882a592f4f2ec955084b2b756daaa
0
void thread_pool_free(ThreadPool *pool) { if (!pool) { return; } assert(QLIST_EMPTY(&pool->head)); qemu_mutex_lock(&pool->lock); /* Stop new threads from spawning */ qemu_bh_delete(pool->new_thread_bh); pool->cur_threads -= pool->new_threads; pool->new_threads = 0...
11,175
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
0
static int find_real_tpr_addr(VAPICROMState *s, CPUX86State *env) { target_phys_addr_t paddr; target_ulong addr; if (s->state == VAPIC_ACTIVE) { return 0; } /* * If there is no prior TPR access instruction we could analyze (which is * the case after resume from hibernati...
11,176
qemu
ec05ec26f940564b1e07bf88857035ec27e21dd8
0
void memory_region_ram_resize(MemoryRegion *mr, ram_addr_t newsize, Error **errp) { assert(mr->terminates); qemu_ram_resize(mr->ram_addr, newsize, errp); }
11,177
qemu
f186d64d8fda4bb22c15beb8e45b7814fbd8b51e
0
void replay_read_events(int checkpoint) { while (replay_data_kind == EVENT_ASYNC) { Event *event = replay_read_event(checkpoint); if (!event) { break; } replay_mutex_unlock(); replay_run_event(event); replay_mutex_lock(); g_free(event);...
11,178
qemu
7dad9ee6467e0e3024fbe09f8a363148558b8eef
0
void qmp_block_resize(bool has_device, const char *device, bool has_node_name, const char *node_name, int64_t size, Error **errp) { Error *local_err = NULL; BlockDriverState *bs; AioContext *aio_context; int ret; bs = bdrv_lookup_bs(has_device ? ...
11,179
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
0
uint64_t mcf_uart_read(void *opaque, target_phys_addr_t addr, unsigned size) { mcf_uart_state *s = (mcf_uart_state *)opaque; switch (addr & 0x3f) { case 0x00: return s->mr[s->current_mr]; case 0x04: return s->sr; case 0x0c: { uint...
11,180
qemu
d2cb36af2b0040d421b347e6e4e803e07220f78d
0
int qcow2_zero_clusters(BlockDriverState *bs, uint64_t offset, int nb_sectors, int flags) { BDRVQcow2State *s = bs->opaque; uint64_t end_offset; uint64_t nb_clusters; int ret; end_offset = offset + (nb_sectors << BDRV_SECTOR_BITS); /* Caller must pass aligned ...
11,181
qemu
98522f63f40adaebc412481e1d2e9170160d4539
0
void bdrv_append_temp_snapshot(BlockDriverState *bs, Error **errp) { /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ char tmp_filename[PATH_MAX + 1]; int64_t total_size; BlockDriver *bdrv_qcow2; QEMUOptionParameter *create_options; QDict *snapshot_options; Blo...
11,182
FFmpeg
7f4ec4364bc4a73036660c1c6a3c4801db524e9e
0
static int mov_read_dec3(MOVContext *c, AVIOContext *pb, MOVAtom atom) { AVStream *st; enum AVAudioServiceType *ast; int eac3info, acmod, lfeon, bsmod; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc->nb_streams-1]; ast = (enum AVAudioServiceType*)ff_stream_new...
11,183
qemu
b3db211f3c80bb996a704d665fe275619f728bd4
0
Visitor *visitor_input_test_init(TestInputVisitorData *data, const char *json_string, ...) { Visitor *v; va_list ap; va_start(ap, json_string); v = visitor_input_test_init_internal(data, json_string, &ap); va_end(ap); return v; }
11,184
qemu
fbddfc727bde692f009a269e8e628d8c152b537b
0
int qemu_pixman_get_type(int rshift, int gshift, int bshift) { int type = PIXMAN_TYPE_OTHER; if (rshift > gshift && gshift > bshift) { if (bshift == 0) { type = PIXMAN_TYPE_ARGB; } else { #if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0, 21, 8) type = PIXMAN_TYPE_R...
11,185
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
0
static struct omap_32khz_timer_s *omap_os_timer_init(MemoryRegion *memory, target_phys_addr_t base, qemu_irq irq, omap_clk clk) { struct omap_32khz_timer_s *s = (struct omap_32khz_timer_s *) g_malloc0(sizeof(struct omap_32khz_timer_s)); s->timer.irq = irq; ...
11,186
qemu
786a4ea82ec9c87e3a895cf41081029b285a5fe5
0
static void acpi_pcihp_eject_slot(AcpiPciHpState *s, unsigned bsel, unsigned slots) { BusChild *kid, *next; int slot = ffs(slots) - 1; PCIBus *bus = acpi_pcihp_find_hotplug_bus(s, bsel); if (!bus) { return; } /* Mark request as complete */ s->acpi_pcihp_pci_status[bsel]....
11,187
qemu
a87310a62d1885b8f6d6b5b30227cbd9792d2c3c
0
static void machine_cpu_reset(MicroBlazeCPU *cpu) { CPUMBState *env = &cpu->env; env->pvr.regs[10] = 0x0e000000; /* virtex 6 */ /* setup pvr to match kernel setting */ env->pvr.regs[0] |= (0x14 << 8); env->pvr.regs[4] = 0xc56b8000; env->pvr.regs[5] = 0xc56be000; }
11,188
qemu
0379f474ddebfc69f42fa8231d86687cf29d997b
1
static int nbd_handle_list(NBDClient *client, uint32_t length) { int csock; NBDExport *exp; csock = client->sock; if (length) { return nbd_send_rep(csock, NBD_REP_ERR_INVALID, NBD_OPT_LIST); /* For each export, send a NBD_REP_SERVER reply. */ QTAILQ_FOREACH(exp, &exports,...
11,189
qemu
9ada575bbafaf6d3724a7f59df9da89776817cac
1
static void create_header32(DumpState *s, Error **errp) { DiskDumpHeader32 *dh = NULL; KdumpSubHeader32 *kh = NULL; size_t size; uint32_t block_size; uint32_t sub_hdr_size; uint32_t bitmap_blocks; uint32_t status = 0; uint64_t offset_note; Error *local_err = NULL; /* write common...
11,190
qemu
47d4be12c3997343e436c6cca89aefbbbeb70863
1
static void test_qemu_strtoull_invalid(void) { const char *str = " xxxx \t abc"; char f = 'X'; const char *endptr = &f; uint64_t res = 999; int err; err = qemu_strtoull(str, &endptr, 0, &res); g_assert_cmpint(err, ==, 0); g_assert(endptr == str); }
11,191
qemu
ad2d30f79d3b0812f02c741be2189796b788d6d7
1
static void scsi_remove_request(SCSIGenericReq *r) { qemu_free(r->buf); scsi_req_free(&r->req); }
11,192
qemu
ee0428e3acd237e4d555cc54134cea473cab5ee7
1
static int get_device_guid( char *name, int name_size, char *actual_name, int actual_name_size) { LONG status; HKEY control_net_key; DWORD len; int i = 0; int stop = 0; status = RegOpenKeyEx( HKEY_LOCAL_MACHINE, NETWORK_CONNECTIONS_KEY, 0, ...
11,195
FFmpeg
837cb4325b712ff1aab531bf41668933f61d75d2
1
static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream, AVFormatContext *fmt_ctx) { AVBPrint pbuf; char val_str[128]; const char *s; int i; av_bprint_init(&pbuf, 1, AV_BPRINT_SIZE_UNLIMITED); writer_print_section_header(w, SECTION_ID_FRAME); ...
11,196
FFmpeg
66c1c9b2774968dc26017269ac175b356592f878
1
void ff_xface_generate_face(uint8_t *dst, uint8_t * const src) { int h, i, j, k, l, m; for (j = 0; j < XFACE_HEIGHT; j++) { for (i = 0; i < XFACE_WIDTH; i++) { h = i + j * XFACE_WIDTH; k = 0; /* Compute k, encoding the bits *before* the curr...
11,198
FFmpeg
c2d3f561072132044114588a5f56b8e1974a2af7
1
void ff_imdct_half_3dn2(FFTContext *s, FFTSample *output, const FFTSample *input) { x86_reg j, k; long n = s->mdct_size; long n2 = n >> 1; long n4 = n >> 2; long n8 = n >> 3; const uint16_t *revtab = s->revtab; const FFTSample *tcos = s->tcos; const FFTSample *tsin = s->tsin; ...
11,199
FFmpeg
0b940c95b2171cb1035c79b85492f5f6cdb060a6
1
static av_cold int decimate_init(AVFilterContext *ctx) { DecimateContext *dm = ctx->priv; AVFilterPad pad = { .name = av_strdup("main"), .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, .config_props = config_input, }; if (!pad.name) ...
11,200
FFmpeg
ddfa3751c092feaf1e080f66587024689dfe603c
1
static int get_qcc(J2kDecoderContext *s, int n, J2kQuantStyle *q, uint8_t *properties) { int compno; if (s->buf_end - s->buf < 1) return AVERROR(EINVAL); compno = bytestream_get_byte(&s->buf); properties[compno] |= HAD_QCC; return get_qcx(s, n-1, q+compno); }
11,201
qemu
3482655bbc21d158ed0daaa294c890997238cc23
1
void migration_incoming_state_destroy(void) { struct MigrationIncomingState *mis = migration_incoming_get_current(); qemu_event_destroy(&mis->main_thread_load_event);
11,203
qemu
7464f0587b2938a3e10e9f995f384df8a5f298ac
1
static QString *read_line(FILE *file, char *key) { char value[128]; if (fscanf(file, "%s%s", key, value) == EOF) return NULL; remove_dots(key); return qstring_from_str(value); }
11,204
FFmpeg
0372e73f917e72c40b09270f771046fc142be4a7
0
av_cold void ff_intrax8_common_init(IntraX8Context *w, MpegEncContext *const s) { w->s = s; x8_vlc_init(); assert(s->mb_width > 0); // two rows, 2 blocks per cannon mb w->prediction_table = av_mallocz(s->mb_width * 2 * 2); ff_init_scantable(s->idsp.idct_permutation, &w->scantable[0], ...
11,205