List Info

Thread: compress/libdirac_common common.cpp, 1.61, 1.62 common.h, 1.69, 1.70 common_types.h,




compress/libdirac_common common.cpp, 1.61, 1.62 common.h, 1.69, 1.70 common_types.h,
user name
2008-01-14 22:36:25
Update of /cvsroot/dirac/compress/libdirac_common
In directory
sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv26219/libdirac_com
mon

Modified Files:
	common.cpp common.h common_types.h dirac_exception.h 
	dirac_types.h video_format_defaults.cpp 
Log Message:
Spec Compliance - nomenclature changes. Rename aspect_ratio
to
pixel_aspect_ratio, sampling_format to
chroma_sampling_format.


Index: common.h
============================================================
=======
RCS file:
/cvsroot/dirac/compress/libdirac_common/common.h,v
retrieving revision 1.69
retrieving revision 1.70
diff -C2 -d -r1.69 -r1.70
*** common.h	9 Jan 2008 10:50:23 -0000	1.69
--- common.h	15 Jan 2008 04:36:23 -0000	1.70
***************
*** 192,200 ****
  
      /**
!     * Function to convert an integer to a valid
AspectRatio type
!     *param aspect_ratio_idx Integer corresponding to a
aspect-ratio in the spec table
!     *return Valid AspectRatioType (returns
ASPECT_RATIO_UNDEFINED if no valid aspect-ratio found)
      */
!     AspectRatioType IntToAspectRatioType(int
aspect_ratio_idx);
  
      /**
--- 192,200 ----
  
      /**
!     * Function to convert an integer to a valid
PixelAspectRatio type
!     *param pix_asr_idx Integer corresponding to a pixel
aspect ratio in the spec table
!     *return Valid PixelAspectRatioType (returns
PIXEL_ASPECT_RATIO_UNDEFINED if no valid pixel aspect ratio
found)
      */
