⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 type.h

📁 In term project, we will take the baseline JPEG codec in ARM-based platform system as an example to
💻 H
字号:
#ifndef __type__
#define __type__

typedef unsigned char  Byte ; /* 8-bit  */
typedef unsigned short Word ; /* 16-bit */
typedef unsigned long  DWord; /* 32-bit */

enum BlockType
{ Y_Block =0,
  CbBlock,
  CrBlock,
  ForbiddenBlock
};

enum PictureType
{ Forbidden=0,
  I_Picture=1,
  P_Picture=2,
  B_Picture=3,
  D_Picture=4
};/* 3-bits coding */


typedef struct MacroBlock_Type
{ bool Intra;
  bool pattern;
  bool Backward;
  bool Forward;
  bool Quant;
  Byte pattern_code;
} MacroType;

/*
  MD  --> motion displance
  dMD = motion_code * f - r
*/
typedef struct Displacement
{ short Displace; /* motion_code -16...+16 */
  Byte  Residual;
}Vector;


class Motion
{ public:
  Vector Horizontal;
  Vector Vertical  ;

  bool  Full_Pixel;
  Byte  Factor_Code; /* f_code 1...7 */

  Byte  r_size(){ return (Factor_Code-1     ); }
  short factor(){ return (1<<(Factor_Code-1)); }

  Motion():Full_Pixel(true),Factor_Code(1){};
};


typedef struct Time_Code
{ bool Drop_Frame_Flag; // 1 is 29.97Hz else 0 //
  Byte Hours;    // 5 bits //
  Byte Minutes;  // 6 bits //
  Byte Seconds;  // 6 bits //
  Byte Pictures; // 6 bits //
}TimeCode;

/*----------------------------------------------------------------------------*/
#define Block_Width  8
#define Block_Height 8
#define MCU_Max      10

struct Component
{ Byte Horizontal;//

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -