xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 5 years ago

Closed 5 years ago

Last modified 3 months ago

#1108 closed enhancement (fixed)

opencv csc module

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: trivial Milestone: 0.17
Component: encodings Version: trunk
Keywords: Cc:

Description (last modified by Antoine Martin)

Related to #1030: http://opencv.org/ provides simple utility csc functions, including wiki/CSC via 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.

Change History (3)

comment:1 Changed 5 years ago by Antoine Martin

Status: newassigned

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 --start-child=xterm start :10 -d opencv --csc-modules=opencv
Last edited 5 years ago by Antoine Martin (previous) (diff)

comment:2 Changed 5 years ago by Antoine Martin

Description: modified (diff)
Resolution: fixed
Status: assignedclosed

This will do for now.

comment:3 Changed 3 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1108

Note: See TracTickets for help on using tickets.