!     PixelAspectRatioType IntToPixelAspectRatioType(int
pix_asr_idx);
  
      /**
***************
*** 585,592 ****
  
             //! Return the pixel aspect ratio
!         Rational AspectRatio() const { return
m_aspect_ratio; }
  
!          //! Return the type from the aspect ratio table
!         AspectRatioType AspectRatioIndex() const { return
m_asr_idx; }
  
          // Clean area parameters
--- 585,592 ----
  
             //! Return the pixel aspect ratio
!         Rational PixelAspectRatio() const { return
m_pixel_aspect_ratio; }
  
!          //! Return the type from the pixel aspect ratio
table
!         PixelAspectRatioType PixelAspectRatioIndex() const
{ return m_pix_asr_idx; }
  
          // Clean area parameters
***************
*** 663,682 ****
  
             //! Set the pixel aspect ratio
!         void SetAspectRatio(const Rational &asr)
          {
!             m_asr_idx = ASPECT_RATIO_CUSTOM;
!             m_aspect_ratio = asr;
          }
  
          //! Set the pixel aspect ratio
!         void SetAspectRatio(unsigned int as_num, unsigned
int as_denom )
          {
!             m_asr_idx = ASPECT_RATIO_CUSTOM;
!             m_aspect_ratio.m_num = as_num;
!             m_aspect_ratio.m_denom = as_denom;
          }
  
          //! Set the Pixel Aspect Ratio
!         void SetAspectRatio(AspectRatioType
aspect_ratio);
  
          // Clean area parameters
--- 663,682 ----
  
             //! Set the pixel aspect ratio
!         void SetPixelAspectRatio(const Rational
&pix_asr)
          {
!             m_pix_asr_idx = PIXEL_ASPECT_RATIO_CUSTOM;
!             m_pixel_aspect_ratio = pix_asr;
          }
  
          //! Set the pixel aspect ratio
!         void SetPixelAspectRatio(unsigned int pix_as_num,
unsigned int pix_as_denom )
          {
!             m_pix_asr_idx = PIXEL_ASPECT_RATIO_CUSTOM;
!             m_pixel_aspect_ratio.m_num = pix_as_num;
!             m_pixel_aspect_ratio.m_denom = pix_as_denom;
          }
  
          //! Set the Pixel Aspect Ratio
!         void SetPixelAspectRatio(PixelAspectRatioType
pixel_aspect_ratio);
  
          // Clean area parameters
***************
*** 738,745 ****
  
          //! Index into pixel aspect ratio table
!         AspectRatioType m_asr_idx;
  
          //! Pixel Aspect Ratio
!         Rational m_aspect_ratio;
  
          // Clean area parameters
--- 738,745 ----
  
          //! Index into pixel aspect ratio table
!         PixelAspectRatioType m_pix_asr_idx;
  
          //! Pixel Aspect Ratio
!         Rational m_pixel_aspect_ratio;
  
          // Clean area parameters

Index: video_format_defaults.cpp
============================================================
=======
RCS file:
/cvsroot/dirac/compress/libdirac_common/video_format_default
s.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** video_format_defaults.cpp	9 Jan 2008 10:48:21
-0000	1.21
--- video_format_defaults.cpp	15 Jan 2008 04:36:23
-0000	1.22
***************
*** 118,122 ****
      sparams.SetSourceSampling(0);
      sparams.SetTopFieldFirst(true);
!     sparams.SetAspectRatio(ASPECT_RATIO_1_1);
      sparams.SetSignalRange(SIGNAL_RANGE_8BIT_FULL);
      sparams.SetLeftOffset(0);
--- 118,122 ----
      sparams.SetSourceSampling(0);
      sparams.SetTopFieldFirst(true);
!     sparams.SetPixelAspectRatio(PIXEL_ASPECT_RATIO_1_1);
      sparams.SetSignalRange(SIGNAL_RANGE_8BIT_FULL);
      sparams.SetLeftOffset(0);
***************
*** 140,144 ****
          sparams.SetTopFieldFirst(false);
          sparams.SetFrameRate(FRAMERATE_14p98_FPS);
!         sparams.SetAspectRatio(ASPECT_RATIO_10_11);
          sparams.SetCleanWidth(176);
          sparams.SetCleanHeight(120);
--- 140,144 ----
          sparams.SetTopFieldFirst(false);
          sparams.SetFrameRate(FRAMERATE_14p98_FPS);
!        
sparams.SetPixelAspectRatio(PIXEL_ASPECT_RATIO_10_11);
          sparams.SetCleanWidth(176);
          sparams.SetCleanHeight(120);
***************
*** 149,153 ****
          sparams.SetYl(144);
          sparams.SetFrameRate(FRAMERATE_12p5_FPS);
!         sparams.SetAspectRatio(ASPECT_RATIO_12_11);
          sparams.SetCleanWidth(176);
          sparams.SetCleanHeight(144);
--- 149,153 ----
          sparams.SetYl(144);
          sparams.SetFrameRate(FRAMERATE_12p5_FPS);
!        
sparams.SetPixelAspectRatio(PIXEL_ASPECT_RATIO_12_11);
          sparams.SetCleanWidth(176);
          sparams.SetCleanHeight(144);
***************
*** 159,163 ****
          sparams.SetTopFieldFirst(false);
          sparams.SetFrameRate(FRAMERATE_14p98_FPS);
!         sparams.SetAspectRatio(ASPECT_RATIO_10_11);
          sparams.SetCleanWidth(352);
          sparams.SetCleanHeight(240);
--- 159,163 ----
          sparams.SetTopFieldFirst(false);
          sparams.SetFrameRate(FRAMERATE_14p98_FPS);
!        
sparams.SetPixelAspectRatio(PIXEL_ASPECT_RATIO_10_11);
          sparams.SetCleanWidth(352);
          sparams.SetCleanHeight(240);
***************
*** 168,172 ****
          sparams.SetYl(288);
          sparams.SetFrameRate(FRAMERATE_12p5_FPS);
!         sparams.SetAspectRatio(ASPECT_RATIO_12_11);
          sparams.SetCleanWidth(352);
          sparams.SetCleanHeight(288);
--- 168,172 ----
          sparams.SetYl(288);
          sparams.SetFrameRate(FRAMERATE_12p5_FPS);
!        
sparams.SetPixelAspectRatio(PIXEL_ASPECT_RATIO_12_11);
          sparams.SetCleanWidth(352);
          sparams.SetCleanHeight(288);
***************
*** 178,182 ****
          sparams.SetTopFieldFirst(false);
          sparams.SetFrameRate(FRAMERATE_14p98_FPS);
!         sparams.SetAspectRatio(ASPECT_RATIO_10_11);
          sparams.SetCleanWidth(704);
          sparams.SetCleanHeight(480);
--- 178,182 ----
          sparams.SetTopFieldFirst(false);
          sparams.SetFrameRate(FRAMERATE_14p98_FPS);
!        
sparams.SetPixelAspectRatio(PIXEL_ASPECT_RATIO_10_11);
          sparams.SetCleanWidth(704);
          sparams.SetCleanHeight(480);
***************
*** 187,191 ****
          sparams.SetYl(576);
          sparams.SetFrameRate(FRAMERATE_12p5_FPS);
!         sparams.SetAspectRatio(ASPECT_RATIO_12_11);
          sparams.SetCleanWidth(704);
          sparams.SetCleanHeight(576);
--- 187,191 ----
          sparams.SetYl(576);
          sparams.SetFrameRate(FRAMERATE_12p5_FPS);
!        
sparams.SetPixelAspectRatio(PIXEL_ASPECT_RATIO_12_11);
          sparams.SetCleanWidth(704);
          sparams.SetCleanHeight(576);
***************
*** 199,203 ****
          sparams.SetTopFieldFirst(false);
          sparams.SetFrameRate(FRAMERATE_29p97_FPS);
!         sparams.SetAspectRatio(ASPECT_RATIO_10_11);
          sparams.SetCleanWidth(704);
          sparams.SetCleanHeight(480);
--- 199,203 ----
          sparams.SetTopFieldFirst(false);
          sparams.SetFrameRate(FRAMERATE_29p97_FPS);
!        
sparams.SetPixelAspectRatio(PIXEL_ASPECT_RATIO_10_11);
          sparams.SetCleanWidth(704);
          sparams.SetCleanHeight(480);
***************
*** 212,216 ****
          sparams.SetSourceSampling(1);
          sparams.SetFrameRate(FRAMERATE_25_FPS);
!         sparams.SetAspectRatio(ASPECT_RATIO_12_11);
          sparams.SetCleanWidth(704);
          sparams.SetCleanHeight(576);
--- 212,216 ----
          sparams.SetSourceSampling(1);
          sparams.SetFrameRate(FRAMERATE_25_FPS);
!        
sparams.SetPixelAspectRatio(PIXEL_ASPECT_RATIO_12_11);
          sparams.SetCleanWidth(704);
          sparams.SetCleanHeight(576);

Index: dirac_types.h
============================================================
=======
RCS file:
/cvsroot/dirac/compress/libdirac_common/dirac_types.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** dirac_types.h	3 Jan 2008 03:36:29 -0000	1.8
--- dirac_types.h	15 Jan 2008 04:36:23 -0000	1.9
***************
*** 71,75 ****
  
  typedef dirac_rational_t dirac_frame_rate_t;
! typedef dirac_rational_t dirac_asr_t;
  
  /*! Structure that holds the parase parameters */
