diff libavcodec/h264_pred.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_pred.h	Tue Sep 25 15:55:33 2012 +0200
     1.3 @@ -0,0 +1,90 @@
     1.4 +/*
     1.5 + * H.26L/H.264/AVC/JVT/14496-10/... encoder/decoder
     1.6 + * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>
     1.7 + *
     1.8 + * This file is part of FFmpeg.
     1.9 + *
    1.10 + * FFmpeg is free software; you can redistribute it and/or
    1.11 + * modify it under the terms of the GNU Lesser General Public
    1.12 + * License as published by the Free Software Foundation; either
    1.13 + * version 2.1 of the License, or (at your option) any later version.
    1.14 + *
    1.15 + * FFmpeg is distributed in the hope that it will be useful,
    1.16 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.17 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.18 + * Lesser General Public License for more details.
    1.19 + *
    1.20 + * You should have received a copy of the GNU Lesser General Public
    1.21 + * License along with FFmpeg; if not, write to the Free Software
    1.22 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    1.23 + */
    1.24 +
    1.25 +/**
    1.26 + * @file
    1.27 + * H.264 / AVC / MPEG4 prediction functions.
    1.28 + * @author Michael Niedermayer <michaelni@gmx.at>
    1.29 + */
    1.30 +
    1.31 +#ifndef AVCODEC_H264PRED_H
    1.32 +#define AVCODEC_H264PRED_H
    1.33 +
    1.34 +#include "libavutil/common.h"
    1.35 +#include "dsputil.h"
    1.36 +
    1.37 +/**
    1.38 + * Prediction types
    1.39 + */
    1.40 +//@{
    1.41 +#define VERT_PRED             0
    1.42 +#define HOR_PRED              1
    1.43 +#define DC_PRED               2
    1.44 +#define DIAG_DOWN_LEFT_PRED   3
    1.45 +#define DIAG_DOWN_RIGHT_PRED  4
    1.46 +#define VERT_RIGHT_PRED       5
    1.47 +#define HOR_DOWN_PRED         6
    1.48 +#define VERT_LEFT_PRED        7
    1.49 +#define HOR_UP_PRED           8
    1.50 +
    1.51 +#define LEFT_DC_PRED          9
    1.52 +#define TOP_DC_PRED           10
    1.53 +#define DC_128_PRED           11
    1.54 +
    1.55 +#define DIAG_DOWN_LEFT_PRED_RV40_NODOWN   12
    1.56 +#define HOR_UP_PRED_RV40_NODOWN           13
    1.57 +#define VERT_LEFT_PRED_RV40_NODOWN        14
    1.58 +
    1.59 +#define DC_PRED8x8            0
    1.60 +#define HOR_PRED8x8           1
    1.61 +#define VERT_PRED8x8          2
    1.62 +#define PLANE_PRED8x8         3
    1.63 +
    1.64 +#define LEFT_DC_PRED8x8       4
    1.65 +#define TOP_DC_PRED8x8        5
    1.66 +#define DC_128_PRED8x8        6
    1.67 +
    1.68 +#define ALZHEIMER_DC_L0T_PRED8x8 7
    1.69 +#define ALZHEIMER_DC_0LT_PRED8x8 8
    1.70 +#define ALZHEIMER_DC_L00_PRED8x8 9
    1.71 +#define ALZHEIMER_DC_0L0_PRED8x8 10
    1.72 +//@}
    1.73 +
    1.74 +/**
    1.75 + * Context for storing H.264 prediction functions
    1.76 + */
    1.77 +typedef struct H264PredContext{
    1.78 +    void (*pred4x4  [9+3+3])(uint8_t *src, uint8_t *topright, int stride);//FIXME move to dsp?
    1.79 +    void (*pred8x8l [9+3])(uint8_t *src, int topleft, int topright, int stride);
    1.80 +    void (*pred8x8  [4+3+4])(uint8_t *src, int stride);
    1.81 +    void (*pred16x16[4+3])(uint8_t *src, int stride);
    1.82 +
    1.83 +    void (*pred4x4_add  [2])(uint8_t *pix/*align  4*/, const DCTELEM *block/*align 16*/, int stride);
    1.84 +    void (*pred8x8l_add [2])(uint8_t *pix/*align  8*/, const DCTELEM *block/*align 16*/, int stride);
    1.85 +    void (*pred8x8_add  [3])(uint8_t *pix/*align  8*/, const int *block_offset, const DCTELEM *block/*align 16*/, int stride);
    1.86 +    void (*pred16x16_add[3])(uint8_t *pix/*align 16*/, const int *block_offset, const DCTELEM *block/*align 16*/, int stride);
    1.87 +}H264PredContext;
    1.88 +
    1.89 +void ff_h264_pred_init(H264PredContext *h);
    1.90 +void ff_h264_pred_init_arm(H264PredContext *h);
    1.91 +
    1.92 +
    1.93 +#endif /* AVCODEC_H264PRED_H */