project stringclasses 2
values | commit_id stringlengths 40 40 | target int64 0 1 | func stringlengths 26 142k | idx int64 0 27.3k |
|---|---|---|---|---|
FFmpeg | 3019b4f6480a5d8c38e0e32ef75dabe6e0f3ae98 | 0 | static int crystalhd_receive_frame(AVCodecContext *avctx, AVFrame *frame)
{
BC_STATUS bc_ret;
BC_DTS_STATUS decoder_status = { 0, };
CopyRet rec_ret;
CHDContext *priv = avctx->priv_data;
HANDLE dev = priv->dev;
int got_frame = 0;
av_log(avctx, AV_LOG_VERBOSE, "CrystalHD: ... | 12,084 |
FFmpeg | 7d3baebe408cb7377dbb6fa1a7fd285e8e366440 | 1 | av_cold int ff_opus_parse_extradata(AVCodecContext *avctx,
OpusContext *s)
{
static const uint8_t default_channel_map[2] = { 0, 1 };
int (*channel_reorder)(int, int) = channel_reorder_unknown;
const uint8_t *extradata, *channel_map;
int extradata_size;
... | 12,085 |
qemu | 34e1c27bc3094ffe484d9855e07ad104bddf579f | 1 | uint32 float32_to_uint32_round_to_zero( float32 a STATUS_PARAM )
{
int64_t v;
uint32 res;
v = float32_to_int64_round_to_zero(a STATUS_VAR);
if (v < 0) {
res = 0;
float_raise( float_flag_invalid STATUS_VAR);
} else if (v > 0xffffffff) {
res = 0xffffffff;
fl... | 12,087 |
qemu | 0d07fe47d4986271a21ed4ff5237275ff55dd93f | 1 | static inline abi_long do_msgrcv(int msqid, abi_long msgp,
unsigned int msgsz, abi_long msgtyp,
int msgflg)
{
struct target_msgbuf *target_mb;
char *target_mtext;
struct msgbuf *host_mb;
abi_long ret = 0;
if (!lock_user_stru... | 12,088 |
qemu | 016d2e1dfa21b64a524d3629fdd317d4c25bc3b8 | 1 | restore_sigcontext(CPUM68KState *env, struct target_sigcontext *sc, int *pd0)
{
int err = 0;
int temp;
__get_user(env->aregs[7], &sc->sc_usp);
__get_user(env->dregs[1], &sc->sc_d1);
__get_user(env->aregs[0], &sc->sc_a0);
__get_user(env->aregs[1], &sc->sc_a1);
__get_user(env->pc, &s... | 12,089 |
qemu | 56ad3e54dad6cdcee8668d170df161d89581846f | 1 | static ssize_t mp_pacl_getxattr(FsContext *ctx, const char *path,
const char *name, void *value, size_t size)
{
char *buffer;
ssize_t ret;
buffer = rpath(ctx, path);
ret = lgetxattr(buffer, MAP_ACL_ACCESS, value, size);
g_free(buffer);
return ret;
}
| 12,090 |
qemu | 231bb267644ee3a9ebfd9c7f42d5d41610194b45 | 1 | int qcow2_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info)
{
BDRVQcowState *s = bs->opaque;
QCowSnapshot *new_snapshot_list = NULL;
QCowSnapshot *old_snapshot_list = NULL;
QCowSnapshot sn1, *sn = &sn1;
int i, ret;
uint64_t *l1_table = NULL;
int64_t l1_table_offset;
... | 12,091 |
qemu | 84a3a53cf61ef691478bd91afa455c801696053c | 1 | static int omap_i2c_init(SysBusDevice *sbd)
{
DeviceState *dev = DEVICE(sbd);
OMAPI2CState *s = OMAP_I2C(dev);
if (!s->fclk) {
hw_error("omap_i2c: fclk not connected\n");
}
if (s->revision >= OMAP2_INTR_REV && !s->iclk) {
/* Note that OMAP1 doesn't have a separate interface... | 12,092 |
qemu | 80eecda8e5d09c442c24307f340840a5b70ea3b9 | 1 | static int is_rndis(USBNetState *s)
{
return s->dev.config->bConfigurationValue == DEV_RNDIS_CONFIG_VALUE;
}
| 12,096 |
FFmpeg | 437ad467c250f8b96dc3456997906866d748f6ba | 0 | static int do_packet_auto_bsf(AVFormatContext *s, AVPacket *pkt) {
AVStream *st = s->streams[pkt->stream_index];
int i, ret;
if (!(s->flags & AVFMT_FLAG_AUTO_BSF))
return 1;
if (s->oformat->check_bitstream) {
if (!st->internal->bitstream_checked) {
if ((ret = s->of... | 12,097 |
FFmpeg | 7e8fe4be5fb4c98aa3c6a4ed3cec999f4e3cc3aa | 0 | AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name)
{
AVFilterContext *ret;
if (!filter)
return NULL;
ret = av_mallocz(sizeof(AVFilterContext));
if (!ret)
return NULL;
ret->av_class = &avfilter_class;
ret->filter = filter;
ret->na... | 12,100 |
FFmpeg | 70d54392f5015b9c6594fcae558f59f952501e3b | 0 | static int dv_decode_video_segment(AVCodecContext *avctx, void *arg)
{
DVVideoContext *s = avctx->priv_data;
DVwork_chunk *work_chunk = arg;
int quant, dc, dct_mode, class1, j;
int mb_index, mb_x, mb_y, last_index;
int y_stride, linesize;
DCTELEM *block, *block1;
int c_offset;
u... | 12,102 |
FFmpeg | cd2f69cdd63d3ca5c2388d9ce6737b3e46bb19b2 | 0 | static void compute_default_clut(AVSubtitleRect *rect, int w, int h)
{
uint8_t list[256] = {0};
uint8_t list_inv[256];
int counttab[256] = {0};
int count, i, x, y;
#define V(x,y) rect->data[0][(x) + (y)*rect->linesize[0]]
for (y = 0; y<h; y++) {
for (x = 0; x<w; x++) {
... | 12,103 |
FFmpeg | fd09cd08c0ad059ee41ccafc6836a285c1b35c45 | 0 | static int seqvideo_decode(SeqVideoContext *seq, const unsigned char *data, int data_size)
{
const unsigned char *data_end = data + data_size;
GetBitContext gb;
int flags, i, j, x, y, op;
unsigned char c[3];
unsigned char *dst;
uint32_t *palette;
flags = *data++;
if (flags &... | 12,104 |
qemu | b7fb49f0c709a406f79372be397367ff2550373b | 0 | int dpy_set_ui_info(QemuConsole *con, QemuUIInfo *info)
{
assert(con != NULL);
con->ui_info = *info;
if (!con->hw_ops->ui_info) {
return -1;
}
/*
* Typically we get a flood of these as the user resizes the window.
* Wait until the dust has settled (one second without upd... | 12,107 |
qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | 0 | static void dma_aio_cancel(BlockAIOCB *acb)
{
DMAAIOCB *dbs = container_of(acb, DMAAIOCB, common);
trace_dma_aio_cancel(dbs);
if (dbs->acb) {
bdrv_aio_cancel_async(dbs->acb);
}
}
| 12,108 |
qemu | 40fda982f2e887f7d5cc36b8a7e3b5a07a1e6704 | 0 | static void kvmppc_host_cpu_initfn(Object *obj)
{
assert(kvm_enabled());
}
| 12,110 |
qemu | b6ce27a593ab39ac28baebc3045901925046bebd | 0 | static void virtio_pci_modern_regions_init(VirtIOPCIProxy *proxy)
{
static const MemoryRegionOps common_ops = {
.read = virtio_pci_common_read,
.write = virtio_pci_common_write,
.impl = {
.min_access_size = 1,
.max_access_size = 4,
},
.endiann... | 12,112 |
qemu | 3dc6f8693694a649a9c83f1e2746565b47683923 | 0 | static void coroutine_fn v9fs_flush(void *opaque)
{
ssize_t err;
int16_t tag;
size_t offset = 7;
V9fsPDU *cancel_pdu = NULL;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
err = pdu_unmarshal(pdu, offset, "w", &tag);
if (err < 0) {
pdu_complete(pdu, err);
retu... | 12,113 |
qemu | 49bd1458da8909434eb83c5cda472c63ff6a529c | 0 | static PCIBus *pci_get_bus_devfn(int *devfnp, const char *devaddr)
{
int dom, bus;
unsigned slot;
if (!devaddr) {
*devfnp = -1;
return pci_find_bus(0);
}
if (pci_parse_devaddr(devaddr, &dom, &bus, &slot) < 0) {
return NULL;
}
*devfnp = slot << 3;
... | 12,114 |
qemu | 7e7e2ebc942da8285931ceabf12823e165dced8b | 0 | static void vnc_connect(VncDisplay *vd, int csock)
{
VncState *vs = qemu_mallocz(sizeof(VncState));
int i;
vs->csock = csock;
vs->lossy_rect = qemu_mallocz(VNC_STAT_ROWS * sizeof (*vs->lossy_rect));
for (i = 0; i < VNC_STAT_ROWS; ++i) {
vs->lossy_rect[i] = qemu_mallocz(VNC_STAT_COLS... | 12,115 |
qemu | 13f12430d48b62e2304e0e5a7c607279af68b98a | 0 | qcrypto_tls_session_new(QCryptoTLSCreds *creds,
const char *hostname,
const char *aclname,
QCryptoTLSCredsEndpoint endpoint,
Error **errp)
{
QCryptoTLSSession *session;
int ret;
session = g_new0(QCrypto... | 12,116 |
qemu | 1828be316f6637d43dd4c4f5f32925b17fb8107f | 0 | static void tcg_cpu_exec(void)
{
int ret = 0;
if (next_cpu == NULL)
next_cpu = first_cpu;
for (; next_cpu != NULL; next_cpu = next_cpu->next_cpu) {
CPUState *env = cur_cpu = next_cpu;
if (timer_alarm_pending) {
timer_alarm_pending = 0;
break;
... | 12,118 |
qemu | 7df9381b7aa56c897e344f3bfe43bf5848bbd3e0 | 0 | static int vfio_base_device_init(VFIODevice *vbasedev)
{
VFIOGroup *group;
VFIODevice *vbasedev_iter;
char path[PATH_MAX], iommu_group_path[PATH_MAX], *group_name;
ssize_t len;
struct stat st;
int groupid;
int ret;
/* name must be set prior to the call */
if (!vbasedev->n... | 12,119 |
qemu | c11e80e299e57c64934c164b231fa0d4279db445 | 0 | void Y8950UpdateOne(FM_OPL *OPL, INT16 *buffer, int length)
{
int i;
int data;
OPLSAMPLE *buf = buffer;
UINT32 amsCnt = OPL->amsCnt;
UINT32 vibCnt = OPL->vibCnt;
UINT8 rythm = OPL->rythm&0x20;
OPL_CH *CH,*R_CH;
YM_DELTAT *DELTAT = OPL->deltat;
/* setup DELTA-T unit */
YM_DELTAT_DECODE_PRESET... | 12,120 |
qemu | a1e985833cde3208b0f57c4c7e640b60fbc6c54d | 0 | static const ppc_def_t *ppc_find_by_pvr (uint32_t pvr)
{
int i;
for (i = 0; i < ARRAY_SIZE(ppc_defs); i++) {
/* If we have an exact match, we're done */
if (pvr == ppc_defs[i].pvr) {
return &ppc_defs[i];
}
}
return NULL;
}
| 12,122 |
qemu | eb5d4f5329df83ea15244b47f7fbca21adaae41b | 0 | static int slirp_state_load(QEMUFile *f, void *opaque, int version_id)
{
Slirp *slirp = opaque;
struct ex_list *ex_ptr;
while (qemu_get_byte(f)) {
int ret;
struct socket *so = socreate(slirp);
if (!so)
return -ENOMEM;
ret = vmstate_load_state(f, &vm... | 12,124 |
qemu | 629bd516fda67c95ba1c7d1393bacb9e68ea0712 | 0 | int get_segment32(CPUPPCState *env, mmu_ctx_t *ctx,
target_ulong eaddr, int rw, int type)
{
hwaddr hash;
target_ulong vsid;
int ds, pr, target_page_bits;
int ret, ret2;
target_ulong sr, pgidx;
pr = msr_pr;
ctx->eaddr = eaddr;
sr = env->sr[eaddr >> 28];
... | 12,125 |
qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | 0 | static void bonito_cop_writel(void *opaque, target_phys_addr_t addr,
uint64_t val, unsigned size)
{
PCIBonitoState *s = opaque;
((uint32_t *)(&s->boncop))[addr/sizeof(uint32_t)] = val & 0xffffffff;
}
| 12,126 |
qemu | 213189ab65d83ecd9072f27c80a15dcb91b6bdbf | 0 | static void scsi_dma_restart_cb(void *opaque, int running, int reason)
{
SCSIDeviceState *s = opaque;
SCSIRequest *r = s->requests;
if (!running)
return;
while (r) {
if (r->status & SCSI_REQ_STATUS_RETRY) {
r->status &= ~SCSI_REQ_STATUS_RETRY;
scsi_writ... | 12,127 |
FFmpeg | fef2147b7a689b80d716c3edb9d4a18904865275 | 0 | int ff_eac3_parse_header(AC3DecodeContext *s)
{
int i, blk, ch;
int ac3_exponent_strategy, parse_aht_info, parse_spx_atten_data;
int parse_transient_proc_info;
int num_cpl_blocks;
GetBitContext *gbc = &s->gbc;
/* An E-AC-3 stream can have multiple independent streams which the
a... | 12,128 |
qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | 0 | qemu_irq *mcf_intc_init(MemoryRegion *sysmem,
target_phys_addr_t base,
CPUM68KState *env)
{
mcf_intc_state *s;
s = g_malloc0(sizeof(mcf_intc_state));
s->env = env;
mcf_intc_reset(s);
memory_region_init_io(&s->iomem, &mcf_intc_ops, s, "mcf",... | 12,129 |
qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | 0 | SDState *sd_init(BlockDriverState *bs, bool is_spi)
{
SDState *sd;
if (bs && bdrv_is_read_only(bs)) {
fprintf(stderr, "sd_init: Cannot use read-only drive\n");
return NULL;
}
sd = (SDState *) g_malloc0(sizeof(SDState));
sd->buf = qemu_blockalign(bs, 512);
sd->spi = i... | 12,131 |
qemu | 57407ea44cc0a3d630b9b89a2be011f1955ce5c1 | 0 | static void isa_ne2000_cleanup(NetClientState *nc)
{
NE2000State *s = qemu_get_nic_opaque(nc);
s->nic = NULL;
}
| 12,135 |
qemu | 20674449453924ac808a82619456f68bb14df007 | 0 | static int configure_accelerator(MachineClass *mc)
{
const char *p;
char buf[10];
int i, ret;
bool accel_initialised = false;
bool init_failed = false;
p = qemu_opt_get(qemu_get_machine_opts(), "accel");
if (p == NULL) {
/* Use the default "accelerator", tcg */
p ... | 12,136 |
qemu | 4ffb17f5c3244e405198ae285ffbb20a62e0d4b3 | 0 | VirtIODevice *virtio_net_init(DeviceState *dev)
{
VirtIONet *n;
static int virtio_net_id;
n = (VirtIONet *)virtio_common_init("virtio-net", VIRTIO_ID_NET,
sizeof(struct virtio_net_config),
sizeof(VirtIONet));
n->v... | 12,138 |
qemu | 922f893e57da24bc80db3e79bea56485d1c111fa | 0 | static void process_ncq_command(AHCIState *s, int port, uint8_t *cmd_fis,
int slot)
{
AHCIDevice *ad = &s->dev[port];
IDEState *ide_state = &ad->port.ifs[0];
NCQFrame *ncq_fis = (NCQFrame*)cmd_fis;
uint8_t tag = ncq_fis->tag >> 3;
NCQTransferState *ncq_tfs = &a... | 12,140 |
qemu | 149f54b53b7666a3facd45e86eece60ce7d3b114 | 0 | static inline uint32_t lduw_phys_internal(hwaddr addr,
enum device_endian endian)
{
uint8_t *ptr;
uint64_t val;
MemoryRegionSection *section;
section = phys_page_find(address_space_memory.dispatch, addr >> TARGET_PAGE_BITS);
if (!(memory_region_is... | 12,141 |
FFmpeg | a304def1dca50d63bf2a39651f84792980db3508 | 0 | static void decode_block(BinkAudioContext *s, short *out, int use_dct)
{
int ch, i, j, k;
float q, quant[25];
int width, coeff;
GetBitContext *gb = &s->gb;
if (use_dct)
skip_bits(gb, 2);
for (ch = 0; ch < s->channels; ch++) {
FFTSample *coeffs = s->coeffs_ptr[ch];
... | 12,143 |
qemu | 0ae18ceeaaa2c1749e742c4b112f6c3bf0896408 | 0 | static void sun4c_hw_init(const struct sun4c_hwdef *hwdef, ram_addr_t RAM_size,
const char *boot_device,
DisplayState *ds, const char *kernel_filename,
const char *kernel_cmdline,
const char *initrd_filename, con... | 12,144 |
qemu | bec1631100323fac0900aea71043d5c4e22fc2fa | 0 | static inline void tcg_out_goto_label(TCGContext *s, int cond, int label_index)
{
TCGLabel *l = &s->labels[label_index];
if (l->has_value) {
tcg_out_goto(s, cond, l->u.value_ptr);
} else {
tcg_out_reloc(s, s->code_ptr, R_ARM_PC24, label_index, 0);
tcg_out_b_noaddr(s, cond);
... | 12,146 |
qemu | 10ee2aaa417d8d8978cdb2bbed55ebb152df5f6b | 0 | static uint32_t nabm_readl (void *opaque, uint32_t addr)
{
PCIAC97LinkState *d = opaque;
AC97LinkState *s = &d->ac97;
AC97BusMasterRegs *r = NULL;
uint32_t index = addr - s->base[1];
uint32_t val = ~0U;
switch (index) {
case PI_BDBAR:
case PO_BDBAR:
case MC_BDBAR:
... | 12,147 |
qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | 0 | static uint32_t dp8393x_readl(void *opaque, target_phys_addr_t addr)
{
uint32_t v;
v = dp8393x_readw(opaque, addr);
v |= dp8393x_readw(opaque, addr + 2) << 16;
return v;
}
| 12,149 |
qemu | 08cb175a24d642a40e41db2fef2892b0a1ab504e | 0 | qcrypto_tls_creds_x509_sanity_check(QCryptoTLSCredsX509 *creds,
bool isServer,
const char *cacertFile,
const char *certFile,
Error **errp)
{
gnutls_x509_crt_t cert = ... | 12,150 |
qemu | c4d9d19645a484298a67e9021060bc7c2b081d0f | 0 | static void qemu_aio_wait_all(void)
{
while (qemu_aio_wait()) {
/* Do nothing */
}
}
| 12,151 |
qemu | 42a268c241183877192c376d03bd9b6d527407c7 | 0 | static inline void gen_jcc1(DisasContext *s, int b, int l1)
{
CCPrepare cc = gen_prepare_cc(s, b, cpu_T[0]);
gen_update_cc_op(s);
if (cc.mask != -1) {
tcg_gen_andi_tl(cpu_T[0], cc.reg, cc.mask);
cc.reg = cpu_T[0];
}
set_cc_op(s, CC_OP_DYNAMIC);
if (cc.use_reg2) {
... | 12,152 |
qemu | ccf1d14a1e37abe1f0da162c00a8941963b47a4c | 0 | static void rtl8139_do_receive(void *opaque, const uint8_t *buf, int size, int do_interrupt)
{
RTL8139State *s = opaque;
uint32_t packet_header = 0;
uint8_t buf1[60];
static const uint8_t broadcast_macaddr[6] =
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
DEBUG_PRINT((">>> RTL8139: ... | 12,153 |
FFmpeg | 22b37f5d3200cfe4c15eded883663cf0612093c1 | 0 | static int img_read_packet(AVFormatContext *s1, AVPacket *pkt)
{
VideoData *s = s1->priv_data;
char filename[1024];
int ret;
ByteIOContext f1, *f;
if (!s->is_pipe) {
if (get_frame_filename(filename, sizeof(filename),
s->path, s->img_number) < 0)
... | 12,154 |
qemu | 0931304788ecac6c7871f570c7ac8407b54e30c6 | 1 | int qemu_chr_fe_write_all(CharDriverState *s, const uint8_t *buf, int len)
{
int offset = 0;
int res;
qemu_mutex_lock(&s->chr_write_lock);
while (offset < len) {
do {
res = s->chr_write(s, buf + offset, len - offset);
if (res == -1 && errno == EAGAIN) {
... | 12,155 |
qemu | 0b8b8753e4d94901627b3e86431230f2319215c4 | 1 | static void blkreplay_bh_cb(void *opaque)
{
Request *req = opaque;
qemu_coroutine_enter(req->co, NULL);
qemu_bh_delete(req->bh);
g_free(req);
}
| 12,156 |
FFmpeg | 6706a2986c48e3f20f1274b24345e6555d8f0f48 | 1 | static void store_slice_c(uint8_t *dst, const uint16_t *src,
int dst_linesize, int src_linesize,
int width, int height, int log2_scale,
const uint8_t dither[8][8])
{
int y, x;
#define STORE(pos) do { ... | 12,157 |
qemu | a9fc37f6bc3f2ab90585cb16493da9f6dcfbfbcf | 1 | static QObject *qobject_input_get_object(QObjectInputVisitor *qiv,
const char *name,
bool consume, Error **errp)
{
StackObject *tos;
QObject *qobj;
QObject *ret;
if (QSLIST_EMPTY(&qiv->stack)) {
/* Starti... | 12,158 |
qemu | 47d4be12c3997343e436c6cca89aefbbbeb70863 | 1 | static void test_qemu_strtoll_full_empty(void)
{
const char *str = "";
int64_t res = 999;
int err;
err = qemu_strtoll(str, NULL, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, 0);
}
| 12,159 |
qemu | 38c4d0aea3e1264c86e282d99560330adf2b6e25 | 1 | static int64_t try_fiemap(BlockDriverState *bs, off_t start, off_t *data,
off_t *hole, int nb_sectors, int *pnum)
{
#ifdef CONFIG_FIEMAP
BDRVRawState *s = bs->opaque;
int64_t ret = BDRV_BLOCK_DATA | BDRV_BLOCK_OFFSET_VALID | start;
struct {
struct fiemap fm;
... | 12,160 |
qemu | 60ff4e63e2ea4738f114cbaf1f17e6e0184fc09c | 1 | static void calxeda_init(MachineState *machine, enum cxmachines machine_id)
{
ram_addr_t ram_size = machine->ram_size;
const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_fi... | 12,161 |
qemu | 0a852417564bc59441dc09509beacf7b49bc1e57 | 1 | bool trace_init_backends(void)
{
#ifdef CONFIG_TRACE_SIMPLE
if (!st_init()) {
fprintf(stderr, "failed to initialize simple tracing backend.\n");
return false;
}
#ifdef CONFIG_TRACE_FTRACE
if (!ftrace_init()) {
fprintf(stderr, "failed to initialize ftrace backend.\n");
return ... | 12,162 |
qemu | ac369a77967d5dd984a5430505eaf24a380af1c0 | 1 | static inline void acpi_build_tables_cleanup(AcpiBuildTables *tables, bool mfre)
{
void *linker_data = bios_linker_loader_cleanup(tables->linker);
if (mfre) {
g_free(linker_data);
}
g_array_free(tables->rsdp, mfre);
g_array_free(tables->table_data, mfre);
g_array_free(tables->tcp... | 12,163 |
qemu | 3604a76fea6ff37738d4a8f596be38407be74a83 | 1 | static void dec_mul(DisasContext *dc)
{
if (dc->format == OP_FMT_RI) {
LOG_DIS("muli r%d, r%d, %d\n", dc->r0, dc->r1,
sign_extend(dc->imm16, 16));
} else {
LOG_DIS("mul r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1);
}
if (!(dc->env->features & LM32_FEATURE_MULTIPLY)... | 12,164 |
qemu | c572f23a3e7180dbeab5e86583e43ea2afed6271 | 1 | static void v9fs_clunk(void *opaque)
{
int err;
int32_t fid;
size_t offset = 7;
V9fsFidState *fidp;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
pdu_unmarshal(pdu, offset, "d", &fid);
fidp = clunk_fid(s, fid);
if (fidp == NULL) {
err = -ENOENT;
goto ... | 12,165 |
FFmpeg | 7bf3f380466eeff24916fd6218aca13e414c6240 | 1 | static int cbs_mpeg2_read_unit(CodedBitstreamContext *ctx,
CodedBitstreamUnit *unit)
{
BitstreamContext bc;
int err;
err = bitstream_init(&bc, unit->data, 8 * unit->data_size);
if (err < 0)
return err;
if (MPEG2_START_IS_SLICE(unit->type)) {
... | 12,167 |
FFmpeg | 4c160fa23996c05efcd952ccfac2359311d8a1bc | 1 | static int scan_for_extensions(AVCodecContext *avctx)
{
DCAContext *s = avctx->priv_data;
int core_ss_end, ret;
core_ss_end = FFMIN(s->frame_size, s->dca_buffer_size) * 8;
/* only scan for extensions if ext_descr was unknown or indicated a
* supported XCh extension */
if (s->core_ext... | 12,168 |
qemu | 01f7cecf0037997cb0e58ec0d56bf9b5a6f7cb2a | 1 | udp_input(register struct mbuf *m, int iphlen)
{
Slirp *slirp = m->slirp;
register struct ip *ip;
register struct udphdr *uh;
int len;
struct ip save_ip;
struct socket *so;
DEBUG_CALL("udp_input");
DEBUG_ARG("m = %lx", (long)m);
DEBUG_ARG("iphlen = %d", iphlen);
/*
* Strip IP options, if any... | 12,169 |
qemu | 5e6b701aba8689a336297dda047bf760ffc05291 | 1 | static int con_init(struct XenDevice *xendev)
{
struct XenConsole *con = container_of(xendev, struct XenConsole, xendev);
char *type, *dom;
/* setup */
dom = xs_get_domain_path(xenstore, con->xendev.dom);
snprintf(con->console, sizeof(con->console), "%s/console", dom);
free(dom);
... | 12,170 |
FFmpeg | 01ecb7172b684f1c4b3e748f95c5a9a494ca36ec | 1 | static av_unused FFPsyWindowInfo psy_3gpp_window(FFPsyContext *ctx,
const int16_t *audio,
const int16_t *la,
int channel, int prev_type)
{
int i, j;
int br ... | 12,171 |
FFmpeg | 2ef0f392711445e173a56b2c073dedb021ae3783 | 1 | static int rac_get_model_sym(RangeCoder *c, Model *m)
{
int prob, prob2, helper, val;
int end, end2;
prob = 0;
prob2 = c->range;
c->range >>= MODEL_SCALE;
val = 0;
end = m->num_syms >> 1;
end2 = m->num_syms;
do {
helper = m->freqs[e... | 12,172 |
FFmpeg | af09be4f4b2f87e71a3396f54c24a166092ec8e3 | 1 | static int dvbsub_display_end_segment(AVCodecContext *avctx, const uint8_t *buf,
int buf_size, AVSubtitle *sub)
{
DVBSubContext *ctx = avctx->priv_data;
DVBSubDisplayDefinition *display_def = ctx->display_definition;
DVBSubRegion *region;
DVBSubRegionDispl... | 12,173 |
qemu | 967b75230b9720ea2b3ae49f38f8287026125f9f | 1 | static void pnv_chip_realize(DeviceState *dev, Error **errp)
{
PnvChip *chip = PNV_CHIP(dev);
Error *error = NULL;
PnvChipClass *pcc = PNV_CHIP_GET_CLASS(chip);
char *typename = pnv_core_typename(pcc->cpu_model);
size_t typesize = object_type_get_instance_size(typename);
int i, core_hwid;
if... | 12,174 |
qemu | 393c13b940be8f2e5b126cd9f442c12e7ecb4cac | 1 | static void bt_l2cap_sdp_close_ch(void *opaque)
{
struct bt_l2cap_sdp_state_s *sdp = opaque;
int i;
for (i = 0; i < sdp->services; i ++) {
g_free(sdp->service_list[i].attribute_list->pair);
g_free(sdp->service_list[i].attribute_list);
g_free(sdp->service_list[i].uuid);
... | 12,175 |
qemu | e0e2d644096c79a71099b176d08f465f6803a8b1 | 1 | static uint16_t vring_used_idx(VirtQueue *vq)
{
VRingMemoryRegionCaches *caches = atomic_rcu_read(&vq->vring.caches);
hwaddr pa = offsetof(VRingUsed, idx);
return virtio_lduw_phys_cached(vq->vdev, &caches->used, pa);
}
| 12,176 |
FFmpeg | 4691a77db4672026d62d524fd292fb17db6514b4 | 1 | static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple){
MpegEncContext * const s = &h->s;
const int mb_x= s->mb_x;
const int mb_y= s->mb_y;
const int mb_xy= mb_x + mb_y*s->mb_stride;
const int mb_type= s->current_picture.mb_type[mb_xy];
uint8_t *dest_y, *dest_cb, *... | 12,177 |
qemu | 8ccccff9dd7ba24c7a78861172e8dc6b07f1c392 | 1 | static void spapr_rtc_class_init(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
dc->realize = spapr_rtc_realize;
dc->vmsd = &vmstate_spapr_rtc;
spapr_rtas_register(RTAS_GET_TIME_OF_DAY, "get-time-of-day",
rtas_get_time_of_day);
spapr_rtas_regi... | 12,178 |
FFmpeg | 84c202cc37024bd78261e4222e46631ea73c48dd | 1 | static int read_len_table(uint8_t *dst, GetBitContext *gb){
int i, val, repeat;
for(i=0; i<256;){
repeat= get_bits(gb, 3);
val = get_bits(gb, 5);
if(repeat==0)
repeat= get_bits(gb, 8);
//printf("%d %d\n", val, repeat);
if(i+repeat > 256) {
av_... | 12,179 |
qemu | 857d4f46c31d2f4d57d2f0fad9dfb584262bf9b9 | 1 | static int coroutine_fn bdrv_co_do_write_zeroes(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, BdrvRequestFlags flags)
{
BlockDriver *drv = bs->drv;
QEMUIOVector qiov;
struct iovec iov = {0};
int ret = 0;
int max_write_zeroes = bs->bl.max_write_zeroes ?
... | 12,180 |
FFmpeg | 357f2316a08478a4442e8051978c7b161e10281c | 1 | void ff_ivi_inverse_haar_4x4(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags)
{
int i, shift, sp1, sp2;
const int32_t *src;
int32_t *dst;
int tmp[16];
int t0, t1, t2, t3, t4;
/* apply the InvHaar4 to all columns */
#defin... | 12,181 |
FFmpeg | 1e5cfad57e88d168f50794e1523abfa477ad9aed | 1 | static int submit_packet(PerThreadContext *p, AVPacket *avpkt)
{
FrameThreadContext *fctx = p->parent;
PerThreadContext *prev_thread = fctx->prev_thread;
const AVCodec *codec = p->avctx->codec;
if (!avpkt->size && !(codec->capabilities & AV_CODEC_CAP_DELAY))
return 0;
pthread_mute... | 12,183 |
FFmpeg | 6665938ca8b7ad8b7ec77c23e611bb8224e88a90 | 0 | static int ty_read_packet(AVFormatContext *s, AVPacket *pkt)
{
TYDemuxContext *ty = s->priv_data;
AVIOContext *pb = s->pb;
TyRecHdr *rec;
int64_t rec_size = 0;
int ret = 0;
if (avio_feof(pb))
return AVERROR_EOF;
while (ret <= 0) {
if (ty->first_chunk || ty->cur_... | 12,184 |
FFmpeg | 96d0494123a05fb78a0fd3f03b0b5aaefc170b1c | 0 | static int lag_decode_frame(AVCodecContext *avctx,
void *data, int *data_size, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
LagarithContext *l = avctx->priv_data;
AVFrame *const p = &l->picture;
uint8_t frametype = 0;
uint32... | 12,185 |
FFmpeg | 470de55aa17cb933a21f7e4c4015202eaba7277f | 0 | static inline int check_for_slice(AVSContext *h) {
GetBitContext *gb = &h->s.gb;
int align;
if(h->mbx)
return 0;
align = (-get_bits_count(gb)) & 7;
/* check for stuffing byte */
if(!align && (show_bits(gb,8) == 0x80))
get_bits(gb,8);
if((show_bits_long(gb,24+align)... | 12,186 |
FFmpeg | c51c08e0e70c186971385bdbb225f69edd4e3375 | 0 | static int decode_display_orientation(H264Context *h)
{
h->sei_display_orientation_present = !get_bits1(&h->gb);
if (h->sei_display_orientation_present) {
h->sei_hflip = get_bits1(&h->gb); // hor_flip
h->sei_vflip = get_bits1(&h->gb); // ver_flip
h->sei_anticlockwise_ro... | 12,187 |
FFmpeg | b12d92efd6c0d48665383a9baecc13e7ebbd8a22 | 1 | static int init_image(TiffContext *s)
{
int i, ret;
uint32_t *pal;
switch (s->bpp * 10 + s->bppcount) {
case 11:
if (!s->palette_is_set) {
s->avctx->pix_fmt = AV_PIX_FMT_MONOBLACK;
break;
}
case 21:
case 41:
case 81:
s->avctx->pi... | 12,188 |
qemu | f9530c32420fff941b7bc8bb5d90310eecab5a96 | 1 | static int handle_sigp(S390CPU *cpu, struct kvm_run *run, uint8_t ipa1)
{
CPUS390XState *env = &cpu->env;
const uint8_t r1 = ipa1 >> 4;
const uint8_t r3 = ipa1 & 0x0f;
int ret;
uint8_t order;
uint64_t *status_reg;
uint64_t param;
S390CPU *dst_cpu = NULL;
cpu_synchronize_s... | 12,189 |
FFmpeg | 719dbe86ea0e85b3b89f492c69e10bb0e733bcbb | 0 | static int h261_decode_gob_header(H261Context *h)
{
unsigned int val;
MpegEncContext *const s = &h->s;
if (!h->gob_start_code_skipped) {
/* Check for GOB Start Code */
val = show_bits(&s->gb, 15);
if (val)
return -1;
/* We have a GBSC */
skip... | 12,191 |
FFmpeg | 38a4be3fa7a7bb83f0a553577427e916a7bda390 | 0 | static int has_decode_delay_been_guessed(AVStream *st)
{
return st->codec->codec_id != CODEC_ID_H264 ||
st->codec_info_nb_frames >= 6 + st->codec->has_b_frames;
}
| 12,193 |
FFmpeg | e403e4bdbea08af0c4a068eb560b577d1b64cf7a | 1 | static int64_t scene_sad8(FrameRateContext *s, uint8_t *p1, int p1_linesize, uint8_t* p2, int p2_linesize, int height)
{
int64_t sad;
int x, y;
for (sad = y = 0; y < height; y += 8) {
for (x = 0; x < p1_linesize; x += 8) {
sad += s->sad(p1 + y * p1_linesize + x,
... | 12,195 |
qemu | 5df6a1855b62dc653515d919e48c5b6f00c48f32 | 1 | e1000_link_up(E1000State *s)
{
s->mac_reg[STATUS] |= E1000_STATUS_LU;
s->phy_reg[PHY_STATUS] |= MII_SR_LINK_STATUS;
} | 12,196 |
qemu | f3c7d0389fe8a2792fd4c1cf151b885de03c8f62 | 1 | static void omap_gp_timer_clk_setup(struct omap_gp_timer_s *timer)
{
omap_clk_adduser(timer->clk,
qemu_allocate_irqs(omap_gp_timer_clk_update, timer, 1)[0]);
timer->rate = omap_clk_getrate(timer->clk);
}
| 12,197 |
FFmpeg | f78cd0c243b9149c7f604ecf1006d78e344aa6ca | 1 | static inline void FUNC(idctRowCondDC)(DCTELEM *row)
{
int a0, a1, a2, a3, b0, b1, b2, b3;
#if HAVE_FAST_64BIT
#define ROW0_MASK (0xffffLL << 48 * HAVE_BIGENDIAN)
if (((((uint64_t *)row)[0] & ~ROW0_MASK) | ((uint64_t *)row)[1]) == 0) {
uint64_t temp = (row[0] << DC_SHIFT) & 0xffff;
temp... | 12,198 |
qemu | ad739706bbadee49f164b4b7f4c7f5454ddf83cd | 1 | Object *user_creatable_add_type(const char *type, const char *id,
const QDict *qdict,
Visitor *v, Error **errp)
{
Object *obj;
ObjectClass *klass;
const QDictEntry *e;
Error *local_err = NULL;
klass = object_class_by_name(type... | 12,199 |
FFmpeg | 8696f254444c2ec24daa570f26feadbd3df911e4 | 1 | static int get_slice_offset(AVCodecContext *avctx, const uint8_t *buf, int n)
{
if(avctx->slice_count) return avctx->slice_offset[n];
else return AV_RL32(buf + n*8 - 4) == 1 ? AV_RL32(buf + n*8) : AV_RB32(buf + n*8);
}
| 12,201 |
FFmpeg | 9c8922acadb5187c274250d6cde653b7bad2559e | 1 | static int tls_read(URLContext *h, uint8_t *buf, int size)
{
TLSContext *c = h->priv_data;
size_t processed = 0;
int ret = SSLRead(c->ssl_context, buf, size, &processed);
ret = map_ssl_error(ret, processed);
if (ret > 0)
return ret;
if (ret == 0)
return AVERROR_EOF;
... | 12,202 |
qemu | 689ed13e73bdb5a5ca3366524475e3065fae854a | 1 | static void test_io_channel_tls(const void *opaque)
{
struct QIOChannelTLSTestData *data =
(struct QIOChannelTLSTestData *)opaque;
QCryptoTLSCreds *clientCreds;
QCryptoTLSCreds *serverCreds;
QIOChannelTLS *clientChanTLS;
QIOChannelTLS *serverChanTLS;
QIOChannelSocket *clientChanS... | 12,204 |
FFmpeg | 4df8bdeef3c8042659147daafad34bd76ad09096 | 1 | int ff_wma_run_level_decode(AVCodecContext* avctx, GetBitContext* gb,
VLC *vlc,
const uint16_t *level_table, const uint16_t *run_table,
int version, WMACoef *ptr, int offset,
int num_coefs, int block_len,... | 12,206 |
qemu | a89d89d3e65800fa4a8e00de7af0ea8272bef779 | 1 | static int qemu_rbd_snap_remove(BlockDriverState *bs,
const char *snapshot_name)
{
BDRVRBDState *s = bs->opaque;
int r;
r = rbd_snap_remove(s->image, snapshot_name);
return r;
}
| 12,207 |
FFmpeg | 2cbe6bac0337939f023bd1c37a9c455e6d535f3a | 1 | static void blend_frames_c(BLEND_FUNC_PARAMS)
{
int line, pixel;
for (line = 0; line < height; line++) {
for (pixel = 0; pixel < width; pixel++) {
// integer version of (src1 * factor1) + (src2 * factor2) + 0.5
// 0.5 is for rounding
// 128 is the integer repre... | 12,208 |
qemu | 40ff6d7e8dceca227e7f8a3e8e0d58b2c66d19b4 | 1 | int tcp_start_incoming_migration(const char *host_port)
{
struct sockaddr_in addr;
int val;
int s;
if (parse_host_port(&addr, host_port) < 0) {
fprintf(stderr, "invalid host/port combination: %s\n", host_port);
return -EINVAL;
}
s = socket(PF_INET, SOCK_STREAM, 0);
... | 12,209 |
qemu | cb45de6798956975c4b13a6233f7a00d2239b61a | 1 | opts_type_size(Visitor *v, uint64_t *obj, const char *name, Error **errp)
{
OptsVisitor *ov = DO_UPCAST(OptsVisitor, visitor, v);
const QemuOpt *opt;
int64_t val;
char *endptr;
opt = lookup_scalar(ov, name, errp);
if (!opt) {
return;
}
val = strtosz_suffix(opt->str ... | 12,210 |
qemu | 000cacf6f9dce7d71f88aadf7e9b3688eaa3ab69 | 1 | static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r)
{
int b1, op1_offset, op2_offset, is_xmm, val, ot;
int modrm, mod, rm, reg, reg_addr, offset_addr;
void *sse_op2;
b &= 0xff;
if (s->prefix & PREFIX_DATA)
b1 = 1;
else if (s->prefix & PREFIX_REPZ)
... | 12,213 |
FFmpeg | c23acbaed40101c677dfcfbbfe0d2c230a8e8f44 | 1 | static void ff_jref_idct1_add(uint8_t *dest, int line_size, DCTELEM *block)
{
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
dest[0] = cm[dest[0] + ((block[0] + 4)>>3)];
}
| 12,214 |
FFmpeg | 2254b559cbcfc0418135f09add37c0a5866b1981 | 1 | static void hScale_altivec_real(SwsContext *c, int16_t *dst, int dstW,
const uint8_t *src, const int16_t *filter,
const int16_t *filterPos, int filterSize)
{
register int i;
DECLARE_ALIGNED(16, int, tempo)[4];
if (filterSize % 4) {
... | 12,217 |
FFmpeg | 29b0d94b43ac960cb442049a5d737a3386ff0337 | 1 | static int dfa_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
DfaContext *s = avctx->priv_data;
const uint8_t *buf = avpkt->data;
const uint8_t *buf_end = avpkt->data + avpkt->size;
const uint8_t *tmp_buf;... | 12,218 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.