project stringclasses 2
values | commit_id stringlengths 40 40 | target int64 0 1 | func stringlengths 26 142k | idx int64 0 27.3k |
|---|---|---|---|---|
FFmpeg | ae2d41ec875965ce4ab9fdd88a5e8ba57cada67a | 0 | void ff_init_elbg(int *points, int dim, int numpoints, int *codebook,
int numCB, int max_steps, int *closest_cb,
AVLFG *rand_state)
{
int i, k;
if (numpoints > 24*numCB) {
/* ELBG is very costly for a big number of points. So if we have a lot
of th... | 24,369 |
FFmpeg | 7fb758cd8ed08e4a37f10e25003953d13c68b8cd | 0 | av_cold void ff_lpc_init_x86(LPCContext *c)
{
#if HAVE_SSE2_INLINE
int cpu_flags = av_get_cpu_flags();
if (INLINE_SSE2(cpu_flags) && (cpu_flags & AV_CPU_FLAG_SSE2SLOW)) {
c->lpc_apply_welch_window = lpc_apply_welch_window_sse2;
c->lpc_compute_autocorr = lpc_compute_autocorr_sse2;
... | 24,370 |
FFmpeg | 4d09bc98974d4602d71e71520535457a53d44222 | 0 | int ff_pcm_read_packet(AVFormatContext *s, AVPacket *pkt)
{
int ret, size;
size= RAW_SAMPLES*s->streams[0]->codec->block_align;
if (size <= 0)
return AVERROR(EINVAL);
ret= av_get_packet(s->pb, pkt, size);
pkt->flags &= ~AV_PKT_FLAG_CORRUPT;
pkt->stream_index = 0;
if (r... | 24,372 |
FFmpeg | 851ded8918c977d8160c6617b69604f758cabf50 | 0 | static int decode_cabac_mb_skip( H264Context *h, int mb_x, int mb_y ) {
MpegEncContext * const s = &h->s;
int mba_xy, mbb_xy;
int ctx = 0;
if(FRAME_MBAFF){ //FIXME merge with the stuff in fill_caches?
int mb_xy = mb_x + (mb_y&~1)*s->mb_stride;
mba_xy = mb_xy - 1;
if( (mb... | 24,373 |
FFmpeg | ec23a47286a9be0ca67b78f4d8b9d87220c18286 | 0 | static int handle_packets(AVFormatContext *s, int nb_packets)
{
MpegTSContext *ts = s->priv_data;
ByteIOContext *pb = &s->pb;
uint8_t packet[TS_FEC_PACKET_SIZE];
int packet_num, len;
ts->stop_parse = 0;
packet_num = 0;
for(;;) {
if (ts->stop_parse)
break;
... | 24,374 |
qemu | f8762027a33e2f5d0915c56a904962b1481f75c1 | 1 | QTestState *qtest_init(const char *extra_args)
{
QTestState *s;
int sock, qmpsock, i;
gchar *socket_path;
gchar *qmp_socket_path;
gchar *command;
const char *qemu_binary;
struct sigaction sigact;
qemu_binary = getenv("QTEST_QEMU_BINARY");
g_assert(qemu_binary != NULL);
... | 24,376 |
qemu | 876d516311c1538a7d29f2abec48b7cda0645eea | 1 | static void qxl_init_ramsize(PCIQXLDevice *qxl)
{
/* vga mode framebuffer / primary surface (bar 0, first part) */
if (qxl->vgamem_size_mb < 8) {
qxl->vgamem_size_mb = 8;
qxl->vgamem_size = qxl->vgamem_size_mb * 1024 * 1024;
/* vga ram (bar 0, total) */
if (qxl->ram_size_mb !... | 24,377 |
FFmpeg | ddfa3751c092feaf1e080f66587024689dfe603c | 1 | static int decode_packet(J2kDecoderContext *s, J2kCodingStyle *codsty, J2kResLevel *rlevel, int precno,
int layno, uint8_t *expn, int numgbits)
{
int bandno, cblkny, cblknx, cblkno, ret;
if (!(ret = get_bits(s, 1))){
j2k_flush(s);
return 0;
} else if (ret < ... | 24,378 |
FFmpeg | b315a3cf42a15358ab38279723f3c93406a66f6a | 1 | static SoftFloat sbr_sum_square_c(int (*x)[2], int n)
{
SoftFloat ret;
uint64_t accu = 0, round;
int i, nz;
unsigned u;
for (i = 0; i < n; i += 2) {
// Larger values are inavlid and could cause overflows of accu.
av_assert2(FFABS(x[i + 0][0]) >> 29 == 0);
accu += (... | 24,380 |
qemu | d3f8d37fe2d0c24ec8bac9c94d5b0e2dc09c0d2a | 1 | int kvm_log_stop(target_phys_addr_t phys_addr, target_phys_addr_t end_addr)
{
return kvm_dirty_pages_log_change(phys_addr, end_addr,
0,
KVM_MEM_LOG_DIRTY_PAGES);
}
| 24,381 |
qemu | 47d4be12c3997343e436c6cca89aefbbbeb70863 | 1 | int qemu_strtoll(const char *nptr, const char **endptr, int base,
int64_t *result)
{
char *p;
int err = 0;
if (!nptr) {
if (endptr) {
*endptr = nptr;
}
err = -EINVAL;
} else {
errno = 0;
*result = strtoll(nptr, &p, base);
... | 24,382 |
FFmpeg | 21234c835d2d003d390d462b6e1b2622e7b02c39 | 1 | static int sofalizer_convolute(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
{
SOFAlizerContext *s = ctx->priv;
ThreadData *td = arg;
AVFrame *in = td->in, *out = td->out;
int offset = jobnr;
int *write = &td->write[jobnr];
const int *const delay = td->delay[jobnr];
const ... | 24,383 |
FFmpeg | c61715e2c505c15a5cfc9eab18b4311a6504055a | 1 | int ff_htmlmarkup_to_ass(void *log_ctx, AVBPrint *dst, const char *in)
{
char *param, buffer[128], tmp[128];
int len, tag_close, sptr = 1, line_start = 1, an = 0, end = 0;
SrtStack stack[16];
int closing_brace_missing = 0;
stack[0].tag[0] = 0;
strcpy(stack[0].param[PARAM_SIZE], "{\\fs}... | 24,385 |
qemu | 12f8def0e02232d7c6416ad9b66640f973c531d1 | 1 | void qemu_mutex_destroy(QemuMutex *mutex)
{
assert(mutex->owner == 0);
DeleteCriticalSection(&mutex->lock);
}
| 24,386 |
qemu | 4f4321c11ff6e98583846bfd6f0e81954924b003 | 1 | static int usb_host_handle_iso_data(USBHostDevice *s, USBPacket *p, int in)
{
AsyncURB *aurb;
int i, j, ret, max_packet_size, offset, len = 0;
max_packet_size = get_max_packet_size(s, p->devep);
if (max_packet_size == 0)
return USB_RET_NAK;
aurb = get_iso_urb(s, p->devep);
if... | 24,387 |
qemu | d659d94013390238961fac741572306c95496bf5 | 1 | static void pcie_pci_bridge_realize(PCIDevice *d, Error **errp)
{
PCIBridge *br = PCI_BRIDGE(d);
PCIEPCIBridge *pcie_br = PCIE_PCI_BRIDGE_DEV(d);
int rc, pos;
pci_bridge_initfn(d, TYPE_PCI_BUS);
d->config[PCI_INTERRUPT_PIN] = 0x1;
memory_region_init(&pcie_br->shpc_bar, OBJECT(d), "shp... | 24,388 |
qemu | 3a661f1eabf7e8db66e28489884d9b54aacb94ea | 1 | static int qcrypto_cipher_init_aes(QCryptoCipher *cipher,
const uint8_t *key, size_t nkey,
Error **errp)
{
QCryptoCipherBuiltin *ctxt;
if (cipher->mode != QCRYPTO_CIPHER_MODE_CBC &&
cipher->mode != QCRYPTO_CIPHER_MODE_ECB) {
... | 24,389 |
FFmpeg | fd34dbea58e097609ff09cf7dcc59f74930195d3 | 1 | static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size, UID uid)
{
MXFContext *mxf = arg;
MXFPartition *partition;
UID op;
uint64_t footer_partition;
if (mxf->partitions_count+1 >= UINT_MAX / sizeof(*mxf->partitions))
return AVERROR(ENOMEM);
mxf->par... | 24,390 |
FFmpeg | 221b804f3491638ecf2eec1302c669ad2d9ec799 | 1 | static uint64_t getSSD(uint8_t *src1, uint8_t *src2, int stride1, int stride2, int w, int h){
int x,y;
uint64_t ssd=0;
//printf("%d %d\n", w, h);
for(y=0; y<h; y++){
for(x=0; x<w; x++){
int d= src1[x + y*stride1] - src2[x + y*stride2];
ssd+= d*d;
//printf("%d", abs(src1[x + y*stride1] - src2[x + ... | 24,391 |
qemu | 20784087eb875e22cf0021989e61716304b63c84 | 1 | static inline void test_server_connect(TestServer *server)
{
test_server_create_chr(server, ",reconnect=1");
}
| 24,393 |
FFmpeg | 24dc7776ff4452764d0365b12d0728153f879cf8 | 0 | static int put_system_header(AVFormatContext *ctx, uint8_t *buf,int only_for_stream_id)
{
MpegMuxContext *s = ctx->priv_data;
int size, i, private_stream_coded, id;
PutBitContext pb;
init_put_bits(&pb, buf, 128);
put_bits(&pb, 32, SYSTEM_HEADER_START_CODE);
put_bits(&pb, 16, 0);
... | 24,394 |
FFmpeg | e5540b3fd30367ce3cc33b2f34a04b660dbc4b38 | 0 | static int standard_decode_i_mbs(VC9Context *v)
{
int x, y, ac_pred, cbpcy;
/* Select ttmb table depending on pq */
if (v->pq < 5) v->ttmb_vlc = &vc9_ttmb_vlc[0];
else if (v->pq < 13) v->ttmb_vlc = &vc9_ttmb_vlc[1];
else v->ttmb_vlc = &vc9_ttmb_vlc[2];
for (y=0; y<v->height_mb; y++)
... | 24,395 |
FFmpeg | 1d16a1cf99488f16492b1bb48e023f4da8377e07 | 0 | static void ff_h264_idct8_dc_add_mmx2(uint8_t *dst, int16_t *block, int stride)
{
int dc = (block[0] + 32) >> 6;
int y;
__asm__ volatile(
"movd %0, %%mm0 \n\t"
"pshufw $0, %%mm0, %%mm0 \n\t"
"pxor %%mm1, %%mm1 \n\t"
"psubw %%mm0, %%mm1 \n\t"
... | 24,396 |
FFmpeg | d19d52d4a11547cc70bcbc3a2f8b83ccd24bb951 | 0 | static int movie_get_frame(AVFilterLink *outlink)
{
MovieContext *movie = outlink->src->priv;
AVPacket pkt;
int ret, frame_decoded;
AVStream *st = movie->format_ctx->streams[movie->stream_index];
if (movie->is_done == 1)
return 0;
while ((ret = av_read_frame(movie->format_ctx... | 24,397 |
qemu | 1a71992376792a0d11ea27688bd1a21cdffd1826 | 1 | static void do_io_interrupt(CPUS390XState *env)
{
S390CPU *cpu = s390_env_get_cpu(env);
LowCore *lowcore;
IOIntQueue *q;
uint8_t isc;
int disable = 1;
int found = 0;
if (!(env->psw.mask & PSW_MASK_IO)) {
cpu_abort(CPU(cpu), "I/O int w/o I/O mask\n");
}
for (isc... | 24,399 |
FFmpeg | 9cc9a155100d4364ad02d50e89b313ec94195102 | 1 | static int rtp_new_av_stream(HTTPContext *c,
int stream_index, struct sockaddr_in *dest_addr,
HTTPContext *rtsp_c)
{
AVFormatContext *ctx;
AVStream *st;
char *ipaddr;
URLContext *h = NULL;
uint8_t *dummy_buf;
int max_packet_size;... | 24,401 |
qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | 1 | void unix_start_outgoing_migration(MigrationState *s, const char *path, Error **errp)
{
unix_nonblocking_connect(path, unix_wait_for_connect, s, errp);
}
| 24,402 |
qemu | 262a69f4282e44426c7a132138581d400053e0a1 | 1 | static void *mptsas_load_request(QEMUFile *f, SCSIRequest *sreq)
{
SCSIBus *bus = sreq->bus;
MPTSASState *s = container_of(bus, MPTSASState, bus);
PCIDevice *pci = PCI_DEVICE(s);
MPTSASRequest *req;
int i, n;
req = g_new(MPTSASRequest, 1);
qemu_get_buffer(f, (unsigned char *)&req->... | 24,403 |
FFmpeg | 8a69f2602fea04b7ebae2db16f2581e8ff5ee0cd | 1 | static int dvbsub_parse_clut_segment(AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
DVBSubContext *ctx = avctx->priv_data;
const uint8_t *buf_end = buf + buf_size;
int i, clut_id;
int version;
DVBSubCLUT *clut;
int entry_id, depth , full... | 24,404 |
qemu | d861b05ea30e6ac177de9b679da96194ebe21afc | 1 | VLANClientState *qemu_new_vlan_client(VLANState *vlan,
IOReadHandler *fd_read, void *opaque)
{
VLANClientState *vc, **pvc;
vc = qemu_mallocz(sizeof(VLANClientState));
if (!vc)
return NULL;
vc->fd_read = fd_read;
vc->opaque = opaque;
vc->vlan... | 24,405 |
qemu | aec4b054ea36c53c8b887da99f20010133b84378 | 1 | static void unterminated_escape(void)
{
QObject *obj = qobject_from_json("\"abc\\\"", NULL);
g_assert(obj == NULL);
}
| 24,406 |
qemu | b45c03f585ea9bb1af76c73e82195418c294919d | 1 | struct omap_gpmc_s *omap_gpmc_init(struct omap_mpu_state_s *mpu,
hwaddr base,
qemu_irq irq, qemu_irq drq)
{
int cs;
struct omap_gpmc_s *s = (struct omap_gpmc_s *)
g_malloc0(sizeof(struct omap_gpmc_s));
memory_region_i... | 24,407 |
qemu | 42ed3727536ccf80c87942b3f04e7378fe90f107 | 1 | bool trace_backend_init(const char *events, const char *file)
{
GThread *thread;
if (!g_thread_supported()) {
g_thread_init(NULL);
}
trace_available_cond = g_cond_new();
trace_empty_cond = g_cond_new();
thread = trace_thread_create(writeout_thread);
if (!thread) {... | 24,408 |
FFmpeg | 6136b989f658fff68e2b758db583f04358d3d412 | 1 | static inline void vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y,
int mvn, int r_x, int r_y, uint8_t* is_intra)
{
MpegEncContext *s = &v->s;
int xy, wrap, off = 0;
int A[2], B[2], C[2];
int px, py;
int a_valid = 0, b_valid = 0, c_valid = 0;
... | 24,409 |
qemu | f2ba730e89b420903257e543c1bb7f7d945ba36a | 1 | ip_reass(register struct ip *ip, register struct ipq *fp)
{
register struct mbuf *m = dtom(ip);
register struct ipasfrag *q;
int hlen = ip->ip_hl << 2;
int i, next;
DEBUG_CALL("ip_reass");
DEBUG_ARG("ip = %lx", (long)ip);
DEBUG_ARG("fp = %lx", (long)fp);
DEBUG_ARG("m = %lx", (long)m);
/*
* Pre... | 24,411 |
FFmpeg | 8b18288c08fd450601251700eb42d9efbef89803 | 1 | static void qtrle_encode_line(QtrleEncContext *s, AVFrame *p, int line, uint8_t **buf)
{
int width=s->logical_width;
int i;
signed char rlecode;
/* We will use it to compute the best bulk copy sequence */
unsigned int bulkcount;
/* This will be the number of pixels equal to the preivous... | 24,412 |
FFmpeg | c23acbaed40101c677dfcfbbfe0d2c230a8e8f44 | 1 | static void rv34_idct_add_c(uint8_t *dst, ptrdiff_t stride, DCTELEM *block){
int temp[16];
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
int i;
rv34_row_transform(temp, block);
memset(block, 0, 16*sizeof(DCTELEM));
for(i = 0; i < 4; i++){
const int z0 = 13*(temp[4*0+i] + ... | 24,413 |
FFmpeg | 3cfe88194a6ea8c720dfc85239d03c659473bcc3 | 1 | int ff_lpc_calc_coefs(DSPContext *s,
const int32_t *samples, int blocksize, int min_order,
int max_order, int precision,
int32_t coefs[][MAX_LPC_ORDER], int *shift, int use_lpc,
int omethod, int max_shift, int zero_shift)
{
... | 24,414 |
FFmpeg | 835d9f299cf6b3704989a7b3eccfa1c2ec6866d9 | 1 | av_cold void ff_cavsdsp_init_x86(CAVSDSPContext *c, AVCodecContext *avctx)
{
av_unused int cpu_flags = av_get_cpu_flags();
cavsdsp_init_mmx(c, avctx);
#if HAVE_AMD3DNOW_INLINE
if (INLINE_AMD3DNOW(cpu_flags))
cavsdsp_init_3dnow(c, avctx);
#endif /* HAVE_AMD3DNOW_INLINE */
#if HAVE_MMXEXT_IN... | 24,416 |
qemu | 6546d0dba6c211c1a3eac1252a4f50a0c151a08a | 1 | static bool object_create_initial(const char *type)
{
if (g_str_equal(type, "rng-egd")) {
/*
* return false for concrete netfilters since
* they depend on netdevs already existing
if (g_str_equal(type, "filter-buffer") ||
g_str_equal(type, "filter-dump") ||
g_str_equal(type, "filte... | 24,417 |
qemu | 3dd8a6763bcc50dfc3de8da9279b741c0dea9fb1 | 1 | static int bochs_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
BDRVBochsState *s = bs->opaque;
int i;
struct bochs_header bochs;
struct bochs_header_v1 header_v1;
int ret;
bs->read_only = 1; // no write support yet
ret = bdrv_pread(b... | 24,418 |
FFmpeg | 0c74098b1c4cc566ee0af19374b03d1e425dd1f0 | 1 | static int svq3_decode_frame (AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size) {
MpegEncContext *const s = avctx->priv_data;
H264Context *const h = avctx->priv_data;
int m, mb_type;
unsigned char *extradata;
unsig... | 24,419 |
qemu | 72cd500b725fd9a3bbefeb468d54c192fdc28318 | 1 | static inline void elf_core_copy_regs(target_elf_gregset_t *regs,
const CPUSH4State *env)
{
int i;
for (i = 0; i < 16; i++) {
(*regs[i]) = tswapreg(env->gregs[i]);
}
(*regs)[TARGET_REG_PC] = tswapreg(env->pc);
(*regs)[TARGET_REG_PR] = tswapre... | 24,420 |
FFmpeg | 90901860c21468d6e9ae437c2bacb099c7bd3acf | 0 | static int vorbis_parse_id_hdr(vorbis_context *vc){
GetBitContext *gb=&vc->gb;
uint_fast8_t bl0, bl1;
if ((get_bits(gb, 8)!='v') || (get_bits(gb, 8)!='o') ||
(get_bits(gb, 8)!='r') || (get_bits(gb, 8)!='b') ||
(get_bits(gb, 8)!='i') || (get_bits(gb, 8)!='s')) {
av_log(vc->avccontext,... | 24,421 |
qemu | 828808f5ece20fd606218e000139799921c89d93 | 1 | static void tcg_out_ld (TCGContext *s, TCGType type, int ret, int arg1,
tcg_target_long arg2)
{
if (type == TCG_TYPE_I32)
tcg_out_ldst (s, ret, arg1, arg2, LWZ, LWZX);
else
tcg_out_ldst (s, ret, arg1, arg2, LD, LDX);
}
| 24,422 |
qemu | 089da572b956ef0f8f5b8d5917358e07892a77c2 | 1 | void fw_cfg_add_i64(FWCfgState *s, uint16_t key, uint64_t value)
{
uint64_t *copy;
copy = g_malloc(sizeof(value));
*copy = cpu_to_le64(value);
fw_cfg_add_bytes(s, key, (uint8_t *)copy, sizeof(value));
}
| 24,423 |
qemu | d861b05ea30e6ac177de9b679da96194ebe21afc | 1 | static NetSocketState *net_socket_fd_init_stream(VLANState *vlan, int fd,
int is_connected)
{
NetSocketState *s;
s = qemu_mallocz(sizeof(NetSocketState));
if (!s)
return NULL;
s->fd = fd;
s->vc = qemu_new_vlan_client(vlan,
... | 24,425 |
FFmpeg | b16830840eb9bdec88fce2aebb38a582e093ab6b | 0 | static int add_string_metadata(int count, const char *name,
TiffContext *s)
{
char *value;
if (bytestream2_get_bytes_left(&s->gb) < count)
return AVERROR_INVALIDDATA;
value = av_malloc(count + 1);
if (!value)
return AVERROR(ENOMEM);
bytes... | 24,427 |
FFmpeg | 16e0416fa47ca391214ad20d162240e5d492bf0e | 0 | static int idcin_read_header(AVFormatContext *s)
{
AVIOContext *pb = s->pb;
IdcinDemuxContext *idcin = s->priv_data;
AVStream *st;
unsigned int width, height;
unsigned int sample_rate, bytes_per_sample, channels;
int ret;
/* get the 5 header parameters */
width = avio_rl32(pb)... | 24,428 |
FFmpeg | f85cc3bf12236e974403667610b39b802b8651d6 | 0 | static int decode_profile_tier_level(GetBitContext *gb, AVCodecContext *avctx,
PTLCommon *ptl)
{
int i;
if (get_bits_left(gb) < 2+1+5 + 32 + 4 + 16 + 16 + 12)
return -1;
ptl->profile_space = get_bits(gb, 2);
ptl->tier_flag = get_bits1(gb);
... | 24,429 |
FFmpeg | 27506aceda8115f82f89691a4441d62a8cf24a6e | 0 | int ff_dca_lbr_parse(DCALbrDecoder *s, uint8_t *data, DCAExssAsset *asset)
{
struct {
LBRChunk lfe;
LBRChunk tonal;
LBRChunk tonal_grp[5];
LBRChunk grid1[DCA_LBR_CHANNELS / 2];
LBRChunk hr_grid[DCA_LBR_CHANNELS / 2];
LBRChunk ts1[DCA_LBR_CHAN... | 24,431 |
FFmpeg | 1eaae7abb8f208fefb4e8b9e983e61b2499206a3 | 0 | static av_cold int wmv2_decode_init(AVCodecContext *avctx)
{
Wmv2Context *const w = avctx->priv_data;
int ret;
if ((ret = ff_msmpeg4_decode_init(avctx)) < 0)
return ret;
ff_wmv2_common_init(w);
return ff_intrax8_common_init(&w->x8, &w->s.idsp, &w->s);
}
| 24,432 |
FFmpeg | ac726a4f0cd2fb8619b478af51312a4282215f0e | 0 | static int amovie_get_samples(AVFilterLink *outlink)
{
MovieContext *movie = outlink->src->priv;
AVPacket pkt;
int ret, got_frame = 0;
if (!movie->pkt.size && movie->is_done == 1)
return AVERROR_EOF;
/* check for another frame, in case the previous one was completely consumed */
... | 24,434 |
FFmpeg | c8dcff0cdb17d0aa03ac729eba12d1a20f1f59c8 | 0 | static int h264_init_context(AVCodecContext *avctx, H264Context *h)
{
int i;
h->avctx = avctx;
h->picture_structure = PICT_FRAME;
h->slice_context_count = 1;
h->workaround_bugs = avctx->workaround_bugs;
h->flags = avctx->flags;
h->prev_... | 24,435 |
qemu | 45db7ba681ede57113a67499840e69ee586bcdf2 | 0 | static uint32_t nvic_readl(NVICState *s, uint32_t offset)
{
ARMCPU *cpu = s->cpu;
uint32_t val;
switch (offset) {
case 4: /* Interrupt Control Type. */
return ((s->num_irq - NVIC_FIRST_IRQ) / 32) - 1;
case 0xd00: /* CPUID Base. */
return cpu->midr;
case 0xd04: /* Int... | 24,436 |
qemu | f5438c0500bb22c97b30987d2e0eab953416c7c5 | 0 | static void parse_cmdline(const char *cmdline,
int *pnb_args, char **args)
{
const char *p;
int nb_args, ret;
char buf[1024];
p = cmdline;
nb_args = 0;
for(;;) {
while (qemu_isspace(*p))
p++;
if (*p == '\0')
break;
... | 24,437 |
qemu | b40acf99bef69fa8ab0f9092ff162fde945eec12 | 0 | void portio_list_destroy(PortioList *piolist)
{
g_free(piolist->regions);
g_free(piolist->aliases);
}
| 24,438 |
qemu | f090c9d4ad5812fb92843d6470a1111c15190c4c | 0 | INLINE flag extractFloat32Sign( float32 a )
{
return a>>31;
}
| 24,439 |
qemu | 494a8ebe713055d3946183f4b395f85a18b43e9e | 0 | static int proxy_mknod(FsContext *fs_ctx, V9fsPath *dir_path,
const char *name, FsCred *credp)
{
int retval;
V9fsString fullname;
v9fs_string_init(&fullname);
v9fs_string_sprintf(&fullname, "%s/%s", dir_path->data, name);
retval = v9fs_request(fs_ctx->private, T_MKN... | 24,440 |
qemu | b61359781958759317ee6fd1a45b59be0b7dbbe1 | 0 | static bool memory_region_get_may_overlap(Object *obj, Error **errp)
{
MemoryRegion *mr = MEMORY_REGION(obj);
return mr->may_overlap;
}
| 24,441 |
qemu | ad674e53b5cce265fadafbde2c6a4f190345cd00 | 0 | static void DBDMA_run (DBDMA_channel *ch)
{
int channel;
for (channel = 0; channel < DBDMA_CHANNELS; channel++, ch++) {
uint32_t status = be32_to_cpu(ch->regs[DBDMA_STATUS]);
if (!ch->processing && (status & RUN) && (status & ACTIVE))
channel_run(ch);
}
}
| 24,443 |
qemu | 7385aed20db5d83979f683b9d0048674411e963c | 0 | void helper_fstoq(CPUSPARCState *env, float32 src)
{
clear_float_exceptions(env);
QT0 = float32_to_float128(src, &env->fp_status);
check_ieee_exceptions(env);
}
| 24,444 |
qemu | 4417ab7adf1613799054be5afedf810fc2524ee8 | 0 | static void process_incoming_migration_bh(void *opaque)
{
Error *local_err = NULL;
MigrationIncomingState *mis = opaque;
/* Make sure all file formats flush their mutable metadata.
* If we get an error here, just don't restart the VM yet. */
bdrv_invalidate_cache_all(&local_err);
if (!... | 24,445 |
qemu | f090c9d4ad5812fb92843d6470a1111c15190c4c | 0 | int float64_lt_quiet( float64 a, float64 b STATUS_PARAM )
{
flag aSign, bSign;
if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) )
|| ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) )
) {
if ( float64_is_signaling_nan( a ) || float64_is_sig... | 24,446 |
qemu | 076b35b5a56bca57c4aa41044ed304fe9c45d6c5 | 0 | static void machine_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
QEMUMachine *qm = data;
mc->name = qm->name;
mc->desc = qm->desc;
mc->init = qm->init;
mc->kvm_type = qm->kvm_type;
mc->block_default_type = qm->block_default_type;
mc->max_cpus =... | 24,447 |
qemu | 88c725c78e87eecb061f882177c7a6a2ac1059ad | 0 | int kvm_irqchip_add_msi_route(KVMState *s, int vector, PCIDevice *dev)
{
struct kvm_irq_routing_entry kroute = {};
int virq;
MSIMessage msg = {0, 0};
if (dev) {
msg = pci_get_msi_message(dev, vector);
}
if (kvm_gsi_direct_mapping()) {
return kvm_arch_msi_data_to_gsi(... | 24,449 |
qemu | cd42d5b23691ad73edfd6dbcfc935a960a9c5a65 | 0 | gen_intermediate_code_internal(TriCoreCPU *cpu, struct TranslationBlock *tb,
int search_pc)
{
CPUState *cs = CPU(cpu);
CPUTriCoreState *env = &cpu->env;
DisasContext ctx;
target_ulong pc_start;
int num_insns;
uint16_t *gen_opc_end;
if (search_pc) {
... | 24,450 |
qemu | 65d21bc73bda6515fd9b4ff5b2e90454f7a0b419 | 0 | static int raw_pread_aligned(BlockDriverState *bs, int64_t offset,
uint8_t *buf, int count)
{
BDRVRawState *s = bs->opaque;
int ret;
ret = fd_open(bs);
if (ret < 0)
return ret;
ret = pread(s->fd, buf, count, offset);
if (ret == count)
goto label... | 24,451 |
qemu | c878da3b27ceeed953c9f9a1eb002d59e9dcb4c6 | 0 | static void tcg_out_qemu_st_slow_path (TCGContext *s, TCGLabelQemuLdst *label)
{
int s_bits;
int ir;
int opc = label->opc;
int mem_index = label->mem_index;
int data_reg = label->datalo_reg;
int data_reg2 = label->datahi_reg;
int addr_reg = label->addrlo_reg;
uint8_t *raddr = la... | 24,452 |
FFmpeg | c96bd21227e594856f8fd0610fd213b002056383 | 0 | static int mpegaudio_parse(AVCodecParserContext *s1,
AVCodecContext *avctx,
const uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size)
{
MpegAudioParseContext *s = s1->priv_data;
int len, ret, sr;
uint... | 24,453 |
FFmpeg | 7f4ec4364bc4a73036660c1c6a3c4801db524e9e | 0 | int ff_replaygain_export_raw(AVStream *st, int32_t tg, uint32_t tp,
int32_t ag, uint32_t ap)
{
AVReplayGain *replaygain;
if (tg == INT32_MIN && ag == INT32_MIN)
return 0;
replaygain = (AVReplayGain*)ff_stream_new_side_data(st, AV_PKT_DATA_REPLAYGAIN,
... | 24,454 |
qemu | a7812ae412311d7d47f8aa85656faadac9d64b56 | 0 | static void dead_tmp(TCGv tmp)
{
int i;
num_temps--;
i = num_temps;
if (GET_TCGV(temps[i]) == GET_TCGV(tmp))
return;
/* Shuffle this temp to the last slot. */
while (GET_TCGV(temps[i]) != GET_TCGV(tmp))
i--;
while (i < num_temps) {
temps[i] = temps[i + 1... | 24,455 |
qemu | 269fe4c3ab0cf29329317eb868f8ec90ac761b41 | 0 | pvscsi_update_irq_status(PVSCSIState *s)
{
PCIDevice *d = PCI_DEVICE(s);
bool should_raise = s->reg_interrupt_enabled & s->reg_interrupt_status;
trace_pvscsi_update_irq_level(should_raise, s->reg_interrupt_enabled,
s->reg_interrupt_status);
if (s->msi_used && ... | 24,456 |
qemu | 81cf8d8adc64203567e03326c13ea4abec9fe5df | 0 | static inline void check_io(CPUX86State *env, int addr, int size)
{
int io_offset, val, mask;
/* TSS must be a valid 32 bit one */
if (!(env->tr.flags & DESC_P_MASK) ||
((env->tr.flags >> DESC_TYPE_SHIFT) & 0xf) != 9 ||
env->tr.limit < 103) {
goto fail;
}
io_offset... | 24,457 |
qemu | 376a790970de7e84170ee9360b6ff53ecfa4a1be | 0 | void page_set_flags(target_ulong start, target_ulong end, int flags)
{
PageDesc *p;
target_ulong addr;
/* mmap_lock should already be held. */
start = start & TARGET_PAGE_MASK;
end = TARGET_PAGE_ALIGN(end);
if (flags & PAGE_WRITE)
flags |= PAGE_WRITE_ORG;
for(addr = start... | 24,458 |
FFmpeg | c4b2017ba66e1623da9f527704c61c86a6e74844 | 1 | static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size,
int parse_extradata)
{
AVCodecContext *const avctx = h->avctx;
H264SliceContext *sl;
int buf_index;
unsigned context_count;
int next_avc;
int nals_needed = 0; ///< number of NALs tha... | 24,459 |
FFmpeg | 0382c94f13b4b20456b7259e90b170dc020419b8 | 1 | static int check_tag(AVIOContext *s, int offset, unsigned int len)
{
char tag[4];
if (len > 4 ||
avio_seek(s, offset, SEEK_SET) < 0 ||
avio_read(s, tag, len) < len)
return -1;
else if (!AV_RB32(tag) || is_tag(tag, len))
return 1;
return 0;
}
| 24,460 |
qemu | d09acb9b5ef0bb4fa94d3d459919a6ebaf8804bc | 1 | static void fw_cfg_bootsplash(FWCfgState *s)
{
int boot_splash_time = -1;
const char *boot_splash_filename = NULL;
char *p;
char *filename, *file_data;
int file_size;
int file_type = -1;
const char *temp;
/* get user configuration */
QemuOptsList *plist = qemu_find_opts("... | 24,461 |
qemu | 50d4a858e62b1d864227d13f07d2c79c118d046a | 1 | static ssize_t handle_aiocb_rw(RawPosixAIOData *aiocb)
{
ssize_t nbytes;
char *buf;
if (!(aiocb->aio_type & QEMU_AIO_MISALIGNED)) {
/*
* If there is just a single buffer, and it is properly aligned
* we can just use plain pread/pwrite without any problems.
*/
... | 24,462 |
qemu | f53671c054ba0b5d5b10e2a7294786fa2f73479e | 1 | static inline void set_txint(ChannelState *s)
{
s->txint = 1;
if (!s->rxint_under_svc) {
s->txint_under_svc = 1;
if (s->chn == chn_a) {
s->rregs[R_INTR] |= INTR_TXINTA;
if (s->wregs[W_MINTR] & MINTR_STATUSHI)
s->otherchn->rregs[R_IVEC] = IVEC_HITXI... | 24,463 |
FFmpeg | 87e8788680e16c51f6048af26f3f7830c35207a5 | 0 | static int rm_probe(AVProbeData *p)
{
/* check file header */
if (p->buf_size <= 32)
return 0;
if ((p->buf[0] == '.' && p->buf[1] == 'R' &&
p->buf[2] == 'M' && p->buf[3] == 'F' &&
p->buf[4] == 0 && p->buf[5] == 0) ||
(p->buf[0] == '.' && p->buf[1] == 'r' &&
... | 24,464 |
FFmpeg | bb23a15df507440deb0dcf25099d321d0f73dc28 | 0 | static int read_sm_data(AVFormatContext *s, AVIOContext *bc, AVPacket *pkt, int is_meta, int64_t maxpos)
{
int count = ffio_read_varlen(bc);
int skip_start = 0;
int skip_end = 0;
int channels = 0;
int64_t channel_layout = 0;
int sample_rate = 0;
int width = 0;
int height = 0;
... | 24,465 |
FFmpeg | 8005b6de4f88c9e3739a3a4ceda4288804788df9 | 0 | static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx, const float *audio,
const float *la, int channel, int prev_type)
{
AacPsyContext *pctx = (AacPsyContext*) ctx->model_priv_data;
AacPsyChannel *pch = &pctx->ch[channel];
int grouping = 0;
int uselo... | 24,466 |
FFmpeg | 4bff9ef9d0781c4de228bf1f85634d2706fc589b | 0 | static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst,
long width, long height,
long lumStride, long chromStride, long dstStride, long vertLumPerChroma)
{
long y;
const long chromWidth= width>>1;
for(y=0; y<height; y++)
{
#ifdef HAVE_MMX
//... | 24,467 |
FFmpeg | 69c1fe7c9c9bc85eebfc02c6a19caf7e88cd74ff | 0 | static int ass_get_duration(const uint8_t *p)
{
int sh, sm, ss, sc, eh, em, es, ec;
uint64_t start, end;
if (sscanf(p, "%*[^,],%d:%d:%d%*c%d,%d:%d:%d%*c%d",
&sh, &sm, &ss, &sc, &eh, &em, &es, &ec) != 8)
return 0;
start = 3600000 * sh + 60000 * sm + 1000 * ss + 10 * sc;
... | 24,468 |
qemu | 7174970a94df10ee84143edc7c94a2472d654604 | 1 | static inline abi_long host_to_target_cmsg(struct target_msghdr *target_msgh,
struct msghdr *msgh)
{
struct cmsghdr *cmsg = CMSG_FIRSTHDR(msgh);
abi_long msg_controllen;
abi_ulong target_cmsg_addr;
struct target_cmsghdr *target_cmsg, *target_cmsg_start;
... | 24,470 |
qemu | 09aaa1602f9381c0e0fb539390b1793e51bdfc7b | 1 | static void ib700_pc_init(PCIBus *unused)
{
register_savevm("ib700_wdt", -1, 0, ib700_save, ib700_load, NULL);
register_ioport_write(0x441, 2, 1, ib700_write_disable_reg, NULL);
register_ioport_write(0x443, 2, 1, ib700_write_enable_reg, NULL);
}
| 24,473 |
qemu | ad0ebb91cd8b5fdc4a583b03645677771f420a46 | 1 | static int vscsi_srp_indirect_data(VSCSIState *s, vscsi_req *req,
uint8_t *buf, uint32_t len)
{
struct srp_direct_buf *td = &req->ind_desc->table_desc;
struct srp_direct_buf *md = req->cur_desc;
int rc = 0;
uint32_t llen, total = 0;
dprintf("VSCSI: indirec... | 24,474 |
FFmpeg | 07728a111583be6865b7ce2adea705af9d207588 | 1 | static int decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
BinkAudioContext *s = avctx->priv_data;
AVFrame *frame = data;
GetBitContext *gb = &s->gb;
int ret, consumed = 0;
if (!get_bits_left(gb)) {
uint8_t *buf;
... | 24,475 |
FFmpeg | 5806e8cd1f60c67d936fa44dd4421428489503f5 | 0 | static int decode_cabac_intra_mb_type(H264Context *h, int ctx_base, int intra_slice) {
uint8_t *state= &h->cabac_state[ctx_base];
int mb_type;
if(intra_slice){
MpegEncContext * const s = &h->s;
const int mba_xy = h->left_mb_xy[0];
const int mbb_xy = h->top_mb_xy;
int... | 24,476 |
FFmpeg | e5540b3fd30367ce3cc33b2f34a04b660dbc4b38 | 0 | static int decode_p_picture_header(VC9Context *v)
{
/* INTERFRM, FRMCNT, RANGEREDFRM read in caller */
int lowquant, pqindex;
pqindex = get_bits(&v->gb, 5);
if (v->quantizer_mode == QUANT_FRAME_IMPLICIT)
v->pq = pquant_table[0][pqindex];
else
{
v->pq = pquant_table[v->... | 24,477 |
FFmpeg | 72dbc610be3272ba36603f78a39cc2d2d8fe0cc3 | 0 | void ff_avg_h264_qpel8_mc12_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride)
{
avc_luma_midh_qrt_and_aver_dst_8w_msa(src - (2 * stride) - 2,
stride, dst, stride, 8, 0);
}
| 24,479 |
FFmpeg | aac46e088d67a390489af686b846dea4987d8ffb | 0 | static void sbr_hf_assemble(float Y[2][38][64][2], const float X_high[64][40][2],
SpectralBandReplication *sbr, SBRData *ch_data,
const int e_a[2])
{
int e, i, j, m;
const int h_SL = 4 * !sbr->bs_smoothing_mode;
const int kx = sbr->kx[1];
co... | 24,480 |
FFmpeg | c8dcff0cdb17d0aa03ac729eba12d1a20f1f59c8 | 0 | int ff_init_poc(H264Context *h, int pic_field_poc[2], int *pic_poc)
{
const SPS *sps = h->ps.sps;
const int max_frame_num = 1 << sps->log2_max_frame_num;
int field_poc[2];
h->frame_num_offset = h->prev_frame_num_offset;
if (h->frame_num < h->prev_frame_num)
h->frame_num_offset += ma... | 24,481 |
qemu | b8afb520e479e693c227aa39c2fb7670743e104f | 1 | static void mirror_start_job(BlockDriverState *bs, BlockDriverState *target,
int64_t speed, int64_t granularity,
int64_t buf_size,
BlockdevOnError on_source_error,
BlockdevOnError on_target_error,
... | 24,482 |
FFmpeg | 078d43e23a7a3d64aafee8a58b380d3e139b3020 | 1 | static int sdp_parse_rtpmap(AVFormatContext *s,
AVStream *st, RTSPStream *rtsp_st,
int payload_type, const char *p)
{
AVCodecContext *codec = st->codec;
char buf[256];
int i;
AVCodec *c;
const char *c_name;
/* See if we can handl... | 24,487 |
FFmpeg | 28f9ab7029bd1a02f659995919f899f84ee7361b | 0 | void ff_dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)
{
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
// Common optimizations whether AltiVec is available or not
c->prefetch = prefetch_ppc;
if (!high_bit_depth) {
switch (check_dcbzl_effect()) {
case 32:
... | 24,489 |
qemu | 0e321191224c8cd137eef41da3257e096965c3d6 | 1 | bool hbitmap_get(const HBitmap *hb, uint64_t item)
{
/* Compute position and bit in the last layer. */
uint64_t pos = item >> hb->granularity;
unsigned long bit = 1UL << (pos & (BITS_PER_LONG - 1));
return (hb->levels[HBITMAP_LEVELS - 1][pos >> BITS_PER_LEVEL] & bit) != 0;
} | 24,490 |
FFmpeg | f6e1c96730ebbcebbd0341329d51d3d3a36b4fa1 | 1 | static int ffm_is_avail_data(AVFormatContext *s, int size)
{
FFMContext *ffm = s->priv_data;
int64_t pos, avail_size;
int len;
len = ffm->packet_end - ffm->packet_ptr;
if (size <= len)
return 1;
pos = avio_tell(s->pb);
if (!ffm->write_index) {
if (pos == ffm->file... | 24,491 |
qemu | 4cad3867b6df2c0826ae508a9fe15dd0b9d8936a | 1 | int fw_cfg_add_bytes(FWCfgState *s, uint16_t key, uint8_t *data, uint32_t len)
{
int arch = !!(key & FW_CFG_ARCH_LOCAL);
key &= FW_CFG_ENTRY_MASK;
if (key >= FW_CFG_MAX_ENTRY)
return 0;
s->entries[arch][key].data = data;
s->entries[arch][key].len = len;
return 1;
}
| 24,492 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.