diff options
Diffstat (limited to 'libavcodec/ituh263enc.c')
-rw-r--r-- | libavcodec/ituh263enc.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c index 5f15b2f77e..43ad08026f 100644 --- a/libavcodec/ituh263enc.c +++ b/libavcodec/ituh263enc.c @@ -5,20 +5,20 @@ * Copyright (c) 2001 Juan J. Sierralta P * Copyright (c) 2002-2004 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 */ @@ -226,19 +226,11 @@ void ff_h263_encode_picture_header(MpegEncContext * s, int picture_number) if(s->h263_slice_structured){ put_bits(&s->pb, 1, 1); - assert(s->mb_x == 0 && s->mb_y == 0); + av_assert1(s->mb_x == 0 && s->mb_y == 0); ff_h263_encode_mba(s); put_bits(&s->pb, 1, 1); } - - if(s->h263_aic){ - s->y_dc_scale_table= - s->c_dc_scale_table= ff_aic_dc_scale_table; - }else{ - s->y_dc_scale_table= - s->c_dc_scale_table= ff_mpeg1_dc_scale_table; - } } /** @@ -268,7 +260,7 @@ void ff_h263_encode_gob_header(MpegEncContext * s, int mb_line) } /** - * modify qscale so that encoding is acually possible in h263 (limit difference to -2..2) + * modify qscale so that encoding is actually possible in h263 (limit difference to -2..2) */ void ff_clean_h263_qscales(MpegEncContext *s){ int i; @@ -393,7 +385,7 @@ static void h263_encode_block(MpegEncContext * s, int16_t * block, int n) put_bits(&s->pb, 1, last); put_bits(&s->pb, 6, run); - assert(slevel != 0); + av_assert2(slevel != 0); if(level < 128) put_sbits(&s->pb, 8, slevel); @@ -546,7 +538,7 @@ void ff_h263_encode_mb(MpegEncContext * s, s->mv_bits+= get_bits_diff(s); } } else { - assert(s->mb_intra); + av_assert2(s->mb_intra); cbp = 0; if (s->h263_aic) { @@ -725,8 +717,8 @@ static av_cold void init_uni_h263_rl_tab(RLTable *rl, uint32_t *bits_tab, { int slevel, run, last; - assert(MAX_LEVEL >= 64); - assert(MAX_RUN >= 63); + av_assert0(MAX_LEVEL >= 64); + av_assert0(MAX_RUN >= 63); for(slevel=-64; slevel<64; slevel++){ if(slevel==0) continue; @@ -815,12 +807,15 @@ av_cold void ff_h263_encode_init(MpegEncContext *s) s->min_qcoeff= -127; s->max_qcoeff= 127; } - s->y_dc_scale_table= - s->c_dc_scale_table= ff_mpeg1_dc_scale_table; break; default: //nothing needed - default table already set in mpegvideo.c s->min_qcoeff= -127; s->max_qcoeff= 127; + } + if(s->h263_aic){ + s->y_dc_scale_table= + s->c_dc_scale_table= ff_aic_dc_scale_table; + }else{ s->y_dc_scale_table= s->c_dc_scale_table= ff_mpeg1_dc_scale_table; } |