From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id AC7A943973 for ; Fri, 4 Nov 2022 15:34:33 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B011368B7B2; Fri, 4 Nov 2022 17:34:30 +0200 (EET) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9361B68B115 for ; Fri, 4 Nov 2022 17:34:24 +0200 (EET) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 82EC6E000B for ; Fri, 4 Nov 2022 15:34:23 +0000 (UTC) Date: Fri, 4 Nov 2022 16:34:22 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20221104153422.GP1814017@pb2> References: <20221104141336.1812-1-ovchinnikov.dmitrii@gmail.com> <20221104141336.1812-2-ovchinnikov.dmitrii@gmail.com> MIME-Version: 1.0 In-Reply-To: <20221104141336.1812-2-ovchinnikov.dmitrii@gmail.com> Subject: Re: [FFmpeg-devel] [crop support for matroska demuxer, V4 2/3] libavcodec: Public code to support container crop X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="===============6266260360838977178==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============6266260360838977178== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ssZxAlvqSOvXAj81" Content-Disposition: inline --ssZxAlvqSOvXAj81 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 inform= ation [...] > + av_log(avctx, AV_LOG_WARNING, > + "Apply container and elementary stream corpping paramet= es 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, fr= ame->crop_bottom, > + frame->width, frame->height); > + frame->crop_left =3D 0; > + frame->crop_right =3D 0; > + frame->crop_top =3D 0; > + frame->crop_bottom =3D 0; > + return 0; > + } > + > + frame->crop_top +=3D avctx->container_crop_top; > + frame->crop_left +=3D avctx->container_crop_left; > + frame->crop_bottom +=3D avctx->container_crop_bottom; > + frame->crop_right +=3D avctx->container_crop_right; > + }else if (avctx->container_apply_cropping =3D=3D FF_CONTAINER_CROPPI= NG_OVERWRITE) { > + > + /*check the croppping parameters from container are reasonable a= nd correct*/ > + if (avctx->container_crop_left >=3D INT_MAX - avctx->container_c= rop_right || > + avctx->container_crop_top >=3D INT_MAX - avctx->container_cr= op_bottom || > + (avctx->container_crop_left + avctx->container_crop_right) >= =3D frame->width || > + (avctx->container_crop_top + avctx->container_crop_bottom) >= =3D 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 [...] --=20 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 --ssZxAlvqSOvXAj81 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCY2Uw9wAKCRBhHseHBAsP q7Z2AJ9u/Xp82NbFrxvM8r2iM8VnbSlWSQCeNrKBYoaCUSptSycxLAopEkKTkFg= =WAnV -----END PGP SIGNATURE----- --ssZxAlvqSOvXAj81-- --===============6266260360838977178== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============6266260360838977178==--