Maniphest T55422

Motion JPEG 2000 with 16bit color channels lose color resolution.
Confirmed, NormalTO DO

Assigned To
None
Authored By
Andreas Tell (atell)
Jun 10 2018, 12:40 AM
Tags
  • BF Blender
  • Images & Movies
  • Core
Subscribers
Andreas Tell (atell)
Philipp Oeser (lichtwerk)
Sergey Sharybin (sergey)

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.

Related Objects

Event Timeline

Andreas Tell (atell) created this task.Jun 10 2018, 12:40 AM
Philipp Oeser (lichtwerk) assigned this task to Sergey Sharybin (sergey).Jun 14 2018, 2:14 PM
Philipp Oeser (lichtwerk) added subscribers: Sergey Sharybin (sergey), Philipp Oeser (lichtwerk).

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) lowered the priority of this task from 90 to Normal.Jul 20 2018, 2:35 PM
Sergey Sharybin (sergey) removed Sergey Sharybin (sergey) as the assignee of this task.Oct 29 2018, 12:48 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) edited a custom field.Oct 29 2018, 12:49 PM
Sam Van Hulle (sam_vh) mentioned this in T68926: Color Management Improvements.Sep 5 2019, 12:48 PM
Bastien Montagne (mont29) added a project: Core.Jan 25 2022, 11:56 AM
Bastien Montagne (mont29) moved this task from Backlog to Long-term - Nice To Have on the Core board.Jan 25 2022, 12:40 PM