History

re-structure SWelsDecoderContext and others and prepare for the support of multi-threading support.

xiaotiansf committed 7 years ago

Commit 2f5ecec1 parent 9ed97c729 files · +2285 −1568Browse files

Showing the changes to test/decoder/DecUT_DeblockCommon.cpp (1 of 29 files). Show all

Unified · Split

test/decoder/DecUT_DeblockCommon.cpp+20−16
@@ -804,11 +804,11 @@ TEST (DecoderDeblocking, DeblockingBsMarginalMBAvcbase) { · 803 unmodified lines
804804 // Dummy picture list pointers to 1..MAX_DPB_COUNT
805805 // the pointer values don't need to be valid, just different
806806 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));
808808
809809 sFilter.pRefPics[0] = iFilterPics[0];
810810 sFilter.pRefPics[1] = iFilterPics[1];
811−
811+ sDqLayer.pDec = NULL;
812812 #define UT_DB_CLEAN_STATUS \
813813 memset(iNoZeroCount, 0, sizeof(int8_t)*24*2); \
814814 memset(iLayerRefIndex, 0, sizeof(int8_t)*2*16*2); \
@@ -829,14 +829,14 @@ TEST (DecoderDeblocking, DeblockingBsMarginalMBAvcbase) { · 14 unmodified lines
829829 // (1) iEdge == 0, current block NoZeroCount != 0
830830 UT_DB_CLEAN_STATUS
831831 iNoZeroCount[0 * 24 + iCurrBlock] = 1; // Current MB_block position
832− SET_REF_VALUE(2, iPos);
832+ SET_REF_VALUE (2, iPos);
833833 EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1,
834834 0) == uiBSx4) << iEdge << " " << iPos << " NoZeroCount!=0";
835835
836836 // (2) iEdge == 0, neighbor block NoZeroCount != 0
837837 UT_DB_CLEAN_STATUS
838838 iNoZeroCount[1 * 24 + iNeighborBlock ] = 1; // Neighbor MB_block position
839− SET_REF_VALUE(2, iPos);
839+ SET_REF_VALUE (2, iPos);
840840 EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1,
841841 0) == uiBSx4) << iEdge << " " << iPos << " NoZeroCount!=0";
842842
@@ -844,63 +844,67 @@ TEST (DecoderDeblocking, DeblockingBsMarginalMBAvcbase) { · 1 unmodified line
844844 UT_DB_CLEAN_STATUS
845845 iLayerRefIndex[0][0 * 16 + iCurrBlock] = 0;
846846 iLayerRefIndex[0][1 * 16 + iNeighborBlock] = 1;
847− SET_REF_VALUE(1, iPos);
847+ SET_REF_VALUE (1, iPos);
848848 EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1,
849849 0) == uiBSx4) << iEdge << " " << iPos << " Ref idx diff";
850850
851851 // (4) iEdge == 0, abs(mv diff) < 4
852852 UT_DB_CLEAN_STATUS
853853 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";
855856
856857 UT_DB_CLEAN_STATUS
857858 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";
859861
860862 UT_DB_CLEAN_STATUS
861863 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";
863866
864867 UT_DB_CLEAN_STATUS
865868 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";
867871
868872 // (5) iEdge == 0, abs(mv diff) > 4
869873 UT_DB_CLEAN_STATUS
870874 iLayerMv[0][0 * 16 + iCurrBlock][0] = 4;
871− SET_REF_VALUE(1, iPos);
875+ SET_REF_VALUE (1, iPos);
872876 EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1,
873877 0) == uiBSx4) << iEdge << " " << iPos << " diff_mv == 4";
874878
875879 UT_DB_CLEAN_STATUS
876880 iLayerMv[0][0 * 16 + iCurrBlock][1] = 4;
877− SET_REF_VALUE(1, iPos);
881+ SET_REF_VALUE (1, iPos);
878882 EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1,
879883 0) == uiBSx4) << iEdge << " " << iPos << " diff_mv == 4";
880884
881885 UT_DB_CLEAN_STATUS
882886 iLayerMv[0][1 * 16 + iNeighborBlock][0] = 4;
883− SET_REF_VALUE(1, iPos);
887+ SET_REF_VALUE (1, iPos);
884888 EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1,
885889 0) == uiBSx4) << iEdge << " " << iPos << " diff_mv == 4";
886890
887891 UT_DB_CLEAN_STATUS
888892 iLayerMv[0][1 * 16 + iNeighborBlock][1] = 4;
889− SET_REF_VALUE(1, iPos);
893+ SET_REF_VALUE (1, iPos);
890894 EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1,
891895 0) == uiBSx4) << iEdge << " " << iPos << " diff_mv == 4";
892896
893897 UT_DB_CLEAN_STATUS
894898 iLayerMv[0][0 * 16 + iCurrBlock][0] = -2048;
895899 iLayerMv[0][1 * 16 + iNeighborBlock][0] = 2047;
896− SET_REF_VALUE(1, iPos);
900+ SET_REF_VALUE (1, iPos);
897901 EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1,
898902 0) == uiBSx4) << iEdge << " " << iPos << " diff_mv == maximum";
899903
900904 UT_DB_CLEAN_STATUS
901905 iLayerMv[0][0 * 16 + iCurrBlock][1] = -2048;
902906 iLayerMv[0][1 * 16 + iNeighborBlock][1] = 2047;
903− SET_REF_VALUE(1, iPos);
907+ SET_REF_VALUE (1, iPos);
904908 EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sFilter, &sDqLayer, iEdge, 1,
905909 0) == uiBSx4) << iEdge << " " << iPos << " diff_mv == maximum";
906910 }
@@ -912,7 +916,7 @@ TEST (Deblocking, WelsDeblockingMb) { · 5 unmodified lines
912916 /* Deblock one MB, calculate the Bs inside the function, only consider the intra / intra block */
913917 SDqLayer sDqLayer;
914918 sDqLayer.sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.eSliceType = P_SLICE;
915−
919+ sDqLayer.pDec = NULL;
916920 SDeblockingFilter sFilter;
917921 SDeblockingFunc sDBFunc;
918922 sFilter.pLoopf = &sDBFunc;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t