id stringlengths 22 22 | content stringlengths 75 11.3k |
|---|---|
d2a_function_data_5640 | static void assert_file_overwrite(const char *filename)
{
if (file_overwrite && no_file_overwrite) {
fprintf(stderr, "Error, both -y and -n supplied. Exiting.\n");
exit_program(1);
}
if (!file_overwrite) {
const char *proto_name = avio_find_protocol_name(filename);
if (proto... |
d2a_function_data_5641 | int ff_dca_core_parse(DCACoreDecoder *s, uint8_t *data, int size)
{
int ret;
s->ext_audio_mask = 0;
s->xch_pos = s->xxch_pos = s->x96_pos = 0;
if ((ret = init_get_bits8(&s->gb, data, size)) < 0)
return ret;
s->gb_in = s->gb;
if ((ret = parse_frame_header(s)) < 0)
return ret;
... |
d2a_function_data_5642 | AP_DECLARE(void) ap_get_mime_headers_core(request_rec *r, apr_bucket_brigade *bb)
{
char *last_field = NULL;
apr_size_t last_len = 0;
apr_size_t alloc_len = 0;
char *field;
char *value;
apr_size_t len;
int fields_read = 0;
char *tmp_field;
core_server_config *conf = ap_get_core_modul... |
d2a_function_data_5643 | int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b)
{
int i,j;
X509_NAME_ENTRY *na,*nb;
if (sk_X509_NAME_ENTRY_num(a->entries)
!= sk_X509_NAME_ENTRY_num(b->entries))
return sk_X509_NAME_ENTRY_num(a->entries)
-sk_X509_NAME_ENTRY_num(b->entries);
for (i=sk_X509_NAME_ENTRY_num(a->entries)-1; i>=0; i... |
d2a_function_data_5644 | int ff_hevc_split_packet(HEVCPacket *pkt, const uint8_t *buf, int length,
AVCodecContext *avctx, int is_nalff, int nal_length_size)
{
int consumed, ret = 0;
pkt->nb_nals = 0;
while (length >= 4) {
HEVCNAL *nal;
int extract_length = 0;
if (is_nalff) {
... |
d2a_function_data_5645 | static int avi_write_trailer(AVFormatContext *s)
{
AVIContext *avi = s->priv_data;
AVIOContext *pb = s->pb;
int res = 0;
int i, j, n, nb_frames;
int64_t file_size;
if (pb->seekable & AVIO_SEEKABLE_NORMAL) {
if (avi->riff_id == 1) {
ff_end_tag(pb, avi->movi_list);
... |
d2a_function_data_5646 | static void vc1_decode_b_blocks(VC1Context *v)
{
MpegEncContext *s = &v->s;
/* select codingmode used for VLC tables selection */
switch(v->c_ac_table_index){
case 0:
v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;
break;
case 1:
v->codingset = CS_H... |
d2a_function_data_5647 | static int wav_write_header(AVFormatContext *s)
{
WAVMuxContext *wav = s->priv_data;
AVIOContext *pb = s->pb;
int64_t fmt;
ffio_wfourcc(pb, "RIFF");
avio_wl32(pb, 0); /* file length */
ffio_wfourcc(pb, "WAVE");
/* format header */
fmt = ff_start_tag(pb, "fmt ");
if (ff_put_wav_head... |
d2a_function_data_5648 | static int mov_write_single_packet(AVFormatContext *s, AVPacket *pkt)
{
MOVMuxContext *mov = s->priv_data;
MOVTrack *trk = &mov->tracks[pkt->stream_index];
AVCodecParameters *par = trk->par;
int64_t frag_duration = 0;
int size = pkt->size;
int ret = check_pkt(s, pkt);
... |
d2a_function_data_5649 | static int util_verbose(ENGINE *e, int verbose, BIO *bio_out, const char *indent)
{
static const int line_wrap = 78;
int num;
char *name = NULL;
char *desc = NULL;
int flags;
int xpos = 0;
STACK *cmds = sk_new_null();
if(!cmds)
goto err;
if(!ENGINE_ctrl(e, ENGINE_CTRL_HAS_CTRL_FUNCTION, 0, NULL, NULL) ||
... |
d2a_function_data_5650 | int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
{
int max, min, dif;
const BN_ULONG *ap, *bp;
BN_ULONG *rp, carry, t1, t2;
const BIGNUM *tmp;
bn_check_top(a);
bn_check_top(b);
if (a->top < b->top) {
tmp = a;
a = b;
b = tmp;
}
max = a->top;
min =... |
d2a_function_data_5651 | static int decode_frame_mp3on4(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
MP3On4DecodeContext *s = avctx->priv_data;
MPADecodeContext *m;
int fsize, len = buf_siz... |
d2a_function_data_5652 | static BIGNUM *BN_POOL_get(BN_POOL *p, int flag)
{
BIGNUM *bn;
unsigned int loop;
/* Full; allocate a new pool item and link it in. */
if (p->used == p->size) {
BN_POOL_ITEM *item;
if ((item = OPENSSL_malloc(sizeof(*item))) == NULL) {
BNerr(BN_F_BN_POOL_GET, ERR_R_M... |
d2a_function_data_5653 | static int calculate_bitrate(AVFormatContext *s)
{
AVIContext *avi = s->priv_data;
int i, j;
int64_t lensum = 0;
int64_t maxpos = 0;
for (i = 0; i<s->nb_streams; i++) {
int64_t len = 0;
AVStream *st = s->streams[i];
if (!st->nb_index_entries)
continue;
... |
d2a_function_data_5654 | static void vc1_decode_i_blocks_adv(VC1Context *v)
{
int k;
MpegEncContext *s = &v->s;
int cbp, val;
uint8_t *coded_val;
int mb_pos;
int mquant = v->pq;
int mqdiff;
GetBitContext *gb = &s->gb;
/* select codingmode used for VLC tables selection */
switch (v->y_ac_table_index) {
... |
d2a_function_data_5655 | static EVP_PKEY *hwcrhk_load_privkey(ENGINE *eng, const char *key_id,
UI_METHOD *ui_method, void *callback_data)
{
#ifndef OPENSSL_NO_RSA
RSA *rtmp = NULL;
#endif
EVP_PKEY *res = NULL;
#ifndef OPENSSL_NO_RSA
HWCryptoHook_MPI e, n;
HWCryptoHook_RSAKeyHandle *hptr;
#endif
#if !defined(OPENSSL_NO_RSA)
char tempbuf[... |
d2a_function_data_5656 | static int read_dct_coeffs(BitstreamContext *bc, int32_t block[64],
const uint8_t *scan, int *coef_count_,
int coef_idx[64], int q)
{
int coef_list[128];
int mode_list[128];
int i, t, bits, ccoef, mode;
int list_start = 64, list_end = 64, list_pos;
... |
d2a_function_data_5657 | int BN_num_bits(const BIGNUM *a)
{
int i = a->top - 1;
bn_check_top(a);
if (BN_is_zero(a))
return 0;
return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));
} |
d2a_function_data_5658 | static int gif_image_write_header(AVFormatContext *s, int width, int height,
int loop_count, uint32_t *palette)
{
AVIOContext *pb = s->pb;
AVRational sar = s->streams[0]->codec->sample_aspect_ratio;
int i, aspect = 0;
if (sar.num > 0 && sar.den > 0) {
aspect = ... |
d2a_function_data_5659 | static void test_fail_string_common(const char *prefix, const char *file,
int line, const char *type,
const char *left, const char *right,
const char *op, const char *m1, size_t l1,
... |
d2a_function_data_5660 | static inline int ff_j2k_ceildiv(int a, int b)
{
return (a + b - 1) / b;
} |
d2a_function_data_5661 | static int do_sigver_init(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey,
int ver)
{
if (ctx->pctx == NULL)
ctx->pctx = EVP_PKEY_CTX_new(pkey, e);
if (ctx->pctx == NULL)
return 0;
if (!(ctx->pctx->pmeth->flags & EVP_PKEY_FLAG_SIGCTX_CUSTOM))
{
if (type == NUL... |
d2a_function_data_5662 | static void FUNCC(pred4x4_dc)(uint8_t *_src, const uint8_t *topright, int _stride){
pixel *src = (pixel*)_src;
int stride = _stride/sizeof(pixel);
const int dc= ( src[-stride] + src[1-stride] + src[2-stride] + src[3-stride]
+ src[-1+0*stride] + src[-1+1*stride] + src[-1+2*stride] + src[-... |
d2a_function_data_5663 | SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth)
{
SSL_CTX *ret = NULL;
if (meth == NULL) {
SSLerr(SSL_F_SSL_CTX_NEW, SSL_R_NULL_SSL_METHOD_PASSED);
return (NULL);
}
if (FIPS_mode() && (meth->version < TLS1_VERSION)) {
SSLerr(SSL_F_SSL_CTX_NEW, SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE);... |
d2a_function_data_5664 | static int cinepak_decode_vectors (CinepakContext *s, cvid_strip *strip,
int chunk_id, int size, const uint8_t *data)
{
const uint8_t *eod = (data + size);
uint32_t flag, mask;
uint8_t *cb0, *cb1, *cb2, *cb3;
int x, y;
char ... |
d2a_function_data_5665 | static long conn_ctrl(BIO *b, int cmd, long num, void *ptr)
{
BIO *dbio;
int *ip;
const char **pptr = NULL;
long ret = 1;
BIO_CONNECT *data;
data = (BIO_CONNECT *)b->ptr;
switch (cmd) {
case BIO_CTRL_RESET:
ret = 0;
data->state = BIO_CONN_S_BEFORE;
conn_close_so... |
d2a_function_data_5666 | static int copy_from(IpvideoContext *s, AVFrame *src, int delta_x, int delta_y)
{
int current_offset = s->pixel_ptr - s->current_frame.data[0];
int motion_offset = current_offset + delta_y * s->current_frame.linesize[0]
+ delta_x * (1 + s->is_16bpp);
if (motion_offset < 0) {
a... |
d2a_function_data_5667 | static int _TIFFReserveLargeEnoughWriteBuffer(TIFF* tif, uint32 strip_or_tile)
{
TIFFDirectory *td = &tif->tif_dir;
if( td->td_stripbytecount[strip_or_tile] > 0 )
{
/* The +1 is to ensure at least one extra bytes */
/* The +4 is because the LZW encoder flushes 4 bytes before the limit */
... |
d2a_function_data_5668 | int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
{
int i,n,b,bl,ret;
b=ctx->cipher->block_size;
OPENSSL_assert(b <= sizeof ctx->buf);
if (b == 1)
{
*outl=0;
return 1;
}
bl=ctx->buf_len;
if (ctx->flags & EVP_CIPH_NO_PADDING)
{
if(bl)
{
EVPerr(EVP_F_EVP_ENCRYPTFINAL,EV... |
d2a_function_data_5669 | static int ass_get_duration(AVFormatContext *s, const uint8_t *p)
{
int sh, sm, ss, sc, eh, em, es, ec;
uint64_t start, end;
if (sscanf(p, "%*[^,],%d:%d:%d%*c%d,%d:%d:%d%*c%d",
&sh, &sm, &ss, &sc, &eh, &em, &es, &ec) != 8)
return 0;
if (sh > 9 || sm > 59 || ss > 59 || sc > 99 ||... |
d2a_function_data_5670 | static int get_slice_offset(AVCodecContext *avctx, const uint8_t *buf, int n, int slice_count, int buf_size)
{
if (n < slice_count) {
if(avctx->slice_count) return avctx->slice_offset[n];
else return AV_RL32(buf + n*8 - 4) == 1 ? AV_RL32(buf + n*8) : AV_RB32(buf + n*8);
} else... |
d2a_function_data_5671 | int avfilter_open(AVFilterContext **filter_ctx, AVFilter *filter, const char *inst_name)
{
AVFilterContext *ret;
*filter_ctx = NULL;
if (!filter)
return AVERROR(EINVAL);
ret = av_mallocz(sizeof(AVFilterContext));
ret->av_class = &avfilter_class;
ret->filter = filter;
ret->name ... |
d2a_function_data_5672 | static int dh_init(void *vpdhctx, void *vdh)
{
PROV_DH_CTX *pdhctx = (PROV_DH_CTX *)vpdhctx;
DH_free(pdhctx->dh);
pdhctx->dh = vdh;
DH_up_ref(pdhctx->dh);
return pdhctx->dh != NULL;
} |
d2a_function_data_5673 | void ff_er_add_slice(ERContext *s, int startx, int starty,
int endx, int endy, int status)
{
const int start_i = av_clip(startx + starty * s->mb_width, 0, s->mb_num - 1);
const int end_i = av_clip(endx + endy * s->mb_width, 0, s->mb_num);
const int start_xy = s->mb_index2xy[star... |
d2a_function_data_5674 | int ff_index_search_timestamp(const AVIndexEntry *entries, int nb_entries,
int64_t wanted_timestamp, int flags)
{
int a, b, m;
int64_t timestamp;
a = -1;
b = nb_entries;
// Optimize appending index entries at the end.
if (b && entries[b - 1].timestamp < wanted_tim... |
d2a_function_data_5675 | void ff_init_range_decoder(RangeCoder *c, const uint8_t *buf,
int buf_size)
{
/* cast to avoid compiler warning */
ff_init_range_encoder(c, (uint8_t *)buf, buf_size);
c->low = AV_RB16(c->bytestream);
c->bytestream += 2;
if (c->low >= 0xFF00) {
c->l... |
d2a_function_data_5676 | void
ngx_slab_init(ngx_slab_pool_t *pool)
{
u_char *p;
size_t size;
ngx_int_t m;
ngx_uint_t i, n, pages;
ngx_slab_page_t *slots, *page;
/* STUB */
if (ngx_slab_max_size == 0) {
ngx_slab_max_size = ngx_pagesize / 2;
ngx_slab_exact_size = n... |
d2a_function_data_5677 | int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
{
int max, al;
int ret = 0;
BIGNUM *tmp, *rr;
bn_check_top(a);
al = a->top;
if (al <= 0) {
r->top = 0;
r->neg = 0;
return 1;
}
BN_CTX_start(ctx);
rr = (a != r) ? r : BN_CTX_get(ctx);
tmp = BN_CTX_get(c... |
d2a_function_data_5678 | 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, add4;
... |
d2a_function_data_5679 | int av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen) {
int state= 0;
int x;
LZOContext c;
if (*outlen <= 0 || *inlen <= 0) {
int res = 0;
if (*outlen <= 0)
res |= AV_LZO_OUTPUT_FULL;
if (*inlen <= 0)
res |= AV_LZO_INPUT_DEPLETED;
... |
d2a_function_data_5680 | static ngx_int_t
ngx_http_alloc_large_header_buffer(ngx_http_request_t *r,
ngx_uint_t request_line)
{
u_char *old, *new;
ngx_buf_t *b;
ngx_chain_t *cl;
ngx_http_connection_t *hc;
ngx_http_core_srv_conf_t *cscf;
ngx_log_debug0(NGX_LOG_DEB... |
d2a_function_data_5681 | static void lfe_downsample(DCAEncContext *c, const int32_t *input)
{
/* FIXME: make 128x LFE downsampling possible */
const int lfech = lfe_index[c->channel_config];
int i, j, lfes;
int32_t hist[512];
int32_t accum;
int hist_start = 0;
for (i = 0; i < 512; i++)
hist[i] = c->history[... |
d2a_function_data_5682 | static int drbg_bytes(unsigned char *out, int count)
{
DRBG_CTX *dctx = RAND_DRBG_get_default();
int ret = 0;
CRYPTO_THREAD_write_lock(dctx->lock);
do {
size_t rcnt;
if (count > (int)dctx->max_request)
rcnt = dctx->max_request;
else
rcnt = count;
... |
d2a_function_data_5683 | static int get_qcx(J2kDecoderContext *s, int n, J2kQuantStyle *q)
{
int i, x;
if (s->buf_end - s->buf < 1)
return AVERROR(EINVAL);
x = bytestream_get_byte(&s->buf); // Sqcd
q->nguardbits = x >> 5;
q->quantsty = x & 0x1f;
if (q->quantsty == J2K_QSTY_NONE){
n -= 3;
if... |
d2a_function_data_5684 | int SRP_VBASE_init(SRP_VBASE *vb, char *verifier_file)
{
int error_code;
STACK_OF(SRP_gN) *SRP_gN_tab = sk_SRP_gN_new_null();
char *last_index = NULL;
int i;
char **pp;
SRP_gN *gN = NULL;
SRP_user_pwd *user_pwd = NULL;
TXT_DB *tmpdb = NULL;
BIO *in = BIO_new(BIO_s_file());
err... |
d2a_function_data_5685 | int test_rshift1(BIO *bp)
{
BIGNUM *a, *b, *c;
int i;
a = BN_new();
b = BN_new();
c = BN_new();
BN_bntest_rand(a, 200, 0, 0);
a->neg = rand_neg();
for (i = 0; i < num0; i++) {
BN_rshift1(b, a);
if (bp != NULL) {
if (!results) {
BN_print(bp, a... |
d2a_function_data_5686 | static inline void encode_dc(MpegEncContext *s, int diff, int component)
{
if (((unsigned) (diff + 255)) >= 511) {
int index;
if (diff < 0) {
index = av_log2_16bit(-2 * diff);
diff--;
} else {
index = av_log2_16bit(2 * diff);
}
if (compone... |
d2a_function_data_5687 | static av_always_inline int check_block(SnowContext *s, int mb_x, int mb_y, int p[3], int intra, const uint8_t *obmc_edged, int *best_rd){
const int b_stride= s->b_width << s->block_max_depth;
BlockNode *block= &s->block[mb_x + mb_y * b_stride];
BlockNode backup= *block;
unsigned value;
int rd, inde... |
d2a_function_data_5688 | AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
{
AVFilterBuffer *pic = av_mallocz(sizeof(AVFilterBuffer));
AVFilterBufferRef *ref = NULL;
int i, tempsize;
char *buf = NULL;
if (!pic || !(ref = av_mallocz(sizeof(AVFilterBufferRef))))
goto fa... |
d2a_function_data_5689 | static void write_codebooks(RoqContext *enc, RoqTempdata *tempData)
{
int i, j;
uint8_t **outp= &enc->out_buf;
if (tempData->numCB2) {
bytestream_put_le16(outp, RoQ_QUAD_CODEBOOK);
bytestream_put_le32(outp, tempData->numCB2*6 + tempData->numCB4*4);
bytestream_put_byte(outp, tempData... |
d2a_function_data_5690 | static void ctr_BCC_update(RAND_DRBG_CTR *ctr,
const unsigned char *in, size_t inlen)
{
if (in == NULL || inlen == 0)
return;
/* If we have partial block handle it first */
if (ctr->bltmp_pos) {
size_t left = 16 - ctr->bltmp_pos;
/* If we now have a compl... |
d2a_function_data_5691 | static int
Fax3SetupState(TIFF* tif)
{
static const char module[] = "Fax3SetupState";
TIFFDirectory* td = &tif->tif_dir;
Fax3BaseState* sp = Fax3State(tif);
int needsRefLine;
Fax3CodecState* dsp = (Fax3CodecState*) Fax3State(tif);
tmsize_t rowbytes;
uint32 rowpixels, nruns;
if (td->td_bitspersample != 1) {
T... |
d2a_function_data_5692 | BIGNUM *bn_expand2(BIGNUM *b, int words)
{
BN_ULONG *A,*a;
const BN_ULONG *B;
int i;
bn_check_top(b);
if (words > b->dmax)
{
bn_check_top(b);
if (BN_get_flags(b,BN_FLG_STATIC_DATA))
{
BNerr(BN_F_BN_EXPAND2,BN_R_EXPAND_ON_STATIC_BIGNUM_DATA);
return(NULL);
}
a=A=(BN_ULONG *)OPENSSL_malloc(si... |
d2a_function_data_5693 | BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
{
bn_check_top(b);
if (a == b)
return a;
if (bn_wexpand(a, b->top) == NULL)
return NULL;
if (b->top > 0)
memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
if (BN_get_flags(b, BN_FLG_CONSTTIME) != 0)
BN_set_flags(a, BN_FLG_CON... |
d2a_function_data_5694 | static inline int init_pfa_reindex_tabs(MDCT15Context *s)
{
int i, j;
const int b_ptwo = s->ptwo_fft.nbits; /* Bits for the power of two FFTs */
const int l_ptwo = 1 << b_ptwo; /* Total length for the power of two FFTs */
const int inv_1 = l_ptwo << ((4 - b_ptwo) & 3); /* (2^b_ptwo)^-1 mod 15 */
con... |
d2a_function_data_5695 | ngx_int_t
ngx_http_core_try_files_phase(ngx_http_request_t *r,
ngx_http_phase_handler_t *ph)
{
size_t len, root, alias, reserve, allocated;
u_char *p, *name;
ngx_str_t path, args;
ngx_uint_t test_dir;
ngx_http_tr... |
d2a_function_data_5696 | X509 *ssl_get_server_send_cert(SSL *s)
{
unsigned long alg_k,alg_a,mask_k,mask_a;
CERT *c;
int i,is_export;
c=s->cert;
ssl_set_cert_masks(c, s->s3->tmp.new_cipher);
is_export=SSL_C_IS_EXPORT(s->s3->tmp.new_cipher);
if (is_export)
{
mask_k = c->export_mask_k;
mask_a = c->export_mask_a;
}
else
{
mas... |
d2a_function_data_5697 | int avio_read(AVIOContext *s, unsigned char *buf, int size)
{
int len, size1;
size1 = size;
while (size > 0) {
len = FFMIN(s->buf_end - s->buf_ptr, size);
if (len == 0 || s->write_flag) {
if((s->direct || size > s->buffer_size) && !s->update_checksum) {
// bypass... |
d2a_function_data_5698 | static void rv34_pred_mv_rv3(RV34DecContext *r, int block_type, int dir)
{
MpegEncContext *s = &r->s;
int mv_pos = s->mb_x * 2 + s->mb_y * 2 * s->b8_stride;
int A[2] = {0}, B[2], C[2];
int i, j, k;
int mx, my;
int* avail = r->avail_cache + avail_indexes[0];
if(avail[-1]){
A[0] = s->... |
d2a_function_data_5699 | void OPENSSL_LH_node_usage_stats_bio(const OPENSSL_LHASH *lh, BIO *out)
{
OPENSSL_LH_NODE *n;
unsigned long num;
unsigned int i;
unsigned long total = 0, n_used = 0;
for (i = 0; i < lh->num_nodes; i++) {
for (n = lh->b[i], num = 0; n != NULL; n = n->next)
num++;
if (num ... |
d2a_function_data_5700 | static void vp8_idct_add_c(uint8_t *dst, DCTELEM block[16], ptrdiff_t stride)
{
int i, t0, t1, t2, t3;
DCTELEM tmp[16];
for (i = 0; i < 4; i++) {
t0 = block[0*4+i] + block[2*4+i];
t1 = block[0*4+i] - block[2*4+i];
t2 = MUL_35468(block[1*4+i]) - MUL_20091(block[3*4+i]);
t3 = ... |
d2a_function_data_5701 | static void chroma(WaveformContext *s, AVFrame *in, AVFrame *out,
int component, int intensity, int offset, int column)
{
const int plane = s->desc->comp[component].plane;
const int mirror = s->mirror;
const int c0_linesize = in->linesize[(plane + 1) % s->ncomp];
const int c1_linesize... |
d2a_function_data_5702 | int test_gf2m_mod_mul(BIO *bp,BN_CTX *ctx)
{
BIGNUM *a,*b[2],*c,*d,*e,*f,*g,*h;
int i, j, ret = 0;
int p0[] = {163,7,6,3,0,-1};
int p1[] = {193,15,0,-1};
a=BN_new();
b[0]=BN_new();
b[1]=BN_new();
c=BN_new();
d=BN_new();
e=BN_new();
f=BN_new();
g=BN_new();
h=BN_new();
BN_GF2m_arr2poly(p0, b[0]);
BN_GF2... |
d2a_function_data_5703 | DECLAREreadFunc(readSeparateTilesIntoBuffer)
{
int status = 1;
uint32 imagew = TIFFRasterScanlineSize(in);
uint32 tilew = TIFFTileRowSize(in);
int iskew;
tsize_t tilesize = TIFFTileSize(in);
tdata_t tilebuf;
uint8* bufp = (uint8*) buf;
uint32 tw, tl;
uint32 row;
uint16 bps = 0, bytes_per_sample;
if (spp > (... |
d2a_function_data_5704 | void ff_mqc_init_contexts(MqcState *mqc)
{
int i;
memset(mqc->cx_states, 0, sizeof(mqc->cx_states));
mqc->cx_states[MQC_CX_UNI] = 2 * 46;
mqc->cx_states[MQC_CX_RL] = 2 * 3;
mqc->cx_states[0] = 2 * 4;
for (i = 0; i < 47; i++) {
ff_mqc_qe[2 * i] =
ff_mqc_qe[2 * i + 1... |
d2a_function_data_5705 | void sk_pop_free(_STACK *st, void (*func)(void *))
{
int i;
if (st == NULL) return;
for (i=0; i<st->num; i++)
if (st->data[i] != NULL)
func(st->data[i]);
sk_free(st);
} |
d2a_function_data_5706 | int tls13_hkdf_expand(SSL *s, const EVP_MD *md, const unsigned char *secret,
const unsigned char *label, size_t labellen,
const unsigned char *data, size_t datalen,
unsigned char *out, size_t outlen, int fatal)
{
static const uns... |
d2a_function_data_5707 | static int
matroska_find_track_by_num (MatroskaDemuxContext *matroska,
int num)
{
int i;
for (i = 0; i < matroska->num_tracks; i++)
if (matroska->tracks[i]->num == num)
return i;
return -1;
} |
d2a_function_data_5708 | static int allocate_buffers(ShortenContext *s)
{
int i, chan;
int *coeffs;
void *tmp_ptr;
for (chan=0; chan<s->channels; chan++) {
if(FFMAX(1, s->nmean) >= UINT_MAX/sizeof(int32_t)){
av_log(s->avctx, AV_LOG_ERROR, "nmean too large\n");
return -1;
}
if(s->... |
d2a_function_data_5709 | static int ct_base64_decode(const char *in, unsigned char **out)
{
size_t inlen = strlen(in);
int outlen;
unsigned char *outbuf = NULL;
if (inlen == 0) {
*out = NULL;
return 0;
}
outlen = (inlen / 4) * 3;
outbuf = OPENSSL_malloc(outlen);
if (outbuf == NULL) {
CT... |
d2a_function_data_5710 | static int ape_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
APEContext *s = avctx->priv_data;
int16_t *samples = data;
uint32_t nblocks;
int... |
d2a_function_data_5711 | int ff_rm_read_mdpr_codecdata(AVFormatContext *s, AVIOContext *pb,
AVStream *st, RMStream *rst,
unsigned int codec_data_size, const uint8_t *mime)
{
unsigned int v;
int size;
int64_t codec_pos;
int ret;
if (codec_data_size > INT_MAX)
... |
d2a_function_data_5712 | int ff_mpeg_ref_picture(MpegEncContext *s, Picture *dst, Picture *src)
{
int ret;
av_assert0(!dst->f->buf[0]);
av_assert0(src->f->buf[0]);
src->tf.f = src->f;
dst->tf.f = dst->f;
ret = ff_thread_ref_frame(&dst->tf, &src->tf);
if (ret < 0)
goto fail;
ret = update_picture_tables... |
d2a_function_data_5713 | static int cdxl_read_packet(AVFormatContext *s, AVPacket *pkt)
{
CDXLDemuxContext *cdxl = s->priv_data;
AVIOContext *pb = s->pb;
uint32_t current_size, video_size, image_size;
uint16_t audio_size, palette_size, width, height;
int64_t pos;
int format, frames, ret;
if (avio_feof(pb))
... |
d2a_function_data_5714 | int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
const unsigned char *in, int inl)
{
int fix_len, cmpl = inl;
unsigned int b;
b = ctx->cipher->block_size;
if (EVP_CIPHER_CTX_test_flags(ctx, EVP_CIPH_FLAG_LENGTH_BITS))
cmpl = (cmpl + 7) / 8;
i... |
d2a_function_data_5715 | int dv_produce_packet(DVDemuxContext *c, AVPacket *pkt,
uint8_t* buf, int buf_size)
{
int size, i;
uint8_t *ppcm[4] = {0};
if (buf_size < DV_PROFILE_BYTES ||
!(c->sys = dv_frame_profile(c->sys, buf, buf_size)) ||
buf_size < c->sys->frame_size) {
return -1; ... |
d2a_function_data_5716 | static void write_packet(AVFormatContext *s, AVPacket *pkt, OutputStream *ost)
{
AVStream *st = ost->st;
int ret;
if ((st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && video_sync_method == VSYNC_DROP) ||
(st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && audio_sync_method < 0))
pkt->pts = ... |
d2a_function_data_5717 | static ssize_t
ngx_http_validate_host(ngx_http_request_t *r, u_char **host, size_t len,
ngx_uint_t alloc)
{
u_char *h, ch;
size_t i, last;
ngx_uint_t dot;
last = len;
h = *host;
dot = 0;
for (i = 0; i < len; i++) {
ch = h[i];
if (ch == '.') {
i... |
d2a_function_data_5718 | static void mdct512(int32_t *out, int16_t *in)
{
int i, re, im, re1, im1;
int16_t rot[MDCT_SAMPLES];
IComplex x[MDCT_SAMPLES/4];
/* shift to simplify computations */
for (i = 0; i < MDCT_SAMPLES/4; i++)
rot[i] = -in[i + 3*MDCT_SAMPLES/4];
for (;i < MDCT_SAMPLES; i++)
rot[i] = i... |
d2a_function_data_5719 | void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
{
void (*start_frame)(AVFilterLink *, AVFilterBufferRef *);
AVFilterPad *dst = &link_dpad(link);
FF_DPRINTF_START(NULL, start_frame); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " "); ff_dprintf_ref(NULL, picref, 1);
if (!(star... |
d2a_function_data_5720 | static void mclms_predict(WmallDecodeCtx *s, int icoef, int *pred)
{
int ich, i;
int order = s->mclms_order;
int num_channels = s->num_channels;
for (ich = 0; ich < num_channels; ich++) {
pred[ich] = 0;
if (!s->is_channel_coded[ich])
continue;
for (i = 0; i < ... |
d2a_function_data_5721 | void BN_clear_free(BIGNUM *a)
{
int i;
if (a == NULL) return;
if (a->d != NULL)
{
memset(a->d,0,a->max*sizeof(a->d[0]));
if (!(BN_get_flags(a,BN_FLG_STATIC_DATA)))
Free(a->d);
}
i=BN_get_flags(a,BN_FLG_MALLOCED);
memset(a,0,sizeof(BIGNUM));
if (i)
Free(a);
} |
d2a_function_data_5722 | static int sbr_hf_calc_npatches(AACContext *ac, SpectralBandReplication *sbr)
{
int i, k, sb = 0;
int msb = sbr->k[0];
int usb = sbr->kx[1];
int goal_sb = ((1000 << 11) + (sbr->sample_rate >> 1)) / sbr->sample_rate;
sbr->num_patches = 0;
if (goal_sb < sbr->kx[1] + sbr->m[1]) {
for (k =... |
d2a_function_data_5723 | static int asn1_get_length(const unsigned char **pp, int *inf, long *rl,
int max)
{
const unsigned char *p = *pp;
unsigned long ret = 0;
unsigned int i;
if (max-- < 1)
return (0);
if (*p == 0x80) {
*inf = 1;
ret = 0;
p++;
} else {
... |
d2a_function_data_5724 | static int mpl2_probe(AVProbeData *p)
{
int i;
char c;
int64_t start, end;
const unsigned char *ptr = p->buf;
const unsigned char *ptr_end = ptr + p->buf_size;
for (i = 0; i < 2; i++) {
if (sscanf(ptr, "[%"SCNd64"][%"SCNd64"]%c", &start, &end, &c) != 3 &&
sscanf(ptr, "[%"SCN... |
d2a_function_data_5725 | enum AVCodecID ff_fmt_v4l2codec(uint32_t v4l2_fmt)
{
int i;
for (i = 0; ff_fmt_conversion_table[i].codec_id != AV_CODEC_ID_NONE; i++) {
if (ff_fmt_conversion_table[i].v4l2_fmt == v4l2_fmt) {
return ff_fmt_conversion_table[i].codec_id;
}
}
return AV_CODEC_ID_NONE;
} |
d2a_function_data_5726 | static void ssim_4x4xn(const uint8_t *main, int main_stride,
const uint8_t *ref, int ref_stride,
int (*sums)[4], int width)
{
int x, y, z;
for (z = 0; z < width; z++) {
uint32_t s1 = 0, s2 = 0, ss = 0, s12 = 0;
for (y = 0; y < 4; y++) {
... |
d2a_function_data_5727 | int ff_amf_get_field_value(const uint8_t *data, const uint8_t *data_end,
const uint8_t *name, uint8_t *dst, int dst_size)
{
int namelen = strlen(name);
int len;
while (*data != AMF_DATA_TYPE_OBJECT && data < data_end) {
len = ff_amf_tag_size(data, data_end);
if (l... |
d2a_function_data_5728 | static void end_frame(AVFilterLink *link)
{
UnsharpContext *unsharp = link->dst->priv;
AVFilterBufferRef *in = link->cur_buf;
AVFilterBufferRef *out = link->dst->outputs[0]->out_buf;
int cw = SHIFTUP(link->w, unsharp->hsub);
int ch = SHIFTUP(link->h, unsharp->vsub);
apply_unsharp(out->data[0],... |
d2a_function_data_5729 | static int pmp_header(AVFormatContext *s)
{
PMPContext *pmp = s->priv_data;
AVIOContext *pb = s->pb;
int tb_num, tb_den;
uint32_t index_cnt;
int audio_codec_id = AV_CODEC_ID_NONE;
int srate, channels;
int i;
uint64_t pos;
int64_t fsize = avio_size(pb);
AVStream *vst = avformat_n... |
d2a_function_data_5730 | static int dnxhd_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
DNXHDContext *ctx = avctx->priv_data;
ThreadFrame frame = { .f = data };
AVFrame *picture = data;
int fi... |
d2a_function_data_5731 | static void get_tag(AVFormatContext *s, const char *key, int type, int len, int type2_size)
{
char *value;
int64_t off = avio_tell(s->pb);
#define LEN 22
if ((unsigned)len >= (UINT_MAX - LEN) / 2)
return;
value = av_malloc(2 * len + LEN);
if (!value)
goto finish;
if (type == 0... |
d2a_function_data_5732 | c448_error_t c448_ed448_verify(
const uint8_t signature[EDDSA_448_SIGNATURE_BYTES],
const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES],
const uint8_t *message, size_t message_len,
uint8_t prehashed, const uint8_t *context,
uin... |
d2a_function_data_5733 | static void *APR_THREAD_FUNC worker_thread(apr_thread_t * thd, void *dummy)
{
proc_info *ti = dummy;
int process_slot = ti->pid;
int thread_slot = ti->tid;
apr_socket_t *csd = NULL;
event_conn_state_t *cs;
apr_pool_t *ptrans; /* Pool for per-transaction stuff */
apr_status_t rv;
... |
d2a_function_data_5734 | static int update_prob(VP56RangeCoder *c, int p)
{
static const int inv_map_table[254] = {
7, 20, 33, 46, 59, 72, 85, 98, 111, 124, 137, 150, 163, 176,
189, 202, 215, 228, 241, 254, 1, 2, 3, 4, 5, 6, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, ... |
d2a_function_data_5735 | static void byteout(MqcState *mqc)
{
retry:
if (*mqc->bp == 0xff){
mqc->bp++;
*mqc->bp = mqc->c >> 20;
mqc->c &= 0xfffff;
mqc->ct = 7;
} else if ((mqc->c & 0x8000000)){
(*mqc->bp)++;
mqc->c &= 0x7ffffff;
goto retry;
} else{
mqc->bp++;
*... |
d2a_function_data_5736 | int ff_dirac_golomb_read_16bit(DiracGolombLUT *lut_ctx, const uint8_t *buf,
int bytes, uint8_t *_dst, int coeffs)
{
int i, b, c_idx = 0;
int16_t *dst = (int16_t *)_dst;
DiracGolombLUT *future[4], *l = &lut_ctx[2*LUT_SIZE + buf[0]];
INIT_RESIDUE(res);
for (b = 1; b <= ... |
d2a_function_data_5737 | static int cache_control_remove(request_rec *r, const char *cc_header,
apr_table_t *headers)
{
char *last, *slast, *sheader;
int found = 0;
if (cc_header) {
apr_status_t rv;
char *header = apr_pstrdup(r->pool, cc_header), *token, *arg;
for (rv = cache_strqtok(header, &token,... |
d2a_function_data_5738 | int CRYPTO_alloc_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad,
int idx)
{
EX_CALLBACK *f;
EX_CALLBACKS *ip;
void *curval;
curval = CRYPTO_get_ex_data(ad, idx);
/* Already there, no need to allocate */
if (curval != NULL)
return 1;
ip = get_and_lo... |
d2a_function_data_5739 | static int adx_decode_header(AVCodecContext *avctx, const uint8_t *buf,
int bufsize)
{
int offset;
if (buf[0] != 0x80)
return 0;
offset = (AV_RB32(buf) ^ 0x80000000) + 4;
if (bufsize < offset || memcmp(buf + offset - 6, "(c)CRI", 6))
return 0;
avctx->ch... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.