• 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

91 static av_cold int adpcm_decode_init(AVCodecContext * avctx)
93 ADPCMDecodeContext *c = avctx->priv_data;
97 switch(avctx->codec->id) {
111 if (avctx->channels < min_channels || avctx->channels > max_channels) {
112 av_log(avctx, AV_LOG_ERROR, "Invalid number of channels\n");
116 switch(avctx->codec->id) {
121 if (avctx->bits_per_coded_sample < 2 || avctx->bits_per_coded_sample > 5)
125 if (avctx->extradata && avctx->extradata_size >= 8) {
126 c->status[0].predictor = AV_RL32(avctx->extradata);
127 c->status[1].predictor = AV_RL32(avctx->extradata + 4);
131 if (avctx->extradata && avctx->extradata_size >= 2)
132 c->vqa_version = AV_RL16(avctx->extradata);
138 switch(avctx->codec->id) {
150 avctx->sample_fmt = AV_SAMPLE_FMT_S16P;
153 avctx->sample_fmt = c->vqa_version == 3 ? AV_SAMPLE_FMT_S16P :
157 avctx->sample_fmt = AV_SAMPLE_FMT_S16;
329 static int xa_decode(AVCodecContext *avctx, int16_t *out0, int16_t *out1,
348 avpriv_request_sample(avctx, "unknown XA-ADPCM filter %d", filter);
377 avpriv_request_sample(avctx, "unknown XA-ADPCM filter %d", filter);
409 static void adpcm_swf_decode(AVCodecContext *avctx, const uint8_t *buf, int buf_size, int16_t *samples)
411 ADPCMDecodeContext *c = avctx->priv_data;
426 while (get_bits_count(&gb) <= size - 22*avctx->channels) {
427 for (i = 0; i < avctx->channels; i++) {
432 for (count = 0; get_bits_count(&gb) <= size - nb_bits*avctx->channels && count < 4095; count++) {
435 for (i = 0; i < avctx->channels; i++) {
477 static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb,
480 ADPCMDecodeContext *s = avctx->priv_data;
482 int ch = avctx->channels;
492 switch (avctx->codec->id) {
519 switch (avctx->codec->id) {
529 switch (avctx->codec->id) {
550 switch (avctx->codec->id) {
570 if (avctx->block_align > 0)
571 buf_size = FFMIN(buf_size, avctx->block_align);
575 if (avctx->block_align > 0)
576 buf_size = FFMIN(buf_size, avctx->block_align);
580 if (avctx->block_align > 0)
581 buf_size = FFMIN(buf_size, avctx->block_align);
586 int bsize = ff_adpcm_ima_block_sizes[avctx->bits_per_coded_sample - 2];
587 int bsamples = ff_adpcm_ima_block_samples[avctx->bits_per_coded_sample - 2];
588 if (avctx->block_align > 0)
589 buf_size = FFMIN(buf_size, avctx->block_align);
594 if (avctx->block_align > 0)
595 buf_size = FFMIN(buf_size, avctx->block_align);
603 switch (avctx->codec->id) {
629 if (avctx->extradata) {
657 static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
663 ADPCMDecodeContext *c = avctx->priv_data;
674 nb_samples = get_nb_samples(avctx, &gb, buf_size, &coded_samples, &approx_nb_samples);
676 av_log(avctx, AV_LOG_ERROR, "invalid number of samples in packet\n");
682 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
691 av_log(avctx, AV_LOG_WARNING, "mismatch in coded sample count\n");
695 st = avctx->channels == 2 ? 1 : 0;
697 switch(avctx->codec->id) {
701 for (channel = 0; channel < avctx->channels; channel++) {
725 av_log(avctx, AV_LOG_ERROR, "ERROR: step_index[%d] = %i\n",
740 for(i=0; i<avctx->channels; i++){
746 av_log(avctx, AV_LOG_ERROR, "ERROR: step_index[%d] = %i\n",
752 if (avctx->bits_per_coded_sample != 4) {
753 int samples_per_block = ff_adpcm_ima_block_samples[avctx->bits_per_coded_sample - 2];
758 for (i = 0; i < avctx->channels; i++) {
763 avctx->bits_per_coded_sample);
767 bytestream2_skip(&gb, avctx->block_align - avctx->channels * 4);
770 for (i = 0; i < avctx->channels; i++) {
783 for (i = 0; i < avctx->channels; i++)
786 for (i = 0; i < avctx->channels; i++) {
789 av_log(avctx, AV_LOG_ERROR, "ERROR: step_index[%d] = %i\n",
795 for (i = 0; i < avctx->channels; i++) {
811 av_log(avctx, AV_LOG_ERROR, "ERROR: block_predictor[0] = %d\n",
820 av_log(avctx, AV_LOG_ERROR, "ERROR: block_predictor[1] = %d\n",
849 for (channel = 0; channel < avctx->channels; channel++) {
854 av_log(avctx, AV_LOG_ERROR, "ERROR: step_index[%d] = %i\n",
871 const int16_t *samples_end = samples + avctx->channels * nb_samples;
879 av_log(avctx, AV_LOG_ERROR, "ERROR: step_index = %i/%i\n",
930 for (channel = 0; channel < avctx->channels; channel++) {
935 av_log(avctx, AV_LOG_ERROR, "ERROR: step_index[%d] = %i\n",
971 for (channel = 0; channel < avctx->channels; channel++) {
976 av_log(avctx, AV_LOG_ERROR, "ERROR: step_index[%d] = %i\n",
987 for(channel = 0; channel < avctx->channels; channel++) {
990 for(channel = 0; channel < avctx->channels; channel++) {
997 for (channel = 0; channel < avctx->channels; channel++) {
1008 for (channel = 0; channel < avctx->channels; channel++) {
1013 samples += avctx->channels;
1022 int samples_per_block = 28 * (3 - avctx->channels) * 4;
1025 if ((ret = xa_decode(avctx, out0, out1, buf + bytestream2_tell(&gb),
1027 avctx->channels, sample_offset)) < 0)
1038 av_log(avctx, AV_LOG_ERROR, "ERROR: step_index[%d] = %i\n",
1070 if(avctx->channels != 2)
1118 for(channel = 0; channel < avctx->channels; channel++) {
1130 for(channel = 0; channel < avctx->channels; channel++) {
1151 const int big_endian = avctx->codec->id == AV_CODEC_ID_ADPCM_EA_R3;
1160 for (channel=0; channel<avctx->channels; channel++)
1163 (avctx->channels + 1) * 4;
1165 for (channel=0; channel<avctx->channels; channel++) {
1169 if (avctx->codec->id == AV_CODEC_ID_ADPCM_EA_R1) {
1211 av_log(avctx, AV_LOG_WARNING, "per-channel sample count mismatch\n");
1215 if (avctx->codec->id != AV_CODEC_ID_ADPCM_EA_R1) {
1226 for (channel=0; channel<avctx->channels; channel++) {
1262 av_log(avctx, AV_LOG_ERROR, "ERROR: step_index = %i\n",
1275 for (i = 0; i < avctx->channels; i++) {
1280 av_log(avctx, AV_LOG_ERROR, "ERROR: step_index = %i\n",
1311 if (avctx->codec->id == AV_CODEC_ID_ADPCM_SBPRO_4) {
1319 } else if (avctx->codec->id == AV_CODEC_ID_ADPCM_SBPRO_3) {
1344 adpcm_swf_decode(avctx, buf, buf_size, samples);
1359 if (avctx->extradata && avctx->extradata_size == 1 && avctx->extradata[0]) {
1360 samples_per_block = avctx->extradata[0] / 16;
1361 blocks = nb_samples / avctx->extradata[0];
1368 for (channel = 0; channel < avctx->channels; channel++) {
1412 if (avctx->extradata) {
1414 if (avctx->extradata_size < 32 * avctx->channels) {
1415 av_log(avctx, AV_LOG_ERROR, "Missing coeff table\n");
1419 bytestream2_init(&tb, avctx->extradata, avctx->extradata_size);
1420 for (i = 0; i < avctx->channels; i++)
1424 for (i = 0; i < avctx->channels; i++)
1429 for (i = 0; i < avctx->channels; i++) {
1435 for (ch = 0; ch < avctx->channels; ch++) {
1468 for (channel = 0; channel < avctx->channels; channel++) {
1521 av_log(avctx, AV_LOG_ERROR, "Nothing consumed\n");