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.

86 lines
3.8KB

  1. /*
  2. * H.26L/H.264/AVC/JVT/14496-10/... encoder/decoder
  3. * Copyright (c) 2003-2010 Michael Niedermayer <michaelni@gmx.at>
  4. *
  5. * This file is part of Libav.
  6. *
  7. * Libav is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * Libav is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with Libav; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. /**
  22. * @file
  23. * H.264 / AVC / MPEG4 part10 DSP functions.
  24. * @author Michael Niedermayer <michaelni@gmx.at>
  25. */
  26. #include <stdint.h>
  27. #include "avcodec.h"
  28. #include "h264dsp.h"
  29. #include "h264dsp_template.c"
  30. void ff_h264dsp_init(H264DSPContext *c)
  31. {
  32. c->h264_idct_add= ff_h264_idct_add_c;
  33. c->h264_idct8_add= ff_h264_idct8_add_c;
  34. c->h264_idct_dc_add= ff_h264_idct_dc_add_c;
  35. c->h264_idct8_dc_add= ff_h264_idct8_dc_add_c;
  36. c->h264_idct_add16 = ff_h264_idct_add16_c;
  37. c->h264_idct8_add4 = ff_h264_idct8_add4_c;
  38. c->h264_idct_add8 = ff_h264_idct_add8_c;
  39. c->h264_idct_add16intra= ff_h264_idct_add16intra_c;
  40. c->h264_luma_dc_dequant_idct= ff_h264_luma_dc_dequant_idct_c;
  41. c->h264_chroma_dc_dequant_idct= ff_h264_chroma_dc_dequant_idct_c;
  42. c->weight_h264_pixels_tab[0]= weight_h264_pixels16x16_c;
  43. c->weight_h264_pixels_tab[1]= weight_h264_pixels16x8_c;
  44. c->weight_h264_pixels_tab[2]= weight_h264_pixels8x16_c;
  45. c->weight_h264_pixels_tab[3]= weight_h264_pixels8x8_c;
  46. c->weight_h264_pixels_tab[4]= weight_h264_pixels8x4_c;
  47. c->weight_h264_pixels_tab[5]= weight_h264_pixels4x8_c;
  48. c->weight_h264_pixels_tab[6]= weight_h264_pixels4x4_c;
  49. c->weight_h264_pixels_tab[7]= weight_h264_pixels4x2_c;
  50. c->weight_h264_pixels_tab[8]= weight_h264_pixels2x4_c;
  51. c->weight_h264_pixels_tab[9]= weight_h264_pixels2x2_c;
  52. c->biweight_h264_pixels_tab[0]= biweight_h264_pixels16x16_c;
  53. c->biweight_h264_pixels_tab[1]= biweight_h264_pixels16x8_c;
  54. c->biweight_h264_pixels_tab[2]= biweight_h264_pixels8x16_c;
  55. c->biweight_h264_pixels_tab[3]= biweight_h264_pixels8x8_c;
  56. c->biweight_h264_pixels_tab[4]= biweight_h264_pixels8x4_c;
  57. c->biweight_h264_pixels_tab[5]= biweight_h264_pixels4x8_c;
  58. c->biweight_h264_pixels_tab[6]= biweight_h264_pixels4x4_c;
  59. c->biweight_h264_pixels_tab[7]= biweight_h264_pixels4x2_c;
  60. c->biweight_h264_pixels_tab[8]= biweight_h264_pixels2x4_c;
  61. c->biweight_h264_pixels_tab[9]= biweight_h264_pixels2x2_c;
  62. c->h264_v_loop_filter_luma= h264_v_loop_filter_luma_c;
  63. c->h264_h_loop_filter_luma= h264_h_loop_filter_luma_c;
  64. c->h264_h_loop_filter_luma_mbaff= h264_h_loop_filter_luma_mbaff_c;
  65. c->h264_v_loop_filter_luma_intra= h264_v_loop_filter_luma_intra_c;
  66. c->h264_h_loop_filter_luma_intra= h264_h_loop_filter_luma_intra_c;
  67. c->h264_h_loop_filter_luma_mbaff_intra= h264_h_loop_filter_luma_mbaff_intra_c;
  68. c->h264_v_loop_filter_chroma= h264_v_loop_filter_chroma_c;
  69. c->h264_h_loop_filter_chroma= h264_h_loop_filter_chroma_c;
  70. c->h264_h_loop_filter_chroma_mbaff= h264_h_loop_filter_chroma_mbaff_c;
  71. c->h264_v_loop_filter_chroma_intra= h264_v_loop_filter_chroma_intra_c;
  72. c->h264_h_loop_filter_chroma_intra= h264_h_loop_filter_chroma_intra_c;
  73. c->h264_h_loop_filter_chroma_mbaff_intra= h264_h_loop_filter_chroma_mbaff_intra_c;
  74. c->h264_loop_filter_strength= NULL;
  75. if (ARCH_ARM) ff_h264dsp_init_arm(c);
  76. if (HAVE_ALTIVEC) ff_h264dsp_init_ppc(c);
  77. if (HAVE_MMX) ff_h264dsp_init_x86(c);
  78. }