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

📄 mp3struct.h

📁 这是DVD中伺服部分的核心代码
💻 H
字号:
/*****************************************************************************
******************************************************************************
**                                                                          **
**  Copyright (c) 2002 Videon Central, Inc.                                 **
**  All rights reserved.                                                    **
**                                                                          **
**  The computer program contained herein contains proprietary information  **
**  which is the property of Videon Central, Inc.  The program may be used  **
**  and/or copied only with the written permission of Videon Central, Inc.  **
**  or in accordance with the terms and conditions stipulated in the        **
**  agreement/contract under which the programs have been supplied.         **
**                                                                          **
******************************************************************************
*****************************************************************************/
/**
 * @file mp3struct.h
 *
 * MP3 defines and types
 *
 */

#ifndef MP3STRUCT_H
#define MP3STRUCT_H

#define MP3_LAYER_I     3
#define MP3_LAYER_II    2
#define MP3_LAYER_III   1

#define SBLIMIT                 32
#define SSLIMIT                 18

#define MPG_MD_STEREO           0
#define MPG_MD_JOINT_STEREO     1
#define MPG_MD_DUAL_CHANNEL     2
#define MPG_MD_MONO             3

#define MAXFRAMESIZE            1792

#define FIXED_SHIFT 15
#define FIXED_SCALE 32768
#define FloatToFixed(X) ((fixed_t) ((X) * FIXED_SCALE))
#define FixedToFloat(X) ((X)/FIXED_SCALE)

#define FixedMul(a,b) ((long)(((long)a * (long) b) >> FIXED_SHIFT))
#define FixedMul2(a,b) ((long)(((long)a * (long) b) >> FIXED_SHIFT))

typedef long fixed_t;

// Transport Headers
typedef struct _tagMp3_Header
{
	ULONG ulSyncVal       : 12;   //Bits 31..20
	ULONG ulID            : 1;    //Bit  19
	ULONG ulLayer         : 2;    //Bits 18..17
	ULONG ulProtection    : 1;    //Bit  16
	ULONG ulBitRate       : 4;    //Bits 15..12
  ULONG ulSampleFreq    : 2;    //Bits 11..10
  ULONG ulPadding       : 1;    //Bit   9
  ULONG ulPrivate       : 1;    //Bit   8
  ULONG ulMode          : 2;    //Bits  7.. 6
  ULONG ulModeExtension : 2;    //Bits  5.. 4
  ULONG ulCopyright     : 1;    //Bit   3
  ULONG ulOriginal      : 1;    //Bit   2
  ULONG ulEmphasis      : 2;    //Bits  1.. 0
} __attribute__ ((packed)) MP3_HDR, *PMP3_HDR;

struct bandInfoStruct 
{
  SHORT longIdx[23];
  SHORT longDiff[22];
  SHORT shortIdx[14];
  SHORT shortDiff[13];
};

typedef struct bandInfoStruct bandInfoStruct;

struct gr_info_s 
{
  int         scfsi;
  unsigned    part2_3_length;
  unsigned    big_values;
  unsigned    scalefac_compress;
  unsigned    block_type;
  unsigned    mixed_block_flag;
  unsigned    table_select[3];
  unsigned    subblock_gain[3];
  unsigned    maxband[3];
  unsigned    maxbandl;
  unsigned    maxb;
  unsigned    region1start;
  unsigned    region2start;
  unsigned    preflag;
  unsigned    scalefac_scale;
  unsigned    count1table_select;
  fixed_t     *full_gain[3];
  fixed_t     *pow2gain;
};


struct III_sideinfo
{
  ULONG main_data_begin;
  ULONG private_bits;
  struct 
  {
    struct gr_info_s gr[2];
  } ch[2];
};

#endif

⌨️ 快捷键说明

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