Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] tta decoder improvements
Date: Wed, 16 Aug 2023 18:49:17 +0200
Message-ID: <20230816164917.GU7802@pb2> (raw)
In-Reply-To: <CAPYw7P6of-NO0ZgXR8hv1tHZ_T2HJfdjU_xo6LA2Cim88MqPHA@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2108 bytes --]

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 <onemda@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 #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
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".

  reply	other threads:[~2023-08-16 16:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-16 10:47 Paul B Mahol
2023-08-16 16:49 ` Michael Niedermayer [this message]
2023-08-16 18:14 ` Michael Niedermayer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230816164917.GU7802@pb2 \
    --to=michael@niedermayer.cc \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git