From: Michael Niedermayer <michael@niedermayer.cc> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH 6/7] lavc: add a ProRes RAW decoder Date: Sat, 12 Jul 2025 13:50:45 +0200 Message-ID: <20250712115045.GZ29660@pb2> (raw) In-Reply-To: <20250710151349.1157547-6-dev@lynne.ee> [-- Attachment #1.1: Type: text/plain, Size: 2209 bytes --] 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 = codebook >> 8; > + const int16_t rice_order = codebook & 0xf; > + const int16_t exp_order = (codebook >> 4) & 0xf; > + int16_t q, bits; > + > + uint32_t b = show_bits_long(gb, 32); > + if (!b) > + return 0; > + q = ff_clz(b); > + > + if (b & 0x80000000) { > + skip_bits_long(gb, 1 + rice_order); > + return (b & 0x7FFFFFFF) >> (31 - rice_order); > + } > + > + if (q <= switch_bits) { > + skip_bits_long(gb, 1 + rice_order + q); > + return (q << rice_order) + > + (((b << (q + 1)) >> 1) >> (31 - rice_order)); > + } > + > + bits = 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] = { > + 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] = { > + 16, 33, 50, 51, 51, 51, 68, 68, 68, 68, 68, 68, 118, > +}; int8_t [...] > + /* Special handling for first block */ > + dc = get_value(&gb, 700); > + prev_dc = ((dc & 1) + (dc >> 1) ^ -(int)(dc & 1)) + (dc & 1); prev_dc = (dc >> 1) ^ -(dc & 1); thx [...] -- 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 [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 195 bytes --] [-- Attachment #2: Type: text/plain, Size: 251 bytes --] _______________________________________________ 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".
next prev parent reply other threads:[~2025-07-12 11:50 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2025-07-10 15:13 [FFmpeg-devel] [PATCH 1/7] vf_libplacebo: add support for specifying a LUT for the input Lynne 2025-07-10 15:13 ` [FFmpeg-devel] [PATCH 2/7] hwcontext_vulkan: temporarily disable host_image_copy Lynne 2025-07-10 15:13 ` [FFmpeg-devel] [PATCH 3/7] vulkan: add support for 16-bit RGGB Bayer pixfmt Lynne 2025-07-10 15:13 ` [FFmpeg-devel] [PATCH 4/7] lavc/vulkan/common: sign-ify lengths Lynne 2025-07-10 15:13 ` [FFmpeg-devel] [PATCH 5/7] lavc: add codec ID and profiles for ProRes RAW Lynne 2025-07-10 15:13 ` [FFmpeg-devel] [PATCH 6/7] lavc: add a ProRes RAW decoder Lynne 2025-07-12 11:50 ` Michael Niedermayer [this message] 2025-07-10 15:13 ` [FFmpeg-devel] [PATCH 7/7] lavc: add a ProRes RAW Vulkan hwaccel Lynne 2025-07-12 11:51 ` Michael Niedermayer 2025-07-11 10:39 ` [FFmpeg-devel] [PATCH 1/7] vf_libplacebo: add support for specifying a LUT for the input Niklas Haas 2025-07-11 14:01 ` Lynne
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20250712115045.GZ29660@pb2 \ --to=michael@niedermayer.cc \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git