#include "dsputil.h"
#include "vp8dsp.h"
Go to the source code of this file.
Defines | |
#define | MUL_20091(a) ((((a)*20091) >> 16) + (a)) |
#define | MUL_35468(a) (((a)*35468) >> 16) |
#define | LOAD_PIXELS |
#define | clip_int8(n) (cm[n+0x80]-0x80) |
#define | LOOP_FILTER(dir, size, stridea, strideb, maybe_inline) |
#define | UV_LOOP_FILTER(dir, stridea, strideb) |
#define | PUT_PIXELS(WIDTH) |
#define | FILTER_6TAP(src, F, stride) |
#define | FILTER_4TAP(src, F, stride) |
#define | VP8_EPEL_H(SIZE, TAPS) |
#define | VP8_EPEL_V(SIZE, TAPS) |
#define | VP8_EPEL_HV(SIZE, HTAPS, VTAPS) |
#define | VP8_BILINEAR(SIZE) |
#define | VP8_MC_FUNC(IDX, SIZE) |
#define | VP8_BILINEAR_MC_FUNC(IDX, SIZE) |
Functions | |
static void | vp8_luma_dc_wht_c (DCTELEM block[4][4][16], DCTELEM dc[16]) |
VP8 compatible video decoder. | |
static void | vp8_luma_dc_wht_dc_c (DCTELEM block[4][4][16], DCTELEM dc[16]) |
static void | vp8_idct_add_c (uint8_t *dst, DCTELEM block[16], int stride) |
static void | vp8_idct_dc_add_c (uint8_t *dst, DCTELEM block[16], int stride) |
static void | vp8_idct_dc_add4uv_c (uint8_t *dst, DCTELEM block[4][16], int stride) |
static void | vp8_idct_dc_add4y_c (uint8_t *dst, DCTELEM block[4][16], int stride) |
static av_always_inline void | filter_common (uint8_t *p, int stride, int is4tap) |
static av_always_inline int | simple_limit (uint8_t *p, int stride, int flim) |
static av_always_inline int | normal_limit (uint8_t *p, int stride, int E, int I) |
E - limit at the macroblock edge I - limit for interior difference. | |
static av_always_inline int | hev (uint8_t *p, int stride, int thresh) |
static av_always_inline void | filter_mbedge (uint8_t *p, int stride) |
static void | vp8_v_loop_filter_simple_c (uint8_t *dst, int stride, int flim) |
static void | vp8_h_loop_filter_simple_c (uint8_t *dst, int stride, int flim) |
av_cold void | ff_vp8dsp_init (VP8DSPContext *dsp) |
Variables | |
static const uint8_t | subpel_filters [7][6] |
#define clip_int8 | ( | n | ) | (cm[n+0x80]-0x80) |
#define LOAD_PIXELS |
Value:
int av_unused p3 = p[-4*stride];\ int av_unused p2 = p[-3*stride];\ int av_unused p1 = p[-2*stride];\ int av_unused p0 = p[-1*stride];\ int av_unused q0 = p[ 0*stride];\ int av_unused q1 = p[ 1*stride];\ int av_unused q2 = p[ 2*stride];\ int av_unused q3 = p[ 3*stride];
Definition at line 145 of file vp8dsp.c.
Referenced by filter_common(), filter_mbedge(), hev(), normal_limit(), and simple_limit().
#define LOOP_FILTER | ( | dir, | |||
size, | |||||
stridea, | |||||
strideb, | |||||
maybe_inline | ) |
Value:
static maybe_inline void vp8_ ## dir ## _loop_filter ## size ## _c(uint8_t *dst, int stride,\ int flim_E, int flim_I, int hev_thresh)\ {\ int i;\ \ for (i = 0; i < size; i++)\ if (normal_limit(dst+i*stridea, strideb, flim_E, flim_I)) {\ if (hev(dst+i*stridea, strideb, hev_thresh))\ filter_common(dst+i*stridea, strideb, 1);\ else\ filter_mbedge(dst+i*stridea, strideb);\ }\ }\ \ static maybe_inline void vp8_ ## dir ## _loop_filter ## size ## _inner_c(uint8_t *dst, int stride,\ int flim_E, int flim_I, int hev_thresh)\ {\ int i;\ \ for (i = 0; i < size; i++)\ if (normal_limit(dst+i*stridea, strideb, flim_E, flim_I)) {\ int hv = hev(dst+i*stridea, strideb, hev_thresh);\ if (hv) \ filter_common(dst+i*stridea, strideb, 1);\ else \ filter_common(dst+i*stridea, strideb, 0);\ }\ }
#define MUL_20091 | ( | a | ) | ((((a)*20091) >> 16) + (a)) |
#define MUL_35468 | ( | a | ) | (((a)*35468) >> 16) |
#define PUT_PIXELS | ( | WIDTH | ) |
#define UV_LOOP_FILTER | ( | dir, | |||
stridea, | |||||
strideb | ) |
Value:
LOOP_FILTER(dir, 8, stridea, strideb, av_always_inline) \ static void vp8_ ## dir ## _loop_filter8uv_c(uint8_t *dstU, uint8_t *dstV, int stride,\ int fE, int fI, int hev_thresh)\ {\ vp8_ ## dir ## _loop_filter8_c(dstU, stride, fE, fI, hev_thresh);\ vp8_ ## dir ## _loop_filter8_c(dstV, stride, fE, fI, hev_thresh);\ }\ static void vp8_ ## dir ## _loop_filter8uv_inner_c(uint8_t *dstU, uint8_t *dstV, int stride,\ int fE, int fI, int hev_thresh)\ {\ vp8_ ## dir ## _loop_filter8_inner_c(dstU, stride, fE, fI, hev_thresh);\ vp8_ ## dir ## _loop_filter8_inner_c(dstV, stride, fE, fI, hev_thresh);\ }
#define VP8_BILINEAR_MC_FUNC | ( | IDX, | |||
SIZE | ) |
Value:
dsp->put_vp8_bilinear_pixels_tab[IDX][0][0] = put_vp8_pixels ## SIZE ## _c; \ dsp->put_vp8_bilinear_pixels_tab[IDX][0][1] = put_vp8_bilinear ## SIZE ## _h_c; \ dsp->put_vp8_bilinear_pixels_tab[IDX][0][2] = put_vp8_bilinear ## SIZE ## _h_c; \ dsp->put_vp8_bilinear_pixels_tab[IDX][1][0] = put_vp8_bilinear ## SIZE ## _v_c; \ dsp->put_vp8_bilinear_pixels_tab[IDX][1][1] = put_vp8_bilinear ## SIZE ## _hv_c; \ dsp->put_vp8_bilinear_pixels_tab[IDX][1][2] = put_vp8_bilinear ## SIZE ## _hv_c; \ dsp->put_vp8_bilinear_pixels_tab[IDX][2][0] = put_vp8_bilinear ## SIZE ## _v_c; \ dsp->put_vp8_bilinear_pixels_tab[IDX][2][1] = put_vp8_bilinear ## SIZE ## _hv_c; \ dsp->put_vp8_bilinear_pixels_tab[IDX][2][2] = put_vp8_bilinear ## SIZE ## _hv_c
Definition at line 481 of file vp8dsp.c.
Referenced by ff_vp8dsp_init(), and ff_vp8dsp_init_x86().
#define VP8_EPEL_H | ( | SIZE, | |||
TAPS | ) |
Value:
static void put_vp8_epel ## SIZE ## _h ## TAPS ## _c(uint8_t *dst, int dststride, uint8_t *src, int srcstride, int h, int mx, int my) \ { \ const uint8_t *filter = subpel_filters[mx-1]; \ uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; \ int x, y; \ \ for (y = 0; y < h; y++) { \ for (x = 0; x < SIZE; x++) \ dst[x] = FILTER_ ## TAPS ## TAP(src, filter, 1); \ dst += dststride; \ src += srcstride; \ } \ }
#define VP8_EPEL_HV | ( | SIZE, | |||
HTAPS, | |||||
VTAPS | ) |
Value:
static void put_vp8_epel ## SIZE ## _h ## HTAPS ## v ## VTAPS ## _c(uint8_t *dst, int dststride, uint8_t *src, int srcstride, int h, int mx, int my) \ { \ const uint8_t *filter = subpel_filters[mx-1]; \ uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; \ int x, y; \ uint8_t tmp_array[(2*SIZE+VTAPS-1)*SIZE]; \ uint8_t *tmp = tmp_array; \ src -= (2-(VTAPS==4))*srcstride; \ \ for (y = 0; y < h+VTAPS-1; y++) { \ for (x = 0; x < SIZE; x++) \ tmp[x] = FILTER_ ## HTAPS ## TAP(src, filter, 1); \ tmp += SIZE; \ src += srcstride; \ } \ \ tmp = tmp_array + (2-(VTAPS==4))*SIZE; \ filter = subpel_filters[my-1]; \ \ for (y = 0; y < h; y++) { \ for (x = 0; x < SIZE; x++) \ dst[x] = FILTER_ ## VTAPS ## TAP(tmp, filter, SIZE); \ dst += dststride; \ tmp += SIZE; \ } \ }
#define VP8_EPEL_V | ( | SIZE, | |||
TAPS | ) |
Value:
static void put_vp8_epel ## SIZE ## _v ## TAPS ## _c(uint8_t *dst, int dststride, uint8_t *src, int srcstride, int h, int mx, int my) \ { \ const uint8_t *filter = subpel_filters[my-1]; \ uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; \ int x, y; \ \ for (y = 0; y < h; y++) { \ for (x = 0; x < SIZE; x++) \ dst[x] = FILTER_ ## TAPS ## TAP(src, filter, srcstride); \ dst += dststride; \ src += srcstride; \ } \ }
#define VP8_MC_FUNC | ( | IDX, | |||
SIZE | ) |
Value:
dsp->put_vp8_epel_pixels_tab[IDX][0][0] = put_vp8_pixels ## SIZE ## _c; \ dsp->put_vp8_epel_pixels_tab[IDX][0][1] = put_vp8_epel ## SIZE ## _h4_c; \ dsp->put_vp8_epel_pixels_tab[IDX][0][2] = put_vp8_epel ## SIZE ## _h6_c; \ dsp->put_vp8_epel_pixels_tab[IDX][1][0] = put_vp8_epel ## SIZE ## _v4_c; \ dsp->put_vp8_epel_pixels_tab[IDX][1][1] = put_vp8_epel ## SIZE ## _h4v4_c; \ dsp->put_vp8_epel_pixels_tab[IDX][1][2] = put_vp8_epel ## SIZE ## _h6v4_c; \ dsp->put_vp8_epel_pixels_tab[IDX][2][0] = put_vp8_epel ## SIZE ## _v6_c; \ dsp->put_vp8_epel_pixels_tab[IDX][2][1] = put_vp8_epel ## SIZE ## _h4v6_c; \ dsp->put_vp8_epel_pixels_tab[IDX][2][2] = put_vp8_epel ## SIZE ## _h6v6_c
Definition at line 470 of file vp8dsp.c.
Referenced by ff_vp8dsp_init(), and ff_vp8dsp_init_x86().
av_cold void ff_vp8dsp_init | ( | VP8DSPContext * | dsp | ) |
static av_always_inline void filter_common | ( | uint8_t * | p, | |
int | stride, | |||
int | is4tap | |||
) | [static] |
Definition at line 157 of file vp8dsp.c.
Referenced by vp8_h_loop_filter_simple_c(), and vp8_v_loop_filter_simple_c().
static av_always_inline void filter_mbedge | ( | uint8_t * | p, | |
int | stride | |||
) | [static] |
static av_always_inline int hev | ( | uint8_t * | p, | |
int | stride, | |||
int | thresh | |||
) | [static] |
static av_always_inline int normal_limit | ( | uint8_t * | p, | |
int | stride, | |||
int | E, | |||
int | I | |||
) | [static] |
static av_always_inline int simple_limit | ( | uint8_t * | p, | |
int | stride, | |||
int | flim | |||
) | [static] |
Definition at line 188 of file vp8dsp.c.
Referenced by normal_limit(), vp8_h_loop_filter_simple_c(), and vp8_v_loop_filter_simple_c().
static void vp8_h_loop_filter_simple_c | ( | uint8_t * | dst, | |
int | stride, | |||
int | flim | |||
) | [static] |
static void vp8_idct_add_c | ( | uint8_t * | dst, | |
DCTELEM | block[16], | |||
int | stride | |||
) | [static] |
static void vp8_idct_dc_add4uv_c | ( | uint8_t * | dst, | |
DCTELEM | block[4][16], | |||
int | stride | |||
) | [static] |
static void vp8_idct_dc_add4y_c | ( | uint8_t * | dst, | |
DCTELEM | block[4][16], | |||
int | stride | |||
) | [static] |
static void vp8_idct_dc_add_c | ( | uint8_t * | dst, | |
DCTELEM | block[16], | |||
int | stride | |||
) | [static] |
Definition at line 113 of file vp8dsp.c.
Referenced by ff_vp8dsp_init(), vp8_idct_dc_add4uv_c(), and vp8_idct_dc_add4y_c().
VP8 compatible video decoder.
Copyright (C) 2010 David Conrad Copyright (C) 2010 Ronald S. Bultje
This file is part of FFmpeg.
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.
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 FFmpeg; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Definition at line 28 of file vp8dsp.c.
Referenced by ff_vp8dsp_init().
static void vp8_v_loop_filter_simple_c | ( | uint8_t * | dst, | |
int | stride, | |||
int | flim | |||
) | [static] |
const uint8_t subpel_filters[7][6] [static] |