diff options
Diffstat (limited to 'libavcodec/h264_mvpred.h')
-rw-r--r-- | libavcodec/h264_mvpred.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/libavcodec/h264_mvpred.h b/libavcodec/h264_mvpred.h index 5244c290f2..0a405f7704 100644 --- a/libavcodec/h264_mvpred.h +++ b/libavcodec/h264_mvpred.h @@ -2,20 +2,20 @@ * H.26L/H.264/AVC/JVT/14496-10/... motion vector predicion * 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 */ @@ -31,9 +31,8 @@ #include "internal.h" #include "avcodec.h" #include "h264.h" +#include "libavutil/avassert.h" -//#undef NDEBUG -#include <assert.h> static av_always_inline int fetch_diagonal_mv(H264Context *h, const int16_t **C, int i, int list, int part_width) @@ -104,7 +103,7 @@ static av_always_inline void pred_motion(H264Context *const h, int n, const int16_t *C; int diagonal_ref, match_count; - assert(part_width == 1 || part_width == 2 || part_width == 4); + av_assert2(part_width == 1 || part_width == 2 || part_width == 4); /* mv_cache * B . . A T T T T @@ -486,7 +485,7 @@ static void fill_decode_caches(H264Context *h, int mb_type) } else { int left_typei = s->current_picture.f.mb_type[left_xy[LTOP] + s->mb_stride]; - assert(left_xy[LTOP] == left_xy[LBOT]); + av_assert2(left_xy[LTOP] == left_xy[LBOT]); if (!((left_typei & type_mask) && (left_type[LTOP] & type_mask))) { h->topleft_samples_available &= 0xDF5F; h->left_samples_available &= 0x5F5F; @@ -611,7 +610,7 @@ static void fill_decode_caches(H264Context *h, int mb_type) int16_t(*mv)[2] = s->current_picture.f.motion_val[list]; if (!USES_LIST(mb_type, list)) continue; - assert(!(IS_DIRECT(mb_type) && !h->direct_spatial_mv_pred)); + av_assert2(!(IS_DIRECT(mb_type) && !h->direct_spatial_mv_pred)); if (USES_LIST(top_type, list)) { const int b_xy = h->mb2b_xy[top_xy] + 3 * b_stride; @@ -668,7 +667,7 @@ static void fill_decode_caches(H264Context *h, int mb_type) ref_cache[4 - 1 * 8] = topright_type ? LIST_NOT_USED : PART_NOT_AVAILABLE; } - if (ref_cache[4 - 1 * 8] < 0) { + if(ref_cache[2 - 1*8] < 0 || ref_cache[4 - 1*8] < 0){ if (USES_LIST(topleft_type, list)) { const int b_xy = h->mb2b_xy[topleft_xy] + 3 + b_stride + (h->topleft_partition & 2 * b_stride); |