Skip to content

Commit

Permalink
don't use threads for small vertical sizes, and make the code clearer
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@19362 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed May 22, 2018
1 parent 71bac77 commit 001cc53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xpra/codecs/vpx/encoder.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ cdef class Encoder:
self.pixfmt = get_vpx_colorspace(self.src_format)
try:
#no point having too many threads if the height is small, also avoids a warning:
self.max_threads = max(0, min(int(options.get("threads", VPX_THREADS)), roundup(height, 32)//32*2, 32))
self.max_threads = max(0, min(int(options.get("threads", VPX_THREADS)), roundup(height, 64)//64, 32))
except Exception as e:
log.error("Error parsing number of threads: %s", e)
self.max_threads = 2
Expand Down

0 comments on commit 001cc53

Please sign in to comment.