[Cin] Colors tip from forum

Andrew Randrianasulu randrianasulu at gmail.com
Tue Aug 2 20:50:54 CEST 2022


вт, 2 авг. 2022 г., 20:10 Einar Rünkaru <einarrunkaru at gmail.com>:

> Hi.
>
> On 02/08/2022 11:37, Andrea paz wrote:
>
> > Thanks for the responses; glad to hear from you again.
> > In the CVE readme you mention the internal 16-bit color model. Since
> > you remain the only deep Cinelerra expert (besides Adam, with whom it
> > is difficult to interact), may I ask you to explain how color works in
> > Cinelerra? Is it converted continuously as needed?
>
> Video is decoded to internal representation (look at settings/format).
> Internal format is unpacked 3..4 values every pixel. CVE has only
> RGBA-16 and AYUV-16 pixel formats. All values are 16 bit.
>
> CVO (and probably CGG) have 6 internal pixel formats (8-bit and float)
>
> > Does each plugin
> > make the conversions it needs?
>
> All plugins see the frames only in internal format and modify this as
> needed.
>
> > What do the color model settings affect
> > and what are they affected by?
>
> Color model describes internal pixel format
>
> > Is it possible to implement ICC
> > profiles?
>
> Probably. How?
>


Good question. I was looking into mplayer2's code for display part

https://github.com/astiob/mplayer2/blob/all/libvo/vo_gl3.c


Then I found news from yesteryear about lcms2 plugin
https://littlecms.com/plugin/
"Little CMS floating point plug-in accelerates 8 bit and floating point
color transforms, ".." The speedup is accomplished by implementing new
interpolation kernels, adding optimizations and re-arranging memory
layouts. Additionally, it can use SIMD instructions if present."

Then there is new infrastructure in ffmpeg git:
http://ffmpeg.org/pipermail/ffmpeg-devel/2022-July/299438.html

https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/61ffa23c2e42887b32d469d9e69e9eb887b29e9c
"avcodec/codec_internal: add cap for ICC profile support"

As far as I understand it only works with webp, tiff, png and mjpeg as
video format but hopefully can be extended in future?





> > In short, I am not clear about anything related to color
> > treatment in Cinelerra. This is an issue that we have been dragging
> > around for years (for example see the thread:
> >
> https://www.cinelerra-gg.org/forum/help-video/yuv-to-rgb-conversion-issues/
> )
> > but the confusion is total and we can't figure it out.
> > Few mentions were made many years ago:
> > https://lists.cinelerra-cv.org/pipermail/cinelerra/2018q4/009903.html
> > https://www.mail-archive.com/cinelerra@skolelinux.no/msg13761.html
>
> Original Cinelerra does not care about colorspaces. It uses what comes
> out from decoder. Some effects work differenlly depending on colorspace.
> Sometimes pixel values are converted to float, sometimes to 8-bit for an
> effect. Fixing it takes couple of man-years.
>
> CVE converts color to full-scale (0..65565). All effects work with full
> scale values. Encoding converts to colorspace required by the codec.
>
> Einar
>
> PS Removed CinGG ML - it does not accept my mails - I am not subscribed.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20220802/c8d68f22/attachment.htm>


More information about the Cin mailing list