You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
986B

  1. #define AC3_FRAME_SIZE (6*256)
  2. #define AC3_MAX_CODED_FRAME_SIZE 3840 /* in bytes */
  3. #define AC3_MAX_CHANNELS 6
  4. typedef struct AC3EncodeContext {
  5. PutBitContext pb;
  6. int nb_channels;
  7. int nb_all_channels;
  8. int lfe_channel;
  9. int bit_rate;
  10. int sample_rate;
  11. int bsid;
  12. int frame_size_min; /* minimum frame size in case rounding is necessary */
  13. int frame_size; /* current frame size in words */
  14. int halfratecod;
  15. int frmsizecod;
  16. int fscod; /* frequency */
  17. int acmod;
  18. int lfe;
  19. int bsmod;
  20. short last_samples[AC3_MAX_CHANNELS][256];
  21. int chbwcod[AC3_MAX_CHANNELS];
  22. int nb_coefs[AC3_MAX_CHANNELS];
  23. /* bitrate allocation control */
  24. int sgaincod, sdecaycod, fdecaycod, dbkneecod, floorcod;
  25. int sgain, sdecay, fdecay, dbknee, floor;
  26. int csnroffst;
  27. int fgaincod[AC3_MAX_CHANNELS];
  28. int fsnroffst[AC3_MAX_CHANNELS];
  29. /* mantissa encoding */
  30. int mant1_cnt, mant2_cnt, mant4_cnt;
  31. } AC3EncodeContext;