[FFmpeg-cvslog] Merge commit '81f769fa129edc51c28285649c2df6da717e718f'

Clément Bœsch git at videolan.org
Wed Jun 29 11:49:26 CEST 2016


ffmpeg | branch: master | Clément Bœsch <clement at stupeflix.com> | Wed Jun 29 11:48:53 2016 +0200| [daedfa72541cd14b94e07a88d057af605c1f8202] | committer: Clément Bœsch

Merge commit '81f769fa129edc51c28285649c2df6da717e718f'

* commit '81f769fa129edc51c28285649c2df6da717e718f':
  gsm: Move requant_tab table to the gsm tables file

Merged-by: Clément Bœsch <clement at stupeflix.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=daedfa72541cd14b94e07a88d057af605c1f8202
---

 libavcodec/gsmdec_data.c     |    7 +++++++
 libavcodec/gsmdec_data.h     |    1 +
 libavcodec/gsmdec_template.c |    9 +--------
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/libavcodec/gsmdec_data.c b/libavcodec/gsmdec_data.c
index d90c69b..6015f78 100644
--- a/libavcodec/gsmdec_data.c
+++ b/libavcodec/gsmdec_data.c
@@ -26,6 +26,13 @@ const uint16_t ff_gsm_long_term_gain_tab[4] = {
     3277, 11469, 21299, 32767
 };
 
+const uint8_t ff_gsm_requant_tab[4][8] = {
+    { 0 },
+    { 0, 7 },
+    { 0, 2, 5, 7 },
+    { 0, 1, 2, 3, 4, 5, 6, 7 }
+};
+
 const int16_t ff_gsm_dequant_tab[64][8] = {
     {   -28,    -20,    -12,     -4,      4,     12,     20,     28},
     {   -56,    -40,    -24,     -8,      8,     24,     40,     56},
diff --git a/libavcodec/gsmdec_data.h b/libavcodec/gsmdec_data.h
index b57194b..f3499e8 100644
--- a/libavcodec/gsmdec_data.h
+++ b/libavcodec/gsmdec_data.h
@@ -38,6 +38,7 @@ typedef struct GSMContext {
 } GSMContext;
 
 extern const uint16_t ff_gsm_long_term_gain_tab[4];
+extern const uint8_t ff_gsm_requant_tab[4][8];
 extern const int16_t ff_gsm_dequant_tab[64][8];
 
 extern const int* const ff_gsm_apcm_bits[][4];
diff --git a/libavcodec/gsmdec_template.c b/libavcodec/gsmdec_template.c
index 4cb777c..9b3c0e9 100644
--- a/libavcodec/gsmdec_template.c
+++ b/libavcodec/gsmdec_template.c
@@ -28,13 +28,6 @@
 #include "gsm.h"
 #include "gsmdec_data.h"
 
-static const int requant_tab[4][8] = {
-    { 0 },
-    { 0, 7 },
-    { 0, 2, 5, 7 },
-    { 0, 1, 2, 3, 4, 5, 6, 7 }
-};
-
 static void apcm_dequant_add(GetBitContext *gb, int16_t *dst, const int *frame_bits)
 {
     int i, val;
@@ -42,7 +35,7 @@ static void apcm_dequant_add(GetBitContext *gb, int16_t *dst, const int *frame_b
     const int16_t *tab = ff_gsm_dequant_tab[maxidx];
     for (i = 0; i < 13; i++) {
         val = get_bits(gb, frame_bits[i]);
-        dst[3*i] += tab[requant_tab[frame_bits[i]][val]];
+        dst[3 * i] += tab[ff_gsm_requant_tab[frame_bits[i]][val]];
     }
 }
 


======================================================================




More information about the ffmpeg-cvslog mailing list