Skip to content

Commit

Permalink
#3410 h264 cannot handle an alpha channel
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jan 10, 2022
1 parent 2cfb335 commit 4574ec4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions xpra/codecs/enc_x264/encoder.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@ COLORSPACE_FORMATS = {
"YUV420P" : (X264_CSP_I420, PROFILE_HIGH, I420_PROFILES),
"YUV422P" : (X264_CSP_I422, PROFILE_HIGH422, I422_PROFILES),
"YUV444P" : (X264_CSP_I444, PROFILE_HIGH444_PREDICTIVE, I444_PROFILES),
"BGRA" : (X264_CSP_BGRA, PROFILE_HIGH444_PREDICTIVE, RGB_PROFILES),
"BGRX" : (X264_CSP_BGRA, PROFILE_HIGH444_PREDICTIVE, RGB_PROFILES),
}
if SUPPORT_24BPP:
Expand All @@ -364,7 +363,6 @@ COLORSPACES = {
"YUV420P" : "YUV420P",
"YUV422P" : "YUV422P",
"YUV444P" : "YUV444P",
"BGRA" : "BGRA",
"BGRX" : "BGRX",
}
if SUPPORT_30BPP:
Expand Down Expand Up @@ -420,7 +418,7 @@ def get_spec(encoding, colorspace):
assert colorspace in COLORSPACES, "invalid colorspace: %s (must be one of %s)" % (colorspace, COLORSPACES.keys())
#we can handle high quality and any speed
#setup cost is moderate (about 10ms)
has_lossless_mode = colorspace in ("YUV444P", "BGR", "BGRA", "BGRX", "RGB")
has_lossless_mode = colorspace in ("YUV444P", "BGR", "BGRX", "RGB")
return video_spec(encoding=encoding, input_colorspace=colorspace, output_colorspaces=(COLORSPACES[colorspace],),
has_lossless_mode=has_lossless_mode,
codec_class=Encoder, codec_type=get_type(),
Expand Down

0 comments on commit 4574ec4

Please sign in to comment.