project
stringclasses
2 values
commit_id
stringlengths
40
40
target
int64
0
1
func
stringlengths
26
142k
idx
int64
0
27.3k
qemu
69ef1f36b0f882fc5ba9491fb272fa5f83ac1d3d
1
MigrationParameters *qmp_query_migrate_parameters(Error **errp) { MigrationParameters *params; MigrationState *s = migrate_get_current(); params = g_malloc0(sizeof(*params)); params->compress_level = s->parameters.compress_level; params->compress_threads = s->parameters.compress_threads; ...
3,916
qemu
7ebaf7955603cc50988e0eafd5e6074320fefc70
0
static int kvm_ppc_register_host_cpu_type(void) { TypeInfo type_info = { .name = TYPE_HOST_POWERPC_CPU, .instance_init = kvmppc_host_cpu_initfn, .class_init = kvmppc_host_cpu_class_init, }; PowerPCCPUClass *pvr_pcc; DeviceClass *dc; pvr_pcc = kvm_ppc_get_host_cpu_c...
3,918
qemu
bec1631100323fac0900aea71043d5c4e22fc2fa
0
static inline int tcg_gen_code_common(TCGContext *s, tcg_insn_unit *gen_code_buf, long search_pc) { int oi, oi_next; #ifdef DEBUG_DISAS if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) { qemu_log("OP:\n"); tcg_...
3,919
qemu
c2b38b277a7882a592f4f2ec955084b2b756daaa
0
void timer_mod_anticipate_ns(QEMUTimer *ts, int64_t expire_time) { QEMUTimerList *timer_list = ts->timer_list; bool rearm; qemu_mutex_lock(&timer_list->active_timers_lock); if (ts->expire_time == -1 || ts->expire_time > expire_time) { if (ts->expire_time != -1) { timer_del_l...
3,922
qemu
a89f364ae8740dfc31b321eed9ee454e996dc3c1
0
static void pxa2xx_rtc_write(void *opaque, hwaddr addr, uint64_t value64, unsigned size) { PXA2xxRTCState *s = (PXA2xxRTCState *) opaque; uint32_t value = value64; switch (addr) { case RTTR: if (!(s->rttr & (1U << 31))) { pxa2xx_rtc_hzupdate(s);...
3,923
qemu
a89f364ae8740dfc31b321eed9ee454e996dc3c1
0
static void omap_disc_write(void *opaque, hwaddr addr, uint64_t value, unsigned size) { struct omap_dss_s *s = (struct omap_dss_s *) opaque; if (size != 4) { omap_badwidth_write32(opaque, addr, value); return; } switch (addr) { case 0x010: /* ...
3,925
qemu
466787fbca9b25b47365b3d2c09d308df67a61db
0
static void bdrv_replace_child(BdrvChild *child, BlockDriverState *new_bs, bool check_new_perm) { BlockDriverState *old_bs = child->bs; uint64_t perm, shared_perm; if (old_bs) { /* Update permissions for old node. This is guaranteed to succeed * becau...
3,927
qemu
56943e8cc14b7eeeab67d1942fa5d8bcafe3e53f
0
void cpu_exec_init(CPUState *cpu, Error **errp) { CPUClass *cc = CPU_GET_CLASS(cpu); int cpu_index; Error *local_err = NULL; #ifndef CONFIG_USER_ONLY cpu->as = &address_space_memory; cpu->thread_id = qemu_get_thread_id(); #endif #if defined(CONFIG_USER_ONLY) cpu_list_lock(); #endi...
3,928
qemu
4be746345f13e99e468c60acbd3a355e8183e3ce
0
static int ide_qdev_init(DeviceState *qdev) { IDEDevice *dev = IDE_DEVICE(qdev); IDEDeviceClass *dc = IDE_DEVICE_GET_CLASS(dev); IDEBus *bus = DO_UPCAST(IDEBus, qbus, qdev->parent_bus); if (!dev->conf.bs) { error_report("No drive specified"); goto err; } if (dev->unit ...
3,929
qemu
1f001dc7bc9e435bf231a5b0edcad1c7c2bd6214
0
static int default_fdset_dup_fd_remove(int dup_fd) { return -1; }
3,930
qemu
4ec60c76d5ab513e375f17b043d2b9cb849adf6c
0
void pc_hot_add_cpu(const int64_t id, Error **errp) { X86CPU *cpu; ObjectClass *oc; PCMachineState *pcms = PC_MACHINE(qdev_get_machine()); int64_t apic_id = x86_cpu_apic_id_from_index(id); Error *local_err = NULL; if (id < 0) { error_setg(errp, "Invalid CPU id: %" PRIi64, id); ...
3,931
FFmpeg
3a8c95f730732b9f1ffacdbfbf79a01b202a67af
0
static void show_packet(AVFormatContext *fmt_ctx, AVPacket *pkt) { char val_str[128]; AVStream *st = fmt_ctx->streams[pkt->stream_index]; printf("[PACKET]\n"); printf("codec_type=%s\n", media_type_string(st->codec->codec_type)); printf("stream_index=%d\n", pkt->stream_index); printf("pt...
3,932
qemu
72cf2d4f0e181d0d3a3122e04129c58a95da713e
0
BusState *qbus_create(BusInfo *info, DeviceState *parent, const char *name) { BusState *bus; char *buf; int i,len; bus = qemu_mallocz(info->size); bus->info = info; bus->parent = parent; if (name) { /* use supplied name */ bus->name = qemu_strdup(name); } e...
3,934
qemu
67a0fd2a9bca204d2b39f910a97c7137636a0715
0
static int64_t coroutine_fn iscsi_co_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum) { IscsiLun *iscsilun = bs->opaque; struct scsi_get_lba_status *lbas = NULL; str...
3,935
qemu
9dbbc748d671c70599101836cd1c2719d92f3017
0
static inline void assert_fp_access_checked(DisasContext *s) { #ifdef CONFIG_DEBUG_TCG if (unlikely(!s->fp_access_checked || !s->cpacr_fpen)) { fprintf(stderr, "target-arm: FP access check missing for " "instruction 0x%08x\n", s->insn); abort(); } #endif }
3,936
qemu
a8170e5e97ad17ca169c64ba87ae2f53850dab4c
0
static void dp8393x_writew(void *opaque, target_phys_addr_t addr, uint32_t val) { dp8393xState *s = opaque; int reg; if ((addr & ((1 << s->it_shift) - 1)) != 0) { return; } reg = addr >> s->it_shift; write_register(s, reg, (uint16_t)val); }
3,937
qemu
bd269ebc82fbaa5fe7ce5bc7c1770ac8acecd884
0
socket_sockaddr_to_address_vsock(struct sockaddr_storage *sa, socklen_t salen, Error **errp) { SocketAddressLegacy *addr; VsockSocketAddress *vaddr; struct sockaddr_vm *svm = (struct sockaddr_vm *)sa; addr = g_new0(SocketAddressL...
3,938
qemu
7d5e199ade76c53ec316ab6779800581bb47c50a
0
QObject *object_property_get_qobject(Object *obj, const char *name, Error **errp) { QObject *ret = NULL; Error *local_err = NULL; Visitor *v; v = qmp_output_visitor_new(&ret); object_property_get(obj, v, name, &local_err); if (!local_err) { ...
3,939
qemu
a426e122173f36f05ea2cb72dcff77b7408546ce
0
static KVMSlot *kvm_alloc_slot(KVMState *s) { int i; for (i = 0; i < ARRAY_SIZE(s->slots); i++) { /* KVM private memory slots */ if (i >= 8 && i < 12) continue; if (s->slots[i].memory_size == 0) return &s->slots[i]; } fprintf(stderr, "%s: no ...
3,940
qemu
ad07cd69ecaffbaa015459a46975ab32e50df805
0
static void virtio_scsi_handle_event(VirtIODevice *vdev, VirtQueue *vq) { VirtIOSCSI *s = VIRTIO_SCSI(vdev); if (s->ctx) { virtio_scsi_dataplane_start(s); if (!s->dataplane_fenced) { return; } } virtio_scsi_handle_event_vq(s, vq); }
3,941
qemu
b436982f04fb33bb29fcdea190bd1fdc97dc65ef
0
static void mirror_do_zero_or_discard(MirrorBlockJob *s, int64_t sector_num, int nb_sectors, bool is_discard) { MirrorOp *op; /* Allocate a MirrorOp that is used as an AIO callback. The qiov...
3,942
FFmpeg
f20b67173ca6a05b8c3dee02dad3b7243b96292b
0
static int encode_individual_channel(AVCodecContext *avctx, AACEncContext *s, SingleChannelElement *sce, int common_window) { put_bits(&s->pb, 8, sce->sf_idx[0]); if (!common_window) { put_ics_info(s, &sce->ics); if...
3,943
qemu
f090c9d4ad5812fb92843d6470a1111c15190c4c
0
int float32_eq_signaling( float32 a, float32 b STATUS_PARAM ) { if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) ) { float_raise( float_flag_invalid STATUS_VAR); return 0; } ...
3,944
qemu
fd56e0612b6454a282fa6a953fdb09281a98c589
0
static void ich9_lpc_update_pic(ICH9LPCState *lpc, int gsi) { int i, pic_level; assert(gsi < ICH9_LPC_PIC_NUM_PINS); /* The pic level is the logical OR of all the PCI irqs mapped to it */ pic_level = 0; for (i = 0; i < ICH9_LPC_NB_PIRQS; i++) { int tmp_irq; int tmp_dis; ...
3,945
FFmpeg
2caf19e90f270abe1e80a3e85acaf0eb5c9d0aac
1
static void FUNCC(pred8x8_top_dc)(uint8_t *_src, int stride){ int i; int dc0, dc1; pixel4 dc0splat, dc1splat; pixel *src = (pixel*)_src; stride /= sizeof(pixel); dc0=dc1=0; for(i=0;i<4; i++){ dc0+= src[i-stride]; dc1+= src[4+i-stride]; } dc0splat = PIXEL_...
3,947
qemu
92335a0d4021a3b44ccc88c9fc6c0fd2113f1882
1
static uint64_t strongarm_gpio_read(void *opaque, hwaddr offset, unsigned size) { StrongARMGPIOInfo *s = opaque; switch (offset) { case GPDR: /* GPIO Pin-Direction registers */ return s->dir; case GPSR: /* GPIO Pin-Output Set registers...
3,948
FFmpeg
efc8c709c93875dffa4c4181fa9b56fa6d20d4c7
1
static int draw_glyphs(DrawTextContext *dtext, AVFilterBufferRef *picref, int width, int height, const uint8_t rgbcolor[4], const uint8_t yuvcolor[4], int x, int y) { char *text = dtext->text; uint32_t code = 0; int i; uint8_t *p; Glyph *glyph = NULL; for (i = 0,...
3,949
qemu
fedf0d35aafc4f1f1e5f6dbc80cb23ae1ae49f0b
1
static void text_console_resize(QemuConsole *s) { TextCell *cells, *c, *c1; int w1, x, y, last_width; last_width = s->width; s->width = surface_width(s->surface) / FONT_WIDTH; s->height = surface_height(s->surface) / FONT_HEIGHT; w1 = last_width; if (s->width < w1) w1 = ...
3,950
qemu
0696ae2c9236a3589f5eaf5b00c12868b6f30a17
1
static int qcow_create(const char *filename, QemuOpts *opts, Error **errp) { int header_size, backing_filename_len, l1_size, shift, i; QCowHeader header; uint8_t *tmp; int64_t total_size = 0; char *backing_file = NULL; Error *local_err = NULL; int ret; BlockBackend *qcow_blk; ...
3,951
FFmpeg
93593674bc8d85a40e0648f21a7cdbf3554f21ff
1
static int hls_append_segment(struct AVFormatContext *s, HLSContext *hls, double duration, int64_t pos, int64_t size) { HLSSegment *en = av_malloc(sizeof(*en)); const char *filename; int ret; if (!en) return AVERROR(ENOMEM); if ((hls->flags & (HLS_S...
3,952
FFmpeg
f6774f905fb3cfdc319523ac640be30b14c1bc55
1
static int x8_decode_intra_mb(IntraX8Context* const w, const int chroma){ MpegEncContext * const s= w->s; uint8_t * scantable; int final,run,level; int ac_mode,dc_mode,est_run,dc_level; int pos,n; int zeros_only; int use_quant_matrix; int sign; assert(w->orient<12); ...
3,953
qemu
d036bb215e0ac1d1fd467239f1d3b7d904cac90a
1
static void pci_device_reset(PCIDevice *dev) { int r; memset(dev->irq_state, 0, sizeof dev->irq_state); dev->config[PCI_COMMAND] &= ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); dev->config[PCI_CACHE_LINE_SIZE] = 0x0; dev->config[PCI_INTERRUP...
3,954
FFmpeg
568e18b15e2ddf494fd8926707d34ca08c8edce5
1
static int mov_read_stts(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) { AVStream *st = c->fc->streams[c->fc->nb_streams-1]; //MOVStreamContext *sc = (MOVStreamContext *)st->priv_data; int entries, i; int64_t duration=0; int64_t total_sample_count=0; print_atom("stts", atom); ...
3,957
FFmpeg
af1cb7ee4c6fb68904e94dc4cf243ba26b3cbb47
1
static int window(venc_context_t * venc, signed short * audio, int samples) { int i, j, channel; const float * win = venc->win[0]; int window_len = 1 << (venc->blocksize[0] - 1); float n = (float)(1 << venc->blocksize[0]) / 4.; // FIXME use dsp if (!venc->have_saved && !samples) return 0...
3,958
qemu
653dbec7c97cb51d19636423902719e5850da265
1
DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi, int *fatal_error) { const char *buf; const char *file = NULL; char devname[128]; const char *serial; const char *mediastr = ""; BlockInterfaceType type; enum { MEDIA_DISK, MEDIA_CDROM } media; int bus_id, unit_id; i...
3,959
FFmpeg
8d168a9207f231c22a04a5a2b252d0ab89477b02
1
static int rtsp_read_play(AVFormatContext *s) { RTSPState *rt = s->priv_data; RTSPMessageHeader reply1, *reply = &reply1; int i; char cmd[1024]; av_log(s, AV_LOG_DEBUG, "hello state=%d\n", rt->state); if (!(rt->server_type == RTSP_SERVER_REAL && rt->need_subscription)) { if (...
3,961
FFmpeg
83548fe894cdb455cc127f754d09905b6d23c173
0
static int aiff_read_header(AVFormatContext *s) { int size, filesize; int64_t offset = 0; uint32_t tag; unsigned version = AIFF_C_VERSION1; AVIOContext *pb = s->pb; AVStream * st; AIFFInputContext *aiff = s->priv_data; /* check FORM header */ filesize = get_tag(pb, &tag);...
3,962
qemu
efec3dd631d94160288392721a5f9c39e50fb2bc
1
static void piix4_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); k->no_hotplug = 1; k->init = piix4_initfn; k->vendor_id = PCI_VENDOR_ID_INTEL; k->device_id = PCI_DEVICE_ID_INTEL_82371AB_0; k->class_i...
3,963
FFmpeg
ba9a7e0d71bd34f8b89ae99322b62a310be163a6
1
static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, int flags) { AVIOContext *pb = &asf->pb; int res, mflags, len_...
3,964
FFmpeg
0ecca7a49f8e254c12a3a1de048d738bfbb614c6
1
int match_ext(const char *filename, const char *extensions) { const char *ext, *p; char ext1[32], *q; if(!filename) return 0; ext = strrchr(filename, '.'); if (ext) { ext++; p = extensions; for(;;) { q = ext1; while (*p != '...
3,965
FFmpeg
2c908f22c2af0775a6ffe3466aad174a0ace00dd
1
static int avi_read_header(AVFormatContext *s) { AVIContext *avi = s->priv_data; AVIOContext *pb = s->pb; unsigned int tag, tag1, handler; int codec_type, stream_index, frame_period; unsigned int size; int i; AVStream *st; AVIStream *ast = NULL; int avih_width = 0...
3,966
qemu
b2eb849d4b1fdb6f35d5c46958c7f703cf64cfef
1
static void cirrus_invalidate_region(CirrusVGAState * s, int off_begin, int off_pitch, int bytesperline, int lines) { int y; int off_cur; int off_cur_end; for (y = 0; y < lines; y++) { off_cur = off_begin; off_cur_end = off_cur + bytesperline; off_cur &= TARGET_PAGE_MASK...
3,967
FFmpeg
486637af8ef29ec215e0e0b7ecd3b5470f0e04e5
0
static inline float to_float(uint8_t exp, int16_t mantissa) { return ((float) (mantissa * scale_factors[exp])); }
3,972
FFmpeg
42dd22c4a5c8463488d442eeb234b822bcc39625
0
static int encode_init(AVCodecContext *avctx) { HYuvContext *s = avctx->priv_data; int i, j, width, height; s->avctx= avctx; s->flags= avctx->flags; dsputil_init(&s->dsp, avctx); width= s->width= avctx->width; height= s->height= avctx->height; assert(widt...
3,973
qemu
e7cf59e84767e30b507b6bd7c1347072ec12b636
1
void error_set_win32(Error **errp, int win32_err, ErrorClass err_class, const char *fmt, ...) { va_list ap; char *msg1, *msg2; if (errp == NULL) { return; } va_start(ap, fmt); error_setv(errp, err_class, fmt, ap); va_end(ap); if (win32_err !=...
3,975
FFmpeg
d68c05380cebf563915412182643a8be04ef890b
0
av_cold void ff_dither_init_x86(DitherDSPContext *ddsp, enum AVResampleDitherMethod method) { int cpu_flags = av_get_cpu_flags(); if (EXTERNAL_SSE2(cpu_flags)) { ddsp->quantize = ff_quantize_sse2; ddsp->ptr_align = 16; ddsp->samples_align...
3,976
qemu
937470bb5470825e781ae50e92ff973a6b54d80f
1
static int qio_channel_socket_dgram_worker(QIOTask *task, Error **errp, gpointer opaque) { QIOChannelSocket *ioc = QIO_CHANNEL_SOCKET(qio_task_get_source(task)); struct QIOChannelSocketDGramWorkerData *data = opaque; ...
3,978
qemu
f460be435f8750d5d1484d3d8b9e5b2c334f0e20
1
static void acpi_dsdt_add_cpus(Aml *scope, int smp_cpus) { uint16_t i; for (i = 0; i < smp_cpus; i++) { Aml *dev = aml_device("C%03x", i); aml_append(dev, aml_name_decl("_HID", aml_string("ACPI0007"))); aml_append(dev, aml_name_decl("_UID", aml_int(i))); aml_append(scope...
3,979
FFmpeg
6e24b9488e67849a28e64a8056e05f83cf439229
1
static int svq1_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; MpegEncContext *s=avctx->priv_data; uint8_t *current, *previous; int ...
3,980
FFmpeg
ebf5264cd6bbda6c0c379dfeaaba3b9afc3279a8
1
static int parse_object_segment(AVCodecContext *avctx, const uint8_t *buf, int buf_size) { PGSSubContext *ctx = avctx->priv_data; PGSSubObject *object; uint8_t sequence_desc; unsigned int rle_bitmap_len, width, height; int id; if (buf_size <= 4) ...
3,981
qemu
c53b7ddc61198c4af8290d6310592e48e3507c47
1
static int ram_load_postcopy(QEMUFile *f) { int flags = 0, ret = 0; bool place_needed = false; bool matching_page_sizes = qemu_host_page_size == TARGET_PAGE_SIZE; MigrationIncomingState *mis = migration_incoming_get_current(); /* Temporary page that is later 'placed' */ void *postcopy_hos...
3,982
qemu
661e32fb3cb71c7e019daee375be4bb487b9917c
1
static bool virtio_scsi_handle_cmd_req_prepare(VirtIOSCSI *s, VirtIOSCSIReq *req) { VirtIOSCSICommon *vs = &s->parent_obj; SCSIDevice *d; int rc; rc = virtio_scsi_parse_req(req, sizeof(VirtIOSCSICmdReq) + vs->cdb_size, sizeof(VirtIOSCSICmdResp) + vs->sense_size); ...
3,983
FFmpeg
5ff998a233d759d0de83ea6f95c383d03d25d88e
1
static void calc_sums(int pmin, int pmax, uint32_t *data, int n, int pred_order, uint32_t sums[][MAX_PARTITIONS]) { int i, j; int parts; uint32_t *res, *res_end; /* sums for highest level */ parts = (1 << pmax); res = &data[pred_order]; res_end = &data[...
3,985
qemu
2dc7fdf33d28940255f171b8ea4b692d9d5b7a7d
1
static MTPData *usb_mtp_get_object(MTPState *s, MTPControl *c, MTPObject *o) { MTPData *d = usb_mtp_data_alloc(c); trace_usb_mtp_op_get_object(s->dev.addr, o->handle, o->path); d->fd = open(o->path, O_RDONLY); if (d->fd == -1) { return NULL; } ...
3,986
FFmpeg
f6774f905fb3cfdc319523ac640be30b14c1bc55
1
static void init_block_index(VC1Context *v) { MpegEncContext *s = &v->s; ff_init_block_index(s); if (v->field_mode && !(v->second_field ^ v->tff)) { s->dest[0] += s->current_picture_ptr->f.linesize[0]; s->dest[1] += s->current_picture_ptr->f.linesize[1]; s->dest[2] += s->curre...
3,987
qemu
70556264a89a268efba1d7e8e341adcdd7881eb4
1
bool qvirtio_wait_queue_isr(const QVirtioBus *bus, QVirtioDevice *d, QVirtQueue *vq, uint64_t timeout) { do { clock_step(100); if (bus->get_queue_isr_status(d, vq)) { break; /* It has ended */ } } while (--timeout); r...
3,989
FFmpeg
eddd580b743692bc930692cb0c5a3e930ab45ad4
1
static int64_t mkv_write_cues(AVIOContext *pb, mkv_cues *cues, int num_tracks) { ebml_master cues_element; int64_t currentpos; int i, j; currentpos = avio_tell(pb); cues_element = start_ebml_master(pb, MATROSKA_ID_CUES, 0); for (i = 0; i < cues->num_entries; i++) { ebml_maste...
3,990
FFmpeg
59b126f92225316e0cd77bb952d630553801dc85
1
static int dxva2_device_create9ex(AVHWDeviceContext *ctx, UINT adapter) { DXVA2DevicePriv *priv = ctx->user_opaque; D3DPRESENT_PARAMETERS d3dpp = dxva2_present_params; D3DDISPLAYMODEEX modeex = {0}; IDirect3D9Ex *d3d9ex = NULL; IDirect3DDevice9Ex *exdev = NULL; HRESULT hr; pDirect3DC...
3,991
FFmpeg
39ee3ddff87a12e108fc4e0d36f756d0ca080472
1
static void mov_metadata_creation_time(AVDictionary **metadata, int64_t time) { if (time) { if(time >= 2082844800) time -= 2082844800; /* seconds between 1904-01-01 and Epoch */ avpriv_dict_set_timestamp(metadata, "creation_time", time * 1000000);
3,993
FFmpeg
7c9f739d864c0ed8f1b433d6a7d9f674edda9cf5
1
static void register_all(void) { /* hardware accelerators */ REGISTER_HWACCEL(H263_VAAPI, h263_vaapi); REGISTER_HWACCEL(H263_VIDEOTOOLBOX, h263_videotoolbox); REGISTER_HWACCEL(H264_CUVID, h264_cuvid); REGISTER_HWACCEL(H264_D3D11VA, h264_d3d11va); REGISTER_HWACCEL(H264_D...
3,995
qemu
83f7f32901c630f4fc01acd0d9082da466b17102
1
void load_psw(CPUS390XState *env, uint64_t mask, uint64_t addr) { uint64_t old_mask = env->psw.mask; env->psw.addr = addr; env->psw.mask = mask; if (tcg_enabled()) { env->cc_op = (mask >> 44) & 3; } if ((old_mask ^ mask) & PSW_MASK_PER) { s390_cpu_recompute_watchpoin...
3,996
FFmpeg
d87ff555025e90ef285425216c29be95034e2485
0
static int amr_read_packet(AVFormatContext *s, AVPacket *pkt) { AVCodecContext *enc = s->streams[0]->codec; int read, size = 0, toc, mode; int64_t pos = avio_tell(s->pb); if (url_feof(s->pb)) { return AVERROR(EIO); } // FIXME this is wrong, this should rather be in a AVParset...
3,997
FFmpeg
3c895fc098f7637f6d5ec3a9d6766e724a8b9e41
0
static int rm_write_audio(AVFormatContext *s, const uint8_t *buf, int size) { uint8_t *buf1; RMContext *rm = s->priv_data; ByteIOContext *pb = &s->pb; StreamInfo *stream = rm->audio_stream; int i; /* XXX: suppress this malloc */ buf1= (uint8_t*) av_malloc( size * sizeof(uint8_t) );...
3,998
FFmpeg
d1adad3cca407f493c3637e20ecd4f7124e69212
0
static inline void RENAME(bgr24ToY)(uint8_t *dst, const uint8_t *src, long width, uint32_t *unused) { #if COMPILE_TEMPLATE_MMX RENAME(bgr24ToY_mmx)(dst, src, width, PIX_FMT_BGR24); #else int i; for (i=0; i<width; i++) { int b= src[i*3+0]; int g= src[i*3+1]; int r= src[i*3+2]...
3,999
FFmpeg
b5da07d4340a8e8e40dcd1900977a76ff31fbb84
0
void ff_put_h264_qpel8_mc30_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_hz_qrt_8w_msa(src - 2, stride, dst, stride, 8, 1); }
4,000
FFmpeg
353a2d2164c09740e42f33014c4773b93e96a0d2
0
static int bmp_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; BMPContext *s = avctx->priv_data; AVFrame *picture = data; AVFrame *p = &s->...
4,001
FFmpeg
38893dc028e458eaf3f906833d4ee515689edb7e
0
static int pcm_read_packet(AVFormatContext *s, AVPacket *pkt) { int ret, size, bps; // AVStream *st = s->streams[0]; size= RAW_SAMPLES*s->streams[0]->codec->block_align; ret= av_get_packet(s->pb, pkt, size); pkt->stream_index = 0; if (ret < 0) return ret; bps= av_...
4,002
FFmpeg
d1bdaf3fb2c45020f72a378bb64eab1bf136581c
1
static void dump_stream_format(AVFormatContext *ic, int i, int index, int is_output) { char buf[256]; int flags = (is_output ? ic->oformat->flags : ic->iformat->flags); AVStream *st = ic->streams[i]; AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NUL...
4,003
FFmpeg
56e11ebf55a5e51a8a7131d382c2020e35d34f42
1
static av_cold int encode_close(AVCodecContext *avctx) { if (avctx->priv_data) { DCAEncContext *c = avctx->priv_data; subband_bufer_free(c); ff_dcaadpcm_free(&c->adpcm_ctx); } return 0; }
4,004
qemu
baf35cb90204d75404892aa4e52628ae7a00669b
1
static int bdrv_read_em(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sectors) { int async_ret; BlockDriverAIOCB *acb; async_ret = NOT_DONE; qemu_aio_wait_start(); acb = bdrv_aio_read(bs, sector_num, buf, nb_sectors, bdrv_rw_...
4,005
qemu
544a3731591f5d53e15f22de00ce5ac758d490b3
1
void hmp_info_cpus(Monitor *mon, const QDict *qdict) { CpuInfoList *cpu_list, *cpu; cpu_list = qmp_query_cpus(NULL); for (cpu = cpu_list; cpu; cpu = cpu->next) { int active = ' '; if (cpu->value->CPU == monitor_get_cpu_index()) { active = '*'; } m...
4,007
qemu
8c56c1a592b5092d91da8d8943c17777d6462a6f
1
MemTxResult memory_region_dispatch_write(MemoryRegion *mr, hwaddr addr, uint64_t data, unsigned size, MemTxAttrs attrs) { if (!memory_region_access_vali...
4,008
FFmpeg
979bea13003ef489d95d2538ac2fb1c26c6f103b
0
static int svq3_decode_mb(SVQ3Context *svq3, unsigned int mb_type) { H264Context *h = &svq3->h; int i, j, k, m, dir, mode; int cbp = 0; uint32_t vlc; int8_t *top, *left; MpegEncContext *const s = (MpegEncContext *) h; const int mb_xy = h->mb_xy; const int b_xy = 4*s->mb_x + 4*s...
4,010
FFmpeg
a26e9c1040afeecf9013da742b0dec7009445f2b
0
static int amv_encode_picture(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pic_arg, int *got_packet) { MpegEncContext *s = avctx->priv_data; AVFrame *pic; int i, ret; int chroma_h_shift, chroma_v_shift; av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt,...
4,011
FFmpeg
37d93fdbf0fec0eac885974c01fba99826ae7763
0
static int mpeg1_decode_sequence(AVCodecContext *avctx, const uint8_t *buf, int buf_size) { Mpeg1Context *s1 = avctx->priv_data; MpegEncContext *s = &s1->mpeg_enc_ctx; int width, height; int i, v, j; init_get_bits(&s->gb, buf, buf_size * 8); width =...
4,012
FFmpeg
073c2593c9f0aa4445a6fc1b9b24e6e52a8cc2c1
1
static int build_table(VLC *vlc, int table_nb_bits, int nb_codes, const void *bits, int bits_wrap, int bits_size, const void *codes, int codes_wrap, int codes_size, uint32_t code_prefix, int n_prefix) { int i, j, k, n,...
4,013
FFmpeg
b19bfd6c9f42588c7a172bb019e27696972b8d2c
1
av_cold static int lavfi_read_header(AVFormatContext *avctx) { LavfiContext *lavfi = avctx->priv_data; AVFilterInOut *input_links = NULL, *output_links = NULL, *inout; AVFilter *buffersink, *abuffersink; int *pix_fmts = create_all_formats(AV_PIX_FMT_NB); enum AVMediaType type; int ret = 0...
4,014
qemu
dc8764f06155a7b3e635e02281b747a9e292127e
1
static gboolean register_signal_handlers(void) { struct sigaction sigact, sigact_chld; int ret; memset(&sigact, 0, sizeof(struct sigaction)); sigact.sa_handler = quit_handler; ret = sigaction(SIGINT, &sigact, NULL); if (ret == -1) { g_error("error configuring signal handler: ...
4,015
qemu
248b920df95a5e3df10c16be63b017653c7ba730
1
static void sch_handle_start_func_virtual(SubchDev *sch) { PMCW *p = &sch->curr_status.pmcw; SCSW *s = &sch->curr_status.scsw; int path; int ret; bool suspend_allowed; /* Path management: In our simple css, we always choose the only path. */ path = 0x80; if (!(s->ctrl & SC...
4,016
FFmpeg
7afd42d9f26be1e95f15cbcfa0e09308a6591036
1
static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamples) { AVFilterContext *ctx = inlink->dst; AVFilterLink *outlink = ctx->outputs[0]; ShowWavesContext *showwaves = ctx->priv; const int nb_samples = insamples->audio->nb_samples; AVFilterBufferRef *outpicref = showwaves->o...
4,018
FFmpeg
e62ff72fc1052273deb708ba715f73e5187281d4
1
int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options) { int ret = 0; AVDictionary *tmp = NULL; if (avcodec_is_open(avctx)) return 0; if ((!codec && !avctx->codec)) { av_log(avctx, AV_LOG_ERROR, "No codec provided to avcodec_open2().\n"...
4,019
FFmpeg
6f40e9f070f7a6ccf745561409ddbcc2be5e47e5
0
DECLARE_LOOP_FILTER(mmxext) DECLARE_LOOP_FILTER(sse2) DECLARE_LOOP_FILTER(ssse3) DECLARE_LOOP_FILTER(sse4) #endif /* HAVE_YASM */ #define VP8_LUMA_MC_FUNC(IDX, SIZE, OPT) \ c->put_vp8_epel_pixels_tab[IDX][0][2] = ff_put_vp8_epel ## SIZE ## _h6_ ## OPT; \ c->put_vp8_epel_pixels_tab[IDX][2][0] = ff_put...
4,020
FFmpeg
237ccd8a165d2128e8c6bcb14c8c6c3e793cfe05
0
static av_always_inline int get_dst_color_err(PaletteUseContext *s, uint32_t c, int *er, int *eg, int *eb, const enum color_search_method search_method) { const uint8_t a = c >> 24 & 0xff; const uint8_t r = c >> 16 ...
4,021
FFmpeg
68f8d33becbd73b4d0aa277f472a6e8e72ea6849
0
static inline void put_symbol_inline(RangeCoder *c, uint8_t *state, int v, int is_signed){ int i; if(v){ const int a= FFABS(v); const int e= av_log2(a); put_rac(c, state+0, 0); assert(e<=9); for(i=0; i<e; i++){ put_rac(c, state+1+i, 1); //1..10 ...
4,022
FFmpeg
7e7e59409294af9caa63808e56c5cc824c98b4fc
0
static void rgb24_to_rgb555(AVPicture *dst, AVPicture *src, int width, int height) { const unsigned char *p; unsigned char *q; int r, g, b, dst_wrap, src_wrap; int x, y; p = src->data[0]; src_wrap = src->linesize[0] - 3 * width; q = dst->data[0]; ...
4,023
FFmpeg
bcd7bf7eeb09a395cc01698842d1b8be9af483fc
0
static void avc_wgt_8width_msa(uint8_t *data, int32_t stride, int32_t height, int32_t log2_denom, int32_t src_weight, int32_t offset_in) { uint8_t cnt; ...
4,024
FFmpeg
0c22311b56e66115675c4a96e4c78547886a4171
0
static void opt_frame_pad_left(const char *arg) { frame_padleft = atoi(arg); if (frame_padleft < 0) { fprintf(stderr, "Incorrect left pad size\n"); av_exit(1); } }
4,027
qemu
5f706fdc164b20b48254eadf7bd413edace34499
1
ssize_t cpu_get_note_size(int class, int machine, int nr_cpus) { int name_size = 8; /* "CORE" or "QEMU" rounded */ size_t elf_note_size = 0; int note_head_size; const NoteFuncDesc *nf; assert(class == ELFCLASS64); assert(machine == EM_S390); note_head_size = sizeof(Elf64_Nhdr); ...
4,028
qemu
e313d5cec564a9b708bad1bb44c291530a5a4935
1
static void add_query_tests(QmpSchema *schema) { SchemaInfoList *tail; SchemaInfo *si, *arg_type, *ret_type; const char *test_name; /* Test the query-like commands */ for (tail = schema->list; tail; tail = tail->next) { si = tail->value; if (si->meta_type != SCHEMA_META_TYP...
4,031
qemu
12d4536f7d911b6d87a766ad7300482ea663cea2
1
static void cpu_handle_guest_debug(CPUState *env) { gdb_set_stop_cpu(env); qemu_system_debug_request(); #ifdef CONFIG_IOTHREAD env->stopped = 1; #endif }
4,032
qemu
aa4a3dce1c88ed51b616806b8214b7c8428b7470
1
vmxnet3_io_bar1_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { VMXNET3State *s = opaque; switch (addr) { /* Vmxnet3 Revision Report Selection */ case VMXNET3_REG_VRRS: VMW_CBPRN("Write BAR1 [VMXNET3_REG...
4,033
qemu
cfc87e00c22ab4ea0262c9771c803ed03d754001
1
static int64_t alloc_block(BlockDriverState* bs, int64_t offset) { BDRVVPCState *s = bs->opaque; int64_t bat_offset; uint32_t index, bat_value; int ret; uint8_t bitmap[s->bitmap_size]; /* Check if sector_num is valid */ if ((offset < 0) || (offset > bs->total_sectors * BDRV_SECTOR_...
4,035
FFmpeg
7f526efd17973ec6d2204f7a47b6923e2be31363
1
static inline void RENAME(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, unsigned int src_size) { const uint8_t *s = src; const uint8_t *end; #ifdef HAVE_MMX const uint8_t *mm_end; #endif uint16_t *d = (uint16_t *)dst; end = s + src_size; #ifdef HAVE_MMX __asm __volatile(PREFETCH" %0"::"m"(*src):"memor...
4,036
FFmpeg
fc8cff96ed45dfdb91ed03e9942845f28be0e770
1
int ff_h264_decode_mb_cavlc(const H264Context *h, H264SliceContext *sl) { int mb_xy; int partition_count; unsigned int mb_type, cbp; int dct8x8_allowed= h->ps.pps->transform_8x8_mode; int decode_chroma = h->ps.sps->chroma_format_idc == 1 || h->ps.sps->chroma_format_idc == 2; const int pix...
4,037
qemu
0c9390d978cbf61e8f16c9f580fa96b305c43568
1
static void client_close(NBDClient *client) { if (client->closing) { return; } client->closing = true; /* Force requests to finish. They will drop their own references, * then we'll close the socket and free the NBDClient. */ qio_channel_shutdown(client->ioc, QIO_CHAN...
4,038
FFmpeg
43492ff3ab68a343c1264801baa1d5a02de10167
0
static int init_tile(Jpeg2000DecoderContext *s, int tileno) { int compno; int tilex = tileno % s->numXtiles; int tiley = tileno / s->numXtiles; Jpeg2000Tile *tile = s->tile + tileno; if (!tile->comp) return AVERROR(ENOMEM); tile->coord[0][0] = FFMAX(tilex * s->tile_widt...
4,039
FFmpeg
1181d93231e9b807965724587d363c1cfd5a1d0d
0
void ff_avg_h264_qpel8_mc11_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_hv_qrt_and_aver_dst_8x8_msa(src - 2, src - (stride * 2), stride, dst, stride); }
4,040
FFmpeg
9568b2e425f127031ddc91dd78cb9b9f2cae206d
1
int ff_h264_decode_picture_parameter_set(GetBitContext *gb, AVCodecContext *avctx, H264ParamSets *ps, int bit_length) { AVBufferRef *pps_buf; const SPS *sps; unsigned int pps_id = get_ue_golomb(gb); PPS *pps; int qp_bd_offset; int bits_left; ...
4,042
qemu
630530a6529bc3da9ab8aead7053dc753cb9ac77
1
static int vmdk_read(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sectors) { BDRVVmdkState *s = bs->opaque; int index_in_cluster, n, ret; uint64_t cluster_offset; while (nb_sectors > 0) { cluster_offset = get_cluster_offset(bs, sector_num << 9, 0);...
4,043
FFmpeg
74dc728a2c2cc353da20cdc09b8cdfbbe14b7be8
1
int32_t ff_mlp_pack_output(int32_t lossless_check_data, uint16_t blockpos, int32_t (*sample_buffer)[MAX_CHANNELS], void *data, uint8_t *ch_assign, int8_t *output_shift, ...
4,044