From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 1BC414AB36 for ; Fri, 18 Jul 2025 14:17:39 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id DDB5B68D1ED; Fri, 18 Jul 2025 17:17:37 +0300 (EEST) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 0D5CA68D09F for ; Fri, 18 Jul 2025 17:17:35 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 0757344319 for ; Fri, 18 Jul 2025 14:17:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1752848255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=orz9bylIhb19oRaMYmSVDuNwqG3QremAgWyv5cSI6Yw=; b=e8pOZYZt+wrofELq8A5x1Sg2Yg1lWb7G7DdC1sjNqM9Q6CTVSiwh90a1VJmsaMuHoJ8Frr sPSc/wOqhKZhwJ7gxLdBtBy9RE8YJfMvkoXDPb3QlhXs+JRGh3KCLgXhRbvEoWueGh/kZx lBzHtlV7Kauz5Wvq7t2obMxoo/1MeMELCXmJ+bF6ihoXQoqDcgT3JW5MaNtYUyMpBEyoyl bNjjptv0+Ranwd2A9j6lKLwv8937mn5EzOa8vx86w4cS1pfT5lBg67jy/YB4+GoM8sLtic 9TwqFl/iuPZmUbMglIuLesbPCUpWmOKmTUOAPBZXxduSnLv2aQOWz9/MN7E4XA== Date: Fri, 18 Jul 2025 16:17:34 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250718141734.GB29660@pb2> References: <20250718103055.1172733-1-timothee.informatique@regaud-chapuy.fr> <20250718103055.1172733-3-timothee.informatique@regaud-chapuy.fr> MIME-Version: 1.0 In-Reply-To: <20250718103055.1172733-3-timothee.informatique@regaud-chapuy.fr> X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdeifeeikecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddtjeenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepleekgefgffeiudefjeeuffejudehtddtudeltdehveevvedtieeulefhtdeutdeknecukfhppeeguddrieeirdeihedrudejieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeihedrudejiedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 3/4] avcodec/h264dec: implement export of video coding info for H.264 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="===============8319548250445609921==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============8319548250445609921== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Nqg/DQtkGzTYm2Zj" Content-Disposition: inline --Nqg/DQtkGzTYm2Zj Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 18, 2025 at 12:30:54PM +0200, Timoth=C3=A9e Regaud wrote: > From: Timothee Regaud >=20 > Hooks into the H.264 decoder to populate the new generic video coding inf= o structures. It handles allocation of the side data buffer, collection of = modes/MVs/refs for all macroblock types, and attach the final side data buf= fer to the output frame. >=20 > This should serve as a template for adding support for other codecs down = the line. >=20 > Signed-off-by: Timothee Regaud > --- > Changelog | 1 + > libavcodec/h264_mb.c | 150 ++++++++++++++++++++++++++++++++++ > libavcodec/h264_mb_template.c | 3 + > libavcodec/h264_picture.c | 3 + > libavcodec/h264_slice.c | 19 +++++ > libavcodec/h264dec.c | 17 ++++ > libavcodec/h264dec.h | 12 +++ > 7 files changed, 205 insertions(+) >=20 [...] > @@ -102,6 +103,14 @@ > // does this mb use listX, note does not work if subMBs > #define USES_LIST(a, list) ((a) & ((MB_TYPE_P0L0 | MB_TYPE_P1L0) << (2 *= (list)))) > =20 > +/* Constants for AVVideoCodingInfo buffer allocation for H.264. > + * Max sub-data per MB is for inter prediction with 16 partitions. */ > +static const size_t H264_MAX_MV_SIZE_PER_LIST =3D 16 * sizeof(int16_t[2]= ); > +static const size_t H264_MAX_REF_SIZE_PER_LIST =3D 16 * sizeof(int8_t); > +static const size_t H264_INTER_SUB_DATA_SIZE =3D 2 * (H264_MAX_MV_SIZE_P= ER_LIST + H264_MAX_REF_SIZE_PER_LIST); > +static const size_t H264_INTRA_SUB_DATA_SIZE =3D 16 * sizeof(int8_t); > +static const size_t H264_MAX_SUB_DATA_PER_MB =3D FFMAX(H264_INTER_SUB_DA= TA_SIZE, H264_INTRA_SUB_DATA_SIZE); CC libavfilter/vf_codecview.o In file included from src/libavfilter/vf_codecview.c:45:0: src/libavcodec/h264dec.h:110:48: error: initializer element is not constant static const size_t H264_INTER_SUB_DATA_SIZE =3D 2 * (H264_MAX_MV_SIZE_PER= _LIST + H264_MAX_REF_SIZE_PER_LIST); ^ In file included from src/libavutil/error.h:30:0, from src/libavutil/common.h:43, from src/libavutil/avutil.h:300, from src/libavutil/opt.h:31, from src/libavfilter/vf_codecview.c:34: src/libavutil/macros.h:47:20: error: initializer element is not constant #define FFMAX(a,b) ((a) > (b) ? (a) : (b)) ^ src/libavcodec/h264dec.h:112:48: note: in expansion of macro =E2=80=98FFMAX= =E2=80=99 static const size_t H264_MAX_SUB_DATA_PER_MB =3D FFMAX(H264_INTER_SUB_DATA= _SIZE, H264_INTRA_SUB_DATA_SIZE); arm-linux-gnueabi-gcc-7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0 [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope --Nqg/DQtkGzTYm2Zj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaHpXegAKCRBhHseHBAsP q90rAJ0VXb+T9NpYwHLnrXkKQDXCgOvWzgCfSGVRvHiunRUgi6uvwCt2SrzfUS0= =Ve/n -----END PGP SIGNATURE----- --Nqg/DQtkGzTYm2Zj-- --===============8319548250445609921== 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". --===============8319548250445609921==--