source: 3DVCSoftware/branches/HTM-12.2-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp @ 1118

Last change on this file since 1118 was 1118, checked in by tech, 9 years ago

Merged 12.2-dev1-Hisilicon@1116.

  • Property svn:eol-style set to native
File size: 31.0 KB
Line 
1/* The copyright in this software is being made available under the BSD
2 * License, included below. This software may be subject to other third party
3 * and contributor rights, including patent rights, and no such rights are
4 * granted under this license. 
5 *
6* Copyright (c) 2010-2014, ITU/ISO/IEC
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are met:
11 *
12 *  * Redistributions of source code must retain the above copyright notice,
13 *    this list of conditions and the following disclaimer.
14 *  * Redistributions in binary form must reproduce the above copyright notice,
15 *    this list of conditions and the following disclaimer in the documentation
16 *    and/or other materials provided with the distribution.
17 *  * Neither the name of the ITU/ISO/IEC nor the names of its contributors may
18 *    be used to endorse or promote products derived from this software without
19 *    specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
34/** \file     TDecEntropy.cpp
35    \brief    entropy decoder class
36*/
37
38#include "TDecEntropy.h"
39
40//! \ingroup TLibDecoder
41//! \{
42
43Void TDecEntropy::setEntropyDecoder         ( TDecEntropyIf* p )
44{
45  m_pcEntropyDecoderIf = p;
46}
47
48#include "TLibCommon/TComSampleAdaptiveOffset.h"
49
50Void TDecEntropy::decodeSkipFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
51{
52  m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth );
53}
54#if H_3D_SINGLE_DEPTH
55Void TDecEntropy::decodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
56{
57  if ( !pcCU->getSlice()->getIsDepth() )
58  {
59    return;
60  }
61#if MTK_SINGLE_DEPTH_VPS_FLAG_J0060
62  if(!pcCU->getSlice()->getVPS()->getSingleDepthModeFlag(pcCU->getSlice()->getLayerIdInVps()))
63  {
64     return;
65  }
66#else
67  if(!pcCU->getSlice()->getApplySingleDepthMode())
68  {
69     return;
70  }
71#endif
72  m_pcEntropyDecoderIf->parseSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );
73}
74#endif
75Void TDecEntropy::decodeCUTransquantBypassFlag(TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
76{
77  m_pcEntropyDecoderIf->parseCUTransquantBypassFlag( pcCU, uiAbsPartIdx, uiDepth );
78}
79
80/** decode merge flag
81 * \param pcSubCU
82 * \param uiAbsPartIdx
83 * \param uiDepth
84 * \param uiPUIdx
85 * \returns Void
86 */
87Void TDecEntropy::decodeMergeFlag( TComDataCU* pcSubCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx )
88{ 
89  // at least one merge candidate exists
90  m_pcEntropyDecoderIf->parseMergeFlag( pcSubCU, uiAbsPartIdx, uiDepth, uiPUIdx );
91}
92
93/** decode merge index
94 * \param pcCU
95 * \param uiPartIdx
96 * \param uiAbsPartIdx
97 * \param puhInterDirNeighbours pointer to list of inter direction from the casual neighbours
98 * \param pcMvFieldNeighbours pointer to list of motion vector field from the casual neighbours
99 * \param uiDepth
100 * \returns Void
101 */
102Void TDecEntropy::decodeMergeIndex( TComDataCU* pcCU, UInt uiPartIdx, UInt uiAbsPartIdx, UInt uiDepth )
103{
104  UInt uiMergeIndex = 0;
105  m_pcEntropyDecoderIf->parseMergeIndex( pcCU, uiMergeIndex );
106  pcCU->setMergeIndexSubParts( uiMergeIndex, uiAbsPartIdx, uiPartIdx, uiDepth );
107}
108
109#if H_3D_ARP
110Void TDecEntropy::decodeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
111{
112  if( !pcCU->getSlice()->getARPStepNum() || pcCU->isIntra( uiAbsPartIdx ) )
113  {
114    return;
115  }
116
117  if( pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N )
118  {
119    pcCU->setARPWSubParts( 0 , uiAbsPartIdx, uiDepth );
120  }
121  else
122  {
123    m_pcEntropyDecoderIf->parseARPW( pcCU , uiAbsPartIdx , uiDepth );
124  }
125}
126#endif
127
128#if H_3D_IC
129Void TDecEntropy::decodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
130{
131  pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth );
132
133  if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() || pcCU->getARPW( uiAbsPartIdx ) > 0 )
134  {
135    return;
136  }
137
138  if( !pcCU->getSlice()->getApplyIC() )
139    return;
140
141  if( pcCU->isICFlagRequired( uiAbsPartIdx ) )
142    m_pcEntropyDecoderIf->parseICFlag( pcCU, uiAbsPartIdx, uiDepth );
143}
144#endif
145
146Void TDecEntropy::decodeSplitFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
147{
148  m_pcEntropyDecoderIf->parseSplitFlag( pcCU, uiAbsPartIdx, uiDepth );
149}
150
151Void TDecEntropy::decodePredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
152{
153  m_pcEntropyDecoderIf->parsePredMode( pcCU, uiAbsPartIdx, uiDepth );
154}
155
156Void TDecEntropy::decodePartSize( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
157{
158  m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth );
159 
160#if H_3D_DBBP
161#if SEC_DBBP_VIEW_REF_CHECK_J0037
162  #if HHI_TOOL_PARAMETERS_I2_J0107
163if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
164#else
165if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
166#endif
167#else
168  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 )
169#endif
170  {
171    decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth);
172  }
173#endif
174}
175
176Void TDecEntropy::decodePredInfo    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU )
177{
178  if( pcCU->isIntra( uiAbsPartIdx ) )                                 // If it is Intra mode, encode intra prediction mode.
179  {
180    decodeIntraDirModeLuma  ( pcCU, uiAbsPartIdx, uiDepth );
181#if H_3D_DIM_SDC
182    if(!pcCU->getSDCFlag(uiAbsPartIdx))
183#endif
184    decodeIntraDirModeChroma( pcCU, uiAbsPartIdx, uiDepth );
185  }
186  else                                                                // if it is Inter mode, encode motion vector and reference index
187  {
188    decodePUWise( pcCU, uiAbsPartIdx, uiDepth, pcSubCU );
189  }
190}
191
192/** Parse I_PCM information.
193 * \param pcCU  pointer to CUpointer to CU
194 * \param uiAbsPartIdx CU index
195 * \param uiDepth CU depth
196 * \returns Void
197 */
198Void TDecEntropy::decodeIPCMInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
199{
200  if(!pcCU->getSlice()->getSPS()->getUsePCM()
201    || pcCU->getWidth(uiAbsPartIdx) > (1<<pcCU->getSlice()->getSPS()->getPCMLog2MaxSize())
202    || pcCU->getWidth(uiAbsPartIdx) < (1<<pcCU->getSlice()->getSPS()->getPCMLog2MinSize()) )
203  {
204    return;
205  }
206 
207  m_pcEntropyDecoderIf->parseIPCMInfo( pcCU, uiAbsPartIdx, uiDepth );
208}
209
210Void TDecEntropy::decodeIntraDirModeLuma  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
211{
212  m_pcEntropyDecoderIf->parseIntraDirLumaAng( pcCU, uiAbsPartIdx, uiDepth );
213}
214
215Void TDecEntropy::decodeIntraDirModeChroma( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
216{
217  m_pcEntropyDecoderIf->parseIntraDirChroma( pcCU, uiAbsPartIdx, uiDepth );
218}
219
220/** decode motion information for every PU block.
221 * \param pcCU
222 * \param uiAbsPartIdx
223 * \param uiDepth
224 * \param pcSubCU
225 * \returns Void
226 */
227Void TDecEntropy::decodePUWise( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU )
228{
229  PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );
230  UInt uiNumPU = ( ePartSize == SIZE_2Nx2N ? 1 : ( ePartSize == SIZE_NxN ? 4 : 2 ) );
231  UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4;
232
233#if H_3D_IV_MERGE
234  TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists
235  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM];
236#else
237  TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists
238  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS];
239#endif
240#if H_3D_SPIVMP
241  Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
242  TComMvField*  pcMvFieldSP;
243  UChar* puhInterDirSP;
244  pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2]; 
245  puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()]; 
246#endif
247  for ( UInt ui = 0; ui < pcCU->getSlice()->getMaxNumMergeCand(); ui++ )
248  {
249    uhInterDirNeighbours[ui] = 0;
250  }
251  Int numValidMergeCand = 0;
252  Bool isMerged = false;
253
254  pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 );
255  pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 );
256#if H_3D_IV_MERGE
257  pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx);
258#endif
259  for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset )
260  {
261#if H_MV_ENC_DEC_TRAC
262    DTRACE_PU_S("=========== prediction_unit ===========\n")
263    // ToDo:
264    //DTRACE_PU("x0", uiLPelX)
265    //DTRACE_PU("x1", uiTPelY)
266#endif
267    decodeMergeFlag( pcCU, uiSubPartIdx, uiDepth, uiPartIdx );
268    if ( pcCU->getMergeFlag( uiSubPartIdx ) )
269    {
270      decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth );
271      UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
272#if H_3D_ARP
273      decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
274#endif
275#if H_3D_IC
276      decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
277#endif
278#if H_3D_DBBP
279      if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false )
280#else
281      if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 ) 
282#endif
283      {
284        pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );
285        if ( !isMerged )
286        {
287#if H_3D_VSP
288          Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
289          memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
290#if H_3D_SPIVMP
291          memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
292#endif
293          pcSubCU->initAvailableFlags();
294          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
295          pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours
296#if H_3D_SPIVMP
297            , pcMvFieldSP, puhInterDirSP
298#endif
299            , numValidMergeCand );
300          pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
301#if H_3D_SPIVMP
302            , bSPIVMPFlag
303#endif
304            , numValidMergeCand );
305          pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
306
307#else
308#if H_3D
309          pcSubCU->initAvailableFlags();
310          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
311          pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
312
313#else
314          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
315#endif
316#endif
317          isMerged = true;
318        }
319        pcSubCU->setPartSizeSubParts( ePartSize, 0, uiDepth );
320      }
321      else
322      {
323        uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
324#if H_3D_VSP
325        Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
326        memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
327#if H_3D_SPIVMP
328        memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
329#endif
330        pcSubCU->initAvailableFlags();
331        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
332        pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours
333#if H_3D_SPIVMP
334          , pcMvFieldSP, puhInterDirSP
335#endif
336          ,numValidMergeCand, uiMergeIndex );
337        pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
338#if H_3D_SPIVMP
339          , bSPIVMPFlag
340#endif
341          ,numValidMergeCand );
342        pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
343#else
344#if H_3D
345        pcSubCU->initAvailableFlags();
346        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
347        pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
348#else
349        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
350#endif
351#endif
352      }
353      pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
354#if !LGE_DDD_REMOVAL_J0042_J0030
355#if H_3D_DDD
356      if( uiMergeIndex == pcSubCU->getUseDDDCandIdx() )
357      {
358          assert( pcCU->getSlice()->getViewIndex() != 0 );
359          pcCU->setUseDDD( true, uiSubPartIdx, uiPartIdx, uiDepth );
360          pcCU->setDDDepthSubParts( pcSubCU->getDDTmpDepth(),uiSubPartIdx, uiPartIdx, uiDepth );
361      }
362      else
363      {
364          pcCU->setUseDDD( false, uiSubPartIdx, uiPartIdx, uiDepth );
365      }
366#endif
367#endif
368
369      TComMv cTmpMv( 0, 0 );
370      for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
371      {       
372        if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 )
373        {
374          pcCU->setMVPIdxSubParts( 0, RefPicList( uiRefListIdx ), uiSubPartIdx, uiPartIdx, uiDepth);
375          pcCU->setMVPNumSubParts( 0, RefPicList( uiRefListIdx ), uiSubPartIdx, uiPartIdx, uiDepth);
376          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
377          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
378#if H_3D_VSP
379#if H_3D_DBBP
380          if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 && !pcCU->getDBBPFlag( uiAbsPartIdx ) )
381#else
382          if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 )
383#endif
384          {
385            if ( uhInterDirNeighbours[ uiMergeIndex ] & (1<<uiRefListIdx) )
386            {
387              UInt dummy;
388              Int vspSize;
389              Int width, height;
390              pcCU->getPartIndexAndSize( uiPartIdx, dummy, width, height, uiSubPartIdx, pcCU->getTotalNumPart()==256 );
391              pcCU->setMvFieldPUForVSP( pcCU, uiSubPartIdx, width, height, RefPicList( uiRefListIdx ), cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getRefIdx(), vspSize );
392              pcCU->setVSPFlag( uiSubPartIdx, vspSize );
393            }
394          }
395#endif
396        }
397      }
398#if H_3D_SPIVMP
399      pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 
400      if (bSPIVMPFlag[uiMergeIndex] != 0)
401      {
402        Int iWidth, iHeight;
403        UInt uiIdx;
404        pcCU->getPartIndexAndSize( uiPartIdx, uiIdx, iWidth, iHeight, uiSubPartIdx, true );
405
406        UInt uiSPAddr;
407
408        Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
409
410        pcCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight);
411
412        for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++)
413        {
414          pcCU->getSPAbsPartIdx(uiSubPartIdx, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr);
415          pcCU->setInterDirSP(puhInterDirSP[iPartitionIdx], uiSPAddr, iSPWidth, iSPHeight);
416          pcCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight);
417          pcCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight);
418        }
419      }
420#endif
421    }
422    else
423    {
424      decodeInterDirPU( pcCU, uiSubPartIdx, uiDepth, uiPartIdx );
425      for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
426      {       
427        if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 )
428        {
429          decodeRefFrmIdxPU( pcCU,    uiSubPartIdx,              uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
430          decodeMvdPU      ( pcCU,    uiSubPartIdx,              uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
431          decodeMVPIdxPU   ( pcSubCU, uiSubPartIdx-uiAbsPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
432        }
433      }
434#if H_3D_ARP
435      decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
436#endif
437#if H_3D_IC
438      decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
439#endif
440    }
441    if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) )
442    {
443      pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMv( TComMv(0,0), ePartSize, uiSubPartIdx, uiDepth, uiPartIdx);
444      pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllRefIdx( -1, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx);
445      pcCU->setInterDirSubParts( 1, uiSubPartIdx, uiPartIdx, uiDepth);
446    }
447  }
448#if H_3D_SPIVMP
449  delete[] pcMvFieldSP;
450  delete[] puhInterDirSP;
451#endif
452  return;
453}
454
455/** decode inter direction for a PU block
456 * \param pcCU
457 * \param uiAbsPartIdx
458 * \param uiDepth
459 * \param uiPartIdx
460 * \returns Void
461 */
462Void TDecEntropy::decodeInterDirPU( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPartIdx )
463{
464  UInt uiInterDir;
465
466  if ( pcCU->getSlice()->isInterP() )
467  {
468    uiInterDir = 1;
469  }
470  else
471  {
472    m_pcEntropyDecoderIf->parseInterDir( pcCU, uiInterDir, uiAbsPartIdx );
473  }
474
475  pcCU->setInterDirSubParts( uiInterDir, uiAbsPartIdx, uiPartIdx, uiDepth );
476}
477
478Void TDecEntropy::decodeRefFrmIdxPU( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
479{
480  Int iRefFrmIdx = 0;
481  Int iParseRefFrmIdx = pcCU->getInterDir( uiAbsPartIdx ) & ( 1 << eRefList );
482
483  if ( pcCU->getSlice()->getNumRefIdx( eRefList ) > 1 && iParseRefFrmIdx )
484  {
485    m_pcEntropyDecoderIf->parseRefFrmIdx( pcCU, iRefFrmIdx, eRefList );
486  }
487  else if ( !iParseRefFrmIdx )
488  {
489    iRefFrmIdx = NOT_VALID;
490  }
491  else
492  {
493    iRefFrmIdx = 0;
494  }
495
496  PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );
497  pcCU->getCUMvField( eRefList )->setAllRefIdx( iRefFrmIdx, ePartSize, uiAbsPartIdx, uiDepth, uiPartIdx );
498}
499
500/** decode motion vector difference for a PU block
501 * \param pcCU
502 * \param uiAbsPartIdx
503 * \param uiDepth
504 * \param uiPartIdx
505 * \param eRefList
506 * \returns Void
507 */
508Void TDecEntropy::decodeMvdPU( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
509{
510  if ( pcCU->getInterDir( uiAbsPartIdx ) & ( 1 << eRefList ) )
511  {
512    m_pcEntropyDecoderIf->parseMvd( pcCU, uiAbsPartIdx, uiPartIdx, uiDepth, eRefList );
513  }
514}
515
516Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
517{
518  Int iMVPIdx = -1;
519
520  TComMv cZeroMv( 0, 0 );
521  TComMv cMv     = cZeroMv;
522  Int    iRefIdx = -1;
523
524  TComCUMvField* pcSubCUMvField = pcSubCU->getCUMvField( eRefList );
525  AMVPInfo* pAMVPInfo = pcSubCUMvField->getAMVPInfo();
526
527  iRefIdx = pcSubCUMvField->getRefIdx(uiPartAddr);
528  cMv = cZeroMv;
529
530  if ( (pcSubCU->getInterDir(uiPartAddr) & ( 1 << eRefList )) )
531  {
532    m_pcEntropyDecoderIf->parseMVPIdx( iMVPIdx );
533#if H_MV_ENC_DEC_TRAC
534#if ENC_DEC_TRACE
535    if ( eRefList == REF_PIC_LIST_0 )
536    {
537      DTRACE_PU("mvp_l0_flag", iMVPIdx)
538    }
539    else
540    {
541      DTRACE_PU("mvp_l1_flag", iMVPIdx)
542    }
543#endif
544#endif
545  }
546  pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo);
547  pcSubCU->setMVPNumSubParts(pAMVPInfo->iN, eRefList, uiPartAddr, uiPartIdx, uiDepth);
548  pcSubCU->setMVPIdxSubParts( iMVPIdx, eRefList, uiPartAddr, uiPartIdx, uiDepth );
549  if ( iRefIdx >= 0 )
550  {
551    m_pcPrediction->getMvPredAMVP( pcSubCU, uiPartIdx, uiPartAddr, eRefList, cMv);
552    cMv += pcSubCUMvField->getMvd( uiPartAddr );
553  }
554
555  PartSize ePartSize = pcSubCU->getPartitionSize( uiPartAddr );
556  pcSubCU->getCUMvField( eRefList )->setAllMv(cMv, ePartSize, uiPartAddr, 0, uiPartIdx);
557}
558
559Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int quadtreeTULog2MinSizeInCU)
560{
561  UInt uiSubdiv;
562  const UInt uiLog2TrafoSize = g_aucConvertToBit[pcCU->getSlice()->getSPS()->getMaxCUWidth()]+2 - uiDepth;
563
564  if(uiTrIdx==0)
565  {
566    m_bakAbsPartIdxCU = uiAbsPartIdx;
567  }
568  if( uiLog2TrafoSize == 2 )
569  {
570    UInt partNum = pcCU->getPic()->getNumPartInCU() >> ( ( uiDepth - 1 ) << 1 );
571    if( ( uiAbsPartIdx % partNum ) == 0 )
572    {
573      m_uiBakAbsPartIdx   = uiAbsPartIdx;
574      m_uiBakChromaOffset = offsetChroma;
575    }
576  }
577  if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTRA && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_NxN && uiDepth == pcCU->getDepth(uiAbsPartIdx) )
578  {
579    uiSubdiv = 1;
580  }
581  else if( (pcCU->getSlice()->getSPS()->getQuadtreeTUMaxDepthInter() == 1) && (pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER) && ( pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N ) && (uiDepth == pcCU->getDepth(uiAbsPartIdx)) )
582  {
583    uiSubdiv = (uiLog2TrafoSize > quadtreeTULog2MinSizeInCU);
584  }
585  else if( uiLog2TrafoSize > pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() )
586  {
587    uiSubdiv = 1;
588  }
589  else if( uiLog2TrafoSize == pcCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() )
590  {
591    uiSubdiv = 0;
592  }
593  else if( uiLog2TrafoSize == quadtreeTULog2MinSizeInCU )
594  {
595    uiSubdiv = 0;
596  }
597  else
598  {
599    assert( uiLog2TrafoSize > quadtreeTULog2MinSizeInCU );
600    m_pcEntropyDecoderIf->parseTransformSubdivFlag( uiSubdiv, 5 - uiLog2TrafoSize );
601  }
602 
603  const UInt uiTrDepth = uiDepth - pcCU->getDepth( uiAbsPartIdx );
604  {
605    const Bool bFirstCbfOfCU = uiTrDepth == 0;
606    if( bFirstCbfOfCU )
607    {
608      pcCU->setCbfSubParts( 0, TEXT_CHROMA_U, uiAbsPartIdx, uiDepth );
609      pcCU->setCbfSubParts( 0, TEXT_CHROMA_V, uiAbsPartIdx, uiDepth );
610    }
611    if( bFirstCbfOfCU || uiLog2TrafoSize > 2 )
612    {
613      if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )
614      {
615        m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth, uiDepth );
616      }
617      if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) )
618      {
619        m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth, uiDepth );
620      }
621    }
622    else
623    {
624      pcCU->setCbfSubParts( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) << uiTrDepth, TEXT_CHROMA_U, uiAbsPartIdx, uiDepth );
625      pcCU->setCbfSubParts( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) << uiTrDepth, TEXT_CHROMA_V, uiAbsPartIdx, uiDepth );
626    }
627  }
628 
629  if( uiSubdiv )
630  {
631    UInt size;
632    width  >>= 1;
633    height >>= 1;
634    size = width*height;
635    uiTrIdx++;
636    ++uiDepth;
637    const UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1);
638    const UInt uiStartAbsPartIdx = uiAbsPartIdx;
639    UInt uiYCbf = 0;
640    UInt uiUCbf = 0;
641    UInt uiVCbf = 0;
642   
643    for( Int i = 0; i < 4; i++ )
644    {
645      xDecodeTransform( pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, uiDepth, width, height, uiTrIdx, bCodeDQP, quadtreeTULog2MinSizeInCU );
646      uiYCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrDepth+1 );
647      uiUCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth+1 );
648      uiVCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth+1 );
649      uiAbsPartIdx += uiQPartNum;
650      offsetLuma += size;  offsetChroma += (size>>2);
651    }
652   
653    for( UInt ui = 0; ui < 4 * uiQPartNum; ++ui )
654    {
655      pcCU->getCbf( TEXT_LUMA     )[uiStartAbsPartIdx + ui] |= uiYCbf << uiTrDepth;
656      pcCU->getCbf( TEXT_CHROMA_U )[uiStartAbsPartIdx + ui] |= uiUCbf << uiTrDepth;
657      pcCU->getCbf( TEXT_CHROMA_V )[uiStartAbsPartIdx + ui] |= uiVCbf << uiTrDepth;
658    }
659  }
660  else
661  {
662    assert( uiDepth >= pcCU->getDepth( uiAbsPartIdx ) );
663    pcCU->setTrIdxSubParts( uiTrDepth, uiAbsPartIdx, uiDepth );
664   
665#if !H_MV_ENC_DEC_TRAC
666    {
667      DTRACE_CABAC_VL( g_nSymbolCounter++ );
668      DTRACE_CABAC_T( "\tTrIdx: abspart=" );
669      DTRACE_CABAC_V( uiAbsPartIdx );
670      DTRACE_CABAC_T( "\tdepth=" );
671      DTRACE_CABAC_V( uiDepth );
672      DTRACE_CABAC_T( "\ttrdepth=" );
673      DTRACE_CABAC_V( uiTrDepth );
674      DTRACE_CABAC_T( "\n" );
675    }
676#endif
677   
678    pcCU->setCbfSubParts ( 0, TEXT_LUMA, uiAbsPartIdx, uiDepth );
679    if( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )
680    {
681      pcCU->setCbfSubParts( 1 << uiTrDepth, TEXT_LUMA, uiAbsPartIdx, uiDepth );
682    }
683    else
684    {
685      m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_LUMA, uiTrDepth, uiDepth );
686    }
687
688
689    // transform_unit begin
690    UInt cbfY = pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA    , uiTrIdx );
691    UInt cbfU = pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrIdx );
692    UInt cbfV = pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrIdx );
693    if( uiLog2TrafoSize == 2 )
694    {
695      UInt partNum = pcCU->getPic()->getNumPartInCU() >> ( ( uiDepth - 1 ) << 1 );
696      if( ( uiAbsPartIdx % partNum ) == (partNum - 1) )
697      {
698        cbfU = pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_U, uiTrIdx );
699        cbfV = pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_V, uiTrIdx );
700      }
701    }
702    if ( cbfY || cbfU || cbfV )
703    {
704      // dQP: only for LCU
705      if ( pcCU->getSlice()->getPPS()->getUseDQP() )
706      {
707        if ( bCodeDQP )
708        {
709          decodeQP( pcCU, m_bakAbsPartIdxCU);
710          bCodeDQP = false;
711        }
712      }
713    }
714    if( cbfY )
715    {
716      Int trWidth = width;
717      Int trHeight = height;
718      m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffY()+offsetLuma), uiAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_LUMA );
719    }
720    if( uiLog2TrafoSize > 2 )
721    {
722      Int trWidth = width >> 1;
723      Int trHeight = height >> 1;
724      if( cbfU )
725      {
726        m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffCb()+offsetChroma), uiAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_U );
727      }
728      if( cbfV )
729      {
730        m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffCr()+offsetChroma), uiAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_V );
731      }
732    }
733    else
734    {
735      UInt partNum = pcCU->getPic()->getNumPartInCU() >> ( ( uiDepth - 1 ) << 1 );
736      if( ( uiAbsPartIdx % partNum ) == (partNum - 1) )
737      {
738        Int trWidth = width;
739        Int trHeight = height;
740        if( cbfU )
741        {
742          m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffCb()+m_uiBakChromaOffset), m_uiBakAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_U );
743        }
744        if( cbfV )
745        {
746          m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffCr()+m_uiBakChromaOffset), m_uiBakAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_V );
747        }
748      }
749    }
750    // transform_unit end
751  }
752}
753
754Void TDecEntropy::decodeQP          ( TComDataCU* pcCU, UInt uiAbsPartIdx )
755{
756  if ( pcCU->getSlice()->getPPS()->getUseDQP() )
757  {
758    m_pcEntropyDecoderIf->parseDeltaQP( pcCU, uiAbsPartIdx, pcCU->getDepth( uiAbsPartIdx ) );
759  }
760}
761
762
763/** decode coefficients
764 * \param pcCU
765 * \param uiAbsPartIdx
766 * \param uiDepth
767 * \param uiWidth
768 * \param uiHeight
769 * \returns Void
770 */
771Void TDecEntropy::decodeCoeff( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiWidth, UInt uiHeight, Bool& bCodeDQP )
772{
773  UInt uiMinCoeffSize = pcCU->getPic()->getMinCUWidth()*pcCU->getPic()->getMinCUHeight();
774  UInt uiLumaOffset   = uiMinCoeffSize*uiAbsPartIdx;
775  UInt uiChromaOffset = uiLumaOffset>>2;
776#if H_3D_DIM_SDC
777  if( pcCU->getSDCFlag( uiAbsPartIdx ) && pcCU->isIntra( uiAbsPartIdx) )
778  {
779    assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
780    assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 );
781    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 );
782    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
783    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
784  }
785
786#if H_3D_INTER_SDC
787  if( pcCU->getSDCFlag( uiAbsPartIdx ) && !pcCU->isIntra( uiAbsPartIdx) )
788  {
789    assert( !pcCU->isSkipped( uiAbsPartIdx ) );
790    assert( !pcCU->isIntra( uiAbsPartIdx) );
791    assert( pcCU->getSlice()->getIsDepth() );
792  }
793#endif
794  if( pcCU->getSlice()->getIsDepth() && ( pcCU->getSDCFlag( uiAbsPartIdx ) || pcCU->isIntra( uiAbsPartIdx ) ) )
795  {
796    Int iPartNum = ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ) ? 4 : 1;
797    UInt uiPartOffset = ( pcCU->getPic()->getNumPartInCU() >> ( pcCU->getDepth( uiAbsPartIdx ) << 1 ) ) >> 2;
798 
799    if( !pcCU->getSDCFlag( uiAbsPartIdx ) )
800    {
801      for( Int iPart = 0; iPart < iPartNum; iPart++ )
802      {
803        if( getDimType( pcCU->getLumaIntraDir( uiAbsPartIdx + uiPartOffset*iPart ) ) < DIM_NUM_TYPE ) 
804        {
805          m_pcEntropyDecoderIf->parseDeltaDC( pcCU, uiAbsPartIdx + uiPartOffset*iPart, uiDepth + ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ) );
806        }
807      }
808    }
809    else
810    {
811      m_pcEntropyDecoderIf->parseDeltaDC( pcCU, uiAbsPartIdx, uiDepth );
812      return;
813    }
814  }
815#endif
816
817  if( pcCU->isIntra(uiAbsPartIdx) )
818  {
819  }
820  else
821  {
822    UInt uiQtRootCbf = 1;
823    if( !( pcCU->getPartitionSize( uiAbsPartIdx) == SIZE_2Nx2N && pcCU->getMergeFlag( uiAbsPartIdx ) ) )
824    {
825      m_pcEntropyDecoderIf->parseQtRootCbf( uiAbsPartIdx, uiQtRootCbf );
826    }
827    if ( !uiQtRootCbf )
828    {
829      pcCU->setCbfSubParts( 0, 0, 0, uiAbsPartIdx, uiDepth );
830      pcCU->setTrIdxSubParts( 0 , uiAbsPartIdx, uiDepth );
831      return;
832    }
833   
834  }
835
836  Int getQuadtreeTULog2MinSizeInCU = pcCU->getQuadtreeTULog2MinSizeInCU(uiAbsPartIdx);
837
838  xDecodeTransform( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, bCodeDQP, getQuadtreeTULog2MinSizeInCU );
839}
840
841#if H_3D_INTER_SDC
842Void TDecEntropy::decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
843{
844  pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth );
845
846#if HHI_TOOL_PARAMETERS_I2_J0107
847  if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getInterSdcFlag() ) || 
848    ( pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getIntraSdcWedgeFlag() ) )
849#else
850  if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) ) || 
851    ( pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getVpsDepthModesFlag( pcCU->getSlice()->getLayerIdInVps() ) ) )
852#endif
853  {
854    return;
855  }
856
857  if( !pcCU->getSlice()->getIsDepth() || pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_2Nx2N || pcCU->isSkipped( uiAbsPartIdx ) )
858  {
859    return;
860  }
861
862  assert( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N || ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->isSkipped( uiAbsPartIdx ) ) );
863  m_pcEntropyDecoderIf->parseSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
864}
865#endif
866#if H_3D_DBBP
867Void TDecEntropy::decodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
868{
869  m_pcEntropyDecoderIf->parseDBBPFlag( pcCU, uiAbsPartIdx, uiDepth );
870}
871#endif
872
873//! \}
Note: See TracBrowser for help on using the repository browser.