Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > VSs > VSs__H264__App
diff libavcodec/h264_dsp.h @ 2:897f711a7157
rearrange to work with autoconf
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Tue, 25 Sep 2012 15:55:33 +0200 |
| parents | |
| children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/libavcodec/h264_dsp.h Tue Sep 25 15:55:33 2012 +0200 1.3 @@ -0,0 +1,83 @@ 1.4 +/* 1.5 + * Copyright (c) 2003-2010 Michael Niedermayer <michaelni@gmx.at> 1.6 + * 1.7 + * This file is part of FFmpeg. 1.8 + * 1.9 + * FFmpeg is free software; you can redistribute it and/or 1.10 + * modify it under the terms of the GNU Lesser General Public 1.11 + * License as published by the Free Software Foundation; either 1.12 + * version 2.1 of the License, or (at your option) any later version. 1.13 + * 1.14 + * FFmpeg is distributed in the hope that it will be useful, 1.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 1.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1.17 + * Lesser General Public License for more details. 1.18 + * 1.19 + * You should have received a copy of the GNU Lesser General Public 1.20 + * License along with FFmpeg; if not, write to the Free Software 1.21 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 1.22 + */ 1.23 + 1.24 +/** 1.25 + * @file 1.26 + * H.264 DSP functions. 1.27 + * @author Michael Niedermayer <michaelni@gmx.at> 1.28 + */ 1.29 + 1.30 +#ifndef AVCODEC_H264DSP_H 1.31 +#define AVCODEC_H264DSP_H 1.32 + 1.33 +#include <stdint.h> 1.34 +#include "dsputil.h" 1.35 + 1.36 +//typedef void (*h264_chroma_mc_func)(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int srcStride, int h, int x, int y); 1.37 +typedef void (*h264_weight_func)(uint8_t *block, int stride, int log2_denom, int weight, int offset); 1.38 +typedef void (*h264_biweight_func)(uint8_t *dst, uint8_t *src, int stride, int log2_denom, int weightd, int weights, int offset); 1.39 + 1.40 +/** 1.41 + * Context for storing H.264 DSP functions 1.42 + */ 1.43 +typedef struct H264DSPContext{ 1.44 + /* weighted MC */ 1.45 + h264_weight_func weight_h264_pixels_tab[10]; 1.46 + h264_biweight_func biweight_h264_pixels_tab[10]; 1.47 + 1.48 + /* loop filter */ 1.49 + void (*h264_v_loop_filter_luma)(uint8_t *pix/*align 16*/, int stride, int alpha, int beta, int8_t *tc0); 1.50 + void (*h264_h_loop_filter_luma)(uint8_t *pix/*align 4 */, int stride, int alpha, int beta, int8_t *tc0); 1.51 + /* v/h_loop_filter_luma_intra: align 16 */ 1.52 + void (*h264_v_loop_filter_luma_intra)(uint8_t *pix, int stride, int alpha, int beta); 1.53 + void (*h264_h_loop_filter_luma_intra)(uint8_t *pix, int stride, int alpha, int beta); 1.54 + void (*h264_v_loop_filter_chroma)(uint8_t *pix/*align 8*/, int stride, int alpha, int beta, int8_t *tc0); 1.55 + void (*h264_h_loop_filter_chroma)(uint8_t *pix/*align 4*/, int stride, int alpha, int beta, int8_t *tc0); 1.56 + void (*h264_v_loop_filter_chroma_intra)(uint8_t *pix/*align 8*/, int stride, int alpha, int beta); 1.57 + void (*h264_h_loop_filter_chroma_intra)(uint8_t *pix/*align 8*/, int stride, int alpha, int beta); 1.58 + // h264_loop_filter_strength: simd only. the C version is inlined in h264.c 1.59 + void (*h264_loop_filter_strength)(int16_t bS[2][4][4], uint8_t nnz[40], int8_t ref[2][40], int16_t mv[2][40][2], 1.60 + int bidir, int edges, int step, int mask_mv0, int mask_mv1, int field); 1.61 + 1.62 + /* IDCT */ 1.63 + /* NOTE!!! if you implement any of h264_idct8_add, h264_idct8_add4 then you must implement all of them 1.64 + NOTE!!! if you implement any of h264_idct_add, h264_idct_add16, h264_idct_add16intra, h264_idct_add8 then you must implement all of them 1.65 + The reason for above, is that no 2 out of one list may use a different permutation. 1.66 + */ 1.67 + void (*h264_idct_add)(uint8_t *dst/*align 4*/, DCTELEM *block/*align 16*/, int stride); 1.68 + void (*h264_idct8_add)(uint8_t *dst/*align 8*/, DCTELEM *block/*align 16*/, int stride); 1.69 + void (*h264_idct_dc_add)(uint8_t *dst/*align 4*/, DCTELEM *block/*align 16*/, int stride); 1.70 + void (*h264_idct8_dc_add)(uint8_t *dst/*align 8*/, DCTELEM *block/*align 16*/, int stride); 1.71 + void (*h264_dct)(DCTELEM block[4][4]); 1.72 + void (*h264_idct_add16)(uint8_t *dst/*align 16*/, const int *blockoffset, DCTELEM *block/*align 16*/, int stride, const uint8_t nnzc[6*8]); 1.73 + void (*h264_idct8_add4)(uint8_t *dst/*align 16*/, const int *blockoffset, DCTELEM *block/*align 16*/, int stride, const uint8_t nnzc[6*8]); 1.74 + void (*h264_idct_add8)(uint8_t **dst/*align 16*/, const int *blockoffset, DCTELEM *block/*align 16*/, int stride, const uint8_t nnzc[6*8]); 1.75 + void (*h264_idct_add16intra)(uint8_t *dst/*align 16*/, const int *blockoffset, DCTELEM *block/*align 16*/, int stride, const uint8_t nnzc[6*8]); 1.76 + 1.77 + qpel_mc_func (*qpel_put)[16]; 1.78 + qpel_mc_func (*qpel_avg)[16]; 1.79 +}H264DSPContext; 1.80 + 1.81 +void ff_h264dsp_init(H264DSPContext *c); 1.82 +void ff_h264dsp_init_arm(H264DSPContext *c); 1.83 +void ff_h264dsp_init_ppc(H264DSPContext *c); 1.84 +void ff_h264dsp_init_x86(H264DSPContext *c); 1.85 + 1.86 +#endif /* AVCODEC_H264DSP_H */
