aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/h261enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/h261enc.c')
-rw-r--r--libavcodec/h261enc.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c
index 1a9a7748df..a14da0d8fa 100644
--- a/libavcodec/h261enc.c
+++ b/libavcodec/h261enc.c
@@ -3,20 +3,20 @@
* Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
* Copyright (c) 2004 Maarten Daniels
*
- * 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,6 +25,7 @@
* H.261 encoder.
*/
+#include "libavutil/avassert.h"
#include "dsputil.h"
#include "avcodec.h"
#include "mpegvideo.h"
@@ -128,7 +129,7 @@ static void h261_encode_motion(H261Context * h, int val){
int sign, code;
if(val==0){
code = 0;
- put_bits(&s->pb,h261_mv_tab[code][1],h261_mv_tab[code][0]);
+ put_bits(&s->pb,ff_h261_mv_tab[code][1],ff_h261_mv_tab[code][0]);
}
else{
if(val > 15)
@@ -137,7 +138,7 @@ static void h261_encode_motion(H261Context * h, int val){
val+=32;
sign = val < 0;
code = sign ? -val : val;
- put_bits(&s->pb,h261_mv_tab[code][1],h261_mv_tab[code][0]);
+ put_bits(&s->pb,ff_h261_mv_tab[code][1],ff_h261_mv_tab[code][0]);
put_bits(&s->pb,1,sign);
}
}
@@ -182,7 +183,7 @@ void ff_h261_encode_mb(MpegEncContext * s,
}
/* MB is not skipped, encode MBA */
- put_bits(&s->pb, h261_mba_bits[(h->current_mba-h->previous_mba)-1], h261_mba_code[(h->current_mba-h->previous_mba)-1]);
+ put_bits(&s->pb, ff_h261_mba_bits[(h->current_mba-h->previous_mba)-1], ff_h261_mba_code[(h->current_mba-h->previous_mba)-1]);
/* calculate MTYPE */
if(!s->mb_intra){
@@ -194,15 +195,15 @@ void ff_h261_encode_mb(MpegEncContext * s,
h->mtype+=3;
if(cbp || s->dquant)
h->mtype++;
- assert(h->mtype > 1);
+ av_assert1(h->mtype > 1);
}
if(s->dquant)
h->mtype++;
- put_bits(&s->pb, h261_mtype_bits[h->mtype], h261_mtype_code[h->mtype]);
+ put_bits(&s->pb, ff_h261_mtype_bits[h->mtype], ff_h261_mtype_code[h->mtype]);
- h->mtype = h261_mtype_map[h->mtype];
+ h->mtype = ff_h261_mtype_map[h->mtype];
if(IS_QUANT(h->mtype)){
ff_set_qscale(s,s->qscale+s->dquant);
@@ -221,8 +222,8 @@ void ff_h261_encode_mb(MpegEncContext * s,
h->previous_mba = h->current_mba;
if(HAS_CBP(h->mtype)){
- assert(cbp>0);
- put_bits(&s->pb,h261_cbp_tab[cbp-1][1],h261_cbp_tab[cbp-1][0]);
+ av_assert1(cbp>0);
+ put_bits(&s->pb,ff_h261_cbp_tab[cbp-1][1],ff_h261_cbp_tab[cbp-1][0]);
}
for(i=0; i<6; i++) {
/* encode each block */
@@ -240,7 +241,7 @@ void ff_h261_encode_init(MpegEncContext *s){
if (!done) {
done = 1;
- ff_init_rl(&h261_rl_tcoeff, ff_h261_rl_table_store);
+ ff_init_rl(&ff_h261_rl_tcoeff, ff_h261_rl_table_store);
}
s->min_qcoeff= -127;
@@ -260,7 +261,7 @@ static void h261_encode_block(H261Context * h, DCTELEM * block, int n){
int level, run, i, j, last_index, last_non_zero, sign, slevel, code;
RLTable *rl;
- rl = &h261_rl_tcoeff;
+ rl = &ff_h261_rl_tcoeff;
if (s->mb_intra) {
/* DC coef */
level = block[0];
@@ -307,8 +308,8 @@ static void h261_encode_block(H261Context * h, DCTELEM * block, int n){
put_bits(&s->pb, rl->table_vlc[code][1], rl->table_vlc[code][0]);
if (code == rl->n) {
put_bits(&s->pb, 6, run);
- assert(slevel != 0);
- assert(level <= 127);
+ av_assert1(slevel != 0);
+ av_assert1(level <= 127);
put_sbits(&s->pb, 8, slevel);
} else {
put_bits(&s->pb, 1, sign);