From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 22B7D4B195 for ; Mon, 1 Jul 2024 17:08:16 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 62B6868D7FD; Mon, 1 Jul 2024 20:08:14 +0300 (EEST) Received: from ursule.remlab.net (vps-a2bccee9.vps.ovh.net [51.75.19.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2D3A668D6E7 for ; Mon, 1 Jul 2024 20:08:08 +0300 (EEST) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id 93093C0140 for ; Mon, 1 Jul 2024 20:08:07 +0300 (EEST) From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 1 Jul 2024 20:08:04 +0300 Message-ID: <20240701170807.107018-1-remi@remlab.net> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [RFC] [PATCH 1/4] lavc/h264_loopfilter: expose tc0_table (for checkasm) X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --- libavcodec/h264_loopfilter.c | 50 ++++++++++++++++++------------------ libavcodec/h264dsp.h | 2 ++ 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c index c164a289b7..9481882dd0 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, }; -static const uint8_t tc0_table[52*3][4] = { +const 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 }, @@ -109,10 +109,10 @@ static av_always_inline void filter_mb_edgev(uint8_t *pix, int stride, if( bS[0] < 4 || !intra ) { int8_t tc[4]; - tc[0] = tc0_table[index_a][bS[0]]; - tc[1] = tc0_table[index_a][bS[1]]; - tc[2] = tc0_table[index_a][bS[2]]; - tc[3] = tc0_table[index_a][bS[3]]; + tc[0] = ff_h264_tc0_table[index_a][bS[0]]; + tc[1] = ff_h264_tc0_table[index_a][bS[1]]; + tc[2] = ff_h264_tc0_table[index_a][bS[2]]; + tc[3] = ff_h264_tc0_table[index_a][bS[3]]; h->h264dsp.h264_h_loop_filter_luma(pix, stride, alpha, beta, tc); } else { h->h264dsp.h264_h_loop_filter_luma_intra(pix, stride, alpha, beta); @@ -131,10 +131,10 @@ static av_always_inline void filter_mb_edgecv(uint8_t *pix, int stride, if( bS[0] < 4 || !intra ) { int8_t tc[4]; - tc[0] = tc0_table[index_a][bS[0]]+1; - tc[1] = tc0_table[index_a][bS[1]]+1; - tc[2] = tc0_table[index_a][bS[2]]+1; - tc[3] = tc0_table[index_a][bS[3]]+1; + tc[0] = ff_h264_tc0_table[index_a][bS[0]]+1; + tc[1] = ff_h264_tc0_table[index_a][bS[1]]+1; + tc[2] = ff_h264_tc0_table[index_a][bS[2]]+1; + tc[3] = ff_h264_tc0_table[index_a][bS[3]]+1; h->h264dsp.h264_h_loop_filter_chroma(pix, stride, alpha, beta, tc); } else { h->h264dsp.h264_h_loop_filter_chroma_intra(pix, stride, alpha, beta); @@ -154,10 +154,10 @@ static av_always_inline void filter_mb_mbaff_edgev(const H264Context *h, uint8_t if( bS[0] < 4 || !intra ) { int8_t tc[4]; - tc[0] = tc0_table[index_a][bS[0*bsi]]; - tc[1] = tc0_table[index_a][bS[1*bsi]]; - tc[2] = tc0_table[index_a][bS[2*bsi]]; - tc[3] = tc0_table[index_a][bS[3*bsi]]; + tc[0] = ff_h264_tc0_table[index_a][bS[0*bsi]]; + tc[1] = ff_h264_tc0_table[index_a][bS[1*bsi]]; + tc[2] = ff_h264_tc0_table[index_a][bS[2*bsi]]; + tc[3] = ff_h264_tc0_table[index_a][bS[3*bsi]]; h->h264dsp.h264_h_loop_filter_luma_mbaff(pix, stride, alpha, beta, tc); } else { h->h264dsp.h264_h_loop_filter_luma_mbaff_intra(pix, stride, alpha, beta); @@ -177,10 +177,10 @@ static av_always_inline void filter_mb_mbaff_edgecv(const H264Context *h, if( bS[0] < 4 || !intra ) { int8_t tc[4]; - tc[0] = tc0_table[index_a][bS[0*bsi]] + 1; - tc[1] = tc0_table[index_a][bS[1*bsi]] + 1; - tc[2] = tc0_table[index_a][bS[2*bsi]] + 1; - tc[3] = tc0_table[index_a][bS[3*bsi]] + 1; + tc[0] = ff_h264_tc0_table[index_a][bS[0*bsi]] + 1; + tc[1] = ff_h264_tc0_table[index_a][bS[1*bsi]] + 1; + tc[2] = ff_h264_tc0_table[index_a][bS[2*bsi]] + 1; + tc[3] = ff_h264_tc0_table[index_a][bS[3*bsi]] + 1; h->h264dsp.h264_h_loop_filter_chroma_mbaff(pix, stride, alpha, beta, tc); } else { h->h264dsp.h264_h_loop_filter_chroma_mbaff_intra(pix, stride, alpha, beta); @@ -199,10 +199,10 @@ static av_always_inline void filter_mb_edgeh(uint8_t *pix, int stride, if( bS[0] < 4 || !intra ) { int8_t tc[4]; - tc[0] = tc0_table[index_a][bS[0]]; - tc[1] = tc0_table[index_a][bS[1]]; - tc[2] = tc0_table[index_a][bS[2]]; - tc[3] = tc0_table[index_a][bS[3]]; + tc[0] = ff_h264_tc0_table[index_a][bS[0]]; + tc[1] = ff_h264_tc0_table[index_a][bS[1]]; + tc[2] = ff_h264_tc0_table[index_a][bS[2]]; + tc[3] = ff_h264_tc0_table[index_a][bS[3]]; h->h264dsp.h264_v_loop_filter_luma(pix, stride, alpha, beta, tc); } else { h->h264dsp.h264_v_loop_filter_luma_intra(pix, stride, alpha, beta); @@ -221,10 +221,10 @@ static av_always_inline void filter_mb_edgech(uint8_t *pix, int stride, if( bS[0] < 4 || !intra ) { int8_t tc[4]; - tc[0] = tc0_table[index_a][bS[0]]+1; - tc[1] = tc0_table[index_a][bS[1]]+1; - tc[2] = tc0_table[index_a][bS[2]]+1; - tc[3] = tc0_table[index_a][bS[3]]+1; + tc[0] = ff_h264_tc0_table[index_a][bS[0]]+1; + tc[1] = ff_h264_tc0_table[index_a][bS[1]]+1; + tc[2] = ff_h264_tc0_table[index_a][bS[2]]+1; + tc[3] = ff_h264_tc0_table[index_a][bS[3]]+1; h->h264dsp.h264_v_loop_filter_chroma(pix, stride, alpha, beta, tc); } else { h->h264dsp.h264_v_loop_filter_chroma_intra(pix, stride, alpha, beta); diff --git a/libavcodec/h264dsp.h b/libavcodec/h264dsp.h index 4a9cb1568d..13371c59ea 100644 --- a/libavcodec/h264dsp.h +++ b/libavcodec/h264dsp.h @@ -117,6 +117,8 @@ typedef struct H264DSPContext { int (*startcode_find_candidate)(const uint8_t *buf, int size); } H264DSPContext; +extern const int8_t ff_h264_tc0_table[][4]; + void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, const int chroma_format_idc); void ff_h264dsp_init_aarch64(H264DSPContext *c, const int bit_depth, -- 2.45.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".