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.

69 lines
2.4KB

  1. /*
  2. * Copyright (C) 2006 Aurelien Jacobs <aurel@gnuage.org>
  3. *
  4. * This file is part of FFmpeg.
  5. *
  6. * FFmpeg is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * FFmpeg is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with FFmpeg; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. /**
  21. * @file
  22. * VP5 and VP6 compatible video decoder (common data)
  23. */
  24. #include "vp56data.h"
  25. const uint8_t ff_vp56_b2p[] = { 0, 0, 0, 0, 1, 2, 3, 3, 3, 3 };
  26. const uint8_t ff_vp56_b6to4[] = { 0, 0, 1, 1, 2, 3 };
  27. const uint8_t ff_vp56_coeff_parse_table[6][11] = {
  28. { 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
  29. { 145, 165, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
  30. { 140, 148, 173, 0, 0, 0, 0, 0, 0, 0, 0 },
  31. { 135, 140, 155, 176, 0, 0, 0, 0, 0, 0, 0 },
  32. { 130, 134, 141, 157, 180, 0, 0, 0, 0, 0, 0 },
  33. { 129, 130, 133, 140, 153, 177, 196, 230, 243, 254, 254 },
  34. };
  35. const uint8_t ff_vp56_def_mb_types_stats[3][10][2] = {
  36. { { 69, 42 }, { 1, 2 }, { 1, 7 }, { 44, 42 }, { 6, 22 },
  37. { 1, 3 }, { 0, 2 }, { 1, 5 }, { 0, 1 }, { 0, 0 }, },
  38. { { 229, 8 }, { 1, 1 }, { 0, 8 }, { 0, 0 }, { 0, 0 },
  39. { 1, 2 }, { 0, 1 }, { 0, 0 }, { 1, 1 }, { 0, 0 }, },
  40. { { 122, 35 }, { 1, 1 }, { 1, 6 }, { 46, 34 }, { 0, 0 },
  41. { 1, 2 }, { 0, 1 }, { 0, 1 }, { 1, 1 }, { 0, 0 }, },
  42. };
  43. const VP56Tree ff_vp56_pva_tree[] = {
  44. { 8, 0},
  45. { 4, 1},
  46. { 2, 2}, {-0}, {-1},
  47. { 2, 3}, {-2}, {-3},
  48. { 4, 4},
  49. { 2, 5}, {-4}, {-5},
  50. { 2, 6}, {-6}, {-7},
  51. };
  52. const VP56Tree ff_vp56_pc_tree[] = {
  53. { 4, 6},
  54. { 2, 7}, {-0}, {-1},
  55. { 4, 8},
  56. { 2, 9}, {-2}, {-3},
  57. { 2,10}, {-4}, {-5},
  58. };
  59. const uint8_t ff_vp56_coeff_bias[] = { 0, 1, 2, 3, 4, 5, 7, 11, 19, 35, 67 };
  60. const uint8_t ff_vp56_coeff_bit_length[] = { 0, 1, 2, 3, 4, 10 };