View Single Post
Old 15th September 2019, 09:29   #7026  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,255
The confusing part is that
a. just using '--no-sao' doesn't disable SAO, you get
Quote:
[warning]: SAO turned ON when selective-sao is ON
so to turn sao off you need to use '--selective-sao 0 --no-sao' ,'--no-sao' or '--selective-sao' on it's own isn't enough.
b. With 'selective-sao' is described as 'Disable SAO for all slices', what is SAO used on if you use '--selective-sao 0 --sao' ?

looking at the code:
Code:
if (!!m_param->selectiveSAO)

{

    Slice* slice = frameEnc->m_encData->m_slice;

    slice->m_bUseSao = curEncoder->m_frameFilter.m_useSao = 1;

    switch (m_param->selectiveSAO)

    {

    case 3: if (!IS_REFERENCED(frameEnc))

                slice->m_bUseSao = curEncoder->m_frameFilter.m_useSao = 0;

            break;

    case 2: if (!!m_param->bframes && slice->m_sliceType == B_SLICE)

                slice->m_bUseSao = curEncoder->m_frameFilter.m_useSao = 0;

            break;

    case 1: if (slice->m_sliceType != I_SLICE)

                slice->m_bUseSao = curEncoder->m_frameFilter.m_useSao = 0;

            break;

    }

}

else

{

    Slice* slice = frameEnc->m_encData->m_slice;

    slice->m_bUseSao = curEncoder->m_frameFilter.m_useSao = 0;

}
here are a few conclusions:
  • '--selective-sao 0 --sao' and '--selective-sao 4 --sao' and '--selective-sao 4 --no-sao' all do the same thing, they do the same as the old '--sao' (should be no surprise this causes confusion)
  • only '--selective-sao 0 --no-sao' disabled SAO
  • '--selective-sao X' with X > 0
  • man, that is a fugly coding style

Cu Selur
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 15th September 2019 at 10:05.
Selur is offline   Reply With Quote