Coverage Report

Created: 2026-06-09 09:09

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/vlc/include/vlc_bits.h
Line
Count
Source
1
/*****************************************************************************
2
 * vlc_bits.h : Bit handling helpers
3
 *****************************************************************************
4
 * Copyright (C) 2001, 2002, 2003, 2006, 2015 VLC authors and VideoLAN
5
 *
6
 * Authors: Laurent Aimar <fenrir@via.ecp.fr>
7
 *          Gildas Bazin <gbazin at videolan dot org>
8
 *          Rafaël Carré <funman at videolan dot org>
9
 *
10
 * This program is free software; you can redistribute it and/or modify it
11
 * under the terms of the GNU Lesser General Public License as published by
12
 * the Free Software Foundation; either version 2.1 of the License, or
13
 * (at your option) any later version.
14
 *
15
 * This program is distributed in the hope that it will be useful,
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
 * GNU Lesser General Public License for more details.
19
 *
20
 * You should have received a copy of the GNU Lesser General Public License
21
 * along with this program; if not, write to the Free Software Foundation,
22
 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23
 *****************************************************************************/
24
#ifndef VLC_BITS_H
25
#define VLC_BITS_H 1
26
27
#include <vlc_common.h>
28
29
/**
30
 * \file
31
 * This file defines functions, structures for handling streams of bits in vlc
32
 */
33
34
typedef struct bs_s bs_t;
35
36
typedef struct
37
{
38
    /* forward read modifier (p_start, p_end, p_fwpriv, count, pos) */
39
    size_t (*pf_byte_forward)(bs_t *, size_t);
40
    size_t (*pf_byte_pos)(const bs_t *);
41
} bs_byte_callbacks_t;
42
43
typedef struct bs_s
44
{
45
    uint8_t *p_start;
46
    uint8_t *p;         /* points to currently read/written byte */
47
    uint8_t *p_end;
48
49
    uint8_t  i_left;    /* i_count number of available bits */
50
    bool     b_read_only;
51
    bool     b_error;
52
53
    bs_byte_callbacks_t cb;
54
    void    *p_priv;
55
} bs_t;
56
57
static size_t bs_impl_bytes_forward( bs_t *s, size_t i_count )
58
704M
{
59
704M
    if( s->p == NULL )
60
13.2M
    {
61
13.2M
        s->p = s->p_start;
62
13.2M
        return 1;
63
13.2M
    }
64
65
691M
    if( s->p >= s->p_end )
66
626M
        return 0;
67
68
64.9M
    if( (size_t) (s->p_end - s->p) < i_count )
69
1.96k
        i_count = s->p_end - s->p;
70
64.9M
    s->p += i_count;
71
64.9M
    return i_count;
72
691M
}
Unexecuted instantiation: avi.c:bs_impl_bytes_forward
es.c:bs_impl_bytes_forward
Line
Count
Source
58
1.60M
{
59
1.60M
    if( s->p == NULL )
60
455k
    {
61
455k
        s->p = s->p_start;
62
455k
        return 1;
63
455k
    }
64
65
1.14M
    if( s->p >= s->p_end )
66
0
        return 0;
67
68
1.14M
    if( (size_t) (s->p_end - s->p) < i_count )
69
0
        i_count = s->p_end - s->p;
70
1.14M
    s->p += i_count;
71
1.14M
    return i_count;
72
1.14M
}
dts_header.c:bs_impl_bytes_forward
Line
Count
Source
58
31.1M
{
59
31.1M
    if( s->p == NULL )
60
3.64M
    {
61
3.64M
        s->p = s->p_start;
62
3.64M
        return 1;
63
3.64M
    }
64
65
27.5M
    if( s->p >= s->p_end )
66
0
        return 0;
67
68
27.5M
    if( (size_t) (s->p_end - s->p) < i_count )
69
0
        i_count = s->p_end - s->p;
70
27.5M
    s->p += i_count;
71
27.5M
    return i_count;
72
27.5M
}
Unexecuted instantiation: h26x.c:bs_impl_bytes_forward
Unexecuted instantiation: mp4.c:bs_impl_bytes_forward
Unexecuted instantiation: ty.c:bs_impl_bytes_forward
a52.c:bs_impl_bytes_forward
Line
Count
Source
58
14.4M
{
59
14.4M
    if( s->p == NULL )
60
4.95M
    {
61
4.95M
        s->p = s->p_start;
62
4.95M
        return 1;
63
4.95M
    }
64
65
9.51M
    if( s->p >= s->p_end )
66
0
        return 0;
67
68
9.51M
    if( (size_t) (s->p_end - s->p) < i_count )
69
0
        i_count = s->p_end - s->p;
70
9.51M
    s->p += i_count;
71
9.51M
    return i_count;
72
9.51M
}
copy.c:bs_impl_bytes_forward
Line
Count
Source
58
284
{
59
284
    if( s->p == NULL )
60
142
    {
61
142
        s->p = s->p_start;
62
142
        return 1;
63
142
    }
64
65
142
    if( s->p >= s->p_end )
66
0
        return 0;
67
68
142
    if( (size_t) (s->p_end - s->p) < i_count )
69
0
        i_count = s->p_end - s->p;
70
142
    s->p += i_count;
71
142
    return i_count;
72
142
}
Unexecuted instantiation: h264.c:bs_impl_bytes_forward
Unexecuted instantiation: hxxx_sei.c:bs_impl_bytes_forward
Unexecuted instantiation: hxxx_common.c:bs_impl_bytes_forward
h264_nal.c:bs_impl_bytes_forward
Line
Count
Source
58
611k
{
59
611k
    if( s->p == NULL )
60
553k
    {
61
553k
        s->p = s->p_start;
62
553k
        return 1;
63
553k
    }
64
65
57.2k
    if( s->p >= s->p_end )
66
0
        return 0;
67
68
57.2k
    if( (size_t) (s->p_end - s->p) < i_count )
69
0
        i_count = s->p_end - s->p;
70
57.2k
    s->p += i_count;
71
57.2k
    return i_count;
72
57.2k
}
Unexecuted instantiation: h264_slice.c:bs_impl_bytes_forward
Unexecuted instantiation: hevc.c:bs_impl_bytes_forward
hevc_nal.c:bs_impl_bytes_forward
Line
Count
Source
58
543k
{
59
543k
    if( s->p == NULL )
60
498k
    {
61
498k
        s->p = s->p_start;
62
498k
        return 1;
63
498k
    }
64
65
45.4k
    if( s->p >= s->p_end )
66
0
        return 0;
67
68
45.4k
    if( (size_t) (s->p_end - s->p) < i_count )
69
0
        i_count = s->p_end - s->p;
70
45.4k
    s->p += i_count;
71
45.4k
    return i_count;
72
45.4k
}
mlp.c:bs_impl_bytes_forward
Line
Count
Source
58
18.2M
{
59
18.2M
    if( s->p == NULL )
60
2.02M
    {
61
2.02M
        s->p = s->p_start;
62
2.02M
        return 1;
63
2.02M
    }
64
65
16.1M
    if( s->p >= s->p_end )
66
0
        return 0;
67
68
16.1M
    if( (size_t) (s->p_end - s->p) < i_count )
69
0
        i_count = s->p_end - s->p;
70
16.1M
    s->p += i_count;
71
16.1M
    return i_count;
72
16.1M
}
mpeg4audio.c:bs_impl_bytes_forward
Line
Count
Source
58
80.3M
{
59
80.3M
    if( s->p == NULL )
60
79.3k
    {
61
79.3k
        s->p = s->p_start;
62
79.3k
        return 1;
63
79.3k
    }
64
65
80.2M
    if( s->p >= s->p_end )
66
78.8M
        return 0;
67
68
1.39M
    if( (size_t) (s->p_end - s->p) < i_count )
69
579
        i_count = s->p_end - s->p;
70
1.39M
    s->p += i_count;
71
1.39M
    return i_count;
72
80.2M
}
mpeg4video.c:bs_impl_bytes_forward
Line
Count
Source
58
814k
{
59
814k
    if( s->p == NULL )
60
90.8k
    {
61
90.8k
        s->p = s->p_start;
62
90.8k
        return 1;
63
90.8k
    }
64
65
723k
    if( s->p >= s->p_end )
66
107k
        return 0;
67
68
616k
    if( (size_t) (s->p_end - s->p) < i_count )
69
0
        i_count = s->p_end - s->p;
70
616k
    s->p += i_count;
71
616k
    return i_count;
72
723k
}
mpegvideo.c:bs_impl_bytes_forward
Line
Count
Source
58
9.68M
{
59
9.68M
    if( s->p == NULL )
60
31.5k
    {
61
31.5k
        s->p = s->p_start;
62
31.5k
        return 1;
63
31.5k
    }
64
65
9.65M
    if( s->p >= s->p_end )
66
8.69M
        return 0;
67
68
963k
    if( (size_t) (s->p_end - s->p) < i_count )
69
0
        i_count = s->p_end - s->p;
70
963k
    s->p += i_count;
71
963k
    return i_count;
72
9.65M
}
Unexecuted instantiation: vc1.c:bs_impl_bytes_forward
Unexecuted instantiation: av1.c:bs_impl_bytes_forward
av1_obu.c:bs_impl_bytes_forward
Line
Count
Source
58
513k
{
59
513k
    if( s->p == NULL )
60
39.6k
    {
61
39.6k
        s->p = s->p_start;
62
39.6k
        return 1;
63
39.6k
    }
64
65
473k
    if( s->p >= s->p_end )
66
242k
        return 0;
67
68
231k
    if( (size_t) (s->p_end - s->p) < i_count )
69
0
        i_count = s->p_end - s->p;
70
231k
    s->p += i_count;
71
231k
    return i_count;
72
473k
}
ogg.c:bs_impl_bytes_forward
Line
Count
Source
58
20.3k
{
59
20.3k
    if( s->p == NULL )
60
908
    {
61
908
        s->p = s->p_start;
62
908
        return 1;
63
908
    }
64
65
19.4k
    if( s->p >= s->p_end )
66
50
        return 0;
67
68
19.4k
    if( (size_t) (s->p_end - s->p) < i_count )
69
0
        i_count = s->p_end - s->p;
70
19.4k
    s->p += i_count;
71
19.4k
    return i_count;
72
19.4k
}
Unexecuted instantiation: ts_psi.c:bs_impl_bytes_forward
mpeg4_iod.c:bs_impl_bytes_forward
Line
Count
Source
58
3.06M
{
59
3.06M
    if( s->p == NULL )
60
684k
    {
61
684k
        s->p = s->p_start;
62
684k
        return 1;
63
684k
    }
64
65
2.38M
    if( s->p >= s->p_end )
66
14.7k
        return 0;
67
68
2.36M
    if( (size_t) (s->p_end - s->p) < i_count )
69
43
        i_count = s->p_end - s->p;
70
2.36M
    s->p += i_count;
71
2.36M
    return i_count;
72
2.38M
}
cvdsub.c:bs_impl_bytes_forward
Line
Count
Source
58
241
{
59
241
    if( s->p == NULL )
60
1
    {
61
1
        s->p = s->p_start;
62
1
        return 1;
63
1
    }
64
65
240
    if( s->p >= s->p_end )
66
0
        return 0;
67
68
240
    if( (size_t) (s->p_end - s->p) < i_count )
69
0
        i_count = s->p_end - s->p;
70
240
    s->p += i_count;
71
240
    return i_count;
72
240
}
dvbsub.c:bs_impl_bytes_forward
Line
Count
Source
58
9.60M
{
59
9.60M
    if( s->p == NULL )
60
223k
    {
61
223k
        s->p = s->p_start;
62
223k
        return 1;
63
223k
    }
64
65
9.38M
    if( s->p >= s->p_end )
66
4.58M
        return 0;
67
68
4.80M
    if( (size_t) (s->p_end - s->p) < i_count )
69
1.33k
        i_count = s->p_end - s->p;
70
4.80M
    s->p += i_count;
71
4.80M
    return i_count;
72
9.38M
}
scte27.c:bs_impl_bytes_forward
Line
Count
Source
58
3.53k
{
59
3.53k
    if( s->p == NULL )
60
151
    {
61
151
        s->p = s->p_start;
62
151
        return 1;
63
151
    }
64
65
3.38k
    if( s->p >= s->p_end )
66
218
        return 0;
67
68
3.16k
    if( (size_t) (s->p_end - s->p) < i_count )
69
0
        i_count = s->p_end - s->p;
70
3.16k
    s->p += i_count;
71
3.16k
    return i_count;
72
3.38k
}
svcdsub.c:bs_impl_bytes_forward
Line
Count
Source
58
533M
{
59
533M
    if( s->p == NULL )
60
120
    {
61
120
        s->p = s->p_start;
62
120
        return 1;
63
120
    }
64
65
533M
    if( s->p >= s->p_end )
66
533M
        return 0;
67
68
92.5k
    if( (size_t) (s->p_end - s->p) < i_count )
69
0
        i_count = s->p_end - s->p;
70
92.5k
    s->p += i_count;
71
92.5k
    return i_count;
72
533M
}
Unexecuted instantiation: flac.c:bs_impl_bytes_forward
Unexecuted instantiation: dav1d.c:bs_impl_bytes_forward
Unexecuted instantiation: faad.c:bs_impl_bytes_forward
Unexecuted instantiation: video.c:bs_impl_bytes_forward
73
74
static size_t bs_impl_bytes_pos( const bs_t *s )
75
876k
{
76
876k
    if( s->p )
77
695k
        return s->p < s->p_end ? s->p - s->p_start + 1 : s->p - s->p_start;
78
181k
    else
79
181k
        return 0;
80
876k
}
Unexecuted instantiation: avi.c:bs_impl_bytes_pos
Unexecuted instantiation: es.c:bs_impl_bytes_pos
Unexecuted instantiation: dts_header.c:bs_impl_bytes_pos
Unexecuted instantiation: h26x.c:bs_impl_bytes_pos
Unexecuted instantiation: mp4.c:bs_impl_bytes_pos
Unexecuted instantiation: ty.c:bs_impl_bytes_pos
Unexecuted instantiation: a52.c:bs_impl_bytes_pos
Unexecuted instantiation: copy.c:bs_impl_bytes_pos
Unexecuted instantiation: h264.c:bs_impl_bytes_pos
Unexecuted instantiation: hxxx_sei.c:bs_impl_bytes_pos
Unexecuted instantiation: hxxx_common.c:bs_impl_bytes_pos
Unexecuted instantiation: h264_nal.c:bs_impl_bytes_pos
Unexecuted instantiation: h264_slice.c:bs_impl_bytes_pos
Unexecuted instantiation: hevc.c:bs_impl_bytes_pos
Unexecuted instantiation: hevc_nal.c:bs_impl_bytes_pos
Unexecuted instantiation: mlp.c:bs_impl_bytes_pos
mpeg4audio.c:bs_impl_bytes_pos
Line
Count
Source
75
13.0k
{
76
13.0k
    if( s->p )
77
13.0k
        return s->p < s->p_end ? s->p - s->p_start + 1 : s->p - s->p_start;
78
0
    else
79
0
        return 0;
80
13.0k
}
Unexecuted instantiation: mpeg4video.c:bs_impl_bytes_pos
Unexecuted instantiation: mpegvideo.c:bs_impl_bytes_pos
Unexecuted instantiation: vc1.c:bs_impl_bytes_pos
Unexecuted instantiation: av1.c:bs_impl_bytes_pos
Unexecuted instantiation: av1_obu.c:bs_impl_bytes_pos
Unexecuted instantiation: ogg.c:bs_impl_bytes_pos
Unexecuted instantiation: ts_psi.c:bs_impl_bytes_pos
mpeg4_iod.c:bs_impl_bytes_pos
Line
Count
Source
75
861k
{
76
861k
    if( s->p )
77
680k
        return s->p < s->p_end ? s->p - s->p_start + 1 : s->p - s->p_start;
78
181k
    else
79
181k
        return 0;
80
861k
}
Unexecuted instantiation: cvdsub.c:bs_impl_bytes_pos
dvbsub.c:bs_impl_bytes_pos
Line
Count
Source
75
1.37k
{
76
1.37k
    if( s->p )
77
1.37k
        return s->p < s->p_end ? s->p - s->p_start + 1 : s->p - s->p_start;
78
0
    else
79
0
        return 0;
80
1.37k
}
Unexecuted instantiation: scte27.c:bs_impl_bytes_pos
Unexecuted instantiation: svcdsub.c:bs_impl_bytes_pos
Unexecuted instantiation: flac.c:bs_impl_bytes_pos
Unexecuted instantiation: dav1d.c:bs_impl_bytes_pos
Unexecuted instantiation: faad.c:bs_impl_bytes_pos
Unexecuted instantiation: video.c:bs_impl_bytes_pos
81
82
static inline void bs_init_custom( bs_t *s, const void *p_data, size_t i_data,
83
                                   const bs_byte_callbacks_t *cb, void *priv )
