diff options
Diffstat (limited to 'libavcodec/h264pred.c')
-rw-r--r-- | libavcodec/h264pred.c | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/libavcodec/h264pred.c b/libavcodec/h264pred.c index 15f2112b91..e5f1f5ae61 100644 --- a/libavcodec/h264pred.c +++ b/libavcodec/h264pred.c @@ -2,20 +2,20 @@ * H.26L/H.264/AVC/JVT/14496-10/... encoder/decoder * Copyright (c) 2003 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 */ @@ -25,8 +25,10 @@ * @author Michael Niedermayer <michaelni@gmx.at> */ +#include "libavutil/avassert.h" #include "dsputil.h" #include "h264pred.h" +#include "avcodec.h" // for AV_CODEC_ID_* #define BIT_DEPTH 8 #include "h264pred_template.c" @@ -40,6 +42,14 @@ #include "h264pred_template.c" #undef BIT_DEPTH +#define BIT_DEPTH 12 +#include "h264pred_template.c" +#undef BIT_DEPTH + +#define BIT_DEPTH 14 +#include "h264pred_template.c" +#undef BIT_DEPTH + static void pred4x4_vertical_vp8_c(uint8_t *src, const uint8_t *topright, ptrdiff_t stride) { @@ -398,7 +408,7 @@ static void pred8x8_tm_vp8_c(uint8_t *src, ptrdiff_t stride) * Set the intra prediction function pointers. */ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, - const int chroma_format_idc) + int chroma_format_idc) { #undef FUNC #undef FUNCC @@ -556,6 +566,9 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, h->pred16x16_add[VERT_PRED8x8]= FUNCC(pred16x16_vertical_add , depth);\ h->pred16x16_add[ HOR_PRED8x8]= FUNCC(pred16x16_horizontal_add , depth);\ + if(!chroma_format_idc) + chroma_format_idc = 1; + switch (bit_depth) { case 9: H264_PRED(9) @@ -563,7 +576,14 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, case 10: H264_PRED(10) break; + case 12: + H264_PRED(12) + break; + case 14: + H264_PRED(14) + break; default: + av_assert0(bit_depth<=8); H264_PRED(8) break; } |