Page MenuHome

Motion JPEG 2000 with 16bit color channels lose color resolution.
Open, NormalPublic

Description

System Information
macOS 10.12.6, Radeon Pro 560 4096 MB, Intel HD Graphics 630 1536 MB

Blender Version
Broken: 2.79b fd4c9f9

Short description of error
Importing rgb48le motion jpeg 2000 (.mj2) movie files results in RGBA byte data. The LSB of each channel is discarded.

Exact steps for others to reproduce the error

Use the mj2 file provided and the blend file to observe the problem in the displacement mapping.

Details

Type
To Do

Related Objects

Event Timeline

ffmpeg setup in blender seems OK, pCodec is set to jpeg2000 correctly.
anim->pCodecCtx->pix_fmt is AV_PIX_FMT_RGB48LE
anim->pCodecCtx->bits_per_raw_sample is 16
anim->pCodecCtx->bits_per_coded_sample is 8

BUT, blender Image Buffers are always [well, when coming from ffmpeg] created with IB_rect, not IB_rectfloat, see here or here

We could start checking things like P728, but not sure if this opens a can of worms [atm. this would crash in sws_scale later on]

So, before this gets into a timesink, I would like to ask @Sergey Sharybin (sergey) if it would be desirable to support float buffers with ffmpeg [could/would investigate more then...]? would there be major roadblocks?
Or is this just a known limitation?

Bastien Montagne (mont29) triaged this task as Normal priority.Jul 20 2018, 2:35 PM

@Philipp Oeser (lichtwerk), technically this is not a bug and known limitation. But this only means that dealing with such sort of issues goes as regular development. Supporting float buffers for our animation is something we should look into, but this is rather a big project if we want it to do for both read and write. Writing to a HDR videos should be mush less of a project. Feel free to look into!

Sergey Sharybin (sergey) changed Type from Bug to To Do.Oct 29 2018, 12:49 PM