diff options
Diffstat (limited to 'libavcodec/h264dsp.c')
-rw-r--r-- | libavcodec/h264dsp.c | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/libavcodec/h264dsp.c b/libavcodec/h264dsp.c index a901dbb..72f699f 100644 --- a/libavcodec/h264dsp.c +++ b/libavcodec/h264dsp.c @@ -2,20 +2,20 @@ * H.26L/H.264/AVC/JVT/14496-10/... encoder/decoder * Copyright (c) 2003-2010 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 */ @@ -26,8 +26,9 @@ */ #include <stdint.h> - #include "libavutil/attributes.h" +#include "libavutil/avassert.h" + #include "avcodec.h" #include "h264dsp.h" #include "h264idct.h" @@ -45,6 +46,14 @@ #include "h264dsp_template.c" #undef BIT_DEPTH +#define BIT_DEPTH 12 +#include "h264dsp_template.c" +#undef BIT_DEPTH + +#define BIT_DEPTH 14 +#include "h264dsp_template.c" +#undef BIT_DEPTH + #define BIT_DEPTH 8 #include "h264addpx_template.c" #undef BIT_DEPTH @@ -61,19 +70,19 @@ static int h264_find_start_code_candidate_c(const uint8_t *buf, int size) * simpler and there must be FF_INPUT_BUFFER_PADDING_SIZE * bytes at the end. */ -#if HAVE_FAST_64BIT +# if HAVE_FAST_64BIT while (i < size && !((~*(const uint64_t *)(buf + i) & (*(const uint64_t *)(buf + i) - 0x0101010101010101ULL)) & 0x8080808080808080ULL)) i += 8; -#else +# else while (i < size && !((~*(const uint32_t *)(buf + i) & (*(const uint32_t *)(buf + i) - 0x01010101U)) & 0x80808080U)) i += 4; -#endif +# endif #endif for (; i < size; i++) if (!buf[i]) @@ -157,7 +166,14 @@ av_cold void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, case 10: H264_DSP(10); break; + case 12: + H264_DSP(12); + break; + case 14: + H264_DSP(14); + break; default: + av_assert0(bit_depth<=8); H264_DSP(8); break; } |