Changeset 5 in 3DVCSoftware


Ignore:
Timestamp:
12 Dec 2011, 18:35:44 (13 years ago)
Author:
hhi
Message:

Clean version with cfg-files

Location:
trunk
Files:
145 edited

Legend:

Unmodified
Added
Removed
  • trunk/cfg/encoder_mvd.cfg

    r2 r5  
    1 
    2 
    31#======== File I/O =====================
    42InputFile_0                   : BookArrival_256x192\video\BookArrival_256x192_15_08.yuv
     
    2119
    2220
    23 
    2421#====== General Coding Parameters ======
    2522NumberOfViews                 : 3           # Number of views to be coded
    2623CodeDepthMaps                 : 1           # Encode depth maps
    2724FramesToBeEncoded             : 5           # Number of frames to be coded
    28 
    2925SourceWidth                   : 256         # Input  frame width
    3026SourceHeight                  : 192         # Input  frame height
     
    3531InternalBitDepth              : 10          # Internal bit-depth
    3632
    37 
    38 
    3933#====== Camera Parameters ======
    4034CameraParameterFile           : BookArrival_256x192\cam_bookarrival.cfg   # Camera parameter file
    4135BaseViewCameraNumbers         : 8 10 6                                    # Cameras in coding order [only NumberOfViews values are used]
    42 CodedCamParsPrecision         : 2                                         # precision for camera parameter coding (max. disparity error = 2^(-x)) [default: 2]
    43 
     36CodedCamParsPrecision         : 5                                         # precision for camera parameter coding (max. disparity error = 2^(-x)) [default: 2]
    4437
    4538#======== Unit definition ================
     
    5346QuadtreeTUMaxDepthIntra       :  3
    5447
    55 
    56 
    5748#======== Coding Structure =============
    58 GOPSize                       : 4           # GOP Size (number of B slice = GOPSize-1)
    59 RateGOPSize                   : 4           # GOP size used for QP assignment
     49GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
     50RateGOPSize                   : 8           # GOP size used for QP assignment
    6051LowDelayCoding                : 0           # Low-delay coding structure
    61 GOPFormatString               : IL0PL0(V0)_0*n{PL0(-4)PL0(-4,V0)_3BL1(-2;+2)BL1(-2;+2,V0)_1BL2(-1;+1)BL2(-1;+1,V0)_0BL2(-1;+1)BL2(-1,V0;+1)_2}
    62 CodecPictureStoreSize         : 16          # size of coded picture buffer
     52GOPFormatString               : IL0PL3(V0)_0*n{ *2{ PL0(-8)PL3(-8,V0)_7 BL1(-4;+4)BL4(-4,V0;+4)_3 BL2(-2;+2,+6)BL5(-2,V0;+2,+6)_1 BL2(-2,-6;+2)BL5(-2,-6,V0;+2)_5 BL3(-1;+1,+3)BL6(-1,V0;+1,+3)_0 BL3(-1,-3;+1,+5)BL6(-1,-3,V0;+1,+5)_2 BL3(-1,-5;+1,+3)BL6(-1,-5,V0;+1,+3)_4 BL3(-1,-3;+1)BL6(-1,-3,V0;+1)_6 }*1{ IL0PL3(V0)_7 BL1(-4;+4)BL4(-4,V0;+4)_3 BL2(-2;+2,+6)BL5(-2,V0;+2,+6)_1 BL2(-2,-6;+2)BL5(-2,-6,V0;+2)_5 BL3(-1;+1,+3)BL6(-1,V0;+1,+3)_0 BL3(-1,-3;+1,+5)BL6(-1,-3,V0;+1,+5)_2 BL3(-1,-5;+1,+3)BL6(-1,-5,V0;+1,+3)_4 BL3(-1,-3;+1)BL6(-1,-3,V0;+1)_6 } }
     53CodedPictureStoreSize         : 9
    6354TemporalLayerQPOffset_L0      : 0           # QP offset for layer 0
    64 TemporalLayerQPOffset_L1      : 3           # QP offset for layer 1
    65 TemporalLayerQPOffset_L2      : 4           # QP offset for layer 2
    66 TemporalLayerQPOffset_L3      : 5           # QP offset for layer 3
    67 
    68 
    69 
    70 #=========== Interpolation Filter =============
    71 RoundingControlBipred         : 0
    72 
    73 
     55TemporalLayerQPOffset_L1      : 1           # QP offset for layer 1
     56TemporalLayerQPOffset_L2      : 2           # QP offset for layer 2
     57TemporalLayerQPOffset_L3      : 3           # QP offset for layer 3
     58TemporalLayerQPOffset_L4      : 4           # QP offset for layer 4
     59TemporalLayerQPOffset_L5      : 5           # QP offset for layer 5
     60TemporalLayerQPOffset_L6      : 6           # QP offset for layer 6
     61TemporalLayerQPOffset_L7      : 7           # QP offset for layer 7
    7462
    7563#=========== Motion Search =============
     
    8169
    8270#============= VSO =============
    83 VSOMode                        : 4           # VSO Mode Currently only (0: off or 4: Using RM)
    84 #VSOConfig                     : [cx0 E(s0.5)][cx1 B(cc0) I(s0.5)]                      #VSO Configuration (2-View) coding order 0 1
    85 VSOConfig                      : [cx0 B(cc1) I(s0.5)][cx1 E(s0 s2)][cx2 B(cc1) I(s1.5)] #VSO Configuration (3-View) coding order 1 0 2 oder 1 2 0
    86 AllowNegDist                   : 1
     71VSO                           : 1           # View Synthesis Optimization
     72VSOConfig                     : [cx0 B(cc1) I(s0.5)][cx1 B(oo0) B(oo2) I(s0.5 s1.5)][cx2 B(cc1) I(s1.5)]  #VSO Configuration (3-View) coding order 1 0 2 oder 1 2 0
     73#VSOConfig                    : [cx0 B(cc1) I(s0.5)][cx1 B(oo0) I(s0.5)]                                  #VSO Configuration (2-View) coding order 1 0
     74
    8775#======== Quantization =============
    8876QP                            : 32 34       # Quantization parameter(0-51), second QP for Depth
    8977MaxDeltaQP                    : 0           # CU-based multi-QP optimization
    9078DeltaQpRD                     : 0           # Slice-based multi-QP optimization
    91 RDOQ                          : 1           # RDOQ
    92 
    93 
     79RDOQ                          : 1  1        # RDOQ
    9480
    9581#=========== Entropy Coding ============
    9682SymbolMode                    : 1           # 0:LCEC, 1:CABAC
    97 
    98 
    9983
    10084#=========== Deblock Filter ============
     
    10286LoopFilterAlphaC0Offset       : 0           # Range: -26 ~ 26
    10387LoopFilterBetaOffset          : 0           # Range: -26 ~ 26
    104 
    105 
    10688
    10789#=========== Coding Tools =================
     
    127109                                            # If EntropySliceMode==1 it represents max. LCU per entropy slice.
    128110                                            # If EntropySliceMode==2 it represents max. bins per entropy slice.
    129 
    130 OmitUnusedBlocks              : 0           # Omit coding of blocks not used for rendering
    131 VSO                           : 1           # View Synthesis Optimization
    132111DMM                           : 1           # Depth model modes intra luma (0: OFF, 1: ON)
    133112MVI                           : 1           # Motion vector inheritance for depth map coding (0: OFF, 1: ON)
    134 
    135113
    136114#====== multiview mv/res prediction ======
     
    147125
    148126#====== InterViewSkip ==
    149 InterViewSkip             : 1
     127InterViewSkip             : 0
    150128InterViewSkipLambdaScale  : 8
     129
  • trunk/cfg/renderer.cfg

    r2 r5  
    11#======== Input and Output Files =======
    2 VideoInputFileBaseName  : C:\md\vids\original\MPEG_MVD_bookarrival_VN$_CTv_RS768X1024.yuv # input video file basename, '$' is replaced by ViewNumber
    3 DepthInputFileBaseName  : C:\md\vids\original\MPEG_MVD_bookarrival_VN$_CTd_RS768X1024.yuv # input depth file basename, '$' is replaced by ViewNumber
    4 SynthOutputFileBaseName : C:\md\temp\book_synth_$_RS768X1024.yuv                           # output video file basename, '$' is replaced by ViewNumber
     2VideoInputFileBaseName  : C:\md\vids\original\MPEG_MVD_bookarrival_VN$_CTv_RS768X1024.yuv # input video file basename, '$' is replaced by BaseViewCameraNumber
     3DepthInputFileBaseName  : C:\md\vids\original\MPEG_MVD_bookarrival_VN$_CTd_RS768X1024.yuv # input depth file basename, '$' is replaced by BaseViewCameraNumber
     4SynthOutputFileBaseName : C:\md\temp\book_synth_$_RS768X1024.yuv                           # output video file basename, '$' is replaced by SynthViewCameraNumber
    55ContOutputFileNumbering : 0                         # for SynthOutputFileBaseName only: 0 = Replace '$' with real view numbers, 1 = Replace '$' from Left View to Right View beginning with 0
     6
     7#======== Input and Output Files (alternatively )=======
     8#VideoInputFile_0        : C:\md\vids\original\MPEG_MVD_bookarrival_VN10_CTv_RS768X1024.yuv
     9#VideoInputFile_1        : C:\md\vids\original\MPEG_MVD_bookarrival_VN08_CTv_RS768X1024.yuv
     10#VideoInputFile_2        : C:\md\vids\original\MPEG_MVD_bookarrival_VN06_CTv_RS768X1024.yuv
     11
     12#DepthInputFile_0        : C:\md\vids\original\MPEG_MVD_bookarrival_VN10_CTd_RS768X1024.yuv
     13#DepthInputFile_1        : C:\md\vids\original\MPEG_MVD_bookarrival_VN08_CTd_RS768X1024.yuv
     14#DepthInputFile_2        : C:\md\vids\original\MPEG_MVD_bookarrival_VN06_CTd_RS768X1024.yuv
     15
     16#SynthOutputFile_0       : C:\md\temp\book_synth_0_RS768X1024.yuv 
     17#SynthOutputFile_1       : C:\md\temp\book_synth_1_RS768X1024.yuv 
     18#SynthOutputFile_2       : C:\md\temp\book_synth_2_RS768X1024.yuv 
     19# ...
     20
    621
    722#======== File Specification =======
     
    1227
    1328#======== Camera Specification =======
    14 BaseViewCameraNumbers   : 10 8                      # numbers of base views, (From left to right)
    15 SynthViewCameraNumbers  : 0 : 0.25 : 2              # numbers or range of synthesized views
     29BaseViewCameraNumbers   : 10 8 6                    # numbers of base views, (From left to right)
     30SynthViewCameraNumbers  : 0 : 0.25 : 2              # numbers or range of synthesized views (original views are copied)
    1631CameraParameterFile     : c:\md\codecs\MVDC005_64\cfg\cam_para.cfg              # name of camera parameter file
    1732
     
    2035RendererMode            : 0                         # 0: use Renderer, 1: use Model, 10: generate used pels map
    2136
    22 #======== Sampling ========
    23 UVup                    : 1                         # upsampling of chroma planes before processing
    24 Log2SamplingFactor      : 0                         # factor for horizontal upsampling before processing (Only supported for Interpolation mode 1)
    25 
    2637#======== Pre/ PostProcesssing ========
    27 PreProcMode             : 0                         # depth pre-processing: 0 = none, 1 = binominal filtering
    28 PreFilterSize           : 0                         # for PreProcMode = 1:  half size of filter kernel
    29 TemporalDepthFilter     : 1                         # 0: off, 1: temporal depth filter of non-moving blocks ( tool from VSRS Software)
    30 PostProcMode            : 0                         # 0: none, 1: horizontal 3-tap median
     38TemporalDepthFilter     : 0                         # 0: off, 1: temporal depth filter of non-moving blocks ( tool from VSRS Software)
     39SimEnhance              : 1                         # 0: off, 1: on, Similarity enhancement
    3140
    3241#======== Interpolation ========
    33 InterpolationMode       : 4                         # 0: NN, 1:linear (int), 2:linear (double) , 3:cspline (double), 4: 8-tap/4-tap HEVC (int)
    34 ShiftPrecision          : 2                         # precision of Shifts 0: full pel, 1: half pel, 2: quater pel( should be 0 for interpolation modes 0, 2 and 3)
     42ShiftPrecision          : 2                         # precision of Shifts 0: full pel, 1: half pel, 2: quater pel
    3543
    3644#======== Hole Filling ========
     
    4149BlendZThresPerc         : 30                        # Z-difference threshold for blending in percent of total Z-range
    4250BlendUseDistWeight      : 1                         # 0: blending using average; 1: weight blending depending on view distance
    43 BlendHoleMargin         : 4                         # Margin next holes to fill with other view in interpolation or to cut in extrapolation ( should be 2 for extrapolation)
     51BlendHoleMargin         : 6                         # Margin next holes to blend with other view in interpolation or to cut in extrapolation ( should be 2 for extrapolation)
    4452
    45 #======== Used Pel Map Generation ========
    46 UsedPelMapMarExt        : 0                         # Dilation width of used pel map
     53#======== Others ===========
     54Sweep                   : 0                         # Output all views to one file
  • trunk/source/App/TAppCommon/TAppComCamPara.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/App/TAppCommon/TAppComCamPara.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/App/TAppCommon/program_options_lite.cpp

    r2 r5  
     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-2011, 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 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
    134
    235#include <stdlib.h>
  • trunk/source/App/TAppCommon/program_options_lite.h

    r2 r5  
     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-2011, 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 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
    134
    235#include <iostream>
  • trunk/source/App/TAppDecoder/TAppDecCfg.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/App/TAppDecoder/TAppDecCfg.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/App/TAppDecoder/TAppDecTop.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    4881    m_apcBitstream = NULL;
    4982  }
    50 #if SB_MEM_FIX
    5183  if( m_pchBitstreamFile )
    5284  {
     
    5789    free(m_pchReconFile);
    5890  }
    59 #endif
    6091}
    6192
  • trunk/source/App/TAppDecoder/TAppDecTop.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    3669  std::vector<TVideoIOYuv*>       m_acTVideoIOYuvReconFileList;
    3770  std::vector<TVideoIOYuv*>       m_acTVideoIOYuvDepthReconFileList;
    38  
     71
    3972  Bool m_bUsingDepth;
    4073
    4174  // for output control
    42   //SB can be deleted?
    4375  Bool                            m_abDecFlag[ MAX_GOP ];         ///< decoded flag in one GOP
    4476//  Int                             m_iPOCLastDisplay;              ///< last POC in display order
     
    5082  FILE*                           m_pScaleOffsetFile;
    5183  CamParsCollector                m_cCamParsCollector;
     84#if DEPTH_MAP_GENERATION
    5285  TComSPSAccess                   m_cSPSAccess;
    5386  TComAUPicAccess                 m_cAUPicAccess;
    54  
     87#endif
     88
    5589public:
    5690  TAppDecTop();
    5791  virtual ~TAppDecTop() {}
    58  
     92
    5993  Void  create            (); ///< create internal members
    6094  Void  destroy           (); ///< destroy internal members
     
    68102// GT FIX END
    69103
     104#if DEPTH_MAP_GENERATION
    70105  TComSPSAccess*    getSPSAccess  () { return &m_cSPSAccess;   }
    71106  TComAUPicAccess*  getAUPicAccess() { return &m_cAUPicAccess; }
    72  
     107#endif
     108
    73109protected:
    74110  Void  xCreateDecLib     (); ///< create internal classes
    75111  Void  xDestroyDecLib    (); ///< destroy internal classes
    76112  Void  xInitDecLib       (); ///< initialize decoder class
    77  
     113
    78114  Void  xWriteOutput      ( TComList<TComPic*>* pcListPic ); ///< write YUV to file
    79115};
  • trunk/source/App/TAppDecoder/decmain.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/App/TAppEncoder/TAppEncCfg.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    3972{
    4073  m_aidQP = NULL;
    41 //GT VSO
     74#if HHI_VSO
    4275  m_aaiERViewRefLutInd.resize( MAX_INPUT_VIEW_NUM );
    43 //GT VSO end
     76#endif
    4477}
    4578
     
    89122    free (m_pchBaseViewCameraNumbers);
    90123
     124#if HHI_VSO
    91125  if (  m_pchVSOConfig != NULL)
    92126    free (  m_pchVSOConfig );
     127#endif
    93128
    94129}
     
    172207
    173208  /* Coding structure paramters */
    174   ("CodecPictureStoreSize,cpss",  m_uiCodedPictureStoreSize, 16u, "Size of coded picture Buffer")
     209  ("CodedPictureStoreSize,cpss",  m_uiCodedPictureStoreSize, 16u, "Size of coded picture Buffer")
    175210#if DCM_DECODING_REFRESH
    176211  ("DecodingRefreshType,-dr",m_iDecodingRefreshType, 0, "intra refresh, (0:none 1:CDR 2:IDR)")
     
    178213  ("GOPSize,g",      m_iGOPSize,      1, "GOP size of temporal structure")
    179214  ("RateGOPSize,-rg",m_iRateGOPSize, -1, "GOP size of hierarchical QP assignment (-1: implies inherit GOPSize value)")
    180 #if !SB_NO_LowDelayCoding
     215#if !HHI_NO_LowDelayCoding
    181216  ("LowDelayCoding",         m_bUseLDC,             false, "low-delay mode")
    182217#endif
     
    221256  ("LoopFilterBetaOffset", m_iLoopFilterBetaOffset, 0 )
    222257
    223 //GT campara
     258  /* Camera Paremetes */
    224259  ("CameraParameterFile,cpf", m_pchCameraParameterFile,    (Char *) 0, "Camera Parameter File Name")
    225260  ("BaseViewCameraNumbers" ,  m_pchBaseViewCameraNumbers,  (Char *) 0, "Numbers of base views")
    226 //GT campara end
     261
    227262
    228263    /* View Synthesis Optimization */
    229 //GT VSO
     264
     265#if HHI_VSO
    230266  ("VSOConfig",                       m_pchVSOConfig            , (Char *) 0    , "VSO configuration")
    231267    ("VSO",                             m_bUseVSO                 , false         , "Use VSO" )
    232268    // GT: For development, will be removed later
    233269  ("VSOMode",                         m_uiVSOMode               , (UInt)   4    , "VSO Mode")
    234   ("LambdaScaleVSO",                  m_dLambdaScaleVSO         , (Double) 0.6  , "Lambda Scaling for VSO")
     270  ("LambdaScaleVSO",                  m_dLambdaScaleVSO         , (Double) 0.5  , "Lambda Scaling for VSO")
    235271    ("ForceLambdaScaleVSO",             m_bForceLambdaScaleVSO    , false         , "Force using Lambda Scale VSO also in non-VSO-Mode")
    236 #if RDO_DIST_INT
     272#if HHI_VSO_DIST_INT
    237273  ("AllowNegDist",                    m_bAllowNegDist           , true         , "Allow negative Distortion in VSO")
    238274#endif
     
    242278    ("VSERViewReferences_%d,evr_%d"  ,  m_aaiERViewRefInd         , vector<Int>() , MAX_INPUT_VIEW_NUM, "Numbers of external virtual reference views to be used for this view")
    243279    ("VSBaseViewReferences_%d,bvr_%d",  m_aaiBaseViewRefInd       , vector<Int>() , MAX_INPUT_VIEW_NUM, "Numbers of external virtual reference views to be used for this view")
    244 //GT VSO end
     280#endif
    245281
    246282  /* Coding tools */
     
    281317  ("FEN", m_bUseFastEnc, false, "fast encoder setting")
    282318
    283 #if HHI_DMM_INTRA
    284   ("DMM", m_bUseDepthModelModes, false, "add depth modes intra")
    285 #endif
     319#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     320  ("DMM", m_bUseDMM, false, "add depth modes intra")
     321#endif
     322#if HHI_MPI
    286323  ("MVI", m_bUseMVI, false, "use motion vector inheritance for depth map coding")
     324#endif
    287325
    288326  /* Multiview tools */
     327#if DEPTH_MAP_GENERATION
    289328  ("PredDepthMapGen",  m_uiPredDepthMapGeneration, (UInt)0, "generation of prediction depth maps for motion data prediction" )
     329#endif
     330#if HHI_INTER_VIEW_MOTION_PRED
    290331  ("MultiviewMvPred",  m_uiMultiviewMvPredMode,    (UInt)0, "usage of predicted depth maps" )
    291332  ("MultiviewMvRegMode",        m_uiMultiviewMvRegMode,         (UInt)0, "regularization mode for multiview motion vectors" )
    292333  ("MultiviewMvRegLambdaScale", m_dMultiviewMvRegLambdaScale, (Double)0, "lambda scale for multiview motion vector regularization" )
     334#endif
     335#if HHI_INTER_VIEW_RESIDUAL_PRED
    293336  ("MultiviewResPred", m_uiMultiviewResPredMode,   (UInt)0, "usage of inter-view residual prediction" )
    294 
    295   ("OmitUnusedBlocks", m_bOmitUnusedBlocks, false, "omit blocks not used for rendering")
     337#endif
    296338
    297339  ("QpChangeFrame", m_iQpChangeFrame, PicOrderCnt(0), "start frame for QP change")
    298340  ("QpChangeOffsetVideo", m_iQpChangeOffsetVideo, 0, "QP change offset for video")
    299341  ("QpChangeOffsetDepth", m_iQpChangeOffsetDepth, 0, "QP change offset for depth")
    300 #if SB_INTERVIEW_SKIP
     342#if HHI_INTERVIEW_SKIP
    301343  ("InterViewSkip",  m_uiInterViewSkip,    (UInt)0, "usage of interview skip" )
    302 #if SB_INTERVIEW_SKIP_LAMBDA_SCALE
     344#if HHI_INTERVIEW_SKIP_LAMBDA_SCALE
    303345  ("InterViewSkipLambdaScale",  m_dInterViewSkipLambdaScale,    (Double)8, "lambda scale for interview skip" )
    304346#endif
     
    387429//GT QP Depth end
    388430
    389 //GT VSO
     431#if HHI_VSO
    390432  m_bUseVSO = m_bUseVSO && m_bUsingDepthMaps && (m_uiVSOMode != 0);
    391 //GT VSO end
     433#endif
    392434
    393435  xCleanUpVectors();
    394436
     437#if HHI_VSO
    395438  if ( m_abUseALF .size() < 2)
    396439    m_abUseALF .push_back( m_bUseVSO ? false : m_abUseALF[0]  );
    397440
    398441  if ( m_abUseRDOQ.size() < 2)
    399     m_abUseRDOQ.push_back( m_bUseVSO ? false : m_abUseRDOQ[0] );
     442    m_abUseRDOQ.push_back( m_bUseVSO ? true : m_abUseRDOQ[0] );
    400443
    401444  if ( m_abLoopFilterDisable.size() < 2)
     
    404447  if (m_abUseSAO.size() < 2)
    405448    m_abUseSAO.push_back            ( m_bUseVSO ? false : m_abUseSAO[0] );
    406 
    407 //GT VSO
     449#else
     450  if ( m_abUseALF .size() < 2)
     451    m_abUseALF .push_back( m_abUseALF[0]  );
     452
     453  if ( m_abUseRDOQ.size() < 2)
     454    m_abUseRDOQ.push_back( m_abUseRDOQ[0] );
     455
     456  if ( m_abLoopFilterDisable.size() < 2)
     457    m_abLoopFilterDisable.push_back( m_abLoopFilterDisable[0]  );
     458
     459  if (m_abUseSAO.size() < 2)
     460    m_abUseSAO.push_back            ( m_abUseSAO[0] );
     461#endif
     462
     463#if HHI_VSO
    408464  if ( m_bUseVSO )
    409465  {
     
    423479    }
    424480  }
    425 //GT VSO end
     481#endif
    426482
    427483  // set global variables
     
    429485
    430486  // read and check camera parameters
     487#if HHI_VSO
    431488if ( m_bUseVSO && m_uiVSOMode == 4)
    432489{
     
    468525    NULL,
    469526    LOG2_DISP_PREC_LUT );
    470 
    471 }
     527}
     528#else
     529  m_cCameraData     .init     ( (UInt)m_iNumberOfViews,
     530    m_uiInputBitDepth,
     531    (UInt)m_iCodedCamParPrecision,
     532    m_FrameSkip,
     533    (UInt)m_iFrameToBeEncoded,
     534    m_pchCameraParameterFile,
     535    m_pchBaseViewCameraNumbers,
     536    NULL,
     537    NULL,
     538    LOG2_DISP_PREC_LUT );
     539#endif
     540
     541
    472542  // check validity of input parameters
    473543  xCheckParameter();
     
    558628
    559629  xConfirmPara    ( m_iCodedCamParPrecision < 0 || m_iCodedCamParPrecision > 5,       "CodedCamParsPrecision must be in range of 0..5" );
     630#if DEPTH_MAP_GENERATION
    560631  xConfirmPara    ( m_uiPredDepthMapGeneration > 3,                                   "PredDepthMapGen must be less than or equal to 3" );
    561632  xConfirmPara    ( m_uiPredDepthMapGeneration >= 2 && !m_bUsingDepthMaps,            "PredDepthMapGen >= 2 requires CodeDepthMaps = 1" );
     633#endif
     634#if HHI_INTER_VIEW_MOTION_PRED
    562635  xConfirmPara    ( m_uiMultiviewMvPredMode > 7,                                      "MultiviewMvPred must be less than or equal to 7" );
    563636  xConfirmPara    ( m_uiMultiviewMvPredMode > 0 && m_uiPredDepthMapGeneration == 0 ,  "MultiviewMvPred > 0 requires PredDepthMapGen > 0" );
     
    568641    xConfirmPara  ( Int( m_pchDepthInputFileList.size() ) < m_iNumberOfViews,         "MultiviewMvRegMode > 0 requires the presence of input depth maps" );
    569642  }
     643#endif
     644#if HHI_INTER_VIEW_RESIDUAL_PRED
    570645  xConfirmPara    ( m_uiMultiviewResPredMode > 1,                                     "MultiviewResPred must be less than or equal to 1" );
    571646  xConfirmPara    ( m_uiMultiviewResPredMode > 0 && m_uiPredDepthMapGeneration == 0 , "MultiviewResPred > 0 requires PredDepthMapGen > 0" );
    572 
    573 #if SB_INTERVIEW_SKIP
     647#endif
     648
     649#if HHI_INTERVIEW_SKIP
    574650  xConfirmPara    ( m_uiInterViewSkip > 1,                                        "RenderingSkipMode > 1 not supported" );
    575651  xConfirmPara    ( m_uiInterViewSkip > 0 && !m_bUsingDepthMaps,                  "RenderingSkipMode > 0 requires CodeDepthMaps = 1" );
    576   xConfirmPara    ( m_uiInterViewSkip > 0 && !m_bOmitUnusedBlocks,                "RenderingSkipMode > 0 requires OmitUnusedBlocks = 1" );
    577652#endif
    578653  if( m_bUsingDepthMaps )
     
    581656    xConfirmPara  ( Int( m_pchDepthReconFileList.size() ) < m_iNumberOfViews,         "Number of DepthReconFiles must be greater than or equal to NumberOfViews" );
    582657
    583 //GT VSO
     658#if HHI_VSO
    584659    if( m_bUseVSO )
    585660    {
     
    592667      xConfirmPara( Int( m_pchERRefFileList .size() ) < m_iNumberOfExternalRefs,     "Number of ERRefFileFiles  must be greater than or equal to NumberOfExternalRefs" );
    593668    }
    594 //GT VSO end
     669#endif
    595670  }
    596671
    597672#if DCM_COMB_LIST
    598 #if !SB_NO_LowDelayCoding
     673#if !HHI_NO_LowDelayCoding
    599674  xConfirmPara( m_bUseLComb==false && m_bUseLDC==false,         "LComb can only be 0 if LowDelayCoding is 1" );
    600675#else
     
    659734  xCleanUpVector( m_pchDepthReconFileList,  (char*)0 );
    660735
    661 //GT VSO
     736#if HHI_VSO
    662737  if ( m_bUseVSO)
    663738  {
    664739    xCleanUpVector( m_pchERRefFileList,       (char*)0 );
    665740  }
    666 //GT VSO end
     741#endif
    667742}
    668743
     
    784859  printf("Coded Camera Param. Precision: %d\n", m_iCodedCamParPrecision);
    785860
    786 //GT VSO
     861#if HHI_VSO
    787862  printf("Force use of Lambda Scale    : %d\n", m_bForceLambdaScaleVSO );
    788863
     
    792867    printf("VSO Mode                     : %d\n",    m_uiVSOMode       );
    793868    printf("VSO Config                   : %s\n",    m_pchVSOConfig    );
    794 #if RDO_DIST_INT
     869#if HHI_VSO_DIST_INT
    795870    printf("VSO Negative Distortion      : %d\n",    m_bAllowNegDist ? 1 : 0);
    796871#endif
    797872  }
    798 //GT VSO end
    799 
    800   printf("Omit unused blocks           : %d\n",    (m_bOmitUnusedBlocks )?(1):(0));
     873#endif
     874
    801875
    802876  printf("\n");
     
    849923  printf("SAO:%d ", (m_abUseSAO [1] ? 1 : 0));
    850924  printf("RDQ:%d ", (m_abUseRDOQ[1] ? 1 : 0));
     925#if HHI_VSO
    851926  printf("VSO:%d ", m_bUseVSO             );
    852 #if HHI_DMM_INTRA
    853   printf("DMM:%d ", m_bUseDepthModelModes );
    854 #endif
     927#endif
     928#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     929  printf("DMM:%d ", m_bUseDMM );
     930#endif
     931#if HHI_MPI
    855932  printf("MVI:%d ", m_bUseMVI ? 1 : 0 );
     933#endif
    856934  printf("\n");
    857935
  • trunk/source/App/TAppEncoder/TAppEncCfg.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    3568
    3669  std::vector<char*>     m_pchERRefFileList;                  ///< virtual external reference view files names
    37  
     70
    3871  // source specification
    3972  Int       m_iFrameRate;                                     ///< source frame-rates (Hz)
     
    4477  Bool      m_bUsePAD;                                        ///< flag for using source padding
    4578  Int       m_aiPad[2];                                       ///< number of padded pixels for width and height
    46  
     79
    4780  Int       m_iNumberOfViews;                                ///< number Views to Encode
    4881  Bool      m_bUsingDepthMaps ;
     
    5689  Int       m_iGOPSize;                                       ///< GOP size of hierarchical structure
    5790  Int       m_iRateGOPSize;                                   ///< GOP size for QP variance
    58 #if !SB_NO_LowDelayCoding
     91#if !HHI_NO_LowDelayCoding
    5992  Bool      m_bUseLDC;                                        ///< flag for using low-delay coding mode
    6093#endif
     
    6396  Bool      m_bLCMod;                                         ///< flag for specifying whether the combined reference list for uni-prediction in B-slices is uploaded explicitly
    6497#endif
    65   // SB
    6698  std::string     m_cInputFormatString ;                            // GOP string
    6799  // coding quality
    68 //GT QP Depth
     100
    69101  std::vector<Double>  m_adQP;                                ///< QP value of key-picture (floating point) [0] video, [1] depth
    70102  std::vector<Int>     m_aiQP;                                ///< QP value of key-picture (integer)
    71 //GT QP Depth end
     103
    72104  Int       m_aiTLayerQPOffset[MAX_TLAYER];                   ///< QP offset corresponding to temporal layer depth
    73105  char*     m_pchdQPFile;                                     ///< QP offset for each slice (initialized from external file)
     
    75107  Int       m_iMaxDeltaQP;                                    ///< max. |delta QP|
    76108  UInt      m_uiDeltaQpRD;                                    ///< dQP range for multi-pass slice QP optimization
    77  
     109
    78110  // coding unit (CU) definition
    79111  UInt      m_uiMaxCUWidth;                                   ///< max. CU width in pixel
    80112  UInt      m_uiMaxCUHeight;                                  ///< max. CU height in pixel
    81113  UInt      m_uiMaxCUDepth;                                   ///< max. CU depth
    82  
     114
    83115  // transfom unit (TU) definition
    84116  UInt      m_uiQuadtreeTULog2MaxSize;
    85117  UInt      m_uiQuadtreeTULog2MinSize;
    86  
     118
    87119  UInt      m_uiQuadtreeTUMaxDepthInter;
    88120  UInt      m_uiQuadtreeTUMaxDepthIntra;
    89  
     121
    90122  // coding tools (bit-depth)
    91123  UInt      m_uiInputBitDepth;                                ///< bit-depth of input file
     
    95127#endif
    96128  UInt      m_uiInternalBitDepth;                             ///< Internal bit-depth (BitDepth+BitIncrement)
    97  
     129
    98130#if MTK_SAO
    99   vector<Bool> m_abUseSAO; 
     131  vector<Bool> m_abUseSAO;
    100132#endif
    101133
     
    105137  Int       m_iALFEncodePassReduction;                        ///< ALF encoding pass, 0 = original 16-pass, 1 = 1-pass, 2 = 2-pass
    106138#endif
    107  
     139
    108140  vector<Bool> m_abLoopFilterDisable;                         ///< flag for using deblocking filter filter [0] - video, [1] - depth
    109141  Int       m_iLoopFilterAlphaC0Offset;                       ///< alpha offset for deblocking filter
    110142  Int       m_iLoopFilterBetaOffset;                          ///< beta offset for deblocking filter
    111  
     143
    112144  // coding tools (entropy coder)
    113145  Int       m_iSymbolMode;                                    ///< entropy coder mode, 0 = VLC, 1 = CABAC
    114  
     146
    115147  // coding tools (inter - merge motion partitions)
    116148  Bool      m_bUseMRG;                                        ///< SOPH: flag for using motion partition Merge Mode
    117  
    118 #if LM_CHROMA 
     149
     150#if LM_CHROMA
    119151  Bool      m_bUseLMChroma;                                  ///< JL: Chroma intra prediction based on luma signal
    120152#endif
     
    123155  Bool      m_bUseRMP;
    124156#endif
    125  
     157
    126158  // coding tools (encoder-only parameters)
    127159  Bool      m_bUseSBACRD;                                     ///< flag for using RD optimization based on SBAC
     
    134166  Bool      m_bUseFastEnc;                                    ///< flag for using fast encoder setting
    135167
     168#if DEPTH_MAP_GENERATION
    136169  UInt      m_uiPredDepthMapGeneration;                       ///< using of (virtual) depth maps for texture coding
     170#endif
     171#if HHI_INTER_VIEW_MOTION_PRED
    137172  UInt      m_uiMultiviewMvPredMode;                          ///< usage of predictors for multi-view mv prediction
    138173  UInt      m_uiMultiviewMvRegMode;                           ///< regularization for multiview motion vectors
    139174  Double    m_dMultiviewMvRegLambdaScale;                     ///< lambda scale for multiview motion vectors regularization
     175#endif
     176#if HHI_INTER_VIEW_RESIDUAL_PRED
    140177  UInt      m_uiMultiviewResPredMode;                         ///< using multiview residual prediction
    141 
    142 #if SB_INTERVIEW_SKIP
     178#endif
     179
     180#if HHI_INTERVIEW_SKIP
    143181  UInt      m_uiInterViewSkip;                            ///< usage of interview skip mode ( do not transmit residual)
    144 #if SB_INTERVIEW_SKIP_LAMBDA_SCALE
     182#if HHI_INTERVIEW_SKIP_LAMBDA_SCALE
    145183  Double    m_dInterViewSkipLambdaScale;                 ///< lambda scale for interview skip
    146184#endif
    147185#endif
    148 //GT campara
     186
    149187  // camera parameter
    150188  Char*     m_pchCameraParameterFile;                         ///< camera parameter file
    151189  Char*     m_pchBaseViewCameraNumbers;
    152   TAppComCamPara m_cCameraData;           
    153 //GT campara end
     190  TAppComCamPara m_cCameraData;
     191
    154192  Int       m_iCodedCamParPrecision;                          ///< precision for coding of camera parameters
    155193
     194#if HHI_INTERVIEW_SKIP
    156195  TRenTop  m_cUsedPelsRenderer;                               ///< renderer for used pels map
    157 
    158 //GT VSO
    159   Char*     m_pchVSOConfig; 
    160   Bool      m_bUseVSO;                                    ///< flag for using View Synthesis Optimization 
    161 
    162   //// Used for development by GT, might be removed later 
     196#endif
     197
     198#if HHI_VSO
     199  Char*     m_pchVSOConfig;
     200  Bool      m_bUseVSO;                                    ///< flag for using View Synthesis Optimization
     201
     202  //// Used for development by GT, might be removed later
    163203  Double    m_dLambdaScaleVSO;                            ///< Scaling factor for Lambda in VSO mode
    164204  Bool      m_bForceLambdaScaleVSO;                       ///< Use Lambda Scale for depth even if VSO is turned off
    165 #if RDO_DIST_INT
    166   Bool      m_bAllowNegDist;                              ///< Allow negative distortion in VSO 
    167 #endif 
    168   UInt      m_uiVSOMode;                                  ///< Number of VSO Mode, 1 = , 2 = simple, org vs. ren, 3 = simple, ren vs. ren, 4 = full 
     205#if HHI_VSO_DIST_INT
     206  Bool      m_bAllowNegDist;                              ///< Allow negative distortion in VSO
     207#endif
     208  UInt      m_uiVSOMode;                                  ///< Number of VSO Mode, 1 = , 2 = simple, org vs. ren, 3 = simple, ren vs. ren, 4 = full
    169209  Int       m_iNumberOfExternalRefs;                      ///< number Virtual External Reference Views
    170210  std::vector< std::vector<Int> > m_aaiBaseViewRefInd;    ///< View numbers of Base View References
    171211  std::vector< std::vector<Int> > m_aaiERViewRefInd;      ///< View numbers of External ViewReferences
    172212  std::vector< std::vector<Int> > m_aaiERViewRefLutInd;   ///< Indices of LUTs used for External View References
    173 
    174 //GT VSO end
    175  
     213#endif
     214
    176215  Int       m_iSliceMode;           ///< 0: Disable all Recon slice limits, 1 : Maximum number of largest coding units per slice, 2: Maximum number of bytes in a slice
    177216  Int       m_iSliceArgument;       ///< If m_iSliceMode==1, m_iSliceArgument=max. # of largest coding units. If m_iSliceMode==2, m_iSliceArgument=max. # of bytes.
     
    188227  Bool      m_bUseConstrainedIntraPred;                       ///< flag for using constrained intra prediction
    189228#endif
    190 #if HHI_DMM_INTRA
    191   Bool      m_bUseDepthModelModes;
    192 #endif
     229#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     230  Bool      m_bUseDMM;
     231#endif
     232#if HHI_MPI
    193233  Bool      m_bUseMVI;  ///< flag for using Motion Vector Inheritance for depth map coding
    194   Bool      m_bOmitUnusedBlocks;  ///< flag for not coding blocks not used for rendering
     234#endif
    195235
    196236  PicOrderCnt m_iQpChangeFrame;
     
    211251  Void  xPrintParameter ();                                   ///< print configuration values
    212252  Void  xPrintUsage     ();                                   ///< print usage
    213  
     253
    214254  Void  xCleanUpVectors ();                                   ///< clean up vector sizes
    215255  Void  xInitCameraPars ();                                   ///< init camera parameters
     
    221261
    222262  // util
    223   Void  xAppendToFileNameEnd( Char* pchInputFileName, const Char* pchStringToAppend, Char* & rpchOutputFileName); 
     263  Void  xAppendToFileNameEnd( Char* pchInputFileName, const Char* pchStringToAppend, Char* & rpchOutputFileName);
    224264  Bool  xConfirmParameter(Bool bflag, const char* message);
    225265
     
    227267  template <class T> Void xCleanUpVector( std::vector<T>& rcVec, const T& rcInvalid );
    228268
     269#if HHI_VSO
    229270  // Ren Model String
    230   TRenModSetupStrParser       m_cRenModStrParser;
     271  TRenModSetupStrParser       m_cRenModStrParser;
     272#endif
    231273public:
    232274
    233275  TAppEncCfg();
    234276  virtual ~TAppEncCfg();
    235  
     277
    236278public:
    237279  Void  create    ();                                         ///< create option handling class
    238280  Void  destroy   ();                                         ///< destroy option handling class
    239281  Bool  parseCfg  ( Int argc, Char* argv[] );                 ///< parse configuration file to fill member variables
    240  
     282
    241283};// END CLASS DEFINITION TAppEncCfg
    242284
  • trunk/source/App/TAppEncoder/TAppEncTop.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    1851TAppEncTop::TAppEncTop()
    1952{
    20 //GT VSO
     53#if HHI_VSO
    2154  m_iLastFramePutInERViewBuffer = -1;
    22 //GT VSO end
     55#endif
    2356}
    2457
     
    5588    m_acTEncTopList[iViewIdx]->setRateGOPSize                  ( m_iRateGOPSize );
    5689
    57 //  // SB
    5890    m_acTEncTopList[iViewIdx]->setSeqStructure                              ( m_cInputFormatString );
    5991
     
    79111    m_acTEncTopList[iViewIdx]->setMaxDeltaQP                   ( m_iMaxDeltaQP  );
    80112
     113#if HHI_VSO
    81114    //====== VSO =========
    82 //GT VSO
    83115    m_acTEncTopList[iViewIdx]->setForceLambdaScaleVSO          ( false );
    84116    m_acTEncTopList[iViewIdx]->setLambdaScaleVSO               ( 1     );
    85117    m_acTEncTopList[iViewIdx]->setVSOMode                      ( 0     );
    86 //GT VSO end
     118#endif
    87119
    88120    //====== Tool list ========
     
    109141    m_acTEncTopList[iViewIdx]->setUseFastEnc                   ( m_bUseFastEnc  );
    110142
    111 //GT VSO
     143#if HHI_VSO
    112144    m_acTEncTopList[iViewIdx]->setUseVSO                       ( false ); //GT: might be enabled later for VSO Mode 4
    113 //GT VSO end
     145#endif
    114146
    115147    m_acTEncTopList[iViewIdx]->setViewId                       ( (UInt)iViewIdx );
     
    120152    m_acTEncTopList[iViewIdx]->setCodedScale                   ( m_cCameraData.getCodedScale             () );
    121153    m_acTEncTopList[iViewIdx]->setCodedOffset                  ( m_cCameraData.getCodedOffset            () );
     154#if DEPTH_MAP_GENERATION
    122155    m_acTEncTopList[iViewIdx]->setPredDepthMapGeneration       ( m_uiPredDepthMapGeneration );
     156    m_acTEncTopList[iViewIdx]->setPdmPrecision                 ( (UInt)m_cCameraData.getPdmPrecision     () );
     157    m_acTEncTopList[iViewIdx]->setPdmScaleNomDelta             (       m_cCameraData.getPdmScaleNomDelta () );
     158    m_acTEncTopList[iViewIdx]->setPdmOffset                    (       m_cCameraData.getPdmOffset        () );
     159#endif
     160#if HHI_INTER_VIEW_MOTION_PRED
    123161    m_acTEncTopList[iViewIdx]->setMultiviewMvPredMode          ( m_uiMultiviewMvPredMode );
    124162    m_acTEncTopList[iViewIdx]->setMultiviewMvRegMode           ( iViewIdx ? m_uiMultiviewMvRegMode       : 0   );
    125163    m_acTEncTopList[iViewIdx]->setMultiviewMvRegLambdaScale    ( iViewIdx ? m_dMultiviewMvRegLambdaScale : 0.0 );
    126     m_acTEncTopList[iViewIdx]->setPdmPrecision                 ( (UInt)m_cCameraData.getPdmPrecision     () );
    127     m_acTEncTopList[iViewIdx]->setPdmScaleNomDelta             (       m_cCameraData.getPdmScaleNomDelta () );
    128     m_acTEncTopList[iViewIdx]->setPdmOffset                    (       m_cCameraData.getPdmOffset        () );
     164#endif
     165#if HHI_INTER_VIEW_RESIDUAL_PRED
    129166    m_acTEncTopList[iViewIdx]->setMultiviewResPredMode         ( m_uiMultiviewResPredMode );
    130 
    131 #if SB_INTERVIEW_SKIP
     167#endif
     168
     169
     170#if HHI_INTERVIEW_SKIP
    132171    m_acTEncTopList[iViewIdx]->setInterViewSkip            ( iViewIdx ? m_uiInterViewSkip : 0 );
    133 #if SB_INTERVIEW_SKIP_LAMBDA_SCALE
    134     m_acTEncTopList[iViewIdx]->setInterViewSkipLambdaScale ( iViewIdx ? m_dInterViewSkipLambdaScale : 1 );
     172#if HHI_INTERVIEW_SKIP_LAMBDA_SCALE
     173    m_acTEncTopList[iViewIdx]->setInterViewSkipLambdaScale ( iViewIdx ? (Int)m_dInterViewSkipLambdaScale : 1 );
    135174#endif
    136175#endif
     
    147186    m_acTEncTopList[iViewIdx]->setUseRoundingControlBipred(m_useRoundingControlBipred);
    148187#endif
    149 #if HHI_DMM_INTRA
    150     m_acTEncTopList[iViewIdx]->setUseDepthModelModes( false );
     188#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     189    m_acTEncTopList[iViewIdx]->setUseDMM( false );
    151190#endif
    152191#if CONSTRAINED_INTRA_PRED
     
    175214    m_acTEncTopList[iViewIdx]->setUseSAO               ( m_abUseSAO[0]     );
    176215#endif
     216#if HHI_MPI
    177217    m_acTEncTopList[iViewIdx]->setUseMVI( false );
     218#endif
    178219
    179220    m_acTEncTopList[iViewIdx]->setPictureDigestEnabled(m_pictureDigestEnabled);
    180     m_acTEncTopList[iViewIdx]->setOmitUnusedBlocks          ( m_bOmitUnusedBlocks && (iViewIdx != 0) );
    181 
    182221    m_acTEncTopList[iViewIdx]->setQpChangeFrame( m_iQpChangeFrame );
    183222    m_acTEncTopList[iViewIdx]->setQpChangeOffsetVideo( m_iQpChangeOffsetVideo );
     
    187226  {
    188227
    189 //GT VSO
     228#if HHI_VSO
    190229    for (Int iViewIdx=0; iViewIdx<m_iNumberOfExternalRefs; iViewIdx++)
    191230    {
    192231        m_acTVideoIOYuvERFileList.push_back(new TVideoIOYuv);
    193232    }
    194 //GT VSO end
     233#endif
    195234
    196235    for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++)
     
    219258      m_acTEncDepthTopList[iViewIdx]->setRateGOPSize                  ( m_iRateGOPSize );
    220259
    221 //  // SB
    222260      m_acTEncDepthTopList[iViewIdx]->setSeqStructure                              ( m_cInputFormatString );
    223261
     
    266304      m_acTEncDepthTopList[iViewIdx]->setUseFastEnc                   ( m_bUseFastEnc  );
    267305
    268 //GT VSO
     306#if HHI_VSO
    269307      m_acTEncDepthTopList[iViewIdx]->setUseVSO                       ( m_bUseVSO      ); //GT: might be enabled/disabled later for VSO Mode 4
    270308      m_acTEncDepthTopList[iViewIdx]->setForceLambdaScaleVSO          ( m_bForceLambdaScaleVSO );
    271309      m_acTEncDepthTopList[iViewIdx]->setLambdaScaleVSO               ( m_dLambdaScaleVSO );
    272 #if RDO_DIST_INT
     310#if HHI_VSO_DIST_INT
    273311      m_acTEncDepthTopList[iViewIdx]->setAllowNegDist                 ( m_bAllowNegDist );
    274312#endif
    275313      m_acTEncDepthTopList[iViewIdx]->setVSOMode                      ( m_uiVSOMode );
    276 //GT VSO end
     314#endif
    277315
    278316      m_acTEncDepthTopList[iViewIdx]->setViewId                       ( (UInt)iViewIdx );
     
    283321      m_acTEncDepthTopList[iViewIdx]->setCodedScale                   ( 0 );
    284322      m_acTEncDepthTopList[iViewIdx]->setCodedOffset                  ( 0 );
     323#if DEPTH_MAP_GENERATION
    285324      m_acTEncDepthTopList[iViewIdx]->setPredDepthMapGeneration       ( 0 );
     325#endif
     326#if HHI_INTER_VIEW_MOTION_PRED
    286327      m_acTEncDepthTopList[iViewIdx]->setMultiviewMvPredMode          ( 0 );
    287328      m_acTEncDepthTopList[iViewIdx]->setMultiviewMvRegMode           ( 0 );
    288329      m_acTEncDepthTopList[iViewIdx]->setMultiviewMvRegLambdaScale    ( 0.0 );
     330#endif
     331#if HHI_INTER_VIEW_RESIDUAL_PRED
    289332      m_acTEncDepthTopList[iViewIdx]->setMultiviewResPredMode         ( 0 );
    290 
    291 #if SB_INTERVIEW_SKIP
     333#endif
     334
     335#if HHI_INTERVIEW_SKIP
    292336      m_acTEncDepthTopList[iViewIdx]->setInterViewSkip            ( 0 );
    293 #if SB_INTERVIEW_SKIP_LAMBDA_SCALE
     337#if HHI_INTERVIEW_SKIP_LAMBDA_SCALE
    294338      m_acTEncDepthTopList[iViewIdx]->setInterViewSkipLambdaScale ( 1 );
    295339#endif
     
    307351      m_acTEncDepthTopList[iViewIdx]->setUseRoundingControlBipred(m_useRoundingControlBipred);
    308352#endif
    309 #if HHI_DMM_INTRA
    310       m_acTEncDepthTopList[iViewIdx]->setUseDepthModelModes( m_bUseDepthModelModes );
     353#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     354      m_acTEncDepthTopList[iViewIdx]->setUseDMM( m_bUseDMM );
    311355#endif
    312356#if CONSTRAINED_INTRA_PRED
     
    335379      m_acTEncDepthTopList[iViewIdx]->setUseSAO               ( m_abUseSAO[1]     );
    336380#endif
     381#if HHI_MPI
    337382      m_acTEncDepthTopList[iViewIdx]->setUseMVI( m_bUseMVI );
     383#endif
    338384
    339385      m_acTEncDepthTopList[iViewIdx]->setPictureDigestEnabled(m_pictureDigestEnabled);
    340       m_acTEncDepthTopList[iViewIdx]->setOmitUnusedBlocks        ( m_bOmitUnusedBlocks && (iViewIdx != 0) );
    341386
    342387      m_acTEncDepthTopList[iViewIdx]->setQpChangeFrame( m_iQpChangeFrame );
     
    345390    }
    346391  }
     392#if HHI_INTER_VIEW_MOTION_PRED
    347393  else if( m_uiMultiviewMvRegMode )
    348394  {
     
    352398    }
    353399  }
    354 
    355 //GT VSO
     400#endif
     401
     402#if HHI_VSO
    356403  if ( m_bUseVSO )
    357404  {
    358405    if ( m_uiVSOMode == 4 )
    359     {     
    360 #if GERHARD_RM_DEBUG_MM
    361       m_cMMCheckModel .create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, m_iSourceHeight, LOG2_DISP_PREC_LUT, 0 );
    362 #endif
     406    {
    363407      m_cRendererModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, m_iSourceHeight, LOG2_DISP_PREC_LUT, 0 );
    364408
     
    367411        for (Int iContent = 0; iContent < 2; iContent++ )
    368412        {
    369           Int iNumOfModels   = m_cRenModStrParser.getNumOfModelsForView(iViewNum, iContent); 
    370           Bool bUseVSO = (iNumOfModels != 0); 
    371 
    372           TEncTop* pcEncTop = ( iContent == 0 ) ? m_acTEncTopList[iViewNum] : m_acTEncDepthTopList[iViewNum]; 
    373           pcEncTop->setUseVSO( bUseVSO ); 
    374           pcEncTop->getRdCost()->setRenModel( bUseVSO ? &m_cRendererModel : NULL ); 
    375          
     413          Int iNumOfModels   = m_cRenModStrParser.getNumOfModelsForView(iViewNum, iContent);
     414          Bool bUseVSO = (iNumOfModels != 0);
     415
     416          TEncTop* pcEncTop = ( iContent == 0 ) ? m_acTEncTopList[iViewNum] : m_acTEncDepthTopList[iViewNum];
     417          pcEncTop->setUseVSO( bUseVSO );
     418          pcEncTop->getRdCost()->setRenModel( bUseVSO ? &m_cRendererModel : NULL );
     419
    376420          for (Int iCurModel = 0; iCurModel < iNumOfModels; iCurModel++ )
    377421          {
    378             Int iModelNum; Int iLeftViewNum; Int iRightViewNum; Int iDump; Int iOrgRefNum; Int iBlendMode;
    379 
    380             m_cRenModStrParser.getSingleModelData  ( iViewNum, iContent, iCurModel, iModelNum, iBlendMode, iLeftViewNum, iRightViewNum, iOrgRefNum, iDump ) ;
    381             m_cRendererModel  .createSingleModel   ( iViewNum, iContent, iModelNum, iLeftViewNum, iRightViewNum, (iOrgRefNum != -1), iBlendMode );
    382 #if GERHARD_RM_DEBUG_MM
    383             m_cMMCheckModel   .createSingleModel   ( iViewNum, iContent, iModelNum, iLeftViewNum, iRightViewNum, (iOrgRefNum != -1), iBlendMode );
    384 #endif
     422            Int iModelNum; Int iLeftViewNum; Int iRightViewNum; Int iDump; Int iOrgRefNum; Int iBlendMode;
     423
     424            m_cRenModStrParser.getSingleModelData  ( iViewNum, iContent, iCurModel, iModelNum, iBlendMode, iLeftViewNum, iRightViewNum, iOrgRefNum, iDump ) ;
     425            m_cRendererModel  .createSingleModel   ( iViewNum, iContent, iModelNum, iLeftViewNum, iRightViewNum, (iOrgRefNum != -1), iBlendMode );
    385426          }
    386427        }
     
    391432      m_cRendererTop.init(m_iSourceWidth, m_iSourceHeight,true,0,0,true, 0,0,0,0,0,0,0,1,0,0 );  //GT: simplest configuration
    392433    }
    393 
    394   }
    395 //GT VSO end
    396   m_cUsedPelsRenderer.init(m_iSourceWidth, m_iSourceHeight, true, 0, LOG2_DISP_PREC_LUT, true, 0, 0, 0, 0, 0, 6, 4, 1, 0, 6 );
     434  }
     435#endif
     436
     437#if HHI_INTERVIEW_SKIP
     438  m_cUsedPelsRenderer.init(m_iSourceWidth, m_iSourceHeight, true, 0, LOG2_DISP_PREC_LUT, true, 0, 0, 0, 0, 0, 6, 4, 1, 0, 6 );
     439#endif
    397440}
    398441
     
    421464      m_acTEncDepthTopList[iViewIdx]->create();
    422465    }
     466#if HHI_INTER_VIEW_MOTION_PRED
    423467    else if( m_uiMultiviewMvRegMode )
    424468    {
     
    426470      m_acTVideoIOYuvDepthInputFileList[iViewIdx]->skipFrames(m_FrameSkip, m_iSourceWidth, m_iSourceHeight);
    427471    }
    428   }
    429 
    430 //GT VSO
     472#endif
     473  }
     474
     475#if HHI_VSO
    431476  for(Int iViewIdx=0; iViewIdx < m_iNumberOfExternalRefs; iViewIdx++)
    432477  {
    433478    m_acTVideoIOYuvERFileList[iViewIdx]->open( m_pchERRefFileList[iViewIdx], false, m_uiInputBitDepth, m_uiInternalBitDepth ); // read mode
    434479  }
    435 //GT VSO end
     480#endif
    436481}
    437482
     
    441486  m_cTVideoIOBitsFile.closeBits();
    442487
    443 //GT VSO
     488#if HHI_VSO
    444489  for ( Int iViewIdx = 0; iViewIdx < m_iNumberOfExternalRefs; iViewIdx++ )
    445490  {
     
    448493    m_acTVideoIOYuvERFileList[iViewIdx] = 0;
    449494  };
    450 //GT VSO end
     495#endif
    451496
    452497  for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++)
     
    563608    pcDepthPicYuvOrg->create( m_iSourceWidth, m_iSourceHeight, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth );
    564609  }
     610#if HHI_INTER_VIEW_MOTION_PRED
    565611  if( m_uiMultiviewMvRegMode )
    566612  {
    567613    pcPdmDepthOrg->create( m_iSourceWidth, m_iSourceHeight, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth );
    568614  }
     615#endif
    569616
    570617  TComBitstream*    pcBitstream = new TComBitstream;
     
    589636        bAllEos = bAllEos|bEos[iViewIdx] ;
    590637
     638#if HHI_INTER_VIEW_MOTION_PRED
    591639        if( m_uiMultiviewMvRegMode && iViewIdx )
    592640        {
    593641          m_acTVideoIOYuvDepthInputFileList[iViewIdx]->read( pcPdmDepthOrg, m_aiPad, m_bUsingDepthMaps );
    594642        }
     643#endif
    595644
    596645        // increase number of received frames
     
    598647      }
    599648
     649#if HHI_INTER_VIEW_MOTION_PRED
    600650      m_acTEncTopList[iViewIdx]->receivePic( bEos[iViewIdx],  pcPicYuvOrg, m_cListPicYuvRecList[iViewIdx]->back(), ( m_uiMultiviewMvRegMode && iViewIdx ? pcPdmDepthOrg : 0 ) );
     651#else
     652      m_acTEncTopList[iViewIdx]->receivePic( bEos[iViewIdx],  pcPicYuvOrg, m_cListPicYuvRecList[iViewIdx]->back(), 0 );
     653#endif
    601654
    602655      if( m_bUsingDepthMaps )
     
    628681    }
    629682
    630 //GT VSO
     683#if HHI_VSO   
    631684    if ( m_bUseVSO && ( m_uiVSOMode != 4) )
    632685    {
     
    634687      xStoreVSORefPicsInBuffer();       //GT;
    635688    }
    636 //GT VSO end
     689#endif
    637690
    638691    //GT: Encode
     
    688741
    689742#if AMVP_BUFFERCOMPRESS
    690     // compress motion for entire access 
     743    // compress motion for entire access
    691744    if( bCurrPocCoded )
    692745    {
     
    729782  pcDepthPicYuvOrg = NULL ;
    730783
    731   // SB valgrid
    732784  pcBitstream->destroy();
    733785  delete pcBitstream;
     
    751803  if ( pcPdmDepthOrg )
    752804  {
    753     pcPdmDepthOrg->destroy(); 
    754     delete pcPdmDepthOrg; 
    755     pcPdmDepthOrg = NULL; 
     805    pcPdmDepthOrg->destroy();
     806    delete pcPdmDepthOrg;
     807    pcPdmDepthOrg = NULL;
    756808  }
    757809
     
    847899  // Delete ERFiles
    848900
    849 //GT VSO
     901#if HHI_VSO
    850902  std::map< Int,vector<TComPicYuv*> >::iterator iterMapPicExtRefView = m_cMapPicExtRefView.begin();
    851903  while ( iterMapPicExtRefView != m_cMapPicExtRefView.end() )
     
    861913    iterMapPicExtRefView++;
    862914  }
    863 //GT VSO end
     915#endif
    864916}
    865917
     
    920972TComPicYuv* TAppEncTop::xGetPicYuvFromView( Int iViewIdx, Int iPoc, Bool bDepth, Bool bRecon )
    921973{
    922   TComPic*    pcPic = xGetPicFromView( iViewIdx, iPoc, bDepth); 
    923   TComPicYuv* pcPicYuv = NULL; 
     974  TComPic*    pcPic = xGetPicFromView( iViewIdx, iPoc, bDepth);
     975  TComPicYuv* pcPicYuv = NULL;
    924976
    925977  if (pcPic != NULL)
     
    929981      if ( pcPic->getReconMark() )
    930982      {
    931         pcPicYuv = pcPic->getPicYuvRec(); 
     983        pcPicYuv = pcPic->getPicYuvRec();
    932984      }
    933985    }
    934986    else
    935987    {
    936       pcPicYuv = pcPic->getPicYuvOrg(); 
    937     }   
     988      pcPicYuv = pcPic->getPicYuvOrg();
     989    }
    938990  };
    939991
    940   return pcPicYuv;
    941 };
    942 
     992  return pcPicYuv;
     993};
     994
     995#if HHI_VSO
    943996Void TAppEncTop::xSetBasePicYuv( Int iViewIdx, Int iPoc, TComMVDRefData* pcRefInfo, InterViewReference eView, bool bDepth )
    944997{
     
    9751028  }
    9761029
    977 //GT campara
     1030
    9781031  xSetBaseLUT       (iViewIdx, iViewIdx-1  , pcMVDRefData, PREVVIEW );
    9791032  xSetBaseLUT       (iViewIdx, iViewIdx+1  , pcMVDRefData, NEXTVIEW );
    980 //GT campara end
    981 
    982 //GT VSO
     1033
     1034
    9831035  if ( m_bUseVSO && m_uiVSOMode != 4)
    9841036  {
     
    9871039    pcMVDRefData->setRefViewInd     (m_aaiBaseViewRefInd[iViewIdx], m_aaiERViewRefInd[iViewIdx], m_aaiERViewRefLutInd[iViewIdx]);
    9881040  }
    989 //GT VSO end
    990 
    9911041};
    9921042
    993 //GT campara
     1043
    9941044Void TAppEncTop::xSetBaseLUT( Int iViewIdxSource, Int iViewIdxTarget, TComMVDRefData* pcRefInfo, InterViewReference eView )
    9951045{
     
    9991049  pcRefInfo->setShiftLUTsBaseView(eView, m_cCameraData.getBaseViewShiftLUTD()[iViewIdxSource][iViewIdxTarget],m_cCameraData.getBaseViewShiftLUTI()[iViewIdxSource][iViewIdxTarget] );
    10001050};
    1001 //GT campara end
    1002 
    1003 
    1004 //GT VSO
     1051
    10051052Void TAppEncTop::xSetERPicYuvs( Int iViewIdx, Int iPoc, TComMVDRefData* pcReferenceInfo )
    10061053{
     
    10141061  pcReferenceInfo->setPicYuvERViews( cMapIt->second );
    10151062}
    1016 
    1017 
    10181063
    10191064Void TAppEncTop::xStoreVSORefPicsInBuffer()
     
    11301175  }
    11311176}
    1132 // GT VSO end
    1133 
     1177#endif
     1178
     1179#if HHI_INTERVIEW_SKIP
    11341180Void TAppEncTop::getUsedPelsMap( Int iViewIdx, Int iPoc, TComPicYuv* pcPicYuvUsedSplsMap )
    11351181{
    1136   AOT( iViewIdx <= 0); 
    1137   AOT( iViewIdx >= m_iNumberOfViews ); 
    1138   AOF( m_bOmitUnusedBlocks );
    1139   AOF( m_cCameraData.getCurFrameId() == iPoc ); 
    1140 
    1141   Int iViewSIdx      = m_cCameraData.getBaseId2SortedId()[iViewIdx]; 
    1142   Int iFirstViewSIdx = m_cCameraData.getBaseId2SortedId()[0]; 
     1182  AOT( iViewIdx <= 0);
     1183  AOT( iViewIdx >= m_iNumberOfViews );
     1184  AOF( m_uiInterViewSkip != 0 );
     1185  AOF( m_cCameraData.getCurFrameId() == iPoc );
     1186
     1187  Int iViewSIdx      = m_cCameraData.getBaseId2SortedId()[iViewIdx];
     1188  Int iFirstViewSIdx = m_cCameraData.getBaseId2SortedId()[0];
    11431189
    11441190  AOT( iViewSIdx == iFirstViewSIdx );
    11451191
    1146   Bool bFirstIsLeft = (iFirstViewSIdx < iViewSIdx); 
     1192  Bool bFirstIsLeft = (iFirstViewSIdx < iViewSIdx);
    11471193
    11481194    m_cUsedPelsRenderer.setShiftLUTs(
     
    11541200      m_cCameraData.getBaseViewShiftLUTI()[0][iViewIdx],
    11551201      -1
    1156       ); 
    1157  
     1202      );
     1203
    11581204
    11591205  TComPicYuv* pcPicYuvDepth = xGetPicYuvFromView(0, iPoc, true, true );
    1160   AOF( pcPicYuvDepth);
    1161 
    1162   m_cUsedPelsRenderer.getUsedSamplesMap( pcPicYuvDepth, pcPicYuvUsedSplsMap, bFirstIsLeft );
    1163 
    1164 }
    1165 
     1206  AOF( pcPicYuvDepth);
     1207
     1208  m_cUsedPelsRenderer.getUsedSamplesMap( pcPicYuvDepth, pcPicYuvUsedSplsMap, bFirstIsLeft );
     1209
     1210}
     1211#endif
     1212
     1213#if HHI_VSO
    11661214Void TAppEncTop::setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent )
    11671215{
    1168   Int iEncViewSIdx = m_cCameraData.getBaseId2SortedId()[ iEncViewIdx ]; 
     1216  Int iEncViewSIdx = m_cCameraData.getBaseId2SortedId()[ iEncViewIdx ];
    11691217
    11701218  // setup base views
    1171   Int iNumOfBV = m_cRenModStrParser.getNumOfBaseViewsForView( iEncViewSIdx, iEncContent );         
     1219  Int iNumOfBV = m_cRenModStrParser.getNumOfBaseViewsForView( iEncViewSIdx, iEncContent );
    11721220
    11731221  for (Int iCurView = 0; iCurView < iNumOfBV; iCurView++ )
    1174   {       
    1175     Int iBaseViewSIdx;
    1176     Int iVideoDistMode;
    1177     Int iDepthDistMode;
    1178 
    1179     m_cRenModStrParser.getBaseViewData( iEncViewSIdx, iEncContent, iCurView, iBaseViewSIdx, iVideoDistMode, iDepthDistMode );
    1180 
    1181     AOT( iVideoDistMode < 0 || iVideoDistMode > 2 );
    1182 
    1183     Int iBaseViewIdx = m_cCameraData.getBaseSortedId2Id()[ iBaseViewSIdx ];
    1184 
    1185     TComPicYuv* pcPicYuvVideoRec  = xGetPicYuvFromView( iBaseViewIdx, iPoc, false, true  );
    1186     TComPicYuv* pcPicYuvDepthRec  = xGetPicYuvFromView( iBaseViewIdx, iPoc, true , true  ); 
    1187     TComPicYuv* pcPicYuvVideoOrg  = xGetPicYuvFromView( iBaseViewIdx, iPoc, false, false );
    1188     TComPicYuv* pcPicYuvDepthOrg  = xGetPicYuvFromView( iBaseViewIdx, iPoc, true , false ); 
    1189                                
    1190     TComPicYuv* pcPicYuvVideoRef  = ( iVideoDistMode == 2 ) ? pcPicYuvVideoOrg  : NULL;       
    1191     TComPicYuv* pcPicYuvDepthRef  = ( iDepthDistMode == 2 ) ? pcPicYuvDepthOrg  : NULL;   
    1192          
    1193     TComPicYuv* pcPicYuvVideoTest = ( iVideoDistMode == 0 ) ? pcPicYuvVideoOrg  : pcPicYuvVideoRec;
    1194     TComPicYuv* pcPicYuvDepthTest = ( iDepthDistMode == 0 ) ? pcPicYuvDepthOrg  : pcPicYuvDepthRec;
    1195 
    1196     AOT( (iVideoDistMode == 2) != (pcPicYuvVideoRef != NULL) );
    1197     AOT( (iDepthDistMode == 2) != (pcPicYuvDepthRef != NULL) );     
    1198     AOT( pcPicYuvDepthTest == NULL );
    1199     AOT( pcPicYuvVideoTest == NULL );
    1200 
    1201     m_cRendererModel.setBaseView( iBaseViewSIdx, pcPicYuvVideoTest, pcPicYuvDepthTest, pcPicYuvVideoRef, pcPicYuvDepthRef );
    1202 #if GERHARD_RM_DEBUG_MM
    1203     m_cMMCheckModel .setBaseView( iBaseViewSIdx, pcPicYuvVideoTest, pcPicYuvDepthTest, pcPicYuvVideoRef, pcPicYuvDepthRef );
    1204 #endif
    1205   }
    1206 
    1207   m_cRendererModel.setErrorMode( iEncViewSIdx, iEncContent, 0 );
    1208 #if GERHARD_RM_DEBUG_MM
    1209   m_cMMCheckModel .setErrorMode( iEncViewSIdx, iEncContent, 0 );
    1210 #endif
    1211 
     1222  {
     1223    Int iBaseViewSIdx;
     1224    Int iVideoDistMode;
     1225    Int iDepthDistMode;
     1226
     1227    m_cRenModStrParser.getBaseViewData( iEncViewSIdx, iEncContent, iCurView, iBaseViewSIdx, iVideoDistMode, iDepthDistMode );
     1228
     1229    AOT( iVideoDistMode < 0 || iVideoDistMode > 2 );
     1230
     1231    Int iBaseViewIdx = m_cCameraData.getBaseSortedId2Id()[ iBaseViewSIdx ];
     1232
     1233    TComPicYuv* pcPicYuvVideoRec  = xGetPicYuvFromView( iBaseViewIdx, iPoc, false, true  );
     1234    TComPicYuv* pcPicYuvDepthRec  = xGetPicYuvFromView( iBaseViewIdx, iPoc, true , true  );
     1235    TComPicYuv* pcPicYuvVideoOrg  = xGetPicYuvFromView( iBaseViewIdx, iPoc, false, false );
     1236    TComPicYuv* pcPicYuvDepthOrg  = xGetPicYuvFromView( iBaseViewIdx, iPoc, true , false );
     1237
     1238    TComPicYuv* pcPicYuvVideoRef  = ( iVideoDistMode == 2 ) ? pcPicYuvVideoOrg  : NULL;
     1239    TComPicYuv* pcPicYuvDepthRef  = ( iDepthDistMode == 2 ) ? pcPicYuvDepthOrg  : NULL;
     1240
     1241    TComPicYuv* pcPicYuvVideoTest = ( iVideoDistMode == 0 ) ? pcPicYuvVideoOrg  : pcPicYuvVideoRec;
     1242    TComPicYuv* pcPicYuvDepthTest = ( iDepthDistMode == 0 ) ? pcPicYuvDepthOrg  : pcPicYuvDepthRec;
     1243
     1244    AOT( (iVideoDistMode == 2) != (pcPicYuvVideoRef != NULL) );
     1245    AOT( (iDepthDistMode == 2) != (pcPicYuvDepthRef != NULL) );
     1246    AOT( pcPicYuvDepthTest == NULL );
     1247    AOT( pcPicYuvVideoTest == NULL );
     1248
     1249    m_cRendererModel.setBaseView( iBaseViewSIdx, pcPicYuvVideoTest, pcPicYuvDepthTest, pcPicYuvVideoRef, pcPicYuvDepthRef );
     1250  }
     1251
     1252  m_cRendererModel.setErrorMode( iEncViewSIdx, iEncContent, 0 );
    12121253  // setup virtual views
    1213   Int iNumOfSV  = m_cRenModStrParser.getNumOfModelsForView( iEncViewSIdx, iEncContent );     
     1254  Int iNumOfSV  = m_cRenModStrParser.getNumOfModelsForView( iEncViewSIdx, iEncContent );
    12141255  for (Int iCurView = 0; iCurView < iNumOfSV; iCurView++ )
    1215   { 
    1216     Int iOrgRefBaseViewSIdx; 
    1217     Int iLeftBaseViewSIdx; 
    1218     Int iRightBaseViewSIdx; 
    1219     Int iSynthViewRelNum; 
    1220     Int iModelNum; 
    1221     Int iBlendMode; 
    1222     m_cRenModStrParser.getSingleModelData(iEncViewSIdx, iEncContent, iCurView, iModelNum, iBlendMode,iLeftBaseViewSIdx, iRightBaseViewSIdx, iOrgRefBaseViewSIdx, iSynthViewRelNum ); 
    1223 
    1224     Int iLeftBaseViewIdx    = -1;   
    1225     Int iRightBaseViewIdx   = -1;       
    1226 
    1227     TComPicYuv* pcPicYuvOrgRef  = NULL; 
    1228     Int**      ppiShiftLUTLeft  = NULL; 
    1229     Int**      ppiShiftLUTRight = NULL;       
    1230     Int**      ppiBaseShiftLUTLeft  = NULL; 
    1231     Int**      ppiBaseShiftLUTRight = NULL;       
    1232 
    1233 
    1234     Int        iDistToLeft      = -1; 
    1235 
    1236     Int iSynthViewIdx = m_cCameraData.synthRelNum2Idx( iSynthViewRelNum ); 
     1256  {
     1257    Int iOrgRefBaseViewSIdx;
     1258    Int iLeftBaseViewSIdx;
     1259    Int iRightBaseViewSIdx;
     1260    Int iSynthViewRelNum;
     1261    Int iModelNum;
     1262    Int iBlendMode;
     1263    m_cRenModStrParser.getSingleModelData(iEncViewSIdx, iEncContent, iCurView, iModelNum, iBlendMode,iLeftBaseViewSIdx, iRightBaseViewSIdx, iOrgRefBaseViewSIdx, iSynthViewRelNum );
     1264
     1265    Int iLeftBaseViewIdx    = -1;
     1266    Int iRightBaseViewIdx   = -1;
     1267
     1268    TComPicYuv* pcPicYuvOrgRef  = NULL;
     1269    Int**      ppiShiftLUTLeft  = NULL;
     1270    Int**      ppiShiftLUTRight = NULL;
     1271    Int**      ppiBaseShiftLUTLeft  = NULL;
     1272    Int**      ppiBaseShiftLUTRight = NULL;
     1273
     1274
     1275    Int        iDistToLeft      = -1;
     1276
     1277    Int iSynthViewIdx = m_cCameraData.synthRelNum2Idx( iSynthViewRelNum );
    12371278
    12381279    if ( iLeftBaseViewSIdx != -1 )
    12391280    {
    1240       iLeftBaseViewIdx   = m_cCameraData.getBaseSortedId2Id()   [ iLeftBaseViewSIdx ]; 
     1281      iLeftBaseViewIdx   = m_cCameraData.getBaseSortedId2Id()   [ iLeftBaseViewSIdx ];
    12411282      ppiShiftLUTLeft    = m_cCameraData.getSynthViewShiftLUTI()[ iLeftBaseViewIdx  ][ iSynthViewIdx  ];
    12421283    }
     
    12441285    if ( iRightBaseViewSIdx != -1 )
    12451286    {
    1246       iRightBaseViewIdx  = m_cCameraData.getBaseSortedId2Id()   [iRightBaseViewSIdx ]; 
     1287      iRightBaseViewIdx  = m_cCameraData.getBaseSortedId2Id()   [iRightBaseViewSIdx ];
    12471288      ppiShiftLUTRight   = m_cCameraData.getSynthViewShiftLUTI()[ iRightBaseViewIdx ][ iSynthViewIdx ];
    12481289    }
    12491290
    12501291    if ( iRightBaseViewSIdx != -1 && iLeftBaseViewSIdx != -1 )
    1251     { 
    1252       iDistToLeft    = m_cCameraData.getRelDistLeft(  iSynthViewIdx , iLeftBaseViewIdx, iRightBaseViewIdx); 
     1292    {
     1293      iDistToLeft    = m_cCameraData.getRelDistLeft(  iSynthViewIdx , iLeftBaseViewIdx, iRightBaseViewIdx);
    12531294      ppiBaseShiftLUTLeft  = m_cCameraData.getBaseViewShiftLUTI() [ iLeftBaseViewIdx  ][ iRightBaseViewIdx ];
    12541295      ppiBaseShiftLUTRight = m_cCameraData.getBaseViewShiftLUTI() [ iRightBaseViewIdx ][ iLeftBaseViewIdx  ];
     
    12581299    if ( iOrgRefBaseViewSIdx != -1 )
    12591300    {
    1260       pcPicYuvOrgRef = xGetPicYuvFromView( m_cCameraData.getBaseSortedId2Id()[ iOrgRefBaseViewSIdx ] , iPoc, false, false );
    1261       AOF ( pcPicYuvOrgRef );
    1262     }     
    1263 
    1264     m_cRendererModel.setSingleModel( iModelNum, ppiShiftLUTLeft, ppiBaseShiftLUTLeft, ppiShiftLUTRight, ppiBaseShiftLUTRight, iDistToLeft, pcPicYuvOrgRef );
    1265 #if GERHARD_RM_DEBUG_MM
    1266     m_cMMCheckModel .setSingleModel( iModelNum, ppiShiftLUTLeft, ppiBaseShiftLUTLeft, ppiShiftLUTRight, ppiBaseShiftLUTRight, iDistToLeft, pcPicYuvOrgRef );
    1267 #endif
    1268   }
    1269 }
    1270 
    1271 // GT VSO end
     1301      pcPicYuvOrgRef = xGetPicYuvFromView( m_cCameraData.getBaseSortedId2Id()[ iOrgRefBaseViewSIdx ] , iPoc, false, false );
     1302      AOF ( pcPicYuvOrgRef );
     1303    }
     1304
     1305    m_cRendererModel.setSingleModel( iModelNum, ppiShiftLUTLeft, ppiBaseShiftLUTLeft, ppiShiftLUTRight, ppiBaseShiftLUTRight, iDistToLeft, pcPicYuvOrgRef );
     1306  }
     1307}
     1308#endif
     1309
  • trunk/source/App/TAppEncoder/TAppEncTop.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    4982  std::vector<Int>            m_iDepthFrameRcvdVector;             ///< number of received frames
    5083
     84#if DEPTH_MAP_GENERATION
    5185  TComSPSAccess               m_cSPSAccess;
    5286  TComAUPicAccess             m_cAUPicAccess;
     87#endif
    5388 
     89#if HHI_VSO
    5490  TRenTop                     m_cRendererTop;
    55 #if GERHARD_RM_DEBUG_MM
    56   TRenModel                   m_cMMCheckModel;
     91  TRenModel                   m_cRendererModel;   
    5792#endif
    58   TRenModel                   m_cRendererModel;   
    5993
    6094protected:
     
    84118
    85119  // Ref Data
     120#if HHI_VSO
    86121  Void  xSetBaseLUT   ( Int iViewIdxSource, Int iViewIdxTarget, TComMVDRefData* pcRefInfo, InterViewReference eView );
    87122  Void  xSetBasePicYuv( Int iViewIdx, Int iPoc, TComMVDRefData* pcRefInfo, InterViewReference eView, bool bDepth ); ///< store pics from buffers in pcRefInfo
    88 
     123#endif
    89124 
    90125public:
     
    93128 
    94129  Void        encode      ();                               ///< main encoding function
     130#if HHI_VSO
    95131  Void                  setupRenModel    ( Int iPoc, Int iEncViewIdx, Int iEncContent );
    96132  Void                  setMVDPic        ( Int iViewIdx, Int iPoc, TComMVDRefData* pcReferenceInfo ); // set MultiView References
     133#endif
    97134  Void                  getUsedPelsMap   ( Int iViewIdx, Int iPoc, TComPicYuv* pcPicYuvUsedPelsMap );
    98135  std::vector<TComPic*> getSpatialRefPics( Int iViewIdx, Int iPoc, Bool bIsDepthCoder );              // only for mvc functionality yet
    99136  TComPic*              getPicFromView   ( Int iViewIdx, Int iPoc, Bool bDepth ) { return xGetPicFromView( iViewIdx, iPoc, bDepth ); }
    100137
    101 #if GERHARD_RM_DEBUG_MM
    102   TRenModel* getMMCheckModel() { return  &m_cMMCheckModel  ; }; 
     138#if HHI_VSO
     139  TRenModel* getRenModel    () { return  &m_cRendererModel ; };
    103140#endif
    104   TRenModel* getRenModel    () { return  &m_cRendererModel ; };
    105141
     142#if DEPTH_MAP_GENERATION
    106143  TComSPSAccess*    getSPSAccess  () { return &m_cSPSAccess;   }
    107144  TComAUPicAccess*  getAUPicAccess() { return &m_cAUPicAccess; }
     145#endif
    108146
    109 //GT VSO
     147#if HHI_VSO
    110148private:
    111149  std::vector<TVideoIOYuv*>                            m_acTVideoIOYuvERFileList;
     
    115153  Void  xSetERPicYuvs(  Int iViewIdx, Int iPoc, TComMVDRefData* pcReferenceInfo );    ///< store pic from buffer in pcReferenceInfo   
    116154  Void  xStoreVSORefPicsInBuffer();                                                   ///< read in External Ref pic from file and store in buffer
    117 //GT VSO end
    118 
     155#endif
    119156 
    120157};// END CLASS DEFINITION TAppEncTop
  • trunk/source/App/TAppEncoder/encmain.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/App/TAppRenderer/RendererMain.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/App/TAppRenderer/TAppRendererCfg.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    5184      free (m_pchSynthOutputFileList[i]);
    5285  }
    53 
    5486
    5587  if ( m_pchVideoInputFileBaseName  ) free( m_pchVideoInputFileBaseName );
     
    6092  if ( m_pchSynthViewCameraNumbers  ) free( m_pchSynthViewCameraNumbers );
    6193  if ( m_pchViewConfig              ) free( m_pchViewConfig         );
    62 
    63 
    6494}
    6595
     
    117147    ("PreProcMode"       ,      m_iPreProcMode        ,               0, "Depth preprocessing: 0 = None, 1 = Binomial filtering"   )
    118148    ("PreFilterSize"     ,      m_iPreFilterSize      ,               0, "For PreProcMode 1: Half Size of filter kernel"           )
    119     ("SimEnhance"        ,      m_bSimEnhance         ,           false, "Similarity enhancement of video" )
     149    ("SimEnhance"        ,      m_bSimEnhance         ,           true, "Similarity enhancement of video" )
    120150    ("BlendMode"         ,      m_iBlendMode          ,               0, "Blending of left and right image: 0: average, 1: only holes from right, 2: only holes from left, 3: first view in BaseViewOrder as main view" )
    121     ("BlendZThresPerc"   ,      m_iBlendZThresPerc    ,               3, "Z-difference threshold for blending in percent of total Z-range"   )
     151    ("BlendZThresPerc"   ,      m_iBlendZThresPerc    ,              30, "Z-difference threshold for blending in percent of total Z-range"   )
    122152    ("BlendUseDistWeight",      m_bBlendUseDistWeight ,            true, "0: blend using average; 1: blend factor depends on view distance"  )
    123     ("BlendHoleMargin"   ,      m_iBlendHoleMargin    ,               0, "Margin around holes to fill with other view"                       )
    124     ("InterpolationMode" ,      m_iInterpolationMode  ,               0, "0: NN, 1:linear (int), 2:linear (double) , 3:cubic Hermite spline (double), 4: 8-tap (int)" )
     153    ("BlendHoleMargin"   ,      m_iBlendHoleMargin    ,               6, "Margin around holes to fill with other view"                       )
     154    ("InterpolationMode" ,      m_iInterpolationMode  ,               4, "0: NN, 1:linear (int), 2:linear (double) , 3:cubic Hermite spline (double), 4: 8-tap (int)" )
    125155    ("HoleFillingMode"   ,      m_iHoleFillingMode    ,               1, "0: None, 1: line wise background extension"              )
    126156    ("PostProcMode"      ,      m_iPostProcMode       ,               0, "0: None, 1: horizontal 3-tap median"                     )
    127157    ("RenderMode"        ,      m_iRenderMode         ,               0, "0: Use renderer, 1: use model renderer, 10: create used pels map")
    128     ("ShiftPrecision"    ,      m_iShiftPrecision     ,               0, "Shift Precision for Interpolation Mode 4"                )
     158    ("ShiftPrecision"    ,      m_iShiftPrecision     ,               2, "Shift Precision for Interpolation Mode 4"                )
    129159    ("TemporalDepthFilter",     m_bTempDepthFilter    ,           false, "Temporal depth filtering"                                )
    130160    ("RenderDirection"   ,      m_iRenderDirection    ,               0, "0: Interpolate, 1: Extrapolate from left, 2: Extrapolate from right")
  • trunk/source/App/TAppRenderer/TAppRendererCfg.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/App/TAppRenderer/TAppRendererTop.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/App/TAppRenderer/TAppRendererTop.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/CommonDef.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    1548#include "TComRom.h"
    1649
    17 // SB
    1850#include <string>
    1951#include <assert.h>
     
    2658
    2759#define HM_VERSION        "3.0rc2"                 ///< Current software version
    28 #define NV_VERSION        "0.31r4"                   ///< Current software version
     60#define NV_VERSION        "0.37"                   ///< Current software version
    2961
    3062// ====================================================================================================================
     
    70102
    71103
    72 #define SEBASTIAN                   1
    73 #if     SEBASTIAN
    74 #define SB_INTERVIEW_SKIP           1
    75 #define SB_INTERVIEW_SKIP_LAMBDA_SCALE 1
    76 #define SB_MEM_FIX                  1
    77 #define SB_NO_LowDelayCoding        0   // noch offen in motionestimation
    78 #endif
    79 
    80 #define GERHARD                     1
    81 #if     GERHARD
    82 #define GERHARD_VQM_XCHECK          0
    83 #define GERHARD_RM_DEBUG_MM         0
    84 #define GERHARD_RM_HOLE_EXT         0
    85 #define GERHARD_RM_COLOR_PLANES     1
    86 #define GERHARD_RM_SPLAT            1
    87 #endif
    88 
    89 
    90104// ====================================================================================================================
    91105// Common constants
     
    116130#define STD_CAM_PARAMETERS_PRECISION 5        ///< quarter luma sample accuarcy for derived disparities (as default)
    117131
    118 // SB
    119132#define MAX_INPUT_VIEW_NUM                                      10                              ///< max. number of input view for multiview coding
    120133
    121 // GT
     134#if HHI_VSO
    122135#define MAX_ERREF_VIEW_NUM                                      15                              ///< max. number of virtual external reference views
     136#endif
    123137#define LOG2_DISP_PREC_LUT                              2                               ///< log2 of disparity precision used in integer disparity LUTs
    124138
     139
     140#if ( HHI_INTER_VIEW_MOTION_PRED || HHI_INTER_VIEW_RESIDUAL_PRED )
     141#define DEPTH_MAP_GENERATION        1
     142#else
     143#define DEPTH_MAP_GENERATION        0
     144#endif
    125145
    126146//>>>>> generation and usage of virtual prediction depth maps >>>>>
     
    151171#define OUTPUT_RESIDUAL_PICTURES          0         // output residual pictures (for debugging)
    152172
    153 #define MVI_MERGE_POS                     0         // position of mvi in merge list (0..5)
     173#define HHI_MPI_MERGE_POS                     0         // position of mvi in merge list (0..5)
    154174
    155175
     
    298318#endif
    299319
    300 // SB from ViCo for formatted string parsing
    301320
    302321class VideoCodecException
  • trunk/source/Lib/TLibCommon/ContextModel.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/ContextModel.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/ContextModel3DBuffer.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/ContextModel3DBuffer.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/ContextTables.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    1447
    1548#define NUM_SPLIT_FLAG_CTX            3       ///< number of context models for split flag
    16 #if MW_MVI_SIGNALLING_MODE == 0
    17 #define NUM_MVI_FLAG_CTX              3       ///< number of context models for motion inheritance flag
    18 #endif
    1949#define NUM_SKIP_FLAG_CTX             3       ///< number of context models for skip flag
    2050
     
    72102#define NUM_VIEW_IDX_CTX              6
    73103
    74 #if HHI_DMM_INTRA
     104#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    75105#define NUM_DMM_CTX                   2
    76106#define NUM_WEDGE_CTX                 4
     
    120150  }
    121151};
    122 
    123 #if MW_MVI_SIGNALLING_MODE == 0
    124 // initial probability for skip flag
    125 static const Short
    126 INIT_MVI_FLAG[3][NUM_MVI_FLAG_CTX][2] =
    127 {
    128   {
    129     {    0,   64 }, {    0,   64 }, {    0,   64 }
    130   },
    131   {
    132     {    0,   64 }, {    0,   64 }, {    0,   64 }
    133   },
    134   {
    135     {    0,   64 }, {    0,   64 }, {    0,   64 }
    136   }
    137 };
    138 #endif
    139152
    140153// initial probability for skip flag
     
    13241337};
    13251338
    1326 #if HHI_DMM_INTRA
     1339#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    13271340static const Short
    13281341INIT_INTRA_DMM[3][NUM_DMM_CTX][2] =
  • trunk/source/Lib/TLibCommon/SEI.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComAdaptiveLoopFilter.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    278311  m_bUseNonCrossALF = false;
    279312#endif
    280 #if SB_MEM_FIX
    281313  m_bIsCreated = false;
    282 #endif
    283314}
    284315
     
    471502Void TComAdaptiveLoopFilter::create( Int iPicWidth, Int iPicHeight, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth )
    472503{
    473 #if SB_MEM_FIX
    474504  m_bIsCreated = true;
    475 #endif
    476505  if ( !m_pcTempPicYuv )
    477506  {
     
    514543Void TComAdaptiveLoopFilter::destroy()
    515544{
    516 #if SB_MEM_FIX
    517545  m_bIsCreated = false ;
    518 #endif
    519546  if ( m_pcTempPicYuv )
    520547  {
  • trunk/source/Lib/TLibCommon/TComAdaptiveLoopFilter.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    336369  Bool        m_bIsFirstDecodedSlice;
    337370
    338 #if SB_MEM_FIX
    339371  Bool        m_bIsCreated;
    340 #endif
    341372  Void xFilterOneSlice            (CAlfSlice* pSlice, imgpel* pDec, imgpel* pRest, Int iStride, ALFParam* pcAlfParam);
    342373  Void calcVarforOneSlice         (CAlfSlice* pSlice, imgpel **imgY_var, imgpel *imgY_pad, Int pad_size, Int fl, Int img_stride);
     
    408439  Void destroy ();
    409440 
    410 #if SB_MEM_FIX
    411441  Bool isCreated() { return m_bIsCreated;}
    412 #endif
    413442  // alloc & free & set functions
    414443  Void allocALFParam  ( ALFParam* pAlfParam );
  • trunk/source/Lib/TLibCommon/TComBitCounter.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComBitStream.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComBitStream.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComCABACTables.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComCABACTables.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComDataCU.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    2053  m_pcSlice            = NULL;
    2154  m_puhDepth           = NULL;
     55#if HHI_MPI
    2256  m_piTextureModeDepth = NULL;
     57#endif
    2358 
    2459  m_pePartSize         = NULL;
     
    3166  m_pbMergeFlag        = NULL;
    3267  m_puhMergeIndex      = NULL;
     68#if HHI_INTER_VIEW_RESIDUAL_PRED
    3369  m_pbResPredAvailable = NULL;
    3470  m_pbResPredFlag      = NULL;
     71#endif
    3572  for( UInt ui = 0; ui < MRG_MAX_NUM_CANDS; ui++ )
    3673  {
     
    71108#endif//SNY_DQP
    72109
    73 #if HHI_DMM_INTRA
     110#if HHI_DMM_WEDGE_INTRA
    74111  m_puiWedgeFullTabIdx  = NULL;
    75112  m_piWedgeFullDeltaDC1       = NULL;
     
    80117  m_piWedgePredDirDeltaDC2   = NULL;
    81118  m_piWedgePredDirDeltaEnd   = NULL;
    82 
     119#endif
     120#if HHI_DMM_PRED_TEX
    83121  m_puiWedgePredTexTabIdx     = NULL;
    84122  m_piWedgePredTexDeltaDC1    = NULL;
     
    87125  m_piContourPredTexDeltaDC1  = NULL;
    88126  m_piContourPredTexDeltaDC2  = NULL;
    89 
    90   m_pbTextureModesAllowed     = NULL;
    91127#endif
    92128}
     
    108144    m_phQP               = (UChar*    )xMalloc(UChar,    uiNumPartition);
    109145    m_puhDepth           = (UChar*    )xMalloc(UChar,    uiNumPartition);
     146#if HHI_MPI
    110147    m_piTextureModeDepth = (Int*      )xMalloc(Int,      uiNumPartition);
     148#endif
    111149    m_puhWidth           = (UChar*    )xMalloc(UChar,    uiNumPartition);
    112150    m_puhHeight          = (UChar*    )xMalloc(UChar,    uiNumPartition);
     
    118156    m_pbMergeFlag        = (Bool*  )xMalloc(Bool,   uiNumPartition);
    119157    m_puhMergeIndex      = (UChar* )xMalloc(UChar,  uiNumPartition);
     158#if HHI_INTER_VIEW_RESIDUAL_PRED
    120159    m_pbResPredAvailable = (Bool*  )xMalloc(Bool,   uiNumPartition);
    121160    m_pbResPredFlag      = (Bool*  )xMalloc(Bool,   uiNumPartition);
     161#endif
    122162    for( UInt ui = 0; ui < MRG_MAX_NUM_CANDS; ui++ )
    123163    {
     
    147187    m_acCUMvField[1].create( uiNumPartition );
    148188   
    149 #if HHI_DMM_INTRA
    150     m_puiWedgeFullTabIdx  = (UInt*   )xMalloc(UInt,    uiNumPartition);
     189#if HHI_DMM_WEDGE_INTRA
     190    m_puiWedgeFullTabIdx       = (UInt*)xMalloc(UInt, uiNumPartition);
    151191    m_piWedgeFullDeltaDC1       = (Int* )xMalloc(Int,  uiNumPartition);
    152192    m_piWedgeFullDeltaDC2       = (Int* )xMalloc(Int,  uiNumPartition);
     
    156196    m_piWedgePredDirDeltaDC2   = (Int* )xMalloc(Int,  uiNumPartition);
    157197    m_piWedgePredDirDeltaEnd   = (Int* )xMalloc(Int,  uiNumPartition);
    158 
     198#endif
     199#if HHI_DMM_PRED_TEX
    159200    m_puiWedgePredTexTabIdx     = (UInt*)xMalloc(UInt, uiNumPartition);
    160201    m_piWedgePredTexDeltaDC1    = (Int* )xMalloc(Int,  uiNumPartition);
     
    163204    m_piContourPredTexDeltaDC1  = (Int* )xMalloc(Int,  uiNumPartition);
    164205    m_piContourPredTexDeltaDC2  = (Int* )xMalloc(Int,  uiNumPartition);
    165 
    166     m_pbTextureModesAllowed     = (Bool*)xMalloc(Bool, uiNumPartition);
    167206#endif
    168207  }
     
    203242    if ( m_phQP               ) { xFree(m_phQP);                m_phQP              = NULL; }
    204243    if ( m_puhDepth           ) { xFree(m_puhDepth);            m_puhDepth          = NULL; }
     244#if HHI_MPI
    205245    if ( m_piTextureModeDepth ) { xFree(m_piTextureModeDepth);  m_piTextureModeDepth= NULL; }
     246#endif
    206247    if ( m_puhWidth           ) { xFree(m_puhWidth);            m_puhWidth          = NULL; }
    207248    if ( m_puhHeight          ) { xFree(m_puhHeight);           m_puhHeight         = NULL; }
     
    215256    if ( m_pbMergeFlag        ) { xFree(m_pbMergeFlag);         m_pbMergeFlag       = NULL; }
    216257    if ( m_puhMergeIndex      ) { xFree(m_puhMergeIndex);       m_puhMergeIndex     = NULL; }
     258#if HHI_INTER_VIEW_RESIDUAL_PRED
    217259    if ( m_pbResPredAvailable ) { xFree(m_pbResPredAvailable);  m_pbResPredAvailable= NULL; }
    218260    if ( m_pbResPredFlag      ) { xFree(m_pbResPredFlag);       m_pbResPredFlag     = NULL; }
     261#endif
    219262    for( UInt ui = 0; ui < MRG_MAX_NUM_CANDS; ui++ )
    220263    {
     
    235278    m_acCUMvField[1].destroy();
    236279   
    237 #if HHI_DMM_INTRA
     280#if HHI_DMM_WEDGE_INTRA
    238281    if ( m_puiWedgeFullTabIdx  ) { xFree(m_puiWedgeFullTabIdx);   m_puiWedgeFullTabIdx  = NULL; }
    239282    if ( m_piWedgeFullDeltaDC1  ) { xFree(m_piWedgeFullDeltaDC1);   m_piWedgeFullDeltaDC1  = NULL; }
     
    244287    if ( m_piWedgePredDirDeltaDC1 ) { xFree(m_piWedgePredDirDeltaDC1); m_piWedgePredDirDeltaDC1 = NULL; }
    245288    if ( m_piWedgePredDirDeltaDC2 ) { xFree(m_piWedgePredDirDeltaDC2); m_piWedgePredDirDeltaDC2 = NULL; }
    246 
     289#endif
     290#if HHI_DMM_PRED_TEX
    247291    if ( m_puiWedgePredTexTabIdx     ) { xFree(m_puiWedgePredTexTabIdx);     m_puiWedgePredTexTabIdx     = NULL; }
    248292    if ( m_piWedgePredTexDeltaDC1    ) { xFree(m_piWedgePredTexDeltaDC1);    m_piWedgePredTexDeltaDC1    = NULL; }
     
    251295    if ( m_piContourPredTexDeltaDC1  ) { xFree(m_piContourPredTexDeltaDC1);  m_piContourPredTexDeltaDC1  = NULL; }
    252296    if ( m_piContourPredTexDeltaDC2  ) { xFree(m_piContourPredTexDeltaDC2);  m_piContourPredTexDeltaDC2  = NULL; }
    253 
    254     if ( m_pbTextureModesAllowed     ) { xFree(m_pbTextureModesAllowed   );  m_pbTextureModesAllowed     = NULL; }
    255297#endif   
    256298  }
     
    308350  memset( m_pbMergeFlag,        0, iSizeInBool  );
    309351  memset( m_puhMergeIndex,      0, iSizeInUchar );
     352#if HHI_INTER_VIEW_RESIDUAL_PRED
    310353  memset( m_pbResPredAvailable, 0, iSizeInBool  );
    311354  memset( m_pbResPredFlag,      0, iSizeInBool  );
     355#endif
    312356  for( UInt ui = 0; ui < MRG_MAX_NUM_CANDS; ui++ )
    313357  {
     
    322366  memset( m_puhCbf[2],          0, iSizeInUchar );
    323367  memset( m_puhDepth,           0, iSizeInUchar );
     368#if HHI_MPI
    324369  memset( m_piTextureModeDepth,-1, iSizeInInt );
     370#endif
    325371 
    326372  UChar uhWidth  = g_uiMaxCUWidth;
     
    390436  }
    391437
    392 #if HHI_DMM_INTRA
     438#if HHI_DMM_WEDGE_INTRA
    393439  memset( m_puiWedgeFullTabIdx,  0, iSizeInUInt   );
    394440  memset( m_piWedgeFullDeltaDC1,       0, iSizeInInt  );
     
    399445  memset( m_piWedgePredDirDeltaDC2,   0, iSizeInInt  );
    400446  memset( m_piWedgePredDirDeltaEnd,   0, iSizeInInt  );
    401 
     447#endif
     448#if HHI_DMM_PRED_TEX
    402449  memset( m_puiWedgePredTexTabIdx,     0, iSizeInUInt );
    403450  memset( m_piWedgePredTexDeltaDC1,    0, iSizeInInt  );
     
    406453  memset( m_piContourPredTexDeltaDC1,  0, iSizeInInt  );
    407454  memset( m_piContourPredTexDeltaDC2,  0, iSizeInInt  );
    408 
    409   memset( m_pbTextureModesAllowed,  false, iSizeInBool );
    410455#endif   
    411456}
     
    426471  memset( m_pbMergeFlag,        0, iSizeInBool  );
    427472  memset( m_puhMergeIndex,      0, iSizeInUchar );
     473#if HHI_INTER_VIEW_RESIDUAL_PRED
    428474  memset( m_pbResPredAvailable, 0, iSizeInBool  );
    429475  memset( m_pbResPredFlag,      0, iSizeInBool  );
     476#endif
    430477  for( UInt ui = 0; ui < MRG_MAX_NUM_CANDS; ui++ )
    431478  {
     
    461508  m_acCUMvField[1].clearMvField();
    462509
    463 #if HHI_DMM_INTRA
     510#if HHI_DMM_WEDGE_INTRA
    464511  memset( m_puiWedgeFullTabIdx,  0, iSizeInUInt   );
    465512  memset( m_piWedgeFullDeltaDC1,       0, iSizeInInt  );
     
    470517  memset( m_piWedgePredDirDeltaDC2,   0, iSizeInInt  );
    471518  memset( m_piWedgePredDirDeltaEnd,   0, iSizeInInt  );
    472 
     519#endif
     520#if HHI_DMM_PRED_TEX
    473521  memset( m_puiWedgePredTexTabIdx,     0, iSizeInUInt );
    474522  memset( m_piWedgePredTexDeltaDC1,    0, iSizeInInt  );
     
    477525  memset( m_piContourPredTexDeltaDC1,  0, iSizeInInt  );
    478526  memset( m_piContourPredTexDeltaDC2,  0, iSizeInInt  );
    479 
    480   memset( m_pbTextureModesAllowed,  false, iSizeInBool );
    481527#endif   
    482528
     529#if HHI_MPI
    483530  memset( m_piTextureModeDepth, -1, iSizeInInt );
     531#endif
    484532}
    485533
     
    513561  memset( m_pbMergeFlag,        0, iSizeInBool  );
    514562  memset( m_puhMergeIndex,      0, iSizeInUchar );
     563#if HHI_INTER_VIEW_RESIDUAL_PRED
    515564  memset( m_pbResPredAvailable, 0, iSizeInBool  );
    516565  memset( m_pbResPredFlag,      0, iSizeInBool  );
     566#endif
    517567  for( UInt ui = 0; ui < MRG_MAX_NUM_CANDS; ui++ )
    518568  {
     
    527577  memset( m_puhCbf[2],          0, iSizeInUchar );
    528578  memset( m_puhDepth,     uiDepth, iSizeInUchar );
     579#if HHI_MPI
    529580  memset( m_piTextureModeDepth, -1, iSizeInInt );
     581#endif
    530582 
    531583  UChar uhWidth  = g_uiMaxCUWidth  >> uiDepth;
     
    565617  m_uiEntropySliceStartCU   = pcCU->getEntropySliceStartCU();
    566618
    567 #if HHI_DMM_INTRA
     619#if HHI_DMM_WEDGE_INTRA
    568620  memset( m_puiWedgeFullTabIdx,  0, iSizeInUInt   );
    569621  memset( m_piWedgeFullDeltaDC1,       0, iSizeInInt  );
     
    574626  memset( m_piWedgePredDirDeltaDC2,   0, iSizeInInt  );
    575627  memset( m_piWedgePredDirDeltaEnd,   0, iSizeInInt  );
    576 
     628#endif
     629#if HHI_DMM_PRED_TEX
    577630  memset( m_puiWedgePredTexTabIdx,     0, iSizeInUInt );
    578631  memset( m_piWedgePredTexDeltaDC1,    0, iSizeInInt  );
     
    581634  memset( m_piContourPredTexDeltaDC1,  0, iSizeInInt  );
    582635  memset( m_piContourPredTexDeltaDC2,  0, iSizeInInt  );
    583 
    584   memset( m_pbTextureModesAllowed,  false, iSizeInBool );
    585636#endif
    586637}
     
    611662  m_pbMergeFlag         = pcCU->getMergeFlag()        + uiPart;
    612663  m_puhMergeIndex       = pcCU->getMergeIndex()       + uiPart;
     664#if HHI_INTER_VIEW_RESIDUAL_PRED
    613665  m_pbResPredAvailable  = pcCU->getResPredAvail()     + uiPart;
    614666  m_pbResPredFlag       = pcCU->getResPredFlag ()     + uiPart;
     667#endif
    615668  for( UInt ui = 0; ui < MRG_MAX_NUM_CANDS; ui++ )
    616669  {
     
    630683  m_puhWidth=pcCU->getWidth()                     + uiPart;
    631684  m_puhHeight=pcCU->getHeight()                   + uiPart;
     685#if HHI_MPI
    632686  m_piTextureModeDepth=pcCU->getTextureModeDepth()+ uiPart;
     687#endif
    633688 
    634689  m_apiMVPIdx[0]=pcCU->getMVPIdx(REF_PIC_LIST_0)  + uiPart;
     
    667722  m_uiEntropySliceStartCU = pcCU->getEntropySliceStartCU();
    668723
    669 #if HHI_DMM_INTRA
     724#if HHI_DMM_WEDGE_INTRA
    670725  m_puiWedgeFullTabIdx  = pcCU->getWedgeFullTabIdx()  + uiPart;   
    671726  m_piWedgeFullDeltaDC1       = pcCU->getWedgeFullDeltaDC1()      + uiPart;   
     
    676731  m_piWedgePredDirDeltaDC2   = pcCU->getWedgePredDirDeltaDC2()   + uiPart;   
    677732  m_piWedgePredDirDeltaEnd   = pcCU->getWedgePredDirDeltaEnd()   + uiPart;
    678 
     733#endif
     734#if HHI_DMM_PRED_TEX
    679735  m_puiWedgePredTexTabIdx     = pcCU->getWedgePredTexTabIdx()     + uiPart;   
    680736  m_piWedgePredTexDeltaDC1    = pcCU->getWedgePredTexDeltaDC1()   + uiPart;   
     
    683739  m_piContourPredTexDeltaDC1  = pcCU->getContourPredTexDeltaDC1() + uiPart;   
    684740  m_piContourPredTexDeltaDC2  = pcCU->getContourPredTexDeltaDC2() + uiPart;   
    685 
    686   m_pbTextureModesAllowed     = pcCU->getTextureModeAllowance()   + uiPart;   
    687741#endif
    688742}
     
    718772  m_pbMergeFlag        = pcCU->getMergeFlag()             + uiAbsPartIdx;
    719773  m_puhMergeIndex      = pcCU->getMergeIndex()            + uiAbsPartIdx;
     774#if HHI_INTER_VIEW_RESIDUAL_PRED
    720775  m_pbResPredAvailable = pcCU->getResPredAvail()          + uiAbsPartIdx;
    721776  m_pbResPredFlag      = pcCU->getResPredFlag ()          + uiAbsPartIdx;
     777#endif
    722778  for( UInt ui = 0; ui < MRG_MAX_NUM_CANDS; ui ++ )
    723779  {
     
    731787  m_acCUMvField[eRefPicList].setMvdPtr(pcCU->getCUMvField(eRefPicList)->getMvd()    + uiAbsPartIdx);
    732788  m_acCUMvField[eRefPicList].setRefIdxPtr(pcCU->getCUMvField(eRefPicList)->getRefIdx() + uiAbsPartIdx);
     789#if HHI_MPI
    733790  m_piTextureModeDepth = pcCU->getTextureModeDepth() + uiAbsPartIdx;
     791#endif
    734792
    735793  m_uiSliceStartCU        = pcCU->getSliceStartCU();
     
    762820  memcpy( m_pbMergeFlag         + uiOffset, pcCU->getMergeFlag(),         iSizeInBool  );
    763821  memcpy( m_puhMergeIndex       + uiOffset, pcCU->getMergeIndex(),        iSizeInUchar );
     822#if HHI_INTER_VIEW_RESIDUAL_PRED
    764823  memcpy( m_pbResPredAvailable  + uiOffset, pcCU->getResPredAvail(),      iSizeInBool  );
    765824  memcpy( m_pbResPredFlag       + uiOffset, pcCU->getResPredFlag(),       iSizeInBool  );
     825#endif
    766826  for( UInt ui = 0; ui < MRG_MAX_NUM_CANDS; ui++ )
    767827  {
     
    807867  m_uiEntropySliceStartCU = pcCU->getEntropySliceStartCU();
    808868
    809 #if HHI_DMM_INTRA
     869#if HHI_DMM_WEDGE_INTRA
    810870  memcpy( m_puiWedgeFullTabIdx   + uiOffset, pcCU->getWedgeFullTabIdx(),    iSizeInUInt    );
    811871  memcpy( m_piWedgeFullDeltaDC1       + uiOffset, pcCU->getWedgeFullDeltaDC1(),      iSizeInInt  );
     
    816876  memcpy( m_piWedgePredDirDeltaDC2   + uiOffset, pcCU->getWedgePredDirDeltaDC2(),   iSizeInInt  );
    817877  memcpy( m_piWedgePredDirDeltaEnd   + uiOffset, pcCU->getWedgePredDirDeltaEnd(),   iSizeInInt  );
    818 
     878#endif
     879#if HHI_DMM_PRED_TEX
    819880  memcpy( m_puiWedgePredTexTabIdx     + uiOffset, pcCU->getWedgePredTexTabIdx(),     iSizeInUInt );
    820881  memcpy( m_piWedgePredTexDeltaDC1    + uiOffset, pcCU->getWedgePredTexDeltaDC1(),   iSizeInInt  );
     
    823884  memcpy( m_piContourPredTexDeltaDC1  + uiOffset, pcCU->getContourPredTexDeltaDC1(), iSizeInInt  );
    824885  memcpy( m_piContourPredTexDeltaDC2  + uiOffset, pcCU->getContourPredTexDeltaDC2(), iSizeInInt  );
    825 
    826   memcpy( m_pbTextureModesAllowed     + uiOffset, pcCU->getTextureModeAllowance(),   iSizeInBool );
    827 #endif
    828 
     886#endif
     887
     888#if HHI_MPI
    829889  memcpy( m_piTextureModeDepth + uiOffset, pcCU->getTextureModeDepth(), iSizeInInt );
     890#endif
    830891}
    831892
     
    854915  memcpy( rpcCU->getMergeFlag()         + m_uiAbsIdxInLCU, m_pbMergeFlag,         iSizeInBool  );
    855916  memcpy( rpcCU->getMergeIndex()        + m_uiAbsIdxInLCU, m_puhMergeIndex,       iSizeInUchar );
     917#if HHI_INTER_VIEW_RESIDUAL_PRED
    856918  memcpy( rpcCU->getResPredAvail()      + m_uiAbsIdxInLCU, m_pbResPredAvailable,  iSizeInBool  );
    857919  memcpy( rpcCU->getResPredFlag()       + m_uiAbsIdxInLCU, m_pbResPredFlag,       iSizeInBool  );
     920#endif
    858921  for( UInt ui = 0; ui < MRG_MAX_NUM_CANDS; ui++ )
    859922  {
     
    891954  rpcCU->setEntropySliceStartCU( m_uiEntropySliceStartCU );
    892955
    893 #if HHI_DMM_INTRA
     956#if HHI_DMM_WEDGE_INTRA
    894957  memcpy( rpcCU->getWedgeFullTabIdx()  + m_uiAbsIdxInLCU, m_puiWedgeFullTabIdx,  iSizeInUInt   );
    895958  memcpy( rpcCU->getWedgeFullDeltaDC1()      + m_uiAbsIdxInLCU, m_piWedgeFullDeltaDC1,       iSizeInInt  );
     
    900963  memcpy( rpcCU->getWedgePredDirDeltaDC2()   + m_uiAbsIdxInLCU, m_piWedgePredDirDeltaDC2,   iSizeInInt  );
    901964  memcpy( rpcCU->getWedgePredDirDeltaEnd()   + m_uiAbsIdxInLCU, m_piWedgePredDirDeltaEnd,   iSizeInInt  );
    902 
     965#endif
     966#if HHI_DMM_PRED_TEX
    903967  memcpy( rpcCU->getWedgePredTexTabIdx()     + m_uiAbsIdxInLCU, m_puiWedgePredTexTabIdx,     iSizeInUInt );
    904968  memcpy( rpcCU->getWedgePredTexDeltaDC1()   + m_uiAbsIdxInLCU, m_piWedgePredTexDeltaDC1,    iSizeInInt  );
     
    907971  memcpy( rpcCU->getContourPredTexDeltaDC1() + m_uiAbsIdxInLCU, m_piContourPredTexDeltaDC1,  iSizeInInt  );
    908972  memcpy( rpcCU->getContourPredTexDeltaDC2() + m_uiAbsIdxInLCU, m_piContourPredTexDeltaDC2,  iSizeInInt  );
    909 
    910   memcpy( rpcCU->getTextureModeAllowance()   + m_uiAbsIdxInLCU, m_pbTextureModesAllowed,     iSizeInBool  );
    911 #endif
    912 
     973#endif
     974
     975#if HHI_MPI
    913976  memcpy( rpcCU->getTextureModeDepth() + m_uiAbsIdxInLCU, m_piTextureModeDepth, iSizeInInt );
     977#endif
    914978}
    915979
     
    9391003  memcpy( rpcCU->getMergeFlag()         + uiPartOffset, m_pbMergeFlag,         iSizeInBool  );
    9401004  memcpy( rpcCU->getMergeIndex()        + uiPartOffset, m_puhMergeIndex,       iSizeInUchar );
     1005#if HHI_INTER_VIEW_RESIDUAL_PRED
    9411006  memcpy( rpcCU->getResPredAvail()      + uiPartOffset, m_pbResPredAvailable,  iSizeInBool  );
    9421007  memcpy( rpcCU->getResPredFlag()       + uiPartOffset, m_pbResPredFlag,       iSizeInBool  );
     1008#endif
    9431009  for( UInt ui = 0; ui < MRG_MAX_NUM_CANDS; ui++ )
    9441010  {
     
    9751041  rpcCU->setEntropySliceStartCU( m_uiEntropySliceStartCU );
    9761042
    977 #if HHI_DMM_INTRA
     1043#if HHI_DMM_WEDGE_INTRA
    9781044  memcpy( rpcCU->getWedgeFullTabIdx()  + uiPartOffset, m_puiWedgeFullTabIdx,  iSizeInUInt   );
    9791045  memcpy( rpcCU->getWedgeFullDeltaDC1()      + uiPartOffset, m_piWedgeFullDeltaDC1,       iSizeInInt  );
     
    9841050  memcpy( rpcCU->getWedgePredDirDeltaDC2()   + uiPartOffset, m_piWedgePredDirDeltaDC2,   iSizeInInt  );
    9851051  memcpy( rpcCU->getWedgePredDirDeltaEnd()   + uiPartOffset, m_piWedgePredDirDeltaEnd,   iSizeInInt  );
    986 
     1052#endif
     1053#if HHI_DMM_PRED_TEX
    9871054  memcpy( rpcCU->getWedgePredTexTabIdx()     + uiPartOffset, m_puiWedgePredTexTabIdx,     iSizeInUInt );
    9881055  memcpy( rpcCU->getWedgePredTexDeltaDC1()   + uiPartOffset, m_piWedgePredTexDeltaDC1,    iSizeInInt  );
     
    9911058  memcpy( rpcCU->getContourPredTexDeltaDC1() + uiPartOffset, m_piContourPredTexDeltaDC1,  iSizeInInt  );
    9921059  memcpy( rpcCU->getContourPredTexDeltaDC2() + uiPartOffset, m_piContourPredTexDeltaDC2,  iSizeInInt  );
    993 
    994   memcpy( rpcCU->getTextureModeAllowance()   + uiPartOffset, m_pbTextureModesAllowed,     iSizeInBool  );
    995 #endif
    996 
     1060#endif
     1061
     1062#if HHI_MPI
    9971063  memcpy( rpcCU->getTextureModeDepth() + uiPartOffset, m_piTextureModeDepth, iSizeInInt );
     1064#endif
    9981065}
    9991066
     
    13561423}
    13571424
    1358 
    1359 #if HHI_DMM_INTRA
     1425#if HHI_DMM_WEDGE_INTRA
    13601426Void TComDataCU::setWedgeFullTabIdxSubParts( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth )
    13611427{
     
    14271493  }
    14281494}
    1429 
     1495#endif
     1496#if HHI_DMM_PRED_TEX
    14301497Void TComDataCU::setWedgePredTexTabIdxSubParts( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth )
    14311498{
     
    14771544  }
    14781545}
    1479 
    1480 Void TComDataCU::setTextureModeAllowanceSubParts ( Bool bTMAllowed, UInt uiAbsPartIdx, UInt uiDepth )
    1481 {
    1482   UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1);
    1483 
    1484   memset( m_pbTextureModesAllowed + uiAbsPartIdx, bTMAllowed, sizeof(Bool)*uiCurrPartNumb );
    1485 }
    1486 #endif
    1487 
     1546#endif
     1547
     1548#if HHI_INTER_VIEW_MOTION_PRED
    14881549Int
    14891550TComDataCU::getPdmMergeCandidate( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv )
     
    15111572  return pcDepthMapGenerator->getIViewOrgDepthMvPred( this, uiPartIdx, eRefPicList, iRefIdx, rcMv );
    15121573}
    1513 
     1574#endif
     1575
     1576
     1577#if HHI_INTER_VIEW_RESIDUAL_PRED
    15141578Bool
    15151579TComDataCU::getResidualSamples( UInt uiPartIdx, TComYuv* pcYuv )
     
    15191583  return pcResidualGenerator->getResidualSamples( this, uiPartIdx, pcYuv );
    15201584}
     1585#endif
    15211586
    15221587
     
    15331598  mapPlanartoDC( iLeftIntraDir );
    15341599#endif
    1535 #if HHI_DMM_INTRA
     1600#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    15361601  mapDMMtoDC( iLeftIntraDir );
    15371602#endif
     
    15431608  mapPlanartoDC( iAboveIntraDir );
    15441609#endif
    1545 #if HHI_DMM_INTRA
     1610#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    15461611  mapDMMtoDC( iAboveIntraDir );
    15471612#endif
     
    15781643  mapPlanartoDC( iLeftIntraDir );
    15791644#endif
    1580 #if HHI_DMM_INTRA
     1645#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    15811646  mapDMMtoDC( iLeftIntraDir );
    15821647#endif
     
    15881653  mapPlanartoDC( iAboveIntraDir );
    15891654#endif
    1590 #if HHI_DMM_INTRA
     1655#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    15911656  mapDMMtoDC( iAboveIntraDir );
    15921657#endif
     
    16931758}
    16941759
    1695 #if MW_MVI_SIGNALLING_MODE == 0
    1696 UInt TComDataCU::getCtxMvInheritanceFlag( UInt uiAbsPartIdx, UInt uiDepth )
    1697 {
    1698 //  return 0; // MW
    1699   TComDataCU* pcTempCU;
    1700   UInt        uiTempPartIdx;
    1701   UInt        uiCtx;
    1702   // Get left split flag
    1703   pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
    1704   uiCtx  = ( pcTempCU ) ? ( ( pcTempCU->getTextureModeDepth( uiTempPartIdx ) == uiDepth ) ? 1 : 0 ) : 0;
    1705 
    1706   // Get above split flag
    1707   pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
    1708   uiCtx += ( pcTempCU ) ? ( ( pcTempCU->getTextureModeDepth( uiTempPartIdx ) == uiDepth ) ? 1 : 0 ) : 0;
    1709 
    1710   return uiCtx;
    1711 }
    1712 #endif
    1713 
    17141760UInt TComDataCU::getCtxIntraDirChroma( UInt uiAbsPartIdx )
    17151761{
     
    21482194}
    21492195
     2196#if HHI_INTER_VIEW_RESIDUAL_PRED
    21502197Void TComDataCU::setResPredAvailSubParts( Bool bResPredAvailable, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
    21512198{
     
    21572204  setSubPartBool( bResPredFlag, m_pbResPredFlag, uiAbsPartIdx, uiDepth, uiPartIdx );
    21582205}
     2206#endif
    21592207
    21602208Void TComDataCU::setChromIntraDirSubParts( UInt uiDir, UInt uiAbsPartIdx, UInt uiDepth )
     
    26322680{
    26332681  UInt uiAbsPartAddr = m_uiAbsIdxInLCU + uiAbsPartIdx;
     2682#if HHI_INTER_VIEW_MOTION_PRED
    26342683  Bool bNoPdmMerge   = ( m_pcSlice->getSPS()->getViewId() == 0 || ( m_pcSlice->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) != PDM_USE_FOR_MERGE );
    26352684  UInt uiPdmMergePos = ( bNoPdmMerge ? 5 : PDM_MERGE_POS );
     
    26402689  UInt uiCorBLAddr   = ( uiPdmMergePos < 5 ? 5 : 4 );
    26412690  UInt uiPdmAddr     =   uiPdmMergePos;
     2691#else
     2692  UInt uiLeftAddr    = 0;
     2693  UInt uiAboveAddr   = 1;
     2694  UInt uiColocAddr   = 2;
     2695  UInt uiCorRTAddr   = 3;
     2696  UInt uiCorBLAddr   = 4;
     2697#endif
    26422698 
    26432699  bool abCandIsInter[ MRG_MAX_NUM_CANDS ];
     
    30993155
    31003156
     3157#if HHI_INTER_VIEW_MOTION_PRED
    31013158  //===== add merge with predicted depth maps =====
    31023159  TComMv  acPdmMv       [2];
     
    31243181    }
    31253182  }
     3183#endif
    31263184
    31273185
     
    33203378  Int iLeftIdx = -1;
    33213379
     3380#if HHI_INTER_VIEW_MOTION_PRED
    33223381#if ( PDM_AMVP_POS == 0 )
    33233382  // get inter-view mv predictor (at position 0)
     
    33283387    pInfo->m_acMvCand[ pInfo->iN++ ] = cPdmMvPred;
    33293388  }
     3389#endif
    33303390#endif
    33313391
     
    33883448
    33893449
     3450#if HHI_INTER_VIEW_MOTION_PRED
    33903451#if ( PDM_AMVP_POS == 1 )
    33913452  // get inter-view mv predictor (at position 1)
     
    33973458  }
    33983459#endif
    3399 
     3460#endif
    34003461
    34013462 
     
    35953656
    35963657
     3658#if HHI_INTER_VIEW_MOTION_PRED
    35973659#if ( PDM_AMVP_POS == 2 )
    35983660  // get inter-view mv predictor (at position 2)
     
    36043666  }
    36053667#endif
    3606 
     3668#endif
    36073669
    36083670  // Get Temporal Motion Predictor
     
    37543816
    37553817
     3818#if HHI_INTER_VIEW_MOTION_PRED
    37563819#if ( PDM_AMVP_POS == 3 )
    37573820  // get inter-view mv predictor (at position 3)
     
    37633826  }
    37643827#endif
    3765 
     3828#endif
    37663829
    37673830  // Check No MV Candidate
     
    38543917{
    38553918  Int  iMvShift = 2;
    3856 #if MW_DEPTH_MAP_INTERP_FILTER == 2 && MW_FULL_PEL_DEPTH_MAP_MV_SIGNALLING
     3919#if HHI_FULL_PEL_DEPTH_MAP_MV_ACC
    38573920  if( getSlice()->getSPS()->isDepth() )
    38583921    iMvShift = 0;
     
    46764739#endif
    46774740
     4741#if HHI_MPI
    46784742Void TComDataCU::setTextureModeDepthSubParts( Int iTextureModeDepth, UInt uiAbsPartIdx, UInt uiDepth )
    46794743{
     
    46924756  Int iSizeInUchar  = sizeof( UChar ) * uiNumPartition;
    46934757  Int iSizeInInt    = sizeof( Int   ) * uiNumPartition;
    4694 //#if HHI_MRG
    4695 //  Int iSizeInBool   = sizeof( Bool  ) * uiNumPartition;
    4696 //#endif
    4697 
    4698 //  memcpy( m_pePartSize + uiAbsPartIdxDst,  pcCU->getPartitionSize() + uiAbsPartIdxSrc,  sizeof( PartSize ) * uiNumPartition );
     4758
    46994759  memcpy( m_pePredMode + uiAbsPartIdxDst,  pcCU->getPredictionMode() + uiAbsPartIdxSrc, sizeof( PredMode ) * uiNumPartition );
    47004760  memcpy( m_puhInterDir + uiAbsPartIdxDst, pcCU->getInterDir() + uiAbsPartIdxSrc,       iSizeInUchar );
    4701 
    4702 //#if HHI_MRG
    4703 //  m_pbMergeFlag        = pcCU->getMergeFlag()             + uiAbsPartIdx;
    4704 //  m_puhMergeIndex      = pcCU->getMergeIndex()            + uiAbsPartIdx;
    4705 //  for( UInt ui = 0; ui < HHI_NUM_MRG_CAND; ui ++ )
    4706 //  {
    4707 //    m_apuhNeighbourCandIdx[ui] = pcCU->getNeighbourCandIdx( ui ) + uiAbsPartIdx;
    4708 //  }
    4709 //#endif
    47104761
    47114762  memcpy( m_apiMVPIdx[0] + uiAbsPartIdxDst, pcCU->getMVPIdx(REF_PIC_LIST_0) + uiAbsPartIdxSrc, iSizeInInt );
     
    47144765  memcpy( m_apiMVPNum[1] + uiAbsPartIdxDst, pcCU->getMVPNum(REF_PIC_LIST_1) + uiAbsPartIdxSrc, iSizeInInt );
    47154766
    4716 //  m_acCUMvField[0].copyFrom( pcCU->getCUMvField( REF_PIC_LIST_0 ), pcCU->getTotalNumPart(), 0 );
    4717 //  m_acCUMvField[1].copyFrom( pcCU->getCUMvField( REF_PIC_LIST_1 ), pcCU->getTotalNumPart(), 0 );
    4718 
    47194767  pcCU->getCUMvField( REF_PIC_LIST_0 )->copyTo( &m_acCUMvField[0], -Int(uiAbsPartIdxSrc) + uiAbsPartIdxDst, uiAbsPartIdxSrc, uiNumPartition );
    47204768  pcCU->getCUMvField( REF_PIC_LIST_1 )->copyTo( &m_acCUMvField[1], -Int(uiAbsPartIdxSrc) + uiAbsPartIdxDst, uiAbsPartIdxSrc, uiNumPartition );
    4721 #if MW_DEPTH_MAP_INTERP_FILTER == 2 && MW_FULL_PEL_DEPTH_MAP_MV_SIGNALLING
     4769#if HHI_FULL_PEL_DEPTH_MAP_MV_ACC
    47224770  for( UInt ui = 0; ui < uiNumPartition; ui++ )
    47234771  {
     
    47364784#endif
    47374785}
     4786#endif
    47384787
    47394788Void TComDataCU::getPosInPic( UInt uiAbsPartIndex, Int& riPosX, Int& riPosY )
  • trunk/source/Lib/TLibCommon/TComDataCU.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    5184  UChar*        m_puhHeight;          ///< array of heights
    5285  UChar*        m_puhDepth;           ///< array of depths
     86#if HHI_MPI
    5387  Int*          m_piTextureModeDepth; ///< at which depth is prediction data inherited from texture picture ( -1 : none )
     88#endif
    5489 
    5590  // -------------------------------------------------------------------------------------------------------------------
     
    90125  Bool*         m_pbMergeFlag;        ///< array of merge flags
    91126  UChar*        m_puhMergeIndex;      ///< array of merge candidate indices
     127#if HHI_INTER_VIEW_RESIDUAL_PRED
    92128  Bool*         m_pbResPredAvailable; ///< array of residual prediction available flags
    93129  Bool*         m_pbResPredFlag;      ///< array of residual prediction flags
     130#endif
    94131  UChar*        m_apuhNeighbourCandIdx[ MRG_MAX_NUM_CANDS ];///< array of motion vector predictor candidates indices
    95132  UChar*        m_puhLumaIntraDir;    ///< array of intra directions (luma)
     
    100137  UInt*         m_puiAlfCtrlFlag;     ///< array of ALF flags
    101138  UInt*         m_puiTmpAlfCtrlFlag;  ///< temporal array of ALF flags
    102 #if HHI_DMM_INTRA
     139#if HHI_DMM_WEDGE_INTRA
    103140  UInt*         m_puiWedgeFullTabIdx;
    104141  Int*          m_piWedgeFullDeltaDC1;
     
    109146  Int*          m_piWedgePredDirDeltaDC2;
    110147  Int*          m_piWedgePredDirDeltaEnd;
    111 
     148#endif
     149#if HHI_DMM_PRED_TEX
    112150  UInt*         m_puiWedgePredTexTabIdx;
    113151  Int*          m_piWedgePredTexDeltaDC1;
     
    116154  Int*          m_piContourPredTexDeltaDC1;
    117155  Int*          m_piContourPredTexDeltaDC2;
    118 
    119   Bool*         m_pbTextureModesAllowed;
    120156#endif
    121157 
     
    201237  Void          setDepth              ( UInt uiIdx, UChar  uh ) { m_puhDepth[uiIdx] = uh;   }
    202238 
     239#if HHI_MPI
    203240  Int*          getTextureModeDepth   ()                        { return m_piTextureModeDepth; }
    204241  Int           getTextureModeDepth   ( UInt uiIdx )            { return m_piTextureModeDepth[uiIdx]; }
     
    206243  Void          setTextureModeDepthSubParts( Int iTextureModeDepth, UInt uiAbsPartIdx, UInt uiDepth );
    207244  Void          copyTextureMotionDataFrom( TComDataCU* pcCU, UInt uiDepth, UInt uiAbsPartIdxSrc, UInt uiAbsPartIdxDst = 0 );
     245#endif
    208246
    209247  Void          setDepthSubParts      ( UInt uiDepth, UInt uiAbsPartIdx );
     
    291329  Void          setNeighbourCandIdxSubParts ( UInt uiCandIdx, UChar uhNumCands, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
    292330
     331#if HHI_INTER_VIEW_RESIDUAL_PRED
    293332  Bool*         getResPredAvail         ()                        { return m_pbResPredAvailable;        }
    294333  Bool          getResPredAvail         ( UInt uiIdx )            { return m_pbResPredAvailable[uiIdx]; }
     
    302341
    303342  Void          setResPredIndicator     ( Bool bAv, Bool bRP )    { m_pbResPredAvailable[0] = bAv; m_pbResPredFlag[0] = bRP; }
     343#endif
    304344
    305345  Void          setSubPartBool        ( Bool bParameter, Bool* pbBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx );
     
    331371  Void          copyAlfCtrlFlagFromTmp();
    332372 
    333 #if HHI_DMM_INTRA
     373#if HHI_DMM_WEDGE_INTRA
    334374  UInt*         getWedgeFullTabIdx         ()                        { return m_puiWedgeFullTabIdx;        }
    335375  UInt          getWedgeFullTabIdx         ( UInt uiIdx )            { return m_puiWedgeFullTabIdx[uiIdx]; }
     
    366406  Void          setWedgePredDirDeltaEnd        ( UInt uiIdx, Int iD ) { m_piWedgePredDirDeltaEnd[uiIdx] = iD;   }
    367407  Void          setWedgePredDirDeltaEndSubParts( Int iDelta, UInt uiAbsPartIdx, UInt uiDepth );
    368 
     408#endif
     409#if HHI_DMM_PRED_TEX
    369410  UInt*         getWedgePredTexTabIdx       ()                       { return m_puiWedgePredTexTabIdx;           }
    370411  UInt          getWedgePredTexTabIdx       ( UInt uiIdx )           { return m_puiWedgePredTexTabIdx[uiIdx];    }
     
    391432  Void          setContourPredTexDeltaDC2       ( UInt uiIdx, Int i )  { m_piContourPredTexDeltaDC2[uiIdx] = i;      }
    392433  Void          setContourPredTexDeltaDC2SubParts( Int iDC2, UInt uiAbsPartIdx, UInt uiDepth );
    393 
    394   Bool*         getTextureModeAllowance         ()                     { return m_pbTextureModesAllowed;          }
    395   Bool          getTextureModeAllowance         ( UInt uiIdx )         { return m_pbTextureModesAllowed[uiIdx];   }
    396   Void          setTextureModeAllowance         ( UInt uiIdx, Bool b ) { m_pbTextureModesAllowed[uiIdx] = b;      }
    397   Void          setTextureModeAllowanceSubParts ( Bool bTMAllowed, UInt uiAbsPartIdx, UInt uiDepth );
    398 #endif
    399 
     434#endif
     435
     436#if HHI_INTER_VIEW_MOTION_PRED
    400437  Int           getPdmMergeCandidate( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv );
    401438  Bool          getPdmMvPred( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, Bool bMerge = false );
    402439  Bool          getIViewOrgDepthMvPred( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv );
     440#endif
     441#if HHI_INTER_VIEW_RESIDUAL_PRED
    403442  Bool          getResidualSamples( UInt uiPartIdx, TComYuv* pcYuv = 0 );
     443#endif
    404444 
    405445  // -------------------------------------------------------------------------------------------------------------------
     
    517557 
    518558  UInt          getCtxSplitFlag                 ( UInt   uiAbsPartIdx, UInt uiDepth                   );
    519 #if MW_MVI_SIGNALLING_MODE == 0
    520   UInt          getCtxMvInheritanceFlag         ( UInt   uiAbsPartIdx, UInt uiDepth                   );
    521 #endif
    522559  UInt          getCtxCbf                       ( UInt   uiAbsPartIdx, TextType eType, UInt uiTrDepth );
    523560  UInt          getCtxQtCbf                     ( UInt   uiAbsPartIdx, TextType eType, UInt uiTrDepth );
  • trunk/source/Lib/TLibCommon/TComDepthMapGenerator.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    1043#include "TComDepthMapGenerator.h"
    1144
     45
     46#if DEPTH_MAP_GENERATION
    1247
    1348
     
    462497
    463498
     499#if HHI_INTER_VIEW_MOTION_PRED
    464500Void 
    465501TComDepthMapGenerator::covertOrgDepthMap( TComPic* pcPic )
     
    483519  }
    484520}
    485 
     521#endif
    486522
    487523Int
     
    501537
    502538
     539#if HHI_INTER_VIEW_MOTION_PRED
    503540Int
    504541TComDepthMapGenerator::getPdmMergeCandidate( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv )
     
    674711  return        true;
    675712}
    676 
     713#endif
    677714
    678715
     
    14091446}
    14101447
     1448#endif // DEPTH_MAP_GENERATION
     1449
  • trunk/source/Lib/TLibCommon/TComDepthMapGenerator.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    1548#include "TComSlice.h"
    1649
     50
     51#if DEPTH_MAP_GENERATION
    1752
    1853
     
    2964
    3065  UInt      getPdm  ()                            { if( m_aacActiveSPS[0][1] ) { return m_aacActiveSPS[0][1]->getPredDepthMapGeneration(); } return 0; }
     66#if HHI_INTER_VIEW_RESIDUAL_PRED
    3167  UInt      getResPrd ()                          { if( m_aacActiveSPS[0][1] ) { return m_aacActiveSPS[0][1]->getMultiviewResPredMode  (); } return 0; }
     68#endif
    3269
    3370private:
     
    84121  Void  dumpDepthMap          ( TComPic*      pcPic, char* pFilenameBase );
    85122
     123#if HHI_INTER_VIEW_MOTION_PRED
    86124  Void  covertOrgDepthMap     ( TComPic*      pcPic );
     125#endif
    87126
    88127  UInt  getBaseViewId         ( UInt          uiIdx ) { AOF( uiIdx < m_auiBaseIdList.size() );  return m_auiBaseIdList[uiIdx]; }
    89128  Int   getDisparity          ( TComPic*      pcPic, Int iPosX, Int iPosY, UInt uiRefViewId );
     129#if HHI_INTER_VIEW_MOTION_PRED
    90130  Int   getPdmMergeCandidate  ( TComDataCU*   pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv );
    91131  Bool  getPdmMvPred          ( TComDataCU*   pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, Bool bMerge );
    92132  Bool  getIViewOrgDepthMvPred( TComDataCU*   pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv );
     133#endif
    93134
    94135  TComPrediction*   getPrediction ()  { return m_pcPrediction;  }
     
    177218};
    178219
     220
     221#endif // DEPTH_MAP_GENERATION
     222
    179223#endif // __TCOM_DEPTH_MAP_GENERATOR__
    180224
  • trunk/source/Lib/TLibCommon/TComList.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComLoopFilter.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComLoopFilter.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComMVDRefData.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    942#include <fstream>
    1043
     44#if HHI_VSO
    1145Void TComMVDRefData::setPicYuvBaseView( InterViewReference eView, Bool bDepth, TComPicYuv* pcOrgView, TComPicYuv* pcRecView )
    1246{
     
    3165TComMVDRefData::TComMVDRefData()
    3266{
    33 //GT VSO
    3467  m_adERViewShiftLUT = 0;
    3568  m_aiERViewShiftLUT = 0;
    3669  m_apcExternalReferenceViews.resize(0);
    37 //GT VSO end
    3870
    3971  for (UInt uiView = 0; uiView < 3; uiView++)
     
    4476    m_apcDepthRec[uiView] = NULL;
    4577
    46    //GT VSO
    4778    m_adBaseViewShiftLUT [uiView] = NULL;
    4879    m_aiBaseViewShiftLUT [uiView] = NULL;
    49     //GT VSO end
     80
    5081  };
    5182}
    5283
    53 //GT VSO
    5484Void TComMVDRefData::getRefPicYuvAndLUT( TComPicYuv**& rpacDistRefPicList, Int***& rppaiShiftLut )
    5585{
    56   //GT
    57 
    5886  UInt uiNextEntry = 0;
    5987  for ( UInt uiViewIdx = 0; uiViewIdx < m_aiExtViewRefInd.size(); uiViewIdx++ )
     
    78106  rppaiShiftLut[2] = m_aiBaseViewShiftLUT[ NEXTVIEW ];
    79107
    80   //GT: Only orginals of this view needed for Mode 1;
    81108  rpacDistRefPicList[0] = NULL;
    82109  rpacDistRefPicList[1] = NULL;
    83110  rpacDistRefPicList[2] = NULL;
    84111}
    85 //GT VSO end
    86 
    87 
    88 
    89 
    90 //Void TComMVDRefData::render( TComPicYuv* pOut )
    91 ////Void TComMVDRefData::render( TComPicYuv* pIn, TComPicYuv* pOut, TComPicYuv* pDepth, Long** aalLUT )
    92 //{
    93 //
    94 //  std::cout << "InRender" << std::endl;
    95 //
    96 //  TComPicYuv* pIn    = getPicYuvOrgVideo(CURRVIEW);
    97 //  //  TComPicYuv* pOut   = getRecVideo(CURRVIEW);
    98 //  TComPicYuv* pDepth = getPicYuvOrgDepth(CURRVIEW);
    99 //
    100 //  Int** aaiLUT = getShiftLUTIERView(0);
    101 //
    102 //  Int iHeight = (Int) pIn->getHeight();
    103 //  Int iWidth  = (Int) pIn->getWidth();
    104 //
    105 //  Pel* piSourceLumaData = pIn   ->getLumaAddr();
    106 //  Pel* piTargetLumaData = pOut  ->getLumaAddr();
    107 //  Pel* piDepthData      = pDepth->getLumaAddr();
    108 //
    109 //  Int iSourceLumaStride = pIn   ->getStride();
    110 //  Int iTargetLumaStride = pOut  ->getStride();
    111 //  Int      iDepthStride = pDepth->getStride();
    112 //
    113 //
    114 //  for (Int iY = 0; iY < iHeight; iY++)
    115 //  {
    116 //    for (Int iX = 0; iX < iWidth; iX++)
    117 //    {
    118 //      piTargetLumaData[iX] = 0;
    119 //    }
    120 //    piTargetLumaData += iTargetLumaStride;
    121 //  }
    122 //
    123 //  piTargetLumaData = pOut  ->getLumaAddr();
    124 //
    125 //  Int iNewPos;
    126 //  for (Int iY = 0; iY < iHeight; iY++)
    127 //  {
    128 //    for (Int iX = 0; iX < iWidth; iX++)
    129 //    {
    130 //      iNewPos = iX - aaiLUT[0][(piDepthData[iX] >> g_uiBitIncrement)];
    131 //      iNewPos = (iNewPos <  0     ) ? 0          : iNewPos;
    132 //      iNewPos = (iNewPos >= iWidth) ? iWidth - 1 : iNewPos;
    133 //
    134 //      piTargetLumaData[iNewPos] = piSourceLumaData[iX];
    135 //    }
    136 //    piSourceLumaData += iSourceLumaStride;
    137 //    piTargetLumaData += iTargetLumaStride;
    138 //    piDepthData      += iDepthStride;
    139 //  }
    140 //}
    141 //
    142 //
    143 //
    144 //
    145 //TComRendererModel::TComRendererModel()
    146 //{
    147 //  m_pcInputSamples  = NULL;
    148 //  m_pcOutputSamples = NULL;
    149 //  m_ppiShiftLUT    = NULL;
    150 //}
    151 //
    152 //TComRendererModel::~TComRendererModel()
    153 //{
    154 //  if ( m_pcOutputSamples )
    155 //    delete[] m_pcOutputSamples;
    156 //
    157 //  if ( m_pcInputSamples )
    158 //    delete[] m_pcInputSamples;
    159 //
    160 //}
    161 //
    162 //Void TComRendererModel::createModel( TComPicYuv* pcYuvDepth, TComPicYuv* pcYuvVideo, TComPicYuv* pcYuvRef, Int** ppiShiftLUT )
    163 //{
    164 //  createModel(pcYuvDepth->getLumaAddr(), pcYuvDepth->getStride(), pcYuvVideo->getLumaAddr(), pcYuvVideo->getStride(), pcYuvVideo->getCbAddr(), pcYuvVideo->getCrAddr(), pcYuvVideo->getCStride(), pcYuvVideo->getWidth(), pcYuvVideo->getHeight(), ppiShiftLUT );
    165 //}
    166 //
    167 //Void TComRendererModel::createModel( TComPicYuv* pcYuvDepth, TComPicYuv* pcYuvVideo, Int** ppiShiftLUT )
    168 //{
    169 //
    170 //}
    171 //
    172 //Void TComRendererModel::createModel( Pel* pcPelDisp, Int iStrideDisp, Pel* pcPelY, Int iStrideY, Pel* pcPelU, Pel* pcPelV, Int iStrideC, Int iWidth, Int iHeight, Int** ppiShiftLUT )
    173 //{
    174 //
    175 //}
    176 //
    177 //Void TComRendererModel::xCreateRenderedView( Pel* pcPelDisp, Int iDispStride, Pel* pcPelY, Int iLStride, Pel* pcPelU, Pel* pcPelV, Int iCStride, Int iWidth, Int iHeight, Int** ppiShiftLUT,Bool bSAD )
    178 //{
    179 //  m_ppiShiftLUT = ppiShiftLUT;
    180 //  m_iWidth       = iWidth;
    181 //  m_iHeight      = iHeight;
    182 //  m_iStride      = iWidth;
    183 //
    184 //  m_pcOutputSamples = new RendererOutputSample[ iWidth * iHeight];
    185 //  m_pcInputSamples  = new RendererInputSample [ iWidth * iHeight];
    186 //
    187 //  RendererInputSample*  pcInputSamples  = m_pcInputSamples ;
    188 //  RendererOutputSample* pcOutputSamples = m_pcOutputSamples ;
    189 //
    190 //  for ( Int iRow = 0; iRow < iHeight; iRow++ )
    191 //  {
    192 //    for ( Int iCol = 0; iCol < iWidth; iCol++ )
    193 //    {
    194 //      pcInputSamples[iCol].m_uiPosX = iCol;
    195 //      pcInputSamples[iCol].m_uiY    = pcPelY[ iCol ];
    196 //      pcInputSamples[iCol].m_uiU    = pcPelU[ iCol >> 1 ];
    197 //      pcInputSamples[iCol].m_uiV    = pcPelV[ iCol >> 1 ];
    198 //      pcOutputSamples[iCol].m_iErr  = 0;
    199 //
    200 //      pcInputSamples[iCol].m_iPosShifted = iCol + m_ppiShiftLUT[0][ pcPelDisp[ iCol ] ];
    201 //      pcInputSamples[iCol].m_uiDisp      = pcPelDisp[ iCol ];
    202 //
    203 //    }
    204 //
    205 //    pcInputSamples  += m_iStride;
    206 //    pcOutputSamples += m_iStride;
    207 //    pcPelY          += iLStride;
    208 //    pcPelDisp       += iDispStride;
    209 //
    210 //    if ( iRow & 1 )
    211 //    {
    212 //      pcPelU += iCStride;
    213 //      pcPelV += iCStride;
    214 //    }
    215 //
    216 //  }
    217 //
    218 //  m_lErr = 0;
    219 //  Long lDump;
    220 //  changeModel(0,0,m_iWidth, m_iHeight, pcPelDisp, iDispStride, lDump, bSAD);
    221 //}
    222 //
    223 //Void TComRendererModel::changeModel( Int iPosX, Int iPosY, Int iWidth, Int iHeight, Pel* pcPelDisp, Int iDispStride, Long& rlErr, Bool bSAD )
    224 //{
    225 //  RendererInputSample*  pcInputSamples  = m_pcInputSamples ;
    226 //  RendererOutputSample* pcOutputSamples = m_pcOutputSamples ;
    227 //
    228 //  Int iMinChangedPosition = 0;
    229 //  Int iMaxChangedPosition = m_iWidth - 1;
    230 //
    231 //  rlErr = 0;
    232 //
    233 //  for ( Int iRow = iPosX; iRow < iHeight; iRow++ )
    234 //  {
    235 //    // Add and Remove samples (Update Model)
    236 //    for ( Int iCol = iPosY; iCol < iWidth; iCol++ )
    237 //    {
    238 //      // Remove from old position
    239 //      Int iOldPosShifted  = pcInputSamples[iCol].m_iPosShifted;
    240 //
    241 //      iMinChangedPosition = Min( iOldPosShifted, iMinChangedPosition );
    242 //      iMaxChangedPosition = Max( iOldPosShifted, iMaxChangedPosition );
    243 //
    244 //      pcOutputSamples[ iOldPosShifted ].removeInputSample( &(pcInputSamples[iCol]) );
    245 //
    246 //      // Add to new position
    247 //      Int iShift = m_ppiShiftLUT[0][ pcPelDisp[ iCol ] ];
    248 //
    249 //      Int iPosShifted = iPosX + iShift;
    250 //
    251 //      iPosShifted = Min(Max(iPosShifted, 0), m_iWidth - 1);
    252 //      iMinChangedPosition = Min(iPosShifted, iMinChangedPosition);
    253 //      iMaxChangedPosition = Max(iPosShifted, iMaxChangedPosition);
    254 //
    255 //      pcInputSamples[iCol].m_uiDisp = pcPelDisp[ iCol ];
    256 //      pcInputSamples[iCol].m_iPosShifted = iPosShifted;
    257 //
    258 //      pcOutputSamples[ iPosShifted ].addInputSample( &(pcInputSamples[iCol]) );
    259 //    }
    260 //
    261 //    // ReRender
    262 //
    263 //    // Get Top Plane
    264 //    Int iMaxInd = -1;
    265 //
    266 //    if ( pcOutputSamples[iMinChangedPosition].m_pcTopSample )
    267 //    {
    268 //      iMaxInd = pcOutputSamples[iMinChangedPosition].m_pcTopSample->m_uiPosX;
    269 //    }
    270 //
    271 //    if ( iMinChangedPosition > 0 && pcOutputSamples[iMinChangedPosition].m_pcTopSample )
    272 //    {
    273 //      iMaxInd = Max( iMaxInd, pcOutputSamples[iMinChangedPosition-1].m_pcTopSample->m_uiPosX );
    274 //    }
    275 //
    276 //    for ( Int iCol = iMinChangedPosition; iCol <= iMaxChangedPosition; iCol++ )
    277 //    {
    278 //      if ( pcOutputSamples[iCol].m_pcTopSample == NULL )
    279 //      {
    280 //        if ( pcOutputSamples[iCol+1].m_pcTopSample == NULL )
    281 //        {
    282 //          // Hole Filling
    283 //          Int iFillStartCol = iCol;
    284 //          iCol++;
    285 //
    286 //          while( ( pcOutputSamples[iCol].m_pcTopSample == NULL ) && (iMinChangedPosition < iMaxChangedPosition) ) iCol++;
    287 //
    288 //          for ( int iFillCol = iFillStartCol; iFillCol < iCol; iFillCol++ )
    289 //          {
    290 //            pcOutputSamples[iFillCol].assignValues( pcOutputSamples[iCol], rlErr, bSAD );
    291 //          }
    292 //
    293 //          if ( iMaxInd == -1 )
    294 //          {
    295 //            iMaxInd = pcOutputSamples[iCol].m_pcTopSample->m_uiPosX;
    296 //          }
    297 //        }
    298 //        else
    299 //        {
    300 //          // Fill Gap here
    301 //          pcOutputSamples[iCol].assignValues( pcOutputSamples[iCol-1], rlErr, bSAD  );
    302 //
    303 //        };
    304 //      }
    305 //      else
    306 //      {
    307 //        if ( pcOutputSamples[iCol].m_pcTopSample->m_uiPosX > iMaxInd)
    308 //        {
    309 //          iMaxInd = pcOutputSamples[iCol].m_pcTopSample->m_uiPosX;
    310 //
    311 //          //assign this Sample
    312 //          pcOutputSamples[iCol].assignValues( pcOutputSamples[iCol],   rlErr, bSAD );
    313 //        }
    314 //        else
    315 //        {
    316 //          //assign last sample
    317 //          pcOutputSamples[iCol].assignValues( pcOutputSamples[iCol-1], rlErr, bSAD );
    318 //        }
    319 //      }
    320 //    }
    321 //
    322 //    pcInputSamples  += m_iStride;
    323 //    pcPelDisp       += iDispStride;
    324 //
    325 //  }
    326 //}
    327 //
    328 //Void RendererOutputSample::assignValues( RendererOutputSample& rpcOutputSample, Long& rlErr, Bool bSAD )
    329 //{
    330 //  m_uiY = rpcOutputSample.m_uiYRef;
    331 //  m_uiU = rpcOutputSample.m_uiURef;
    332 //  m_uiV = rpcOutputSample.m_uiVRef;
    333 //
    334 //  rlErr -= m_iErr;
    335 //
    336 //  int iErr = m_uiY - m_uiYRef;
    337 //
    338 //  if (bSAD)
    339 //  {
    340 //    rlErr += abs(iErr);
    341 //  }
    342 //  else
    343 //  {
    344 //    rlErr += iErr * iErr;
    345 //  }
    346 //}
    347 //
    348 //Void RendererOutputSample::addInputSample( RendererInputSample* pcInputSample )
    349 //{
    350 //  if ( m_acInputSamples.size() == 0 )
    351 //  {
    352 //    m_acInputSamples.push_back( pcInputSample );
    353 //    m_pcTopSample = pcInputSample;
    354 //    pcInputSample->cIter = m_acInputSamples.begin();
    355 //  }
    356 //  else
    357 //  {
    358 //    std::vector <RendererInputSample*>::iterator cIter;
    359 //
    360 //    for ( cIter = m_acInputSamples.begin( ) ; cIter != m_acInputSamples.end( ) ; cIter++ )
    361 //    {
    362 //      if ( (*cIter)->m_uiPosX <= pcInputSample->m_uiPosX ) break;
    363 //    }
    364 //
    365 //    m_acInputSamples.insert( cIter, 1, pcInputSample );
    366 //
    367 //    pcInputSample->cIter = cIter;
    368 //
    369 //    if ( cIter == m_acInputSamples.begin() )
    370 //    {
    371 //      m_pcTopSample = pcInputSample;
    372 //    }
    373 //  }
    374 //}
    375 //
    376 //RendererOutputSample::RendererOutputSample()
    377 //{
    378 //  m_pcTopSample = 0;
    379 //}
    380 //
    381 //Void RendererOutputSample::removeInputSample( RendererInputSample* pcInputSample )
    382 //{
    383 //  m_acInputSamples.erase( pcInputSample->cIter );
    384 //}
    385 //
     112#endif
  • trunk/source/Lib/TLibCommon/TComMVDRefData.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    437#define __TCOMMVDREFDATA__
    538
     39
    640// Include files
     41
    742#include "CommonDef.h"
    843#include "TComPicYuv.h"
    944#include <vector>
    10 
     45#if HHI_VSO
    1146// ====================================================================================================================
    1247// Class definition
     
    2762  Int**       m_aiBaseViewShiftLUT[3];
    2863
    29 
    30 //GT VSO
    3164  //PicYuvs
    3265  std::vector<TComPicYuv*> m_apcExternalReferenceViews;
     
    4073  std::vector<Int> m_aiExtViewRefInd;
    4174  std::vector<Int> m_aiExtViewRefLUTInd;
    42 
    43 //GT VSO end
    4475
    4576public:
     
    6495//  Void render( TComPicYuv* pOut ) /*Void render( TComPicYuv* pIn, TComPicYuv* pOut, TComPicYuv* pDepth, Long** aalLUT ) */;
    6596
    66 //GT VSO
     97
    6798  //  PicYuvs
    6899  TComPicYuv* getPicYuvERView   ( UInt uiReferenceNum )              { return m_apcExternalReferenceViews[uiReferenceNum]; };
     
    82113  Void getRefPicYuvAndLUT     ( TComPicYuv**& rpacDistRefPicList, Int***& rppalShiftLut);
    83114  Void getRefPicYuvAndLUTMode1( TComPicYuv**& rpacDistRefPicList, Int***& rppaiShiftLut );
    84 //GT VSO end
    85115
    86116}; // END CLASS DEFINITION TComMVDRefData
    87 
     117#endif // HHI_VSO
    88118#endif // __TCOMMVDREFDATA__
    89119
  • trunk/source/Lib/TLibCommon/TComMotionInfo.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComMotionInfo.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComMv.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComPattern.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    91124                                         Int         iOffsetBottom,
    92125                                         UInt        uiPartDepth,
    93                                          UInt        uiAbsPartIdx,
    94                                          Bool        bPrdDepthMap )
     126                                         UInt        uiAbsPartIdx
     127#if DEPTH_MAP_GENERATION
     128                                        ,Bool        bPrdDepthMap
     129#endif
     130                                         )
    95131{
    96132  m_iOffsetLeft   = iOffsetLeft;
     
    104140  UInt uiAbsZorderIdx = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    105141 
     142#if DEPTH_MAP_GENERATION
    106143  TComPicYuv* pcPic = ( bPrdDepthMap ? pcCU->getPic()->getPredDepthMap() : pcCU->getPic()->getPicYuvRec() );
     144#else
     145  TComPicYuv* pcPic = pcCU->getPic()->getPicYuvRec();
     146#endif
    107147  if ( iComp == 0 )
    108148  {
     
    142182}
    143183
    144 Void TComPattern::initPattern( TComDataCU* pcCU, UInt uiPartDepth, UInt uiAbsPartIdx, Bool bPrdDepthMap )
     184Void TComPattern::initPattern( TComDataCU* pcCU, UInt uiPartDepth, UInt uiAbsPartIdx
     185#if DEPTH_MAP_GENERATION
     186                             , Bool bPrdDepthMap
     187#endif
     188                             )
    145189{
    146190  Int   uiOffsetLeft  = 0;
     
    185229#endif
    186230
     231#if DEPTH_MAP_GENERATION
    187232  m_cPatternY .setPatternParamCU( pcCU, 0, uiWidth,      uiHeight,      uiOffsetLeft, uiOffsetRight, uiOffsetAbove, 0, uiPartDepth, uiAbsPartIdx, bPrdDepthMap );
    188233  m_cPatternCb.setPatternParamCU( pcCU, 1, uiWidth >> 1, uiHeight >> 1, uiOffsetLeft, uiOffsetRight, uiOffsetAbove, 0, uiPartDepth, uiAbsPartIdx, bPrdDepthMap );
    189234  m_cPatternCr.setPatternParamCU( pcCU, 2, uiWidth >> 1, uiHeight >> 1, uiOffsetLeft, uiOffsetRight, uiOffsetAbove, 0, uiPartDepth, uiAbsPartIdx, bPrdDepthMap );
    190 }
    191 
    192 Void TComPattern::initAdiPattern( TComDataCU* pcCU, UInt uiZorderIdxInPart, UInt uiPartDepth, Int* piAdiBuf, Int iOrgBufStride, Int iOrgBufHeight, Bool& bAbove, Bool& bLeft, Bool bPrdDepthMap )
     235#else
     236  m_cPatternY .setPatternParamCU( pcCU, 0, uiWidth,      uiHeight,      uiOffsetLeft, uiOffsetRight, uiOffsetAbove, 0, uiPartDepth, uiAbsPartIdx );
     237  m_cPatternCb.setPatternParamCU( pcCU, 1, uiWidth >> 1, uiHeight >> 1, uiOffsetLeft, uiOffsetRight, uiOffsetAbove, 0, uiPartDepth, uiAbsPartIdx );
     238  m_cPatternCr.setPatternParamCU( pcCU, 2, uiWidth >> 1, uiHeight >> 1, uiOffsetLeft, uiOffsetRight, uiOffsetAbove, 0, uiPartDepth, uiAbsPartIdx );
     239#endif
     240}
     241
     242Void TComPattern::initAdiPattern( TComDataCU* pcCU, UInt uiZorderIdxInPart, UInt uiPartDepth, Int* piAdiBuf, Int iOrgBufStride, Int iOrgBufHeight, Bool& bAbove, Bool& bLeft
     243#if DEPTH_MAP_GENERATION
     244                                , Bool bPrdDepthMap
     245#endif
     246                                )
    193247{
    194248  Pel*  piRoiOrigin;
     
    330384  piAdiTemp   = piAdiBuf;
    331385
     386#if DEPTH_MAP_GENERATION
    332387  if( bPrdDepthMap )
    333388  {
     
    338393#endif
    339394  }
    340 
    341 
    342 #if REFERENCE_SAMPLE_PADDING
     395#endif
     396
     397
     398#if REFERENCE_SAMPLE_PADDING
     399#if DEPTH_MAP_GENERATION
    343400  fillReferenceSamples ( pcCU, piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor, iUnitSize, iNumUnitsInCu, iTotalUnits, uiCuWidth, uiCuHeight, uiWidth, uiHeight, iPicStride, bPrdDepthMap );
     401#else
     402  fillReferenceSamples ( pcCU, piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor, iUnitSize, iNumUnitsInCu, iTotalUnits, uiCuWidth, uiCuHeight, uiWidth, uiHeight, iPicStride );
     403#endif
    344404  delete [] bNeighborFlags;
    345405  bNeighborFlags = NULL;
     
    586646
    587647#if REFERENCE_SAMPLE_PADDING
     648#if DEPTH_MAP_GENERATION
    588649  fillReferenceSamples ( pcCU, piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor, iUnitSize, iNumUnitsInCu, iTotalUnits, uiCuWidth, uiCuHeight, uiWidth, uiHeight, iPicStride, false );
     650#else
     651  fillReferenceSamples ( pcCU, piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor, iUnitSize, iNumUnitsInCu, iTotalUnits, uiCuWidth, uiCuHeight, uiWidth, uiHeight, iPicStride );
     652#endif
    589653#else // REFERENCE_SAMPLE_PADDING
    590654  for (i=0;i<uiWidth;i++)
     
    648712 
    649713#if REFERENCE_SAMPLE_PADDING
     714#if DEPTH_MAP_GENERATION
    650715  fillReferenceSamples ( pcCU, piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor, iUnitSize, iNumUnitsInCu, iTotalUnits, uiCuWidth, uiCuHeight, uiWidth, uiHeight, iPicStride, false );
     716#else
     717  fillReferenceSamples ( pcCU, piRoiOrigin, piAdiTemp, bNeighborFlags, iNumIntraNeighbor, iUnitSize, iNumUnitsInCu, iTotalUnits, uiCuWidth, uiCuHeight, uiWidth, uiHeight, iPicStride );
     718#endif
    651719  delete [] bNeighborFlags;
    652720  bNeighborFlags = NULL;
     
    709777
    710778#if REFERENCE_SAMPLE_PADDING
    711 Void TComPattern::fillReferenceSamples( TComDataCU* pcCU, Pel* piRoiOrigin, Int* piAdiTemp, Bool* bNeighborFlags, Int iNumIntraNeighbor, Int iUnitSize, Int iNumUnitsInCu, Int iTotalUnits, UInt uiCuWidth, UInt uiCuHeight, UInt uiWidth, UInt uiHeight, Int iPicStride, Bool bPrdDepthMap )
     779Void TComPattern::fillReferenceSamples( TComDataCU* pcCU, Pel* piRoiOrigin, Int* piAdiTemp, Bool* bNeighborFlags, Int iNumIntraNeighbor, Int iUnitSize, Int iNumUnitsInCu, Int iTotalUnits, UInt uiCuWidth, UInt uiCuHeight, UInt uiWidth, UInt uiHeight, Int iPicStride
     780#if DEPTH_MAP_GENERATION
     781                                        , Bool bPrdDepthMap
     782#endif
     783                                        )
    712784{
    713785  Pel* piRoiTemp;
    714786  Int  i, j;
     787#if DEPTH_MAP_GENERATION
    715788  Int  iDCValue = ( bPrdDepthMap ? PDM_UNDEFINED_DEPTH : ( 1<<( g_uiBitDepth + g_uiBitIncrement - 1) ) );
     789#else
     790  Int  iDCValue = ( 1<<( g_uiBitDepth + g_uiBitIncrement - 1) );
     791#endif
    716792 
    717793  if (iNumIntraNeighbor == 0)
     
    885961
    886962#if QC_MDIS
    887 #if HHI_DISABLE_INTRA_SMOOTHING_DEPTH
    888 Int* TComPattern::getPredictorPtr ( UInt uiDirMode, UInt uiWidthBits, Int iCuWidth, Int iCuHeight, Int* piAdiBuf, Bool bDepth )
    889 #else
    890963Int* TComPattern::getPredictorPtr ( UInt uiDirMode, UInt uiWidthBits, Int iCuWidth, Int iCuHeight, Int* piAdiBuf )
    891 #endif
    892964{
    893965#if MN_MDIS_SIMPLIFICATION
     
    919991  mapPlanartoDC( uiDirMode );
    920992#endif
    921 #if HHI_DISABLE_INTRA_SMOOTHING_DEPTH
    922   UChar ucFiltIdx = 0;
    923   if ( !bDepth )
    924   {
    925     ucFiltIdx = g_aucIntraFilter[uiWidthBits][uiDirMode];
    926   }
    927 #else
    928 #if HHI_DMM_INTRA
     993#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    929994  UChar ucFiltIdx = 0;
    930995  if ( uiDirMode < 34 )
     
    934999#else
    9351000  UChar ucFiltIdx = g_aucIntraFilter[uiWidthBits][uiDirMode];
    936 #endif
    9371001#endif
    9381002
  • trunk/source/Lib/TLibCommon/TComPattern.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    6295                           Int         iOffsetBottom,
    6396                           UInt        uiPartDepth,
    64                            UInt        uiAbsZorderIdx,
    65                            Bool        bPrdDepthMap = false );
     97                           UInt        uiAbsZorderIdx
     98#if DEPTH_MAP_GENERATION
     99                          ,Bool        bPrdDepthMap = false
     100#endif
     101                          );
    66102};
    67103
     
    101137 
    102138#if QC_MDIS
    103 #if HHI_DISABLE_INTRA_SMOOTHING_DEPTH
    104   Int*  getPredictorPtr           ( UInt uiDirMode, UInt uiWidthBits, Int iCuWidth, Int iCuHeight, Int* piAdiBuf, Bool bDepth = false );
    105 #else
    106139  Int*  getPredictorPtr           ( UInt uiDirMode, UInt uiWidthBits, Int iCuWidth, Int iCuHeight, Int* piAdiBuf );
    107 #endif
    108140#endif //QC_MDIS
    109141  // -------------------------------------------------------------------------------------------------------------------
     
    126158  Void  initPattern           ( TComDataCU* pcCU,
    127159                                UInt        uiPartDepth,
    128                                 UInt        uiAbsPartIdx,
    129                                 Bool        bPrdDepthMap = false );
     160                                UInt        uiAbsPartIdx
     161#if DEPTH_MAP_GENERATION
     162                               ,Bool        bPrdDepthMap = false
     163#endif
     164                               );
    130165 
    131166  /// set luma parameters from CU data for accessing ADI data
     
    137172                                Int         iOrgBufHeight,
    138173                                Bool&       bAbove,
    139                                 Bool&       bLeft,
    140                                 Bool        bPrdDepthMap = false );
     174                                Bool&       bLeft
     175#if DEPTH_MAP_GENERATION
     176                               ,Bool        bPrdDepthMap = false
     177#endif
     178                               );
    141179 
    142180  /// set chroma parameters from CU data for accessing ADI data
     
    160198#if REFERENCE_SAMPLE_PADDING
    161199  /// padding of unavailable reference samples for intra prediction
    162   Void  fillReferenceSamples        ( TComDataCU* pcCU, Pel* piRoiOrigin, Int* piAdiTemp, Bool* bNeighborFlags, Int iNumIntraNeighbor, Int iUnitSize, Int iNumUnitsInCu, Int iTotalUnits, UInt uiCuWidth, UInt uiCuHeight, UInt uiWidth, UInt uiHeight, Int iPicStride, Bool bPrdDepthMap );
     200  Void  fillReferenceSamples        ( TComDataCU* pcCU, Pel* piRoiOrigin, Int* piAdiTemp, Bool* bNeighborFlags, Int iNumIntraNeighbor, Int iUnitSize, Int iNumUnitsInCu, Int iTotalUnits, UInt uiCuWidth, UInt uiCuHeight, UInt uiWidth, UInt uiHeight, Int iPicStride
     201#if DEPTH_MAP_GENERATION
     202                                    , Bool bPrdDepthMap
     203#endif
     204                                    );
    163205#endif
    164206#if CONSTRAINED_INTRA_PRED
  • trunk/source/Lib/TLibCommon/TComPic.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    1750  m_apcPicYuv[0]      = NULL;
    1851  m_apcPicYuv[1]      = NULL;
     52#if DEPTH_MAP_GENERATION
    1953  m_pcPredDepthMap    = NULL;
     54#endif
     55#if HHI_INTER_VIEW_MOTION_PRED
    2056  m_pcOrgDepthMap     = NULL;
     57#endif
     58#if HHI_INTER_VIEW_RESIDUAL_PRED
    2159  m_pcResidual        = NULL;
     60#endif
    2261  m_pcPicYuvPred      = NULL;
    2362  m_pcPicYuvResi      = NULL;
     63#if HHI_INTERVIEW_SKIP
    2464  m_pcUsedPelsMap     = NULL;
     65#endif
    2566 
    2667#if PARALLEL_MERGED_DEBLK
     
    76117  }
    77118 
     119#if DEPTH_MAP_GENERATION
    78120  if( m_pcPredDepthMap )
    79121  {
     
    82124    m_pcPredDepthMap = NULL;
    83125  }
    84 
     126#endif
     127
     128#if HHI_INTER_VIEW_MOTION_PRED
    85129  if( m_pcOrgDepthMap )
    86130  {
     
    89133    m_pcOrgDepthMap = NULL;
    90134  }
    91 
     135#endif
     136
     137#if HHI_INTER_VIEW_RESIDUAL_PRED
    92138  if( m_pcResidual )
    93139  {
     
    96142    m_pcResidual = NULL;
    97143  }
    98 
     144#endif
     145
     146#if HHI_INTERVIEW_SKIP
    99147  if( m_pcUsedPelsMap )
    100148  {
     
    103151    m_pcUsedPelsMap = NULL;
    104152  }
     153#endif
    105154
    106155#if PARALLEL_MERGED_DEBLK
     
    160209#endif
    161210
     211#if DEPTH_MAP_GENERATION
    162212Void
    163213TComPic::addPrdDepthMapBuffer()
     
    173223  m_pcPredDepthMap    ->create( iWidth, iHeight, uiMaxCuWidth, uiMaxCuHeight, uiMaxCuDepth );
    174224}
    175 
     225#endif
     226
     227#if HHI_INTER_VIEW_MOTION_PRED
    176228Void
    177229TComPic::addOrgDepthMapBuffer()
     
    187239  m_pcOrgDepthMap     ->create( iWidth, iHeight, uiMaxCuWidth, uiMaxCuHeight, uiMaxCuDepth );
    188240}
    189 
     241#endif
     242
     243#if HHI_INTER_VIEW_RESIDUAL_PRED
    190244Void
    191245TComPic::addResidualBuffer()
     
    201255  m_pcResidual        ->create( iWidth, iHeight, uiMaxCuWidth, uiMaxCuHeight, uiMaxCuDepth );
    202256}
    203 
     257#endif
     258
     259#if HHI_INTERVIEW_SKIP
    204260Void
    205261TComPic::addUsedPelsMapBuffer()
     
    215271  m_pcUsedPelsMap     ->create( iWidth, iHeight, uiMaxCuWidth, uiMaxCuHeight, uiMaxCuDepth );
    216272}
     273#endif
    217274
    218275Void
     
    240297#endif
    241298
     299#if DEPTH_MAP_GENERATION
    242300Void
    243301TComPic::removePrdDepthMapBuffer()
     
    250308  }
    251309}
    252 
     310#endif
     311
     312#if HHI_INTER_VIEW_MOTION_PRED
    253313Void
    254314TComPic::removeOrgDepthMapBuffer()
     
    261321  }
    262322}
    263 
     323#endif
     324
     325#if HHI_INTER_VIEW_RESIDUAL_PRED
    264326Void
    265327TComPic::removeResidualBuffer()
     
    272334  }
    273335}
    274 
     336#endif
     337
     338#if HHI_INTERVIEW_SKIP
    275339Void
    276340TComPic::removeUsedPelsMapBuffer()
     
    283347  }
    284348}
    285 
     349#endif
     350
  • trunk/source/Lib/TLibCommon/TComPic.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    2659private:
    2760  TComPicSym*           m_apcPicSym;              //  Symbol
    28  
     61
    2962  TComPicYuv*           m_apcPicYuv[2];           //  Texture,  0:org / 1:rec
     63#if DEPTH_MAP_GENERATION
    3064  TComPicYuv*           m_pcPredDepthMap;         //  estimated depth map
     65#endif
     66#if HHI_INTER_VIEW_MOTION_PRED
    3167  TComPicYuv*           m_pcOrgDepthMap;          //  original depth map
     68#endif
     69#if HHI_INTER_VIEW_RESIDUAL_PRED
    3270  TComPicYuv*           m_pcResidual;             //  residual buffer (coded or inter-view predicted residual)
    33  
     71#endif
     72
    3473  TComPicYuv*           m_pcPicYuvPred;           //  Prediction
    3574  TComPicYuv*           m_pcPicYuvResi;           //  Residual
     
    3978  Bool                  m_bReconstructed;
    4079  UInt                  m_uiCurrSliceIdx;         // Index of current slice
    41  
     80
    4281  SEImessages* m_SEIs; ///< Any SEI messages that have been received.  If !NULL we own the object.
    4382
    44 //  SB //GT; Why? can be accesed by getSlice()->getXXX?
    4583  SliceType             m_eSliceType;
    4684  double                m_dQP;
     
    5593  Int**                 m_aaiCodedOffset;
    5694
    57   //GT
     95#if HHI_VSO 
    5896  TComMVDRefData        m_cReferenceInfo;
    59   TComPicYuv*           m_pcUsedPelsMap;
     97#endif
     98#if HHI_INTERVIEW_SKIP
     99  TComPicYuv*           m_pcUsedPelsMap;
     100#endif
    60101
    61102
     
    63104  TComPic();
    64105  virtual ~TComPic();
    65  
     106
    66107
    67108  Void          create( Int iWidth, Int iHeight, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth );
    68109  Void          destroy();
    69  
     110
    70111  TComPicSym*   getPicSym()           { return  m_apcPicSym;    }
    71112  TComSlice*    getSlice(Int i)       { return  m_apcPicSym->getSlice(i);  }
     
    78119#endif
    79120  TComDataCU*&  getCU( UInt uiCUAddr )  { return  m_apcPicSym->getCU( uiCUAddr ); }
    80  
    81 // SB
     121
    82122  SliceType     getSliceType()        { return m_eSliceType ;}
    83123  double        getQP()               { return m_dQP ;}
     
    86126  TComPicYuv*   getPicYuvOrg()        { return  m_apcPicYuv[0]; }
    87127  TComPicYuv*   getPicYuvRec()        { return  m_apcPicYuv[1]; }
    88  
     128
     129#if DEPTH_MAP_GENERATION
    89130  TComPicYuv*   getPredDepthMap()     { return  m_pcPredDepthMap; }
     131#endif
     132#if HHI_INTER_VIEW_MOTION_PRED
    90133  TComPicYuv*   getOrgDepthMap()      { return  m_pcOrgDepthMap; }
     134#endif
     135#if HHI_INTER_VIEW_RESIDUAL_PRED
    91136  TComPicYuv*   getResidual()         { return  m_pcResidual; }
     137#endif
     138
     139#if HHI_INTERVIEW_SKIP
    92140  TComPicYuv*   getUsedPelsMap()      { return  m_pcUsedPelsMap; }
     141#endif
    93142
    94143
     
    97146  Void          setPicYuvPred( TComPicYuv* pcPicYuv )       { m_pcPicYuvPred = pcPicYuv; }
    98147  Void          setPicYuvResi( TComPicYuv* pcPicYuv )       { m_pcPicYuvResi = pcPicYuv; }
    99 // SB
    100148  Void          setQP( double dQP )   { m_dQP = dQP; }
    101149  Void          setSliceType( SliceType eSliceType ) { m_eSliceType = eSliceType; }
     
    116164  Int**         getCodedOffset()                      { return m_aaiCodedOffset; }
    117165
    118 //GT
     166#if HHI_VSO
    119167  TComMVDRefData* getMVDReferenceInfo() { return &m_cReferenceInfo; }
    120  
     168#endif
     169
    121170  UInt          getNumCUsInFrame()      { return m_apcPicSym->getNumberOfCUsInFrame(); }
    122171  UInt          getNumPartInWidth()     { return m_apcPicSym->getNumPartInWidth();     }
     
    127176  UInt          getMinCUWidth()         { return m_apcPicSym->getMinCUWidth();         }
    128177  UInt          getMinCUHeight()        { return m_apcPicSym->getMinCUHeight();        }
    129  
     178
    130179  UInt          getParPelX(UChar uhPartIdx) { return getParPelX(uhPartIdx); }
    131180  UInt          getParPelY(UChar uhPartIdx) { return getParPelX(uhPartIdx); }
    132  
     181
    133182  Int           getStride()           { return m_apcPicYuv[1]->getStride(); }
    134183  Int           getCStride()          { return m_apcPicYuv[1]->getCStride(); }
    135  
     184
    136185  Void          setReconMark (Bool b) { m_bReconstructed = b;     }
    137186  Bool          getReconMark ()       { return m_bReconstructed;  }
    138  
     187
    139188#if AMVP_BUFFERCOMPRESS
    140   Void          compressMotion(); 
    141 #endif 
     189  Void          compressMotion();
     190#endif
    142191  UInt          getCurrSliceIdx()            { return m_uiCurrSliceIdx;                }
    143192  Void          setCurrSliceIdx(UInt i)      { m_uiCurrSliceIdx = i;                   }
     
    150199  Void          addDeblockBuffer        ();
    151200#endif
     201#if DEPTH_MAP_GENERATION
    152202  Void          addPrdDepthMapBuffer    ();
     203#endif
     204#if HHI_INTER_VIEW_MOTION_PRED
    153205  Void          addOrgDepthMapBuffer    ();
     206#endif
     207#if HHI_INTER_VIEW_RESIDUAL_PRED
    154208  Void          addResidualBuffer       ();
     209#endif
     210
     211#if HHI_INTERVIEW_SKIP
    155212  Void          addUsedPelsMapBuffer    ();
    156  
     213#endif
     214
    157215  Void          removeOriginalBuffer    ();
    158216#if PARALLEL_MERGED_DEBLK
    159217  Void          removeDeblockBuffer     ();
    160218#endif
     219#if DEPTH_MAP_GENERATION
    161220  Void          removePrdDepthMapBuffer ();
     221#endif
     222#if HHI_INTER_VIEW_MOTION_PRED
    162223  Void          removeOrgDepthMapBuffer ();
     224#endif
     225#if HHI_INTER_VIEW_RESIDUAL_PRED
    163226  Void          removeResidualBuffer    ();
     227#endif
     228#if HHI_INTERVIEW_SKIP
    164229  Void          removeUsedPelsMapBuffer ();
    165  
     230#endif
     231
    166232#if PARALLEL_MERGED_DEBLK
    167233  TComPicYuv*   getPicYuvDeblkBuf()      { return  m_pcPicYuvDeblkBuf; }
  • trunk/source/Lib/TLibCommon/TComPicSym.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComPicYuv.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComPicYuvMD5.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComPredFilter.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComPredFilter.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComPrediction.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    268301
    269302#if QC_MDIS
    270 #if HHI_DISABLE_INTRA_SMOOTHING_DEPTH
    271   ptrSrc = pcTComPattern->getPredictorPtr( uiDirMode, g_aucConvertToBit[ iWidth ] + 1, iWidth, iHeight, m_piYuvExt, pcCU->getSlice()->getSPS()->isDepth() );
    272 #else
    273303  ptrSrc = pcTComPattern->getPredictorPtr( uiDirMode, g_aucConvertToBit[ iWidth ] + 1, iWidth, iHeight, m_piYuvExt );
    274 #endif
    275304#else
    276305  ptrSrc = pcTComPattern->getAdiOrgBuf( iWidth, iHeight, m_piYuvExt );
     
    433462}
    434463
    435 #if HHI_DMM_INTRA
     464#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    436465Void TComPrediction::predIntraLumaDMM( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bAbove, Bool bLeft, Bool bEncoder )
    437466{
     467#if HHI_DMM_WEDGE_INTRA
    438468  if( uiMode == DMM_WEDGE_FULL_IDX          ) { xPredIntraWedgeFull      ( pcCU, uiAbsPartIdx, piPred, uiStride, iWidth, iHeight, bAbove, bLeft, bEncoder, false, pcCU->getWedgeFullTabIdx ( uiAbsPartIdx ) ); }
    439469  if( uiMode == DMM_WEDGE_FULL_D_IDX        ) { xPredIntraWedgeFull      ( pcCU, uiAbsPartIdx, piPred, uiStride, iWidth, iHeight, bAbove, bLeft, bEncoder, true,  pcCU->getWedgeFullTabIdx( uiAbsPartIdx ), pcCU->getWedgeFullDeltaDC1( uiAbsPartIdx ), pcCU->getWedgeFullDeltaDC2( uiAbsPartIdx ) ); }
    440470  if( uiMode == DMM_WEDGE_PREDDIR_IDX     ) { xPredIntraWedgeDir       ( pcCU, uiAbsPartIdx, piPred, uiStride, iWidth, iHeight, bAbove, bLeft, bEncoder, false, pcCU->getWedgePredDirDeltaEnd( uiAbsPartIdx ) ); }
    441471  if( uiMode == DMM_WEDGE_PREDDIR_D_IDX   ) { xPredIntraWedgeDir       ( pcCU, uiAbsPartIdx, piPred, uiStride, iWidth, iHeight, bAbove, bLeft, bEncoder, true,  pcCU->getWedgePredDirDeltaEnd( uiAbsPartIdx ), pcCU->getWedgePredDirDeltaDC1( uiAbsPartIdx ), pcCU->getWedgePredDirDeltaDC2( uiAbsPartIdx ) ); }
     472#endif
     473#if HHI_DMM_PRED_TEX
    442474  if( uiMode == DMM_WEDGE_PREDTEX_IDX       ) { xPredIntraWedgeTex       ( pcCU, uiAbsPartIdx, piPred, uiStride, iWidth, iHeight, bAbove, bLeft, bEncoder, false ); }
    443475  if( uiMode == DMM_WEDGE_PREDTEX_D_IDX     ) { xPredIntraWedgeTex       ( pcCU, uiAbsPartIdx, piPred, uiStride, iWidth, iHeight, bAbove, bLeft, bEncoder, true, pcCU->getWedgePredTexDeltaDC1( uiAbsPartIdx ), pcCU->getWedgePredTexDeltaDC2( uiAbsPartIdx ) ); }
    444476  if( uiMode == DMM_CONTOUR_PREDTEX_IDX     ) { xPredIntraContourTex     ( pcCU, uiAbsPartIdx, piPred, uiStride, iWidth, iHeight, bAbove, bLeft, bEncoder, false ); }
    445477  if( uiMode == DMM_CONTOUR_PREDTEX_D_IDX   ) { xPredIntraContourTex     ( pcCU, uiAbsPartIdx, piPred, uiStride, iWidth, iHeight, bAbove, bLeft, bEncoder, true, pcCU->getContourPredTexDeltaDC1( uiAbsPartIdx ), pcCU->getContourPredTexDeltaDC2( uiAbsPartIdx ) ); }
    446   }
     478#endif
     479}
    447480
    448481Void TComPrediction::xDeltaDCQuantScaleUp( TComDataCU* pcCU, Int& riDeltaDC )
     
    459492}
    460493
    461 Void TComPrediction::xPredIntraWedgeFull( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bAbove, Bool bLeft, Bool bEncoder, Bool bDelta, UInt uiTabIdx, Int iDeltaDC1, Int iDeltaDC2 )
    462 {
    463   assert( iWidth >= DMM_WEDGEMODEL_MIN_SIZE && iWidth <= DMM_WEDGEMODEL_MAX_SIZE );
    464   WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[iWidth])];
    465   TComWedgelet* pcWedgelet = &(pacWedgeList->at(uiTabIdx));
    466 
    467   // get wedge pred DCs
    468   Int iPredDC1 = 0;
    469   Int iPredDC2 = 0;
    470 
    471   Int* piMask = pcCU->getPattern()->getAdiOrgBuf( iWidth, iHeight, m_piYuvExt );
    472   Int iMaskStride = ( iWidth<<1 ) + 1;
    473   piMask += iMaskStride+1;
    474   getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
    475 
    476   if( bDelta )
    477   {
    478     xDeltaDCQuantScaleUp( pcCU, iDeltaDC1 );
    479     xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
    480   }
    481 
    482   // assign wedge pred DCs to prediction
    483   if( bDelta ) { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, Clip( iPredDC1+iDeltaDC1 ), Clip( iPredDC2+iDeltaDC2 ) ); }
    484   else         { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, iPredDC1,           iPredDC2           ); }
    485 }
    486 
    487 Void TComPrediction::getWedgePredDCs( TComWedgelet* pcWedgelet, Int* piMask, Int iMaskStride, Int& riPredDC1, Int& riPredDC2, Bool bAbove, Bool bLeft )
    488 {
    489   riPredDC1 = ( 1<<( g_uiBitDepth + g_uiBitIncrement - 1) ); //pred val, if no neighbors are available
    490   riPredDC2 = ( 1<<( g_uiBitDepth + g_uiBitIncrement - 1) );
    491 
    492   if( !bAbove && !bLeft ) { return; }
    493 
    494   UInt uiNumSmpDC1 = 0, uiNumSmpDC2 = 0;
    495   Int iPredDC1 = 0, iPredDC2 = 0;
    496 
    497   Bool* pabWedgePattern = pcWedgelet->getPattern();
    498   UInt  uiWedgeStride   = pcWedgelet->getStride();
    499 
    500   if( bAbove )
    501   {
    502     for( Int k = 0; k < pcWedgelet->getWidth(); k++ )
    503     {
    504       if( true == pabWedgePattern[k] )
    505       {
    506         iPredDC2 += piMask[k-iMaskStride];
    507         uiNumSmpDC2++;
    508       }
    509       else
    510       {
    511         iPredDC1 += piMask[k-iMaskStride];
    512         uiNumSmpDC1++;
    513       }
    514     }
    515   }
    516   if( bLeft )
    517   {
    518     for( Int k = 0; k < pcWedgelet->getHeight(); k++ )
    519     {
    520       if( true == pabWedgePattern[k*uiWedgeStride] )
    521       {
    522         iPredDC2 += piMask[k*iMaskStride-1];
    523         uiNumSmpDC2++;
    524       }
    525       else
    526       {
    527         iPredDC1 += piMask[k*iMaskStride-1];
    528         uiNumSmpDC1++;
    529       }
    530     }
    531   }
    532 
    533   if( uiNumSmpDC1 > 0 )
    534   {
    535     iPredDC1 /= uiNumSmpDC1;
    536     riPredDC1 = iPredDC1;
    537   }
    538   if( uiNumSmpDC2 > 0 )
    539   {
    540     iPredDC2 /= uiNumSmpDC2;
    541     riPredDC2 = iPredDC2;
    542   }
    543 }
    544 
    545 Void TComPrediction::getBestContourFromText( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, TComWedgelet* pcContourWedge )
    546 {
    547   pcContourWedge->clear();
    548   Bool* pabContourPattern = pcContourWedge->getPattern();
    549 
    550   // get copy of according texture luma block
    551   UInt uiPartAddr = 0;
    552   Int  iBlockWidth, iBlockHeight;
    553 
    554   pcCU->getPartIndexAndSize( uiAbsPartIdx, uiPartAddr, iBlockWidth, iBlockHeight );
    555 
    556   TComPicYuv* pcPicYuvRef = pcCU->getSlice()->getTexturePic()->getPicYuvRec();
    557   Int     iRefStride = pcPicYuvRef->getStride();
    558   Pel*    piRefY     = pcPicYuvRef->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr );
    559 
    560   TComYuv cTempYuv; cTempYuv.create( pcCU->getWidth(0), pcCU->getHeight(0) ); cTempYuv.clear();
    561   UInt uiTempStride = cTempYuv.getStride();
    562   Pel* piTempY      = cTempYuv.getLumaAddr( uiAbsPartIdx, uiWidth );
    563 
    564   for ( Int y = 0; y < iBlockHeight; y++ )
    565   {
    566     ::memcpy(piTempY, piRefY, sizeof(Pel)*iBlockWidth);
    567     piTempY += uiTempStride;
    568     piRefY += iRefStride;
    569   }
    570   piTempY = cTempYuv.getLumaAddr( uiAbsPartIdx, uiWidth );
    571 
    572   // find contour for texture luma block
    573   UInt iDC = 0;
    574   for( UInt k = 0; k < (iBlockWidth*iBlockHeight); k++ ) { iDC += piTempY[k]; }
    575   iDC /= (iBlockWidth*iBlockHeight);
    576 
    577   for( UInt k = 0; k < (iBlockWidth*iBlockHeight); k++ )
    578   {
    579     pabContourPattern[k] = (piTempY[k] > iDC) ? true : false;
    580   }
    581 
    582   cTempYuv.destroy();
    583 }
    584 
    585 UInt TComPrediction::getBestContinueWedge( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Int iDeltaEnd )
    586 {
    587   UInt uiThisBlockSize = uiWidth;
    588   assert( uiThisBlockSize >= DMM_WEDGEMODEL_MIN_SIZE && uiThisBlockSize <= DMM_WEDGEMODEL_MAX_SIZE );
    589   WedgeList*    pacContDWedgeList    = &g_aacWedgeLists   [(g_aucConvertToBit[uiThisBlockSize])];
    590   WedgeRefList* pacContDWedgeRefList = &g_aacWedgeRefLists[(g_aucConvertToBit[uiThisBlockSize])];
    591 
    592   UInt uiPredDirWedgeTabIdx = 0;
    593   TComDataCU* pcTempCU;
    594   UInt        uiTempPartIdx;
    595   // 1st: try continue above wedgelet
    596   pcTempCU = pcCU->getPUAbove( uiTempPartIdx, pcCU->getZorderIdxInCU() + uiAbsPartIdx );
    597   if( pcTempCU )
    598   {
    599     UChar uhLumaIntraDir = pcTempCU->getLumaIntraDir( uiTempPartIdx );
    600     if( DMM_WEDGE_FULL_IDX      == uhLumaIntraDir ||
    601         DMM_WEDGE_FULL_D_IDX    == uhLumaIntraDir ||
    602         DMM_WEDGE_PREDDIR_IDX   == uhLumaIntraDir ||
    603         DMM_WEDGE_PREDDIR_D_IDX == uhLumaIntraDir ||
    604         DMM_WEDGE_PREDTEX_IDX   == uhLumaIntraDir ||
    605         DMM_WEDGE_PREDTEX_D_IDX == uhLumaIntraDir    )
    606     {
    607       UInt uiRefWedgeSize = (UInt)g_aucIntraSizeIdxToWedgeSize[pcTempCU->getIntraSizeIdx( uiTempPartIdx )];
    608       WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiRefWedgeSize])];
    609 
    610       // get offset between current and reference block
    611       UInt uiOffsetX = 0;
    612       UInt uiOffsetY = 0;
    613       xGetBlockOffset( pcCU, uiAbsPartIdx, pcTempCU, uiTempPartIdx, uiOffsetX, uiOffsetY );
    614 
    615       // get reference wedgelet
    616   UInt uiRefWedgeTabIdx = 0;
    617       switch( uhLumaIntraDir )
    618       {
    619       case( DMM_WEDGE_FULL_IDX      ): { uiRefWedgeTabIdx = pcTempCU->getWedgeFullTabIdx   ( uiTempPartIdx ); } break;
    620       case( DMM_WEDGE_FULL_D_IDX    ): { uiRefWedgeTabIdx = pcTempCU->getWedgeFullTabIdx   ( uiTempPartIdx ); } break;
    621       case( DMM_WEDGE_PREDDIR_IDX   ): { uiRefWedgeTabIdx = pcTempCU->getWedgePredDirTabIdx( uiTempPartIdx ); } break;
    622       case( DMM_WEDGE_PREDDIR_D_IDX ): { uiRefWedgeTabIdx = pcTempCU->getWedgePredDirTabIdx( uiTempPartIdx ); } break;
    623       case( DMM_WEDGE_PREDTEX_IDX   ): { uiRefWedgeTabIdx = pcTempCU->getWedgePredTexTabIdx( uiTempPartIdx ); } break;
    624       case( DMM_WEDGE_PREDTEX_D_IDX ): { uiRefWedgeTabIdx = pcTempCU->getWedgePredTexTabIdx( uiTempPartIdx ); } break;
    625       default: { assert( 0 ); return uiPredDirWedgeTabIdx; }
    626       }
    627       TComWedgelet* pcRefWedgelet;
    628       pcRefWedgelet = &(pacWedgeList->at( uiRefWedgeTabIdx ));
    629      
    630       // find reference wedgelet, if direction is suitable for continue wedge
    631       if( pcRefWedgelet->checkPredDirAbovePossible( uiThisBlockSize, uiOffsetX ) )
    632       {
    633         UChar uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye;
    634         pcRefWedgelet->getPredDirStartEndAbove( uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye, uiThisBlockSize, uiOffsetX, iDeltaEnd );
    635         getWedgeListIdx( pacContDWedgeList, pacContDWedgeRefList, uiPredDirWedgeTabIdx, uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye );
    636         return uiPredDirWedgeTabIdx;
    637       }
    638     }
    639   }
    640 
    641   // 2nd: try continue left wedglelet
    642   pcTempCU = pcCU->getPULeft( uiTempPartIdx, pcCU->getZorderIdxInCU() + uiAbsPartIdx );
    643   if( pcTempCU )
    644   {
    645   UChar uhLumaIntraDir = pcTempCU->getLumaIntraDir( uiTempPartIdx );
    646   if( DMM_WEDGE_FULL_IDX          == uhLumaIntraDir ||
    647       DMM_WEDGE_FULL_D_IDX        == uhLumaIntraDir ||
    648         DMM_WEDGE_PREDDIR_IDX   == uhLumaIntraDir ||
    649         DMM_WEDGE_PREDDIR_D_IDX == uhLumaIntraDir ||
    650       DMM_WEDGE_PREDTEX_IDX       == uhLumaIntraDir ||
    651       DMM_WEDGE_PREDTEX_D_IDX     == uhLumaIntraDir    )
    652   {
    653       UInt uiRefWedgeSize = (UInt)g_aucIntraSizeIdxToWedgeSize[pcTempCU->getIntraSizeIdx( uiTempPartIdx )];
    654       WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiRefWedgeSize])];
    655 
    656       // get offset between current and reference block
    657       UInt uiOffsetX = 0;
    658       UInt uiOffsetY = 0;
    659       xGetBlockOffset( pcCU, uiAbsPartIdx, pcTempCU, uiTempPartIdx, uiOffsetX, uiOffsetY );
    660 
    661       // get reference wedgelet
    662       UInt uiRefWedgeTabIdx = 0;
    663       switch( uhLumaIntraDir )
    664       {
    665       case( DMM_WEDGE_FULL_IDX      ): { uiRefWedgeTabIdx = pcTempCU->getWedgeFullTabIdx   ( uiTempPartIdx ); } break;
    666       case( DMM_WEDGE_FULL_D_IDX    ): { uiRefWedgeTabIdx = pcTempCU->getWedgeFullTabIdx   ( uiTempPartIdx ); } break;
    667       case( DMM_WEDGE_PREDDIR_IDX   ): { uiRefWedgeTabIdx = pcTempCU->getWedgePredDirTabIdx( uiTempPartIdx ); } break;
    668       case( DMM_WEDGE_PREDDIR_D_IDX ): { uiRefWedgeTabIdx = pcTempCU->getWedgePredDirTabIdx( uiTempPartIdx ); } break;
    669       case( DMM_WEDGE_PREDTEX_IDX   ): { uiRefWedgeTabIdx = pcTempCU->getWedgePredTexTabIdx( uiTempPartIdx ); } break;
    670       case( DMM_WEDGE_PREDTEX_D_IDX ): { uiRefWedgeTabIdx = pcTempCU->getWedgePredTexTabIdx( uiTempPartIdx ); } break;
    671       default: { assert( 0 ); return uiPredDirWedgeTabIdx; }
    672       }
    673       TComWedgelet* pcRefWedgelet;
    674       pcRefWedgelet = &(pacWedgeList->at( uiRefWedgeTabIdx ));
    675 
    676       // find reference wedgelet, if direction is suitable for continue wedge
    677       if( pcRefWedgelet->checkPredDirLeftPossible( uiThisBlockSize, uiOffsetY ) )
    678       {
    679         UChar uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye;
    680         pcRefWedgelet->getPredDirStartEndLeft( uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye, uiThisBlockSize, uiOffsetY, iDeltaEnd );
    681         getWedgeListIdx( pacContDWedgeList, pacContDWedgeRefList, uiPredDirWedgeTabIdx, uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye );
    682         return uiPredDirWedgeTabIdx;
    683       }
    684     }
    685   }
    686 
    687   // 3rd: (default) make wedglet from intra dir and max slope point
    688   Int iSlopeX = 0;
    689   Int iSlopeY = 0;
    690   UInt uiStartPosX = 0;
    691   UInt uiStartPosY = 0;
    692   if( xGetWedgeIntraDirPredData( pcCU, uiAbsPartIdx, uiThisBlockSize, iSlopeX, iSlopeY, uiStartPosX, uiStartPosY ) )
    693   {
    694     UChar uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye;
    695     xGetWedgeIntraDirStartEnd( pcCU, uiAbsPartIdx, uiThisBlockSize, iSlopeX, iSlopeY, uiStartPosX, uiStartPosY, uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye, iDeltaEnd );
    696     getWedgeListIdx( pacContDWedgeList, pacContDWedgeRefList, uiPredDirWedgeTabIdx, uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye );
    697     return uiPredDirWedgeTabIdx;
    698   }
    699 
    700   return uiPredDirWedgeTabIdx;
    701 }
    702 
    703 Void TComPrediction::xGetBlockOffset( TComDataCU* pcCU, UInt uiAbsPartIdx, TComDataCU* pcRefCU, UInt uiRefAbsPartIdx, UInt& ruiOffsetX, UInt& ruiOffsetY )
    704 {
    705   ruiOffsetX = 0;
    706   ruiOffsetY = 0;
    707 
    708     // get offset between current and above/left block
    709     UInt uiThisOriginX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
    710   UInt uiThisOriginY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
    711 
    712   UInt uiNumPartInRefCU = pcRefCU->getTotalNumPart();
    713     UInt uiMaxDepthRefCU = 0;
    714     while( uiNumPartInRefCU > 1 )
    715     {
    716       uiNumPartInRefCU >>= 2;
    717       uiMaxDepthRefCU++;
    718     }
    719 
    720   UInt uiDepthRefPU = (pcRefCU->getDepth(uiRefAbsPartIdx)) + (pcRefCU->getPartitionSize(uiRefAbsPartIdx) == SIZE_2Nx2N ? 0 : 1);
    721     UInt uiShifts = (uiMaxDepthRefCU - uiDepthRefPU)*2;
    722   UInt uiRefBlockOriginPartIdx = (uiRefAbsPartIdx>>uiShifts)<<uiShifts;
    723 
    724   UInt uiRefOriginX = pcRefCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiRefBlockOriginPartIdx] ];
    725   UInt uiRefOriginY = pcRefCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiRefBlockOriginPartIdx] ];
    726 
    727   if( (uiThisOriginX - uiRefOriginX) > 0 ) { ruiOffsetX = (UInt)(uiThisOriginX - uiRefOriginX); }
    728   if( (uiThisOriginY - uiRefOriginY) > 0 ) { ruiOffsetY = (UInt)(uiThisOriginY - uiRefOriginY); }
    729 }
    730 
    731 Bool TComPrediction::xGetWedgeIntraDirPredData( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiBlockSize, Int& riSlopeX, Int& riSlopeY, UInt& ruiStartPosX, UInt& ruiStartPosY )
    732 {
    733   riSlopeX     = 0;
    734   riSlopeY     = 0;
    735   ruiStartPosX = 0;
    736   ruiStartPosY = 0;
    737 
    738   // 1st step: get wedge start point (max. slope)
    739   Int* piSource = pcCU->getPattern()->getAdiOrgBuf( uiBlockSize, uiBlockSize, m_piYuvExt );
    740   Int iSourceStride = ( uiBlockSize<<1 ) + 1;
    741 
    742   UInt uiSlopeMaxAbove = 0;
    743   UInt uiPosSlopeMaxAbove = 0;
    744   for( UInt uiPosHor = 0; uiPosHor < (uiBlockSize-1); uiPosHor++ )
    745   {
    746     if( abs( piSource[uiPosHor+1] - piSource[uiPosHor] ) > uiSlopeMaxAbove )
    747     {
    748       uiSlopeMaxAbove = abs( piSource[uiPosHor+1] - piSource[uiPosHor] );
    749       uiPosSlopeMaxAbove = uiPosHor;
    750     }
    751   }
    752 
    753   UInt uiSlopeMaxLeft = 0;
    754   UInt uiPosSlopeMaxLeft = 0;
    755   for( UInt uiPosVer = 0; uiPosVer < (uiBlockSize-1); uiPosVer++ )
    756   {
    757     if( abs( piSource[(uiPosVer+1)*iSourceStride] - piSource[uiPosVer*iSourceStride] ) > uiSlopeMaxLeft )
    758     {
    759       uiSlopeMaxLeft = abs( piSource[(uiPosVer+1)*iSourceStride] - piSource[uiPosVer*iSourceStride] );
    760       uiPosSlopeMaxLeft = uiPosVer;
    761     }
    762   }
    763 
    764   if( uiSlopeMaxAbove == 0 && uiSlopeMaxLeft == 0 )
    765   {
    766     return false;
    767   }
    768 
    769   if( uiSlopeMaxAbove > uiSlopeMaxLeft )
    770   {
    771     ruiStartPosX = uiPosSlopeMaxAbove;
    772     ruiStartPosY = 0;
    773   }
    774   else
    775   {
    776     ruiStartPosX = 0;
    777     ruiStartPosY = uiPosSlopeMaxLeft;
    778   }
    779 
    780   // 2nd step: derive wedge direction
    781   Int angTable[9] = {0,2,5,9,13,17,21,26,32};
    782 
    783   Int uiPreds[2] = {-1, -1};
    784   Int uiPredNum = pcCU->getIntraDirLumaPredictor( uiAbsPartIdx, uiPreds );
    785 
    786   UInt uiDirMode = 0;
    787   if( uiPredNum == 1 )
    788   {
    789     uiDirMode = g_aucAngIntraModeOrder[uiPreds[0]];
    790   }
    791   else if( uiPredNum == 2 )
    792   {
    793     uiDirMode = g_aucAngIntraModeOrder[uiPreds[1]];
    794   }
    795 
    796   if( uiDirMode == 0 )
    797   {
    798     return false;
    799   }
    800 
    801   Bool modeVer       = (uiDirMode < 18);
    802   Bool modeHor       = !modeVer;
    803   Int intraPredAngle = modeVer ? uiDirMode - 9 : modeHor ? uiDirMode - 25 : 0;
    804   Int absAng         = abs(intraPredAngle);
    805   Int signAng        = intraPredAngle < 0 ? -1 : 1;
    806   absAng             = angTable[absAng];
    807   intraPredAngle     = signAng * absAng;
    808 
    809   // 3rd step: set slope for direction
    810   if( modeHor )
    811     {
    812     if( intraPredAngle > 0 )
    813     {
    814       riSlopeX = -32;
    815       riSlopeY = intraPredAngle;
    816     }
    817     else
    818     {
    819       riSlopeX = 32;
    820       riSlopeY = -intraPredAngle;
    821     }
    822     }
    823   else if( modeVer )
    824   {
    825     if( intraPredAngle > 0 )
    826     {
    827       riSlopeX = intraPredAngle;
    828       riSlopeY = -32;
    829   }
    830   else
    831   {
    832       riSlopeX = -intraPredAngle;
    833       riSlopeY = 32;
    834     }
    835   }
    836 
    837     return true;
    838 }
    839 
    840 Void TComPrediction::xGetWedgeIntraDirStartEnd( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiBlockSize, Int iDeltaX, Int iDeltaY, UInt uiPMSPosX, UInt uiPMSPosY, UChar& ruhXs, UChar& ruhYs, UChar& ruhXe, UChar& ruhYe, Int iDeltaEnd )
    841 {
    842   ruhXs = 0;
    843   ruhYs = 0;
    844   ruhXe = 0;
    845   ruhYe = 0;
    846   UInt uiOri;
    847 
    848   // scaling of start pos and block size to wedge resolution
    849   UInt uiScaledStartPosX = 0;
    850   UInt uiScaledStartPosY = 0;
    851   UInt uiScaledBlockSize = 0;
    852   WedgeResolution eWedgeRes = g_aeWedgeResolutionList[(UInt)g_aucConvertToBit[uiBlockSize]];
    853   switch( eWedgeRes )
    854   {
    855   case( DOUBLE_PEL ): { uiScaledStartPosX = (uiPMSPosX>>1); uiScaledStartPosY = (uiPMSPosY>>1); uiScaledBlockSize = (uiBlockSize>>1); break; }
    856   case(   FULL_PEL ): { uiScaledStartPosX =  uiPMSPosX;     uiScaledStartPosY =  uiPMSPosY;     uiScaledBlockSize =  uiBlockSize;     break; }
    857   case(   HALF_PEL ): { uiScaledStartPosX = (uiPMSPosX<<1); uiScaledStartPosY = (uiPMSPosY<<1); uiScaledBlockSize = (uiBlockSize<<1); break; }
    858 }
    859 
    860   // case above
    861   if( uiScaledStartPosX > 0 && uiScaledStartPosY == 0 )
    862   {
    863     ruhXs = (UChar)uiScaledStartPosX;
    864     ruhYs = 0;
    865 
    866     if( iDeltaY == 0 )
    867 {
    868       if( iDeltaX < 0 )
    869       {
    870         uiOri = 0;
    871         ruhXe = 0;
    872         ruhYe = (UChar)Min( Max( iDeltaEnd, 0 ), (uiScaledBlockSize-1) );
    873         return;
    874       }
    875       else
    876       {
    877         uiOri = 1;
    878         ruhXe = (UChar)(uiScaledBlockSize-1); ;
    879         ruhYe = (UChar)Min( Max( -iDeltaEnd, 0 ), (uiScaledBlockSize-1) );
    880         std::swap( ruhXs, ruhXe );
    881         std::swap( ruhYs, ruhYe );
    882         return;
    883       }
    884     }
    885 
    886     // regular case
    887     Int iVirtualEndX = (Int)ruhXs + roftoi( (Double)(uiScaledBlockSize-1) * ((Double)iDeltaX / (Double)iDeltaY) );
    888 
    889     if( iVirtualEndX < 0 )
    890     {
    891       Int iYe = roftoi( (Double)(0 - (Int)ruhXs) * ((Double)iDeltaY / (Double)iDeltaX) ) + iDeltaEnd;
    892       if( iYe < (Int)uiScaledBlockSize )
    893       {
    894         uiOri = 0;
    895         ruhXe = 0;
    896         ruhYe = (UChar)Max( iYe, 0 );
    897         return;
    898       }
    899       else
    900       {
    901         uiOri = 4;
    902         ruhXe = (UChar)Min( (iYe - (uiScaledBlockSize-1)), (uiScaledBlockSize-1) );
    903         ruhYe = (UChar)(uiScaledBlockSize-1);
    904         return;
    905       }
    906     }
    907     else if( iVirtualEndX > (uiScaledBlockSize-1) )
    908     {
    909       Int iYe = roftoi( (Double)((Int)(uiScaledBlockSize-1) - (Int)ruhXs) * ((Double)iDeltaY / (Double)iDeltaX) ) - iDeltaEnd;
    910       if( iYe < (Int)uiScaledBlockSize )
    911       {
    912         uiOri = 1;
    913         ruhXe = (UChar)(uiScaledBlockSize-1);
    914         ruhYe = (UChar)Max( iYe, 0 );
    915         std::swap( ruhXs, ruhXe );
    916         std::swap( ruhYs, ruhYe );
    917         return;
    918       }
    919       else
    920       {
    921         uiOri = 4;
    922         ruhXe = (UChar)Max( ((uiScaledBlockSize-1) - (iYe - (uiScaledBlockSize-1))), 0 );
    923         ruhYe = (UChar)(uiScaledBlockSize-1);
    924         return;
    925       }
    926     }
    927     else
    928     {
    929       Int iXe = iVirtualEndX + iDeltaEnd;
    930       if( iXe < 0 )
    931       {
    932         uiOri = 0;
    933         ruhXe = 0;
    934         ruhYe = (UChar)Max( ((uiScaledBlockSize-1) + iXe), 0 );
    935         return;
    936       }
    937       else if( iXe > (uiScaledBlockSize-1) )
    938       {
    939         uiOri = 1;
    940         ruhXe = (UChar)(uiScaledBlockSize-1);
    941         ruhYe = (UChar)Max( ((uiScaledBlockSize-1) - (iXe - (uiScaledBlockSize-1))), 0 );
    942         std::swap( ruhXs, ruhXe );
    943         std::swap( ruhYs, ruhYe );
    944         return;
    945       }
    946       else
    947       {
    948         uiOri = 4;
    949         ruhXe = (UChar)iXe;
    950         ruhYe = (UChar)(uiScaledBlockSize-1);
    951         return;
    952       }
    953     }
    954   }
    955 
    956   // case left
    957   if( uiScaledStartPosY > 0 && uiScaledStartPosX == 0 )
    958   {
    959     ruhXs = 0;
    960     ruhYs = (UChar)uiScaledStartPosY;
    961 
    962     if( iDeltaX == 0 )
    963     {
    964       if( iDeltaY < 0 )
    965       {
    966         uiOri = 0;
    967         ruhXe = (UChar)Min( Max( -iDeltaEnd, 0 ), (uiScaledBlockSize-1) );
    968         ruhYe = 0;
    969         std::swap( ruhXs, ruhXe );
    970         std::swap( ruhYs, ruhYe );
    971         return;
    972       }
    973       else
    974       {
    975         uiOri = 3;
    976         ruhXe = (UChar)Min( Max( iDeltaEnd, 0 ), (uiScaledBlockSize-1) );
    977         ruhYe = (UChar)(uiScaledBlockSize-1);
    978         return;
    979       }
    980     }
    981 
    982     // regular case
    983     Int iVirtualEndY = (Int)ruhYs + roftoi( (Double)(uiScaledBlockSize-1) * ((Double)iDeltaY / (Double)iDeltaX) );
    984 
    985     if( iVirtualEndY < 0 )
    986     {
    987       Int iXe = roftoi( (Double)(0 - (Int)ruhYs ) * ((Double)iDeltaX / (Double)iDeltaY) ) - iDeltaEnd;
    988       if( iXe < (Int)uiScaledBlockSize )
    989       {
    990         uiOri = 0;
    991         ruhXe = (UChar)Max( iXe, 0 );
    992         ruhYe = 0;
    993         std::swap( ruhXs, ruhXe );
    994         std::swap( ruhYs, ruhYe );
    995         return;
    996       }
    997       else
    998       {
    999         uiOri = 5;
    1000         ruhXe = (UChar)(uiScaledBlockSize-1);
    1001         ruhYe = (UChar)Min( (iXe - (uiScaledBlockSize-1)), (uiScaledBlockSize-1) );
    1002         std::swap( ruhXs, ruhXe );
    1003         std::swap( ruhYs, ruhYe );
    1004         return;
    1005       }
    1006     }
    1007     else if( iVirtualEndY > (uiScaledBlockSize-1) )
    1008     {
    1009       Int iXe = roftoi( (Double)((Int)(uiScaledBlockSize-1) - (Int)ruhYs ) * ((Double)iDeltaX / (Double)iDeltaY) ) + iDeltaEnd;
    1010       if( iXe < (Int)uiScaledBlockSize )
    1011       {
    1012         uiOri = 3;
    1013         ruhXe = (UChar)Max( iXe, 0 );
    1014         ruhYe = (UChar)(uiScaledBlockSize-1);
    1015         return;
    1016       }
    1017       else
    1018       {
    1019         uiOri = 5;
    1020         ruhXe = (UChar)(uiScaledBlockSize-1);
    1021         ruhYe = (UChar)Max( ((uiScaledBlockSize-1) - (iXe - (uiScaledBlockSize-1))), 0 );
    1022         std::swap( ruhXs, ruhXe );
    1023         std::swap( ruhYs, ruhYe );
    1024         return;
    1025       }
    1026     }
    1027     else
    1028     {
    1029       Int iYe = iVirtualEndY - iDeltaEnd;
    1030       if( iYe < 0 )
    1031       {
    1032         uiOri = 0;
    1033         ruhXe = (UChar)Max( ((uiScaledBlockSize-1) + iYe), 0 );
    1034         ruhYe = 0;
    1035         std::swap( ruhXs, ruhXe );
    1036         std::swap( ruhYs, ruhYe );
    1037         return;
    1038       }
    1039       else if( iYe > (uiScaledBlockSize-1) )
    1040       {
    1041         uiOri = 3;
    1042         ruhXe = (UChar)Max( ((uiScaledBlockSize-1) - (iYe - (uiScaledBlockSize-1))), 0 );
    1043         ruhYe = (UChar)(uiScaledBlockSize-1);
    1044         return;
    1045       }
    1046       else
    1047       {
    1048         uiOri = 5;
    1049         ruhXe = (UChar)(uiScaledBlockSize-1);
    1050         ruhYe = (UChar)iYe;
    1051         std::swap( ruhXs, ruhXe );
    1052         std::swap( ruhYs, ruhYe );
    1053         return;
    1054       }
    1055     }
    1056   }
    1057 
    1058   // case origin
    1059   if( uiScaledStartPosX == 0 && uiScaledStartPosY == 0 )
    1060   {
    1061     if( iDeltaX*iDeltaY < 0 )
    1062     {
    1063       return;
    1064     }
    1065 
    1066     ruhXs = 0;
    1067     ruhYs = 0;
    1068 
    1069     if( iDeltaY == 0 )
    1070     {
    1071       uiOri = 1;
    1072       ruhXe = (UChar)(uiScaledBlockSize-1);
    1073       ruhYe = 0;
    1074       std::swap( ruhXs, ruhXe );
    1075       std::swap( ruhYs, ruhYe );
    1076       return;
    1077   }
    1078 
    1079     if( iDeltaX == 0 )
    1080     {
    1081       uiOri = 0;
    1082       ruhXe = 0;
    1083       ruhYe = (UChar)(uiScaledBlockSize-1);
    1084       return;
    1085   }
    1086 
    1087     Int iVirtualEndX = (Int)ruhXs + roftoi( (Double)(uiScaledBlockSize-1) * ((Double)iDeltaX / (Double)iDeltaY) );
    1088 
    1089     if( iVirtualEndX > (uiScaledBlockSize-1) )
    1090     {
    1091       Int iYe = roftoi( (Double)((Int)(uiScaledBlockSize-1) - (Int)ruhXs) * ((Double)iDeltaY / (Double)iDeltaX) ) - iDeltaEnd;
    1092       if( iYe < (Int)uiScaledBlockSize )
    1093       {
    1094         uiOri = 1;
    1095         ruhXe = (UChar)(uiScaledBlockSize-1);
    1096         ruhYe = (UChar)Max( iYe, 0 );
    1097         std::swap( ruhXs, ruhXe );
    1098         std::swap( ruhYs, ruhYe );
    1099         return;
    1100       }
    1101       else
    1102       {
    1103         uiOri = 3;
    1104         ruhXe = (UChar)Max( ((uiScaledBlockSize-1) - (iYe - (uiScaledBlockSize-1))), 0 );
    1105         ruhYe = (UChar)(uiScaledBlockSize-1);
    1106         return;
    1107       }
    1108     }
    1109     else
    1110     {
    1111       Int iXe = iVirtualEndX + iDeltaEnd;
    1112       if( iXe < 0 )
    1113       {
    1114         uiOri = 0;
    1115         ruhXe = 0;
    1116         ruhYe = (UChar)Max( ((uiScaledBlockSize-1) + iXe), 0 );
    1117         return;
    1118       }
    1119       else if( iXe > (uiScaledBlockSize-1) )
    1120       {
    1121         uiOri = 1;
    1122         ruhXe = (UChar)(uiScaledBlockSize-1);
    1123         ruhYe = (UChar)Max( ((uiScaledBlockSize-1) - (iXe - (uiScaledBlockSize-1))), 0 );
    1124         std::swap( ruhXs, ruhXe );
    1125         std::swap( ruhYs, ruhYe );
    1126         return;
    1127       }
    1128       else
    1129       {
    1130         uiOri = 3;
    1131         ruhXe = (UChar)iXe;
    1132         ruhYe = (UChar)(uiScaledBlockSize-1);
    1133         return;
    1134       }
    1135     }
    1136   }
    1137 }
    1138 
    1139 Bool TComPrediction::getWedgeListIdx( WedgeList* pcWedgeList, WedgeRefList* pcWedgeRefList, UInt& ruiTabIdx, UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe )
    1140       {
    1141   ruiTabIdx = 0;
    1142 
    1143   for( UInt uiIdx = 0; uiIdx < pcWedgeList->size(); uiIdx++ )
    1144       {
    1145     TComWedgelet* pcTestWedge = &(pcWedgeList->at(uiIdx));
    1146 
    1147     if( pcTestWedge->getStartX() == uhXs &&
    1148         pcTestWedge->getStartY() == uhYs &&
    1149         pcTestWedge->getEndX()   == uhXe &&
    1150         pcTestWedge->getEndY()   == uhYe    )
    1151         {
    1152       ruiTabIdx = uiIdx;
    1153       return true;
    1154         }
    1155       }
    1156 
    1157   // additionally search in WedgeRef lists of duplicated patterns
    1158   for( UInt uiIdx = 0; uiIdx < pcWedgeRefList->size(); uiIdx++ )
    1159         {
    1160     TComWedgeRef* pcTestWedgeRef = &(pcWedgeRefList->at(uiIdx));
    1161 
    1162     if( pcTestWedgeRef->getStartX() == uhXs &&
    1163         pcTestWedgeRef->getStartY() == uhYs &&
    1164         pcTestWedgeRef->getEndX()   == uhXe &&
    1165         pcTestWedgeRef->getEndY()   == uhYe    )
    1166           {
    1167       ruiTabIdx = pcTestWedgeRef->getRefIdx();
    1168       return true;
    1169     }
    1170   }
    1171 
    1172   return false;
    1173 }
    1174 
    1175 Void TComPrediction::xPredIntraWedgeDir( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bAbove, Bool bLeft, Bool bEncoder, Bool bDelta, Int iWedgeDeltaEnd, Int iDeltaDC1, Int iDeltaDC2 )
    1176 {
    1177   assert( iWidth >= DMM_WEDGEMODEL_MIN_SIZE && iWidth <= DMM_WEDGEMODEL_MAX_SIZE );
    1178   WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[iWidth])];
    1179 
    1180   // get wedge pattern
    1181   UInt uiDirWedgeTabIdx = 0;
    1182   if( bEncoder )
    1183   {
    1184     // encoder: load stored wedge pattern from CU
    1185     uiDirWedgeTabIdx = pcCU->getWedgePredDirTabIdx( uiAbsPartIdx );
    1186   }
    1187   else
    1188   {
    1189     uiDirWedgeTabIdx = getBestContinueWedge( pcCU, uiAbsPartIdx, iWidth, iHeight, iWedgeDeltaEnd );
    1190 
    1191     UInt uiDepth = (pcCU->getDepth(0)) + (pcCU->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1);
    1192     pcCU->setWedgePredDirTabIdxSubParts( uiDirWedgeTabIdx, uiAbsPartIdx, uiDepth );
    1193   }
    1194   TComWedgelet* pcWedgelet = &(pacWedgeList->at(uiDirWedgeTabIdx));
    1195 
    1196   // get wedge pred DCs
    1197   Int iPredDC1 = 0;
    1198   Int iPredDC2 = 0;
    1199 
    1200   Int* piMask = pcCU->getPattern()->getAdiOrgBuf( iWidth, iHeight, m_piYuvExt );
    1201   Int iMaskStride = ( iWidth<<1 ) + 1;
    1202   piMask += iMaskStride+1;
    1203   getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
    1204 
    1205   if( bDelta )
    1206   {
    1207     xDeltaDCQuantScaleUp( pcCU, iDeltaDC1 );
    1208     xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
    1209   }
    1210 
    1211   // assign wedge pred DCs to prediction
    1212   if( bDelta ) { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, Clip ( iPredDC1+iDeltaDC1 ), Clip( iPredDC2+iDeltaDC2 ) ); }
    1213   else         { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride,        iPredDC1,                   iPredDC2             ); }
    1214 }
    1215 
    1216 Void TComPrediction::xPredIntraWedgeTex( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bAbove, Bool bLeft, Bool bEncoder, Bool bDelta, Int iDeltaDC1, Int iDeltaDC2 )
    1217 {
    1218   assert( iWidth >= DMM_WEDGEMODEL_MIN_SIZE && iWidth <= DMM_WEDGEMODEL_MAX_SIZE );
    1219   WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[iWidth])];
    1220 
    1221   // get wedge pattern
    1222   UInt uiTextureWedgeTabIdx = 0;
    1223   if( bEncoder )
    1224   {
    1225      // encoder: load stored wedge pattern from CU
    1226     uiTextureWedgeTabIdx = pcCU->getWedgePredTexTabIdx( uiAbsPartIdx );
    1227   }
    1228   else
    1229   {
    1230     // decoder: get and store wedge pattern in CU
    1231     uiTextureWedgeTabIdx = getBestWedgeFromText( pcCU, uiAbsPartIdx, (UInt)iWidth, (UInt)iHeight );
    1232     UInt uiDepth = (pcCU->getDepth(0)) + (pcCU->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1);
    1233     pcCU->setWedgePredTexTabIdxSubParts( uiTextureWedgeTabIdx, uiAbsPartIdx, uiDepth );
    1234   }
    1235   TComWedgelet* pcWedgelet = &(pacWedgeList->at(uiTextureWedgeTabIdx));
    1236 
    1237   // get wedge pred DCs
    1238   Int iPredDC1 = 0;
    1239   Int iPredDC2 = 0;
    1240   Int* piMask = pcCU->getPattern()->getAdiOrgBuf( iWidth, iHeight, m_piYuvExt );
    1241   Int iMaskStride = ( iWidth<<1 ) + 1;
    1242   piMask += iMaskStride+1;
    1243   getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
    1244 
    1245   if( bDelta )
    1246   {
    1247     xDeltaDCQuantScaleUp( pcCU, iDeltaDC1 );
    1248     xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
    1249   }
    1250 
    1251   // assign wedge pred DCs to prediction
    1252   if( bDelta ) { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, Clip ( iPredDC1+iDeltaDC1 ), Clip( iPredDC2+iDeltaDC2 ) ); }
    1253   else         { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride,        iPredDC1,                   iPredDC2           ); }
    1254 }
    1255 
    1256 Void TComPrediction::xPredIntraContourTex( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bAbove, Bool bLeft, Bool bEncoder, Bool bDelta, Int iDeltaDC1, Int iDeltaDC2 )
    1257 {
    1258   // get contour pattern
    1259   TComWedgelet* pcContourWedge = new TComWedgelet( iWidth, iHeight );
    1260   getBestContourFromText( pcCU, uiAbsPartIdx, (UInt)iWidth, (UInt)iHeight, pcContourWedge );
    1261 
    1262   // get wedge pred DCs
    1263   Int iPredDC1 = 0;
    1264   Int iPredDC2 = 0;
    1265   Int* piMask = pcCU->getPattern()->getAdiOrgBuf( iWidth, iHeight, m_piYuvExt );
    1266   Int iMaskStride = ( iWidth<<1 ) + 1;
    1267   piMask += iMaskStride+1;
    1268   getWedgePredDCs( pcContourWedge, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
    1269 
    1270   if( bDelta )
    1271   {
    1272     xDeltaDCQuantScaleUp( pcCU, iDeltaDC1 );
    1273     xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
    1274   }
    1275 
    1276   // assign wedge pred DCs to prediction
    1277   if( bDelta ) { assignWedgeDCs2Pred( pcContourWedge, piPred, uiStride, Clip ( iPredDC1+iDeltaDC1 ), Clip( iPredDC2+iDeltaDC2 ) ); }
    1278   else         { assignWedgeDCs2Pred( pcContourWedge, piPred, uiStride,        iPredDC1,                   iPredDC2           ); }
    1279 
    1280   pcContourWedge->destroy();
    1281   delete pcContourWedge;
    1282 }
    1283 #endif
    1284 #if HHI_DMM_INTRA
    1285494Void TComPrediction::calcWedgeDCs( TComWedgelet* pcWedgelet, Pel* piOrig, UInt uiStride, Int& riDC1, Int& riDC2 )
    1286495{
     
    1367576        }
    1368577        else
    1369         {
     578  {
    1370579          piTemp[uiX] = iDC1;
    1371580        }
     
    1377586}
    1378587
    1379 UInt TComPrediction::getBestWedgeFromText( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, WedgeDist eWedgeDist )
     588Void TComPrediction::getWedgePredDCs( TComWedgelet* pcWedgelet, Int* piMask, Int iMaskStride, Int& riPredDC1, Int& riPredDC2, Bool bAbove, Bool bLeft )
     589{
     590  riPredDC1 = ( 1<<( g_uiBitDepth + g_uiBitIncrement - 1) ); //pred val, if no neighbors are available
     591  riPredDC2 = ( 1<<( g_uiBitDepth + g_uiBitIncrement - 1) );
     592
     593  if( !bAbove && !bLeft ) { return; }
     594
     595  UInt uiNumSmpDC1 = 0, uiNumSmpDC2 = 0;
     596  Int iPredDC1 = 0, iPredDC2 = 0;
     597
     598  Bool* pabWedgePattern = pcWedgelet->getPattern();
     599  UInt  uiWedgeStride   = pcWedgelet->getStride();
     600
     601  if( bAbove )
     602  {
     603    for( Int k = 0; k < pcWedgelet->getWidth(); k++ )
     604    {
     605      if( true == pabWedgePattern[k] )
     606      {
     607        iPredDC2 += piMask[k-iMaskStride];
     608        uiNumSmpDC2++;
     609      }
     610      else
     611      {
     612        iPredDC1 += piMask[k-iMaskStride];
     613        uiNumSmpDC1++;
     614      }
     615    }
     616  }
     617  if( bLeft )
     618  {
     619    for( Int k = 0; k < pcWedgelet->getHeight(); k++ )
     620    {
     621      if( true == pabWedgePattern[k*uiWedgeStride] )
     622      {
     623        iPredDC2 += piMask[k*iMaskStride-1];
     624        uiNumSmpDC2++;
     625      }
     626      else
     627      {
     628        iPredDC1 += piMask[k*iMaskStride-1];
     629        uiNumSmpDC1++;
     630      }
     631    }
     632  }
     633
     634  if( uiNumSmpDC1 > 0 )
     635  {
     636    iPredDC1 /= uiNumSmpDC1;
     637    riPredDC1 = iPredDC1;
     638  }
     639  if( uiNumSmpDC2 > 0 )
     640  {
     641    iPredDC2 /= uiNumSmpDC2;
     642    riPredDC2 = iPredDC2;
     643  }
     644}
     645#endif
     646
     647#if HHI_DMM_WEDGE_INTRA
     648Void TComPrediction::xPredIntraWedgeFull( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bAbove, Bool bLeft, Bool bEncoder, Bool bDelta, UInt uiTabIdx, Int iDeltaDC1, Int iDeltaDC2 )
     649{
     650  assert( iWidth >= DMM_WEDGEMODEL_MIN_SIZE && iWidth <= DMM_WEDGEMODEL_MAX_SIZE );
     651  WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[iWidth])];
     652  TComWedgelet* pcWedgelet = &(pacWedgeList->at(uiTabIdx));
     653
     654  // get wedge pred DCs
     655  Int iPredDC1 = 0;
     656  Int iPredDC2 = 0;
     657
     658  Int* piMask = pcCU->getPattern()->getAdiOrgBuf( iWidth, iHeight, m_piYuvExt );
     659  Int iMaskStride = ( iWidth<<1 ) + 1;
     660  piMask += iMaskStride+1;
     661  getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
     662
     663  if( bDelta )
     664  {
     665    xDeltaDCQuantScaleUp( pcCU, iDeltaDC1 );
     666    xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
     667  }
     668
     669  // assign wedge pred DCs to prediction
     670  if( bDelta ) { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, Clip( iPredDC1+iDeltaDC1 ), Clip( iPredDC2+iDeltaDC2 ) ); }
     671  else         { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, iPredDC1,           iPredDC2           ); }
     672}
     673
     674UInt TComPrediction::getBestContinueWedge( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Int iDeltaEnd )
     675{
     676  UInt uiThisBlockSize = uiWidth;
     677  assert( uiThisBlockSize >= DMM_WEDGEMODEL_MIN_SIZE && uiThisBlockSize <= DMM_WEDGEMODEL_MAX_SIZE );
     678  WedgeList*    pacContDWedgeList    = &g_aacWedgeLists   [(g_aucConvertToBit[uiThisBlockSize])];
     679  WedgeRefList* pacContDWedgeRefList = &g_aacWedgeRefLists[(g_aucConvertToBit[uiThisBlockSize])];
     680
     681  UInt uiPredDirWedgeTabIdx = 0;
     682  TComDataCU* pcTempCU;
     683  UInt        uiTempPartIdx;
     684  // 1st: try continue above wedgelet
     685  pcTempCU = pcCU->getPUAbove( uiTempPartIdx, pcCU->getZorderIdxInCU() + uiAbsPartIdx );
     686  if( pcTempCU )
     687  {
     688    UChar uhLumaIntraDir = pcTempCU->getLumaIntraDir( uiTempPartIdx );
     689    if( DMM_WEDGE_FULL_IDX      == uhLumaIntraDir ||
     690        DMM_WEDGE_FULL_D_IDX    == uhLumaIntraDir ||
     691        DMM_WEDGE_PREDDIR_IDX   == uhLumaIntraDir ||
     692        DMM_WEDGE_PREDDIR_D_IDX == uhLumaIntraDir
     693#if HHI_DMM_PRED_TEX
     694                                                  ||
     695        DMM_WEDGE_PREDTEX_IDX   == uhLumaIntraDir ||
     696        DMM_WEDGE_PREDTEX_D_IDX == uhLumaIntraDir   
     697#endif
     698       )
     699    {
     700      UInt uiRefWedgeSize = (UInt)g_aucIntraSizeIdxToWedgeSize[pcTempCU->getIntraSizeIdx( uiTempPartIdx )];
     701      WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiRefWedgeSize])];
     702
     703      // get offset between current and reference block
     704      UInt uiOffsetX = 0;
     705      UInt uiOffsetY = 0;
     706      xGetBlockOffset( pcCU, uiAbsPartIdx, pcTempCU, uiTempPartIdx, uiOffsetX, uiOffsetY );
     707
     708      // get reference wedgelet
     709  UInt uiRefWedgeTabIdx = 0;
     710      switch( uhLumaIntraDir )
     711      {
     712      case( DMM_WEDGE_FULL_IDX      ): { uiRefWedgeTabIdx = pcTempCU->getWedgeFullTabIdx   ( uiTempPartIdx ); } break;
     713      case( DMM_WEDGE_FULL_D_IDX    ): { uiRefWedgeTabIdx = pcTempCU->getWedgeFullTabIdx   ( uiTempPartIdx ); } break;
     714      case( DMM_WEDGE_PREDDIR_IDX   ): { uiRefWedgeTabIdx = pcTempCU->getWedgePredDirTabIdx( uiTempPartIdx ); } break;
     715      case( DMM_WEDGE_PREDDIR_D_IDX ): { uiRefWedgeTabIdx = pcTempCU->getWedgePredDirTabIdx( uiTempPartIdx ); } break;
     716#if HHI_DMM_PRED_TEX
     717      case( DMM_WEDGE_PREDTEX_IDX   ): { uiRefWedgeTabIdx = pcTempCU->getWedgePredTexTabIdx( uiTempPartIdx ); } break;
     718      case( DMM_WEDGE_PREDTEX_D_IDX ): { uiRefWedgeTabIdx = pcTempCU->getWedgePredTexTabIdx( uiTempPartIdx ); } break;
     719#endif
     720      default: { assert( 0 ); return uiPredDirWedgeTabIdx; }
     721      }
     722      TComWedgelet* pcRefWedgelet;
     723      pcRefWedgelet = &(pacWedgeList->at( uiRefWedgeTabIdx ));
     724     
     725      // find reference wedgelet, if direction is suitable for continue wedge
     726      if( pcRefWedgelet->checkPredDirAbovePossible( uiThisBlockSize, uiOffsetX ) )
     727      {
     728        UChar uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye;
     729        pcRefWedgelet->getPredDirStartEndAbove( uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye, uiThisBlockSize, uiOffsetX, iDeltaEnd );
     730        getWedgeListIdx( pacContDWedgeList, pacContDWedgeRefList, uiPredDirWedgeTabIdx, uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye );
     731        return uiPredDirWedgeTabIdx;
     732      }
     733    }
     734  }
     735
     736  // 2nd: try continue left wedglelet
     737  pcTempCU = pcCU->getPULeft( uiTempPartIdx, pcCU->getZorderIdxInCU() + uiAbsPartIdx );
     738  if( pcTempCU )
     739  {
     740    UChar uhLumaIntraDir = pcTempCU->getLumaIntraDir( uiTempPartIdx );
     741    if( DMM_WEDGE_FULL_IDX      == uhLumaIntraDir ||
     742        DMM_WEDGE_FULL_D_IDX    == uhLumaIntraDir ||
     743        DMM_WEDGE_PREDDIR_IDX   == uhLumaIntraDir ||
     744        DMM_WEDGE_PREDDIR_D_IDX == uhLumaIntraDir
     745#if HHI_DMM_PRED_TEX
     746                                                  ||
     747        DMM_WEDGE_PREDTEX_IDX   == uhLumaIntraDir ||
     748        DMM_WEDGE_PREDTEX_D_IDX == uhLumaIntraDir   
     749#endif
     750      )
     751    {
     752      UInt uiRefWedgeSize = (UInt)g_aucIntraSizeIdxToWedgeSize[pcTempCU->getIntraSizeIdx( uiTempPartIdx )];
     753      WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiRefWedgeSize])];
     754
     755      // get offset between current and reference block
     756      UInt uiOffsetX = 0;
     757      UInt uiOffsetY = 0;
     758      xGetBlockOffset( pcCU, uiAbsPartIdx, pcTempCU, uiTempPartIdx, uiOffsetX, uiOffsetY );
     759
     760      // get reference wedgelet
     761      UInt uiRefWedgeTabIdx = 0;
     762      switch( uhLumaIntraDir )
     763      {
     764      case( DMM_WEDGE_FULL_IDX      ): { uiRefWedgeTabIdx = pcTempCU->getWedgeFullTabIdx   ( uiTempPartIdx ); } break;
     765      case( DMM_WEDGE_FULL_D_IDX    ): { uiRefWedgeTabIdx = pcTempCU->getWedgeFullTabIdx   ( uiTempPartIdx ); } break;
     766      case( DMM_WEDGE_PREDDIR_IDX   ): { uiRefWedgeTabIdx = pcTempCU->getWedgePredDirTabIdx( uiTempPartIdx ); } break;
     767      case( DMM_WEDGE_PREDDIR_D_IDX ): { uiRefWedgeTabIdx = pcTempCU->getWedgePredDirTabIdx( uiTempPartIdx ); } break;
     768#if HHI_DMM_PRED_TEX
     769      case( DMM_WEDGE_PREDTEX_IDX   ): { uiRefWedgeTabIdx = pcTempCU->getWedgePredTexTabIdx( uiTempPartIdx ); } break;
     770      case( DMM_WEDGE_PREDTEX_D_IDX ): { uiRefWedgeTabIdx = pcTempCU->getWedgePredTexTabIdx( uiTempPartIdx ); } break;
     771#endif
     772      default: { assert( 0 ); return uiPredDirWedgeTabIdx; }
     773      }
     774      TComWedgelet* pcRefWedgelet;
     775      pcRefWedgelet = &(pacWedgeList->at( uiRefWedgeTabIdx ));
     776
     777      // find reference wedgelet, if direction is suitable for continue wedge
     778      if( pcRefWedgelet->checkPredDirLeftPossible( uiThisBlockSize, uiOffsetY ) )
     779      {
     780        UChar uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye;
     781        pcRefWedgelet->getPredDirStartEndLeft( uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye, uiThisBlockSize, uiOffsetY, iDeltaEnd );
     782        getWedgeListIdx( pacContDWedgeList, pacContDWedgeRefList, uiPredDirWedgeTabIdx, uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye );
     783        return uiPredDirWedgeTabIdx;
     784      }
     785    }
     786  }
     787
     788  // 3rd: (default) make wedglet from intra dir and max slope point
     789  Int iSlopeX = 0;
     790  Int iSlopeY = 0;
     791  UInt uiStartPosX = 0;
     792  UInt uiStartPosY = 0;
     793  if( xGetWedgeIntraDirPredData( pcCU, uiAbsPartIdx, uiThisBlockSize, iSlopeX, iSlopeY, uiStartPosX, uiStartPosY ) )
     794  {
     795    UChar uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye;
     796    xGetWedgeIntraDirStartEnd( pcCU, uiAbsPartIdx, uiThisBlockSize, iSlopeX, iSlopeY, uiStartPosX, uiStartPosY, uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye, iDeltaEnd );
     797    getWedgeListIdx( pacContDWedgeList, pacContDWedgeRefList, uiPredDirWedgeTabIdx, uhContD_Xs, uhContD_Ys, uhContD_Xe, uhContD_Ye );
     798    return uiPredDirWedgeTabIdx;
     799  }
     800
     801  return uiPredDirWedgeTabIdx;
     802}
     803
     804Void TComPrediction::xGetBlockOffset( TComDataCU* pcCU, UInt uiAbsPartIdx, TComDataCU* pcRefCU, UInt uiRefAbsPartIdx, UInt& ruiOffsetX, UInt& ruiOffsetY )
     805{
     806  ruiOffsetX = 0;
     807  ruiOffsetY = 0;
     808
     809  // get offset between current and above/left block
     810  UInt uiThisOriginX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
     811  UInt uiThisOriginY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
     812
     813  UInt uiNumPartInRefCU = pcRefCU->getTotalNumPart();
     814  UInt uiMaxDepthRefCU = 0;
     815  while( uiNumPartInRefCU > 1 )
     816  {
     817    uiNumPartInRefCU >>= 2;
     818    uiMaxDepthRefCU++;
     819  }
     820
     821  UInt uiDepthRefPU = (pcRefCU->getDepth(uiRefAbsPartIdx)) + (pcRefCU->getPartitionSize(uiRefAbsPartIdx) == SIZE_2Nx2N ? 0 : 1);
     822  UInt uiShifts = (uiMaxDepthRefCU - uiDepthRefPU)*2;
     823  UInt uiRefBlockOriginPartIdx = (uiRefAbsPartIdx>>uiShifts)<<uiShifts;
     824
     825  UInt uiRefOriginX = pcRefCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiRefBlockOriginPartIdx] ];
     826  UInt uiRefOriginY = pcRefCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiRefBlockOriginPartIdx] ];
     827
     828  if( (uiThisOriginX - uiRefOriginX) > 0 ) { ruiOffsetX = (UInt)(uiThisOriginX - uiRefOriginX); }
     829  if( (uiThisOriginY - uiRefOriginY) > 0 ) { ruiOffsetY = (UInt)(uiThisOriginY - uiRefOriginY); }
     830}
     831
     832Bool TComPrediction::xGetWedgeIntraDirPredData( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiBlockSize, Int& riSlopeX, Int& riSlopeY, UInt& ruiStartPosX, UInt& ruiStartPosY )
     833{
     834  riSlopeX     = 0;
     835  riSlopeY     = 0;
     836  ruiStartPosX = 0;
     837  ruiStartPosY = 0;
     838
     839  // 1st step: get wedge start point (max. slope)
     840  Int* piSource = pcCU->getPattern()->getAdiOrgBuf( uiBlockSize, uiBlockSize, m_piYuvExt );
     841  Int iSourceStride = ( uiBlockSize<<1 ) + 1;
     842
     843  UInt uiSlopeMaxAbove = 0;
     844  UInt uiPosSlopeMaxAbove = 0;
     845  for( UInt uiPosHor = 0; uiPosHor < (uiBlockSize-1); uiPosHor++ )
     846  {
     847    if( abs( piSource[uiPosHor+1] - piSource[uiPosHor] ) > uiSlopeMaxAbove )
     848    {
     849      uiSlopeMaxAbove = abs( piSource[uiPosHor+1] - piSource[uiPosHor] );
     850      uiPosSlopeMaxAbove = uiPosHor;
     851    }
     852  }
     853
     854  UInt uiSlopeMaxLeft = 0;
     855  UInt uiPosSlopeMaxLeft = 0;
     856  for( UInt uiPosVer = 0; uiPosVer < (uiBlockSize-1); uiPosVer++ )
     857  {
     858    if( abs( piSource[(uiPosVer+1)*iSourceStride] - piSource[uiPosVer*iSourceStride] ) > uiSlopeMaxLeft )
     859    {
     860      uiSlopeMaxLeft = abs( piSource[(uiPosVer+1)*iSourceStride] - piSource[uiPosVer*iSourceStride] );
     861      uiPosSlopeMaxLeft = uiPosVer;
     862    }
     863  }
     864
     865  if( uiSlopeMaxAbove == 0 && uiSlopeMaxLeft == 0 )
     866  {
     867    return false;
     868  }
     869
     870  if( uiSlopeMaxAbove > uiSlopeMaxLeft )
     871  {
     872    ruiStartPosX = uiPosSlopeMaxAbove;
     873    ruiStartPosY = 0;
     874  }
     875  else
     876  {
     877    ruiStartPosX = 0;
     878    ruiStartPosY = uiPosSlopeMaxLeft;
     879  }
     880
     881  // 2nd step: derive wedge direction
     882  Int angTable[9] = {0,2,5,9,13,17,21,26,32};
     883
     884  Int uiPreds[2] = {-1, -1};
     885  Int uiPredNum = pcCU->getIntraDirLumaPredictor( uiAbsPartIdx, uiPreds );
     886
     887  UInt uiDirMode = 0;
     888  if( uiPredNum == 1 )
     889  {
     890    uiDirMode = g_aucAngIntraModeOrder[uiPreds[0]];
     891  }
     892  else if( uiPredNum == 2 )
     893  {
     894    uiDirMode = g_aucAngIntraModeOrder[uiPreds[1]];
     895  }
     896
     897  if( uiDirMode == 0 )
     898  {
     899    return false;
     900  }
     901
     902  Bool modeVer       = (uiDirMode < 18);
     903  Bool modeHor       = !modeVer;
     904  Int intraPredAngle = modeVer ? uiDirMode - 9 : modeHor ? uiDirMode - 25 : 0;
     905  Int absAng         = abs(intraPredAngle);
     906  Int signAng        = intraPredAngle < 0 ? -1 : 1;
     907  absAng             = angTable[absAng];
     908  intraPredAngle     = signAng * absAng;
     909
     910  // 3rd step: set slope for direction
     911  if( modeHor )
     912    {
     913    if( intraPredAngle > 0 )
     914    {
     915      riSlopeX = -32;
     916      riSlopeY = intraPredAngle;
     917    }
     918    else
     919    {
     920      riSlopeX = 32;
     921      riSlopeY = -intraPredAngle;
     922    }
     923    }
     924  else if( modeVer )
     925  {
     926    if( intraPredAngle > 0 )
     927    {
     928      riSlopeX = intraPredAngle;
     929      riSlopeY = -32;
     930  }
     931  else
     932  {
     933      riSlopeX = -intraPredAngle;
     934      riSlopeY = 32;
     935    }
     936  }
     937
     938    return true;
     939}
     940
     941Void TComPrediction::xGetWedgeIntraDirStartEnd( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiBlockSize, Int iDeltaX, Int iDeltaY, UInt uiPMSPosX, UInt uiPMSPosY, UChar& ruhXs, UChar& ruhYs, UChar& ruhXe, UChar& ruhYe, Int iDeltaEnd )
     942{
     943  ruhXs = 0;
     944  ruhYs = 0;
     945  ruhXe = 0;
     946  ruhYe = 0;
     947  UInt uiOri;
     948
     949  // scaling of start pos and block size to wedge resolution
     950  UInt uiScaledStartPosX = 0;
     951  UInt uiScaledStartPosY = 0;
     952  UInt uiScaledBlockSize = 0;
     953  WedgeResolution eWedgeRes = g_aeWedgeResolutionList[(UInt)g_aucConvertToBit[uiBlockSize]];
     954  switch( eWedgeRes )
     955  {
     956  case( DOUBLE_PEL ): { uiScaledStartPosX = (uiPMSPosX>>1); uiScaledStartPosY = (uiPMSPosY>>1); uiScaledBlockSize = (uiBlockSize>>1); break; }
     957  case(   FULL_PEL ): { uiScaledStartPosX =  uiPMSPosX;     uiScaledStartPosY =  uiPMSPosY;     uiScaledBlockSize =  uiBlockSize;     break; }
     958  case(   HALF_PEL ): { uiScaledStartPosX = (uiPMSPosX<<1); uiScaledStartPosY = (uiPMSPosY<<1); uiScaledBlockSize = (uiBlockSize<<1); break; }
     959}
     960
     961  // case above
     962  if( uiScaledStartPosX > 0 && uiScaledStartPosY == 0 )
     963  {
     964    ruhXs = (UChar)uiScaledStartPosX;
     965    ruhYs = 0;
     966
     967    if( iDeltaY == 0 )
     968{
     969      if( iDeltaX < 0 )
     970      {
     971        uiOri = 0;
     972        ruhXe = 0;
     973        ruhYe = (UChar)Min( Max( iDeltaEnd, 0 ), (uiScaledBlockSize-1) );
     974        return;
     975      }
     976      else
     977      {
     978        uiOri = 1;
     979        ruhXe = (UChar)(uiScaledBlockSize-1); ;
     980        ruhYe = (UChar)Min( Max( -iDeltaEnd, 0 ), (uiScaledBlockSize-1) );
     981        std::swap( ruhXs, ruhXe );
     982        std::swap( ruhYs, ruhYe );
     983        return;
     984      }
     985    }
     986
     987    // regular case
     988    Int iVirtualEndX = (Int)ruhXs + roftoi( (Double)(uiScaledBlockSize-1) * ((Double)iDeltaX / (Double)iDeltaY) );
     989
     990    if( iVirtualEndX < 0 )
     991    {
     992      Int iYe = roftoi( (Double)(0 - (Int)ruhXs) * ((Double)iDeltaY / (Double)iDeltaX) ) + iDeltaEnd;
     993      if( iYe < (Int)uiScaledBlockSize )
     994      {
     995        uiOri = 0;
     996        ruhXe = 0;
     997        ruhYe = (UChar)Max( iYe, 0 );
     998        return;
     999      }
     1000      else
     1001      {
     1002        uiOri = 4;
     1003        ruhXe = (UChar)Min( (iYe - (uiScaledBlockSize-1)), (uiScaledBlockSize-1) );
     1004        ruhYe = (UChar)(uiScaledBlockSize-1);
     1005        return;
     1006      }
     1007    }
     1008    else if( iVirtualEndX > (uiScaledBlockSize-1) )
     1009    {
     1010      Int iYe = roftoi( (Double)((Int)(uiScaledBlockSize-1) - (Int)ruhXs) * ((Double)iDeltaY / (Double)iDeltaX) ) - iDeltaEnd;
     1011      if( iYe < (Int)uiScaledBlockSize )
     1012      {
     1013        uiOri = 1;
     1014        ruhXe = (UChar)(uiScaledBlockSize-1);
     1015        ruhYe = (UChar)Max( iYe, 0 );
     1016        std::swap( ruhXs, ruhXe );
     1017        std::swap( ruhYs, ruhYe );
     1018        return;
     1019      }
     1020      else
     1021      {
     1022        uiOri = 4;
     1023        ruhXe = (UChar)Max( ((uiScaledBlockSize-1) - (iYe - (uiScaledBlockSize-1))), 0 );
     1024        ruhYe = (UChar)(uiScaledBlockSize-1);
     1025        return;
     1026      }
     1027    }
     1028    else
     1029    {
     1030      Int iXe = iVirtualEndX + iDeltaEnd;
     1031      if( iXe < 0 )
     1032      {
     1033        uiOri = 0;
     1034        ruhXe = 0;
     1035        ruhYe = (UChar)Max( ((uiScaledBlockSize-1) + iXe), 0 );
     1036        return;
     1037      }
     1038      else if( iXe > (uiScaledBlockSize-1) )
     1039      {
     1040        uiOri = 1;
     1041        ruhXe = (UChar)(uiScaledBlockSize-1);
     1042        ruhYe = (UChar)Max( ((uiScaledBlockSize-1) - (iXe - (uiScaledBlockSize-1))), 0 );
     1043        std::swap( ruhXs, ruhXe );
     1044        std::swap( ruhYs, ruhYe );
     1045        return;
     1046      }
     1047      else
     1048      {
     1049        uiOri = 4;
     1050        ruhXe = (UChar)iXe;
     1051        ruhYe = (UChar)(uiScaledBlockSize-1);
     1052        return;
     1053      }
     1054    }
     1055  }
     1056
     1057  // case left
     1058  if( uiScaledStartPosY > 0 && uiScaledStartPosX == 0 )
     1059  {
     1060    ruhXs = 0;
     1061    ruhYs = (UChar)uiScaledStartPosY;
     1062
     1063    if( iDeltaX == 0 )
     1064    {
     1065      if( iDeltaY < 0 )
     1066      {
     1067        uiOri = 0;
     1068        ruhXe = (UChar)Min( Max( -iDeltaEnd, 0 ), (uiScaledBlockSize-1) );
     1069        ruhYe = 0;
     1070        std::swap( ruhXs, ruhXe );
     1071        std::swap( ruhYs, ruhYe );
     1072        return;
     1073      }
     1074      else
     1075      {
     1076        uiOri = 3;
     1077        ruhXe = (UChar)Min( Max( iDeltaEnd, 0 ), (uiScaledBlockSize-1) );
     1078        ruhYe = (UChar)(uiScaledBlockSize-1);
     1079        return;
     1080      }
     1081    }
     1082
     1083    // regular case
     1084    Int iVirtualEndY = (Int)ruhYs + roftoi( (Double)(uiScaledBlockSize-1) * ((Double)iDeltaY / (Double)iDeltaX) );
     1085
     1086    if( iVirtualEndY < 0 )
     1087    {
     1088      Int iXe = roftoi( (Double)(0 - (Int)ruhYs ) * ((Double)iDeltaX / (Double)iDeltaY) ) - iDeltaEnd;
     1089      if( iXe < (Int)uiScaledBlockSize )
     1090      {
     1091        uiOri = 0;
     1092        ruhXe = (UChar)Max( iXe, 0 );
     1093        ruhYe = 0;
     1094        std::swap( ruhXs, ruhXe );
     1095        std::swap( ruhYs, ruhYe );
     1096        return;
     1097      }
     1098      else
     1099      {
     1100        uiOri = 5;
     1101        ruhXe = (UChar)(uiScaledBlockSize-1);
     1102        ruhYe = (UChar)Min( (iXe - (uiScaledBlockSize-1)), (uiScaledBlockSize-1) );
     1103        std::swap( ruhXs, ruhXe );
     1104        std::swap( ruhYs, ruhYe );
     1105        return;
     1106      }
     1107    }
     1108    else if( iVirtualEndY > (uiScaledBlockSize-1) )
     1109    {
     1110      Int iXe = roftoi( (Double)((Int)(uiScaledBlockSize-1) - (Int)ruhYs ) * ((Double)iDeltaX / (Double)iDeltaY) ) + iDeltaEnd;
     1111      if( iXe < (Int)uiScaledBlockSize )
     1112      {
     1113        uiOri = 3;
     1114        ruhXe = (UChar)Max( iXe, 0 );
     1115        ruhYe = (UChar)(uiScaledBlockSize-1);
     1116        return;
     1117      }
     1118      else
     1119      {
     1120        uiOri = 5;
     1121        ruhXe = (UChar)(uiScaledBlockSize-1);
     1122        ruhYe = (UChar)Max( ((uiScaledBlockSize-1) - (iXe - (uiScaledBlockSize-1))), 0 );
     1123        std::swap( ruhXs, ruhXe );
     1124        std::swap( ruhYs, ruhYe );
     1125        return;
     1126      }
     1127    }
     1128    else
     1129    {
     1130      Int iYe = iVirtualEndY - iDeltaEnd;
     1131      if( iYe < 0 )
     1132      {
     1133        uiOri = 0;
     1134        ruhXe = (UChar)Max( ((uiScaledBlockSize-1) + iYe), 0 );
     1135        ruhYe = 0;
     1136        std::swap( ruhXs, ruhXe );
     1137        std::swap( ruhYs, ruhYe );
     1138        return;
     1139      }
     1140      else if( iYe > (uiScaledBlockSize-1) )
     1141      {
     1142        uiOri = 3;
     1143        ruhXe = (UChar)Max( ((uiScaledBlockSize-1) - (iYe - (uiScaledBlockSize-1))), 0 );
     1144        ruhYe = (UChar)(uiScaledBlockSize-1);
     1145        return;
     1146      }
     1147      else
     1148      {
     1149        uiOri = 5;
     1150        ruhXe = (UChar)(uiScaledBlockSize-1);
     1151        ruhYe = (UChar)iYe;
     1152        std::swap( ruhXs, ruhXe );
     1153        std::swap( ruhYs, ruhYe );
     1154        return;
     1155      }
     1156    }
     1157  }
     1158
     1159  // case origin
     1160  if( uiScaledStartPosX == 0 && uiScaledStartPosY == 0 )
     1161  {
     1162    if( iDeltaX*iDeltaY < 0 )
     1163    {
     1164      return;
     1165    }
     1166
     1167    ruhXs = 0;
     1168    ruhYs = 0;
     1169
     1170    if( iDeltaY == 0 )
     1171    {
     1172      uiOri = 1;
     1173      ruhXe = (UChar)(uiScaledBlockSize-1);
     1174      ruhYe = 0;
     1175      std::swap( ruhXs, ruhXe );
     1176      std::swap( ruhYs, ruhYe );
     1177      return;
     1178  }
     1179
     1180    if( iDeltaX == 0 )
     1181    {
     1182      uiOri = 0;
     1183      ruhXe = 0;
     1184      ruhYe = (UChar)(uiScaledBlockSize-1);
     1185      return;
     1186  }
     1187
     1188    Int iVirtualEndX = (Int)ruhXs + roftoi( (Double)(uiScaledBlockSize-1) * ((Double)iDeltaX / (Double)iDeltaY) );
     1189
     1190    if( iVirtualEndX > (uiScaledBlockSize-1) )
     1191    {
     1192      Int iYe = roftoi( (Double)((Int)(uiScaledBlockSize-1) - (Int)ruhXs) * ((Double)iDeltaY / (Double)iDeltaX) ) - iDeltaEnd;
     1193      if( iYe < (Int)uiScaledBlockSize )
     1194      {
     1195        uiOri = 1;
     1196        ruhXe = (UChar)(uiScaledBlockSize-1);
     1197        ruhYe = (UChar)Max( iYe, 0 );
     1198        std::swap( ruhXs, ruhXe );
     1199        std::swap( ruhYs, ruhYe );
     1200        return;
     1201      }
     1202      else
     1203      {
     1204        uiOri = 3;
     1205        ruhXe = (UChar)Max( ((uiScaledBlockSize-1) - (iYe - (uiScaledBlockSize-1))), 0 );
     1206        ruhYe = (UChar)(uiScaledBlockSize-1);
     1207        return;
     1208      }
     1209    }
     1210    else
     1211    {
     1212      Int iXe = iVirtualEndX + iDeltaEnd;
     1213      if( iXe < 0 )
     1214      {
     1215        uiOri = 0;
     1216        ruhXe = 0;
     1217        ruhYe = (UChar)Max( ((uiScaledBlockSize-1) + iXe), 0 );
     1218        return;
     1219      }
     1220      else if( iXe > (uiScaledBlockSize-1) )
     1221      {
     1222        uiOri = 1;
     1223        ruhXe = (UChar)(uiScaledBlockSize-1);
     1224        ruhYe = (UChar)Max( ((uiScaledBlockSize-1) - (iXe - (uiScaledBlockSize-1))), 0 );
     1225        std::swap( ruhXs, ruhXe );
     1226        std::swap( ruhYs, ruhYe );
     1227        return;
     1228      }
     1229      else
     1230      {
     1231        uiOri = 3;
     1232        ruhXe = (UChar)iXe;
     1233        ruhYe = (UChar)(uiScaledBlockSize-1);
     1234        return;
     1235      }
     1236    }
     1237  }
     1238}
     1239
     1240Bool TComPrediction::getWedgeListIdx( WedgeList* pcWedgeList, WedgeRefList* pcWedgeRefList, UInt& ruiTabIdx, UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe )
     1241{
     1242  ruiTabIdx = 0;
     1243
     1244  for( UInt uiIdx = 0; uiIdx < pcWedgeList->size(); uiIdx++ )
     1245  {
     1246    TComWedgelet* pcTestWedge = &(pcWedgeList->at(uiIdx));
     1247
     1248    if( pcTestWedge->getStartX() == uhXs &&
     1249        pcTestWedge->getStartY() == uhYs &&
     1250        pcTestWedge->getEndX()   == uhXe &&
     1251        pcTestWedge->getEndY()   == uhYe    )
     1252    {
     1253      ruiTabIdx = uiIdx;
     1254      return true;
     1255    }
     1256  }
     1257
     1258  // additionally search in WedgeRef lists of duplicated patterns
     1259  for( UInt uiIdx = 0; uiIdx < pcWedgeRefList->size(); uiIdx++ )
     1260  {
     1261    TComWedgeRef* pcTestWedgeRef = &(pcWedgeRefList->at(uiIdx));
     1262
     1263    if( pcTestWedgeRef->getStartX() == uhXs &&
     1264        pcTestWedgeRef->getStartY() == uhYs &&
     1265        pcTestWedgeRef->getEndX()   == uhXe &&
     1266        pcTestWedgeRef->getEndY()   == uhYe    )
     1267    {
     1268      ruiTabIdx = pcTestWedgeRef->getRefIdx();
     1269      return true;
     1270    }
     1271  }
     1272
     1273  return false;
     1274}
     1275
     1276Void TComPrediction::xPredIntraWedgeDir( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bAbove, Bool bLeft, Bool bEncoder, Bool bDelta, Int iWedgeDeltaEnd, Int iDeltaDC1, Int iDeltaDC2 )
     1277{
     1278  assert( iWidth >= DMM_WEDGEMODEL_MIN_SIZE && iWidth <= DMM_WEDGEMODEL_MAX_SIZE );
     1279  WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[iWidth])];
     1280
     1281  // get wedge pattern
     1282  UInt uiDirWedgeTabIdx = 0;
     1283  if( bEncoder )
     1284  {
     1285    // encoder: load stored wedge pattern from CU
     1286    uiDirWedgeTabIdx = pcCU->getWedgePredDirTabIdx( uiAbsPartIdx );
     1287  }
     1288  else
     1289  {
     1290    uiDirWedgeTabIdx = getBestContinueWedge( pcCU, uiAbsPartIdx, iWidth, iHeight, iWedgeDeltaEnd );
     1291
     1292    UInt uiDepth = (pcCU->getDepth(0)) + (pcCU->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1);
     1293    pcCU->setWedgePredDirTabIdxSubParts( uiDirWedgeTabIdx, uiAbsPartIdx, uiDepth );
     1294  }
     1295  TComWedgelet* pcWedgelet = &(pacWedgeList->at(uiDirWedgeTabIdx));
     1296
     1297  // get wedge pred DCs
     1298  Int iPredDC1 = 0;
     1299  Int iPredDC2 = 0;
     1300
     1301  Int* piMask = pcCU->getPattern()->getAdiOrgBuf( iWidth, iHeight, m_piYuvExt );
     1302  Int iMaskStride = ( iWidth<<1 ) + 1;
     1303  piMask += iMaskStride+1;
     1304  getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
     1305
     1306  if( bDelta )
     1307  {
     1308    xDeltaDCQuantScaleUp( pcCU, iDeltaDC1 );
     1309    xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
     1310  }
     1311
     1312  // assign wedge pred DCs to prediction
     1313  if( bDelta ) { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, Clip ( iPredDC1+iDeltaDC1 ), Clip( iPredDC2+iDeltaDC2 ) ); }
     1314  else         { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride,        iPredDC1,                   iPredDC2             ); }
     1315}
     1316#endif
     1317
     1318#if HHI_DMM_PRED_TEX
     1319Void TComPrediction::xPredIntraWedgeTex( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bAbove, Bool bLeft, Bool bEncoder, Bool bDelta, Int iDeltaDC1, Int iDeltaDC2 )
     1320{
     1321  assert( iWidth >= DMM_WEDGEMODEL_MIN_SIZE && iWidth <= DMM_WEDGEMODEL_MAX_SIZE );
     1322  WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[iWidth])];
     1323
     1324  // get wedge pattern
     1325  UInt uiTextureWedgeTabIdx = 0;
     1326  if( bEncoder )
     1327  {
     1328     // encoder: load stored wedge pattern from CU
     1329    uiTextureWedgeTabIdx = pcCU->getWedgePredTexTabIdx( uiAbsPartIdx );
     1330  }
     1331  else
     1332  {
     1333    // decoder: get and store wedge pattern in CU
     1334    uiTextureWedgeTabIdx = getBestWedgeFromText( pcCU, uiAbsPartIdx, (UInt)iWidth, (UInt)iHeight );
     1335    UInt uiDepth = (pcCU->getDepth(0)) + (pcCU->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1);
     1336    pcCU->setWedgePredTexTabIdxSubParts( uiTextureWedgeTabIdx, uiAbsPartIdx, uiDepth );
     1337  }
     1338  TComWedgelet* pcWedgelet = &(pacWedgeList->at(uiTextureWedgeTabIdx));
     1339
     1340  // get wedge pred DCs
     1341  Int iPredDC1 = 0;
     1342  Int iPredDC2 = 0;
     1343  Int* piMask = pcCU->getPattern()->getAdiOrgBuf( iWidth, iHeight, m_piYuvExt );
     1344  Int iMaskStride = ( iWidth<<1 ) + 1;
     1345  piMask += iMaskStride+1;
     1346  getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
     1347
     1348  if( bDelta )
     1349  {
     1350    xDeltaDCQuantScaleUp( pcCU, iDeltaDC1 );
     1351    xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
     1352  }
     1353
     1354  // assign wedge pred DCs to prediction
     1355  if( bDelta ) { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, Clip ( iPredDC1+iDeltaDC1 ), Clip( iPredDC2+iDeltaDC2 ) ); }
     1356  else         { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride,        iPredDC1,                   iPredDC2           ); }
     1357}
     1358
     1359Void TComPrediction::xPredIntraContourTex( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bAbove, Bool bLeft, Bool bEncoder, Bool bDelta, Int iDeltaDC1, Int iDeltaDC2 )
     1360{
     1361  // get contour pattern
     1362  TComWedgelet* pcContourWedge = new TComWedgelet( iWidth, iHeight );
     1363  getBestContourFromText( pcCU, uiAbsPartIdx, (UInt)iWidth, (UInt)iHeight, pcContourWedge );
     1364
     1365  // get wedge pred DCs
     1366  Int iPredDC1 = 0;
     1367  Int iPredDC2 = 0;
     1368  Int* piMask = pcCU->getPattern()->getAdiOrgBuf( iWidth, iHeight, m_piYuvExt );
     1369  Int iMaskStride = ( iWidth<<1 ) + 1;
     1370  piMask += iMaskStride+1;
     1371  getWedgePredDCs( pcContourWedge, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
     1372
     1373  if( bDelta )
     1374  {
     1375    xDeltaDCQuantScaleUp( pcCU, iDeltaDC1 );
     1376    xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
     1377  }
     1378
     1379  // assign wedge pred DCs to prediction
     1380  if( bDelta ) { assignWedgeDCs2Pred( pcContourWedge, piPred, uiStride, Clip ( iPredDC1+iDeltaDC1 ), Clip( iPredDC2+iDeltaDC2 ) ); }
     1381  else         { assignWedgeDCs2Pred( pcContourWedge, piPred, uiStride,        iPredDC1,                   iPredDC2           ); }
     1382
     1383  pcContourWedge->destroy();
     1384  delete pcContourWedge;
     1385}
     1386
     1387Void TComPrediction::getBestContourFromText( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, TComWedgelet* pcContourWedge, Pel* piTextureBlock )
     1388{
     1389  pcContourWedge->clear();
     1390  Bool* pabContourPattern = pcContourWedge->getPattern();
     1391
     1392  // get copy of according texture luma block
     1393  Pel* piTempY = NULL;
     1394  TComYuv cTempYuv;
     1395
     1396  if ( piTextureBlock )
     1397  {
     1398    piTempY = piTextureBlock;
     1399  }
     1400  else
     1401  {
     1402    cTempYuv.create( uiWidth, uiHeight ); cTempYuv.clear();
     1403    piTempY      = cTempYuv.getLumaAddr();
     1404
     1405    fillTexturePicTempBlock( pcCU, uiAbsPartIdx, piTempY, uiWidth, uiHeight );
     1406
     1407    piTempY = cTempYuv.getLumaAddr();
     1408  }
     1409
     1410  // find contour for texture luma block
     1411  UInt iDC = 0;
     1412  for( UInt k = 0; k < (uiWidth*uiHeight); k++ ) { iDC += piTempY[k]; }
     1413  iDC /= (uiWidth*uiHeight);
     1414
     1415  if ( piTextureBlock )
     1416  {
     1417    piTempY = piTextureBlock;
     1418  }
     1419  else
     1420  {
     1421    piTempY = cTempYuv.getLumaAddr();
     1422  }
     1423
     1424  for( UInt k = 0; k < (uiWidth*uiHeight); k++ )
     1425  {
     1426    pabContourPattern[k] = (piTempY[k] > iDC) ? true : false;
     1427  }
     1428
     1429  cTempYuv.destroy();
     1430}
     1431
     1432UInt TComPrediction::getBestWedgeFromText( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, WedgeDist eWedgeDist, Pel* piTextureBlock )
    13801433{
    13811434  assert( uiWidth >= DMM_WEDGEMODEL_MIN_SIZE && uiWidth <= DMM_WEDGEMODEL_MAX_SIZE );
     
    13831436
    13841437  // get copy of according texture luma block
    1385   UInt uiPartAddr = 0;
    1386   Int  iBlockWidth, iBlockHeight;
     1438  Pel* piTempY = NULL;   
    13871439  TComYuv     cTempYuv;
    1388   UInt        uiTempStride;
    1389   Pel*        piTempY;     
    1390 
    1391   TComPicYuv* pcPicYuvRef = pcCU->getSlice()->getTexturePic()->getPicYuvRec();
    1392   Int         iRefStride = pcPicYuvRef->getStride();
    1393   Pel*        piRefY;
    1394 
    1395   pcCU->getPartIndexAndSize( uiAbsPartIdx, uiPartAddr, iBlockWidth, iBlockHeight );
    1396 
    1397   piRefY = pcPicYuvRef->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr );
    1398 
    1399   cTempYuv.create( pcCU->getWidth(0), pcCU->getHeight(0) ); cTempYuv.clear();
    1400   uiTempStride = cTempYuv.getStride();
    1401   piTempY      = cTempYuv.getLumaAddr( uiAbsPartIdx, uiWidth );
    1402 
    1403   for ( Int y = 0; y < iBlockHeight; y++ )
    1404   {
    1405     ::memcpy(piTempY, piRefY, sizeof(Pel)*iBlockWidth);
    1406     piTempY += uiTempStride;
    1407     piRefY += iRefStride;
    1408   }
    1409 
    1410   piTempY = cTempYuv.getLumaAddr( uiAbsPartIdx, uiWidth );
    1411 
     1440
     1441  if ( piTextureBlock )
     1442  {
     1443    piTempY = piTextureBlock;
     1444  }
     1445  else
     1446  {
     1447    cTempYuv.create( uiWidth, uiHeight ); cTempYuv.clear();
     1448    piTempY      = cTempYuv.getLumaAddr();
     1449
     1450    fillTexturePicTempBlock( pcCU, uiAbsPartIdx, piTempY, uiWidth, uiHeight );
     1451
     1452    piTempY = cTempYuv.getLumaAddr();
     1453  }
     1454 
    14121455  TComWedgeDist cWedgeDist;
    14131456  UInt uiTextureWedgeTabIdx = 0;
     
    14291472  for( UInt uiIdx = 0; uiIdx < pacWedgeList->size(); uiIdx++ )
    14301473  {
    1431     calcWedgeDCs       ( &(pacWedgeList->at(uiIdx)), piTempY,  uiTempStride,  iDC1, iDC2 );
     1474    calcWedgeDCs       ( &(pacWedgeList->at(uiIdx)), piTempY,  uiWidth,  iDC1, iDC2 );
    14321475    assignWedgeDCs2Pred( &(pacWedgeList->at(uiIdx)), piPred, uiPredStride, iDC1, iDC2 );
    14331476
    1434     UInt uiActDist = cWedgeDist.getDistPart( piPred, uiPredStride, piTempY, uiTempStride, uiWidth, uiHeight, eWedgeDist );
     1477    UInt uiActDist = cWedgeDist.getDistPart( piPred, uiPredStride, piTempY, uiWidth, uiWidth, uiHeight, eWedgeDist );
    14351478
    14361479    if( uiActDist < uiBestDist || uiBestDist == MAX_UINT )
     
    14461489  return uiTextureWedgeTabIdx;
    14471490}
     1491
     1492Void TComPrediction::fillTexturePicTempBlock( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piTempBlockY, UInt uiWidth, UInt uiHeight )
     1493{
     1494  TComPicYuv* pcPicYuvRef = pcCU->getSlice()->getTexturePic()->getPicYuvRec();
     1495  Int         iRefStride = pcPicYuvRef->getStride();
     1496  Pel*        piRefY;
     1497
     1498  piRefY = pcPicYuvRef->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiAbsPartIdx );
     1499
     1500  for ( Int y = 0; y < uiHeight; y++ )
     1501  {
     1502    ::memcpy(piTempBlockY, piRefY, sizeof(Pel)*uiWidth);
     1503    piTempBlockY += uiWidth;
     1504    piRefY += iRefStride;
     1505  }
     1506}
    14481507#endif
    14491508
     
    14981557
    14991558#if HIGH_ACCURACY_BI
     1559#if DEPTH_MAP_GENERATION
    15001560Void TComPrediction::xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap, Bool bi )
    15011561#else
     1562Void TComPrediction::xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bi )
     1563#endif
     1564#else
     1565#if DEPTH_MAP_GENERATION
    15021566Void TComPrediction::xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap )
     1567#else
     1568Void TComPrediction::xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx )
     1569#endif
    15031570#endif
    15041571{
     
    15071574  pcCU->clipMv(cMv);
    15081575
     1576#if DEPTH_MAP_GENERATION
    15091577  if( bPrdDepthMap )
    15101578  {
     
    15171585    return;
    15181586  }
    1519 
    1520 #if MW_DEPTH_MAP_INTERP_FILTER
     1587#endif
     1588
     1589#if HHI_FULL_PEL_DEPTH_MAP_MV_ACC
    15211590  if( pcCU->getSlice()->getSPS()->isDepth() )
    15221591  {
     
    15261595    UInt uiRShift = 0;
    15271596#endif
    1528     xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, uiRShift, MW_DEPTH_MAP_INTERP_FILTER );
     1597    xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, uiRShift, 2 );
    15291598  }
    15301599  else
     
    15431612  xPredInterLumaBlk       ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred );
    15441613#endif
    1545 #if MW_DEPTH_MAP_INTERP_FILTER
     1614#if HHI_FULL_PEL_DEPTH_MAP_MV_ACC
    15461615  }
    15471616#endif
     
    15811650#if HIGH_ACCURACY_BI
    15821651    if( pcCU->getCUMvField( REF_PIC_LIST_0 )->getRefIdx( uiPartAddr ) >= 0 && pcCU->getCUMvField( REF_PIC_LIST_1 )->getRefIdx( uiPartAddr ) >= 0 )
     1652#if DEPTH_MAP_GENERATION
    15831653      xPredInterUni ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, bPrdDepthMap, true );
     1654#else
     1655      xPredInterUni ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, true );
     1656#endif
    15841657    else
    1585       xPredInterUni ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, bPrdDepthMap );
     1658#if DEPTH_MAP_GENERATION
     1659     xPredInterUni ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, bPrdDepthMap );
    15861660#else
     1661     xPredInterUni ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx );
     1662#endif
     1663#else
     1664#if DEPTH_MAP_GENERATION
    15871665    xPredInterUni ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx, bPrdDepthMap );
     1666#else
     1667    xPredInterUni ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, iPartIdx );
     1668#endif
    15881669#endif
    15891670  }
     
    16101691  Int     iHor        = ( uiFilterMode == 2 ? ( pcMv->getHor() + 2 ) & iFPelMask : pcMv->getHor() );
    16111692  Int     iVer        = ( uiFilterMode == 2 ? ( pcMv->getVer() + 2 ) & iFPelMask : pcMv->getVer() );
    1612 #if MW_DEPTH_MAP_INTERP_FILTER == 2 && MW_FULL_PEL_DEPTH_MAP_MV_SIGNALLING
     1693#if HHI_FULL_PEL_DEPTH_MAP_MV_ACC
    16131694  if( pcCU->getSlice()->getSPS()->isDepth() )
    16141695  {
     
    25612642#endif
    25622643
    2563 #if HHI_DMM_INTRA
     2644#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    25642645TComWedgeDist::TComWedgeDist()
    25652646{
  • trunk/source/Lib/TLibCommon/TComPrediction.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    5588  // motion compensation functions
    5689#if HIGH_ACCURACY_BI
     90#if DEPTH_MAP_GENERATION
    5791  Void xPredInterUni            ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap, Bool bi=false );
    5892#else
     93  Void xPredInterUni            ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bi=false );
     94#endif
     95#else
     96#if DEPTH_MAP_GENERATION
    5997  Void xPredInterUni            ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap );
     98#else
     99  Void xPredInterUni            ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Int iPartIdx );
     100#endif
    60101#endif
    61102  Void xPredInterBi             ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight,                         TComYuv*& rpcYuvPred, Int iPartIdx, Bool bPrdDepthMap );
     
    72113#endif
    73114
    74 #if HHI_DMM_INTRA
     115#if HHI_DMM_WEDGE_INTRA
    75116  Void xPredIntraWedgeFull       ( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bAbove, Bool bLeft, Bool bEncoder, Bool bDelta, UInt uiTabIdx, Int iDeltaDC1 = 0, Int iDeltaDC2 = 0 );
     117
    76118  Void xPredIntraWedgeDir        ( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bAbove, Bool bLeft, Bool bEncoder, Bool bDelta, Int iWedgeDeltaEnd, Int iDeltaDC1 = 0, Int iDeltaDC2 = 0 );
    77 
    78   Void xPredIntraWedgeTex        ( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bAbove, Bool bLeft, Bool bEncoder, Bool bDelta, Int iDeltaDC1 = 0, Int iDeltaDC2 = 0 );
    79   Void xPredIntraContourTex      ( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bAbove, Bool bLeft, Bool bEncoder, Bool bDelta, Int iDeltaDC1 = 0, Int iDeltaDC2 = 0 );
    80 
    81119  Void xGetBlockOffset           ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComDataCU* pcRefCU, UInt uiRefAbsPartIdx, UInt& ruiOffsetX, UInt& ruiOffsetY );
    82120  Bool xGetWedgeIntraDirPredData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiBlockSize, Int& riSlopeX, Int& riSlopeY, UInt& ruiStartPosX, UInt& ruiStartPosY );
    83121  Void xGetWedgeIntraDirStartEnd ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiBlockSize, Int iDeltaX, Int iDeltaY, UInt uiPMSPosX, UInt uiPMSPosY, UChar& ruhXs, UChar& ruhYs, UChar& ruhXe, UChar& ruhYe, Int iDeltaEnd = 0 );
     122#endif
     123#if HHI_DMM_PRED_TEX
     124  Void xPredIntraWedgeTex        ( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bAbove, Bool bLeft, Bool bEncoder, Bool bDelta, Int iDeltaDC1 = 0, Int iDeltaDC2 = 0 );
     125  Void xPredIntraContourTex      ( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bAbove, Bool bLeft, Bool bEncoder, Bool bDelta, Int iDeltaDC1 = 0, Int iDeltaDC2 = 0 );
     126#endif
     127#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    84128  Void xDeltaDCQuantScaleUp      ( TComDataCU* pcCU, Int& riDeltaDC );
    85129#endif
     
    110154  Void predIntraChromaAng         ( TComPattern* pcTComPattern, Int* piSrc, UInt uiDirMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, TComDataCU* pcCU, Bool bAbove, Bool bLeft );
    111155 
    112 #if HHI_DMM_INTRA
     156#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    113157  Void  predIntraLumaDMM         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bAbove, Bool bLeft, Bool bEncoder );
    114158
    115   UInt  getBestContinueWedge     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Int iDeltaEnd = 0 );
    116   Void  getBestContourFromText   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, TComWedgelet* pcContourWedge );
    117 
    118159  Void  getWedgePredDCs         ( TComWedgelet* pcWedgelet, Int* piMask, Int iMaskStride, Int& riPredDC1, Int& riPredDC2, Bool bAbove, Bool bLeft );
    119 
    120   Bool  getWedgeListIdx          ( WedgeList* pcWedgeList, WedgeRefList* pcWedgeRefList, UInt& ruiTabIdx, UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe );
    121 
    122   UInt  getBestWedgeFromText     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, WedgeDist eWedgeDist = WedgeDist_SAD );
    123160  Void  calcWedgeDCs             ( TComWedgelet* pcWedgelet, Pel* piOrig, UInt uiStride, Int& riDC1, Int& riDC2 );
    124161  Void  assignWedgeDCs2Pred      ( TComWedgelet* pcWedgelet, Pel* piPred,  UInt uiStride, Int   iDC1, Int   iDC2 );
     162#endif
     163#if HHI_DMM_PRED_TEX
     164  Void  getBestContourFromText   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, TComWedgelet* pcContourWedge, Pel* piTextureBlock = NULL );
     165  UInt  getBestWedgeFromText     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, WedgeDist eWedgeDist = WedgeDist_SAD, Pel* piTextureBlock = NULL );
     166  Void  fillTexturePicTempBlock  ( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piTempBlockY, UInt uiWidth, UInt uiHeight );
     167#endif
     168#if HHI_DMM_WEDGE_INTRA
     169  UInt  getBestContinueWedge     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Int iDeltaEnd = 0 );
     170  Bool  getWedgeListIdx          ( WedgeList* pcWedgeList, WedgeRefList* pcWedgeRefList, UInt& ruiTabIdx, UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe );
    125171#endif
    126172 
     
    142188};
    143189
    144 #if HHI_DMM_INTRA
     190#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    145191// ====================================================================================================================
    146192// Class definition TComWedgeDist
  • trunk/source/Lib/TLibCommon/TComRdCost.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    4679  }
    4780 
    48 #if SB_INTERVIEW_SKIP_LAMBDA_SCALE
     81#if HHI_INTERVIEW_SKIP_LAMBDA_SCALE
    4982  dLambda = m_dLambdaScale * dLambda ;
    5083#endif
     
    125158}
    126159
     160#if HHI_INTER_VIEW_MOTION_PRED
    127161Void
    128162TComRdCost::setLambdaMVReg( Double dLambda )
     
    131165  m_uiLambdaMVRegSSE = (UInt)floor( 65536.0 *       dLambda   );
    132166}
     167#endif
    133168
    134169
     
    223258  m_puiMultiviewRegCostVer      = 0;
    224259
    225 //GT VSO
     260#if HHI_VSO
    226261  m_apRefPics               = NULL;
    227262  m_paaiShiftLUTs           = NULL;
     
    231266  m_fpDistortFuncVSO        = NULL;
    232267  m_pcRenModel              = NULL;
    233 
    234 //GT VSO end
    235 #if SB_INTERVIEW_SKIP_LAMBDA_SCALE
     268#endif
     269
     270#if HHI_INTERVIEW_SKIP_LAMBDA_SCALE
    236271  m_dLambdaScale            = 1;
    237272#endif
     
    287322  }
    288323
    289   //GT VSO
     324#if HHI_VSO
    290325  if ( m_apRefPics != NULL )
    291326  {
     
    298333    m_paaiShiftLUTs = NULL;
    299334  };
    300   //GT VSO end
     335#endif
    301336}
    302337
     
    378413  // initialize
    379414  rcDistParam.iSubShift  = 0;
    380 #if SB_INTERVIEW_SKIP
     415#if HHI_INTERVIEW_SKIP
    381416  rcDistParam.pUsed       = 0;
    382417  rcDistParam.iStrideUsed = 0;
     
    401436  // initialize
    402437  rcDistParam.iSubShift  = 0;
    403 #if SB_INTERVIEW_SKIP
     438#if HHI_INTERVIEW_SKIP
    404439  rcDistParam.pUsed       = 0;
    405440  rcDistParam.iStrideUsed = 0;
     
    436471  // initialize
    437472  rcDistParam.iSubShift  = 0;
    438 #if SB_INTERVIEW_SKIP
     473#if HHI_INTERVIEW_SKIP
    439474  rcDistParam.pUsed       = 0;
    440475  rcDistParam.iStrideUsed = 0;
     
    454489  rcDP.iSubShift  = 0;
    455490  rcDP.DistFunc   = m_afpDistortFunc[ ( bHadamard ? DF_HADS : DF_SADS ) + g_aucConvertToBit[ iWidth ] + 1 ];
    456 #if SB_INTERVIEW_SKIP
     491#if HHI_INTERVIEW_SKIP
    457492  rcDP.pUsed       = 0;
    458493  rcDP.iStrideUsed = 0;
     
    504539  return ( uiSum >> g_uiBitIncrement );
    505540}
    506 #if SB_INTERVIEW_SKIP
     541#if HHI_INTERVIEW_SKIP
    507542UInt TComRdCost::getDistPart( Pel* piCur, Int iCurStride,  Pel* piOrg, Int iOrgStride, Pel* piUsed, Int iUsedStride, UInt uiBlkWidth, UInt uiBlkHeight, DFunc eDFunc )
    508543{
     
    33673402  Int iTemp;
    33683403 
    3369 #if SB_INTERVIEW_SKIP
     3404#if HHI_INTERVIEW_SKIP
    33703405  if( pcDtParam->pUsed )
    33713406  {
     
    34003435    piCur += iStrideCur;
    34013436  }
    3402 #if SB_INTERVIEW_SKIP
     3437#if HHI_INTERVIEW_SKIP
    34033438  }
    34043439#endif
     
    34273462  Int  iTemp;
    34283463 
    3429 #if SB_INTERVIEW_SKIP
     3464#if HHI_INTERVIEW_SKIP
    34303465  if( pcDtParam->pUsed )
    34313466  {
     
    34583493    piCur += iStrideCur;
    34593494  }
    3460 #if SB_INTERVIEW_SKIP
     3495#if HHI_INTERVIEW_SKIP
    34613496  }
    34623497#endif
     
    34853520  Int  iTemp;
    34863521 
    3487 #if SB_INTERVIEW_SKIP
     3522#if HHI_INTERVIEW_SKIP
    34883523  if( pcDtParam->pUsed )
    34893524  {
     
    35233558    piCur += iStrideCur;
    35243559  }
    3525 #if SB_INTERVIEW_SKIP
     3560#if HHI_INTERVIEW_SKIP
    35263561  }
    35273562#endif
     
    35503585  Int  iTemp;
    35513586 
    3552 #if SB_INTERVIEW_SKIP
     3587#if HHI_INTERVIEW_SKIP
    35533588  if( pcDtParam->pUsed )
    35543589  {
     
    36053640    piCur += iStrideCur;
    36063641  }
    3607 #if SB_INTERVIEW_SKIP
     3642#if HHI_INTERVIEW_SKIP
    36083643  }
    36093644#endif
     
    36313666  Int  iTemp;
    36323667 
    3633 #if SB_INTERVIEW_SKIP
     3668#if HHI_INTERVIEW_SKIP
    36343669  if( pcDtParam->pUsed )
    36353670  {
     
    36913726    piCur += iStrideCur;
    36923727  }
    3693 #if SB_INTERVIEW_SKIP
     3728#if HHI_INTERVIEW_SKIP
    36943729  }
    36953730#endif
     
    37173752  Int  iTemp;
    37183753 
    3719 #if SB_INTERVIEW_SKIP
     3754#if HHI_INTERVIEW_SKIP
    37203755  if( pcDtParam->pUsed )
    37213756  {
     
    38043839    piCur += iStrideCur;
    38053840  }
    3806 #if SB_INTERVIEW_SKIP
     3841#if HHI_INTERVIEW_SKIP
    38073842  }
    38083843#endif
     
    38303865  Int  iTemp;
    38313866 
    3832 #if SB_INTERVIEW_SKIP
     3867#if HHI_INTERVIEW_SKIP
    38333868  if( pcDtParam->pUsed )
    38343869  {
     
    39804015    piCur += iStrideCur;
    39814016  }
    3982 #if SB_INTERVIEW_SKIP
     4017#if HHI_INTERVIEW_SKIP
    39834018  }
    39844019#endif
     
    47114746
    47124747
    4713 //GT VSO
    4714 
     4748#if HHI_VSO
    47154749Void TComRdCost::setLambdaVSO( Double dLambdaVSO )
    47164750{
     
    47214755}
    47224756
    4723 Dist TComRdCost::xGetDistVSOMode1( Int iStartPosX, Int iStartPosY, Pel* piCur, Int iCurStride, Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, Bool bSAD )
    4724 {
    4725  
    4726   assert( m_uiVSOMode == 1 );     
    4727   UInt uiShift = g_uiBitIncrement << 1;
    4728 
    4729   UInt uiPlane = 0;
    4730 
    4731   Int iRefWidth = m_pcVideoPicYuv->getWidth();
    4732   Int iStrideOrgVid;
    4733   UInt uiErr = 0;
    4734 
    4735   if (uiPlane > 0)
    4736   {
    4737     iStartPosX = iStartPosX >> 1;
    4738     iStartPosY = iStartPosY >> 1;
    4739     iRefWidth  = iRefWidth  >> 1;
    4740     iStrideOrgVid = m_pcVideoPicYuv ->getCStride();
    4741   }
    4742   else
    4743   {
    4744     iStrideOrgVid = m_pcVideoPicYuv ->getStride();
    4745   }
    4746  
    4747   UInt uiReferenceNumber  = 0;
    4748   for (UInt uiReference = 0; uiReference < 3; uiReference+=2 )
    4749   {
    4750     if ( m_paaiShiftLUTs[uiReference] == 0 )
    4751       continue;
    4752 
    4753     uiReferenceNumber++;
    4754    
    4755     Pel* piOrgVid;
    4756 
    4757     if (uiPlane == 0)
    4758     {     
    4759       piOrgVid = m_pcVideoPicYuv ->getLumaAddr();     
    4760     }
    4761     else
    4762     {
    4763       if (uiPlane == 1)
    4764       {       
    4765         piOrgVid = m_pcVideoPicYuv ->getCbAddr();
    4766       }
    4767       else
    4768       {       
    4769         piOrgVid = m_pcVideoPicYuv ->getCrAddr();
    4770       }     
    4771     }
    4772    
    4773     piOrgVid += iStartPosY * iStrideOrgVid;
    4774 
    4775     for ( Int iY = 0; iY < uiBlkHeight; iY++ )
    4776     {
    4777       Int iPos = iStartPosX;
    4778 
    4779       for  (Int iX = 0; iX < uiBlkWidth; iX++ )
    4780       {
    4781         Int iTargetPos;       
    4782 
    4783         assert( RemoveBitIncrement(piCur[iX]) >= 0 && RemoveBitIncrement(piCur[iX]) <= 256);         
    4784         assert( RemoveBitIncrement(piOrg[iX]) >= 0 && RemoveBitIncrement(piOrg[iX]) <= 256);         
    4785 
    4786         iTargetPos = iPos - m_paaiShiftLUTs[uiReference][0][RemoveBitIncrement(piCur[iX])] + m_paaiShiftLUTs[uiReference][0][RemoveBitIncrement(piOrg[iX])];         
    4787         iTargetPos = iTargetPos >  0         ? iTargetPos  : 0;
    4788         iTargetPos = iTargetPos <  iRefWidth ? iTargetPos  : iRefWidth-1;
    4789         Int iDiff = piOrgVid[iTargetPos] - piOrgVid[iPos];
    4790 
    4791         if ( bSAD )
    4792         {
    4793           uiErr     += abs(iDiff);         
    4794         }
    4795         else
    4796         {
    4797           uiErr     += ((iDiff * iDiff) >> uiShift );         
    4798         }
    4799 
    4800         iPos++;
    4801       }
    4802 
    4803       piOrgVid   += iStrideOrgVid;       
    4804 
    4805       piCur      += iCurStride;                 
    4806       piOrg      += iOrgStride;
    4807 
    4808     }
    4809     piCur        -= iCurStride * uiBlkHeight;                   
    4810     piOrg        -= iOrgStride * uiBlkHeight;
    4811   }
    4812 
    4813   if ( bSAD )
    4814   {
    4815     uiErr = uiErr >> g_uiBitIncrement;
    4816   }
    4817 
    4818   return ( uiErr + ( uiReferenceNumber >> 1 )) / uiReferenceNumber;
    4819 }
    4820 
    4821 Dist TComRdCost::xGetDistVSOMode2( Int iStartPosX, Int iStartPosY, Pel* piCur, Int iCurStride, Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, Bool bSAD )
    4822 {
    4823   assert( m_uiVSOMode == 2 );     
    4824   UInt uiShift = g_uiBitIncrement << 1;
    4825   UInt uiPlane = 0;
    4826 
    4827   Int iRefWidth = m_pcVideoPicYuv->getWidth();
    4828   Int iStrideOrgVid;
    4829  
    4830   UInt uiErr = 0;
    4831 
    4832   if (uiPlane > 0)
    4833   {
    4834     iStartPosX = iStartPosX >> 1;
    4835     iStartPosY = iStartPosY >> 1;
    4836     iRefWidth  = iRefWidth  >> 1;
    4837     iStrideOrgVid = m_pcVideoPicYuv ->getCStride();
    4838   }
    4839   else
    4840   {
    4841     iStrideOrgVid = m_pcVideoPicYuv ->getStride();
    4842   }
    4843 
    4844   for (UInt uiRefPic = 0; uiRefPic < m_uiNumberRefPics; uiRefPic++ )
    4845   {
    4846     Pel* piRefVid;
    4847     Pel* piOrgVid;
    4848     Int  iStrideRefVid;         
    4849 
    4850     if (uiPlane == 0)
    4851     {
    4852       piRefVid = m_apRefPics[uiRefPic]->getLumaAddr();
    4853       piOrgVid = m_pcVideoPicYuv ->getLumaAddr();
    4854       iStrideRefVid = m_apRefPics[uiRefPic]->getStride(); 
    4855     }
    4856     else
    4857     {
    4858       if (uiPlane == 1)
    4859       {
    4860         piRefVid = m_apRefPics[uiRefPic]->getCbAddr();
    4861         piOrgVid = m_pcVideoPicYuv ->getCbAddr();
    4862       }
    4863       else
    4864       {
    4865         piRefVid = m_apRefPics[uiRefPic]->getCrAddr();
    4866         piOrgVid = m_pcVideoPicYuv ->getCrAddr();
    4867       }
    4868       iStrideRefVid = m_apRefPics[uiRefPic]->getCStride();     
    4869     }
    4870 
    4871     piRefVid += iStartPosY * iStrideRefVid;
    4872     piOrgVid += iStartPosY * iStrideOrgVid;
    4873 
    4874     for  (Int iY = 0; iY < uiBlkHeight; iY++ )
    4875     {
    4876       Int iPos = iStartPosX;
    4877 
    4878       for  (Int iX = 0; iX < uiBlkWidth; iX++ )
    4879       {
    4880         int iTargetPos;
    4881 
    4882         AOF( RemoveBitIncrement(piCur[iX]) >= 0 && RemoveBitIncrement(piCur[iX]) <= 255);         
    4883         iTargetPos = iPos - m_paaiShiftLUTs[uiRefPic][0][RemoveBitIncrement(piCur[iX])];
    4884         iTargetPos = iTargetPos >  0         ? iTargetPos  : 0;
    4885         iTargetPos = iTargetPos <  iRefWidth ? iTargetPos  : iRefWidth-1;
    4886 
    4887         Int iDiff = piRefVid[iTargetPos] - piOrgVid[iPos];
    4888 
    4889         if ( bSAD )
    4890         {
    4891           uiErr     += abs(iDiff);         
    4892         }
    4893         else
    4894         {
    4895           uiErr     += ((iDiff * iDiff) >> uiShift );         
    4896         }
    4897 
    4898         iPos++;
    4899       }
    4900 
    4901       piRefVid   += iStrideRefVid;
    4902       piOrgVid   += iStrideOrgVid;       
    4903     }
    4904     piCur        -= iCurStride * uiBlkHeight;                   
    4905     piOrg        -= iOrgStride * uiBlkHeight;
    4906   }
    4907 
    4908   if ( bSAD )
    4909   {
    4910     uiErr = uiErr >> g_uiBitIncrement;
    4911   }
    4912 
    4913 
    4914   return ( uiErr + (m_uiNumberRefPics >> 1)) / m_uiNumberRefPics;
    4915 }
    4916 
    4917 Dist TComRdCost::xGetDistVSOMode3( Int iStartPosX, Int iStartPosY, Pel* piCur, Int iCurStride, Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, Bool bSAD )
    4918 {
    4919   assert( m_uiVSOMode == 3 );     
    4920   UInt uiShift = g_uiBitIncrement << 1;
    4921 
    4922   UInt uiPlane = 0;
    4923 
    4924   Int iRefWidth = m_pcVideoPicYuv->getWidth();
    4925   Int iStrideOrgVid;
    4926 
    4927   UInt uiErr = 0;
    4928 
    4929   if (uiPlane > 0)
    4930   {
    4931     iStartPosX = iStartPosX >> 1;
    4932     iStartPosY = iStartPosY >> 1;
    4933     iRefWidth  = iRefWidth  >> 1;
    4934     iStrideOrgVid = m_pcVideoPicYuv ->getCStride();
    4935   }
    4936   else
    4937   {
    4938     iStrideOrgVid = m_pcVideoPicYuv ->getStride();
    4939   }
    4940 
    4941   for (UInt uiRefPicNum = 0; uiRefPicNum < m_uiNumberRefPics; uiRefPicNum++ )
    4942   {
    4943     Pel* piRefVid;
    4944     Pel* piOrgVid;
    4945     Int  iStrideRefVid;         
    4946 
    4947     if (uiPlane == 0)
    4948     {
    4949       piRefVid = m_apRefPics[uiRefPicNum]->getLumaAddr();
    4950       piOrgVid = m_pcVideoPicYuv ->getLumaAddr();
    4951       iStrideRefVid = m_apRefPics[uiRefPicNum]->getStride(); 
    4952     }
    4953     else
    4954     {
    4955       if (uiPlane == 1)
    4956       {
    4957         piRefVid = m_apRefPics[uiRefPicNum]->getCbAddr();
    4958         piOrgVid = m_pcVideoPicYuv ->getCbAddr();
    4959       }
    4960       else
    4961       {
    4962         piRefVid = m_apRefPics[uiRefPicNum]->getCrAddr();
    4963         piOrgVid = m_pcVideoPicYuv ->getCrAddr();
    4964       }
    4965       iStrideRefVid = m_apRefPics[uiRefPicNum]->getCStride();     
    4966     }
    4967 
    4968 
    4969     piRefVid += iStartPosY * iStrideRefVid;
    4970     piOrgVid += iStartPosY * iStrideOrgVid;
    4971 
    4972     for ( Int iY = 0; iY < uiBlkHeight; iY++ )
    4973     {
    4974       Int iPos = iStartPosX;
    4975 
    4976       for  (Int iX = 0; iX < uiBlkWidth; iX++ )
    4977       {
    4978         int iTargetPos;
    4979 
    4980 
    4981         assert( RemoveBitIncrement(piCur[iX]) >= 0 && RemoveBitIncrement(piCur[iX]) <= 256 );
    4982         iTargetPos = iPos - m_paaiShiftLUTs[uiRefPicNum][0][RemoveBitIncrement(piCur[iX])];
    4983         iTargetPos = iTargetPos >  0         ? iTargetPos : 0;
    4984         iTargetPos = iTargetPos <  iRefWidth ? iTargetPos : iRefWidth-1;
    4985 
    4986         int iSourcePos;
    4987 
    4988         assert( RemoveBitIncrement(piOrg[iX]) >= 0 && RemoveBitIncrement(piOrg[iX]) <= 256 );
    4989         iSourcePos = iPos - m_paaiShiftLUTs[uiRefPicNum][0][RemoveBitIncrement(piOrg[iX])];
    4990         iSourcePos = iSourcePos >  0         ? iSourcePos : 0;
    4991         iSourcePos = iSourcePos <  iRefWidth ? iSourcePos : iRefWidth-1;
    4992 
    4993         Int iDiff = piRefVid[iTargetPos] - piRefVid[iSourcePos];
    4994 
    4995         if ( bSAD )
    4996         {
    4997             uiErr     += abs(iDiff);         
    4998         }
    4999         else
    5000         {
    5001           uiErr     += ((iDiff * iDiff)  >> uiShift) ;         
    5002         }   
    5003         iPos++;
    5004       }
    5005 
    5006       piRefVid   += iStrideRefVid;
    5007       piOrgVid   += iStrideOrgVid;       
    5008 
    5009       piCur      += iCurStride;                 
    5010       piOrg      += iOrgStride;
    5011     }
    5012     piCur        -= iCurStride * uiBlkHeight;                   
    5013     piOrg        -= iOrgStride * uiBlkHeight;
    5014   }
    5015 
    5016   if ( bSAD )
    5017   {
    5018     uiErr = uiErr >> g_uiBitIncrement;
    5019   }
    5020   UInt uiNumRef = Max( 1, m_uiNumberRefPics );
    5021   return ( uiErr + (uiNumRef >> 1) ) / uiNumRef;
    5022 }
    5023 
    5024 
    5025 
    5026 
    5027 #if GERHARD_VQM_XCHECK
    5028 UInt TComRdCost::xGetDistXCheck(  Int iStartPosX, Int iStartPosY, Pel* piCur, Int iCurStride, Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, Bool bSAD )
    5029 {
    5030   UInt uiShift = g_uiBitIncrement << 1;
    5031 
    5032   UInt uiPlane = 0;
    5033   UInt uiErr = 0;
    5034   Int iStrideOrgVid = m_pcVideoPicYuv ->getStride();
    5035 
    5036   Pel* piRefOrg = m_pcVideoPicYuv->getLumaAddr() + iStartPosX + iStrideOrgVid * iStartPosY;
    5037 
    5038   for ( Int iY = 0; iY < uiBlkHeight; iY++ )
    5039   {
    5040     for  (Int iX = 0; iX < uiBlkWidth; iX++ )
    5041     {   
    5042       Int iDiff;
    5043       if (uiPlane != 0)
    5044       {     
    5045        
    5046         iDiff = piCur[iX] - piOrg[iX];
    5047       }
    5048       else
    5049       {
    5050  //     assert( piOrg[iX] == piRefOrg[iX] );
    5051         iDiff = piCur[iX] - piRefOrg[iX];
    5052       }
    5053      
    5054 
    5055       if ( bSAD )
    5056       {
    5057         uiErr     += abs(iDiff);         
    5058       }
    5059       else
    5060       {
    5061         uiErr     += ((iDiff * iDiff)  >> uiShift) ;         
    5062       }               
    5063     }
    5064     piRefOrg   += iStrideOrgVid;
    5065     piCur      += iCurStride;
    5066     piOrg      += iOrgStride;
    5067   }
    5068 
    5069   if ( bSAD )     
    5070   {
    5071     uiErr >>= g_uiBitIncrement;
    5072   }
    5073   return uiErr;
    5074 }
    5075  
    5076 
    5077 #endif
    5078 
    50794757Dist TComRdCost::xGetDistVSOMode4( Int iStartPosX, Int iStartPosY, Pel* piCur, Int iCurStride, Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, Bool bSAD )
    50804758{
     
    50834761
    50844762  RMDist iDistMin = (RMDist) RDO_DIST_MIN;
    5085 #if RDO_DIST_INT
     4763#if HHI_VSO_DIST_INT
    50864764  iDistMin = m_bAllowNegDist ? RDO_DIST_MIN : 0;
    50874765#endif
     
    51324810    pRefInfo->getRefPicYuvAndLUT(m_apRefPics, m_paaiShiftLUTs);
    51334811  }
    5134  
    5135 
    51364812  m_pcVideoPicYuv = pRefInfo->getPicYuvVideo();
    5137 
    5138 #if GERHARD_VQM_XCHECK
    5139   m_pcVideoPicYuv = pRefInfo->getPicYuvOrgDepth(CURRVIEW);
    5140 #endif
    5141 
    51424813}
    51434814
     
    51474818  switch (m_uiVSOMode )
    51484819  {
    5149   case   1:
    5150     m_fpDistortFuncVSO = &TComRdCost::xGetDistVSOMode1;
    5151     break;
    5152   case   2:
    5153     m_fpDistortFuncVSO = &TComRdCost::xGetDistVSOMode2;
    5154     break;
    5155   case   3:
    5156     m_fpDistortFuncVSO = &TComRdCost::xGetDistVSOMode3;
    5157     break;
    51584820  case   4:
    51594821    m_fpDistortFuncVSO = &TComRdCost::xGetDistVSOMode4;
     
    51634825    break;
    51644826  }
    5165 #if GERHARD_VQM_XCHECK
    5166   m_fpDistortFuncVSO = &TComRdCost::xGetDistXCheck;
    5167 #endif
    51684827}
    51694828
     
    52284887}
    52294888
    5230 #if RDO_DIST_INT
     4889#if HHI_VSO_DIST_INT
    52314890Void TComRdCost::setAllowNegDist( Bool bAllowNegDist )
    52324891{
     
    52354894#endif
    52364895
    5237 //GT VSO end
     4896#endif
  • trunk/source/Lib/TLibCommon/TComRdCost.h

    r2 r5  
     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-2011, 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 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
    134/** \file     TComRdCost.h
    235    \brief    RD cost computation classes (header)
     
    5891  FpDistFuncRnd DistFuncRnd;
    5992#endif
    60 #if SB_INTERVIEW_SKIP
     93#if HHI_INTERVIEW_SKIP
    6194  Pel*  pUsed;
    6295  Int   iStrideUsed;
     
    87120#endif
    88121    iSubShift = 0;
    89 #if SB_INTERVIEW_SKIP
     122#if HHI_INTERVIEW_SKIP
    90123    pUsed       = 0;
    91124    iStrideUsed = 0;
     
    116149  Double                  m_dFrameLambda;
    117150
    118 #if SB_INTERVIEW_SKIP_LAMBDA_SCALE
     151#if HHI_INTERVIEW_SKIP_LAMBDA_SCALE
    119152  Double                  m_dLambdaScale ;
    120153#endif
     
    148181
    149182  Void    setLambda      ( Double dLambda );
     183#if HHI_INTER_VIEW_MOTION_PRED
    150184  Void    setLambdaMVReg ( Double dLambda );
     185#endif
    151186  Void    setFrameLambda ( Double dLambda ) { m_dFrameLambda = dLambda; }
    152187
    153 #if SB_INTERVIEW_SKIP_LAMBDA_SCALE
     188#if HHI_INTERVIEW_SKIP_LAMBDA_SCALE
    154189  Void   setLambdaScale  ( Double dLambdaScale) { m_dLambdaScale = dLambdaScale; }
    155190  Double   getLambdaScale  ( ) { return m_dLambdaScale ; }
     
    287322
    288323public:
    289 #if SB_INTERVIEW_SKIP
     324#if HHI_INTERVIEW_SKIP
    290325  UInt   getDistPart( Pel* piCur, Int iCurStride,  Pel* piOrg, Int iOrgStride, Pel* piUsed, Int iUsedStride, UInt uiBlkWidth, UInt uiBlkHeight, DFunc eDFunc = DF_SSE );
    291326#endif
    292327  UInt   getDistPart( Pel* piCur, Int iCurStride,  Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, DFunc eDFunc = DF_SSE );
    293328
    294 //GT VSO
    295 
     329#if HHI_VSO
    296330private:
    297331  Double                  m_dLambdaVSO;
     
    301335  Double                  m_dFrameLambdaVSO;
    302336
    303 #if RDO_DIST_INT
     337#if HHI_VSO_DIST_INT
    304338  Bool                    m_bAllowNegDist;
    305339#endif
     
    334368  UInt    getVSOMode( )                  { return m_uiVSOMode; }
    335369
    336 #if RDO_DIST_INT
     370#if HHI_VSO_DIST_INT
    337371  Void    setAllowNegDist ( Bool bAllowNegDist );
    338372#endif
     
    346380
    347381private:
    348 
    349   Dist xGetDistVSOMode1( Int iStartPosX, Int iStartPosY, Pel* piCur, Int iCurStride, Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, Bool bSAD );
    350   Dist xGetDistVSOMode2( Int iStartPosX, Int iStartPosY, Pel* piCur, Int iCurStride, Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, Bool bSAD );
    351   Dist xGetDistVSOMode3( Int iStartPosX, Int iStartPosY, Pel* piCur, Int iCurStride, Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, Bool bSAD );
    352382  Dist xGetDistVSOMode4( Int iStartPosX, Int iStartPosY, Pel* piCur, Int iCurStride, Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, Bool bSAD );
    353383
    354 #if GERHARD_VQM_XCHECK
    355   Dist xGetDistXCheck(  Int iStartPosX, Int iStartPosY, Pel* piCur, Int iCurStride, Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, Bool bSAD );
    356 #endif
    357 
    358 //GT VSO end
     384#endif // HHI_VSO
    359385
    360386};// END CLASS DEFINITION TComRdCost
  • trunk/source/Lib/TLibCommon/TComRdCostWeightPrediction.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    5689
    5790  UInt uiSum = 0;
    58 #if SB_INTERVIEW_SKIP
     91#if HHI_INTERVIEW_SKIP
    5992  if( pcDtParam->pUsed )
    6093  {
     
    90123    }
    91124#endif
    92 #if SB_INTERVIEW_SKIP
     125#if HHI_INTERVIEW_SKIP
    93126  }
    94127#endif
  • trunk/source/Lib/TLibCommon/TComRdCostWeightPrediction.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComResidualGenerator.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    1043#include "TComResidualGenerator.h"
    1144
     45
     46#if HHI_INTER_VIEW_RESIDUAL_PRED
    1247
    1348
     
    541576
    542577
    543 
     578#endif // HHI_INTER_VIEW_RESIDUAL_PRED
     579
  • trunk/source/Lib/TLibCommon/TComResidualGenerator.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    1750
    1851
     52#if HHI_INTER_VIEW_RESIDUAL_PRED
    1953
    2054class TComResidualGenerator
     
    69103
    70104
     105#endif // __TCOM_RESIDUAL_GENERATOR__
    71106
    72 #endif // __TCOM_RESIDUAL_GENERATOR__
     107#endif // HHI_INTER_VIEW_RESIDUAL_PRED
    73108
    74109
  • trunk/source/Lib/TLibCommon/TComRom.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    6497  }
    6598
    66 #if HHI_DMM_INTRA
     99#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    67100  if ( !g_aacWedgeLists.empty() )
    68101  {
     
    23692402// Mapping each Unified Directional Intra prediction direction to DCT/DST transform
    23702403// 0 implies use DCT, 1 implies DST
    2371 #if ADD_PLANAR_MODE && !HHI_DMM_INTRA
     2404#if ADD_PLANAR_MODE
     2405#if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
     2406const UChar g_aucDCTDSTMode_Vert[NUM_INTRA_MODE+8] =
     2407#elif HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     2408const UChar g_aucDCTDSTMode_Vert[NUM_INTRA_MODE+4] =
     2409#else
    23722410const UChar g_aucDCTDSTMode_Vert[NUM_INTRA_MODE] =
    2373 #elif !ADD_PLANAR_MODE && HHI_DMM_INTRA
    2374 const UChar g_aucDCTDSTMode_Vert[34+NUM_DMM_INTRA] =
    2375 #elif ADD_PLANAR_MODE && HHI_DMM_INTRA
    2376 const UChar g_aucDCTDSTMode_Vert[NUM_INTRA_MODE+NUM_DMM_INTRA] =
     2411#endif
     2412#else
     2413#if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
     2414const UChar g_aucDCTDSTMode_Vert[34+8] =
     2415#elif
     2416const UChar g_aucDCTDSTMode_Vert[34+4] =
    23772417#else
    23782418const UChar g_aucDCTDSTMode_Vert[34] =
     2419#endif
    23792420#endif
    23802421{ //0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
     
    23832424,1
    23842425#endif
    2385 #if HHI_DMM_INTRA
     2426#if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
    23862427,0,0,0,0,0,0,0,0
    2387 #endif
    2388 };
    2389 #if ADD_PLANAR_MODE && !HHI_DMM_INTRA
     2428#elif HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     2429,0,0,0,0
     2430#endif
     2431};
     2432#if ADD_PLANAR_MODE
     2433#if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
     2434const UChar g_aucDCTDSTMode_Hor[NUM_INTRA_MODE+8] =
     2435#elif HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     2436const UChar g_aucDCTDSTMode_Hor[NUM_INTRA_MODE+4] =
     2437#else
    23902438const UChar g_aucDCTDSTMode_Hor[NUM_INTRA_MODE] =
    2391 #elif !ADD_PLANAR_MODE && HHI_DMM_INTRA
    2392 const UChar g_aucDCTDSTMode_Hor[34+NUM_DMM_INTRA] =
    2393 #elif ADD_PLANAR_MODE && HHI_DMM_INTRA
    2394 const UChar g_aucDCTDSTMode_Hor[NUM_INTRA_MODE+NUM_DMM_INTRA] =
     2439#endif
     2440#else
     2441#if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
     2442const UChar g_aucDCTDSTMode_Hor[34+8] =
     2443#elif
     2444const UChar g_aucDCTDSTMode_Hor[34+4] =
    23952445#else
    23962446const UChar g_aucDCTDSTMode_Hor[34] =
     2447#endif
    23972448#endif
    23982449{ //0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
     
    24012452,1
    24022453#endif
    2403 #if HHI_DMM_INTRA
     2454#if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
    24042455,0,0,0,0,0,0,0,0
     2456#elif HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     2457,0,0,0,0
    24052458#endif
    24062459};
     
    25362589};
    25372590
    2538 #if HHI_DMM_INTRA
     2591#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    25392592const WedgeResolution g_aeWedgeResolutionList[5] =
    25402593{
     
    25682621};
    25692622
    2570 const UChar g_aucAdditionalIntraModeList[NUM_DMM_INTRA] =
    2571 {
    2572   DMM_WEDGE_FULL_IDX,
    2573   DMM_WEDGE_FULL_D_IDX,
    2574   DMM_WEDGE_PREDTEX_IDX,
    2575   DMM_WEDGE_PREDTEX_D_IDX,
    2576   DMM_CONTOUR_PREDTEX_IDX,
    2577   DMM_CONTOUR_PREDTEX_D_IDX,
    2578   DMM_WEDGE_PREDDIR_IDX,
    2579   DMM_WEDGE_PREDDIR_D_IDX
    2580 };
    2581 
    25822623double g_dDeltaDCsQuantOffset = 0.0;
    25832624#endif
     
    25952636// Misc.
    25962637// ====================================================================================================================
    2597 #if SB_DEBUG
    2598 Bool g_bEncoding = false ;
    2599 #endif
    26002638Char  g_aucConvertToBit  [ MAX_CU_SIZE+1 ];
    26012639
     
    27542792#endif
    27552793
    2756 #if HHI_DMM_INTRA
     2794#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    27572795std::vector<std::vector<TComWedgelet> > g_aacWedgeLists;
    27582796std::vector<std::vector<TComWedgeRef> > g_aacWedgeRefLists;
  • trunk/source/Lib/TLibCommon/TComRom.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    1447
    1548
    16 #if HHI_DMM_INTRA
     49#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    1750#include "TComWedgelet.h"
    1851#endif
     
    3871#endif //QC_MDCS
    3972
    40 #if HHI_DMM_INTRA
     73#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    4174Void initWedgeLists();
    4275Void createWedgeList( UInt uiWidth, UInt uiHeight, std::vector<TComWedgelet> &racWedgeList, std::vector<TComWedgeRef> &racWedgeRefList, WedgeResolution eWedgeRes );
     
    72105extern       UInt g_auiPUOffset[4];
    73106
    74 #if HHI_DMM_INTRA
     107#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    75108extern       std::vector<std::vector<TComWedgelet> > g_aacWedgeLists;
    76109extern       std::vector<std::vector<TComWedgeRef> > g_aacWedgeRefLists;
     
    287320#endif
    288321
    289 #if HHI_DMM_INTRA
     322#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    290323extern const UChar g_aucWedgeFullBitsListIdx[7];
    291324extern const UChar g_aucIntraSizeIdxToWedgeSize[7];
    292 extern const UChar g_aucAdditionalIntraModeList[NUM_DMM_INTRA];
    293325extern const WedgeResolution g_aeWedgeResolutionList[5];
    294 
    295326extern       double g_dDeltaDCsQuantOffset;
    296327#endif
     
    315346#if INTRA_DST_TYPE_7
    316347extern const short g_as_DST_MAT_4 [4][4];
    317 #if ADD_PLANAR_MODE && !HHI_DMM_INTRA
     348#if ADD_PLANAR_MODE
     349#if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
     350extern const UChar g_aucDCTDSTMode_Vert[NUM_INTRA_MODE+8];
     351extern const UChar g_aucDCTDSTMode_Hor[NUM_INTRA_MODE+8];
     352#elif HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     353extern const UChar g_aucDCTDSTMode_Vert[NUM_INTRA_MODE+4];
     354extern const UChar g_aucDCTDSTMode_Hor[NUM_INTRA_MODE+4];
     355#else
    318356extern const UChar g_aucDCTDSTMode_Vert[NUM_INTRA_MODE];
    319357extern const UChar g_aucDCTDSTMode_Hor[NUM_INTRA_MODE];
    320 #elif !ADD_PLANAR_MODE && HHI_DMM_INTRA
    321 extern const UChar g_aucDCTDSTMode_Vert[34+NUM_DMM_INTRA];
    322 extern const UChar g_aucDCTDSTMode_Hor[34+NUM_DMM_INTRA];
    323 #elif ADD_PLANAR_MODE && HHI_DMM_INTRA
    324 extern const UChar g_aucDCTDSTMode_Vert[NUM_INTRA_MODE+NUM_DMM_INTRA];
    325 extern const UChar g_aucDCTDSTMode_Hor[NUM_INTRA_MODE+NUM_DMM_INTRA];
     358#endif
     359#else
     360#if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
     361extern const UChar g_aucDCTDSTMode_Vert[34+8];
     362extern const UChar g_aucDCTDSTMode_Hor[34+8];
     363#elif HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     364extern const UChar g_aucDCTDSTMode_Vert[34+4];
     365extern const UChar g_aucDCTDSTMode_Hor[34+4];
    326366#else
    327367extern const UChar g_aucDCTDSTMode_Vert[34];
     
    329369#endif
    330370#endif
     371#endif
    331372// ==========================================
    332373
     
    334375// Misc.
    335376// ====================================================================================================================
    336 #if SB_DEBUG
    337 extern Bool g_bEncoding ;
    338 #endif
    339377
    340378#if QC_MOD_LCEC
     
    500538__inline Void mapPlanartoDC(   Int& curDir ) { curDir = (curDir == PLANAR_IDX) ? 2 : curDir; }
    501539#endif
    502 #if HHI_DMM_INTRA
     540#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    503541__inline Void mapDMMtoDC( UChar& curDir ) { curDir = (curDir > MAX_MODE_ID_INTRA_DIR) ? 2 : curDir; }
    504542__inline Void mapDMMtoDC(  UInt& curDir ) { curDir = (curDir > MAX_MODE_ID_INTRA_DIR) ? 2 : curDir; }
  • trunk/source/Lib/TLibCommon/TComSlice.cpp

    r2 r5  
     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-2011, 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 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
     35
    136/** \file     TComSlice.cpp
    237    \brief    slice header and SPS class
     
    1752  m_aiNumRefIdx[1]      = 0;
    1853  m_bLoopFilterDisable  = false;
    19 
     54 
    2055  m_iSliceQpDelta       = 0;
    21 
     56 
    2257  m_iDepth              = 0;
    23 
     58 
    2459  m_pcPic               = NULL;
    2560  m_bRefenced           = false;
     
    2863#endif
    2964  m_uiColDir = 0;
    30 
     65 
    3166  m_iViewIdx = 0 ;
    3267
     
    3671  m_bRefIdxCombineCoding = false;
    3772#endif
    38 #if DCM_COMB_LIST
     73#if DCM_COMB_LIST 
    3974  m_bRefPicListCombinationFlag = false;
    4075  m_bRefPicListModificationFlagLC = false;
     
    6196  m_aiNumRefIdx[0]      = 0;
    6297  m_aiNumRefIdx[1]      = 0;
    63 
     98 
    6499  m_uiColDir = 0;
    65100
     
    67102  ::memset( m_aiNumRefIdx,   0, sizeof ( m_aiNumRefIdx ));
    68103  m_pcTexturePic = NULL;
    69 
     104 
    70105  initEqualRef();
    71106  m_bNoBackPredFlag = false;
     
    73108  m_bRefIdxCombineCoding = false;
    74109#endif
    75 #if DCM_COMB_LIST
     110#if DCM_COMB_LIST 
    76111  m_bRefPicListCombinationFlag = false;
    77112  m_bRefPicListModificationFlagLC = false;
     
    83118  TComPic*    pcPicExtract;
    84119  TComPic*    pcPicInsert;
    85 
     120 
    86121  TComList<TComPic*>::iterator    iterPicExtract;
    87122  TComList<TComPic*>::iterator    iterPicExtract_1;
    88123  TComList<TComPic*>::iterator    iterPicInsert;
    89 
     124 
    90125  for (Int i = 1; i < (Int)(rcListPic.size()); i++)
    91126  {
     
    94129    pcPicExtract = *(iterPicExtract);
    95130    pcPicExtract->setCurrSliceIdx(0);
    96 
     131   
    97132    iterPicInsert = rcListPic.begin();
    98133    while (iterPicInsert != iterPicExtract)
     
    104139        break;
    105140      }
    106 
     141     
    107142      iterPicInsert++;
    108143    }
    109 
     144   
    110145    iterPicExtract_1 = iterPicExtract;    iterPicExtract_1++;
    111 
     146   
    112147    //  swap iterPicExtract and iterPicInsert, iterPicExtract = curr. / iterPicInsert = insertion position
    113148    rcListPic.insert (iterPicInsert, iterPicExtract, iterPicExtract_1);
     
    128163}
    129164
    130 #if DCM_COMB_LIST
     165#if DCM_COMB_LIST 
    131166Void TComSlice::generateCombinedList()
    132167{
     
    162197
    163198        if(bTempRefIdxInL2 == true)
    164         {
     199        { 
    165200          m_eListIdFromIdxOfLC[m_aiNumRefIdx[REF_PIC_LIST_C]] = REF_PIC_LIST_0;
    166201          m_iRefIdxFromIdxOfLC[m_aiNumRefIdx[REF_PIC_LIST_C]] = iNumRefIdx;
     
    346381 * \param rcListPic reference to the reference picture list
    347382 * This function marks the reference pictures as "unused for reference" in the following conditions.
    348  * If the nal_unit_type is IDR all pictures in the reference picture list
    349  * is marked as "unused for reference"
     383 * If the nal_unit_type is IDR all pictures in the reference picture list 
     384 * is marked as "unused for reference" 
    350385 * Otherwise do for the CDR case (non CDR case has no effect since both if conditions below will not be true)
    351  *    If the bRefreshPending flag is true (a deferred decoding refresh is pending) and the current
    352  *    temporal reference is greater than the temporal reference of the latest CDR picture (uiPOCCDR),
    353  *    mark all reference pictures except the latest CDR picture as "unused for reference" and set
     386 *    If the bRefreshPending flag is true (a deferred decoding refresh is pending) and the current 
     387 *    temporal reference is greater than the temporal reference of the latest CDR picture (uiPOCCDR), 
     388 *    mark all reference pictures except the latest CDR picture as "unused for reference" and set 
    354389 *    the bRefreshPending flag to false.
    355  *    If the nal_unit_type is CDR, set the bRefreshPending flag to true and iPOCCDR to the temporal
     390 *    If the nal_unit_type is CDR, set the bRefreshPending flag to true and iPOCCDR to the temporal 
    356391 *    reference of the current picture.
    357392 * Note that the current picture is already placed in the reference list and its marking is not changed.
     
    361396{
    362397  TComPic*                 rpcPic;
    363   UInt uiPOCCurr = getPOC();
     398  UInt uiPOCCurr = getPOC(); 
    364399
    365400  if (getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR)  // IDR
     
    377412  else // CDR or No DR
    378413  {
    379     if (bRefreshPending==true && uiPOCCurr > uiPOCCDR) // CDR reference marking pending
     414    if (bRefreshPending==true && uiPOCCurr > uiPOCCDR) // CDR reference marking pending 
    380415    {
    381416      TComList<TComPic*>::iterator        iterPic       = rcListPic.begin();
     
    386421        iterPic++;
    387422      }
    388       bRefreshPending = false;
     423      bRefreshPending = false; 
    389424    }
    390425    if (getNalUnitType() == NAL_UNIT_CODED_SLICE_CDR) // CDR picture found
    391426    {
    392       bRefreshPending = true;
     427      bRefreshPending = true; 
    393428      uiPOCCDR = uiPOCCurr;
    394429    }
     
    407442#if DCM_DECODING_REFRESH
    408443  m_eNalUnitType         = pSrc->m_eNalUnitType;
    409 #endif
     444#endif 
    410445  m_eSliceType           = pSrc->m_eSliceType;
    411446  m_iSliceQp             = pSrc->m_iSliceQp;
    412447  m_iSymbolMode          = pSrc->m_iSymbolMode;
    413448  m_bLoopFilterDisable   = pSrc->m_bLoopFilterDisable;
    414 
    415 #if DCM_COMB_LIST
     449 
     450#if DCM_COMB_LIST 
    416451  for (i = 0; i < 3; i++)
    417452  {
     
    440475    m_aiNumRefIdx[i]     = pSrc->m_aiNumRefIdx[i];
    441476  }
    442 #endif
     477#endif 
    443478
    444479  m_iSliceQpDelta        = pSrc->m_iSliceQpDelta;
     
    451486      m_aiRefViewList[i][j]  = pSrc->m_aiRefViewList[i][j];
    452487    }
    453   }
     488  } 
    454489  m_iDepth               = pSrc->m_iDepth;
    455490
     
    489524  m_uiSliceIdx                    = pSrc->m_uiSliceIdx;
    490525  m_uiEntropySliceMode            = pSrc->m_uiEntropySliceMode;
    491   m_uiEntropySliceArgument        = pSrc->m_uiEntropySliceArgument;
     526  m_uiEntropySliceArgument        = pSrc->m_uiEntropySliceArgument; 
    492527  m_uiEntropySliceCurStartCUAddr  = pSrc->m_uiEntropySliceCurStartCUAddr;
    493528  m_uiEntropySliceCurEndCUAddr    = pSrc->m_uiEntropySliceCurEndCUAddr;
     
    534569}
    535570
    536 // Default WP values settings : no weight.
     571// Default WP values settings : no weight. 
    537572Void  TComSlice::resetWpScaling(wpScalingParam  wp[2][MAX_NUM_REF][3])
    538573{
     
    608643  m_uiMaxTrDepth  = 1;
    609644  m_uiMaxTrSize   = 32;
    610 
     645 
    611646  // Tool list
    612647  m_bUseALF       = false;
    613648  m_bUseDQP       = false;
    614 
     649 
    615650  m_bUseMRG      = false; // SOPH:
     651#if HHI_MPI
    616652  m_bUseMVI = false;
    617 
     653#endif
     654 
    618655  m_uiViewId              = 0;
    619656  m_iViewOrderIdx         = 0;
     
    624661  ::memset( m_aaiCodedOffset, 0x00, sizeof( m_aaiCodedOffset ) );
    625662
     663#if DEPTH_MAP_GENERATION
    626664  m_uiPredDepthMapGeneration = 0;
    627   m_uiMultiviewMvPredMode    = 0;
    628665  m_uiPdmPrecision           = 0;
    629666  ::memset( m_aiPdmScaleNomDelta, 0x00, sizeof( m_aiPdmScaleNomDelta  ) );
    630667  ::memset( m_aiPdmOffset,        0x00, sizeof( m_aiPdmOffset         ) );
     668#endif
     669#if HHI_INTER_VIEW_MOTION_PRED
     670  m_uiMultiviewMvPredMode    = 0;
     671#endif
     672#if HHI_INTER_VIEW_RESIDUAL_PRED
    631673  m_uiMultiviewResPredMode   = 0;
     674#endif
    632675
    633676  // AMVP parameter
    634677  ::memset( m_aeAMVPMode, 0, sizeof( m_aeAMVPMode ) );
    635 #if SB_MEM_FIX
    636   m_bUseDepthModelModes = false;
    637 #endif
     678  m_bUseDMM = false;
    638679}
    639680
     
    697738
    698739
     740#if DEPTH_MAP_GENERATION
    699741Void
    700742TComSPS::setPredDepthMapGeneration( UInt uiViewId, Bool bIsDepth, UInt uiPdmGenMode, UInt uiPdmMvPredMode, UInt uiPdmPrec, Int** aaiPdmScaleNomDelta, Int** aaiPdmOffset )
    701 {
     743{ 
    702744  AOF( m_uiViewId == uiViewId );
    703745  AOF( m_bDepth   == bIsDepth );
     
    705747  AOT( uiPdmGenMode && ( aaiPdmScaleNomDelta == 0 || aaiPdmOffset == 0 ) );
    706748  AOT( uiPdmMvPredMode && uiPdmGenMode == 0 );
    707 
     749 
    708750  m_uiPredDepthMapGeneration = uiPdmGenMode;
     751#if HHI_INTER_VIEW_MOTION_PRED
    709752  m_uiMultiviewMvPredMode    = uiPdmMvPredMode;
     753#endif
    710754  m_uiPdmPrecision           = ( m_uiPredDepthMapGeneration ? uiPdmPrec : 0 );
    711755  ::memset( m_aiPdmScaleNomDelta, 0x00, sizeof( m_aiPdmScaleNomDelta  ) );
     
    720764  }
    721765}
    722 
     766#endif
  • trunk/source/Lib/TLibCommon/TComSlice.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    1750
    1851class TComPic;
     52#if DEPTH_MAP_GENERATION
    1953class TComDepthMapGenerator;
     54#endif
     55#if HHI_INTER_VIEW_RESIDUAL_PRED
    2056class TComResidualGenerator;
     57#endif
    2158
    2259// ====================================================================================================================
     
    3875  UInt        m_uiMinTrDepth;
    3976  UInt        m_uiMaxTrDepth;
    40  
     77
    4178  UInt        m_uiViewId;
    4279  Int         m_iViewOrderIdx;
     
    5491  Bool        m_bUseALF;
    5592  Bool        m_bUseDQP;
    56 #if !SB_NO_LowDelayCoding
     93#if !HHI_NO_LowDelayCoding
    5794  Bool        m_bUseLDC;
    5895#endif
     
    6097  Bool        m_bUseMRG; // SOPH:
    6198
    62 #if LM_CHROMA 
     99#if LM_CHROMA
    63100  Bool        m_bUseLMChroma; // JL:
    64101#endif
     
    68105  Bool        m_bLCMod;
    69106#endif
    70  
     107
    71108#if HHI_RMP_SWITCH
    72109  Bool        m_bUseRMP;
     
    76113  UInt        m_uiBitDepth;
    77114  UInt        m_uiBitIncrement;
    78  
     115
    79116  // Max physical transform size
    80117  UInt        m_uiMaxTrSize;
    81  
     118
    82119  Int m_iAMPAcc[MAX_CU_DEPTH];
    83120
     
    86123#endif
    87124#if MTK_SAO
    88   Bool        m_bUseSAO;
    89 #endif
     125  Bool        m_bUseSAO;
     126#endif
     127#if HHI_MPI
    90128  Bool        m_bUseMVI;
     129#endif
    91130
    92131  UInt m_uiCodedPictureBufferSize ;
    93132
    94 #if HHI_DMM_INTRA
    95   Bool  m_bUseDepthModelModes;
    96 #endif
    97 
     133#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     134  Bool  m_bUseDMM;
     135#endif
     136
     137#if DEPTH_MAP_GENERATION
    98138  UInt  m_uiPredDepthMapGeneration;
    99   UInt  m_uiMultiviewMvPredMode;
    100139  UInt  m_uiPdmPrecision;
    101140  Int   m_aiPdmScaleNomDelta[MAX_NUMBER_VIEWS];
    102141  Int   m_aiPdmOffset       [MAX_NUMBER_VIEWS];
     142#endif
     143#if HHI_INTER_VIEW_MOTION_PRED
     144  UInt  m_uiMultiviewMvPredMode;
     145#endif
     146#if HHI_INTER_VIEW_RESIDUAL_PRED
    103147  UInt  m_uiMultiviewResPredMode;
    104 
     148#endif
     149
     150#if DEPTH_MAP_GENERATION
    105151  TComDepthMapGenerator* m_pcDepthMapGenerator;
     152#endif
     153#if HHI_INTER_VIEW_RESIDUAL_PRED
    106154  TComResidualGenerator* m_pcResidualGenerator;
     155#endif
    107156
    108157public:
    109158  TComSPS();
    110159  virtual ~TComSPS();
    111  
     160
    112161  // structure
    113162  Void setSPSId       ( UInt u ) { m_uiSPSId = u;           }
     
    140189  Int  getPad         ( Int  u ) { assert(u < 2); return m_aiPad[u];}
    141190  Int* getPad         ( )        { return m_aiPad; }
    142  
     191
    143192  Void        initMultiviewSPS      ( UInt uiViewId, Int iViewOrderIdx = 0, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 );
    144193  Void        initMultiviewSPSDepth ( UInt uiViewId, Int iViewOrderIdx );
     
    157206  Void setMaxTrSize   ( UInt u ) { m_uiMaxTrSize = u;       }
    158207  UInt getMaxTrSize   ()         { return  m_uiMaxTrSize;   }
    159  
     208
    160209  // Tool list
    161210  Bool getUseALF      ()         { return m_bUseALF;        }
    162211  Bool getUseDQP      ()         { return m_bUseDQP;        }
    163  
    164 #if !SB_NO_LowDelayCoding
     212
     213#if !HHI_NO_LowDelayCoding
    165214  Bool getUseLDC      ()         { return m_bUseLDC;        }
    166215#endif
    167216  Bool getUsePAD      ()         { return m_bUsePAD;        }
    168217  Bool getUseMRG      ()         { return m_bUseMRG;        } // SOPH:
    169  
     218
    170219  Void setUseALF      ( Bool b ) { m_bUseALF  = b;          }
    171220  Void setUseDQP      ( Bool b ) { m_bUseDQP   = b;         }
    172  
    173 #if !SB_NO_LowDelayCoding
     221
     222#if !HHI_NO_LowDelayCoding
    174223  Void setUseLDC      ( Bool b ) { m_bUseLDC   = b;         }
    175224#endif
     
    177226  Void setUseMRG      ( Bool b ) { m_bUseMRG  = b;          } // SOPH:
    178227 
    179 #if HHI_DMM_INTRA
    180   Bool getUseDepthModelModes()         { return m_bUseDepthModelModes; }
    181   Void setUseDepthModelModes( Bool b ) { m_bUseDepthModelModes = b;    }
     228#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     229  Bool getUseDMM()         { return m_bUseDMM; }
     230  Void setUseDMM( Bool b ) { m_bUseDMM = b;    }
    182231#endif
    183232
     
    194243  Void setUseRMP     ( Bool b ) { m_bUseRMP = b;    }
    195244#endif
    196  
    197 #if LM_CHROMA 
     245
     246#if LM_CHROMA
    198247  Bool getUseLMChroma ()         { return m_bUseLMChroma;        }
    199248  Void setUseLMChroma ( Bool b ) { m_bUseLMChroma  = b;          }
     
    203252  AMVP_MODE getAMVPMode ( UInt uiDepth ) { assert(uiDepth < g_uiMaxCUDepth);  return m_aeAMVPMode[uiDepth]; }
    204253  Void      setAMVPMode ( UInt uiDepth, AMVP_MODE eMode) { assert(uiDepth < g_uiMaxCUDepth);  m_aeAMVPMode[uiDepth] = eMode; }
    205  
     254
    206255  // Bit-depth
    207256  UInt      getBitDepth     ()         { return m_uiBitDepth;     }
     
    212261#if MTK_NONCROSS_INLOOP_FILTER
    213262  Void      setLFCrossSliceBoundaryFlag     ( Bool   bValue  )    { m_bLFCrossSliceBoundaryFlag = bValue; }
    214   Bool      getLFCrossSliceBoundaryFlag     ()                    { return m_bLFCrossSliceBoundaryFlag;   } 
     263  Bool      getLFCrossSliceBoundaryFlag     ()                    { return m_bLFCrossSliceBoundaryFlag;   }
    215264#endif
    216265
     
    220269#endif
    221270
     271#if HHI_MPI
    222272  Void setUseMVI                  (Bool bVal)  {m_bUseMVI = bVal;}
    223273  Bool getUseMVI                  ()           {return m_bUseMVI;}
     274#endif
    224275
    225276  Void      setCodedPictureBufferSize( UInt u ) { m_uiCodedPictureBufferSize = u ;}
    226277  UInt      getCodedPictureBufferSize( )        { return m_uiCodedPictureBufferSize ;}
    227278
     279#if DEPTH_MAP_GENERATION
    228280  Void  setPredDepthMapGeneration( UInt uiViewId, Bool bIsDepth, UInt uiPdmGenMode = 0, UInt uiPdmMvPredMode = 0, UInt uiPdmPrec = 0, Int** aaiPdmScaleNomDelta = 0, Int** aaiPdmOffset = 0 );
     281#endif
     282#if HHI_INTER_VIEW_RESIDUAL_PRED
    229283  Void  setMultiviewResPredMode  ( UInt uiResPrdMode ) { m_uiMultiviewResPredMode = uiResPrdMode; }
    230  
     284#endif
     285
     286#if DEPTH_MAP_GENERATION
    231287  UInt  getPredDepthMapGeneration()          { return m_uiPredDepthMapGeneration; }
    232   UInt  getMultiviewMvPredMode   ()          { return m_uiMultiviewMvPredMode;    }
    233288  UInt  getPdmPrecision          ()          { return m_uiPdmPrecision;           }
    234289  Int*  getPdmScaleNomDelta      ()          { return m_aiPdmScaleNomDelta;       }
    235290  Int*  getPdmOffset             ()          { return m_aiPdmOffset;              }
     291#endif
     292#if HHI_INTER_VIEW_MOTION_PRED
     293  UInt  getMultiviewMvPredMode   ()          { return m_uiMultiviewMvPredMode;    }
     294#endif
     295#if HHI_INTER_VIEW_RESIDUAL_PRED
    236296  UInt  getMultiviewResPredMode  ()          { return m_uiMultiviewResPredMode;   }
    237 
     297#endif
     298
     299#if DEPTH_MAP_GENERATION
    238300  Void                    setDepthMapGenerator( TComDepthMapGenerator* pcDepthMapGenerator )  { m_pcDepthMapGenerator = pcDepthMapGenerator; }
    239301  TComDepthMapGenerator*  getDepthMapGenerator()                                              { return m_pcDepthMapGenerator; }
    240 
     302#endif
     303#if HHI_INTER_VIEW_RESIDUAL_PRED
    241304  Void                    setResidualGenerator( TComResidualGenerator* pcResidualGenerator )  { m_pcResidualGenerator = pcResidualGenerator; }
    242305  TComResidualGenerator*  getResidualGenerator()                                              { return m_pcResidualGenerator; }
     306#endif
    243307};
    244308
     
    256320  UInt        m_uiPPSId;
    257321  UInt        m_uiSPSId;
    258  
     322
    259323public:
    260324  TComPPS();
    261325  virtual ~TComPPS();
    262  
     326
    263327  Void      setPPSId                ( UInt u ) { m_uiPPSId = u; }
    264328  UInt      getPPSId                ()         { return m_uiPPSId; }
     
    301365class TComSlice
    302366{
    303  
     367
    304368private:
    305369  //  Bitstream writing
     
    313377  Int         m_iSymbolMode;
    314378  Bool        m_bLoopFilterDisable;
    315  
     379
    316380#if DCM_COMB_LIST
    317381  Int         m_aiNumRefIdx   [3];    //  for multiple reference of current slice
     
    326390#else
    327391  Int         m_aiNumRefIdx   [2];    //  for multiple reference of current slice
    328 #endif 
     392#endif
    329393
    330394  //  Data
     
    334398  Int         m_iDepth;
    335399  TComPic*    m_pcTexturePic;
    336  
     400
    337401  // referenced slice?
    338402  Bool        m_bRefenced;
     
    340404  Bool        m_bRounding;
    341405#endif
    342  
     406
    343407  // access channel
    344408  TComSPS*    m_pcSPS;
    345409  TComPPS*    m_pcPPS;
    346410  TComPic*    m_pcPic;
    347  
     411
    348412  UInt        m_uiColDir;  // direction to get colocated CUs
    349  
     413
    350414  Double      m_dLambda;
    351  
     415
    352416  Bool        m_abEqualRef  [2][MAX_NUM_REF][MAX_NUM_REF];
    353417
    354   // SB
    355418  Int         m_iViewIdx;
    356419  Int         m_aiRefViewList[2][MAX_INPUT_VIEW_NUM];
    357  
     420
    358421  Bool        m_bNoBackPredFlag;
    359422#if MS_LCEC_LOOKUP_TABLE_EXCEPTION
     
    381444  wpACDCParam   m_weightACDCParam[3]; // [0:Y, 1:U, 2:V]
    382445#endif
    383  
     446
    384447public:
    385448  TComSlice();
    386449  virtual ~TComSlice();
    387  
     450
    388451  Void      initSlice       ();
    389  
     452
    390453  Void      setSPS          ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; }
    391454  TComSPS*  getSPS          () { return m_pcSPS; }
    392  
     455
    393456  Void      setPPS          ( TComPPS* pcPPS ) { m_pcPPS = pcPPS; }
    394457  TComPPS*  getPPS          () { return m_pcPPS; }
    395  
     458
    396459  UInt      getPPSId        ()                          { return  m_uiPPSId;            }
    397460  SliceType getSliceType    ()                          { return  m_eSliceType;         }
     
    407470  Int       getDepth            ()                              { return  m_iDepth;                     }
    408471  UInt      getColDir           ()                              { return  m_uiColDir;                   }
    409  
    410 #if DCM_COMB_LIST 
     472
     473#if DCM_COMB_LIST
    411474  Int       getRefIdxOfLC       (RefPicList e, Int iRefIdx)     { return m_iRefIdxOfLC[e][iRefIdx];           }
    412475  Int       getListIdFromIdxOfLC(Int iRefIdx)                   { return m_eListIdFromIdxOfLC[iRefIdx];       }
     
    415478  Int       getRefIdxOfL1FromRefIdxOfL0(Int iRefIdx)            { return m_iRefIdxOfL1FromRefIdxOfL0[iRefIdx];}
    416479  Bool      getRefPicListModificationFlagLC()                   {return m_bRefPicListModificationFlagLC;}
    417   Void      setRefPicListModificationFlagLC(Bool bflag)         {m_bRefPicListModificationFlagLC=bflag;}     
     480  Void      setRefPicListModificationFlagLC(Bool bflag)         {m_bRefPicListModificationFlagLC=bflag;}
    418481  Bool      getRefPicListCombinationFlag()                      {return m_bRefPicListCombinationFlag;}
    419   Void      setRefPicListCombinationFlag(Bool bflag)            {m_bRefPicListCombinationFlag=bflag;}     
     482  Void      setRefPicListCombinationFlag(Bool bflag)            {m_bRefPicListCombinationFlag=bflag;}
    420483  Void      setListIdFromIdxOfLC(Int  iRefIdx, UInt uiVal)      { m_eListIdFromIdxOfLC[iRefIdx]=uiVal; }
    421484  Void      setRefIdxFromIdxOfLC(Int  iRefIdx, UInt uiVal)      { m_iRefIdxFromIdxOfLC[iRefIdx]=uiVal; }
     
    429492  Bool      isRounding()                                        { return m_bRounding; }
    430493#endif
    431  
     494
    432495  Void      setPPSId            ( UInt u )                      { m_uiPPSId           = u;      }
    433496  Void      setPOC              ( Int i )                       { m_iPOC              = i;      }
     
    442505  Void      setSymbolMode       ( Int b  )                      { m_iSymbolMode       = b;      }
    443506  Void      setLoopFilterDisable( Bool b )                      { m_bLoopFilterDisable= b;      }
    444  
     507
    445508  Void      setRefPic           ( TComPic* p, RefPicList e, Int iRefIdx ) { m_apcRefPicList[e][iRefIdx] = p; }
    446509  Void      setRefPOC           ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefPOCList[e][iRefIdx] = i; }
     
    448511  Void      setPic              ( TComPic* p )                  { m_pcPic             = p;      }
    449512  Void      setDepth            ( Int iDepth )                  { m_iDepth            = iDepth; }
    450  
     513
    451514  Void      setRefPicList       ( TComList<TComPic*>& rcListPic );
    452515  Void      setRefPOCList       ();
    453516  Void      setColDir           ( UInt uiDir ) { m_uiColDir = uiDir; }
    454  
     517
    455518  Void      setRefPicListFromGOPSTring( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& rapcSpatRefPics );
    456519  Void      setRefPicListExplicitlyDecoderSided( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& rapcSpatRefPics );
     
    459522  Bool      isInterB        ()                          { return  m_eSliceType == B_SLICE;  }
    460523  Bool      isInterP        ()                          { return  m_eSliceType == P_SLICE;  }
    461  
     524
    462525  Void      setLambda( Double d ) { m_dLambda = d; }
    463526  Double    getLambda() { return m_dLambda;        }
    464  
    465   //SB
     527
    466528  Void      setViewIdx(Int i)                           { m_iViewIdx = i; }
    467529  Int       getViewIdx()                                { return m_iViewIdx; }
     
    476538    return m_abEqualRef[e][iRefIdx1][iRefIdx2];
    477539  }
    478  
     540
    479541  Void setEqualRef( RefPicList e, Int iRefIdx1, Int iRefIdx2, Bool b)
    480542  {
    481543    m_abEqualRef[e][iRefIdx1][iRefIdx2] = m_abEqualRef[e][iRefIdx2][iRefIdx1] = b;
    482544  }
    483  
     545
    484546  static Void      sortPicList         ( TComList<TComPic*>& rcListPic );
    485  
     547
    486548  Bool getNoBackPredFlag() { return m_bNoBackPredFlag; }
    487549  Void setNoBackPredFlag( Bool b ) { m_bNoBackPredFlag = b; }
     
    517579  Bool isNextEntropySlice               ()                  { return m_bNextEntropySlice;                 }
    518580  Void setSliceBits                     ( UInt uiVal )      { m_uiSliceBits = uiVal;                      }
    519   UInt getSliceBits                     ()                  { return m_uiSliceBits;                       } 
    520  
     581  UInt getSliceBits                     ()                  { return m_uiSliceBits;                       }
     582
    521583  Void      initMultiviewSlice    ( Int** aaiScale = 0, Int** aaiOffset = 0 );
    522584
     
    537599  Void  initWpScaling();
    538600  inline Bool applyWP() { return( (m_eSliceType==P_SLICE && m_pcPPS->getUseWP()) || (m_eSliceType==B_SLICE && m_pcPPS->getWPBiPredIdc()) ); }
    539  
     601
    540602  Void  setWpAcDcParam ( wpACDCParam wp[3] ) { memcpy(m_weightACDCParam, wp, sizeof(wpACDCParam)*3); }
    541603  Void  getWpAcDcParam ( wpACDCParam *&wp );
     
    552614                         UInt                uiNthRefPic );
    553615#endif
    554  
     616
    555617};// END CLASS DEFINITION TComSlice
    556618
  • trunk/source/Lib/TLibCommon/TComTrQuant.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComTrQuant.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComWedgelet.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    107140}
    108141
    109 #if HHI_DMM_INTRA
     142#if HHI_DMM_WEDGE_INTRA
    110143Bool TComWedgelet::checkPredDirAbovePossible( UInt uiPredDirBlockSize, UInt uiPredDirBlockOffset )
    111144{
  • trunk/source/Lib/TLibCommon/TComWedgelet.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComWeightPrediction.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibCommon/TComYuv.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    321354}
    322355
    323 //GT VSO
    324356Void TComYuv::addClipPartLuma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize )
    325357{
     
    344376  }
    345377}
    346 //GT VSO end
    347 
    348378
    349379Void
     
    918948  return m_apiBufV + (iBlkX + iBlkY * getCStride()) * iBlkSize;
    919949}
    920 
    921 #if HHI_DMM_INTRA
    922 UInt64 TComYuv::getLumaDistDCSAD( UInt uiPartUnitIdx, UInt iBlkSize )
    923 {
    924   UInt iBlkX;
    925   UInt iBlkY;
    926   iBlkX = g_auiRasterToPelX[g_auiZscanToRaster[uiPartUnitIdx]];
    927   iBlkY = g_auiRasterToPelY[g_auiZscanToRaster[uiPartUnitIdx]];
    928 
    929   Pel*   piAct   = m_apiBufY + iBlkY*getStride() + iBlkX;
    930 
    931   Int    iDC    = 0;
    932   for( UInt uiY = 0; uiY < iBlkSize; uiY++ )
    933   {
    934     for( UInt uiX = 0; uiX < iBlkSize; uiX++ )
    935     {
    936       iDC += piAct[uiX];
    937     }
    938     piAct += getStride();
    939   }
    940   iDC /= (iBlkSize*iBlkSize);
    941 
    942   piAct   = m_apiBufY + iBlkY*getStride() + iBlkX;
    943 
    944   UInt64 uiDistSAD = 0;
    945 
    946   for( UInt uiY = 0; uiY < iBlkSize; uiY++ )
    947   {
    948     for( UInt uiX = 0; uiX < iBlkSize; uiX++ )
    949     {
    950       uiDistSAD += abs( piAct[uiX] - iDC );
    951     }
    952     piAct += getStride();
    953   }
    954 
    955   uiDistSAD /= ( iBlkSize * iBlkSize );
    956 
    957   return uiDistSAD;
    958 }
    959 
    960 UInt64 TComYuv::getLumaDistDCSAD( UInt iBlkSize )
    961 {
    962   Pel*   piAct   = m_apiBufY;
    963 
    964   Int    iDC    = 0;
    965   for( UInt uiY = 0; uiY < iBlkSize; uiY++ )
    966   {
    967     for( UInt uiX = 0; uiX < iBlkSize; uiX++ )
    968     {
    969       iDC += piAct[uiX];
    970     }
    971     piAct += getStride();
    972   }
    973   iDC /= (iBlkSize*iBlkSize);
    974 
    975   piAct   = m_apiBufY;
    976 
    977   UInt64 uiDistSAD = 0;
    978 
    979   for( UInt uiY = 0; uiY < iBlkSize; uiY++ )
    980   {
    981     for( UInt uiX = 0; uiX < iBlkSize; uiX++ )
    982     {
    983       uiDistSAD += abs( piAct[uiX] - iDC );
    984     }
    985     piAct += getStride();
    986   }
    987 
    988   uiDistSAD /= ( iBlkSize * iBlkSize );
    989 
    990   return uiDistSAD;
    991 }
    992 #endif
    993 
  • trunk/source/Lib/TLibCommon/TComYuv.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    89122  Void    addClipLuma       ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize );
    90123  Void    addClipChroma     ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize );
    91 //GT VSO
    92124  Void    addClipPartLuma   ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize ); //GT
    93 //GT VSO end
     125
    94126 
    95127  //  pcYuvSrc0 - pcYuvSrc1 -> m_apiBuf
     
    152184  __inline Pel  xClip  (Pel x )      { return ( (x < 0) ? 0 : (x > (Pel)g_uiIBDI_MAX) ? (Pel)g_uiIBDI_MAX : x ); }
    153185 
    154 #if HHI_DMM_INTRA
    155   UInt64 getLumaDistDCSAD( UInt uiPartUnitIdx, UInt iBlkSize );
    156   UInt64 getLumaDistDCSAD( UInt iBlkSize );
    157 #endif
    158 
    159186};// END CLASS DEFINITION TComYuv
    160187
  • trunk/source/Lib/TLibCommon/TypeDef.h

    r2 r5  
     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-2011, 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 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
    134/** \file     TypeDef.h
    235    \brief    Define basic types, new types and enumerations
     
    639#define _TYPEDEF__
    740
    8 #define MW_DEPTH_MAP_INTERP_FILTER        2 // 0:std, 1:bilin, 2:nearest neighbour
    9 #define MW_FULL_PEL_DEPTH_MAP_MV_SIGNALLING 1
    10 #define MW_MVI_SIGNALLING_MODE            1 // 0: mvi_flags at each layer, 1: using merge_flag
    11 #define SB_DEBUG                          1
     41
     42//>>>>> HHI 3DV tools >>>>>
     43#define HHI_INTER_VIEW_MOTION_PRED      1   // inter-view motion parameter prediction
     44#define HHI_INTER_VIEW_RESIDUAL_PRED    1   // inter-view residual prediction
     45#define HHI_FULL_PEL_DEPTH_MAP_MV_ACC   1   // full-pel mv accuracy for depth maps
     46#define HHI_MPI                         1   // motion parameter inheritance from texture picture for depth map coding
     47#define HHI_INTERVIEW_SKIP              1   // skipping of residual for renderable regions
     48#define HHI_INTERVIEW_SKIP_LAMBDA_SCALE 1   // scaling of lambda in cost calculation in rederable regions
     49#define HHI_VSO                         1   // view synthesis optimization
     50#define HHI_VSO_COLOR_PLANES            1   // view synthesis optimization in color planes
     51#define HHI_VSO_DIST_INT                1   // view synthesis optimization integer distorition in rdo process
     52
     53#if HHI_INTERVIEW_SKIP_LAMBDA_SCALE && !HHI_INTERVIEW_SKIP
     54  #error "HHI_INTERVIEW_SKIP_LAMBDA_SCALE cannot be enabled if HHI_INTERVIEW_SKIP is not"
     55#endif
     56
     57#define HHI_DMM_WEDGE_INTRA             1   // depth model modes independent on texture (explicit and intra-predicted Wedgelet prediction)
     58#define HHI_DMM_PRED_TEX                1   // depth model model dependent on texture (inter-component Wedgelet and Contour prediction )
     59
     60#define HHI_NO_LowDelayCoding           0   // old-fashioned encoder control, should be adapted to hm5.0
     61//<<<<< HHI 3DV tools <<<<<
     62
    1263
    1364////////////////////////////
     
    4293#define PART_MRG                          1            // If the number of partitions is two and size > 8, only merging mode is enabled for the first partition & do not code merge_flag for the first partition
    4394#define HHI_MRG_SKIP                      1            // (JCTVC-E481 - merge skip) replaces the AMVP based skip by merge based skip (E481 - MERGE skip)
    44 
    45 #define HHI_DMM_INTRA                     1            //< PM: depth modelling modes for intra
    46 #if HHI_DMM_INTRA
    47 #define NUM_DMM_INTRA                     8
    48 #define DMM_INTRA_MODE_BITS               3
    49 #define DMM_WEDGEMODEL_MIN_SIZE           4            //< PM: do not change
    50 #define DMM_WEDGEMODEL_MAX_SIZE          32
    51 #define DMM_WEDGE_PREDDIR_DELTAEND_MAX    4            //< PM: do not change
    52 #define DMM_RES_CHECK_INTRA               1            //< CB: skip residual for intra blocks
    53 #define HHI_DISABLE_INTRA_SMOOTHING_DEPTH 0
    54 #define DMM_NO_TEXTURE_MODES              0
    55 #endif
    5695
    5796#if HHI_RQT_INTRA_SPEEDUP_MOD && !HHI_RQT_INTRA_SPEEDUP
     
    150189#define PLANAR_IDX                        (NUM_INTRA_MODE-1)
    151190#endif
    152 #if HHI_DMM_INTRA
     191
     192#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     193#define DMM_WEDGEMODEL_MIN_SIZE           4           
     194#define DMM_WEDGEMODEL_MAX_SIZE          32
     195#define DMM_WEDGE_PREDDIR_DELTAEND_MAX    4           
     196
    153197#if ADD_PLANAR_MODE
    154198#define  MAX_MODE_ID_INTRA_DIR            34
     199#else
     200#define  MAX_MODE_ID_INTRA_DIR            33
     201#endif
     202#if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
    155203enum MODE_IDX
    156204{
    157   DMM_WEDGE_FULL_IDX       = 35,
    158   DMM_WEDGE_FULL_D_IDX        = 36,
    159   DMM_WEDGE_PREDTEX_IDX       = 37,
    160   DMM_WEDGE_PREDTEX_D_IDX     = 38,
    161   DMM_CONTOUR_PREDTEX_IDX     = 39,
    162   DMM_CONTOUR_PREDTEX_D_IDX   = 40,
    163   DMM_WEDGE_PREDDIR_IDX   = 41,
    164   DMM_WEDGE_PREDDIR_D_IDX = 42
    165 };
    166 #else
    167 #define  MAX_MODE_ID_INTRA_DIR            33
     205  DMM_WEDGE_FULL_IDX         = MAX_MODE_ID_INTRA_DIR+1,
     206  DMM_WEDGE_FULL_D_IDX       = MAX_MODE_ID_INTRA_DIR+2,
     207  DMM_WEDGE_PREDTEX_IDX      = MAX_MODE_ID_INTRA_DIR+3,
     208  DMM_WEDGE_PREDTEX_D_IDX    = MAX_MODE_ID_INTRA_DIR+4,
     209  DMM_CONTOUR_PREDTEX_IDX    = MAX_MODE_ID_INTRA_DIR+5,
     210  DMM_CONTOUR_PREDTEX_D_IDX  = MAX_MODE_ID_INTRA_DIR+6,
     211  DMM_WEDGE_PREDDIR_IDX      = MAX_MODE_ID_INTRA_DIR+7,
     212  DMM_WEDGE_PREDDIR_D_IDX    = MAX_MODE_ID_INTRA_DIR+8
     213};
     214#elif HHI_DMM_WEDGE_INTRA && !HHI_DMM_PRED_TEX
    168215enum MODE_IDX
    169216{
    170   DMM_WEDGE_FULL_IDX       = 34,
    171   DMM_WEDGE_FULL_D_IDX        = 35,
    172   DMM_WEDGE_PREDTEX_IDX       = 36,
    173   DMM_WEDGE_PREDTEX_D_IDX     = 37,
    174   DMM_CONTOUR_PREDTEX_IDX     = 38,
    175   DMM_CONTOUR_PREDTEX_D_IDX   = 39,
    176   DMM_WEDGE_PREDDIR_IDX   = 40,
    177   DMM_WEDGE_PREDDIR_D_IDX = 41
     217  DMM_WEDGE_FULL_IDX         = MAX_MODE_ID_INTRA_DIR+1,
     218  DMM_WEDGE_FULL_D_IDX       = MAX_MODE_ID_INTRA_DIR+2,
     219  DMM_WEDGE_PREDDIR_IDX      = MAX_MODE_ID_INTRA_DIR+3,
     220  DMM_WEDGE_PREDDIR_D_IDX    = MAX_MODE_ID_INTRA_DIR+4
     221};
     222#elif !HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
     223enum MODE_IDX
     224{
     225  DMM_WEDGE_PREDTEX_IDX      = MAX_MODE_ID_INTRA_DIR+1,
     226  DMM_WEDGE_PREDTEX_D_IDX    = MAX_MODE_ID_INTRA_DIR+2,
     227  DMM_CONTOUR_PREDTEX_IDX    = MAX_MODE_ID_INTRA_DIR+3,
     228  DMM_CONTOUR_PREDTEX_D_IDX  = MAX_MODE_ID_INTRA_DIR+4,
    178229};
    179230#endif
     
    325376typedef       Int64           RMDist;     ///< renderer model distortion
    326377
    327 #define RDO_DIST_INT    1
    328 
    329 #if RDO_DIST_INT
     378#if HHI_VSO_DIST_INT
    330379typedef       Int              Dist;       ///< RDO distortion
    331380#define       RDO_DIST_MIN     MIN_INT
  • trunk/source/Lib/TLibDecoder/SEIread.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibDecoder/SEIread.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibDecoder/TDecBinCoder.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    145178  xReadFlag( uiCode ); pcSPS->setUseALF ( uiCode ? true : false );
    146179  xReadFlag( uiCode ); pcSPS->setUseDQP ( uiCode ? true : false );
    147 #if !SB_NO_LowDelayCoding
     180#if !HHI_NO_LowDelayCoding
    148181  xReadFlag( uiCode ); pcSPS->setUseLDC ( uiCode ? true : false );
    149182#endif
     
    193226#endif
    194227
    195 #if HHI_DMM_INTRA
     228#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    196229  g_dDeltaDCsQuantOffset = Double(g_uiBitIncrement) -  2.0;
    197230#endif
     
    209242  { // baseview SPS -> set standard values
    210243    pcSPS->initMultiviewSPS         ( 0 );
     244#if DEPTH_MAP_GENERATION
    211245    pcSPS->setPredDepthMapGeneration( 0, false );
     246#endif
     247#if HHI_INTER_VIEW_RESIDUAL_PRED
    212248    pcSPS->setMultiviewResPredMode  ( 0 );
     249#endif
    213250  }
    214251  else
     
    220257      xReadSvlc(  iCode ); // view order index
    221258      pcSPS->initMultiviewSPSDepth    ( uiCode, iCode );
     259#if DEPTH_MAP_GENERATION
    222260      pcSPS->setPredDepthMapGeneration( uiCode, true );
     261#endif
     262#if HHI_INTER_VIEW_RESIDUAL_PRED
    223263      pcSPS->setMultiviewResPredMode  ( 0 );
    224 #if HHI_DMM_INTRA
     264#endif
     265#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    225266      xReadFlag( uiCode );
    226       pcSPS->setUseDepthModelModes( uiCode ? true : false );
    227 #endif
     267      pcSPS->setUseDMM( uiCode ? true : false );
     268#endif
     269#if HHI_MPI
    228270      xReadFlag( uiCode );
    229271      pcSPS->setUseMVI( uiCode ? true : false );
     272#endif
    230273    }
    231274    else
     
    250293      pcSPS->initMultiviewSPS( uiViewId, iVOI, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );
    251294     
    252       UInt uiPredDepthMapGeneration = 0, uiMultiviewMvPredMode = 0, uiPdmPrecision = 0, uiMultiviewResPredMode = 0;
     295#if DEPTH_MAP_GENERATION
     296      UInt uiPredDepthMapGeneration = 0, uiPdmPrecision = 0;
     297#if HHI_INTER_VIEW_MOTION_PRED
     298      UInt uiMultiviewMvPredMode = 0;
     299#endif
     300#if HHI_INTER_VIEW_RESIDUAL_PRED
     301      UInt uiMultiviewResPredMode = 0;
     302#endif
    253303      xReadUvlc( uiPredDepthMapGeneration );
    254304      if( uiPredDepthMapGeneration )
     
    260310          xReadSvlc( iCode );   m_aaiTempPdmOffset       [ uiViewId ][ uiBaseId ] = iCode;
    261311        }
     312#if HHI_INTER_VIEW_MOTION_PRED
    262313        xReadUvlc  ( uiMultiviewMvPredMode );
     314#endif
     315#if HHI_INTER_VIEW_RESIDUAL_PRED
    263316        xReadFlag  ( uiMultiviewResPredMode );
    264       }
     317#endif
     318      }
     319#if HHI_INTER_VIEW_MOTION_PRED
    265320      pcSPS->setPredDepthMapGeneration( uiViewId, false, uiPredDepthMapGeneration, uiMultiviewMvPredMode, uiPdmPrecision, m_aaiTempPdmScaleNomDelta, m_aaiTempPdmOffset );
     321#else
     322      pcSPS->setPredDepthMapGeneration( uiViewId, false, uiPredDepthMapGeneration, 0, uiPdmPrecision, m_aaiTempPdmScaleNomDelta, m_aaiTempPdmOffset );
     323#endif
     324#if HHI_INTER_VIEW_RESIDUAL_PRED
    266325      pcSPS->setMultiviewResPredMode  ( uiMultiviewResPredMode );
     326#endif
     327#endif
     328#if HHI_MPI
    267329      pcSPS->setUseMVI( false );
     330#endif
    268331    }
    269332  }
     
    844907
    845908  return ;
    846 }
    847 #endif
    848 
    849 #if MW_MVI_SIGNALLING_MODE == 0
    850 Void TDecCavlc::parseMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    851 {
    852   const Int iTextureModeDepth = pcCU->getTextureModeDepth( uiAbsPartIdx );
    853   if( iTextureModeDepth != -1 && uiDepth > iTextureModeDepth )
    854     return;
    855 
    856   UInt uiSymbol;
    857   xReadFlag( uiSymbol );
    858   if( uiSymbol == 1 )
    859   {
    860     pcCU->setTextureModeDepthSubParts( uiDepth, uiAbsPartIdx, uiDepth );
    861   }
    862909}
    863910#endif
     
    25742621
    25752622
     2623#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
    25762624Void
    25772625TDecCavlc::parseMergeIndexMV( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth )
    25782626{
    25792627  UInt  uiNumCand = 0;
    2580 #if MW_MVI_SIGNALLING_MODE == 1
     2628#if HHI_MPI
    25812629  const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE;
    2582   const UInt uiMviMergePos = bMVIAvailable ? MVI_MERGE_POS : MRG_MAX_NUM_CANDS;
     2630  const UInt uiMviMergePos = bMVIAvailable ? HHI_MPI_MERGE_POS : MRG_MAX_NUM_CANDS;
    25832631  if( bMVIAvailable )
    25842632    uiNumCand++;
     
    26052653  for( UInt uiIdx = 0; uiIdx <= ruiMergeIndex; uiIdx++ )
    26062654  {
    2607 #if MW_MVI_SIGNALLING_MODE == 1
     2655#if HHI_MPI
    26082656    if( uiIdx > uiMviMergePos )
    26092657    {
     
    26202668    }
    26212669  }
    2622 #if MW_MVI_SIGNALLING_MODE == 1
     2670#if HHI_MPI
    26232671  if( ruiMergeIndex > uiMviMergePos )
    26242672  {
     
    26312679#endif
    26322680}
     2681#endif
    26332682
    26342683
     
    26422691Void TDecCavlc::parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth )
    26432692{
    2644 #if MW_MVI_SIGNALLING_MODE == 1
    2645   if( ( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ) ||
    2646       ( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) )
    2647 #else
    2648   if( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE )
    2649 #endif
     2693#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
     2694  if(
     2695#if HHI_INTER_VIEW_MOTION_PRED
     2696      ( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ) ||
     2697#endif
     2698#if HHI_MPI
     2699      ( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) ||
     2700#endif
     2701      0
     2702    )
    26502703  {
    26512704    parseMergeIndexMV( pcCU, ruiMergeIndex, uiAbsPartIdx, uiDepth );
    26522705    return;
    26532706  }
     2707#endif
    26542708
    26552709  Bool bLeftInvolved = false;
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    162195  Void parseMergeFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
    163196  Void parseMergeIndex      ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth );
     197#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
    164198  Void parseMergeIndexMV    ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth );
     199#endif
    165200  Void parseResPredFlag     ( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth );
    166201  Void parseSplitFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    167 #if MW_MVI_SIGNALLING_MODE == 0
    168   Void parseMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    169 #endif
    170202  Void parsePartSize        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    171203  Void parsePredMode        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
  • trunk/source/Lib/TLibDecoder/TDecCu.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    160193  UInt uiBPelY   = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1;
    161194 
    162 #if MW_MVI_SIGNALLING_MODE == 0
    163   if( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE )
    164   {
    165     m_pcEntropyDecoder->decodeMvInheritanceFlag( pcCU, uiAbsPartIdx, uiDepth );
    166 
    167     if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth )
    168     {
    169       assert( pcCU->getZorderIdxInCU() == 0 );
    170       TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() );
    171       pcCU->copyTextureMotionDataFrom( pcTextureCU, uiDepth, pcCU->getZorderIdxInCU() + uiAbsPartIdx, uiAbsPartIdx );
    172 
    173       UInt uiCurrPartNumb = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1);
    174       for( UInt ui = 0; ui < uiCurrPartNumb; ui++ )
    175       {
    176         const UChar uhNewDepth = max( uiDepth, pcTextureCU->getDepth( uiAbsPartIdx + ui ) );
    177         if( pcCU->getPredictionMode( uiAbsPartIdx + ui ) == MODE_SKIP )
    178           pcCU->setPredictionMode( uiAbsPartIdx + ui, MODE_INTER );
    179         assert( pcCU->getPredictionMode( uiAbsPartIdx + ui ) == MODE_INTER );
    180         pcCU->setPartitionSize( uiAbsPartIdx + ui, SIZE_NxN );
    181         pcCU->setDepth( uiAbsPartIdx + ui, uhNewDepth );
    182         pcCU->setWidth( uiAbsPartIdx + ui, g_uiMaxCUWidth>>uhNewDepth );
    183         pcCU->setHeight( uiAbsPartIdx + ui, g_uiMaxCUHeight>>uhNewDepth );
    184       }
    185     }
    186   }
    187 #endif
    188 
    189195  if( ( uiRPelX < pcCU->getSlice()->getSPS()->getWidth() ) && ( uiBPelY < pcCU->getSlice()->getSPS()->getHeight() ) )
    190196  {
     197#if HHI_MPI
    191198    if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth < pcCU->getTextureModeDepth( uiAbsPartIdx ) )
     199#endif
    192200      m_pcEntropyDecoder->decodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth );
    193201  }
     
    220228 
    221229  // decode CU mode and the partition size
     230#if HHI_MPI
    222231  if( !pcCU->getSlice()->isIntra() && pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 )
     232#else
     233  if( !pcCU->getSlice()->isIntra() )
     234#endif
    223235  {
    224236    m_pcEntropyDecoder->decodeSkipFlag( pcCU, uiAbsPartIdx, uiDepth );
     
    262274    }
    263275#endif
    264 #if MW_MVI_SIGNALLING_MODE == 1
     276#if HHI_MPI
    265277    if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth )
    266278    {
     
    281293#endif
    282294 
     295#if HHI_INTER_VIEW_RESIDUAL_PRED
    283296    m_pcEntropyDecoder->decodeResPredFlag( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth], 0 );
     297#endif
    284298    return;
    285299  }
    286300
     301#if HHI_MPI
    287302  if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 )
    288303  {
     304#endif
    289305    m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth );
    290306
     
    294310    m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
    295311
     312#if HHI_MPI
    296313    if( !pcCU->isIntra( uiAbsPartIdx ) )
    297314    {
    298315      m_ppcCU[uiDepth]  ->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 );
    299316      m_ppcCU[uiDepth]  ->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 );
     317#if HHI_INTER_VIEW_RESIDUAL_PRED
    300318      m_pcEntropyDecoder->decodeResPredFlag    ( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth], 0 );
    301     }
    302 
    303 #if MW_MVI_SIGNALLING_MODE == 1
     319#endif
     320    }
     321
    304322    if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth )
    305323    {
     
    335353      }
    336354    }
    337 #endif
    338   }
     355  }
     356#endif
     357
    339358  UInt uiCurrWidth      = pcCU->getWidth ( uiAbsPartIdx );
    340359  UInt uiCurrHeight     = pcCU->getHeight( uiAbsPartIdx );
     
    402421Void TDecCu::xReconInter( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    403422{
    404 #if MW_MVI_SIGNALLING_MODE == 1
     423#if HHI_MPI
    405424  if( pcCU->getTextureModeDepth( 0 ) != -1 )
    406425    pcCU->setPartSizeSubParts( SIZE_NxN, 0, uiDepth );
     
    410429  m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] );
    411430 
    412 #if MW_MVI_SIGNALLING_MODE == 1
     431#if HHI_MPI
    413432  if( pcCU->getTextureModeDepth( 0 ) != -1 )
    414433    pcCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );
    415434#endif
    416435 
     436#if HHI_INTER_VIEW_RESIDUAL_PRED
    417437  if( pcCU->getResPredFlag( 0 ) )
    418438  {
     
    422442    m_ppcYuvReco[uiDepth]->add( m_ppcYuvResPred[uiDepth], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) );
    423443  }
    424  
     444#endif
     445
    425446  // inter recon
    426447  xDecodeInterTexture( pcCU, 0, uiDepth );
     
    433454  else
    434455  {
     456#if HHI_INTER_VIEW_RESIDUAL_PRED
    435457    if( pcCU->getResPredFlag( 0 ) )
    436458    {
    437459      m_ppcYuvReco[uiDepth]->clip( pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) );
    438460    }
     461#endif
    439462    m_ppcYuvReco[uiDepth]->copyPartToPartYuv( m_ppcYuvReco[uiDepth],0, pcCU->getWidth( 0 ),pcCU->getHeight( 0 ));
    440463  }
     
    647670                                     bAboveAvail, bLeftAvail );
    648671 
    649 #if HHI_DMM_INTRA
     672#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    650673  if( uiLumaPredMode > MAX_MODE_ID_INTRA_DIR )
    651674  {
  • trunk/source/Lib/TLibDecoder/TDecCu.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibDecoder/TDecEntropy.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    371404    }
    372405  }
    373 #if MW_MVI_SIGNALLING_MODE == 1
     406#if HHI_MPI
    374407  if( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N )
    375408    uiNumCand++;
     
    416449
    417450
     451#if HHI_INTER_VIEW_RESIDUAL_PRED
    418452Void
    419453TDecEntropy::decodeResPredFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU, UInt uiPUIdx )
     
    443477  pcCU->setResPredFlagSubParts  ( bResPredFlag,      uiAbsPartIdx, uiPUIdx, uiDepth );
    444478}
     479#endif
    445480
    446481
     
    449484  m_pcEntropyDecoderIf->parseSplitFlag( pcCU, uiAbsPartIdx, uiDepth );
    450485}
    451 
    452 #if MW_MVI_SIGNALLING_MODE == 0
    453 Void TDecEntropy::decodeMvInheritanceFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    454 {
    455   m_pcEntropyDecoderIf->parseMvInheritanceFlag( pcCU, uiAbsPartIdx, uiDepth );
    456 }
    457 #endif
    458486
    459487Void TDecEntropy::decodePredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     
    18051833#if HHI_MRG_SKIP
    18061834      UInt uiQtRootCbf = 1;
    1807 #if MW_MVI_SIGNALLING_MODE == 1
     1835#if HHI_MPI
    18081836      if( !(pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N &&
    18091837            ( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth == pcCU->getTextureModeDepth( uiAbsPartIdx ) ) ) )
  • trunk/source/Lib/TLibDecoder/TDecEntropy.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    3063  virtual Void setAlfCtrl(Bool bAlfCtrl)  = 0;
    3164  virtual Void setMaxAlfCtrlDepth(UInt uiMaxAlfCtrlDepth)  = 0;
    32  
     65
    3366  virtual Void  resetEntropy          (TComSlice* pcSlice)                = 0;
    3467  virtual Void  setBitstream          ( TComBitstream* p )  = 0;
    35  
    36   virtual Void  parseNalUnitHeader    ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag )  = 0; 
     68
     69  virtual Void  parseNalUnitHeader    ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag )  = 0;
    3770
    3871  virtual Void  parseSPS                  ( TComSPS* pcSPS )                                      = 0;
     
    4174  virtual Void  parseSliceHeader          ( TComSlice*& rpcSlice )                                = 0;
    4275  virtual Void  parseTerminatingBit       ( UInt& ruilsLast )                                     = 0;
    43  
     76
    4477  virtual Void parseMVPIdx      ( TComDataCU* pcCU, Int& riMVPIdx, Int iMVPNum, UInt uiAbsPartIdx, UInt uiDepth, RefPicList eRefList ) = 0;
    45  
     78
    4679public:
    4780  virtual Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    4881  virtual Void parseSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    49 #if MW_MVI_SIGNALLING_MODE == 0
    50   virtual Void parseMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    51 #endif
    5282  virtual Void parseMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ) = 0;
    5383  virtual Void parseMergeIndex    ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     
    5585  virtual Void parsePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    5686  virtual Void parsePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    57  
     87
    5888  virtual Void parseIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    59  
     89
    6090  virtual Void parseIntraDirChroma( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    61  
     91
    6292  virtual Void parseInterDir      ( TComDataCU* pcCU, UInt& ruiInterDir, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    6393  virtual Void parseRefFrmIdx     ( TComDataCU* pcCU, Int& riRefFrmIdx, UInt uiAbsPartIdx, UInt uiDepth, RefPicList eRefList ) = 0;
    6494  virtual Void parseMvd           ( TComDataCU* pcCU, UInt uiAbsPartAddr, UInt uiPartIdx, UInt uiDepth, RefPicList eRefList ) = 0;
    65  
     95
    6696  virtual Void parseTransformSubdivFlag( UInt& ruiSubdivFlag, UInt uiLog2TransformBlockSize ) = 0;
    6797  virtual Void parseQtCbf         ( TComDataCU* pcCU, UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth, UInt uiDepth ) = 0;
    6898  virtual Void parseQtRootCbf     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt& uiQtRootCbf ) = 0;
    69  
     99
    70100  virtual Void parseDeltaQP       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    71  
     101
    72102  virtual Void parseCbf           ( TComDataCU* pcCU, UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth, UInt uiDepth ) = 0;
    73103  virtual Void parseBlockCbf      ( TComDataCU* pcCU, UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth, UInt uiDepth, UInt uiQPartNum ) = 0;
     
    75105  virtual Void parseCbfTrdiv      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiTrDepth, UInt uiDepth, UInt& uiSubdiv ) = 0;
    76106#endif
    77  
     107
    78108  virtual Void parseCoeffNxN( TComDataCU* pcCU, TCoeff* pcCoef, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt uiDepth, TextType eTType ) = 0;
    79  
     109
    80110  virtual Void parseAlfFlag       ( UInt& ruiVal           ) = 0;
    81111  virtual Void parseAlfUvlc       ( UInt& ruiVal           ) = 0;
     
    103133  TDecEntropyIf*  m_pcEntropyDecoderIf;
    104134  TComPrediction* m_pcPrediction;
    105  
     135
    106136public:
    107137  Void init (TComPrediction* p) {m_pcPrediction = p;}
     
    112142  Void decodeMvdPU        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList );
    113143  Void decodeMVPIdxPU     ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList );
    114  
     144
    115145  Void    setEntropyDecoder           ( TDecEntropyIf* p );
    116146  Void    setBitstream                ( TComBitstream* p )      { m_pcEntropyDecoderIf->setBitstream(p);                    }
    117147  Void    resetEntropy                ( TComSlice* p)           { m_pcEntropyDecoderIf->resetEntropy(p);                    }
    118148
    119   Void    decodeNalUnitHeader         ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag )   
     149  Void    decodeNalUnitHeader         ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag )
    120150                                                                { m_pcEntropyDecoderIf->parseNalUnitHeader(eNalUnitType, TemporalId, bOutputFlag ); }
    121151
     
    126156  Void    decodeSliceHeader           ( TComSlice*& rpcSlice )  { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice);         }
    127157  Void    decodeTerminatingBit        ( UInt& ruiIsLast )       { m_pcEntropyDecoderIf->parseTerminatingBit(ruiIsLast);     }
    128  
     158
    129159  // Adaptive Loop filter
    130160  Void decodeAlfParam(ALFParam* pAlfParam);
    131161  //--Adaptive Loop filter
    132  
     162
    133163  TDecEntropyIf* getEntropyDecoder() { return m_pcEntropyDecoderIf; }
    134  
     164
    135165public:
    136166  Void decodeSplitFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    137 #if MW_MVI_SIGNALLING_MODE == 0
    138   Void decodeMvInheritanceFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    139 #endif
    140167  Void decodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    141168  Void decodeMergeFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
    142169  Void decodeMergeIndex        ( TComDataCU* pcSubCU, UInt uiPartIdx, UInt uiPartAddr, PartSize eCUMode, UChar* puhInterDirNeighbours, TComMvField* pcMvFieldNeighbours, UInt uiDepth );
     170#if HHI_INTER_VIEW_RESIDUAL_PRED
    143171  Void decodeResPredFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU, UInt uiPUIdx );
     172#endif
    144173  Void decodeAlfCtrlFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    145174#if TSB_ALF_HEADER
    146175  Void decodeAlfCtrlParam      ( ALFParam *pAlfParam );
    147176#endif
    148  
     177
    149178  Void decodePredMode          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    150179  Void decodePartSize          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    151  
     180
    152181  Void decodePredInfo          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU );
    153  
     182
    154183  Void decodeIntraDirModeLuma  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    155184  Void decodeIntraDirModeChroma( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     
    157186  Void decodeRefFrmIdx         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, RefPicList eRefList );
    158187  Void decodeMvd               ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, RefPicList eRefList );
    159   // SB
    160188  Void decodeRefViewIdx        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, RefPicList eRefList );
    161189  //
    162190  Void decodeTransformIdx      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    163191  Void decodeQP                ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    164  
     192
    165193  Void decodeViewidx           ( Int& riViewIdx );
    166  
    167  
     194
     195
    168196private:
    169197  Void xDecodeTransformSubdiv  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiInnerQuadIdx, UInt& uiYCbfFront3, UInt& uiUCbfFront3, UInt& uiVCbfFront3 );
    170  
     198
    171199  Void xDecodeCoeff            ( TComDataCU* pcCU, TCoeff* pcCoeff, UInt uiAbsPartIdx, UInt uiDepth, UInt uiWidth, UInt uiHeight, UInt uiTrIdx, UInt uiCurrTrIdx, TextType eType );
    172200public:
    173201  Void decodeCoeff             ( TComDataCU* pcCU                 , UInt uiAbsPartIdx, UInt uiDepth, UInt uiWidth, UInt uiHeight );
    174  
     202
    175203  // ALF-related
    176204  Void decodeAux(ALFParam* pAlfParam);
  • trunk/source/Lib/TLibDecoder/TDecGop.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    5386                   TComAdaptiveLoopFilter* pcAdaptiveLoopFilter,
    5487#if MTK_SAO
    55                    TComSampleAdaptiveOffset* pcSAO,
     88                   TComSampleAdaptiveOffset* pcSAO
    5689#endif             
    57                    TComDepthMapGenerator*  pcDepthMapGenerator,
    58                    TComResidualGenerator*  pcResidualGenerator )
     90#if DEPTH_MAP_GENERATION
     91                  ,TComDepthMapGenerator*  pcDepthMapGenerator
     92#endif
     93#if HHI_INTER_VIEW_RESIDUAL_PRED
     94                  ,TComResidualGenerator*  pcResidualGenerator
     95#endif
     96                  )
    5997{
    6098  m_pcEntropyDecoder      = pcEntropyDecoder;
     
    68106  m_pcSAO  = pcSAO;
    69107#endif
     108#if DEPTH_MAP_GENERATION
    70109  m_pcDepthMapGenerator   = pcDepthMapGenerator;
     110#endif
     111#if HHI_INTER_VIEW_RESIDUAL_PRED
    71112  m_pcResidualGenerator   = pcResidualGenerator;
     113#endif
    72114}
    73115
     
    145187    }
    146188   
     189#if DEPTH_MAP_GENERATION
    147190    // init view component and predict virtual depth map
    148191    if( uiStartCUAddr == 0 )
     
    150193      m_pcDepthMapGenerator->initViewComponent( rpcPic );
    151194      m_pcDepthMapGenerator->predictDepthMap  ( rpcPic );
     195#if HHI_INTER_VIEW_RESIDUAL_PRED
    152196      m_pcResidualGenerator->initViewComponent( rpcPic );
    153     }
     197#endif
     198    }
     199#endif
    154200
    155201    // decode slice
     
    160206  else
    161207  {
     208#if HHI_INTER_VIEW_RESIDUAL_PRED
    162209    // set residual picture
    163210    m_pcResidualGenerator->setRecResidualPic( rpcPic );
    164 
     211#endif
     212#if DEPTH_MAP_GENERATION
    165213    // update virtual depth map
    166214    m_pcDepthMapGenerator->updateDepthMap( rpcPic );
     215#endif
    167216
    168217    // deblocking filter
  • trunk/source/Lib/TLibDecoder/TDecGop.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    4679  TComLoopFilter*       m_pcLoopFilter;
    4780
     81#if DEPTH_MAP_GENERATION
    4882  TComDepthMapGenerator*  m_pcDepthMapGenerator;
     83#endif
     84#if HHI_INTER_VIEW_RESIDUAL_PRED
    4985  TComResidualGenerator*  m_pcResidualGenerator;
     86#endif
    5087 
    5188  // Adaptive Loop filter
     
    72109                 TComAdaptiveLoopFilter* pcAdaptiveLoopFilter,
    73110#if MTK_SAO
    74                  TComSampleAdaptiveOffset*                pcSAO,
     111                 TComSampleAdaptiveOffset*                pcSAO
    75112#endif
    76                  TComDepthMapGenerator*  pcDepthMapGenerator,
    77                  TComResidualGenerator*  pcResidualGenerator );
     113#if DEPTH_MAP_GENERATION
     114                ,TComDepthMapGenerator*  pcDepthMapGenerator
     115#endif
     116#if HHI_INTER_VIEW_RESIDUAL_PRED
     117                ,TComResidualGenerator*  pcResidualGenerator
     118#endif
     119                 );
    78120  Void  create  ();
    79121  Void  destroy ();
  • trunk/source/Lib/TLibDecoder/TDecSbac.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    1952, m_cCUSkipFlagSCModel        ( 1,             1,               NUM_SKIP_FLAG_CTX             )
    2053, m_cCUSplitFlagSCModel       ( 1,             1,               NUM_SPLIT_FLAG_CTX            )
    21 #if MW_MVI_SIGNALLING_MODE == 0
    22 , m_cCUMvInheritanceFlagSCModel(1,             1,               NUM_MVI_FLAG_CTX              )
    23 #endif
    2454, m_cCUMergeFlagExtSCModel    ( 1,             1,               NUM_MERGE_FLAG_EXT_CTX        )
    2555, m_cCUMergeIdxExtSCModel     ( 1,             1,               NUM_MERGE_IDX_EXT_CTX         )
     
    6494#endif
    6595, m_cViewIdxSCModel           ( 1,             1,               NUM_VIEW_IDX_CTX              )
    66 #if HHI_DMM_INTRA
     96#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    6797, m_cIntraDMMSCModel          ( 1,             1,               NUM_DMM_CTX                   )
    6898, m_cIntraWedgeSCModel        ( 1,             1,               NUM_WEDGE_CTX                 )
     
    85115 
    86116  m_cCUSplitFlagSCModel.initBuffer       ( eSliceType, iQp, (Short*)INIT_SPLIT_FLAG );
    87 #if MW_MVI_SIGNALLING_MODE == 0
    88   m_cCUMvInheritanceFlagSCModel.initBuffer( eSliceType, iQp, (Short*)INIT_MVI_FLAG );
    89 #endif
    90117  m_cCUSkipFlagSCModel.initBuffer        ( eSliceType, iQp, (Short*)INIT_SKIP_FLAG );
    91118  m_cCUMergeFlagExtSCModel.initBuffer    ( eSliceType, iQp, (Short*)INIT_MERGE_FLAG_EXT );
     
    127154  m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (Short*)INIT_TRANS_SUBDIV_FLAG );
    128155  m_cViewIdxSCModel.initBuffer           ( eSliceType, iQp, (Short*)INIT_VIEW_IDX );
    129 #if HHI_DMM_INTRA
     156#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    130157  m_cIntraDMMSCModel.initBuffer          ( eSliceType, iQp, (Short*)INIT_INTRA_DMM );
    131158  m_cIntraWedgeSCModel.initBuffer        ( eSliceType, iQp, (Short*)INIT_INTRA_WEDGELET );
     
    361388  return;
    362389}
    363 #if HHI_DMM_INTRA
     390#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    364391Void TDecSbac::xReadExGolombLevel( UInt& ruiSymbol, ContextModel& rcSCModel  )
    365392{
     
    552579
    553580
     581#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
    554582Void TDecSbac::parseMergeIndexMV( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth )
    555583{
    556 #if MW_MVI_SIGNALLING_MODE == 1
     584#if HHI_MPI
    557585  const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE;
    558   const UInt uiMviMergePos = bMVIAvailable ? MVI_MERGE_POS : MRG_MAX_NUM_CANDS;
     586  const UInt uiMviMergePos = bMVIAvailable ? HHI_MPI_MERGE_POS : MRG_MAX_NUM_CANDS;
    559587#endif
    560588  //--- set number of candidates and availability ---
     
    563591  for( UInt uiIdx = 0; uiIdx < MRG_MAX_NUM_CANDS; uiIdx++ )
    564592  {
    565 #if MW_MVI_SIGNALLING_MODE == 1
     593#if HHI_MPI
    566594    if( uiIdx == uiMviMergePos )
    567595    {
     
    629657  }
    630658
    631 #if MW_MVI_SIGNALLING_MODE == 1
     659#if HHI_MPI
    632660  if( ruiMergeIndex > uiMviMergePos )
    633661  {
     
    661689  DTRACE_CABAC_T( "\n" );
    662690}
     691#endif
    663692
    664693
    665694Void TDecSbac::parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth )
    666695{
    667 #if MW_MVI_SIGNALLING_MODE == 1
    668   if( ( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ) ||
    669       ( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) )
    670 #else
    671   if( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE )
    672 #endif
     696#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
     697  if(
     698#if HHI_INTER_VIEW_MOTION_PRED
     699      ( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ) ||
     700#endif
     701#if HHI_MPI
     702      ( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) ||
     703#endif
     704      0
     705    )
    673706  {
    674707    parseMergeIndexMV( pcCU, ruiMergeIndex, uiAbsPartIdx, uiDepth );
    675708    return;
    676709  }
     710#endif
    677711
    678712  Bool bLeftInvolved = false;
     
    827861}
    828862
    829 #if MW_MVI_SIGNALLING_MODE == 0
    830 Void TDecSbac::parseMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    831 {
    832   const Int iTextureModeDepth = pcCU->getTextureModeDepth( uiAbsPartIdx );
    833   if( iTextureModeDepth != -1 && uiDepth > iTextureModeDepth )
    834     return;
    835 
    836   UInt uiSymbol;
    837   m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUMvInheritanceFlagSCModel.get( 0, 0, pcCU->getCtxMvInheritanceFlag( uiAbsPartIdx, uiDepth ) ) );
    838   if( uiSymbol == 1 )
    839   {
    840     pcCU->setTextureModeDepthSubParts( uiDepth, uiAbsPartIdx, uiDepth );
    841   }
    842 }
    843 #endif
    844 
    845863/** parse partition size
    846864 * \param pcCU
     
    965983}
    966984
    967 #if HHI_DMM_INTRA
     985#if HHI_DMM_WEDGE_INTRA
    968986Void TDecSbac::xParseWedgeFullInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    969987{
     
    11361154  pcCU->setWedgePredDirDeltaDC2SubParts( iDC2, uiAbsPartIdx, uiDepth );
    11371155}
    1138 
     1156#endif
     1157#if HHI_DMM_PRED_TEX
    11391158Void TDecSbac::xParseWedgePredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    11401159{
     
    12041223  UInt uiSymbol;
    12051224 
    1206 #if HHI_DMM_INTRA
     1225#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    12071226  UInt uiFlag = 0;
    1208   if ( pcCU->getSlice()->getSPS()->isDepth() && pcCU->getSlice()->getSPS()->getUseDepthModelModes() && g_uiMaxCUWidth>>uiDepth < 64 )
     1227  if ( pcCU->getSlice()->getSPS()->isDepth() && pcCU->getSlice()->getSPS()->getUseDMM() && g_uiMaxCUWidth>>uiDepth < 64 )
    12091228  {
    12101229    m_pcTDecBinIf->decodeBin( uiFlag, m_cIntraDMMSCModel.get(0, 0, 0) );
     
    12141233    UInt uiDMMode;
    12151234
    1216 #if DMM_NO_TEXTURE_MODES
    1217     pcCU->setTextureModeAllowanceSubParts( false, uiAbsPartIdx, uiDepth );
    1218 
     1235#if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
     1236    m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
     1237    m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1;
    12191238    if ( pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN && g_uiMaxCUWidth>>uiDepth > 4 )
    12201239    {
    1221       m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
    1222       if( DMM_INTRA_MODE_BITS > 1 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1; }
    1223 
    1224       if( uiDMMode > 1 )
    1225       {
    1226         uiDMMode += 4;
    1227       }
    1228     }
    1229     else
    1230     {
    1231       m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
     1240      m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 2;
    12321241    }
    12331242#else
    1234     TComPicYuv* pcPicYuvRef = pcCU->getSlice()->getTexturePic()->getPicYuvRec();
    1235     Int     iRefStride = pcPicYuvRef->getStride();
    1236     Pel*    piRefY;
    1237 
    1238     TComYuv cTempYuv;
    1239     UInt uiTempStride = 0;
    1240     Pel* piTempY;
    1241 
    1242     UInt uiWidth = g_uiMaxCUWidth>>uiDepth;
    1243     UInt uiHeight = g_uiMaxCUHeight>>uiDepth;
    1244     piRefY = pcPicYuvRef->getLumaAddr( pcCU->getAddr(), uiAbsPartIdx );
    1245     cTempYuv.create( uiWidth, uiHeight ); cTempYuv.clear();
    1246     piTempY = cTempYuv.getLumaAddr( 0, uiWidth );
    1247     uiTempStride = cTempYuv.getStride();
    1248 
    1249     for ( Int y = 0; y < uiHeight; y++ )
    1250     {
    1251       ::memcpy(piTempY, piRefY, sizeof(Pel)*uiWidth);
    1252       piTempY += uiTempStride;
    1253       piRefY += iRefStride;
    1254     }
    1255 
    1256     UInt64 uiDCSAD = cTempYuv.getLumaDistDCSAD( uiWidth );
    1257 
    1258     cTempYuv.destroy();
    1259 
    1260     if( uiDCSAD < (UInt)(pcCU->getQP(0))/2 )
    1261     {
    1262       pcCU->setTextureModeAllowanceSubParts( false, uiAbsPartIdx, uiDepth );
    1263 
     1243        m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
    12641244      if ( pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN && g_uiMaxCUWidth>>uiDepth > 4 )
    12651245      {
    1266                                         m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
    1267         if( DMM_INTRA_MODE_BITS > 1 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1; }
    1268 
    1269         if( uiDMMode > 1 )
    1270         {
    1271           uiDMMode += 4;
    1272         }
    1273       }
    1274       else
    1275       {
    1276         pcCU->setTextureModeAllowanceSubParts( true, uiAbsPartIdx, uiDepth );
    1277 
    1278         m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
    1279       }
    1280     }
    1281     else
    1282     {
    1283                                       m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
    1284       if( DMM_INTRA_MODE_BITS > 1 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1; }
    1285       if ( pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN && g_uiMaxCUWidth>>uiDepth > 4 )
    1286       {
    1287         if( DMM_INTRA_MODE_BITS > 2 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 2; }
    1288       }
    1289     }
    1290 #endif
    1291     uiIPredMode = g_aucAdditionalIntraModeList[uiDMMode];
    1292 
     1246      m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1;
     1247    }
     1248#endif
     1249    uiIPredMode = uiDMMode + MAX_MODE_ID_INTRA_DIR + 1;
     1250
     1251#if HHI_DMM_WEDGE_INTRA
    12931252    if( uiIPredMode == DMM_WEDGE_FULL_IDX )          { xParseWedgeFullInfo          ( pcCU, uiAbsPartIdx, uiDepth ); }
    12941253    if( uiIPredMode == DMM_WEDGE_FULL_D_IDX )        { xParseWedgeFullDeltaInfo     ( pcCU, uiAbsPartIdx, uiDepth ); }
    12951254    if( uiIPredMode == DMM_WEDGE_PREDDIR_IDX )       { xParseWedgePredDirInfo       ( pcCU, uiAbsPartIdx, uiDepth ); }
    12961255    if( uiIPredMode == DMM_WEDGE_PREDDIR_D_IDX )     { xParseWedgePredDirDeltaInfo  ( pcCU, uiAbsPartIdx, uiDepth ); }
     1256#endif
     1257#if HHI_DMM_PRED_TEX
    12971258    if( uiIPredMode == DMM_WEDGE_PREDTEX_D_IDX )     { xParseWedgePredTexDeltaInfo  ( pcCU, uiAbsPartIdx, uiDepth ); }
    12981259    if( uiIPredMode == DMM_CONTOUR_PREDTEX_D_IDX )   { xParseContourPredTexDeltaInfo( pcCU, uiAbsPartIdx, uiDepth ); }
     1260#endif
    12991261  }
    13001262  else
     
    13701332  UInt uiSymbol;
    13711333
    1372 #if HHI_DMM_INTRA
     1334#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    13731335  UInt uiFlag = 0;
    1374   if ( pcCU->getSlice()->getSPS()->isDepth() && pcCU->getSlice()->getSPS()->getUseDepthModelModes() && g_uiMaxCUWidth>>uiDepth < 64 )
     1336  if ( pcCU->getSlice()->getSPS()->isDepth() && pcCU->getSlice()->getSPS()->getUseDMM() && g_uiMaxCUWidth>>uiDepth < 64 )
    13751337  {
    13761338    m_pcTDecBinIf->decodeBin( uiFlag, m_cIntraDMMSCModel.get(0, 0, 0) );
     
    13791341  {
    13801342    UInt uiDMMode;
    1381     TComPicYuv* pcPicYuvRef = pcCU->getSlice()->getTexturePic()->getPicYuvRec();
    1382     Int     iRefStride = pcPicYuvRef->getStride();
    1383     Pel*    piRefY;
    1384 
    1385     TComYuv cTempYuv;
    1386     UInt uiTempStride = 0;
    1387     Pel* piTempY;
    1388 
    1389     UInt uiWidth = g_uiMaxCUWidth>>uiDepth;
    1390     UInt uiHeight = g_uiMaxCUHeight>>uiDepth;
    1391     piRefY = pcPicYuvRef->getLumaAddr( pcCU->getAddr(), uiAbsPartIdx );
    1392     cTempYuv.create( uiWidth, uiHeight ); cTempYuv.clear();
    1393     piTempY = cTempYuv.getLumaAddr( 0, uiWidth );
    1394     uiTempStride = cTempYuv.getStride();
    1395 
    1396     for ( Int y = 0; y < uiHeight; y++ )
    1397     {
    1398       ::memcpy(piTempY, piRefY, sizeof(Pel)*uiWidth);
    1399       piTempY += uiTempStride;
    1400       piRefY += iRefStride;
    1401     }
    1402 
    1403     UInt64 uiDCSAD = cTempYuv.getLumaDistDCSAD( uiWidth );
    1404 
    1405     if( uiDCSAD < 23 )
    1406     {
     1343
     1344#if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
     1345    m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
     1346    m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1;
    14071347      if ( pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN && g_uiMaxCUWidth>>uiDepth > 4 )
    14081348      {
    1409         m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
    1410         if( DMM_INTRA_MODE_BITS > 1 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1; }
    1411 
    1412         if( uiDMMode > 1 )
    1413         {
    1414           uiDMMode += 4;
     1349      m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 2;
    14151350        }
    1416       }
    1417       else
    1418       {
    1419         m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
    1420       }
    1421     }
    1422     else
    1423     {
     1351#else
    14241352      m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
    1425       if( DMM_INTRA_MODE_BITS > 1 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1; }
    14261353      if ( pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN && g_uiMaxCUWidth>>uiDepth > 4 )
    14271354      {
    1428         if( DMM_INTRA_MODE_BITS > 2 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 2; }
    1429       }
    1430     }
     1355      m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1;
     1356    }
     1357#endif
    14311358    uiIPredMode = g_aucAdditionalIntraModeList[uiDMMode];
    14321359
     1360#if HHI_DMM_WEDGE_INTRA
    14331361    if( uiIPredMode == DMM_WEDGE_FULL_IDX )          { xParseWedgeFullInfo          ( pcCU, uiAbsPartIdx, uiDepth ); }
    14341362    if( uiIPredMode == DMM_WEDGE_FULL_D_IDX )        { xParseWedgeFullDeltaInfo     ( pcCU, uiAbsPartIdx, uiDepth ); }
    14351363    if( uiIPredMode == DMM_WEDGE_PREDDIR_IDX )       { xParseWedgePredDirInfo       ( pcCU, uiAbsPartIdx, uiDepth ); }
    14361364    if( uiIPredMode == DMM_WEDGE_PREDDIR_D_IDX )     { xParseWedgePredDirDeltaInfo  ( pcCU, uiAbsPartIdx, uiDepth ); }
     1365#endif
     1366#if HHI_DMM_PRED_TEX
    14371367    if( uiIPredMode == DMM_WEDGE_PREDTEX_D_IDX )     { xParseWedgePredTexDeltaInfo  ( pcCU, uiAbsPartIdx, uiDepth ); }
    14381368    if( uiIPredMode == DMM_CONTOUR_PREDTEX_D_IDX )   { xParseContourPredTexDeltaInfo( pcCU, uiAbsPartIdx, uiDepth ); }
     1369#endif
    14391370  }
    14401371  else
  • trunk/source/Lib/TLibDecoder/TDecSbac.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    6699#if E253
    67100  Void  xReadGoRiceExGolomb ( UInt &ruiSymbol, UInt &ruiGoRiceParam );
    68 #if HHI_DMM_INTRA
     101#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    69102  Void  xReadExGolombLevel  ( UInt& ruiSymbol, ContextModel& rcSCModel  );
    70103#endif
     
    81114  Void  xReadExGolombMvd    ( UInt& ruiSymbol, ContextModel* pcSCModel, UInt uiMaxBin );
    82115 
    83 #if HHI_DMM_INTRA
     116#if HHI_DMM_WEDGE_INTRA
    84117  Void xParseWedgeFullInfo  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    85118  Void xParseWedgeFullDeltaInfo     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     119
    86120  Void xParseWedgePredDirInfo       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    87121  Void xParseWedgePredDirDeltaInfo  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     122#endif
     123#if HHI_DMM_PRED_TEX
    88124  Void xParseWedgePredTexDeltaInfo  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    89125  Void xParseContourPredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     
    106142  Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    107143  Void parseSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    108 #if MW_MVI_SIGNALLING_MODE == 0
    109   Void parseMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    110 #endif
    111144  Void parseMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
    112145  Void parseMergeIndex    ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth );
     146#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
    113147  Void parseMergeIndexMV  ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth );
     148#endif
    114149  Void parseResPredFlag   ( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth );
    115150  Void parsePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     
    149184  ContextModel3DBuffer m_cCUSkipFlagSCModel;
    150185  ContextModel3DBuffer m_cCUSplitFlagSCModel;
    151 #if MW_MVI_SIGNALLING_MODE == 0
    152   ContextModel3DBuffer m_cCUMvInheritanceFlagSCModel;
    153 #endif
    154186  ContextModel3DBuffer m_cCUMergeFlagExtSCModel;
    155187  ContextModel3DBuffer m_cCUMergeIdxExtSCModel;
     
    196228#endif
    197229  ContextModel3DBuffer m_cViewIdxSCModel;
    198 #if HHI_DMM_INTRA
     230#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    199231  ContextModel3DBuffer m_cIntraDMMSCModel;
    200232  ContextModel3DBuffer m_cIntraWedgeSCModel;
  • trunk/source/Lib/TLibDecoder/TDecSlice.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibDecoder/TDecSlice.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibDecoder/TDecTop.cpp

    r2 r5  
     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-2011, 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 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
    134/** \file     TDecTop.cpp
    235    \brief    decoder class
     
    258291  m_cSliceDecoder.destroy();
    259292
     293#if DEPTH_MAP_GENERATION
    260294  m_cDepthMapGenerator.destroy();
     295#endif
     296#if HHI_INTER_VIEW_RESIDUAL_PRED
    261297  m_cResidualGenerator.destroy();
     298#endif
    262299}
    263300
     
    268305    initROM();
    269306#if MTK_SAO
    270   m_cGopDecoder.  init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cAdaptiveLoopFilter, &m_cSAO, &m_cDepthMapGenerator, &m_cResidualGenerator );
     307  m_cGopDecoder.  init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cAdaptiveLoopFilter, &m_cSAO
     308#if DEPTH_MAP_GENERATION
     309                      , &m_cDepthMapGenerator
     310#endif
     311#if HHI_INTER_VIEW_RESIDUAL_PRED
     312                      , &m_cResidualGenerator
     313#endif
     314                      );
    271315#else
    272   m_cGopDecoder.  init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cAdaptiveLoopFilter, &m_cDepthMapGenerator, &m_cResidualGenerator );
     316  m_cGopDecoder.  init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cAdaptiveLoopFilter
     317#if DEPTH_MAP_GENERATION
     318                      , &m_cDepthMapGenerator
     319#endif
     320#if HHI_INTER_VIEW_RESIDUAL_PRED
     321                      , &m_cResidualGenerator
     322#endif
     323                      );
    273324#endif
    274325  m_cSliceDecoder.init( &m_cEntropyDecoder, &m_cCuDecoder );
     
    276327
    277328  m_pcTAppDecTop = pcTAppDecTop;
     329#if DEPTH_MAP_GENERATION
    278330  m_cDepthMapGenerator.init( &m_cPrediction, m_pcTAppDecTop->getSPSAccess(), m_pcTAppDecTop->getAUPicAccess() );
     331#endif
     332#if HHI_INTER_VIEW_RESIDUAL_PRED
    279333  m_cResidualGenerator.init( &m_cTrQuant, &m_cDepthMapGenerator );
     334#endif
    280335}
    281336
     
    283338{
    284339  m_cSPS = cSPS ;
    285 #if SB_MEM_FIX
    286340      if ( !m_cAdaptiveLoopFilter.isCreated())
    287341      {
     
    292346  m_cLoopFilter.        create( g_uiMaxCUDepth );
    293347      }
    294 #else
    295       m_cAdaptiveLoopFilter.create( m_cSPS.getWidth(), m_cSPS.getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    296 #if MTK_SAO
    297       m_cSAO.create( m_cSPS.getWidth(), m_cSPS.getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    298 #endif
    299       m_cLoopFilter.        create( g_uiMaxCUDepth );
    300 #endif
    301348  m_uiValidPS |= 1;
    302349}
     
    334381  m_iMaxRefPicNum = getCodedPictureBufferSize( );
    335382
     383#if DEPTH_MAP_GENERATION
    336384  Bool bNeedPrdDepthMapBuffer = ( !pcSlice->getSPS()->isDepth() && ( pcSlice->getSPS()->getViewId() == 0 || pcSlice->getSPS()->getPredDepthMapGeneration() > 0 ) );
     385#endif
    337386
    338387  if (m_cListPic.size() < (UInt)m_iMaxRefPicNum)
     
    340389    rpcPic = new TComPic;
    341390    rpcPic->create ( pcSlice->getSPS()->getWidth(), pcSlice->getSPS()->getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
     391#if DEPTH_MAP_GENERATION
    342392    if( bNeedPrdDepthMapBuffer )
    343393    {
    344394      rpcPic->addPrdDepthMapBuffer();
    345395    }
     396#endif
    346397    m_cListPic.pushBack( rpcPic );
    347398
     
    372423  rpcPic->getPicYuvRec()->setBorderExtension(false);
    373424
     425#if DEPTH_MAP_GENERATION
    374426  if( bNeedPrdDepthMapBuffer && !rpcPic->getPredDepthMap() )
    375427  {
    376428    rpcPic->addPrdDepthMapBuffer();
    377429  }
     430#endif
    378431}
    379432
     
    397450  {
    398451    pcPic->removeOriginalBuffer   ();
     452#if HHI_INTER_VIEW_MOTION_PRED
    399453    pcPic->removeOrgDepthMapBuffer();
     454#endif
     455#if HHI_INTER_VIEW_RESIDUAL_PRED
    400456    pcPic->removeResidualBuffer   ();
     457#endif
     458#if HHI_INTERVIEW_SKIP
    401459    pcPic->removeUsedPelsMapBuffer();
    402   }
    403 }
    404 
     460#endif
     461  }
     462}
    405463
    406464#if AMVP_BUFFERCOMPRESS
     
    492550
    493551      // create ALF temporary buffer
    494 #if SB_MEM_FIX
    495552      if ( !m_cAdaptiveLoopFilter.isCreated())
    496553      {
     
    501558      m_cLoopFilter.        create( g_uiMaxCUDepth );
    502559      }
    503 #else
    504       m_cAdaptiveLoopFilter.create( m_cSPS.getWidth(), m_cSPS.getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    505 #if MTK_SAO
    506       m_cSAO.create( m_cSPS.getWidth(), m_cSPS.getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    507 #endif
    508       m_cLoopFilter.        create( g_uiMaxCUDepth );
    509 #endif
    510560      m_uiValidPS |= 1;
    511561
     
    594644        m_cSliceDecoder.create( m_apcSlicePilot, m_apcSlicePilot->getSPS()->getWidth(), m_apcSlicePilot->getSPS()->getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    595645
     646#if DEPTH_MAP_GENERATION
    596647        m_cDepthMapGenerator.create( true, m_apcSlicePilot->getSPS()->getWidth(), m_apcSlicePilot->getSPS()->getHeight(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiBitDepth + g_uiBitIncrement );
     648#endif
     649#if HHI_INTER_VIEW_RESIDUAL_PRED
    597650        m_cResidualGenerator.create( true, m_apcSlicePilot->getSPS()->getWidth(), m_apcSlicePilot->getSPS()->getHeight(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiBitDepth + g_uiBitIncrement );
     651#endif
    598652      }
    599653
     
    663717      pcPic->setCurrSliceIdx(m_uiSliceIdx);
    664718
    665 #if HHI_DMM_INTRA
    666     if ( m_cSPS.getUseDepthModelModes() && g_aacWedgeLists.empty() && m_bIsDepth )
     719#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     720    if ( m_cSPS.getUseDMM() && g_aacWedgeLists.empty() && m_bIsDepth )
    667721      {
    668722        initWedgeLists();
  • trunk/source/Lib/TLibDecoder/TDecTop.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    6699  Bool                    m_bGopSizeSet;
    67100  int                     m_iMaxRefPicNum;
    68  
     101
    69102#if DCM_DECODING_REFRESH
    70103  Bool                    m_bRefreshPending;    ///< refresh pending flag
     
    80113  TComPPS                 m_cPPS;
    81114  TComSlice*              m_apcSlicePilot;
    82  
     115
    83116  SEImessages *m_SEIs; ///< "all" SEI messages.  If not NULL, we own the object.
    84117
     
    98131  TComSampleAdaptiveOffset m_cSAO;
    99132#endif
     133#if DEPTH_MAP_GENERATION
    100134  TComDepthMapGenerator   m_cDepthMapGenerator;
     135#endif
     136#if HHI_INTER_VIEW_RESIDUAL_PRED
    101137  TComResidualGenerator   m_cResidualGenerator;
     138#endif
    102139
    103140  Bool                    m_bIsDepth;
     
    119156  TDecTop();
    120157  virtual ~TDecTop();
    121  
     158
    122159  Void  create  ();
    123160  Void  destroy ();
    124161
    125162  void setPictureDigestEnabled(bool enabled) { m_cGopDecoder.setPictureDigestEnabled(enabled); }
    126  
     163
    127164  Void  init( TAppDecTop* pcTAppDecTop, Bool bFirstInstance = true );
    128165#if DCM_SKIP_DECODING_FRAMES
     
    131168  Void  decode ( Bool bEos, TComBitstream* pcBitstream, UInt& ruiPOC, TComList<TComPic*>*& rpcListPic, NalUnitType& reNalUnitType, TComSPS& cComSPS );
    132169#endif
    133  
     170
    134171  TComSPS *getSPS() { return (m_uiValidPS & 1) ? &m_cSPS : NULL; }
    135  
     172
    136173  Void  deletePicBuffer();
    137174
     
    149186  Void setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; }
    150187
    151   // SB
    152188  TComList<TComPic*>*     getListPic            () { return  &m_cListPic;             }
    153189  TAppDecTop*             getDecTop           ( ){ return  m_pcTAppDecTop ;};
     
    161197protected:
    162198  Void  xGetNewPicBuffer  (TComSlice* pcSlice, TComPic*& rpcPic);
    163  
     199
    164200};// END CLASS DEFINITION TDecTop
    165201
  • trunk/source/Lib/TLibEncoder/SEIwrite.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibEncoder/SEIwrite.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibEncoder/TEncAdaptiveLoopFilter.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibEncoder/TEncAdaptiveLoopFilter.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibEncoder/TEncAnalyze.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibEncoder/TEncBinCoder.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibEncoder/TEncBinCoderCABAC.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibEncoder/TEncCavlc.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    258291  xWriteFlag  ( (pcSPS->getUseALF ()) ? 1 : 0 );
    259292  xWriteFlag  ( (pcSPS->getUseDQP ()) ? 1 : 0 );
    260 #if !SB_NO_LowDelayCoding
     293#if !HHI_NO_LowDelayCoding
    261294  xWriteFlag  ( (pcSPS->getUseLDC ()) ? 1 : 0 );
    262295#endif
     
    302335      xWriteUvlc( pcSPS->getViewId() );
    303336      xWriteSvlc( pcSPS->getViewOrderIdx() );
    304 #if HHI_DMM_INTRA
    305       xWriteFlag( pcSPS->getUseDepthModelModes() ? 1 : 0 );
    306 #endif
     337#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     338      xWriteFlag( pcSPS->getUseDMM() ? 1 : 0 );
     339#endif
     340#if HHI_MPI
    307341      xWriteFlag( pcSPS->getUseMVI() ? 1 : 0 );
     342#endif
    308343    }
    309344    else
     
    324359        }
    325360      }
     361#if DEPTH_MAP_GENERATION
    326362      xWriteUvlc( pcSPS->getPredDepthMapGeneration() );
    327363      if( pcSPS->getPredDepthMapGeneration() )
     
    333369          xWriteSvlc( pcSPS->getPdmOffset       ()[ uiId ] );
    334370        }
     371#if HHI_INTER_VIEW_MOTION_PRED
    335372        xWriteUvlc  ( pcSPS->getMultiviewMvPredMode() );
     373#endif
     374#if HHI_INTER_VIEW_RESIDUAL_PRED
    336375        xWriteFlag  ( pcSPS->getMultiviewResPredMode() );
    337       }
     376#endif
     377      }
     378#endif
    338379    }
    339380  }
     
    686727
    687728
     729#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
    688730Void
    689731TEncCavlc::codeMergeIndexMV( TComDataCU* pcCU, UInt uiAbsPartIdx )
     
    691733  UInt uiNumCand  = 0;
    692734  UInt uiMergeIdx = pcCU->getMergeIndex( uiAbsPartIdx );
    693 #if MW_MVI_SIGNALLING_MODE == 1
     735#if HHI_MPI
    694736  const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE;
    695   const UInt uiMviMergePos = bMVIAvailable ? MVI_MERGE_POS : MRG_MAX_NUM_CANDS;
     737  const UInt uiMviMergePos = bMVIAvailable ? HHI_MPI_MERGE_POS : MRG_MAX_NUM_CANDS;
    696738  if( bMVIAvailable )
    697739  {
     
    699741    const Bool bUseMVI = pcCU->getTextureModeDepth( uiAbsPartIdx ) != -1;
    700742    if( bUseMVI )
    701       uiMergeIdx = MVI_MERGE_POS;
    702     else if( uiMergeIdx >= MVI_MERGE_POS )
     743      uiMergeIdx = HHI_MPI_MERGE_POS;
     744    else if( uiMergeIdx >= HHI_MPI_MERGE_POS )
    703745      uiMergeIdx++;
    704746  }
     
    754796  }
    755797}
    756 
     798#endif
    757799
    758800
     
    764806Void TEncCavlc::codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx )
    765807{
    766 #if MW_MVI_SIGNALLING_MODE == 1
     808#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
     809#if HHI_INTER_VIEW_MOTION_PRED && HHI_MPI
    767810  if( ( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ) ||
    768811      ( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) )
     812#elif HHI_MPI
     813  if( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N )
    769814#else
    770815  if( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE )
     
    774819    return;
    775820  }
     821#endif
    776822
    777823  Bool bLeftInvolved = false;
     
    833879
    834880
     881#if HHI_INTER_VIEW_RESIDUAL_PRED
    835882Void
    836883TEncCavlc::codeResPredFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
     
    839886  xWriteFlag( uiSymbol );
    840887}
    841 
     888#endif
    842889
    843890Void TEncCavlc::codeAlfCtrlFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
     
    940987#endif
    941988}
    942 
    943 #if MW_MVI_SIGNALLING_MODE == 0
    944 Void TEncCavlc::codeMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    945 {
    946   const Int iTextureModeDepth = pcCU->getTextureModeDepth( uiAbsPartIdx );
    947   if( iTextureModeDepth != -1 && uiDepth > iTextureModeDepth )
    948     return;
    949   UInt uiSymbol = iTextureModeDepth == uiDepth ? 1 : 0;
    950   xWriteFlag( uiSymbol );
    951 }
    952 #endif
    953989
    954990Void TEncCavlc::codeSplitFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
  • trunk/source/Lib/TLibEncoder/TEncCavlc.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    193226#endif
    194227  Void codeSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    195 #if MW_MVI_SIGNALLING_MODE == 0
    196   Void codeMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    197 #endif
    198228  Void codeMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    199229  Void codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     230#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
    200231  Void codeMergeIndexMV  ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     232#endif
     233#if HHI_INTER_VIEW_RESIDUAL_PRED
    201234  Void codeResPredFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     235#endif
    202236  Void codeAlfCtrlFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    203237#if TSB_ALF_HEADER
  • trunk/source/Lib/TLibEncoder/TEncCfg.h

    r2 r5  
     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-2011, 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 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
    134
    235/** \file     TEncCfg.h
     
    4174  Int       m_iRateGOPSize;
    4275
    43   // SB
    4476  std::string     m_cInputFormatString ;
    4577
     
    75107  Int       m_iMaxDeltaQP;                      //  Max. absolute delta QP (1:default)
    76108
    77 //GT VSO
     109#if HHI_VSO
    78110  //====== View Synthesis Optimization ======
    79111  Bool      m_bForceLambdaScale;
    80 #if RDO_DIST_INT
     112#if HHI_VSO_DIST_INT
    81113  Bool      m_bAllowNegDist;
    82114#endif
    83115  Double    m_dLambdaScaleVSO;
    84116  UInt      m_uiVSOMode;
    85 //GT VSO end
     117#endif
    86118
    87119  //====== Tool list ========
     
    98130#endif
    99131  Bool      m_bUseRDOQ;
    100 #if !SB_NO_LowDelayCoding
     132#if !HHI_NO_LowDelayCoding
    101133  Bool      m_bUseLDC;
    102134#endif
     
    104136  Bool      m_bUseFastEnc;
    105137
    106 //GT VSO
     138#if HHI_VSO
    107139  Bool      m_bUseVSO;
    108 //GT VSO end
    109 
    110   Bool      m_bOmitUnusedBlocks;
     140#endif 
    111141  Bool      m_bUseMRG; // SOPH:
    112142#if LM_CHROMA
     
    126156  Bool      m_bUseConstrainedIntraPred;
    127157#endif
    128 #if HHI_DMM_INTRA
    129   Bool m_bUseDepthModelModes;
    130 #endif
     158#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     159  Bool m_bUseDMM;
     160#endif
     161#if HHI_MPI
    131162  Bool m_bUseMVI;
     163#endif
    132164
    133165  //====== Slice ========
     
    160192  Int**       m_aaiCodedOffset;
    161193
     194#if DEPTH_MAP_GENERATION
    162195  UInt        m_uiPredDepthMapGeneration;
    163   UInt        m_uiMultiviewMvPredMode;
    164196  UInt        m_uiPdmPrecision;
    165197  Int**       m_aaiPdmScaleNomDelta;
    166198  Int**       m_aaiPdmOffset;
     199#endif
     200#if HHI_INTER_VIEW_MOTION_PRED
     201  UInt        m_uiMultiviewMvPredMode;
    167202  UInt        m_uiMultiviewMvRegMode;
    168203  Double      m_dMultiviewMvRegLambdaScale;
     204#endif
     205#if HHI_INTER_VIEW_RESIDUAL_PRED
    169206  UInt        m_uiMultiviewResPredMode;
     207#endif
    170208
    171209  PicOrderCnt m_iQpChangeFrame;
    172210  Int         m_iQpChangeOffsetVideo;
    173211  Int         m_iQpChangeOffsetDepth;
    174 #if SB_INTERVIEW_SKIP
     212#if HHI_INTERVIEW_SKIP
    175213  UInt        m_uiInterViewSkip;
    176 #if SB_INTERVIEW_SKIP_LAMBDA_SCALE
     214#if HHI_INTERVIEW_SKIP_LAMBDA_SCALE
    177215  Double      m_dInterViewSkipLambdaScale;
    178216#endif
     
    205243  Void      setCodedOffset                  ( Int** p )      { m_aaiCodedOffset         = p; }
    206244
     245#if DEPTH_MAP_GENERATION
    207246  Void      setPredDepthMapGeneration       ( UInt  u )      { m_uiPredDepthMapGeneration   = u; }
    208   Void      setMultiviewMvPredMode          ( UInt  u )      { m_uiMultiviewMvPredMode      = u; }
    209247  Void      setPdmPrecision                 ( UInt  u )      { m_uiPdmPrecision             = u; }
    210248  Void      setPdmScaleNomDelta             ( Int** p )      { m_aaiPdmScaleNomDelta        = p; }
    211249  Void      setPdmOffset                    ( Int** p )      { m_aaiPdmOffset               = p; }
     250#endif
     251#if HHI_INTER_VIEW_MOTION_PRED
     252  Void      setMultiviewMvPredMode          ( UInt  u )      { m_uiMultiviewMvPredMode      = u; }
    212253  Void      setMultiviewMvRegMode           ( UInt  u )      { m_uiMultiviewMvRegMode       = u; }
    213254  Void      setMultiviewMvRegLambdaScale    ( Double d)      { m_dMultiviewMvRegLambdaScale = d; }
     255#endif
     256#if HHI_INTER_VIEW_RESIDUAL_PRED
    214257  Void      setMultiviewResPredMode         ( UInt  u )      { m_uiMultiviewResPredMode     = u; }
    215 
    216 #if SB_INTERVIEW_SKIP
     258#endif
     259
     260#if HHI_INTERVIEW_SKIP
    217261  Void      setInterViewSkip            ( UInt  u )       { m_uiInterViewSkip         = u; }
    218   Bool      getInterViewSkip            ( )       { return bool(m_uiInterViewSkip) ;}
    219 #if SB_INTERVIEW_SKIP_LAMBDA_SCALE
     262  Bool      getInterViewSkip            ( )       { return (m_uiInterViewSkip?true:false) ;}
     263#if HHI_INTERVIEW_SKIP_LAMBDA_SCALE
    220264  Void      setInterViewSkipLambdaScale ( UInt  u )       { m_dInterViewSkipLambdaScale = u; }
    221265  Double      getInterViewSkipLambdaScale ()                { return m_dInterViewSkipLambdaScale; }
     
    254298  Void      setMaxDeltaQP                   ( Int   i )      { m_iMaxDeltaQP = i; }
    255299
    256 //GT VSO
     300#if HHI_VSO
    257301 //==== VSO  ==========
    258302  Void      setVSOMode                      ( UInt  ui )    { m_uiVSOMode   = ui; }
    259303  Void      setForceLambdaScaleVSO          ( Bool  b )     { m_bForceLambdaScale = b; };
    260304  Void      setLambdaScaleVSO               ( Double d )    { m_dLambdaScaleVSO   = d; };
    261 #if RDO_DIST_INT
     305#if HHI_VSO_DIST_INT
    262306  Void      setAllowNegDist                 ( Bool b  )     { m_bAllowNegDist     = b; };
    263307#endif
    264 //GT VSO end
     308#endif
    265309
    266310  //====== Sequence ========
     
    306350  Int       getMaxDeltaQP                   ()      { return  m_iMaxDeltaQP; }
    307351
     352#if HHI_INTER_VIEW_MOTION_PRED
    308353  UInt      getMultiviewMvRegMode           ()      { return  m_uiMultiviewMvRegMode; }
    309354  Double    getMultiviewMvRegLambdaScale    ()      { return  m_dMultiviewMvRegLambdaScale; }
    310 
    311 //GT VSO
     355#endif
     356
     357#if HHI_VSO
    312358  //==== VSO  ==========
    313359  UInt      getVSOMode                      ()      { return m_uiVSOMode; }
    314360  Bool      getForceLambdaScaleVSO          ()      { return m_bForceLambdaScale; }
    315361  Double    getLambdaScaleVSO               ()      { return m_dLambdaScaleVSO;   }
    316 #if RDO_DIST_INT
     362#if HHI_VSO_DIST_INT
    317363  Bool      getAllowNegDist                 ()      { return m_bAllowNegDist;     }
    318364#endif
    319 
    320 //GT VSO end
     365#endif
    321366
    322367  //==== Tool list ========
     
    330375#endif
    331376  Void      setUseRDOQ                      ( Bool  b )     { m_bUseRDOQ    = b; }
    332 #if !SB_NO_LowDelayCoding
     377#if !HHI_NO_LowDelayCoding
    333378  Void      setUseLDC                       ( Bool  b )     { m_bUseLDC     = b; }
    334379#endif
    335380  Void      setUsePAD                       ( Bool  b )     { m_bUsePAD     = b; }
    336381  Void      setUseFastEnc                   ( Bool  b )     { m_bUseFastEnc = b; }
    337   //GT VSO
     382#if HHI_VSO
    338383  Void      setUseVSO                       ( Bool  b )     { m_bUseVSO     = b; }
    339   //GT VSO end
     384#endif
    340385  Void      setUseMRG                       ( Bool  b )     { m_bUseMRG     = b; } // SOPH:
    341386#if CONSTRAINED_INTRA_PRED
     
    344389  Void      setdQPs                         ( Int*  p )     { m_aidQP       = p; }
    345390  Void      setDeltaQpRD                    ( UInt  u )     {m_uiDeltaQpRD  = u; }
    346 
    347   Void      setOmitUnusedBlocks             ( Bool b )       { m_bOmitUnusedBlocks = b; }
    348391
    349392  Bool      getUseSBACRD                    ()      { return m_bUseSBACRD;  }
     
    360403#endif
    361404  Bool      getUseRDOQ                      ()      { return m_bUseRDOQ;    }
    362 #if !SB_NO_LowDelayCoding
     405#if !HHI_NO_LowDelayCoding
    363406  Bool      getUseLDC                       ()      { return m_bUseLDC;     }
    364407#endif
     
    366409  Bool      getUseFastEnc                   ()      { return m_bUseFastEnc; }
    367410
    368 //GT VSO
     411#if HHI_VSO
    369412  Bool      getUseVSO                       ()      { return m_bUseVSO;     }
    370 //GT VSO end
     413#endif
    371414  Bool      getUseMRG                       ()      { return m_bUseMRG;     } // SOPH:
    372415#if CONSTRAINED_INTRA_PRED
    373416  Bool      getUseConstrainedIntraPred      ()      { return m_bUseConstrainedIntraPred; }
    374417#endif
    375 #if HHI_DMM_INTRA
    376   Void setUseDepthModelModes( Bool b) { m_bUseDepthModelModes = b;    }
    377   Bool getUseDepthModelModes()        { return m_bUseDepthModelModes; }
    378 #endif
    379 
    380   Bool getOmitUnusedBlocks             ()      { return m_bOmitUnusedBlocks; }
     418#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     419  Void setUseDMM( Bool b) { m_bUseDMM = b;    }
     420  Bool getUseDMM()        { return m_bUseDMM; }
     421#endif
    381422
    382423#if LM_CHROMA
     
    413454  Bool      getUseSAO                  ()              {return m_bUseSAO;}
    414455#endif
     456#if HHI_MPI
    415457  Void      setUseMVI                  (Bool bVal)     {m_bUseMVI = bVal;}
     458#endif
    416459
    417460  void setPictureDigestEnabled(bool b) { m_pictureDigestEnabled = b; }
  • trunk/source/Lib/TLibEncoder/TEncCu.cpp

    r2 r5  
     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-2011, 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 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 */
    133
    234
     
    3668  m_ppcResPredTmp  = new TComYuv*[m_uhTotalDepth-1];
    3769
    38 #if MW_MVI_SIGNALLING_MODE == 1
     70#if HHI_MPI
    3971  m_puhDepthSaved  = new UChar[1ll<<( ( m_uhTotalDepth - 1 )<<1 )];
    4072  m_puhWidthSaved  = new UChar[1ll<<( ( m_uhTotalDepth - 1 )<<1 )];
     
    77109  Int i;
    78110
    79 #if MW_MVI_SIGNALLING_MODE == 1
     111#if HHI_MPI
    80112  delete[] m_puhDepthSaved;  m_puhDepthSaved  = NULL;
    81113  delete[] m_puhWidthSaved;  m_puhWidthSaved  = NULL;
     
    245277
    246278
    247 //GT VSO
     279#if HHI_VSO
    248280      if ( m_pcRdCost->getUseLambdaScaleVSO() )
    249281      {
     
    251283      }
    252284      else
     285#endif
    253286      {
    254287        m_ppcBestCU[0]->getTotalCost()  = m_pcRdCost->calcRdCost( m_ppcBestCU[0]->getTotalBits(), m_ppcBestCU[0]->getTotalDistortion() );
    255288      }
    256 //GT VSO end
     289
    257290      fBestCost = m_ppcBestCU[0]->getTotalCost();
    258291
     
    276309        m_ppcBestCU[0]->getTotalBits() += m_pcEntropyCoder->getNumberOfWrittenBits(); // dQP bits
    277310
    278         //GT VSO
     311#if HHI_VSO
    279312        if (m_pcRdCost->getUseLambdaScaleVSO())
    280313        {
     
    282315        }
    283316        else
     317#endif
    284318        {
    285319          m_ppcBestCU[0]->getTotalCost()  = m_pcRdCost->calcRdCost( m_ppcBestCU[0]->getTotalBits(), m_ppcBestCU[0]->getTotalDistortion() );
    286320        }
    287         //GT VSO end
    288321
    289322        if ( fBestCost > m_ppcBestCU[0]->getTotalCost() )
     
    309342      m_ppcBestCU[0]->getTotalBits() += m_pcEntropyCoder->getNumberOfWrittenBits(); // dQP bits
    310343
    311       //GT VSO
     344#if HHI_VSO
    312345      if (m_pcRdCost->getUseLambdaScaleVSO())
    313346      {
     
    315348      }
    316349      else
     350#endif
    317351      {
    318352        m_ppcBestCU[0]->getTotalCost()  = m_pcRdCost->calcRdCost( m_ppcBestCU[0]->getTotalBits(), m_ppcBestCU[0]->getTotalDistortion() );
    319353      }
    320      //GT VSO end
    321354    }
    322355  }
     
    415448  UInt uiBPelY   = uiTPelY + rpcBestCU->getHeight(0) - 1;
    416449
    417 #if ( SB_INTERVIEW_SKIP)
     450#if ( HHI_INTERVIEW_SKIP)
    418451  Bool bFullyRenderedSec = true ;
    419452  if( m_pcEncCfg->getInterViewSkip() )
     
    445478    bFullyRenderedSec = false ;
    446479  }
    447 #if SB_INTERVIEW_SKIP_LAMBDA_SCALE
     480#if HHI_INTERVIEW_SKIP_LAMBDA_SCALE
    448481  if( bFullyRenderedSec )
    449482  {
     
    463496    if( rpcBestCU->getSlice()->getSliceType() != I_SLICE )
    464497    {
     498#if HHI_INTER_VIEW_RESIDUAL_PRED
    465499      // check availability of residual prediction
    466500      Bool  bResPredAvailable   = false;
     
    476510      {
    477511        Bool bResPredFlag  = ( uiResPrdId > 0 );
     512#endif
    478513
    479514      // SKIP
     
    483518      {
    484519#if !HHI_MRG_SKIP
     520#if HHI_INTER_VIEW_RESIDUAL_PRED
    485521        rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
     522#endif
    486523        xCheckRDCostAMVPSkip ( rpcBestCU, rpcTempCU );        rpcTempCU->initEstData();
    487524#endif
     525#if HHI_INTER_VIEW_RESIDUAL_PRED
    488526        rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    489 #if SB_INTERVIEW_SKIP
     527#endif
     528#if HHI_INTERVIEW_SKIP
    490529        xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU, bFullyRenderedSec );            rpcTempCU->initEstData();
    491530#else
     
    495534      else
    496535      {
     536#if HHI_INTER_VIEW_RESIDUAL_PRED
    497537        rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
     538#endif
    498539        xCheckRDCostAMVPSkip ( rpcBestCU, rpcTempCU );        rpcTempCU->initEstData();
    499540      }
     
    514555      {
    515556#if HHI_DISABLE_INTER_NxN_SPLIT
     557#if HHI_INTER_VIEW_RESIDUAL_PRED
    516558        rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    517 #if SB_INTERVIEW_SKIP
     559#endif
     560#if HHI_INTERVIEW_SKIP
    518561        xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec );  rpcTempCU->initEstData();
    519562#else
     
    522565        if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth )
    523566        {
     567#if HHI_INTER_VIEW_RESIDUAL_PRED
    524568          rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    525 #if SB_INTERVIEW_SKIP
     569#endif
     570#if HHI_INTERVIEW_SKIP
    526571          xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec );  rpcTempCU->initEstData();
    527572#else
     
    530575        }
    531576#else
     577#if HHI_INTER_VIEW_RESIDUAL_PRED
    532578        rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    533 #if SB_INTERVIEW_SKIP
     579#endif
     580#if HHI_INTERVIEW_SKIP
    534581        xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec );  rpcTempCU->initEstData();
    535582#else
    536583        xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N );  rpcTempCU->initEstData();
    537584#endif
     585#if HHI_INTER_VIEW_RESIDUAL_PRED
    538586        rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    539 #if SB_INTERVIEW_SKIP
     587#endif
     588#if HHI_INTERVIEW_SKIP
    540589        xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN, bFullyRenderedSec   );  rpcTempCU->initEstData();
    541590#else
     
    549598#endif
    550599      { // 2NxN, Nx2N
     600#if HHI_INTER_VIEW_RESIDUAL_PRED
    551601        rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    552 #if SB_INTERVIEW_SKIP
     602#endif
     603#if HHI_INTERVIEW_SKIP
    553604        xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N, bFullyRenderedSec  );  rpcTempCU->initEstData();
    554605#else
    555606        xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N  );  rpcTempCU->initEstData();
    556607#endif
     608#if HHI_INTER_VIEW_RESIDUAL_PRED
    557609        rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
    558 #if SB_INTERVIEW_SKIP
     610#endif
     611#if HHI_INTERVIEW_SKIP
    559612        xCheckRDCostInter      ( rpcBestCU, rpcTempCU, SIZE_2NxN, bFullyRenderedSec  );  rpcTempCU->initEstData();
    560613#else
     
    563616      }
    564617
     618#if HHI_INTER_VIEW_RESIDUAL_PRED
    565619    } // uiResPrdId
     620#endif
    566621    }
    567622
     
    570625    {
    571626      // speedup for inter frames
    572 #if SB_INTERVIEW_SKIP
     627#if HHI_INTERVIEW_SKIP
    573628      if( ( rpcBestCU->getSlice()->getSliceType() == I_SLICE ||
    574629               rpcBestCU->getCbf( 0, TEXT_LUMA     ) != 0   ||
     
    596651
    597652    m_pcEntropyCoder->resetBits();
    598 #if MW_MVI_SIGNALLING_MODE == 0
    599     if( rpcBestCU->getSlice()->getSPS()->getUseMVI() && rpcBestCU->getSlice()->getSliceType() != I_SLICE )
    600       m_pcEntropyCoder->encodeMvInheritanceFlag( rpcBestCU, 0, uiDepth, true );
    601 #endif
    602653    m_pcEntropyCoder->encodeSplitFlag( rpcBestCU, 0, uiDepth, true );
    603654    rpcBestCU->getTotalBits() += m_pcEntropyCoder->getNumberOfWrittenBits(); // split bits
    604655
    605     //GT VSO
     656#if HHI_VSO
    606657    if (m_pcRdCost->getUseLambdaScaleVSO())
    607658    {
     
    609660    }
    610661    else
    611     {
    612 #if SB_INTERVIEW_SKIP
     662#endif
     663    {
     664#if HHI_INTERVIEW_SKIP
    613665  if(  m_pcEncCfg->getInterViewSkip())
    614666      {
     
    631683      rpcBestCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcBestCU->getTotalBits(), rpcBestCU->getTotalDistortion() );
    632684    }
    633     //GT VSO end
     685   
    634686
    635687    // accumulate statistics for early skip
     
    643695      }
    644696    }
    645 #if MW_MVI_SIGNALLING_MODE == 0
    646     if( rpcBestCU->getSlice()->getSPS()->getUseMVI() && rpcBestCU->getSlice()->getSliceType() != I_SLICE )
    647     {
    648       xCheckRDCostMvInheritance( rpcBestCU, rpcTempCU, uiDepth, false );  rpcTempCU->initEstData();
    649     }
    650 #elif MW_MVI_SIGNALLING_MODE == 1
     697#if HHI_MPI
    651698    if( rpcBestCU->getSlice()->getSPS()->getUseMVI() && rpcBestCU->getSlice()->getSliceType() != I_SLICE )
    652699    {
     
    666713  if( bTrySplit && uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth )
    667714  {
     715#if HHI_VSO
    668716    // reset Model
    669717    if( m_pcRdCost->getUseRenModel() )
     
    675723      m_pcRdCost->setRenModelData( m_ppcBestCU[uiDepth], 0, piSrc, uiSrcStride, uiWidth, uiHeight );
    676724    }
     725#endif
    677726
    678727    UChar       uhNextDepth         = uiDepth+1;
     
    701750        xCompressCU( pcSubBestPartCU, pcSubTempPartCU, uhNextDepth );
    702751
     752#if HHI_VSO
    703753        if( m_pcRdCost->getUseRenModel() )
    704754        {
     
    709759          m_pcRdCost->setRenModelData( pcSubBestPartCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
    710760        }
     761#endif
    711762        rpcTempCU->copyPartFrom( pcSubBestPartCU, uiPartUnitIdx, uhNextDepth );         // Keep best part data to current temporary data.
    712763        xCopyYuv2Tmp( pcSubBestPartCU->getTotalNumPart()*uiPartUnitIdx, uhNextDepth );
     
    718769      m_pcEntropyCoder->resetBits();
    719770      m_pcEntropyCoder->encodeSplitFlag( rpcTempCU, 0, uiDepth, true );
    720 #if MW_MVI_SIGNALLING_MODE == 0
    721       if( rpcBestCU->getSlice()->getSPS()->getUseMVI() && rpcBestCU->getSlice()->getSliceType() != I_SLICE )
    722         m_pcEntropyCoder->encodeMvInheritanceFlag( rpcTempCU, 0, uiDepth, true );
    723 #endif
    724771
    725772      rpcTempCU->getTotalBits() += m_pcEntropyCoder->getNumberOfWrittenBits(); // split bits
    726773    }
    727774
    728 #if SB_INTERVIEW_SKIP_LAMBDA_SCALE
     775#if HHI_INTERVIEW_SKIP_LAMBDA_SCALE
    729776    if( bFullyRenderedSec )
    730777    {
     
    736783    }
    737784#endif
    738 //GT VSO
     785#if HHI_VSO
    739786    if ( m_pcRdCost->getUseLambdaScaleVSO())
    740787    {
     
    742789    }
    743790    else
     791#endif
    744792    {
    745793      rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
    746794    }
    747 //GT VSO end
    748795
    749796    if( m_bUseSBACRD )
     
    753800    xCheckBestMode( rpcBestCU, rpcTempCU, uiDepth );                                          // RD compare current larger prediction
    754801
     802#if HHI_VSO
    755803    if( m_pcRdCost->getUseRenModel() )
    756804    {
     
    761809      m_pcRdCost->setRenModelData( rpcBestCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
    762810    }
     811#endif
    763812  }                                                                                  // with sub partitioned prediction.
    764813
     
    793842  UInt uiBPelY   = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1;
    794843
    795 #if MW_MVI_SIGNALLING_MODE == 0
    796   if( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE )
    797   {
    798     m_pcEntropyCoder->encodeMvInheritanceFlag( pcCU, uiAbsPartIdx, uiDepth );
    799   }
    800 #endif
    801844  if( ( uiRPelX < pcCU->getSlice()->getSPS()->getWidth() ) && ( uiBPelY < pcCU->getSlice()->getSPS()->getHeight() ) )
    802845  {
     846#if HHI_MPI
    803847    if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth < pcCU->getTextureModeDepth( uiAbsPartIdx ) )
     848#endif
    804849      m_pcEntropyCoder->encodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth );
    805850  }
     
    809854  }
    810855
    811 #if MW_MVI_SIGNALLING_MODE == 1
     856#if HHI_MPI
    812857  if( uiDepth == pcCU->getTextureModeDepth( uiAbsPartIdx ) )
    813858  {
     
    870915#endif
    871916
     917#if HHI_MPI
    872918  if( !pcCU->getSlice()->isIntra() && pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 )
     919#else
     920  if( !pcCU->getSlice()->isIntra() )
     921#endif
    873922  {
    874923    m_pcEntropyCoder->encodeSkipFlag( pcCU, uiAbsPartIdx );
     
    889938    }
    890939#endif
     940#if HHI_INTER_VIEW_RESIDUAL_PRED
    891941    m_pcEntropyCoder->encodeResPredFlag( pcCU, uiAbsPartIdx, 0 );
     942#endif
    892943    return;
    893944  }
     945#if HHI_MPI
    894946  if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 )
    895947  {
     948#endif
    896949    m_pcEntropyCoder->encodePredMode( pcCU, uiAbsPartIdx );
    897950
     
    901954    m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx );
    902955
     956#if HHI_INTER_VIEW_RESIDUAL_PRED
    903957    if( !pcCU->isIntra( uiAbsPartIdx ) )
    904958    {
    905959      m_pcEntropyCoder->encodeResPredFlag( pcCU, uiAbsPartIdx, 0 );
    906960    }
    907   }
     961#endif
     962#if HHI_MPI
     963  }
     964#endif
    908965
    909966  // Encode Coefficients
     
    915972  UChar uhDepth = rpcTempCU->getDepth( 0 );
    916973
     974#if HHI_VSO
    917975  if( m_pcRdCost->getUseRenModel() )
    918976  {
     
    923981    m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
    924982  }
     983#endif
    925984
    926985  rpcTempCU->setPredModeSubParts( MODE_SKIP,   0, uhDepth );
     
    9501009 * \returns Void
    9511010 */
    952 #if SB_INTERVIEW_SKIP
     1011#if HHI_INTERVIEW_SKIP
    9531012Void TEncCu::xCheckRDCostMerge2Nx2N( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bSkipRes )
    9541013#else
     
    9611020  UInt uiNeighbourCandIdx[MRG_MAX_NUM_CANDS]; //MVs with same idx => same cand
    9621021
     1022#if HHI_INTER_VIEW_RESIDUAL_PRED
    9631023  Bool  bResPrdAvail  = rpcTempCU->getResPredAvail( 0 );
    9641024  Bool  bResPrdFlag   = rpcTempCU->getResPredFlag ( 0 );
     1025#endif
    9651026
    9661027  for( UInt ui = 0; ui < MRG_MAX_NUM_CANDS; ++ui )
     
    9711032  UChar uhDepth = rpcTempCU->getDepth( 0 );
    9721033
     1034#if HHI_VSO
    9731035  if( m_pcRdCost->getUseRenModel() )
    9741036  {
     
    9791041    m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
    9801042  }
     1043#endif
    9811044
    9821045  rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to LCU level
     
    9901053#if HHI_MRG_SKIP
    9911054      TComYuv* pcPredYuvTemp = NULL;
    992 #if SB_INTERVIEW_SKIP
     1055#if HHI_INTERVIEW_SKIP
    9931056      for( UInt uiNoResidual = (bSkipRes ? 1:0); uiNoResidual < 2; ++uiNoResidual )
    9941057#else
     
    10151078      rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand].getMv(), cMvFieldNeighbours[1 + 2*uiMergeCand].getRefIdx(), SIZE_2Nx2N, 0, 0, 0 ); // interprets depth relative to rpcTempCU level
    10161079
     1080#if HHI_INTER_VIEW_RESIDUAL_PRED
    10171081      rpcTempCU->setResPredAvailSubParts( bResPrdAvail, 0, 0, uhDepth );
    10181082      rpcTempCU->setResPredFlagSubParts ( bResPrdFlag,  0, 0, uhDepth );
     1083#endif
    10191084
    10201085#if HHI_MRG_SKIP
    10211086      // do MC
    1022 #if SB_INTERVIEW_SKIP
     1087#if HHI_INTERVIEW_SKIP
    10231088      if ( (uiNoResidual == 0) || bSkipRes ){
    10241089#else
     
    10361101        }
    10371102      }
    1038 
     1103#if HHI_VSO
    10391104      if( m_pcRdCost->getUseRenModel() )
    10401105      { //Reset
     
    10451110        m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
    10461111      }
     1112#endif
    10471113
    10481114      // estimate residual and encode everything
     
    10821148}
    10831149
    1084 #if SB_INTERVIEW_SKIP
     1150#if HHI_INTERVIEW_SKIP
    10851151Void TEncCu::xCheckRDCostInter( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bSkipRes)
    10861152#else
     
    10901156  UChar uhDepth = rpcTempCU->getDepth( 0 );
    10911157
     1158#if HHI_VSO
    10921159  if( m_pcRdCost->getUseRenModel() )
    10931160  {
     
    10981165    m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
    10991166  }
     1167#endif
    11001168
    11011169  rpcTempCU->setDepthSubParts( uhDepth, 0 );
    11021170
     1171#if HHI_INTER_VIEW_RESIDUAL_PRED
    11031172  Bool  bResPrdAvail  = rpcTempCU->getResPredAvail( 0 );
    11041173  Bool  bResPrdFlag   = rpcTempCU->getResPredFlag ( 0 );
     1174#endif
    11051175  rpcTempCU->setPartSizeSubParts    ( SIZE_2Nx2N,   0,    uhDepth );
     1176#if HHI_INTER_VIEW_RESIDUAL_PRED
    11061177  rpcTempCU->setResPredAvailSubParts( bResPrdAvail, 0, 0, uhDepth );
    11071178  rpcTempCU->setResPredFlagSubParts ( bResPrdFlag,  0, 0, uhDepth );
     1179#endif
    11081180  rpcTempCU->setPartSizeSubParts    ( ePartSize,    0,    uhDepth );
    11091181  rpcTempCU->setPredModeSubParts    ( MODE_INTER,   0,    uhDepth );
    11101182
     1183#if HHI_INTER_VIEW_RESIDUAL_PRED
    11111184  if( rpcTempCU->getResPredFlag( 0 ) )
    11121185  { // subtract residual prediction from original in motion search
    11131186    m_ppcOrigYuv[uhDepth]->add( m_ppcResPredTmp [uhDepth], rpcTempCU->getWidth( 0 ), rpcTempCU->getHeight( 0 ), true );
    11141187  }
    1115   #if SB_INTERVIEW_SKIP
     1188#endif
     1189#if HHI_INTERVIEW_SKIP
    11161190  m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], bSkipRes );
    11171191#else
    11181192  m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth] );
    11191193#endif
     1194#if HHI_INTER_VIEW_RESIDUAL_PRED
    11201195  if( rpcTempCU->getResPredFlag( 0 ) )
    11211196  { // add residual prediction to original again
    11221197    m_ppcOrigYuv[uhDepth]->add( m_ppcResPredTmp [uhDepth], rpcTempCU->getWidth( 0 ), rpcTempCU->getHeight( 0 ) );
    11231198  }
     1199#endif
    11241200
    11251201#if PART_MRG
     
    11291205  }
    11301206#endif
    1131 #if SB_INTERVIEW_SKIP
     1207#if HHI_INTERVIEW_SKIP
    11321208  m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], m_ppcResPredTmp [uhDepth],bSkipRes );
    11331209#else
    11341210  m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], m_ppcResPredTmp [uhDepth], false );
    11351211#endif
    1136 //GT VSO
     1212
     1213#if HHI_VSO
    11371214  if( m_pcRdCost->getUseLambdaScaleVSO() )
    11381215  {
     
    11401217  }
    11411218  else
     1219#endif
    11421220  {
    11431221    rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
    11441222  }
    1145 //GT VSO end
    11461223
    11471224  xCheckBestMode( rpcBestCU, rpcTempCU, uhDepth );
     
    11521229  UInt uiDepth = rpcTempCU->getDepth( 0 );
    11531230
    1154   // reset Model
     1231#if HHI_VSO
    11551232  if( m_pcRdCost->getUseRenModel() )
    11561233  {
     
    11611238    m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
    11621239  }
     1240#endif
    11631241
    11641242  rpcTempCU->setPartSizeSubParts( eSize, 0, uiDepth );
     
    11911269
    11921270  rpcTempCU->getTotalBits() = m_pcEntropyCoder->getNumberOfWrittenBits();
    1193 //GT VSO
     1271#if HHI_VSO
    11941272  if( m_pcRdCost->getUseLambdaScaleVSO())
    11951273  {
     
    11971275  }
    11981276  else
     1277#endif
    11991278  {
    12001279    rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
    12011280  }
    1202 //GT VSO end
    12031281
    12041282  xCheckBestMode( rpcBestCU, rpcTempCU, uiDepth );
     
    12391317  UChar uhDepth = rpcTempCU->getDepth(0);
    12401318
     1319#if HHI_INTER_VIEW_RESIDUAL_PRED
    12411320  Bool  bResPrdAvail  = rpcTempCU->getResPredAvail( 0 );
    12421321  Bool  bResPrdFlag   = rpcTempCU->getResPredFlag ( 0 );
     1322#endif
    12431323
    12441324  AMVPInfo cAMVPInfo0;
     
    12781358      rpcTempCU->setPredModeSubParts( MODE_SKIP, 0, uhDepth );
    12791359      rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N,  0, uhDepth );
     1360#if HHI_INTER_VIEW_RESIDUAL_PRED
    12801361      rpcTempCU->setResPredAvailSubParts( bResPrdAvail, 0, 0, uhDepth );
    12811362      rpcTempCU->setResPredFlagSubParts ( bResPrdFlag,  0, 0, uhDepth );
     1363#endif
    12821364
    12831365      if (rpcTempCU->getSlice()->isInterB())
     
    13171399}
    13181400
    1319 #if MW_MVI_SIGNALLING_MODE == 0
    1320 Void TEncCu::xCheckRDCostMvInheritance( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, UChar uhTextureModeDepth, Bool bRecursiveCall )
    1321 #elif MW_MVI_SIGNALLING_MODE == 1
     1401#if HHI_MPI
    13221402Void TEncCu::xCheckRDCostMvInheritance( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, UChar uhTextureModeDepth, Bool bSkipResidual, Bool bRecursiveCall )
    1323 #else
    1324 #error
    1325 #endif
    13261403{
    13271404  assert( rpcTempCU->getSlice()->getSPS()->isDepth() );
     
    13421419  }
    13431420
     1421#if HHI_VSO
    13441422  if( m_pcRdCost->getUseRenModel() && !bRecursiveCall)
    13451423  {
     
    13501428    m_pcRdCost->setRenModelData( m_ppcTempCU[uhDepth], 0, piSrc, uiSrcStride, uiWidth, uiHeight );
    13511429  }
     1430#endif
    13521431
    13531432  Bool bSplit = uhDepth < pcTextureCU->getDepth( rpcTempCU->getZorderIdxInCU() );
     
    13771456        }
    13781457
    1379 #if MW_MVI_SIGNALLING_MODE == 0
    1380         xCheckRDCostMvInheritance( pcSubBestPartCU, pcSubTempPartCU, uhTextureModeDepth, true );
    1381 #elif MW_MVI_SIGNALLING_MODE == 1
    13821458        xCheckRDCostMvInheritance( pcSubBestPartCU, pcSubTempPartCU, uhTextureModeDepth, bSkipResidual, true );
    1383 #endif
    13841459
    13851460        rpcTempCU->copyPartFrom( pcSubBestPartCU, uiPartUnitIdx, uhNextDepth );         // Keep best part data to current temporary data.
     
    14081483      assert( rpcTempCU->getPredictionMode( ui ) != MODE_NONE );
    14091484    }
    1410 #if MW_MVI_SIGNALLING_MODE == 0
    1411     if( rpcTempCU->getPredictionMode( 0 ) == MODE_SKIP )
    1412     {
    1413       rpcTempCU->setPredModeSubParts( MODE_INTER, 0, uhDepth );
    1414     }
    1415 #elif MW_MVI_SIGNALLING_MODE == 1
    14161485    rpcTempCU->setPredModeSubParts( bSkipResidual ? MODE_SKIP : MODE_INTER, 0, uhDepth );
    1417 #endif
    14181486    m_pcPredSearch->motionCompensation( rpcTempCU, m_ppcPredYuvTemp[uhDepth] );
    14191487
    14201488    // get Original YUV data from picture
    14211489    m_ppcOrigYuv[uhDepth]->copyFromPicYuv( rpcBestCU->getPic()->getPicYuvOrg(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() );
    1422 #if MW_MVI_SIGNALLING_MODE == 0
    1423     m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], m_ppcResPredTmp [uhDepth], false );
    1424 #elif MW_MVI_SIGNALLING_MODE == 1
    14251490    m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], m_ppcResPredTmp [uhDepth], bSkipResidual );
    1426 #endif
    14271491
    14281492    if( uhDepth == uhTextureModeDepth )
     
    14311495    }
    14321496  }
    1433   //GT VSO
     1497
     1498#if HHI_VSO
    14341499  if( m_pcRdCost->getUseLambdaScaleVSO() )
    14351500  {
     
    14371502  }
    14381503  else
     1504#endif
    14391505  {
    14401506    rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
    14411507  }
    1442   //GT VSO end
    14431508
    14441509  xCheckBestMode( rpcBestCU, rpcTempCU, uhDepth );
    14451510
     1511#if HHI_VSO
    14461512  if( !bSplit && bRecursiveCall && m_pcRdCost->getUseRenModel() )
    14471513  {
     
    14521518    m_pcRdCost->setRenModelData( rpcBestCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
    14531519  }
     1520#endif
    14541521}
    14551522
     
    14581525  const UChar uhDepth = pcCU->getTextureModeDepth( 0 );
    14591526  m_pcEntropyCoder->resetBits();
    1460 #if MW_MVI_SIGNALLING_MODE == 0
    1461   m_pcEntropyCoder->encodeMvInheritanceFlag( pcCU, 0, uhDepth, true );
    1462 #elif MW_MVI_SIGNALLING_MODE == 1
    14631527  xSaveDepthWidthHeight( pcCU );
    14641528  pcCU->setSizeSubParts( g_uiMaxCUWidth>>uhDepth, g_uiMaxCUHeight>>uhDepth, 0, uhDepth );
     
    15271591  }
    15281592  xRestoreDepthWidthHeight( pcCU );
    1529 #endif
    15301593
    15311594  pcCU->getTotalBits() += m_pcEntropyCoder->getNumberOfWrittenBits();
    15321595}
    15331596
    1534 #if MW_MVI_SIGNALLING_MODE == 1
    15351597Void TEncCu::xSaveDepthWidthHeight( TComDataCU* pcCU )
    15361598{
  • trunk/source/Lib/TLibEncoder/TEncCu.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    68101  Bool                    m_bUseSBACRD;
    69102 
    70 #if MW_MVI_SIGNALLING_MODE == 1
     103#if HHI_MPI
    71104  UChar *m_puhDepthSaved;
    72105  UChar *m_puhWidthSaved;
     
    99132  Void  xCheckRDCostAMVPSkip( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU                      );
    100133 
    101 #if SB_INTERVIEW_SKIP
     134#if HHI_INTERVIEW_SKIP
    102135  Void xCheckRDCostMerge2Nx2N( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bFullyRendered ) ;
    103136#else
     
    106139 
    107140  Void  xCheckRDCostSkip    ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bBSkipRes      );
    108 #if SB_INTERVIEW_SKIP
     141#if HHI_INTERVIEW_SKIP
    109142  Void xCheckRDCostInter( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bFullyRendered ) ;
    110143#else
     
    118151  Void  xCopyYuv2Tmp        ( UInt uhPartUnitIdx, UInt uiDepth );
    119152  Void  xAddMVISignallingBits( TComDataCU* pcCU );
    120 #if MW_MVI_SIGNALLING_MODE == 0
    121   Void  xCheckRDCostMvInheritance( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, UChar uhTextureModeDepth, Bool bRecursiveCall );
    122 #elif MW_MVI_SIGNALLING_MODE == 1
     153#if HHI_MPI
    123154  Void  xCheckRDCostMvInheritance( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, UChar uhTextureModeDepth, Bool bSkipResidual, Bool bRecursiveCall );
    124155  Void  xSaveDepthWidthHeight( TComDataCU* pcCU );
  • trunk/source/Lib/TLibEncoder/TEncEntropy.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    408441    }
    409442  }
    410 #if MW_MVI_SIGNALLING_MODE == 1
     443#if HHI_MPI
    411444  if( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N )
    412445    uiNumCand++;
     
    419452
    420453
     454#if HHI_INTER_VIEW_RESIDUAL_PRED
    421455Void
    422456TEncEntropy::encodeResPredFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx, Bool bRD )
     
    437471  m_pcEntropyCoderIf->codeResPredFlag( pcCU, uiAbsPartIdx );
    438472}
     473#endif
    439474
    440475
     
    517552  m_pcEntropyCoderIf->codeSplitFlag( pcCU, uiAbsPartIdx, uiDepth );
    518553}
    519 
    520 #if MW_MVI_SIGNALLING_MODE == 0
    521 Void TEncEntropy::encodeMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool bRD )
    522 {
    523   if( bRD )
    524     uiAbsPartIdx = 0;
    525   m_pcEntropyCoderIf->codeMvInheritanceFlag( pcCU, uiAbsPartIdx, uiDepth );
    526 }
    527 #endif
    528554
    529555/** encode partition size
     
    15681594    {
    15691595#if  HHI_MRG_SKIP
    1570 #if MW_MVI_SIGNALLING_MODE == 1
     1596#if HHI_MPI
    15711597      if( !(pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N &&
    15721598            ( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth == pcCU->getTextureModeDepth( uiAbsPartIdx ) ) ) )
  • trunk/source/Lib/TLibEncoder/TEncEntropy.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    5790 
    5891  virtual Void codeSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    59 #if MW_MVI_SIGNALLING_MODE == 0
    60   virtual Void codeMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    61 #endif
    6292  virtual Void codeMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    6393  virtual Void codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
     94#if HHI_INTER_VIEW_RESIDUAL_PRED
    6495  virtual Void codeResPredFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
     96#endif
    6597  virtual Void codeSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    6698 
     
    138170  Void encodeSplitFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool bRD = false );
    139171  Void encodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    140 #if MW_MVI_SIGNALLING_MODE == 0
    141   Void encodeMvInheritanceFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool bRD = false );
    142 #endif
    143172  Void encodePUWise       ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    144173  Void encodeInterDirPU   ( TComDataCU* pcSubCU, UInt uiAbsPartIdx  );
     
    152181  Void encodeMergeIndex   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx );
    153182#endif
     183#if HHI_INTER_VIEW_RESIDUAL_PRED
    154184  Void encodeResPredFlag  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx, Bool bRD = false );
     185#endif
    155186  Void encodeAlfCtrlFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    156187#if TSB_ALF_HEADER
  • trunk/source/Lib/TLibEncoder/TEncFormattedStringParser.cpp

    r2 r5  
     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-2011, 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 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
    134
    235#include "TEncFormattedStringParser.h"
  • trunk/source/Lib/TLibEncoder/TEncFormattedStringParser.h

    r2 r5  
     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-2011, 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 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
    134#if !defined(AFX_TEncFormattedStringParser_H__268768B8_4D1D_484A_904E_586985833BAC__INCLUDED_)
    235#define AFX_TEncFormattedStringParser_H__268768B8_4D1D_484A_904E_586985833BAC__INCLUDED_
  • trunk/source/Lib/TLibEncoder/TEncGOP.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    1346#include <time.h>
    1447
    15 // SB
    1648#include "../../App/TAppEncoder/TAppEncTop.h"
    1749
     
    2557  m_pcSliceEncoder      = NULL;
    2658  m_pcListPic           = NULL;
    27  
     59
    2860  m_pcEntropyCoder      = NULL;
    2961  m_pcCavlcCoder        = NULL;
    3062  m_pcSbacCoder         = NULL;
    3163  m_pcBinCABAC          = NULL;
     64#if DEPTH_MAP_GENERATION
    3265  m_pcDepthMapGenerator = NULL;
     66#endif
     67#if HHI_INTER_VIEW_RESIDUAL_PRED
    3368  m_pcResidualGenerator = NULL;
    34  
     69#endif
     70
    3571#if DCM_DECODING_REFRESH
    3672  m_bRefreshPending     = 0;
     
    69105  m_pcSliceEncoder       = pcTEncTop->getSliceEncoder();
    70106  m_pcListPic            = pcTEncTop->getListPic();
    71  
     107
    72108  m_pcEntropyCoder       = pcTEncTop->getEntropyCoder();
    73109  m_pcCavlcCoder         = pcTEncTop->getCavlcCoder();
     
    76112  m_pcLoopFilter         = pcTEncTop->getLoopFilter();
    77113  m_pcBitCounter         = pcTEncTop->getBitCounter();
     114#if DEPTH_MAP_GENERATION
    78115  m_pcDepthMapGenerator  = pcTEncTop->getDepthMapGenerator();
     116#endif
     117#if HHI_INTER_VIEW_RESIDUAL_PRED
    79118  m_pcResidualGenerator  = pcTEncTop->getResidualGenerator();
    80  
     119#endif
     120
    81121  // Adaptive Loop filter
    82122  m_pcAdaptiveLoopFilter = pcTEncTop->getAdaptiveLoopFilter();
     
    97137{
    98138  TComSlice*      pcSlice;
    99  
     139
    100140      //-- For time output for each slice
    101141      long iBeforeTime = clock();
     
    104144      pcBitstreamOut->resetBits();
    105145      pcBitstreamOut->rewindStreamPacket();
    106      
     146
    107147      //  Slice data initialization
    108148      pcPic->clearSliceBuffer();
     
    112152      m_pcSliceEncoder->initEncSlice ( pcPic, pcSlice );
    113153      pcSlice->setSliceIdx(0);
    114      
     154
    115155      //  Set SPS
    116156      pcSlice->setSPS( m_pcEncTop->getSPS() );
     
    120160  // set mutliview parameters
    121161      pcSlice->initMultiviewSlice( pcPic->getCodedScale(), pcPic->getCodedOffset() );
    122      
     162
    123163#if DCM_DECODING_REFRESH
    124164      // Set the nal unit type
     
    129169
    130170      //pcSlice->setNalUnitType(getNalUnitType(uiPOCCurr));
    131       // Do decoding refresh marking if any 
     171      // Do decoding refresh marking if any
    132172      pcSlice->decodingRefreshMarking(m_uiPOCCDR, m_bRefreshPending, rcListPic);
    133173#endif
     
    140180
    141181  pcSlice->setRefPicListFromGOPSTring( rcListPic, apcSpatRefPics );
     182
     183#if HHI_VSO
    142184  m_pcEncTop->getEncTop()->setMVDPic(pcPic->getViewIdx(), pcSlice->getPOC(), pcPic->getMVDReferenceInfo() );
    143185
    144 //GT VSO
    145   Bool bUseVSO = m_pcEncTop->getUseVSO(); 
     186
     187  Bool bUseVSO = m_pcEncTop->getUseVSO();
    146188  m_pcRdCost->setUseVSO( bUseVSO );
    147189
    148190  if ( bUseVSO )
    149   { 
     191  {
    150192    Int iVSOMode = m_pcEncTop->getVSOMode();
    151     m_pcRdCost->setVSOMode( iVSOMode  );   
    152 #if RDO_DIST_INT
    153     m_pcRdCost->setAllowNegDist( m_pcEncTop->getAllowNegDist() ); 
     193    m_pcRdCost->setVSOMode( iVSOMode  );
     194#if HHI_VSO_DIST_INT
     195    m_pcRdCost->setAllowNegDist( m_pcEncTop->getAllowNegDist() );
    154196#endif
    155197
    156198    if ( iVSOMode == 4 )
    157199    {
    158       m_pcEncTop->getEncTop()->setupRenModel( pcSlice->getPOC(), pcPic->getViewIdx(), m_pcEncTop->isDepthCoder() ? 1 : 0 ); 
     200      m_pcEncTop->getEncTop()->setupRenModel( pcSlice->getPOC(), pcPic->getViewIdx(), m_pcEncTop->isDepthCoder() ? 1 : 0 );
    159201    }
    160202    else
     
    163205  }
    164206  }
    165 //GT VSO end
    166 
    167   if ( m_pcEncTop->getOmitUnusedBlocks() )
    168   {
    169     m_pcEncTop->getEncTop()->getUsedPelsMap( pcPic->getViewIdx(), pcPic->getPOC(), pcPic->getUsedPelsMap() );
    170   }
    171      
     207#endif
     208
     209#if HHI_INTERVIEW_SKIP
     210  if ( m_pcEncTop->getInterViewSkip() )
     211  {
     212    m_pcEncTop->getEncTop()->getUsedPelsMap( pcPic->getViewIdx(), pcPic->getPOC(), pcPic->getUsedPelsMap() );
     213  }
     214#endif
     215
    172216      pcSlice->setNoBackPredFlag( false );
    173217#if DCM_COMB_LIST
     
    183227          for ( i=0; i < pcSlice->getNumRefIdx(RefPicList( 1 ) ); i++ )
    184228          {
    185             if ( pcSlice->getRefPOC(RefPicList(1), i) != pcSlice->getRefPOC(RefPicList(0), i) ) 
     229            if ( pcSlice->getRefPOC(RefPicList(1), i) != pcSlice->getRefPOC(RefPicList(0), i) )
    186230            {
    187231              pcSlice->setNoBackPredFlag( false );
     
    199243      pcSlice->generateCombinedList();
    200244#endif
    201      
     245
    202246      /////////////////////////////////////////////////////////////////////////////////////////////////// Compress a slice
    203247      //  Slice compression
     
    237281      m_uiStoredStartCUAddrForEncodingEntropySlice[uiStartCUAddrEntropySliceIdx++]  = uiNextCUAddr;
    238282
     283#if DEPTH_MAP_GENERATION
    239284      // init view component and predict virtual depth map
    240285      m_pcDepthMapGenerator->initViewComponent( pcPic );
    241286      m_pcDepthMapGenerator->predictDepthMap  ( pcPic );
     287#if HHI_INTER_VIEW_MOTION_PRED
    242288      m_pcDepthMapGenerator->covertOrgDepthMap( pcPic );
     289#endif
     290#if HHI_INTER_VIEW_RESIDUAL_PRED
    243291      m_pcResidualGenerator->initViewComponent( pcPic );
     292#endif
     293#endif
    244294
    245295      while(uiNextCUAddr<pcPic->getPicSym()->getNumberOfCUsInFrame()) // determine slice boundaries
     
    262312            m_uiStoredStartCUAddrForEncodingEntropySlice[uiStartCUAddrEntropySliceIdx++]  = uiStartCUAddrSlice;
    263313          }
    264          
     314
    265315          if (uiStartCUAddrSlice < pcPic->getPicSym()->getNumberOfCUsInFrame())
    266316          {
    267             pcPic->allocateNewSlice();         
     317            pcPic->allocateNewSlice();
    268318            pcPic->setCurrSliceIdx                  ( uiStartCUAddrSliceIdx-1 );
    269319            m_pcSliceEncoder->setSliceIdx           ( uiStartCUAddrSliceIdx-1 );
     
    286336          uiStartCUAddrSlice                                                            = pcSlice->getSliceCurEndCUAddr();
    287337          uiStartCUAddrEntropySlice                                                     = pcSlice->getEntropySliceCurEndCUAddr();
    288         }       
     338        }
    289339
    290340        uiNextCUAddr = (uiStartCUAddrSlice > uiStartCUAddrEntropySlice) ? uiStartCUAddrSlice : uiStartCUAddrEntropySlice;
     
    292342      m_uiStoredStartCUAddrForEncodingSlice[uiStartCUAddrSliceIdx++]                = pcSlice->getSliceCurEndCUAddr();
    293343      m_uiStoredStartCUAddrForEncodingEntropySlice[uiStartCUAddrEntropySliceIdx++]  = pcSlice->getSliceCurEndCUAddr();
    294      
     344
    295345      pcSlice = pcPic->getSlice(0);
    296346#if MTK_SAO  // PRE_DF
     
    298348#endif
    299349
     350#if HHI_INTER_VIEW_RESIDUAL_PRED
    300351      // set residual picture
    301352      m_pcResidualGenerator->setRecResidualPic( pcPic );
    302 
     353#endif
     354#if DEPTH_MAP_GENERATION
    303355      // update virtual depth map
    304356      m_pcDepthMapGenerator->updateDepthMap( pcPic );
     357#endif
    305358
    306359      //-- Loop filter
     
    329382            for(UInt i=0; i< uiNumSlices ; i++)
    330383            {
    331               (*m_pcAdaptiveLoopFilter)[i].create(pcPic, i, 
    332                                                   m_uiStoredStartCUAddrForEncodingSlice[i], 
     384              (*m_pcAdaptiveLoopFilter)[i].create(pcPic, i,
     385                                                  m_uiStoredStartCUAddrForEncodingSlice[i],
    333386                                                  m_uiStoredStartCUAddrForEncodingSlice[i+1]-1
    334387                                                  );
     
    359412        // generate start code
    360413        bs_SPS_PPS_SEI.write( 1, 32);
    361        
     414
    362415        m_pcEntropyCoder->encodePPS( pcSlice->getPPS() );
    363416        bs_SPS_PPS_SEI.write( 1, 1 );
     
    367420        rbSeqFirst = false;
    368421      }
    369      
     422
    370423      /* use the main bitstream buffer for storing the marshalled picture */
    371424      m_pcEntropyCoder->setBitstream(pcBitstreamOut);
    372425
    373426      uiStartCUAddrSliceIdx = 0;
    374       uiStartCUAddrSlice    = 0; 
     427      uiStartCUAddrSlice    = 0;
    375428      pcBitstreamOut->allocateMemoryForSliceLocations( pcPic->getPicSym()->getNumberOfCUsInFrame() ); // Assuming number of slices <= number of LCU. Needs to be changed for sub-LCU slice coding.
    376429      pcBitstreamOut->setSliceCount( 0 );                                      // intialize number of slices to zero, used while converting RBSP to NALU
    377430
    378431      uiStartCUAddrEntropySliceIdx = 0;
    379       uiStartCUAddrEntropySlice    = 0; 
     432      uiStartCUAddrEntropySlice    = 0;
    380433      uiNextCUAddr                 = 0;
    381434      pcSlice = pcPic->getSlice(uiStartCUAddrSliceIdx);
     
    401454          uiStartCUAddrSliceIdx++;
    402455          uiStartCUAddrEntropySliceIdx++;
    403         } 
     456        }
    404457        else if (uiNextCUAddr == m_uiStoredStartCUAddrForEncodingEntropySlice[uiStartCUAddrEntropySliceIdx])
    405458        {
     
    422475
    423476      // write SliceHeader
    424 #if SB_DEBUG
    425       g_bEncoding = true ;
    426 #endif
    427477      m_pcEntropyCoder->encodeSliceHeader ( pcSlice                 );
    428 #if SB_DEBUG
    429       g_bEncoding = false ;
    430 #endif
    431      
     478
    432479      // is it needed?
    433480      if ( pcSlice->getSymbolMode() )
     
    437484        m_pcEntropyCoder->resetEntropy    ();
    438485      }
    439      
     486
    440487        if (uiNextCUAddr==0)  // Compute ALF params and write only for first slice header
    441488        {
     
    452499#endif
    453500            m_pcAdaptiveLoopFilter->allocALFParam(&cAlfParam);
    454            
     501
    455502            // set entropy coder for RD
    456503            if ( pcSlice->getSymbolMode() )
     
    464511            m_pcEntropyCoder->resetEntropy    ();
    465512            m_pcEntropyCoder->setBitstream    ( m_pcBitCounter );
    466            
     513
    467514            m_pcAdaptiveLoopFilter->startALFEnc(pcPic, m_pcEntropyCoder );
    468515#if MTK_SAO  // PostDF
     
    478525#endif
    479526            UInt uiMaxAlfCtrlDepth;
    480            
     527
    481528            UInt64 uiDist, uiBits;
    482529#if MTK_SAO
     
    489536#endif
    490537            m_pcAdaptiveLoopFilter->endALFEnc();
    491            
     538
    492539            // set entropy coder for writing
    493540            m_pcSbacCoder->init( (TEncBinIf*)m_pcBinCABAC );
    494 #if SB_DEBUG
    495             g_bEncoding = true;
    496 #endif           
    497541            if ( pcSlice->getSymbolMode() )
    498542            {
     
    527571#endif
    528572            m_pcEntropyCoder->encodeAlfParam(&cAlfParam);
    529            
     573
    530574#if TSB_ALF_HEADER
    531575            if(cAlfParam.cu_control_flag)
     
    534578            }
    535579#endif
    536             g_bEncoding = false;
    537580            m_pcAdaptiveLoopFilter->freeALFParam(&cAlfParam);
    538581          }
    539582        }
    540        
     583
    541584        // File writing
    542 #if SB_DEBUG
    543         g_bEncoding = true ;
    544 #endif
    545585        m_pcSliceEncoder->encodeSlice( pcPic, pcBitstreamOut );
    546 #if SB_DEBUG
    547         g_bEncoding = false ;
    548 #endif
    549        
     586
    550587        //  End of bitstream & byte align
    551588        pcBitstreamOut->write( 1, 1 );
    552589        pcBitstreamOut->writeAlignZero();
    553        
     590
    554591        UInt uiBoundingAddrSlice, uiBoundingAddrEntropySlice;
    555         uiBoundingAddrSlice        = m_uiStoredStartCUAddrForEncodingSlice[uiStartCUAddrSliceIdx];         
    556         uiBoundingAddrEntropySlice = m_uiStoredStartCUAddrForEncodingEntropySlice[uiStartCUAddrEntropySliceIdx];         
     592        uiBoundingAddrSlice        = m_uiStoredStartCUAddrForEncodingSlice[uiStartCUAddrSliceIdx];
     593        uiBoundingAddrEntropySlice = m_uiStoredStartCUAddrForEncodingEntropySlice[uiStartCUAddrEntropySliceIdx];
    557594        uiNextCUAddr               = min(uiBoundingAddrSlice, uiBoundingAddrEntropySlice);
    558595        if (uiNextCUAddr < pcPic->getPicSym()->getNumberOfCUsInFrame())   // if more slices to be encoded insert start code
     
    564601        }
    565602      } // end iteration over slices
    566      
    567      
     603
     604
    568605#if MTK_NONCROSS_INLOOP_FILTER
    569606      if(pcSlice->getSPS()->getUseALF())
     
    572609          m_pcAdaptiveLoopFilter->destroySlice();
    573610      }
    574 #endif 
    575      
    576      
     611#endif
     612
     613
    577614      pcBitstreamOut->flushBuffer();
    578615      pcBitstreamOut->convertRBSPToPayload(0);
    579      
     616
    580617/*#if AMVP_BUFFERCOMPRESS
    581618      pcPic->compressMotion(); // moved to end of access unit
    582619#endif */
    583620      pcBitstreamOut->freeMemoryAllocatedForSliceLocations();
    584      
     621
    585622      //-- For time output for each slice
    586623      Double dEncTime = (double)(clock()-iBeforeTime) / CLOCKS_PER_SEC;
    587      
     624
    588625      xCalculateAddPSNR( pcPic, pcPic->getPicYuvRec(), pcBitstreamOut->getNumberOfWrittenBits(), dEncTime );
    589 
    590 #if GERHARD_RM_DEBUG_MM
    591       if (m_pcRdCost->getUseRenModel() )
    592       {     
    593         TRenModel*  pcMMCheckModel = m_pcEncTop->getEncTop()->getMMCheckModel();
    594         TRenModel*  pcRenModel     = m_pcEncTop->getEncTop()->getRenModel    ();
    595         TComPicYuv* pcPicYuvRec    = pcPic->getPicYuvRec();         
    596         pcMMCheckModel->setData(0,0, pcPicYuvRec->getWidth(), pcPicYuvRec->getHeight(), pcPicYuvRec->getStride(), pcPicYuvRec->getLumaAddr());
    597         Bool bEqual = pcRenModel->compare( pcMMCheckModel );
    598 
    599         if ( !bEqual )
    600         {
    601           std::cout << "Mismatch in Renderer Model !" << std::endl;
    602         }     
    603       }
    604 #endif
    605626
    606627#if FIXED_ROUNDING_FRAME_MEMORY
     
    643664      pcBitstreamOut->insertAt(bs_SPS_PPS_SEI, 0);
    644665
    645 #if SB_MEM_FIX
    646666      bs_SPS_PPS_SEI.destroy();
    647 #endif
    648667      pcPic->getPicYuvRec()->copyToPic(pcPicYuvRecOut);
    649      
     668
    650669      pcPic->setReconMark   ( true );
    651      
     670
    652671}
    653672
     
    656675  TComSlice* pcSlice = pcPic->getSlice(pcPic->getCurrSliceIdx());
    657676  Bool bCalcDist = false;
    658  
     677
    659678  m_pcLoopFilter->setCfg(pcSlice->getLoopFilterDisable(), m_pcCfg->getLoopFilterAlphaC0Offget(), m_pcCfg->getLoopFilterBetaOffget());
    660679  m_pcLoopFilter->loopFilterPic( pcPic );
    661  
     680
    662681  m_pcEntropyCoder->setEntropyCoder ( m_pcEncTop->getRDGoOnSbacCoder(), pcSlice );
    663682  m_pcEntropyCoder->resetEntropy    ();
    664683  m_pcEntropyCoder->setBitstream    ( m_pcBitCounter );
    665  
     684
    666685  // Adaptive Loop filter
    667686  if( pcSlice->getSPS()->getUseALF() )
     
    672691#endif
    673692    m_pcAdaptiveLoopFilter->allocALFParam(&cAlfParam);
    674    
     693
    675694    m_pcAdaptiveLoopFilter->startALFEnc(pcPic, m_pcEntropyCoder);
    676    
     695
    677696    UInt uiMaxAlfCtrlDepth;
    678697    m_pcAdaptiveLoopFilter->ALFProcess(&cAlfParam, pcSlice->getLambda(), ruiDist, ruiBits, uiMaxAlfCtrlDepth );
     
    680699    m_pcAdaptiveLoopFilter->freeALFParam(&cAlfParam);
    681700  }
    682  
     701
    683702  m_pcEntropyCoder->resetEntropy    ();
    684703  ruiBits += m_pcEntropyCoder->getNumberOfWrittenBits();
    685  
     704
    686705  if (!bCalcDist)
    687706    ruiDist = xFindDistortionFrame(pcPic->getPicYuvOrg(), pcPic->getPicYuvRec());
     
    704723#endif
    705724  Int   iTemp;
    706  
     725
    707726  Int   iStride = pcPic0->getStride();
    708727  Int   iWidth  = pcPic0->getWidth();
    709728  Int   iHeight = pcPic0->getHeight();
    710  
     729
    711730  UInt64  uiTotalDiff = 0;
    712  
     731
    713732  for( y = 0; y < iHeight; y++ )
    714733  {
     
    724743    pSrc1 += iStride;
    725744  }
    726  
     745
    727746  iHeight >>= 1;
    728747  iWidth  >>= 1;
    729748  iStride >>= 1;
    730  
     749
    731750  pSrc0  = pcPic0->getCbAddr();
    732751  pSrc1  = pcPic1->getCbAddr();
    733  
     752
    734753  for( y = 0; y < iHeight; y++ )
    735754  {
     
    745764    pSrc1 += iStride;
    746765  }
    747  
     766
    748767  pSrc0  = pcPic0->getCrAddr();
    749768  pSrc1  = pcPic1->getCrAddr();
    750  
     769
    751770  for( y = 0; y < iHeight; y++ )
    752771  {
     
    762781    pSrc1 += iStride;
    763782  }
    764  
     783
    765784  return uiTotalDiff;
    766785}
     
    772791  UInt64 uiSSDU  = 0;
    773792  UInt64 uiSSDV  = 0;
    774  
     793
    775794  Double  dYPSNR  = 0.0;
    776795  Double  dUPSNR  = 0.0;
    777796  Double  dVPSNR  = 0.0;
    778  
     797
    779798  //===== calculate PSNR =====
    780799  Pel*  pOrg    = pcPic ->getPicYuvOrg()->getLumaAddr();
    781800  Pel*  pRec    = pcPicD->getLumaAddr();
    782801  Int   iStride = pcPicD->getStride();
    783  
     802
    784803  Int   iWidth;
    785804  Int   iHeight;
    786  
     805
    787806  iWidth  = pcPicD->getWidth () - m_pcEncTop->getPad(0);
    788807  iHeight = pcPicD->getHeight() - m_pcEncTop->getPad(1);
    789  
     808
    790809  Int   iSize   = iWidth*iHeight;
    791  
     810
    792811  UInt   maxval = 255 * (1<<(g_uiBitDepth + g_uiBitIncrement -8));
    793812  Double fRefValueY = (double) maxval * maxval * iSize;
     
    804823    pRec += iStride;
    805824  }
    806  
    807 
     825
     826#if HHI_VSO
    808827  if ( m_pcRdCost->getUseRenModel() )
    809828  {
    810     TRenModel*  pcRenModel = m_pcEncTop->getEncTop()->getRenModel();       
    811     Int64 iDistVSOY, iDistVSOU, iDistVSOV; 
    812     pcRenModel->getTotalSSE( iDistVSOY, iDistVSOU, iDistVSOV ); 
     829    TRenModel*  pcRenModel = m_pcEncTop->getEncTop()->getRenModel();
     830    Int64 iDistVSOY, iDistVSOU, iDistVSOV;
     831    pcRenModel->getTotalSSE( iDistVSOY, iDistVSOU, iDistVSOV );
    813832    dYPSNR = ( iDistVSOY ? 10.0 * log10( fRefValueY / (Double) iDistVSOY ) : 99.99 );
    814833    dUPSNR = ( iDistVSOU ? 10.0 * log10( fRefValueC / (Double) iDistVSOU ) : 99.99 );
     
    816835  }
    817836  else
    818   {   
     837#endif
     838  {
    819839  iHeight >>= 1;
    820840  iWidth  >>= 1;
     
    822842  pOrg  = pcPic ->getPicYuvOrg()->getCbAddr();
    823843  pRec  = pcPicD->getCbAddr();
    824  
     844
    825845  for( y = 0; y < iHeight; y++ )
    826846  {
     
    833853    pRec += iStride;
    834854  }
    835  
     855
    836856  pOrg  = pcPic ->getPicYuvOrg()->getCrAddr();
    837857  pRec  = pcPicD->getCrAddr();
    838  
     858
    839859  for( y = 0; y < iHeight; y++ )
    840860  {
     
    851871  dVPSNR            = ( uiSSDV ? 10.0 * log10( fRefValueC / (Double)uiSSDV ) : 99.99 );
    852872  }
    853  
    854873  // fix: total bits should consider slice size bits (32bit)
    855874  uibits += 32;
    856  
     875
    857876#if RVM_VCEGAM10
    858877  m_vRVM_RP.push_back( uibits );
     
    906925  printf( "[Y %6.4lf dB    U %6.4lf dB    V %6.4lf dB]  ", dYPSNR, dUPSNR, dVPSNR );
    907926  printf ("[ET %5.0f ] ", dEncTime );
    908  
     927
    909928  for (Int iRefList = 0; iRefList < 2; iRefList++)
    910929  {
     
    972991{
    973992  Double dRVM = 0;
    974  
     993
    975994  //if( m_pcCfg->getGOPSize() == 1 && m_pcCfg->getIntraPeriod() != 1 && m_pcCfg->getFrameToBeEncoded() > RVM_VCEGAM10_M * 2 )
    976995  {
     
    980999    vRL.resize( N );
    9811000    vB.resize( N );
    982    
     1001
    9831002    Int i;
    9841003    Double dRavg = 0 , dBavg = 0;
     
    9941013      dBavg += vB[i];
    9951014    }
    996    
     1015
    9971016    dRavg /= ( N - 2 * RVM_VCEGAM10_M );
    9981017    dBavg /= ( N - 2 * RVM_VCEGAM10_M );
    999    
     1018
    10001019    double dSigamB = 0;
    10011020    for( i = RVM_VCEGAM10_M + 1 ; i < N - RVM_VCEGAM10_M + 1 ; i++ )
     
    10051024    }
    10061025    dSigamB = sqrt( dSigamB / ( N - 2 * RVM_VCEGAM10_M ) );
    1007    
     1026
    10081027    double f = sqrt( 12.0 * ( RVM_VCEGAM10_M - 1 ) / ( RVM_VCEGAM10_M + 1 ) );
    1009    
     1028
    10101029    dRVM = dSigamB / dRavg * f;
    10111030  }
    1012  
     1031
    10131032  return( dRVM );
    10141033}
  • trunk/source/Lib/TLibEncoder/TEncGOP.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    5790  TEncBinCABAC*           m_pcBinCABAC;
    5891  TComLoopFilter*         m_pcLoopFilter;
     92#if DEPTH_MAP_GENERATION
    5993  TComDepthMapGenerator*  m_pcDepthMapGenerator;
     94#endif
     95#if HHI_INTER_VIEW_RESIDUAL_PRED
    6096  TComResidualGenerator*  m_pcResidualGenerator;
     97#endif
    6198 
    6299  // Adaptive Loop filter
  • trunk/source/Lib/TLibEncoder/TEncSbac.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    2659, m_uiMaxAlfCtrlDepth         ( 0 )
    2760, m_cCUSplitFlagSCModel       ( 1,             1,               NUM_SPLIT_FLAG_CTX            )
    28 #if MW_MVI_SIGNALLING_MODE == 0
    29 , m_cCUMvInheritanceFlagSCModel(1,             1,               NUM_MVI_FLAG_CTX              )
    30 #endif
    3161, m_cCUSkipFlagSCModel        ( 1,             1,               NUM_SKIP_FLAG_CTX             )
    3262, m_cCUMergeFlagExtSCModel    ( 1,             1,               NUM_MERGE_FLAG_EXT_CTX        )
     
    72102#endif
    73103, m_cViewIdxSCModel           ( 1,             1,               NUM_VIEW_IDX_CTX              )
    74 #if HHI_DMM_INTRA
     104#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    75105, m_cIntraDMMSCModel          ( 1,             1,               NUM_DMM_CTX                   )
    76106, m_cIntraWedgeSCModel        ( 1,             1,               NUM_WEDGE_CTX                 )
     
    94124 
    95125  m_cCUSplitFlagSCModel.initBuffer       ( eSliceType, iQp, (Short*)INIT_SPLIT_FLAG );
    96 #if MW_MVI_SIGNALLING_MODE == 0
    97   m_cCUMvInheritanceFlagSCModel.initBuffer( eSliceType, iQp, (Short*)INIT_MVI_FLAG );
    98 #endif
    99126 
    100127  m_cCUSkipFlagSCModel.initBuffer        ( eSliceType, iQp, (Short*)INIT_SKIP_FLAG );
     
    137164#endif
    138165  m_cViewIdxSCModel.initBuffer           ( eSliceType, iQp, (Short*)INIT_VIEW_IDX );
    139 #if HHI_DMM_INTRA
     166#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    140167  m_cIntraDMMSCModel.initBuffer          ( eSliceType, iQp, (Short*)INIT_INTRA_DMM );
    141168  m_cIntraWedgeSCModel.initBuffer        ( eSliceType, iQp, (Short*)INIT_INTRA_WEDGELET );
     
    307334  return;
    308335}
    309 #if HHI_DMM_INTRA
     336#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    310337Void TEncSbac::xWriteExGolombLevel( UInt uiSymbol, ContextModel& rcSCModel  )
    311338{
     
    388415 
    389416  this->m_cCUSplitFlagSCModel      .copyFrom( &pSrc->m_cCUSplitFlagSCModel       );
    390 #if MW_MVI_SIGNALLING_MODE == 0
    391   this->m_cCUMvInheritanceFlagSCModel.copyFrom( &pSrc->m_cCUMvInheritanceFlagSCModel );
    392 #endif
    393417  this->m_cCUSkipFlagSCModel       .copyFrom( &pSrc->m_cCUSkipFlagSCModel        );
    394418  this->m_cCUMergeFlagExtSCModel  .copyFrom( &pSrc->m_cCUMergeFlagExtSCModel);
     
    421445  this->m_cMVPIdxSCModel           .copyFrom( &pSrc->m_cMVPIdxSCModel            );
    422446  this->m_cViewIdxSCModel          .copyFrom( &pSrc->m_cViewIdxSCModel           );
    423 #if HHI_DMM_INTRA
     447#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    424448  this->m_cIntraDMMSCModel         .copyFrom( &pSrc->m_cIntraDMMSCModel          );
    425449  this->m_cIntraWedgeSCModel       .copyFrom( &pSrc->m_cIntraWedgeSCModel        );
     
    636660
    637661
     662#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
    638663Void TEncSbac::codeMergeIndexMV( TComDataCU* pcCU, UInt uiAbsPartIdx )
    639664{
     
    641666  Bool  abAvailable[ MRG_MAX_NUM_CANDS ];
    642667  UInt  uiNumCand = 0;
    643 #if MW_MVI_SIGNALLING_MODE == 1
     668#if HHI_MPI
    644669  const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE;
    645   const UInt uiMviMergePos = bMVIAvailable ? MVI_MERGE_POS : MRG_MAX_NUM_CANDS;
     670  const UInt uiMviMergePos = bMVIAvailable ? HHI_MPI_MERGE_POS : MRG_MAX_NUM_CANDS;
    646671#endif
    647672  for( UInt uiIdx = 0; uiIdx < MRG_MAX_NUM_CANDS; uiIdx++ )
    648673  {
    649 #if MW_MVI_SIGNALLING_MODE == 1
     674#if HHI_MPI
    650675    if( uiIdx == uiMviMergePos )
    651676    {
     
    693718  //--- determine unary index ---
    694719  UInt  uiMergeIdx  = pcCU->getMergeIndex( uiAbsPartIdx );
    695 #if MW_MVI_SIGNALLING_MODE == 1
     720#if HHI_MPI
    696721  if( bMVIAvailable )
    697722  {
     
    699724    if( bUseMVI )
    700725    {
    701       uiMergeIdx = MVI_MERGE_POS;
    702     }
    703     else if( uiMergeIdx >= MVI_MERGE_POS )
     726      uiMergeIdx = HHI_MPI_MERGE_POS;
     727    }
     728    else if( uiMergeIdx >= HHI_MPI_MERGE_POS )
    704729    {
    705730      uiMergeIdx++;
     
    748773  DTRACE_CABAC_T( "\n" );
    749774}
    750 
     775#endif
    751776
    752777
     
    758783Void TEncSbac::codeMergeIndex( TComDataCU* pcCU, UInt uiAbsPartIdx )
    759784{
    760 #if MW_MVI_SIGNALLING_MODE == 1
     785#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
     786#if HHI_INTER_VIEW_MOTION_PRED && HHI_MPI
    761787  if( ( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ) ||
    762788      ( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) )
     789#elif HHI_MPI
     790  if( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N )
    763791#else
    764792  if( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE )
     
    768796    return;
    769797  }
     798#endif
    770799
    771800  Bool bLeftInvolved = false;
     
    884913
    885914
     915#if HHI_INTER_VIEW_RESIDUAL_PRED
    886916Void
    887917TEncSbac::codeResPredFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
     
    891921  m_pcBinIf->encodeBin( uiSymbol, m_cResPredFlagSCModel.get( 0, 0, uiCtx ) );
    892922}
     923#endif
    893924
    894925
     
    907938  return;
    908939}
    909 
    910 #if MW_MVI_SIGNALLING_MODE == 0
    911 Void TEncSbac::codeMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    912 {
    913   const Int iTextureModeDepth = pcCU->getTextureModeDepth( uiAbsPartIdx );
    914   if( iTextureModeDepth != -1 && uiDepth > iTextureModeDepth )
    915     return;
    916 
    917   UInt uiCtx    = pcCU->getCtxMvInheritanceFlag( uiAbsPartIdx, uiDepth );
    918   UInt uiSymbol = iTextureModeDepth == uiDepth ? 1 : 0;
    919 
    920   assert( uiCtx < 3 );
    921   m_pcBinIf->encodeBin( uiSymbol, m_cCUMvInheritanceFlagSCModel.get( 0, 0, uiCtx ) );
    922 }
    923 #endif
    924940
    925941Void TEncSbac::codeTransformSubdivFlag( UInt uiSymbol, UInt uiCtx )
     
    935951}
    936952
    937 #if HHI_DMM_INTRA
     953#if HHI_DMM_WEDGE_INTRA
    938954Void TEncSbac::xCodeWedgeFullInfo( TComDataCU* pcCU, UInt uiAbsPartIdx )
    939955{
     
    10311047  }
    10321048}
    1033 
     1049#endif
     1050#if HHI_DMM_PRED_TEX
    10341051Void TEncSbac::xCodeWedgePredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx )
    10351052{
     
    10761093  UInt uiDir = pcCU->getLumaIntraDir( uiAbsPartIdx );
    10771094
    1078 #if HHI_DMM_INTRA
    1079   if ( pcCU->getSlice()->getSPS()->isDepth() && pcCU->getSlice()->getSPS()->getUseDepthModelModes() && pcCU->getWidth( uiAbsPartIdx ) < 64 )
     1095#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     1096  if ( pcCU->getSlice()->getSPS()->isDepth() && pcCU->getSlice()->getSPS()->getUseDMM() && pcCU->getWidth( uiAbsPartIdx ) < 64 )
    10801097  {
    10811098    m_pcBinIf->encodeBin( uiDir > MAX_MODE_ID_INTRA_DIR, m_cIntraDMMSCModel.get(0, 0, 0) );
     
    10861103    UInt uiDMMode = uiDir - (MAX_MODE_ID_INTRA_DIR+1);
    10871104
    1088     if( !pcCU->getTextureModeAllowance( uiAbsPartIdx ) )
    1089     {
     1105#if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
     1106    m_pcBinIf->encodeBin( (uiDMMode & 0x01),      m_cIntraDMMSCModel.get(0, 0, 1) );
     1107    m_pcBinIf->encodeBin( (uiDMMode & 0x02) >> 1, m_cIntraDMMSCModel.get(0, 0, 1) );
     1108
    10901109      if ( pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN && pcCU->getWidth( uiAbsPartIdx ) > 4 )
    10911110      {
    1092         if( uiDMMode > 1 )
    1093         {
    1094           uiDMMode -= 4;
     1111      m_pcBinIf->encodeBin( (uiDMMode & 0x04) >> 2, m_cIntraDMMSCModel.get(0, 0, 1) );
    10951112        }
     1113#else
    10961114                                  m_pcBinIf->encodeBin( (uiDMMode & 0x01),      m_cIntraDMMSCModel.get(0, 0, 1) );
    1097     if( DMM_INTRA_MODE_BITS > 1 ) m_pcBinIf->encodeBin( (uiDMMode & 0x02) >> 1, m_cIntraDMMSCModel.get(0, 0, 1) );
    1098       }
    1099       else
    1100     {
    1101         m_pcBinIf->encodeBin( (uiDMMode & 0x01),      m_cIntraDMMSCModel.get(0, 0, 1) );
    1102     }
    1103     }
    1104     else
    1105     {
    1106                                   m_pcBinIf->encodeBin( (uiDMMode & 0x01),      m_cIntraDMMSCModel.get(0, 0, 1) );
    1107     if( DMM_INTRA_MODE_BITS > 1 ) m_pcBinIf->encodeBin( (uiDMMode & 0x02) >> 1, m_cIntraDMMSCModel.get(0, 0, 1) );
    11081115
    11091116    if ( pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN && pcCU->getWidth( uiAbsPartIdx ) > 4 )
    11101117    {
    1111       if( DMM_INTRA_MODE_BITS > 2 ) m_pcBinIf->encodeBin( (uiDMMode & 0x04) >> 2, m_cIntraDMMSCModel.get(0, 0, 1) );
    1112     }
    1113   }
    1114 
     1118      m_pcBinIf->encodeBin( (uiDMMode & 0x02) >> 1, m_cIntraDMMSCModel.get(0, 0, 1) );
     1119    }
     1120#endif
     1121#if HHI_DMM_WEDGE_INTRA
    11151122    if( uiDir == DMM_WEDGE_FULL_IDX )          { xCodeWedgeFullInfo          ( pcCU, uiAbsPartIdx ); }
    11161123    if( uiDir == DMM_WEDGE_FULL_D_IDX )        { xCodeWedgeFullDeltaInfo     ( pcCU, uiAbsPartIdx ); }
    11171124    if( uiDir == DMM_WEDGE_PREDDIR_IDX )       { xCodeWedgePredDirInfo       ( pcCU, uiAbsPartIdx ); }
    11181125    if( uiDir == DMM_WEDGE_PREDDIR_D_IDX )     { xCodeWedgePredDirDeltaInfo  ( pcCU, uiAbsPartIdx ); }
     1126#endif
     1127#if HHI_DMM_PRED_TEX
    11191128    if( uiDir == DMM_WEDGE_PREDTEX_D_IDX )     { xCodeWedgePredTexDeltaInfo  ( pcCU, uiAbsPartIdx ); }
    11201129    if( uiDir == DMM_CONTOUR_PREDTEX_D_IDX )   { xCodeContourPredTexDeltaInfo( pcCU, uiAbsPartIdx ); }
     1130#endif
    11211131  }
    11221132  else
     
    12041214{
    12051215  UInt uiDir = pcCU->getLumaIntraDir( uiAbsPartIdx );
    1206 #if HHI_DMM_INTRA
    1207   if ( pcCU->getSlice()->getSPS()->isDepth() && pcCU->getSlice()->getSPS()->getUseDepthModelModes() && pcCU->getWidth( uiAbsPartIdx ) < 64 )
     1216#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     1217  if ( pcCU->getSlice()->getSPS()->isDepth() && pcCU->getSlice()->getSPS()->getUseDMM() && pcCU->getWidth( uiAbsPartIdx ) < 64 )
    12081218  {
    12091219    m_pcBinIf->encodeBin( uiDir > MAX_MODE_ID_INTRA_DIR, m_cIntraDMMSCModel.get(0, 0, 0) );
     
    12141224    UInt uiDMMode = uiDir - (MAX_MODE_ID_INTRA_DIR+1);
    12151225
    1216     if( !pcCU->getTextureModeAllowance( uiAbsPartIdx ) )
    1217     {
     1226#if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
     1227    m_pcBinIf->encodeBin( (uiDMMode & 0x01),      m_cIntraDMMSCModel.get(0, 0, 1) );
     1228    m_pcBinIf->encodeBin( (uiDMMode & 0x02) >> 1, m_cIntraDMMSCModel.get(0, 0, 1) );
     1229
    12181230      if ( pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN && pcCU->getWidth( uiAbsPartIdx ) > 4 )
    12191231      {
    1220         if( uiDMMode > 1 )
    1221         {
    1222           uiDMMode -= 4;
     1232      m_pcBinIf->encodeBin( (uiDMMode & 0x04) >> 2, m_cIntraDMMSCModel.get(0, 0, 1) );
    12231233        }
     1234#else
    12241235        m_pcBinIf->encodeBin( (uiDMMode & 0x01),      m_cIntraDMMSCModel.get(0, 0, 1) );
    1225         if( DMM_INTRA_MODE_BITS > 1 ) m_pcBinIf->encodeBin( (uiDMMode & 0x02) >> 1, m_cIntraDMMSCModel.get(0, 0, 1) );
    1226       }
    1227       else
    1228       {
    1229         m_pcBinIf->encodeBin( (uiDMMode & 0x01),      m_cIntraDMMSCModel.get(0, 0, 1) );
    1230       }
    1231     }
    1232     else
    1233     {
    1234       m_pcBinIf->encodeBin( (uiDMMode & 0x01),      m_cIntraDMMSCModel.get(0, 0, 1) );
    1235       if( DMM_INTRA_MODE_BITS > 1 ) m_pcBinIf->encodeBin( (uiDMMode & 0x02) >> 1, m_cIntraDMMSCModel.get(0, 0, 1) );
    12361236
    12371237      if ( pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN && pcCU->getWidth( uiAbsPartIdx ) > 4 )
    12381238      {
    1239         if( DMM_INTRA_MODE_BITS > 2 ) m_pcBinIf->encodeBin( (uiDMMode & 0x04) >> 2, m_cIntraDMMSCModel.get(0, 0, 1) );
    1240       }
    1241     }
    1242 
     1239      m_pcBinIf->encodeBin( (uiDMMode & 0x02) >> 1, m_cIntraDMMSCModel.get(0, 0, 1) );
     1240      }
     1241#endif
     1242#if HHI_DMM_WEDGE_INTRA
    12431243    if( uiDir == DMM_WEDGE_FULL_IDX )          { xCodeWedgeFullInfo          ( pcCU, uiAbsPartIdx ); }
    12441244    if( uiDir == DMM_WEDGE_FULL_D_IDX )        { xCodeWedgeFullDeltaInfo     ( pcCU, uiAbsPartIdx ); }
    12451245    if( uiDir == DMM_WEDGE_PREDDIR_IDX )       { xCodeWedgePredDirInfo       ( pcCU, uiAbsPartIdx ); }
    12461246    if( uiDir == DMM_WEDGE_PREDDIR_D_IDX )     { xCodeWedgePredDirDeltaInfo  ( pcCU, uiAbsPartIdx ); }
     1247#endif
     1248#if HHI_DMM_PRED_TEX
    12471249    if( uiDir == DMM_WEDGE_PREDTEX_D_IDX )     { xCodeWedgePredTexDeltaInfo  ( pcCU, uiAbsPartIdx ); }
    12481250    if( uiDir == DMM_CONTOUR_PREDTEX_D_IDX )   { xCodeContourPredTexDeltaInfo( pcCU, uiAbsPartIdx ); }
     1251#endif
    12491252  }
    12501253  else
  • trunk/source/Lib/TLibEncoder/TEncSbac.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    85118#if E253
    86119  Void  xWriteGoRiceExGolomb ( UInt uiSymbol, UInt &ruiGoRiceParam );
    87 #if HHI_DMM_INTRA
     120#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    88121  Void  xWriteExGolombLevel  ( UInt uiSymbol, ContextModel& rcSCModel  );
    89122#endif
     
    103136  Void  xCopyFrom            ( TEncSbac* pSrc );
    104137 
    105 #if HHI_DMM_INTRA
     138#if HHI_DMM_WEDGE_INTRA
    106139  Void  xCodeWedgeFullInfo   ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    107140  Void  xCodeWedgeFullDeltaInfo     ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     141
    108142  Void  xCodeWedgePredDirInfo       ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    109143  Void  xCodeWedgePredDirDeltaInfo  ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     144#endif
     145#if HHI_DMM_PRED_TEX
    110146  Void  xCodeWedgePredTexDeltaInfo  ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    111147  Void  xCodeContourPredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx );
     
    130166  Void codeMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    131167  Void codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     168#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
    132169  Void codeMergeIndexMV  ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     170#endif
     171#if HHI_INTER_VIEW_RESIDUAL_PRED
    133172  Void codeResPredFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     173#endif
    134174  Void codeSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    135 #if MW_MVI_SIGNALLING_MODE == 0
    136   Void codeMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    137 #endif
    138175  Void codeMVPIdx        ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefList );
    139176 
     
    182219  UInt                 m_uiLastQp;
    183220  ContextModel3DBuffer m_cCUSplitFlagSCModel;
    184 #if MW_MVI_SIGNALLING_MODE == 0
    185   ContextModel3DBuffer m_cCUMvInheritanceFlagSCModel;
    186 #endif
    187221  ContextModel3DBuffer m_cCUSkipFlagSCModel;
    188222  ContextModel3DBuffer m_cCUMergeFlagExtSCModel;
     
    227261#endif
    228262  ContextModel3DBuffer m_cViewIdxSCModel;
    229 #if HHI_DMM_INTRA
     263#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    230264  ContextModel3DBuffer m_cIntraDMMSCModel;
    231265  ContextModel3DBuffer m_cIntraWedgeSCModel;
  • trunk/source/Lib/TLibEncoder/TEncSearch.cpp

    r2 r5  
     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-2011, 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 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
    134
    235/** \file     TEncSearch.cpp
     
    911944                            Bool         bLuma,
    912945                            Bool         bChroma,
    913                             Bool         bRealCoeff /* just for test */ )
     946                            Bool         bRealCoeff /* just for test */
     947                            )
    914948{
    915949  m_pcEntropyCoder->resetBits();
    916950  xEncIntraHeader ( pcCU, uiTrDepth, uiAbsPartIdx, bLuma, bChroma );
    917951  xEncSubdivCbfQT ( pcCU, uiTrDepth, uiAbsPartIdx, bLuma, bChroma );
    918 
     952 
    919953  if( bLuma )
    920954  {
     
    940974                                TComYuv*    pcResiYuv,
    941975                                Dist&       ruiDist
    942 #if DMM_RES_CHECK_INTRA
    943                                 ,
    944                                 Bool        bCheckNoRes
    945 #endif
    946976                                )
    947977{
     
    9731003  pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, uiTrDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
    9741004
    975 #if HHI_DMM_INTRA
     1005#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    9761006  if( uiLumaPredMode > MAX_MODE_ID_INTRA_DIR )
    9771007  {
     
    9841014    predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, pcCU, bAboveAvail, bLeftAvail );
    9851015  }
    986 
    987 #if DMM_RES_CHECK_INTRA
    988   if ( bCheckNoRes )
    989   {
    990     //prediction signal is already filled in this case
    991     //===== update distortion =====
    992     //GT VSO
    993     if ( m_pcRdCost->getUseVSO() )
    994     {
    995       ruiDist += m_pcRdCost->getDistVS  ( pcCU, uiAbsPartIdx, piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 );
    996 
    997 #if GERHARD_VQM_XCHECK
    998       UInt uiDist1 = m_pcRdCost->getDistVS  ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 );
    999       UInt uiDist2 = m_pcRdCost->getDistPart( piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight );
    1000       assert(uiDist1 == uiDist2);
    1001 #endif
    1002     }
    1003     else
    1004     {
    1005       ruiDist += m_pcRdCost->getDistPart( piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight );
    1006     }
    1007     //GT VSO end
    1008 
    1009     pcCU->setCbfSubParts( 0, TEXT_LUMA, uiAbsPartIdx, uiFullDepth );
    1010     return;
    1011   }
    1012 #endif
    10131016
    10141017  //===== get residual signal =====
     
    10881091
    10891092  //===== update distortion =====
    1090   //GT VSO
     1093#if HHI_VSO
    10911094  if ( m_pcRdCost->getUseVSO() )
    10921095  {
    10931096    ruiDist += m_pcRdCost->getDistVS  ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 );
    1094 
    1095   #if GERHARD_VQM_XCHECK
    1096     UInt uiDist1 = m_pcRdCost->getDistVS  ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 );
    1097     UInt uiDist2 = m_pcRdCost->getDistPart( piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight );
    1098     assert(uiDist1 == uiDist2);
    1099   #endif
    11001097  }
    11011098  else
     1099#endif
    11021100  {
    11031101    ruiDist += m_pcRdCost->getDistPart( piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight );
    11041102  }
    1105   //GT VSO end
    11061103}
    1107 
    1108 #if DMM_RES_CHECK_INTRA
    1109 Void
    1110 TEncSearch::xSetIntraNoResi( TComDataCU* pcCU,
    1111                              UInt        uiTrDepth,
    1112                              UInt        uiAbsPartIdx,
    1113                              TComYuv*    pcPredYuv,
    1114                              TComYuv*    pcResiYuv,
    1115                              Bool        bNoRes
    1116                             )
    1117 {
    1118   UInt    uiFullDepth       = pcCU     ->getDepth   ( 0 )  + uiTrDepth;
    1119   UInt    uiWidth           = pcCU     ->getWidth   ( 0 ) >> uiTrDepth;
    1120   UInt    uiHeight          = pcCU     ->getHeight  ( 0 ) >> uiTrDepth;
    1121   UInt    uiStride          = pcPredYuv->getStride  ();
    1122   Pel*    piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    1123   Pel*    piResi            = pcResiYuv->getLumaAddr( uiAbsPartIdx );
    1124   Pel*    piReco            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
    1125 
    1126   UInt    uiLog2TrSize      = g_aucConvertToBit[ pcCU->getSlice()->getSPS()->getMaxCUWidth() >> uiFullDepth ] + 2;
    1127   UInt    uiQTLayer         = pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() - uiLog2TrSize;
    1128   UInt    uiNumCoeffPerInc  = pcCU->getSlice()->getSPS()->getMaxCUWidth() * pcCU->getSlice()->getSPS()->getMaxCUHeight() >> ( pcCU->getSlice()->getSPS()->getMaxCUDepth() << 1 );
    1129   TCoeff* pcCoeff           = m_ppcQTTempCoeffY[ uiQTLayer ] + uiNumCoeffPerInc * uiAbsPartIdx;
    1130   Pel*    piRecQt           = m_pcQTTempTComYuv[ uiQTLayer ].getLumaAddr( uiAbsPartIdx );
    1131   UInt    uiRecQtStride     = m_pcQTTempTComYuv[ uiQTLayer ].getStride  ();
    1132 
    1133   UInt    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    1134   Pel*    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
    1135   UInt    uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
    1136 
    1137   if ( bNoRes )
    1138   {
    1139     pcCU->setCbfSubParts( 0, TEXT_LUMA, uiAbsPartIdx, uiFullDepth );
    1140 
    1141     Pel* pResi = piResi;
    1142     memset( pcCoeff, 0, sizeof( TCoeff ) * uiWidth * uiHeight );
    1143     for( UInt uiY = 0; uiY < uiHeight; uiY++ )
    1144     {
    1145       memset( pResi, 0, sizeof( Pel ) * uiWidth );
    1146       pResi += uiStride;
    1147     }
    1148   }
    1149   else
    1150   {
    1151     pcCU->setCbfSubParts( 1 << uiTrDepth, TEXT_LUMA, uiAbsPartIdx, uiFullDepth );
    1152   }
    1153 
    1154   //===== reconstruction =====
    1155   {
    1156     Pel* pPred      = piPred;
    1157     Pel* pResi      = piResi;
    1158     Pel* pReco      = piReco;
    1159     Pel* pRecQt     = piRecQt;
    1160     Pel* pRecIPred  = piRecIPred;
    1161     for( UInt uiY = 0; uiY < uiHeight; uiY++ )
    1162     {
    1163       for( UInt uiX = 0; uiX < uiWidth; uiX++ )
    1164       {
    1165         pReco    [ uiX ] = Clip( pPred[ uiX ] + pResi[uiX] );
    1166         pRecQt   [ uiX ] = pReco[ uiX ];
    1167         pRecIPred[ uiX ] = pReco[ uiX ];
    1168       }
    1169       pPred     += uiStride;
    1170       pResi     += uiStride;
    1171       pReco     += uiStride;
    1172       pRecQt    += uiRecQtStride;
    1173       pRecIPred += uiRecIPredStride;
    1174     }
    1175   }
    1176 }
    1177 #endif
    11781104
    11791105Void
     
    13621288  }
    13631289#endif
    1364 #if HHI_DMM_INTRA
     1290#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    13651291  if( pcCU->getLumaIntraDir( uiAbsPartIdx ) > MAX_MODE_ID_INTRA_DIR )
    13661292  {
     
    13781304  {
    13791305    //----- store original entropy coding status -----
    1380 #if DMM_RES_CHECK_INTRA
    1381     if( m_bUseSBACRD && ( bCheckSplit || pcCU->getSlice()->getSPS()->isDepth() ) )
     1306    if( m_bUseSBACRD && bCheckSplit )
    13821307    {
    13831308      m_pcRDGoOnSbacCoder->store( m_pppcRDSbacCoder[ uiFullDepth ][ CI_QT_TRAFO_ROOT ] );
    13841309    }
    1385 #else
    1386     if( m_bUseSBACRD && bCheckSplit )
    1387     {
    1388       m_pcRDGoOnSbacCoder->store( m_pppcRDSbacCoder[ uiFullDepth ][ CI_QT_TRAFO_ROOT ] );
    1389     }
    1390 #endif
     1310
    13911311    //----- code luma block with given intra prediction mode and store Cbf-----
    13921312    dSingleCost   = 0.0;
     
    14091329    //----- determine rate and r-d cost -----
    14101330    UInt uiSingleBits = xGetIntraBitsQT( pcCU, uiTrDepth, uiAbsPartIdx, true, !bLumaOnly, false );
    1411 //GT VSO
     1331
     1332#if HHI_VSO
    14121333    if ( m_pcRdCost->getUseLambdaScaleVSO())
    14131334    {
     
    14181339      dSingleCost = m_pcRdCost->calcRdCost( uiSingleBits, uiSingleDistY + uiSingleDistC );
    14191340    }
    1420 //GT VSO end
    1421 
    1422 #if DMM_RES_CHECK_INTRA
    1423     if ( pcCU->getSlice()->getSPS()->isDepth() && pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrDepth ) == 1 && pcCU->getLumaIntraDir( uiAbsPartIdx ) > MAX_MODE_ID_INTRA_DIR )
    1424     {
    1425       m_pcRDGoOnSbacCoder->load ( m_pppcRDSbacCoder[ uiFullDepth ][ CI_QT_TRAFO_ROOT ] );
    1426 
    1427       Double dSingleCostNoRes = MAX_DOUBLE;
    1428       Dist uiSingleDistYNoRes = 0;
    1429       //save cbf and coeffs
    1430       xIntraCodingLumaBlk( pcCU, uiTrDepth, uiAbsPartIdx, pcOrgYuv, pcPredYuv, pcResiYuv, uiSingleDistYNoRes, true );
    1431 
    1432       //----- determine rate and r-d cost -----
    1433       UInt uiSingleBitsNoRes = xGetIntraBitsQT( pcCU, uiTrDepth, uiAbsPartIdx, true, !bLumaOnly, false );
    1434       //GT VSO
    1435       if ( m_pcRdCost->getUseLambdaScaleVSO())
    1436       {
    1437         dSingleCostNoRes = m_pcRdCost->calcRdCostVSO( uiSingleBitsNoRes, uiSingleDistYNoRes + uiSingleDistC );
    1438       }
    1439       else
    1440       {
    1441         dSingleCostNoRes = m_pcRdCost->calcRdCost( uiSingleBitsNoRes, uiSingleDistYNoRes + uiSingleDistC );
    1442       }
    1443       //GT VSO end
    1444 
    1445       if ( dSingleCostNoRes < dSingleCost )
    1446       {
    1447         xSetIntraNoResi( pcCU, uiTrDepth, uiAbsPartIdx, pcPredYuv, pcResiYuv, true );
    1448         dSingleCost = dSingleCostNoRes;
    1449         uiSingleCbfY = pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrDepth );
    1450 
    1451       }
    1452       else
    1453       {
    1454         xSetIntraNoResi( pcCU, uiTrDepth, uiAbsPartIdx, pcPredYuv, pcResiYuv, false );
    1455         uiSingleCbfY = pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrDepth );
    1456       }
    1457     }
     1341#else
     1342    dSingleCost = m_pcRdCost->calcRdCost( uiSingleBits, uiSingleDistY + uiSingleDistC );
    14581343#endif
    14591344  }
     
    15201405    //----- determine rate and r-d cost -----
    15211406    UInt uiSplitBits = xGetIntraBitsQT( pcCU, uiTrDepth, uiAbsPartIdx, true, !bLumaOnly, false );
    1522 //GT VSO
     1407#if HHI_VSO
    15231408    if( m_pcRdCost->getUseLambdaScaleVSO() )
    15241409    {
     
    15291414      dSplitCost       = m_pcRdCost->calcRdCost( uiSplitBits, uiSplitDistY + uiSplitDistC );
    15301415    }
    1531 //GT VSO end
     1416#else
     1417    dSplitCost       = m_pcRdCost->calcRdCost( uiSplitBits, uiSplitDistY + uiSplitDistC );
     1418#endif
    15321419
    15331420    //===== compare and set best =====
     
    16011488  }
    16021489
     1490#if HHI_VSO
    16031491  if ( m_pcRdCost->getUseRenModel() && bCheckFull )
    16041492  {
     
    16111499    m_pcRdCost->setRenModelData( pcCU, uiAbsPartIdx, piSrc, (Int) uiSrcStride, (Int) uiWidth, (Int) uiHeight );
    16121500  }
     1501#endif
    16131502
    16141503  ruiDistY += uiSingleDistY;
     
    18581747    uiMaxMode += 1;
    18591748#endif
    1860 #if HHI_DMM_INTRA
     1749#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    18611750    Bool bTestDmm = false;
    1862     if ( m_pcEncCfg->isDepthCoder() && m_pcEncCfg->getUseDepthModelModes() )
     1751    if ( m_pcEncCfg->isDepthCoder() && m_pcEncCfg->getUseDMM() )
    18631752      bTestDmm = true;
    18641753#endif
     
    19001789      // use hadamard transform here
    19011790      Dist uiSad;
    1902 //GT VSO
     1791#if HHI_VSO
    19031792      if ( m_pcRdCost->getUseVSO() )
    19041793      {
    19051794        Bool bSad = !m_pcRdCost->getUseRenModel();
    19061795        uiSad = m_pcRdCost->getDistVS(pcCU, uiPartOffset, piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, bSad, 0 );
    1907 #if GERHARD_VQM_XCHECK
    1908         UInt uiDist1 = m_pcRdCost->getDistVS  ( pcCU, uiPartOffset, piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 );
    1909         UInt uiDist2 = m_pcRdCost->getDistPart( piOrg, uiStride, piPred, uiStride, uiWidth, uiHeight );
    1910         assert(uiDist1 == uiDist2);
    1911 #endif
    19121796      }
    19131797      else
     
    19151799        uiSad = (Dist) m_pcRdCost->calcHAD( piOrg, uiStride, piPred, uiStride, uiWidth, uiHeight );
    19161800      }
    1917 //GT VSO end
     1801#else
     1802        uiSad = (Dist) m_pcRdCost->calcHAD( piOrg, uiStride, piPred, uiStride, uiWidth, uiHeight );
     1803#endif
    19181804
    19191805      UInt   iModeBits = xModeBitsIntra( pcCU, uiMode, uiPU, uiPartOffset, uiDepth, uiInitTrDepth );
    1920 //GT VSO
     1806
    19211807      Double dLambda;
    1922 
     1808#if HHI_VSO
    19231809      if ( m_pcRdCost->getUseLambdaScaleVSO() )
    19241810      {
    19251811        dLambda = m_pcRdCost->getUseRenModel() ? m_pcRdCost->getLambdaVSO() : m_pcRdCost->getSqrtLambdaVSO();
     1812        //GT: Sad is SSE for VSO4
    19261813      }
    19271814      else
     
    19291816        dLambda = m_pcRdCost->getSqrtLambda();
    19301817      }
    1931 
    1932       //GT: Sad is SSE for VSO4
     1818#else
     1819      dLambda = m_pcRdCost->getSqrtLambda();
     1820#endif
     1821
    19331822      Double cost = (Double)uiSad + (Double)iModeBits *  dLambda;
    1934 //GT VSO end
     1823
    19351824      CandNum += xUpdateCandList( uiMode, cost, uiFastCandNum, CandModeList, CandCostList );
    1936 #if HHI_DMM_INTRA
     1825#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    19371826      if ( bTestDmm ) bTestDmm = uiSad ? true : false;
    19381827#endif
     
    20041893    }
    20051894
    2006 #if HHI_DMM_INTRA
    2007     if( m_pcEncCfg->isDepthCoder() && uiWidth >= 4 && uiWidth < 64 && m_pcEncCfg->getUseDepthModelModes() && bTestDmm )
    2008     {
    2009 #if DMM_NO_TEXTURE_MODES
    2010       pcCU->setTextureModeAllowanceSubParts( false, uiPartOffset, uiDepth + uiInitTrDepth );
    2011 #else
    2012       UInt uiPartAddr = 0;
    2013       Int  iBlockWidth, iBlockHeight;
    2014 
    2015       pcCU->getPartIndexAndSize( uiPU, uiPartAddr, iBlockWidth, iBlockHeight );
    2016 
    2017       TComPicYuv* pcPicYuvRef = pcCU->getSlice()->getTexturePic()->getPicYuvRec();
    2018       Int         iRefStride = pcPicYuvRef->getStride();
    2019       Pel*        piRefY     = pcPicYuvRef->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr );
    2020 
    2021       TComYuv cTempYuv; cTempYuv.create( pcCU->getWidth(0), pcCU->getHeight(0) ); cTempYuv.clear();
    2022       UInt uiTempStride = cTempYuv.getStride();
    2023       Pel* piTempY      = cTempYuv.getLumaAddr( uiPU, uiWidth );
    2024 
    2025       for ( Int y = 0; y < uiHeight; y++ )
    2026       {
    2027         ::memcpy(piTempY, piRefY, sizeof(Pel)*uiWidth);
    2028         piTempY += uiTempStride;
    2029         piRefY += iRefStride;
    2030       }
    2031 
    2032       UInt64 uiDCSAD = cTempYuv.getLumaDistDCSAD( uiPartAddr, uiWidth );
     1895#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     1896    if( m_pcEncCfg->isDepthCoder() && uiWidth >= 4 && uiWidth < 64 && m_pcEncCfg->getUseDMM() && bTestDmm && uiWidth == uiHeight )
     1897    {
     1898#if HHI_DMM_WEDGE_INTRA
     1899      UInt uiTabIdx  = 0;
     1900      Int  iDeltaDC1 = 0;
     1901      Int  iDeltaDC2 = 0;
     1902      findWedgeFullMinDist( pcCU, uiPartOffset, piOrg, piPred, uiStride, uiWidth, uiHeight, uiTabIdx, iDeltaDC1, iDeltaDC2, bAboveAvail, bLeftAvail, WedgeDist_SAD );
     1903      pcCU->setWedgeFullTabIdxSubParts  ( uiTabIdx,  uiPartOffset, uiDepth + uiInitTrDepth );
     1904      pcCU->setWedgeFullDeltaDC1SubParts( iDeltaDC1, uiPartOffset, uiDepth + uiInitTrDepth );
     1905      pcCU->setWedgeFullDeltaDC2SubParts( iDeltaDC2, uiPartOffset, uiDepth + uiInitTrDepth );
     1906
     1907      uiRdModeList[ uiNewMaxMode++ ] = DMM_WEDGE_FULL_IDX;
     1908      uiRdModeList[ uiNewMaxMode++ ] = DMM_WEDGE_FULL_D_IDX;
     1909
     1910      if ( uiWidth > 4 )
     1911      {
     1912        Int  iWedgeDeltaEnd = 0;
     1913
     1914        iDeltaDC1 = 0;
     1915        iDeltaDC2 = 0;
     1916
     1917        findWedgePredDirMinDist( pcCU, uiPartOffset, piOrg, piPred, uiStride, uiWidth, uiHeight, uiTabIdx, iWedgeDeltaEnd, iDeltaDC1, iDeltaDC2, bAboveAvail, bLeftAvail, WedgeDist_SAD );
     1918        pcCU->setWedgePredDirTabIdxSubParts  ( uiTabIdx,       uiPartOffset, uiDepth + uiInitTrDepth );
     1919        pcCU->setWedgePredDirDeltaEndSubParts( iWedgeDeltaEnd, uiPartOffset, uiDepth + uiInitTrDepth );
     1920        pcCU->setWedgePredDirDeltaDC1SubParts( iDeltaDC1,      uiPartOffset, uiDepth + uiInitTrDepth );
     1921        pcCU->setWedgePredDirDeltaDC2SubParts( iDeltaDC2,      uiPartOffset, uiDepth + uiInitTrDepth );
     1922
     1923        uiRdModeList[ uiNewMaxMode++ ] = DMM_WEDGE_PREDDIR_IDX;
     1924        uiRdModeList[ uiNewMaxMode++ ] = DMM_WEDGE_PREDDIR_D_IDX;
     1925      }
     1926#endif
     1927#if HHI_DMM_PRED_TEX
     1928      TComYuv cTempYuv; cTempYuv.create( uiWidth, uiHeight ); cTempYuv.clear();
     1929      Pel* piTempY      = cTempYuv.getLumaAddr();
     1930
     1931      fillTexturePicTempBlock( pcCU, uiPartOffset, piTempY, uiWidth, uiHeight );
     1932
     1933      piTempY = cTempYuv.getLumaAddr();
     1934
     1935      UInt uiTexTabIdx  = 0;
     1936      Int  iTexDeltaDC1 = 0;
     1937      Int  iTexDeltaDC2 = 0;
     1938      findWedgeTexMinDist( pcCU, uiPartOffset, piOrg, piPred, uiStride, uiWidth, uiHeight, uiTexTabIdx, iTexDeltaDC1, iTexDeltaDC2, bAboveAvail, bLeftAvail, WedgeDist_SAD, piTempY );
     1939      pcCU->setWedgePredTexTabIdxSubParts  ( uiTexTabIdx,  uiPartOffset, uiDepth + uiInitTrDepth );
     1940      pcCU->setWedgePredTexDeltaDC1SubParts( iTexDeltaDC1, uiPartOffset, uiDepth + uiInitTrDepth );
     1941      pcCU->setWedgePredTexDeltaDC2SubParts( iTexDeltaDC2, uiPartOffset, uiDepth + uiInitTrDepth );
     1942
     1943      uiRdModeList[ uiNewMaxMode++ ] = DMM_WEDGE_PREDTEX_IDX;
     1944      uiRdModeList[ uiNewMaxMode++ ] = DMM_WEDGE_PREDTEX_D_IDX;
     1945
     1946      if ( uiWidth > 4 )
     1947      {
     1948        piTempY = cTempYuv.getLumaAddr();
     1949
     1950        iTexDeltaDC1 = 0;
     1951        iTexDeltaDC2 = 0;
     1952
     1953        findContourPredTex( pcCU, uiPartOffset, piOrg, piPred, uiStride, uiWidth, uiHeight, iTexDeltaDC1, iTexDeltaDC2, bAboveAvail, bLeftAvail, piTempY );
     1954        pcCU->setContourPredTexDeltaDC1SubParts( iTexDeltaDC1, uiPartOffset, uiDepth + uiInitTrDepth );
     1955        pcCU->setContourPredTexDeltaDC2SubParts( iTexDeltaDC2, uiPartOffset, uiDepth + uiInitTrDepth );
     1956
     1957        uiRdModeList[ uiNewMaxMode++ ] = DMM_CONTOUR_PREDTEX_IDX;
     1958        uiRdModeList[ uiNewMaxMode++ ] = DMM_CONTOUR_PREDTEX_D_IDX;
     1959      }
    20331960
    20341961      cTempYuv.destroy();
    2035 
    2036       if ( uiDCSAD < (UInt)(pcCU->getQP(0))/2 )
    2037       {
    2038         pcCU->setTextureModeAllowanceSubParts( false, uiPartOffset, uiDepth + uiInitTrDepth );
    2039       }
    2040       else
    2041       {
    2042         pcCU->setTextureModeAllowanceSubParts( true, uiPartOffset, uiDepth + uiInitTrDepth );
    2043       }
    2044 #endif
    2045       UChar uhNumAdd = 0;
    2046       if ( uiWidth > 4 )
    2047       {
    2048         uhNumAdd = 8;
    2049       }
    2050       else
    2051       {
    2052         uhNumAdd = 4;
    2053       }
    2054       Bool bWedgePredFull  = false;
    2055       Bool bWedgePredDir   = false;
    2056       Bool bWedgePredTex   = false;
    2057       Bool bContourPredTex = false;
    2058 
    2059       for ( Int i = 0; i < uhNumAdd; i++ )
    2060       {
    2061         UInt uiDMMid = g_aucAdditionalIntraModeList[i];
    2062 
    2063         if( !predIntraLumaDMMAvailable( uiDMMid, bAboveAvail, bLeftAvail, uiWidth, uiHeight, pcCU, uiPartOffset ) )
    2064           continue;
    2065 
    2066         if( uiDMMid >= DMM_WEDGE_PREDTEX_IDX && uiDMMid <= DMM_CONTOUR_PREDTEX_D_IDX && pcCU->getTextureModeAllowance( uiPartOffset ) == false )
    2067         {
    2068           continue;
    2069         }
    2070         if( !bWedgePredFull && (uiDMMid == DMM_WEDGE_FULL_IDX || uiDMMid == DMM_WEDGE_FULL_D_IDX) )
    2071         {
    2072           UInt uiTabIdx  = 0;
    2073           Int  iDeltaDC1 = 0;
    2074           Int  iDeltaDC2 = 0;
    2075           findWedgeFullMinDist( pcCU, uiPU, piOrg, piPred, uiStride, uiWidth, uiHeight, uiTabIdx, iDeltaDC1, iDeltaDC2, bAboveAvail, bLeftAvail, WedgeDist_SAD );
    2076           pcCU->setWedgeFullTabIdxSubParts  ( uiTabIdx,  uiPartOffset, uiDepth + uiInitTrDepth );
    2077           pcCU->setWedgeFullDeltaDC1SubParts( iDeltaDC1, uiPartOffset, uiDepth + uiInitTrDepth );
    2078           pcCU->setWedgeFullDeltaDC2SubParts( iDeltaDC2, uiPartOffset, uiDepth + uiInitTrDepth );
    2079           bWedgePredFull = true;
    2080         }
    2081 
    2082         if( !bWedgePredDir && (uiDMMid == DMM_WEDGE_PREDDIR_IDX || uiDMMid == DMM_WEDGE_PREDDIR_D_IDX) )
    2083         {
    2084           UInt uiTabIdx       = 0;
    2085           Int  iWedgeDeltaEnd = 0;
    2086           Int  iDeltaDC1      = 0;
    2087           Int  iDeltaDC2      = 0;
    2088           findWedgePredDirMinDist( pcCU, uiPU, piOrg, piPred, uiStride, uiWidth, uiHeight, uiTabIdx, iWedgeDeltaEnd, iDeltaDC1, iDeltaDC2, bAboveAvail, bLeftAvail, WedgeDist_SAD );
    2089           pcCU->setWedgePredDirTabIdxSubParts  ( uiTabIdx,       uiPartOffset, uiDepth + uiInitTrDepth );
    2090           pcCU->setWedgePredDirDeltaEndSubParts( iWedgeDeltaEnd, uiPartOffset, uiDepth + uiInitTrDepth );
    2091           pcCU->setWedgePredDirDeltaDC1SubParts( iDeltaDC1,      uiPartOffset, uiDepth + uiInitTrDepth );
    2092           pcCU->setWedgePredDirDeltaDC2SubParts( iDeltaDC2,      uiPartOffset, uiDepth + uiInitTrDepth );
    2093           bWedgePredDir = true;
    2094         }
    2095 
    2096         if( !bWedgePredTex && (uiDMMid == DMM_WEDGE_PREDTEX_IDX || uiDMMid == DMM_WEDGE_PREDTEX_D_IDX) )
    2097         {
    2098           UInt uiTabIdx  = 0;
    2099           Int  iDeltaDC1 = 0;
    2100           Int  iDeltaDC2 = 0;
    2101           findWedgeTexMinDist( pcCU, uiPU, piOrg, piPred, uiStride, uiWidth, uiHeight, uiTabIdx, iDeltaDC1, iDeltaDC2, bAboveAvail, bLeftAvail, WedgeDist_SAD );
    2102           pcCU->setWedgePredTexTabIdxSubParts  ( uiTabIdx,  uiPartOffset, uiDepth + uiInitTrDepth );
    2103           pcCU->setWedgePredTexDeltaDC1SubParts( iDeltaDC1, uiPartOffset, uiDepth + uiInitTrDepth );
    2104           pcCU->setWedgePredTexDeltaDC2SubParts( iDeltaDC2, uiPartOffset, uiDepth + uiInitTrDepth );
    2105           bWedgePredTex = true;
    2106         }
    2107 
    2108         if( !bContourPredTex && (uiDMMid == DMM_CONTOUR_PREDTEX_IDX || uiDMMid == DMM_CONTOUR_PREDTEX_D_IDX) )
    2109         {
    2110           Int  iDeltaDC1 = 0;
    2111           Int  iDeltaDC2 = 0;
    2112           findContourPredTex( pcCU, uiPU, piOrg, piPred, uiStride, uiWidth, uiHeight, iDeltaDC1, iDeltaDC2, bAboveAvail, bLeftAvail );
    2113           pcCU->setContourPredTexDeltaDC1SubParts( iDeltaDC1, uiPartOffset, uiDepth + uiInitTrDepth );
    2114           pcCU->setContourPredTexDeltaDC2SubParts( iDeltaDC2, uiPartOffset, uiDepth + uiInitTrDepth );
    2115           bContourPredTex = true;
    2116         }
    2117 
    2118         uiRdModeList[ uiNewMaxMode ] = uiDMMid;
    2119         uiNewMaxMode++;
    2120       }
     1962#endif
    21211963    }
    21221964#endif
     
    21371979
    21381980#if (!REFERENCE_SAMPLE_PADDING)
    2139 #if HHI_DMM_INTRA
     1981#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    21401982      if ( !predIntraLumaDirAvailable( uiOrgMode, uiWidthBit, bAboveAvail, bLeftAvail, uiWidth, uiHeight, pcCU, uiPartOffset ) )
    21411983        continue;
     
    21451987#endif
    21461988#else
    2147 #if HHI_DMM_INTRA
    2148       if( m_pcEncCfg->isDepthCoder() && !predIntraLumaDMMAvailable( uiOrgMode, bAboveAvail, bLeftAvail, uiWidth, uiHeight, pcCU, uiPartOffset ) )
     1989#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     1990      if( m_pcEncCfg->isDepthCoder() && !predIntraLumaDMMAvailable( uiOrgMode, uiWidth, uiHeight ) )
    21491991        continue;
    21501992#endif
     
    21662008
    21672009      // reset Model
     2010#if HHI_VSO
    21682011      if( m_pcRdCost->getUseRenModel() )
    21692012      {
    21702013        m_pcRdCost->setRenModelData( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight );
    21712014      }
     2015#endif
    21722016
    21732017#if HHI_RQT_INTRA_SPEEDUP
     
    22232067
    22242068#if (!REFERENCE_SAMPLE_PADDING)
    2225 #if HHI_DMM_INTRA
     2069#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    22262070      if ( !predIntraLumaDirAvailable( uiOrgMode, uiWidthBit, bAboveAvail, bLeftAvail, uiWidth, uiHeight, pcCU, uiPartOffset ) )
    22272071        continue;
     
    22312075#endif
    22322076#else
    2233 #if HHI_DMM_INTRA
    2234       if( m_pcEncCfg->isDepthCoder() && !predIntraLumaDMMAvailable( uiOrgMode, bAboveAvail, bLeftAvail, uiWidth, uiHeight, pcCU, uiPartOffset ) )
     2077#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     2078      if( m_pcEncCfg->isDepthCoder() && !predIntraLumaDMMAvailable( uiOrgMode, uiWidth, uiHeight ) )
    22352079        continue;
    22362080#endif
     
    22502094      Double dPUCost   = 0.0;
    22512095
     2096#if HHI_VSO
    22522097      // reset Model
    22532098      if( m_pcRdCost->getUseRenModel() )
     
    22552100        m_pcRdCost->setRenModelData( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight );
    22562101      }
     2102#endif
    22572103
    22582104      xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, false, dPUCost );
     
    23172163      }
    23182164
     2165#if HHI_VSO
    23192166      // set model
    23202167      if( m_pcRdCost->getUseRenModel() )
     
    23232170        m_pcRdCost->setRenModelData( pcCU, uiPartOffset, piSrc, uiSrcStride, uiCompWidth, uiCompHeight);
    23242171      }
     2172#endif
    23252173
    23262174      if( !bLumaOnly && !bSkipChroma )
     
    24832331    }
    24842332#endif
    2485 #if HHI_DMM_INTRA
     2333#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    24862334#if ADD_PLANAR_MODE
    24872335    if ( uiModeList[uiMode] == 4 && pcCU->getLumaIntraDir(0) > MAX_MODE_ID_INTRA_DIR )
     
    25452393
    25462394#if (!REFERENCE_SAMPLE_PADDING)
    2547 #if HHI_DMM_INTRA
     2395#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    25482396Bool TEncSearch::predIntraLumaDirAvailable( UInt uiMode, UInt uiWidthBit, Bool bAboveAvail, Bool bLeftAvail, UInt uiWidth, UInt uiHeight, TComDataCU* pcCU, UInt uiAbsPartIdx   )
    25492397#else
     
    25522400{
    25532401  Bool bDirAvailable;
    2554 #if HHI_DMM_INTRA
     2402#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    25552403  if( uiMode > MAX_MODE_ID_INTRA_DIR )
    25562404  {
    2557     return predIntraLumaDMMAvailable( uiMode, bAboveAvail, bLeftAvail, uiWidth, uiHeight, pcCU, uiAbsPartIdx );
     2405    return predIntraLumaDMMAvailable( uiMode, bAboveAvail, bLeftAvail, uiWidth, uiHeight );
    25582406  }
    25592407  else
     
    25722420#endif
    25732421
    2574 #if HHI_DMM_INTRA
    2575 Void TEncSearch::xSearchWedgeFullMinDist( TComDataCU* pcCU, UInt uiAbsPtIdx, WedgeList* pacWedgeList, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx )
    2576 {
    2577   ruiTabIdx = 0;
    2578 
    2579   // local pred buffer
    2580   TComYuv cPredYuv;
    2581   cPredYuv.create( uiWidth, uiHeight );
    2582   cPredYuv.clear();
    2583 
    2584   UInt uiPredStride = cPredYuv.getStride();
    2585   Pel* piPred       = cPredYuv.getLumaAddr();
    2586 
    2587   Int  iDC1 = 0;
    2588   Int  iDC2 = 0;
    2589   // regular wedge search
    2590   Dist uiBestDist   = RDO_DIST_MAX;
    2591   UInt uiBestTabIdx = 0;
    2592 
    2593   for( UInt uiIdx = 0; uiIdx < pacWedgeList->size(); uiIdx++ )
    2594   {
    2595     calcWedgeDCs       ( &(pacWedgeList->at(uiIdx)), piRef,  uiRefStride,  iDC1, iDC2 );
    2596     assignWedgeDCs2Pred( &(pacWedgeList->at(uiIdx)), piPred, uiPredStride, iDC1, iDC2 );
    2597 
    2598     Dist uiActDist = RDO_DIST_MAX;
    2599     if( m_pcRdCost->getUseVSO() )
    2600     {
    2601       uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, 0 );
    2602     }
    2603     else
    2604     {
    2605       uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, DF_SAD );
    2606     }
    2607 
    2608     if( uiActDist < uiBestDist || uiBestDist == RDO_DIST_MAX )
    2609     {
    2610       uiBestDist   = uiActDist;
    2611       uiBestTabIdx = uiIdx;
    2612     }
    2613   }
    2614   ruiTabIdx = uiBestTabIdx;
    2615 
    2616   cPredYuv.destroy();
    2617   return;
    2618 }
    2619 
    2620 Void TEncSearch::xSearchWedgePredDirMinDist( TComDataCU* pcCU, UInt uiAbsPtIdx, WedgeList* pacWedgeList, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, Int& riWedgeDeltaEnd )
    2621 {
    2622   ruiTabIdx       = 0;
    2623   riWedgeDeltaEnd = 0;
    2624 
    2625   // local pred buffer
    2626   TComYuv cPredYuv;
    2627   cPredYuv.create( uiWidth, uiHeight );
    2628   cPredYuv.clear();
    2629 
    2630   UInt uiPredStride = cPredYuv.getStride();
    2631   Pel* piPred       = cPredYuv.getLumaAddr();
    2632 
    2633   Int  iDC1 = 0;
    2634   Int  iDC2 = 0;
    2635 
    2636   // regular wedge search
    2637   Dist uiBestDist    = RDO_DIST_MAX;
    2638   UInt uiBestTabIdx  = 0;
    2639   Int  iBestDeltaEnd = 0;
    2640 
    2641   UInt uiIdx = 0;
    2642   for( Int iTestDeltaEnd = -DMM_WEDGE_PREDDIR_DELTAEND_MAX; iTestDeltaEnd <= DMM_WEDGE_PREDDIR_DELTAEND_MAX; iTestDeltaEnd++ )
    2643   {
    2644     uiIdx = getBestContinueWedge( pcCU, uiAbsPtIdx, uiWidth, uiHeight, iTestDeltaEnd );
    2645     calcWedgeDCs       ( &(pacWedgeList->at(uiIdx)), piRef,  uiRefStride,  iDC1, iDC2 );
    2646     assignWedgeDCs2Pred( &(pacWedgeList->at(uiIdx)), piPred, uiPredStride, iDC1, iDC2 );
    2647 
    2648     Dist uiActDist = RDO_DIST_MAX;
    2649     if( m_pcRdCost->getUseVSO() )
    2650     {
    2651       uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, 0 );
    2652     }
    2653     else
    2654     {
    2655       uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, DF_SAD );
    2656     }
    2657 
    2658     if( uiActDist < uiBestDist || uiBestDist == RDO_DIST_MAX )
    2659     {
    2660       uiBestDist    = uiActDist;
    2661       uiBestTabIdx  = uiIdx;
    2662       iBestDeltaEnd = iTestDeltaEnd;
    2663     }
    2664     else if( uiIdx == uiBestTabIdx && abs(iTestDeltaEnd) < abs(iBestDeltaEnd) )
    2665     {
    2666       iBestDeltaEnd = iTestDeltaEnd;
    2667     }
    2668   }
    2669 
    2670   ruiTabIdx       = uiBestTabIdx;
    2671   riWedgeDeltaEnd = iBestDeltaEnd;
    2672 
    2673   cPredYuv.destroy();
    2674   return;
    2675 }
    2676 
    2677 Bool TEncSearch::predIntraLumaDMMAvailable( UInt uiMode, Bool bAboveAvail, Bool bLeftAvail, UInt uiWidth, UInt uiHeight, TComDataCU* pcCU, UInt uiAbsPartIdx )
    2678 {
    2679   if( uiMode <= MAX_MODE_ID_INTRA_DIR ) return true;
    2680 
    2681   Bool bDMMAvailable = m_pcEncCfg->getUseDepthModelModes();
    2682 
    2683   if( uiMode == DMM_WEDGE_FULL_IDX        ||
    2684       uiMode == DMM_WEDGE_FULL_D_IDX      ||
    2685       uiMode == DMM_WEDGE_PREDTEX_IDX     ||
    2686       uiMode == DMM_WEDGE_PREDTEX_D_IDX   ||
    2687       uiMode == DMM_CONTOUR_PREDTEX_IDX   ||
    2688       uiMode == DMM_CONTOUR_PREDTEX_D_IDX ||
    2689       uiMode == DMM_WEDGE_PREDDIR_IDX     ||
    2690       uiMode == DMM_WEDGE_PREDDIR_D_IDX     )
    2691   {
    2692     if( (uiWidth != uiHeight) || (uiWidth < DMM_WEDGEMODEL_MIN_SIZE) || (uiWidth > DMM_WEDGEMODEL_MAX_SIZE) )
    2693     {
    2694       bDMMAvailable = false;
    2695     }
    2696   }
    2697 
    2698   return bDMMAvailable;
    2699 }
    2700 
     2422#if HHI_DMM_WEDGE_INTRA
    27012423Void TEncSearch::findWedgeFullMinDist( TComDataCU*  pcCU,
    2702                                        UInt         uiAbsPtIdx,
    2703                                        Pel*         piOrig,
    2704                                        Pel*         piPredic,
    2705                                        UInt         uiStride,
    2706                                        UInt         uiWidth,
    2707                                        UInt         uiHeight,
    2708                                        UInt&        ruiTabIdx,
    2709                                        Int&         riDeltaDC1,
    2710                                        Int&         riDeltaDC2,
    2711                                        Bool         bAbove,
    2712                                        Bool         bLeft,
    2713                                        WedgeDist    eWedgeDist
    2714                                      )
    2715 {
    2716   assert( uiWidth >= DMM_WEDGEMODEL_MIN_SIZE && uiWidth <= DMM_WEDGEMODEL_MAX_SIZE );
    2717 
    2718   WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])];
    2719   xSearchWedgeFullMinDist( pcCU, uiAbsPtIdx, pacWedgeList, piOrig, uiStride, uiWidth, uiHeight, ruiTabIdx );
    2720 
    2721   TComWedgelet* pcBestWedgelet = &(pacWedgeList->at(ruiTabIdx));
    2722   xGetWedgeDeltaDCsMinDist( pcBestWedgelet, pcCU, uiAbsPtIdx, piOrig, piPredic, uiStride, uiWidth, uiHeight, riDeltaDC1, riDeltaDC2, bAbove, bLeft );
    2723 }
    2724 
    2725 Void TEncSearch::findWedgePredDirMinDist( TComDataCU*  pcCU,
    2726                                           UInt         uiAbsPtIdx,
    2727                                           Pel*         piOrig,
    2728                                           Pel*         piPredic,
    2729                                           UInt         uiStride,
    2730                                           UInt         uiWidth,
    2731                                           UInt         uiHeight,
    2732                                           UInt&        ruiTabIdx,
    2733                                           Int&         riWedgeDeltaEnd,
    2734                                           Int&         riDeltaDC1,
    2735                                           Int&         riDeltaDC2,
    2736                                           Bool         bAbove,
    2737                                           Bool         bLeft,
    2738                                           WedgeDist    eWedgeDist )
    2739 {
    2740   assert( uiWidth >= DMM_WEDGEMODEL_MIN_SIZE && uiWidth <= DMM_WEDGEMODEL_MAX_SIZE );
    2741   WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])];
    2742 
    2743   ruiTabIdx       = 0;
    2744   riWedgeDeltaEnd = 0;
    2745 
    2746   xSearchWedgePredDirMinDist( pcCU, uiAbsPtIdx, pacWedgeList, piOrig, uiStride, uiWidth, uiHeight, ruiTabIdx, riWedgeDeltaEnd );
    2747 
    2748   TComWedgelet* pcBestWedgelet = &(pacWedgeList->at(ruiTabIdx));
    2749   xGetWedgeDeltaDCsMinDist( pcBestWedgelet, pcCU, uiAbsPtIdx, piOrig, piPredic, uiStride, uiWidth, uiHeight, riDeltaDC1, riDeltaDC2, bAbove, bLeft );
    2750 }
    2751 
    2752 Void TEncSearch::findWedgeTexMinDist( TComDataCU*  pcCU,
    27532424                                      UInt         uiAbsPtIdx,
    27542425                                      Pel*         piOrig,
     
    27632434                                      Bool         bLeft,
    27642435                                      WedgeDist    eWedgeDist
    2765                                     )
    2766   {
     2436                                      )
     2437{
     2438  assert( uiWidth >= DMM_WEDGEMODEL_MIN_SIZE && uiWidth <= DMM_WEDGEMODEL_MAX_SIZE );
     2439
     2440  WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])];
     2441  xSearchWedgeFullMinDist( pcCU, uiAbsPtIdx, pacWedgeList, piOrig, uiStride, uiWidth, uiHeight, ruiTabIdx );
     2442
     2443  TComWedgelet* pcBestWedgelet = &(pacWedgeList->at(ruiTabIdx));
     2444  xGetWedgeDeltaDCsMinDist( pcBestWedgelet, pcCU, uiAbsPtIdx, piOrig, piPredic, uiStride, uiWidth, uiHeight, riDeltaDC1, riDeltaDC2, bAbove, bLeft );
     2445}
     2446
     2447Void TEncSearch::xSearchWedgeFullMinDist( TComDataCU* pcCU, UInt uiAbsPtIdx, WedgeList* pacWedgeList, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx )
     2448{
     2449  ruiTabIdx = 0;
     2450
     2451  // local pred buffer
     2452  TComYuv cPredYuv;
     2453  cPredYuv.create( uiWidth, uiHeight );
     2454  cPredYuv.clear();
     2455
     2456  UInt uiPredStride = cPredYuv.getStride();
     2457  Pel* piPred       = cPredYuv.getLumaAddr();
     2458
     2459  Int  iDC1 = 0;
     2460  Int  iDC2 = 0;
     2461  // regular wedge search
     2462  Dist uiBestDist   = RDO_DIST_MAX;
     2463  UInt uiBestTabIdx = 0;
     2464
     2465  for( UInt uiIdx = 0; uiIdx < pacWedgeList->size(); uiIdx++ )
     2466  {
     2467    calcWedgeDCs       ( &(pacWedgeList->at(uiIdx)), piRef,  uiRefStride,  iDC1, iDC2 );
     2468    assignWedgeDCs2Pred( &(pacWedgeList->at(uiIdx)), piPred, uiPredStride, iDC1, iDC2 );
     2469
     2470    Dist uiActDist = RDO_DIST_MAX;
     2471#if HHI_VSO
     2472    if( m_pcRdCost->getUseVSO() )
     2473    {
     2474      uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, 0 );
     2475    }
     2476    else
     2477    {
     2478      uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, DF_SAD );
     2479    }
     2480#else
     2481    uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, DF_SAD );
     2482#endif
     2483
     2484    if( uiActDist < uiBestDist || uiBestDist == RDO_DIST_MAX )
     2485    {
     2486      uiBestDist   = uiActDist;
     2487      uiBestTabIdx = uiIdx;
     2488    }
     2489  }
     2490  ruiTabIdx = uiBestTabIdx;
     2491
     2492  cPredYuv.destroy();
     2493  return;
     2494}
     2495
     2496Void TEncSearch::findWedgePredDirMinDist( TComDataCU*  pcCU,
     2497                                         UInt         uiAbsPtIdx,
     2498                                         Pel*         piOrig,
     2499                                         Pel*         piPredic,
     2500                                         UInt         uiStride,
     2501                                         UInt         uiWidth,
     2502                                         UInt         uiHeight,
     2503                                         UInt&        ruiTabIdx,
     2504                                         Int&         riWedgeDeltaEnd,
     2505                                         Int&         riDeltaDC1,
     2506                                         Int&         riDeltaDC2,
     2507                                         Bool         bAbove,
     2508                                         Bool         bLeft,
     2509                                         WedgeDist    eWedgeDist )
     2510{
    27672511  assert( uiWidth >= DMM_WEDGEMODEL_MIN_SIZE && uiWidth <= DMM_WEDGEMODEL_MAX_SIZE );
    27682512  WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])];
    27692513
    2770   ruiTabIdx = getBestWedgeFromText( pcCU, uiAbsPtIdx, uiWidth, uiHeight );
     2514  ruiTabIdx       = 0;
     2515  riWedgeDeltaEnd = 0;
     2516
     2517  xSearchWedgePredDirMinDist( pcCU, uiAbsPtIdx, pacWedgeList, piOrig, uiStride, uiWidth, uiHeight, ruiTabIdx, riWedgeDeltaEnd );
     2518
     2519  TComWedgelet* pcBestWedgelet = &(pacWedgeList->at(ruiTabIdx));
     2520  xGetWedgeDeltaDCsMinDist( pcBestWedgelet, pcCU, uiAbsPtIdx, piOrig, piPredic, uiStride, uiWidth, uiHeight, riDeltaDC1, riDeltaDC2, bAbove, bLeft );
     2521}
     2522
     2523Void TEncSearch::xSearchWedgePredDirMinDist( TComDataCU* pcCU, UInt uiAbsPtIdx, WedgeList* pacWedgeList, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, Int& riWedgeDeltaEnd )
     2524{
     2525  ruiTabIdx       = 0;
     2526  riWedgeDeltaEnd = 0;
     2527
     2528  // local pred buffer
     2529  TComYuv cPredYuv;
     2530  cPredYuv.create( uiWidth, uiHeight );
     2531  cPredYuv.clear();
     2532
     2533  UInt uiPredStride = cPredYuv.getStride();
     2534  Pel* piPred       = cPredYuv.getLumaAddr();
     2535
     2536  Int  iDC1 = 0;
     2537  Int  iDC2 = 0;
     2538
     2539  // regular wedge search
     2540  Dist uiBestDist    = RDO_DIST_MAX;
     2541  UInt uiBestTabIdx  = 0;
     2542  Int  iBestDeltaEnd = 0;
     2543
     2544  UInt uiIdx = 0;
     2545  for( Int iTestDeltaEnd = -DMM_WEDGE_PREDDIR_DELTAEND_MAX; iTestDeltaEnd <= DMM_WEDGE_PREDDIR_DELTAEND_MAX; iTestDeltaEnd++ )
     2546  {
     2547    uiIdx = getBestContinueWedge( pcCU, uiAbsPtIdx, uiWidth, uiHeight, iTestDeltaEnd );
     2548    calcWedgeDCs       ( &(pacWedgeList->at(uiIdx)), piRef,  uiRefStride,  iDC1, iDC2 );
     2549    assignWedgeDCs2Pred( &(pacWedgeList->at(uiIdx)), piPred, uiPredStride, iDC1, iDC2 );
     2550
     2551    Dist uiActDist = RDO_DIST_MAX;
     2552#if HHI_VSO
     2553    if( m_pcRdCost->getUseVSO() )
     2554    {
     2555      uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, 0 );
     2556    }
     2557    else
     2558    {
     2559      uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, DF_SAD );
     2560    }
     2561#else
     2562    uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, DF_SAD );
     2563#endif
     2564
     2565    if( uiActDist < uiBestDist || uiBestDist == RDO_DIST_MAX )
     2566    {
     2567      uiBestDist    = uiActDist;
     2568      uiBestTabIdx  = uiIdx;
     2569      iBestDeltaEnd = iTestDeltaEnd;
     2570    }
     2571    else if( uiIdx == uiBestTabIdx && abs(iTestDeltaEnd) < abs(iBestDeltaEnd) )
     2572    {
     2573      iBestDeltaEnd = iTestDeltaEnd;
     2574    }
     2575  }
     2576
     2577  ruiTabIdx       = uiBestTabIdx;
     2578  riWedgeDeltaEnd = iBestDeltaEnd;
     2579
     2580  cPredYuv.destroy();
     2581  return;
     2582}
     2583#endif
     2584
     2585#if HHI_DMM_PRED_TEX
     2586Void TEncSearch::findWedgeTexMinDist( TComDataCU*  pcCU,
     2587                                      UInt         uiAbsPtIdx,
     2588                                      Pel*         piOrig,
     2589                                      Pel*         piPredic,
     2590                                      UInt         uiStride,
     2591                                      UInt         uiWidth,
     2592                                      UInt         uiHeight,
     2593                                      UInt&        ruiTabIdx,
     2594                                      Int&         riDeltaDC1,
     2595                                      Int&         riDeltaDC2,
     2596                                      Bool         bAbove,
     2597                                      Bool         bLeft,
     2598                                      WedgeDist    eWedgeDist,
     2599                                      Pel*         piTextureRef
     2600                                    )
     2601  {
     2602  assert( uiWidth >= DMM_WEDGEMODEL_MIN_SIZE && uiWidth <= DMM_WEDGEMODEL_MAX_SIZE );
     2603  WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])];
     2604
     2605  ruiTabIdx = getBestWedgeFromText( pcCU, uiAbsPtIdx, uiWidth, uiHeight, eWedgeDist, piTextureRef );
    27712606
    27722607  TComWedgelet* pcBestWedgelet = &(pacWedgeList->at(ruiTabIdx));
     
    27842619                                     Int&         riDeltaDC2,
    27852620                                     Bool         bAbove,
    2786                                      Bool         bLeft )
     2621                                     Bool         bLeft,
     2622                                     Pel*         piTextureRef )
    27872623{
    27882624  // get contour pattern
    27892625  TComWedgelet* pcContourWedge = new TComWedgelet( uiWidth, uiHeight );
    2790   getBestContourFromText( pcCU, uiAbsPtIdx, uiWidth, uiHeight, pcContourWedge );
     2626  getBestContourFromText( pcCU, uiAbsPtIdx, uiWidth, uiHeight, pcContourWedge, piTextureRef );
    27912627
    27922628  xGetWedgeDeltaDCsMinDist( pcContourWedge, pcCU, uiAbsPtIdx, piOrig, piPredic, uiStride, uiWidth, uiHeight, riDeltaDC1, riDeltaDC2, bAbove, bLeft );
     
    27952631  delete pcContourWedge;
    27962632}
    2797 
     2633#endif
     2634#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    27982635Void TEncSearch::xGetWedgeDeltaDCsMinDist( TComWedgelet* pcWedgelet,
    27992636                                           TComDataCU*   pcCU,
     
    28242661  riDeltaDC2 = iDC2 - iPredDC2;
    28252662
     2663#if HHI_VSO
    28262664  if( m_pcRdCost->getUseVSO() )
    28272665  {
     
    28752713    riDeltaDC2 = iFullDeltaDC2;
    28762714  }
     2715#endif
    28772716
    28782717  xDeltaDCQuantScaleDown( pcCU, riDeltaDC1 );
    28792718  xDeltaDCQuantScaleDown( pcCU, riDeltaDC2 );
     2719}
     2720
     2721Bool TEncSearch::predIntraLumaDMMAvailable( UInt uiMode, UInt uiWidth, UInt uiHeight )
     2722{
     2723  if( uiMode <= MAX_MODE_ID_INTRA_DIR ) return true;
     2724
     2725  Bool bDMMAvailable = m_pcEncCfg->getUseDMM();
     2726
     2727#if HHI_DMM_WEDGE_INTRA
     2728  if( uiMode == DMM_WEDGE_FULL_IDX        ||
     2729      uiMode == DMM_WEDGE_FULL_D_IDX      ||
     2730      uiMode == DMM_WEDGE_PREDDIR_IDX     ||
     2731      uiMode == DMM_WEDGE_PREDDIR_D_IDX )
     2732  {
     2733    if( (uiWidth != uiHeight) || (uiWidth < DMM_WEDGEMODEL_MIN_SIZE) || (uiWidth > DMM_WEDGEMODEL_MAX_SIZE) || ( ( uiMode == DMM_WEDGE_PREDDIR_IDX || uiMode == DMM_WEDGE_PREDDIR_D_IDX ) && uiWidth == 4 ) )
     2734    {
     2735      bDMMAvailable = false;
     2736    }
     2737  }
     2738#endif
     2739#if HHI_DMM_PRED_TEX
     2740  if( uiMode == DMM_WEDGE_PREDTEX_IDX     ||
     2741      uiMode == DMM_WEDGE_PREDTEX_D_IDX   ||
     2742      uiMode == DMM_CONTOUR_PREDTEX_IDX   ||
     2743      uiMode == DMM_CONTOUR_PREDTEX_D_IDX )
     2744  {
     2745    if( (uiWidth != uiHeight) || (uiWidth < DMM_WEDGEMODEL_MIN_SIZE) || (uiWidth > DMM_WEDGEMODEL_MAX_SIZE) || ( ( uiMode == DMM_CONTOUR_PREDTEX_IDX || uiMode == DMM_CONTOUR_PREDTEX_D_IDX ) && uiWidth == 4 ) )
     2746    {
     2747      bDMMAvailable = false;
     2748    }
     2749  }
     2750
     2751#endif
     2752
     2753  return bDMMAvailable;
    28802754}
    28812755
     
    40333907  uiCost = ruiDist + m_pcRdCost->getCost( m_auiMVPIdxCost[iMVPIdx][iMVPNum] );
    40343908#else
    4035 //GT VSO
     3909#if HHI_VSO
    40363910  if ( false /*m_pcRdCost->getUseVSO()*/ ) // GT: currently disabled
    40373911  {
    4038   #if GERHARD_VQM_XCHECK
    4039     UInt uiCost1 = m_pcRdCost->getDistVS  ( pcCU, uiPartAddr,  pcTemplateCand->getLumaAddr(uiPartAddr), pcTemplateCand->getStride(), pcOrgYuv->getLumaAddr(uiPartAddr), pcOrgYuv->getStride(), iSizeX, iSizeY, true, 0);
    4040     UInt uiCost2 = m_pcRdCost->getDistPart( pcTemplateCand->getLumaAddr(uiPartAddr), pcTemplateCand->getStride(), pcOrgYuv->getLumaAddr(uiPartAddr), pcOrgYuv->getStride(), iSizeX, iSizeY, DF_SAD );
    4041     assert(uiCost1 == uiCost2);
    4042   #endif
    40433912    uiCost = m_pcRdCost->getDistVS  ( pcCU, uiPartAddr,  pcTemplateCand->getLumaAddr(uiPartAddr), pcTemplateCand->getStride(), pcOrgYuv->getLumaAddr(uiPartAddr), pcOrgYuv->getStride(), iSizeX, iSizeY, true, 0);
    40443913    uiCost = (UInt) m_pcRdCost->calcRdCostVSO( m_auiMVPIdxCost[iMVPIdx][iMVPNum], uiCost, false, DF_SAD );
    40453914  }
    40463915  else
     3916#endif
    40473917  {
    40483918    uiCost = m_pcRdCost->getDistPart( pcTemplateCand->getLumaAddr(uiPartAddr), pcTemplateCand->getStride(), pcOrgYuv->getLumaAddr(uiPartAddr), pcOrgYuv->getStride(), iSizeX, iSizeY, DF_SAD );
    40493919    uiCost = (UInt) m_pcRdCost->calcRdCost( m_auiMVPIdxCost[iMVPIdx][iMVPNum], uiCost, false, DF_SAD );
    40503920  }
    4051 //GT VSO end
    40523921#endif
    40533922  return uiCost;
     
    41233992
    41243993  m_pcRdCost->setPredictor  ( *pcMvPred );
    4125 #if MW_DEPTH_MAP_INTERP_FILTER == 2 && MW_FULL_PEL_DEPTH_MAP_MV_SIGNALLING
     3994#if HHI_FULL_PEL_DEPTH_MAP_MV_ACC
    41263995  if( pcCU->getSlice()->getSPS()->isDepth() )
    41273996    m_pcRdCost->setCostScale  ( 0 );
     
    41303999  m_pcRdCost->setCostScale  ( 2 );
    41314000
     4001#if HHI_INTER_VIEW_MOTION_PRED
    41324002  { // init inter-view regularization
    41334003    TComMv  cOrgDepthMapMv;
    41344004    Bool    bMultiviewReg = pcCU->getIViewOrgDepthMvPred( iPartIdx, eRefPicList, iRefIdxPred, cOrgDepthMapMv );
    4135 #if MW_DEPTH_MAP_INTERP_FILTER == 2 && MW_FULL_PEL_DEPTH_MAP_MV_SIGNALLING
     4005#if HHI_FULL_PEL_DEPTH_MAP_MV_ACC
    41364006    if( bMultiviewReg && pcCU->getSlice()->getSPS()->isDepth() )
    41374007    {
     
    41464016    }
    41474017  }
     4018#endif
    41484019
    41494020  //  Do integer search
     
    41794050
    41804051  m_pcRdCost->getMotionCost( 1, 0 );
    4181 #if MW_DEPTH_MAP_INTERP_FILTER == 2 && MW_FULL_PEL_DEPTH_MAP_MV_SIGNALLING
     4052#if HHI_FULL_PEL_DEPTH_MAP_MV_ACC
    41824053  if( ! pcCU->getSlice()->getSPS()->isDepth() )
    41834054  {
     
    42034074  rcMv += (cMvHalf <<= 1);
    42044075  rcMv +=  cMvQter;
    4205 #if MW_DEPTH_MAP_INTERP_FILTER == 2 && MW_FULL_PEL_DEPTH_MAP_MV_SIGNALLING
     4076#if HHI_FULL_PEL_DEPTH_MAP_MV_ACC
    42064077  }
    42074078#endif
    42084079
    42094080  UInt uiMvBits = m_pcRdCost->getBits( rcMv.getHor(), rcMv.getVer() );
    4210 #if MW_DEPTH_MAP_INTERP_FILTER == 2 && MW_FULL_PEL_DEPTH_MAP_MV_SIGNALLING
     4081#if HHI_FULL_PEL_DEPTH_MAP_MV_ACC
    42114082  if( pcCU->getSlice()->getSPS()->isDepth() )
    42124083    ruiCost += m_pcRdCost->getCost( uiMvBits );
     
    42214092{
    42224093  Int  iMvShift = 2;
    4223 #if MW_DEPTH_MAP_INTERP_FILTER == 2 && MW_FULL_PEL_DEPTH_MAP_MV_SIGNALLING
     4094#if HHI_FULL_PEL_DEPTH_MAP_MV_ACC
    42244095  if( pcCU->getSlice()->getSPS()->isDepth() )
    42254096    iMvShift = 0;
     
    43944265  UInt uiSearchRange = m_iSearchRange;
    43954266  pcCU->clipMv( rcMv );
    4396 #if MW_DEPTH_MAP_INTERP_FILTER == 2 && MW_FULL_PEL_DEPTH_MAP_MV_SIGNALLING
     4267#if HHI_FULL_PEL_DEPTH_MAP_MV_ACC
    43974268  if( ! pcCU->getSlice()->getSPS()->isDepth() )
    43984269#endif
     
    44144285      TComMv cMv = m_acMvPredictors[index];
    44154286      pcCU->clipMv( cMv );
    4416 #if MW_DEPTH_MAP_INTERP_FILTER == 2 && MW_FULL_PEL_DEPTH_MAP_MV_SIGNALLING
     4287#if HHI_FULL_PEL_DEPTH_MAP_MV_ACC
    44174288      if( ! pcCU->getSlice()->getSPS()->isDepth() )
    44184289#endif
     
    47264597    pcYuvPred->copyToPartYuv( rpcYuvRec, 0 );
    47274598
     4599#if HHI_INTER_VIEW_RESIDUAL_PRED
    47284600    // add residual prediction
    47294601    if( pcCU->getResPredFlag( 0 ) )
     
    47324604      rpcYuvRec->clip( uiWidth, uiHeight );
    47334605    }
    4734 
    4735     //GT VSO
     4606#endif
     4607
     4608#if HHI_VSO   
    47364609    if ( m_pcRdCost->getUseVSO() )
    47374610    {
    4738   #if GERHARD_VQM_XCHECK
    4739       UInt uiDistortion1 = m_pcRdCost->getDistPart( rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(),  pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(),  uiWidth,      uiHeight );
    4740       UInt uiDistortion2 = m_pcRdCost->getDistVS( pcCU, 0, rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(),  pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(),  uiWidth,      uiHeight     , false, 0 );
    4741       assert( uiDistortion1 == uiDistortion2 );
    4742   #endif
    47434611      uiDistortion = m_pcRdCost->getDistVS( pcCU, 0, rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(),  pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(),  uiWidth,      uiHeight     , false, 0 );
    47444612    }
    47454613    else
     4614#endif
    47464615    {
    47474616      uiDistortion = m_pcRdCost->getDistPart( rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(),  pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(),  uiWidth,      uiHeight      )
     
    47494618      + m_pcRdCost->getDistPart( rpcYuvRec->getCrAddr(),   rpcYuvRec->getCStride(), pcYuvOrg->getCrAddr(),   pcYuvOrg->getCStride(), uiWidth >> 1, uiHeight >> 1 );
    47504619    }
    4751     //GT VSO end
     4620   
    47524621
    47534622    if( m_bUseSBACRD )
     
    47554624
    47564625    m_pcEntropyCoder->resetBits();
    4757 #if MW_MVI_SIGNALLING_MODE == 1
     4626#if HHI_MPI
    47584627    if( pcCU->getTextureModeDepth( 0 ) == -1 )
    47594628    {
     
    47724641    }
    47734642#endif
     4643#if HHI_INTER_VIEW_RESIDUAL_PRED
    47744644    m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );
    4775 #if MW_MVI_SIGNALLING_MODE == 1
     4645#endif
     4646#if HHI_MPI
    47764647    }
    47774648#endif
     
    47804651    pcCU->getTotalBits()       = uiBits;
    47814652    pcCU->getTotalDistortion() = uiDistortion;
    4782     //GT VSO
     4653
     4654#if HHI_VSO
    47834655    if ( m_pcRdCost->getUseLambdaScaleVSO() )
    47844656    {
     
    47864658    }
    47874659    else
     4660#endif
    47884661    {
    47894662      pcCU->getTotalCost() = m_pcRdCost->calcRdCost( uiBits, uiDistortion );
    47904663    }
    4791     //GT VSO end
    47924664
    47934665    if( m_bUseSBACRD )
     
    47974669    pcCU->setTrIdxSubParts( 0, 0, pcCU->getDepth(0) );
    47984670
     4671#if HHI_VSO
    47994672    // set Model
    48004673    if( m_pcRdCost->getUseRenModel() )
     
    48044677      m_pcRdCost->setRenModelData( pcCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
    48054678    }
     4679#endif
    48064680
    48074681    return;
     
    48284702  pcYuvPred->copyToPartYuv( rpcYuvRec, 0 );
    48294703
     4704#if HHI_INTER_VIEW_RESIDUAL_PRED
    48304705  // add residual prediction
    48314706  if( pcCU->getResPredFlag( 0 ) )
     
    48334708    rpcYuvRec->add( rpcYuvResPrd, uiWidth, uiHeight );
    48344709  }
    4835   #if SB_INTERVIEW_SKIP
     4710#endif
     4711#if HHI_INTERVIEW_SKIP
    48364712  if( bSkipRes)
    48374713  {
     
    48584734
    48594735    Dist uiZeroDistortion = 0;
    4860 //GT VSO
     4736#if HHI_VSO
    48614737    if ( m_pcRdCost->getUseVSO() )
    48624738    {
    48634739      m_cYuvRecTemp.create( pcYuvPred->getWidth(), pcYuvPred->getHeight()  );
    48644740    }
     4741#endif
    48654742
    48664743    xEstimateResidualQT( pcCU, 0, 0, pcYuvOrg, rpcYuvRec, rpcYuvResi,  pcCU->getDepth(0), dCost, uiBits, uiDistortion, &uiZeroDistortion );
    48674744
     4745#if HHI_VSO
    48684746    if ( m_pcRdCost->getUseVSO() )
    48694747    {
    48704748      m_cYuvRecTemp.destroy();
    48714749    }
    4872 //GT VSO end
     4750#endif
     4751
    48734752
    48744753    double dZeroCost;
     4754#if HHI_VSO
    48754755    if( m_pcRdCost->getUseLambdaScaleVSO() )
    48764756    {
     
    48784758    }
    48794759    else
     4760#endif
    48804761    {
    48814762      dZeroCost = m_pcRdCost->calcRdCost( 0, uiZeroDistortion );
     
    49264807
    49274808    Double dExactCost;
     4809#if HHI_VSO
    49284810    if( m_pcRdCost->getUseLambdaScaleVSO() )
    49294811    {
     
    49314813    }
    49324814    else
     4815#endif
    49334816    {
    49344817      dExactCost = m_pcRdCost->calcRdCost( uiBits, uiDistortion );
     
    49704853    }
    49714854
     4855#if HHI_VSO
    49724856    // reset Model
    49734857    if( m_pcRdCost->getUseRenModel() )
     
    49774861      m_pcRdCost->setRenModelData( pcCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
    49784862    }
     4863#endif
    49794864  }
    49804865
     
    50024887  // update with clipped distortion and cost (qp estimation loop uses unclipped values)
    50034888
    5004   //GT VSO
     4889#if HHI_VSO
    50054890  if ( m_pcRdCost->getUseVSO() )
    50064891  {
    5007   #if GERHARD_VQM_XCHECK
    5008     UInt uiDistortionBest1 = m_pcRdCost->getDistVS  ( pcCU, 0, rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(),  pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(),  uiWidth,      uiHeight, false, 0    );
    5009     UInt uiDistortionBest2 = m_pcRdCost->getDistPart( rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(),  pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(),  uiWidth,      uiHeight      );
    5010     assert( uiDistortionBest1 == uiDistortionBest2 );
    5011   #endif
    50124892    uiDistortionBest = m_pcRdCost->getDistVS  ( pcCU, 0, rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(),  pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(),  uiWidth,      uiHeight, false, 0    );
    50134893  }
    50144894  else
     4895#endif
    50154896  {
    50164897    uiDistortionBest = m_pcRdCost->getDistPart( rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(),  pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(),  uiWidth,      uiHeight      )
     
    50184899    + m_pcRdCost->getDistPart( rpcYuvRec->getCrAddr(),   rpcYuvRec->getCStride(), pcYuvOrg->getCrAddr(),   pcYuvOrg->getCStride(), uiWidth >> 1, uiHeight >> 1 );
    50194900  }
    5020 //GT VSO end
    5021 
    5022 //GT VSO
     4901
     4902#if HHI_VSO
    50234903  if ( m_pcRdCost->getUseLambdaScaleVSO() )
    50244904  {
     
    50264906  }
    50274907  else
     4908#endif
    50284909  {
    50294910    dCostBest = m_pcRdCost->calcRdCost( uiBitsBest, uiDistortionBest );
    50304911  }
    5031 //GT VSO end
    50324912
    50334913  pcCU->getTotalBits()       = uiBitsBest;
     
    50444924
    50454925  // set Model
     4926#if HHI_VSO
    50464927  if( m_pcRdCost->getUseRenModel() )
    50474928  {
     
    50504931    m_pcRdCost->setRenModelData( pcCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
    50514932  }
     4933#endif
    50524934}
    50534935
     
    51675049    ::memset( m_pTempPel, 0, sizeof( Pel ) * uiNumSamplesLuma ); // not necessary needed for inside of recursion (only at the beginning)
    51685050
     5051#if HHI_VSO
    51695052    if ( m_pcRdCost->getUseVSO() )
    51705053    {
    51715054      uiDistY = m_pcRdCost->getDistVS  ( pcCU, uiAbsPartIdx, pcPred->getLumaAddr( uiAbsPartIdx ), pcPred->getStride(), pcOrg->getLumaAddr( uiAbsPartIdx), pcOrg->getStride(), 1<< uiLog2TrSize, 1<< uiLog2TrSize, false, 0 ); // initialized with zero residual distortion
    5172 
    5173   #if GERHARD_VQM_XCHECK
    5174       UInt uiDist1 = m_pcRdCost->getDistPart( pcOrg->getLumaAddr( uiAbsPartIdx), pcOrg->getStride(), pcPred->getLumaAddr( uiAbsPartIdx ), pcPred->getStride(), 1<< uiLog2TrSize, 1<< uiLog2TrSize ); // initialized with zero residual distortion
    5175       UInt uiDist2  = m_pcRdCost->getDistPart( m_pTempPel, 1<< uiLog2TrSize, pcResi->getLumaAddr( uiAbsPartIdx ), pcResi->getStride(), 1<< uiLog2TrSize, 1<< uiLog2TrSize ); // initialized with zero residual distortion
    5176       assert( uiDist1 == uiDist2 );
    5177   #endif
    51785055    }
    51795056    else
     5057#endif
    51805058    {
    51815059#if IBDI_DISTORTION
     
    51855063#endif
    51865064    }
    5187 //GT VSO end
     5065
    51885066
    51895067    if ( puiZeroDist )
     
    52035081      Dist uiNonzeroDistY;
    52045082
    5205       //GT VSO
     5083#if HHI_VSO     
    52065084      if ( m_pcRdCost->getUseVSO() )
    52075085      {
     
    52095087        uiNonzeroDistY = m_pcRdCost->getDistVS( pcCU, uiAbsPartIdx, m_cYuvRecTemp.getLumaAddr(uiAbsPartIdx), m_cYuvRecTemp.getStride(),
    52105088                                                pcOrg->getLumaAddr( uiAbsPartIdx ), pcOrg->getStride(), 1<< uiLog2TrSize,   1<< uiLog2TrSize, false, 0 );
    5211 
    5212   #if GERHARD_VQM_XCHECK
    5213         UInt uiDist1 = m_pcRdCost->getDistPart( m_cYuvRecTemp.getLumaAddr(uiAbsPartIdx), m_cYuvRecTemp.getStride(),
    5214                                                 pcOrg->getLumaAddr( uiAbsPartIdx ), pcOrg->getStride(), 1<< uiLog2TrSize,    1<< uiLog2TrSize );
    5215 
    5216         UInt uiDist2 = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( uiAbsPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),
    5217                                                 pcResi->getLumaAddr( uiAbsPartIdx ), pcResi->getStride(), 1<< uiLog2TrSize,    1<< uiLog2TrSize );
    5218         assert( uiDist1 == uiDist2);
    5219   #endif
    52205089      }
    52215090      else
     5091#endif
    52225092      {
    52235093        uiNonzeroDistY = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( uiAbsPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),
    52245094                                                  pcResi->getLumaAddr( uiAbsPartIdx ), pcResi->getStride(), 1<< uiLog2TrSize,    1<< uiLog2TrSize );
    52255095      }
    5226       //GT VSO end
    52275096
    52285097      Double dSingleCostY;
    52295098      Double dNullCostY;
    52305099
    5231       //GT VSO
     5100#if HHI_VSO     
    52325101      if ( m_pcRdCost->getUseLambdaScaleVSO())
    52335102      {
     
    52365105      }
    52375106      else
     5107#endif
    52385108      {
    52395109        dSingleCostY = m_pcRdCost->calcRdCost( uiSingleBitsY, uiNonzeroDistY );
    52405110        dNullCostY   = m_pcRdCost->calcRdCost( 0, uiDistY );
    52415111      }
    5242       //GT VSO end
    52435112
    52445113
     
    54065275
    54075276    uiSingleDist = uiDistY + uiDistU + uiDistV;
    5408 //GT VSO
     5277#if HHI_VSO
    54095278    if ( m_pcRdCost->getUseLambdaScaleVSO())
    54105279    {
     
    54125281    }
    54135282    else
     5283#endif
    54145284    {
    54155285      dSingleCost = m_pcRdCost->calcRdCost( uiSingleBits, uiSingleDist );
    54165286    }
    5417 //GT VSO end
    54185287  }
    54195288
     
    54675336    uiSubdivBits = m_pcEntropyCoder->getNumberOfWrittenBits();
    54685337
    5469 //GT VSO
     5338#if HHI_VSO
    54705339    if ( m_pcRdCost->getUseLambdaScaleVSO())
    54715340    {
     
    54735342    }
    54745343    else
     5344#endif
    54755345    {
    54765346      dSubdivCost  = m_pcRdCost->calcRdCost( uiSubdivBits, uiSubdivDist );
    54775347    }
    5478 //GT VSO end
    54795348
    54805349    if( uiYCbf || uiUCbf || uiVCbf || !bCheckFull )
     
    54955364  }
    54965365
     5366#if HHI_VSO
    54975367  if ( m_pcRdCost->getUseRenModel() )
    54985368  {
     
    55155385      uiSrcStride = pcPred->getStride  ();
    55165386    }
     5387
    55175388    m_pcRdCost->setRenModelData( pcCU, uiAbsPartIdx, piSrc, (Int) uiSrcStride, (Int) uiWidth, (Int) uiHeight );
    55185389  }
     5390#endif
    55195391
    55205392  rdCost += dSingleCost;
     
    57625634  if ( pcCU->isSkipped( 0 ) )
    57635635  {
    5764 #if MW_MVI_SIGNALLING_MODE == 0
    5765     assert( pcCU->getTextureModeDepth( 0 ) == -1 );
    5766 #elif MW_MVI_SIGNALLING_MODE == 1
     5636#if HHI_MPI
    57675637    if( pcCU->getTextureModeDepth( 0 ) != -1 )
    57685638    {
     
    57875657    }
    57885658#endif
     5659#if HHI_INTER_VIEW_RESIDUAL_PRED
    57895660    m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );
     5661#endif
    57905662    ruiBits += m_pcEntropyCoder->getNumberOfWrittenBits();
    57915663  }
     
    57935665  {
    57945666    m_pcEntropyCoder->resetBits();
    5795 #if MW_MVI_SIGNALLING_MODE == 1
     5667#if HHI_MPI
    57965668    if( pcCU->getTextureModeDepth( 0 ) == -1 )
    57975669    {
    57985670#endif
    5799     m_pcEntropyCoder->encodeSkipFlag ( pcCU, 0, true );
     5671      m_pcEntropyCoder->encodeSkipFlag ( pcCU, 0, true );
    58005672#if HHI_MRG_SKIP
    5801     if (pcCU->getPredictionMode(0) == MODE_SKIP)
    5802     {
    5803       pcCU->setPredModeSubParts( MODE_INTER, 0, pcCU->getDepth(0) );
    5804     }
    5805 #endif
    5806 #if MW_MVI_SIGNALLING_MODE == 0
    5807     if( pcCU->getTextureModeDepth( 0 ) == -1 )
    5808     {
     5673      if (pcCU->getPredictionMode(0) == MODE_SKIP)
     5674      {
     5675        pcCU->setPredModeSubParts( MODE_INTER, 0, pcCU->getDepth(0) );
     5676      }
    58095677#endif
    58105678      m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
     
    58125680      m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
    58135681
     5682#if HHI_INTER_VIEW_RESIDUAL_PRED
    58145683      m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );
    5815     }
     5684#endif
     5685#if HHI_MPI
     5686    }
     5687#endif
    58165688    m_pcEntropyCoder->encodeCoeff   ( pcCU, 0, pcCU->getDepth(0), pcCU->getWidth(0), pcCU->getHeight(0) );
    58175689
  • trunk/source/Lib/TLibEncoder/TEncSearch.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    71104 
    72105
    73 //GT VSO
     106#if HHI_VSO
    74107  TComYuv         m_cYuvRecTemp;
    75 //GT VSO end
     108#endif
    76109 
    77110  // AMVP cost computation
     
    104137 
    105138#if (!REFERENCE_SAMPLE_PADDING)
    106 #if HHI_DMM_INTRA
     139#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    107140  Bool predIntraLumaDirAvailable( UInt uiMode, UInt uiWidthBit, Bool bAboveAvail, Bool bLeftAvail, UInt uiWidth, UInt uiHeight, TComDataCU* pcCU, UInt uiAbsPartIdx );
    108141#else
     
    111144#endif
    112145
    113 #if HHI_DMM_INTRA
     146#if HHI_DMM_WEDGE_INTRA
    114147  Void xSearchWedgeFullMinDist   ( TComDataCU* pcCU, UInt uiAbsPtIdx, WedgeList* pacWedgeList, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx );
    115148  Void xSearchWedgePredDirMinDist( TComDataCU* pcCU, UInt uiAbsPtIdx, WedgeList* pacWedgeList, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, Int& riWedgeDeltaEnd );
    116 
     149#endif
     150#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    117151  Void xGetWedgeDeltaDCsMinDist  ( TComWedgelet* pcWedgelet,
    118152                                   TComDataCU*   pcCU,
     
    170204                                  Dist        uiPreCalcDistC );
    171205 
    172 #if HHI_DMM_INTRA
     206#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    173207  Bool predIntraLumaDMMAvailable( UInt         uiMode,
    174                                   Bool         bAboveAvail,
    175                                   Bool         bLeftAvail,
    176208                                  UInt         uiWidth,
    177                                   UInt         uiHeight,
    178                                   TComDataCU*  pcCU,
    179                                   UInt         uiAbsPartIdx );
     209                                  UInt         uiHeight );
     210#endif
     211#if HHI_DMM_WEDGE_INTRA
    180212  Void findWedgeFullMinDist     ( TComDataCU*  pcCU,
    181213                                  UInt         uiAbsPtIdx,
     
    205237                                  Bool         bLeft,
    206238                                  WedgeDist    eWedgeDist );
     239#endif
     240#if HHI_DMM_PRED_TEX
    207241  Void findWedgeTexMinDist      ( TComDataCU*  pcCU,
    208242                                  UInt         uiAbsPtIdx,
     
    217251                                  Bool         bAbove,
    218252                                  Bool         bLeft,
    219                                   WedgeDist    eWedgeDist );
     253                                  WedgeDist    eWedgeDist,
     254                                  Pel*         piTextureRef = NULL );
     255
    220256  Void findContourPredTex       ( TComDataCU*  pcCU,
    221257                                  UInt         uiAbsPtIdx,
     
    228264                                  Int&         riDeltaDC2,
    229265                                  Bool         bAbove,
    230                                   Bool         bLeft );
    231 
     266                                  Bool         bLeft,
     267                                  Pel*         piTextureRef = NULL );
    232268#endif
    233269 
     
    286322                                    Bool         bLuma,
    287323                                    Bool         bChroma,
    288                                     Bool         bRealCoeff );
     324                                    Bool         bRealCoeff
     325                                  );
    289326 
    290327  Void  xIntraCodingLumaBlk       ( TComDataCU*  pcCU,
     
    295332                                    TComYuv*     pcResiYuv,
    296333                                    Dist&        ruiDist
    297 #if DMM_RES_CHECK_INTRA
    298                                     ,
    299                                     Bool         bCheckNoRes = false
    300 #endif
    301334                                   );
    302 
    303 #if DMM_RES_CHECK_INTRA
    304   Void  xSetIntraNoResi           ( TComDataCU* pcCU,
    305                                     UInt        uiTrDepth,
    306                                     UInt        uiAbsPartIdx,
    307                                     TComYuv*    pcPredYuv,
    308                                     TComYuv*    pcResiYuv,
    309                                     Bool        bNoRes
    310                                    );
    311 #endif
    312335
    313336  Void  xIntraCodingChromaBlk     ( TComDataCU*  pcCU,
  • trunk/source/Lib/TLibEncoder/TEncSeqStructure.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibEncoder/TEncSeqStructure.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    841#include <vector>
    942
    10 //SB
    1143#include <map>
    1244
  • trunk/source/Lib/TLibEncoder/TEncSlice.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    1649  m_apcPicYuvPred = NULL;
    1750  m_apcPicYuvResi = NULL;
    18  
     51
    1952  m_pdRdPicLambda = NULL;
    2053  m_pdRdPicQp     = NULL;
     
    3467    m_apcPicYuvPred->create( iWidth, iHeight, iMaxCUWidth, iMaxCUHeight, uhTotalDepth );
    3568  }
    36  
     69
    3770  // create residual picture
    3871  if( m_apcPicYuvResi == NULL )
     
    5285    m_apcPicYuvPred  = NULL;
    5386  }
    54  
     87
    5588  // destroy residual picture
    5689  if ( m_apcPicYuvResi )
     
    6093    m_apcPicYuvResi  = NULL;
    6194  }
    62  
     95
    6396  // free lambda and QP arrays
    6497  if ( m_pdRdPicLambda ) { xFree( m_pdRdPicLambda ); m_pdRdPicLambda = NULL; }
     
    71104  m_pcCfg             = pcEncTop;
    72105  m_pcListPic         = pcEncTop->getListPic();
    73  
    74   //SB
     106
    75107  m_pcPicEncoder      = pcEncTop->getPicEncoder();
    76108  m_pcCuEncoder       = pcEncTop->getCuEncoder();
    77109  m_pcPredSearch      = pcEncTop->getPredSearch();
    78  
     110
    79111  m_pcEntropyCoder    = pcEncTop->getEntropyCoder();
    80112  m_pcCavlcCoder      = pcEncTop->getCavlcCoder();
     
    82114  m_pcBinCABAC        = pcEncTop->getBinCABAC();
    83115  m_pcTrQuant         = pcEncTop->getTrQuant();
    84  
     116
    85117  m_pcBitCounter      = pcEncTop->getBitCounter();
    86118  m_pcRdCost          = pcEncTop->getRdCost();
    87119  m_pppcRDSbacCoder   = pcEncTop->getRDSbacCoder();
    88120  m_pcRDGoOnSbacCoder = pcEncTop->getRDGoOnSbacCoder();
    89  
     121
    90122  // create lambda and QP arrays
    91123  m_pdRdPicLambda     = (Double*)xMalloc( Double, m_pcCfg->getDeltaQpRD() * 2 + 1 );
     
    111143  Double dQP;
    112144  Double dLambda;
    113  
     145
    114146  rpcSlice = pcPic->getSlice(0);
    115147  rpcSlice->setSliceBits(0);
     
    117149  rpcSlice->initSlice();
    118150  rpcSlice->setPOC( pcPic->getPOC() );
    119  
     151
    120152  // slice type
    121153  SliceType eSliceType  = pcPic->getSliceType()  ;
    122154  rpcSlice->setSliceType    ( eSliceType );
    123  
     155
    124156  // ------------------------------------------------------------------------------------------------------------------
    125157  // Non-referenced frame marking
    126158  // ------------------------------------------------------------------------------------------------------------------
    127  
     159
    128160  rpcSlice->setReferenced(pcPic->getReferenced()) ;
    129  
     161
    130162  // ------------------------------------------------------------------------------------------------------------------
    131163  // QP setting
     
    133165
    134166  Double dOrigQP = double(pcPic->getQP());
    135  
     167
    136168  // ------------------------------------------------------------------------------------------------------------------
    137169  // Lambda computation
    138170  // ------------------------------------------------------------------------------------------------------------------
    139  
     171
    140172  Int iQP;
    141173
     
    149181    // compute QP value
    150182    dQP = dOrigQP + ((iDQpIdx+1)>>1)*(iDQpIdx%2 ? -1 : 1);
    151    
     183
    152184    // compute lambda value
    153185    Int    NumberBFrames = ( m_pcCfg->getRateGOPSize() - 1 );
     
    206238    // if hadamard is used in ME process
    207239    if ( !m_pcCfg->getUseHADME() ) dLambda *= 0.95;
    208    
     240
    209241    iQP = Max( MIN_QP, Min( MAX_QP, (Int)floor( dQP + 0.5 ) ) );
    210    
     242
    211243    m_pdRdPicLambda[iDQpIdx] = dLambda;
    212244    m_pdRdPicQp    [iDQpIdx] = dQP;
    213245    m_piRdPicQp    [iDQpIdx] = iQP;
    214246  }
    215  
     247
    216248  // obtain dQP = 0 case
    217249  dLambda = m_pdRdPicLambda[0];
    218250  dQP     = m_pdRdPicQp    [0];
    219251  iQP     = m_piRdPicQp    [0];
    220  
     252
    221253  // store lambda
    222 //GT VSO
    223   m_pcRdCost->setUseLambdaScaleVSO  ( (m_pcCfg->getUseVSO() ||  m_pcCfg->getForceLambdaScaleVSO()) && m_pcCfg->isDepthCoder()  );   
    224   m_pcRdCost->setLambdaVSO( dLambda * m_pcCfg->getLambdaScaleVSO() ); 
    225 //GT VSO end
     254#if HHI_VSO
     255  m_pcRdCost->setUseLambdaScaleVSO  ( (m_pcCfg->getUseVSO() ||  m_pcCfg->getForceLambdaScaleVSO()) && m_pcCfg->isDepthCoder()  );
     256  m_pcRdCost->setLambdaVSO( dLambda * m_pcCfg->getLambdaScaleVSO() );
     257#endif
    226258
    227259  m_pcRdCost ->setLambda      ( dLambda );
    228260  m_pcTrQuant->setLambda      ( dLambda );
    229261  rpcSlice   ->setLambda      ( dLambda );
     262#if HHI_INTER_VIEW_MOTION_PRED
    230263  m_pcRdCost ->setLambdaMVReg ( dLambda * m_pcCfg->getMultiviewMvRegLambdaScale() );
    231  
     264#endif
     265
    232266//#if HB_LAMBDA_FOR_LDC
    233267//  // restore original slice type
     
    237271//  }
    238272//  eSliceType = (iPOCLast == 0 || uiPOCCurr % m_pcCfg->getIntraPeriod() == 0 || m_pcGOPEncoder->getGOPSize() == 0) ? I_SLICE : eSliceType;
    239 // 
     273//
    240274//  rpcSlice->setSliceType        ( eSliceType );
    241275//#endif
    242  
     276
    243277  rpcSlice->setSliceQp          ( iQP );
    244278  rpcSlice->setSliceQpDelta     ( 0 );
    245279  rpcSlice->setNumRefIdx        ( REF_PIC_LIST_0, eSliceType == I_SLICE ? 0 : pcPic->getNumRefs(REF_PIC_LIST_0) ) ;
    246280  rpcSlice->setNumRefIdx        ( REF_PIC_LIST_1, eSliceType == I_SLICE ? 0 : pcPic->getNumRefs(REF_PIC_LIST_1) ) ;
    247  
     281
    248282  rpcSlice->setSymbolMode       ( m_pcCfg->getSymbolMode());
    249283  rpcSlice->setLoopFilterDisable( m_pcCfg->getLoopFilterDisable() );
    250  
     284
    251285  rpcSlice->setDepth            ( 0 );
    252286  rpcSlice->setViewIdx          ( pcPic->getViewIdx() );
     
    256290  assert( m_apcPicYuvPred );
    257291  assert( m_apcPicYuvResi );
    258  
     292
    259293  pcPic->setPicYuvPred( m_apcPicYuvPred );
    260294  pcPic->setPicYuvResi( m_apcPicYuvResi );
     
    277311  Int iMaxSR = m_pcCfg->getSearchRange();
    278312  Int iNumPredDir = pcSlice->isInterP() ? 1 : 2;
    279  
     313
    280314  for (Int iDir = 0; iDir <= iNumPredDir; iDir++)
    281315  {
     
    299333  // if deltaQP RD is not used, simply return
    300334  if ( m_pcCfg->getDeltaQpRD() == 0 ) return;
    301  
     335
    302336  TComSlice* pcSlice        = rpcPic->getSlice(getSliceIdx());
    303337  Double     dPicRdCostBest = MAX_DOUBLE;
     
    306340  UInt64     uiPicBitsBest;
    307341  UInt       uiQpIdxBest = 0;
    308  
     342
    309343  Double dFrameLambda;
    310344#if FULL_NBIT
     
    313347  Int    SHIFT_QP = 12;
    314348#endif
    315  
     349
    316350  // set frame lambda
    317351  if (m_pcCfg->getGOPSize() > 1)
     
    324358  }
    325359  m_pcRdCost      ->setFrameLambda(dFrameLambda);
    326   m_pcRdCost      ->setFrameLambdaVSO( dFrameLambda * m_pcCfg->getLambdaScaleVSO() );
    327  
     360#if HHI_VSO
     361  m_pcRdCost      ->setFrameLambdaVSO( dFrameLambda * m_pcCfg->getLambdaScaleVSO() );
     362#endif
     363
    328364  // for each QP candidate
    329365  for ( UInt uiQpIdx = 0; uiQpIdx < 2 * m_pcCfg->getDeltaQpRD() + 1; uiQpIdx++ )
     
    333369    m_pcTrQuant   ->setLambda              ( m_pdRdPicLambda[uiQpIdx] );
    334370    pcSlice       ->setLambda              ( m_pdRdPicLambda[uiQpIdx] );
     371#if HHI_INTER_VIEW_MOTION_PRED
    335372    m_pcRdCost    ->setLambdaMVReg         ( m_pdRdPicLambda[uiQpIdx] * m_pcCfg->getMultiviewMvRegLambdaScale() );
    336    
     373#endif
     374
    337375    // try compress
    338376    compressSlice   ( rpcPic );
    339    
     377
    340378    Double dPicRdCost;
    341379    UInt64 uiPicDist        = m_uiPicDist;
    342380    UInt64 uiALFBits        = 0;
    343    
     381
    344382    m_pcPicEncoder->preLoopFilterPicAll( rpcPic, uiPicDist, uiALFBits );
    345    
     383
    346384    // compute RD cost and choose the best
    347385    dPicRdCost = m_pcRdCost->calcRdCost64( m_uiPicTotalBits + uiALFBits, uiPicDist, true, DF_SSE_FRAME);
    348    
     386
    349387    if ( dPicRdCost < dPicRdCostBest )
    350388    {
     
    352390      dPicRdCostBest = dPicRdCost;
    353391      dSumCURdCostBest = m_dPicRdCost;
    354      
     392
    355393      uiPicBitsBest = m_uiPicTotalBits + uiALFBits;
    356394      uiPicDistBest = uiPicDist;
    357395    }
    358396  }
    359  
     397
    360398  // set best values
    361399  pcSlice       ->setSliceQp             ( m_piRdPicQp    [uiQpIdxBest] );
     
    363401  m_pcTrQuant   ->setLambda              ( m_pdRdPicLambda[uiQpIdxBest] );
    364402  pcSlice       ->setLambda              ( m_pdRdPicLambda[uiQpIdxBest] );
     403#if HHI_INTER_VIEW_MOTION_PRED
    365404  m_pcRdCost    ->setLambdaMVReg         ( m_pdRdPicLambda[uiQpIdxBest] * m_pcCfg->getMultiviewMvRegLambdaScale() );
     405#endif
    366406}
    367407
     
    377417  TComSlice* pcSlice            = rpcPic->getSlice(getSliceIdx());
    378418  xDetermineStartAndBoundingCUAddr ( uiStartCUAddr, uiBoundingCUAddr, rpcPic, false );
    379  
     419
    380420#ifdef WEIGHT_PRED
    381421  //------------------------------------------------------------------------------
     
    411451  m_dPicRdCost      = 0;
    412452  m_uiPicDist       = 0;
    413  
     453
    414454  // set entropy coder
    415455  if( m_pcCfg->getUseSBACRD() )
     
    430470    m_pcEntropyCoder->setBitstream    ( m_pcBitCounter );
    431471  }
    432  
     472
    433473  // initialize ALF parameters
    434474  m_pcEntropyCoder->setAlfCtrl(false);
    435475  m_pcEntropyCoder->setMaxAlfCtrlDepth(0); //unnecessary
    436  
     476
    437477  // for every CU in slice
    438478  for(  uiCUAddr = uiStartCUAddr; uiCUAddr < uiBoundingCUAddr; uiCUAddr++  )
     
    443483    TComDataCU*& pcCU = rpcPic->getCU( uiCUAddr );
    444484    pcCU->initCU( rpcPic, uiCUAddr );
    445    
     485
    446486    // if RD based on SBAC is used
    447487    if( m_pcCfg->getUseSBACRD() )
     
    450490      m_pcEntropyCoder->setEntropyCoder ( m_pcRDGoOnSbacCoder, pcSlice );
    451491      m_pcEntropyCoder->setBitstream    ( m_pcBitCounter );
    452      
     492
    453493      // run CU encoder
    454494      m_pcCuEncoder->compressCU( pcCU );
    455      
     495
    456496      // restore entropy coder to an initial stage
    457497      m_pcEntropyCoder->setEntropyCoder ( m_pppcRDSbacCoder[0][CI_CURR_BEST], pcSlice );
    458498      m_pcEntropyCoder->setBitstream    ( m_pcBitCounter );
    459499      pppcRDSbacCoder->setBinCountingEnableFlag( true );
    460      
     500
    461501      m_pcCuEncoder->encodeCU( pcCU );
    462502
     
    474514        break;
    475515      }
    476      
     516
    477517      UInt uiBinsCoded = pppcRDSbacCoder->getBinsCoded();
    478518      if (m_pcCfg->getEntropySliceMode()==SHARP_MULTIPLE_CONSTRAINT_BASED_ENTROPY_SLICE && uiBinsCoded > m_pcCfg->getEntropySliceArgument())
     
    494534      m_pcCavlcCoder ->setAdaptFlag(true);
    495535      m_pcCuEncoder->encodeCU( pcCU );
    496      
     536
    497537      uiBitsCoded += m_pcBitCounter->getNumberOfWrittenBits();
    498538      if (m_pcCfg->getSliceMode()==AD_HOC_SLICES_FIXED_NUMBER_OF_BYTES_IN_SLICE && ( ( pcSlice->getSliceBits() + uiBitsCoded ) >> 3 ) > m_pcCfg->getSliceArgument())
     
    521561      m_pcCavlcCoder ->setAdaptFlag(false);
    522562    }
    523    
     563
    524564    m_uiPicTotalBits += pcCU->getTotalBits();
    525565    m_dPicRdCost     += pcCU->getTotalCost();
     
    556596    m_pcEntropyCoder->resetEntropy();
    557597  }
    558  
     598
    559599  // set bitstream
    560600  m_pcEntropyCoder->setBitstream( rpcBitstream );
     
    588628#if ENC_DEC_TRACE
    589629    g_bJustDoIt = g_bEncDecTraceDisable;
    590 #endif   
     630#endif
    591631  }
    592632}
     
    603643  UInt uiNumberOfCUsInFrame = rpcPic->getNumCUsInFrame();
    604644  uiBoundingCUAddrSlice     = uiNumberOfCUsInFrame;
    605   if (bEncodeSlice) 
     645  if (bEncodeSlice)
    606646  {
    607647    UInt uiCUAddrIncrement;
     
    620660      uiBoundingCUAddrSlice    = uiNumberOfCUsInFrame;
    621661      break;
    622     } 
     662    }
    623663    pcSlice->setSliceCurEndCUAddr( uiBoundingCUAddrSlice );
    624664  }
     
    636676      uiBoundingCUAddrSlice    = uiNumberOfCUsInFrame;
    637677      break;
    638     } 
     678    }
    639679    pcSlice->setSliceCurEndCUAddr( uiBoundingCUAddrSlice );
    640680  }
     
    644684  uiStartCUAddrEntropySlice    = pcSlice->getEntropySliceCurStartCUAddr();
    645685  uiBoundingCUAddrEntropySlice = uiNumberOfCUsInFrame;
    646   if (bEncodeSlice) 
     686  if (bEncodeSlice)
    647687  {
    648688    UInt uiCUAddrIncrement;
     
    661701      uiBoundingCUAddrEntropySlice    = uiNumberOfCUsInFrame;
    662702      break;
    663     } 
     703    }
    664704    pcSlice->setEntropySliceCurEndCUAddr( uiBoundingCUAddrEntropySlice );
    665705  }
     
    677717      uiBoundingCUAddrEntropySlice    = uiNumberOfCUsInFrame;
    678718      break;
    679     } 
     719    }
    680720    pcSlice->setEntropySliceCurEndCUAddr( uiBoundingCUAddrEntropySlice );
    681721  }
  • trunk/source/Lib/TLibEncoder/TEncSlice.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibEncoder/TEncTop.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    5891  m_cAdaptiveLoopFilter.create( getSourceWidth(), getSourceHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    5992  m_cLoopFilter.        create( g_uiMaxCUDepth );
     93#if DEPTH_MAP_GENERATION
    6094  m_cDepthMapGenerator. create( false, getSourceWidth(), getSourceHeight(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiBitDepth + g_uiBitIncrement );
     95#endif
     96#if HHI_INTER_VIEW_RESIDUAL_PRED
    6197  m_cResidualGenerator. create( false, getSourceWidth(), getSourceHeight(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiBitDepth + g_uiBitIncrement );
     98#endif
    6299
    63100#if MQT_BA_RA && MQT_ALF_NPASS
     
    89126  }
    90127
    91 #if HHI_DMM_INTRA
    92   if( g_aacWedgeLists.empty() && m_bUseDepthModelModes && m_bIsDepth )
     128#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     129  if( g_aacWedgeLists.empty() && m_bUseDMM && m_bIsDepth )
    93130  {
    94131    initWedgeLists();
     
    119156  m_cAdaptiveLoopFilter.destroy();
    120157  m_cLoopFilter.        destroy();
     158#if DEPTH_MAP_GENERATION
    121159  m_cDepthMapGenerator. destroy();
     160#endif
     161#if HHI_INTER_VIEW_RESIDUAL_PRED
    122162  m_cResidualGenerator. destroy();
     163#endif
    123164
    124165  // SBAC RD
     
    172213
    173214  m_pcTAppEncTop = pcTAppEncTop;
     215#if DEPTH_MAP_GENERATION
    174216  m_cDepthMapGenerator.init( (TComPrediction*)this->getPredSearch(), m_pcTAppEncTop->getSPSAccess(), m_pcTAppEncTop->getAUPicAccess() );
     217#endif
     218#if HHI_INTER_VIEW_RESIDUAL_PRED
    175219  m_cResidualGenerator.init( &m_cTrQuant, &m_cDepthMapGenerator );
     220#endif
    176221
    177222  // initialize transform & quantization class
     
    254299      pcPic          = cIter->second ;
    255300
     301#if DEPTH_MAP_GENERATION
    256302      // add extra pic buffers
    257303      Bool  bNeedPrdDepthMapBuf = ( m_uiPredDepthMapGeneration > 0 );
     
    260306        pcPic->addPrdDepthMapBuffer();
    261307      }
     308#endif
    262309
    263310      // needed? dont think so
     
    323370    xGetNewPicBuffer( pcPicCurr ); //GT: assigns next POC to input pic and stores it in m_cListPic
    324371    pcPicYuvOrg->copyToPic( pcPicCurr->getPicYuvOrg() );
     372#if HHI_INTER_VIEW_MOTION_PRED
    325373    if( m_uiMultiviewMvRegMode )
    326374    {
     
    334382      AOT( pcPicCurr->getOrgDepthMap() );
    335383    }
     384#endif
    336385    m_acInputPicMap.insert( std::make_pair(pcPicCurr->getPOC(), pcPicCurr)); //GT: input pic to m_acInputPicMap
    337386    assert( m_acOutputPicMap.find( pcPicCurr->getPOC() ) == m_acOutputPicMap.end() );
     
    367416  {
    368417    pcPic->removeOriginalBuffer   ();
     418#if HHI_INTER_VIEW_MOTION_PRED
    369419    pcPic->removeOrgDepthMapBuffer();
     420#endif
     421#if HHI_INTER_VIEW_RESIDUAL_PRED
    370422    pcPic->removeResidualBuffer   ();
     423#endif
     424#if HHI_INTERVIEW_SKIP
    371425    pcPic->removeUsedPelsMapBuffer();
     426#endif
    372427  }
    373428}
     
    434489
    435490  rpcPic->addOriginalBuffer();
     491#if HHI_INTER_VIEW_MOTION_PRED
    436492  if( m_uiMultiviewMvRegMode )
    437493  {
    438494    rpcPic->addOrgDepthMapBuffer();
    439495  }
    440   if( m_bOmitUnusedBlocks )
     496#endif
     497
     498#if HHI_INTERVIEW_SKIP
     499  if( getInterViewSkip() )
    441500  {
    442501    rpcPic->addUsedPelsMapBuffer();
    443502  }
     503#endif
    444504
    445505  rpcPic->setCurrSliceIdx( 0 ); // MW
     
    470530
    471531  m_cSPS.setUseDQP        ( m_iMaxDeltaQP != 0  );
    472 #if !SB_NO_LowDelayCoding
     532#if !HHI_NO_LowDelayCoding
    473533  m_cSPS.setUseLDC        ( m_bUseLDC           );
    474534#endif
     
    486546  {
    487547    m_cSPS.initMultiviewSPSDepth    ( m_uiViewId, m_iViewOrderIdx );
     548#if DEPTH_MAP_GENERATION
    488549    m_cSPS.setPredDepthMapGeneration( m_uiViewId, true );
     550#endif
     551#if HHI_INTER_VIEW_RESIDUAL_PRED
    489552    m_cSPS.setMultiviewResPredMode  ( 0 );
     553#endif
    490554  }
    491555  else
     
    494558    if( m_uiViewId )
    495559    {
     560#if DEPTH_MAP_GENERATION
     561#if HHI_INTER_VIEW_MOTION_PRED
    496562      m_cSPS.setPredDepthMapGeneration( m_uiViewId, false, m_uiPredDepthMapGeneration, m_uiMultiviewMvPredMode, m_uiPdmPrecision, m_aaiPdmScaleNomDelta, m_aaiPdmOffset );
     563#else
     564      m_cSPS.setPredDepthMapGeneration( m_uiViewId, false, m_uiPredDepthMapGeneration, 0, m_uiPdmPrecision, m_aaiPdmScaleNomDelta, m_aaiPdmOffset );
     565#endif
     566#endif
     567#if HHI_INTER_VIEW_RESIDUAL_PRED
    497568      m_cSPS.setMultiviewResPredMode  ( m_uiMultiviewResPredMode );
     569#endif
    498570    }
    499571    else
    500572    {
     573#if DEPTH_MAP_GENERATION
    501574      m_cSPS.setPredDepthMapGeneration( m_uiViewId, false );
     575#endif
     576#if HHI_INTER_VIEW_RESIDUAL_PRED
    502577      m_cSPS.setMultiviewResPredMode  ( 0 );
     578#endif
    503579    }
    504580  }
     
    537613  m_cSPS.setUseSAO             ( m_bUseSAO         );
    538614#endif
    539 #if HHI_DMM_INTRA
    540   m_cSPS.setUseDepthModelModes( m_bUseDepthModelModes );
    541 #endif
     615#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     616  m_cSPS.setUseDMM( m_bUseDMM );
     617#endif
     618#if HHI_MPI
    542619  m_cSPS.setUseMVI( m_bUseMVI );
     620#endif
    543621
    544622  m_cSPS.setCodedPictureBufferSize( m_uiCodedPictureStoreSize );
  • trunk/source/Lib/TLibEncoder/TEncTop.h

    r2 r5  
     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-2011, 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 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
    134
    235/** \file     TEncTop.h
     
    2760#include "TEncAdaptiveLoopFilter.h"
    2861
    29 //SB
    3062#include "TEncSeqStructure.h"
    3163#include <map>
     
    71103
    72104  // processing unit
    73   // SB
    74105  TEncPic                 m_cPicEncoder;                  ///< Pic encoder
    75106  TEncSlice               m_cSliceEncoder;                ///< slice encoder
    76107  TEncCu                  m_cCuEncoder;                   ///< CU encoder
     108#if DEPTH_MAP_GENERATION
    77109  TComDepthMapGenerator   m_cDepthMapGenerator;           ///< depth map generator
     110#endif
     111#if HHI_INTER_VIEW_RESIDUAL_PRED
    78112  TComResidualGenerator   m_cResidualGenerator;           ///< generator for residual pictures
     113#endif
    79114
    80115  // SPS
     
    151186  TEncSbac***             getRDSbacCoder        () { return  m_pppcRDSbacCoder;       }
    152187  TEncSbac*               getRDGoOnSbacCoder    () { return  &m_cRDGoOnSbacCoder;     }
     188#if DEPTH_MAP_GENERATION
    153189  TComDepthMapGenerator*  getDepthMapGenerator  () { return  &m_cDepthMapGenerator;   }
     190#endif
     191#if HHI_INTER_VIEW_RESIDUAL_PRED
    154192  TComResidualGenerator*  getResidualGenerator  () { return  &m_cResidualGenerator;   }
     193#endif
    155194
    156195  TComSPS*                getSPS                () { return  &m_cSPS;                 }
     
    164203  Void                    printOutSummary       ( UInt uiNumAllPicCoded );
    165204
    166   //SB
    167205  TEncAnalyze             m_cAnalyzeAll;
    168206  TEncAnalyze             m_cAnalyzeI;
     
    179217  Void encode    ( bool bEos, std::map<PicOrderCnt, TComPicYuv*>& rcMapPicYuvRecOut, TComBitstream* pcBitstreamOut, Bool& bNewPicNeeded );
    180218  Void receivePic( bool bEos, TComPicYuv* pcPicYuvOrg, TComPicYuv* pcPicYuvRec, TComPicYuv* pcOrgPdmDepth = 0 );
    181 
    182219};
    183220
    184 
    185221#endif // __TENCTOP__
    186222
  • trunk/source/Lib/TLibEncoder/WeightPredAnalysis.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibEncoder/WeightPredAnalysis.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibRenderer/TRenFilter.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibRenderer/TRenFilter.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibRenderer/TRenImage.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibRenderer/TRenImage.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibRenderer/TRenImagePlane.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibRenderer/TRenImagePlane.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibRenderer/TRenModSetupStrParser.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibRenderer/TRenModSetupStrParser.h

    r2 r5  
    1 
    2 
     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-2011, 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 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 */
    333
    434#ifndef __TRENMODSETUPSTRPARSER__
     
    95125  Void xGetNextChar       ( Char& rcNextChar );
    96126};
     127
    97128#endif //__TRENMODEL__
  • trunk/source/Lib/TLibRenderer/TRenModel.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
     
    614647  TRenFilter::sampleDown2Tap13( ppiSrcVideoPel[2], piStrides[2], m_iWidth, m_iHeight, rpcPicYuvTarget->getCrAddr  (), rpcPicYuvTarget->getCStride() );
    615648}
    616 
    617 #if GERHARD_RM_DEBUG_MM
    618 Bool
    619 TRenModel::compareAll( TRenModel* pcModel )
    620 {
    621   Bool bEqual = true;
    622   for (Int iCurModel = 0; iCurModel < m_iNumOfRenModels; iCurModel++)
    623   {
    624     bEqual = bEqual &&  m_apcRenModels[iCurModel]->compare( pcModel->m_apcRenModels[iCurModel]  );
    625   }
    626   return bEqual;
    627 }
    628 
    629 Bool
    630 TRenModel::compare( TRenModel* pcModel )
    631 {
    632   Bool bEqual = true;
    633   for (Int iCurModel = 0; iCurModel < m_iNumOfCurRenModels; iCurModel++)
    634   {
    635     bEqual = bEqual &&  m_apcCurRenModels[iCurModel]->compare( pcModel->m_apcCurRenModels[iCurModel]  );
    636   }
    637   return bEqual;
    638 }
    639 #endif
  • trunk/source/Lib/TLibRenderer/TRenModel.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    4073  Void  getTotalSSE      (Int64& riSSEY, Int64& riSSEU, Int64& riSSEV );
    4174
    42 #if GERHARD_RM_DEBUG_MM
    43   Bool  compareAll       ( TRenModel* pcModel);
    44   Bool  compare          ( TRenModel* pcModel);
    45 public:
    46 #else
    4775private:
    48 #endif
    49 
    5076  // helpers
    5177  Void xSetLRViewAndAddModel( Int iModelNum, Int iBaseViewNum, Int iContent, Int iViewPos, Bool bAdd );
  • trunk/source/Lib/TLibRenderer/TRenSingleModel.cpp

    r2 r5  
     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-2011, 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 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
    134
    235#include "TRenImage.h"
     
    451484      if ( iCurSPos < iMinChangedSPos )
    452485      {
    453 #if GERHARD_RM_HOLE_EXT
    454         if ( (iCurSPos > 0) && (m_apiFilledRow[m_iCurViewPos][ iCurSPos-1 ] != REN_IS_FILLED) || (iCurSPos > 1) && (m_apiFilledRow[m_iCurViewPos][ iCurSPos-2 ] != REN_IS_FILLED) )
    455         {
    456           iMinChangedSPos = iMinChangedSPos - m_iHoleMargin - 2;
    457         }
    458         else
    459         {
    460486          break;
    461487        }
    462 #else
    463         break;
    464 #endif
    465       }
     488
    466489      iCurPosX--;
    467490      iLastSPos    = iCurSPos;
     
    554577      if ( iCurSPos > iMaxChangedSPos )
    555578      {
    556 #if GERHARD_RM_HOLE_EXT
    557         if ( (iCurSPos > 0) && (m_apiFilledRow[m_iCurViewPos][ iCurSPos-1 ] != REN_IS_FILLED) || (iCurSPos > 1) && (m_apiFilledRow[m_iCurViewPos][ iCurSPos-2 ] != REN_IS_FILLED) )
    558         {
    559           iMaxChangedSPos = iMaxChangedSPos - m_iHoleMargin - 2;
    560         }
    561         else
    562         {
    563579          break;
    564580        }
    565 #else
    566         break;
    567 #endif
    568       }
    569581      iCurPosX++;
    570582      iLastSPos    = iCurSPos;
     
    584596  Int iCurPosX           = iEndChangePos;
    585597
    586 #if GERHARD_RM_HOLE_EXT
    587   Int iEndFillSPos = iLastSPos + m_iHoleMargin;
    588   while ( (iCurPosX + 1 < m_iWidth) &&  ( xShift(iCurPosX + 1) <= iEndFillSPos) && !(m_apbOccludedRow[m_iCurViewPos][ iCurPosX + 1] ) )
    589     iCurPosX++;
    590 #endif
    591 
    592598  if ( ( iCurPosX + 1 < m_iWidth ) && (m_apbOccludedRow[m_iCurViewPos][ iCurPosX + 1] ) )
    593599  {
     
    615621
    616622  m_bInOcclusion = iLastSPos >= m_iLastOccludedSPos;
    617 
    618 #if GERHARD_RM_HOLE_EXT
    619   // RE-RENDER if not filled
    620   if (  (     ( ( iLastSPos < m_iLastOccludedSPos) && ( m_apiFilledRow[m_iCurViewPos][ iLastSPos ] != REN_IS_FILLED ) )))
    621   {
    622     xRemoveHoleExtL(iLastSPos, iEndChangePos+1, iError );
    623   }
    624 #endif
    625623};
    626624
     
    630628  // GET MINIMAL OCCLUDED SAMPLE POSITION
    631629  Int iCurPosX           = iStartChangePos;
    632 
    633 #if GERHARD_RM_HOLE_EXT
    634   Int iEndFillSPos = iLastSPos + m_iHoleMargin;
    635   while ( (iCurPosX + 1 < m_iWidth) &&  ( xShift(iCurPosX + 1) <= iEndFillSPos) && !(m_apbOccludedRow[m_iCurViewPos][ iCurPosX + 1] ) )
    636     iCurPosX++;
    637 #endif
    638630
    639631  if ( ( iCurPosX - 1 > -1 ) && (m_apbOccludedRow[m_iCurViewPos][ iCurPosX - 1] ) )
     
    652644      m_iLastOccludedSPos = xShift(iCurPosX) - 1;
    653645    }
    654 #if GERHARD_RM_SPLAT
    655646    m_iLastOccludedSPosFP = xRoundR( m_iLastOccludedSPos );
    656 #else
    657     m_iLastOccludedSPosFP = xRangeLeftR( m_iLastOccludedSPos );
    658 #endif
    659647  }
    660648  else
     
    665653
    666654  m_bInOcclusion = iLastSPos <= m_iLastOccludedSPos;
    667 
    668 #if GERHARD_RM_HOLE_EXT
    669   // RE-RENDER if not filled
    670   if (  (     ( ( iLastSPos < m_iLastOccludedSPos) && ( m_apiFilledRow[m_iCurViewPos][ iLastSPos ] != REN_IS_FILLED ) )))
    671   {
    672     xRemoveHoleExtL(iLastSPos, iStartChangePos+1, iError );
    673   }
    674 #endif
    675655};
    676656
     
    752732    {
    753733      m_iLastOccludedSPos = iLastSPos;
    754 #if GERHARD_RM_SPLAT
     734
    755735      Int iRightSPosFP = xRoundL( iLastSPos );
    756736      if ( ( iRightSPosFP == xRangeRightL(iLastSPos)) && (iRightSPosFP >= 0) )
     
    760740      }
    761741      m_iLastOccludedSPosFP = iRightSPosFP;
    762 #else
    763       m_iLastOccludedSPosFP = xRangeLeftL( m_iLastOccludedSPos );
    764 #endif
    765742
    766743      m_bInOcclusion = true;
     
    813790      m_iLastOccludedSPos = iLastSPos;
    814791
    815 #if GERHARD_RM_SPLAT
    816792      Int iLeftSPosFP = xRoundR( iLastSPos );
    817793      if ( ( iLeftSPosFP == xRangeLeftR(iLastSPos)) && (iLeftSPosFP <= m_iWidth - 1) )
     
    821797      }
    822798      m_iLastOccludedSPosFP = iLeftSPosFP;
    823 #endif
    824799
    825800      m_bInOcclusion = true;
     
    862837}
    863838
    864 
    865 
    866839__inline Void
    867840TRenSingleModel::xFillHoleL( Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError )
     
    874847  Int iLastPos      = iCurPos + 1;
    875848
    876 #if GERHARD_RM_HOLE_EXT
    877   Int iErrorCorrection = 0;
    878   Int iLastPosInNewData = iLastPos - m_iStartChangePosX;
    879   Int iEndFillSPos   = iLastSPos + m_iHoleMargin;
    880   ////////// Go back hole margin width and correct error  ///////
    881   while( ( (iLastPos+1) < m_iWidth) && (iLastSPos > iEndFillSPos) )
    882   {
    883     iCurPos++;
    884     iLastPos++;
    885     iLastPosInNewData++;
    886     iCurSPos = iLastSPos;
    887 
    888     iLastSPos = xShift( iLastPos, iLastPosInNewData);
    889 
    890     if ( iLastSPos < 0        ) iLastSPos = 0;
    891     if ( iLastSPos >= m_iWidth ) iLastSPos = m_iWidth-1;
    892 
    893     Int iDiff = iLastSPos - iCurSPos;
    894 
    895     // Stop if other hole begins, or if position is occluded
    896     if (iDiff > 2  || iLastSPos >= Min( iEndFillSPos, m_iLastOccludedSPos ) || iCurSPos == 0)
    897     {
    898       iCurPos--;
    899       iLastPos--;
    900       iLastPosInNewData--;
    901       iLastSPos = iCurSPos;
    902       iCurSPos = xShift( iCurPos, iLastPosInNewData-1);
    903       break;
    904     }
    905 
    906     if ( !m_bSet )
    907     {
    908       xRenderShiftedRangeL(iCurSPos, iLastSPos, iCurPos, iLastPos, iErrorCorrection );
    909     }
    910   }
    911 
    912   riError -= iErrorCorrection;
    913 
    914   ////////// Fill enlarged hole  ///////
    915 #endif
    916 
    917849  Int iStartFillSPosFP = xRangeLeftL(iStartFillSPos);
    918850
    919 #if GERHARD_RM_SPLAT
    920851  if (iStartFillSPosFP == xRoundL(iStartFillSPos))
    921852  {
    922 #endif
    923853    if ((iStartFillSPosFP >= 0) && (iStartFillSPosFP < m_iLastOccludedSPosFP) )
    924854    {
     
    926856      xSetShiftedPel     ( iStartFillPos << m_iShiftPrec, iStartFillSPosFP, REN_IS_FILLED, riError );
    927857    }
    928 #if GERHARD_RM_SPLAT
    929858  }
    930859  else
     
    932861    iStartFillSPosFP--;
    933862  }
    934 #endif
    935863
    936864  m_iThisDepth = m_iLastDepth;
     
    951879  Int iLastPos       = iCurPos - 1;
    952880
    953 
    954 #if GERHARD_RM_HOLE_EXT
    955   Int iErrorCorrection = 0;
    956   Int iLPosInNewData = iLastPos - m_iStartChangePosX;
    957   Int iEndFillSPos   = iLastSPos + m_iHoleMargin;
    958   ////////// Go back hole margin width and correct error  ///////
    959   while( ( (iLastPos+1) < m_iWidth) && (iLastSPos > iEndFillSPos) )
    960   {
    961     iCurPos++;
    962     iLastPos++;
    963     iLPosInNewData++;
    964     iCurSPos = iLastSPos;
    965 
    966     iLastSPos = xShift( iLastPos, iLPosInNewData);
    967 
    968     if ( iLastSPos < 0        ) iLastSPos = 0;
    969     if ( iLastSPos >= m_iWidth ) iLastSPos = m_iWidth-1;
    970 
    971     Int iDiff = iLastSPos - iCurSPos;
    972 
    973     // Stop if other hole begins, or if position is occluded
    974     if (iDiff > 2  || iLastSPos >= Min( iEndFillSPos, m_iLastOccludedSPos ) || iCurSPos == 0)
    975     {
    976       iCurPos--;
    977       iLastPos--;
    978       iLPosInNewData--;
    979       iLastSPos = iCurSPos;
    980       iCurSPos = xShift( iCurPos, iLPosInNewData-1);
    981       break;
    982     }
    983 
    984     if ( !m_bSet )
    985     {
    986       xRenderShiftedRangeL(iCurSPos, iLastSPos, iCurPos, iLastPos, iErrorCorrection );
    987     }
    988   }
    989 
    990   riError -= iErrorCorrection;
    991 
    992   ////////// Fill enlarged hole  ///////
    993 #endif
    994 
    995881  Int iStartFillSPosFP = xRangeRightR(iStartFillSPos);
    996882
    997 #if GERHARD_RM_SPLAT
    998883  if (iStartFillSPosFP == xRoundR(iStartFillSPos))
    999884  {
    1000 #endif
    1001885    if ((iStartFillSPosFP < m_iWidth) && (iStartFillSPosFP > m_iLastOccludedSPosFP) )
    1002886    {
     
    1004888      xSetShiftedPel( iEndFillPos << m_iShiftPrec, iStartFillSPosFP, REN_IS_FILLED, riError );
    1005889    }
    1006 #if GERHARD_RM_SPLAT
    1007890  }
    1008891  else
     
    1010893    iStartFillSPosFP++;
    1011894  }
    1012 #endif
    1013895
    1014896  m_iThisDepth = m_iLastDepth;
     
    1018900  }
    1019901}
    1020 
    1021 #if GERHARD_RM_HOLE_EXT
    1022 Void TRenSingleModel::xRemoveHoleExtL( Int iShiftedLeftPos,  Int iLeftPos, Int& riError )
    1023 {
    1024   if (iShiftedLeftPos < 0 || iShiftedLeftPos == (m_iWidth - 1) )
    1025     return;
    1026 
    1027   Int iStartRemovePos      = iLeftPos;
    1028   Int iEndRemoveSPos = iShiftedLeftPos + m_iHoleMargin;
    1029   Int iRightPos            = iLeftPos + 1;
    1030 
    1031   Int iShiftedRightPos;
    1032 
    1033   ////////// Go back hole margin width ///////
    1034   while(  iRightPos  < m_iWidth )
    1035   {
    1036     iShiftedRightPos = xShift(iRightPos);
    1037 
    1038     if ( iShiftedRightPos < 0         ) iShiftedRightPos = 0;
    1039     if ( iShiftedRightPos >= m_iWidth ) iShiftedRightPos = m_iWidth-1;
    1040 
    1041     Int iDiff = iShiftedRightPos - iShiftedLeftPos;
    1042 
    1043     // Stop if other hole begins, or if position is occluded
    1044     if ( iDiff > 2 || iShiftedRightPos >= m_iLastOccludedSPos )
    1045     {
    1046       // Go back one
    1047       iShiftedRightPos = iShiftedLeftPos;
    1048       iRightPos--;
    1049       iLeftPos--;
    1050       iShiftedLeftPos = xShift(iLeftPos);
    1051       break;
    1052     }
    1053 
    1054     if  ( (iShiftedRightPos > iEndRemoveSPos)  )
    1055     {
    1056       break;
    1057     }
    1058 
    1059     iShiftedLeftPos = iShiftedRightPos;
    1060     iLeftPos++;
    1061     iRightPos++;
    1062   }
    1063 
    1064   ////////// Remove Hole margin  ///////
    1065   while( iLeftPos >= iStartRemovePos )
    1066   {
    1067     xRenderShiftedRangeL(iShiftedLeftPos, iShiftedRightPos, iLeftPos, iRightPos, riError );
    1068     iLeftPos--;
    1069     iRightPos--;
    1070     iShiftedRightPos = iShiftedLeftPos;
    1071     iShiftedLeftPos  = xShift(iLeftPos);
    1072   }
    1073 }
    1074 #endif
    1075902
    1076903__inline Void
     
    12661093  {
    12671094    m_aapiSynthVideoPelRow[m_iCurViewPos][0][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][0][iSourcePos];
    1268 #if GERHARD_RM_COLOR_PLANES
     1095#if HHI_VSO_COLOR_PLANES
    12691096    m_aapiSynthVideoPelRow[m_iCurViewPos][1][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][1][iSourcePos];
    12701097    m_aapiSynthVideoPelRow[m_iCurViewPos][2][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][2][iSourcePos];
     
    12721099    m_apiFilledRow        [m_iCurViewPos]   [iTargetSPos] = iFilled;
    12731100    Int iDiffY = m_aapiRefVideoPelRow    [0][iTargetSPos] - m_aapiSynthVideoPelRow[m_iCurViewPos][0][iTargetSPos];
    1274 #if GERHARD_RM_COLOR_PLANES
     1101#if HHI_VSO_COLOR_PLANES
    12751102    Int iDiffU = m_aapiRefVideoPelRow    [1][iTargetSPos] - m_aapiSynthVideoPelRow[m_iCurViewPos][1][iTargetSPos];
    12761103    Int iDiffV = m_aapiRefVideoPelRow    [2][iTargetSPos] - m_aapiSynthVideoPelRow[m_iCurViewPos][2][iTargetSPos];
     
    12841111    Int iSDOld   = m_apiErrorRow            [iTargetSPos];
    12851112    Int iDiffY   = m_aapiRefVideoPelRow  [0][iTargetSPos] - m_aapiBaseVideoPelRow [m_iCurViewPos][0][iSourcePos];
    1286 #if GERHARD_RM_COLOR_PLANES
     1113#if HHI_VSO_COLOR_PLANES
    12871114    Int iDiffU   = m_aapiRefVideoPelRow  [1][iTargetSPos] - m_aapiBaseVideoPelRow [m_iCurViewPos][1][iSourcePos];
    12881115    Int iDiffV   = m_aapiRefVideoPelRow  [2][iTargetSPos] - m_aapiBaseVideoPelRow [m_iCurViewPos][2][iSourcePos];
     
    13051132
    13061133  Pel piBlendedValueY;
    1307 #if GERHARD_RM_COLOR_PLANES
     1134#if HHI_VSO_COLOR_PLANES
    13081135  Pel piBlendedValueU;
    13091136  Pel piBlendedValueV;
     
    13161143      m_aapiBaseVideoPelRow                                    [0][0][iSourcePos ]  ,
    13171144      m_aapiSynthVideoPelRow                                   [1][0][iTargetSPos]  ,
    1318 #if GERHARD_RM_COLOR_PLANES
     1145#if HHI_VSO_COLOR_PLANES
    13191146      m_aapiBaseVideoPelRow                                    [0][1][iSourcePos ]  ,
    13201147      m_aapiSynthVideoPelRow                                   [1][1][iTargetSPos]  ,
     
    13271154      m_apiFilledRow                                           [1]   [iTargetSPos]  ,
    13281155      piBlendedValueY
    1329 #if GERHARD_RM_COLOR_PLANES
     1156#if HHI_VSO_COLOR_PLANES
    13301157    , piBlendedValueU,
    13311158      piBlendedValueV
     
    13381165      m_aapiSynthVideoPelRow                                   [0][0][iTargetSPos],
    13391166      m_aapiBaseVideoPelRow                                    [1][0][iSourcePos ],
    1340 #if GERHARD_RM_COLOR_PLANES
     1167#if HHI_VSO_COLOR_PLANES
    13411168      m_aapiSynthVideoPelRow                                   [0][1][iTargetSPos],
    13421169      m_aapiBaseVideoPelRow                                    [1][1][iSourcePos ],
     
    13491176      iFilled                                                                     ,
    13501177      piBlendedValueY
    1351 #if GERHARD_RM_COLOR_PLANES
     1178#if HHI_VSO_COLOR_PLANES
    13521179    , piBlendedValueU,
    13531180      piBlendedValueV
     
    13611188    m_aapiSynthVideoPelRow[m_iCurViewPos][0][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][0][iSourcePos];
    13621189    m_aapiSynthVideoPelRow[2            ][0][iTargetSPos] = piBlendedValueY;
    1363 #if GERHARD_RM_COLOR_PLANES
     1190#if HHI_VSO_COLOR_PLANES
    13641191    m_aapiSynthVideoPelRow[m_iCurViewPos][1][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][1][iSourcePos];
    13651192    m_aapiSynthVideoPelRow[2            ][1][iTargetSPos] = piBlendedValueU;
     
    13701197
    13711198    Int iDiffY = m_aapiRefVideoPelRow    [0][iTargetSPos] - piBlendedValueY;
    1372 #if GERHARD_RM_COLOR_PLANES
     1199#if HHI_VSO_COLOR_PLANES
    13731200    Int iDiffU = m_aapiRefVideoPelRow    [1][iTargetSPos] - piBlendedValueU;
    13741201    Int iDiffV = m_aapiRefVideoPelRow    [2][iTargetSPos] - piBlendedValueV;
     
    13821209    Int iSDOld   = m_apiErrorRow            [iTargetSPos];
    13831210    Int iDiffY = m_aapiRefVideoPelRow    [0][iTargetSPos] - piBlendedValueY;
    1384 #if GERHARD_RM_COLOR_PLANES
     1211#if HHI_VSO_COLOR_PLANES
    13851212    Int iDiffU = m_aapiRefVideoPelRow    [1][iTargetSPos] - piBlendedValueU;
    13861213    Int iDiffV = m_aapiRefVideoPelRow    [2][iTargetSPos] - piBlendedValueV;
     
    14111238}
    14121239
    1413 #if GERHARD_RM_COLOR_PLANES
     1240#if HHI_VSO_COLOR_PLANES
    14141241__inline Void
    14151242TRenSingleModel::xGetBlendedValue( Pel iYL, Pel iYR, Pel iUL, Pel iUR, Pel iVL, Pel iVR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY, Pel& riU, Pel&riV )
     
    14231250    if (m_iBlendMode == 1 )
    14241251    {
     1252#if HHI_VSO_COLOR_PLANES
    14251253      xGetBlendedValueBM1(  iYL,  iYR,  iUL,  iUR,  iVL,  iVR,  iDepthL,  iDepthR,  iFilledL,  iFilledR,  riY,  riU, riV );
     1254#else
     1255      xGetBlendedValueBM1(  iYL,  iYR,  iDepthL,  iDepthR,  iFilledL,  iFilledR,  riY );
     1256#endif
    14261257    }
    14271258    else
    14281259    {
     1260#if HHI_VSO_COLOR_PLANES
    14291261      xGetBlendedValueBM2(  iYL,  iYR,  iUL,  iUR,  iVL,  iVR,  iDepthL,  iDepthR,  iFilledL,  iFilledR,  riY,  riU, riV );
     1262#else
     1263      xGetBlendedValueBM2(  iYL,  iYR, iDepthL,  iDepthR,  iFilledL,  iFilledR,  riY );
     1264#endif
    14301265    }
    14311266    return;
     
    14411276      {
    14421277        riY = xBlend( iYL, iYR, iFilledR >> 1 );
    1443 #if GERHARD_RM_COLOR_PLANES
     1278#if HHI_VSO_COLOR_PLANES
    14441279        riU = xBlend( iUL, iUR, iFilledR >> 1 );
    14451280        riV = xBlend( iVL, iVR, iFilledR >> 1 );
     
    14501285      {
    14511286        riY = xBlend( iYR, iYL, (iFilledL >> 1) );
    1452 #if GERHARD_RM_COLOR_PLANES
     1287#if HHI_VSO_COLOR_PLANES
    14531288        riU = xBlend( iUR, iUL, (iFilledL >> 1) );
    14541289        riV = xBlend( iVR, iVL, (iFilledL >> 1) );
     
    14581293      {
    14591294        riY = xBlend( iYR, iYL, m_iBlendDistWeight );
    1460 #if GERHARD_RM_COLOR_PLANES
     1295#if HHI_VSO_COLOR_PLANES
    14611296        riU = xBlend( iUR, iUL, m_iBlendDistWeight );
    14621297        riV = xBlend( iVR, iVL, m_iBlendDistWeight );
     
    14671302    {
    14681303      riY = iYL;
    1469 #if GERHARD_RM_COLOR_PLANES
     1304#if HHI_VSO_COLOR_PLANES
    14701305      riU = iUL;
    14711306      riV = iVL;
     
    14751310    {
    14761311      riY = iYR;
    1477 #if GERHARD_RM_COLOR_PLANES
     1312#if HHI_VSO_COLOR_PLANES
    14781313      riU = iUR;
    14791314      riV = iVR;
     
    14861321    {
    14871322        riY =  iYR;
    1488 #if GERHARD_RM_COLOR_PLANES
     1323#if HHI_VSO_COLOR_PLANES
    14891324        riU =  iUR;
    14901325        riV =  iVR;
     
    14941329    {
    14951330        riY =  iYL;
    1496 #if GERHARD_RM_COLOR_PLANES
     1331#if HHI_VSO_COLOR_PLANES
    14971332        riU =  iUL;
    14981333        riV =  iVL;
     
    15051340    {
    15061341        riY = iYL;
    1507 #if GERHARD_RM_COLOR_PLANES
     1342#if HHI_VSO_COLOR_PLANES
    15081343        riU = iUL;
    15091344        riV = iVL;
     
    15131348    {
    15141349      riY = iYR;
    1515 #if GERHARD_RM_COLOR_PLANES
     1350#if HHI_VSO_COLOR_PLANES
    15161351      riU = iUR;
    15171352      riV = iVR;
     
    15231358
    15241359__inline Void
     1360#if HHI_VSO_COLOR_PLANES
    15251361TRenSingleModel::xGetBlendedValueBM1( Pel iYL, Pel iYR, Pel iUL, Pel iUR, Pel iVL, Pel iVR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY, Pel& riU, Pel&riV )
     1362#else
     1363TRenSingleModel::xGetBlendedValueBM1( Pel iYL, Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY )
     1364#endif
    15261365{
    15271366  if      ( iFilledL == REN_IS_FILLED ||  iFilledR == REN_IS_HOLE )
    15281367  {
    15291368    riY = iYL;
    1530 #if GERHARD_RM_COLOR_PLANES
     1369#if HHI_VSO_COLOR_PLANES
    15311370    riU = iUL;
    15321371    riV = iVL;
     
    15361375  {
    15371376    riY = iYR;
    1538 #if GERHARD_RM_COLOR_PLANES
     1377#if HHI_VSO_COLOR_PLANES
    15391378    riU = iUR;
    15401379    riV = iVR;
     
    15441383  {
    15451384    riY = xBlend( iYR, iYL, iFilledL );
    1546 #if GERHARD_RM_COLOR_PLANES
     1385#if HHI_VSO_COLOR_PLANES
    15471386    riU = xBlend( iUR, iUL, iFilledL );
    15481387    riV = xBlend( iVR, iUL, iFilledL );
     
    15521391
    15531392__inline Void
     1393#if HHI_VSO_COLOR_PLANES
    15541394TRenSingleModel::xGetBlendedValueBM2( Pel iYL, Pel iYR, Pel iUL, Pel iUR, Pel iVL, Pel iVR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY, Pel& riU, Pel&riV )
     1395#else
     1396TRenSingleModel::xGetBlendedValueBM2( Pel iYL, Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY )
     1397#endif
    15551398{
    15561399  if      ( iFilledR == REN_IS_FILLED ||  iFilledL == REN_IS_HOLE )
    15571400  {
    15581401    riY = iYR;
    1559 #if GERHARD_RM_COLOR_PLANES
     1402#if HHI_VSO_COLOR_PLANES
    15601403    riU = iUR;
    15611404    riV = iVR;
     
    15651408  {
    15661409    riY = iYL;
    1567 #if GERHARD_RM_COLOR_PLANES
     1410#if HHI_VSO_COLOR_PLANES
    15681411    riU = iUL;
    15691412    riV = iVL;
     
    15731416  {
    15741417    riY = xBlend( iYL, iYR, iFilledR );
    1575 #if GERHARD_RM_COLOR_PLANES
     1418#if HHI_VSO_COLOR_PLANES
    15761419    riU = xBlend( iUL, iUR, iFilledR );
    15771420    riV = xBlend( iVL, iUR, iFilledR );
     
    15801423}
    15811424
    1582 
    1583 
    15841425__inline Pel
    15851426TRenSingleModel::xBlend( Pel pVal1, Pel pVal2, Int iWeightVal2 )
     
    15871428  return pVal1  +  (Pel) (  ( (Int) ( pVal2 - pVal1) * iWeightVal2 + (1 << (REN_VDWEIGHT_PREC - 1)) ) >> REN_VDWEIGHT_PREC );
    15881429}
    1589 
    1590 #if GERHARD_RM_DEBUG_MM
    1591 Bool
    1592 TRenSingleModel::compare( TRenSingleModel* pcRefModel )
    1593 {
    1594   Bool bNoDirectStop = true;
    1595   Bool bEqual = true;
    1596 
    1597   for (Int iBaseView = 0; iBaseView < 2; iBaseView++ )
    1598   {
    1599     for (Int iPosY = 0; iPosY < m_iHeight; iPosY++ ) //GT: change to 1 !!! for small tests
    1600     {
    1601       for (Int iPosX = 0; iPosX < m_iWidth; iPosX++ )
    1602       {
    1603         if (( iBaseView == m_iMode ) || ( m_iMode == 2 ))
    1604         {
    1605  //         MEV_RF( "imswitch", &mxAW(m_iWidth, m_iHeight, m_aiBaseDepthStrides[iBaseView], m_apiBaseDepthPel  [iBaseView] ), &mxAW(m_iWidth, m_iHeight, pcRefModel->m_aiBaseDepthStrides[iBaseView], pcRefModel->m_apiBaseDepthPel  [iBaseView] ), &mxAW("u" ), 0);
    1606           bEqual = bEqual && ( m_apiBaseDepthPel  [iBaseView]   [iPosX+iPosY* m_aiBaseDepthStrides[iBaseView]] == pcRefModel->m_apiBaseDepthPel  [iBaseView]   [iPosX+iPosY* pcRefModel->m_aiBaseDepthStrides[iBaseView] ] );AOF( bNoDirectStop || bEqual );
    1607           bEqual = bEqual && ( m_apiFilled        [iBaseView]   [iPosX+iPosY*                       m_iStride] == pcRefModel->m_apiFilled        [iBaseView]   [iPosX+iPosY* m_iStride] );                                   AOF( bNoDirectStop || bEqual );
    1608           bEqual = bEqual && ( m_piError                        [iPosX+iPosY*                       m_iStride] == pcRefModel->m_piError                        [iPosX+iPosY* m_iStride] );                                   AOF( bNoDirectStop || bEqual );
    1609           bEqual = bEqual && ( m_apbOccluded      [iBaseView]   [iPosX+iPosY*                       m_iStride] == pcRefModel->m_apbOccluded      [iBaseView]   [iPosX+iPosY* m_iStride] );                                   AOF( bNoDirectStop || bEqual );
    1610           bEqual = bEqual && ( m_aapiSynthVideoPel[iBaseView][0][iPosX+iPosY*                       m_iStride] == pcRefModel->m_aapiSynthVideoPel[iBaseView][0][iPosX+iPosY* m_iStride] );                                   AOF( bNoDirectStop || bEqual );
    1611           bEqual = bEqual && ( m_aapiSynthVideoPel[iBaseView][0][iPosX+iPosY*                       m_iStride] >= 0 );                                                                                                       AOF( bNoDirectStop || bEqual );
    1612           bEqual = bEqual && ( m_aapiSynthVideoPel[iBaseView][0][iPosX+iPosY*                       m_iStride] <= g_uiIBDI_MAX );                                                                                                      AOF( bNoDirectStop || bEqual );
    1613           if (m_iMode == 2 )
    1614           {
    1615             bEqual = bEqual && ( m_apiSynthDepthPel [iBaseView]   [iPosX+iPosY*                       m_iStride] == pcRefModel->m_apiSynthDepthPel [iBaseView]   [iPosX+iPosY* m_iStride] );                                   AOF( bNoDirectStop || bEqual );
    1616           }
    1617           //if (!bEqual)
    1618           //{
    1619           //  std::cout << "Mismatch in PosX: " << iPosX << " PosY: " << iPosY << std::endl;
    1620           //  AOF(false);
    1621           //  exit(55);
    1622           //}
    1623         }
    1624       }
    1625     }
    1626   }
    1627   return bEqual;
    1628 }
    1629 
    1630 #endif
  • trunk/source/Lib/TLibRenderer/TRenSingleModel.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    3467  Void   create    ( Int iMode, Int iWidth, Int iHeight, Int iShiftPrec, Int*** aaaiSubPelShiftTable, Int iHoleMargin, Bool bUseOrgRef, Int iBlendMode );
    3568
    36   // Set Frame dependent datas
     69  // Set Frame dependent data
    3770  Void   setLRView ( Int iViewPos, Pel** apiCurVideoPel, Int* aiCurVideoStride, Pel* piCurDepthPel, Int iCurDepthStride );
    3871  Void   setup     ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight,  Int** ppiBaseShiftLutRight,  Int iDistToLeft, Bool bKeepReference );
     
    5184  // Get Reference Data
    5285  Void   getRefView  ( TComPicYuv*& rpcPicYuvRefView, Pel**& rppiRefVideoPel, Int*& raiStrides );
    53 
    54 #if GERHARD_RM_DEBUG_MM
    55   Bool   compare( TRenSingleModel* pcRefModel );
    56 #endif
    5786
    5887private:
     
    86115  // Blending
    87116  __inline Void   xSetShiftedPelBlend ( Int iSourcePos, Int iTargetSPos, Pel iFilled, RMDist& riError );
     117
     118#if HHI_VSO_COLOR_PLANES
     119  __inline Void   xGetBlendedValue    ( Pel iYL, Pel iYR, Pel iUL, Pel iUR, Pel iVL, Pel iVR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY, Pel& riU, Pel&riV );
    88120  __inline Void   xGetBlendedValueBM1 ( Pel iYL, Pel iYR, Pel iUL, Pel iUR, Pel iVL, Pel iVR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY, Pel& riU, Pel&riV );
    89121  __inline Void   xGetBlendedValueBM2 ( Pel iYL, Pel iYR, Pel iUL, Pel iUR, Pel iVL, Pel iVR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY, Pel& riU, Pel&riV );
    90 
    91 #if GERHARD_RM_COLOR_PLANES
    92   __inline Void   xGetBlendedValue    ( Pel iYL, Pel iYR, Pel iUL, Pel iUR, Pel iVL, Pel iVR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY, Pel& riU, Pel&riV );
    93122#else
    94123  __inline Void   xGetBlendedValue    ( Pel iYL,   Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY );
     124  __inline Void   xGetBlendedValueBM1 ( Pel iYL, Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY );
     125  __inline Void   xGetBlendedValueBM2 ( Pel iYL, Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY );
    95126#endif
    96127  __inline Pel    xBlend              ( Pel pVal1, Pel pVal2, Int iWeightVal2 );
     
    110141  __inline Void   xSetInts   ( Int*  piPelSource , Int iSourceStride, Int iWidth, Int iHeight, Int iVal );
    111142
    112 #if GERHARD_RM_DEBUG_MM
    113 public:
    114 #else
    115143private:
    116 #endif
    117144
    118145  // Image sizes
  • trunk/source/Lib/TLibRenderer/TRenTop.cpp

    r2 r5  
     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-2011, 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 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
    134
    235#include "TRenImage.h"
     
    879912Void TRenTop::xShiftPlanePixels8Tap( PelImagePlane** apcInputPlanes, PelImagePlane* pcDepthPlane, PelImagePlane** apcOutputPlanes, PelImagePlane* pcFilledPlane, UInt uiNumberOfPlanes  )
    880913{
    881 
    882914  Bool bRenderDepth = (apcInputPlanes[0] == pcDepthPlane);
    883915
     
    14961528}
    14971529
    1498 Void TRenTop::xChangePixels( PelImage* pcDispImage )
    1499 {
    1500   if (m_uNumelauiChangePixels < 3 )
    1501   {
    1502     return;
    1503   };
    1504 
    1505   UInt* puiCP = m_auiChangePixels;
    1506   UInt uiWidth = pcDispImage->getPlane(0)->getWidth();
    1507 
    1508   for (UInt uiIdx = 0; uiIdx < m_uNumelauiChangePixels; uiIdx+= 3 )
    1509   {
    1510     pcDispImage->getPlane(0)->getPlaneData()[ puiCP[ uiIdx ] * uiWidth + puiCP[ uiIdx + 1 ] ] =  puiCP[uiIdx + 2 ];
    1511   };
    1512 };
    1513 
    15141530
    15151531Void TRenTop::xCutPlaneMargin( PelImagePlane* pcImagePlane, Pel cFill, UInt uiScale )
     
    16031619    Pel* pcLeftImageData   = (*apcLeftPlane)       ->getPlaneData();
    16041620
    1605     //Int iSumLeft        = 0;
    1606     //Int iSumRight       = 0;
    1607     //Int iSumLeftSquare  = 0;
    1608     //Int iSumRightSquare = 0;
     1621 
    16091622
    16101623    for (UInt uiYPos = 0; uiYPos < iHeight; uiYPos++ )
    16111624    {
    1612       //Int iRowSumLeft        = 0;
    1613       //Int iRowSumRight       = 0;
    1614       //Int iRowSumLeftSquare  = 0;
    1615       //Int iRowSumRightSquare = 0;
    1616 
    16171625      for (UInt uiXPos = 0; uiXPos < iWidth; uiXPos++ )
    16181626      {
     
    16211629            aiHistLeft [pcLeftImageData   [uiXPos] ]++;
    16221630            aiHistRight[pcRightImageData  [uiXPos] ]++;
    1623             //iNumElem++;
    1624             //iRowSumLeft        += ;
    1625             //iRowSumRight       += pcRightImageData [uiXPos];
    1626             //iRowSumLeftSquare  += pcLeftImageData  [uiXPos] * pcLeftImageData [uiXPos];
    1627             //iRowSumRightSquare += pcRightImageData [uiXPos] * pcRightImageData[uiXPos];
    16281631          }
    16291632      }
     
    16601663    while( iCurChangeVal <= g_uiIBDI_MAX )
    16611664    {
    1662 #if 0 //GERHARD_DEBUG
    1663       std::cout << iCumSumBase << " " << iCumSumChange << " " << iCurBaseVal << " " << iCurChangeVal << std::endl;
    1664 #endif
    16651665      if ( iCumSumBase == iCumSumChange )
    16661666      {
     
    17101710delete[] aiHistRight;
    17111711delete[] aiConvLUT  ;
    1712 
    1713 
    17141712}
    17151713
     
    18921890}
    18931891
    1894 
    1895 Void TRenTop::xReEstimateDisp( Pel* pcInputLeftImageRow, Pel* pcInputRightImageRow, Int iLeftImageStride, Int iRightImageStride, Int iPosX, Pel cLeftDepth, Pel cRightDepth, Int iLut, Pel& rcBestDepth, Int& riBestSAD )
    1896 {
    1897   Int iHalfBlkSizeMin1 = 3;
    1898   UInt uiStep = m_iRelShiftLUTPrec;
    1899 
    1900   AOT(iHalfBlkSizeMin1 > 3);
    1901 
    1902   Pel cInc = (cRightDepth < cLeftDepth) ? 1 : -1;
    1903 
    1904   UInt uiBestSAD  = -1;
    1905 
    1906   for (Pel cCurDepth = cRightDepth; cCurDepth <= cLeftDepth; cCurDepth += cInc )
    1907   {
    1908     Int iShiftLeft  = m_ppiShiftLUTLeft [iLut][ RemoveBitIncrement( cCurDepth)];
    1909     Int iShiftRight = m_ppiShiftLUTLeft [iLut][ RemoveBitIncrement( cCurDepth)];
    1910 
    1911     Int iShiftedPosLeft  = iPosX - iShiftLeft;
    1912     Int iShiftedPosRight = iPosX - iShiftRight;
    1913 
    1914     if ( !(( iShiftedPosLeft < 0 ) || (iShiftedPosLeft >= m_uiSampledWidth) || ( iShiftedPosRight < 0 ) || (iShiftedPosRight >= m_uiSampledWidth)))
    1915     {
    1916       Pel* pcCurLeftIm  = pcInputLeftImageRow  - iLeftImageStride  * iHalfBlkSizeMin1 - iHalfBlkSizeMin1*uiStep - iShiftLeft;
    1917       Pel* pcCurRightIm = pcInputRightImageRow - iRightImageStride * iHalfBlkSizeMin1 - iHalfBlkSizeMin1*uiStep - iShiftRight;
    1918 
    1919       UInt uiSAD = 0;
    1920 
    1921       for ( Int iCurPosY= 0; iCurPosY < (iHalfBlkSizeMin1 << 1) + 1; iCurPosY++ )
    1922       {
    1923         for ( Int iCurPosX = 0; iCurPosX < (iHalfBlkSizeMin1 << 1) * uiStep + uiStep; iCurPosX += uiStep  )
    1924         {
    1925           uiSAD += abs( pcCurLeftIm[iCurPosX] - pcCurRightIm[iCurPosX] );
    1926         }
    1927         pcCurLeftIm  += iLeftImageStride;
    1928         pcCurRightIm += iRightImageStride;
    1929       }
    1930 
    1931       if (uiSAD < uiBestSAD)
    1932       {
    1933         uiBestSAD = uiSAD;
    1934         rcBestDepth = cCurDepth;
    1935       }
    1936     }
    1937   }
    1938 }
    1939 
    1940 Int TRenTop::xVSRSHoleCount( Pel* pcFilledData, Int iFilledStride, Int iCenterPosX, Int iCenterPosY )
    1941 {
    1942   // Counts holes in a 6x6 Block around iPosX and iPosY
    1943   //GT: currently not supported for rendering in up sampled domain ( padding to less )
    1944   if ( m_iLog2SamplingFactor > 0 )
    1945   {
    1946     return 0;
    1947   }
    1948 
    1949   Int iHalfBlkSizeY = 3;
    1950   Int iHalfBlkSizeX = 3;  // iHalfBlkSizeY * ( 1 << m_iLog2SamplingFactor );
    1951 
    1952   Int iNumOfHolePels = 0;
    1953   pcFilledData -= ( iHalfBlkSizeX + iHalfBlkSizeY * iFilledStride );
    1954 
    1955   for (Int iPosY = 0; iPosY < (iHalfBlkSizeY << 1) + 1; iPosY++)
    1956   {
    1957     for (Int iPosX = 0; iPosX < (iHalfBlkSizeX << 1) + 1; iPosX++)
    1958     {
    1959       if (*pcFilledData == REN_IS_HOLE)
    1960       {
    1961         iNumOfHolePels++;
    1962       }
    1963       pcFilledData++;
    1964     }
    1965     pcFilledData += iFilledStride;
    1966   }
    1967   return iNumOfHolePels;
    1968 }
    1969 
    19701892// Temporal Filter from Zhejiang University: (a little different from m16041: Temporal Improvement Method in View Synthesis)
    19711893Void TRenTop::temporalFilterVSRS( TComPicYuv* pcPicYuvVideoCur, TComPicYuv* pcPicYuvDepthCur, TComPicYuv* pcPicYuvVideoLast, TComPicYuv* pcPicYuvDepthLast, Bool bFirstFrame )
     
    20952017  // PostProcessing
    20962018  m_iPostProcMode        = eRenPostProNone;
    2097 
    2098   //ChangePixels
    2099   m_auiChangePixels[0] = 0;
    2100   m_uNumelauiChangePixels = 0;
    21012019
    21022020  // Cut
     
    22112129  m_iPostProcMode    = iPostProcMode;
    22122130
    2213   //ChangePixels
    2214   m_auiChangePixels[0] = 0;
    2215   m_uNumelauiChangePixels = 0;
    2216 
    22172131  // Used pel map
    22182132  m_iUsedPelMapMarExt     = iUsedPelMapMarExt;
     
    22622176
    22632177
    2264 Void TRenTop::xGetChangePixels( UInt& ruiNumPixels, UInt* & rauiChangePixels )
    2265 {
    2266   ruiNumPixels = m_uNumelauiChangePixels;
    2267   rauiChangePixels = m_auiChangePixels;
    2268 }
    2269 
    22702178TRenTop::~TRenTop()
    22712179{
  • trunk/source/Lib/TLibRenderer/TRenTop.h

    r2 r5  
     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-2011, 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 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
    134
    235
     
    126159  Void xBlendPlanesAvg           ( PelImagePlane** apcLeftPlane, PelImagePlane** apcRightPlane, PelImagePlane* pcFilledLeftPlane, PelImagePlane* pcFilledRightPlane, PelImagePlane* pcLeftDepthPlane, PelImagePlane* pcRightDepthPlane, PelImagePlane** apcOutputImagePlane, UInt uNumPlanes );
    127160  Void xBlendPlanesOneView       ( PelImagePlane** apcLeftPlane, PelImagePlane** apcRightPlane, PelImagePlane* pcFilledLeftPlane, PelImagePlane* pcFilledRightPlane, PelImagePlane* pcLeftDepthPlane, PelImagePlane* pcRightDepthPlane, PelImagePlane** apcOutputImagePlane, UInt uNumPlanes );
    128   Int  xVSRSHoleCount            ( Pel* pcFilledData, Int iFilledStride, Int iCenterPosX, Int iCenterPosY );
    129161
    130162  // PostProcessing
     
    132164  Void xCutPlaneMargin           ( PelImagePlane* pcImagePlane, Pel cFill, UInt uiScale);
    133165  Void xPostProcessImage         ( PelImage* pcInImage,       PelImage* pCOutImage);
    134 
    135   // Others
    136   Void xChangePixels             ( PelImage* pcDispImage );
    137   Void xGetChangePixels          ( UInt& ruiNumPixels, UInt* & rauiChangePixels );
    138   Void xReEstimateDisp           ( Pel* pcInputLeftImageRow,  Pel* pcInputRightImageRow, Int iLeftImageStride, Int iRightImageStride, Int iPosX, Pel cLeftDepth, Pel cRightDepth, Int iLut, Pel& rcBestDepth, Int& riBestSAD );
    139166
    140167  // Input Output Data Conversion
     
    191218  Int  m_iRelShiftLUTPrec;
    192219
    193   // Change Pixels and Cut
    194   UInt m_auiChangePixels[2000];
    195   UInt m_uNumelauiChangePixels;
     220  // Cut
    196221  UInt m_auiCut[2];
    197222
  • trunk/source/Lib/TLibVideoIO/TVideoIOBits.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibVideoIO/TVideoIOBits.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibVideoIO/TVideoIOYuv.cpp

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/TLibVideoIO/TVideoIOYuv.h

    r2 r5  
     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-2011, 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 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
    134
    235
  • trunk/source/Lib/libmd5/libmd5.h

    r2 r5  
     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-2011, 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 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
    134
    235#pragma once
Note: See TracChangeset for help on using the changeset viewer.