History

Revert broken big-endian fix for DeblockingBsMarginalMBAvcbase

The function actually was correct for big-endian use already (and the changes in 239e22d0 actually broke normal decoding tests), it was only the test function itself that needed fixing for big-endian.

Martin Storsjö committed 11 years ago

Commit 31453e31 parent 853423b2 files · +27 −11Browse files

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

Unified · Split

test/decoder/DecUT_DeblockCommon.cpp+24−9
@@ -773,6 +773,8 @@ TEST (DecoderDeblocking, DeblockingBsMarginalMBAvcbase) { · 772 unmodified lines
773773 int8_t iNoZeroCount[24 * 2]; // (*pNzc)[24]
774774 int8_t iLayerRefIndex[2][16 * 2]; // (*pRefIndex[LIST_A])[MB_BLOCK4x4_NUM];
775775 int16_t iLayerMv[2][16 * 2][2]; //(*pMv[LIST_A])[MB_BLOCK4x4_NUM][MV_A];
776+ uint32_t uiBSx4;
777+ uint8_t* pBS = (uint8_t*) (&uiBSx4);
776778
777779 sDqLayer.pNzc = (int8_t (*)[24])iNoZeroCount;
778780 sDqLayer.pRefIndex[0] = (int8_t (*)[16])&iLayerRefIndex[0];
@@ -790,6 +792,10 @@ TEST (DecoderDeblocking, DeblockingBsMarginalMBAvcbase) { · 11 unmodified lines
790792 memset(iLayerRefIndex, 0, sizeof(int8_t)*2*16*2); \
791793 memset(iLayerMv, 0, sizeof(int16_t)*2*16*2*2);
792794
795+#define SET_REF_VALUE(value, pos) \
796+ uiBSx4 = 0; \
797+ pBS[pos] = value;
798+
793799 int32_t iCurrBlock, iNeighborBlock;
794800
795801 /* Cycle for each block and its neighboring block */
@@ -801,21 +807,24 @@ TEST (DecoderDeblocking, DeblockingBsMarginalMBAvcbase) { · 5 unmodified lines
801807 // (1) iEdge == 0, current block NoZeroCount != 0
802808 UT_DB_CLEAN_STATUS
803809 iNoZeroCount[0 * 24 + iCurrBlock] = 1; // Current MB_block position
810+ SET_REF_VALUE(2, iPos);
804811 EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sDqLayer, iEdge, 1,
805− 0) == (2u << (iPos * 8))) << iEdge << " " << iPos << " NoZeroCount!=0";
812+ 0) == uiBSx4) << iEdge << " " << iPos << " NoZeroCount!=0";
806813
807814 // (2) iEdge == 0, neighbor block NoZeroCount != 0
808815 UT_DB_CLEAN_STATUS
809816 iNoZeroCount[1 * 24 + iNeighborBlock ] = 1; // Neighbor MB_block position
817+ SET_REF_VALUE(2, iPos);
810818 EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sDqLayer, iEdge, 1,
811− 0) == (2u << (iPos * 8))) << iEdge << " " << iPos << " NoZeroCount!=0";
819+ 0) == uiBSx4) << iEdge << " " << iPos << " NoZeroCount!=0";
812820
813821 // (3) iEdge == 0, reference idx diff
814822 UT_DB_CLEAN_STATUS
815823 iLayerRefIndex[0][0 * 16 + iCurrBlock] = 0;
816824 iLayerRefIndex[0][1 * 16 + iNeighborBlock] = 1;
825+ SET_REF_VALUE(1, iPos);
817826 EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sDqLayer, iEdge, 1,
818− 0) == (1u << (iPos * 8))) << iEdge << " " << iPos << " Ref idx diff";
827+ 0) == uiBSx4) << iEdge << " " << iPos << " Ref idx diff";
819828
820829 // (4) iEdge == 0, abs(mv diff) < 4
821830 UT_DB_CLEAN_STATUS
@@ -837,35 +846,41 @@ TEST (DecoderDeblocking, DeblockingBsMarginalMBAvcbase) { · 15 unmodified lines
837846 // (5) iEdge == 0, abs(mv diff) > 4
838847 UT_DB_CLEAN_STATUS
839848 iLayerMv[0][0 * 16 + iCurrBlock][0] = 4;
849+ SET_REF_VALUE(1, iPos);
840850 EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sDqLayer, iEdge, 1,
841− 0) == (1u << (iPos * 8))) << iEdge << " " << iPos << " diff_mv == 4";
851+ 0) == uiBSx4) << iEdge << " " << iPos << " diff_mv == 4";
842852
843853 UT_DB_CLEAN_STATUS
844854 iLayerMv[0][0 * 16 + iCurrBlock][1] = 4;
855+ SET_REF_VALUE(1, iPos);
845856 EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sDqLayer, iEdge, 1,
846− 0) == (1u << (iPos * 8))) << iEdge << " " << iPos << " diff_mv == 4";
857+ 0) == uiBSx4) << iEdge << " " << iPos << " diff_mv == 4";
847858
848859 UT_DB_CLEAN_STATUS
849860 iLayerMv[0][1 * 16 + iNeighborBlock][0] = 4;
861+ SET_REF_VALUE(1, iPos);
850862 EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sDqLayer, iEdge, 1,
851− 0) == (1u << (iPos * 8))) << iEdge << " " << iPos << " diff_mv == 4";
863+ 0) == uiBSx4) << iEdge << " " << iPos << " diff_mv == 4";
852864
853865 UT_DB_CLEAN_STATUS
854866 iLayerMv[0][1 * 16 + iNeighborBlock][1] = 4;
867+ SET_REF_VALUE(1, iPos);
855868 EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sDqLayer, iEdge, 1,
856− 0) == (1u << (iPos * 8))) << iEdge << " " << iPos << " diff_mv == 4";
869+ 0) == uiBSx4) << iEdge << " " << iPos << " diff_mv == 4";
857870
858871 UT_DB_CLEAN_STATUS
859872 iLayerMv[0][0 * 16 + iCurrBlock][0] = -2048;
860873 iLayerMv[0][1 * 16 + iNeighborBlock][0] = 2047;
874+ SET_REF_VALUE(1, iPos);
861875 EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sDqLayer, iEdge, 1,
862− 0) == (1u << (iPos * 8))) << iEdge << " " << iPos << " diff_mv == maximum";
876+ 0) == uiBSx4) << iEdge << " " << iPos << " diff_mv == maximum";
863877
864878 UT_DB_CLEAN_STATUS
865879 iLayerMv[0][0 * 16 + iCurrBlock][1] = -2048;
866880 iLayerMv[0][1 * 16 + iNeighborBlock][1] = 2047;
881+ SET_REF_VALUE(1, iPos);
867882 EXPECT_TRUE (DeblockingBsMarginalMBAvcbase (&sDqLayer, iEdge, 1,
868− 0) == (1u << (iPos * 8))) << iEdge << " " << iPos << " diff_mv == maximum";
883+ 0) == uiBSx4) << iEdge << " " << iPos << " diff_mv == maximum";
869884 }
870885 }
871886 }

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