From d41e10c1485ec34aa342f7bc2e5bf4f9b6e66414 Mon Sep 17 00:00:00 2001 From: Mark Thompson Date: Wed, 27 Sep 2017 01:44:21 +0100 Subject: [PATCH 1/3] hevc: Fix aligned array declarations --- libavcodec/hevcdsp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/hevcdsp.c b/libavcodec/hevcdsp.c index 81db9e29a5..558e9382da 100644 --- a/libavcodec/hevcdsp.c +++ b/libavcodec/hevcdsp.c @@ -89,7 +89,7 @@ static const int8_t transform[32][32] = { 90, -90, 88, -85, 82, -78, 73, -67, 61, -54, 46, -38, 31, -22, 13, -4 }, }; -DECLARE_ALIGNED(16, const int16_t, ff_hevc_epel_coeffs[7][16]) = { +DECLARE_ALIGNED(16, const int16_t, ff_hevc_epel_coeffs)[7][16] = { { -2, 58, 10, -2, -2, 58, 10, -2, -2, 58, 10, -2, -2, 58, 10, -2 }, { -4, 54, 16, -2, -4, 54, 16, -2, -4, 54, 16, -2, -4, 54, 16, -2 }, { -6, 46, 28, -4, -6, 46, 28, -4, -6, 46, 28, -4, -6, 46, 28, -4 }, @@ -99,7 +99,7 @@ DECLARE_ALIGNED(16, const int16_t, ff_hevc_epel_coeffs[7][16]) = { { -2, 10, 58, -2, -2, 10, 58, -2, -2, 10, 58, -2, -2, 10, 58, -2 }, }; -DECLARE_ALIGNED(16, const int8_t, ff_hevc_epel_coeffs8[7][16]) = { +DECLARE_ALIGNED(16, const int8_t, ff_hevc_epel_coeffs8)[7][16] = { { -2, 58, 10, -2, -2, 58, 10, -2, -2, 58, 10, -2, -2, 58, 10, -2 }, { -4, 54, 16, -2, -4, 54, 16, -2, -4, 54, 16, -2, -4, 54, 16, -2 }, { -6, 46, 28, -4, -6, 46, 28, -4, -6, 46, 28, -4, -6, 46, 28, -4 }, @@ -109,13 +109,13 @@ DECLARE_ALIGNED(16, const int8_t, ff_hevc_epel_coeffs8[7][16]) = { { -2, 10, 58, -2, -2, 10, 58, -2, -2, 10, 58, -2, -2, 10, 58, -2 }, }; -DECLARE_ALIGNED(16, const int16_t, ff_hevc_qpel_coeffs[3][8]) = { +DECLARE_ALIGNED(16, const int16_t, ff_hevc_qpel_coeffs)[3][8] = { { -1, 4, -10, 58, 17, -5, 1, 0 }, { -1, 4, -11, 40, 40, -11, 4, -1 }, { 0, 1, -5, 17, 58, -10, 4, -1 }, }; -DECLARE_ALIGNED(16, const int8_t, ff_hevc_qpel_coeffs8[3][16]) = { +DECLARE_ALIGNED(16, const int8_t, ff_hevc_qpel_coeffs8)[3][16] = { { -1, 4, -10, 58, 17, -5, 1, 0, -1, 4, -10, 58, 17, -5, 1, 0 }, { -1, 4, -11, 40, 40, -11, 4, -1, -1, 4, -11, 40, 40, -11, 4, -1 }, { 0, 1, -5, 17, 58, -10, 4, -1, 0, 1, -5, 17, 58, -10, 4, -1 }, From 2068d116db9883c71cb00b76e7d371cc30164d08 Mon Sep 17 00:00:00 2001 From: Mark Thompson Date: Wed, 27 Sep 2017 01:47:24 +0100 Subject: [PATCH 2/3] hapdec: Delete include for nonexistent file It exists as an alias for string.h in most C libraries, so usually this line is harmless. --- libavcodec/hapdec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/hapdec.c b/libavcodec/hapdec.c index 8f5365b269..17707180c2 100644 --- a/libavcodec/hapdec.c +++ b/libavcodec/hapdec.c @@ -37,7 +37,6 @@ #include "bytestream.h" #include "hap.h" #include "internal.h" -#include "memory.h" #include "snappy.h" #include "texturedsp.h" #include "thread.h" From 92f0aceb36c6e4412d4cf346e70dc74b5a4069e9 Mon Sep 17 00:00:00 2001 From: Mark Thompson Date: Wed, 27 Sep 2017 01:48:37 +0100 Subject: [PATCH 3/3] cinepakenc: Move declaration out of for initialisation statement --- libavcodec/cinepakenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/cinepakenc.c b/libavcodec/cinepakenc.c index 00b3e75e4c..c323bde30f 100644 --- a/libavcodec/cinepakenc.c +++ b/libavcodec/cinepakenc.c @@ -891,8 +891,9 @@ static int rd_strip(CinepakEncContext *s, int y, int h, int keyframe, #define SMALLEST_CODEBOOK 1 for (v1enough = 0, v1_size = SMALLEST_CODEBOOK; v1_size <= CODEBOOK_MAX && !v1enough; v1_size <<= 2) { for (v4enough = 0, v4_size = 0; v4_size <= v1_size && !v4enough; v4_size = v4_size ? v4_size << 2 : v1_size >= SMALLEST_CODEBOOK << 2 ? v1_size >> 2 : SMALLEST_CODEBOOK) { + CinepakMode mode; // try all modes - for (CinepakMode mode = 0; mode < MODE_COUNT; mode++) { + for (mode = 0; mode < MODE_COUNT; mode++) { // don't allow MODE_MC in intra frames if (keyframe && mode == MODE_MC) continue;