Skip to content

XYZ to RGB color space conversion too heavy for CPU? #734

@Cantar4

Description

@Cantar4

[ QtAv v 1.11, MacOS 10.11.6, MacBookAir4.2, Intel i5, 1,7 GHz; 2 Cores, 4 GB RAM ]

As seen on the attachements below, the QtV4 played .mp4 film is color correct, whereas the .mxf embeded jpeg2000 film is in the Mars planet color space.
The FFmpeg XYZ to RGB color conversion matrix doesn't work for the hi-def video .mxf files, but it works for the small timeline preview which is color correct... why?

Edited note : while verifying DCPs on a 15" laptop we don't need a very high image resolution, the lowres tiles-3 @ 0.5k are more than enough ; this will allow a low power CPU to accomplish its decoding job up to 25fps minimum ( i.e. realtime) which would alow us to listen to the sister audio .mxf tracks in sync... and read the soft substitles .mxf also!
_
_
qtav-mp4-harvestr
_
qtav-jp2k-harvestr


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Activity

wang-bin

wang-bin commented on Sep 27, 2016

@wang-bin
Owner

xyz is not supported in opengl rendering, so the color is totally wrong. The preview uses ffmpeg to convert to rgb and use WidgetRenderer. So the temporary solution is using WidgetRenderer for such videos.
Would you please share you mxf sample on google driver? I can try to support xyz in opengl.

self-assigned this
on Sep 27, 2016
Cantar4

Cantar4 commented on Sep 27, 2016

@Cantar4
Author

the 'Moissons' film mxf file would take hours to upload,
I will send you 'Sarah5' a smaller one (270MB) which shows quite a psychedelic image too.
I have no access to Googledrive, is it ok to send it by Wetransfer to wbsecg1@gmail.com ?

qtav-j2k-sarah5

wang-bin

wang-bin commented on Sep 27, 2016

@wang-bin
Owner

Yes, that's my email

Cantar4

Cantar4 commented on Sep 27, 2016

@Cantar4
Author

It is available on wetransfer https://we.tl/N4KWnK64kA till October 4

wang-bin

wang-bin commented on Sep 28, 2016

@wang-bin
Owner

Try the latest code please. Rendering xyz in opengl works for me now.

Cantar4

Cantar4 commented on Sep 28, 2016

@Cantar4
Author

thank you, where can I find it ?

r-a-v-a-s

r-a-v-a-s commented on Sep 28, 2016

@r-a-v-a-s
Contributor

The color seems correct.

Edit: removed broken .app

wang-bin

wang-bin commented on Sep 28, 2016

@wang-bin
Owner
r-a-v-a-s

r-a-v-a-s commented on Sep 28, 2016

@r-a-v-a-s
Contributor

macdeployqt didn't copy over two libs... it looks like wang took care of it :-]

wang-bin

wang-bin commented on Sep 28, 2016

@wang-bin
Owner

ffmpeg can be installed via homebrew.
@r-a-v-a-s what libs? macdeployqt had some bugs. I haven't used it for a long time. I use tools/deploy_osx.sh instead.

r-a-v-a-s

r-a-v-a-s commented on Sep 28, 2016

@r-a-v-a-s
Contributor

QtAV.framework
QtAVWidgets.framework
And no libass.5.dylib
It also adds several I don't see in yours
screen shot 2016-09-27 at 11 43 05 pm

Thanks for the tip about the script.

Edit: On second look QtSvg.framework is also missing

Cantar4

Cantar4 commented on Sep 28, 2016

@Cantar4
Author

