MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / get_bits_long

Function get_bits_long

libavcodec/get_bits.h:424–451  ·  view source on GitHub ↗

* Read 0-32 bits. */

Source from the content-addressed store, hash-verified

422 * Read 0-32 bits.
423 */
424static inline unsigned int get_bits_long(GetBitContext *s, int n)
425{
426 av_assert2(n>=0 && n<=32);
427 if (!n) {
428 return 0;
429 } else if ((!HAVE_FAST_64BIT || av_builtin_constant_p(n <= MIN_CACHE_BITS))
430 && n <= MIN_CACHE_BITS) {
431 return get_bits(s, n);
432 } else {
433#if HAVE_FAST_64BIT
434 unsigned tmp;
435 OPEN_READER(re, s);
436 UPDATE_CACHE_32(re, s);
437 tmp = SHOW_UBITS(re, s, n);
438 LAST_SKIP_BITS(re, s, n);
439 CLOSE_READER(re, s);
440 return tmp;
441#else
442#ifdef BITSTREAM_READER_LE
443 unsigned ret = get_bits(s, 16);
444 return ret | (get_bits(s, n - 16) << 16);
445#else
446 unsigned ret = get_bits(s, 16) << (n - 16);
447 return ret | get_bits(s, n - 16);
448#endif
449#endif
450 }
451}
452
453/**
454 * Read 0-64 bits.

Callers 15

vvcc_parse_ptlFunction · 0.85
update_extradataFunction · 0.85
mov_read_ddtsFunction · 0.85
mov_read_stszFunction · 0.85
rtp_parse_mp4_auFunction · 0.85
hvcc_parse_ptlFunction · 0.85
theora_headerFunction · 0.85
swf_probeFunction · 0.85
update_extradataFunction · 0.85
evcc_parse_spsFunction · 0.85
ff_rdt_parse_headerFunction · 0.85

Calls 1

get_bitsFunction · 0.70

Tested by

no test coverage detected