• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

libavcodec/arm/h264dsp_init_arm.c

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2010 Mans Rullgard <mans@mansr.com>
00003  *
00004  * This file is part of FFmpeg.
00005  *
00006  * FFmpeg is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * FFmpeg is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with FFmpeg; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00019  */
00020 
00021 #include <stdint.h>
00022 
00023 #include "libavcodec/dsputil.h"
00024 #include "libavcodec/h264dsp.h"
00025 
00026 void ff_h264_v_loop_filter_luma_neon(uint8_t *pix, int stride, int alpha,
00027                                      int beta, int8_t *tc0);
00028 void ff_h264_h_loop_filter_luma_neon(uint8_t *pix, int stride, int alpha,
00029                                      int beta, int8_t *tc0);
00030 void ff_h264_v_loop_filter_chroma_neon(uint8_t *pix, int stride, int alpha,
00031                                        int beta, int8_t *tc0);
00032 void ff_h264_h_loop_filter_chroma_neon(uint8_t *pix, int stride, int alpha,
00033                                        int beta, int8_t *tc0);
00034 
00035 void ff_weight_h264_pixels_16x16_neon(uint8_t *ds, int stride, int log2_den,
00036                                       int weight, int offset);
00037 void ff_weight_h264_pixels_16x8_neon(uint8_t *ds, int stride, int log2_den,
00038                                      int weight, int offset);
00039 void ff_weight_h264_pixels_8x16_neon(uint8_t *ds, int stride, int log2_den,
00040                                      int weight, int offset);
00041 void ff_weight_h264_pixels_8x8_neon(uint8_t *ds, int stride, int log2_den,
00042                                     int weight, int offset);
00043 void ff_weight_h264_pixels_8x4_neon(uint8_t *ds, int stride, int log2_den,
00044                                     int weight, int offset);
00045 void ff_weight_h264_pixels_4x8_neon(uint8_t *ds, int stride, int log2_den,
00046                                     int weight, int offset);
00047 void ff_weight_h264_pixels_4x4_neon(uint8_t *ds, int stride, int log2_den,
00048                                     int weight, int offset);
00049 void ff_weight_h264_pixels_4x2_neon(uint8_t *ds, int stride, int log2_den,
00050                                     int weight, int offset);
00051 
00052 void ff_biweight_h264_pixels_16x16_neon(uint8_t *dst, uint8_t *src, int stride,
00053                                         int log2_den, int weightd, int weights,
00054                                         int offset);
00055 void ff_biweight_h264_pixels_16x8_neon(uint8_t *dst, uint8_t *src, int stride,
00056                                        int log2_den, int weightd, int weights,
00057                                        int offset);
00058 void ff_biweight_h264_pixels_8x16_neon(uint8_t *dst, uint8_t *src, int stride,
00059                                        int log2_den, int weightd, int weights,
00060                                        int offset);
00061 void ff_biweight_h264_pixels_8x8_neon(uint8_t *dst, uint8_t *src, int stride,
00062                                       int log2_den, int weightd, int weights,
00063                                       int offset);
00064 void ff_biweight_h264_pixels_8x4_neon(uint8_t *dst, uint8_t *src, int stride,
00065                                       int log2_den, int weightd, int weights,
00066                                       int offset);
00067 void ff_biweight_h264_pixels_4x8_neon(uint8_t *dst, uint8_t *src, int stride,
00068                                       int log2_den, int weightd, int weights,
00069                                       int offset);
00070 void ff_biweight_h264_pixels_4x4_neon(uint8_t *dst, uint8_t *src, int stride,
00071                                       int log2_den, int weightd, int weights,
00072                                       int offset);
00073 void ff_biweight_h264_pixels_4x2_neon(uint8_t *dst, uint8_t *src, int stride,
00074                                       int log2_den, int weightd, int weights,
00075                                       int offset);
00076 
00077 void ff_h264_idct_add_neon(uint8_t *dst, DCTELEM *block, int stride);
00078 void ff_h264_idct_dc_add_neon(uint8_t *dst, DCTELEM *block, int stride);
00079 void ff_h264_idct_add16_neon(uint8_t *dst, const int *block_offset,
00080                              DCTELEM *block, int stride,
00081                              const uint8_t nnzc[6*8]);
00082 void ff_h264_idct_add16intra_neon(uint8_t *dst, const int *block_offset,
00083                                   DCTELEM *block, int stride,
00084                                   const uint8_t nnzc[6*8]);
00085 void ff_h264_idct_add8_neon(uint8_t **dest, const int *block_offset,
00086                             DCTELEM *block, int stride,
00087                             const uint8_t nnzc[6*8]);
00088 
00089 #if HAVE_NEON
00090 static void ff_h264dsp_init_neon(H264DSPContext *c)
00091 {
00092     c->h264_v_loop_filter_luma   = ff_h264_v_loop_filter_luma_neon;
00093     c->h264_h_loop_filter_luma   = ff_h264_h_loop_filter_luma_neon;
00094     c->h264_v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_neon;
00095     c->h264_h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_neon;
00096 
00097     c->weight_h264_pixels_tab[0] = ff_weight_h264_pixels_16x16_neon;
00098     c->weight_h264_pixels_tab[1] = ff_weight_h264_pixels_16x8_neon;
00099     c->weight_h264_pixels_tab[2] = ff_weight_h264_pixels_8x16_neon;
00100     c->weight_h264_pixels_tab[3] = ff_weight_h264_pixels_8x8_neon;
00101     c->weight_h264_pixels_tab[4] = ff_weight_h264_pixels_8x4_neon;
00102     c->weight_h264_pixels_tab[5] = ff_weight_h264_pixels_4x8_neon;
00103     c->weight_h264_pixels_tab[6] = ff_weight_h264_pixels_4x4_neon;
00104     c->weight_h264_pixels_tab[7] = ff_weight_h264_pixels_4x2_neon;
00105 
00106     c->biweight_h264_pixels_tab[0] = ff_biweight_h264_pixels_16x16_neon;
00107     c->biweight_h264_pixels_tab[1] = ff_biweight_h264_pixels_16x8_neon;
00108     c->biweight_h264_pixels_tab[2] = ff_biweight_h264_pixels_8x16_neon;
00109     c->biweight_h264_pixels_tab[3] = ff_biweight_h264_pixels_8x8_neon;
00110     c->biweight_h264_pixels_tab[4] = ff_biweight_h264_pixels_8x4_neon;
00111     c->biweight_h264_pixels_tab[5] = ff_biweight_h264_pixels_4x8_neon;
00112     c->biweight_h264_pixels_tab[6] = ff_biweight_h264_pixels_4x4_neon;
00113     c->biweight_h264_pixels_tab[7] = ff_biweight_h264_pixels_4x2_neon;
00114 
00115     c->h264_idct_add        = ff_h264_idct_add_neon;
00116     c->h264_idct_dc_add     = ff_h264_idct_dc_add_neon;
00117     c->h264_idct_add16      = ff_h264_idct_add16_neon;
00118     c->h264_idct_add16intra = ff_h264_idct_add16intra_neon;
00119     c->h264_idct_add8       = ff_h264_idct_add8_neon;
00120 }
00121 #endif
00122 
00123 void ff_h264dsp_init_arm(H264DSPContext *c)
00124 {
00125     if (HAVE_NEON) ff_h264dsp_init_neon(c);
00126 }

Generated on Fri Sep 16 2011 17:17:34 for FFmpeg by  doxygen 1.7.1