Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Peter Ross <pross@xvid.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] lead: support unaligned blocks
Date: Thu, 15 Feb 2024 19:17:09 +1100
Message-ID: <Zc3IhTCEUpsJPdLo@869728a0df17329e597ee5994a1a1c9d> (raw)
In-Reply-To: <d5fa98d7b16f69f132077ba8ec48471f2a1bc4ca.1699749612.git.pross@xvid.org>


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

On Sun, Nov 12, 2023 at 11:40:26AM +1100, Peter Ross wrote:
> Fixed ticket #10656.
> ---
>  libavcodec/leaddec.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/libavcodec/leaddec.c b/libavcodec/leaddec.c
> index ede52fba5a..fd2018256d 100644
> --- a/libavcodec/leaddec.c
> +++ b/libavcodec/leaddec.c
> @@ -192,8 +192,8 @@ static int lead_decode_frame(AVCodecContext *avctx, AVFrame * frame,
>      init_get_bits8(&gb, s->bitstream_buf, size);
>  
>      if (avctx->pix_fmt == AV_PIX_FMT_YUV420P) {
> -        for (int mb_y = 0; mb_y < avctx->height / 16; mb_y++)
> -            for (int mb_x = 0; mb_x < avctx->width / 16; mb_x++)
> +        for (int mb_y = 0; mb_y < (avctx->height + 15) / 16; mb_y++)
> +            for (int mb_x = 0; mb_x < (avctx->width + 15) / 16; mb_x++)
>                  for (int b = 0; b < (yuv20p_half ? 4 : 6); b++) {
>                      int luma_block = yuv20p_half ? 2 : 4;
>                      const VLCElem * dc_vlc = b < luma_block ? luma_dc_vlc.table : chroma_dc_vlc.table;
> @@ -225,8 +225,8 @@ static int lead_decode_frame(AVCodecContext *avctx, AVFrame * frame,
>                  }
>      } else {
>          for (int f = 0; f < fields; f++)
> -            for (int j = 0; j < avctx->height / fields / 8; j++)
> -                for (int i = 0; i < avctx->width / 8; i++)
> +            for (int j = 0; j < (avctx->height + 7) / fields / 8; j++)
> +                for (int i = 0; i < (avctx->width + 7) / 8; i++)
>                      for (int plane = 0; plane < 3; plane++) {
>                          const VLCElem * dc_vlc = !plane ? luma_dc_vlc.table : chroma_dc_vlc.table;
>                          int dc_bits            = !plane ? LUMA_DC_BITS : CHROMA_DC_BITS;
> -- 
> 2.42.0

clearing out my patch queue.

posted to ml nov 2023.

will apply in a few days.

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)

[-- 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:[~2024-02-15  8:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-12  0:40 Peter Ross
2024-02-15  8:17 ` Peter Ross [this message]

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=Zc3IhTCEUpsJPdLo@869728a0df17329e597ee5994a1a1c9d \
    --to=pross@xvid.org \
    --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