Changeset 686 in SHVCSoftware for branches/SHM-6-dev


Ignore:
Timestamp:
16 Apr 2014, 17:56:01 (11 years ago)
Author:
seregin
Message:

patch integration implementing Q0120, provided by Koohyar Minoo <Koohyar.Minoo@…>

Location:
branches/SHM-6-dev/source/Lib/TLibCommon
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-6-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp

    r677 r686  
    267267    Int   phaseX = 2*phaseAlignFlag;
    268268#if P0312_VERT_PHASE_ADJ
     269#if Q0120_PHASE_CALCULATION
     270    Int   phaseY = 2*phaseAlignFlag;
     271#else
    269272    Int   phaseY = vertPhasePositionEnableFlag ? ( vertPhasePositionFlag * 4 ) : ( 2 * phaseAlignFlag );
     273#endif
    270274#else
    271275    Int   phaseY = 2*phaseAlignFlag;
     
    274278    Int   phaseX = 0;
    275279#if P0312_VERT_PHASE_ADJ
     280#if Q0120_PHASE_CALCULATION
     281    Int   phaseY = 0;
     282#else
    276283    Int   phaseY = (vertPhasePositionEnableFlag?(vertPhasePositionFlag *4):(0));
     284#endif
    277285#else
    278286    Int   phaseY = 0;
    279287#endif
    280288#endif
    281 
     289 
    282290#if ROUNDING_OFFSET
    283291    Int   addX = ( ( phaseX * scaleX + 2 ) >> 2 ) + ( 1 << ( shiftX - 5 ) );
     
    288296#endif
    289297
     298#if Q0120_PHASE_CALCULATION
     299    Int   deltaX     = (Int)phaseAlignFlag <<3;
     300    Int   deltaY     = (((Int)phaseAlignFlag <<3)>>(Int)vertPhasePositionEnableFlag) + ((Int)vertPhasePositionFlag<<3);
     301#else
    290302    Int   deltaX     = 4 * phaseX;
    291303    Int   deltaY     = 4 * phaseY;
    292 
     304#endif
    293305    Int shiftXM4 = shiftX - 4;
    294306    Int shiftYM4 = shiftY - 4;
     
    426438    Int phaseXC = phaseAlignFlag;
    427439#if P0312_VERT_PHASE_ADJ
     440#if Q0120_PHASE_CALCULATION
     441    Int phaseYC = phaseAlignFlag + 1;
     442#else
    428443    Int phaseYC = vertPhasePositionEnableFlag ? ( vertPhasePositionFlag * 4 ) : ( phaseAlignFlag + 1 );
     444#endif
    429445#else
    430446    Int phaseYC = phaseAlignFlag + 1;
     
    433449    Int phaseXC = 0;
    434450#if P0312_VERT_PHASE_ADJ
     451#if Q0120_PHASE_CALCULATION
     452    Int phaseYC = 1;
     453#else
    435454    Int phaseYC = vertPhasePositionEnableFlag ? (vertPhasePositionFlag * 4): 1;
     455#endif
    436456#else
    437457    Int phaseYC = 1;
     
    447467#endif
    448468
     469#if Q0120_PHASE_CALCULATION
     470    deltaX     = (Int)phaseAlignFlag << 2;
     471    deltaY     = ((( (Int)phaseAlignFlag +1)<<2)>>(Int)vertPhasePositionEnableFlag)+((Int)vertPhasePositionFlag<<3);
     472#else
    449473    deltaX     = 4 * phaseXC;
    450474    deltaY     = 4 * phaseYC;
     475#endif
    451476
    452477    shiftXM4 = shiftX - 4;
  • branches/SHM-6-dev/source/Lib/TLibCommon/TypeDef.h

    r684 r686  
    5151
    5252#define P0312_VERT_PHASE_ADJ             1      ///< JCTVC-P0312: vertical phase adjustment in re-sampling process (BoG report)
     53#if P0312_VERT_PHASE_ADJ
     54#define Q0120_PHASE_CALCULATION          1      ///< JCTVC-Q0120 phase offset derivation for combination of spatial scalibility and field coding.
     55#endif
    5356#define P0130_EOB                        1      ///< JCTVC-P0130, set layer Id of EOB NALU to be fixed to 0
    5457#define P0307_REMOVE_VPS_VUI_OFFSET      1      ///< JCTVC-P0307, remove implementation related to VPS VUI offset signalling
Note: See TracChangeset for help on using the changeset viewer.