Changeset 335 in SHVCSoftware for branches


Ignore:
Timestamp:
13 Aug 2013, 02:39:08 (11 years ago)
Author:
qualcomm
Message:

JCTVC-N0219, JCTVC-N0273: Support arbitrary spatial ratio, from cjianle@…

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

Legend:

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

    r333 r335  
    99{
    1010  {  0,  0,  0, 64,  0,  0,  0,  0}, //
     11#if ARBITRARY_SPATIAL_RATIO
     12  {  0,  1, -3, 63,  4, -2,  1,  0},
     13  { -1,  2, -5, 62,  8, -3,  1,  0},
     14  { -1,  3, -8, 60, 13, -4,  1,  0},
     15  { -1,  4,-10, 58, 17, -5,  1,  0},
     16#else
    1117  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    1218  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    1319  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    1420  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    15   { -1, 4, -11, 52, 26,  -8, 3, -1}, // <-> actual phase shift 1/3, used for spatial scalability x1.5     
     21#endif
     22  { -1, 4, -11, 52, 26,  -8,  3, -1}, // <-> actual phase shift 1/3, used for spatial scalability x1.5     
     23#if ARBITRARY_SPATIAL_RATIO
     24  { -1, 3,  -9, 47, 31, -10,  4, -1},
     25  { -1, 4, -11, 45, 34, -10,  4, -1},
     26#else
    1627  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //       
    1728  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    18   { -1, 4, -11, 40, 40, -11, 4, -1}, // <-> actual phase shift 1/2, equal to HEVC MC, used for spatial scalability x2
    19   {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    20   {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
     29#endif
     30  { -1, 4, -11, 40, 40, -11,  4, -1}, // <-> actual phase shift 1/2, equal to HEVC MC, used for spatial scalability x2
     31#if ARBITRARY_SPATIAL_RATIO
     32  { -1,  4, -10, 34, 45, -11,  4, -1},
     33  { -1,  4, -10, 31, 47,  -9,  3, -1},
     34#else
     35  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
     36  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
     37#endif
    2138  { -1, 3,  -8, 26, 52, -11, 4, -1}, // <-> actual phase shift 2/3, used for spatial scalability x1.5
     39#if ARBITRARY_SPATIAL_RATIO
     40  { 0,  1,  -5, 17, 58, -10,  4, -1},
     41  { 0,  1,  -4, 13, 60,  -8,  3, -1},
     42  { 0,  1,  -3,  8, 62,  -5,  2, -1},
     43  { 0,  1,  -2,  4, 63,  -3,  1,  0}
     44#else
    2245  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    2346  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    2447  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}, //
    2548  {CNU,CNU,CNU,CNU,CNU,CNU,CNU,CNU}  //
     49#endif
    2650};
    2751
     
    2953{
    3054  {  0, 64,  0,  0},//
     55#if ARBITRARY_SPATIAL_RATIO
     56  { -2, 62,  4,  0},
     57  { -2, 58, 10, -2},
     58  { -4, 56, 14, -2},
     59#else
    3160  {CNU,CNU,CNU,CNU},//
    3261  {CNU,CNU,CNU,CNU},//
    3362  {CNU,CNU,CNU,CNU},//
     63#endif
    3464  { -4, 54, 16, -2},// <-> actual phase shift 1/4,equal to HEVC MC, used for spatial scalability x1.5 (only for accurate Chroma alignement)
    3565  { -6, 52, 20, -2},// <-> actual phase shift 1/3, used for spatial scalability x1.5   
    3666  { -6, 46, 28, -4},// <-> actual phase shift 3/8,equal to HEVC MC, used for spatial scalability x2 (only for accurate Chroma alignement)     
     67#if ARBITRARY_SPATIAL_RATIO
     68  { -4, 42, 30, -4},
     69#else
    3770  {CNU,CNU,CNU,CNU},//
     71#endif
    3872  { -4, 36, 36, -4},// <-> actual phase shift 1/2,equal to HEVC MC, used for spatial scalability x2
    3973  { -4, 30, 42, -4},// <-> actual phase shift 7/12, used for spatial scalability x1.5 (only for accurate Chroma alignement)
     74#if ARBITRARY_SPATIAL_RATIO
     75  { -4, 28, 46, -6},
     76#else
    4077  {CNU,CNU,CNU,CNU},//
     78#endif
    4179  { -2, 20, 52, -6},// <-> actual phase shift 2/3, used for spatial scalability x1.5
     80#if ARBITRARY_SPATIAL_RATIO
     81  {-2, 16, 54, -4},
     82  {-2, 14, 56, -4},
     83#else
    4284  {CNU,CNU,CNU,CNU},//
    4385  {CNU,CNU,CNU,CNU},//
     86#endif
    4487  { -2, 10, 58, -2},// <-> actual phase shift 7/8,equal to HEVC MC, used for spatial scalability x2 (only for accurate Chroma alignement) 
    4588  {  0,  4, 62, -2} // <-> actual phase shift 11/12, used for spatial scalability x1.5 (only for accurate Chroma alignement)
     
    164207    }
    165208
     209#if ARBITRARY_SPATIAL_RATIO
     210    assert ( widthEL >= widthBL );
     211    assert ( heightEL >= heightBL );
     212#else
    166213    assert ( widthEL == widthBL || widthEL == 2*widthBL || 2*widthEL == 3*widthBL );
    167214    assert ( heightEL == heightBL || heightEL == 2*heightBL || 2*heightEL == 3*heightBL );
     215#endif
    168216
    169217    pcBasePic->setBorderExtension(false);
  • branches/SHM-3.0-dev/source/Lib/TLibCommon/TypeDef.h

    r334 r335  
    8282#define SVC_UPSAMPLING                   1      ///< upsampling filters
    8383#define ROUNDING_OFFSET                  1      ///< JCTVC-N0111: upsampling rounding offset using scalling factors
    84 #define N0214_INTERMEDIATE_BUFFER_16BITS 1      ///< N0214 support base layer input more than 8 bits
     84#define N0214_INTERMEDIATE_BUFFER_16BITS 1      ///< JCTVC-N0214 support base layer input more than 8 bits
     85#define ARBITRARY_SPATIAL_RATIO          0      ///< JCTVC-N0219, JCTVC-N0273: Support arbitrary spatial ratio
    8586
    8687
Note: See TracChangeset for help on using the changeset viewer.