84
17.9M
{
85
17.9M
    s->p_start = (uint8_t *)p_data;
86
17.9M
    s->p       = NULL;
87
17.9M
    s->p_end   = s->p_start + i_data;
88
17.9M
    s->i_left  = 0;
89
17.9M
    s->b_read_only = true;
90
17.9M
    s->b_error = false;
91
17.9M
    s->p_priv = priv;
92
17.9M
    s->cb = *cb;
93
17.9M
}
Unexecuted instantiation: avi.c:bs_init_custom
es.c:bs_init_custom
Line
Count
Source
84
455k
{
85
455k
    s->p_start = (uint8_t *)p_data;
86
455k
    s->p       = NULL;
87
455k
    s->p_end   = s->p_start + i_data;
88
455k
    s->i_left  = 0;
89
455k
    s->b_read_only = true;
90
    s->b_error = false;
91
455k
    s->p_priv = priv;
92
455k
    s->cb = *cb;
93
455k
}
dts_header.c:bs_init_custom
Line
Count
Source
84
3.64M
{
85
3.64M
    s->p_start = (uint8_t *)p_data;
86
3.64M
    s->p       = NULL;
87
3.64M
    s->p_end   = s->p_start + i_data;
88
3.64M
    s->i_left  = 0;
89
3.64M
    s->b_read_only = true;
90
    s->b_error = false;
91
3.64M
    s->p_priv = priv;
92
3.64M
    s->cb = *cb;
93
3.64M
}
Unexecuted instantiation: h26x.c:bs_init_custom
Unexecuted instantiation: mp4.c:bs_init_custom
Unexecuted instantiation: ty.c:bs_init_custom
a52.c:bs_init_custom
Line
Count
Source
84
4.95M
{
85
4.95M
    s->p_start = (uint8_t *)p_data;
86
4.95M
    s->p       = NULL;
87
4.95M
    s->p_end   = s->p_start + i_data;
88
4.95M
    s->i_left  = 0;
89
4.95M
    s->b_read_only = true;
90
    s->b_error = false;
91
4.95M
    s->p_priv = priv;
92
4.95M
    s->cb = *cb;
93
4.95M
}
copy.c:bs_init_custom
Line
Count
Source
84
142
{
85
142
    s->p_start = (uint8_t *)p_data;
86
142
    s->p       = NULL;
87
142
    s->p_end   = s->p_start + i_data;
88
142
    s->i_left  = 0;
89
142
    s->b_read_only = true;
90
    s->b_error = false;
91
142
    s->p_priv = priv;
92
142
    s->cb = *cb;
93
142
}
Unexecuted instantiation: h264.c:bs_init_custom
hxxx_sei.c:bs_init_custom
Line
Count
Source
84
379k
{
85
379k
    s->p_start = (uint8_t *)p_data;
86
379k
    s->p       = NULL;
87
379k
    s->p_end   = s->p_start + i_data;
88
379k
    s->i_left  = 0;
89
379k
    s->b_read_only = true;
90
    s->b_error = false;
91
379k
    s->p_priv = priv;
92
379k
    s->cb = *cb;
93
379k
}
Unexecuted instantiation: hxxx_common.c:bs_init_custom
h264_nal.c:bs_init_custom
Line
Count
Source
84
853k
{
85
853k
    s->p_start = (uint8_t *)p_data;
86
853k
    s->p       = NULL;
87
853k
    s->p_end   = s->p_start + i_data;
88
853k
    s->i_left  = 0;
89
853k
    s->b_read_only = true;
90
    s->b_error = false;
91
853k
    s->p_priv = priv;
92
853k
    s->cb = *cb;
93
853k
}
h264_slice.c:bs_init_custom
Line
Count
Source
84
747k
{
85
747k
    s->p_start = (uint8_t *)p_data;
86
747k
    s->p       = NULL;
87
747k
    s->p_end   = s->p_start + i_data;
88
747k
    s->i_left  = 0;
89
747k
    s->b_read_only = true;
90
    s->b_error = false;
91
747k
    s->p_priv = priv;
92
747k
    s->cb = *cb;
93
747k
}
Unexecuted instantiation: hevc.c:bs_init_custom
hevc_nal.c:bs_init_custom
Line
Count
Source
84
3.58M
{
85
3.58M
    s->p_start = (uint8_t *)p_data;
86
3.58M
    s->p       = NULL;
87
3.58M
    s->p_end   = s->p_start + i_data;
88
3.58M
    s->i_left  = 0;
89
3.58M
    s->b_read_only = true;
90
    s->b_error = false;
91
3.58M
    s->p_priv = priv;
92
3.58M
    s->cb = *cb;
93
3.58M
}
mlp.c:bs_init_custom
Line
Count
Source
84
2.02M
{
85
2.02M
    s->p_start = (uint8_t *)p_data;
86
2.02M
    s->p       = NULL;
87
2.02M
    s->p_end   = s->p_start + i_data;
88
2.02M
    s->i_left  = 0;
89
2.02M
    s->b_read_only = true;
90
    s->b_error = false;
91
2.02M
    s->p_priv = priv;
92
2.02M
    s->cb = *cb;
93
2.02M
}
mpeg4audio.c:bs_init_custom
Line
Count
Source
84
79.3k
{
85
79.3k
    s->p_start = (uint8_t *)p_data;
86
79.3k
    s->p       = NULL;
87
79.3k
    s->p_end   = s->p_start + i_data;
88
79.3k
    s->i_left  = 0;
89
79.3k
    s->b_read_only = true;
90
    s->b_error = false;
91
79.3k
    s->p_priv = priv;
92
79.3k
    s->cb = *cb;
93
79.3k
}
mpeg4video.c:bs_init_custom
Line
Count
Source
84
90.8k
{
85
90.8k
    s->p_start = (uint8_t *)p_data;
86
90.8k
    s->p       = NULL;
87
90.8k
    s->p_end   = s->p_start + i_data;
88
90.8k
    s->i_left  = 0;
89
90.8k
    s->b_read_only = true;
90
    s->b_error = false;
91
90.8k
    s->p_priv = priv;
92
90.8k
    s->cb = *cb;
93
90.8k
}
mpegvideo.c:bs_init_custom
Line
Count
Source
84
31.5k
{
85
31.5k
    s->p_start = (uint8_t *)p_data;
86
31.5k
    s->p       = NULL;
87
31.5k
    s->p_end   = s->p_start + i_data;
88
31.5k
    s->i_left  = 0;
89
31.5k
    s->b_read_only = true;
90
    s->b_error = false;
91
31.5k
    s->p_priv = priv;
92
31.5k
    s->cb = *cb;
93
31.5k
}
vc1.c:bs_init_custom
Line
Count
Source
84
29.2k
{
85
29.2k
    s->p_start = (uint8_t *)p_data;
86
29.2k
    s->p       = NULL;
87
29.2k
    s->p_end   = s->p_start + i_data;
88
29.2k
    s->i_left  = 0;
89
29.2k
    s->b_read_only = true;
90
    s->b_error = false;
91
29.2k
    s->p_priv = priv;
92
29.2k
    s->cb = *cb;
93
29.2k
}
Unexecuted instantiation: av1.c:bs_init_custom
av1_obu.c:bs_init_custom
Line
Count
Source
84
39.6k
{
85
39.6k
    s->p_start = (uint8_t *)p_data;
86
39.6k
    s->p       = NULL;
87
39.6k
    s->p_end   = s->p_start + i_data;
88
39.6k
    s->i_left  = 0;
89
39.6k
    s->b_read_only = true;
90
    s->b_error = false;
91
39.6k
    s->p_priv = priv;
92
39.6k
    s->cb = *cb;
93
39.6k
}
ogg.c:bs_init_custom
Line
Count
Source
84
908
{
85
908
    s->p_start = (uint8_t *)p_data;
86
908
    s->p       = NULL;
87
908
    s->p_end   = s->p_start + i_data;
88
908
    s->i_left  = 0;
89
908
    s->b_read_only = true;
90
    s->b_error = false;
91
908
    s->p_priv = priv;
92
908
    s->cb = *cb;
93
908
}
Unexecuted instantiation: ts_psi.c:bs_init_custom
mpeg4_iod.c:bs_init_custom
Line
Count
Source
84
866k
{
85
866k
    s->p_start = (uint8_t *)p_data;
86
866k
    s->p       = NULL;
87
866k
    s->p_end   = s->p_start + i_data;
88
866k
    s->i_left  = 0;
89
866k
    s->b_read_only = true;
90
    s->b_error = false;
91
866k
    s->p_priv = priv;
92
866k
    s->cb = *cb;
93
866k
}
cvdsub.c:bs_init_custom
Line
Count
Source
84
129
{
85
129
    s->p_start = (uint8_t *)p_data;
86
129
    s->p       = NULL;
87
129
    s->p_end   = s->p_start + i_data;
88
129
    s->i_left  = 0;
89
129
    s->b_read_only = true;
90
    s->b_error = false;
91
129
    s->p_priv = priv;
92
129
    s->cb = *cb;
93
129
}
dvbsub.c:bs_init_custom
Line
Count
Source
84
223k
{
85
223k
    s->p_start = (uint8_t *)p_data;
86
223k
    s->p       = NULL;
87
223k
    s->p_end   = s->p_start + i_data;
88
223k
    s->i_left  = 0;
89
223k
    s->b_read_only = true;
90
    s->b_error = false;
91
223k
    s->p_priv = priv;
92
223k
    s->cb = *cb;
93
223k
}
scte27.c:bs_init_custom
Line
Count
Source
84
151
{
85
151
    s->p_start = (uint8_t *)p_data;
86
151
    s->p       = NULL;
87
151
    s->p_end   = s->p_start + i_data;
88
151
    s->i_left  = 0;
89
151
    s->b_read_only = true;
90
    s->b_error = false;
91
151
    s->p_priv = priv;
92
151
    s->cb = *cb;
93
151
}
svcdsub.c:bs_init_custom
Line
Count
Source
84
573
{
85
573
    s->p_start = (uint8_t *)p_data;
86
573
    s->p       = NULL;
87
573
    s->p_end   = s->p_start + i_data;
88
573
    s->i_left  = 0;
89
573
    s->b_read_only = true;
90
    s->b_error = false;
91
573
    s->p_priv = priv;
92
573
    s->cb = *cb;
93
573
}
Unexecuted instantiation: flac.c:bs_init_custom
Unexecuted instantiation: dav1d.c:bs_init_custom
Unexecuted instantiation: faad.c:bs_init_custom
Unexecuted instantiation: video.c:bs_init_custom
94
95
static inline void bs_init( bs_t *s, const void *p_data, size_t i_data )
96
13.4M
{
97
13.4M
    bs_byte_callbacks_t cb = {
98
13.4M
        bs_impl_bytes_forward,
99
13.4M
        bs_impl_bytes_pos,
100
13.4M
    };
101
13.4M
    bs_init_custom( s, p_data, i_data, &cb, NULL );
102
13.4M
}
Unexecuted instantiation: avi.c:bs_init
es.c:bs_init
Line
Count
Source
96
455k
{
97
455k
    bs_byte_callbacks_t cb = {
98
455k
        bs_impl_bytes_forward,
99
455k
        bs_impl_bytes_pos,
100
455k
    };
101
    bs_init_custom( s, p_data, i_data, &cb, NULL );
102
455k
}
dts_header.c:bs_init
Line
Count
Source
96
3.64M
{
97
3.64M
    bs_byte_callbacks_t cb = {
98
3.64M
        bs_impl_bytes_forward,
99
3.64M
        bs_impl_bytes_pos,
100
3.64M
    };
101
    bs_init_custom( s, p_data, i_data, &cb, NULL );
102
3.64M
}
Unexecuted instantiation: h26x.c:bs_init
Unexecuted instantiation: mp4.c:bs_init
Unexecuted instantiation: ty.c:bs_init
a52.c:bs_init
Line
Count
Source
96
4.95M
{
97
4.95M
    bs_byte_callbacks_t cb = {
98
4.95M
        bs_impl_bytes_forward,
99
4.95M
        bs_impl_bytes_pos,
100
4.95M
    };
101
    bs_init_custom( s, p_data, i_data, &cb, NULL );
102
4.95M
}
copy.c:bs_init
Line
Count
Source
96
142
{
97
142
    bs_byte_callbacks_t cb = {
98
142
        bs_impl_bytes_forward,
99
142
        bs_impl_bytes_pos,
100
142
    };
101
    bs_init_custom( s, p_data, i_data, &cb, NULL );
102
142
}
Unexecuted instantiation: h264.c:bs_init
Unexecuted instantiation: hxxx_sei.c:bs_init
Unexecuted instantiation: hxxx_common.c:bs_init
h264_nal.c:bs_init
Line
Count
Source
96
553k
{
97
553k
    bs_byte_callbacks_t cb = {
98
553k
        bs_impl_bytes_forward,
99
553k
        bs_impl_bytes_pos,
100
553k
    };
101
    bs_init_custom( s, p_data, i_data, &cb, NULL );
102
553k
}
Unexecuted instantiation: h264_slice.c:bs_init
Unexecuted instantiation: hevc.c:bs_init
hevc_nal.c:bs_init
Line
Count
Source
96
498k
{
97
498k
    bs_byte_callbacks_t cb = {
98
498k
        bs_impl_bytes_forward,
99
498k
        bs_impl_bytes_pos,
100
498k
    };
101
    bs_init_custom( s, p_data, i_data, &cb, NULL );
102
498k
}
mlp.c:bs_init
Line
Count
Source
96
2.02M
{
97
2.02M
    bs_byte_callbacks_t cb = {
98
2.02M
        bs_impl_bytes_forward,
99
2.02M
        bs_impl_bytes_pos,
100
2.02M
    };
101
    bs_init_custom( s, p_data, i_data, &cb, NULL );
102
2.02M
}
mpeg4audio.c:bs_init
Line
Count
Source
96
79.3k
{
97
79.3k
    bs_byte_callbacks_t cb = {
98
79.3k
        bs_impl_bytes_forward,
99
79.3k
        bs_impl_bytes_pos,
100
79.3k
    };
101
    bs_init_custom( s, p_data, i_data, &cb, NULL );
102
79.3k
}
mpeg4video.c:bs_init
Line
Count
Source
96
90.8k
{
97
90.8k
    bs_byte_callbacks_t cb = {
98
90.8k
        bs_impl_bytes_forward,
99
90.8k
        bs_impl_bytes_pos,
100
90.8k
    };
101
    bs_init_custom( s, p_data, i_data, &cb, NULL );
102
90.8k
}
mpegvideo.c:bs_init
Line
Count
Source
96
31.5k
{
97
31.5k
    bs_byte_callbacks_t cb = {
98
31.5k
        bs_impl_bytes_forward,
99
31.5k
        bs_impl_bytes_pos,
100
31.5k
    };
101
    bs_init_custom( s, p_data, i_data, &cb, NULL );
102
31.5k
}
Unexecuted instantiation: vc1.c:bs_init
Unexecuted instantiation: av1.c:bs_init
av1_obu.c:bs_init
Line
Count
Source
96
39.6k
{
97
39.6k
    bs_byte_callbacks_t cb = {
98
39.6k
        bs_impl_bytes_forward,
99
39.6k
        bs_impl_bytes_pos,
100
39.6k
    };
101
    bs_init_custom( s, p_data, i_data, &cb, NULL );
102
39.6k
}
ogg.c:bs_init
Line
Count
Source
96
908
{
97
908
    bs_byte_callbacks_t cb = {
98
908
        bs_impl_bytes_forward,
99
908
        bs_impl_bytes_pos,
100
908
    };
101
    bs_init_custom( s, p_data, i_data, &cb, NULL );
102
908
}
Unexecuted instantiation: ts_psi.c:bs_init
mpeg4_iod.c:bs_init
Line
Count
Source
96
866k
{
97
866k
    bs_byte_callbacks_t cb = {
98
866k
        bs_impl_bytes_forward,
99
866k
        bs_impl_bytes_pos,
100
866k
    };
101
    bs_init_custom( s, p_data, i_data, &cb, NULL );
102
866k
}
cvdsub.c:bs_init
Line
Count
Source
96
129
{
97
129
    bs_byte_callbacks_t cb = {
98
129
        bs_impl_bytes_forward,
99
129
        bs_impl_bytes_pos,
100
129
    };
101
    bs_init_custom( s, p_data, i_data, &cb, NULL );
102
129
}
dvbsub.c:bs_init
Line
Count
Source
96
223k
{
97
223k
    bs_byte_callbacks_t cb = {
98
223k
        bs_impl_bytes_forward,
99
223k
        bs_impl_bytes_pos,
100
223k
    };
101
    bs_init_custom( s, p_data, i_data, &cb, NULL );
102
223k
}
scte27.c:bs_init
Line
Count
Source
96
151
{
97
151
    bs_byte_callbacks_t cb = {
98
151
        bs_impl_bytes_forward,
99
151
        bs_impl_bytes_pos,
100
151
    };
101
    bs_init_custom( s, p_data, i_data, &cb, NULL );
102
151
}
svcdsub.c:bs_init
Line
Count
Source
96
573
{
97
573
    bs_byte_callbacks_t cb = {
98
573
        bs_impl_bytes_forward,
99
573
        bs_impl_bytes_pos,
100
573
    };
101
    bs_init_custom( s, p_data, i_data, &cb, NULL );
102
573
}
Unexecuted instantiation: flac.c:bs_init
Unexecuted instantiation: dav1d.c:bs_init
Unexecuted instantiation: faad.c:bs_init
Unexecuted instantiation: video.c:bs_init
103
104
static inline void bs_write_init( bs_t *s, void *p_data, size_t i_data )
105
3.73k
{
106
3.73k
    bs_init( s, (const void *) p_data, i_data );
107
3.73k
    s->b_read_only = false;
108
3.73k
}
Unexecuted instantiation: avi.c:bs_write_init
Unexecuted instantiation: es.c:bs_write_init
Unexecuted instantiation: dts_header.c:bs_write_init
Unexecuted instantiation: h26x.c:bs_write_init
Unexecuted instantiation: mp4.c:bs_write_init
Unexecuted instantiation: ty.c:bs_write_init
Unexecuted instantiation: a52.c:bs_write_init
Unexecuted instantiation: copy.c:bs_write_init
Unexecuted instantiation: h264.c:bs_write_init
Unexecuted instantiation: hxxx_sei.c:bs_write_init
Unexecuted instantiation: hxxx_common.c:bs_write_init
Unexecuted instantiation: h264_nal.c:bs_write_init
Unexecuted instantiation: h264_slice.c:bs_write_init
Unexecuted instantiation: hevc.c:bs_write_init
Unexecuted instantiation: hevc_nal.c:bs_write_init
Unexecuted instantiation: mlp.c:bs_write_init
Unexecuted instantiation: mpeg4audio.c:bs_write_init
Unexecuted instantiation: mpeg4video.c:bs_write_init
Unexecuted instantiation: mpegvideo.c:bs_write_init
Unexecuted instantiation: vc1.c:bs_write_init
Unexecuted instantiation: av1.c:bs_write_init
av1_obu.c:bs_write_init
Line
Count
Source
105
3.73k
{
106
3.73k
    bs_init( s, (const void *) p_data, i_data );
107
    s->b_read_only = false;
108
3.73k
}
Unexecuted instantiation: ogg.c:bs_write_init
Unexecuted instantiation: ts_psi.c:bs_write_init
Unexecuted instantiation: mpeg4_iod.c:bs_write_init
Unexecuted instantiation: cvdsub.c:bs_write_init
Unexecuted instantiation: dvbsub.c:bs_write_init
Unexecuted instantiation: scte27.c:bs_write_init
Unexecuted instantiation: svcdsub.c:bs_write_init
Unexecuted instantiation: flac.c:bs_write_init
Unexecuted instantiation: dav1d.c:bs_write_init
Unexecuted instantiation: faad.c:bs_write_init
Unexecuted instantiation: video.c:bs_write_init
109
110
static inline int bs_refill( bs_t *s )
111
899M
{
112
899M
    if( s->i_left == 0 )
113
738M
    {
114
738M
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
632M
           return -1;
116
117
106M
       if( s->p < s->p_end )
118
101M
            s->i_left = 8;
119
106M
    }
120
266M
    return s->i_left > 0 ? 0 : 1;
121
899M
}
Unexecuted instantiation: avi.c:bs_refill
es.c:bs_refill
Line
Count
Source
111
3.53M
{
112
3.53M
    if( s->i_left == 0 )
113
1.60M
    {
114
1.60M
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
0
           return -1;
116
117
1.60M
       if( s->p < s->p_end )
118
1.60M
            s->i_left = 8;
119
1.60M
    }
120
3.53M
    return s->i_left > 0 ? 0 : 1;
121
3.53M
}
dts_header.c:bs_refill
Line
Count
Source
111
34.2M
{
112
34.2M
    if( s->i_left == 0 )
113
25.1M
    {
114
25.1M
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
0
           return -1;
116
117
25.1M
       if( s->p < s->p_end )
118
23.9M
            s->i_left = 8;
119
25.1M
    }
120
34.2M
    return s->i_left > 0 ? 0 : 1;
121
34.2M
}
Unexecuted instantiation: h26x.c:bs_refill
Unexecuted instantiation: mp4.c:bs_refill
Unexecuted instantiation: ty.c:bs_refill
a52.c:bs_refill
Line
Count
Source
111
32.0M
{
112
32.0M
    if( s->i_left == 0 )
113
14.4M
    {
114
14.4M
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
0
           return -1;
116
117
14.4M
       if( s->p < s->p_end )
118
14.4M
            s->i_left = 8;
119
14.4M
    }
120
32.0M
    return s->i_left > 0 ? 0 : 1;
121
32.0M
}
copy.c:bs_refill
Line
Count
Source
111
639
{
112
639
    if( s->i_left == 0 )
113
213
    {
114
213
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
0
           return -1;
116
117
213
       if( s->p < s->p_end )
118
213
            s->i_left = 8;
119
213
    }
120
639
    return s->i_left > 0 ? 0 : 1;
121
639
}
Unexecuted instantiation: h264.c:bs_refill
hxxx_sei.c:bs_refill
Line
Count
Source
111
21.0M
{
112
21.0M
    if( s->i_left == 0 )
113
8.99M
    {
114
8.99M
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
879k
           return -1;
116
117
8.11M
       if( s->p < s->p_end )
118
7.85M
            s->i_left = 8;
119
8.11M
    }
120
20.1M
    return s->i_left > 0 ? 0 : 1;
121
21.0M
}
Unexecuted instantiation: hxxx_common.c:bs_refill
h264_nal.c:bs_refill
Line
Count
Source
111
17.8M
{
112
17.8M
    if( s->i_left == 0 )
113
4.74M
    {
114
4.74M
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
469k
           return -1;
116
117
4.27M
       if( s->p < s->p_end )
118
4.14M
            s->i_left = 8;
119
4.27M
    }
120
17.3M
    return s->i_left > 0 ? 0 : 1;
121
17.8M
}
h264_slice.c:bs_refill
Line
Count
Source
111
21.9M
{
112
21.9M
    if( s->i_left == 0 )
113
5.28M
    {
114
5.28M
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
678k
           return -1;
116
117
4.60M
       if( s->p < s->p_end )
118
4.29M
            s->i_left = 8;
119
4.60M
    }
120
21.3M
    return s->i_left > 0 ? 0 : 1;
121
21.9M
}
Unexecuted instantiation: hevc.c:bs_refill
hevc_nal.c:bs_refill
Line
Count
Source
111
84.6M
{
112
84.6M
    if( s->i_left == 0 )
113
24.7M
    {
114
24.7M
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
3.98M
           return -1;
116
117
20.7M
       if( s->p < s->p_end )
118
18.2M
            s->i_left = 8;
119
20.7M
    }
120
80.6M
    return s->i_left > 0 ? 0 : 1;
121
84.6M
}
mlp.c:bs_refill
Line
Count
Source
111
26.2M
{
112
26.2M
    if( s->i_left == 0 )
113
15.2M
    {
114
15.2M
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
0
           return -1;
116
117
15.2M
       if( s->p < s->p_end )
118
15.2M
            s->i_left = 8;
119
15.2M
    }
120
26.2M
    return s->i_left > 0 ? 0 : 1;
121
26.2M
}
mpeg4audio.c:bs_refill
Line
Count
Source
111
81.9M
{
112
81.9M
    if( s->i_left == 0 )
113
80.2M
    {
114
80.2M
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
78.8M
           return -1;
116
117
1.40M
       if( s->p < s->p_end )
118
1.33M
            s->i_left = 8;
119
1.40M
    }
120
3.08M
    return s->i_left > 0 ? 0 : 1;
121
81.9M
}
mpeg4video.c:bs_refill
Line
Count
Source
111
1.82M
{
112
1.82M
    if( s->i_left == 0 )
113
715k
    {
114
715k
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
107k
           return -1;
116
117
608k
       if( s->p < s->p_end )
118
589k
            s->i_left = 8;
119
608k
    }
120
1.72M
    return s->i_left > 0 ? 0 : 1;
121
1.82M
}
mpegvideo.c:bs_refill
Line
Count
Source
111
14.8M
{
112
14.8M
    if( s->i_left == 0 )
113
9.68M
    {
114
9.68M
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
8.69M
           return -1;
116
117
994k
       if( s->p < s->p_end )
118
967k
            s->i_left = 8;
119
994k
    }
120
6.13M
    return s->i_left > 0 ? 0 : 1;
121
14.8M
}
vc1.c:bs_refill
Line
Count
Source
111
688k
{
112
688k
    if( s->i_left == 0 )
113
590k
    {
114
590k
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
14.3k
           return -1;
116
117
576k
       if( s->p < s->p_end )
118
574k
            s->i_left = 8;
119
576k
    }
120
673k
    return s->i_left > 0 ? 0 : 1;
121
688k
}
Unexecuted instantiation: av1.c:bs_refill
av1_obu.c:bs_refill
Line
Count
Source
111
1.16M
{
112
1.16M
    if( s->i_left == 0 )
113
513k
    {
114
513k
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
242k
           return -1;
116
117
270k
       if( s->p < s->p_end )
118
262k
            s->i_left = 8;
119
270k
    }
120
922k
    return s->i_left > 0 ? 0 : 1;
121
1.16M
}
ogg.c:bs_refill
Line
Count
Source
111
41.1k
{
112
41.1k
    if( s->i_left == 0 )
113
16.4k
    {
114
16.4k
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
50
           return -1;
116
117
16.3k
       if( s->p < s->p_end )
118
16.3k
            s->i_left = 8;
119
16.3k
    }
120
41.0k
    return s->i_left > 0 ? 0 : 1;
121
41.1k
}
Unexecuted instantiation: ts_psi.c:bs_refill
mpeg4_iod.c:bs_refill
Line
Count
Source
111
6.97M
{
112
6.97M
    if( s->i_left == 0 )
113
3.04M
    {
114
3.04M
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
14.7k
           return -1;
116
117
3.02M
       if( s->p < s->p_end )
118
3.02M
            s->i_left = 8;
119
3.02M
    }
120
6.95M
    return s->i_left > 0 ? 0 : 1;
121
6.97M
}
cvdsub.c:bs_refill
Line
Count
Source
111
472
{
112
472
    if( s->i_left == 0 )
113
241
    {
114
241
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
0
           return -1;
116
117
241
       if( s->p < s->p_end )
118
241
            s->i_left = 8;
119
241
    }
120
472
    return s->i_left > 0 ? 0 : 1;
121
472
}
dvbsub.c:bs_refill
Line
Count
Source
111
15.9M
{
112
15.9M
    if( s->i_left == 0 )
113
9.60M
    {
114
9.60M
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
4.58M
           return -1;
116
117
5.01M
       if( s->p < s->p_end )
118
4.79M
            s->i_left = 8;
119
5.01M
    }
120
11.3M
    return s->i_left > 0 ? 0 : 1;
121
15.9M
}
scte27.c:bs_refill
Line
Count
Source
111
9.69k
{
112
9.69k
    if( s->i_left == 0 )
113
3.41k
    {
114
3.41k
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
218
           return -1;
116
117
3.20k
       if( s->p < s->p_end )
118
3.06k
            s->i_left = 8;
119
3.20k
    }
120
9.48k
    return s->i_left > 0 ? 0 : 1;
121
9.69k
}
svcdsub.c:bs_refill
Line
Count
Source
111
534M
{
112
534M
    if( s->i_left == 0 )
113
533M
    {
114
533M
       if( s->cb.pf_byte_forward( s, 1 ) != 1 )
115
533M
           return -1;
116
117
92.6k
       if( s->p < s->p_end )
118
92.5k
            s->i_left = 8;
119
92.6k
    }
120
365k
    return s->i_left > 0 ? 0 : 1;
121
534M
}
Unexecuted instantiation: flac.c:bs_refill
Unexecuted instantiation: dav1d.c:bs_refill
Unexecuted instantiation: faad.c:bs_refill
Unexecuted instantiation: video.c:bs_refill
122
123
static inline bool bs_error( const bs_t *s )
124
11.3M
{
125
11.3M
    return s->b_error;
126
11.3M
}
Unexecuted instantiation: avi.c:bs_error
Unexecuted instantiation: es.c:bs_error
Unexecuted instantiation: dts_header.c:bs_error
Unexecuted instantiation: h26x.c:bs_error
Unexecuted instantiation: mp4.c:bs_error
Unexecuted instantiation: ty.c:bs_error
Unexecuted instantiation: a52.c:bs_error
Unexecuted instantiation: copy.c:bs_error
Unexecuted instantiation: h264.c:bs_error
hxxx_sei.c:bs_error
Line
Count
Source
124
3.93M
{
125
3.93M
    return s->b_error;
126
3.93M
}
Unexecuted instantiation: hxxx_common.c:bs_error
h264_nal.c:bs_error
Line
Count
Source
124
775k
{
125
775k
    return s->b_error;
126
775k
}
h264_slice.c:bs_error
Line
Count
Source
124
345k
{
125
345k
    return s->b_error;
126
345k
}
Unexecuted instantiation: hevc.c:bs_error
hevc_nal.c:bs_error
Line
Count
Source
124
5.52M
{
125
5.52M
    return s->b_error;
126
5.52M
}
Unexecuted instantiation: mlp.c:bs_error
mpeg4audio.c:bs_error
Line
Count
Source
124
181k
{
125
181k
    return s->b_error;
126
181k
}
Unexecuted instantiation: mpeg4video.c:bs_error
Unexecuted instantiation: mpegvideo.c:bs_error
vc1.c:bs_error
Line
Count
Source
124
495k
{
125
495k
    return s->b_error;
126
495k
}
Unexecuted instantiation: av1.c:bs_error
av1_obu.c:bs_error
Line
Count
Source
124
58.1k
{
125
58.1k
    return s->b_error;
126
58.1k
}
Unexecuted instantiation: ogg.c:bs_error
Unexecuted instantiation: ts_psi.c:bs_error
Unexecuted instantiation: mpeg4_iod.c:bs_error
Unexecuted instantiation: cvdsub.c:bs_error
Unexecuted instantiation: dvbsub.c:bs_error
Unexecuted instantiation: scte27.c:bs_error
Unexecuted instantiation: svcdsub.c:bs_error
Unexecuted instantiation: flac.c:bs_error
Unexecuted instantiation: dav1d.c:bs_error
Unexecuted instantiation: faad.c:bs_error
Unexecuted instantiation: video.c:bs_error
127
128
static inline bool bs_eof( bs_t *s )
129
19.6M
{
130
19.6M
    return bs_refill( s ) != 0;
131
19.6M
}
Unexecuted instantiation: avi.c:bs_eof
Unexecuted instantiation: es.c:bs_eof
Unexecuted instantiation: dts_header.c:bs_eof
Unexecuted instantiation: h26x.c:bs_eof
Unexecuted instantiation: mp4.c:bs_eof
Unexecuted instantiation: ty.c:bs_eof
Unexecuted instantiation: a52.c:bs_eof
copy.c:bs_eof
Line
Count
Source
129
71
{
130
71
    return bs_refill( s ) != 0;
131
71
}
Unexecuted instantiation: h264.c:bs_eof
hxxx_sei.c:bs_eof
Line
Count
Source
129
10.6M
{
130
10.6M
    return bs_refill( s ) != 0;
131
10.6M
}
Unexecuted instantiation: hxxx_common.c:bs_eof
Unexecuted instantiation: h264_nal.c:bs_eof
h264_slice.c:bs_eof
Line
Count
Source
129
872k
{
130
872k
    return bs_refill( s ) != 0;
131
872k
}
Unexecuted instantiation: hevc.c:bs_eof
hevc_nal.c:bs_eof
Line
Count
Source
129
3.15M
{
130
3.15M
    return bs_refill( s ) != 0;
131
3.15M
}
Unexecuted instantiation: mlp.c:bs_eof
mpeg4audio.c:bs_eof
Line
Count
Source
129
78.8k
{
130
78.8k
    return bs_refill( s ) != 0;
131
78.8k
}
Unexecuted instantiation: mpeg4video.c:bs_eof
Unexecuted instantiation: mpegvideo.c:bs_eof
Unexecuted instantiation: vc1.c:bs_eof
Unexecuted instantiation: av1.c:bs_eof
Unexecuted instantiation: av1_obu.c:bs_eof
ogg.c:bs_eof
Line
Count
Source
129
9.24k
{
130
9.24k
    return bs_refill( s ) != 0;
131
9.24k
}
Unexecuted instantiation: ts_psi.c:bs_eof
Unexecuted instantiation: mpeg4_iod.c:bs_eof
Unexecuted instantiation: cvdsub.c:bs_eof
dvbsub.c:bs_eof
Line
Count
Source
129
4.86M
{
130
4.86M
    return bs_refill( s ) != 0;
131
4.86M
}
scte27.c:bs_eof
Line
Count
Source
129
1.27k
{
130
1.27k
    return bs_refill( s ) != 0;
131
1.27k
}
Unexecuted instantiation: svcdsub.c:bs_eof
Unexecuted instantiation: flac.c:bs_eof
Unexecuted instantiation: dav1d.c:bs_eof
Unexecuted instantiation: faad.c:bs_eof
Unexecuted instantiation: video.c:bs_eof
132
133
static inline size_t bs_pos( const bs_t *s )
134
4.39M
{
135
4.39M
    return 8 * s->cb.pf_byte_pos( s ) - s->i_left;
136
4.39M
}
Unexecuted instantiation: avi.c:bs_pos
Unexecuted instantiation: es.c:bs_pos
Unexecuted instantiation: dts_header.c:bs_pos
Unexecuted instantiation: h26x.c:bs_pos
Unexecuted instantiation: mp4.c:bs_pos
Unexecuted instantiation: ty.c:bs_pos
Unexecuted instantiation: a52.c:bs_pos
Unexecuted instantiation: copy.c:bs_pos
Unexecuted instantiation: h264.c:bs_pos
hxxx_sei.c:bs_pos
Line
Count
Source
134
3.51M
{
135
3.51M
    return 8 * s->cb.pf_byte_pos( s ) - s->i_left;
136
3.51M
}
Unexecuted instantiation: hxxx_common.c:bs_pos
Unexecuted instantiation: h264_nal.c:bs_pos
Unexecuted instantiation: h264_slice.c:bs_pos
Unexecuted instantiation: hevc.c:bs_pos
Unexecuted instantiation: hevc_nal.c:bs_pos
Unexecuted instantiation: mlp.c:bs_pos
mpeg4audio.c:bs_pos
Line
Count
Source
134
13.0k
{
135
13.0k
    return 8 * s->cb.pf_byte_pos( s ) - s->i_left;
136
13.0k
}
Unexecuted instantiation: mpeg4video.c:bs_pos
Unexecuted instantiation: mpegvideo.c:bs_pos
Unexecuted instantiation: vc1.c:bs_pos
Unexecuted instantiation: av1.c:bs_pos
Unexecuted instantiation: av1_obu.c:bs_pos
Unexecuted instantiation: ogg.c:bs_pos
Unexecuted instantiation: ts_psi.c:bs_pos
mpeg4_iod.c:bs_pos
Line
Count
Source
134
861k
{
135
861k
    return 8 * s->cb.pf_byte_pos( s ) - s->i_left;
136
861k
}
Unexecuted instantiation: cvdsub.c:bs_pos
dvbsub.c:bs_pos
Line
Count
Source
134
1.37k
{
135
1.37k
    return 8 * s->cb.pf_byte_pos( s ) - s->i_left;
136
1.37k
}
Unexecuted instantiation: scte27.c:bs_pos
Unexecuted instantiation: svcdsub.c:bs_pos
Unexecuted instantiation: flac.c:bs_pos
Unexecuted instantiation: dav1d.c:bs_pos
Unexecuted instantiation: faad.c:bs_pos
Unexecuted instantiation: video.c:bs_pos
137
138
static inline void bs_skip( bs_t *s, size_t i_count )
139
106M
{
140
106M
    if( i_count == 0 )
141
1.20M
        return;
142
143
104M
    if( bs_refill( s ) )
144
81.5M
    {
145
81.5M
        s->b_error = true;
146
81.5M
        return;
147
81.5M
    }
148
149
23.3M
    if( i_count > s->i_left )
150
13.2M
    {
151
13.2M
        i_count -= s->i_left;
152
13.2M
        s->i_left = 0;
153
13.2M
        size_t bytes = i_count / 8;
154
13.2M
        if( bytes && s->cb.pf_byte_forward( s, bytes ) != bytes )
155
1.96k
        {
156
1.96k
            s->b_error = true;
157
1.96k
            return;
158
1.96k
        }
159
13.2M
        i_count = i_count % 8;
160
13.2M
        if( i_count > 0 )
161
5.87M
        {
162
5.87M
            if( !bs_refill( s ) )
163
5.81M
                s->i_left = 8 - i_count;
164
66.8k
            else
165
66.8k
                s->b_error = true;
166
5.87M
        }
167
13.2M
    }
168
10.0M
    else s->i_left -= i_count;
169
23.3M
}
Unexecuted instantiation: avi.c:bs_skip
es.c:bs_skip
Line
Count
Source
139
25.9k
{
140
25.9k
    if( i_count == 0 )
141
0
        return;
142
143
25.9k
    if( bs_refill( s ) )
144
0
    {
145
0
        s->b_error = true;
146
0
        return;
147
0
    }
148
149
25.9k
    if( i_count > s->i_left )
150
0
    {
151
0
        i_count -= s->i_left;
152
0
        s->i_left = 0;
153
0
        size_t bytes = i_count / 8;
154
0
        if( bytes && s->cb.pf_byte_forward( s, bytes ) != bytes )
155
0
        {
156
0
            s->b_error = true;
157
0
            return;
158
0
        }
159
0
        i_count = i_count % 8;
160
0
        if( i_count > 0 )
161
0
        {
162
0
            if( !bs_refill( s ) )
163
0
                s->i_left = 8 - i_count;
164
0
            else
165
0
                s->b_error = true;
166
0
        }
167
0
    }
168
25.9k
    else s->i_left -= i_count;
169
25.9k
}
dts_header.c:bs_skip
Line
Count
Source
139
7.92M
{
140
7.92M
    if( i_count == 0 )
141
0
        return;
142
143
7.92M
    if( bs_refill( s ) )
144
0
    {
145
0
        s->b_error = true;
146
0
        return;
147
0
    }
148
149
7.92M
    if( i_count > s->i_left )
150
6.75M
    {
151
6.75M
        i_count -= s->i_left;
152
6.75M
        s->i_left = 0;
153
6.75M
        size_t bytes = i_count / 8;
154
6.75M
        if( bytes && s->cb.pf_byte_forward( s, bytes ) != bytes )
155
0
        {
156
0
            s->b_error = true;
157
0
            return;
158
0
        }
159
6.75M
        i_count = i_count % 8;
160
6.75M
        if( i_count > 0 )
161
2.80M
        {
162
2.80M
            if( !bs_refill( s ) )
163
2.80M
                s->i_left = 8 - i_count;
164
0
            else
165
0
                s->b_error = true;
166
2.80M
        }
167
6.75M
    }
168
1.17M
    else s->i_left -= i_count;
169
7.92M
}
Unexecuted instantiation: h26x.c:bs_skip
Unexecuted instantiation: mp4.c:bs_skip
Unexecuted instantiation: ty.c:bs_skip
a52.c:bs_skip
Line
Count
Source
139
189k
{
140
189k
    if( i_count == 0 )
141
0
        return;
142
143
189k
    if( bs_refill( s ) )
144
0
    {
145
0
        s->b_error = true;
146
0
        return;
147
0
    }
148
149
189k
    if( i_count > s->i_left )
150
0
    {
151
0
        i_count -= s->i_left;
152
0
        s->i_left = 0;
153
0
        size_t bytes = i_count / 8;
154
0
        if( bytes && s->cb.pf_byte_forward( s, bytes ) != bytes )
155
0
        {
156
0
            s->b_error = true;
157
0
            return;
158
0
        }
159
0
        i_count = i_count % 8;
160
0
        if( i_count > 0 )
161
0
        {
162
0
            if( !bs_refill( s ) )
163
0
                s->i_left = 8 - i_count;
164
0
            else
165
0
                s->b_error = true;
166
0
        }
167
0
    }
168
189k
    else s->i_left -= i_count;
169
189k
}
copy.c:bs_skip
Line
Count
Source
139
213
{
140
213
    if( i_count == 0 )
141
0
        return;
142
143
213
    if( bs_refill( s ) )
144
0
    {
145
0
        s->b_error = true;
146
0
        return;
147
0
    }
148
149
213
    if( i_count > s->i_left )
150
71
    {
151
71
        i_count -= s->i_left;
152
71
        s->i_left = 0;
153
71
        size_t bytes = i_count / 8;
154
71
        if( bytes && s->cb.pf_byte_forward( s, bytes ) != bytes )
155
0
        {
156
0
            s->b_error = true;
157
0
            return;
158
0
        }
159
71
        i_count = i_count % 8;
160
71
        if( i_count > 0 )
161
0
        {
162
0
            if( !bs_refill( s ) )
163
0
                s->i_left = 8 - i_count;
164
0
            else
165
0
                s->b_error = true;
166
0
        }
167
71
    }
168
142
    else s->i_left -= i_count;
169
213
}
Unexecuted instantiation: h264.c:bs_skip
hxxx_sei.c:bs_skip
Line
Count
Source
139
1.66M
{
140
1.66M
    if( i_count == 0 )
141
1.17M
        return;
142
143
481k
    if( bs_refill( s ) )
144
52.7k
    {
145
52.7k
        s->b_error = true;
146
52.7k
        return;
147
52.7k
    }
148
149
429k
    if( i_count > s->i_left )
150
344k
    {
151
344k
        i_count -= s->i_left;
152
344k
        s->i_left = 0;
153
344k
        size_t bytes = i_count / 8;
154
344k
        if( bytes && s->cb.pf_byte_forward( s, bytes ) != bytes )
155
0
        {
156
0
            s->b_error = true;
157
0
            return;
158
0
        }
159
344k
        i_count = i_count % 8;
160
344k
        if( i_count > 0 )
161
0
        {
162
0
            if( !bs_refill( s ) )
163
0
                s->i_left = 8 - i_count;
164
0
            else
165
0
                s->b_error = true;
166
0
        }
167
344k
    }
168
85.0k
    else s->i_left -= i_count;
169
429k
}
Unexecuted instantiation: hxxx_common.c:bs_skip
h264_nal.c:bs_skip
Line
Count
Source
139
1.41M
{
140
1.41M
    if( i_count == 0 )
141
212
        return;
142
143
1.41M
    if( bs_refill( s ) )
144
153k
    {
145
153k
        s->b_error = true;
146
153k
        return;
147
153k
    }
148
149
1.25M
    if( i_count > s->i_left )
150
85.3k
    {
151
85.3k
        i_count -= s->i_left;
152
85.3k
        s->i_left = 0;
153
85.3k
        size_t bytes = i_count / 8;
154
85.3k
        if( bytes && s->cb.pf_byte_forward( s, bytes ) != bytes )
155
0
        {
156
0
            s->b_error = true;
157
0
            return;
158
0
        }
159
85.3k
        i_count = i_count % 8;
160
85.3k
        if( i_count > 0 )
161
83.8k
        {
162
83.8k
            if( !bs_refill( s ) )
163
76.6k
                s->i_left = 8 - i_count;
164
7.15k
            else
165
7.15k
                s->b_error = true;
166
83.8k
        }
167
85.3k
    }
168
1.17M
    else s->i_left -= i_count;
169
1.25M
}
h264_slice.c:bs_skip
Line
Count
Source
139
810k
{
140
810k
    if( i_count == 0 )
141
0
        return;
142
143
810k
    if( bs_refill( s ) )
144
14.3k
    {
145
14.3k
        s->b_error = true;
146
14.3k
        return;
147
14.3k
    }
148
149
796k
    if( i_count > s->i_left )
150
8.07k
    {
151
8.07k
        i_count -= s->i_left;
152
8.07k
        s->i_left = 0;
153
8.07k
        size_t bytes = i_count / 8;
154
8.07k
        if( bytes && s->cb.pf_byte_forward( s, bytes ) != bytes )
155
0
        {
156
0
            s->b_error = true;
157
0
            return;
158
0
        }
159
8.07k
        i_count = i_count % 8;
160
8.07k
        if( i_count > 0 )
161
6.68k
        {
162
6.68k
            if( !bs_refill( s ) )
163
4.97k
                s->i_left = 8 - i_count;
164
1.70k
            else
165
1.70k
                s->b_error = true;
166
6.68k
        }
167
8.07k
    }
168
788k
    else s->i_left -= i_count;
169
796k
}
Unexecuted instantiation: hevc.c:bs_skip
hevc_nal.c:bs_skip
Line
Count
Source
139
4.68M
{
140
4.68M
    if( i_count == 0 )
141
17.6k
        return;
142
143
4.66M
    if( bs_refill( s ) )
144
174k
    {
145
174k
        s->b_error = true;
146
174k
        return;
147
174k
    }
148
149
4.49M
    if( i_count > s->i_left )
150
549k
    {
151
549k
        i_count -= s->i_left;
152
549k
        s->i_left = 0;
153
549k
        size_t bytes = i_count / 8;
154
549k
        if( bytes && s->cb.pf_byte_forward( s, bytes ) != bytes )
155
0
        {
156
0
            s->b_error = true;
157
0
            return;
158
0
        }
159
549k
        i_count = i_count % 8;
160
549k
        if( i_count > 0 )
161
483k
        {
162
483k
            if( !bs_refill( s ) )
163
450k
                s->i_left = 8 - i_count;
164
32.4k
            else
165
32.4k
                s->b_error = true;
166
483k
        }
167
549k
    }
168
3.94M
    else s->i_left -= i_count;
169
4.49M
}
mlp.c:bs_skip
Line
Count
Source
139
6.04M
{
140
6.04M
    if( i_count == 0 )
141
0
        return;
142
143
6.04M
    if( bs_refill( s ) )
144
0
    {
145
0
        s->b_error = true;
146
0
        return;
147
0
    }
148
149
6.04M
    if( i_count > s->i_left )
150
4.42M
    {
151
4.42M
        i_count -= s->i_left;
152
4.42M
        s->i_left = 0;
153
4.42M
        size_t bytes = i_count / 8;
154
4.42M
        if( bytes && s->cb.pf_byte_forward( s, bytes ) != bytes )
155
0
        {
156
0
            s->b_error = true;
157
0
            return;
158
0
        }
159
4.42M
        i_count = i_count % 8;
160
4.42M
        if( i_count > 0 )
161
1.47M
        {
162
1.47M
            if( !bs_refill( s ) )
163
1.47M
                s->i_left = 8 - i_count;
164
0
            else
165
0
                s->b_error = true;
166
1.47M
        }
167
4.42M
    }
168
1.62M
    else s->i_left -= i_count;
169
6.04M
}
mpeg4audio.c:bs_skip
Line
Count
Source
139
79.6M
{
140
79.6M
    if( i_count == 0 )
141
5.67k
        return;
142
143
79.6M
    if( bs_refill( s ) )
144
78.8M
    {
145
78.8M
        s->b_error = true;
146
78.8M
        return;
147
78.8M
    }
148
149
769k
    if( i_count > s->i_left )
150
627k
    {
151
627k
        i_count -= s->i_left;
152
627k
        s->i_left = 0;
153
627k
        size_t bytes = i_count / 8;
154
627k
        if( bytes && s->cb.pf_byte_forward( s, bytes ) != bytes )
155
579
        {
156
579
            s->b_error = true;
157
579
            return;
158
579
        }
159
626k
        i_count = i_count % 8;
160
626k
        if( i_count > 0 )
161
563k
        {
162
563k
            if( !bs_refill( s ) )
163
557k
                s->i_left = 8 - i_count;
164
5.21k
            else
165
5.21k
                s->b_error = true;
166
563k
        }
167
626k
    }
168
141k
    else s->i_left -= i_count;
169
769k
}
mpeg4video.c:bs_skip
Line
Count
Source
139
477k
{
140
477k
    if( i_count == 0 )
141
0
        return;
142
143
477k
    if( bs_refill( s ) )
144
39.1k
    {
145
39.1k
        s->b_error = true;
146
39.1k
        return;
147
39.1k
    }
148
149
438k
    if( i_count > s->i_left )
150
232k
    {
151
232k
        i_count -= s->i_left;
152
232k
        s->i_left = 0;
153
232k
        size_t bytes = i_count / 8;
154
232k
        if( bytes && s->cb.pf_byte_forward( s, bytes ) != bytes )
155
0
        {
156
0
            s->b_error = true;
157
0
            return;
158
0
        }
159
232k
        i_count = i_count % 8;
160
232k
        if( i_count > 0 )
161
219k
        {
162
219k
            if( !bs_refill( s ) )
163
210k
                s->i_left = 8 - i_count;
164
8.84k
            else
165
8.84k
                s->b_error = true;
166
219k
        }
167
232k
    }
168
205k
    else s->i_left -= i_count;
169
438k
}
mpegvideo.c:bs_skip
Line
Count
Source
139
2.17M
{
140
2.17M
    if( i_count == 0 )
141
0
        return;
142
143
2.17M
    if( bs_refill( s ) )
144
1.28M
    {
145
1.28M
        s->b_error = true;
146
1.28M
        return;
147
1.28M
    }
148
149
887k
    if( i_count > s->i_left )
150
218k
    {
151
218k
        i_count -= s->i_left;
152
218k
        s->i_left = 0;
153
218k
        size_t bytes = i_count / 8;
154
218k
        if( bytes && s->cb.pf_byte_forward( s, bytes ) != bytes )
155
0
        {
156
0
            s->b_error = true;
157
0
            return;
158
0
        }
159
218k
        i_count = i_count % 8;
160
218k
        if( i_count > 0 )
161
218k
        {
162
218k
            if( !bs_refill( s ) )
163
206k
                s->i_left = 8 - i_count;
164
11.4k
            else
165
11.4k
                s->b_error = true;
166
218k
        }
167
218k
    }
168
668k
    else s->i_left -= i_count;
169
887k
}
vc1.c:bs_skip
Line
Count
Source
139
32.1k
{
140
32.1k
    if( i_count == 0 )
141
0
        return;
142
143
32.1k
    if( bs_refill( s ) )
144
4.75k
    {
145
4.75k
        s->b_error = true;
146
4.75k
        return;
147
4.75k
    }
148
149
27.4k
    if( i_count > s->i_left )
150
6.73k
    {
151
6.73k
        i_count -= s->i_left;
152
6.73k
        s->i_left = 0;
153
6.73k
        size_t bytes = i_count / 8;
154
6.73k
        if( bytes && s->cb.pf_byte_forward( s, bytes ) != bytes )
155
0
        {
156
0
            s->b_error = true;
157
0
            return;
158
0
        }
159
6.73k
        i_count = i_count % 8;
160
6.73k
        if( i_count > 0 )
161
0
        {
162
0
            if( !bs_refill( s ) )
163
0
                s->i_left = 8 - i_count;
164
0
            else
165
0
                s->b_error = true;
166
0
        }
167
6.73k
    }
168
20.7k
    else s->i_left -= i_count;
169
27.4k
}
Unexecuted instantiation: av1.c:bs_skip
av1_obu.c:bs_skip
Line
Count
Source
139
1.71k
{
140
1.71k
    if( i_count == 0 )
141
0
        return;
142
143
1.71k
    if( bs_refill( s ) )
144
4
    {
145
4
        s->b_error = true;
146
4
        return;
147
4
    }
148
149
1.71k
    if( i_count > s->i_left )
150
0
    {
151
0
        i_count -= s->i_left;
152
0
        s->i_left = 0;
153
0
        size_t bytes = i_count / 8;
154
0
        if( bytes && s->cb.pf_byte_forward( s, bytes ) != bytes )
155
0
        {
156
0
            s->b_error = true;
157
0
            return;
158
0
        }
159
0
        i_count = i_count % 8;
160
0
        if( i_count > 0 )
161
0
        {
162
0
            if( !bs_refill( s ) )
163
0
                s->i_left = 8 - i_count;
164
0
            else
165
0
                s->b_error = true;
166
0
        }
167
0
    }
168
1.71k
    else s->i_left -= i_count;
169
1.71k
}
ogg.c:bs_skip
Line
Count
Source
139
6.06k
{
140
6.06k
    if( i_count == 0 )
141
0
        return;
142
143
6.06k
    if( bs_refill( s ) )
144
0
    {
145
0
        s->b_error = true;
146
0
        return;
147
0
    }
148
149
6.06k
    if( i_count > s->i_left )
150
3.96k
    {
151
3.96k
        i_count -= s->i_left;
152
3.96k
        s->i_left = 0;
153
3.96k
        size_t bytes = i_count / 8;
154
3.96k
        if( bytes && s->cb.pf_byte_forward( s, bytes ) != bytes )
155
0
        {
156
0
            s->b_error = true;
157
0
            return;
158
0
        }
159
3.96k
        i_count = i_count % 8;
160
3.96k
        if( i_count > 0 )
161
0
        {
162
0
            if( !bs_refill( s ) )
163
0
                s->i_left = 8 - i_count;
164
0
            else
165
0
                s->b_error = true;
166
0
        }
167
3.96k
    }
168
2.09k
    else s->i_left -= i_count;
169
6.06k
}
Unexecuted instantiation: ts_psi.c:bs_skip
mpeg4_iod.c:bs_skip
Line
Count
Source
139
46.5k
{
140
46.5k
    if( i_count == 0 )
141
0
        return;
142
143
46.5k
    if( bs_refill( s ) )
144
1.16k
    {
145
1.16k
        s->b_error = true;
146
1.16k
        return;
147
1.16k
    }
148
149
45.4k
    if( i_count > s->i_left )
150
22.5k
    {
151
22.5k
        i_count -= s->i_left;
152
22.5k
        s->i_left = 0;
153
22.5k
        size_t bytes = i_count / 8;
154
22.5k
        if( bytes && s->cb.pf_byte_forward( s, bytes ) != bytes )
155
43
        {
156
43
            s->b_error = true;
157
43
            return;
158
43
        }
159
22.4k
        i_count = i_count % 8;
160
22.4k
        if( i_count > 0 )
161
21.8k
        {
162
21.8k
            if( !bs_refill( s ) )
163
21.8k
                s->i_left = 8 - i_count;
164
17
            else
165
17
                s->b_error = true;
166
21.8k
        }
167
22.4k
    }
168
22.8k
    else s->i_left -= i_count;
169
45.4k
}
Unexecuted instantiation: cvdsub.c:bs_skip
dvbsub.c:bs_skip
Line
Count
Source
139
991k
{
140
991k
    if( i_count == 0 )
141
442
        return;
142
143
991k
    if( bs_refill( s ) )
144
963k
    {
145
963k
        s->b_error = true;
146
963k
        return;
147
963k
    }
148
149
28.1k
    if( i_count > s->i_left )
150
7.50k
    {
151
7.50k
        i_count -= s->i_left;
152
7.50k
        s->i_left = 0;
153
7.50k
        size_t bytes = i_count / 8;
154
7.50k
        if( bytes && s->cb.pf_byte_forward( s, bytes ) != bytes )
155
1.33k
        {
156
1.33k
            s->b_error = true;
157
1.33k
            return;
158
1.33k
        }
159
6.16k
        i_count = i_count % 8;
160
6.16k
        if( i_count > 0 )
161
0
        {
162
0
            if( !bs_refill( s ) )
163
0
                s->i_left = 8 - i_count;
164
0
            else
165
0
                s->b_error = true;
166
0
        }
167
6.16k
    }
168
20.6k
    else s->i_left -= i_count;
169
28.1k
}
scte27.c:bs_skip
Line
Count
Source
139
351
{
140
351
    if( i_count == 0 )
141
0
        return;
142
143
351
    if( bs_refill( s ) )
144
12
    {
145
12
        s->b_error = true;
146
12
        return;
147
12
    }
148
149
339
    if( i_count > s->i_left )
150
120
    {
151
120
        i_count -= s->i_left;
152
120
        s->i_left = 0;
153
120
        size_t bytes = i_count / 8;
154
120
        if( bytes && s->cb.pf_byte_forward( s, bytes ) != bytes )
155
0
        {
156
0
            s->b_error = true;
157
0
            return;
158
0
        }
159
120
        i_count = i_count % 8;
160
120
        if( i_count > 0 )
161
0
        {
162
0
            if( !bs_refill( s ) )
163
0
                s->i_left = 8 - i_count;
164
0
            else
165
0
                s->b_error = true;
166
0
        }
167
120
    }
168
219
    else s->i_left -= i_count;
169
339
}
Unexecuted instantiation: svcdsub.c:bs_skip
Unexecuted instantiation: flac.c:bs_skip
Unexecuted instantiation: dav1d.c:bs_skip
Unexecuted instantiation: faad.c:bs_skip
Unexecuted instantiation: video.c:bs_skip
170
171
static inline uint32_t bs_read( bs_t *s, uint8_t i_count )
172
665M
{
173
665M
    uint8_t  i_shr, i_drop = 0;
174
665M
    uint32_t i_result = 0;
175
176
665M
    if( i_count > 32 )
177
126k
    {
178
126k
        i_drop = i_count - 32;
179
126k
        i_count = 32;
180
126k
    }
181
182
730M
    while( i_count > 0 )
183
679M
    {
184
679M
        if( bs_refill( s ) )
185
549M
        {
186
549M
            s->b_error = true;
187
549M
            break;
188
549M
        }
189
190
129M
        if( s->i_left > i_count )
191
64.9M
        {
192
64.9M
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
64.9M
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
64.9M
            i_result |= ( *s->p >> i_shr ) & mask;
197
64.9M
            s->i_left -= i_count;
198
64.9M
            break;
199
64.9M
        }
200
64.1M
        else
201
64.1M
        {
202
64.1M
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
64.1M
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
64.1M
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
64.1M
            else
209
64.1M
                i_result |= (*s->p & mask) << i_shr;
210
64.1M
            i_count  -= s->i_left;
211
64.1M
            s->i_left = 0;
212
64.1M
        }
213
129M
    }
214
215
665M
    if( i_drop )
216
126k
        bs_skip( s, i_drop );
217
218
665M
    return( i_result );
219
665M
}
Unexecuted instantiation: avi.c:bs_read
es.c:bs_read
Line
Count
Source
172
2.83M
{
173
2.83M
    uint8_t  i_shr, i_drop = 0;
174
2.83M
    uint32_t i_result = 0;
175
176
2.83M
    if( i_count > 32 )
177
0
    {
178
0
        i_drop = i_count - 32;
179
0
        i_count = 32;
180
0
    }
181
182
3.70M
    while( i_count > 0 )
183
3.19M
    {
184
3.19M
        if( bs_refill( s ) )
185
0
        {
186
0
            s->b_error = true;
187
0
            break;
188
0
        }
189
190
3.19M
        if( s->i_left > i_count )
191
2.32M
        {
192
2.32M
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
2.32M
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
2.32M
            i_result |= ( *s->p >> i_shr ) & mask;
197
2.32M
            s->i_left -= i_count;
198
2.32M
            break;
199
2.32M
        }
200
872k
        else
201
872k
        {
202
872k
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
872k
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
872k
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
872k
            else
209
872k
                i_result |= (*s->p & mask) << i_shr;
210
872k
            i_count  -= s->i_left;
211
872k
            s->i_left = 0;
212
872k
        }
213
3.19M
    }
214
215
2.83M
    if( i_drop )
216
0
        bs_skip( s, i_drop );
217
218
2.83M
    return( i_result );
219
2.83M
}
dts_header.c:bs_read
Line
Count
Source
172
13.4M
{
173
13.4M
    uint8_t  i_shr, i_drop = 0;
174
13.4M
    uint32_t i_result = 0;
175
176
13.4M
    if( i_count > 32 )
177
0
    {
178
0
        i_drop = i_count - 32;
179
0
        i_count = 32;
180
0
    }
181
182
27.4M
    while( i_count > 0 )
183
22.2M
    {
184
22.2M
        if( bs_refill( s ) )
185
1.17M
        {
186
1.17M
            s->b_error = true;
187
1.17M
            break;
188
1.17M
        }
189
190
21.1M
        if( s->i_left > i_count )
191
7.11M
        {
192
7.11M
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
7.11M
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
7.11M
            i_result |= ( *s->p >> i_shr ) & mask;
197
7.11M
            s->i_left -= i_count;
198
7.11M
            break;
199
7.11M
        }
200
13.9M
        else
201
13.9M
        {
202
13.9M
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
13.9M
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
13.9M
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
13.9M
            else
209
13.9M
                i_result |= (*s->p & mask) << i_shr;
210
13.9M
            i_count  -= s->i_left;
211
13.9M
            s->i_left = 0;
212
13.9M
        }
213
21.1M
    }
214
215
13.4M
    if( i_drop )
216
0
        bs_skip( s, i_drop );
217
218
13.4M
    return( i_result );
219
13.4M
}
Unexecuted instantiation: h26x.c:bs_read
Unexecuted instantiation: mp4.c:bs_read
Unexecuted instantiation: ty.c:bs_read
a52.c:bs_read
Line
Count
Source
172
27.9M
{
173
27.9M
    uint8_t  i_shr, i_drop = 0;
174
27.9M
    uint32_t i_result = 0;
175
176
27.9M
    if( i_count > 32 )
177
0
    {
178
0
        i_drop = i_count - 32;
179
0
        i_count = 32;
180
0
    }
181
182
36.7M
    while( i_count > 0 )
183
30.0M
    {
184
30.0M
        if( bs_refill( s ) )
185
0
        {
186
0
            s->b_error = true;
187
0
            break;
188
0
        }
189
190
30.0M
        if( s->i_left > i_count )
191
21.2M
        {
192
21.2M
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
21.2M
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
21.2M
            i_result |= ( *s->p >> i_shr ) & mask;
197
21.2M
            s->i_left -= i_count;
198
21.2M
            break;
199
21.2M
        }
200
8.77M
        else
201
8.77M
        {
202
8.77M
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
8.77M
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
8.77M
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
8.77M
            else
209
8.77M
                i_result |= (*s->p & mask) << i_shr;
210
8.77M
            i_count  -= s->i_left;
211
8.77M
            s->i_left = 0;
212
8.77M
        }
213
30.0M
    }
214
215
27.9M
    if( i_drop )
216
0
        bs_skip( s, i_drop );
217
218
27.9M
    return( i_result );
219
27.9M
}
copy.c:bs_read
Line
Count
Source
172
355
{
173
355
    uint8_t  i_shr, i_drop = 0;
174
355
    uint32_t i_result = 0;
175
176
355
    if( i_count > 32 )
177
0
    {
178
0
        i_drop = i_count - 32;
179
0
        i_count = 32;
180
0
    }
181
182
355
    while( i_count > 0 )
183
355
    {
184
355
        if( bs_refill( s ) )
185
0
        {
186
0
            s->b_error = true;
187
0
            break;
188
0
        }
189
190
355
        if( s->i_left > i_count )
191
355
        {
192
355
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
355
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
355
            i_result |= ( *s->p >> i_shr ) & mask;
197
355
            s->i_left -= i_count;
198
355
            break;
199
355
        }
200
0
        else
201
0
        {
202
0
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
0
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
0
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
0
            else
209
0
                i_result |= (*s->p & mask) << i_shr;
210
0
            i_count  -= s->i_left;
211
0
            s->i_left = 0;
212
0
        }
213
355
    }
214
215
355
    if( i_drop )
216
0
        bs_skip( s, i_drop );
217
218
355
    return( i_result );
219
355
}
Unexecuted instantiation: h264.c:bs_read
hxxx_sei.c:bs_read
Line
Count
Source
172
7.16M
{
173
7.16M
    uint8_t  i_shr, i_drop = 0;
174
7.16M
    uint32_t i_result = 0;
175
176
7.16M
    if( i_count > 32 )
177
0
    {
178
0
        i_drop = i_count - 32;
179
0
        i_count = 32;
180
0
    }
181
182
14.3M
    while( i_count > 0 )
183
7.56M
    {
184
7.56M
        if( bs_refill( s ) )
185
368k
        {
186
368k
            s->b_error = true;
187
368k
            break;
188
368k
        }
189
190
7.19M
        if( s->i_left > i_count )
191
50.0k
        {
192
50.0k
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
50.0k
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
50.0k
            i_result |= ( *s->p >> i_shr ) & mask;
197
50.0k
            s->i_left -= i_count;
198
50.0k
            break;
199
50.0k
        }
200
7.14M
        else
201
7.14M
        {
202
7.14M
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
7.14M
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
7.14M
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
7.14M
            else
209
7.14M
                i_result |= (*s->p & mask) << i_shr;
210
7.14M
            i_count  -= s->i_left;
211
7.14M
            s->i_left = 0;
212
7.14M
        }
213
7.19M
    }
214
215
7.16M
    if( i_drop )
216
0
        bs_skip( s, i_drop );
217
218
7.16M
    return( i_result );
219
7.16M
}
Unexecuted instantiation: hxxx_common.c:bs_read
h264_nal.c:bs_read
Line
Count
Source
172
7.79M
{
173
7.79M
    uint8_t  i_shr, i_drop = 0;
174
7.79M
    uint32_t i_result = 0;
175
176
7.79M
    if( i_count > 32 )
177
0
    {
178
0
        i_drop = i_count - 32;
179
0
        i_count = 32;
180
0
    }
181
182
9.63M
    while( i_count > 0 )
183
5.11M
    {
184
5.11M
        if( bs_refill( s ) )
185
368k
        {
186
368k
            s->b_error = true;
187
368k
            break;
188
368k
        }
189
190
4.74M
        if( s->i_left > i_count )
191
2.89M
        {
192
2.89M
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
2.89M
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
2.89M
            i_result |= ( *s->p >> i_shr ) & mask;
197
2.89M
            s->i_left -= i_count;
198
2.89M
            break;
199
2.89M
        }
200
1.84M
        else
201
1.84M
        {
202
1.84M
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
1.84M
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
1.84M
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
1.84M
            else
209
1.84M
                i_result |= (*s->p & mask) << i_shr;
210
1.84M
            i_count  -= s->i_left;
211
1.84M
            s->i_left = 0;
212
1.84M
        }
213
4.74M
    }
214
215
7.79M
    if( i_drop )
216
0
        bs_skip( s, i_drop );
217
218
7.79M
    return( i_result );
219
7.79M
}
h264_slice.c:bs_read
Line
Count
Source
172
7.96M
{
173
7.96M
    uint8_t  i_shr, i_drop = 0;
174
7.96M
    uint32_t i_result = 0;
175
176
7.96M
    if( i_count > 32 )
177
12.5k
    {
178
12.5k
        i_drop = i_count - 32;
179
12.5k
        i_count = 32;
180
12.5k
    }
181
182
10.4M
    while( i_count > 0 )
183
6.10M
    {
184
6.10M
        if( bs_refill( s ) )
185
481k
        {
186
481k
            s->b_error = true;
187
481k
            break;
188
481k
        }
189
190
5.62M
        if( s->i_left > i_count )
191
3.11M
        {
192
3.11M
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
3.11M
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
3.11M
            i_result |= ( *s->p >> i_shr ) & mask;
197
3.11M
            s->i_left -= i_count;
198
3.11M
            break;
199
3.11M
        }
200
2.50M
        else
201
2.50M
        {
202
2.50M
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
2.50M
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
2.50M
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
2.50M
            else
209
2.50M
                i_result |= (*s->p & mask) << i_shr;
210
2.50M
            i_count  -= s->i_left;
211
2.50M
            s->i_left = 0;
212
2.50M
        }
213
5.62M
    }
214
215
7.96M
    if( i_drop )
216
12.5k
        bs_skip( s, i_drop );
217
218
7.96M
    return( i_result );
219
7.96M
}
Unexecuted instantiation: hevc.c:bs_read
hevc_nal.c:bs_read
Line
Count
Source
172
22.7M
{
173
22.7M
    uint8_t  i_shr, i_drop = 0;
174
22.7M
    uint32_t i_result = 0;
175
176
22.7M
    if( i_count > 32 )
177
67.1k
    {
178
67.1k
        i_drop = i_count - 32;
179
67.1k
        i_count = 32;
180
67.1k
    }
181
182
33.0M
    while( i_count > 0 )
183
23.2M
    {
184
23.2M
        if( bs_refill( s ) )
185
2.59M
        {
186
2.59M
            s->b_error = true;
187
2.59M
            break;
188
2.59M
        }
189
190
20.6M
        if( s->i_left > i_count )
191
10.3M
        {
192
10.3M
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
10.3M
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
10.3M
            i_result |= ( *s->p >> i_shr ) & mask;
197
10.3M
            s->i_left -= i_count;
198
10.3M
            break;
199
10.3M
        }
200
10.2M
        else
201
10.2M
        {
202
10.2M
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
10.2M
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
10.2M
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
10.2M
            else
209
10.2M
                i_result |= (*s->p & mask) << i_shr;
210
10.2M
            i_count  -= s->i_left;
211
10.2M
            s->i_left = 0;
212
10.2M
        }
213
20.6M
    }
214
215
22.7M
    if( i_drop )
216
67.1k
        bs_skip( s, i_drop );
217
218
22.7M
    return( i_result );
219
22.7M
}
mlp.c:bs_read
Line
Count
Source
172
13.7M
{
173
13.7M
    uint8_t  i_shr, i_drop = 0;
174
13.7M
    uint32_t i_result = 0;
175
176
13.7M
    if( i_count > 32 )
177
0
    {
178
0
        i_drop = i_count - 32;
179
0
        i_count = 32;
180
0
    }
181
182
23.3M
    while( i_count > 0 )
183
18.3M
    {
184
18.3M
        if( bs_refill( s ) )
185
0
        {
186
0
            s->b_error = true;
187
0
            break;
188
0
        }
189
190
18.3M
        if( s->i_left > i_count )
191
8.70M
        {
192
8.70M
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
8.70M
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
8.70M
            i_result |= ( *s->p >> i_shr ) & mask;
197
8.70M
            s->i_left -= i_count;
198
8.70M
            break;
199
8.70M
        }
200
9.63M
        else
201
9.63M
        {
202
9.63M
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
9.63M
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
9.63M
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
9.63M
            else
209
9.63M
                i_result |= (*s->p & mask) << i_shr;
210
9.63M
            i_count  -= s->i_left;
211
9.63M
            s->i_left = 0;
212
9.63M
        }
213
18.3M
    }
214
215
13.7M
    if( i_drop )
216
0
        bs_skip( s, i_drop );
217
218
13.7M
    return( i_result );
219
13.7M
}
mpeg4audio.c:bs_read
Line
Count
Source
172
865k
{
173
865k
    uint8_t  i_shr, i_drop = 0;
174
865k
    uint32_t i_result = 0;
175
176
865k
    if( i_count > 32 )
177
0
    {
178
0
        i_drop = i_count - 32;
179
0
        i_count = 32;
180
0
    }
181
182
1.40M
    while( i_count > 0 )
183
1.34M
    {
184
1.34M
        if( bs_refill( s ) )
185
88.1k
        {
186
88.1k
            s->b_error = true;
187
88.1k
            break;
188
88.1k
        }
189
190
1.25M
        if( s->i_left > i_count )
191
715k
        {
192
715k
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
715k
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
715k
            i_result |= ( *s->p >> i_shr ) & mask;
197
715k
            s->i_left -= i_count;
198
715k
            break;
199
715k
        }
200
543k
        else
201
543k
        {
202
543k
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
543k
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
543k
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
543k
            else
209
543k
                i_result |= (*s->p & mask) << i_shr;
210
543k
            i_count  -= s->i_left;
211
543k
            s->i_left = 0;
212
543k
        }
213
1.25M
    }
214
215
865k
    if( i_drop )
216
0
        bs_skip( s, i_drop );
217
218
865k
    return( i_result );
219
865k
}
mpeg4video.c:bs_read
Line
Count
Source
172
605k
{
173
605k
    uint8_t  i_shr, i_drop = 0;
174
605k
    uint32_t i_result = 0;
175
176
605k
    if( i_count > 32 )
177
0
    {
178
0
        i_drop = i_count - 32;
179
0
        i_count = 32;
180
0
    }
181
182
841k
    while( i_count > 0 )
183
792k
    {
184
792k
        if( bs_refill( s ) )
185
45.5k
        {
186
45.5k
            s->b_error = true;
187
45.5k
            break;
188
45.5k
        }
189
190
747k
        if( s->i_left > i_count )
191
511k
        {
192
511k
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
511k
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
511k
            i_result |= ( *s->p >> i_shr ) & mask;
197
511k
            s->i_left -= i_count;
198
511k
            break;
199
511k
        }
200
235k
        else
201
235k
        {
202
235k
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
235k
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
235k
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
235k
            else
209
235k
                i_result |= (*s->p & mask) << i_shr;
210
235k
            i_count  -= s->i_left;
211
235k
            s->i_left = 0;
212
235k
        }
213
747k
    }
214
215
605k
    if( i_drop )
216
0
        bs_skip( s, i_drop );
217
218
605k
    return( i_result );
219
605k
}
mpegvideo.c:bs_read
Line
Count
Source
172
12.3M
{
173
12.3M
    uint8_t  i_shr, i_drop = 0;
174
12.3M
    uint32_t i_result = 0;
175
176
12.3M
    if( i_count > 32 )
177
0
    {
178
0
        i_drop = i_count - 32;
179
0
        i_count = 32;
180
0
    }
181
182
13.0M
    while( i_count > 0 )
183
12.4M
    {
184
12.4M
        if( bs_refill( s ) )
185
7.42M
        {
186
7.42M
            s->b_error = true;
187
7.42M
            break;
188
7.42M
        }
189
190
5.00M
        if( s->i_left > i_count )
191
4.33M
        {
192
4.33M
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
4.33M
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
4.33M
            i_result |= ( *s->p >> i_shr ) & mask;
197
4.33M
            s->i_left -= i_count;
198
4.33M
            break;
199
4.33M
        }
200
668k
        else
201
668k
        {
202
668k
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
668k
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
668k
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
668k
            else
209
668k
                i_result |= (*s->p & mask) << i_shr;
210
668k
            i_count  -= s->i_left;
211
668k
            s->i_left = 0;
212
668k
        }
213
5.00M
    }
214
215
12.3M
    if( i_drop )
216
0
        bs_skip( s, i_drop );
217
218
12.3M
    return( i_result );
219
12.3M
}
vc1.c:bs_read
Line
Count
Source
172
612k
{
173
612k
    uint8_t  i_shr, i_drop = 0;
174
612k
    uint32_t i_result = 0;
175
176
612k
    if( i_count > 32 )
177
0
    {
178
0
        i_drop = i_count - 32;
179
0
        i_count = 32;
180
0
    }
181
182
1.15M
    while( i_count > 0 )
183
649k
    {
184
649k
        if( bs_refill( s ) )
185
9.03k
        {
186
9.03k
            s->b_error = true;
187
9.03k
            break;
188
9.03k
        }
189
190
640k
        if( s->i_left > i_count )
191
97.8k
        {
192
97.8k
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
97.8k
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
97.8k
            i_result |= ( *s->p >> i_shr ) & mask;
197
97.8k
            s->i_left -= i_count;
198
97.8k
            break;
199
97.8k
        }
200
542k
        else
201
542k
        {
202
542k
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
542k
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
542k
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
542k
            else
209
542k
                i_result |= (*s->p & mask) << i_shr;
210
542k
            i_count  -= s->i_left;
211
542k
            s->i_left = 0;
212
542k
        }
213
640k
    }
214
215
612k
    if( i_drop )
216
0
        bs_skip( s, i_drop );
217
218
612k
    return( i_result );
219
612k
}
Unexecuted instantiation: av1.c:bs_read
av1_obu.c:bs_read
Line
Count
Source
172
350k
{
173
350k
    uint8_t  i_shr, i_drop = 0;
174
350k
    uint32_t i_result = 0;
175
176
350k
    if( i_count > 32 )
177
0
    {
178
0
        i_drop = i_count - 32;
179
0
        i_count = 32;
180
0
    }
181
182
510k
    while( i_count > 0 )
183
462k
    {
184
462k
        if( bs_refill( s ) )
185
104k
        {
186
104k
            s->b_error = true;
187
104k
            break;
188
104k
        }
189
190
358k
        if( s->i_left > i_count )
191
198k
        {
192
198k
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
198k
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
198k
            i_result |= ( *s->p >> i_shr ) & mask;
197
198k
            s->i_left -= i_count;
198
198k
            break;
199
198k
        }
200
159k
        else
201
159k
        {
202
159k
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
159k
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
159k
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
159k
            else
209
159k
                i_result |= (*s->p & mask) << i_shr;
210
159k
            i_count  -= s->i_left;
211
159k
            s->i_left = 0;
212
159k
        }
213
358k
    }
214
215
350k
    if( i_drop )
216
0
        bs_skip( s, i_drop );
217
218
350k
    return( i_result );
219
350k
}
ogg.c:bs_read
Line
Count
Source
172
20.9k
{
173
20.9k
    uint8_t  i_shr, i_drop = 0;
174
20.9k
    uint32_t i_result = 0;
175
176
20.9k
    if( i_count > 32 )
177
0
    {
178
0
        i_drop = i_count - 32;
179
0
        i_count = 32;
180
0
    }
181
182
30.9k
    while( i_count > 0 )
183
25.8k
    {
184
25.8k
        if( bs_refill( s ) )
185
32
        {
186
32
            s->b_error = true;
187
32
            break;
188
32
        }
189
190
25.7k
        if( s->i_left > i_count )
191
15.8k
        {
192
15.8k
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
15.8k
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
15.8k
            i_result |= ( *s->p >> i_shr ) & mask;
197
15.8k
            s->i_left -= i_count;
198
15.8k
            break;
199
15.8k
        }
200
9.96k
        else
201
9.96k
        {
202
9.96k
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
9.96k
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
9.96k
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
9.96k
            else
209
9.96k
                i_result |= (*s->p & mask) << i_shr;
210
9.96k
            i_count  -= s->i_left;
211
9.96k
            s->i_left = 0;
212
9.96k
        }
213
25.7k
    }
214
215
20.9k
    if( i_drop )
216
0
        bs_skip( s, i_drop );
217
218
20.9k
    return( i_result );
219
20.9k
}
Unexecuted instantiation: ts_psi.c:bs_read
mpeg4_iod.c:bs_read
Line
Count
Source
172
3.44M
{
173
3.44M
    uint8_t  i_shr, i_drop = 0;
174
3.44M
    uint32_t i_result = 0;
175
176
3.44M
    if( i_count > 32 )
177
46.5k
    {
178
46.5k
        i_drop = i_count - 32;
179
46.5k
        i_count = 32;
180
46.5k
    }
181
182
5.78M
    while( i_count > 0 )
183
3.42M
    {
184
3.42M
        if( bs_refill( s ) )
185
2.28k
        {
186
2.28k
            s->b_error = true;
187
2.28k
            break;
188
2.28k
        }
189
190
3.41M
        if( s->i_left > i_count )
191
1.07M
        {
192
1.07M
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
1.07M
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
1.07M
            i_result |= ( *s->p >> i_shr ) & mask;
197
1.07M
            s->i_left -= i_count;
198
1.07M
            break;
199
1.07M
        }
200
2.34M
        else
201
2.34M
        {
202
2.34M
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
2.34M
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
2.34M
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
2.34M
            else
209
2.34M
                i_result |= (*s->p & mask) << i_shr;
210
2.34M
            i_count  -= s->i_left;
211
2.34M
            s->i_left = 0;
212
2.34M
        }
213
3.41M
    }
214
215
3.44M
    if( i_drop )
216
46.5k
        bs_skip( s, i_drop );
217
218
3.44M
    return( i_result );
219
3.44M
}
cvdsub.c:bs_read
Line
Count
Source
172
472
{
173
472
    uint8_t  i_shr, i_drop = 0;
174
472
    uint32_t i_result = 0;
175
176
472
    if( i_count > 32 )
177
0
    {
178
0
        i_drop = i_count - 32;
179
0
        i_count = 32;
180
0
    }
181
182
703
    while( i_count > 0 )
183
472
    {
184
472
        if( bs_refill( s ) )
185
0
        {
186
0
            s->b_error = true;
187
0
            break;
188
0
        }
189
190
472
        if( s->i_left > i_count )
191
241
        {
192
241
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
241
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
241
            i_result |= ( *s->p >> i_shr ) & mask;
197
241
            s->i_left -= i_count;
198
241
            break;
199
241
        }
200
231
        else
201
231
        {
202
231
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
231
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
231
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
231
            else
209
231
                i_result |= (*s->p & mask) << i_shr;
210
231
            i_count  -= s->i_left;
211
231
            s->i_left = 0;
212
231
        }
213
472
    }
214
215
472
    if( i_drop )
216
0
        bs_skip( s, i_drop );
217
218
472
    return( i_result );
219
472
}
dvbsub.c:bs_read
Line
Count
Source
172
9.98M
{
173
9.98M
    uint8_t  i_shr, i_drop = 0;
174
9.98M
    uint32_t i_result = 0;
175
176
9.98M
    if( i_count > 32 )
177
0
    {
178
0
        i_drop = i_count - 32;
179
0
        i_count = 32;
180
0
    }
181
182
14.5M
    while( i_count > 0 )
183
10.0M
    {
184
10.0M
        if( bs_refill( s ) )
185
3.61M
        {
186
3.61M
            s->b_error = true;
187
3.61M
            break;
188
3.61M
        }
189
190
6.42M
        if( s->i_left > i_count )
191
1.90M
        {
192
1.90M
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
1.90M
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
1.90M
            i_result |= ( *s->p >> i_shr ) & mask;
197
1.90M
            s->i_left -= i_count;
198
1.90M
            break;
199
1.90M
        }
200
4.51M
        else
201
4.51M
        {
202
4.51M
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
4.51M
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
4.51M
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
4.51M
            else
209
4.51M
                i_result |= (*s->p & mask) << i_shr;
210
4.51M
            i_count  -= s->i_left;
211
4.51M
            s->i_left = 0;
212
4.51M
        }
213
6.42M
    }
214
215
9.98M
    if( i_drop )
216
0
        bs_skip( s, i_drop );
217
218
9.98M
    return( i_result );
219
9.98M
}
scte27.c:bs_read
Line
Count
Source
172
3.69k
{
173
3.69k
    uint8_t  i_shr, i_drop = 0;
174
3.69k
    uint32_t i_result = 0;
175
176
3.69k
    if( i_count > 32 )
177
0
    {
178
0
        i_drop = i_count - 32;
179
0
        i_count = 32;
180
0
    }
181
182
6.34k
    while( i_count > 0 )
183
5.29k
    {
184
5.29k
        if( bs_refill( s ) )
185
241
        {
186
241
            s->b_error = true;
187
241
            break;
188
241
        }
189
190
5.05k
        if( s->i_left > i_count )
191
2.40k
        {
192
2.40k
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
2.40k
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
2.40k
            i_result |= ( *s->p >> i_shr ) & mask;
197
2.40k
            s->i_left -= i_count;
198
2.40k
            break;
199
2.40k
        }
200
2.65k
        else
201
2.65k
        {
202
2.65k
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
2.65k
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
2.65k
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
2.65k
            else
209
2.65k
                i_result |= (*s->p & mask) << i_shr;
210
2.65k
            i_count  -= s->i_left;
211
2.65k
            s->i_left = 0;
212
2.65k
        }
213
5.05k
    }
214
215
3.69k
    if( i_drop )
216
0
        bs_skip( s, i_drop );
217
218
3.69k
    return( i_result );
219
3.69k
}
svcdsub.c:bs_read
Line
Count
Source
172
534M
{
173
534M
    uint8_t  i_shr, i_drop = 0;
174
534M
    uint32_t i_result = 0;
175
176
534M
    if( i_count > 32 )
177
0
    {
178
0
        i_drop = i_count - 32;
179
0
        i_count = 32;
180
0
    }
181
182
534M
    while( i_count > 0 )
183
534M
    {
184
534M
        if( bs_refill( s ) )
185
533M
        {
186
533M
            s->b_error = true;
187
533M
            break;
188
533M
        }
189
190
364k
        if( s->i_left > i_count )
191
275k
        {
192
275k
            uint_fast32_t mask = (UINT64_C(1) << i_count) - 1;
193
194
275k
            i_shr = s->i_left - i_count;
195
            /* more in the buffer than requested */
196
275k
            i_result |= ( *s->p >> i_shr ) & mask;
197
275k
            s->i_left -= i_count;
198
275k
            break;
199
275k
        }
200
89.8k
        else
201
89.8k
        {
202
89.8k
            uint_fast32_t mask = (UINT64_C(1) << s->i_left) - 1;
203
204
89.8k
            i_shr = i_count - s->i_left;
205
            /* less in the buffer than requested */
206
89.8k
            if( i_shr >= 32 )
207
0
                i_result = 0;
208
89.8k
            else
209
89.8k
                i_result |= (*s->p & mask) << i_shr;
210
89.8k
            i_count  -= s->i_left;
211
89.8k
            s->i_left = 0;
212
89.8k
        }
213
364k
    }
214
215
534M
    if( i_drop )
216
0
        bs_skip( s, i_drop );
217
218
534M
    return( i_result );
219
534M
}
Unexecuted instantiation: flac.c:bs_read
Unexecuted instantiation: dav1d.c:bs_read
Unexecuted instantiation: faad.c:bs_read
Unexecuted instantiation: video.c:bs_read
220
221
static inline uint32_t bs_read1( bs_t *s )
222
89.4M
{
223
89.4M
    if( bs_refill( s ) )
224
4.75M
    {
225
4.75M
        s->b_error = true;
226
4.75M
        return 0;
227
4.75M
    }
228
84.7M
    s->i_left--;
229
84.7M
    return ( *s->p >> s->i_left )&0x01;
230
89.4M
}
Unexecuted instantiation: avi.c:bs_read1
es.c:bs_read1
Line
Count
Source
222
312k
{
223
312k
    if( bs_refill( s ) )
224
0
    {
225
0
        s->b_error = true;
226
0
        return 0;
227
0
    }
228
312k
    s->i_left--;
229
312k
    return ( *s->p >> s->i_left )&0x01;
230
312k
}
dts_header.c:bs_read1
Line
Count
Source
222
1.26M
{
223
1.26M
    if( bs_refill( s ) )
224
0
    {
225
0
        s->b_error = true;
226
0
        return 0;
227
0
    }
228
1.26M
    s->i_left--;
229
1.26M
    return ( *s->p >> s->i_left )&0x01;
230
1.26M
}
Unexecuted instantiation: h26x.c:bs_read1
Unexecuted instantiation: mp4.c:bs_read1
Unexecuted instantiation: ty.c:bs_read1
a52.c:bs_read1
Line
Count
Source
222
1.88M
{
223
1.88M
    if( bs_refill( s ) )
224
0
    {
225
0
        s->b_error = true;
226
0
        return 0;
227
0
    }
228
1.88M
    s->i_left--;
229
1.88M
    return ( *s->p >> s->i_left )&0x01;
230
1.88M
}
Unexecuted instantiation: copy.c:bs_read1
Unexecuted instantiation: h264.c:bs_read1
hxxx_sei.c:bs_read1
Line
Count
Source
222
2.30M
{
223
2.30M
    if( bs_refill( s ) )
224
292k
    {
225
292k
        s->b_error = true;
226
292k
        return 0;
227
292k
    }
228
2.01M
    s->i_left--;
229
2.01M
    return ( *s->p >> s->i_left )&0x01;
230
2.30M
}
Unexecuted instantiation: hxxx_common.c:bs_read1
h264_nal.c:bs_read1
Line
Count
Source
222
11.2M
{
223
11.2M
    if( bs_refill( s ) )
224
65.6k
    {
225
65.6k
        s->b_error = true;
226
65.6k
        return 0;
227
65.6k
    }
228
11.1M
    s->i_left--;
229
11.1M
    return ( *s->p >> s->i_left )&0x01;
230
11.2M
}
h264_slice.c:bs_read1
Line
Count
Source
222
14.1M
{
223
14.1M
    if( bs_refill( s ) )
224
474k
    {
225
474k
        s->b_error = true;
226
474k
        return 0;
227
474k
    }
228
13.7M
    s->i_left--;
229
13.7M
    return ( *s->p >> s->i_left )&0x01;
230
14.1M
}
Unexecuted instantiation: hevc.c:bs_read1
hevc_nal.c:bs_read1
Line
Count
Source
222
53.0M
{
223
53.0M
    if( bs_refill( s ) )
224
3.71M
    {
225
3.71M
        s->b_error = true;
226
3.71M
        return 0;
227
3.71M
    }
228
49.3M
    s->i_left--;
229
49.3M
    return ( *s->p >> s->i_left )&0x01;
230
53.0M
}
mlp.c:bs_read1
Line
Count
Source
222
441k
{
223
441k
    if( bs_refill( s ) )
224
0
    {
225
0
        s->b_error = true;
226
0
        return 0;
227
0
    }
228
441k
    s->i_left--;
229
441k
    return ( *s->p >> s->i_left )&0x01;
230
441k
}
mpeg4audio.c:bs_read1
Line
Count
Source
222
365k
{
223
365k
    if( bs_refill( s ) )
224
10.4k
    {
225
10.4k
        s->b_error = true;
226
10.4k
        return 0;
227
10.4k
    }
228
354k
    s->i_left--;
229
354k
    return ( *s->p >> s->i_left )&0x01;
230
365k
}
mpeg4video.c:bs_read1
Line
Count
Source
222
339k
{
223
339k
    if( bs_refill( s ) )
224
32.7k
    {
225
32.7k
        s->b_error = true;
226
32.7k
        return 0;
227
32.7k
    }
228
307k
    s->i_left--;
229
307k
    return ( *s->p >> s->i_left )&0x01;
230
339k
}
Unexecuted instantiation: mpegvideo.c:bs_read1
vc1.c:bs_read1
Line
Count
Source
222
6.24k
{
223
6.24k
    if( bs_refill( s ) )
224
1.97k
    {
225
1.97k
        s->b_error = true;
226
1.97k
        return 0;
227
1.97k
    }
228
4.26k
    s->i_left--;
229
4.26k
    return ( *s->p >> s->i_left )&0x01;
230
6.24k
}
Unexecuted instantiation: av1.c:bs_read1
av1_obu.c:bs_read1
Line
Count
Source
222
581k
{
223
581k
    if( bs_refill( s ) )
224
146k
    {
225
146k
        s->b_error = true;
226
146k
        return 0;
227
146k
    }
228
434k
    s->i_left--;
229
434k
    return ( *s->p >> s->i_left )&0x01;
230
581k
}
Unexecuted instantiation: ogg.c:bs_read1
Unexecuted instantiation: ts_psi.c:bs_read1
mpeg4_iod.c:bs_read1
Line
Count
Source
222
3.48M
{
223
3.48M
    if( bs_refill( s ) )
224
15.3k
    {
225
15.3k
        s->b_error = true;
226
15.3k
        return 0;
227
15.3k
    }
228
3.46M
    s->i_left--;
229
3.46M
    return ( *s->p >> s->i_left )&0x01;
230
3.48M
}
Unexecuted instantiation: cvdsub.c:bs_read1
Unexecuted instantiation: dvbsub.c:bs_read1
scte27.c:bs_read1
Line
Count
Source
222
2.78k
{
223
2.78k
    if( bs_refill( s ) )
224
16
    {
225
16
        s->b_error = true;
226
16
        return 0;
227
16
    }
228
2.76k
    s->i_left--;
229
2.76k
    return ( *s->p >> s->i_left )&0x01;
230
2.78k
}
Unexecuted instantiation: svcdsub.c:bs_read1
Unexecuted instantiation: flac.c:bs_read1
Unexecuted instantiation: dav1d.c:bs_read1
Unexecuted instantiation: faad.c:bs_read1
Unexecuted instantiation: video.c:bs_read1
231
232
static inline void bs_write( bs_t *s, uint8_t i_count, uint32_t i_bits )
233
52.3k
{
234
52.3k
    if( s->b_read_only )
235
0
        return;
236
237
171k
    while( i_count > 0 )
238
119k
    {
239
119k
        if( bs_refill( s ) )
240
0
        {
241
0
            s->b_error = true;
242
0
            break;
243
0
        }
244
245
119k
        i_count--;
246
247
119k
        if( ( i_bits >> i_count )&0x01 )
248
24.9k
        {
249
24.9k
            *s->p |= 1 << ( s->i_left - 1 );
250
24.9k
        }
251
94.6k
        else
252
94.6k
        {
253
94.6k
            *s->p &= ~( 1 << ( s->i_left - 1 ) );
254
94.6k
        }
255
119k
        s->i_left--;
256
119k
    }
257
52.3k
}
Unexecuted instantiation: avi.c:bs_write
Unexecuted instantiation: es.c:bs_write
Unexecuted instantiation: dts_header.c:bs_write
Unexecuted instantiation: h26x.c:bs_write
Unexecuted instantiation: mp4.c:bs_write
Unexecuted instantiation: ty.c:bs_write
Unexecuted instantiation: a52.c:bs_write
Unexecuted instantiation: copy.c:bs_write
Unexecuted instantiation: h264.c:bs_write
Unexecuted instantiation: hxxx_sei.c:bs_write
Unexecuted instantiation: hxxx_common.c:bs_write
Unexecuted instantiation: h264_nal.c:bs_write
Unexecuted instantiation: h264_slice.c:bs_write
Unexecuted instantiation: hevc.c:bs_write
Unexecuted instantiation: hevc_nal.c:bs_write
Unexecuted instantiation: mlp.c:bs_write
Unexecuted instantiation: mpeg4audio.c:bs_write
Unexecuted instantiation: mpeg4video.c:bs_write
Unexecuted instantiation: mpegvideo.c:bs_write
Unexecuted instantiation: vc1.c:bs_write
Unexecuted instantiation: av1.c:bs_write
av1_obu.c:bs_write
Line
Count
Source
233
52.3k
{
234
52.3k
    if( s->b_read_only )
235
0
        return;
236
237
171k
    while( i_count > 0 )
238
119k
    {
239
119k
        if( bs_refill( s ) )
240
0
        {
241
0
            s->b_error = true;
242
0
            break;
243
0
        }
244
245
119k
        i_count--;
246
247
119k
        if( ( i_bits >> i_count )&0x01 )
248
24.9k
        {
249
24.9k
            *s->p |= 1 << ( s->i_left - 1 );
250
24.9k
        }
251
94.6k
        else
252
94.6k
        {
253
94.6k
            *s->p &= ~( 1 << ( s->i_left - 1 ) );
254
94.6k
        }
255
119k
        s->i_left--;
256
119k
    }
257
52.3k
}
Unexecuted instantiation: ogg.c:bs_write
Unexecuted instantiation: ts_psi.c:bs_write
Unexecuted instantiation: mpeg4_iod.c:bs_write
Unexecuted instantiation: cvdsub.c:bs_write
Unexecuted instantiation: dvbsub.c:bs_write
Unexecuted instantiation: scte27.c:bs_write
Unexecuted instantiation: svcdsub.c:bs_write
Unexecuted instantiation: flac.c:bs_write
Unexecuted instantiation: dav1d.c:bs_write
Unexecuted instantiation: faad.c:bs_write
Unexecuted instantiation: video.c:bs_write
258
259
static inline bool bs_aligned( bs_t *s )
260
1.89M
{
261
1.89M
    return s->i_left % 8 == 0;
262
1.89M
}
Unexecuted instantiation: avi.c:bs_aligned
Unexecuted instantiation: es.c:bs_aligned
Unexecuted instantiation: dts_header.c:bs_aligned
Unexecuted instantiation: h26x.c:bs_aligned
Unexecuted instantiation: mp4.c:bs_aligned
Unexecuted instantiation: ty.c:bs_aligned
Unexecuted instantiation: a52.c:bs_aligned
Unexecuted instantiation: copy.c:bs_aligned
Unexecuted instantiation: h264.c:bs_aligned
hxxx_sei.c:bs_aligned
Line
Count
Source
260
1.89M
{
261
1.89M
    return s->i_left % 8 == 0;
262
1.89M
}
Unexecuted instantiation: hxxx_common.c:bs_aligned
Unexecuted instantiation: h264_nal.c:bs_aligned
Unexecuted instantiation: h264_slice.c:bs_aligned
Unexecuted instantiation: hevc.c:bs_aligned
Unexecuted instantiation: hevc_nal.c:bs_aligned
Unexecuted instantiation: mlp.c:bs_aligned
Unexecuted instantiation: mpeg4audio.c:bs_aligned
Unexecuted instantiation: mpeg4video.c:bs_aligned
Unexecuted instantiation: mpegvideo.c:bs_aligned
Unexecuted instantiation: vc1.c:bs_aligned
Unexecuted instantiation: av1.c:bs_aligned
Unexecuted instantiation: av1_obu.c:bs_aligned
Unexecuted instantiation: ogg.c:bs_aligned
Unexecuted instantiation: ts_psi.c:bs_aligned
Unexecuted instantiation: mpeg4_iod.c:bs_aligned
Unexecuted instantiation: cvdsub.c:bs_aligned
Unexecuted instantiation: dvbsub.c:bs_aligned
Unexecuted instantiation: scte27.c:bs_aligned
Unexecuted instantiation: svcdsub.c:bs_aligned
Unexecuted instantiation: flac.c:bs_aligned
Unexecuted instantiation: dav1d.c:bs_aligned
Unexecuted instantiation: faad.c:bs_aligned
Unexecuted instantiation: video.c:bs_aligned
263
264
static inline void bs_align( bs_t *s )
265
851k
{
266
851k
    if( s->i_left % 8 )
267
263k
        s->i_left = 0;
268
851k
}
Unexecuted instantiation: avi.c:bs_align
Unexecuted instantiation: es.c:bs_align
Unexecuted instantiation: dts_header.c:bs_align
Unexecuted instantiation: h26x.c:bs_align
Unexecuted instantiation: mp4.c:bs_align
Unexecuted instantiation: ty.c:bs_align
Unexecuted instantiation: a52.c:bs_align
Unexecuted instantiation: copy.c:bs_align
Unexecuted instantiation: h264.c:bs_align
Unexecuted instantiation: hxxx_sei.c:bs_align
Unexecuted instantiation: hxxx_common.c:bs_align
Unexecuted instantiation: h264_nal.c:bs_align
Unexecuted instantiation: h264_slice.c:bs_align
Unexecuted instantiation: hevc.c:bs_align
Unexecuted instantiation: hevc_nal.c:bs_align
Unexecuted instantiation: mlp.c:bs_align
mpeg4audio.c:bs_align
Line
Count
Source
265
2.10k
{
266
2.10k
    if( s->i_left % 8 )
267
1.16k
        s->i_left = 0;
268
2.10k
}
Unexecuted instantiation: mpeg4video.c:bs_align
Unexecuted instantiation: mpegvideo.c:bs_align
Unexecuted instantiation: vc1.c:bs_align
Unexecuted instantiation: av1.c:bs_align
Unexecuted instantiation: av1_obu.c:bs_align
Unexecuted instantiation: ogg.c:bs_align
Unexecuted instantiation: ts_psi.c:bs_align
Unexecuted instantiation: mpeg4_iod.c:bs_align
cvdsub.c:bs_align
Line
Count
Source
265
39
{
266
39
    if( s->i_left % 8 )
267
10
        s->i_left = 0;
268
39
}
dvbsub.c:bs_align
Line
Count
Source
265
649k
{
266
649k
    if( s->i_left % 8 )
267
259k
        s->i_left = 0;
268
649k
}
Unexecuted instantiation: scte27.c:bs_align
svcdsub.c:bs_align
Line
Count
Source
265
199k
{
266
199k
    if( s->i_left % 8 )
267
2.70k
        s->i_left = 0;
268
199k
}
Unexecuted instantiation: flac.c:bs_align
Unexecuted instantiation: dav1d.c:bs_align
Unexecuted instantiation: faad.c:bs_align
Unexecuted instantiation: video.c:bs_align
269
270
static inline void bs_write_align( bs_t *s, uint8_t v )
271
0
{
272
0
    if( !s->b_read_only && (s->i_left % 8) )
273
0
        bs_write( s, s->i_left, v ? 0xFF : 0 );
274
0
}
Unexecuted instantiation: avi.c:bs_write_align
Unexecuted instantiation: es.c:bs_write_align
Unexecuted instantiation: dts_header.c:bs_write_align
Unexecuted instantiation: h26x.c:bs_write_align
Unexecuted instantiation: mp4.c:bs_write_align
Unexecuted instantiation: ty.c:bs_write_align
Unexecuted instantiation: a52.c:bs_write_align
Unexecuted instantiation: copy.c:bs_write_align
Unexecuted instantiation: h264.c:bs_write_align
Unexecuted instantiation: hxxx_sei.c:bs_write_align
Unexecuted instantiation: hxxx_common.c:bs_write_align
Unexecuted instantiation: h264_nal.c:bs_write_align
Unexecuted instantiation: h264_slice.c:bs_write_align
Unexecuted instantiation: hevc.c:bs_write_align
Unexecuted instantiation: hevc_nal.c:bs_write_align
Unexecuted instantiation: mlp.c:bs_write_align
Unexecuted instantiation: mpeg4audio.c:bs_write_align
Unexecuted instantiation: mpeg4video.c:bs_write_align
Unexecuted instantiation: mpegvideo.c:bs_write_align
Unexecuted instantiation: vc1.c:bs_write_align
Unexecuted instantiation: av1.c:bs_write_align
Unexecuted instantiation: av1_obu.c:bs_write_align
Unexecuted instantiation: ogg.c:bs_write_align
Unexecuted instantiation: ts_psi.c:bs_write_align
Unexecuted instantiation: mpeg4_iod.c:bs_write_align
Unexecuted instantiation: cvdsub.c:bs_write_align
Unexecuted instantiation: dvbsub.c:bs_write_align
Unexecuted instantiation: scte27.c:bs_write_align
Unexecuted instantiation: svcdsub.c:bs_write_align
Unexecuted instantiation: flac.c:bs_write_align
Unexecuted instantiation: dav1d.c:bs_write_align
Unexecuted instantiation: faad.c:bs_write_align
Unexecuted instantiation: video.c:bs_write_align
275
276
0
#define bs_align_0( s ) bs_write_align( s, 0 )
277
#define bs_align_1( s ) bs_write_align( s, 1 )
278
279
/* Read unsigned Exp-Golomb code */
280
static inline uint_fast32_t bs_read_ue( bs_t * bs )
281
21.4M
{
282
21.4M
    unsigned i = 0;
283
284
64.4M
    while( !bs->b_error &&
285
62.4M
           bs_read1( bs ) == 0 &&
286
45.6M
           bs->p < bs->p_end && i < 31 )
287
43.0M
        i++;
288
289
21.4M
    return (1U << i) - 1 + bs_read( bs, i );
290
21.4M
}
Unexecuted instantiation: avi.c:bs_read_ue
Unexecuted instantiation: es.c:bs_read_ue
Unexecuted instantiation: dts_header.c:bs_read_ue
Unexecuted instantiation: h26x.c:bs_read_ue
Unexecuted instantiation: mp4.c:bs_read_ue
Unexecuted instantiation: ty.c:bs_read_ue
Unexecuted instantiation: a52.c:bs_read_ue
Unexecuted instantiation: copy.c:bs_read_ue
Unexecuted instantiation: h264.c:bs_read_ue
hxxx_sei.c:bs_read_ue
Line
Count
Source
281
89.1k
{
282
89.1k
    unsigned i = 0;
283
284
1.95M
    while( !bs->b_error &&
285
1.95M
           bs_read1( bs ) == 0 &&
286
1.87M
           bs->p < bs->p_end && i < 31 )
287
1.87M
        i++;
288
289
89.1k
    return (1U << i) - 1 + bs_read( bs, i );
290
89.1k
}
Unexecuted instantiation: hxxx_common.c:bs_read_ue
h264_nal.c:bs_read_ue
Line
Count
Source
281
5.32M
{
282
5.32M
    unsigned i = 0;
283
284
11.5M
    while( !bs->b_error &&
285
11.0M
           bs_read1( bs ) == 0 &&
286
6.27M
           bs->p < bs->p_end && i < 31 )
287
6.17M
        i++;
288
289
5.32M
    return (1U << i) - 1 + bs_read( bs, i );
290
5.32M
}
h264_slice.c:bs_read_ue
Line
Count
Source
281
5.04M
{
282
5.04M
    unsigned i = 0;
283
284
13.3M
    while( !bs->b_error &&
285
13.0M
           bs_read1( bs ) == 0 &&
286
8.41M
           bs->p < bs->p_end && i < 31 )
287
8.32M
        i++;
288
289
5.04M
    return (1U << i) - 1 + bs_read( bs, i );
290
5.04M
}
Unexecuted instantiation: hevc.c:bs_read_ue
hevc_nal.c:bs_read_ue
Line
Count
Source
281
10.9M
{
282
10.9M
    unsigned i = 0;
283
284
37.5M
    while( !bs->b_error &&
285
36.3M
           bs_read1( bs ) == 0 &&
286
29.0M
           bs->p < bs->p_end && i < 31 )
287
26.6M
        i++;
288
289
10.9M
    return (1U << i) - 1 + bs_read( bs, i );
290
10.9M
}
Unexecuted instantiation: mlp.c:bs_read_ue
Unexecuted instantiation: mpeg4audio.c:bs_read_ue
Unexecuted instantiation: mpeg4video.c:bs_read_ue
Unexecuted instantiation: mpegvideo.c:bs_read_ue
Unexecuted instantiation: vc1.c:bs_read_ue
Unexecuted instantiation: av1.c:bs_read_ue
av1_obu.c:bs_read_ue
Line
Count
Source
281
416
{
282
416
    unsigned i = 0;
283
284
1.17k
    while( !bs->b_error &&
285
1.17k
           bs_read1( bs ) == 0 &&
286
764
           bs->p < bs->p_end && i < 31 )
287
757
        i++;
288
289
416
    return (1U << i) - 1 + bs_read( bs, i );
290
416
}
Unexecuted instantiation: ogg.c:bs_read_ue
Unexecuted instantiation: ts_psi.c:bs_read_ue
Unexecuted instantiation: mpeg4_iod.c:bs_read_ue
Unexecuted instantiation: cvdsub.c:bs_read_ue
Unexecuted instantiation: dvbsub.c:bs_read_ue
Unexecuted instantiation: scte27.c:bs_read_ue
Unexecuted instantiation: svcdsub.c:bs_read_ue
Unexecuted instantiation: flac.c:bs_read_ue
Unexecuted instantiation: dav1d.c:bs_read_ue
Unexecuted instantiation: faad.c:bs_read_ue
Unexecuted instantiation: video.c:bs_read_ue
291
292
/* Read signed Exp-Golomb code */
293
static inline int_fast32_t bs_read_se( bs_t *s )
294
4.88M
{
295
4.88M
    uint_fast32_t val = bs_read_ue( s );
296
297
4.88M
    return (val & 0x01) ? (int_fast32_t)((val + 1) / 2)
298
4.88M
                        : -(int_fast32_t)(val / 2);
299
4.88M
}
Unexecuted instantiation: avi.c:bs_read_se
Unexecuted instantiation: es.c:bs_read_se
Unexecuted instantiation: dts_header.c:bs_read_se
Unexecuted instantiation: h26x.c:bs_read_se
Unexecuted instantiation: mp4.c:bs_read_se
Unexecuted instantiation: ty.c:bs_read_se
Unexecuted instantiation: a52.c:bs_read_se
Unexecuted instantiation: copy.c:bs_read_se
Unexecuted instantiation: h264.c:bs_read_se
Unexecuted instantiation: hxxx_sei.c:bs_read_se
Unexecuted instantiation: hxxx_common.c:bs_read_se
h264_nal.c:bs_read_se
Line
Count
Source
294
2.03M
{
295
2.03M
    uint_fast32_t val = bs_read_ue( s );
296
297
2.03M
    return (val & 0x01) ? (int_fast32_t)((val + 1) / 2)
298
2.03M
                        : -(int_fast32_t)(val / 2);
299
2.03M
}
h264_slice.c:bs_read_se
Line
Count
Source
294
612k
{
295
612k
    uint_fast32_t val = bs_read_ue( s );
296
297
612k
    return (val & 0x01) ? (int_fast32_t)((val + 1) / 2)
298
612k
                        : -(int_fast32_t)(val / 2);
299
612k
}
Unexecuted instantiation: hevc.c:bs_read_se
hevc_nal.c:bs_read_se
Line
Count
Source
294
2.23M
{
295
2.23M
    uint_fast32_t val = bs_read_ue( s );
296
297
2.23M
    return (val & 0x01) ? (int_fast32_t)((val + 1) / 2)
298
2.23M
                        : -(int_fast32_t)(val / 2);
299
2.23M
}
Unexecuted instantiation: mlp.c:bs_read_se
Unexecuted instantiation: mpeg4audio.c:bs_read_se
Unexecuted instantiation: mpeg4video.c:bs_read_se
Unexecuted instantiation: mpegvideo.c:bs_read_se
Unexecuted instantiation: vc1.c:bs_read_se
Unexecuted instantiation: av1.c:bs_read_se
Unexecuted instantiation: av1_obu.c:bs_read_se
Unexecuted instantiation: ogg.c:bs_read_se
Unexecuted instantiation: ts_psi.c:bs_read_se
Unexecuted instantiation: mpeg4_iod.c:bs_read_se
Unexecuted instantiation: cvdsub.c:bs_read_se
Unexecuted instantiation: dvbsub.c:bs_read_se
Unexecuted instantiation: scte27.c:bs_read_se
Unexecuted instantiation: svcdsub.c:bs_read_se
Unexecuted instantiation: flac.c:bs_read_se
Unexecuted instantiation: dav1d.c:bs_read_se
Unexecuted instantiation: faad.c:bs_read_se
Unexecuted instantiation: video.c:bs_read_se
300
301
#undef bs_forward
302
303
#endif