mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-22 01:40:28 +00:00
Video dec: for RGB(A) choose shift-changing dec
Avoid cross-decoding (eg. RGBA->RGB, RGB->RGBA) if device supports both codecs. Ideally, avoiding this results in using merely memcpy (if shifts match).
This commit is contained in:
@@ -992,13 +992,16 @@ static codec_t choose_codec_and_decoder(struct state_video_decoder *decoder, str
|
||||
out_codec == DXT5)
|
||||
&& decoder->video_mode != VIDEO_NORMAL)
|
||||
continue; /* it is a exception, see NOTES #1 */
|
||||
if(desc.color_spec == RGBA || /* another exception - we may change shifts */
|
||||
desc.color_spec == RGB)
|
||||
continue;
|
||||
|
||||
*decode_line = (decoder_t) memcpy;
|
||||
decoder->decoder_type = LINE_DECODER;
|
||||
|
||||
if(desc.color_spec == RGBA || /* another exception - we may change shifts */
|
||||
desc.color_spec == RGB) {
|
||||
*decode_line = desc.color_spec == RGBA ?
|
||||
vc_copylineRGBA : vc_copylineRGB;
|
||||
}
|
||||
|
||||
goto after_linedecoder_lookup;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user