id int32 0 27.3k | func stringlengths 26 142k | target bool 2
classes | project stringclasses 2
values | commit_id stringlengths 40 40 |
|---|---|---|---|---|
18,496 | void ff_set_mpeg4_time(MpegEncContext * s){
if(s->pict_type==AV_PICTURE_TYPE_B){
ff_mpeg4_init_direct_mv(s);
}else{
s->last_time_base= s->time_base;
s->time_base= s->time/s->avctx->time_base.den;
}
}
| false | FFmpeg | 38bb5a5434f913451aa512624a92b12b9925690f |
18,498 | static int skeleton_header(AVFormatContext *s, int idx)
{
struct ogg *ogg = s->priv_data;
struct ogg_stream *os = ogg->streams + idx;
AVStream *st = s->streams[idx];
uint8_t *buf = os->buf + os->pstart;
int version_major, version_minor;
int64_t start_num, start_den, start_granule;
in... | true | FFmpeg | f927c5b753f2ec1f037ad38cb55b4407dd7a9d79 |
18,499 | static void virtio_net_set_status(struct VirtIODevice *vdev, uint8_t status)
{
VirtIONet *n = VIRTIO_NET(vdev);
VirtIONetQueue *q;
int i;
uint8_t queue_status;
virtio_net_vnet_endian_status(n, status);
virtio_net_vhost_status(n, status);
for (i = 0; i < n->max_queues; i++) {
... | true | qemu | 70e53e6e4da3db4b2c31981191753a7e974936d0 |
18,500 | static void alloc_picture(void *opaque)
{
VideoState *is = opaque;
VideoPicture *vp;
vp = &is->pictq[is->pictq_windex];
if (vp->bmp)
SDL_FreeYUVOverlay(vp->bmp);
#if CONFIG_AVFILTER
if (vp->picref)
avfilter_unref_buffer(vp->picref);
vp->picref = NULL;
vp->w... | false | FFmpeg | 70d54392f5015b9c6594fcae558f59f952501e3b |
18,502 | static void int_to_int16(int16_t *out, const int *inp)
{
int i;
for (i=0; i<30; i++)
*(out++) = *(inp++);
}
| false | FFmpeg | 6c9c8b06b32013c58101f27991eae251bf4eb485 |
18,504 | static int decode_frame_adu(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
MPADecodeContext *s = avctx->priv_data;
uint32_t header;
int len, ret;
len = buf_size;... | false | FFmpeg | 955aec3c7c7be39b659197e1ec379a09f2b7c41c |
18,505 | static void fill_caches(H264Context *h, int mb_type, int for_deblock){
MpegEncContext * const s = &h->s;
const int mb_xy= h->mb_xy;
int topleft_xy, top_xy, topright_xy, left_xy[2];
int topleft_type, top_type, topright_type, left_type[2];
int * left_block;
int topleft_partition= -1;
in... | false | FFmpeg | 3d11b8ce13788653f7929e49a11681a1bae2f75e |
18,506 | int virtio_gpu_create_mapping_iov(struct virtio_gpu_resource_attach_backing *ab,
struct virtio_gpu_ctrl_command *cmd,
struct iovec **iov)
{
struct virtio_gpu_mem_entry *ents;
size_t esize, s;
int i;
if (ab->nr_entries > 16384) ... | true | qemu | 7f3be0f20ff8d976ab982cc06026cac0600f1fb6 |
18,507 | static int check_refcounts_l2(BlockDriverState *bs,
uint16_t *refcount_table, int refcount_table_size, int64_t l2_offset,
int check_copied)
{
BDRVQcowState *s = bs->opaque;
uint64_t *l2_table, offset;
int i, l2_size, nb_csectors, refcount;
int errors = 0;
/* Read L2 table from disk */
l2... | true | qemu | 54c42368f57c02b0970bb32b4542f99b913908ba |
18,508 | static inline void direct_ref_list_init(H264Context * const h){
MpegEncContext * const s = &h->s;
Picture * const ref1 = &h->ref_list[1][0];
Picture * const cur = s->current_picture_ptr;
int list, i, j;
int sidx= s->picture_structure&1;
int ref1sidx= ref1->reference&1;
for(list=0; lis... | false | FFmpeg | 42de393dcb354c2981cdd39aa52992dc77594feb |
18,509 | static inline void tm2_high_chroma(int *data, int stride, int *last, int *CD, int *deltas)
{
int i, j;
for (j = 0; j < 2; j++) {
for (i = 0; i < 2; i++) {
CD[j] += deltas[i + j * 2];
last[i] += CD[j];
data[i] = last[i];
}
data += stride;
... | true | FFmpeg | 44874b4f5ec2c605c70393573b9d85540ebc2d81 |
18,510 | static int bdrv_check_byte_request(BlockDriverState *bs, int64_t offset,
size_t size)
{
int64_t len;
if (!bdrv_is_inserted(bs))
return -ENOMEDIUM;
if (bs->growable)
return 0;
len = bdrv_getlength(bs);
if ((offset + size) > len)
... | true | qemu | fbb7b4e0804d2168f24142eebf7552adde1968dc |
18,511 | static int aiff_read_header(AVFormatContext *s)
{
int ret, size, filesize;
int64_t offset = 0, position;
uint32_t tag;
unsigned version = AIFF_C_VERSION1;
AVIOContext *pb = s->pb;
AVStream * st;
AIFFInputContext *aiff = s->priv_data;
ID3v2ExtraMeta *id3v2_extra_meta = NULL;
... | true | FFmpeg | ad5807f8aa883bee5431186dc1f24c5435d722d3 |
18,514 | static int qemu_signal_init(void)
{
int sigfd;
sigset_t set;
#ifdef CONFIG_IOTHREAD
/* SIGUSR2 used by posix-aio-compat.c */
sigemptyset(&set);
sigaddset(&set, SIGUSR2);
pthread_sigmask(SIG_UNBLOCK, &set, NULL);
/*
* SIG_IPI must be blocked in the main thread and must not ... | true | qemu | 12d4536f7d911b6d87a766ad7300482ea663cea2 |
18,515 | static void gen_neon_dup_high16(TCGv var)
{
TCGv tmp = new_tmp();
tcg_gen_andi_i32(var, var, 0xffff0000);
tcg_gen_shri_i32(tmp, var, 16);
tcg_gen_or_i32(var, var, tmp);
dead_tmp(tmp);
}
| true | qemu | 7d1b0095bff7157e856d1d0e6c4295641ced2752 |
18,516 | static void lx60_net_init(MemoryRegion *address_space,
hwaddr base,
hwaddr descriptors,
hwaddr buffers,
qemu_irq irq, NICInfo *nd)
{
DeviceState *dev;
SysBusDevice *s;
MemoryRegion *ram;
dev = qdev_create(NULL, "open_eth");
qdev_set_nic_properties(dev, nd)... | true | qemu | f8ed85ac992c48814d916d5df4d44f9a971c5de4 |
18,517 | void destroy_nic(dev_match_fn *match_fn, void *arg)
{
int i;
NICInfo *nic;
for (i = 0; i < MAX_NICS; i++) {
nic = &nd_table[i];
if (nic->used) {
if (nic->private && match_fn(nic->private, arg)) {
if (nic->vlan) {
VLANClientState *vc;... | true | qemu | ae50b2747f77944faa79eb914272b54eb30b63b3 |
18,519 | static av_cold int pcm_encode_close(AVCodecContext *avctx)
{
av_freep(&avctx->coded_frame);
return 0;
}
| false | FFmpeg | d6604b29ef544793479d7fb4e05ef6622bb3e534 |
18,520 | static void extract_exponents(AC3EncodeContext *s)
{
int blk, ch, i;
for (ch = 0; ch < s->channels; ch++) {
for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) {
AC3Block *block = &s->blocks[blk];
for (i = 0; i < AC3_MAX_COEFS; i++) {
int e;
int v... | false | FFmpeg | 9be52d48d9137e05361dd1ffb6b1fb3677e1fb47 |
18,521 | static av_cold int nvenc_dyload_cuda(AVCodecContext *avctx)
{
NvencContext *ctx = avctx->priv_data;
NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs;
#if CONFIG_CUDA
dl_fn->cu_init = cuInit;
dl_fn->cu_device_get_count = cuDeviceGetCount;
dl_fn->cu_device_... | false | FFmpeg | 0d021cc8b30a6f81c27fbeca7f99f1ee7a20acf8 |
18,522 | static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len)
{
MpegTSContext *ts = filter->u.section_filter.opaque;
MpegTSSectionFilter *tssf = &filter->u.section_filter;
SectionHeader h1, *h = &h1;
const uint8_t *p, *p_end;
int sid, pmt_pid;
AVProgram *program;
... | false | FFmpeg | 4e8d01f20ce82b49f47c704a461c5d30866affaf |
18,525 | int ff_wma_init(AVCodecContext * avctx, int flags2)
{
WMACodecContext *s = avctx->priv_data;
int i;
float *window;
float bps1, high_freq;
volatile float bps;
int sample_rate1;
int coef_vlc_table;
s->sample_rate = avctx->sample_rate;
s->nb_channels = avctx->channels;
s->bit_rate =... | true | FFmpeg | 47b777ceed470104fb4e6325d5ac1bddbb4752c8 |
18,526 | void do_blockdev_backup(BlockdevBackup *backup, BlockJobTxn *txn, Error **errp)
{
BlockDriverState *bs;
BlockDriverState *target_bs;
Error *local_err = NULL;
AioContext *aio_context;
if (!backup->has_speed) {
backup->speed = 0;
}
if (!backup->has_on_source_error) {
... | true | qemu | 111049a4ecefc9cf1ac75c773f4c5c165f27fe63 |
18,527 | static int decode_extradata(AVFormatContext *s, ADTSContext *adts, uint8_t *buf, int size)
{
GetBitContext gb;
init_get_bits(&gb, buf, size * 8);
adts->objecttype = get_bits(&gb, 5) - 1;
adts->sample_rate_index = get_bits(&gb, 4);
adts->channel_conf = get_bits(&gb, 4);
if (adts->objec... | true | FFmpeg | ecc3a139b8858553e4ec8b3f4dd04510c6c94b03 |
18,530 | static int scsi_write_data(SCSIDevice *d, uint32_t tag)
{
SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, d);
SCSIGenericReq *r;
int ret;
DPRINTF("scsi_write_data 0x%x\n", tag);
r = scsi_find_request(s, tag);
if (!r) {
BADF("Bad write tag 0x%x\n", tag);
/* ??? ... | true | qemu | 5c6c0e513600ba57c3e73b7151d3c0664438f7b5 |
18,531 | static void sd_reset(SDState *sd, BlockDriverState *bdrv)
{
uint64_t size;
uint64_t sect;
if (bdrv) {
bdrv_get_geometry(bdrv, §);
} else {
sect = 0;
}
sect <<= 9;
size = sect + 1;
sect = (size >> (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT)) + 1;
... | true | qemu | 5e37141bbb9796ef139aee902a882ca97d59b84d |
18,532 | static void arm_idct_put(UINT8 *dest, int line_size, DCTELEM *block)
{
j_rev_dct_ARM (block);
put_pixels_clamped(block, dest, line_size);
}
| false | FFmpeg | 83f238cbf0c038245d2b2dffa5beb0916e7c36d2 |
18,533 | int ff_lpc_calc_coefs(DSPContext *s,
const int32_t *samples, int blocksize, int max_order,
int precision, int32_t coefs[][MAX_LPC_ORDER],
int *shift, int use_lpc, int omethod, int max_shift, int zero_shift)
{
double autoc[MAX_LPC_ORDER+1];
... | false | FFmpeg | 56c07e298914d0533a74bb4ba4be4abc8ea6b245 |
18,534 | static inline av_flatten int get_symbol_inline(RangeCoder *c, uint8_t *state,
int is_signed)
{
if (get_rac(c, state + 0))
return 0;
else {
int i, e, a;
e = 0;
while (get_rac(c, state + 1 + FFMIN(e, 9))) // 1..10
... | false | FFmpeg | b2955b6c5aed11026ec5c7164462899a10cdb937 |
18,535 | static int theora_decode_tables(AVCodecContext *avctx, GetBitContext gb)
{
Vp3DecodeContext *s = avctx->priv_data;
int i, n, matrices;
if (s->theora >= 0x030200) {
n = get_bits(&gb, 3);
/* loop filter limit values table */
for (i = 0; i < 64; i++)
s->filter_limi... | false | FFmpeg | e278056fbad7405fc47901faea7de98db003a0fa |
18,536 | static int ac3_eac3_probe(AVProbeData *p, enum AVCodecID expected_codec_id)
{
int max_frames, first_frames = 0, frames;
const uint8_t *buf, *buf2, *end;
enum AVCodecID codec_id = AV_CODEC_ID_AC3;
max_frames = 0;
buf = p->buf;
end = buf + p->buf_size;
for(; buf < end; buf++) {
... | false | FFmpeg | eb54efc1e1aafe18d0a8a0c72a78314645bccc83 |
18,537 | static int segment_end(AVFormatContext *oc, int write_trailer)
{
int ret = 0;
av_write_frame(oc, NULL); /* Flush any buffered data (fragmented mp4) */
if (write_trailer)
av_write_trailer(oc);
avio_close(oc->pb);
return ret;
}
| false | FFmpeg | 9f61abc8111c7c43f49ca012e957a108b9cc7610 |
18,538 | AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c)
{
AVStream *st;
int i;
if (av_reallocp_array(&s->streams, s->nb_streams + 1,
sizeof(*s->streams)) < 0) {
s->nb_streams = 0;
return NULL;
}
st = av_mallocz(sizeof(AVStream));
... | false | FFmpeg | a0c71a575109f123978e345fa7eb4ac03cd4d3c3 |
18,539 | static int cdxa_probe(AVProbeData *p)
{
/* check file header */
if (p->buf[0] == 'R' && p->buf[1] == 'I' &&
p->buf[2] == 'F' && p->buf[3] == 'F' &&
p->buf[8] == 'C' && p->buf[9] == 'D' &&
p->buf[10] == 'X' && p->buf[11] == 'A')
return AVPROBE_SCORE_MAX;
else
... | false | FFmpeg | 7dc75e8d4375a36a6a19a050f2bee6bd76c7a912 |
18,540 | static int set_string_fmt(void *obj, const AVOption *o, const char *val, uint8_t *dst,
int fmt_nb, int ((*get_fmt)(const char *)), const char *desc)
{
int fmt;
if (!val || !strcmp(val, "none")) {
fmt = -1;
} else {
fmt = get_fmt(val);
if (fmt == -1... | false | FFmpeg | 55f046be1193142536198957d1701d18881d3b7a |
18,542 | static int ratecontrol_1pass(SnowContext *s, AVFrame *pict)
{
/* estimate the frame's complexity as a sum of weighted dwt coefs.
* FIXME we know exact mv bits at this point,
* but ratecontrol isn't set up to include them. */
uint32_t coef_sum= 0;
int level, orientation, delta_qlog;
fo... | false | FFmpeg | 5ed0d67da5b032f6e186b6513efeed181955b2ad |
18,544 | static void lsp2lpc(int16_t *lpc)
{
int f1[LPC_ORDER / 2 + 1];
int f2[LPC_ORDER / 2 + 1];
int i, j;
/* Calculate negative cosine */
for (j = 0; j < LPC_ORDER; j++) {
int index = lpc[j] >> 7;
int offset = lpc[j] & 0x7f;
int temp1 = cos_tab[index] << 16;
... | false | FFmpeg | b74b88f30da2389f333a31815d8326d5576d3331 |
18,546 | static inline void mix_3f_2r_to_dolby(AC3DecodeContext *ctx)
{
int i;
float (*output)[256] = ctx->audio_block.block_output;
for (i = 0; i < 256; i++) {
output[1][i] += (output[2][i] - output[4][i] - output[5][i]);
output[2][i] += (output[3][i] + output[4][i] + output[5][i]);
}
... | false | FFmpeg | 486637af8ef29ec215e0e0b7ecd3b5470f0e04e5 |
18,547 | static int ffm_read_header(AVFormatContext *s)
{
FFMContext *ffm = s->priv_data;
AVStream *st;
AVIOContext *pb = s->pb;
AVCodecContext *codec;
int i, nb_streams;
uint32_t tag;
/* header */
tag = avio_rl32(pb);
if (tag == MKTAG('F', 'F', 'M', '2'))
return ffm2_rea... | false | FFmpeg | 6fa98822eba501a4898fdec5b75acd3026201005 |
18,548 | static int svq3_decode_mb (H264Context *h, unsigned int mb_type) {
int i, j, k, m, dir, mode;
int cbp = 0;
uint32_t vlc;
int8_t *top, *left;
MpegEncContext *const s = (MpegEncContext *) h;
const int mb_xy = s->mb_x + s->mb_y*s->mb_stride;
const int b_xy = 4*s->mb_x + 4*s->mb_y*h->b_stride;
h->... | false | FFmpeg | cbf5374fc0f733cefe304fd4d11c7b0fa21fba61 |
18,549 | static void rtsp_send_cmd (AVFormatContext *s,
const char *cmd, RTSPMessageHeader *reply,
unsigned char **content_ptr)
{
rtsp_send_cmd_async(s, cmd, reply, content_ptr);
rtsp_read_reply(s, reply, content_ptr, 0);
}
| false | FFmpeg | c89658008705d949c319df3fa6f400c481ad73e1 |
18,550 | static int rtsp_read_header(AVFormatContext *s,
AVFormatParameters *ap)
{
RTSPState *rt = s->priv_data;
int ret;
ret = ff_rtsp_connect(s);
if (ret)
return ret;
rt->real_setup_cache = av_mallocz(2 * s->nb_streams * sizeof(*rt->real_setup_cache));
i... | true | FFmpeg | c77549c510370eaaa2e2bb1f15d1a30f29e30950 |
18,551 | static void xhci_event(XHCIState *xhci, XHCIEvent *event, int v)
{
XHCIInterrupter *intr;
dma_addr_t erdp;
unsigned int dp_idx;
if (v >= xhci->numintrs) {
DPRINTF("intr nr out of range (%d >= %d)\n", v, xhci->numintrs);
return;
}
intr = &xhci->intr[v];
if (intr-... | true | qemu | 898248a32915024a4f01ce4f0c3519509fb703cb |
18,552 | static void ehci_advance_state(EHCIState *ehci, int async)
{
EHCIQueue *q = NULL;
int again;
do {
switch(ehci_get_state(ehci, async)) {
case EST_WAITLISTHEAD:
again = ehci_state_waitlisthead(ehci, async);
break;
case EST_FETCHENTRY:
a... | true | qemu | 1ae3f2f178087711f9591350abad133525ba93f2 |
18,553 | int ff_lpc_calc_coefs(LPCContext *s,
const int32_t *samples, int blocksize, int min_order,
int max_order, int precision,
int32_t coefs[][MAX_LPC_ORDER], int *shift,
enum FFLPCType lpc_type, int lpc_passes,
int ... | true | FFmpeg | 894319e010c8db4d47ba0ad830f9677b72d5ece9 |
18,554 | void do_device_add(Monitor *mon, const QDict *qdict)
{
QemuOpts *opts;
opts = qemu_opts_parse(&qemu_device_opts,
qdict_get_str(qdict, "config"), "driver");
if (opts && !qdev_device_help(opts))
qdev_device_add(opts);
}
| true | qemu | 0f853a386739b22e541e6e65ed60a0cb37713340 |
18,555 | static void update_irq(struct xlx_pic *p)
{
uint32_t i;
/* level triggered interrupt */
if (p->regs[R_MER] & 2) {
p->regs[R_ISR] |= p->irq_pin_state & ~p->c_kind_of_intr;
}
/* Update the pending register. */
p->regs[R_IPR] = p->regs[R_ISR] & p->regs[R_IER];
/* Update ... | true | qemu | 0bc60bd7b34ad6e59b47dbf91179ba9427a85df7 |
18,558 | static void init_proc_e500 (CPUPPCState *env, int version)
{
uint32_t tlbncfg[2];
uint64_t ivor_mask = 0x0000000F0000FFFFULL;
#if !defined(CONFIG_USER_ONLY)
int i;
#endif
/* Time base */
gen_tbl(env);
/*
* XXX The e500 doesn't implement IVOR7 and IVOR9, but doesn't
* c... | true | qemu | a496e8eeba51351af136734e475c947a3673dded |
18,563 | static void interface_get_init_info(QXLInstance *sin, QXLDevInitInfo *info)
{
SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay, qxl);
info->memslot_gen_bits = MEMSLOT_GENERATION_BITS;
info->memslot_id_bits = MEMSLOT_SLOT_BITS;
info->num_memslots = NUM_MEMSLOTS;
info->num_memsl... | true | qemu | ab9509cceabef28071e41bdfa073083859c949a7 |
18,564 | static void mpc8_parse_seektable(AVFormatContext *s, int64_t off)
{
MPCContext *c = s->priv_data;
int tag;
int64_t size, pos, ppos[2];
uint8_t *buf;
int i, t, seekd;
GetBitContext gb;
avio_seek(s->pb, off, SEEK_SET);
mpc8_get_chunk_header(s->pb, &tag, &size);
if(tag != TA... | true | FFmpeg | b61ba262a1e275f8129b7383d70fe48051b47fcf |
18,565 | static void esp_do_dma(ESPState *s)
{
uint32_t len;
int to_device;
to_device = (s->ti_size < 0);
len = s->dma_left;
if (s->do_cmd) {
DPRINTF("command len %d + %d\n", s->cmdlen, len);
s->dma_memory_read(s->dma_opaque, &s->cmdbuf[s->cmdlen], len);
s->ti_size = 0;
... | true | qemu | 5c6c0e513600ba57c3e73b7151d3c0664438f7b5 |
18,566 | void ide_sector_write(IDEState *s)
{
int64_t sector_num;
int n;
s->status = READY_STAT | SEEK_STAT | BUSY_STAT;
sector_num = ide_get_sector(s);
#if defined(DEBUG_IDE)
printf("sector=%" PRId64 "\n", sector_num);
#endif
n = s->nsector;
if (n > s->req_nb_sectors) {
n = s->req_nb_sectors... | true | qemu | 58ac321135af890b503ebe56d0d00e184779918f |
18,567 | static void openrisc_sim_init(MachineState *machine)
{
ram_addr_t ram_size = machine->ram_size;
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
OpenRISCCPU *cpu = NULL;
MemoryRegion *ram;
int n;
if (!cpu_model) {
cpu_mode... | true | qemu | 4482e05cbbb7e50e476f6a9500cf0b38913bd939 |
18,568 | static int decode_block_coeffs_internal(VP56RangeCoder *c, DCTELEM block[16],
uint8_t probs[16][3][NUM_DCT_TOKENS-1],
int i, uint8_t *token_prob, int16_t qmul[2])
{
goto skip_eob;
do {
int coeff;
if (!vp56_rac... | false | FFmpeg | 6163d880c0ac8b84b45d1f7a94719c5a0a6b5cb9 |
18,569 | yuv2mono_X_c_template(SwsContext *c, const int16_t *lumFilter,
const int16_t **lumSrc, int lumFilterSize,
const int16_t *chrFilter, const int16_t **chrUSrc,
const int16_t **chrVSrc, int chrFilterSize,
const int16_t **alpSrc, uin... | false | FFmpeg | 1e0e193240a8e47a980ac76b8b5af831b17b7928 |
18,570 | int ff_rate_control_init(MpegEncContext *s)
{
RateControlContext *rcc= &s->rc_context;
int i;
char *error = NULL;
static const char *const_names[]={
"PI",
"E",
"iTex",
"pTex",
"tex",
"mv",
"fCode",
"iCount",
"mcVar",
... | false | FFmpeg | 90901860c21468d6e9ae437c2bacb099c7bd3acf |
18,572 | bool sysbus_has_irq(SysBusDevice *dev, int n)
{
char *prop = g_strdup_printf("%s[%d]", SYSBUS_DEVICE_GPIO_IRQ, n);
ObjectProperty *r;
r = object_property_find(OBJECT(dev), prop, NULL);
return (r != NULL);
} | true | qemu | 84b5d556dc29c06402783e98ee0eaa3369eb48e1 |
18,573 | static int coroutine_fn bdrv_co_block_status(BlockDriverState *bs,
bool want_zero,
int64_t offset, int64_t bytes,
int64_t *pnum, int64_t *map,
... | true | qemu | d470ad42acfc73c45d3e8ed5311a491160b4c100 |
18,574 | static void simple_string(void)
{
int i;
struct {
const char *encoded;
const char *decoded;
} test_cases[] = {
{ "\"hello world\"", "hello world" },
{ "\"the quick brown fox jumped over the fence\"",
"the quick brown fox jumped over the fence" },
{... | true | qemu | aec4b054ea36c53c8b887da99f20010133b84378 |
18,575 | static void spr_write_tbu(DisasContext *ctx, int sprn, int gprn)
{
if (ctx->tb->cflags & CF_USE_ICOUNT) {
gen_io_start();
}
gen_helper_store_tbu(cpu_env, cpu_gpr[gprn]);
if (ctx->tb->cflags & CF_USE_ICOUNT) {
gen_io_end();
gen_stop_exception(ctx);
}
}
| true | qemu | c5a49c63fa26e8825ad101dfe86339ae4c216539 |
18,576 | static int decode_block(AVCodecContext *avctx, void *tdata,
int jobnr, int threadnr)
{
EXRContext *s = avctx->priv_data;
AVFrame *const p = s->picture;
EXRThreadData *td = &s->thread_data[threadnr];
const uint8_t *channel_buffer[4] = { 0 };
const uint8_t *buf = s->buf;... | true | FFmpeg | 903be5e4f66268273dc6e3c42a7fdeaab32066ef |
18,577 | void watchdog_pc_init(PCIBus *pci_bus)
{
if (watchdog)
watchdog->wdt_pc_init(pci_bus);
}
| true | qemu | 09aaa1602f9381c0e0fb539390b1793e51bdfc7b |
18,579 | static void copy_bits(PutBitContext *pb,
const uint8_t *data, int size,
GetBitContext *gb, int nbits)
{
int rmn_bytes, rmn_bits;
rmn_bits = rmn_bytes = get_bits_left(gb);
if (rmn_bits < nbits)
rmn_bits &= 7; rmn_bytes >>= 3;
if ((rmn_bits = FF... | true | FFmpeg | e09ae22ab7d9af7f1cbfd2445fa71ad9e7c28ee3 |
18,581 | int ff_asf_parse_packet(AVFormatContext *s, ByteIOContext *pb, AVPacket *pkt)
{
ASFContext *asf = s->priv_data;
ASFStream *asf_st = 0;
for (;;) {
if(url_feof(pb))
return AVERROR_EOF;
if (asf->packet_size_left < FRAME_HEADER_SIZE
|| asf->packet_segments < 1) {
... | false | FFmpeg | 1d0036b01f1860fdead35a6efcdc1d0beb4c3269 |
18,582 | static int xmv_read_close(AVFormatContext *s)
{
XMVDemuxContext *xmv = s->priv_data;
av_free(xmv->audio);
av_free(xmv->audio_tracks);
return 0;
}
| false | FFmpeg | d1016dccdcb10486245e5d7c186cc31af54b2a9c |
18,584 | static void mpeg1_encode_sequence_header(MpegEncContext *s)
{
unsigned int vbv_buffer_size;
unsigned int fps, v;
int i;
uint64_t time_code;
float best_aspect_error= 1E10;
float aspect_ratio= av_q2d(s->avctx->sample_aspect_ratio);
int constraint_parameter_f... | false | FFmpeg | baced9f5986a466c957456f5cf32a722d8b35512 |
18,585 | int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
VP56Context *s = avctx->priv_data;
AVFrame *const p = s->frames[VP56_FRAME_CURRENT];
int remaining_buf_size = avpkt->size;
int av_uninit(al... | false | FFmpeg | feeb8ca56dc08bda19174502a687ae262ea3ee21 |
18,586 | static int vfio_get_device(VFIOGroup *group, const char *name,
VFIOPCIDevice *vdev)
{
struct vfio_device_info dev_info = { .argsz = sizeof(dev_info) };
struct vfio_region_info reg_info = { .argsz = sizeof(reg_info) };
struct vfio_irq_info irq_info = { .argsz = sizeof(irq_info... | false | qemu | b47d8efa9f430c332bf96ce6eede169eb48422ad |
18,587 | static void css_inject_io_interrupt(SubchDev *sch)
{
S390CPU *cpu = s390_cpu_addr2state(0);
uint8_t isc = (sch->curr_status.pmcw.flags & PMCW_FLAGS_MASK_ISC) >> 11;
trace_css_io_interrupt(sch->cssid, sch->ssid, sch->schid,
sch->curr_status.pmcw.intparm, isc, "");
s390_... | false | qemu | de13d2161473d02ae97ec0f8e4503147554892dd |
18,588 | static int bonito_initfn(PCIDevice *dev)
{
PCIBonitoState *s = DO_UPCAST(PCIBonitoState, dev, dev);
/* Bonito North Bridge, built on FPGA, VENDOR_ID/DEVICE_ID are "undefined" */
pci_config_set_vendor_id(dev->config, 0xdf53);
pci_config_set_device_id(dev->config, 0x00d5);
pci_config_set_class... | false | qemu | 51387f864c7421aba07b5b445cd7835bbc496a07 |
18,589 | static void decode_opc (CPUMIPSState *env, DisasContext *ctx, int *is_branch)
{
int32_t offset;
int rs, rt, rd, sa;
uint32_t op, op1, op2;
int16_t imm;
/* make sure instructions are on a word boundary */
if (ctx->pc & 0x3) {
env->CP0_BadVAddr = ctx->pc;
generate_except... | false | qemu | df6126a7f21a1a032e41b15899ca29777399d5a2 |
18,590 | static void stream_complete(BlockJob *job, void *opaque)
{
StreamBlockJob *s = container_of(job, StreamBlockJob, common);
StreamCompleteData *data = opaque;
BlockDriverState *bs = blk_bs(job->blk);
BlockDriverState *base = s->base;
Error *local_err = NULL;
if (!block_job_is_cancelled(&s... | false | qemu | 158c6492571c82c5632070c7ccee36b3dffd3ca9 |
18,591 | static void img_snapshot(int argc, char **argv)
{
BlockDriverState *bs;
QEMUSnapshotInfo sn;
char *filename, *snapshot_name = NULL;
int c, ret;
int action = 0;
qemu_timeval tv;
/* Parse commandline parameters */
for(;;) {
c = getopt(argc, argv, "la:c:d:h");
i... | false | qemu | 153859be1a0928d07ec2dc2b18847e32e180ff43 |
18,592 | static void pack_yuv(TiffEncoderContext * s, uint8_t * dst, int lnum)
{
AVFrame *p = &s->picture;
int i, j, k;
int w = (s->width - 1) / s->subsampling[0] + 1;
uint8_t *pu = &p->data[1][lnum / s->subsampling[1] * p->linesize[1]];
uint8_t *pv = &p->data[2][lnum / s->subsampling[1] * p->linesize[... | false | FFmpeg | d04956344d38ddd77ec61042ce57cd9021491c83 |
18,593 | static inline void RENAME(yuv2yuvX)(SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize,
const int16_t *chrFilter, const int16_t **chrSrc, int chrFilterSize, const int16_t **alpSrc,
uint8_t *dest, uint8_t *uDest, ui... | false | FFmpeg | d1adad3cca407f493c3637e20ecd4f7124e69212 |
18,594 | static void do_svc_interrupt(CPUS390XState *env)
{
uint64_t mask, addr;
LowCore *lowcore;
hwaddr len = TARGET_PAGE_SIZE;
lowcore = cpu_physical_memory_map(env->psa, &len, 1);
lowcore->svc_code = cpu_to_be16(env->int_svc_code);
lowcore->svc_ilen = cpu_to_be16(env->int_svc_ilen);
l... | false | qemu | 4782a23b270ecbb9ce0ca6f3f1b60857a09cef0e |
18,595 | void qmp_blockdev_snapshot_sync(bool has_device, const char *device,
bool has_node_name, const char *node_name,
const char *snapshot_file,
bool has_snapshot_node_name,
const char *snapshot... | false | qemu | 32bafa8fdd098d52fbf1102d5a5e48d29398c0aa |
18,599 | void *address_space_map(AddressSpace *as,
hwaddr addr,
hwaddr *plen,
bool is_write)
{
AddressSpaceDispatch *d = as->dispatch;
hwaddr len = *plen;
hwaddr todo = 0;
int l;
hwaddr page;
MemoryRegionSection *section;
... | false | qemu | 149f54b53b7666a3facd45e86eece60ce7d3b114 |
18,600 | static void g364fb_ctrl_write(void *opaque,
target_phys_addr_t addr,
uint64_t val,
unsigned int size)
{
G364State *s = opaque;
trace_g364fb_write(addr, val);
if (addr >= REG_CLR_PAL && addr < REG_CLR_PAL + 0... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c |
18,601 | int kvm_arch_insert_hw_breakpoint(target_ulong addr,
target_ulong len, int type)
{
switch (type) {
case GDB_BREAKPOINT_HW:
len = 1;
break;
case GDB_WATCHPOINT_WRITE:
case GDB_WATCHPOINT_ACCESS:
switch (len) {
case 1:
... | false | qemu | b9bec74bcb16519a876ec21cd5277c526a9b512d |
18,602 | void qemu_del_wait_object(HANDLE handle, WaitObjectFunc *func, void *opaque)
{
int i, found;
WaitObjects *w = &wait_objects;
found = 0;
for (i = 0; i < w->num; i++) {
if (w->events[i] == handle)
found = 1;
if (found) {
w->events[i] = w->events[i + 1];
... | false | qemu | d3b12f5dec4b27ebab58fb5797cb67bacced773b |
18,604 | static void vc1_interp_mc(VC1Context *v)
{
MpegEncContext *s = &v->s;
DSPContext *dsp = &v->s.dsp;
H264ChromaContext *h264chroma = &v->h264chroma;
uint8_t *srcY, *srcU, *srcV;
int dxy, mx, my, uvmx, uvmy, src_x, src_y, uvsrc_x, uvsrc_y;
int off, off_uv;
int v_edge_pos = s->v_edge_pos... | false | FFmpeg | 0d194ee51ed477f843900e657a7edbcbecdffa42 |
18,605 | static void s390_msi_ctrl_write(void *opaque, hwaddr addr, uint64_t data,
unsigned int size)
{
S390PCIBusDevice *pbdev;
uint32_t io_int_word;
uint32_t fid = data >> ZPCI_MSI_VEC_BITS;
uint32_t vec = data & ZPCI_MSI_VEC_MASK;
uint64_t ind_bit;
uint32_t sum_... | false | qemu | 5d1abf234462d13bef3617cc2c55b6815703ddf2 |
18,606 | static int qcow2_create2(const char *filename, int64_t total_size,
const char *backing_file, const char *backing_format,
int flags, size_t cluster_size, int prealloc,
QEMUOptionParameter *options)
{
/* Calculate cluster_bits */
int... | false | qemu | 6744cbab8cd63b7ce72b3eee4f0055007acf0798 |
18,607 | static int virtio_mmio_set_guest_notifier(DeviceState *d, int n, bool assign,
bool with_irqfd)
{
VirtIOMMIOProxy *proxy = VIRTIO_MMIO(d);
VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_GET_CLASS(vdev);
VirtQ... | false | qemu | 2858bc68701e282c404ed04d65d4f065e4b40e52 |
18,608 | static int vhdx_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
BDRVVHDXState *s = bs->opaque;
int ret = 0;
uint32_t i;
uint64_t signature;
uint32_t data_blocks_cnt, bitmap_blocks_cnt;
s->bat = NULL;
s->first_visible_write = true;
... | false | qemu | 0a43a1b5d7c33208120eeb2d98ebb9ab15dc2c87 |
18,609 | void pci_register_bar(PCIDevice *pci_dev, int region_num,
pcibus_t size, int type,
PCIMapIORegionFunc *map_func)
{
PCIIORegion *r;
uint32_t addr;
uint64_t wmask;
if ((unsigned int)region_num >= PCI_NUM_REGIONS)
return;
if (... | false | qemu | 2bbb9c2f7f36d0457cda5f27d7e4422219b3acd8 |
18,610 | static void loadvm_postcopy_handle_run_bh(void *opaque)
{
Error *local_err = NULL;
HandleRunBhData *data = opaque;
/* TODO we should move all of this lot into postcopy_ram.c or a shared code
* in migration.c
*/
cpu_synchronize_all_post_init();
qemu_announce_self();
/* Ma... | false | qemu | 4417ab7adf1613799054be5afedf810fc2524ee8 |
18,611 | BlockAIOCB *bdrv_aio_writev(BlockDriverState *bs, int64_t sector_num,
QEMUIOVector *qiov, int nb_sectors,
BlockCompletionFunc *cb, void *opaque)
{
trace_bdrv_aio_writev(bs, sector_num, nb_sectors, opaque);
return bdrv_co_aio_rw_vector(bs, sector_num... | false | qemu | 61007b316cd71ee7333ff7a0a749a8949527575f |
18,612 | void HELPER(srstu)(CPUS390XState *env, uint32_t r1, uint32_t r2)
{
uintptr_t ra = GETPC();
uint32_t len;
uint16_t v, c = env->regs[0];
uint64_t end, str, adj_end;
/* Bits 32-47 of R0 must be zero. */
if (env->regs[0] & 0xffff0000u) {
cpu_restore_state(ENV_GET_CPU(env), ra);
... | false | qemu | 8d2f850a5ab7579a852f23b28273940a47dfd7ff |
18,616 | static void scsi_aio_complete(void *opaque, int ret)
{
SCSIDiskReq *r = (SCSIDiskReq *)opaque;
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
assert(r->req.aiocb != NULL);
r->req.aiocb = NULL;
block_acct_done(bdrv_get_stats(s->qdev.conf.bs), &r->acct);
if (r->req.io_canc... | false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce |
18,617 | static void set_mem_path(Object *o, const char *str, Error **errp)
{
HostMemoryBackend *backend = MEMORY_BACKEND(o);
HostMemoryBackendFile *fb = MEMORY_BACKEND_FILE(o);
if (memory_region_size(&backend->mr)) {
error_setg(errp, "cannot change property value");
return;
}
if (f... | false | qemu | ef1e1e0782e99c9dcf2b35e5310cdd8ca9211374 |
18,618 | static always_inline void gen_store_mem (DisasContext *ctx,
void (*tcg_gen_qemu_store)(TCGv t0, TCGv t1, int flags),
int ra, int rb, int32_t disp16,
int fp, int clear, int local)
{
TCGv ad... | false | qemu | a7812ae412311d7d47f8aa85656faadac9d64b56 |
18,622 | static int print_uint16(DeviceState *dev, Property *prop, char *dest, size_t len)
{
uint16_t *ptr = qdev_get_prop_ptr(dev, prop);
return snprintf(dest, len, "%" PRIu16, *ptr);
}
| true | qemu | 5cb9b56acfc0b50acf7ccd2d044ab4991c47fdde |
18,623 | static int get_sot(Jpeg2000DecoderContext *s, int n)
{
Jpeg2000TilePart *tp;
uint16_t Isot;
uint32_t Psot;
uint8_t TPsot;
if (bytestream2_get_bytes_left(&s->g) < 8)
Isot = bytestream2_get_be16u(&s->g); // Isot
if (Isot) {
avpriv_request_sample(s->avctx, "Support for more than ... | true | FFmpeg | d3cb302b88503c3111e25add196622110c056188 |
18,625 | static int cirrus_do_copy(CirrusVGAState *s, int dst, int src, int w, int h)
{
int sx = 0, sy = 0;
int dx = 0, dy = 0;
int depth = 0;
int notify = 0;
/* make sure to only copy if it's a plain copy ROP */
if (*s->cirrus_rop == cirrus_bitblt_rop_fwd_src ||
*s->cirrus_rop == cirru... | true | qemu | 50628d3479e4f9aa97e323506856e394fe7ad7a6 |
18,626 | static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamplesref)
{
AResampleContext *aresample = inlink->dst->priv;
const int n_in = insamplesref->audio->nb_samples;
int n_out = FFMAX(n_in * aresample->ratio * 2, 1);
AVFilterLink *const outlink = inlink->dst->outputs[0];
AVFil... | true | FFmpeg | 014058abeaa9da2c107a6348178431ea8c9b0bab |
18,628 | static int decode_subframe_lpc(FLACContext *s, int channel, int pred_order)
{
int sum, i, j;
int coeff_prec, qlevel;
int coeffs[pred_order];
// av_log(s->avctx, AV_LOG_DEBUG, " SUBFRAME LPC\n");
/* warm up samples */
// av_log(s->avctx, AV_LOG_DEBUG, " warm up samples... | false | FFmpeg | 9d656110966fbdde0fd1d2e685f3ed3633ba3596 |
18,630 | static int compare_floats(const float *a, const float *b, int len,
float max_diff)
{
int i;
for (i = 0; i < len; i++) {
if (fabsf(a[i] - b[i]) > max_diff) {
av_log(NULL, AV_LOG_ERROR, "%d: %- .12f - %- .12f = % .12g\n",
i, a[i], b[i], a[i] ... | false | FFmpeg | e53c9065ca08a9153ecc73a6a8940bcc6d667e58 |
18,631 | static int mtv_read_packet(AVFormatContext *s, AVPacket *pkt)
{
MTVDemuxContext *mtv = s->priv_data;
ByteIOContext *pb = s->pb;
int ret;
#if !HAVE_BIGENDIAN
int i;
#endif
if((url_ftell(pb) - s->data_offset + mtv->img_segment_size) % mtv->full_segment_size)
{
url_fskip(pb, MTV... | true | FFmpeg | 5eef7bcd09ab1f73df6c70923dfa3f4ccd5b4190 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.