On Wed, Aug 16, 2023 at 12:47:36PM +0200, Paul B Mahol wrote:
> Patch attached.

>  tta.c |  167 
> +++++++++++++++++++++++++++++++++++++++++++-----------------------
>  1 file changed, 109 insertions(+), 58 deletions(-)
> a289f05b1ebb50604675a11894e254108e276714  
> 0001-avcodec-tta-switch-to-planar-sample-formats.patch
> From 2b6ac4f7093157533b7f279a78a73bfabeb98cf0 Mon Sep 17 00:00:00 2001
> From: Paul B Mahol <one...@gmail.com>
> Date: Tue, 15 Aug 2023 21:13:59 +0200
> Subject: [PATCH] avcodec/tta: switch to planar sample formats
> 
> Makes decoding few percent faster.

great


> Also fix code style while here.

great too

but these should be 2 seprate patches
we can see also below the changes are unrelated and not limited
to otherwise changed lines


[...]
> @@ -306,44 +310,24 @@ static int tta_decode_frame(AVCodecContext *avctx, 
> AVFrame *frame,
>              rice->sum1 += value - (rice->sum1 >> 4);
>              if (rice->k1 > 0 && rice->sum1 < ff_tta_shift_16[rice->k1])
>                  rice->k1--;
> -            else if(rice->sum1 > ff_tta_shift_16[rice->k1 + 1])
> +            else if (rice->sum1 > ff_tta_shift_16[rice->k1 + 1])
>                  rice->k1++;
>              value += ff_tta_shift_1[rice->k0];
>          default:
>              rice->sum0 += value - (rice->sum0 >> 4);
>              if (rice->k0 > 0 && rice->sum0 < ff_tta_shift_16[rice->k0])
>                  rice->k0--;
> -            else if(rice->sum0 > ff_tta_shift_16[rice->k0 + 1])
> +            else if (rice->sum0 > ff_tta_shift_16[rice->k0 + 1])
>                  rice->k0++;
>          }
[...]
>  }
>
> -static av_cold int tta_decode_close(AVCodecContext *avctx) {
> +static av_cold int tta_decode_close(AVCodecContext *avctx)
> +{
>      TTAContext *s = avctx->priv_data;
>


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Whats the most studid thing your enemy could do ? Blow himself up
Whats the most studid thing you could do ? Give up your rights and
freedom because your enemy blew himself up.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to