• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/libav-0.8.8/libavcodec/

Lines Matching refs:avctx

49  * @param avctx the codec context
52 static int pcm_bluray_parse_header(AVCodecContext *avctx,
66 if (avctx->debug & FF_DEBUG_PICT_INFO)
67 av_dlog(avctx, "pcm_bluray_parse_header: header = %02x%02x%02x%02x\n",
71 avctx->bits_per_coded_sample = bits_per_samples[header[3] >> 6];
72 if (!avctx->bits_per_coded_sample) {
73 av_log(avctx, AV_LOG_ERROR, "unsupported sample depth (0)\n");
76 avctx->sample_fmt = avctx->bits_per_coded_sample == 16 ? AV_SAMPLE_FMT_S16 :
82 avctx->sample_rate = 48000;
85 avctx->sample_rate = 96000;
88 avctx->sample_rate = 192000;
91 avctx->sample_rate = 0;
92 av_log(avctx, AV_LOG_ERROR, "unsupported sample rate (%d)\n",
103 avctx->channel_layout = channel_layouts[channel_layout];
104 avctx->channels = channels[channel_layout];
105 if (!avctx->channels) {
106 av_log(avctx, AV_LOG_ERROR, "unsupported channel configuration (%d)\n",
111 avctx->bit_rate = avctx->channels * avctx->sample_rate *
112 avctx->bits_per_coded_sample;
114 if (avctx->debug & FF_DEBUG_PICT_INFO)
115 av_dlog(avctx,
117 avctx->channels, avctx->bits_per_coded_sample,
118 avctx->sample_rate, avctx->bit_rate);
126 static av_cold int pcm_bluray_decode_init(AVCodecContext * avctx)
128 PCMBRDecode *s = avctx->priv_data;
131 avctx->coded_frame = &s->frame;
136 static int pcm_bluray_decode_frame(AVCodecContext *avctx, void *data,
141 PCMBRDecode *s = avctx->priv_data;
148 av_log(avctx, AV_LOG_ERROR, "PCM packet too small\n");
152 if (pcm_bluray_parse_header(avctx, src))
158 num_source_channels = FFALIGN(avctx->channels, 2);
159 sample_size = (num_source_channels * (avctx->sample_fmt == AV_SAMPLE_FMT_S16 ? 16 : 24)) >> 3;
164 if ((retval = avctx->get_buffer(avctx, &s->frame)) < 0) {
165 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
172 switch (avctx->channel_layout) {
178 if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
197 if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
200 memcpy(dst16, src, avctx->channels * 2);
201 dst16 += avctx->channels;
204 channel = avctx->channels;
213 channel = avctx->channels;
223 if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
247 if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
275 if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
308 if (avctx->debug & FF_DEBUG_BITSTREAM)
309 av_dlog(avctx, "pcm_bluray_decode_frame: decoded %d -> %d bytes\n",