Mercurial > libavcodec.hg
comparison msmpeg4.c @ 5098:997c368e6433 libavcodec
Rename code012() to ff_code012(), and remove static qualifier: paves the way
to vc1 encoder, as this function would be useful there.
patch by Denis Fortin % fortin A nerim P net %
Original thread:
date: Jun 4, 2007 9:23 PM
subject: Re: [FFmpeg-devel] [RFC] move wmv2.c to its own file
author | gpoirier |
---|---|
date | Tue, 05 Jun 2007 07:18:29 +0000 |
parents | 9fb6d2125500 |
children | 4dbe6578f811 |
comparison
equal
deleted
inserted
replaced
5097:e9a0c447dc73 | 5098:997c368e6433 |
---|---|
160 y = tab->table_mvy[i]; | 160 y = tab->table_mvy[i]; |
161 tab->table_mv_index[(x << 6) | y] = i; | 161 tab->table_mv_index[(x << 6) | y] = i; |
162 } | 162 } |
163 } | 163 } |
164 | 164 |
165 static void code012(PutBitContext *pb, int n) | 165 void ff_code012(PutBitContext *pb, int n) |
166 { | 166 { |
167 if (n == 0) { | 167 if (n == 0) { |
168 put_bits(pb, 1, 0); | 168 put_bits(pb, 1, 0); |
169 } else { | 169 } else { |
170 put_bits(pb, 1, 1); | 170 put_bits(pb, 1, 1); |
346 put_bits(&s->pb, 1, s->per_mb_rl_table); | 346 put_bits(&s->pb, 1, s->per_mb_rl_table); |
347 } | 347 } |
348 | 348 |
349 if(s->msmpeg4_version>2){ | 349 if(s->msmpeg4_version>2){ |
350 if(!s->per_mb_rl_table){ | 350 if(!s->per_mb_rl_table){ |
351 code012(&s->pb, s->rl_chroma_table_index); | 351 ff_code012(&s->pb, s->rl_chroma_table_index); |
352 code012(&s->pb, s->rl_table_index); | 352 ff_code012(&s->pb, s->rl_table_index); |
353 } | 353 } |
354 | 354 |
355 put_bits(&s->pb, 1, s->dc_table_index); | 355 put_bits(&s->pb, 1, s->dc_table_index); |
356 } | 356 } |
357 } else { | 357 } else { |
360 if(s->msmpeg4_version==4 && s->bit_rate>MBAC_BITRATE) | 360 if(s->msmpeg4_version==4 && s->bit_rate>MBAC_BITRATE) |
361 put_bits(&s->pb, 1, s->per_mb_rl_table); | 361 put_bits(&s->pb, 1, s->per_mb_rl_table); |
362 | 362 |
363 if(s->msmpeg4_version>2){ | 363 if(s->msmpeg4_version>2){ |
364 if(!s->per_mb_rl_table) | 364 if(!s->per_mb_rl_table) |
365 code012(&s->pb, s->rl_table_index); | 365 ff_code012(&s->pb, s->rl_table_index); |
366 | 366 |
367 put_bits(&s->pb, 1, s->dc_table_index); | 367 put_bits(&s->pb, 1, s->dc_table_index); |
368 | 368 |
369 put_bits(&s->pb, 1, s->mv_table_index); | 369 put_bits(&s->pb, 1, s->mv_table_index); |
370 } | 370 } |