annotate ffmpeg/libavcodec/vp8dsp.h @ 13:844d341cf643 tip

Back up before ISMIR
author Yading Song <yading.song@eecs.qmul.ac.uk>
date Thu, 31 Oct 2013 13:17:06 +0000
parents 6840f77b83aa
children
rev   line source
yading@10 1 /*
yading@10 2 * Copyright (C) 2010 David Conrad
yading@10 3 * Copyright (C) 2010 Ronald S. Bultje
yading@10 4 *
yading@10 5 * This file is part of FFmpeg.
yading@10 6 *
yading@10 7 * FFmpeg is free software; you can redistribute it and/or
yading@10 8 * modify it under the terms of the GNU Lesser General Public
yading@10 9 * License as published by the Free Software Foundation; either
yading@10 10 * version 2.1 of the License, or (at your option) any later version.
yading@10 11 *
yading@10 12 * FFmpeg is distributed in the hope that it will be useful,
yading@10 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
yading@10 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
yading@10 15 * Lesser General Public License for more details.
yading@10 16 *
yading@10 17 * You should have received a copy of the GNU Lesser General Public
yading@10 18 * License along with FFmpeg; if not, write to the Free Software
yading@10 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
yading@10 20 */
yading@10 21
yading@10 22 /**
yading@10 23 * @file
yading@10 24 * VP8 compatible video decoder
yading@10 25 */
yading@10 26
yading@10 27 #ifndef AVCODEC_VP8DSP_H
yading@10 28 #define AVCODEC_VP8DSP_H
yading@10 29
yading@10 30 #include <stddef.h>
yading@10 31 #include <stdint.h>
yading@10 32
yading@10 33 typedef void (*vp8_mc_func)(uint8_t *dst/*align 8*/, ptrdiff_t dstStride,
yading@10 34 uint8_t *src/*align 1*/, ptrdiff_t srcStride,
yading@10 35 int h, int x, int y);
yading@10 36
yading@10 37 typedef struct VP8DSPContext {
yading@10 38 void (*vp8_luma_dc_wht)(int16_t block[4][4][16], int16_t dc[16]);
yading@10 39 void (*vp8_luma_dc_wht_dc)(int16_t block[4][4][16], int16_t dc[16]);
yading@10 40 void (*vp8_idct_add)(uint8_t *dst, int16_t block[16], ptrdiff_t stride);
yading@10 41 void (*vp8_idct_dc_add)(uint8_t *dst, int16_t block[16], ptrdiff_t stride);
yading@10 42 void (*vp8_idct_dc_add4y)(uint8_t *dst, int16_t block[4][16],
yading@10 43 ptrdiff_t stride);
yading@10 44 void (*vp8_idct_dc_add4uv)(uint8_t *dst, int16_t block[4][16],
yading@10 45 ptrdiff_t stride);
yading@10 46
yading@10 47 // loop filter applied to edges between macroblocks
yading@10 48 void (*vp8_v_loop_filter16y)(uint8_t *dst, ptrdiff_t stride,
yading@10 49 int flim_E, int flim_I, int hev_thresh);
yading@10 50 void (*vp8_h_loop_filter16y)(uint8_t *dst, ptrdiff_t stride,
yading@10 51 int flim_E, int flim_I, int hev_thresh);
yading@10 52 void (*vp8_v_loop_filter8uv)(uint8_t *dstU, uint8_t *dstV, ptrdiff_t stride,
yading@10 53 int flim_E, int flim_I, int hev_thresh);
yading@10 54 void (*vp8_h_loop_filter8uv)(uint8_t *dstU, uint8_t *dstV, ptrdiff_t stride,
yading@10 55 int flim_E, int flim_I, int hev_thresh);
yading@10 56
yading@10 57 // loop filter applied to inner macroblock edges
yading@10 58 void (*vp8_v_loop_filter16y_inner)(uint8_t *dst, ptrdiff_t stride,
yading@10 59 int flim_E, int flim_I, int hev_thresh);
yading@10 60 void (*vp8_h_loop_filter16y_inner)(uint8_t *dst, ptrdiff_t stride,
yading@10 61 int flim_E, int flim_I, int hev_thresh);
yading@10 62 void (*vp8_v_loop_filter8uv_inner)(uint8_t *dstU, uint8_t *dstV,
yading@10 63 ptrdiff_t stride,
yading@10 64 int flim_E, int flim_I, int hev_thresh);
yading@10 65 void (*vp8_h_loop_filter8uv_inner)(uint8_t *dstU, uint8_t *dstV,
yading@10 66 ptrdiff_t stride,
yading@10 67 int flim_E, int flim_I, int hev_thresh);
yading@10 68
yading@10 69 void (*vp8_v_loop_filter_simple)(uint8_t *dst, ptrdiff_t stride, int flim);
yading@10 70 void (*vp8_h_loop_filter_simple)(uint8_t *dst, ptrdiff_t stride, int flim);
yading@10 71
yading@10 72 /**
yading@10 73 * first dimension: width>>3, height is assumed equal to width
yading@10 74 * second dimension: 0 if no vertical interpolation is needed;
yading@10 75 * 1 4-tap vertical interpolation filter (my & 1)
yading@10 76 * 2 6-tap vertical interpolation filter (!(my & 1))
yading@10 77 * third dimension: same as second dimension, for horizontal interpolation
yading@10 78 * so something like put_vp8_epel_pixels_tab[width>>3][2*!!my-(my&1)][2*!!mx-(mx&1)](..., mx, my)
yading@10 79 */
yading@10 80 vp8_mc_func put_vp8_epel_pixels_tab[3][3][3];
yading@10 81 vp8_mc_func put_vp8_bilinear_pixels_tab[3][3][3];
yading@10 82 } VP8DSPContext;
yading@10 83
yading@10 84 void ff_put_vp8_pixels16_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
yading@10 85 int h, int x, int y);
yading@10 86 void ff_put_vp8_pixels8_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
yading@10 87 int h, int x, int y);
yading@10 88 void ff_put_vp8_pixels4_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
yading@10 89 int h, int x, int y);
yading@10 90
yading@10 91 void ff_vp8dsp_init(VP8DSPContext *c);
yading@10 92 void ff_vp8dsp_init_x86(VP8DSPContext *c);
yading@10 93 void ff_vp8dsp_init_altivec(VP8DSPContext *c);
yading@10 94 void ff_vp8dsp_init_arm(VP8DSPContext *c);
yading@10 95
yading@10 96 #endif /* AVCODEC_VP8DSP_H */