--- 71,75 ----
  
  typedef dirac_rational_t dirac_frame_rate_t;
! typedef dirac_rational_t dirac_pix_asr_t;
  
  /*! Structure that holds the parase parameters */
***************
*** 138,142 ****
      dirac_frame_rate_t frame_rate;
      /*! pixel aspect ratio */
!     dirac_asr_t pix_asr;
      /* clean area*/
      dirac_clean_area_t clean_area;
--- 138,142 ----
      dirac_frame_rate_t frame_rate;
      /*! pixel aspect ratio */
!     dirac_pix_asr_t pix_asr;
      /* clean area*/
      dirac_clean_area_t clean_area;

Index: common_types.h
============================================================
=======
RCS file:
/cvsroot/dirac/compress/libdirac_common/common_types.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** common_types.h	3 Jan 2008 03:42:09 -0000	1.14
--- common_types.h	15 Jan 2008 04:36:23 -0000	1.15
***************
*** 152,164 ****
  /*! Types of Aspect Ratio */
  typedef enum {
!     ASPECT_RATIO_CUSTOM=0,
!     ASPECT_RATIO_1_1,
!     ASPECT_RATIO_10_11,
!     ASPECT_RATIO_12_11,
!     ASPECT_RATIO_40_33,
!     ASPECT_RATIO_16_11,
!     ASPECT_RATIO_4_3,
!     ASPECT_RATIO_UNDEFINED
! } AspectRatioType;
  
  
--- 152,164 ----
  /*! Types of Aspect Ratio */
  typedef enum {
!     PIXEL_ASPECT_RATIO_CUSTOM=0,
!     PIXEL_ASPECT_RATIO_1_1,
!     PIXEL_ASPECT_RATIO_10_11,
!     PIXEL_ASPECT_RATIO_12_11,
!     PIXEL_ASPECT_RATIO_40_33,
!     PIXEL_ASPECT_RATIO_16_11,
!     PIXEL_ASPECT_RATIO_4_3,
!     PIXEL_ASPECT_RATIO_UNDEFINED
! } PixelAspectRatioType;
  
  