whereas I am still not allowed to see your beautiful colors :(
QtAv uninstall b0cdeb8 report.txt

wang-bin

wang-bin commented on Sep 28, 2016

@wang-bin
Owner

@r-a-v-a-s libass is dynamically loaded. QtAV still works if libass is not found. You can install it via homebrew to support correct ass subtitle rendering.
@Cantar4 This package does not include ffmpeg libraries. You have to install ffmpeg via homebrew brew install ffmpeg.

r-a-v-a-s

r-a-v-a-s commented on Sep 28, 2016

@r-a-v-a-s
Contributor

Actually I get the same error for wang-bin's upload (with ffmpeg installed).

Cantar4

Cantar4 commented on Sep 28, 2016

@Cantar4
Author

Homebrew installed, now installing Xcode v8

r-a-v-a-s

r-a-v-a-s commented on Sep 28, 2016

@r-a-v-a-s
Contributor

I think the problem with wang-bin's is that it points to the ffmpeg libs as though they were bundled with the .app (@executable_path), yet they are not.

otool -L /Users/one/Downloads/player.app/Contents/MacOS/Player
/Users/one/Downloads/player.app/Contents/MacOS/Player:
    @rpath/QtAV.framework/Versions/1/QtAV (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox (compatibility version 1.0.0, current version 492.0.0)
    /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo (compatibility version 1.2.0, current version 1.5.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1348.0.0)
    /System/Library/Frameworks/VideoDecodeAcceleration.framework/Versions/A/VideoDecodeAcceleration (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/CoreMedia.framework/Versions/A/CoreMedia (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox (compatibility version 1.0.0, current version 1.0.0)
    @rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.6.0, current version 5.6.1)
    @rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.6.0, current version 5.6.1)
    /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
    /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
    @rpath/QtAVWidgets.framework/Versions/1/QtAVWidgets (compatibility version 1.0.0, current version 1.0.0)
    @executable_path/../Frameworks/libswresample.1.dylib (compatibility version 1.0.0, current version 1.2.101)
    @executable_path/../Frameworks/libavresample.2.dylib (compatibility version 2.0.0, current version 2.1.0)
    @executable_path/../Frameworks/libavdevice.56.dylib (compatibility version 56.0.0, current version 56.4.100)
    @executable_path/../Frameworks/libavfilter.5.dylib (compatibility version 5.0.0, current version 5.40.101)
    @executable_path/../Frameworks/libavcodec.56.dylib (compatibility version 56.0.0, current version 56.60.100)
    @executable_path/../Frameworks/libavformat.56.dylib (compatibility version 56.0.0, current version 56.40.101)
    @executable_path/../Frameworks/libswscale.3.dylib (compatibility version 3.0.0, current version 3.1.101)
    @executable_path/../Frameworks/libavutil.54.dylib (compatibility version 54.0.0, current version 54.31.100)
    @rpath/QtOpenGL.framework/Versions/5/QtOpenGL (compatibility version 5.6.0, current version 5.6.1)
    @rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.6.0, current version 5.6.1)
    /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 775.7.0)
    @rpath/QtSql.framework/Versions/5/QtSql (compatibility version 5.6.0, current version 5.6.1)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.4.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0)

Where mine does bundle those... but it points to the ffmpeg libs installed by homebrew. >_<

Interestingly, considering the question of why the version from sourceforge works,
it seems that it doesn't point to the ffmpeg libs at all (and doesn't bundle them)... and actually points to some different frameworks (i.e. QuartzCore):

otool -L /Applications/player.app/Contents/MacOS/Player
/Applications/player.app/Contents/MacOS/Player:
    @executable_path/../Frameworks/QtAV.framework/Versions/1/QtAV (compatibility version 1.11.0, current version 1.11.0)
    /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1258.0.0)
    /System/Library/Frameworks/CoreMedia.framework/Versions/A/CoreMedia (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore (compatibility version 1.2.0, current version 1.11.0)
    /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics (compatibility version 64.0.0, current version 600.0.0)
    /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo (compatibility version 1.2.0, current version 1.5.0)
    /System/Library/Frameworks/QTKit.framework/Versions/A/QTKit (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/AVFoundation.framework/Versions/A/AVFoundation (compatibility version 1.0.0, current version 2.0.0)
    /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox (compatibility version 1.0.0, current version 492.0.0)
    /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1258.1.0)
    /System/Library/Frameworks/VideoDecodeAcceleration.framework/Versions/A/VideoDecodeAcceleration (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 57337.40.83)
    @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui (compatibility version 5.6.0, current version 5.6.1)
    @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore (compatibility version 5.6.0, current version 5.6.1)
    /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
    /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
    @executable_path/../Frameworks/QtAVWidgets.framework/Versions/1/QtAVWidgets (compatibility version 1.11.0, current version 1.11.0)
    /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
    /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.5)
    /usr/lib/liblzma.5.dylib (compatibility version 6.0.0, current version 6.3.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
    @executable_path/../Frameworks/QtOpenGL.framework/Versions/5/QtOpenGL (compatibility version 5.6.0, current version 5.6.1)
    @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.6.0, current version 5.6.1)
    /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 728.9.0)
    @executable_path/../Frameworks/QtSql.framework/Versions/5/QtSql (compatibility version 5.6.0, current version 5.6.1)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)

All of that aside, it turns out I had an old version of homebrew that considered ffmpeg 2.8.6 to be the the latest version... so I:
brew update
brew unlink ffmpeg
brew install ffmpeg

