project stringclasses 2
values | commit_id stringlengths 40 40 | target int64 0 1 | func stringlengths 26 142k | idx int64 0 27.3k |
|---|---|---|---|---|
qemu | ddf21908961073199f3d186204da4810f2ea150b | 0 | static void channel_event(int event, SpiceChannelEventInfo *info)
{
SpiceServerInfo *server = g_malloc0(sizeof(*server));
SpiceChannel *client = g_malloc0(sizeof(*client));
server->base = g_malloc0(sizeof(*server->base));
client->base = g_malloc0(sizeof(*client->base));
/*
* Spice serv... | 17,978 |
qemu | 21a933ea33c820515f331c162c9f7053ca6f4129 | 0 | static void qemu_chr_parse_spice_vmc(QemuOpts *opts, ChardevBackend *backend,
Error **errp)
{
const char *name = qemu_opt_get(opts, "name");
if (name == NULL) {
error_setg(errp, "chardev: spice channel: no name given");
return;
}
backend->u.... | 17,979 |
qemu | 44701ab71ad854e6be567a6294f4665f36651076 | 0 | void msix_unuse_all_vectors(PCIDevice *dev)
{
if (!(dev->cap_present & QEMU_PCI_CAP_MSIX))
return;
msix_free_irq_entries(dev);
}
| 17,980 |
qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | 0 | static void pc_system_flash_init(MemoryRegion *rom_memory)
{
int unit;
DriveInfo *pflash_drv;
BlockDriverState *bdrv;
int64_t size;
char *fatal_errmsg = NULL;
hwaddr phys_addr = 0x100000000ULL;
int sector_bits, sector_size;
pflash_t *system_flash;
MemoryRegion *flash_mem;
... | 17,982 |
FFmpeg | 6956b048d8198dce5126c8942dece21cfb1a7978 | 1 | static int load_textfile(AVFilterContext *ctx)
{
DrawTextContext *s = ctx->priv;
int err;
uint8_t *textbuf;
size_t textbuf_size;
if ((err = av_file_map(s->textfile, &textbuf, &textbuf_size, 0, ctx)) < 0) {
av_log(ctx, AV_LOG_ERROR,
"The text file '%s' could not be re... | 17,983 |
FFmpeg | 9fe73b0147d329bb03ea57c201dc99317cbf3c29 | 1 | static int ftp_send_command(FTPContext *s, const char *command,
const int response_codes[], char **response)
{
int err;
ff_dlog(s, "%s", command);
if (response)
*response = NULL;
if ((err = ffurl_write(s->conn_control, command, strlen(command))) < 0)
return er... | 17,985 |
qemu | ada24f846650ad2e64c92178d233e380db141427 | 1 | static void sun4c_hw_init(const struct 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, const cha... | 17,987 |
qemu | 8929fc3a55f33a103adddf9cfd010bcf2b255c7d | 1 | static void pflash_cfi01_realize(DeviceState *dev, Error **errp)
{
pflash_t *pfl = CFI_PFLASH01(dev);
uint64_t total_len;
int ret;
uint64_t blocks_per_device, device_len;
int num_devices;
Error *local_err = NULL;
total_len = pfl->sector_len * pfl->nb_blocs;
/* These are only used to expo... | 17,988 |
FFmpeg | f6774f905fb3cfdc319523ac640be30b14c1bc55 | 1 | static int vaapi_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
{
struct MpegEncContext * const s = avctx->priv_data;
struct vaapi_context * const vactx = avctx->hwaccel_context;
VAPictureParameterBufferMPEG2 *pic_param;
VAIQMatrixBufferMPEG2 *iq_... | 17,990 |
qemu | 8be7e7e4c72c048b90e3482557954a24bba43ba7 | 1 | int qemu_config_parse(FILE *fp, QemuOptsList **lists, const char *fname)
{
char line[1024], group[64], id[64], arg[64], value[1024];
Location loc;
QemuOptsList *list = NULL;
QemuOpts *opts = NULL;
int res = -1, lno = 0;
loc_push_none(&loc);
while (fgets(line, sizeof(line), fp) != N... | 17,991 |
FFmpeg | 8dc72eeaf647736c287b59a3856a11904bedd58b | 1 | static int udp_socket_create(UDPContext *s, struct sockaddr_storage *addr,
socklen_t *addr_len, const char *localaddr)
{
int udp_fd = -1;
struct addrinfo *res0 = NULL, *res = NULL;
int family = AF_UNSPEC;
if (((struct sockaddr *) &s->dest_addr)->sa_family)
f... | 17,992 |
FFmpeg | 8b2fce0d3f5a56c40c28899c9237210ca8f9cf75 | 1 | static inline void RENAME(yuv2yuv1)(int16_t *lumSrc, int16_t *chrSrc,
uint8_t *dest, uint8_t *uDest, uint8_t *vDest, long dstW, long chrDstW)
{
#ifdef HAVE_MMX
if (uDest)
{
asm volatile(
YSCALEYUV2YV121
:: "r" (chrSrc + chrDstW), "r" (u... | 17,994 |
qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | 1 | static ssize_t qsb_grow(QEMUSizedBuffer *qsb, size_t new_size)
{
size_t needed_chunks, i;
if (qsb->size < new_size) {
struct iovec *new_iov;
size_t size_diff = new_size - qsb->size;
size_t chunk_size = (size_diff > QSB_MAX_CHUNK_SIZE)
? QSB_MAX_CHUNK... | 17,995 |
qemu | ee640c625e190a0c0e6b8966adc0e4720fb75200 | 1 | vmxnet3_init_msix(VMXNET3State *s)
{
PCIDevice *d = PCI_DEVICE(s);
int res = msix_init(d, VMXNET3_MAX_INTRS,
&s->msix_bar,
VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_TABLE,
&s->msix_bar,
VMXNET3_MSIX_BAR_IDX, VMXN... | 17,996 |
FFmpeg | ae2ed20b5912b00866631e78049f165deb9f2fb2 | 0 | static int build_feed_streams(void)
{
FFServerStream *stream, *feed;
int i;
/* gather all streams */
for(stream = config.first_stream; stream; stream = stream->next) {
feed = stream->feed;
if (!feed)
continue;
if (stream->is_feed) {
for(i=0;i... | 17,997 |
FFmpeg | c619ff6daf93a8f3c03decf2d3345d2474c3db91 | 0 | static always_inline void dv_encode_ac(EncBlockInfo* bi, PutBitContext* pb_pool,
int pb_size)
{
int run;
int bits_left;
PutBitContext* pb = pb_pool;
int size = bi->partial_bit_count;
uint32_t vlc = bi->partial_bit_buffer;
bi->partial_bit_coun... | 17,999 |
qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | 0 | static uint64_t mipsnet_ioport_read(void *opaque, target_phys_addr_t addr,
unsigned int size)
{
MIPSnetState *s = opaque;
int ret = 0;
addr &= 0x3f;
switch (addr) {
case MIPSNET_DEV_ID:
ret = be32_to_cpu(0x4d495053); /* MIPS */
break;
cas... | 18,000 |
FFmpeg | 2540d884f3fd7cfac503e048112098967be2569a | 0 | static uint32_t get_generic_seed(void)
{
uint8_t tmp[120];
struct AVSHA *sha = (void*)tmp;
clock_t last_t = 0;
static uint64_t i = 0;
static uint32_t buffer[512] = { 0 };
unsigned char digest[20];
uint64_t last_i = i;
av_assert0(sizeof(tmp) >= av_sha_size);
if(TEST){
... | 18,001 |
qemu | 9344e5f554690d5e379b5426daebadef7c87baf5 | 0 | int nbd_receive_negotiate(QIOChannel *ioc, const char *name, uint32_t *flags,
off_t *size, Error **errp)
{
char buf[256];
uint64_t magic, s;
int rc;
TRACE("Receiving negotiation.");
rc = -EINVAL;
if (read_sync(ioc, buf, 8) != 8) {
error_setg(errp,... | 18,002 |
qemu | 42a268c241183877192c376d03bd9b6d527407c7 | 0 | static inline void gen_op_evsrws(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2)
{
TCGv_i32 t0;
int l1, l2;
l1 = gen_new_label();
l2 = gen_new_label();
t0 = tcg_temp_local_new_i32();
/* No error here: 6 bits are used */
tcg_gen_andi_i32(t0, arg2, 0x3F);
tcg_gen_brcondi_i32(TCG_CON... | 18,004 |
qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | 0 | void hd_geometry_guess(BlockDriverState *bs,
uint32_t *pcyls, uint32_t *pheads, uint32_t *psecs,
int *ptrans)
{
int cylinders, heads, secs, translation;
if (guess_disk_lchs(bs, &cylinders, &heads, &secs) < 0) {
/* no LCHS guess: use a standard physic... | 18,006 |
qemu | aa6c6ae843cbdc251224bc6170d2663ac929b04f | 0 | static MemoryRegion *acpi_add_rom_blob(AcpiBuildState *build_state,
GArray *blob, const char *name,
uint64_t max_size)
{
return rom_add_blob(name, blob->data, acpi_data_len(blob), max_size, -1,
name, virt_acpi... | 18,007 |
qemu | 56fe6408d71264ef35049e24213f7003ade5bc14 | 0 | static int versatile_pci_host_init(PCIDevice *d)
{
pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_XILINX);
/* Both boards have the same device ID. Oh well. */
pci_config_set_device_id(d->config, PCI_DEVICE_ID_XILINX_XC2VP30);
pci_set_word(d->config + PCI_STATUS,
PCI_STATUS_66MHZ | PCI_STAT... | 18,008 |
qemu | 1687a089f103f9b7a1b4a1555068054cb46ee9e9 | 0 | vcard_emul_replay_insertion_events(void)
{
VReaderListEntry *current_entry;
VReaderListEntry *next_entry = NULL;
VReaderList *list = vreader_get_reader_list();
for (current_entry = vreader_list_get_first(list); current_entry;
current_entry = next_entry) {
VReader *vreader = ... | 18,009 |
qemu | 85a040e5485413333da4fcf98bc8b28c92fa623f | 0 | static int read_config(BDRVBlkdebugState *s, const char *filename, Error **errp)
{
FILE *f;
int ret;
struct add_rule_data d;
f = fopen(filename, "r");
if (f == NULL) {
error_setg_errno(errp, errno, "Could not read blkdebug config file");
return -errno;
}
ret = q... | 18,010 |
qemu | 847ce6a185f9ccbc089ef24a6c402b8c99113341 | 0 | static int vnc_update_client(VncState *vs, int has_dirty)
{
if (vs->need_update && vs->csock != -1) {
VncDisplay *vd = vs->vd;
int y;
int n_rectangles;
int saved_offset;
int n;
if (vs->output.offset && !vs->audio_cap && !vs->force_update)
/* ker... | 18,011 |
FFmpeg | eca38864a6ce5053e463b8d3fc22b22bc9a49578 | 0 | int ff_vorbiscomment_write(uint8_t **p, AVDictionary **m,
const char *vendor_string)
{
bytestream_put_le32(p, strlen(vendor_string));
bytestream_put_buffer(p, vendor_string, strlen(vendor_string));
if (*m) {
int count = av_dict_count(*m);
AVDictionaryEntry *... | 18,012 |
qemu | 568c73a4783cd981e9aa6de4f15dcda7829643ad | 0 | void qemu_input_event_send_key_qcode(QemuConsole *src, QKeyCode q, bool down)
{
KeyValue *key = g_new0(KeyValue, 1);
key->kind = KEY_VALUE_KIND_QCODE;
key->qcode = q;
qemu_input_event_send_key(src, key, down);
}
| 18,013 |
qemu | a7812ae412311d7d47f8aa85656faadac9d64b56 | 0 | static void t_gen_lz_i32(TCGv d, TCGv x)
{
TCGv y, m, n;
y = tcg_temp_new(TCG_TYPE_I32);
m = tcg_temp_new(TCG_TYPE_I32);
n = tcg_temp_new(TCG_TYPE_I32);
/* y = -(x >> 16) */
tcg_gen_shri_i32(y, x, 16);
tcg_gen_neg_i32(y, y);
/* m = (y >> 16) & 16 */
tcg_gen_sari_i32(m, y, 16);
tcg_gen_andi_... | 18,014 |
qemu | 4bb7b0daf8ea34bcc582642d35a2e4902f7841db | 0 | static QVirtIOSCSI *qvirtio_scsi_pci_init(int slot)
{
QVirtIOSCSI *vs;
QVirtioPCIDevice *dev;
void *addr;
int i;
vs = g_new0(QVirtIOSCSI, 1);
vs->alloc = pc_alloc_init();
vs->bus = qpci_init_pc();
dev = qvirtio_pci_device_find(vs->bus, QVIRTIO_SCSI_DEVICE_ID);
vs->dev =... | 18,016 |
qemu | 2709f263952bab66fc8f971c04d151216b177336 | 0 | static MachineClass *machine_parse(const char *name)
{
MachineClass *mc = NULL;
GSList *el, *machines = object_class_get_list(TYPE_MACHINE, false);
if (name) {
mc = find_machine(name);
}
if (mc) {
return mc;
}
if (name && !is_help_option(name)) {
error_re... | 18,017 |
qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | 0 | M48t59State *m48t59_init(qemu_irq IRQ, target_phys_addr_t mem_base,
uint32_t io_base, uint16_t size, int model)
{
DeviceState *dev;
SysBusDevice *s;
M48t59SysBusState *d;
M48t59State *state;
dev = qdev_create(NULL, "m48t59");
qdev_prop_set_uint32(dev, "model", ... | 18,018 |
qemu | 9a4c0e220d8a4f82b5665d0ee95ef94d8e1509d5 | 0 | static void virtio_gpu_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
{
VirtIOGPUPCI *vgpu = VIRTIO_GPU_PCI(vpci_dev);
VirtIOGPU *g = &vgpu->vdev;
DeviceState *vdev = DEVICE(&vgpu->vdev);
int i;
qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
/* force virtio-1.0 */
vpci_dev->f... | 18,019 |
qemu | 51dcdbd319f8d46834d8155defc8d384a9958a73 | 0 | void program_interrupt(CPUS390XState *env, uint32_t code, int ilen)
{
S390CPU *cpu = s390_env_get_cpu(env);
qemu_log_mask(CPU_LOG_INT, "program interrupt at %#" PRIx64 "\n",
env->psw.addr);
if (kvm_enabled()) {
kvm_s390_program_interrupt(cpu, code);
} else if (tcg_en... | 18,021 |
qemu | 856d72454f03aea26fd61c728762ef9cd1d71512 | 0 | static void address_space_update_ioeventfds(AddressSpace *as)
{
FlatView *view;
FlatRange *fr;
unsigned ioeventfd_nb = 0;
MemoryRegionIoeventfd *ioeventfds = NULL;
AddrRange tmp;
unsigned i;
view = as->current_map;
FOR_EACH_FLAT_RANGE(fr, view) {
for (i = 0; i < fr->m... | 18,022 |
FFmpeg | 0c22311b56e66115675c4a96e4c78547886a4171 | 0 | static int configure_filters(AVInputStream *ist, AVOutputStream *ost)
{
AVFilterContext *curr_filter;
/** filter graph containing all filters including input & output */
AVCodecContext *codec = ost->st->codec;
AVCodecContext *icodec = ist->st->codec;
char args[255];
filt_graph_all = av_... | 18,023 |
qemu | ca6b6e1e68ac44b2e8895da10dd1c80dc03d08b7 | 0 | void hmp_pcie_aer_inject_error(Monitor *mon, const QDict *qdict)
{
QObject *data;
int devfn;
if (do_pcie_aer_inject_error(mon, qdict, &data) < 0) {
return;
}
assert(qobject_type(data) == QTYPE_QDICT);
qdict = qobject_to_qdict(data);
devfn = (int)qdict_get_int(qdict, "d... | 18,024 |
qemu | c18ad9a54b75495ce61e8b28d353f8eec51768fc | 0 | static void spapr_reallocate_hpt(sPAPRMachineState *spapr, int shift,
Error **errp)
{
long rc;
/* Clean up any HPT info from a previous boot */
g_free(spapr->htab);
spapr->htab = NULL;
spapr->htab_shift = 0;
close_htab_fd(spapr);
rc = kvmppc_rese... | 18,025 |
FFmpeg | f929ab0569ff31ed5a59b0b0adb7ce09df3fca39 | 0 | static av_cold int atrac3_decode_init(AVCodecContext *avctx)
{
int i, ret;
int version, delay, samples_per_frame, frame_factor;
const uint8_t *edata_ptr = avctx->extradata;
ATRAC3Context *q = avctx->priv_data;
if (avctx->channels <= 0 || avctx->channels > 2) {
av_log(avctx, AV_LOG_E... | 18,026 |
FFmpeg | f1cdc01e7208f9e05cd92127003b3b494ec10cfb | 0 | static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, enum AVMediaType type, int source_index)
{
OutputStream *ost;
AVStream *st = avformat_new_stream(oc, NULL);
int idx = oc->nb_streams - 1, ret = 0;
const char *bsfs = NULL, *time_base = NULL;
char *next, *codec_... | 18,027 |
FFmpeg | fe99025b167634ceca4bc8118e2b9eeda5769d21 | 1 | static int flic_decode_frame_15_16BPP(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size)
{
/* Note, the only difference between the 15Bpp and 16Bpp */
/* Format is the pixel format, the packets are proce... | 18,029 |
qemu | 08e73c48b053566bfe0c994f154f73991cd0ff0e | 1 | static void *qemu_tcg_rr_cpu_thread_fn(void *arg)
{
CPUState *cpu = arg;
rcu_register_thread();
qemu_thread_get_self(cpu->thread);
CPU_FOREACH(cpu) {
cpu->thread_id = qemu_get_thread_id();
cpu->created = true;
cpu->can_do_io = 1;
}
qemu_cond_signal(&qemu_... | 18,030 |
FFmpeg | ac658be5db5baa01546715994fbd193a855cbc73 | 1 | static int decode_slice_header(H264Context *h){
MpegEncContext * const s = &h->s;
int first_mb_in_slice, pps_id;
int num_ref_idx_active_override_flag;
static const uint8_t slice_type_map[5]= {P_TYPE, B_TYPE, I_TYPE, SP_TYPE, SI_TYPE};
int slice_type;
int default_ref_list_done = 0;
s... | 18,031 |
FFmpeg | df84ac2e7dbf1d4dcb58706c2038668ac892530e | 1 | static int output_packet(AVInputStream *ist, int ist_index,
AVOutputStream **ost_table, int nb_ostreams,
const AVPacket *pkt)
{
AVFormatContext *os;
AVOutputStream *ost;
uint8_t *ptr;
int len, ret, i;
uint8_t *data_buf;
int data_size, go... | 18,033 |
FFmpeg | 13a099799e89a76eb921ca452e1b04a7a28a9855 | 0 | static void yuv2yuv1_c(SwsContext *c, const int16_t *lumSrc,
const int16_t *chrUSrc, const int16_t *chrVSrc,
const int16_t *alpSrc,
uint8_t *dest, uint8_t *uDest, uint8_t *vDest,
uint8_t *aDest, int dstW, int chrDstW)
{
... | 18,035 |
FFmpeg | 229843aa359ae0c9519977d7fa952688db63f559 | 0 | static int teletext_close_decoder(AVCodecContext *avctx)
{
TeletextContext *ctx = avctx->priv_data;
av_dlog(avctx, "lines_total=%u\n", ctx->lines_processed);
while (ctx->nb_pages)
subtitle_rect_free(&ctx->pages[--ctx->nb_pages].sub_rect);
av_freep(&ctx->pages);
vbi_decoder_delete(... | 18,036 |
qemu | 17e909738da65d315d462839a05628580b96f8c1 | 0 | MigrationState *tcp_start_outgoing_migration(const char *host_port,
int64_t bandwidth_limit,
int async)
{
struct sockaddr_in addr;
FdMigrationState *s;
int ret;
if (parse_host_port(&addr, host_port) < 0)
return NULL;
s = qemu_mallocz(sizeof(*s));
if (s =... | 18,037 |
qemu | 2c62f08ddbf3fa80dc7202eb9a2ea60ae44e2cc5 | 0 | static void tcx_screen_dump(void *opaque, const char *filename, bool cswitch,
Error **errp)
{
TCXState *s = opaque;
FILE *f;
uint8_t *d, *d1, v;
int ret, y, x;
f = fopen(filename, "wb");
if (!f) {
error_setg(errp, "failed to open file '%s': %s", fil... | 18,039 |
qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | 0 | static void icp_pic_write(void *opaque, target_phys_addr_t offset,
uint64_t value, unsigned size)
{
icp_pic_state *s = (icp_pic_state *)opaque;
switch (offset >> 2) {
case 2: /* IRQ_ENABLESET */
s->irq_enabled |= value;
break;
case 3: /* IRQ_ENABLECLR ... | 18,040 |
qemu | bb5fc20f7c1c65e95030da3629dd0d7a0cce38cd | 0 | static void monitor_readline_cb(void *opaque, const char *input)
{
pstrcpy(monitor_readline_buf, monitor_readline_buf_size, input);
monitor_readline_started = 0;
}
| 18,041 |
FFmpeg | c8dcff0cdb17d0aa03ac729eba12d1a20f1f59c8 | 0 | static void fill_picture_parameters(const AVCodecContext *avctx, AVDXVAContext *ctx, const H264Context *h,
DXVA_PicParams_H264 *pp)
{
const H264Picture *current_picture = h->cur_pic_ptr;
const SPS *sps = h->ps.sps;
const PPS *pps = h->ps.pps;
int i, j;
me... | 18,042 |
qemu | bac45d5147fbe832428944610c70484b18539292 | 0 | static int reg_irqs(CPUS390XState *env, S390PCIBusDevice *pbdev, ZpciFib fib)
{
int ret, len;
ret = css_register_io_adapter(S390_PCIPT_ADAPTER,
FIB_DATA_ISC(ldl_p(&fib.data)), true, false,
&pbdev->routes.adapter.adapter_id);
assert(... | 18,043 |
qemu | 46c5874e9cd752ed8ded31af03472edd8fc3efc1 | 0 | static void finish_write_pci_config(sPAPREnvironment *spapr, uint64_t buid,
uint32_t addr, uint32_t size,
uint32_t val, target_ulong rets)
{
PCIDevice *pci_dev;
if ((size != 1) && (size != 2) && (size != 4)) {
/* access must... | 18,046 |
qemu | d1b935659b77ff8e9d4cb84e3f75679f634401f3 | 0 | static int mpc8544_load_device_tree(CPUPPCState *env,
target_phys_addr_t addr,
target_phys_addr_t ramsize,
target_phys_addr_t initrd_base,
target_phys_addr_t initrd_size,
... | 18,047 |
qemu | a0efbf16604770b9d805bcf210ec29942321134f | 0 | static void format_string(StringOutputVisitor *sov, Range *r, bool next,
bool human)
{
if (r->end - r->begin > 1) {
if (human) {
g_string_append_printf(sov->string, "0x%" PRIx64 "-0x%" PRIx64,
r->begin, r->end - 1);
} ... | 18,048 |
qemu | ddca7f86ac022289840e0200fd4050b2b58e9176 | 0 | static void v9fs_setattr(void *opaque)
{
int err = 0;
int32_t fid;
V9fsFidState *fidp;
size_t offset = 7;
V9fsIattr v9iattr;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
pdu_unmarshal(pdu, offset, "dI", &fid, &v9iattr);
fidp = get_fid(pdu, fid);
if (fidp == NULL) ... | 18,049 |
qemu | a7812ae412311d7d47f8aa85656faadac9d64b56 | 0 | static inline void iwmmxt_load_reg(TCGv var, int reg)
{
tcg_gen_ld_i64(var, cpu_env, offsetof(CPUState, iwmmxt.regs[reg]));
}
| 18,050 |
qemu | ce8c8b7bd8958fde291f7736016015864e7638a2 | 0 | static void process_command(GAState *s, QDict *req)
{
QObject *rsp = NULL;
int ret;
g_assert(req);
g_debug("processing command");
rsp = qmp_dispatch(QOBJECT(req));
if (rsp) {
ret = send_response(s, rsp);
if (ret) {
g_warning("error sending response: %s", s... | 18,051 |
qemu | 4eb938102b3d533e142de23e255e46da1326fc5a | 0 | static void qemu_file_set_error(QEMUFile *f, int ret)
{
if (f->last_error == 0) {
f->last_error = ret;
}
}
| 18,052 |
FFmpeg | c661cb6672af5ebcb900ec8766b24761bd2ab011 | 0 | int split_commandline(OptionParseContext *octx, int argc, char *argv[],
const OptionDef *options,
const OptionGroupDef *groups)
{
int optindex = 1;
/* perform system-dependent conversions for arguments list */
prepare_app_arguments(&argc, &argv);
in... | 18,053 |
qemu | 3feef8ad17af7307373b9e88b9d7ecb98eeb99da | 0 | static target_ulong h_get_term_char(CPUState *env, sPAPREnvironment *spapr,
target_ulong opcode, target_ulong *args)
{
target_ulong reg = args[0];
target_ulong *len = args + 0;
target_ulong *char0_7 = args + 1;
target_ulong *char8_15 = args + 2;
VIOsPAPRDev... | 18,054 |
qemu | 6acbe4c6f18e7de00481ff30574262b58526de45 | 0 | static void qdev_print_devinfo(ObjectClass *klass, void *opaque)
{
DeviceClass *dc;
bool *show_no_user = opaque;
dc = (DeviceClass *)object_class_dynamic_cast(klass, TYPE_DEVICE);
if (!dc || (show_no_user && !*show_no_user && dc->no_user)) {
return;
}
error_printf("name \"%... | 18,055 |
qemu | dfad9ec4e9f15344f300996ad8c6f3eaf699d195 | 0 | static void keyword_literal(void)
{
QObject *obj;
QBool *qbool;
QObject *null;
QString *str;
obj = qobject_from_json("true");
g_assert(obj != NULL);
g_assert(qobject_type(obj) == QTYPE_QBOOL);
qbool = qobject_to_qbool(obj);
g_assert(qbool_get_bool(qbool) == true);
... | 18,056 |
qemu | ffa48cf5ab719e1e181e51b87bc0f5d397b791fa | 0 | int audio_available(void)
{
#ifdef HAS_AUDIO
return 1;
#else
return 0;
#endif
}
| 18,057 |
qemu | b131c74a0e485b084ddaffc8214c8a19af492be7 | 0 | int kvm_irqchip_remove_irq_notifier(KVMState *s, EventNotifier *n, int virq)
{
return kvm_irqchip_remove_irqfd(s, event_notifier_get_fd(n), virq);
}
| 18,058 |
qemu | c056bc3f3464cfae1c94b7dd633d3ec13b13b655 | 0 | static void vapic_reset(DeviceState *dev)
{
VAPICROMState *s = VAPIC(dev);
if (s->state == VAPIC_ACTIVE) {
s->state = VAPIC_STANDBY;
}
vapic_enable_tpr_reporting(false);
}
| 18,059 |
qemu | b9bec74bcb16519a876ec21cd5277c526a9b512d | 0 | static int kvm_get_sregs(CPUState *env)
{
struct kvm_sregs sregs;
uint32_t hflags;
int bit, i, ret;
ret = kvm_vcpu_ioctl(env, KVM_GET_SREGS, &sregs);
if (ret < 0)
return ret;
/* There can only be one pending IRQ set in the bitmap at a time, so try
to find it and save ... | 18,060 |
qemu | f0495f56c9f4574140c392bdbad42721ba692d19 | 0 | static void tm_get(QEMUFile *f, struct tm *tm) {
tm->tm_sec = qemu_get_be16(f);
tm->tm_min = qemu_get_be16(f);
tm->tm_hour = qemu_get_be16(f);
tm->tm_mday = qemu_get_be16(f);
tm->tm_min = qemu_get_be16(f);
tm->tm_year = qemu_get_be16(f);
}
| 18,062 |
qemu | 03ce574442d2ee82f59a5232a24492ad80858d75 | 0 | int net_init_vhost_user(const NetClientOptions *opts, const char *name,
NetClientState *peer)
{
return net_vhost_user_init(peer, "vhost_user", 0, 0, 0);
}
| 18,063 |
qemu | 6e99c631f116221d169ea53953d91b8aa74d297a | 0 | static void net_socket_send(void *opaque)
{
NetSocketState *s = opaque;
int size, err;
unsigned l;
uint8_t buf1[NET_BUFSIZE];
const uint8_t *buf;
size = qemu_recv(s->fd, buf1, sizeof(buf1), 0);
if (size < 0) {
err = socket_error();
if (err != EWOULDBLOCK)
... | 18,065 |
qemu | 3dc6f8693694a649a9c83f1e2746565b47683923 | 0 | void spapr_tce_table_enable(sPAPRTCETable *tcet,
uint32_t page_shift, uint64_t bus_offset,
uint32_t nb_table)
{
if (tcet->nb_table) {
error_report("Warning: trying to enable already enabled TCE table");
return;
}
tcet->bus_off... | 18,066 |
qemu | 0266f2c733911ca3f70e009e3230c790c800e524 | 0 | static void lcd_refresh(void *opaque)
{
musicpal_lcd_state *s = opaque;
int x, y;
for (x = 0; x < 128; x++)
for (y = 0; y < 64; y++)
if (s->video_ram[x + (y/8)*128] & (1 << (y % 8)))
set_lcd_pixel(s, x, y, MP_LCD_TEXTCOLOR);
else
set... | 18,068 |
qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | 0 | static inline int fs_channel(target_phys_addr_t addr)
{
/* Every channel has a 0x2000 ctrl register map. */
return addr >> 13;
}
| 18,069 |
FFmpeg | f694168d524d1c84f5f20f4260fcab1f4d8c11d7 | 1 | static int ffm_write_packet(AVFormatContext *s, int stream_index,
UINT8 *buf, int size, int force_pts)
{
AVStream *st = s->streams[stream_index];
FFMStream *fst = st->priv_data;
INT64 pts;
UINT8 header[FRAME_HEADER_SIZE];
int duration;
if (st->codec.codec_ty... | 18,070 |
qemu | c572f23a3e7180dbeab5e86583e43ea2afed6271 | 1 | static void v9fs_lock(void *opaque)
{
int8_t status;
V9fsFlock *flock;
size_t offset = 7;
struct stat stbuf;
V9fsFidState *fidp;
int32_t fid, err = 0;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
flock = g_malloc(sizeof(*flock));
pdu_unmarshal(pdu, offset, "dbdqqds", &fid, &floc... | 18,071 |
FFmpeg | 76f7e70aa04fc5dbef5242b11cbf8fe4499f61d4 | 1 | static int get_last_needed_nal(H264Context *h)
{
int nals_needed = 0;
int i;
for (i = 0; i < h->pkt.nb_nals; i++) {
H2645NAL *nal = &h->pkt.nals[i];
GetBitContext gb;
/* packets can sometimes contain multiple PPS/SPS,
* e.g. two PAFF field pictures in one packet,... | 18,073 |
FFmpeg | 80469eafb747018cb9d9a2547f65def715d073b2 | 1 | int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
{
int i;
Picture *pic;
s->mb_skipped = 0;
assert(s->last_picture_ptr==NULL || s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3);
/* mark&release old frames */
if (s->pict_type != AV_PICTURE_TYPE_B && s->last_pictur... | 18,075 |
qemu | ada8d2e4369ea49677d8672ac81bce73eefd5b54 | 1 | long vnc_client_write_sasl(VncState *vs)
{
long ret;
VNC_DEBUG("Write SASL: Pending output %p size %zd offset %zd "
"Encoded: %p size %d offset %d\n",
vs->output.buffer, vs->output.capacity, vs->output.offset,
vs->sasl.encoded, vs->sasl.encodedLength, vs->sasl.e... | 18,076 |
qemu | b14ef7c9ab41ea824c3ccadb070ad95567cca84e | 1 | static void unassigned_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t val)
{
#ifdef DEBUG_UNASSIGNED
printf("Unassigned mem write " TARGET_FMT_plx " = 0x%x\n", addr, val);
#endif
#if defined(TARGET_ALPHA) || defined(TARGET_SPARC) || defined(TARGET_MICROBLAZE)
do_unassigned_access(addr, 1, 0, 0... | 18,079 |
qemu | e4f4fb1eca795e36f363b4647724221e774523c1 | 1 | static void virtio_mmio_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = virtio_mmio_realizefn;
dc->reset = virtio_mmio_reset;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
dc->props = virtio_mmio_properties;
} | 18,080 |
FFmpeg | bf5af5687569e34d6e3a4d31fc6bb5dc44efdb29 | 1 | void prepare_play(void)
{
AVOutputFormat *ofmt;
ofmt = guess_format("audio_device", NULL, NULL);
if (!ofmt) {
fprintf(stderr, "Could not find audio device\n");
exit(1);
}
opt_output_file(audio_device);
}
| 18,082 |
qemu | 06b106889a09277617fc8c542397a9f595ee605a | 1 | static bool get_queued_page(RAMState *rs, PageSearchStatus *pss,
ram_addr_t *ram_addr_abs)
{
RAMBlock *block;
ram_addr_t offset;
bool dirty;
do {
block = unqueue_page(rs, &offset, ram_addr_abs);
/*
* We're sending this page, and since it's... | 18,083 |
FFmpeg | 89f903b3d5ec38c9c5d90fba7e626fa0eda61a32 | 1 | static int sp5x_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AVPacket avpkt_recoded;
const int qscale = 5;
const uint8_t *buf_ptr;
... | 18,084 |
qemu | e1d4fb2de594ab0cbe78846bc79617b9bd50c867 | 1 | int kvm_arch_add_msi_route_post(struct kvm_irq_routing_entry *route,
int vector, PCIDevice *dev)
{
static bool notify_list_inited = false;
MSIRouteEntry *entry;
if (!dev) {
/* These are (possibly) IOAPIC routes only used for split
* kernel irqchip mode, while... | 18,085 |
FFmpeg | e5b0cfb541035967f4b2fcc49a48c1103a8bce62 | 1 | static int vorbis_parse_setup_hdr_modes(vorbis_context *vc) {
GetBitContext *gb=&vc->gb;
uint_fast8_t i;
vc->mode_count=get_bits(gb, 6)+1;
vc->modes=av_mallocz(vc->mode_count * sizeof(vorbis_mode));
AV_DEBUG(" There are %d modes.\n", vc->mode_count);
for(i=0;i<vc->mode_count;++i) {
... | 18,086 |
FFmpeg | bbb2945f2dfbc2306c1655bf7eb6e220912a9a7c | 1 | static int smka_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
AVFrame *frame = data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
GetBitContext gb;
HuffContext h[4] = { { 0 } };
VLC vlc[4] = ... | 18,087 |
qemu | d1dbe37c1ee3f14cb64a9ae3c89f637fdd08fca1 | 1 | static void ppc_hw_interrupt(CPUPPCState *env)
{
PowerPCCPU *cpu = ppc_env_get_cpu(env);
int hdice;
#if 0
CPUState *cs = CPU(cpu);
qemu_log_mask(CPU_LOG_INT, "%s: %p pending %08x req %08x me %d ee %d\n",
__func__, env, env->pending_interrupts,
cs->interrupt_... | 18,088 |
FFmpeg | dbf396d497e6d6f14b838092ed4ba4283a9505a0 | 1 | static void dct_error(const struct algo *dct, int test, int is_idct, int speed)
{
int it, i, scale;
int err_inf, v;
int64_t err2, ti, ti1, it1;
int64_t sysErr[64], sysErrMax = 0;
int maxout = 0;
int blockSumErrMax = 0, blockSumErr;
AVLFG prng;
av_lfg_init(&prng, 1);
err... | 18,089 |
FFmpeg | d2e0a276d593ded94401e687f60bee266f3e725e | 1 | static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic,
int depth, GetByteContext *gb)
{
uint8_t *output, *output_end;
int p1, p2, line=avctx->height - 1, pos=0, i;
uint16_t pix16;
uint32_t pix32;
unsigned int width= FFABS(pic->linesize[0])... | 18,090 |
qemu | 0479097859372a760843ad1b9c6ed3705c6423ca | 1 | static void spapr_memory_unplug_request(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
sPAPRMachineState *spapr = SPAPR_MACHINE(hotplug_dev);
Error *local_err = NULL;
PCDIMMDevice *dimm = PC_DIMM(dev);
PCDIMMDeviceClass *ddc = PC_DIMM_GET_CLA... | 18,091 |
FFmpeg | 07cd8d5676a72d80661e9bfde0a26d83aca4d029 | 0 | av_cold void ff_cavsdsp_init_x86(CAVSDSPContext *c, AVCodecContext *avctx)
{
int cpu_flags = av_get_cpu_flags();
cavsdsp_init_mmx(c, avctx);
#if HAVE_AMD3DNOW_INLINE
if (INLINE_AMD3DNOW(cpu_flags))
cavsdsp_init_3dnow(c, avctx);
#endif /* HAVE_AMD3DNOW_INLINE */
#if HAVE_MMXEXT_INLINE
... | 18,092 |
FFmpeg | 4b1f5e5090abed6c618c8ba380cd7d28d140f867 | 0 | static int finish_frame(AVCodecContext *avctx, AVFrame *pict)
{
RV34DecContext *r = avctx->priv_data;
MpegEncContext *s = &r->s;
int got_picture = 0, ret;
ff_er_frame_end(&s->er);
ff_mpv_frame_end(s);
s->mb_num_left = 0;
if (HAVE_THREADS && (s->avctx->active_thread_type & FF_THRE... | 18,093 |
FFmpeg | c661cb6672af5ebcb900ec8766b24761bd2ab011 | 0 | static void init_parse_context(OptionParseContext *octx,
const OptionGroupDef *groups)
{
static const OptionGroupDef global_group = { "global" };
const OptionGroupDef *g = groups;
int i;
memset(octx, 0, sizeof(*octx));
while (g->name)
g++;
octx... | 18,094 |
qemu | c2b38b277a7882a592f4f2ec955084b2b756daaa | 0 | void timerlist_notify(QEMUTimerList *timer_list)
{
if (timer_list->notify_cb) {
timer_list->notify_cb(timer_list->notify_opaque);
} else {
qemu_notify_event();
}
}
| 18,096 |
qemu | a5cf8262e4eb9c4646434e2c6211ef8608db3233 | 0 | static char *isabus_get_fw_dev_path(DeviceState *dev)
{
ISADevice *d = (ISADevice*)dev;
char path[40];
int off;
off = snprintf(path, sizeof(path), "%s", qdev_fw_name(dev));
if (d->ioport_id) {
snprintf(path + off, sizeof(path) - off, "@%04x", d->ioport_id);
}
return strd... | 18,097 |
qemu | 6eb8f212d2686ed9b17077d554465df7ae06f805 | 0 | static void sigp_cpu_reset(void *arg)
{
CPUState *cpu = arg;
S390CPUClass *scc = S390_CPU_GET_CLASS(cpu);
cpu_synchronize_state(cpu);
scc->cpu_reset(cpu);
cpu_synchronize_post_reset(cpu);
}
| 18,098 |
qemu | ff83678aee5269619338645ec23b00b1c7506fca | 0 | ram_addr_t qemu_ram_alloc_from_ptr(DeviceState *dev, const char *name,
ram_addr_t size, void *host)
{
RAMBlock *new_block, *block;
size = TARGET_PAGE_ALIGN(size);
new_block = qemu_mallocz(sizeof(*new_block));
if (dev && dev->parent_bus && dev->parent_bus->inf... | 18,099 |
qemu | a9be4e7c48c4892c836bda1be4d550bb1a6732bd | 0 | static void usb_host_handle_control(USBDevice *udev, USBPacket *p,
int request, int value, int index,
int length, uint8_t *data)
{
USBHostDevice *s = USB_HOST_DEVICE(udev);
USBHostRequest *r;
int rc;
trace_usb_host_req_cont... | 18,100 |
qemu | 57f5c1b093e1c3ec185770d2a180259205f980be | 0 | float32 helper_fabs_FT(float32 t0)
{
return float32_abs(t0);
}
| 18,101 |
qemu | 4f5e19e6c570459cd524b29b24374f03860f5149 | 0 | static int i440fx_pcihost_initfn(SysBusDevice *dev)
{
I440FXState *s = FROM_SYSBUS(I440FXState, dev);
register_ioport_write(0xcf8, 4, 4, i440fx_addr_writel, s);
register_ioport_read(0xcf8, 4, 4, i440fx_addr_readl, s);
register_ioport_write(0xcfc, 4, 1, pci_host_data_writeb, s);
register_io... | 18,103 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.