[FFmpeg-soc] [soc]: r3832 - in qcelp: qcelp_glue.diff qcelpdec.c

reynaldo subversion at mplayerhq.hu
Sat Nov 15 16:28:50 CET 2008


Author: reynaldo
Date: Sat Nov 15 16:28:49 2008
New Revision: 3832

Log:
Patch by Kenan, moves out unneded parsing cruft from the decoder, updates glue patch accordingly

Modified:
   qcelp/qcelp_glue.diff
   qcelp/qcelpdec.c

Modified: qcelp/qcelp_glue.diff
==============================================================================
--- qcelp/qcelp_glue.diff	(original)
+++ qcelp/qcelp_glue.diff	Sat Nov 15 16:28:49 2008
@@ -42,11 +42,14 @@ Index: libavformat/mov.c
 ===================================================================
 --- libavformat/mov.c	(revision 15802)
 +++ libavformat/mov.c	(working copy)
-@@ -987,6 +987,7 @@
+@@ -987,6 +987,10 @@
  #endif
      /* no ifdef since parameters are always those */
      case CODEC_ID_QCELP:
 +        st->need_parsing = AVSTREAM_PARSE_FULL;
++        st->codec->frame_size= 160;
++        st->codec->channels= 1; /* really needed */
++        break;
      case CODEC_ID_AMR_NB:
      case CODEC_ID_AMR_WB:
          st->codec->frame_size= sc->samples_per_frame;

Modified: qcelp/qcelpdec.c
==============================================================================
--- qcelp/qcelpdec.c	(original)
+++ qcelp/qcelpdec.c	Sat Nov 15 16:28:49 2008
@@ -58,18 +58,6 @@ static void qcelp_update_filter_mem(floa
 
 static int qcelp_decode_init(AVCodecContext *avctx)
 {
-    if(avctx->sample_rate != 8000)
-        av_log(avctx, AV_LOG_WARNING,
-               "Unsupported samplerate %d, resampling.", avctx->sample_rate);
-
-    if(avctx->channels != 1)
-        av_log(avctx, AV_LOG_WARNING,
-               "QCELP does not allow %d channels. Trying mono.\n",
-               avctx->channels);
-
-    avctx->sample_rate = 8000;
-    avctx->channels = 1;
-
     return 0;
 }
 



More information about the FFmpeg-soc mailing list