Skip to content

Commit

Permalink
#451 we can't scale NV12 as the U and V channels are mixed / interlea…
Browse files Browse the repository at this point in the history
…ved and libyuv doesn't provide a function for scaling that

git-svn-id: https://xpra.org/svn/Xpra/trunk@26730 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jun 15, 2020
1 parent ccc28e5 commit 1ae0b01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/xpra/codecs/csc_libyuv/colorspace_converter.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def get_spec(in_colorspace, out_colorspace):
return csc_spec(in_colorspace, out_colorspace,
ColorspaceConverter, codec_type=get_type(),
quality=100, speed=100,
setup_cost=0, min_w=8, min_h=2, can_scale=True,
setup_cost=0, min_w=8, min_h=2, can_scale=(out_colorspace=="YUV420P"),
max_w=MAX_WIDTH, max_h=MAX_HEIGHT)


Expand Down Expand Up @@ -219,6 +219,7 @@ cdef class ColorspaceConverter:
elif dst_format=="NV12":
self.dst_format = "NV12"
self.planes = 2
assert src_width==dst_width and src_height==dst_height, "cannot scale NV12"
else:
raise Exception("invalid destination format: %s" % dst_format)
self.src_width = src_width
Expand Down

0 comments on commit 1ae0b01

Please sign in to comment.