• 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

50  * @param avctx the codec context
53 static int pcm_bluray_parse_header(AVCodecContext *avctx,
68 if (avctx->debug & FF_DEBUG_PICT_INFO)
69 av_dlog(avctx, "pcm_bluray_parse_header: header = %02x%02x%02x%02x\n",
73 avctx->bits_per_coded_sample = bits_per_samples[header[3] >> 6];
74 if (!(avctx->bits_per_coded_sample == 16 || avctx->bits_per_coded_sample == 24)) {
75 av_log(avctx, AV_LOG_ERROR, "unsupported sample depth (%d)\n", avctx->bits_per_coded_sample);
78 avctx->sample_fmt = avctx->bits_per_coded_sample == 16 ? AV_SAMPLE_FMT_S16
80 if (avctx->sample_fmt == AV_SAMPLE_FMT_S32)
81 avctx->bits_per_raw_sample = avctx->bits_per_coded_sample;
86 avctx->sample_rate = 48000;
89 avctx->sample_rate = 96000;
92 avctx->sample_rate = 192000;
95 avctx->sample_rate = 0;
96 av_log(avctx, AV_LOG_ERROR, "reserved sample rate (%d)\n",
107 avctx->channel_layout = channel_layouts[channel_layout];
108 avctx->channels = channels[channel_layout];
109 if (!avctx->channels) {
110 av_log(avctx, AV_LOG_ERROR, "reserved channel configuration (%d)\n",
115 avctx->bit_rate = FFALIGN(avctx->channels, 2) * avctx->sample_rate *
116 avctx->bits_per_coded_sample;
118 if (avctx->debug & FF_DEBUG_PICT_INFO)
119 av_dlog(avctx,
121 avctx->channels, avctx->bits_per_coded_sample,
122 avctx->sample_rate, avctx->bit_rate);
126 static int pcm_bluray_decode_frame(AVCodecContext *avctx, void *data,
139 av_log(avctx, AV_LOG_ERROR, "PCM packet too small\n");
143 if ((retval = pcm_bluray_parse_header(avctx, src)))
151 num_source_channels = FFALIGN(avctx->channels, 2);
153 (avctx->sample_fmt == AV_SAMPLE_FMT_S16 ? 16 : 24)) >> 3;
158 if ((retval = ff_get_buffer(avctx, frame, 0)) < 0)
164 switch (avctx->channel_layout) {
170 if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
189 if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
192 bytestream2_get_buffer(&gb, dst16, avctx->channels * 2);
193 dst16 += avctx->channels;
195 channel = avctx->channels;
204 channel = avctx->channels;
214 if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
238 if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
266 if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
298 if (avctx->debug & FF_DEBUG_BITSTREAM)
299 av_dlog(avctx, "pcm_bluray_decode_frame: decoded %d -> %d bytes\n",