[FFmpeg-devel] FFV1 high bit depth RGB

Michael Niedermayer michaelni at gmx.at
Wed Jul 4 18:43:10 CEST 2012

On Wed, Jul 04, 2012 at 04:43:34PM +0200, Georg Lippitsch wrote:
> Am 04.07.2012, 16:08 Uhr, schrieb Michael Niedermayer <michaelni at gmx.at>:
> >>So as a first step, I added 10 bit support by adding a new 10 bit
> >>packed RGB colorspace, and rewriting encode_rgb() / decode_rgb() in
> >>ffv1 to support it. That works well, and encoding is proven to be
> >>lossless with 10 bit RGB input.
> >>Patches attached, any comments appreciated!
> >
> >why dont you use the existing PIX_FMT_GBRP10 ?
> Because DXF uses packed rgb, ffv1 already handles packed RGB, and it
> seemed easier to stay with packed formats than adding support for
> planar.

each packed rgb format will need seperate code, one for 9 bit one
for 10bit one for 11 bit one for ..., the planar formats
need just one for 9-16bit

> >>Especially, does any one have any ideas if there is a (more or less)
> >>simple solution for adding 16 bit RGB to FFV1?
> >>If that is too hard to implement, do you think adding 10 and 12 bit
> >>colorspaces is feasible? Any other suggestions on how to support
> >>more than 8bit properly?
> >
> >the code has to be changed to use larger data types. This needs to be
> >benchmarked
> >if its slower some preprocessor templating will be needed to build
> >it for both <16bit and >=16bit so the existing code isnt slowed down
> Could you give a rough estimation how much work that would be (like
> 1 day or 1 month or 1 year)?
> AFAICT FFmpeg uses 16bit data types nearly everywhere, and I haven't
> been able to figure out if simply replacing all uint16_t with
> uint32_t would do the job (I suppose not).

its doable in less than 1 week

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120704/81c23f12/attachment.asc>

More information about the ffmpeg-devel mailing list