comparison dv.c @ 10504:9f16f997c41b libavcodec

Make get_bits_left() available for use in libavcodec (was previously held private in dv.c for some reason). See "[PATCH] get_bits_left()" thread.
author rbultje
date Mon, 09 Nov 2009 22:10:43 +0000
parents 3c13cad19e29
children 03d02e21b432
comparison
equal deleted inserted replaced
10503:8d536f190e6e 10504:9f16f997c41b
413 413
414 /* bit budget for AC only in 5 MBs */ 414 /* bit budget for AC only in 5 MBs */
415 static const int vs_total_ac_bits = (100 * 4 + 68*2) * 5; 415 static const int vs_total_ac_bits = (100 * 4 + 68*2) * 5;
416 /* see dv_88_areas and dv_248_areas for details */ 416 /* see dv_88_areas and dv_248_areas for details */
417 static const int mb_area_start[5] = { 1, 6, 21, 43, 64 }; 417 static const int mb_area_start[5] = { 1, 6, 21, 43, 64 };
418
419 static inline int get_bits_left(GetBitContext *s)
420 {
421 return s->size_in_bits - get_bits_count(s);
422 }
423 418
424 static inline int put_bits_left(PutBitContext* s) 419 static inline int put_bits_left(PutBitContext* s)
425 { 420 {
426 return (s->buf_end - s->buf) * 8 - put_bits_count(s); 421 return (s->buf_end - s->buf) * 8 - put_bits_count(s);
427 } 422 }