id
stringlengths
22
22
content
stringlengths
75
11.3k
d2a_function_data_5740
static void *evp_signature_from_dispatch(int name_id, const OSSL_DISPATCH *fns, OSSL_PROVIDER *prov, void *vkeymgmt_data) { /* * Signature functions cannot work without a key, and key mana...
d2a_function_data_5741
static void dvbsub_parse_pixel_data_block(AVCodecContext *avctx, DVBSubObjectDisplay *display, const uint8_t *buf, int buf_size, int top_bottom, int non_mod) { DVBSubContext *ctx = avctx->priv_data; DVBSubRegion *region = get_region(ctx, display->region_id); const ...
d2a_function_data_5742
static inline struct rgbvec interp_trilinear(const LUT3DContext *lut3d, const struct rgbvec *s) { const int prev[] = {PREV(s->r), PREV(s->g), PREV(s->b)}; const int next[] = {NEXT(s->r), NEXT(s->g), NEXT(s->b)}; const struct rgbvec d = {s->r - prev[0], s->g - pre...
d2a_function_data_5743
int ssl3_new(SSL *s) { SSL3_CTX *s3; if ((s3=(SSL3_CTX *)Malloc(sizeof(SSL3_CTX))) == NULL) goto err; memset(s3,0,sizeof(SSL3_CTX)); s->s3=s3; /* s->s3->tmp.ca_names=NULL; s->s3->tmp.key_block=NULL; s->s3->tmp.key_block_length=0; s->s3->rbuf.buf=NULL; s->s3->wbuf.buf=NULL; */ s->method->ssl_clear(s); r...
d2a_function_data_5744
void wait_for_async(SSL *s) { int width, fd; fd_set asyncfds; fd = SSL_get_async_wait_fd(s); if (fd < 0) return; width = fd + 1; FD_ZERO(&asyncfds); openssl_fdset(fd, &asyncfds); select(width, (void *)&asyncfds, NULL, NULL, NULL); }
d2a_function_data_5745
static void dequantization_float(int x, int y, Jpeg2000Cblk *cblk, Jpeg2000Component *comp, Jpeg2000T1Context *t1, Jpeg2000Band *band) { int i, j; int w = cblk->coord[0][1] - cblk->coord[0][0]; for (j = 0; j < (cblk->coord[1][1] - cblk->coord...
d2a_function_data_5746
static int ivi_init_tiles(IVIBandDesc *band, IVITile *ref_tile, int p, int b, int t_height, int t_width) { int x, y; IVITile *tile = band->tiles; for (y = 0; y < band->height; y += t_height) { for (x = 0; x < band->width; x += t_width) { tile->xpos = x; ...
d2a_function_data_5747
int ff_h264_execute_decode_slices(H264Context *h, unsigned context_count) { AVCodecContext *const avctx = h->avctx; H264SliceContext *sl; int i, j; if (h->avctx->hwaccel) return 0; if (context_count == 1) { int ret; h->slice_ctx[0].next_slice_idx = h->mb_width * h->mb_heigh...
d2a_function_data_5748
static int save_subtitle_set(AVCodecContext *avctx, AVSubtitle *sub, int *got_output) { DVBSubContext *ctx = avctx->priv_data; DVBSubRegionDisplay *display; DVBSubDisplayDefinition *display_def = ctx->display_definition; DVBSubRegion *region; AVSubtitleRect *rect; DVBSubCLUT *clut; uint32_t ...
d2a_function_data_5749
static void wipe_side_data(AVFrame *frame) { int i; for (i = 0; i < frame->nb_side_data; i++) { free_side_data(&frame->side_data[i]); } frame->nb_side_data = 0; av_freep(&frame->side_data); }
d2a_function_data_5750
static int addr_strings(const BIO_ADDR *ap, int numeric, char **hostname, char **service) { if (BIO_sock_init() != 1) return 0; if (1) { #ifdef AI_PASSIVE int ret = 0; char host[NI_MAXHOST] = "", serv[NI_MAXSERV] = ""; int flags = 0; if (numeric)...
d2a_function_data_5751
int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx) { int ret=0; if ((b->A == NULL) || (b->Ai == NULL)) { BNerr(BN_F_BN_BLINDING_UPDATE,BN_R_NOT_INITIALIZED); goto err; } if (b->counter == -1) b->counter = 0; if (++b->counter == BN_BLINDING_COUNTER && b->e != NULL && !(b->flags & BN_BLINDING_NO_RECR...
d2a_function_data_5752
int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type, uint8_t *data, size_t size) { AVPacketSideData *sd, *tmp; int i; for (i = 0; i < st->nb_side_data; i++) { sd = &st->side_data[i]; if (sd->type == type) { av_freep(&sd->data); ...
d2a_function_data_5753
int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) { BIGNUM *b, *c, *u, *v, *tmp; int ret = 0; bn_check_top(a); bn_check_top(p); BN_CTX_start(ctx); if ((b = BN_CTX_get(ctx))==NULL) goto err; if ((c = BN_CTX_get(ctx))==NULL) goto err; if ((u = BN_CTX_get(ctx))==NULL) goto err; if...
d2a_function_data_5754
ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a, unsigned char **pp, long len) { ASN1_INTEGER *ret=NULL; unsigned char *p,*to,*s, *pend; int i; if ((a == NULL) || ((*a) == NULL)) { if ((ret=M_ASN1_INTEGER_new()) == NULL) return(NULL); ret->type=V_ASN1_INTEGER; } else ret=(*a); p= *pp; pend = p...
d2a_function_data_5755
BIGNUM* gost_get0_priv_key(const EVP_PKEY *pkey) { switch (EVP_PKEY_base_id(pkey)) { case NID_id_GostR3410_94: { DSA *dsa = EVP_PKEY_get0((EVP_PKEY *)pkey); if (!dsa) { return NULL; } if (!dsa->priv_key) return NULL; return dsa->priv_key; break; } case NID_id_GostR3410_2001: { EC...
d2a_function_data_5756
static int mov_read_colr(MOVContext *c, AVIOContext *pb, MOVAtom atom) { AVStream *st; char color_parameter_type[5] = { 0 }; int color_primaries, color_trc, color_matrix; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc->nb_streams - 1]; avio_read(pb, color_parameter_type...
d2a_function_data_5757
static void sh_free(char *ptr) { size_t list; char *buddy; if (ptr == NULL) return; OPENSSL_assert(WITHIN_ARENA(ptr)); if (!WITHIN_ARENA(ptr)) return; list = sh_getlist(ptr); OPENSSL_assert(sh_testbit(ptr, list, sh.bittable)); sh_clearbit(ptr, list, sh.bitmalloc); s...
d2a_function_data_5758
void ff_aac_search_for_tns(AACEncContext *s, SingleChannelElement *sce) { TemporalNoiseShaping *tns = &sce->tns; double gain, coefs[MAX_LPC_ORDER]; int w, w2, g, count = 0; const int mmm = FFMIN(sce->ics.tns_max_bands, sce->ics.max_sfb); const int is8 = sce->ics.window_sequence[0] == EIGHT_SHORT_SEQ...
d2a_function_data_5759
int ssl3_send_server_certificate(SSL *s) { CERT_PKEY *cpk; if (s->state == SSL3_ST_SW_CERT_A) { cpk=ssl_get_server_send_pkey(s); if (cpk == NULL) { /* VRS: allow null cert if auth == KRB5 */ if ((s->s3->tmp.new_cipher->algorithm_auth != SSL_aKRB5) || (s->s3->tmp.new_cipher->algorithm_mkey & SS...
d2a_function_data_5760
static void frame_thread_free(AVCodecContext *avctx, int thread_count) { FrameThreadContext *fctx = avctx->thread_opaque; AVCodec *codec = avctx->codec; int i; park_frame_worker_threads(fctx, thread_count); if (fctx->prev_thread && fctx->prev_thread != fctx->threads) update_context_from_th...
d2a_function_data_5761
static char * ngx_http_map(ngx_conf_t *cf, ngx_command_t *dummy, void *conf) { ngx_int_t rc, index; ngx_str_t *value, file, name; ngx_uint_t i, key; ngx_http_map_conf_ctx_t *ctx; ngx_http_variable_value_t *var, **vp; ctx = cf->ctx; va...
d2a_function_data_5762
static int check_cert_time(X509_STORE_CTX *ctx, X509 *x) { time_t *ptime; int i; if (ctx->param->flags & X509_V_FLAG_USE_CHECK_TIME) ptime = &ctx->param->check_time; else ptime = NULL; i=X509_cmp_time(X509_get_notBefore(x), ptime); if (i == 0) { ctx->error=X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD; c...
d2a_function_data_5763
static inline int ff_fast_malloc(void *ptr, unsigned int *size, size_t min_size, int zero_realloc) { void *val; if (min_size < *size) return 0; min_size = FFMAX(17 * min_size / 16 + 32, min_size); av_freep(ptr); val = zero_realloc ? av_mallocz(min_size) : av_malloc(min_size); memcpy(ptr...
d2a_function_data_5764
static int adx_decode_header(AVCodecContext *avctx, const uint8_t *buf, int bufsize) { int offset; if (buf[0] != 0x80) return AVERROR_INVALIDDATA; offset = (AV_RB32(buf) ^ 0x80000000) + 4; if (bufsize < offset || memcmp(buf + offset - 6, "(c)CRI", 6)) return...
d2a_function_data_5765
static void vp6_parse_coeff(VP56Context *s) { VP56RangeCoder *c = s->ccp; VP56Model *model = s->modelp; uint8_t *permute = s->scantable.permutated; uint8_t *model1, *model2, *model3; int coeff, sign, coeff_idx; int b, i, cg, idx, ctx; int pt = 0; /* plane type (0 for Y, 1 for U or V) */ ...
d2a_function_data_5766
int ssl3_send_client_verify(SSL *s) { unsigned char *p; unsigned char data[MD5_DIGEST_LENGTH + SHA_DIGEST_LENGTH]; EVP_PKEY *pkey; EVP_PKEY_CTX *pctx = NULL; EVP_MD_CTX mctx; unsigned u = 0; unsigned long n; int j; EVP_MD_CTX_init(&mctx); if (s->state == SSL3_ST_CW_CERT_VRFY_A)...
d2a_function_data_5767
static int derive_secret_key_and_iv(SSL *s, int sending, const EVP_MD *md, const EVP_CIPHER *ciph, const unsigned char *insecret, const unsigned char *hash, const unsigned char...
d2a_function_data_5768
X509_NAME *parse_name(char *subject, long chtype, int multirdn) { size_t buflen = strlen(subject)+1; /* to copy the types and values into. due to escaping, the copy can only become shorter */ char *buf = OPENSSL_malloc(buflen); size_t max_ne = buflen / 2 + 1; /* maximum number of name elements */ char **ne_types =...
d2a_function_data_5769
int ASN1_TIME_diff(int *pday, int *psec, const ASN1_TIME *from, const ASN1_TIME *to) { struct tm tm_from, tm_to; if (!ASN1_TIME_to_tm(from, &tm_from)) return 0; if (!ASN1_TIME_to_tm(to, &tm_to)) return 0; return OPENSSL_gmtime_diff(pday, psec, &tm_from, &tm_to); }
d2a_function_data_5770
void SSL_CTX_free(SSL_CTX *a) { int i; if (a == NULL) return; CRYPTO_DOWN_REF(&a->references, &i, a->lock); REF_PRINT_COUNT("SSL_CTX", a); if (i > 0) return; REF_ASSERT_ISNT(i < 0); X509_VERIFY_PARAM_free(a->param); dane_ctx_final(&a->dane); /* * Free interna...
d2a_function_data_5771
static double sws_dcVec(SwsVector *a) { int i; double sum = 0; for (i = 0; i < a->length; i++) sum += a->coeff[i]; return sum; }
d2a_function_data_5772
static HWDevice *hw_device_match_by_codec(const AVCodec *codec) { const AVCodecHWConfig *config; HWDevice *dev; int i; for (i = 0;; i++) { config = avcodec_get_hw_config(codec, i); if (!config) return NULL; if (!(config->methods & AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_C...
d2a_function_data_5773
static void filter_mb_mbaff_edgecv( H264Context *h, uint8_t *pix, int stride, int16_t bS[7], int bsi, int qp ) { int index_a = qp + h->slice_alpha_c0_offset; int alpha = alpha_table[index_a]; int beta = beta_table[qp + h->slice_beta_offset]; if (alpha ==0 || beta == 0) return; if( bS[0] < 4 ) { ...
d2a_function_data_5774
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); if ((unsigned)len >= (UINT_MAX - 1) / 2) return; value = av_malloc(2 * len + 1); if (!value) goto finish; if (type == 0) { // UTF1...
d2a_function_data_5775
int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *ctx) { int ret = 1; bn_check_top(n); if ((b->A == NULL) || (b->Ai == NULL)) { BNerr(BN_F_BN_BLINDING_CONVERT_EX,BN_R_NOT_INITIALIZED); return(0); } if (b->counter == -1) /* Fresh blinding, doesn't need updating. */ b->counter =...
d2a_function_data_5776
int ff_rm_retrieve_cache (AVFormatContext *s, AVIOContext *pb, AVStream *st, RMStream *ast, AVPacket *pkt) { RMDemuxContext *rm = s->priv_data; av_assert0 (rm->audio_pkt_cnt > 0); if (ast->deint_id == DEINT_ID_VBRF || ast->deint_id == DEINT_ID_VBRS) av_get_packet(pb, ...
d2a_function_data_5777
static char * ngx_http_core_type(ngx_conf_t *cf, ngx_command_t *dummy, void *conf) { ngx_http_core_loc_conf_t *clcf = conf; ngx_str_t *value, *content_type, *old; ngx_uint_t i, n, hash; ngx_hash_key_t *type; value = cf->args->elts; if (ngx_strcmp(value[0].data, "include") == 0) {...
d2a_function_data_5778
static ngx_int_t ngx_http_ssi_include(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx, ngx_str_t **params) { ngx_int_t rc, key; ngx_str_t *uri, *file, *wait, *set, *stub, args; ngx_buf_t *b; ngx_uint_t flags, i; ngx_chain_t ...
d2a_function_data_5779
static int hls_slice_data_wpp(HEVCContext *s, const uint8_t *nal, int length) { HEVCLocalContext *lc = s->HEVClc; int *ret = av_malloc_array(s->sh.num_entry_point_offsets + 1, sizeof(int)); int *arg = av_malloc_array(s->sh.num_entry_point_offsets + 1, sizeof(int)); int offset; int startheader, cmpt ...
d2a_function_data_5780
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_5781
static void decode_tones_amplitude(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, int band_has_tones[]) { int mode, sb, j, i, diff, maxdiff, fi, delta, pred; Atrac3pWaveParam *wsrc, *wref; int refwaves[48]; Atrac3pWavesData *dst = ctx->channels[ch_num].tones_i...
d2a_function_data_5782
static void filter181(int16_t *data, int width, int height, int stride) { int x, y; /* horizontal filter */ for (y = 1; y < height - 1; y++) { int prev_dc = data[0 + y * stride]; for (x = 1; x < width - 1; x++) { int dc; dc = -prev_dc + data[x +...
d2a_function_data_5783
static av_always_inline void yuv2mono_1_c_template(SwsContext *c, const int16_t *buf0, const int16_t *ubuf[2], const int16_t *vbuf[2], const int16_t *abuf0, uint8_t *dest, int dstW, int uvalpha, int y, enum PixelFormat target) { const uint8_t * const...
d2a_function_data_5784
static int raised_error(void) { const char *f, *data; int l; unsigned long e; /* * When OPENSSL_NO_ERR or OPENSSL_NO_FILENAMES, no file name or line * number is saved, so no point checking them. */ #if !defined(OPENSSL_NO_FILENAMES) && !defined(OPENSSL_NO_ERR) const char *file; i...
d2a_function_data_5785
static char *app_get_pass(char *arg, int keepbio) { char *tmp, tpass[APP_PASS_LEN]; static BIO *pwdbio = NULL; int i; if (strncmp(arg, "pass:", 5) == 0) return OPENSSL_strdup(arg + 5); if (strncmp(arg, "env:", 4) == 0) { tmp = getenv(arg + 4); if (!tmp) { BIO_pri...
d2a_function_data_5786
static const unsigned char *seq_unpack_rle_block(const unsigned char *src, unsigned char *dst, int dst_size) { int i, len, sz; GetBitContext gb; int code_table[64]; /* get the rle codes (at most 64 bytes) */ init_get_bits(&gb, src, 64 * 8); for (i = 0, sz = 0; i < 64 && sz < dst_size; i++) { ...
d2a_function_data_5787
static void expand(LHASH *lh) { LHASH_NODE **n,**n1,**n2,*np; unsigned int p,i,j; unsigned long hash,nni; lh->num_nodes++; lh->num_expands++; p=(int)lh->p++; n1= &(lh->b[p]); n2= &(lh->b[p+(int)lh->pmax]); *n2=NULL; /* 27/07/92 - eay - undefined pointer bug */ nni=lh->num_alloc_nodes; for (np= *n1...
d2a_function_data_5788
SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt, STACK_OF(SSL_CIPHER) *srvr) { SSL_CIPHER *c,*ret=NULL; STACK_OF(SSL_CIPHER) *prio, *allow; int i,ii,ok; #if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_EC) unsigned int j; int ec_ok, ec_nid; unsigned char ec_search1 = 0, ec_search2 =...
d2a_function_data_5789
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, &chroma_...
d2a_function_data_5790
int tls1_cbc_remove_padding(const SSL *s, SSL3_RECORD *rec, unsigned block_size, unsigned mac_size) { unsigned padding_length, good, to_check, i; const unsigned overhead = 1 /* padding length byte */ + mac_size; /* Check if version requires explicit I...
d2a_function_data_5791
int ASN1_TIME_set_string_X509(ASN1_TIME *s, const char *str) { ASN1_TIME t; struct tm tm; int rv = 0; t.length = strlen(str); t.data = (unsigned char *)str; t.flags = ASN1_STRING_FLAG_X509_TIME; t.type = V_ASN1_UTCTIME; if (!ASN1_TIME_check(&t)) { t.type = V_ASN1_GENERALIZEDTI...
d2a_function_data_5792
static int idp_check_crlissuer(DIST_POINT *dp, X509_CRL *crl, int *pimatch) { int i; X509_NAME *nm = X509_CRL_get_issuer(crl); /* If no CRLissuer return is successful iff don't need a match */ if (!dp->CRLissuer) return *pimatch; for (i = 0; i < sk_GENERAL_NAME_num(dp->CRLissuer); i++) { GENERAL_NAME *gen =...
d2a_function_data_5793
void CRYPTO_free(void *str, const char *file, int line) { if (free_impl != NULL && free_impl != &CRYPTO_free) { free_impl(str, file, line); return; } #ifndef OPENSSL_NO_CRYPTO_MDEBUG if (call_malloc_debug) { CRYPTO_mem_debug_free(str, 0, file, line); free(str); CRYPT...
d2a_function_data_5794
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_5795
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_5796
int ff_get_wav_header(AVFormatContext *s, AVIOContext *pb, AVCodecContext *codec, int size, int big_endian) { int id; uint64_t bitrate = 0; if (size < 14) { avpriv_request_sample(codec, "wav header size < 14"); return AVERROR_INVALIDDATA; } codec->codec_type ...
d2a_function_data_5797
static double *create_freq_table(double base, double end, int n) { double log_base, log_end; double rcp_n = 1.0 / n; double *freq; int x; freq = av_malloc_array(n, sizeof(*freq)); if (!freq) return NULL; log_base = log(base); log_end = log(end); for (x = 0; x < n; x++) { ...
d2a_function_data_5798
int swri_get_dither(SwrContext *s, void *dst, int len, unsigned seed, enum AVSampleFormat noise_fmt) { double scale = s->dither.noise_scale; #define TMP_EXTRA 2 double *tmp = av_malloc_array(len + TMP_EXTRA, sizeof(double)); int i; if (!tmp) return AVERROR(ENOMEM); for(i=0; i<len + TMP_EXT...
d2a_function_data_5799
char *SSL_get_shared_ciphers(const SSL *s,char *buf,int len) { char *p; STACK_OF(SSL_CIPHER) *sk; SSL_CIPHER *c; int i; if ((s->session == NULL) || (s->session->ciphers == NULL) || (len < 2)) return(NULL); if (sk_SSL_CIPHER_num(sk) == 0) return NULL; p=buf; sk=s->session->ciphers; for (i=0; i<sk_SSL_...
d2a_function_data_5800
int url_open(URLContext **puc, const char *filename, int flags) { URLProtocol *up; const char *p; char proto_str[128], *q; p = filename; q = proto_str; while (*p != '\0' && *p != ':') { /* protocols can only contain alphabetic chars */ if (!isalpha(*p)) goto file_pro...
d2a_function_data_5801
int ff_MPV_common_init(MpegEncContext *s) { int i; int nb_slices = (HAVE_THREADS && s->avctx->active_thread_type & FF_THREAD_SLICE) ? s->avctx->thread_count : 1; if (s->encoding && s->avctx->slices) nb_slices = s->avctx->slices; if (s->codec_id == AV_CO...
d2a_function_data_5802
int bn_probable_prime_dh_retry(BIGNUM *rnd, int bits, BN_CTX *ctx) { int i; BIGNUM *t1; int ret = 0; BN_CTX_start(ctx); if ((t1 = BN_CTX_get(ctx)) == NULL) goto err; loop: if (!BN_rand(rnd, bits, 0, 1)) goto err; /* we now have a random number 'rand' to test. */ for (i = 1; i < NUMPRIMES; i++) { /* che...
d2a_function_data_5803
static int dxtory_decode_v1_420(AVCodecContext *avctx, AVFrame *pic, const uint8_t *src, int src_size) { int h, w; uint8_t *Y1, *Y2, *U, *V; int ret; if (src_size < avctx->width * avctx->height * 3LL / 2) { av_log(avctx, AV_LOG_ERROR, "packet too small\n"); ...
d2a_function_data_5804
static inline int64_t bs_get_v(const uint8_t **bs) { int64_t v = 0; int br = 0; int c; do { c = **bs; (*bs)++; v <<= 7; v |= c & 0x7F; br++; if (br > 10) return -1; } while (c & 0x80); return v - br; }
d2a_function_data_5805
int BN_sub_word(BIGNUM *a, BN_ULONG w) { int i; bn_check_top(a); w &= BN_MASK2; /* degenerate case: w is zero */ if (!w) return 1; /* degenerate case: a is zero */ if (BN_is_zero(a)) { i = BN_set_word(a, w); if (i != 0) BN_set_negative(a, 1); ret...
d2a_function_data_5806
void av_free(void *ptr) { #if CONFIG_MEMALIGN_HACK if (ptr) { int v= ((char *)ptr)[-1]; av_assert0(v>0 && v<=ALIGN); free((char *)ptr - v); } #elif HAVE_ALIGNED_MALLOC _aligned_free(ptr); #else free(ptr); #endif }
d2a_function_data_5807
static av_always_inline int vmnc_get_pixel(GetByteContext *gb, int bpp, int be) { switch (bpp * 2 + be) { case 2: case 3: return bytestream2_get_byte(gb); case 4: return bytestream2_get_le16(gb); case 5: return bytestream2_get_be16(gb); case 8: return bytestream2_...
d2a_function_data_5808
AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_size, int phase_shift, int linear, double cutoff){ AVResampleContext *c= av_mallocz(sizeof(AVResampleContext)); double factor= FFMIN(out_rate * cutoff / in_rate, 1.0); int phase_count= 1<<phase_shift; if (!c) return NULL;...
d2a_function_data_5809
static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_idx) { AVStream *stream = fmt_ctx->streams[stream_idx]; AVCodecContext *dec_ctx; AVCodec *dec; char val_str[128]; const char *s; AVRational display_aspect_ratio; struct print_buf pbuf = {.s = NULL}; print_sec...
d2a_function_data_5810
static int synth_superframe(AVCodecContext *ctx, float *samples, int *data_size) { WMAVoiceContext *s = ctx->priv_data; GetBitContext *gb = &s->gb, s_gb; int n, res, n_samples = 480; double lsps[MAX_FRAMES][MAX_LSPS]; const double *mean_lsf = s->lsps == 16 ? wmavo...
d2a_function_data_5811
int av_image_fill_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt, int height, uint8_t *ptr, const int linesizes[4]) { int i, total_size, size[4] = { 0 }, has_plane[4] = { 0 }; const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); memset(data , 0, sizeof(data[0...
d2a_function_data_5812
static void fill_buffer(AVIOContext *s) { int max_buffer_size = s->max_packet_size ? s->max_packet_size : IO_BUFFER_SIZE; uint8_t *dst = s->buf_end - s->buffer + max_buffer_size < s->buffer_size ? s->buf_end : s->buffer; int len = s->buf...
d2a_function_data_5813
static inline void qpel_motion(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int field_based, int bottom_field, int field_select, uint8_t **ref_picture, op_pixels_func (*pix_op)[4], ...
d2a_function_data_5814
static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref) { IlContext *il = inlink->dst->priv; AVFilterLink *outlink = inlink->dst->outputs[0]; AVFilterBufferRef *out; int ret, comp; out = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h); if (!out) { ...
d2a_function_data_5815
static inline void render_line_unrolled(intptr_t x, int y, int x1, intptr_t sy, int ady, int adx, float *buf) { int err = -adx; x -= x1 - 1; buf += x1 - 1; while (++x < 0) { err += ady; if (err >= 0) { ...
d2a_function_data_5816
static int parse_bintree(Indeo3DecodeContext *ctx, AVCodecContext *avctx, Plane *plane, int code, Cell *ref_cell, const int depth, const int strip_width) { Cell curr_cell; int bytes_used; if (depth <= 0) { av_log(avctx, AV_LOG_ERROR, "Stack o...
d2a_function_data_5817
BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod) { BN_BLINDING *ret=NULL; bn_check_top(mod); if ((ret=(BN_BLINDING *)OPENSSL_malloc(sizeof(BN_BLINDING))) == NULL) { BNerr(BN_F_BN_BLINDING_NEW,ERR_R_MALLOC_FAILURE); return(NULL); } memset(ret,0,sizeof(BN_BLINDING)); if (A != N...
d2a_function_data_5818
int tls1_final_finish_mac(SSL *s, const char *str, int slen, unsigned char *out) { unsigned int i; EVP_MD_CTX ctx; unsigned char buf[2*EVP_MAX_MD_SIZE]; unsigned char *q,buf2[12]; int idx; long mask; int err=0; const EVP_MD *md; q=buf; if (s->s3->handshake_buffer) if (!ssl3_digest_cached_records(...
d2a_function_data_5819
static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamplesref) { AResampleContext *aresample = inlink->dst->priv; const int n_in = insamplesref->audio->nb_samples; int n_out = FFMAX(n_in * aresample->ratio * 2, 1); AVFilterLink *const outlink = inlink->dst->outputs[0]; AVFil...
d2a_function_data_5820
static int frame_start(MpegEncContext *s) { int ret; /* mark & release old frames */ if (s->pict_type != AV_PICTURE_TYPE_B && s->last_picture_ptr && s->last_picture_ptr != s->next_picture_ptr && s->last_picture_ptr->f.buf[0]) { ff_mpeg_unref_picture(s, s->last_picture_ptr); } ...
d2a_function_data_5821
int BLAKE2s_Update(BLAKE2S_CTX *c, const void *data, size_t datalen) { const uint8_t *in = data; size_t fill; while(datalen > 0) { fill = sizeof(c->buf) - c->buflen; /* Must be >, not >=, so that last block can be hashed differently */ if(datalen > fill) { memcpy(c->buf ...
d2a_function_data_5822
static int sipr_decode_frame(AVCodecContext *avctx, void *datap, int *data_size, AVPacket *avpkt) { SiprContext *ctx = avctx->priv_data; const uint8_t *buf=avpkt->data; SiprParameters parm; const SiprModeParam *mode_par = &modes[ctx->mode]; GetBitContext gb; float *d...
d2a_function_data_5823
static int asink_query_formats(AVFilterContext *ctx) { BufferSinkContext *buf = ctx->priv; AVFilterFormats *formats = NULL; AVFilterChannelLayouts *layouts = NULL; unsigned i; int ret; CHECK_LIST_SIZE(sample_fmts) CHECK_LIST_SIZE(sample_rates) CHECK_LIST_SIZE(channel_layouts) CHECK_...
d2a_function_data_5824
static int split_field_ref_list(Picture *dest, int dest_len, Picture *src, int src_len, int parity, int long_i){ int i = split_field_half_ref_list(dest, dest_len, src, long_i, parity); dest += i; dest_len -= i; i += split_field_half_r...
d2a_function_data_5825
static int test_EVP_PKEY_check(int i) { int ret = 0; const unsigned char *p; EVP_PKEY *pkey = NULL; #ifndef OPENSSL_NO_EC EC_KEY *eckey = NULL; #endif EVP_PKEY_CTX *ctx = NULL; EVP_PKEY_CTX *ctx2 = NULL; const APK_DATA *ak = &keycheckdata[i]; const unsigned char *input = ak->kder; si...
d2a_function_data_5826
int ff_set_systematic_pal2(uint32_t pal[256], enum AVPixelFormat pix_fmt) { int i; for (i = 0; i < 256; i++) { int r, g, b; switch (pix_fmt) { case AV_PIX_FMT_RGB8: r = (i>>5 )*36; g = ((i>>2)&7)*36; b = (i&3 )*85; break; c...
d2a_function_data_5827
static int ssl_cipher_process_rulestr(const char *rule_str, CIPHER_ORDER **head_p, CIPHER_ORDER **tail_p, SSL_CIPHER **ca_list) { unsigned long algorithms, mask, algo_strength, mask_strength; const char *l, *start, *buf; int j, multi, found, rule, retval, ok, buflen; unsigned long c...
d2a_function_data_5828
static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int index, const char *filt_name, const char *args, void *log_ctx) { AVFilter *filt; char inst_name[30]; char *tmp_args = NULL; int ret; snprintf(inst_name, sizeof(inst_name), "Parsed_%s_%d", filt_name...
d2a_function_data_5829
static int submit_packet(PerThreadContext *p, AVCodecContext *user_avctx, AVPacket *avpkt) { FrameThreadContext *fctx = p->parent; PerThreadContext *prev_thread = fctx->prev_thread; const AVCodec *codec = p->avctx->codec; int ret; if (!avpkt->size && !(codec->capabilities &...
d2a_function_data_5830
static int queue_attached_pictures(AVFormatContext *s) { int i; for (i = 0; i < s->nb_streams; i++) if (s->streams[i]->disposition & AV_DISPOSITION_ATTACHED_PIC && s->streams[i]->discard < AVDISCARD_ALL) { AVPacket copy = s->streams[i]->attached_pic; copy.buf = av_buf...
d2a_function_data_5831
static int PixarLogEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) { static const char module[] = "PixarLogEncode"; TIFFDirectory *td = &tif->tif_dir; PixarLogState *sp = EncoderState(tif); tmsize_t i; tmsize_t n; int llen; unsigned short * up; (void) s; switch (sp->user_datafmt) { case PIXARLOGDATAFMT_...
d2a_function_data_5832
void ff_riff_write_info_tag(AVIOContext *pb, const char *tag, const char *str) { int len = strlen(str); if (len > 0) { len++; ffio_wfourcc(pb, tag); avio_wl32(pb, len); avio_put_str(pb, str); if (len & 1) avio_w8(pb, 0); } }
d2a_function_data_5833
int ff_ass_add_rect(AVSubtitle *sub, const char *dialog, int ts_start, int ts_end, int raw) { int len = 0, dlen, duration = ts_end - ts_start; char s_start[16], s_end[16], header[48] = {0}; AVSubtitleRect **rects; if (!raw) { ts_to_string(s_start, sizeof(s_start), ts_start);...
d2a_function_data_5834
X509_NAME *parse_name(char *subject, long chtype, int multirdn) { size_t buflen = strlen(subject)+1; /* to copy the types and values into. due to escaping, the copy can only become shorter */ char *buf = OPENSSL_malloc(buflen); size_t max_ne = buflen / 2 + 1; /* maximum number of name elements */ char **ne_types =...
d2a_function_data_5835
int ff_h264_fill_default_ref_list(H264Context *h){ MpegEncContext * const s = &h->s; int i, len; if(h->slice_type_nos==FF_B_TYPE){ Picture *sorted[32]; int cur_poc, list; int lens[2]; if(FIELD_PICTURE) cur_poc= s->current_picture_ptr->field_poc[ s->picture_struc...
d2a_function_data_5836
static void print_report(OutputFile *output_files, OutputStream *ost_table, int nb_ostreams, int is_last_report, int64_t timer_start) { char buf[1024]; OutputStream *ost; AVFormatContext *oc; int64_t total_size; AVCodecContext *enc; int frame_num...
d2a_function_data_5837
void *av_realloc(void *ptr, size_t size) { #if CONFIG_MEMALIGN_HACK int diff; #endif /* let's disallow possible ambiguous cases */ if (size > (max_alloc_size - 32)) return NULL; #if CONFIG_MEMALIGN_HACK //FIXME this isn't aligned correctly, though it probably isn't needed if (!ptr) ...
d2a_function_data_5838
int BN_ucmp(const BIGNUM *a, const BIGNUM *b) { int i; BN_ULONG t1, t2, *ap, *bp; bn_check_top(a); bn_check_top(b); i = a->top - b->top; if (i != 0) return i; ap = a->d; bp = b->d; for (i = a->top - 1; i >= 0; i--) { t1 = ap[i]; t2 = bp[i]; if (t1 !=...
d2a_function_data_5839
static av_cold int g726_init(AVCodecContext * avctx) { G726Context* c = avctx->priv_data; unsigned int index; if (avctx->sample_rate <= 0) { av_log(avctx, AV_LOG_ERROR, "Samplerate is invalid\n"); return -1; } index = (avctx->bit_rate + avctx->sample_rate/2) / avctx->sample_rate - ...