and now I have 3.1.3
and interestingly macdeployqt properly linked the bundled libs this time,
pointing to @executable_path instead of the static system path.

QtAV-v1.11.0-83-gb0cdeb8.dmg.zip

r-a-v-a-s

r-a-v-a-s commented on Sep 28, 2016

@r-a-v-a-s
Contributor

Note I still needed to copy QtAV and QtAVWidgets;
and it looks like macdeployqt is also failing to include QtSvg for some reason,
so the icons will be missing.

    @rpath/QtAV.framework/Versions/1/QtAV (compatibility version 1.11.0, current version 1.11.0)
    /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox (compatibility version 1.0.0, current version 492.0.0)
    /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo (compatibility version 1.2.0, current version 1.5.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1348.0.0)
    /System/Library/Frameworks/VideoDecodeAcceleration.framework/Versions/A/VideoDecodeAcceleration (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/CoreMedia.framework/Versions/A/CoreMedia (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox (compatibility version 1.0.0, current version 1.0.0)
    @rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.6.0, current version 5.6.1)
    @rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.6.0, current version 5.6.1)
    /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
    /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
    @rpath/QtAVWidgets.framework/Versions/1/QtAVWidgets (compatibility version 1.11.0, current version 1.11.0)
    @executable_path/../Frameworks/libswresample.2.dylib (compatibility version 2.0.0, current version 2.1.100)
    @executable_path/../Frameworks/libavresample.3.dylib (compatibility version 3.0.0, current version 3.0.0)
    @executable_path/../Frameworks/libavdevice.57.dylib (compatibility version 57.0.0, current version 57.0.101)
    @executable_path/../Frameworks/libavfilter.6.dylib (compatibility version 6.0.0, current version 6.47.100)
    @executable_path/../Frameworks/libavcodec.57.dylib (compatibility version 57.0.0, current version 57.48.101)
    @executable_path/../Frameworks/libavformat.57.dylib (compatibility version 57.0.0, current version 57.41.100)
    @executable_path/../Frameworks/libswscale.4.dylib (compatibility version 4.0.0, current version 4.1.100)
    @executable_path/../Frameworks/libavutil.55.dylib (compatibility version 55.0.0, current version 55.28.100)
    @rpath/QtOpenGL.framework/Versions/5/QtOpenGL (compatibility version 5.6.0, current version 5.6.1)
    @rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.6.0, current version 5.6.1)
    /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 775.7.0)
    @rpath/QtSql.framework/Versions/5/QtSql (compatibility version 5.6.0, current version 5.6.1)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.4.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0)
r-a-v-a-s

r-a-v-a-s commented on Sep 28, 2016

@r-a-v-a-s
Contributor

A patch for the SVG issue: #737

QtAV-v1.11.0-83-gb0cdeb8.dmg.zip

Cantar4

Cantar4 commented on Sep 28, 2016

@Cantar4
Author

Thank you Wang and Ravas! I am amazed, in less than one day you solved 90% of the problem !
Now it becomes possible to play color-correct j2k images at almost 24fps on the very thin CPU/GPU of a basic MacBook Air 13", really impressive !
Audio-sync speed is now reachable without monster GPUs.
_

qtav sarah dcp

wang-bin

wang-bin commented on Sep 30, 2016

@wang-bin
Owner

I can try

2016年9月29日 23:02,"jeanpierre beauviala" notifications@github.com写道:

Hello wang, after this achievement, may you give us access to the audio
and subtitles embedded in the two other .mxf files of the DCP? I can send
you the 22sec take above in mp4 and DCP forms.


You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
#734 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAv7Nrh5Zrh3-KB6Ne9-P4NzlTmPIFi1ks5qu9K_gaJpZM4KGbMt
.

Cantar4

Cantar4 commented on Sep 30, 2016

@Cantar4
Author

I knew you would love it :)

Hello wang, after this achievement, may you give us access to the audio and subtitles embedded in the two other .mxf files of the DCP? I can send you the 22sec take above in mp4 and DCP forms.

Cantar4

Cantar4 commented on Sep 30, 2016

@Cantar4
Author

Not to confuse this issue (which is now almost closed), I opened a new one called
Verify DCPs at sync speed on low power CPU laptops #740

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @wang-bin@r-a-v-a-s@Cantar4

      Issue actions

        XYZ to RGB color space conversion too heavy for CPU? · Issue #734 · wang-bin/QtAV