project
stringclasses
2 values
commit_id
stringlengths
40
40
target
int64
0
1
func
stringlengths
26
142k
idx
int64
0
27.3k
qemu
6e25280216fc23c8387892f76d961559da124528
1
static int kvm_sclp_service_call(S390CPU *cpu, struct kvm_run *run, uint16_t ipbh0) { CPUS390XState *env = &cpu->env; uint64_t sccb; uint32_t code; int r = 0; cpu_synchronize_state(CPU(cpu)); if (env->psw.mask & PSW_MASK_PSTATE) { enter_pgmchec...
12,962
FFmpeg
220b24c7c97dc033ceab1510549f66d0e7b52ef1
1
static void libschroedinger_flush(AVCodecContext *avctx) { /* Got a seek request. Free the decoded frames queue and then reset * the decoder */ SchroDecoderParams *p_schro_params = avctx->priv_data; /* Free data in the output frame queue. */ ff_schro_queue_free(&p_schro_params->dec_frame_qu...
12,964
FFmpeg
05d77587cb7d0a4e349c5320eb7c0b48610cf6bf
1
CFDataRef ff_videotoolbox_hvcc_extradata_create(AVCodecContext *avctx) { HEVCContext *h = avctx->priv_data; const HEVCVPS *vps = (const HEVCVPS *)h->ps.vps_list[0]->data; const HEVCSPS *sps = (const HEVCSPS *)h->ps.sps_list[0]->data; int i, num_pps = 0; const HEVCPPS *pps = h->ps.pps; PTL...
12,965
qemu
d54fddea989ba4aa2912d49583d86ce01c0d27ea
1
static void xhci_kick_epctx(XHCIEPContext *epctx, unsigned int streamid) { XHCIState *xhci = epctx->xhci; XHCIStreamContext *stctx = NULL; XHCITransfer *xfer; XHCIRing *ring; USBEndpoint *ep = NULL; uint64_t mfindex; unsigned int count = 0; int length; int i; trace_u...
12,967
qemu
4ed7b2c3a78f785a1bcbe575e08c379b166723e3
1
static int local_symlink(FsContext *fs_ctx, const char *oldpath, V9fsPath *dir_path, const char *name, FsCred *credp) { int err = -1; int serrno = 0; char *newpath; V9fsString fullname; char *buffer; v9fs_string_init(&fullname); v9fs_string_sprintf(&fullna...
12,969
qemu
6f2d8978728c48ca46f5c01835438508aace5c64
1
void OPPROTO op_405_check_satu (void) { if (unlikely(T0 < T2)) { /* Saturate result */ T0 = -1; } RETURN(); }
12,970
qemu
0b8b8753e4d94901627b3e86431230f2319215c4
1
static void qemu_gluster_complete_aio(void *opaque) { GlusterAIOCB *acb = (GlusterAIOCB *)opaque; qemu_bh_delete(acb->bh); acb->bh = NULL; qemu_coroutine_enter(acb->coroutine, NULL); }
12,971
qemu
e489030df2448d22b3cb92fd5dcb22c6fa0fc9e1
1
static void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev, uint16_t vendor, uint16_t device, uint16_t class_code, uint8_t pif) { uint8_t *config; uint32_t size; proxy->vdev = vdev; config = proxy->pci_dev.config; pci_con...
12,972
qemu
037e1d009e2fcb80784d37f0e12aa999787d46d4
1
static void disas_pc_rel_adr(DisasContext *s, uint32_t insn) { unsigned int page, rd; uint64_t base; int64_t offset; page = extract32(insn, 31, 1); /* SignExtend(immhi:immlo) -> offset */ offset = ((int64_t)sextract32(insn, 5, 19) << 2) | extract32(insn, 29, 2); rd = extract32(insn...
12,973
FFmpeg
ad5807f8aa883bee5431186dc1f24c5435d722d3
1
ff_voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size) { VocDecContext *voc = s->priv_data; AVCodecParameters *par = st->codecpar; AVIOContext *pb = s->pb; VocType type; int size, tmp_codec=-1; int sample_rate = 0; int channels = 1; int64_t duration; ...
12,974
qemu
39ee3af3a85fedb55b9eeb1a0bc81a2460eeaa01
1
void AcpiCpuHotplug_add(ACPIGPE *gpe, AcpiCpuHotplug *g, CPUState *cpu) { CPUClass *k = CPU_GET_CLASS(cpu); int64_t cpu_id; *gpe->sts = *gpe->sts | ACPI_CPU_HOTPLUG_STATUS; cpu_id = k->get_arch_id(CPU(cpu)); g->sts[cpu_id / 8] |= (1 << (cpu_id % 8)); }
12,975
FFmpeg
d11f9e1b15e3aac6862bdfe2e5cb212b706e2c2f
1
static void fill_coding_method_array (sb_int8_array tone_level_idx, sb_int8_array tone_level_idx_temp, sb_int8_array coding_method, int nb_channels, int c, int superblocktype_2_3, int cm_table_select) { int ch, sb, j; int tmp, acc, esp_40, comp; int add1, add2, add3, ad...
12,976
FFmpeg
2d9535ad317733c977a89194975f14e0cc04fb7f
1
void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, int linesize_align[AV_NUM_DATA_POINTERS]) { int i; int w_align= 1; int h_align= 1; switch(s->pix_fmt){ case PIX_FMT_YUV420P: case PIX_FMT_YUYV422: case PIX_FMT_UYVY422: c...
12,977
qemu
d9bce9d99f4656ae0b0127f7472db9067b8f84ab
1
PPC_OP(addze) { T1 = T0; T0 += xer_ca; if (T0 < T1) { xer_ca = 1; } else { xer_ca = 0; } RETURN(); }
12,978
qemu
21174c34b6b9ace9ad82e0deb13be752d28a5907
1
static int get_unused_buffer(QEMUFile *f, void *pv, size_t size) { qemu_fseek(f, size, SEEK_CUR); return 0; }
12,979
qemu
560d027b54067ffa4e79c6f7c0a499abb0d749a3
1
void hmp_savevm(Monitor *mon, const QDict *qdict) { BlockDriverState *bs, *bs1; QEMUSnapshotInfo sn1, *sn = &sn1, old_sn1, *old_sn = &old_sn1; int ret; QEMUFile *f; int saved_vm_running; uint64_t vm_state_size; qemu_timeval tv; struct tm tm; const char *name = qdict_get_try_str(qdict...
12,980
FFmpeg
f5d039840aca64d0ce79cd08e64423833becf570
1
static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) { SWFContext *swf = s->priv_data; AVIOContext *pb = s->pb; AVStream *vst = NULL, *ast = NULL, *st = 0; int tag, len, i, frame, v, res; #if CONFIG_ZLIB if (swf->zpb) pb = swf->zpb; #endif for(;;) { uint64...
12,981
FFmpeg
e1b0044c234775bf99ab1a5c794240a9a692ad8d
1
static int dvbsub_parse_region_segment(AVCodecContext *avctx, const uint8_t *buf, int buf_size) { DVBSubContext *ctx = avctx->priv_data; const uint8_t *buf_end = buf + buf_size; int region_id, object_id; int av_unused version; DVBSubRegion *region; ...
12,982
FFmpeg
5eb273b2e767c86f78cc0e7e1a31bda4fedd2f56
1
int attribute_align_arg av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags) { BufferSinkContext *buf = ctx->priv; AVFilterLink *inlink = ctx->inputs[0]; int ret; AVFrame *cur_frame; /* no picref available, fetch it from the filterchain */ if (!av_fifo_size(buf...
12,983
qemu
9edd5338a2404909ac8d373964021e6dbb8f5815
1
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; } qdict = qobject_to_qdict(data); assert(qdict); devfn = (int)qdict_get_int(qdict, "devfn"); monitor_printf(...
12,985
FFmpeg
64bde8056337bb656a11f3c9e2857c10b94e2871
0
static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id) { int max_frames, first_frames = 0, frames; uint8_t *buf, *buf2, *end; AC3HeaderInfo hdr; GetBitContext gbc; enum CodecID codec_id = CODEC_ID_AC3; max_frames = 0; buf = p->buf; end = buf + p->buf_size; ...
12,986
FFmpeg
87e8788680e16c51f6048af26f3f7830c35207a5
0
static int h263_probe(AVProbeData *p) { int code; const uint8_t *d; if (p->buf_size < 6) return 0; d = p->buf; code = (d[0] << 14) | (d[1] << 6) | (d[2] >> 2); if (code == 0x20) { return 50; } return 0; }
12,987
FFmpeg
32c3047cac9294bb56d23c89a40a22409db5cc70
0
static int cinepak_decode_init(AVCodecContext *avctx) { CinepakContext *s = avctx->priv_data; s->avctx = avctx; s->width = (avctx->width + 3) & ~3; s->height = (avctx->height + 3) & ~3; s->sega_film_skip_bytes = -1; /* uninitialized state */ // check for paletted data if ((avctx...
12,989
FFmpeg
a566c952f905639456966413fee0b5701867ddcd
1
static int mpegts_init(AVFormatContext *s) { MpegTSWrite *ts = s->priv_data; MpegTSWriteStream *ts_st; MpegTSService *service; AVStream *st, *pcr_st = NULL; AVDictionaryEntry *title, *provider; int i, j; const char *service_name; const char *provider_name; int *pids; i...
12,990
FFmpeg
25e3e53d4092e7b69a4d681824fa0f7b2731bb1e
1
static void rtsp_cmd_setup(HTTPContext *c, const char *url, RTSPHeader *h) { FFStream *stream; int stream_index, port; char buf[1024]; char path1[1024]; const char *path; HTTPContext *rtp_c; RTSPTransportField *th; struct sockaddr_in dest_addr; R...
12,991
qemu
f708a5e71cba0d784e307334c07ade5f56f827ab
1
void aio_set_fd_handler(AioContext *ctx, int fd, bool is_external, IOHandler *io_read, IOHandler *io_write, AioPollFn *io_poll, void *opaque) { AioHandler *node; ...
12,992
FFmpeg
3deb4b54a24f8cddce463d9f5751b01efeb976af
0
static int check_bits_for_superframe(GetBitContext *orig_gb, WMAVoiceContext *s) { GetBitContext s_gb, *gb = &s_gb; int n, need_bits, bd_idx; const struct frame_type_desc *frame_desc; /* initialize a copy */ init_get_bits(gb, orig_gb->buffer, orig_gb->si...
12,993
FFmpeg
659d4ba5af5d72716ee370bb367c741bd15e75b4
0
static void h263_v_loop_filter_mmx(uint8_t *src, int stride, int qscale) { if (CONFIG_H263_DECODER || CONFIG_H263_ENCODER) { const int strength = ff_h263_loop_filter_strength[qscale]; __asm__ volatile ( H263_LOOP_FILTER "movq %%mm3, %1 \n\t" ...
12,994
FFmpeg
e48ded8551172b58a78f30303a81dfce125344e0
0
static int64_t *concat_channels_lists(const int64_t *layouts, const int *counts) { int nb_layouts = 0, nb_counts = 0, i; int64_t *list; if (layouts) for (; layouts[nb_layouts] != -1; nb_layouts++); if (counts) for (; counts[nb_counts] != -1; nb_counts++); if (nb_counts > IN...
12,995
qemu
ddf21908961073199f3d186204da4810f2ea150b
0
static void vnc_qmp_event(VncState *vs, QAPIEvent event) { VncServerInfo *si; if (!vs->info) { return; } g_assert(vs->info->base); si = vnc_server_info_get(vs->vd); if (!si) { return; } switch (event) { case QAPI_EVENT_VNC_CONNECTED: qapi_ev...
12,996
qemu
055403b2a72729497fb58e0c6293547e767679d3
0
void dump_exec_info(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...)) { int i, target_code_size, max_target_code_size; int direct_jmp_count, direct_jmp2_count, cross_page; TranslationBlock *tb; target_code_size = 0; max_target_code_size = 0; cross_page = 0...
12,997
FFmpeg
d8870f120ea5f46940bac63a90424ca6a6000ad9
0
static void ac3_downmix(AC3DecodeContext *s) { int i, j; float v0, v1; for(i=0; i<256; i++) { v0 = v1 = 0.0f; for(j=0; j<s->fbw_channels; j++) { v0 += s->output[j][i] * s->downmix_coeffs[j][0]; v1 += s->output[j][i] * s->downmix_coeffs[j][1]; } ...
12,998
qemu
95129d6fc9ead97155627a4ca0cfd37282883658
0
static void virtio_net_set_features(VirtIODevice *vdev, uint64_t features) { VirtIONet *n = VIRTIO_NET(vdev); int i; virtio_net_set_multiqueue(n, __virtio_has_feature(features, VIRTIO_NET_F_MQ)); virtio_net_set_mrg_rx_bufs(n, __virt...
13,000
qemu
d7651f150d61936344c4fab45eaeb0716c606af2
0
int postcopy_ram_enable_notify(MigrationIncomingState *mis) { /* Open the fd for the kernel to give us userfaults */ mis->userfault_fd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK); if (mis->userfault_fd == -1) { error_report("%s: Failed to open userfault fd: %s", __func__, ...
13,003
qemu
dfd100f242370886bb6732f70f1f7cbd8eb9fedc
0
void qio_dns_resolver_lookup_async(QIODNSResolver *resolver, SocketAddress *addr, QIOTaskFunc func, gpointer opaque, GDestroyNotify notify) { QIOTask *task; struct Q...
13,004
qemu
698feb5e13a2d763369909ce33f2bd7a7c1c11c0
0
static void vhost_iommu_region_add(MemoryListener *listener, MemoryRegionSection *section) { struct vhost_dev *dev = container_of(listener, struct vhost_dev, iommu_listener); struct vhost_iommu *iommu; if (!memory_region_is_...
13,005
qemu
d6759902cb467c002086853d2eb38fb969c29f7f
0
static void arm_timer_write(void *opaque, target_phys_addr_t offset, uint32_t value) { arm_timer_state *s = (arm_timer_state *)opaque; int freq; switch (offset >> 2) { case 0: /* TimerLoad */ s->limit = value; arm_timer_recalibrate(s, 1); br...
13,006
qemu
1f01e50b8330c24714ddca5841fdbb703076b121
0
static void qed_plug_allocating_write_reqs(BDRVQEDState *s) { assert(!s->allocating_write_reqs_plugged); s->allocating_write_reqs_plugged = true; }
13,007
qemu
a7812ae412311d7d47f8aa85656faadac9d64b56
0
static inline void t_gen_swapr(TCGv d, TCGv s) { struct { int shift; /* LSL when positive, LSR when negative. */ uint32_t mask; } bitrev [] = { {7, 0x80808080}, {5, 0x40404040}, {3, 0x20202020}, {1, 0x10101010}, {-1, 0x08080808}, {-3, 0x04040404}, {-5, 0x02020202}, {-7, 0x01010101} ...
13,008
FFmpeg
332f9ac4e31ce5e6d0c42ac9e0229d7d1b2b4d60
0
int h263_decode_picture_header(MpegEncContext *s) { int format, width, height, i; uint32_t startcode; align_get_bits(&s->gb); startcode= get_bits(&s->gb, 22-8); for(i= s->gb.size_in_bits - get_bits_count(&s->gb); i>24; i-=8) { startcode = ((startcode << 8) | get_bits(&s->gb,...
13,009
qemu
6aff24c6a61c6fec31e555c7748ba6085b7b2c06
0
static X86CPU *pc_new_cpu(const char *cpu_model, int64_t apic_id, Error **errp) { X86CPU *cpu = NULL; Error *local_err = NULL; cpu = cpu_x86_create(cpu_model, &local_err); if (local_err != NULL) { goto out; } object_property_set_int(OBJECT(cpu), api...
13,010
qemu
b227a8e9aa5f27d29f77ba90d5eb9d0662a1175e
0
static int find_pte64 (mmu_ctx_t *ctx, int h, int rw) { return _find_pte(ctx, 1, h, rw); }
13,011
qemu
64d7e9a421fea0ac50b44541f5521de455e7cd5d
0
void pc_basic_device_init(qemu_irq *isa_irq, ISADevice **rtc_state) { int i; DriveInfo *fd[MAX_FD]; PITState *pit; qemu_irq rtc_irq = NULL; qemu_irq *a20_line; ISADevice *i8042, *port92, *vmmouse; qemu_irq *cpu_exit_irq; register_ioport_write(0x80, 1...
13,013
qemu
9bada8971173345ceb37ed1a47b00a01a4dd48cf
0
static JSONTokenType token_get_type(QObject *obj) { return qdict_get_int(qobject_to_qdict(obj), "type"); }
13,014
qemu
e14c8062f4c4c336c6e5fa5b51472ffff5f3fe38
0
void pc_cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size, const char *boot_device, BusState *idebus0, BusState *idebus1, ISADevice *s) { int val, nb, nb_heads, max_track, last_sect, i; FDriveType fd_type[2]; DriveInfo *fd[2]; stati...
13,015
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
0
static uint32_t slow_bar_readw(void *opaque, target_phys_addr_t addr) { AssignedDevRegion *d = opaque; uint16_t *in = (uint16_t *)(d->u.r_virtbase + addr); uint32_t r; r = *in; DEBUG("slow_bar_readl addr=0x" TARGET_FMT_plx " val=0x%08x\n", addr, r); return r; }
13,018
qemu
aec4b054ea36c53c8b887da99f20010133b84378
1
static void simple_dict(void) { int i; struct { const char *encoded; LiteralQObject decoded; } test_cases[] = { { .encoded = "{\"foo\": 42, \"bar\": \"hello world\"}", .decoded = QLIT_QDICT(((LiteralQDictEntry[]){ { "foo", QLI...
13,019
FFmpeg
c23acbaed40101c677dfcfbbfe0d2c230a8e8f44
1
static av_always_inline void idct(uint8_t *dst, int stride, int16_t *input, int type) { int16_t *ip = input; uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; int A, B, C, D, Ad, Bd, Cd, Dd, E, F, G, H; int Ed, Gd, Add, Bdd, Fd, Hd; int i; /* Inverse DCT on the rows now */ for (i = 0; i...
13,020
FFmpeg
44e2f0c3cd2df68659e07ed3d5eab4974794eb33
1
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; const uint8_t *buf_end = avpkt->data + avpkt->size; int buf_size = avpkt->size; QdrawContext * const a = avctx->priv_data; A...
13,021
qemu
0752706de257b38763006ff5bb6b39a97e669ba2
1
static int net_slirp_init(Monitor *mon, VLANState *vlan, const char *model, const char *name, int restricted, const char *vnetwork, const char *vhost, const char *vhostname, const char *tftp_export, const char *b...
13,022
qemu
e122636562218b3d442cd2cd18fbc188dd9ce709
1
void exec_start_outgoing_migration(MigrationState *s, const char *command, Error **errp) { QIOChannel *ioc; const char *argv[] = { "/bin/sh", "-c", command, NULL }; trace_migration_exec_outgoing(command); ioc = QIO_CHANNEL(qio_channel_command_new_spawn(argv, ...
13,023
FFmpeg
45faf7fcd335b91e41b0e3ba4e397a9640d8c694
0
static int nsv_probe(AVProbeData *p) { int i; av_dlog(NULL, "nsv_probe(), buf_size %d\n", p->buf_size); /* check file header */ /* streamed files might not have any header */ if (p->buf[0] == 'N' && p->buf[1] == 'S' && p->buf[2] == 'V' && (p->buf[3] == 'f' || p->buf[3] == 's')) ...
13,025
FFmpeg
7546964f96168cd6ac819ef4c3212ee586619f1a
0
static int nvdec_hevc_decode_init(AVCodecContext *avctx) { const HEVCContext *s = avctx->priv_data; const HEVCSPS *sps = s->ps.sps; return ff_nvdec_decode_init(avctx, sps->temporal_layer[sps->max_sub_layers - 1].max_dec_pic_buffering + 1); }
13,026
qemu
f3c7d0389fe8a2792fd4c1cf151b885de03c8f62
1
qemu_irq sh7750_irl(SH7750State *s) { sh_intc_toggle_source(sh_intc_source(&s->intc, IRL), 1, 0); /* enable */ return qemu_allocate_irqs(sh_intc_set_irl, sh_intc_source(&s->intc, IRL), 1)[0]; }
13,028
qemu
f689d2811a36894618087e1e2cc3ade78e758e94
1
static uint64_t ivshmem_io_read(void *opaque, hwaddr addr, unsigned size) { IVShmemState *s = opaque; uint32_t ret; switch (addr) { case INTRMASK: ret = ivshmem_IntrMask_read(s); break; case INTRSTATUS: ...
13,029
qemu
ff1d2ac949dc94d8a0e71fd46939fb69c2ef075b
1
static void mcf_fec_enable_rx(mcf_fec_state *s) { mcf_fec_bd bd; mcf_fec_read_bd(&bd, s->rx_descriptor); s->rx_enabled = ((bd.flags & FEC_BD_E) != 0); if (!s->rx_enabled) DPRINTF("RX buffer full\n"); }
13,030
qemu
a552a966f16b7b39c5df16fc17e12d02c4fa5954
1
void usb_packet_setup(USBPacket *p, int pid, USBEndpoint *ep, uint64_t id, bool short_not_ok, bool int_req) { assert(!usb_packet_is_inflight(p)); assert(p->iov.iov != NULL); p->id = id; p->pid = pid; p->ep = ep; p->result = 0; p->parameter = 0; p->short_no...
13,032
qemu
91d670fbf9945ca4ecbd123affb36889e7fe8a5d
1
static void virtio_scsi_device_realize(DeviceState *dev, Error **errp) { VirtIODevice *vdev = VIRTIO_DEVICE(dev); VirtIOSCSI *s = VIRTIO_SCSI(dev); static int virtio_scsi_id; Error *err = NULL; virtio_scsi_common_realize(dev, &err); if (err != NULL) { error_propagate(errp, err)...
13,033
qemu
12f8def0e02232d7c6416ad9b66640f973c531d1
1
void qemu_mutex_lock(QemuMutex *mutex) { EnterCriticalSection(&mutex->lock); /* Win32 CRITICAL_SECTIONs are recursive. Assert that we're not * using them as such. */ assert(mutex->owner == 0); mutex->owner = GetCurrentThreadId(); }
13,037
qemu
792dac309c8660306557ba058b8b5a6a75ab3c1f
1
void HELPER(v7m_msr)(CPUARMState *env, uint32_t maskreg, uint32_t val) { /* We're passed bits [11..0] of the instruction; extract * SYSm and the mask bits. * Invalid combinations of SYSm and mask are UNPREDICTABLE; * we choose to treat them as if the mask bits were valid. * NB that the pse...
13,038
FFmpeg
5a571d324129ce367584ad9d92aae1d286f389a2
1
static int parse_h264_sdp_line(AVFormatContext *s, int st_index, PayloadContext *h264_data, const char *line) { AVStream *stream; AVCodecContext *codec; const char *p = line; if (st_index < 0) return 0; stream = s->streams[st_index]; codec = st...
13,041
qemu
d9bce9d99f4656ae0b0127f7472db9067b8f84ab
1
PPC_OP(icbi) { do_icbi(); RETURN(); }
13,042
FFmpeg
28f9ab7029bd1a02f659995919f899f84ee7361b
0
void ff_vp3_idct_put_c(uint8_t *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/){ idct(dest, line_size, block, 1); }
13,043
qemu
ba21f0cca8165c5b284274edd12dc955cf4fb248
0
static bool is_iso_bc_entry_compatible(IsoBcSection *s) { return true; }
13,044
qemu
67a0fd2a9bca204d2b39f910a97c7137636a0715
0
int64_t bdrv_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum) { return bdrv_get_block_status_above(bs, backing_bs(bs), sector_num, nb_sectors, pnum); }
13,045
qemu
de9e9d9f17a36ff76c1a02a5348835e5e0a081b0
0
static inline void gen_op_eval_fbe(TCGv dst, TCGv src, unsigned int fcc_offset) { gen_mov_reg_FCC0(dst, src, fcc_offset); gen_mov_reg_FCC1(cpu_tmp0, src, fcc_offset); tcg_gen_or_tl(dst, dst, cpu_tmp0); tcg_gen_xori_tl(dst, dst, 0x1); }
13,047
qemu
72cf2d4f0e181d0d3a3122e04129c58a95da713e
0
static int blk_free(struct XenDevice *xendev) { struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev); struct ioreq *ioreq; while (!LIST_EMPTY(&blkdev->freelist)) { ioreq = LIST_FIRST(&blkdev->freelist); LIST_REMOVE(ioreq, list); qemu_iovec_destroy(&ioreq->v); ...
13,048
qemu
c45ca54ff98c29551fadf9e8f64eb43d54cdcb0c
0
static uint32_t ide_ioport_read(void *opaque, uint32_t addr1) { IDEState *ide_if = opaque; IDEState *s = ide_if->cur_drive; uint32_t addr; int ret, hob; addr = addr1 & 7; /* FIXME: HOB readback uses bit 7, but it's always set right now */ //hob = s->select & (1 << 7); hob = 0;...
13,049
qemu
2119882c7eb7e2c612b24fc0c8d86f5887d6f1c3
0
void qmp_block_dirty_bitmap_add(const char *node, const char *name, bool has_granularity, uint32_t granularity, Error **errp) { AioContext *aio_context; BlockDriverState *bs; if (!name || name[0] == '\0') { error_setg(errp, "Bi...
13,052
qemu
8979c945c1a7ffd20edbd5da2513c04baccfd7de
0
static void numa_node_parse(NumaNodeOptions *node, QemuOpts *opts, Error **errp) { uint16_t nodenr; uint16List *cpus = NULL; if (node->has_nodeid) { nodenr = node->nodeid; } else { nodenr = nb_numa_nodes; } if (nodenr >= MAX_NODES) { error_setg(errp, "Max nu...
13,053
FFmpeg
cb78d14cf9b5ab59b4a9177f390f5e1abff58644
0
static int create_filtergraph(AVFilterContext *ctx, const AVFrame *in, const AVFrame *out) { ColorSpaceContext *s = ctx->priv; const AVPixFmtDescriptor *in_desc = av_pix_fmt_desc_get(in->format); const AVPixFmtDescriptor *out_desc = av_pix_fmt_desc_get(out->format); ...
13,054
qemu
6ef228fc0de1d5fb43ebfef039563d39a3a37067
0
static void stream_set_speed(BlockJob *job, int64_t speed, Error **errp) { StreamBlockJob *s = container_of(job, StreamBlockJob, common); if (speed < 0) { error_set(errp, QERR_INVALID_PARAMETER, "speed"); return; } ratelimit_set_speed(&s->limit, speed / BDRV_SECTOR_SIZE); }
13,055
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
0
static Rom *find_rom(target_phys_addr_t addr) { Rom *rom; QTAILQ_FOREACH(rom, &roms, next) { if (rom->fw_file) { continue; } if (rom->addr > addr) { continue; } if (rom->addr + rom->romsize < addr) { continue; } ...
13,056
qemu
1dde716ed6719c341c1bfa427781f0715af90cbc
0
iscsi_aio_readv(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockDriverCompletionFunc *cb, void *opaque) { IscsiLun *iscsilun = bs->opaque; struct iscsi_context *iscsi = iscsilun->iscsi; IscsiAIOCB *acb; size_t qem...
13,057
qemu
f287b2c2d4d20d35880ab6dca44bda0476e67dce
0
static abi_long lock_iovec(int type, struct iovec *vec, abi_ulong target_addr, int count, int copy) { struct target_iovec *target_vec; abi_ulong base; int i; target_vec = lock_user(VERIFY_READ, target_addr, count * sizeof(struct target_iovec), 1); if (!target_vec)...
13,058
qemu
e70377dfa4bbc2e101066ca35675bed4129c5a8c
0
S390PCIBusDevice *s390_pci_find_next_avail_dev(S390PCIBusDevice *pbdev) { int idx = 0; S390PCIBusDevice *dev = NULL; S390pciState *s = s390_get_phb(); if (pbdev) { idx = (pbdev->fh & FH_MASK_INDEX) + 1; } for (; idx < PCI_SLOT_MAX; idx++) { dev = s->pbdev[idx]; ...
13,059
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
0
static void fw_cfg_ctl_mem_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size) { fw_cfg_select(opaque, (uint16_t)value); }
13,061
qemu
298a1665a2800f7264e483c2dd1f551574243a2f
0
static int64_t coroutine_fn bdrv_co_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum, BlockDriverState **file) { int...
13,062
qemu
2c1885adcf0312da80c7317b09f9adad97fa0fc6
0
static int dmg_read(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sectors) { BDRVDMGState *s = bs->opaque; int i; for(i=0;i<nb_sectors;i++) { uint32_t sector_offset_in_chunk; if(dmg_read_chunk(bs, sector_num+i) != 0) return -1; sector_offset_in_chunk =...
13,063
qemu
958c717df97ea9ca47a2253b8371130fe5f22980
0
static int nbd_can_read(void *opaque) { NBDClient *client = opaque; return client->recv_coroutine || client->nb_requests < MAX_NBD_REQUESTS; }
13,064
FFmpeg
3df4939988ace682f7ac0366ef8fd700d207e6b6
0
int avpriv_dca_parse_core_frame_header(DCACoreFrameHeader *h, const uint8_t *buf, int size) { GetBitContext gb; if (init_get_bits8(&gb, buf, size) < 0) return DCA_PARSE_ERROR_INVALIDDATA; return ff_dca_parse_core_frame_header(h, &gb); }
13,065
qemu
3a5c76baf312d83cb77c8faa72c5f7a477effed0
0
static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, MachineState *machine) { const char *cpu_model = machine->cpu_model; unsigned int i; void *iommu, *espdma, *ledma, *nvram; qemu_irq *cpu_irqs[MAX_CPUS], slavio_irq[32], slavio_cpu_irq[MAX_CPUS], espdma_ir...
13,066
qemu
44b5949491a47043c4f7c4ff09f0191f82919a82
0
static inline int qemu_rdma_buffer_mergable(RDMAContext *rdma, uint64_t offset, uint64_t len) { RDMALocalBlock *block = &(rdma->local_ram_blocks.block[rdma->current_index]); uint8_t *host_addr = block->local_host_addr + (offset - block->offset); uint8_t *chunk_end = ram_chu...
13,067
FFmpeg
ef0d779706c77ca9007527bd8d41e9400682f4e4
1
static int ogg_new_buf(struct ogg *ogg, int idx) { struct ogg_stream *os = ogg->streams + idx; uint8_t *nb = av_malloc(os->bufsize); int size = os->bufpos - os->pstart; if(os->buf){ memcpy(nb, os->buf + os->pstart, size); av_free(os->buf); } os->buf = nb; os->bufpos...
13,069
qemu
f8ed85ac992c48814d916d5df4d44f9a971c5de4
1
void s390_memory_init(ram_addr_t mem_size) { MemoryRegion *sysmem = get_system_memory(); MemoryRegion *ram = g_new(MemoryRegion, 1); /* allocate RAM for core */ memory_region_init_ram(ram, NULL, "s390.ram", mem_size, &error_abort); vmstate_register_ram_global(ram); memory_region_add_sub...
13,070
qemu
f4658285f99473367dbbc34ce6970ec4637c2388
1
static void tracked_request_begin(BdrvTrackedRequest *req, BlockDriverState *bs, int64_t sector_num, int nb_sectors, bool is_write) *req = (BdrvTrackedRequest){ .bs = bs, .sector_num = sector_num, ...
13,071
FFmpeg
ac658be5db5baa01546715994fbd193a855cbc73
1
static inline int decode_seq_parameter_set(H264Context *h){ MpegEncContext * const s = &h->s; int profile_idc, level_idc; int sps_id, i; SPS *sps; profile_idc= get_bits(&s->gb, 8); get_bits1(&s->gb); //constraint_set0_flag get_bits1(&s->gb); //constraint_set1_flag get_bits1...
13,072
qemu
3e4f910c8d490a1490409a7e381dbbb229f9d272
1
static int usb_ehci_initfn(PCIDevice *dev) { EHCIState *s = DO_UPCAST(EHCIState, dev, dev); uint8_t *pci_conf = s->dev.config; int i; pci_set_byte(&pci_conf[PCI_CLASS_PROG], 0x20); /* capabilities pointer */ pci_set_byte(&pci_conf[PCI_CAPABILITY_LIST], 0x00); //pci_set_byte(&pci_...
13,073
qemu
eb8934b0418b3b1d125edddc4fc334a54334a49b
1
static int vnc_refresh_server_surface(VncDisplay *vd) { int width = MIN(pixman_image_get_width(vd->guest.fb), pixman_image_get_width(vd->server)); int height = MIN(pixman_image_get_height(vd->guest.fb), pixman_image_get_height(vd->server)); int cmp_bytes, serve...
13,074
FFmpeg
360bc0d90aa66cf21e9f488e77d21db18e01ec9c
1
static int smvjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const AVPixFmtDescriptor *desc; SMVJpegDecodeContext *s = avctx->priv_data; AVFrame* mjpeg_data = s->picture[0]; int i, cur_frame = 0, ret = 0; cur_frame = avpkt->pts % s...
13,075
qemu
e0e2d644096c79a71099b176d08f465f6803a8b1
1
static inline uint16_t vring_avail_ring(VirtQueue *vq, int i) { VRingMemoryRegionCaches *caches = atomic_rcu_read(&vq->vring.caches); hwaddr pa = offsetof(VRingAvail, ring[i]); return virtio_lduw_phys_cached(vq->vdev, &caches->avail, pa); }
13,076
qemu
29f2601aa605f0af0cba8eedcff7812c6c8532e9
1
static int open_f(BlockDriverState *bs, int argc, char **argv) { int flags = 0; int readonly = 0; int growable = 0; int c; QemuOpts *qopts; QDict *opts; while ((c = getopt(argc, argv, "snrgo:")) != EOF) { switch (c) { case 's': flags |= BDRV_O_SNAPSHO...
13,078
FFmpeg
e6b1ed693ae4098e6b9eabf938fc31ec0b09b120
0
av_cold int ff_mdct_init(FFTContext *s, int nbits, int inverse, double scale) { int n, n4, i; double alpha, theta; int tstep; memset(s, 0, sizeof(*s)); n = 1 << nbits; s->mdct_bits = nbits; s->mdct_size = n; n4 = n >> 2; s->permutation = FF_MDCT_PERM_NONE; if (ff_f...
13,079
FFmpeg
daa7a1d4431b6acf1f93c4a98b3de123abf4ca18
0
int ff_slice_thread_init(AVCodecContext *avctx) { int i; ThreadContext *c; int thread_count = avctx->thread_count; #if HAVE_W32THREADS w32thread_init(); #endif if (!thread_count) { int nb_cpus = av_cpu_count(); av_log(avctx, AV_LOG_DEBUG, "detected %d logical cores\n", ...
13,080
FFmpeg
1181d93231e9b807965724587d363c1cfd5a1d0d
0
void ff_avg_h264_qpel4_mc22_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_mid_and_aver_dst_4x4_msa(src - (2 * stride) - 2, stride, dst, stride); }
13,082
FFmpeg
03cef34aa66662e2ab3681d290e7c5a6634f4058
0
int qsv_transcode_init(OutputStream *ost) { InputStream *ist; const enum AVPixelFormat *pix_fmt; AVDictionaryEntry *e; const AVOption *opt; int flags = 0; int err, i; QSVContext *qsv = NULL; AVQSVContext *hwctx = NULL; mfxIMPL impl; mfxVersion ver = { { 3, 1 } };...
13,084
FFmpeg
1e9db41e2a2166be5671b088ef4ad06a40af459f
0
static int mov_write_ftyp_tag(AVIOContext *pb, AVFormatContext *s) { MOVMuxContext *mov = s->priv_data; int64_t pos = avio_tell(pb); int has_h264 = 0, has_video = 0; int minor = 0x200; int i; for (i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; if (st->c...
13,085
FFmpeg
4f1d7cc0ed66f4ab390631722a7daa660e55a0f3
1
static av_cold int bktr_init(const char *video_device, int width, int height, int format, int *video_fd, int *tuner_fd, int idev, double frequency) { struct meteor_geomet geo; int h_max; long ioctl_frequency; char *arg; int c; struct sigaction act = { 0 }, old; if (idev < 0 ||...
13,086
FFmpeg
866c44d4b0f90d448cffbe9d4422a2dec7df698b
1
static inline int wv_unpack_stereo(WavpackFrameContext *s, GetBitContext *gb, void *dst_l, void *dst_r, const int type) { int i, j, count = 0; int last, t; int A, B, L, L2, R, R2; int pos = s->pos; uint32_t crc = s->sc.crc; uint32_t c...
13,087
qemu
eff235eb2bcd7092901f4698a7907e742f3b7f2f
1
static ExitStatus trans_fop_wed_0c(DisasContext *ctx, uint32_t insn, const DisasInsn *di) { unsigned rt = extract32(insn, 0, 5); unsigned ra = extract32(insn, 21, 5); return do_fop_wed(ctx, rt, ra, di->f_wed); }
13,088