Rename the ComputeColocated method to ComputeColocatedTemporalScaling to make it clearer what it's doing, and add a comment about it. Remove some obsolete comments
Showing the changes to codec/decoder/core/src/decode_slice.cpp (1 of 3 files). Show all
Unified · Split
| @@ -2855,7 +2855,11 @@ void WelsBlockZero16x16_c (int16_t* pBlock, int32_t iStride) { · 2854 unmodified lines | |||
| 2855 | void WelsBlockZero8x8_c (int16_t* pBlock, int32_t iStride) { | 2855 | void WelsBlockZero8x8_c (int16_t* pBlock, int32_t iStride) { |
| 2856 | WelsBlockInit (pBlock, 8, 8, iStride, 0); | 2856 | WelsBlockInit (pBlock, 8, 8, iStride, 0); |
| 2857 | } | 2857 | } |
| 2858 | bool ComputeColocated (PWelsDecoderContext pCtx) { | 2858 | |
| 2859 | // Compute the temporal-direct scaling factor that's common | ||
| 2860 | // to all direct MBs in this slice, as per clause 8.4.1.2.3 | ||
| 2861 | // of T-REC H.264 201704 | ||
| 2862 | bool ComputeColocatedTemporalScaling (PWelsDecoderContext pCtx) { | ||
| 2859 | PDqLayer pCurLayer = pCtx->pCurDqLayer; | 2863 | PDqLayer pCurLayer = pCtx->pCurDqLayer; |
| 2860 | PSlice pCurSlice = &pCurLayer->sLayerInfo.sSliceInLayer; | 2864 | PSlice pCurSlice = &pCurLayer->sLayerInfo.sSliceInLayer; |
| 2861 | PSliceHeader pSliceHeader = &pCurSlice->sSliceHeaderExt.sSliceHeader; | 2865 | PSliceHeader pSliceHeader = &pCurSlice->sSliceHeaderExt.sSliceHeader; |
| @@ -2879,11 +2883,6 @@ bool ComputeColocated (PWelsDecoderContext pCtx) { · 17 unmodified lines | |||
| 2879 | } | 2883 | } |
| 2880 | } | 2884 | } |
| 2881 | } | 2885 | } |
| 2882 | //Implement the following | ||
| 2883 | //get Mv_colocated_L1 | ||
| 2884 | //and do calculation | ||
| 2885 | //iMvp[LIST_0] = Mv_colocated_L1 * (POC(cur) - POC(L0))/POC(L1) - POC(L0)) | ||
| 2886 | //iMvp[LIST_1] = Mv_colocated_L1 * (POC(cur) - POC(L1))/POC(L1) - POC(L0)) | ||
| 2887 | return true; | 2886 | return true; |
| 2888 | } | 2887 | } |
| 2889 | } // namespace WelsDec | 2888 | } // namespace WelsDec |