Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Ronald S. Bultje" <rsbultje@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] yuv4mpegenc: add bitdepth multiplier after rounding width.
Date: Wed, 19 Apr 2023 09:51:26 -0400
Message-ID: <CAEEMt2mfDCYds6-EHBXXqu+Fau+1o9_30FtMgSejA0g0VidsUQ@mail.gmail.com> (raw)
In-Reply-To: <20230417150010.64865-1-rsbultje@gmail.com>

Hi,

On Mon, Apr 17, 2023 at 11:00 AM Ronald S. Bultje <rsbultje@gmail.com>
wrote:

> Fixes output of HBD odd-width chroma.
> ---
>  libavformat/yuv4mpegenc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libavformat/yuv4mpegenc.c b/libavformat/yuv4mpegenc.c
> index fc6b08e0cd..2fa5ee2714 100644
> --- a/libavformat/yuv4mpegenc.c
> +++ b/libavformat/yuv4mpegenc.c
> @@ -195,13 +195,14 @@ static int yuv4_write_packet(AVFormatContext *s,
> AVPacket *pkt)
>
>      /* The following code presumes all planes to be non-interleaved. */
>      for (int k = 0; k < desc->nb_components; k++) {
> -        int plane_height = height, plane_width = width *
> desc->comp[k].step;
> +        int plane_height = height, plane_width = width;
>          const uint8_t *ptr = frame->data[k];
>
>          if (desc->nb_components >= 3 && (k == 1 || k == 2)) { /* chroma?
> */
>              plane_width  = AV_CEIL_RSHIFT(plane_width,
> desc->log2_chroma_w);
>              plane_height = AV_CEIL_RSHIFT(plane_height,
> desc->log2_chroma_h);
>          }
> +        plane_width *= desc->comp[k].step;
>
>          for (int i = 0; i < plane_height; i++) {
>              avio_write(pb, ptr, plane_width);
> --
> 2.38.1
>

Applied.

Ronald
_______________________________________________
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-04-19 13:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17 15:00 Ronald S. Bultje
2023-04-19 13:51 ` Ronald S. Bultje [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=CAEEMt2mfDCYds6-EHBXXqu+Fau+1o9_30FtMgSejA0g0VidsUQ@mail.gmail.com \
    --to=rsbultje@gmail.com \
    --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