diff mbox series

[FFmpeg-devel,09/35] avcodec/proresenc_kostya: fix chroma quantisation matrix in frame header

Message ID 20231211014429.1841681-10-u@pkh.me
State Accepted
Commit cbee015867f26eea4aed8a23eba47f515ae329c0
Headers show
Series [FFmpeg-devel,01/35] avcodec/proresenc_kostya: remove an unnecessary parenthesis level in MAKE_CODE() macro | expand

Commit Message

Clément Bœsch Dec. 11, 2023, 1:35 a.m. UTC
---
 libavcodec/proresenc_kostya.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefano Sabatini Dec. 16, 2023, 5:12 p.m. UTC | #1
On date Monday 2023-12-11 02:35:10 +0100, Clément Bœsch wrote:
> ---
>  libavcodec/proresenc_kostya.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
> index 2d45f9a685..103051830a 100644
> --- a/libavcodec/proresenc_kostya.c
> +++ b/libavcodec/proresenc_kostya.c
> @@ -1019,7 +1019,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
>              bytestream_put_byte(&buf, ctx->quant_mat[i]);
>          // chroma quantisation matrix
>          for (i = 0; i < 64; i++)
> -            bytestream_put_byte(&buf, ctx->quant_mat[i]);
> +            bytestream_put_byte(&buf, ctx->quant_chroma_mat[i]);

Looks good, but I wonder, is this covered by tests and a results in a
reference change?
Clément Bœsch Jan. 6, 2024, 5:12 p.m. UTC | #2
On Sat, Dec 16, 2023 at 06:12:19PM +0100, Stefano Sabatini wrote:
> On date Monday 2023-12-11 02:35:10 +0100, Clément Bœsch wrote:
> > ---
> >  libavcodec/proresenc_kostya.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
> > index 2d45f9a685..103051830a 100644
> > --- a/libavcodec/proresenc_kostya.c
> > +++ b/libavcodec/proresenc_kostya.c
> > @@ -1019,7 +1019,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
> >              bytestream_put_byte(&buf, ctx->quant_mat[i]);
> >          // chroma quantisation matrix
> >          for (i = 0; i < 64; i++)
> > -            bytestream_put_byte(&buf, ctx->quant_mat[i]);
> > +            bytestream_put_byte(&buf, ctx->quant_chroma_mat[i]);
> 
> Looks good, but I wonder, is this covered by tests and a results in a
> reference change?

Most of the time the quantisation matrices are tehe same, it only matters
with the "proxy" profile. I've added that last sentence to the commit
description to explain why it didn't cause any test ref change.
diff mbox series

Patch

diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index 2d45f9a685..103051830a 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -1019,7 +1019,7 @@  static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
             bytestream_put_byte(&buf, ctx->quant_mat[i]);
         // chroma quantisation matrix
         for (i = 0; i < 64; i++)
-            bytestream_put_byte(&buf, ctx->quant_mat[i]);
+            bytestream_put_byte(&buf, ctx->quant_chroma_mat[i]);
     } else {
         bytestream_put_byte  (&buf, 0x00);      // matrix flags - default matrices are used
     }