project stringclasses 2
values | commit_id stringlengths 40 40 | target int64 0 1 | func stringlengths 26 142k | idx int64 0 27.3k |
|---|---|---|---|---|
qemu | 8d04fb55dec381bc5105cb47f29d918e579e8cbd | 1 | void HELPER(set_cp_reg)(CPUARMState *env, void *rip, uint32_t value)
{
const ARMCPRegInfo *ri = rip;
ri->writefn(env, ri, value);
}
| 8,474 |
FFmpeg | f3c9d66bafde9b8586bd63dd3307daa87352af75 | 0 | static int libspeex_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
LibSpeexContext *s = avctx->priv_data;
int16_t *output;
int ret, consumed = 0;
/* get outp... | 8,475 |
qemu | efec3dd631d94160288392721a5f9c39e50fb2bc | 1 | static void vmport_class_initfn(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = vmport_realizefn;
dc->no_user = 1;
}
| 8,476 |
qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | 1 | void qemu_file_skip(QEMUFile *f, int size)
{
if (f->buf_index + size <= f->buf_size) {
f->buf_index += size;
}
}
| 8,477 |
FFmpeg | b6f1e7ec44dfaa7c8a49c14221b977d4052adb4d | 1 | static int doTest(uint8_t *ref[4], int refStride[4], int w, int h,
enum PixelFormat srcFormat, enum PixelFormat dstFormat,
int srcW, int srcH, int dstW, int dstH, int flags)
{
uint8_t *src[4] = {0};
uint8_t *dst[4] = {0};
uint8_t *out[4] = {0};
int srcStride[4]... | 8,478 |
FFmpeg | 2f11aa141a01f97c5d2a015bd9dbdb27314b79c4 | 1 | static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
{
mp_image_t *dmpi;
// hope we'll get DR buffer:
dmpi=ff_vf_get_image(vf->next, IMGFMT_YV12,
MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE |
((vf->priv->scaleh == 1) ... | 8,479 |
qemu | 74892d2468b9f0c56b915ce94848d6f7fac39740 | 1 | static void runstate_init(void)
{
const RunStateTransition *p;
memset(&runstate_valid_transitions, 0, sizeof(runstate_valid_transitions));
for (p = &runstate_transitions_def[0]; p->from != RUN_STATE_MAX; p++) {
runstate_valid_transitions[p->from][p->to] = true;
}
}
| 8,480 |
FFmpeg | cbb277988afc7032e632393e2c96a70d4389ac4f | 0 | static void decode_vui(HEVCContext *s, HEVCSPS *sps)
{
VUI *vui = &sps->vui;
GetBitContext *gb = &s->HEVClc->gb;
GetBitContext backup;
int sar_present, alt = 0;
av_log(s->avctx, AV_LOG_DEBUG, "Decoding VUI\n");
sar_present = get_bits1(gb);
if (sar_present) {
uin... | 8,481 |
FFmpeg | 28d82b7675bea76a1349070a3cdd737d964d4775 | 0 | void ff_vc1_interp_mc(VC1Context *v)
{
MpegEncContext *s = &v->s;
H264ChromaContext *h264chroma = &v->h264chroma;
uint8_t *srcY, *srcU, *srcV;
int dxy, mx, my, uvmx, uvmy, src_x, src_y, uvsrc_x, uvsrc_y;
int off, off_uv;
int v_edge_pos = s->v_edge_pos >> v->field_mode;
int use_ic = v... | 8,483 |
FFmpeg | 3b199d29cd597a3518136d78860e172060b9e83d | 0 | static av_cold int msrle_decode_init(AVCodecContext *avctx)
{
MsrleContext *s = avctx->priv_data;
s->avctx = avctx;
switch (avctx->bits_per_coded_sample) {
case 4:
case 8:
avctx->pix_fmt = AV_PIX_FMT_PAL8;
break;
case 24:
avctx->pix_fmt = AV_PIX_FMT_BGR24;
... | 8,484 |
FFmpeg | 8b0e96e1f21b761ca15dbb470cd619a1ebf86c3e | 0 | static int mm_decode_intra(MmContext * s, int half_horiz, int half_vert)
{
int x = 0, y = 0;
while (bytestream2_get_bytes_left(&s->gb) > 0) {
int run_length, color;
if (y >= s->avctx->height)
return 0;
color = bytestream2_get_byte(&s->gb);
if (color & 0x... | 8,485 |
FFmpeg | f5fbbbc022f723d3ccf99afd5d658a977b51c08a | 0 | static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size, UID uid, int64_t klv_offset)
{
MXFContext *mxf = arg;
MXFPartition *partition;
UID op;
uint64_t footer_partition;
uint32_t nb_essence_containers;
int err;
if (mxf->partitions_count+1 >= UINT_MAX / siz... | 8,486 |
FFmpeg | bd03c380ce67cffaaf3c456407cc98e02917ebf7 | 0 | char *av_base64_encode(uint8_t * src, int len)
{
static const char b64[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
char *ret, *dst;
unsigned i_bits = 0;
int i_shift = 0;
int bytes_remaining = len;
if (len < UINT_MAX / 4) {
ret = dst = av_mal... | 8,488 |
FFmpeg | dcc39ee10e82833ce24aa57926c00ffeb1948198 | 0 | av_cold void ff_blockdsp_init_x86(BlockDSPContext *c,
AVCodecContext *avctx)
#else
av_cold void ff_blockdsp_init_x86(BlockDSPContext *c)
#endif /* FF_API_XVMC */
{
#if HAVE_INLINE_ASM
int cpu_flags = av_get_cpu_flags();
if (INLINE_MMX(cpu_flags)) {
c->clear_b... | 8,489 |
FFmpeg | dcf5bfbdb6137ffdca66e0b7c2929ced42732951 | 0 | static int read_bfraction(VC1Context *v, GetBitContext* gb) {
v->bfraction_lut_index = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1);
v->bfraction = ff_vc1_bfraction_lut[v->bfraction_lut_index];
return 0;
}
| 8,490 |
FFmpeg | e70fcf075b8f92c4e410b80c703fbdc1d531d42d | 1 | AVStream *add_video_stream(AVFormatContext *oc, int codec_id)
{
AVCodec *codec;
AVCodecContext *c;
AVStream *st;
uint8_t *picture_buf;
int size;
st = av_new_stream(oc, 0);
if (!st) {
fprintf(stderr, "Could not alloc stream\n");
exit(1);
}
/* find t... | 8,491 |
FFmpeg | ac4b32df71bd932838043a4838b86d11e169707f | 1 | const uint8_t *get_submv_prob(uint32_t left, uint32_t top)
{
if (left == top)
return vp8_submv_prob[4 - !!left];
if (!top)
return vp8_submv_prob[2];
return vp8_submv_prob[1 - !!left];
}
| 8,492 |
qemu | 027d9a7d2911e993cdcbd21c7c35d1dd058f05bb | 1 | static inline void cpu_handle_interrupt(CPUState *cpu,
TranslationBlock **last_tb)
{
CPUClass *cc = CPU_GET_CLASS(cpu);
int interrupt_request = cpu->interrupt_request;
if (unlikely(interrupt_request)) {
if (unlikely(cpu->singlestep_enabled & SSTEP_NOIR... | 8,493 |
qemu | 60fe637bf0e4d7989e21e50f52526444765c63b4 | 1 | int qemu_get_byte(QEMUFile *f)
{
int result;
result = qemu_peek_byte(f, 0);
qemu_file_skip(f, 1);
return result;
}
| 8,494 |
qemu | d8b2239bcd8872a5c5f7534d1658fc2365caab2d | 1 | bool cpu_restore_state(CPUState *cpu, uintptr_t retaddr)
{
TranslationBlock *tb;
bool r = false;
tb_lock();
tb = tb_find_pc(retaddr);
if (tb) {
cpu_restore_state_from_tb(cpu, tb, retaddr);
if (tb->cflags & CF_NOCACHE) {
/* one-shot translation, invalidate it immediately *... | 8,495 |
qemu | 262e1eaafabf32d33a9fa0b03b3c8ea426c5ae1b | 1 | pflash_t *pflash_cfi01_register(target_phys_addr_t base,
DeviceState *qdev, const char *name,
target_phys_addr_t size,
BlockDriverState *bs, uint32_t sector_len,
int nb_blocs, int width,
... | 8,496 |
qemu | 7f102ebeb5bad7b723a25557234b0feb493f6134 | 1 | static int uhci_handle_td(UHCIState *s, UHCIQueue *q, uint32_t qh_addr,
UHCI_TD *td, uint32_t td_addr, uint32_t *int_mask)
{
int len = 0, max_len;
bool spd;
bool queuing = (q != NULL);
uint8_t pid = td->token & 0xff;
UHCIAsync *async = uhci_async_find_td(s, td_addr);
if... | 8,497 |
qemu | 4ca1d3401b834662efddd12bd62ad80f5ef1ef05 | 1 | static int writev_f(BlockBackend *blk, int argc, char **argv)
{
struct timeval t1, t2;
bool Cflag = false, qflag = false;
int flags = 0;
int c, cnt;
char *buf;
int64_t offset;
/* Some compilers get confused and warn if this is not initialized. */
int total = 0;
int nr_iov;... | 8,498 |
FFmpeg | 773eb74babe07bc5c97c32aa564efc40e2d4b00c | 1 | libAVMemInputPin_Receive(libAVMemInputPin *this, IMediaSample *sample)
{
libAVPin *pin = (libAVPin *) ((uint8_t *) this - imemoffset);
enum dshowDeviceType devtype = pin->filter->type;
void *priv_data;
uint8_t *buf;
int buf_size;
int index;
int64_t curtime;
dshowdebug("libAVMe... | 8,499 |
FFmpeg | 50866c8d95bfd97c299199aec0d68291f38a72e1 | 1 | static int vp9_decode_frame(AVCodecContext *avctx, AVFrame *frame,
int *got_frame, const uint8_t *data, int size)
{
VP9Context *s = avctx->priv_data;
int ret, tile_row, tile_col, i, ref = -1, row, col;
ptrdiff_t yoff = 0, uvoff = 0;
ret = decode_frame_header(avctx, da... | 8,500 |
qemu | 46536235d80a012cc4286b71426cafad0c7f41f0 | 1 | static int parallels_open(BlockDriverState *bs, int flags)
{
BDRVParallelsState *s = bs->opaque;
int i;
struct parallels_header ph;
bs->read_only = 1; // no write support yet
if (bdrv_pread(bs->file, 0, &ph, sizeof(ph)) != sizeof(ph))
goto fail;
if (memcmp(ph.magic, HEADER_... | 8,501 |
FFmpeg | 104d04182d85e8538e8934c072432a05ab7ed999 | 1 | int inet_aton (const char * str, struct in_addr * add)
{
const char * pch = str;
unsigned int add1 = 0, add2 = 0, add3 = 0, add4 = 0;
add1 = atoi(pch);
pch = strpbrk(pch,".");
if (pch == 0 || ++pch == 0) goto done;
add2 = atoi(pch);
pch = strpbrk(pch,".");
if (pch == 0 || ++pc... | 8,502 |
qemu | 70556264a89a268efba1d7e8e341adcdd7881eb4 | 1 | static void pci_indirect(void)
{
QVirtioPCIDevice *dev;
QPCIBus *bus;
QVirtQueuePCI *vqpci;
QGuestAllocator *alloc;
QVirtioBlkReq req;
QVRingIndirectDesc *indirect;
void *addr;
uint64_t req_addr;
uint64_t capacity;
uint32_t features;
uint32_t free_head;
uint8... | 8,503 |
qemu | 3caab54d081bb3ce1b237d9628dd2b8ee7680159 | 1 | static void qvirtio_scsi_pci_free(QVirtIOSCSI *vs)
{
int i;
for (i = 0; i < vs->num_queues + 2; i++) {
qvirtqueue_cleanup(vs->dev->bus, vs->vq[i], vs->qs->alloc);
}
qvirtio_pci_device_disable(container_of(vs->dev, QVirtioPCIDevice, vdev));
g_free(vs->dev);
qvirtio_scsi_stop(vs-... | 8,504 |
FFmpeg | 9b7a8bddac52bd05dddb28afd4dff92739946d3b | 1 | static void *circular_buffer_task_tx( void *_URLContext)
{
URLContext *h = _URLContext;
UDPContext *s = h->priv_data;
int old_cancelstate;
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old_cancelstate);
for(;;) {
int len;
uint8_t tmp[4];
pthread_setcancelstat... | 8,505 |
FFmpeg | e27be795f019a8ba41c33b0cf0e3a060069252ea | 1 | int ff_lpc_calc_coefs(LPCContext *s,
const int32_t *samples, int blocksize, int min_order,
int max_order, int precision,
int32_t coefs[][MAX_LPC_ORDER], int *shift,
enum FFLPCType lpc_type, int lpc_passes,
... | 8,506 |
qemu | 2bd01ac1e238c76e201ba21f314cec46437d2c5a | 1 | static void string_deserialize(void **native_out, void *datap,
VisitorFunc visit, Error **errp)
{
StringSerializeData *d = datap;
d->siv = string_input_visitor_new(string_output_get_string(d->sov));
visit(string_input_get_visitor(d->siv), native_out, errp);
}
| 8,507 |
FFmpeg | ec4c48397641dbaf4ae8df36c32aaa5a311a11bf | 1 | static int rtp_read_header(AVFormatContext *s)
{
uint8_t recvbuf[RTP_MAX_PACKET_LENGTH];
char host[500], sdp[500];
int ret, port;
URLContext* in = NULL;
int payload_type;
AVCodecContext codec = { 0 };
struct sockaddr_storage addr;
AVIOContext pb;
socklen_t addrlen = sizeof(... | 8,508 |
qemu | 35ecde26018207fe723bec6efbd340db6e9c2d53 | 1 | static void qemu_aio_wait_all(void)
{
while (aio_poll(ctx, true)) {
/* Do nothing */
}
}
| 8,509 |
FFmpeg | d6ded94036e43a04889f4ff2813a7f7dd60b82fe | 1 | static int send_invoke_response(URLContext *s, RTMPPacket *pkt)
{
RTMPContext *rt = s->priv_data;
double seqnum;
char filename[64];
char command[64];
int stringlen;
char *pchar;
const uint8_t *p = pkt->data;
uint8_t *pp = NULL;
RTMPPacket spkt = { 0 };
GetByteCon... | 8,510 |
qemu | 49dd946bb5419681c8668b09a6d10f42bc707b78 | 1 | static void coroutine_fn v9fs_open(void *opaque)
{
int flags;
int32_t fid;
int32_t mode;
V9fsQID qid;
int iounit = 0;
ssize_t err = 0;
size_t offset = 7;
struct stat stbuf;
V9fsFidState *fidp;
V9fsPDU *pdu = opaque;
V9fsState *s = pdu->s;
if (s->proto_versi... | 8,511 |
qemu | 5839e53bbc0fec56021d758aab7610df421ed8c8 | 1 | static void init_blk_migration_it(void *opaque, BlockDriverState *bs)
{
BlkMigDevState *bmds;
int64_t sectors;
if (!bdrv_is_read_only(bs)) {
sectors = bdrv_nb_sectors(bs);
if (sectors <= 0) {
return;
}
bmds = g_malloc0(sizeof(BlkMigDevState));
... | 8,512 |
qemu | 87e459a810d7b1ec1638085b5a80ea3d9b43119a | 1 | static void megasas_command_complete(SCSIRequest *req, uint32_t status,
size_t resid)
{
MegasasCmd *cmd = req->hba_private;
uint8_t cmd_status = MFI_STAT_OK;
trace_megasas_command_complete(cmd->index, status, resid);
if (req->io_canceled) {
return;... | 8,513 |
FFmpeg | 0b54f3c0878a3acaa9142e4f24942e762d97e350 | 1 | static void GLZWDecodeInit(GifState * s, int csize)
{
/* read buffer */
s->eob_reached = 0;
s->pbuf = s->buf;
s->ebuf = s->buf;
s->bbuf = 0;
s->bbits = 0;
/* decoder */
s->codesize = csize;
s->cursize = s->codesize + 1;
s->curmask = mask[s->cursize];
s->top_slot... | 8,514 |
FFmpeg | 220b24c7c97dc033ceab1510549f66d0e7b52ef1 | 1 | SchroFrame *ff_create_schro_frame(AVCodecContext *avctx,
SchroFrameFormat schro_frame_fmt)
{
AVFrame *p_pic;
SchroFrame *p_frame;
int y_width, uv_width;
int y_height, uv_height;
int i;
y_width = avctx->width;
y_height = avctx->height;
uv_w... | 8,515 |
FFmpeg | 1ca87d600bc069fe4cf497c410b4f794e88a122d | 1 | static int applehttp_open(URLContext *h, const char *uri, int flags)
{
AppleHTTPContext *s;
int ret, i;
const char *nested_url;
if (flags & AVIO_FLAG_WRITE)
return AVERROR(ENOSYS);
s = av_mallocz(sizeof(AppleHTTPContext));
if (!s)
return AVERROR(ENOMEM);
h->priv... | 8,516 |
FFmpeg | d7e9533aa06f4073a27812349b35ba5fede11ca1 | 1 | static int mpeg_decode_slice(AVCodecContext *avctx,
AVPicture *pict,
int start_code,
UINT8 *buf, int buf_size)
{
Mpeg1Context *s1 = avctx->priv_data;
MpegEncContext *s = &s1->mpeg_enc_ctx;
int ret;
start... | 8,517 |
FFmpeg | eafb17d140f6772c9aac8fbf31641f24a371b2c0 | 1 | static int h264_handle_packet(AVFormatContext *ctx,
PayloadContext *data,
AVStream *st,
AVPacket * pkt,
uint32_t * timestamp,
const uint8_t * buf,
... | 8,519 |
FFmpeg | c3ab0004ae4dffc32494ae84dd15cfaa909a7884 | 1 | static inline void RENAME(yuv2yuv1)(SwsContext *c, const int16_t *lumSrc, const int16_t *chrSrc, const int16_t *alpSrc,
uint8_t *dest, uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, int dstW, int chrDstW)
{
int i;
#if COMPILE_TEMPLATE_MMX
if(!(c->flags & SWS_BITEXACT)) ... | 8,520 |
FFmpeg | 643bae382c2610512652d3c5cfa7aabb450a706e | 1 | static int interp(RA144Context *ractx, int16_t *out, int a,
int copyold, int energy)
{
int work[10];
int b = NBLOCKS - a;
int i;
// Interpolate block coefficients from the this frame's forth block and
// last frame's forth block.
for (i=0; i<30; i++)
out[i] =... | 8,521 |
FFmpeg | 7ee191cab0dc44700f26c5784e2adeb6a779651b | 1 | static int dv_extract_audio(uint8_t *frame, uint8_t *ppcm[4],
const DVprofile *sys)
{
int size, chan, i, j, d, of, smpls, freq, quant, half_ch;
uint16_t lc, rc;
const uint8_t *as_pack;
uint8_t *pcm, ipcm;
as_pack = dv_extract_pack(frame, dv_audio_source);
if... | 8,523 |
FFmpeg | b3415e4c5f9205820fd6c9211ad50a4df2692a36 | 1 | void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size)
{
if (min_size < *size)
return ptr;
min_size = FFMAX(17 * min_size / 16 + 32, min_size);
ptr = av_realloc(ptr, min_size);
/* we could set this to the unmodified min_size but this is safer
* if the user lost the... | 8,524 |
FFmpeg | 9a2e79116d6235c53d8e9663a8d30d1950d7431a | 1 | static inline int svq3_decode_block(GetBitContext *gb, DCTELEM *block,
int index, const int type)
{
static const uint8_t *const scan_patterns[4] =
{ luma_dc_zigzag_scan, zigzag_scan, svq3_scan, chroma_dc_scan };
int run, level, sign, vlc, limit;
const int intr... | 8,525 |
FFmpeg | 9d656110966fbdde0fd1d2e685f3ed3633ba3596 | 0 | static int flac_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size)
{
FLACContext *s = avctx->priv_data;
int metadata_last, metadata_type, metadata_size;
int tmp = 0, i, j = 0, input_buf_size;
int16_t ... | 8,528 |
FFmpeg | cc276c85d15272df6e44fb3252657a43cbd49555 | 0 | int64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name)
{
switch(nb_channels) {
case 1: return AV_CH_LAYOUT_MONO;
case 2: return AV_CH_LAYOUT_STEREO;
case 3: return AV_CH_LAYOUT_SURROUND;
case 4: return AV_CH_LAYOUT_QUAD;
case 5: return AV_CH_LAY... | 8,529 |
FFmpeg | 0058584580b87feb47898e60e4b80c7f425882ad | 0 | static inline void downmix_2f_1r_to_dolby(float *samples)
{
int i;
for (i = 0; i < 256; i++) {
samples[i] -= samples[i + 512];
samples[i + 256] += samples[i + 512];
samples[i + 512] = 0;
}
}
| 8,530 |
FFmpeg | c742ab4e81bb9dcabfdab006d6b8b09a5808c4ce | 0 | static int vc1_init_common(VC1Context *v)
{
static int done = 0;
int i = 0;
static VLC_TYPE vlc_table[32372][2];
v->hrd_rate = v->hrd_buffer = NULL;
/* VLC tables */
if (!done) {
INIT_VLC_STATIC(&ff_vc1_bfraction_vlc, VC1_BFRACTION_VLC_BITS, 23,
ff_vc... | 8,531 |
FFmpeg | 91f104496bb7632ed5ff03798e06dd8af014f0d9 | 0 | static int vp6_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
int *golden_frame)
{
VP56RangeCoder *c = &s->c;
int parse_filter_info = 0;
int coeff_offset = 0;
int vrt_shift = 0;
int sub_version;
int rows, cols;
int res = 1;
int separa... | 8,532 |
FFmpeg | 1e85b5e077e7e6fb9901bfd1a7a4f2594ba5a9a5 | 0 | int ff_network_wait_fd_timeout(int fd, int write, int64_t timeout, AVIOInterruptCB *int_cb)
{
int ret;
int64_t wait_start = 0;
while (1) {
ret = ff_network_wait_fd(fd, write);
if (ret != AVERROR(EAGAIN))
return ret;
if (ff_check_interrupt(int_cb))
r... | 8,533 |
qemu | 10a2158f52796e5b2b7ce7991bde09a3c985a37b | 1 | GuestNetworkInterfaceList *qmp_guest_network_get_interfaces(Error **errp)
{
GuestNetworkInterfaceList *head = NULL, *cur_item = NULL;
struct ifaddrs *ifap, *ifa;
if (getifaddrs(&ifap) < 0) {
error_setg_errno(errp, errno, "getifaddrs failed");
goto error;
}
for (ifa = ifap... | 8,535 |
qemu | d9bce9d99f4656ae0b0127f7472db9067b8f84ab | 1 | PPC_OP(mulli)
{
T0 = (Ts0 * SPARAM(1));
RETURN();
}
| 8,536 |
qemu | 5cb9b56acfc0b50acf7ccd2d044ab4991c47fdde | 1 | static int print_uint64(DeviceState *dev, Property *prop, char *dest, size_t len)
{
uint64_t *ptr = qdev_get_prop_ptr(dev, prop);
return snprintf(dest, len, "%" PRIu64, *ptr);
}
| 8,537 |
FFmpeg | 7b5ff7d57355dc608f0fd86e3ab32a2fda65e752 | 1 | static av_always_inline void decode_mb_row_no_filter(AVCodecContext *avctx, void *tdata,
int jobnr, int threadnr, int is_vp7)
{
VP8Context *s = avctx->priv_data;
VP8ThreadData *prev_td, *next_td, *td = &s->thread_data[threadnr];
int mb_y = td->thread_mb_pos >> 16... | 8,539 |
FFmpeg | c6303f8d70c25dd6c6e6486c78bf99c9924e2b6b | 1 | static void yop_next_macroblock(YopDecContext *s)
{
// If we are advancing to the next row of macroblocks
if (s->row_pos == s->frame.linesize[0] - 2) {
s->dstptr += s->frame.linesize[0];
s->row_pos = 0;
}else {
s->row_pos += 2;
}
s->dstptr += 2;
}
| 8,540 |
qemu | 61f52e06f0a21bab782f98ef3ea789aa6d0aa046 | 1 | static int ahci_populate_sglist(AHCIDevice *ad, QEMUSGList *sglist)
{
AHCICmdHdr *cmd = ad->cur_cmd;
uint32_t opts = le32_to_cpu(cmd->opts);
uint64_t prdt_addr = le64_to_cpu(cmd->tbl_addr) + 0x80;
int sglist_alloc_hint = opts >> AHCI_CMD_HDR_PRDT_LEN;
dma_addr_t prdt_len = (sglist_alloc_hint *... | 8,541 |
FFmpeg | 3edc3b159503d512c919b3d5902f7026e961823a | 1 | static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
{
MpegEncContext *s = &ctx->m;
int width, height, vo_ver_id;
/* vol header */
skip_bits(gb, 1); /* random access */
s->vo_type = get_bits(gb, 8);
if (get_bits1(gb) != 0) { /* is_ol_id */
vo_... | 8,542 |
FFmpeg | 8c222bb405f7031b2326c601f5072ca2980b1079 | 1 | static int ac3_probe(AVProbeData *p)
{
int max_frames, first_frames, frames;
uint8_t *buf, *buf2, *end;
AC3HeaderInfo hdr;
if(p->buf_size < 7)
return 0;
max_frames = 0;
buf = p->buf;
end = buf + FFMIN(4096, p->buf_size - 7);
for(; buf < end; buf++) {
buf2... | 8,544 |
qemu | e83980455c8c7eb066405de512be7c4bace3ac4d | 1 | static void virtio_ccw_device_plugged(DeviceState *d)
{
VirtioCcwDevice *dev = VIRTIO_CCW_DEVICE(d);
SubchDev *sch = dev->sch;
sch->id.cu_model = virtio_bus_get_vdev_id(&dev->bus);
css_generate_sch_crws(sch->cssid, sch->ssid, sch->schid,
d->hotplugged, 1);
}
| 8,545 |
qemu | 6ab3fc32ea640026726bc5f9f4db622d0954fb8a | 1 | static void digic_uart_write(void *opaque, hwaddr addr, uint64_t value,
unsigned size)
{
DigicUartState *s = opaque;
unsigned char ch = value;
addr >>= 2;
switch (addr) {
case R_TX:
if (s->chr) {
qemu_chr_fe_write_all(s->chr, &ch, 1);
... | 8,546 |
FFmpeg | 366d919016a679d3955f6fe5278fa7ce4f47b81e | 1 | static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc,
vorbis_residue *vr,
uint_fast8_t ch,
uint_fast8_t *do_not_dec... | 8,547 |
qemu | 9c6b899f7a46893ab3b671e341a2234e9c0c060e | 1 | static int local_name_to_path(FsContext *ctx, V9fsPath *dir_path,
const char *name, V9fsPath *target)
{
if (dir_path) {
v9fs_path_sprintf(target, "%s/%s", dir_path->data, name);
} else {
v9fs_path_sprintf(target, "%s", name);
}
return 0;
}
| 8,548 |
FFmpeg | d1adad3cca407f493c3637e20ecd4f7124e69212 | 0 | static inline void RENAME(bgr24ToUV_half)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, long width, uint32_t *unused)
{
int i;
for (i=0; i<width; i++) {
int b= src1[6*i + 0] + src1[6*i + 3];
int g= src1[6*i + 1] + src1[6*i + 4];
int r= src1[6*i + 2] + src1... | 8,549 |
FFmpeg | 229843aa359ae0c9519977d7fa952688db63f559 | 0 | static int ftp_parse_entry_mlsd(char *mlsd, AVIODirEntry *next)
{
char *fact, *value;
av_dlog(NULL, "%s\n", mlsd);
while(fact = av_strtok(mlsd, ";", &mlsd)) {
if (fact[0] == ' ') {
next->name = av_strdup(&fact[1]);
continue;
}
fact = av_strtok(fact, "... | 8,550 |
FFmpeg | d7eabd50425a61b31e90c763a0c3e4316a725404 | 0 | static int get_scale_idx(GetBitContext *gb, int ref)
{
int t = get_vlc2(gb, dscf_vlc.table, MPC7_DSCF_BITS, 1) - 7;
if (t == 8)
return get_bits(gb, 6);
return ref + t;
}
| 8,551 |
qemu | 9058abdd180843473d440958c79a1a781be723c1 | 0 | int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
struct image_info * info)
{
struct elfhdr elf_ex;
struct elfhdr interp_elf_ex;
struct exec interp_ex;
int interpreter_fd = -1; /* avoid warning */
abi_ulong load_addr, load_bias;
int load_ad... | 8,552 |
qemu | dd26eb43337adf53d22b3fda3591e3837bc08b8c | 0 | static sd_rsp_type_t sd_app_command(SDState *sd,
SDRequest req)
{
DPRINTF("ACMD%d 0x%08x\n", req.cmd, req.arg);
sd->card_status |= APP_CMD;
switch (req.cmd) {
case 6: /* ACMD6: SET_BUS_WIDTH */
switch (sd->state) {
case sd_transfer_state:
... | 8,553 |
qemu | bf937a7965c1d1a6dce4f615d0ead2e2ab505004 | 0 | static void bt_dummy_lmp_connection_complete(struct bt_link_s *link)
{
if (link->slave->reject_reason)
fprintf(stderr, "%s: stray LMP_not_accepted received, fixme\n",
__func__);
else
fprintf(stderr, "%s: stray LMP_accepted received, fixme\n",
... | 8,554 |
qemu | bb0300dc57c10b3721451b0ff566a03f9276cc77 | 0 | static void add_flagname_to_bitmaps(const char *flagname, uint32_t *features,
uint32_t *ext_features,
uint32_t *ext2_features,
uint32_t *ext3_features)
{
int i;
int found = 0;
for ( i = 0 ; i... | 8,555 |
qemu | 2a1639291bf9f3c88c62d10459fedaa677536ff5 | 0 | struct pxa2xx_i2c_s *pxa2xx_i2c_init(target_phys_addr_t base,
qemu_irq irq, int ioregister)
{
int iomemtype;
struct pxa2xx_i2c_s *s = (struct pxa2xx_i2c_s *)
i2c_slave_init(i2c_init_bus(), 0, sizeof(struct pxa2xx_i2c_s));
s->base = base;
s->irq = irq;
s->slave.e... | 8,556 |
qemu | 364031f17932814484657e5551ba12957d993d7e | 0 | static int v9fs_synth_link(FsContext *fs_ctx, V9fsPath *oldpath,
V9fsPath *newpath, const char *buf)
{
errno = EPERM;
return -1;
}
| 8,557 |
qemu | 1bc04a8880374407c4b12d82ceb8752e12ff5336 | 0 | static bool pmsav7_rgnr_vmstate_validate(void *opaque, int version_id)
{
ARMCPU *cpu = opaque;
return cpu->env.pmsav7.rnr < cpu->pmsav7_dregion;
}
| 8,558 |
qemu | 32bafa8fdd098d52fbf1102d5a5e48d29398c0aa | 0 | int net_init_dump(const NetClientOptions *opts, const char *name,
NetClientState *peer, Error **errp)
{
int len, rc;
const char *file;
char def_file[128];
const NetdevDumpOptions *dump;
NetClientState *nc;
DumpNetClient *dnc;
assert(opts->type == NET_CLIENT_OPTIO... | 8,559 |
qemu | db0a762e4be965b8976abe9df82c6d47c57336fc | 0 | static int handle_secondary_tcp_pkt(NetFilterState *nf,
Connection *conn,
Packet *pkt)
{
struct tcphdr *tcp_pkt;
tcp_pkt = (struct tcphdr *)pkt->transport_header;
if (trace_event_get_state(TRACE_COLO_FILTER_REWRITER_DEBUG)) {
... | 8,560 |
qemu | 5a33db78b0f3ee808a3d8dd5c427edfbe80bdc73 | 0 | static void nvdimm_dsm_reserved_root(AcpiNVDIMMState *state, NvdimmDsmIn *in,
hwaddr dsm_mem_addr)
{
switch (in->function) {
case 0x0:
nvdimm_dsm_function0(0x1 | 1 << 1 /* Read FIT */, dsm_mem_addr);
return;
case 0x1 /* Read FIT */:
nvdimm... | 8,561 |
qemu | a89f364ae8740dfc31b321eed9ee454e996dc3c1 | 0 | static void omap_prcm_dpll_update(struct omap_prcm_s *s)
{
omap_clk dpll = omap_findclk(s->mpu, "dpll");
omap_clk dpll_x2 = omap_findclk(s->mpu, "dpll");
omap_clk core = omap_findclk(s->mpu, "core_clk");
int mode = (s->clken[9] >> 0) & 3;
int mult, div;
mult = (s->clksel[5] >> 12) & 0x3... | 8,563 |
qemu | 01ecaf438b1eb46abe23392c8ce5b7628b0c8cf5 | 0 | void HELPER(dc_zva)(CPUARMState *env, uint64_t vaddr_in)
{
/* Implement DC ZVA, which zeroes a fixed-length block of memory.
* Note that we do not implement the (architecturally mandated)
* alignment fault for attempts to use this on Device memory
* (which matches the usual QEMU behaviour of not... | 8,564 |
qemu | eb5d4f5329df83ea15244b47f7fbca21adaae41b | 0 | static void slirp_bootp_load(QEMUFile *f, Slirp *slirp)
{
int i;
for (i = 0; i < NB_BOOTP_CLIENTS; i++) {
slirp->bootp_clients[i].allocated = qemu_get_be16(f);
qemu_get_buffer(f, slirp->bootp_clients[i].macaddr, 6);
}
}
| 8,567 |
qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | 0 | static int scsi_handle_rw_error(SCSIDiskReq *r, int error)
{
bool is_read = (r->req.cmd.xfer == SCSI_XFER_FROM_DEV);
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
BlockErrorAction action = bdrv_get_error_action(s->qdev.conf.bs, is_read, error);
if (action == BLOCK_ERROR_ACTION_RE... | 8,569 |
qemu | 1964a397063967acc5ce71a2a24ed26e74824ee1 | 0 | void migrate_fd_connect(MigrationState *s)
{
s->state = MIG_STATE_ACTIVE;
trace_migrate_set_state(MIG_STATE_ACTIVE);
s->bytes_xfer = 0;
/* This is a best 1st approximation. ns to ms */
s->expected_downtime = max_downtime/1000000;
s->cleanup_bh = qemu_bh_new(migrate_fd_cleanup, s);
... | 8,570 |
qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | 0 | void *iommu_dma_memory_map(DMAContext *dma, dma_addr_t addr, dma_addr_t *len,
DMADirection dir)
{
int err;
target_phys_addr_t paddr, plen;
void *buf;
if (dma->map) {
return dma->map(dma, addr, len, dir);
}
plen = *len;
err = dma->translate(dma... | 8,571 |
qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | 0 | static void lx_init(const LxBoardDesc *board, MachineState *machine)
{
#ifdef TARGET_WORDS_BIGENDIAN
int be = 1;
#else
int be = 0;
#endif
MemoryRegion *system_memory = get_system_memory();
XtensaCPU *cpu = NULL;
CPUXtensaState *env = NULL;
MemoryRegion *ram, *rom, *system_io;
Driv... | 8,572 |
qemu | b7394c8394d38cb38b6db14eb431cac7a91e7140 | 0 | void kvm_arch_reset_vcpu(X86CPU *cpu)
{
CPUX86State *env = &cpu->env;
env->exception_injected = -1;
env->interrupt_injected = -1;
env->xcr0 = 1;
if (kvm_irqchip_in_kernel()) {
env->mp_state = cpu_is_bsp(cpu) ? KVM_MP_STATE_RUNNABLE :
KVM_MP... | 8,575 |
FFmpeg | eb5cc8febc6cd7938f8fdce95d78cacdbe1be30b | 1 | static int speex_header(AVFormatContext *s, int idx) {
struct ogg *ogg = s->priv_data;
struct ogg_stream *os = ogg->streams + idx;
struct speex_params *spxp = os->private;
AVStream *st = s->streams[idx];
uint8_t *p = os->buf + os->pstart;
if (!spxp) {
spxp = av_mallocz(sizeof(*s... | 8,576 |
qemu | eff235eb2bcd7092901f4698a7907e742f3b7f2f | 1 | static ExitStatus trans_fop_wed_0e(DisasContext *ctx, uint32_t insn,
const DisasInsn *di)
{
unsigned rt = assemble_rt64(insn);
unsigned ra = extract32(insn, 21, 5);
return do_fop_wed(ctx, rt, ra, di->f_wed);
}
| 8,578 |
FFmpeg | ac4b32df71bd932838043a4838b86d11e169707f | 1 | void filter_level_for_mb(VP8Context *s, VP8Macroblock *mb, VP8FilterStrength *f)
{
int interior_limit, filter_level;
if (s->segmentation.enabled) {
filter_level = s->segmentation.filter_level[mb->segment];
if (!s->segmentation.absolute_vals)
filter_level += s->filter.level;
... | 8,579 |
qemu | 67fc07d3fba681f3362f7644a69b7a581a2670e8 | 1 | void muls64(int64_t *phigh, int64_t *plow, int64_t a, int64_t b)
{
#if defined(__x86_64__)
__asm__ ("imul %0\n\t"
: "=d" (*phigh), "=a" (*plow)
: "a" (a), "0" (b)
);
#else
int64_t ph;
uint64_t pm1, pm2, pl;
pl = (uint64_t)((uint32_t)a) * (uint64_t)((uin... | 8,580 |
qemu | 823bd7391c96ba675f20fd6d952d1cb6e1ffb851 | 1 | static int32_t scsi_disk_emulate_command(SCSIRequest *req, uint8_t *buf)
{
SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req);
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, req->dev);
uint64_t nb_sectors;
uint8_t *outbuf;
int buflen;
switch (req->cmd.buf[0]) {
case INQUIRY:
... | 8,582 |
FFmpeg | 5d97d9d53ea1cc2c28411ad734565372ddeccc32 | 1 | static int decode_syncpoint(NUTContext *nut){
AVFormatContext *s= nut->avf;
ByteIOContext *bc = &s->pb;
int64_t end;
uint64_t tmp;
int i;
AVRational time_base;
nut->last_syncpoint_pos= url_ftell(bc)-8;
end= get_packetheader(nut, bc, 1);
end += url_ftell(bc) - 4;
t... | 8,583 |
qemu | f8ed85ac992c48814d916d5df4d44f9a971c5de4 | 1 | static void mips_jazz_init(MachineState *machine,
enum jazz_model_e jazz_model)
{
MemoryRegion *address_space = get_system_memory();
const char *cpu_model = machine->cpu_model;
char *filename;
int bios_size, n;
MIPSCPU *cpu;
CPUClass *cc;
CPUMIPSState *env... | 8,584 |
FFmpeg | 2c2f25eb8920129ef3cfe6da2e1cefdedc485965 | 1 | static void free_texture(void *opaque, uint8_t *data)
{
ID3D11Texture2D_Release((ID3D11Texture2D *)opaque);
} | 8,585 |
FFmpeg | f7739f3708f786a0b071d8d8b59331525b0ccfd8 | 1 | static int alac_decode_frame(AVCodecContext *avctx,
void *outbuffer, int *outputsize,
const uint8_t *inbuffer, int input_buffer_size)
{
ALACContext *alac = avctx->priv_data;
int channels;
unsigned int outputsamples;
int hassize;
int readsampl... | 8,586 |
qemu | 3ff2f67a7c24183fcbcfe1332e5223ac6f96438c | 1 | int bdrv_truncate(BlockDriverState *bs, int64_t offset)
{
BlockDriver *drv = bs->drv;
int ret;
if (!drv)
return -ENOMEDIUM;
if (!drv->bdrv_truncate)
return -ENOTSUP;
if (bs->read_only)
return -EACCES;
ret = drv->bdrv_truncate(bs, offset);
if (ret == 0) {
... | 8,587 |
qemu | 9745807191a81c45970f780166f44a7f93b18653 | 1 | static void gen_sub(DisasContext *dc, TCGv dest, TCGv srca, TCGv srcb)
{
TCGv res = tcg_temp_new();
TCGv sr_cy = tcg_temp_new();
TCGv sr_ov = tcg_temp_new();
tcg_gen_sub_tl(res, srca, srcb);
tcg_gen_xor_tl(sr_cy, srca, srcb);
tcg_gen_xor_tl(sr_ov, res, srcb);
tcg_gen_and_tl(sr_ov, ... | 8,588 |
qemu | 8f2ad0a3fc5e3569183d44bf1c7fcb95294be4c0 | 1 | static void ecc_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
{
ECCState *s = opaque;
switch (addr & ECC_ADDR_MASK) {
case ECC_MER:
s->regs[0] = (s->regs[0] & (ECC_MER_VER | ECC_MER_IMPL)) |
(val & ~(ECC_MER_VER | ECC_MER_IMPL));
DPRINTF("Write... | 8,589 |
FFmpeg | afa982fdae1b49a8aee00a27da876bba10ba1073 | 1 | static void idct32(int *out, int *tab, int sblimit, int left_shift)
{
int i, j;
int *t, *t1, xr;
const int *xp = costab32;
for(j=31;j>=3;j-=2) tab[j] += tab[j - 2];
t = tab + 30;
t1 = tab + 2;
do {
t[0] += t[-4];
t[1] += t[1 - 4];
t -= 4;
} whi... | 8,590 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.