msmpeg4data.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. * MSMPEG4 backend for ffmpeg encoder and decoder
  3. * copyright (c) 2001 Fabrice Bellard
  4. * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
  5. *
  6. * msmpeg4v1 & v2 stuff by Michael Niedermayer <michaelni@gmx.at>
  7. *
  8. * This file is part of FFmpeg.
  9. *
  10. * FFmpeg is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU Lesser General Public
  12. * License as published by the Free Software Foundation; either
  13. * version 2.1 of the License, or (at your option) any later version.
  14. *
  15. * FFmpeg is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * Lesser General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Lesser General Public
  21. * License along with FFmpeg; if not, write to the Free Software
  22. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  23. */
  24. /**
  25. * @file libavcodec/msmpeg4data.h
  26. * MSMPEG4 data tables.
  27. */
  28. #ifndef AVCODEC_MSMPEG4DATA_H
  29. #define AVCODEC_MSMPEG4DATA_H
  30. #include "libavutil/common.h"
  31. #include "bitstream.h"
  32. #include "rl.h"
  33. /* motion vector table */
  34. typedef struct MVTable {
  35. int n;
  36. const uint16_t *table_mv_code;
  37. const uint8_t *table_mv_bits;
  38. const uint8_t *table_mvx;
  39. const uint8_t *table_mvy;
  40. uint16_t *table_mv_index; /* encoding: convert mv to index in table_mv */
  41. VLC vlc; /* decoding: vlc */
  42. } MVTable;
  43. extern VLC ff_msmp4_mb_i_vlc;
  44. extern VLC ff_msmp4_dc_luma_vlc[2];
  45. extern VLC ff_msmp4_dc_chroma_vlc[2];
  46. /* intra picture macroblock coded block pattern */
  47. extern const uint16_t ff_msmp4_mb_i_table[64][2];
  48. extern const uint8_t cbpy_tab[16][2];
  49. extern const uint8_t DCtab_lum[13][2];
  50. extern const uint8_t DCtab_chrom[13][2];
  51. extern const uint8_t mvtab[33][2];
  52. extern const uint8_t intra_MCBPC_code[9];
  53. extern const uint8_t intra_MCBPC_bits[9];
  54. extern const uint8_t inter_MCBPC_code[28];
  55. extern const uint8_t inter_MCBPC_bits[28];
  56. #define WMV1_SCANTABLE_COUNT 4
  57. extern const uint8_t wmv1_scantable[WMV1_SCANTABLE_COUNT][64];
  58. #define NB_RL_TABLES 6
  59. extern RLTable rl_table[NB_RL_TABLES];
  60. extern const uint8_t wmv1_y_dc_scale_table[32];
  61. extern const uint8_t wmv1_c_dc_scale_table[32];
  62. extern const uint8_t old_ff_y_dc_scale_table[32];
  63. extern MVTable mv_tables[2];
  64. extern const uint8_t v2_mb_type[8][2];
  65. extern const uint8_t v2_intra_cbpc[4][2];
  66. extern const uint32_t table_mb_non_intra[128][2];
  67. extern const uint8_t table_inter_intra[4][2];
  68. extern const uint32_t ff_table0_dc_lum[120][2];
  69. extern const uint32_t ff_table1_dc_lum[120][2];
  70. extern const uint32_t ff_table0_dc_chroma[120][2];
  71. extern const uint32_t ff_table1_dc_chroma[120][2];
  72. #define WMV2_INTER_CBP_TABLE_COUNT 4
  73. extern const uint32_t (* const wmv2_inter_table[WMV2_INTER_CBP_TABLE_COUNT])[2];
  74. extern const uint8_t wmv2_scantableA[64];
  75. extern const uint8_t wmv2_scantableB[64];
  76. #endif /* AVCODEC_MSMPEG4DATA_H */