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 1E00740807 for ; Mon, 31 Jan 2022 15:37:32 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6084668B0BA; Mon, 31 Jan 2022 17:37:29 +0200 (EET) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1E50568B07F for ; Mon, 31 Jan 2022 17:37:22 +0200 (EET) Received: from localhost (213-47-68-29.cable.dynamic.surfer.at [213.47.68.29]) (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 069FFFF80E for ; Mon, 31 Jan 2022 15:37:20 +0000 (UTC) Date: Mon, 31 Jan 2022 16:37:19 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220131153719.GH2829255@pb2> References: <20220130114046.GD2829255@pb2> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 16/41] avcodec/mpegvideo: Use typedefs for MPV(Main)?(Dec|Enc)?Context 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="===============7295791766620426621==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7295791766620426621== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WYcuiZm+Ublo7nQK" Content-Disposition: inline --WYcuiZm+Ublo7nQK Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 31, 2022 at 12:05:11AM +0100, Andreas Rheinhardt wrote: > Michael Niedermayer: > > On Sun, Jan 30, 2022 at 07:27:24AM +0100, Andreas Rheinhardt wrote: > >> This is in preparation for actually adding such contexts > >> and e.g. moving fields only used by the main thread to > >> the corresponding "Main" context. > >> > >> Signed-off-by: Andreas Rheinhardt > >=20 > > This breaks build on mingw64 > >=20 > > src/libavcodec/dxva2_mpeg2.c:42:50: warning: =E2=80=98struct MPVDecCont= ext=E2=80=99 declared inside parameter list will not be visible outside of = this definition or declaration > > const struct MPVDecContext *s, > > ^~~~~~~~~~~~~ > > src/libavcodec/dxva2_mpeg2.c: In function =E2=80=98fill_picture_paramet= ers=E2=80=99: > > src/libavcodec/dxva2_mpeg2.c:45:39: error: dereferencing pointer to inc= omplete type =E2=80=98const struct MPVDecContext=E2=80=99 > > const Picture *current_picture =3D s->current_picture_ptr; > > ^~ > > src/libavcodec/dxva2_mpeg2.c: At top level: > > src/libavcodec/dxva2_mpeg2.c:108:53: warning: =E2=80=98struct MPVDecCon= text=E2=80=99 declared inside parameter list will not be visible outside of= this definition or declaration > > const struct MPVDecContext *s, > > ^~~~~~~~~~~~~ > > src/libavcodec/dxva2_mpeg2.c: In function =E2=80=98fill_quantization_ma= trices=E2=80=99: > > src/libavcodec/dxva2_mpeg2.c:115:18: error: dereferencing pointer to in= complete type =E2=80=98const struct MPVDecContext=E2=80=99 > > int n =3D s->idsp.idct_permutation[ff_zigzag_direct[i]]; > > ^~ > > src/libavcodec/dxva2_mpeg2.c:115:13: warning: variable =E2=80=98n=E2=80= =99 set but not used [-Wunused-but-set-variable] > > int n =3D s->idsp.idct_permutation[ff_zigzag_direct[i]]; > > ^ > > src/libavcodec/dxva2_mpeg2.c: At top level: > > src/libavcodec/dxva2_mpeg2.c:124:37: warning: =E2=80=98struct MPVDecCon= text=E2=80=99 declared inside parameter list will not be visible outside of= this definition or declaration > > const struct MPVDecContext *s, > > ^~~~~~~~~~~~~ > > src/libavcodec/dxva2_mpeg2.c: In function =E2=80=98fill_slice=E2=80=99: > > src/libavcodec/dxva2_mpeg2.c:129:21: error: dereferencing pointer to in= complete type =E2=80=98const struct MPVDecContext=E2=80=99 > > int is_field =3D s->picture_structure !=3D PICT_FRAME; > > ^~ > > src/libavcodec/dxva2_mpeg2.c: In function =E2=80=98commit_bitstream_and= _slice_buffer=E2=80=99: > > src/libavcodec/dxva2_mpeg2.c:157:10: error: dereferencing pointer to in= complete type =E2=80=98const struct MPVDecContext=E2=80=99 > > s->current_picture_ptr->hwaccel_picture_private; > > ^~ > > src/libavcodec/dxva2_mpeg2.c: In function =E2=80=98dxva2_mpeg2_start_fr= ame=E2=80=99: > > src/libavcodec/dxva2_mpeg2.c:260:10: error: dereferencing pointer to in= complete type =E2=80=98const struct MPVDecContext=E2=80=99 > > s->current_picture_ptr->hwaccel_picture_private; > > ^~ > > src/libavcodec/dxva2_mpeg2.c:266:41: warning: passing argument 3 of =E2= =80=98fill_picture_parameters=E2=80=99 from incompatible pointer type [-Win= compatible-pointer-types] > > fill_picture_parameters(avctx, ctx, s, &ctx_pic->pp); > > ^ > > src/libavcodec/dxva2_mpeg2.c:40:13: note: expected =E2=80=98const struc= t MPVDecContext *=E2=80=99 but argument is of type =E2=80=98const struct MP= VDecContext * const=E2=80=99 > > static void fill_picture_parameters(AVCodecContext *avctx, > > ^~~~~~~~~~~~~~~~~~~~~~~ > > src/libavcodec/dxva2_mpeg2.c:267:44: warning: passing argument 3 of =E2= =80=98fill_quantization_matrices=E2=80=99 from incompatible pointer type [-= Wincompatible-pointer-types] > > fill_quantization_matrices(avctx, ctx, s, &ctx_pic->qm); > > ^ > > src/libavcodec/dxva2_mpeg2.c:106:13: note: expected =E2=80=98const stru= ct MPVDecContext *=E2=80=99 but argument is of type =E2=80=98const struct M= PVDecContext * const=E2=80=99 > > static void fill_quantization_matrices(AVCodecContext *avctx, > > ^~~~~~~~~~~~~~~~~~~~~~~~~~ > > src/libavcodec/dxva2_mpeg2.c: In function =E2=80=98dxva2_mpeg2_decode_s= lice=E2=80=99: > > src/libavcodec/dxva2_mpeg2.c:280:10: error: dereferencing pointer to in= complete type =E2=80=98const struct MPVDecContext=E2=80=99 > > s->current_picture_ptr->hwaccel_picture_private; > > ^~ > > src/libavcodec/dxva2_mpeg2.c:293:23: warning: passing argument 2 of =E2= =80=98fill_slice=E2=80=99 from incompatible pointer type [-Wincompatible-po= inter-types] > > fill_slice(avctx, s, &ctx_pic->slice[ctx_pic->slice_count++], posi= tion, > > ^ > > src/libavcodec/dxva2_mpeg2.c:123:13: note: expected =E2=80=98const stru= ct MPVDecContext *=E2=80=99 but argument is of type =E2=80=98const struct M= PVDecContext * const=E2=80=99 > > static void fill_slice(AVCodecContext *avctx, > > ^~~~~~~~~~ > > src/libavcodec/dxva2_mpeg2.c: In function =E2=80=98dxva2_mpeg2_end_fram= e=E2=80=99: > > src/libavcodec/dxva2_mpeg2.c:302:10: error: dereferencing pointer to in= complete type =E2=80=98struct MPVDecContext=E2=80=99 > > s->current_picture_ptr->hwaccel_picture_private; > > ^~ > > src/libavcodec/dxva2_mpeg2.c:312:33: warning: passing argument 1 of =E2= =80=98ff_mpeg_draw_horiz_band=E2=80=99 from incompatible pointer type [-Win= compatible-pointer-types] > > ff_mpeg_draw_horiz_band(s, 0, avctx->height); > > ^ > > In file included from src/libavcodec/dxva2_mpeg2.c:27:0: > > src/libavcodec/mpegvideo.h:606:6: note: expected =E2=80=98MPVContext * = {aka struct MPVContext *}=E2=80=99 but argument is of type =E2=80=98struct = MPVDecContext * const=E2=80=99 > > void ff_mpeg_draw_horiz_band(MPVContext *s, int y, int h); > > ^~~~~~~~~~~~~~~~~~~~~~~ > > src/ffbuild/common.mak:78: recipe for target 'libavcodec/dxva2_mpeg2.o'= failed > > make: *** [libavcodec/dxva2_mpeg2.o] Error 1 > > make: *** Waiting for unfinished jobs.... > >=20 > > [...] > >=20 >=20 > Thanks, fixed in https://github.com/mkver/FFmpeg/commits/mpegvideo (as > well as the commit message of #2 and the missing documentation for the > typedefs and some smaller stuff, too). I don't think it is worth > resending it now. > I am btw very interested into whether I should split all relevant > headers into decoder- and encoder-only parts; I only did it for those > for which there is enough stuff for the new headers and for example not > for flv.h, but splitting all headers would have the advantage that e.g. > the decoders never have the encoder headers included. I think things like libavcodec/flv.h are better split OTOH anything that just isnt currently used because for example we do not have an encoder implemented should be left in a common file=20 thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The real ebay dictionary, page 2 "100% positive feedback" - "All either got their money back or didnt compla= in" "Best seller ever, very honest" - "Seller refunded buyer after failed scam" --WYcuiZm+Ublo7nQK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYfgCLAAKCRBhHseHBAsP qxiCAJ9aS1u0uLU/Vb98YuWLpMM6sdXzZQCdGcmVo8FNkl0NWSuFL31Bynd89yw= =ZW8W -----END PGP SIGNATURE----- --WYcuiZm+Ublo7nQK-- --===============7295791766620426621== 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". --===============7295791766620426621==--