[FFmpeg-devel] [PATCH 25/28] avcodec/x86/mpegvideoencdsp_init: Remove bits_per_raw_sample check

Michael Niedermayer michael at niedermayer.cc
Tue May 7 03:10:16 EEST 2024


On Mon, May 06, 2024 at 11:52:24PM +0200, Andreas Rheinhardt wrote:
> This check has been added in 19a0729b4cfacfd90b8ee84ab0c093ff7e397e65;
> this commit added high bit-depth versions of draw_edges
> and added the check to indicate that the mmx version only
> supports eight bits.
> Yet there is no high bit depth draw_edges function any more
> since d4d186d185df98492d8935a87c5b5cf369db9748; since then,
> the mmx version and the C version always behave the same,
> yet said check has not been removed. This commit does so.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
>  libavcodec/x86/mpegvideoencdsp_init.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/libavcodec/x86/mpegvideoencdsp_init.c b/libavcodec/x86/mpegvideoencdsp_init.c
> index ec174b15aa..9fa7ee4824 100644
> --- a/libavcodec/x86/mpegvideoencdsp_init.c
> +++ b/libavcodec/x86/mpegvideoencdsp_init.c
> @@ -233,9 +233,7 @@ av_cold void ff_mpegvideoencdsp_init_x86(MpegvideoEncDSPContext *c,
>          }
>          c->add_8x8basis = add_8x8basis_mmx;
>  
> -        if (avctx->bits_per_raw_sample <= 8) {
> -            c->draw_edges = draw_edges_mmx;
> -        }
> +        c->draw_edges = draw_edges_mmx;

does draw_edges_mmx support >8 bit ?
if not the code prior to the patch looks correct to me.
and the patch removes a part of >8bit support
it would be better to finish the >8bit support

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20240507/e6525615/attachment.sig>


More information about the ffmpeg-devel mailing list