From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [crop support for matroska demuxer, V4 2/3] libavcodec: Public code to support container crop
Date: Fri, 4 Nov 2022 16:34:22 +0100
Message-ID: <20221104153422.GP1814017@pb2> (raw)
In-Reply-To: <20221104141336.1812-2-ovchinnikov.dmitrii@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2710 bytes --]
On Fri, Nov 04, 2022 at 03:13:35PM +0100, OvchinnikovDmitrii wrote:
> Support both simple and receive_frame api
> The container crop information is applied additional to frame crop information
[...]
> + av_log(avctx, AV_LOG_WARNING,
> + "Apply container and elementary stream corpping parametes error: "
> + "container cropping parameters"
> + "%"SIZE_SPECIFIER"/%"SIZE_SPECIFIER"/%"SIZE_SPECIFIER"/%"SIZE_SPECIFIER" "
> + "elementary stream croping paramters"
> + "%"SIZE_SPECIFIER"/%"SIZE_SPECIFIER"/%"SIZE_SPECIFIER"/%"SIZE_SPECIFIER" "
> + "(frame size %dx%d). This is a bug, please report it\n",
> + avctx->container_crop_left, avctx->container_crop_right, avctx->container_crop_top, avctx->container_crop_bottom,
> + frame->crop_left, frame->crop_right, frame->crop_top, frame->crop_bottom,
> + frame->width, frame->height);
> + frame->crop_left = 0;
> + frame->crop_right = 0;
> + frame->crop_top = 0;
> + frame->crop_bottom = 0;
> + return 0;
> + }
> +
> + frame->crop_top += avctx->container_crop_top;
> + frame->crop_left += avctx->container_crop_left;
> + frame->crop_bottom += avctx->container_crop_bottom;
> + frame->crop_right += avctx->container_crop_right;
> + }else if (avctx->container_apply_cropping == FF_CONTAINER_CROPPING_OVERWRITE) {
> +
> + /*check the croppping parameters from container are reasonable and correct*/
> + if (avctx->container_crop_left >= INT_MAX - avctx->container_crop_right ||
> + avctx->container_crop_top >= INT_MAX - avctx->container_crop_bottom ||
> + (avctx->container_crop_left + avctx->container_crop_right) >= frame->width ||
> + (avctx->container_crop_top + avctx->container_crop_bottom) >= frame->height) {
> + av_log(avctx, AV_LOG_WARNING,
> + "Invalid container cropping information set by a demuxer: "
> + "%"SIZE_SPECIFIER"/%"SIZE_SPECIFIER"/%"SIZE_SPECIFIER"/%"SIZE_SPECIFIER" "
> + "(frame size %dx%d). This is a bug, please report it\n",
> + avctx->container_crop_left, avctx->container_crop_right, avctx->container_crop_top, avctx->container_crop_bottom,
> + frame->width, frame->height);
The types seems mismatching
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
[-- 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".
next prev parent reply other threads:[~2022-11-04 15:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 14:13 [FFmpeg-devel] [crop support for matroska demuxer, V4 1/3] libavcodec: Add crop related fields to structure AVCodecContext and AVCodecParameters OvchinnikovDmitrii
2022-11-04 14:13 ` [FFmpeg-devel] [crop support for matroska demuxer, V4 2/3] libavcodec: Public code to support container crop OvchinnikovDmitrii
2022-11-04 15:34 ` Michael Niedermayer [this message]
2022-11-23 14:44 ` Dmitrii Ovchinnikov
2022-11-24 23:07 ` Michael Niedermayer
2022-11-04 14:13 ` [FFmpeg-devel] [crop support for matroska demuxer, V4 3/3] libavformat\matroskadec.c: crop support for matroska demuxer OvchinnikovDmitrii
2022-12-20 15:37 [FFmpeg-devel] [crop support for matroska demuxer, V4 1/3] libavcodec: Add crop related fields to structure AVCodecContext and AVCodecParameters Dmitrii Ovchinnikov
2022-12-20 15:37 ` [FFmpeg-devel] [crop support for matroska demuxer, V4 2/3] libavcodec: Public code to support container crop Dmitrii Ovchinnikov
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=20221104153422.GP1814017@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