Index: dirac_exception.h
============================================================
=======
RCS file:
/cvsroot/dirac/compress/libdirac_common/dirac_exception.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** dirac_exception.h	5 Dec 2007 01:42:40 -0000	1.4
--- dirac_exception.h	15 Jan 2008 04:36:23 -0000	1.5
***************
*** 63,67 ****
          ERR_INVALID_FRAME_RATE,
          ERR_INVALID_SIGNAL_RANGE,
!         ERR_INVALID_ASPECT_RATIO,
          ERR_INVALID_VIDEO_DEPTH,
          ERR_INVALID_MOTION_VECTOR_PRECISION,
--- 63,67 ----
          ERR_INVALID_FRAME_RATE,
          ERR_INVALID_SIGNAL_RANGE,
!         ERR_INVALID_PIXEL_ASPECT_RATIO,
          ERR_INVALID_VIDEO_DEPTH,
          ERR_INVALID_MOTION_VECTOR_PRECISION,

Index: common.cpp
============================================================
=======
RCS file:
/cvsroot/dirac/compress/libdirac_common/common.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -d -r1.61 -r1.62
*** common.cpp	3 Jan 2008 03:42:09 -0000	1.61
--- common.cpp	15 Jan 2008 04:36:23 -0000	1.62
***************
*** 708,743 ****
  }
  
! void SourceParams::SetAspectRatio (AspectRatioType
aspect_ratio)
  {
!     m_asr_idx = aspect_ratio;
  
!     switch (aspect_ratio)
      {
!     case ASPECT_RATIO_1_1:
!         m_aspect_ratio.m_num = m_aspect_ratio.m_denom =
1;
          break;
!     case ASPECT_RATIO_10_11:
!         m_aspect_ratio.m_num = 10;
!         m_aspect_ratio.m_denom = 11;
          break;
!     case ASPECT_RATIO_12_11:
!         m_aspect_ratio.m_num = 12;
!         m_aspect_ratio.m_denom = 11;
          break;
!     case ASPECT_RATIO_40_33:
!         m_aspect_ratio.m_num = 40;
!         m_aspect_ratio.m_denom = 33;
          break;
!     case ASPECT_RATIO_16_11:
!         m_aspect_ratio.m_num = 16;
!         m_aspect_ratio.m_denom = 11;
          break;
!     case ASPECT_RATIO_4_3:
!         m_aspect_ratio.m_num = 4;
!         m_aspect_ratio.m_denom = 3;
          break;
      default:
!         m_asr_idx = ASPECT_RATIO_CUSTOM;
!         m_aspect_ratio.m_num = m_aspect_ratio.m_denom =
0;
          break;
      }
--- 708,743 ----
  }
  
