Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
FFmpeg | ffserver.c | void url_split(char *proto, int proto_size,
char *hostname, int hostname_size,
int *port_ptr,
char *path, int path_size,
const char *url)
{
const char *p;
char *q;
int port;
port = -1;
p = url;
q = proto;
while (*p != ':' && *p != '\0... | [
1,
0
] |
FFmpeg | libavformat/au.c | static int au_read_header(AVFormatContext *s)
{
int size;
unsigned int tag;
AVIOContext *pb = s->pb;
unsigned int id, channels, rate;
enum AVCodecID codec;
AVStream *st;
/* check ".snd" header */
tag = avio_rl32(pb);
if (tag != MKTAG('.', 's', 'n', 'd'))
return -1;
size = avio_rb32(p... | [
0,
0
] |
qemu | memory.c | bool memory_region_present(MemoryRegion *container, hwaddr addr)
{
MemoryRegion *mr = memory_region_find(container, addr, 1).mr;
if (!mr || (mr == container)) {
return false;
}
memory_region_unref(mr);
return true;
} | [
1,
0
] |
FFmpeg | libavutil/log.c | void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,
char *line, int line_size, int *print_prefix)
{
char part[3][512];
format_line(ptr, level, fmt, vl, part, sizeof(part[0]), print_prefix, NULL);
snprintf(line, line_size, "%s%s%s", part[0], part[1], part[2]);
} | [
1,
0
] |
qemu | hw/scsi/scsi-disk.c | static void scsi_cancel_io(SCSIRequest *req)
{
SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req);
DPRINTF("Cancel tag=0x%x\n", req->tag);
if (r->req.aiocb) {
bdrv_aio_cancel(r->req.aiocb);
/* This reference was left in by scsi_*_data. We take ownership of
* it the moment scsi_req_cancel is ca... | [
0,
0
] |
qemu | blockdev.c | void do_blockdev_backup(const char *job_id, const char *device,
const char *target, enum MirrorSyncMode sync,
bool has_speed, int64_t speed,
bool has_on_source_error,
BlockdevOnError on_source_error,
... | [
0,
0
] |
FFmpeg | libavfilter/vf_unsharp.c | static int init_filter_param(AVFilterContext *ctx, FilterParam *fp,
const char *effect_type, int width)
{
int z;
const char *effect = fp->amount == 0 ? "none"
: fp->amount < 0 ? "blur"
: "sharpen";
if (!(fp->msize_x &... | [
1,
0
] |
qemu | hw/dp8393x.c | qemu_deliver_packet(VLANClientState *sender, const uint8_t *buf, int size)
{
VLANClientState *vc;
for (vc = sender->vlan->first_client; vc != NULL; vc = vc->next) {
if (vc != sender && !vc->link_down) {
vc->receive(vc->opaque, buf, size);
}
}
} | [
1,
0
] |
qemu | backends/baum.c | int socket_connect(SocketAddress *addr, Error **errp,
NonBlockingConnectHandler *callback, void *opaque)
{
int fd;
switch (addr->type) {
case SOCKET_ADDRESS_KIND_INET:
fd = inet_connect_saddr(addr->u.inet, errp, callback, opaque);
break;
case SOCKET_ADDRESS_KIND_UNIX:
fd ... | [
0,
0
] |
FFmpeg | ffplay.c | static void check_external_clock_sync(VideoState *is, double pts) {
if (fabs(get_external_clock(is) - pts) > AV_NOSYNC_THRESHOLD) {
update_external_clock_pts(is, pts);
}
} | [
0,
0
] |
qemu | hw/vhost.c | static int vhost_client_sync_dirty_bitmap(CPUPhysMemoryClient *client,
target_phys_addr_t start_addr,
target_phys_addr_t end_addr)
{
struct vhost_dev *dev = container_of(client, struct vhost_dev, client);
int i;
if (!dev->lo... | [
1,
0
] |
qemu | tests/e1000e-test.c | void qpci_memwrite(QPCIDevice *dev, void *data, const void *buf, size_t len)
{
uintptr_t addr = (uintptr_t)data;
g_assert(addr >= QPCI_PIO_LIMIT);
dev->bus->memwrite(dev->bus, addr, buf, len);
} | [
1,
0
] |
qemu | hw/pci-hotplug.c | static int usb_host_auto_scan(void *opaque, int bus_num, int addr,
int class_id, int vendor_id, int product_id,
const char *product_name, int speed)
{
struct USBAutoFilter *f;
struct USBDevice *dev;
/* Ignore hubs */
if (class_id == 9)
retu... | [
1,
0
] |
FFmpeg | libavcodec/mss2.c | static av_cold int mss2_decode_init(AVCodecContext *avctx)
{
MSS2Context *const ctx = avctx->priv_data;
MSS12Context *c = &ctx->c;
int ret;
c->avctx = avctx;
avctx->coded_frame = &ctx->pic;
if (ret = ff_mss12_decode_init(c, 1, &ctx->sc[0], &ctx->sc[1]))
return ret;
c->pal_stride = c->mask_str... | [
1,
0
] |
qemu | hw/virtio/virtio.c | static inline void vring_used_flags_set_bit(VirtQueue *vq, int mask)
{
VRingMemoryRegionCaches *caches = atomic_rcu_read(&vq->vring.caches);
VirtIODevice *vdev = vq->vdev;
hwaddr pa = offsetof(VRingUsed, flags);
uint16_t flags = virtio_lduw_phys_cached(vq->vdev, &caches->used, pa);
virtio_stw_phys_cache... | [
1,
0
] |
qemu | qom/object.c | Object *object_dynamic_cast_assert(Object *obj, const char *typename)
{
Object *inst;
inst = object_dynamic_cast(obj, typename);
if (!inst) {
fprintf(stderr, "Object %p is not an instance of type %s\n",
obj, typename);
abort();
}
return inst;
} | [
1,
0
] |
qemu | hw/ppc.c | void ppc970_irq_init(CPUState *env)
{
env->irq_inputs = (void **)qemu_allocate_irqs(&ppc970_set_irq, env, 7);
} | [
1,
0
] |
qemu | cpus.c | static void kvm_start_vcpu(CPUState *env)
{
env->thread = qemu_mallocz(sizeof(QemuThread));
env->halt_cond = qemu_mallocz(sizeof(QemuCond));
qemu_cond_init(env->halt_cond);
qemu_thread_create(env->thread, kvm_cpu_thread_fn, env);
while (env->created == 0)
qemu_cond_timedwait(&qemu_cpu_cond, &qemu_g... | [
0,
0
] |
qemu | hw/ppc/spapr.c | static hwaddr ppc_hash64_pteg_search(PowerPCCPU *cpu, hwaddr hash,
bool secondary, target_ulong ptem,
ppc_hash_pte64_t *pte)
{
CPUPPCState *env = &cpu->env;
int i;
uint64_t token;
target_ulong pte0, pte1;
target_ulong pte_index;... | [
0,
0
] |
FFmpeg | libavcodec/dcadec.c | static av_cold int dcadec_init(AVCodecContext *avctx)
{
DCAContext *s = avctx->priv_data;
s->avctx = avctx;
s->core.avctx = avctx;
s->exss.avctx = avctx;
s->xll.avctx = avctx;
s->lbr.avctx = avctx;
ff_dca_init_vlcs();
if (ff_dca_core_init(&s->core) < 0)
return AVERROR(ENOMEM);
if (ff_dc... | [
0,
0
] |
qemu | hw/s390x/event-facility.c | static void init_event_facility(Object *obj)
{
SCLPEventFacility *event_facility = EVENT_FACILITY(obj);
DeviceState *sdev = DEVICE(obj);
/* Spawn a new bus for SCLP events */
qbus_create_inplace(&event_facility->sbus, sizeof(event_facility->sbus),
TYPE_SCLP_EVENTS_BUS, sdev, NULL);
... | [
1,
0
] |
qemu | HACKING | static uint64_t mv88w8618_audio_read(void *opaque, target_phys_addr_t offset,
unsigned size)
{
mv88w8618_audio_state *s = opaque;
switch (offset) {
case MP_AUDIO_PLAYBACK_MODE:
return s->playback_mode;
case MP_AUDIO_CLOCK_DIV:
return s->clock_div;
case MP_... | [
0,
0
] |
qemu | migration/colo.c | static int ram_save_complete(QEMUFile *f, void *opaque)
{
rcu_read_lock();
if (!migration_in_postcopy(migrate_get_current())) {
migration_bitmap_sync();
}
ram_control_before_iterate(f, RAM_CONTROL_FINISH);
/* try transferring iterative blocks of memory */
/* flush all remaining blocks regardless ... | [
0,
0
] |
qemu | audio/alsaaudio.c | static CaptureVoiceOut *audio_pcm_capture_find_specific(
AudioState *s,
audsettings_t *as
)
{
CaptureVoiceOut *cap;
for (cap = s->cap_head.lh_first; cap; cap = cap->entries.le_next) {
if (audio_pcm_info_eq(&cap->hw.info, as)) {
return cap;
}
}
return NULL;
} | [
0,
0
] |
qemu | target-s390x/fpu_helper.c | uint32_t HELPER(lpxbr)(CPUS390XState *env, uint32_t f1, uint32_t f2)
{
CPU_QuadU v1;
CPU_QuadU v2;
v2.ll.upper = env->fregs[f2].ll;
v2.ll.lower = env->fregs[f2 + 2].ll;
v1.q = float128_abs(v2.q);
env->fregs[f1].ll = v1.ll.upper;
env->fregs[f1 + 2].ll = v1.ll.lower;
return set_cc_nz_f128(v1.q);
... | [
0,
0
] |
qemu | cputlb.c | hwaddr memory_region_section_get_iotlb(CPUArchState *env,
MemoryRegionSection *section,
target_ulong vaddr,
hwaddr paddr,
int prot,
... | [
1,
0
] |
qemu | hw/net/net_rx_pkt.c | void net_rx_pkt_dump(struct NetRxPkt *pkt)
{
#ifdef NET_RX_PKT_DEBUG
assert(pkt);
printf("RX PKT: tot_len: %d, vlan_stripped: %d, vlan_tag: %d\n",
pkt->tot_len, pkt->vlan_stripped, pkt->tci);
#endif
} | [
1,
0
] |
FFmpeg | cmdutils.c | static int png_write_row(PNGContext *s, const uint8_t *data, int size)
{
int ret;
s->zstream.avail_in = size;
s->zstream.next_in = (uint8_t *)data;
while (s->zstream.avail_in > 0) {
ret = deflate(&s->zstream, Z_NO_FLUSH);
if (ret != Z_OK)
return -1;
if (s->zstream.avail_out == 0) {
... | [
1,
0
] |
FFmpeg | libavcodec/vaapi_encode.c | av_cold int ff_vaapi_encode_close(AVCodecContext *avctx)
{
VAAPIEncodeContext *ctx = avctx->priv_data;
VAAPIEncodePicture *pic, *next;
for (pic = ctx->pic_start; pic; pic = next) {
next = pic->next;
vaapi_encode_free(avctx, pic);
}
if (ctx->va_context != VA_INVALID_ID)
vaDestroyContext(ctx... | [
1,
0
] |
qemu | arch_init.c | static inline void migration_bitmap_set_dirty(MemoryRegion *mr, int length)
{
ram_addr_t addr;
for (addr = 0; addr < length; addr += TARGET_PAGE_SIZE) {
if (!memory_region_get_dirty(mr, addr, TARGET_PAGE_SIZE,
DIRTY_MEMORY_MIGRATION)) {
memory_region_set_dirty(mr, ad... | [
0,
0
] |
qemu | target/i386/kvm.c | static void kvm_update_msi_routes_all(void *private, bool global,
uint32_t index, uint32_t mask)
{
int cnt = 0;
MSIRouteEntry *entry;
MSIMessage msg;
/* TODO: explicit route update */
QLIST_FOREACH(entry, &msi_route_list, list) {
cnt++;
msg = pci_get_msi_... | [
1,
1
] |
FFmpeg | libavformat/asfdec.c | static int asf_read_seek(AVFormatContext *s, int stream_index,
int64_t pts, int flags)
{
ASFContext *asf = s->priv_data;
AVStream *st = s->streams[stream_index];
int64_t pos;
int index;
if (s->packet_size <= 0)
return -1;
/* Try using the protocol's read_seek if availab... | [
1,
0
] |
qemu | util/hbitmap.c | void hbitmap_set(HBitmap *hb, uint64_t start, uint64_t count)
{
/* Compute range in the last layer. */
uint64_t last = start + count - 1;
trace_hbitmap_set(hb, start, count,
start >> hb->granularity, last >> hb->granularity);
start >>= hb->granularity;
last >>= hb->granularity;
... | [
1,
0
] |
FFmpeg | libavformat/audiointerleave.c | int ff_audio_rechunk_interleave(
AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush,
int (*get_packet)(AVFormatContext *, AVPacket *, AVPacket *, int),
int (*compare_ts)(AVFormatContext *, AVPacket *, AVPacket *))
{
int i;
if (pkt) {
AVStream *st = s->streams[pkt->stream_index];
... | [
1,
0
] |
qemu | block.c | static uint32_t bonito_sbridge_pciaddr(void *opaque, hwaddr addr)
{
PCIBonitoState *s = opaque;
PCIHostState *phb = PCI_HOST_BRIDGE(s->pcihost);
uint32_t cfgaddr;
uint32_t idsel;
uint32_t devno;
uint32_t funno;
uint32_t regno;
uint32_t pciaddr;
/* support type0 pci config */
if ((s->regs[... | [
1,
0
] |
qemu | acl.c | const char *drive_get_serial(BlockDriverState *bdrv)
{
DriveInfo *dinfo;
TAILQ_FOREACH(dinfo, &drives, next) {
if (dinfo->bdrv == bdrv)
return dinfo->serial;
}
return "\0";
} | [
0,
0
] |
qemu | Makefile.objs | AioContext *iohandler_get_aio_context(void)
{
iohandler_init();
return iohandler_ctx;
} | [
0,
0
] |
FFmpeg | libavcodec/smc.c | static int smc_decode_frame(AVCodecContext *avctx,
void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
SmcContext *s = avctx->priv_data;
const uint8_t *pal =
av_packet_get_side_data(avpk... | [
1,
0
] |
FFmpeg | libavutil/mem.c | void *av_realloc(void *ptr, size_t size)
{
#if CONFIG_MEMALIGN_HACK
int diff;
#endif
/* let's disallow possible ambiguous cases */
if (size > (MAX_MALLOC_SIZE - 16))
return NULL;
#if CONFIG_MEMALIGN_HACK
// FIXME this isn't aligned correctly, though it probably isn't needed
if (!ptr)
return ... | [
1,
1
] |
qemu | configure | int qemu_cpu_is_self(void *env)
{
return 1;
} | [
1,
0
] |
qemu | bsd-user/mmap.c | static void *bsd_vmalloc(size_t size)
{
void *p;
mmap_lock();
/* Use map and mark the pages as used. */
p = mmap(NULL, size, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANON, -1, 0);
if (h2g_valid(p)) {
/* Allocated region overlaps guest address space.
This may recurse. */
... | [
1,
0
] |
qemu | hw/usb-net.c | static ssize_t usbnet_receive(VLANClientState *nc, const uint8_t *buf,
size_t size)
{
USBNetState *s = DO_UPCAST(NICState, nc, nc)->opaque;
struct rndis_packet_msg_type *msg;
if (is_rndis(s)) {
msg = (struct rndis_packet_msg_type *)s->in_buf;
if (!s->rndis_state == RNDI... | [
1,
0
] |
qemu | cpu-exec.c | static inline void iwmmxt_store_reg(TCGv var, int reg)
{
tcg_gen_st_i64(var, cpu_env, offsetof(CPUState, iwmmxt.regs[reg]));
} | [
0,
0
] |
qemu | qemu-io.c | writev_f(int argc, char **argv)
{
struct timeval t1, t2;
int Cflag = 0, qflag = 0;
int c, cnt;
char *buf;
int64_t offset;
int total;
int nr_iov;
int pattern = 0xcd;
QEMUIOVector qiov;
while ((c = getopt(argc, argv, "CqP:")) != EOF) {
switch (c) {
case 'C':
Cflag = 1;
... | [
1,
0
] |
qemu | HACKING | static uint64_t imx_timerp_read(void *opaque, target_phys_addr_t offset,
unsigned size)
{
IMXTimerPState *s = (IMXTimerPState *)opaque;
DPRINTF("p-read(offset=%x)", offset >> 2);
switch (offset >> 2) {
case 0: /* Control Register */
DPRINTF("cr %x\n", s->cr);
retu... | [
1,
0
] |
qemu | Makefile.objs | static bool try_poll_mode(AioContext *ctx, bool blocking)
{
if (blocking && ctx->poll_max_ns && ctx->poll_disable_cnt == 0) {
/* See qemu_soonest_timeout() uint64_t hack */
int64_t max_ns = MIN((uint64_t)aio_compute_timeout(ctx),
(uint64_t)ctx->poll_ns);
if (max_ns) {
... | [
1,
1
] |
qemu | fpu/softfloat.c | float32 float32_scalbn(float32 a, int n STATUS_PARAM)
{
flag aSign;
int16 aExp;
uint32_t aSig;
a = float32_squash_input_denormal(a STATUS_VAR);
aSig = extractFloat32Frac(a);
aExp = extractFloat32Exp(a);
aSign = extractFloat32Sign(a);
if (aExp == 0xFF) {
return a;
}
if (aExp != 0)
... | [
1,
0
] |
qemu | net.c | void net_check_clients(void)
{
VLANState *vlan;
VLANClientState *vc;
int has_nic, has_host_dev;
QTAILQ_FOREACH(vlan, &vlans, next) {
QTAILQ_FOREACH(vc, &vlan->clients, next) {
switch (vc->info->type) {
case NET_CLIENT_TYPE_NIC:
has_nic = 1;
break;
case NET_CLIENT... | [
1,
0
] |
qemu | tests/fdc-test.c | static int qmp_tmp105_get_temperature(const char *id)
{
QDict *response;
int ret;
response = qmp("{ 'execute': 'qom-get', 'arguments': { 'path': '%s', "
"'property': 'temperature' } }",
id);
g_assert(qdict_haskey(response, "return"));
ret = qdict_get_int(response, "ret... | [
1,
0
] |
qemu | hw/timer/hpet.c | static uint32_t hpet_time_after64(uint64_t a, uint64_t b)
{
return ((int64_t)(b) - (int64_t)(a) < 0);
} | [
1,
0
] |
qemu | hw/pci-hotplug.c | void drive_hot_add(Monitor *mon, const QDict *qdict)
{
int dom, pci_bus;
unsigned slot;
int type, bus;
PCIDevice *dev;
DriveInfo *dinfo = NULL;
const char *pci_addr = qdict_get_str(qdict, "pci_addr");
const char *opts = qdict_get_str(qdict, "opts");
BusState *scsibus;
dinfo = add_init_drive(... | [
1,
0
] |
qemu | hw/usb/bus.c | static int usb_device_post_load(void *opaque, int version_id)
{
USBDevice *dev = opaque;
if (dev->state == USB_STATE_NOTATTACHED) {
dev->attached = 0;
} else {
dev->attached = 1;
return 0; | [
1,
0
] |
FFmpeg | libavformat/omadec.c | static int oma_read_packet(AVFormatContext *s, AVPacket *pkt)
{
OMAContext *oc = s->priv_data;
AVStream *st = s->streams[0];
int packet_size = st->codec->block_align;
int byte_rate = st->codec->bit_rate >> 3;
int64_t pos = avio_tell(s->pb);
int ret = av_get_packet(s->pb, pkt, packet_size);
if (ret... | [
1,
0
] |
qemu | backends/hostmem-file.c | file_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)
{
HostMemoryBackendFile *fb = MEMORY_BACKEND_FILE(backend);
if (!backend->size) {
error_setg(errp, "can't create backend with size 0");
return;
}
if (!fb->mem_path) {
error_setg(errp, "mem-path property not set");
return... | [
1,
0
] |
FFmpeg | libavcodec/mpegvideo_motion.c | static inline int hpel_motion(MpegEncContext *s,
uint8_t *dest, uint8_t *src,
int src_x, int src_y,
op_pixels_func *pix_op,
int motion_x, int motion_y)
{
int dxy = 0;
int emu = 0;
src_x ... | [
1,
1
] |
qemu | hw/pci-hotplug.c | SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, DriveInfo *dinfo, int unit)
{
const char *driver;
DeviceState *dev;
driver = bdrv_is_sg(dinfo->bdrv) ? "scsi-generic" : "scsi-disk";
dev = qdev_create(&bus->qbus, driver);
qdev_prop_set_uint32(dev, "scsi-id", unit);
qdev_prop_set_drive(dev, "drive",... | [
1,
0
] |
qemu | tests/libqos/virtio-pci.c | static void pci_hotplug(void)
{
QVirtioPCIDevice *dev;
QOSState *qs;
const char *arch = qtest_get_arch();
qs = pci_test_start();
/* plug secondary disk */
qpci_plug_device_test("virtio-blk-pci", "drv1", PCI_SLOT_HP,
"'drive': 'drive1'");
dev = virtio_blk_pci_init(qs->pcibu... | [
1,
0
] |
FFmpeg | libavcodec/4xm.c | int init_vlc(VLC *vlc, int nb_bits, int nb_codes,
const void *bits, int bits_wrap, int bits_size,
const void *codes, int codes_wrap, int codes_size)
{
vlc->bits = nb_bits;
vlc->table = NULL;
vlc->table_allocated = 0;
vlc->table_size = 0;
#ifdef DEBUG_VLC
printf("build table ... | [
1,
0
] |
qemu | target-i386/helper.c | static void div64(uint64_t *plow, uint64_t *phigh, uint64_t b)
{
uint64_t q, r, a1, a0;
int i, qb;
a0 = *plow;
a1 = *phigh;
if (a1 == 0) {
q = a0 / b;
r = a0 % b;
*plow = q;
*phigh = r;
} else {
/* XXX: use a better algorithm */
for (i = 0; i < 64; i++) {
a1 = (a1... | [
1,
1
] |
qemu | hw/9pfs/9p-posix-acl.c | static int mp_user_removexattr(FsContext *ctx,
const char *path, const char *name)
{
char *buffer;
int ret;
if (strncmp(name, "user.virtfs.", 12) == 0) {
/*
* Don't allow fetch of user.virtfs namesapce
* in case of mapped security
*/
errno = EACCES;
... | [
1,
0
] |
qemu | Makefile.objs | static void musb_packet(MUSBState *s, MUSBEndPoint *ep,
int epnum, int pid, int len, USBCallback cb, int dir)
{
int ret;
int idx = epnum && dir;
int ttype;
/* ep->type[0,1] contains:
* in bits 7:6 the speed (0 - invalid, 1 - high, 2 - full, 3 - slow)
* in bits 5:4 the trans... | [
1,
0
] |
FFmpeg | libavfilter/fifo.c | static int start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
{
AVFilterContext *ctx = link->dst;
YADIFContext *yadif = ctx->priv;
if (yadif->frame_pending)
return_frame(ctx, 1);
if (yadif->prev)
avfilter_unref_buffer(yadif->prev);
yadif->prev = yadif->cur;
yadif->cur = yadif->next;... | [
1,
0
] |
FFmpeg | libavcodec/j2k.c | static void truncpasses(Jpeg2000EncoderContext *s, Jpeg2000Tile *tile)
{
int precno, compno, reslevelno, bandno, cblkno, lev;
Jpeg2000CodingStyle *codsty = &s->codsty;
for (compno = 0; compno < s->ncomponents; compno++) {
Jpeg2000Component *comp = tile->comp + compno;
for (reslevelno = 0, lev = cods... | [
1,
0
] |
qemu | target-ppc/cpu.h | void OPPROTO op_srli_T1(void)
{
T1 = T1 >> PARAM1;
RETURN();
} | [
1,
0
] |
FFmpeg | libavcodec/arm/Makefile | void ff_vp3_idct_add_altivec(uint8_t *dst, int stride, DCTELEM block[64])
{
LOAD_ZERO;
vec_u8 t, vdst;
vec_s16 vdst_16;
vec_u8 vdst_mask = vec_mergeh(vec_splat_u8(-1), vec_lvsl(0, dst));
IDCT_START
IDCT_1D(NOP, NOP)
TRANSPOSE8(b0, b1, b2, b3, b4, b5, b6, b7);
IDCT_1D(ADD8, SHIFT4)
#define ADD(... | [
0,
0
] |
qemu | hw/i386/acpi-build.c | static void qobject_output_type_uint64(Visitor *v, const char *name,
uint64_t *obj, Error **errp)
{
/* FIXME values larger than INT64_MAX become negative */
QObjectOutputVisitor *qov = to_qov(v);
qobject_output_add(qov, name, qnum_from_int(*obj));
} | [
1,
1
] |
qemu | hw/watchdog/wdt_diag288.c | static void diag288_timer_expired(void *dev)
{
qemu_log_mask(CPU_LOG_RESET, "Watchdog timer expired.\n");
watchdog_perform_action();
/* Reset the watchdog only if the guest was notified about expiry. */
switch (get_watchdog_action()) {
case WDT_DEBUG:
case WDT_NONE:
case WDT_PAUSE:
return;
... | [
1,
0
] |
FFmpeg | libavcodec/flacenc.c | static int flac_encode_frame(AVCodecContext *avctx, uint8_t *frame,
int buf_size, void *data)
{
FlacEncodeContext *s;
const int16_t *samples = data;
int frame_bytes, out_bytes;
s = avctx->priv_data;
/* when the last block is reached, update the header in extradata */
if ... | [
0,
0
] |
FFmpeg | ffplay.c | int has_altivec(void)
{
#ifdef __AMIGAOS4__
ULONG result = 0;
extern struct ExecIFace *IExec;
IExec->GetCPUInfoTags(GCIT_VectorUnit, &result, TAG_DONE);
if (result == VECTORTYPE_ALTIVEC)
return 1;
return 0;
#else /* __AMIGAOS4__ */
#ifdef SYS_DARWIN
int sels[2] = {CTL_HW, HW_VECTORUNIT};
in... | [
1,
0
] |
qemu | tests/tcg/cris/check_abs.c | static inline int cris_bound_w(int v, int b)
{
int r = v;
asm("bound.w\t%1, %0\n" : "+r"(r) : "ri"(b));
return r;
} | [
1,
0
] |
qemu | hw/xen/xen_pt_config_init.c | static int xen_remove_from_physmap(XenIOState *state,
hwaddr start_addr,
ram_addr_t size)
{
unsigned long i = 0;
int rc = 0;
XenPhysmap *physmap = NULL;
hwaddr phys_offset = 0;
physmap = get_physmapping(state, start_addr, size);
... | [
1,
0
] |
qemu | monitor.c | static int64_t expr_unary(Monitor *mon)
{
int64_t n;
char *p;
int ret;
switch (*pch) {
case '+':
next();
n = expr_unary(mon);
break;
case '-':
next();
n = -expr_unary(mon);
break;
case '~':
next();
n = ~expr_unary(mon);
break;
case '(':
next();
... | [
1,
0
] |
qemu | Makefile.objs | void aio_bh_schedule_oneshot(AioContext *ctx, QEMUBHFunc *cb, void *opaque)
{
QEMUBH *bh;
bh = g_new(QEMUBH, 1);
*bh = (QEMUBH){
.ctx = ctx,
.cb = cb,
.opaque = opaque,
};
qemu_lockcnt_lock(&ctx->list_lock);
bh->next = ctx->first_bh;
bh->scheduled = 1;
bh->deleted = 1;
/... | [
0,
0
] |
FFmpeg | libavcodec/jpeg2000.c | void ff_jpeg2000_cleanup(Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty)
{
int reslevelno, bandno, precno;
for (reslevelno = 0;
comp->reslevel && reslevelno < codsty->nreslevels;
reslevelno++) {
Jpeg2000ResLevel *reslevel = comp->reslevel + reslevelno;
for (bandno = 0; bandno < re... | [
1,
0
] |
qemu | block/raw-posix.c | static ssize_t handle_aiocb_write_zeroes(RawPosixAIOData *aiocb)
{
int ret = -EOPNOTSUPP;
BDRVRawState *s = aiocb->bs->opaque;
if (s->has_write_zeroes == 0) {
return -ENOTSUP;
}
if (aiocb->aio_type & QEMU_AIO_BLKDEV) {
#ifdef BLKZEROOUT
do {
uint64_t range[2] = {aiocb->aio_offset, aiocb... | [
1,
0
] |
qemu | hw/s390x/ipl.c | int kvm_arch_handle_exit(CPUState *cs, struct kvm_run *run)
{
S390CPU *cpu = S390_CPU(cs);
int ret = 0;
switch (run->exit_reason) {
case KVM_EXIT_S390_SIEIC:
ret = handle_intercept(cpu);
break;
case KVM_EXIT_S390_RESET:
qemu_system_reset_request();
break;
case KVM_EXIT_S390_TSCH:
... | [
0,
0
] |
qemu | hw/acpi/pcihp.c | AddressSpace *pci_device_iommu_address_space(PCIDevice *dev)
{
PCIBus *bus = PCI_BUS(dev->bus);
PCIBus *iommu_bus = bus;
while (iommu_bus && !iommu_bus->iommu_fn && iommu_bus->parent_dev) {
iommu_bus = PCI_BUS(iommu_bus->parent_dev->bus);
}
if (iommu_bus && iommu_bus->iommu_fn) {
return iommu_b... | [
1,
0
] |
qemu | backends/baum.c | int gdbserver_start(const char *device)
{
GDBState *s;
char gdbstub_device_name[128];
CharDriverState *chr = NULL;
CharDriverState *mon_chr;
if (!device)
return -1;
if (strcmp(device, "none") != 0) {
if (strstart(device, "tcp:", NULL)) {
/* enforce required TCP attributes */
s... | [
1,
0
] |
qemu | cpus.c | void qmp_memsave(int64_t addr, int64_t size, const char *filename,
bool has_cpu, int64_t cpu_index, Error **errp)
{
FILE *f;
uint32_t l;
CPUState *cpu;
uint8_t buf[1024];
if (!has_cpu) {
cpu_index = 0;
}
cpu = qemu_get_cpu(cpu_index);
if (cpu == NULL) {
error_set(errp... | [
1,
0
] |
qemu | tests/Makefile.include | static QOSState *qvirtio_9p_start(void)
{
const char *cmd = "-fsdev local,id=fsdev0,security_model=none,path=%s "
"-device virtio-9p-pci,fsdev=fsdev0,mount_tag=%s";
test_share = g_strdup("/tmp/qtest.XXXXXX");
g_assert_nonnull(mkdtemp(test_share));
return qtest_pc_boot(cmd, test_share, ... | [
1,
0
] |
qemu | hw/virtio-pci.c | static int kvm_virtio_pci_vq_vector_unmask(VirtIOPCIProxy *proxy,
unsigned int queue_no,
unsigned int vector,
MSIMessage msg)
{
VirtQueue *vq = virtio_get_queue(proxy->vdev, queue_no);... | [
1,
0
] |
qemu | hw/virtio-scsi.c | VirtIODevice *virtio_scsi_init(DeviceState *dev, VirtIOSCSIConf *proxyconf)
{
VirtIOSCSI *s;
static int virtio_scsi_id;
size_t sz;
int i;
sz = sizeof(VirtIOSCSI) + proxyconf->num_queues * sizeof(VirtQueue *);
s = (VirtIOSCSI *)virtio_common_init("virtio-scsi", VIRTIO_ID_SCSI,
... | [
1,
1
] |
FFmpeg | libswscale/swscale_unscaled.c | static int check_image_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt,
const int linesizes[4])
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
int i;
for (i = 0; i < 4; i++) {
int plane = desc->comp[i].plane;
if (!data[plane] || !linesizes[pla... | [
0,
0
] |
FFmpeg | libavutil/buffer.c | static void pool_release_buffer(void *opaque, uint8_t *data)
{
BufferPoolEntry *buf = opaque;
AVBufferPool *pool = buf->pool;
if (CONFIG_MEMORY_POISONING)
memset(buf->data, 0x2a, pool->size);
add_to_pool(buf);
if (!avpriv_atomic_int_add_and_fetch(&pool->refcount, -1))
buffer_pool_free(pool);
} | [
1,
0
] |
qemu | target-microblaze/op_helper.c | static void dec_load(DisasContext *dc)
{
TCGv t, *addr;
unsigned int size;
size = 1 << (dc->opcode & 3);
LOG_DIS("l %x %d\n", dc->opcode, size);
t_sync_flags(dc);
addr = compute_ldst_addr(dc, &t);
/* If we get a fault on a dslot, the jmpstate better be in sync. */
sync_jmpstate(dc);
/* Veri... | [
1,
0
] |
qemu | hw/arm/nseries.c | static void pxa2xx_fir_write(void *opaque, hwaddr addr,
uint64_t value64, unsigned size)
{
PXA2xxFIrState *s = (PXA2xxFIrState *)opaque;
uint32_t value = value64;
uint8_t ch;
switch (addr) {
case ICCR0:
s->control[0] = value;
if (!(value & (1 << 4))) /* RXE */
... | [
1,
1
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.