Libav
|
00001 /* 00002 * H.26L/H.264/AVC/JVT/14496-10/... encoder/decoder 00003 * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at> 00004 * 00005 * This file is part of FFmpeg. 00006 * 00007 * FFmpeg is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2.1 of the License, or (at your option) any later version. 00011 * 00012 * FFmpeg is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with FFmpeg; if not, write to the Free Software 00019 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00020 */ 00021 00028 #ifndef AVCODEC_H264PRED_H 00029 #define AVCODEC_H264PRED_H 00030 00031 #include "libavutil/common.h" 00032 #include "dsputil.h" 00033 00038 #define VERT_PRED 0 00039 #define HOR_PRED 1 00040 #define DC_PRED 2 00041 #define DIAG_DOWN_LEFT_PRED 3 00042 #define DIAG_DOWN_RIGHT_PRED 4 00043 #define VERT_RIGHT_PRED 5 00044 #define HOR_DOWN_PRED 6 00045 #define VERT_LEFT_PRED 7 00046 #define HOR_UP_PRED 8 00047 00048 #define LEFT_DC_PRED 9 00049 #define TOP_DC_PRED 10 00050 #define DC_128_PRED 11 00051 00052 #define DIAG_DOWN_LEFT_PRED_RV40_NODOWN 12 00053 #define HOR_UP_PRED_RV40_NODOWN 13 00054 #define VERT_LEFT_PRED_RV40_NODOWN 14 00055 00056 #define DC_PRED8x8 0 00057 #define HOR_PRED8x8 1 00058 #define VERT_PRED8x8 2 00059 #define PLANE_PRED8x8 3 00060 00061 #define LEFT_DC_PRED8x8 4 00062 #define TOP_DC_PRED8x8 5 00063 #define DC_128_PRED8x8 6 00064 00065 #define ALZHEIMER_DC_L0T_PRED8x8 7 00066 #define ALZHEIMER_DC_0LT_PRED8x8 8 00067 #define ALZHEIMER_DC_L00_PRED8x8 9 00068 #define ALZHEIMER_DC_0L0_PRED8x8 10 00069 00070 00074 typedef struct H264PredContext{ 00075 void (*pred4x4 [9+3+3])(uint8_t *src, uint8_t *topright, int stride);//FIXME move to dsp? 00076 void (*pred8x8l [9+3])(uint8_t *src, int topleft, int topright, int stride); 00077 void (*pred8x8 [4+3+4])(uint8_t *src, int stride); 00078 void (*pred16x16[4+3])(uint8_t *src, int stride); 00079 00080 void (*pred4x4_add [2])(uint8_t *pix/*align 4*/, const DCTELEM *block/*align 16*/, int stride); 00081 void (*pred8x8l_add [2])(uint8_t *pix/*align 8*/, const DCTELEM *block/*align 16*/, int stride); 00082 void (*pred8x8_add [3])(uint8_t *pix/*align 8*/, const int *block_offset, const DCTELEM *block/*align 16*/, int stride); 00083 void (*pred16x16_add[3])(uint8_t *pix/*align 16*/, const int *block_offset, const DCTELEM *block/*align 16*/, int stride); 00084 }H264PredContext; 00085 00086 void ff_h264_pred_init(H264PredContext *h, int codec_id); 00087 void ff_h264_pred_init_arm(H264PredContext *h, int codec_id); 00088 00089 #endif /* AVCODEC_H264PRED_H */