[FFmpeg-devel] [PATCH 2/4] lavc/h264_loopfilter: align TC and bS tables

Rémi Denis-Courmont remi at remlab.net
Mon Jul 1 20:08:05 EEST 2024


---
 libavcodec/h264_loopfilter.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c
index 9481882dd0..96f572c1d2 100644
--- a/libavcodec/h264_loopfilter.c
+++ b/libavcodec/h264_loopfilter.c
@@ -66,7 +66,7 @@ static const uint8_t beta_table[52*3] = {
     18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
     18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
 };
-const int8_t ff_h264_tc0_table[52*3][4] = {
+const DECLARE_ALIGNED_4(int8_t, ff_h264_tc0_table)[52*3][4] = {
     {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
     {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
     {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
@@ -266,8 +266,8 @@ static av_always_inline void h264_filter_mb_fast_internal(const H264Context *h,
     qpc1 = (qpc + qpc1 + 1) >> 1;
 
     if( IS_INTRA(mb_type) ) {
-        static const int16_t bS4[4] = {4,4,4,4};
-        static const int16_t bS3[4] = {3,3,3,3};
+        static const DECLARE_ALIGNED_8(int16_t, bS4)[4] = {4,4,4,4};
+        static const DECLARE_ALIGNED_8(int16_t, bS3)[4] = {3,3,3,3};
         const int16_t *bSH = FIELD_PICTURE(h) ? bS3 : bS4;
         if(left_type)
             filter_mb_edgev( &img_y[4*0<<pixel_shift], linesize, bS4, qp0, a, b, h, 1);
-- 
2.45.2



More information about the ffmpeg-devel mailing list