[x265] [PATCH] Fix scc crash on multipass encode

Karam Singh karam.singh at multicorewareinc.com
Mon Aug 26 05:26:49 UTC 2024


This patch has been pushed to the master branch.
*__________________________*
*Karam Singh*
*Ph.D. IIT Guwahati*
Senior Software (Video Coding) Engineer
Mobile: +91 8011279030
Block 9A, 6th floor, DLF Cyber City
Manapakkam, Chennai 600 089


On Mon, Aug 26, 2024 at 10:33 AM Anusuya Kumarasamy <
anusuya.kumarasamy at multicorewareinc.com> wrote:

> From 09e6d53ddbf5159dc711ea0b45c089b52413d5fe Mon Sep 17 00:00:00 2001
> From: AnusuyaKumarasamy <anusuya.kumarasamy at multicorewareinc.com>
> Date: Mon, 19 Aug 2024 11:55:53 +0530
> Subject: [PATCH] Fix scc crash on multipass encode
>
> ---
>  source/encoder/analysis.cpp | 9 +++++++++
>  source/encoder/search.cpp   | 2 +-
>  2 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/source/encoder/analysis.cpp b/source/encoder/analysis.cpp
> index c4261f114..53a19b29f 100644
> --- a/source/encoder/analysis.cpp
> +++ b/source/encoder/analysis.cpp
> @@ -2132,6 +2132,9 @@ SplitData Analysis::compressInterCU_rd5_6(const
> CUData& parentCTU, const CUGeom&
>                      md.pred[PRED_2Nx2N].cu.initSubCU(parentCTU, cuGeom,
> qp);
>                      checkInter_rd5_6(md.pred[PRED_2Nx2N], cuGeom,
> SIZE_2Nx2N, refMasks);
>                      checkBestMode(md.pred[PRED_2Nx2N], cuGeom.depth);
> +#if ENABLE_SCC_EXT
> +                    interBest = md.bestMode;
> +#endif
>                  }
>                  mightSplit &= !bDecidedDepth;
>              }
> @@ -2153,6 +2156,9 @@ SplitData Analysis::compressInterCU_rd5_6(const
> CUData& parentCTU, const CUGeom&
>
>                      if (m_param->recursionSkipMode && depth &&
> m_modeDepth[depth - 1].bestMode)
>                          skipRecursion = md.bestMode &&
> !md.bestMode->cu.getQtRootCbf(0);
> +#if ENABLE_SCC_EXT
> +                    interBest = md.bestMode;
> +#endif
>                  }
>                  if (m_param->analysisLoadReuseLevel > 4 &&
> m_reusePartSize[cuGeom.absPartIdx] == SIZE_2Nx2N)
>                      skipRectAmp = true && !!md.bestMode;
> @@ -2177,6 +2183,9 @@ SplitData Analysis::compressInterCU_rd5_6(const
> CUData& parentCTU, const CUGeom&
>
>                      if (m_param->recursionSkipMode && depth &&
> m_modeDepth[depth - 1].bestMode)
>                          skipRecursion = md.bestMode &&
> !md.bestMode->cu.getQtRootCbf(0);
> +#if ENABLE_SCC_EXT
> +                    interBest = md.bestMode;
> +#endif
>                  }
>              }
>          }
> diff --git a/source/encoder/search.cpp b/source/encoder/search.cpp
> index 71a52a1cd..0df11b431 100644
> --- a/source/encoder/search.cpp
> +++ b/source/encoder/search.cpp
> @@ -2507,7 +2507,7 @@ void Search::predInterSearch(Mode& interMode, const
> CUGeom& cuGeom, bool bChroma
>                      mvp = checkBestMVP(amvp, outmv, mvpIdx, bits, cost);
>
>  #if ENABLE_SCC_EXT
> -                    if (list <= 1 && ref <= 1 && (cu.m_partSize[0] ==
> SIZE_2NxN || cu.m_partSize[0] == SIZE_Nx2N) && (1 << cu.m_log2CUSize[0]) <=
> 16)
> +                    if (m_param->bEnableSCC && (list <= 1 && ref <= 1 &&
> (cu.m_partSize[0] == SIZE_2NxN || cu.m_partSize[0] == SIZE_Nx2N) && (1 <<
> cu.m_log2CUSize[0]) <= 16))
>                      {
>                          iMVCandList[4 * list + 2 * ref + puIdx] = outmv;
>                      }
> --
> 2.36.0.windows.1
>
>
> On Mon, Aug 19, 2024 at 12:52 PM Anusuya Kumarasamy <
> anusuya.kumarasamy at multicorewareinc.com> wrote:
>
>> From 3c0f24f911ab0366e48734b172ed93900167fb41 Mon Sep 17 00:00:00 2001
>> From: AnusuyaKumarasamy <anusuya.kumarasamy at multicorewareinc.com>
>> Date: Mon, 19 Aug 2024 11:55:53 +0530
>> Subject: [PATCH] Fix scc crash on multipass encode
>>
>> ---
>>  source/encoder/analysis.cpp | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/source/encoder/analysis.cpp b/source/encoder/analysis.cpp
>> index c4261f114..53a19b29f 100644
>> --- a/source/encoder/analysis.cpp
>> +++ b/source/encoder/analysis.cpp
>> @@ -2132,6 +2132,9 @@ SplitData Analysis::compressInterCU_rd5_6(const
>> CUData& parentCTU, const CUGeom&
>>                      md.pred[PRED_2Nx2N].cu.initSubCU(parentCTU, cuGeom,
>> qp);
>>                      checkInter_rd5_6(md.pred[PRED_2Nx2N], cuGeom,
>> SIZE_2Nx2N, refMasks);
>>                      checkBestMode(md.pred[PRED_2Nx2N], cuGeom.depth);
>> +#if ENABLE_SCC_EXT
>> +                    interBest = md.bestMode;
>> +#endif
>>                  }
>>                  mightSplit &= !bDecidedDepth;
>>              }
>> @@ -2153,6 +2156,9 @@ SplitData Analysis::compressInterCU_rd5_6(const
>> CUData& parentCTU, const CUGeom&
>>
>>                      if (m_param->recursionSkipMode && depth &&
>> m_modeDepth[depth - 1].bestMode)
>>                          skipRecursion = md.bestMode &&
>> !md.bestMode->cu.getQtRootCbf(0);
>> +#if ENABLE_SCC_EXT
>> +                    interBest = md.bestMode;
>> +#endif
>>                  }
>>                  if (m_param->analysisLoadReuseLevel > 4 &&
>> m_reusePartSize[cuGeom.absPartIdx] == SIZE_2Nx2N)
>>                      skipRectAmp = true && !!md.bestMode;
>> @@ -2177,6 +2183,9 @@ SplitData Analysis::compressInterCU_rd5_6(const
>> CUData& parentCTU, const CUGeom&
>>
>>                      if (m_param->recursionSkipMode && depth &&
>> m_modeDepth[depth - 1].bestMode)
>>                          skipRecursion = md.bestMode &&
>> !md.bestMode->cu.getQtRootCbf(0);
>> +#if ENABLE_SCC_EXT
>> +                    interBest = md.bestMode;
>> +#endif
>>                  }
>>              }
>>          }
>> --
>> 2.36.0.windows.1
>>
>> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20240826/2b377f3d/attachment-0001.htm>


More information about the x265-devel mailing list