! void SourceParams::SetPixelAspectRatio
(PixelAspectRatioType pix_asr_idx)
  {
!     m_pix_asr_idx = pix_asr_idx;
  
!     switch (pix_asr_idx)
      {
!     case PIXEL_ASPECT_RATIO_1_1:
!         m_pixel_aspect_ratio.m_num =
m_pixel_aspect_ratio.m_denom = 1;
          break;
!     case PIXEL_ASPECT_RATIO_10_11:
!         m_pixel_aspect_ratio.m_num = 10;
!         m_pixel_aspect_ratio.m_denom = 11;
          break;
!     case PIXEL_ASPECT_RATIO_12_11:
!         m_pixel_aspect_ratio.m_num = 12;
!         m_pixel_aspect_ratio.m_denom = 11;
          break;
!     case PIXEL_ASPECT_RATIO_40_33:
!         m_pixel_aspect_ratio.m_num = 40;
!         m_pixel_aspect_ratio.m_denom = 33;
          break;
!     case PIXEL_ASPECT_RATIO_16_11:
!         m_pixel_aspect_ratio.m_num = 16;
!         m_pixel_aspect_ratio.m_denom = 11;
          break;
!     case PIXEL_ASPECT_RATIO_4_3:
!         m_pixel_aspect_ratio.m_num = 4;
!         m_pixel_aspect_ratio.m_denom = 3;
          break;
      default:
!         m_pix_asr_idx = PIXEL_ASPECT_RATIO_CUSTOM;
!         m_pixel_aspect_ratio.m_num =
m_pixel_aspect_ratio.m_denom = 0;
          break;
      }
***************
*** 1192,1215 ****
  }
  
! AspectRatioType IntToAspectRatioType(int
aspect_ratio_idx)
  {
!     switch(aspect_ratio_idx)
      {
!     case ASPECT_RATIO_CUSTOM:
!         return ASPECT_RATIO_CUSTOM;
!     case ASPECT_RATIO_1_1:
!         return ASPECT_RATIO_1_1;
!     case ASPECT_RATIO_10_11:
!         return ASPECT_RATIO_10_11;
!     case ASPECT_RATIO_12_11:
!         return ASPECT_RATIO_12_11;
!     case ASPECT_RATIO_40_33:
!         return ASPECT_RATIO_40_33;
!     case ASPECT_RATIO_16_11:
!         return ASPECT_RATIO_16_11;
!     case ASPECT_RATIO_4_3:
!         return ASPECT_RATIO_4_3;
      default:
!         return ASPECT_RATIO_UNDEFINED;
  
      }
--- 1192,1215 ----
  }
  
! PixelAspectRatioType IntToPixelAspectRatioType(int
pix_asr_idx)
  {
!     switch(pix_asr_idx)
      {
!     case PIXEL_ASPECT_RATIO_CUSTOM:
!         return PIXEL_ASPECT_RATIO_CUSTOM;
!     case PIXEL_ASPECT_RATIO_1_1:
!         return PIXEL_ASPECT_RATIO_1_1;
!     case PIXEL_ASPECT_RATIO_10_11:
!         return PIXEL_ASPECT_RATIO_10_11;
!     case PIXEL_ASPECT_RATIO_12_11:
!         return PIXEL_ASPECT_RATIO_12_11;
!     case PIXEL_ASPECT_RATIO_40_33:
!         return PIXEL_ASPECT_RATIO_40_33;
!     case PIXEL_ASPECT_RATIO_16_11:
!         return PIXEL_ASPECT_RATIO_16_11;
!     case PIXEL_ASPECT_RATIO_4_3:
!         return PIXEL_ASPECT_RATIO_4_3;
      default:
!         return PIXEL_ASPECT_RATIO_UNDEFINED;
  
      }


------------------------------------------------------------
-------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216
239;13503038;w?http://sf.net/marketplace
_______________________________________________
Dirac-commits mailing list
Dirac-commitslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dirac-com
mits

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )