diff options
Diffstat (limited to 'libavcodec/dsputil.h')
-rw-r--r-- | libavcodec/dsputil.h | 39 |
1 files changed, 32 insertions, 7 deletions
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h index f6dbae7..f0158cd 100644 --- a/libavcodec/dsputil.h +++ b/libavcodec/dsputil.h @@ -3,20 +3,20 @@ * Copyright (c) 2000, 2001, 2002 Fabrice Bellard * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at> * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -45,6 +45,9 @@ void ff_fdct248_islow_8(int16_t *data); void ff_fdct248_islow_10(int16_t *data); void ff_j_rev_dct(int16_t *data); +void ff_j_rev_dct4(int16_t *data); +void ff_j_rev_dct2(int16_t *data); +void ff_j_rev_dct1(int16_t *data); void ff_fdct_mmx(int16_t *block); void ff_fdct_mmxext(int16_t *block); @@ -67,6 +70,8 @@ void ff_h264_chroma_dc_dequant_idct_ ## depth ## _c(int16_t *block, int qmul); H264_IDCT( 8) H264_IDCT( 9) H264_IDCT(10) +H264_IDCT(12) +H264_IDCT(14) void ff_svq3_luma_dc_dequant_idct_c(int16_t *output, int16_t *input, int qp); void ff_svq3_add_idct_c(uint8_t *dst, int16_t *block, int stride, int qp, int dc); @@ -93,6 +98,8 @@ void ff_avg_pixels16x16_ ## depth ## _c(uint8_t *dst, uint8_t *src, int stride); PUTAVG_PIXELS( 8) PUTAVG_PIXELS( 9) PUTAVG_PIXELS(10) +PUTAVG_PIXELS(12) +PUTAVG_PIXELS(14) #define ff_put_pixels8x8_c ff_put_pixels8x8_8_c #define ff_avg_pixels8x8_c ff_avg_pixels8x8_8_c @@ -116,7 +123,7 @@ void ff_gmc_c(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int oy, /* minimum alignment rules ;) If you notice errors in the align stuff, need more alignment for some ASM code for some CPU or need to use a function with less aligned data then send a mail -to the libav-devel mailing list, ... +to the ffmpeg-devel mailing list, ... !warning These alignments might not match reality, (missing attribute((align)) stuff somewhere possible). @@ -163,7 +170,7 @@ DEF_OLD_QPEL(qpel8_mc13_old_c) DEF_OLD_QPEL(qpel8_mc33_old_c) #define CALL_2X_PIXELS(a, b, n)\ -static void a(uint8_t *block, const uint8_t *pixels, int line_size, int h){\ +static void a(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h){\ b(block , pixels , line_size, h);\ b(block+n, pixels+n, line_size, h);\ } @@ -186,6 +193,14 @@ void ff_init_scantable(uint8_t *, ScanTable *st, const uint8_t *src_scantable); void ff_init_scantable_permutation(uint8_t *idct_permutation, int idct_permutation_type); +#define EMULATED_EDGE(depth) \ +void ff_emulated_edge_mc_ ## depth (uint8_t *buf, const uint8_t *src, ptrdiff_t linesize,\ + int block_w, int block_h,\ + int src_x, int src_y, int w, int h); + +EMULATED_EDGE(8) +EMULATED_EDGE(16) + /** * DSPContext. */ @@ -229,6 +244,8 @@ typedef struct DSPContext { me_cmp_func vsad[6]; me_cmp_func vsse[6]; me_cmp_func nsse[6]; + me_cmp_func w53[6]; + me_cmp_func w97[6]; me_cmp_func dct_max[6]; me_cmp_func dct264_sad[6]; @@ -318,7 +335,7 @@ typedef struct DSPContext { /* huffyuv specific */ void (*add_bytes)(uint8_t *dst/*align 16*/, uint8_t *src/*align 16*/, int w); - void (*diff_bytes)(uint8_t *dst/*align 16*/, uint8_t *src1/*align 16*/, uint8_t *src2/*align 1*/,int w); + void (*diff_bytes)(uint8_t *dst/*align 16*/, const uint8_t *src1/*align 16*/, const uint8_t *src2/*align 1*/,int w); /** * subtract huffyuv's variant of median prediction * note, this might read from src1[-1], src2[-1] @@ -327,6 +344,7 @@ typedef struct DSPContext { void (*add_hfyu_median_prediction)(uint8_t *dst, const uint8_t *top, const uint8_t *diff, int w, int *left, int *left_top); int (*add_hfyu_left_prediction)(uint8_t *dst, const uint8_t *src, int w, int left); void (*add_hfyu_left_prediction_bgr32)(uint8_t *dst, const uint8_t *src, int w, int *red, int *green, int *blue, int *alpha); + /* this might write to dst[w] */ void (*bswap_buf)(uint32_t *dst, const uint32_t *src, int w); void (*bswap16_buf)(uint16_t *dst, const uint16_t *src, int len); @@ -439,6 +457,7 @@ typedef struct DSPContext { void ff_dsputil_static_init(void); void ff_dsputil_init(DSPContext* p, AVCodecContext *avctx); +attribute_deprecated void dsputil_init(DSPContext* c, AVCodecContext *avctx); int ff_check_alignment(void); @@ -480,6 +499,10 @@ static inline int get_penalty_factor(int lambda, int lambda2, int type){ return lambda>>FF_LAMBDA_SHIFT; case FF_CMP_DCT: return (3*lambda)>>(FF_LAMBDA_SHIFT+1); + case FF_CMP_W53: + return (4*lambda)>>(FF_LAMBDA_SHIFT); + case FF_CMP_W97: + return (2*lambda)>>(FF_LAMBDA_SHIFT); case FF_CMP_SATD: case FF_CMP_DCT264: return (2*lambda)>>FF_LAMBDA_SHIFT; @@ -501,6 +524,8 @@ void ff_dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx); void ff_dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx); void ff_dsputil_init_vis(DSPContext* c, AVCodecContext *avctx); +void ff_dsputil_init_dwt(DSPContext *c); + #if (ARCH_ARM && HAVE_NEON) || ARCH_PPC || HAVE_MMX # define STRIDE_ALIGN 16 #else |