[FFmpeg-cvslog] avutil/crc: avoid needless space wastage of hardcoded crc table

Ganesh Ajjanagadde git at videolan.org
Thu Dec 3 00:32:27 CET 2015


ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Sun Nov 29 21:36:52 2015 -0500| [1bb7db217d9000a8e5fe53d9df691884fe8014bf] | committer: Ganesh Ajjanagadde

avutil/crc: avoid needless space wastage of hardcoded crc table

There was no reason AFAIK for making AV_CRC_24_IEEE 12. This simply
resulted in wasted space under --enable-hardcoded-tables:
dynamic: 1318672 libavutil/libavutil.so.55
old    : 1330680 libavutil/libavutil.so.55
new    : 1326488 libavutil/libavutil.so.55

Minor version number is bumped, with ifdefry due to API breakage.

Reviewed-by: James Almer <jamrial at gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>

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

 libavutil/crc.h     |    5 +++++
 libavutil/version.h |    3 +++
 2 files changed, 8 insertions(+)

diff --git a/libavutil/crc.h b/libavutil/crc.h
index e86bf1d..ef8a713 100644
--- a/libavutil/crc.h
+++ b/libavutil/crc.h
@@ -24,6 +24,7 @@
 #include <stdint.h>
 #include <stddef.h>
 #include "attributes.h"
+#include "version.h"
 
 /**
  * @defgroup lavu_crc32 CRC32
@@ -40,7 +41,11 @@ typedef enum {
     AV_CRC_32_IEEE,
     AV_CRC_32_IEEE_LE,  /*< reversed bitorder version of AV_CRC_32_IEEE */
     AV_CRC_16_ANSI_LE,  /*< reversed bitorder version of AV_CRC_16_ANSI */
+#if FF_API_CRC_BIG_TABLE
     AV_CRC_24_IEEE = 12,
+#else
+    AV_CRC_24_IEEE,
+#endif /* FF_API_CRC_BIG_TABLE */
     AV_CRC_MAX,         /*< Not part of public API! Do not use outside libavutil. */
 }AVCRCId;
 
diff --git a/libavutil/version.h b/libavutil/version.h
index e0ddfd2..bf0a929 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -108,6 +108,9 @@
 #ifndef FF_API_ERROR_FRAME
 #define FF_API_ERROR_FRAME              (LIBAVUTIL_VERSION_MAJOR < 56)
 #endif
+#ifndef FF_API_CRC_BIG_TABLE
+#define FF_API_CRC_BIG_TABLE            (LIBAVUTIL_VERSION_MAJOR < 56)
+#endif
 
 
 /**



More information about the ffmpeg-cvslog mailing list