Xpra: Ticket #1108: opencv csc module
Related to #1030: cvtcolor: rgb = cv2.cvtColor(bgr, cv2.COLOR_BGR2RGB)
I'm not sure how we can deal with rowstride, but I think the underlying numpy buffers it uses can help us with that.
It should be quite easy to make a csc module, then we can see what performance we get, how it compares to the leading contenders (#973), how portable it is (builds on win32, not yet on osx), etc.
Mon, 01 Feb 2016 23:47:23 GMT - Antoine Martin: status changed
- status
changed from new to assigned
Added a csc_opencv
csc module in r11811, minor fixes in r11819.
Notes / limitations / TODO:
- it's disappointing: just not very fast, even my crappy Cython csc module is faster
- performance data needs to be added to wiki/CSC/Performance
- the code only handles RGB modes to YUV420P at present - not sure we care
- we claim to be handling odd dimensions and resize the pixel buffers on the fly (looks like a bug in the csc / codec interface, which should be able to handle width and height masks better?) - this step is using numpy copy line-by-line, but it is actually quite fast
- the code is quite small which is nice, and it should be portable
- it could handle scaling using cvResize: it even supports different interpolation types (linear, nearest, etc..)
Can easily be tested by forcing CSC with h264:
XPRA_FORCE_CSC_MODE=YUV420P \
XPRA_ENCODING_STRICT_MODE=1 \
xpra --start-child=xterm start :10 -d opencv --csc-modules=opencv
Wed, 17 Feb 2016 14:37:38 GMT - Antoine Martin: status, description changed; resolution set
- status
changed from assigned to closed
- resolution
set to fixed
- description
modified (diff)
This will do for now.
Sat, 23 Jan 2021 05:15:11 GMT - migration script:
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1108