• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/minidlna/ffmpeg-2.3.4/libavcodec/

Lines Matching refs:avctx

48     AVCodecContext *avctx;                          ///< parent AVCodecContext
140 static int set_bps_params(AVCodecContext *avctx)
142 switch (avctx->bits_per_raw_sample) {
144 avctx->sample_fmt = AV_SAMPLE_FMT_U8P;
147 avctx->sample_fmt = AV_SAMPLE_FMT_S16P;
150 avctx->sample_fmt = AV_SAMPLE_FMT_S32P;
153 av_log(avctx, AV_LOG_ERROR, "invalid/unsupported bits per sample: %d\n",
154 avctx->bits_per_raw_sample);
161 static void set_sample_rate_params(AVCodecContext *avctx)
163 TAKDecContext *s = avctx->priv_data;
164 int shift = 3 - (avctx->sample_rate / 11025);
166 s->uval = FFALIGN(avctx->sample_rate + 511 >> 9, 4) << shift;
167 s->subframe_scale = FFALIGN(avctx->sample_rate + 511 >> 9, 4) << 1;
170 static av_cold int tak_decode_init(AVCodecContext *avctx)
172 TAKDecContext *s = avctx->priv_data;
176 s->avctx = avctx;
177 avctx->bits_per_raw_sample = avctx->bits_per_coded_sample;
179 set_sample_rate_params(avctx);
181 return set_bps_params(avctx);
497 AVCodecContext *avctx = s->avctx;
504 if (s->sample_shift[chan] >= avctx->bits_per_raw_sample)
507 *decoded++ = get_sbits(gb, avctx->bits_per_raw_sample - s->sample_shift[chan]);
671 static int tak_decode_frame(AVCodecContext *avctx, void *data,
674 TAKDecContext *s = avctx->priv_data;
686 if ((ret = ff_tak_decode_frame_header(avctx, gb, &s->ti, 0)) < 0)
690 if (avctx->err_recognition & (AV_EF_CRCCHECK|AV_EF_COMPLIANT)) {
692 av_log(avctx, AV_LOG_ERROR, "CRC error\n");
693 if (avctx->err_recognition & AV_EF_EXPLODE)
700 av_log(avctx, AV_LOG_ERROR, "unsupported codec: %d\n", s->ti.codec);
704 av_log(avctx, AV_LOG_ERROR,
709 av_log(avctx, AV_LOG_ERROR,
714 av_log(avctx, AV_LOG_ERROR,
720 av_log(avctx, AV_LOG_ERROR, "unsupported/invalid number of samples\n");
724 avctx->bits_per_raw_sample = s->ti.bps;
725 if ((ret = set_bps_params(avctx)) < 0)
727 if (s->ti.sample_rate != avctx->sample_rate) {
728 avctx->sample_rate = s->ti.sample_rate;
729 set_sample_rate_params(avctx);
732 avctx->channel_layout = s->ti.ch_layout;
733 avctx->channels = s->ti.channels;
739 if ((ret = ff_thread_get_buffer(avctx, &tframe, 0)) < 0)
741 ff_thread_finish_setup(avctx);
743 if (avctx->bits_per_raw_sample <= 16) {
744 int buf_size = av_samples_get_buffer_size(NULL, avctx->channels,
751 s->decode_buffer, avctx->channels,
756 for (chan = 0; chan < avctx->channels; chan++)
761 for (chan = 0; chan < avctx->channels; chan++) {
764 decoded[i] = get_sbits(gb, avctx->bits_per_raw_sample);
768 for (chan = 0; chan < avctx->channels; chan++)
772 if (avctx->channels == 2) {
787 if (chan > avctx->channels)
793 if (nbit >= avctx->channels)
818 chan = avctx->channels;
844 for (chan = 0; chan < avctx->channels; chan++) {
859 av_log(avctx, AV_LOG_DEBUG, "overread\n");
861 av_log(avctx, AV_LOG_DEBUG, "underread\n");
863 if (avctx->err_recognition & (AV_EF_CRCCHECK | AV_EF_COMPLIANT)) {
866 av_log(avctx, AV_LOG_ERROR, "CRC error\n");
867 if (avctx->err_recognition & AV_EF_EXPLODE)
873 switch (avctx->sample_fmt) {
875 for (chan = 0; chan < avctx->channels; chan++) {
883 for (chan = 0; chan < avctx->channels; chan++) {
891 for (chan = 0; chan < avctx->channels; chan++) {
904 static int init_thread_copy(AVCodecContext *avctx)
906 TAKDecContext *s = avctx->priv_data;
907 s->avctx = avctx;
923 static av_cold int tak_decode_close(AVCodecContext *avctx)
925 TAKDecContext *s = avctx->priv_data;