Ticket #1144: patch_fieldcoding_preanalyze_1144.txt

File patch_fieldcoding_preanalyze_1144.txt, 2.2 KB (added by karlsharman, 8 years ago)
Line 
1*** TEncTop_orig.cpp    2013-08-20 09:46:04.000000000 +0100
2--- TEncTop.cpp 2013-08-20 09:51:26.000000000 +0100
3***************
4*** 441,452 ****
5      Pel * pcTopFieldU =  pcTopField->getPicYuvOrg()->getCbAddr();
6      Pel * pcTopFieldV =  pcTopField->getPicYuvOrg()->getCrAddr();
7     
8-     // compute image characteristics
9-     if ( getUseAdaptiveQP() )
10-     {
11-       m_cPreanalyzer.xPreanalyze( dynamic_cast<TEncPic*>( pcTopField ) );
12-     }
13-     
14      /* -- Defield -- */
15     
16      bool isTop = isTff;
17--- 441,446 ----
18***************
19*** 455,460 ****
20--- 449,460 ----
21      separateFields(PicBufU + nPadChroma + (nStride >> 1)*nPadChroma, pcTopFieldU, nStride >> 1, nWidth >> 1, nHeight >> 1, isTop);
22      separateFields(PicBufV + nPadChroma + (nStride >> 1)*nPadChroma, pcTopFieldV, nStride >> 1, nWidth >> 1, nHeight >> 1, isTop);
23     
24+     // compute image characteristics
25+     if ( getUseAdaptiveQP() )
26+     {
27+       m_cPreanalyzer.xPreanalyze( dynamic_cast<TEncPic*>( pcTopField ) );
28+     }
29+
30    }
31   
32    if (m_iPOCLast == 0) // compress field 0
33***************
34*** 504,515 ****
35      Pel * pcBottomFieldU =  pcBottomField->getPicYuvOrg()->getCbAddr();
36      Pel * pcBottomFieldV =  pcBottomField->getPicYuvOrg()->getCrAddr();
37     
38-     // Compute image characteristics
39-     if ( getUseAdaptiveQP() )
40-     {
41-       m_cPreanalyzer.xPreanalyze( dynamic_cast<TEncPic*>( pcBottomField ) );
42-     }
43-     
44      /* -- Defield -- */
45     
46      bool isTop = !isTff;
47--- 504,509 ----
48***************
49*** 517,523 ****
50--- 511,524 ----
51      separateFields(PicBufY + nPadLuma + nStride*nPadLuma, pcBottomFieldY, nStride, nWidth, nHeight, isTop);
52      separateFields(PicBufU + nPadChroma + (nStride >> 1)*nPadChroma, pcBottomFieldU, nStride >> 1, nWidth >> 1, nHeight >> 1, isTop);
53      separateFields(PicBufV + nPadChroma + (nStride >> 1)*nPadChroma, pcBottomFieldV, nStride >> 1, nWidth >> 1, nHeight >> 1, isTop);
54+
55     
56+     // Compute image characteristics
57+     if ( getUseAdaptiveQP() )
58+     {
59+       m_cPreanalyzer.xPreanalyze( dynamic_cast<TEncPic*>( pcBottomField ) );
60+     }
61+
62    }
63   
64    if ( ( !(m_iNumPicRcvd) || (!flush && m_iPOCLast != 1 && m_iNumPicRcvd != m_iGOPSize && m_iGOPSize)) )