@@ -261,7 +261,7 @@ void Session::clSetControllerLED(uint16_t controllerNumber, uint8_t r, uint8_t g
261261
262262bool Session::chooseDecoder (StreamingPreferences::VideoDecoderSelection vds,
263263 SDL_Window* window, int videoFormat, int width, int height,
264- int frameRate, bool enableVsync, bool enableFramePacing, bool testOnly, IVideoDecoder*& chosenDecoder)
264+ int frameRate, bool enableVsync, bool enableFramePacing, bool enableVideoEnhancement, bool testOnly, IVideoDecoder*& chosenDecoder)
265265{
266266 DECODER_PARAMETERS params;
267267
@@ -277,6 +277,7 @@ bool Session::chooseDecoder(StreamingPreferences::VideoDecoderSelection vds,
277277 params.window = window;
278278 params.enableVsync = enableVsync;
279279 params.enableFramePacing = enableFramePacing;
280+ params.enableVideoEnhancement = enableVideoEnhancement;
280281 params.testOnly = testOnly;
281282 params.vds = vds;
282283
@@ -381,7 +382,7 @@ void Session::getDecoderInfo(SDL_Window* window,
381382 // Try an HEVC Main10 decoder first to see if we have HDR support
382383 if (chooseDecoder (StreamingPreferences::VDS_FORCE_HARDWARE ,
383384 window, VIDEO_FORMAT_H265_MAIN10 , 1920 , 1080 , 60 ,
384- false , false , true , decoder)) {
385+ false , false , false , true , decoder)) {
385386 isHardwareAccelerated = decoder->isHardwareAccelerated ();
386387 isFullScreenOnly = decoder->isAlwaysFullScreen ();
387388 isHdrSupported = decoder->isHdrSupported ();
@@ -394,7 +395,7 @@ void Session::getDecoderInfo(SDL_Window* window,
394395 // Try an AV1 Main10 decoder next to see if we have HDR support
395396 if (chooseDecoder (StreamingPreferences::VDS_FORCE_HARDWARE ,
396397 window, VIDEO_FORMAT_AV1_MAIN10 , 1920 , 1080 , 60 ,
397- false , false , true , decoder)) {
398+ false , false , false , true , decoder)) {
398399 // If we've got a working AV1 Main 10-bit decoder, we'll enable the HDR checkbox
399400 // but we will still continue probing to get other attributes for HEVC or H.264
400401 // decoders. See the AV1 comment at the top of the function for more info.
@@ -406,10 +407,10 @@ void Session::getDecoderInfo(SDL_Window* window,
406407 // that supports HDR rendering with software decoded frames.
407408 if (chooseDecoder (StreamingPreferences::VDS_FORCE_SOFTWARE ,
408409 window, VIDEO_FORMAT_H265_MAIN10 , 1920 , 1080 , 60 ,
409- false , false , true , decoder) ||
410+ false , false , false , true , decoder) ||
410411 chooseDecoder (StreamingPreferences::VDS_FORCE_SOFTWARE ,
411412 window, VIDEO_FORMAT_AV1_MAIN10 , 1920 , 1080 , 60 ,
412- false , false , true , decoder)) {
413+ false , false , false , true , decoder)) {
413414 isHdrSupported = decoder->isHdrSupported ();
414415 delete decoder;
415416 }
@@ -423,7 +424,7 @@ void Session::getDecoderInfo(SDL_Window* window,
423424 // Try a regular hardware accelerated HEVC decoder now
424425 if (chooseDecoder (StreamingPreferences::VDS_FORCE_HARDWARE ,
425426 window, VIDEO_FORMAT_H265 , 1920 , 1080 , 60 ,
426- false , false , true , decoder)) {
427+ false , false , false , true , decoder)) {
427428 isHardwareAccelerated = decoder->isHardwareAccelerated ();
428429 isFullScreenOnly = decoder->isAlwaysFullScreen ();
429430 maxResolution = decoder->getDecoderMaxResolution ();
@@ -450,7 +451,7 @@ void Session::getDecoderInfo(SDL_Window* window,
450451 // This will fall back to software decoding, so it should always work.
451452 if (chooseDecoder (StreamingPreferences::VDS_AUTO ,
452453 window, VIDEO_FORMAT_H264 , 1920 , 1080 , 60 ,
453- false , false , true , decoder)) {
454+ false , false , false , true , decoder)) {
454455 isHardwareAccelerated = decoder->isHardwareAccelerated ();
455456 isFullScreenOnly = decoder->isAlwaysFullScreen ();
456457 maxResolution = decoder->getDecoderMaxResolution ();
@@ -470,7 +471,7 @@ Session::getDecoderAvailability(SDL_Window* window,
470471{
471472 IVideoDecoder* decoder;
472473
473- if (!chooseDecoder (vds, window, videoFormat, width, height, frameRate, false , false , true , decoder)) {
474+ if (!chooseDecoder (vds, window, videoFormat, width, height, frameRate, false , false , false , true , decoder)) {
474475 return DecoderAvailability::None;
475476 }
476477
@@ -491,7 +492,7 @@ bool Session::populateDecoderProperties(SDL_Window* window)
491492 m_StreamConfig.width ,
492493 m_StreamConfig.height ,
493494 m_StreamConfig.fps ,
494- false , false , true , decoder)) {
495+ false , false , false , true , decoder)) {
495496 return false ;
496497 }
497498
@@ -2219,6 +2220,7 @@ void Session::execInternal()
22192220 m_ActiveVideoHeight, m_ActiveVideoFrameRate,
22202221 enableVsync,
22212222 enableVsync && m_Preferences->framePacing ,
2223+ m_Preferences->videoEnhancement ,
22222224 false ,
22232225 s_ActiveSession->m_VideoDecoder )) {
22242226 SDL_AtomicUnlock (&m_DecoderLock);
0 commit comments