id int32 0 27.3k | func stringlengths 26 142k | target bool 2
classes | project stringclasses 2
values | commit_id stringlengths 40 40 |
|---|---|---|---|---|
17,467 | static int fourxm_read_header(AVFormatContext *s)
{
AVIOContext *pb = s->pb;
unsigned int fourcc_tag;
unsigned int size;
int header_size;
FourxmDemuxContext *fourxm = s->priv_data;
unsigned char *header;
int i, ret;
AVStream *st;
fourxm->track_count = 0;
fourxm->trac... | true | FFmpeg | 1b8741a6843f3f4667c81c2d63d3182858aa534f |
17,468 | static int virtio_ccw_rng_init(VirtioCcwDevice *ccw_dev)
{
VirtIORNGCcw *dev = VIRTIO_RNG_CCW(ccw_dev);
DeviceState *vdev = DEVICE(&dev->vdev);
qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus));
if (qdev_init(vdev) < 0) {
return -1;
}
object_property_set_link(OBJECT(dev),
... | true | qemu | 5b456438f5bb395ed6b1eec95e18ce7a7a884a0a |
17,469 | static bool cmd_smart(IDEState *s, uint8_t cmd)
{
int n;
if (s->hcyl != 0xc2 || s->lcyl != 0x4f) {
goto abort_cmd;
}
if (!s->smart_enabled && s->feature != SMART_ENABLE) {
goto abort_cmd;
}
switch (s->feature) {
case SMART_DISABLE:
s->smart_enabled = ... | true | qemu | 940973ae0b45c9b6817bab8e4cf4df99a9ef83d7 |
17,470 | static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pict, int *got_packet)
{
TiffEncoderContext *s = avctx->priv_data;
const AVFrame *const p = pict;
int i;
uint8_t *ptr;
uint8_t *offset;
uint32_t strips;
uint32_t *strip_sizes = NUL... | true | FFmpeg | 10d4c5e55e5b23e165aa4c7723073ebe2c2e7da0 |
17,471 | static void vmxnet3_pci_realize(PCIDevice *pci_dev, Error **errp)
{
DeviceState *dev = DEVICE(pci_dev);
VMXNET3State *s = VMXNET3(pci_dev);
VMW_CBPRN("Starting init...");
memory_region_init_io(&s->bar0, OBJECT(s), &b0_ops, s,
"vmxnet3-b0", VMXNET3_PT_REG_SIZE);
p... | true | qemu | 1108b2f8a939fb5778d384149e2f1b99062a72da |
17,472 | void virtio_blk_data_plane_start(VirtIOBlockDataPlane *s)
{
BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(s->vdev)));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
VirtIOBlock *vblk = VIRTIO_BLK(s->vdev);
int r;
if (vblk->dataplane_started || s->starting) {
return;
}
... | true | qemu | 8a2fad57eb124ec0633f6f2b1c74c991fc7501bd |
17,473 | int do_subchannel_work_passthrough(SubchDev *sch)
{
int ret = 0;
SCSW *s = &sch->curr_status.scsw;
if (s->ctrl & SCSW_FCTL_CLEAR_FUNC) {
/* TODO: Clear handling */
sch_handle_clear_func(sch);
} else if (s->ctrl & SCSW_FCTL_HALT_FUNC) {
/* TODO: Halt handling */
... | true | qemu | 66dc50f7057b9a0191f54e55764412202306858d |
17,474 | static void icp_control_init(uint32_t base)
{
int iomemtype;
icp_control_state *s;
s = (icp_control_state *)qemu_mallocz(sizeof(icp_control_state));
iomemtype = cpu_register_io_memory(0, icp_control_readfn,
icp_control_writefn, s);
cpu_register_physica... | true | qemu | 187337f8b0ec0813dd3876d1efe37d415fb81c2e |
17,475 | static int nsv_parse_NSVf_header(AVFormatContext *s, AVFormatParameters *ap)
{
NSVContext *nsv = s->priv_data;
ByteIOContext *pb = &s->pb;
uint32_t tag, tag1, handler;
int codec_type, stream_index, frame_period, bit_rate, scale, rate;
unsigned int file_size, size, nb_frames;
int64_t durat... | true | FFmpeg | 568e18b15e2ddf494fd8926707d34ca08c8edce5 |
17,476 | PPC_OP(srw)
{
if (T1 & 0x20) {
T0 = 0;
} else {
T0 = T0 >> T1;
}
RETURN();
}
| true | qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab |
17,477 | SCSIRequest *scsi_req_alloc(const SCSIReqOps *reqops, SCSIDevice *d,
uint32_t tag, uint32_t lun, void *hba_private)
{
SCSIRequest *req;
SCSIBus *bus = scsi_bus_from_device(d);
BusState *qbus = BUS(bus);
req = g_malloc0(reqops->size);
req->refcount = 1;
req->... | true | qemu | 61e68b3fbd3e2b7beb636bc56f78d9c1ca25e8f9 |
17,479 | static void setup_rt_frame(int sig, struct target_sigaction *ka,
target_siginfo_t *info,
target_sigset_t *set, CPUM68KState *env)
{
struct target_rt_sigframe *frame;
abi_ulong frame_addr;
abi_ulong retcode_addr;
abi_ulong info_addr;
abi_u... | true | qemu | 0188fadb7fe460d8c4c743372b1f7b25773e183e |
17,481 | static int flush_packet(AVFormatContext *ctx, int stream_index,
int64_t pts, int64_t dts, int64_t scr, int trailer_size)
{
MpegMuxContext *s = ctx->priv_data;
StreamInfo *stream = ctx->streams[stream_index]->priv_data;
uint8_t *buf_ptr;
int size, payload_size, startcode, id, stu... | true | FFmpeg | 29d27b54251fe250f6fe512b7759a1405362ae67 |
17,483 | static int mov_read_replaygain(MOVContext *c, AVIOContext *pb, int size)
{
int64_t end = avio_tell(pb) + size;
uint8_t *key = NULL, *val = NULL;
int i;
for (i = 0; i < 2; i++) {
uint8_t **p;
uint32_t len, tag;
if (end - avio_tell(pb) <= 12)
break;
... | true | FFmpeg | 5c720657c23afd798ae0db7c7362eb859a89ab3d |
17,484 | type_init(vmgenid_register_types)
GuidInfo *qmp_query_vm_generation_id(Error **errp)
{
GuidInfo *info;
VmGenIdState *vms;
Object *obj = find_vmgenid_dev();
if (!obj) {
return NULL;
}
vms = VMGENID(obj);
info = g_malloc0(sizeof(*info));
info->guid = qemu_uuid_unp... | true | qemu | 72d9196f1ef588c19821d0a4fb563836fdb2a0b7 |
17,485 | int av_file_map(const char *filename, uint8_t **bufptr, size_t *size,
int log_offset, void *log_ctx)
{
FileLogContext file_log_ctx = { &file_log_ctx_class, log_offset, log_ctx };
int err, fd = open(filename, O_RDONLY);
struct stat st;
av_unused void *ptr;
off_t off_size;
... | true | FFmpeg | d0989bed226578a8f37ca90c78abc97abafb9794 |
17,486 | static void gen_op_iwmmxt_setpsr_nz(void)
{
TCGv tmp = new_tmp();
gen_helper_iwmmxt_setpsr_nz(tmp, cpu_M0);
store_cpu_field(tmp, iwmmxt.cregs[ARM_IWMMXT_wCASF]);
}
| true | qemu | 7d1b0095bff7157e856d1d0e6c4295641ced2752 |
17,487 | int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
{
int ret, i, err;
AVStream *st;
for (;;) {
AVPacketList *pktl = s->internal->raw_packet_buffer;
if (pktl) {
*pkt = pktl->pkt;
st = s->streams[pkt->stream_index];
if (s->internal->raw_packet_buffer_re... | true | FFmpeg | e936c8d176efd1a0a41e22df24564b1178c79ea9 |
17,488 | static int decode_pce(AVCodecContext *avctx, MPEG4AudioConfig *m4ac,
uint8_t (*layout_map)[3],
GetBitContext *gb)
{
int num_front, num_side, num_back, num_lfe, num_assoc_data, num_cc, sampling_index;
int comment_len;
int tags;
skip_bits(gb, 2); // ob... | true | FFmpeg | dbe29db8cb09fb39bd8dc5b25934e92279d0aa8d |
17,489 | print_insn_sparc (bfd_vma memaddr, disassemble_info *info)
{
FILE *stream = info->stream;
bfd_byte buffer[4];
unsigned long insn;
sparc_opcode_hash *op;
/* Nonzero of opcode table has been initialized. */
static int opcodes_initialized = 0;
/* bfd mach number of last call. */
static unsigned ... | true | qemu | 345ce423dd58b3ddc3cfbcbb1ca2eee25546e8be |
17,490 | static int vmstate_subsection_load(QEMUFile *f, const VMStateDescription *vmsd,
void *opaque)
{
while (qemu_peek_byte(f, 0) == QEMU_VM_SUBSECTION) {
char idstr[256];
int ret;
uint8_t version_id, len, size;
const VMStateDescription *sub_vmsd;
... | true | qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 |
17,491 | static int decode_update_thread_context(AVCodecContext *dst,
const AVCodecContext *src)
{
H264Context *h = dst->priv_data, *h1 = src->priv_data;
int inited = h->context_initialized, err = 0;
int context_reinitialized = 0;
int i, ret;
if (dst == src ||... | false | FFmpeg | a553c6a347d3d28d7ee44c3df3d5c4ee780dba23 |
17,493 | static av_cold void sws_init_swscale(SwsContext *c)
{
enum AVPixelFormat srcFormat = c->srcFormat;
ff_sws_init_output_funcs(c, &c->yuv2plane1, &c->yuv2planeX,
&c->yuv2nv12cX, &c->yuv2packed1,
&c->yuv2packed2, &c->yuv2packedX, &c->yuv2anyX);
... | false | FFmpeg | e87a501e7d03ac68b58520108fe24ad9d0b36765 |
17,494 | static target_ulong h_enter(PowerPCCPU *cpu, sPAPRMachineState *spapr,
target_ulong opcode, target_ulong *args)
{
CPUPPCState *env = &cpu->env;
target_ulong flags = args[0];
target_ulong pte_index = args[1];
target_ulong pteh = args[2];
target_ulong ptel = args[3];... | true | qemu | c117590769ea863da3ac082863e6c2ee1cce3eca |
17,495 | static void coroutine_fn sd_finish_aiocb(SheepdogAIOCB *acb)
{
qemu_coroutine_enter(acb->coroutine, NULL);
qemu_aio_unref(acb);
}
| true | qemu | 0b8b8753e4d94901627b3e86431230f2319215c4 |
17,496 | static void vp9_superframe_close(AVBSFContext *ctx)
{
VP9BSFContext *s = ctx->priv_data;
int n;
// free cached data
for (n = 0; n < s->n_cache; n++)
av_packet_free(&s->cache[n]);
}
| true | FFmpeg | 5c22c90c1d5050f1206e46494b193320ac2397cb |
17,497 | static int decode_i_frame(FourXContext *f, AVFrame *frame, const uint8_t *buf, int length)
{
int x, y, ret;
const int width = f->avctx->width;
const int height = f->avctx->height;
const unsigned int bitstream_size = AV_RL32(buf);
int token_count av_unused;
unsigned int prestream_size;
... | true | FFmpeg | 59d7bb99b6a963b7e11c637228b2203adf535eee |
17,498 | void virtio_scsi_exit(VirtIODevice *vdev)
{
virtio_cleanup(vdev);
} | true | qemu | eb2fa76418402c8b26e1ab4cb53498ee0f4e52ef |
17,499 | static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr)
{
AACEncContext *s = avctx->priv_data;
float **samples = s->planar_samples, *samples2, *la, *overlap;
ChannelElement *cpe;
SingleChannelElement *sce;
int ... | true | FFmpeg | 01ecb7172b684f1c4b3e748f95c5a9a494ca36ec |
17,500 | PCIDevice *pci_nic_init_nofail(NICInfo *nd, PCIBus *rootbus,
const char *default_model,
const char *default_devaddr)
{
Error *err = NULL;
PCIDevice *res;
if (qemu_show_nic_models(nd->model, pci_nic_models))
exit(0);
res = ... | true | qemu | 4d0ecde44ae6dab3aa9d10c23e61d9d43789731a |
17,501 | static int decode_dsw1(uint8_t *frame, int width, int height,
const uint8_t *src, const uint8_t *src_end)
{
const uint8_t *frame_start = frame;
const uint8_t *frame_end = frame + width * height;
int mask = 0x10000, bitbuf = 0;
int v, offset, count, segments;
segment... | true | FFmpeg | d38345878cbb89e4d8d33bd79f47836d4e9cd637 |
17,502 | static void draw_slice(HYuvContext *s, AVFrame *frame, int y)
{
int h, cy, i;
int offset[AV_NUM_DATA_POINTERS];
if (s->avctx->draw_horiz_band == NULL)
return;
h = y - s->last_slice_end;
y -= h;
if (s->bitstream_bpp == 12)
cy = y >> 1;
else
cy = y;
... | false | FFmpeg | f929ab0569ff31ed5a59b0b0adb7ce09df3fca39 |
17,503 | static av_cold int asink_init(AVFilterContext *ctx, const char *args, void *opaque)
{
BufferSinkContext *buf = ctx->priv;
AVABufferSinkParams *params;
if (!opaque) {
av_log(ctx, AV_LOG_ERROR,
"No opaque field provided, an AVABufferSinkParams struct is required\n");
re... | false | FFmpeg | 386aee6864c5cfc438785d2421b2f056450da014 |
17,504 | void ff_vc1_mc_4mv_luma(VC1Context *v, int n, int dir, int avg)
{
MpegEncContext *s = &v->s;
uint8_t *srcY;
int dxy, mx, my, src_x, src_y;
int off;
int fieldmv = (v->fcm == ILACE_FRAME) ? v->blk_mv_type[s->block_index[n]] : 0;
int v_edge_pos = s->v_edge_pos >> v->field_mode;
uint8_t ... | false | FFmpeg | 2c98dc75f2802a2fe91922d4a11b698b66420e5b |
17,506 | static int open_f(BlockBackend *blk, int argc, char **argv)
{
int flags = BDRV_O_UNMAP;
int readonly = 0;
bool writethrough = true;
int c;
QemuOpts *qopts;
QDict *opts;
bool force_share = false;
while ((c = getopt(argc, argv, "snro:kt:d:U")) != -1) {
switch (c) {
... | true | qemu | 64ebf556486af39024cc9e7a8c88303a7b37c465 |
17,507 | int vp78_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata, int jobnr,
int threadnr, int is_vp7)
{
VP8Context *s = avctx->priv_data;
VP8ThreadData *td = &s->thread_data[jobnr];
VP8ThreadData *next_td = NULL, *prev_td = NULL;
VP8Frame *curframe = s->curframe;
... | true | FFmpeg | fed92adbb3fc6cbf735e3df9a2f7d0a2917fcfbd |
17,508 | static void blkverify_aio_bh(void *opaque)
{
BlkverifyAIOCB *acb = opaque;
if (acb->buf) {
qemu_iovec_destroy(&acb->raw_qiov);
qemu_vfree(acb->buf);
}
acb->common.cb(acb->common.opaque, acb->ret);
qemu_aio_unref(acb);
}
| true | qemu | 44b6789299a8acca3f25331bc411055cafc7bb06 |
17,509 | static void vhost_dev_sync_region(struct vhost_dev *dev,
uint64_t mfirst, uint64_t mlast,
uint64_t rfirst, uint64_t rlast)
{
uint64_t start = MAX(mfirst, rfirst);
uint64_t end = MIN(mlast, rlast);
vhost_log_chunk_t *from = dev->log + ... | true | qemu | 7b67b18adf921c77aa8443f3b4cddab87908ee1e |
17,510 | void hmp_chardev_add(Monitor *mon, const QDict *qdict)
{
const char *args = qdict_get_str(qdict, "args");
Error *err = NULL;
QemuOpts *opts;
opts = qemu_opts_parse_noisily(qemu_find_opts("chardev"), args, true);
if (opts == NULL) {
error_setg(&err, "Parsing chardev args failed");
... | true | qemu | 0a73336d96397c80881219d080518fac6f1ecacb |
17,511 | void memory_mapping_filter(MemoryMappingList *list, int64_t begin,
int64_t length)
{
MemoryMapping *cur, *next;
QTAILQ_FOREACH_SAFE(cur, &list->head, next, next) {
if (cur->phys_addr >= begin + length ||
cur->phys_addr + cur->length <= begin) {
... | true | qemu | 22c3aea8dbaac8616db71b6adf18dee801a24fde |
17,512 | static int Rgb16ToPlanarRgb16Wrapper(SwsContext *c, const uint8_t *src[],
int srcStride[], int srcSliceY, int srcSliceH,
uint8_t *dst[], int dstStride[])
{
uint16_t *dst2013[] = { (uint16_t *)dst[2], (uint16_t *)dst[0], (uint16_t *)dst[1]... | true | FFmpeg | b5deacfb1fece3406ef0bb790c1614a7096513b4 |
17,514 | int ff_load_image(uint8_t *data[4], int linesize[4],
int *w, int *h, enum AVPixelFormat *pix_fmt,
const char *filename, void *log_ctx)
{
AVInputFormat *iformat = NULL;
AVFormatContext *format_ctx = NULL;
AVCodec *codec;
AVCodecContext *codec_ctx;
AVFrame *... | false | FFmpeg | 657998b5ee46719ff873ce34ae953385377b0280 |
17,515 | static void sha512_transform(uint64_t *state, const uint8_t buffer[128])
{
uint64_t a, b, c, d, e, f, g, h;
uint64_t block[80];
uint64_t T1;
int i;
a = state[0];
b = state[1];
c = state[2];
d = state[3];
e = state[4];
f = state[5];
g = state[6];
h = state[7... | false | FFmpeg | bbcaf25d4d2130fa9c34c314628f9fd2f706b61b |
17,516 | static attribute_align_arg void *frame_worker_thread(void *arg)
{
PerThreadContext *p = arg;
FrameThreadContext *fctx = p->parent;
AVCodecContext *avctx = p->avctx;
const AVCodec *codec = avctx->codec;
pthread_mutex_lock(&p->mutex);
while (1) {
while (p->state == STATE_INPU... | false | FFmpeg | 94b3a666fa87f96c4ed2b469bbc28e1ac4e67785 |
17,517 | static int vnc_client_io_error(VncState *vs, int ret, int last_errno)
{
if (ret == 0 || ret == -1) {
if (ret == -1) {
switch (last_errno) {
case EINTR:
case EAGAIN:
#ifdef _WIN32
case WSAEWOULDBLOCK:
#endif
return 0;
... | true | qemu | 2f9606b3736c3be4dbd606c46525c7b770ced119 |
17,519 | void pvpanic_init(ISABus *bus)
{
isa_create_simple(bus, TYPE_ISA_PVPANIC_DEVICE);
}
| true | qemu | 7839ff593be03a7de3c6760e0b50c565ea751d36 |
17,520 | static void xa_decode(short *out, const unsigned char *in,
ADPCMChannelStatus *left, ADPCMChannelStatus *right, int inc)
{
int i, j;
int shift,filter,f0,f1;
int s_1,s_2;
int d,s,t;
for(i=0;i<4;i++) {
shift = 12 - (in[4+i*2] & 15);
filter = in[4+i*2] >> 4;
f... | true | FFmpeg | 86020073dbb9a3a9d1fbb76345b2ca29ba1f13d2 |
17,521 | int qemu_fdt_setprop_sized_cells_from_array(void *fdt,
const char *node_path,
const char *property,
int numvalues,
uint64_t *values)
{
... | true | qemu | 2bf9febc95e5bcef8edb10ebc967325917b9c958 |
17,522 | void spapr_core_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
Error **errp)
{
MachineState *machine = MACHINE(OBJECT(hotplug_dev));
sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(OBJECT(hotplug_dev));
sPAPRMachineState *spapr = SPAPR_MACHINE(OBJECT(hotplug_dev));
... | true | qemu | c8721d35994fd3731e592f81ba2f9c08e7dc8c31 |
17,523 | static void complete_request_vring(VirtIOBlockReq *req, unsigned char status)
{
stb_p(&req->in->status, status);
vring_push(&req->dev->dataplane->vring, req->elem,
req->qiov.size + sizeof(*req->in));
notify_guest(req->dev->dataplane);
}
| true | qemu | f897bf751fbd95e4015b95d202c706548586813a |
17,524 | static void aux_register_types(void)
{
type_register_static(&aux_bus_info);
type_register_static(&aux_slave_type_info);
type_register_static(&aux_to_i2c_type_info);
}
| true | qemu | e0dadc1e9ef1f35208e5d2af9c7740c18a0b769f |
17,526 | static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
int width, int height,
int lumStride, int chromStride, int srcStride)
{
int y;
const x86_reg chromWidth= width>>1;
for (... | true | FFmpeg | a37fd7f9578d2dfbe20a109aae91e5f0a4b58874 |
17,527 | void helper_stsw(CPUPPCState *env, target_ulong addr, uint32_t nb,
uint32_t reg)
{
int sh;
for (; nb > 3; nb -= 4) {
cpu_stl_data(env, addr, env->gpr[reg]);
reg = (reg + 1) % 32;
addr = addr_add(env, addr, 4);
}
if (unlikely(nb > 0)) {
for (sh... | true | qemu | e41029b378b4a65a0b89b5a8dc087aca6b5d012d |
17,528 | static int loco_decode_plane(LOCOContext *l, uint8_t *data, int width, int height,
int stride, const uint8_t *buf, int buf_size, int step)
{
RICEContext rc;
int val;
int i, j;
if(buf_size<=0)
return -1;
init_get_bits8(&rc.gb, buf, buf_size);
rc.s... | false | FFmpeg | 5ba62e89dfca540db03997668a8ec4571068d9e0 |
17,529 | void * g_malloc0(size_t size)
{
return g_malloc(size);
}
| true | qemu | b7b5233ad7fdd9985bb6d05b7919f3a20723ff2c |
17,530 | static int decode_cabac_residual( H264Context *h, DCTELEM *block, int cat, int n, const uint8_t *scantable, const uint32_t *qmul, int max_coeff) {
const int mb_xy = h->s.mb_x + h->s.mb_y*h->s.mb_stride;
static const int significant_coeff_flag_offset[2][6] = {
{ 105+0, 105+15, 105+29, 105+44, 105+47, 4... | false | FFmpeg | eb73bf723d7657bd5bbaaeb63dd9b77f21048a87 |
17,531 | static void copy_bits(PutBitContext *pb, UINT8 *src, int length)
{
#if 1
int bytes= length>>4;
int bits= length&15;
int i;
for(i=0; i<bytes; i++) put_bits(pb, 16, be2me_16(((uint16_t*)src)[i]));
put_bits(pb, bits, be2me_16(((uint16_t*)src)[i])>>(16-bits));
#else
int bytes= length>>3;
... | false | FFmpeg | 7f2fe444a39bca733d390b6608801c5f002bfd31 |
17,532 | static void vb_decode_palette(VBDecContext *c)
{
int start, size, i;
start = bytestream_get_byte(&c->stream);
size = (bytestream_get_byte(&c->stream) - 1) & 0xFF;
if(start + size > 255){
av_log(c->avctx, AV_LOG_ERROR, "Palette change runs beyond entry 256\n");
return;
}
... | false | FFmpeg | 57835fc1aeaf0b3bbc0816b123a931ea39de758b |
17,533 | void sws_freeContext(SwsContext *c)
{
int i;
if (!c) return;
if (c->lumPixBuf) {
for (i=0; i<c->vLumBufSize; i++)
av_freep(&c->lumPixBuf[i]);
av_freep(&c->lumPixBuf);
}
if (c->chrPixBuf) {
for (i=0; i<c->vChrBufSize; i++)
av_freep(&c->ch... | false | FFmpeg | f684f3c58a77a20f18b80f888d69c2bacb53ca9b |
17,535 | static void pollfds_poll(GArray *pollfds, int nfds, fd_set *rfds,
fd_set *wfds, fd_set *xfds)
{
int i;
for (i = 0; i < pollfds->len; i++) {
GPollFD *pfd = &g_array_index(pollfds, GPollFD, i);
int fd = pfd->fd;
int revents = 0;
if (FD_ISSET(fd,... | true | qemu | 8db165b36ef893ac69af0452f20eeb78e7b26b5a |
17,536 | static void decode_v1_vector(CinepakEncContext *s, AVPicture *sub_pict, mb_info *mb, strip_info *info)
{
int entry_size = s->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4;
sub_pict->data[0][0] =
sub_pict->data[0][1] =
sub_pict->data[0][ sub_pict->linesize[0]] =
sub_pict->d... | true | FFmpeg | 7da9f4523159670d577a2808d4481e64008a8894 |
17,537 | static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, enum AVMediaType type)
{
OutputStream *ost;
AVStream *st = avformat_new_stream(oc, NULL);
int idx = oc->nb_streams - 1, ret = 0;
char *bsf = NULL, *next, *codec_tag = NULL;
AVBitStreamFilterContext *bsfc, *bsfc... | true | FFmpeg | 4e61a38aa038b7027c5ed423635168d463515d24 |
17,538 | static av_always_inline void avcodec_thread_park_workers(ThreadContext *c, int thread_count)
{
pthread_cond_wait(&c->last_job_cond, &c->current_job_lock);
pthread_mutex_unlock(&c->current_job_lock);
}
| true | FFmpeg | e3329474a366de066b25e86f35f5abf9c5a4b7b2 |
17,540 | static int xan_decode_frame_type1(AVCodecContext *avctx, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
XanContext *s = avctx->priv_data;
uint8_t *ybuf, *src = s->scratch_buffer;
int cur, last;
int i, j;
int ret;
if ((ret = xan_decode_chroma(avctx, avpkt)) != 0)
retu... | true | FFmpeg | 55188278169c3a1838334d7aa47a1f7a40741690 |
17,541 | void ff_compute_frame_duration(AVFormatContext *s, int *pnum, int *pden, AVStream *st,
AVCodecParserContext *pc, AVPacket *pkt)
{
AVRational codec_framerate = s->iformat ? st->codec->framerate :
av_inv_q(st->codec->time_base);
int... | true | FFmpeg | a92192d2e4f7ff3078b128592f6673089b221cc4 |
17,542 | static int vmdk_create(const char *filename, QemuOpts *opts, Error **errp)
{
int idx = 0;
BlockBackend *new_blk = NULL;
Error *local_err = NULL;
char *desc = NULL;
int64_t total_size = 0, filesize;
char *adapter_type = NULL;
char *backing_file = NULL;
char *hw_version = NULL;
... | true | qemu | 9877860e7bd1e26ee70ab9bb5ebc34c92bf23bf5 |
17,543 | static inline void RENAME(rgb24to16)(const uint8_t *src, uint8_t *dst, unsigned src_size)
{
const uint8_t *s = src;
const uint8_t *end;
#ifdef HAVE_MMX
const uint8_t *mm_end;
#endif
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*src):"memory");
... | true | FFmpeg | 7f526efd17973ec6d2204f7a47b6923e2be31363 |
17,545 | static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt)
{
int stream_index = pkt->stream_index;
int size = pkt->size;
uint8_t *buf = pkt->data;
MpegMuxContext *s = ctx->priv_data;
AVStream *st = ctx->streams[stream_index];
StreamInfo *stream = st->priv_data;... | true | FFmpeg | 9b9e4a71c57261b6b690d9649b8e7a347df6a78b |
17,546 | static int image_probe(AVProbeData *p)
{
if (av_str2id(img_tags, p->filename)) {
if (av_filename_number_test(p->filename))
return AVPROBE_SCORE_MAX;
else
return AVPROBE_SCORE_MAX/2;
}
return 0;
}
| true | FFmpeg | e825b5009f88a2ac78d05f960a747ddc6ad4ed22 |
17,547 | static double bessel(double x){
double v=1;
double lastv=0;
double t=1;
int i;
static const double inv[100]={
1.0/( 1* 1), 1.0/( 2* 2), 1.0/( 3* 3), 1.0/( 4* 4), 1.0/( 5* 5), 1.0/( 6* 6), 1.0/( 7* 7), 1.0/( 8* 8), 1.0/( 9* 9), 1.0/(10*10),
1.0/(11*11), 1.0/(12*12), 1.0/(13*13), 1.0/(14*14),... | true | FFmpeg | 4ec03d138622b77887974a254861a425a57e02c3 |
17,549 | uint8_t *av_packet_pack_dictionary(AVDictionary *dict, int *size)
{
AVDictionaryEntry *t = NULL;
uint8_t *data = NULL;
*size = 0;
if (!dict)
return NULL;
while ((t = av_dict_get(dict, "", t, AV_DICT_IGNORE_SUFFIX))) {
const int keylen = strlen(t->key);
const int ... | true | FFmpeg | fcb1b0078d3810aa2d9270e1095c8b5835fc5667 |
17,550 | int ff_celp_lp_synthesis_filter(int16_t *out, const int16_t *filter_coeffs,
const int16_t *in, int buffer_length,
int filter_length, int stop_on_overflow,
int shift, int rounder)
{
int i,n;
for (n = 0; n < bu... | true | FFmpeg | fb75ad79cb8a00d42857b252e0049a0bbe90da66 |
17,551 | uint32_t ide_data_readw(void *opaque, uint32_t addr)
{
IDEBus *bus = opaque;
IDEState *s = idebus_active_if(bus);
uint8_t *p;
int ret;
/* PIO data access allowed only when DRQ bit is set. The result of a read
* during PIO in is indeterminate, return 0 and don't move forward. */
if... | true | qemu | cb72cba83021fa42719e73a5249c12096a4d1cfc |
17,552 | int bdrv_open_backing_file(BlockDriverState *bs, QDict *options, Error **errp)
{
char backing_filename[PATH_MAX];
int back_flags, ret;
BlockDriver *back_drv = NULL;
Error *local_err = NULL;
if (bs->backing_hd != NULL) {
QDECREF(options);
return 0;
}
/* NULL mean... | true | qemu | 61ed2684539f7f31304e193d7c0e68d57ce6be88 |
17,555 | static int do_readlink(struct iovec *iovec, struct iovec *out_iovec)
{
char *buffer;
int size, retval;
V9fsString target, path;
v9fs_string_init(&path);
retval = proxy_unmarshal(iovec, PROXY_HDR_SZ, "sd", &path, &size);
if (retval < 0) {
v9fs_string_free(&path);
return... | true | qemu | d77f7779b4d74354b3444ceb0f93105ced3c26c8 |
17,556 | static int build_table(VLC *vlc, int table_nb_bits,
int nb_codes,
const void *bits, int bits_wrap, int bits_size,
const void *codes, int codes_wrap, int codes_size,
const void *symbols, int symbols_wrap, int symbols_size,
... | true | FFmpeg | 4c4e746566a98340e229831624f74a5636b62b65 |
17,557 | static int mp_decode_layer3(MPADecodeContext *s)
{
int nb_granules, main_data_begin;
int gr, ch, blocksplit_flag, i, j, k, n, bits_pos;
GranuleDef *g;
int16_t exponents[576]; //FIXME try INTFLOAT
/* read side info */
if (s->lsf) {
main_data_begin = get_bits(&s->gb, 8);
... | true | FFmpeg | 03fafdec82a4dbe0cf1a7d4d3bb59c42d5019941 |
17,559 | static inline void RENAME(yuy2ToY)(uint8_t *dst, uint8_t *src, long width)
{
#ifdef HAVE_MMX
asm volatile(
"movq "MANGLE(bm01010101)", %%mm2\n\t"
"mov %0, %%"REG_a" \n\t"
"1: \n\t"
"movq (%1, %%"REG_a",2), %%mm0 \n\t"
"movq 8(%1, %%"REG_a",2), %%mm1 \n\t"
"pand %%mm2, %%mm0 \n\t"
"pand %%m... | true | FFmpeg | 2da0d70d5eebe42f9fcd27ee554419ebe2a5da06 |
17,560 | BdrvDirtyBitmap *bdrv_create_dirty_bitmap(BlockDriverState *bs, int granularity,
Error **errp)
{
int64_t bitmap_size;
BdrvDirtyBitmap *bitmap;
assert((granularity & (granularity - 1)) == 0);
granularity >>= BDRV_SECTOR_BITS;
assert(granularity);
... | true | qemu | 5839e53bbc0fec56021d758aab7610df421ed8c8 |
17,561 | static void FUNC(put_hevc_pel_bi_w_pixels)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,
int16_t *src2,
int height, int denom, int wx0, int wx1,
int ox0, int ox... | true | FFmpeg | c225da68cffbea11270a758ff42859194c980863 |
17,563 | static int compat_decode(AVCodecContext *avctx, AVFrame *frame,
int *got_frame, const AVPacket *pkt)
{
AVCodecInternal *avci = avctx->internal;
int ret;
av_assert0(avci->compat_decode_consumed == 0);
*got_frame = 0;
avci->compat_decode = 1;
if (avci->compat... | true | FFmpeg | 960b4d47612ec89cfdf0ff8b83bc7424ad4c754a |
17,564 | static av_cold void common_init(MpegEncContext * s)
{
static int initialized=0;
switch(s->msmpeg4_version){
case 1:
case 2:
s->y_dc_scale_table=
s->c_dc_scale_table= ff_mpeg1_dc_scale_table;
break;
case 3:
if(s->workaround_bugs){
s->y_dc_scale... | false | FFmpeg | 9be6f0d2f8393100a11c8527c7ba18c1dc2f1450 |
17,565 | LF_FUNC (h, luma, sse2)
LF_IFUNC(h, luma_intra, sse2)
LF_FUNC (v, luma, sse2)
LF_IFUNC(v, luma_intra, sse2)
/***********************************/
/* weighted prediction */
#define H264_WEIGHT(W, H, OPT) \
void ff_h264_weight_ ## W ## x ## H ## _ ## OPT(uint8_t *dst, \
int stride,... | false | FFmpeg | 1d16a1cf99488f16492b1bb48e023f4da8377e07 |
17,566 | static av_cold int libwebp_anim_encode_init(AVCodecContext *avctx)
{
int ret = ff_libwebp_encode_init_common(avctx);
if (!ret) {
LibWebPAnimContext *s = avctx->priv_data;
WebPAnimEncoderOptions enc_options;
WebPAnimEncoderOptionsInit(&enc_options);
// TODO(urvang): Expose ... | false | FFmpeg | 626b6b769ced6d3e55d2661985ab2a1cb89f481e |
17,567 | static int sls_flag_use_localtime_filename(AVFormatContext *oc, HLSContext *c, VariantStream *vs)
{
if (c->flags & HLS_SECOND_LEVEL_SEGMENT_INDEX) {
char * filename = av_strdup(oc->filename); // %%d will be %d after strftime
if (!filename)
return AVERROR(ENOMEM);
if (repla... | false | FFmpeg | dc5d1515681b57a257443ba72bb81fb3e6e6621b |
17,568 | static bool e1000_full_mac_needed(void *opaque)
{
E1000State *s = opaque;
return s->compat_flags & E1000_FLAG_MAC;
}
| false | qemu | bc0f0674f037a01f2ce0870ad6270a356a7a8347 |
17,569 | void qemu_bh_delete(QEMUBH *bh)
{
qemu_free(bh);
}
| false | qemu | 4e59b545868a5ee5f59b346337f0c44209929334 |
17,570 | static void net_socket_receive(void *opaque, const uint8_t *buf, size_t size)
{
NetSocketState *s = opaque;
uint32_t len;
len = htonl(size);
send_all(s->fd, (const uint8_t *)&len, sizeof(len));
send_all(s->fd, buf, size);
}
| false | qemu | e3f5ec2b5e92706e3b807059f79b1fb5d936e567 |
17,572 | static void *rcu_read_stress_test(void *arg)
{
int i;
int itercnt = 0;
struct rcu_stress *p;
int pc;
long long n_reads_local = 0;
volatile int garbage = 0;
rcu_register_thread();
*(struct rcu_reader_data **)arg = &rcu_reader;
while (goflag == GOFLAG_INIT) {
g_u... | false | qemu | 8a5956ad6392f115521dad774055c737c49fb0dd |
17,573 | static void rtc_realizefn(DeviceState *dev, Error **errp)
{
ISADevice *isadev = ISA_DEVICE(dev);
RTCState *s = MC146818_RTC(dev);
int base = 0x70;
s->cmos_data[RTC_REG_A] = 0x26;
s->cmos_data[RTC_REG_B] = 0x02;
s->cmos_data[RTC_REG_C] = 0x00;
s->cmos_data[RTC_REG_D] = 0x80;
... | false | qemu | 8e099d14f5233f330c4a6f03ff655219cd789c8f |
17,574 | static int decode_init(AVCodecContext *avctx)
{
HYuvContext *s = avctx->priv_data;
int width, height;
s->avctx= avctx;
s->flags= avctx->flags;
dsputil_init(&s->dsp, avctx);
memset(s->vlc, 0, 3*sizeof(VLC));
width= s->width= avctx->width;
height= s->height= avct... | false | FFmpeg | 42dd22c4a5c8463488d442eeb234b822bcc39625 |
17,575 | static void palmte_init(ram_addr_t ram_size, int vga_ram_size,
const char *boot_device,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_model)
{
struct omap_mpu_state_s *cpu;
int flash_size = 0x00800000;
... | false | qemu | a0b753dfd3920df146a5f4d05e442e3c522900c7 |
17,577 | static void menelaus_save(QEMUFile *f, void *opaque)
{
MenelausState *s = (MenelausState *) opaque;
qemu_put_be32(f, s->firstbyte);
qemu_put_8s(f, &s->reg);
qemu_put_8s(f, &s->vcore[0]);
qemu_put_8s(f, &s->vcore[1]);
qemu_put_8s(f, &s->vcore[2]);
qemu_put_8s(f, &s->vcore[3]);
... | false | qemu | f0495f56c9f4574140c392bdbad42721ba692d19 |
17,578 | static void pc_machine_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
PCMachineClass *pcmc = PC_MACHINE_CLASS(oc);
HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc);
NMIClass *nc = NMI_CLASS(oc);
pcmc->get_hotplug_handler = mc->get_hotplug_handler;
pcm... | false | qemu | c7f8d0f3a52b5ef8fdcd305cce438f67d7e06a9f |
17,579 | static uint64_t mips_qemu_read (void *opaque, target_phys_addr_t addr,
unsigned size)
{
return 0;
}
| false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c |
17,580 | int vfio_mmap_region(Object *obj, VFIORegion *region,
MemoryRegion *mem, MemoryRegion *submem,
void **map, size_t size, off_t offset,
const char *name)
{
int ret = 0;
VFIODevice *vbasedev = region->vbasedev;
if (vbasedev->allow_mmap && ... | false | qemu | 5e15d79b8681c7f4e2079833288785708e7520d3 |
17,582 | read_insn_microblaze (bfd_vma memaddr,
struct disassemble_info *info,
struct op_code_struct **opr)
{
unsigned char ibytes[4];
int status;
struct op_code_struct * op;
unsigned long inst;
status = info->read_memory_func (memaddr, ibytes, 4, info);
if (status... | false | qemu | 1d153a3388b150b8aeedde32242db86b79c45473 |
17,583 | bool bdrv_qiov_is_aligned(BlockDriverState *bs, QEMUIOVector *qiov)
{
int i;
size_t alignment = bdrv_opt_mem_align(bs);
for (i = 0; i < qiov->niov; i++) {
if ((uintptr_t) qiov->iov[i].iov_base % alignment) {
return false;
}
if (qiov->iov[i].iov_len % alignment) ... | false | qemu | 61007b316cd71ee7333ff7a0a749a8949527575f |
17,584 | iscsi_process_write(void *arg)
{
IscsiLun *iscsilun = arg;
struct iscsi_context *iscsi = iscsilun->iscsi;
aio_context_acquire(iscsilun->aio_context);
iscsi_service(iscsi, POLLOUT);
iscsi_set_events(iscsilun);
aio_context_release(iscsilun->aio_context);
}
| false | qemu | d045c466d9e62b4321fadf586d024d54ddfd8bd4 |
17,586 | static void vc1_decode_b_mb(VC1Context *v)
{
MpegEncContext *s = &v->s;
GetBitContext *gb = &s->gb;
int i, j;
int mb_pos = s->mb_x + s->mb_y * s->mb_stride;
int cbp = 0; /* cbp decoding stuff */
int mqdiff, mquant; /* MB quantization */
int ttmb = v->ttfrm; /* MB Transform type */
... | false | FFmpeg | f8bed30d8b176fa030f6737765338bb4a2bcabc9 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.