[FFmpeg-cvslog] Merge commit 'f2422b58756ba97e3cbadc190f1ed950aa201ec7'

Clément Bœsch git at videolan.org
Tue Jun 21 13:01:16 CEST 2016


ffmpeg | branch: master | Clément Bœsch <clement at stupeflix.com> | Tue Jun 21 12:58:56 2016 +0200| [5605c1b3c02550b2acf014ecfbea73c728d25379] | committer: Clément Bœsch

Merge commit 'f2422b58756ba97e3cbadc190f1ed950aa201ec7'

* commit 'f2422b58756ba97e3cbadc190f1ed950aa201ec7':
  testprogs: Mark some tables as static const

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

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

 libavutil/aes-test.c |    7 ++++---
 libavutil/crc-test.c |    2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/libavutil/aes-test.c b/libavutil/aes-test.c
index 137df30..2bdba8a 100644
--- a/libavutil/aes-test.c
+++ b/libavutil/aes-test.c
@@ -28,22 +28,23 @@ int main(int argc, char **argv)
 {
     int i, j;
     struct AVAES *b;
-    uint8_t rkey[2][16] = {
+    static const uint8_t rkey[2][16] = {
         { 0 },
         { 0x10, 0xa5, 0x88, 0x69, 0xd7, 0x4b, 0xe5, 0xa3,
           0x74, 0xcf, 0x86, 0x7c, 0xfb, 0x47, 0x38, 0x59 }
     };
-    uint8_t pt[32], rpt[2][16] = {
+    static const uint8_t rpt[2][16] = {
         { 0x6a, 0x84, 0x86, 0x7c, 0xd7, 0x7e, 0x12, 0xad,
           0x07, 0xea, 0x1b, 0xe8, 0x95, 0xc5, 0x3f, 0xa3 },
         { 0 }
     };
-    uint8_t rct[2][16] = {
+    static const uint8_t rct[2][16] = {
         { 0x73, 0x22, 0x81, 0xc0, 0xa0, 0xaa, 0xb8, 0xf7,
           0xa5, 0x4a, 0x0c, 0x67, 0xa0, 0xc4, 0x5e, 0xcf },
         { 0x6d, 0x25, 0x1e, 0x69, 0x44, 0xb0, 0x51, 0xe0,
           0x4e, 0xaa, 0x6f, 0xb4, 0xdb, 0xf7, 0x84, 0x65 }
     };
+    uint8_t pt[32];
     uint8_t temp[32];
     uint8_t iv[2][16];
     int err = 0;
diff --git a/libavutil/crc-test.c b/libavutil/crc-test.c
index 3c250df..199aea1 100644
--- a/libavutil/crc-test.c
+++ b/libavutil/crc-test.c
@@ -25,7 +25,7 @@ int main(void)
 {
     uint8_t buf[1999];
     int i;
-    unsigned p[6][3] = {
+    static const unsigned p[6][3] = {
         { AV_CRC_32_IEEE_LE, 0xEDB88320, 0x3D5CDD04 },
         { AV_CRC_32_IEEE   , 0x04C11DB7, 0xC0F5BAE0 },
         { AV_CRC_24_IEEE   , 0x864CFB  , 0xB704CE   },


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

diff --cc libavutil/aes-test.c
index 137df30,afb5ad3..2bdba8a
--- a/libavutil/aes-test.c
+++ b/libavutil/aes-test.c
@@@ -27,8 -26,8 +27,8 @@@
  int main(int argc, char **argv)
  {
      int i, j;
 -    AVAES b;
 +    struct AVAES *b;
-     uint8_t rkey[2][16] = {
+     static const uint8_t rkey[2][16] = {
          { 0 },
          { 0x10, 0xa5, 0x88, 0x69, 0xd7, 0x4b, 0xe5, 0xa3,
            0x74, 0xcf, 0x86, 0x7c, 0xfb, 0x47, 0x38, 0x59 }
@@@ -44,14 -43,9 +44,15 @@@
          { 0x6d, 0x25, 0x1e, 0x69, 0x44, 0xb0, 0x51, 0xe0,
            0x4e, 0xaa, 0x6f, 0xb4, 0xdb, 0xf7, 0x84, 0x65 }
      };
 -    uint8_t pt[16], temp[16];
++    uint8_t pt[32];
 +    uint8_t temp[32];
 +    uint8_t iv[2][16];
      int err = 0;
  
 +    b = av_aes_alloc();
 +    if (!b)
 +        return 1;
 +
      av_log_set_level(AV_LOG_DEBUG);
  
      for (i = 0; i < 2; i++) {
diff --cc libavutil/crc-test.c
index 3c250df,ef15fb5..199aea1
--- a/libavutil/crc-test.c
+++ b/libavutil/crc-test.c
@@@ -25,13 -25,12 +25,13 @@@ int main(void
  {
      uint8_t buf[1999];
      int i;
-     unsigned p[6][3] = {
 -    static const int p[5][3] = {
++    static const unsigned p[6][3] = {
          { AV_CRC_32_IEEE_LE, 0xEDB88320, 0x3D5CDD04 },
 -        { AV_CRC_32_IEEE,    0x04C11DB7, 0xC0F5BAE0 },
 -        { AV_CRC_16_ANSI_LE,     0xA001,     0xBFD8 },
 -        { AV_CRC_16_ANSI,        0x8005,     0x1FBB },
 -        { AV_CRC_8_ATM,            0x07,       0xE3 }
 +        { AV_CRC_32_IEEE   , 0x04C11DB7, 0xC0F5BAE0 },
 +        { AV_CRC_24_IEEE   , 0x864CFB  , 0xB704CE   },
 +        { AV_CRC_16_ANSI_LE, 0xA001    , 0xBFD8     },
 +        { AV_CRC_16_ANSI   , 0x8005    , 0x1FBB     },
 +        { AV_CRC_8_ATM     , 0x07      , 0xE3       }
      };
      const AVCRC *ctx;
  



More information about the ffmpeg-cvslog mailing list