Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 1/5] avcodec/mjpegdec: Restrict AVID MJPEG to non-SMVJPEG
Date: Sat, 10 Dec 2022 11:51:25 +0100
Message-ID: <GV1P250MB07378C0618C004370AC6EC518F1F9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <GV1P250MB0737145A1974D7C94305C3668F1A9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM>

Andreas Rheinhardt:
> AVID content is not supposed to be SMVJPEG; given that
> both these codecs involve manipulating image dimensions
> and cropping dimensions, it makes sense to restrict
> the AVID codepaths to non-SMVJPEG codecs in order not
> to have to think about what if SMVJPEG happens to
> have a codec tag indicating AVID.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavcodec/mjpegdec.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
> index 9b7465abe7..28e2839072 100644
> --- a/libavcodec/mjpegdec.c
> +++ b/libavcodec/mjpegdec.c
> @@ -452,7 +452,8 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
>          if (ret < 0)
>              return ret;
>  
> -        if ((s->avctx->codec_tag == MKTAG('A', 'V', 'R', 'n') ||
> +        if (s->avctx->codec_id != AV_CODEC_ID_SMVJPEG &&
> +            (s->avctx->codec_tag == MKTAG('A', 'V', 'R', 'n') ||
>               s->avctx->codec_tag == MKTAG('A', 'V', 'D', 'J')) &&
>              s->orig_height < height)
>              s->avctx->height = AV_CEIL_RSHIFT(s->orig_height, s->avctx->lowres);
> @@ -2927,7 +2928,8 @@ the_end:
>              return ret;
>          }
>      }
> -    if ((avctx->codec_tag == MKTAG('A', 'V', 'R', 'n') ||
> +    if (avctx->codec_id != AV_CODEC_ID_SMVJPEG &&
> +        (avctx->codec_tag == MKTAG('A', 'V', 'R', 'n') ||
>           avctx->codec_tag == MKTAG('A', 'V', 'D', 'J')) &&
>          avctx->coded_height > s->orig_height) {
>          frame->height   = AV_CEIL_RSHIFT(avctx->coded_height, avctx->lowres);

Will apply this patchset tonight unless there are objections.

- Andreas

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

  parent reply	other threads:[~2022-12-10 10:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-07 19:00 Andreas Rheinhardt
2022-12-07 19:02 ` [FFmpeg-devel] [PATCH 2/5] avcodec/mjpegdec: Move special SMVJPEG-code to SMVJPEG-only function Andreas Rheinhardt
2022-12-07 19:02 ` [FFmpeg-devel] [PATCH 3/5] avcodec/mjpegdec: Avoid checks whose results are known at compile-time Andreas Rheinhardt
2022-12-07 19:02 ` [FFmpeg-devel] [PATCH 4/5] avcodec/mjpegdec: Only use receive_frame for SMVJPEG Andreas Rheinhardt
2022-12-07 19:02 ` [FFmpeg-devel] [PATCH 5/5] avcodec/mjpegdec: Move smv_process_frame() to other SMV stuff Andreas Rheinhardt
2022-12-10 10:51 ` Andreas Rheinhardt [this message]
2022-12-10 11:02 ` [FFmpeg-devel] [PATCH 1/5] avcodec/mjpegdec: Restrict AVID MJPEG to non-SMVJPEG Paul B Mahol

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=GV1P250MB07378C0618C004370AC6EC518F1F9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM \
    --to=andreas.rheinhardt@outlook.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