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 892694E8F1 for ; Sat, 12 Jul 2025 11:50:59 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id E2F4468F0AE; Sat, 12 Jul 2025 14:50:54 +0300 (EEST) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 994F468ECDC for ; Sat, 12 Jul 2025 14:50:47 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id F307D43E9B for ; Sat, 12 Jul 2025 11:50:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1752321047; 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=hdfAhRAnF0KXFv9Bu7DTrwgapSUgIpzVUoW9HDOBZ4M=; b=NlSl4m0bWgrfs250V+mHZ0SA9RUPDPyzXxme/+B15cFtUb/fKi3VSMzXf6RgHBLqPCHaL3 Z2TyR+/CaMTQQL6gZCkikPBdImFe1K6lsuCv0mWiS20QIYrATxm5aixE0cFKbhTXdzgdZj Z92on8oXwH5IzHDTunmbvviau3Qv4F05bpadQf7vN2ZvUhGhLag6CuDVeskPjc7xUt5vNn jHAgqeVp+DrhWHNN7nVh6xFkcKCESvxjYkglp8xXPMeXANcCS7JtNc8O8rEGoLgxm56552 mzwP+bplseVpcDdghDTsPkPCJno5KZO5VlogSK3u9TfbEUTtT/jH5LrwrN1sGg== Date: Sat, 12 Jul 2025 13:50:45 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250712115045.GZ29660@pb2> References: <20250710151349.1157547-1-dev@lynne.ee> <20250710151349.1157547-6-dev@lynne.ee> MIME-Version: 1.0 In-Reply-To: <20250710151349.1157547-6-dev@lynne.ee> X-GND-State: clean X-GND-Score: -70 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdegieduvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdlfedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepieegkedtjeduffejhfetgeejtdegteetgfegtdfhjefgvefhteegkeejtddvhfevnecukfhppeeguddrieeirdeihedrudejieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeihedrudejiedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 6/7] lavc: add a ProRes RAW decoder 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="===============0269258514750029657==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0269258514750029657== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="AR7Hmj0QKtbwgwGH" Content-Disposition: inline --AR7Hmj0QKtbwgwGH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Lynne On Fri, Jul 11, 2025 at 12:13:34AM +0900, Lynne wrote: > --- > configure | 1 + > libavcodec/Makefile | 1 + > libavcodec/allcodecs.c | 1 + > libavcodec/proresdec_raw.c | 519 +++++++++++++++++++++++++++++++++++++ > libavcodec/proresdec_raw.h | 60 +++++ > 5 files changed, 582 insertions(+) > create mode 100644 libavcodec/proresdec_raw.c > create mode 100644 libavcodec/proresdec_raw.h [...] > +static int16_t get_value(GetBitContext *gb, int16_t codebook) > +{ > + const int16_t switch_bits =3D codebook >> 8; > + const int16_t rice_order =3D codebook & 0xf; > + const int16_t exp_order =3D (codebook >> 4) & 0xf; > + int16_t q, bits; > + > + uint32_t b =3D show_bits_long(gb, 32); > + if (!b) > + return 0; > + q =3D ff_clz(b); > + > + if (b & 0x80000000) { > + skip_bits_long(gb, 1 + rice_order); > + return (b & 0x7FFFFFFF) >> (31 - rice_order); > + } > + > + if (q <=3D switch_bits) { > + skip_bits_long(gb, 1 + rice_order + q); > + return (q << rice_order) + > + (((b << (q + 1)) >> 1) >> (31 - rice_order)); > + } > + > + bits =3D exp_order + (q << 1) - switch_bits; > + skip_bits_long(gb, bits); > + return (b >> (32 - bits)) + > + ((switch_bits + 1) << rice_order) - > + (1 << exp_order); > +} > + > +#define TODCCODEBOOK(x) (((x) & 1) + (x) >> 1) (x) + 1 >> 1 > + > +static const uint8_t align_tile_w[16] =3D { > + 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, > +}; > + > +const int16_t ff_prores_raw_dc_cb[13] =3D { > + 16, 33, 50, 51, 51, 51, 68, 68, 68, 68, 68, 68, 118, > +}; int8_t [...] > + /* Special handling for first block */ > + dc =3D get_value(&gb, 700); > + prev_dc =3D ((dc & 1) + (dc >> 1) ^ -(int)(dc & 1)) + (dc & 1); prev_dc =3D (dc >> 1) ^ -(dc & 1); thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Let us carefully observe those good qualities wherein our enemies excel us and endeavor to excel them, by avoiding what is faulty, and imitating what is excellent in them. -- Plutarch --AR7Hmj0QKtbwgwGH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaHJMEgAKCRBhHseHBAsP qzd5AJ9UphTXFs72Dc6J614Ha4Ai5wBtZQCfeA1655HuH99a6aDr9pwvCHhiROM= =C7w/ -----END PGP SIGNATURE----- --AR7Hmj0QKtbwgwGH-- --===============0269258514750029657== 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". --===============0269258514750029657==--