Showing the changes to test/decoder/DecUT_DeblockCommon.cpp (1 of 29 files). Show all
Unified · Split
| @@ -804,11 +804,11 @@ TEST (DecoderDeblocking, DeblockingBsMarginalMBAvcbase) { · 803 unmodified lines | ||
| 804 | 804 | // Dummy picture list pointers to 1..MAX_DPB_COUNT |
| 805 | 805 | // the pointer values don't need to be valid, just different |
| 806 | 806 | for (i = 0; i < MAX_DPB_COUNT; i++) |
| 807 | − iFilterPics[0][i] = iFilterPics[1][i] = (PPicture)(iFilterPics + (i<<3)); | |
| 807 | + iFilterPics[0][i] = iFilterPics[1][i] = (PPicture) (iFilterPics + (i << 3)); | |
| 808 | 808 | |
| 809 | 809 | sFilter.pRefPics[0] = iFilterPics[0]; |
| 810 | 810 | sFilter.pRefPics[1] = iFilterPics[1]; |
| 811 | − | |
| 811 | + sDqLayer.pDec = NULL; | |
| 812 | 812 | #define UT_DB_CLEAN_STATUS \ |
| 813 | 813 | memset(iNoZeroCount, 0, sizeof(int8_t)*24*2); \ |
| 814 | 814 | memset(iLayerRefIndex, 0, sizeof(int8_t)*2*16*2); \ |
| @@ -829,14 +829,14 @@ TEST (DecoderDeblocking, DeblockingBsMarginalMBAvcbase) { · 14 unmodified lines | ||
| 829 | 829 | // (1) iEdge == 0, current block NoZeroCount != 0 |
| 830 | 830 | UT_DB_CLEAN_STATUS |
| 831 | 831 | iNoZeroCount[0 * 24 + iCurrBlock] = 1; // Current MB_block position |
| 832 | − SET_REF_VALUE(2, iPos); | |
| 832 | + SET_REF_VALUE (2, iPos); | |
| 833 | 833 | EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1, |
| 834 | 834 | 0) == uiBSx4) << iEdge << " " << iPos << " NoZeroCount!=0"; |
| 835 | 835 | |
| 836 | 836 | // (2) iEdge == 0, neighbor block NoZeroCount != 0 |
| 837 | 837 | UT_DB_CLEAN_STATUS |
| 838 | 838 | iNoZeroCount[1 * 24 + iNeighborBlock ] = 1; // Neighbor MB_block position |
| 839 | − SET_REF_VALUE(2, iPos); | |
| 839 | + SET_REF_VALUE (2, iPos); | |
| 840 | 840 | EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1, |
| 841 | 841 | 0) == uiBSx4) << iEdge << " " << iPos << " NoZeroCount!=0"; |
| 842 | 842 | |
| @@ -844,63 +844,67 @@ TEST (DecoderDeblocking, DeblockingBsMarginalMBAvcbase) { · 1 unmodified line | ||
| 844 | 844 | UT_DB_CLEAN_STATUS |
| 845 | 845 | iLayerRefIndex[0][0 * 16 + iCurrBlock] = 0; |
| 846 | 846 | iLayerRefIndex[0][1 * 16 + iNeighborBlock] = 1; |
| 847 | − SET_REF_VALUE(1, iPos); | |
| 847 | + SET_REF_VALUE (1, iPos); | |
| 848 | 848 | EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1, |
| 849 | 849 | 0) == uiBSx4) << iEdge << " " << iPos << " Ref idx diff"; |
| 850 | 850 | |
| 851 | 851 | // (4) iEdge == 0, abs(mv diff) < 4 |
| 852 | 852 | UT_DB_CLEAN_STATUS |
| 853 | 853 | iLayerMv[0][0 * 16 + iCurrBlock][0] = rand() % 4; |
| 854 | − EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1, 0) == 0) << iEdge << " " << iPos << " diff_mv < 4"; | |
| 854 | + EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1, | |
| 855 | + 0) == 0) << iEdge << " " << iPos << " diff_mv < 4"; | |
| 855 | 856 | |
| 856 | 857 | UT_DB_CLEAN_STATUS |
| 857 | 858 | iLayerMv[0][0 * 16 + iCurrBlock][1] = rand() % 4; |
| 858 | − EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1, 0) == 0) << iEdge << " " << iPos << " diff_mv < 4"; | |
| 859 | + EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1, | |
| 860 | + 0) == 0) << iEdge << " " << iPos << " diff_mv < 4"; | |
| 859 | 861 | |
| 860 | 862 | UT_DB_CLEAN_STATUS |
| 861 | 863 | iLayerMv[0][1 * 16 + iNeighborBlock][0] = rand() % 4; |
| 862 | − EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1, 0) == 0) << iEdge << " " << iPos << " diff_mv < 4"; | |
| 864 | + EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1, | |
| 865 | + 0) == 0) << iEdge << " " << iPos << " diff_mv < 4"; | |
| 863 | 866 | |
| 864 | 867 | UT_DB_CLEAN_STATUS |
| 865 | 868 | iLayerMv[0][1 * 16 + iNeighborBlock][1] = rand() % 4; |
| 866 | − EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1, 0) == 0) << iEdge << " " << iPos << " diff_mv < 4"; | |
| 869 | + EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1, | |
| 870 | + 0) == 0) << iEdge << " " << iPos << " diff_mv < 4"; | |
| 867 | 871 | |
| 868 | 872 | // (5) iEdge == 0, abs(mv diff) > 4 |
| 869 | 873 | UT_DB_CLEAN_STATUS |
| 870 | 874 | iLayerMv[0][0 * 16 + iCurrBlock][0] = 4; |
| 871 | − SET_REF_VALUE(1, iPos); | |
| 875 | + SET_REF_VALUE (1, iPos); | |
| 872 | 876 | EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1, |
| 873 | 877 | 0) == uiBSx4) << iEdge << " " << iPos << " diff_mv == 4"; |
| 874 | 878 | |
| 875 | 879 | UT_DB_CLEAN_STATUS |
| 876 | 880 | iLayerMv[0][0 * 16 + iCurrBlock][1] = 4; |
| 877 | − SET_REF_VALUE(1, iPos); | |
| 881 | + SET_REF_VALUE (1, iPos); | |
| 878 | 882 | EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1, |
| 879 | 883 | 0) == uiBSx4) << iEdge << " " << iPos << " diff_mv == 4"; |
| 880 | 884 | |
| 881 | 885 | UT_DB_CLEAN_STATUS |
| 882 | 886 | iLayerMv[0][1 * 16 + iNeighborBlock][0] = 4; |
| 883 | − SET_REF_VALUE(1, iPos); | |
| 887 | + SET_REF_VALUE (1, iPos); | |
| 884 | 888 | EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1, |
| 885 | 889 | 0) == uiBSx4) << iEdge << " " << iPos << " diff_mv == 4"; |
| 886 | 890 | |
| 887 | 891 | UT_DB_CLEAN_STATUS |
| 888 | 892 | iLayerMv[0][1 * 16 + iNeighborBlock][1] = 4; |
| 889 | − SET_REF_VALUE(1, iPos); | |
| 893 | + SET_REF_VALUE (1, iPos); | |
| 890 | 894 | EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1, |
| 891 | 895 | 0) == uiBSx4) << iEdge << " " << iPos << " diff_mv == 4"; |
| 892 | 896 | |
| 893 | 897 | UT_DB_CLEAN_STATUS |
| 894 | 898 | iLayerMv[0][0 * 16 + iCurrBlock][0] = -2048; |
| 895 | 899 | iLayerMv[0][1 * 16 + iNeighborBlock][0] = 2047; |
| 896 | − SET_REF_VALUE(1, iPos); | |
| 900 | + SET_REF_VALUE (1, iPos); | |
| 897 | 901 | EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1, |
| 898 | 902 | 0) == uiBSx4) << iEdge << " " << iPos << " diff_mv == maximum"; |
| 899 | 903 | |
| 900 | 904 | UT_DB_CLEAN_STATUS |
| 901 | 905 | iLayerMv[0][0 * 16 + iCurrBlock][1] = -2048; |
| 902 | 906 | iLayerMv[0][1 * 16 + iNeighborBlock][1] = 2047; |
| 903 | − SET_REF_VALUE(1, iPos); | |
| 907 | + SET_REF_VALUE (1, iPos); | |
| 904 | 908 | EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1, |
| 905 | 909 | 0) == uiBSx4) << iEdge << " " << iPos << " diff_mv == maximum"; |
| 906 | 910 | } |
| @@ -912,7 +916,7 @@ TEST (Deblocking, WelsDeblockingMb) { · 5 unmodified lines | ||
| 912 | 916 | /* Deblock one MB, calculate the Bs inside the function, only consider the intra / intra block */ |
| 913 | 917 | SDqLayer sDqLayer; |
| 914 | 918 | sDqLayer.sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.eSliceType = P_SLICE; |
| 915 | − | |
| 919 | + sDqLayer.pDec = NULL; | |
| 916 | 920 | SDeblockingFilter sFilter; |
| 917 | 921 | SDeblockingFunc sDBFunc; |
| 918 | 922 | sFilter.pLoopf = &sDBFunc; |