[FFmpeg-devel] openjpeg: 12bits JP2 file (16bits support + patch)

Jai Menon jmenon86
Thu Feb 12 06:12:05 CET 2009


On Wed, Feb 11, 2009 at 7:20 PM, Mathieu Malaterre
<mathieu.malaterre at gmail.com> wrote:
> On Mon, Feb 9, 2009 at 2:38 PM, Mathieu Malaterre
> <mathieu.malaterre at gmail.com> wrote:
>> On Mon, Feb 9, 2009 at 2:36 PM, Mathieu Malaterre
>> <mathieu.malaterre at gmail.com> wrote:
>>> Jay,
>>>
>>>  Could you have a look at:
>>>
>>> http://jpeg.sourceforge.net/jpeg2000/dental_12bits.jp2
>>>
>>>  Does your implementation handle 12bits data ? I am seeing some minor
>>> difference compared to using openjpeg directly.
>>>
>>
>> Sorry forgot the cmd line:
>>
>> ./ffmpeg  -f image2  -vcodec libopenjpeg -i dental_12bits.jp2 -f
>> image2 -pix_fmt gray16be -vcodec pgm dental_12bits.pgm
>
> Jai,
>
>  I think with this patch I can get 16bits working. I still do not
> understand what is the 'adjust' parameter.

Sorry for the delay. The adjust parameter is there to trivially throw away the
lsbs which won't fit in a single byte. If you want, I could add 16bit grayscale
support but the general solution would be to add the required pixfmts
to avutil.h.
And also a converter which allows us to scale these > 8bits per component down.
The only reason your patch works is because there is a converter defined. See
convert_table in lavc/imgconvert.c.

> Thanks

-- 
Regards,

Jai




More information about the ffmpeg-devel mailing list