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 DBBDC44D6B for ; Sun, 18 May 2025 19:51:28 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id E967C68DAC1; Sun, 18 May 2025 22:51:24 +0300 (EEST) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 4BC1D68DA45 for ; Sun, 18 May 2025 22:51:18 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 91B63439D5 for ; Sun, 18 May 2025 19:51:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1747597877; 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=x640TgqrHnotAUzLmODP6ECdmLvVWA0tnMeY5AcqVCo=; b=NJ95PaXxbEHhKK96/wBv4M2lxlQU9cF2uVkKbzl5469j+EHGpD2JYJcW8qsR/8gTOhEo3y HH0U+moaA+eEgewX7+VeVfVPMsQjoGwzESGXE3a9gX0FnAon14fRZV3fjXZSY5dshS7bT1 rsKg32YHGFVSr12ZvMxZMZhSxwPE4rAx97bQ6ThHWmdt0UngzEHvVJtScHVY6FD1GI6dOb cMn2FFxNpmP9QH5fMF3f50xLfP6hg6z0+LXqLEHKPJRDl3pmfQlPJppTiDCT9NX6LWoZ8W 4WYlshP++YKyh4SI1puz9Yuhku0pZ/JJEAQ38S0Ma6x+dxLRO4gva/j3a4Uryw== Date: Sun, 18 May 2025 21:51:16 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250518195116.GG29660@pb2> References: <20250518122639.2958966-1-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: X-GND-State: clean X-GND-Score: -70 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdefudelfeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdeftddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeeigeektdejudffjefhteegjedtgeettefggedthfejgfevhfetgeekjedtvdfhveenucfkphepgedurdeiiedrieejrdduudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieejrdduudefpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] avformat/framecrcenc: List types and checksums for for side data 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="===============2196577349510636585==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============2196577349510636585== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rG06EXEkXXNXhH/G" Content-Disposition: inline --rG06EXEkXXNXhH/G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi On Sun, May 18, 2025 at 04:43:01PM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > This allows detecting changes and regressions in side data related code= , same as what > > framecrc does for before already for packet data itself. > >=20 > > Signed-off-by: Michael Niedermayer > > --- > > libavformat/framecrcenc.c | 116 +- > > tests/ref/fate/autorotate | 2 +- > > tests/ref/fate/cover-art-mp3-id3v2-remux | 2 +- > > tests/ref/fate/ffmpeg-bsf-input | 10 +- > > tests/ref/fate/ffmpeg-spec-disposition | 2 +- > > tests/ref/fate/force_key_frames-source | 784 ++++++------ > > tests/ref/fate/force_key_frames-source-drop | 34 +- > > tests/ref/fate/force_key_frames-source-dup | 1224 +++++++++---------- > > tests/ref/fate/gapless-mp3 | 6 +- > > tests/ref/fate/h264_redundant_pps-side_data | 2 +- > > tests/ref/fate/id3v2-priv-remux | 2 +- > > tests/ref/fate/matroska-hdr10-plus-remux | 2 +- > > tests/ref/fate/matroska-ogg-opus-remux | 2 +- > > tests/ref/fate/matroska-opus-remux | 2 +- > > tests/ref/fate/matroska-vp8-alpha-remux | 14 +- > > tests/ref/fate/mov-cover-image | 2 +- > > tests/ref/fate/segment-mp4-to-ts | 250 ++-- > > tests/ref/fate/shortest | 100 +- > > tests/ref/fate/webm-hdr10-plus-remux | 2 +- > > tests/ref/fate/webm-webvtt-remux | 24 +- > > 20 files changed, 1346 insertions(+), 1236 deletions(-) > >=20 > > diff --git a/libavformat/framecrcenc.c b/libavformat/framecrcenc.c > > index 2ba20f3aab4..96c2a82eb2a 100644 > > --- a/libavformat/framecrcenc.c > > +++ b/libavformat/framecrcenc.c > > @@ -21,8 +21,11 @@ > > =20 > > #include > > =20 > > +#include "config.h" > > #include "libavutil/adler32.h" > > #include "libavutil/avstring.h" > > +#include "libavutil/intreadwrite.h" > > +#include "libavutil/hdr_dynamic_metadata.h" >=20 > Use proper alphabetical ordering Is there a inproper alphabetical ordering ? [...] >=20 > > + const AVPacketSideData *const sd =3D &pkt->side_data[i]; > > + const uint8_t *data =3D sd->data; > > + uint32_t side_data_crc =3D 0; > > + > > + switch (sd->type) { > > +#if HAVE_BIGENDIAN > > + uint8_t bswap_buf[FFMAX3(sizeof(AVCPBProperties), > > + sizeof(AVProducerReferenceTim= e), > > + sizeof(AVDynamicHDRPlus))]; > > + case AV_PKT_DATA_PALETTE: > > + case AV_PKT_DATA_REPLAYGAIN: > > + case AV_PKT_DATA_DISPLAYMATRIX: > > + case AV_PKT_DATA_STEREO3D: > > + case AV_PKT_DATA_AUDIO_SERVICE_TYPE: > > + case AV_PKT_DATA_FALLBACK_TRACK: > > + case AV_PKT_DATA_MASTERING_DISPLAY_METADATA: > > + case AV_PKT_DATA_SPHERICAL: > > + case AV_PKT_DATA_CONTENT_LIGHT_LEVEL: > > + case AV_PKT_DATA_S12M_TIMECODE: > > + for (size_t j =3D 0; j < sd->size / 4; j++) { > > + uint8_t buf[4]; > > + AV_WL32(buf, AV_RB32(sd->data + 4 * j)); > > + side_data_crc =3D av_adler32_update(side_data_crc,= buf, 4); > > + } > > + break; > > + case AV_PKT_DATA_CPB_PROPERTIES: > > +#define BSWAP(struct, field) bswap(bswap_buf, offsetof(struct, field),= sizeof(((struct){0}).field)) > > +#define BSWAP_RAT(struct, field) do{BSWAP(struct, field.num); BSWAP(st= ruct, field.den);}while(0) >=20 > Missing spaces. Ill try to find them and tell them to return, i hope they will pick the right places, because iam not sure which are the right places >=20 > > + if (sd->size =3D=3D sizeof(AVCPBProperties)) { > > + memcpy(bswap_buf, sd->data, sizeof(AVCPBProperties= )); > > + data =3D bswap_buf; > > + BSWAP(AVCPBProperties, max_bitrate); > > + BSWAP(AVCPBProperties, min_bitrate); > > + BSWAP(AVCPBProperties, avg_bitrate); > > + BSWAP(AVCPBProperties, buffer_size); > > + BSWAP(AVCPBProperties, vbv_delay); > > + } > > + goto pod; > > + case AV_PKT_DATA_PRFT: > > + if (sd->size =3D=3D sizeof(AVProducerReferenceTime)) { > > + memcpy(bswap_buf, sd->data, sizeof(AVProducerRefer= enceTime)); > > + data =3D bswap_buf; > > + BSWAP(AVProducerReferenceTime, wallclock); > > + BSWAP(AVProducerReferenceTime, flags); > > + } > > + goto pod; > > + case AV_PKT_DATA_DYNAMIC_HDR10_PLUS: > > + if (sd->size =3D=3D sizeof(AVDynamicHDRPlus)) { > > + memcpy(bswap_buf, sd->data, sizeof(AVDynamicHDRPlu= s)); > > + data =3D bswap_buf; > > + for(int i =3D 0; i<3; i++) { >=20 > Missing space after for and around "<". Also, why not use FF_ARRAY_ELEMS? > Same below. I could do: FF_ARRAY_ELEMS(((AVDynamicHDRPlus*)0)->params) Is that what you are asking for ? or do you know of a prettier way ? [...] thx --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Whats the most studid thing your enemy could do ? Blow himself up Whats the most studid thing you could do ? Give up your rights and freedom because your enemy blew himself up. --rG06EXEkXXNXhH/G Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaCo6MAAKCRBhHseHBAsP q8YhAJ9JYDE+wiVaRiOd6/uFnwy6Wu18igCeMlRszC8XNWG9nlYtFze4rzfefhY= =fZ7U -----END PGP SIGNATURE----- --rG06EXEkXXNXhH/G-- --===============2196577349510636585== 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". --===============2196577349510636585==--