[FFmpeg-devel] openjpeg: 12bits JP2 file (16bits support + patch)
Thu Feb 12 11:43:21 CET 2009
On Thu, Feb 12, 2009 at 3:30 PM, Baptiste Coudurier
<baptiste.coudurier at gmail.com> wrote:
> Hi Jai,
> Jai Menon wrote:
>> 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:
>>>>> Could you have a look at:
>>>>> 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
>>> 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.
> Btw, I noticed ffmpeg crashed on Speedway.mj2 which can be found on
> openjpeg website. Does it support mj2 yet ?
IIRC mj2 stuff is separate from libopenjpeg, maybe when it is added to
public interface, we can add support for it. For the sake of
robustness, I tried the sample
but it doesn't crash here. Maybe you could post a backtrace, but if
the crash is in
libopenjpeg, we can't do much.
More information about the ffmpeg-devel