On Mon, Apr 13, 2015 at 09:59:57AM +0000, Marco Porsch wrote: > Hi, > > our automotive cameras generate a weird kind of 12bit RAW format that I would > like to encode using FFVHUFF. Unfortunately, the 12bit grayscale pixel format > is not yet supported. > Can you point me on the right track to implement this pixel format? And will > the encoder be able to handle the 12bit depth? > > I'll draw a little ASCII art concerning the bit mapping below. Basically a > group of 4x8bit MSBs are given as block followed by a 4x4bit LSBs block. The > pattern continues correspondingly. > > |---------------------|---------------------|---------------------|---------------------| > | P0[11..4] | P1[11..4] | P2[11..4] | > P3[11..4] | > |---------------------|---------------------|---------------------|---------------------| > | P0[0..3] | P1[0..3] | P2[0..3] | P3[0..3] | P4[11..4] | > P5[11..4] | > |---------------------|---------------------|---------------------|---------------------| > | P6[11..4] | P7[11..4] | P4[0..3] | P5[0..3] | P6[0..3] > | P7[0..3] | > |---------------------|---------------------|---------------------|---------------------| > | P8[11..4] | P9[11..4] | P10[11..4] | > P11[11..4] | > |---------------------|---------------------|---------------------|---------------------| > | P8[0..3] | P9[0..3] |P10[0..3] |P11[0..3] | > |---------------------|---------------------| > > Previously we had regular 16bit RAW that worked like a charm as input to > FFmpeg. The naïve approach of upscaling the 12bit to 16bit destroys the > compression efficiency of course...
add a AV_PIX_FMT_GRAY12BE / AV_PIX_FMT_GRAY12LE similar to the existing planar 12 bit YUV formats, and add a decoder which decodes this odd packing above into it, then add 12bit gray support to FFVHUFF theres alreeadyy support for other 12bit planar formats in it [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel