Coverage Report

Created: 2025-11-16 07:20

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/ffmpeg/libavcodec/golomb.h
Line
Count
Source
1
/*
2
 * exp golomb vlc stuff
3
 * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>
4
 * Copyright (c) 2004 Alex Beregszaszi
5
 *
6
 * This file is part of FFmpeg.
7
 *
8
 * FFmpeg is free software; you can redistribute it and/or
9
 * modify it under the terms of the GNU Lesser General Public
10
 * License as published by the Free Software Foundation; either
11
 * version 2.1 of the License, or (at your option) any later version.
12
 *
13
 * FFmpeg is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
 * Lesser General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU Lesser General Public
19
 * License along with FFmpeg; if not, write to the Free Software
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
 */
22
23
/**
24
 * @file
25
 * @brief
26
 *     exp golomb vlc stuff
27
 * @author Michael Niedermayer <michaelni@gmx.at> and Alex Beregszaszi
28
 */
29
30
#ifndef AVCODEC_GOLOMB_H
31
#define AVCODEC_GOLOMB_H
32
33
#include <stdint.h>
34
35
#include "get_bits.h"
36
37
2.75M
#define INVALID_VLC           0x80000000
38
39
extern const uint8_t ff_golomb_vlc_len[512];
40
extern const uint8_t ff_ue_golomb_vlc_code[512];
41
extern const  int8_t ff_se_golomb_vlc_code[512];
42
43
extern const uint8_t ff_interleaved_golomb_vlc_len[256];
44
extern const uint8_t ff_interleaved_ue_golomb_vlc_code[256];
45
extern const  int8_t ff_interleaved_se_golomb_vlc_code[256];
46
extern const uint8_t ff_interleaved_dirac_golomb_vlc_code[256];
47
48
/**
49
 * Read an unsigned Exp-Golomb code in the range 0 to 8190.
50
 *
51
 * @returns the read value or a negative error code.
52
 */
53
static inline int get_ue_golomb(GetBitContext *gb)
54
80.2M
{
55
80.2M
    unsigned int buf;
56
57
#if CACHED_BITSTREAM_READER
58
    buf = show_bits_long(gb, 32);
59
60
    if (buf >= (1 << 27)) {
61
        buf >>= 32 - 9;
62
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
63
64
        return ff_ue_golomb_vlc_code[buf];
65
    } else {
66
        int log = 2 * av_log2(buf) - 31;
67
68
        skip_bits_long(gb, 32 - log);
69
        if (log < 7)
70
            return AVERROR_INVALIDDATA;
71
        buf >>= log;
72
        buf--;
73
74
        return buf;
75
    }
76
#else
77
80.2M
    OPEN_READER(re, gb);
78
80.2M
    UPDATE_CACHE(re, gb);
79
80.2M
    buf = GET_CACHE(re, gb);
80
81
80.2M
    if (buf >= (1 << 27)) {
82
76.5M
        buf >>= 32 - 9;
83
76.5M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
76.5M
        CLOSE_READER(re, gb);
85
86
76.5M
        return ff_ue_golomb_vlc_code[buf];
87
76.5M
    } else {
88
3.69M
        int log = 2 * av_log2(buf) - 31;
89
3.69M
        LAST_SKIP_BITS(re, gb, 32 - log);
90
3.69M
        CLOSE_READER(re, gb);
91
3.69M
        if (log < 7)
92
1.77M
            return AVERROR_INVALIDDATA;
93
1.92M
        buf >>= log;
94
1.92M
        buf--;
95
96
1.92M
        return buf;
97
3.69M
    }
98
80.2M
#endif
99
80.2M
}
dovi_rpudec.c:get_ue_golomb
Line
Count
Source
54
6.74k
{
55
6.74k
    unsigned int buf;
56
57
#if CACHED_BITSTREAM_READER
58
    buf = show_bits_long(gb, 32);
59
60
    if (buf >= (1 << 27)) {
61
        buf >>= 32 - 9;
62
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
63
64
        return ff_ue_golomb_vlc_code[buf];
65
    } else {
66
        int log = 2 * av_log2(buf) - 31;
67
68
        skip_bits_long(gb, 32 - log);
69
        if (log < 7)
70
            return AVERROR_INVALIDDATA;
71
        buf >>= log;
72
        buf--;
73
74
        return buf;
75
    }
76
#else
77
6.74k
    OPEN_READER(re, gb);
78
6.74k
    UPDATE_CACHE(re, gb);
79
6.74k
    buf = GET_CACHE(re, gb);
80
81
6.74k
    if (buf >= (1 << 27)) {
82
6.55k
        buf >>= 32 - 9;
83
6.55k
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
6.55k
        CLOSE_READER(re, gb);
85
86
6.55k
        return ff_ue_golomb_vlc_code[buf];
87
6.55k
    } else {
88
185
        int log = 2 * av_log2(buf) - 31;
89
185
        LAST_SKIP_BITS(re, gb, 32 - log);
90
185
        CLOSE_READER(re, gb);
91
185
        if (log < 7)
92
160
            return AVERROR_INVALIDDATA;
93
25
        buf >>= log;
94
25
        buf--;
95
96
25
        return buf;
97
185
    }
98
6.74k
#endif
99
6.74k
}
Unexecuted instantiation: evc_parse.c:get_ue_golomb
evc_ps.c:get_ue_golomb
Line
Count
Source
54
1.38M
{
55
1.38M
    unsigned int buf;
56
57
#if CACHED_BITSTREAM_READER
58
    buf = show_bits_long(gb, 32);
59
60
    if (buf >= (1 << 27)) {
61
        buf >>= 32 - 9;
62
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
63
64
        return ff_ue_golomb_vlc_code[buf];
65
    } else {
66
        int log = 2 * av_log2(buf) - 31;
67
68
        skip_bits_long(gb, 32 - log);
69
        if (log < 7)
70
            return AVERROR_INVALIDDATA;
71
        buf >>= log;
72
        buf--;
73
74
        return buf;
75
    }
76
#else
77
1.38M
    OPEN_READER(re, gb);
78
1.38M
    UPDATE_CACHE(re, gb);
79
1.38M
    buf = GET_CACHE(re, gb);
80
81
1.38M
    if (buf >= (1 << 27)) {
82
1.23M
        buf >>= 32 - 9;
83
1.23M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
1.23M
        CLOSE_READER(re, gb);
85
86
1.23M
        return ff_ue_golomb_vlc_code[buf];
87
1.23M
    } else {
88
158k
        int log = 2 * av_log2(buf) - 31;
89
158k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
158k
        CLOSE_READER(re, gb);
91
158k
        if (log < 7)
92
81.7k
            return AVERROR_INVALIDDATA;
93
77.0k
        buf >>= log;
94
77.0k
        buf--;
95
96
77.0k
        return buf;
97
158k
    }
98
1.38M
#endif
99
1.38M
}
h264_parse.c:get_ue_golomb
Line
Count
Source
54
2.57M
{
55
2.57M
    unsigned int buf;
56
57
#if CACHED_BITSTREAM_READER
58
    buf = show_bits_long(gb, 32);
59
60
    if (buf >= (1 << 27)) {
61
        buf >>= 32 - 9;
62
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
63
64
        return ff_ue_golomb_vlc_code[buf];
65
    } else {
66
        int log = 2 * av_log2(buf) - 31;
67
68
        skip_bits_long(gb, 32 - log);
69
        if (log < 7)
70
            return AVERROR_INVALIDDATA;
71
        buf >>= log;
72
        buf--;
73
74
        return buf;
75
    }
76
#else
77
2.57M
    OPEN_READER(re, gb);
78
2.57M
    UPDATE_CACHE(re, gb);
79
2.57M
    buf = GET_CACHE(re, gb);
80
81
2.57M
    if (buf >= (1 << 27)) {
82
2.41M
        buf >>= 32 - 9;
83
2.41M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
2.41M
        CLOSE_READER(re, gb);
85
86
2.41M
        return ff_ue_golomb_vlc_code[buf];
87
2.41M
    } else {
88
152k
        int log = 2 * av_log2(buf) - 31;
89
152k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
152k
        CLOSE_READER(re, gb);
91
152k
        if (log < 7)
92
96.8k
            return AVERROR_INVALIDDATA;
93
55.9k
        buf >>= log;
94
55.9k
        buf--;
95
96
55.9k
        return buf;
97
152k
    }
98
2.57M
#endif
99
2.57M
}
h264_ps.c:get_ue_golomb
Line
Count
Source
54
15.0M
{
55
15.0M
    unsigned int buf;
56
57
#if CACHED_BITSTREAM_READER
58
    buf = show_bits_long(gb, 32);
59
60
    if (buf >= (1 << 27)) {
61
        buf >>= 32 - 9;
62
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
63
64
        return ff_ue_golomb_vlc_code[buf];
65
    } else {
66
        int log = 2 * av_log2(buf) - 31;
67
68
        skip_bits_long(gb, 32 - log);
69
        if (log < 7)
70
            return AVERROR_INVALIDDATA;
71
        buf >>= log;
72
        buf--;
73
74
        return buf;
75
    }
76
#else
77
15.0M
    OPEN_READER(re, gb);
78
15.0M
    UPDATE_CACHE(re, gb);
79
15.0M
    buf = GET_CACHE(re, gb);
80
81
15.0M
    if (buf >= (1 << 27)) {
82
14.0M
        buf >>= 32 - 9;
83
14.0M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
14.0M
        CLOSE_READER(re, gb);
85
86
14.0M
        return ff_ue_golomb_vlc_code[buf];
87
14.0M
    } else {
88
1.01M
        int log = 2 * av_log2(buf) - 31;
89
1.01M
        LAST_SKIP_BITS(re, gb, 32 - log);
90
1.01M
        CLOSE_READER(re, gb);
91
1.01M
        if (log < 7)
92
502k
            return AVERROR_INVALIDDATA;
93
514k
        buf >>= log;
94
514k
        buf--;
95
96
514k
        return buf;
97
1.01M
    }
98
15.0M
#endif
99
15.0M
}
ps.c:get_ue_golomb
Line
Count
Source
54
1.40M
{
55
1.40M
    unsigned int buf;
56
57
#if CACHED_BITSTREAM_READER
58
    buf = show_bits_long(gb, 32);
59
60
    if (buf >= (1 << 27)) {
61
        buf >>= 32 - 9;
62
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
63
64
        return ff_ue_golomb_vlc_code[buf];
65
    } else {
66
        int log = 2 * av_log2(buf) - 31;
67
68
        skip_bits_long(gb, 32 - log);
69
        if (log < 7)
70
            return AVERROR_INVALIDDATA;
71
        buf >>= log;
72
        buf--;
73
74
        return buf;
75
    }
76
#else
77
1.40M
    OPEN_READER(re, gb);
78
1.40M
    UPDATE_CACHE(re, gb);
79
1.40M
    buf = GET_CACHE(re, gb);
80
81
1.40M
    if (buf >= (1 << 27)) {
82
1.21M
        buf >>= 32 - 9;
83
1.21M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
1.21M
        CLOSE_READER(re, gb);
85
86
1.21M
        return ff_ue_golomb_vlc_code[buf];
87
1.21M
    } else {
88
189k
        int log = 2 * av_log2(buf) - 31;
89
189k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
189k
        CLOSE_READER(re, gb);
91
189k
        if (log < 7)
92
102k
            return AVERROR_INVALIDDATA;
93
87.2k
        buf >>= log;
94
87.2k
        buf--;
95
96
87.2k
        return buf;
97
189k
    }
98
1.40M
#endif
99
1.40M
}
Unexecuted instantiation: h2645_vui.c:get_ue_golomb
h264_parser.c:get_ue_golomb
Line
Count
Source
54
6.15M
{
55
6.15M
    unsigned int buf;
56
57
#if CACHED_BITSTREAM_READER
58
    buf = show_bits_long(gb, 32);
59
60
    if (buf >= (1 << 27)) {
61
        buf >>= 32 - 9;
62
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
63
64
        return ff_ue_golomb_vlc_code[buf];
65
    } else {
66
        int log = 2 * av_log2(buf) - 31;
67
68
        skip_bits_long(gb, 32 - log);
69
        if (log < 7)
70
            return AVERROR_INVALIDDATA;
71
        buf >>= log;
72
        buf--;
73
74
        return buf;
75
    }
76
#else
77
6.15M
    OPEN_READER(re, gb);
78
6.15M
    UPDATE_CACHE(re, gb);
79
6.15M
    buf = GET_CACHE(re, gb);
80
81
6.15M
    if (buf >= (1 << 27)) {
82
5.47M
        buf >>= 32 - 9;
83
5.47M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
5.47M
        CLOSE_READER(re, gb);
85
86
5.47M
        return ff_ue_golomb_vlc_code[buf];
87
5.47M
    } else {
88
675k
        int log = 2 * av_log2(buf) - 31;
89
675k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
675k
        CLOSE_READER(re, gb);
91
675k
        if (log < 7)
92
197k
            return AVERROR_INVALIDDATA;
93
477k
        buf >>= log;
94
477k
        buf--;
95
96
477k
        return buf;
97
675k
    }
98
6.15M
#endif
99
6.15M
}
Unexecuted instantiation: h264_sei.c:get_ue_golomb
parser.c:get_ue_golomb
Line
Count
Source
54
493k
{
55
493k
    unsigned int buf;
56
57
#if CACHED_BITSTREAM_READER
58
    buf = show_bits_long(gb, 32);
59
60
    if (buf >= (1 << 27)) {
61
        buf >>= 32 - 9;
62
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
63
64
        return ff_ue_golomb_vlc_code[buf];
65
    } else {
66
        int log = 2 * av_log2(buf) - 31;
67
68
        skip_bits_long(gb, 32 - log);
69
        if (log < 7)
70
            return AVERROR_INVALIDDATA;
71
        buf >>= log;
72
        buf--;
73
74
        return buf;
75
    }
76
#else
77
493k
    OPEN_READER(re, gb);
78
493k
    UPDATE_CACHE(re, gb);
79
493k
    buf = GET_CACHE(re, gb);
80
81
493k
    if (buf >= (1 << 27)) {
82
469k
        buf >>= 32 - 9;
83
469k
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
469k
        CLOSE_READER(re, gb);
85
86
469k
        return ff_ue_golomb_vlc_code[buf];
87
469k
    } else {
88
23.2k
        int log = 2 * av_log2(buf) - 31;
89
23.2k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
23.2k
        CLOSE_READER(re, gb);
91
23.2k
        if (log < 7)
92
5.71k
            return AVERROR_INVALIDDATA;
93
17.5k
        buf >>= log;
94
17.5k
        buf--;
95
96
17.5k
        return buf;
97
23.2k
    }
98
493k
#endif
99
493k
}
sei.c:get_ue_golomb
Line
Count
Source
54
556k
{
55
556k
    unsigned int buf;
56
57
#if CACHED_BITSTREAM_READER
58
    buf = show_bits_long(gb, 32);
59
60
    if (buf >= (1 << 27)) {
61
        buf >>= 32 - 9;
62
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
63
64
        return ff_ue_golomb_vlc_code[buf];
65
    } else {
66
        int log = 2 * av_log2(buf) - 31;
67
68
        skip_bits_long(gb, 32 - log);
69
        if (log < 7)
70
            return AVERROR_INVALIDDATA;
71
        buf >>= log;
72
        buf--;
73
74
        return buf;
75
    }
76
#else
77
556k
    OPEN_READER(re, gb);
78
556k
    UPDATE_CACHE(re, gb);
79
556k
    buf = GET_CACHE(re, gb);
80
81
556k
    if (buf >= (1 << 27)) {
82
273k
        buf >>= 32 - 9;
83
273k
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
273k
        CLOSE_READER(re, gb);
85
86
273k
        return ff_ue_golomb_vlc_code[buf];
87
282k
    } else {
88
282k
        int log = 2 * av_log2(buf) - 31;
89
282k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
282k
        CLOSE_READER(re, gb);
91
282k
        if (log < 7)
92
102k
            return AVERROR_INVALIDDATA;
93
180k
        buf >>= log;
94
180k
        buf--;
95
96
180k
        return buf;
97
282k
    }
98
556k
#endif
99
556k
}
Unexecuted instantiation: h2645_sei.c:get_ue_golomb
Unexecuted instantiation: h264dec.c:get_ue_golomb
Unexecuted instantiation: shortendec.c:get_ue_golomb
Unexecuted instantiation: dirac.c:get_ue_golomb
Unexecuted instantiation: diracdec.c:get_ue_golomb
Unexecuted instantiation: jpeglsdec.c:get_ue_golomb
h264_cavlc.c:get_ue_golomb
Line
Count
Source
54
3.76M
{
55
3.76M
    unsigned int buf;
56
57
#if CACHED_BITSTREAM_READER
58
    buf = show_bits_long(gb, 32);
59
60
    if (buf >= (1 << 27)) {
61
        buf >>= 32 - 9;
62
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
63
64
        return ff_ue_golomb_vlc_code[buf];
65
    } else {
66
        int log = 2 * av_log2(buf) - 31;
67
68
        skip_bits_long(gb, 32 - log);
69
        if (log < 7)
70
            return AVERROR_INVALIDDATA;
71
        buf >>= log;
72
        buf--;
73
74
        return buf;
75
    }
76
#else
77
3.76M
    OPEN_READER(re, gb);
78
3.76M
    UPDATE_CACHE(re, gb);
79
3.76M
    buf = GET_CACHE(re, gb);
80
81
3.76M
    if (buf >= (1 << 27)) {
82
3.59M
        buf >>= 32 - 9;
83
3.59M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
3.59M
        CLOSE_READER(re, gb);
85
86
3.59M
        return ff_ue_golomb_vlc_code[buf];
87
3.59M
    } else {
88
164k
        int log = 2 * av_log2(buf) - 31;
89
164k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
164k
        CLOSE_READER(re, gb);
91
164k
        if (log < 7)
92
104k
            return AVERROR_INVALIDDATA;
93
60.1k
        buf >>= log;
94
60.1k
        buf--;
95
96
60.1k
        return buf;
97
164k
    }
98
3.76M
#endif
99
3.76M
}
Unexecuted instantiation: h264_refs.c:get_ue_golomb
h264_slice.c:get_ue_golomb
Line
Count
Source
54
3.15M
{
55
3.15M
    unsigned int buf;
56
57
#if CACHED_BITSTREAM_READER
58
    buf = show_bits_long(gb, 32);
59
60
    if (buf >= (1 << 27)) {
61
        buf >>= 32 - 9;
62
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
63
64
        return ff_ue_golomb_vlc_code[buf];
65
    } else {
66
        int log = 2 * av_log2(buf) - 31;
67
68
        skip_bits_long(gb, 32 - log);
69
        if (log < 7)
70
            return AVERROR_INVALIDDATA;
71
        buf >>= log;
72
        buf--;
73
74
        return buf;
75
    }
76
#else
77
3.15M
    OPEN_READER(re, gb);
78
3.15M
    UPDATE_CACHE(re, gb);
79
3.15M
    buf = GET_CACHE(re, gb);
80
81
3.15M
    if (buf >= (1 << 27)) {
82
3.07M
        buf >>= 32 - 9;
83
3.07M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
3.07M
        CLOSE_READER(re, gb);
85
86
3.07M
        return ff_ue_golomb_vlc_code[buf];
87
3.07M
    } else {
88
87.2k
        int log = 2 * av_log2(buf) - 31;
89
87.2k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
87.2k
        CLOSE_READER(re, gb);
91
87.2k
        if (log < 7)
92
50.5k
            return AVERROR_INVALIDDATA;
93
36.6k
        buf >>= log;
94
36.6k
        buf--;
95
96
36.6k
        return buf;
97
87.2k
    }
98
3.15M
#endif
99
3.15M
}
Unexecuted instantiation: vmixdec.c:get_ue_golomb
Unexecuted instantiation: rv30.c:get_ue_golomb
Unexecuted instantiation: rv34.c:get_ue_golomb
Unexecuted instantiation: loco.c:get_ue_golomb
ralf.c:get_ue_golomb
Line
Count
Source
54
1.60M
{
55
1.60M
    unsigned int buf;
56
57
#if CACHED_BITSTREAM_READER
58
    buf = show_bits_long(gb, 32);
59
60
    if (buf >= (1 << 27)) {
61
        buf >>= 32 - 9;
62
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
63
64
        return ff_ue_golomb_vlc_code[buf];
65
    } else {
66
        int log = 2 * av_log2(buf) - 31;
67
68
        skip_bits_long(gb, 32 - log);
69
        if (log < 7)
70
            return AVERROR_INVALIDDATA;
71
        buf >>= log;
72
        buf--;
73
74
        return buf;
75
    }
76
#else
77
1.60M
    OPEN_READER(re, gb);
78
1.60M
    UPDATE_CACHE(re, gb);
79
1.60M
    buf = GET_CACHE(re, gb);
80
81
1.60M
    if (buf >= (1 << 27)) {
82
1.41M
        buf >>= 32 - 9;
83
1.41M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
1.41M
        CLOSE_READER(re, gb);
85
86
1.41M
        return ff_ue_golomb_vlc_code[buf];
87
1.41M
    } else {
88
181k
        int log = 2 * av_log2(buf) - 31;
89
181k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
181k
        CLOSE_READER(re, gb);
91
181k
        if (log < 7)
92
159k
            return AVERROR_INVALIDDATA;
93
21.6k
        buf >>= log;
94
21.6k
        buf--;
95
96
21.6k
        return buf;
97
181k
    }
98
1.60M
#endif
99
1.60M
}
cavsdec.c:get_ue_golomb
Line
Count
Source
54
39.2M
{
55
39.2M
    unsigned int buf;
56
57
#if CACHED_BITSTREAM_READER
58
    buf = show_bits_long(gb, 32);
59
60
    if (buf >= (1 << 27)) {
61
        buf >>= 32 - 9;
62
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
63
64
        return ff_ue_golomb_vlc_code[buf];
65
    } else {
66
        int log = 2 * av_log2(buf) - 31;
67
68
        skip_bits_long(gb, 32 - log);
69
        if (log < 7)
70
            return AVERROR_INVALIDDATA;
71
        buf >>= log;
72
        buf--;
73
74
        return buf;
75
    }
76
#else
77
39.2M
    OPEN_READER(re, gb);
78
39.2M
    UPDATE_CACHE(re, gb);
79
39.2M
    buf = GET_CACHE(re, gb);
80
81
39.2M
    if (buf >= (1 << 27)) {
82
38.5M
        buf >>= 32 - 9;
83
38.5M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
38.5M
        CLOSE_READER(re, gb);
85
86
38.5M
        return ff_ue_golomb_vlc_code[buf];
87
38.5M
    } else {
88
731k
        int log = 2 * av_log2(buf) - 31;
89
731k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
731k
        CLOSE_READER(re, gb);
91
731k
        if (log < 7)
92
365k
            return AVERROR_INVALIDDATA;
93
366k
        buf >>= log;
94
366k
        buf--;
95
96
366k
        return buf;
97
731k
    }
98
39.2M
#endif
99
39.2M
}
Unexecuted instantiation: cavs.c:get_ue_golomb
Unexecuted instantiation: hevcdec.c:get_ue_golomb
mobiclip.c:get_ue_golomb
Line
Count
Source
54
3.71M
{
55
3.71M
    unsigned int buf;
56
57
#if CACHED_BITSTREAM_READER
58
    buf = show_bits_long(gb, 32);
59
60
    if (buf >= (1 << 27)) {
61
        buf >>= 32 - 9;
62
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
63
64
        return ff_ue_golomb_vlc_code[buf];
65
    } else {
66
        int log = 2 * av_log2(buf) - 31;
67
68
        skip_bits_long(gb, 32 - log);
69
        if (log < 7)
70
            return AVERROR_INVALIDDATA;
71
        buf >>= log;
72
        buf--;
73
74
        return buf;
75
    }
76
#else
77
3.71M
    OPEN_READER(re, gb);
78
3.71M
    UPDATE_CACHE(re, gb);
79
3.71M
    buf = GET_CACHE(re, gb);
80
81
3.71M
    if (buf >= (1 << 27)) {
82
3.70M
        buf >>= 32 - 9;
83
3.70M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
3.70M
        CLOSE_READER(re, gb);
85
86
3.70M
        return ff_ue_golomb_vlc_code[buf];
87
3.70M
    } else {
88
4.82k
        int log = 2 * av_log2(buf) - 31;
89
4.82k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
4.82k
        CLOSE_READER(re, gb);
91
4.82k
        if (log < 7)
92
2.68k
            return AVERROR_INVALIDDATA;
93
2.13k
        buf >>= log;
94
2.13k
        buf--;
95
96
2.13k
        return buf;
97
4.82k
    }
98
3.71M
#endif
99
3.71M
}
Unexecuted instantiation: sonic.c:get_ue_golomb
Unexecuted instantiation: ffv1dec.c:get_ue_golomb
Unexecuted instantiation: rv40.c:get_ue_golomb
aic.c:get_ue_golomb
Line
Count
Source
54
1.09M
{
55
1.09M
    unsigned int buf;
56
57
#if CACHED_BITSTREAM_READER
58
    buf = show_bits_long(gb, 32);
59
60
    if (buf >= (1 << 27)) {
61
        buf >>= 32 - 9;
62
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
63
64
        return ff_ue_golomb_vlc_code[buf];
65
    } else {
66
        int log = 2 * av_log2(buf) - 31;
67
68
        skip_bits_long(gb, 32 - log);
69
        if (log < 7)
70
            return AVERROR_INVALIDDATA;
71
        buf >>= log;
72
        buf--;
73
74
        return buf;
75
    }
76
#else
77
1.09M
    OPEN_READER(re, gb);
78
1.09M
    UPDATE_CACHE(re, gb);
79
1.09M
    buf = GET_CACHE(re, gb);
80
81
1.09M
    if (buf >= (1 << 27)) {
82
1.06M
        buf >>= 32 - 9;
83
1.06M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
1.06M
        CLOSE_READER(re, gb);
85
86
1.06M
        return ff_ue_golomb_vlc_code[buf];
87
1.06M
    } else {
88
27.9k
        int log = 2 * av_log2(buf) - 31;
89
27.9k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
27.9k
        CLOSE_READER(re, gb);
91
27.9k
        if (log < 7)
92
1.03k
            return AVERROR_INVALIDDATA;
93
26.9k
        buf >>= log;
94
26.9k
        buf--;
95
96
26.9k
        return buf;
97
27.9k
    }
98
1.09M
#endif
99
1.09M
}
Unexecuted instantiation: shorten.c:get_ue_golomb
Unexecuted instantiation: rv60dec.c:get_ue_golomb
Unexecuted instantiation: flacdec.c:get_ue_golomb
Unexecuted instantiation: fic.c:get_ue_golomb
Unexecuted instantiation: svq3.c:get_ue_golomb
Unexecuted instantiation: dstdec.c:get_ue_golomb
100
101
/**
102
 * Read an unsigned Exp-Golomb code in the range 0 to UINT32_MAX-1.
103
 */
104
static inline unsigned get_ue_golomb_long(GetBitContext *gb)
105
124M
{
106
124M
    unsigned buf, log;
107
108
124M
    buf = show_bits_long(gb, 32);
109
124M
    log = 31 - av_log2(buf);
110
124M
    skip_bits_long(gb, log);
111
112
124M
    return get_bits_long(gb, log + 1) - 1;
113
124M
}
dovi_rpudec.c:get_ue_golomb_long
Line
Count
Source
105
27.4k
{
106
27.4k
    unsigned buf, log;
107
108
27.4k
    buf = show_bits_long(gb, 32);
109
27.4k
    log = 31 - av_log2(buf);
110
27.4k
    skip_bits_long(gb, log);
111
112
27.4k
    return get_bits_long(gb, log + 1) - 1;
113
27.4k
}
evc_parse.c:get_ue_golomb_long
Line
Count
Source
105
451k
{
106
451k
    unsigned buf, log;
107
108
451k
    buf = show_bits_long(gb, 32);
109
451k
    log = 31 - av_log2(buf);
110
451k
    skip_bits_long(gb, log);
111
112
451k
    return get_bits_long(gb, log + 1) - 1;
113
451k
}
evc_ps.c:get_ue_golomb_long
Line
Count
Source
105
2.50M
{
106
2.50M
    unsigned buf, log;
107
108
2.50M
    buf = show_bits_long(gb, 32);
109
2.50M
    log = 31 - av_log2(buf);
110
2.50M
    skip_bits_long(gb, log);
111
112
2.50M
    return get_bits_long(gb, log + 1) - 1;
113
2.50M
}
Unexecuted instantiation: h264_parse.c:get_ue_golomb_long
h264_ps.c:get_ue_golomb_long
Line
Count
Source
105
9.46M
{
106
9.46M
    unsigned buf, log;
107
108
9.46M
    buf = show_bits_long(gb, 32);
109
9.46M
    log = 31 - av_log2(buf);
110
9.46M
    skip_bits_long(gb, log);
111
112
9.46M
    return get_bits_long(gb, log + 1) - 1;
113
9.46M
}
ps.c:get_ue_golomb_long
Line
Count
Source
105
57.6M
{
106
57.6M
    unsigned buf, log;
107
108
57.6M
    buf = show_bits_long(gb, 32);
109
57.6M
    log = 31 - av_log2(buf);
110
57.6M
    skip_bits_long(gb, log);
111
112
57.6M
    return get_bits_long(gb, log + 1) - 1;
113
57.6M
}
Unexecuted instantiation: h2645_vui.c:get_ue_golomb_long
h264_parser.c:get_ue_golomb_long
Line
Count
Source
105
24.7M
{
106
24.7M
    unsigned buf, log;
107
108
24.7M
    buf = show_bits_long(gb, 32);
109
24.7M
    log = 31 - av_log2(buf);
110
24.7M
    skip_bits_long(gb, log);
111
112
24.7M
    return get_bits_long(gb, log + 1) - 1;
113
24.7M
}
h264_sei.c:get_ue_golomb_long
Line
Count
Source
105
143k
{
106
143k
    unsigned buf, log;
107
108
143k
    buf = show_bits_long(gb, 32);
109
143k
    log = 31 - av_log2(buf);
110
143k
    skip_bits_long(gb, log);
111
112
143k
    return get_bits_long(gb, log + 1) - 1;
113
143k
}
Unexecuted instantiation: parser.c:get_ue_golomb_long
sei.c:get_ue_golomb_long
Line
Count
Source
105
43.4k
{
106
43.4k
    unsigned buf, log;
107
108
43.4k
    buf = show_bits_long(gb, 32);
109
43.4k
    log = 31 - av_log2(buf);
110
43.4k
    skip_bits_long(gb, log);
111
112
43.4k
    return get_bits_long(gb, log + 1) - 1;
113
43.4k
}
h2645_sei.c:get_ue_golomb_long
Line
Count
Source
105
19.9M
{
106
19.9M
    unsigned buf, log;
107
108
19.9M
    buf = show_bits_long(gb, 32);
109
19.9M
    log = 31 - av_log2(buf);
110
19.9M
    skip_bits_long(gb, log);
111
112
19.9M
    return get_bits_long(gb, log + 1) - 1;
113
19.9M
}
h264dec.c:get_ue_golomb_long
Line
Count
Source
105
1.59M
{
106
1.59M
    unsigned buf, log;
107
108
1.59M
    buf = show_bits_long(gb, 32);
109
1.59M
    log = 31 - av_log2(buf);
110
1.59M
    skip_bits_long(gb, log);
111
112
1.59M
    return get_bits_long(gb, log + 1) - 1;
113
1.59M
}
Unexecuted instantiation: shortendec.c:get_ue_golomb_long
Unexecuted instantiation: dirac.c:get_ue_golomb_long
Unexecuted instantiation: diracdec.c:get_ue_golomb_long
Unexecuted instantiation: jpeglsdec.c:get_ue_golomb_long
h264_cavlc.c:get_ue_golomb_long
Line
Count
Source
105
1.71M
{
106
1.71M
    unsigned buf, log;
107
108
1.71M
    buf = show_bits_long(gb, 32);
109
1.71M
    log = 31 - av_log2(buf);
110
1.71M
    skip_bits_long(gb, log);
111
112
1.71M
    return get_bits_long(gb, log + 1) - 1;
113
1.71M
}
h264_refs.c:get_ue_golomb_long
Line
Count
Source
105
739k
{
106
739k
    unsigned buf, log;
107
108
739k
    buf = show_bits_long(gb, 32);
109
739k
    log = 31 - av_log2(buf);
110
739k
    skip_bits_long(gb, log);
111
112
739k
    return get_bits_long(gb, log + 1) - 1;
113
739k
}
h264_slice.c:get_ue_golomb_long
Line
Count
Source
105
3.98M
{
106
3.98M
    unsigned buf, log;
107
108
3.98M
    buf = show_bits_long(gb, 32);
109
3.98M
    log = 31 - av_log2(buf);
110
3.98M
    skip_bits_long(gb, log);
111
112
3.98M
    return get_bits_long(gb, log + 1) - 1;
113
3.98M
}
vmixdec.c:get_ue_golomb_long
Line
Count
Source
105
974k
{
106
974k
    unsigned buf, log;
107
108
974k
    buf = show_bits_long(gb, 32);
109
974k
    log = 31 - av_log2(buf);
110
974k
    skip_bits_long(gb, log);
111
112
974k
    return get_bits_long(gb, log + 1) - 1;
113
974k
}
Unexecuted instantiation: rv30.c:get_ue_golomb_long
Unexecuted instantiation: rv34.c:get_ue_golomb_long
Unexecuted instantiation: loco.c:get_ue_golomb_long
Unexecuted instantiation: ralf.c:get_ue_golomb_long
Unexecuted instantiation: cavsdec.c:get_ue_golomb_long
Unexecuted instantiation: cavs.c:get_ue_golomb_long
hevcdec.c:get_ue_golomb_long
Line
Count
Source
105
955k
{
106
955k
    unsigned buf, log;
107
108
955k
    buf = show_bits_long(gb, 32);
109
955k
    log = 31 - av_log2(buf);
110
955k
    skip_bits_long(gb, log);
111
112
955k
    return get_bits_long(gb, log + 1) - 1;
113
955k
}
Unexecuted instantiation: mobiclip.c:get_ue_golomb_long
Unexecuted instantiation: sonic.c:get_ue_golomb_long
Unexecuted instantiation: ffv1dec.c:get_ue_golomb_long
Unexecuted instantiation: rv40.c:get_ue_golomb_long
Unexecuted instantiation: aic.c:get_ue_golomb_long
Unexecuted instantiation: shorten.c:get_ue_golomb_long
Unexecuted instantiation: rv60dec.c:get_ue_golomb_long
Unexecuted instantiation: flacdec.c:get_ue_golomb_long
Unexecuted instantiation: fic.c:get_ue_golomb_long
Unexecuted instantiation: svq3.c:get_ue_golomb_long
Unexecuted instantiation: dstdec.c:get_ue_golomb_long
114
115
/**
116
 * read unsigned exp golomb code, constraint to a max of 31.
117
 * If the value encountered is not in 0..31, the return value
118
 * is outside the range 0..30.
119
 */
120
static inline int get_ue_golomb_31(GetBitContext *gb)
121
47.1M
{
122
47.1M
    unsigned int buf;
123
124
#if CACHED_BITSTREAM_READER
125
    buf = show_bits_long(gb, 32);
126
127
    buf >>= 32 - 9;
128
    skip_bits_long(gb, ff_golomb_vlc_len[buf]);
129
#else
130
131
47.1M
    OPEN_READER(re, gb);
132
47.1M
    UPDATE_CACHE(re, gb);
133
47.1M
    buf = GET_CACHE(re, gb);
134
135
47.1M
    buf >>= 32 - 9;
136
47.1M
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
47.1M
    CLOSE_READER(re, gb);
138
47.1M
#endif
139
140
47.1M
    return ff_ue_golomb_vlc_code[buf];
141
47.1M
}
dovi_rpudec.c:get_ue_golomb_31
Line
Count
Source
121
83.7k
{
122
83.7k
    unsigned int buf;
123
124
#if CACHED_BITSTREAM_READER
125
    buf = show_bits_long(gb, 32);
126
127
    buf >>= 32 - 9;
128
    skip_bits_long(gb, ff_golomb_vlc_len[buf]);
129
#else
130
131
83.7k
    OPEN_READER(re, gb);
132
83.7k
    UPDATE_CACHE(re, gb);
133
83.7k
    buf = GET_CACHE(re, gb);
134
135
83.7k
    buf >>= 32 - 9;
136
83.7k
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
83.7k
    CLOSE_READER(re, gb);
138
83.7k
#endif
139
140
83.7k
    return ff_ue_golomb_vlc_code[buf];
141
83.7k
}
evc_parse.c:get_ue_golomb_31
Line
Count
Source
121
313k
{
122
313k
    unsigned int buf;
123
124
#if CACHED_BITSTREAM_READER
125
    buf = show_bits_long(gb, 32);
126
127
    buf >>= 32 - 9;
128
    skip_bits_long(gb, ff_golomb_vlc_len[buf]);
129
#else
130
131
313k
    OPEN_READER(re, gb);
132
313k
    UPDATE_CACHE(re, gb);
133
313k
    buf = GET_CACHE(re, gb);
134
135
313k
    buf >>= 32 - 9;
136
313k
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
313k
    CLOSE_READER(re, gb);
138
313k
#endif
139
140
313k
    return ff_ue_golomb_vlc_code[buf];
141
313k
}
evc_ps.c:get_ue_golomb_31
Line
Count
Source
121
837k
{
122
837k
    unsigned int buf;
123
124
#if CACHED_BITSTREAM_READER
125
    buf = show_bits_long(gb, 32);
126
127
    buf >>= 32 - 9;
128
    skip_bits_long(gb, ff_golomb_vlc_len[buf]);
129
#else
130
131
837k
    OPEN_READER(re, gb);
132
837k
    UPDATE_CACHE(re, gb);
133
837k
    buf = GET_CACHE(re, gb);
134
135
837k
    buf >>= 32 - 9;
136
837k
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
837k
    CLOSE_READER(re, gb);
138
837k
#endif
139
140
837k
    return ff_ue_golomb_vlc_code[buf];
141
837k
}
h264_parse.c:get_ue_golomb_31
Line
Count
Source
121
2.21M
{
122
2.21M
    unsigned int buf;
123
124
#if CACHED_BITSTREAM_READER
125
    buf = show_bits_long(gb, 32);
126
127
    buf >>= 32 - 9;
128
    skip_bits_long(gb, ff_golomb_vlc_len[buf]);
129
#else
130
131
2.21M
    OPEN_READER(re, gb);
132
2.21M
    UPDATE_CACHE(re, gb);
133
2.21M
    buf = GET_CACHE(re, gb);
134
135
2.21M
    buf >>= 32 - 9;
136
2.21M
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
2.21M
    CLOSE_READER(re, gb);
138
2.21M
#endif
139
140
2.21M
    return ff_ue_golomb_vlc_code[buf];
141
2.21M
}
h264_ps.c:get_ue_golomb_31
Line
Count
Source
121
19.0M
{
122
19.0M
    unsigned int buf;
123
124
#if CACHED_BITSTREAM_READER
125
    buf = show_bits_long(gb, 32);
126
127
    buf >>= 32 - 9;
128
    skip_bits_long(gb, ff_golomb_vlc_len[buf]);
129
#else
130
131
19.0M
    OPEN_READER(re, gb);
132
19.0M
    UPDATE_CACHE(re, gb);
133
19.0M
    buf = GET_CACHE(re, gb);
134
135
19.0M
    buf >>= 32 - 9;
136
19.0M
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
19.0M
    CLOSE_READER(re, gb);
138
19.0M
#endif
139
140
19.0M
    return ff_ue_golomb_vlc_code[buf];
141
19.0M
}
ps.c:get_ue_golomb_31
Line
Count
Source
121
2.71M
{
122
2.71M
    unsigned int buf;
123
124
#if CACHED_BITSTREAM_READER
125
    buf = show_bits_long(gb, 32);
126
127
    buf >>= 32 - 9;
128
    skip_bits_long(gb, ff_golomb_vlc_len[buf]);
129
#else
130
131
2.71M
    OPEN_READER(re, gb);
132
2.71M
    UPDATE_CACHE(re, gb);
133
2.71M
    buf = GET_CACHE(re, gb);
134
135
2.71M
    buf >>= 32 - 9;
136
2.71M
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
2.71M
    CLOSE_READER(re, gb);
138
2.71M
#endif
139
140
2.71M
    return ff_ue_golomb_vlc_code[buf];
141
2.71M
}
h2645_vui.c:get_ue_golomb_31
Line
Count
Source
121
1.18M
{
122
1.18M
    unsigned int buf;
123
124
#if CACHED_BITSTREAM_READER
125
    buf = show_bits_long(gb, 32);
126
127
    buf >>= 32 - 9;
128
    skip_bits_long(gb, ff_golomb_vlc_len[buf]);
129
#else
130
131
1.18M
    OPEN_READER(re, gb);
132
1.18M
    UPDATE_CACHE(re, gb);
133
1.18M
    buf = GET_CACHE(re, gb);
134
135
1.18M
    buf >>= 32 - 9;
136
1.18M
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
1.18M
    CLOSE_READER(re, gb);
138
1.18M
#endif
139
140
1.18M
    return ff_ue_golomb_vlc_code[buf];
141
1.18M
}
h264_parser.c:get_ue_golomb_31
Line
Count
Source
121
9.20M
{
122
9.20M
    unsigned int buf;
123
124
#if CACHED_BITSTREAM_READER
125
    buf = show_bits_long(gb, 32);
126
127
    buf >>= 32 - 9;
128
    skip_bits_long(gb, ff_golomb_vlc_len[buf]);
129
#else
130
131
9.20M
    OPEN_READER(re, gb);
132
9.20M
    UPDATE_CACHE(re, gb);
133
9.20M
    buf = GET_CACHE(re, gb);
134
135
9.20M
    buf >>= 32 - 9;
136
9.20M
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
9.20M
    CLOSE_READER(re, gb);
138
9.20M
#endif
139
140
9.20M
    return ff_ue_golomb_vlc_code[buf];
141
9.20M
}
h264_sei.c:get_ue_golomb_31
Line
Count
Source
121
270k
{
122
270k
    unsigned int buf;
123
124
#if CACHED_BITSTREAM_READER
125
    buf = show_bits_long(gb, 32);
126
127
    buf >>= 32 - 9;
128
    skip_bits_long(gb, ff_golomb_vlc_len[buf]);
129
#else
130
131
270k
    OPEN_READER(re, gb);
132
270k
    UPDATE_CACHE(re, gb);
133
270k
    buf = GET_CACHE(re, gb);
134
135
270k
    buf >>= 32 - 9;
136
270k
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
270k
    CLOSE_READER(re, gb);
138
270k
#endif
139
140
270k
    return ff_ue_golomb_vlc_code[buf];
141
270k
}
parser.c:get_ue_golomb_31
Line
Count
Source
121
273k
{
122
273k
    unsigned int buf;
123
124
#if CACHED_BITSTREAM_READER
125
    buf = show_bits_long(gb, 32);
126
127
    buf >>= 32 - 9;
128
    skip_bits_long(gb, ff_golomb_vlc_len[buf]);
129
#else
130
131
273k
    OPEN_READER(re, gb);
132
273k
    UPDATE_CACHE(re, gb);
133
273k
    buf = GET_CACHE(re, gb);
134
135
273k
    buf >>= 32 - 9;
136
273k
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
273k
    CLOSE_READER(re, gb);
138
273k
#endif
139
140
273k
    return ff_ue_golomb_vlc_code[buf];
141
273k
}
Unexecuted instantiation: sei.c:get_ue_golomb_31
Unexecuted instantiation: h2645_sei.c:get_ue_golomb_31
Unexecuted instantiation: h264dec.c:get_ue_golomb_31
Unexecuted instantiation: shortendec.c:get_ue_golomb_31
Unexecuted instantiation: dirac.c:get_ue_golomb_31
Unexecuted instantiation: diracdec.c:get_ue_golomb_31
Unexecuted instantiation: jpeglsdec.c:get_ue_golomb_31
Unexecuted instantiation: h264dec.c:get_ue_golomb_31
h264_cavlc.c:get_ue_golomb_31
Line
Count
Source
121
1.50M
{
122
1.50M
    unsigned int buf;
123
124
#if CACHED_BITSTREAM_READER
125
    buf = show_bits_long(gb, 32);
126
127
    buf >>= 32 - 9;
128
    skip_bits_long(gb, ff_golomb_vlc_len[buf]);
129
#else
130
131
1.50M
    OPEN_READER(re, gb);
132
1.50M
    UPDATE_CACHE(re, gb);
133
1.50M
    buf = GET_CACHE(re, gb);
134
135
1.50M
    buf >>= 32 - 9;
136
1.50M
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
1.50M
    CLOSE_READER(re, gb);
138
1.50M
#endif
139
140
1.50M
    return ff_ue_golomb_vlc_code[buf];
141
1.50M
}
h264_refs.c:get_ue_golomb_31
Line
Count
Source
121
3.43M
{
122
3.43M
    unsigned int buf;
123
124
#if CACHED_BITSTREAM_READER
125
    buf = show_bits_long(gb, 32);
126
127
    buf >>= 32 - 9;
128
    skip_bits_long(gb, ff_golomb_vlc_len[buf]);
129
#else
130
131
3.43M
    OPEN_READER(re, gb);
132
3.43M
    UPDATE_CACHE(re, gb);
133
3.43M
    buf = GET_CACHE(re, gb);
134
135
3.43M
    buf >>= 32 - 9;
136
3.43M
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
3.43M
    CLOSE_READER(re, gb);
138
3.43M
#endif
139
140
3.43M
    return ff_ue_golomb_vlc_code[buf];
141
3.43M
}
h264_slice.c:get_ue_golomb_31
Line
Count
Source
121
5.08M
{
122
5.08M
    unsigned int buf;
123
124
#if CACHED_BITSTREAM_READER
125
    buf = show_bits_long(gb, 32);
126
127
    buf >>= 32 - 9;
128
    skip_bits_long(gb, ff_golomb_vlc_len[buf]);
129
#else
130
131
5.08M
    OPEN_READER(re, gb);
132
5.08M
    UPDATE_CACHE(re, gb);
133
5.08M
    buf = GET_CACHE(re, gb);
134
135
5.08M
    buf >>= 32 - 9;
136
5.08M
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
5.08M
    CLOSE_READER(re, gb);
138
5.08M
#endif
139
140
5.08M
    return ff_ue_golomb_vlc_code[buf];
141
5.08M
}
Unexecuted instantiation: vmixdec.c:get_ue_golomb_31
Unexecuted instantiation: rv30.c:get_ue_golomb_31
Unexecuted instantiation: rv34.c:get_ue_golomb_31
Unexecuted instantiation: loco.c:get_ue_golomb_31
Unexecuted instantiation: ralf.c:get_ue_golomb_31
cavsdec.c:get_ue_golomb_31
Line
Count
Source
121
103k
{
122
103k
    unsigned int buf;
123
124
#if CACHED_BITSTREAM_READER
125
    buf = show_bits_long(gb, 32);
126
127
    buf >>= 32 - 9;
128
    skip_bits_long(gb, ff_golomb_vlc_len[buf]);
129
#else
130
131
103k
    OPEN_READER(re, gb);
132
103k
    UPDATE_CACHE(re, gb);
133
103k
    buf = GET_CACHE(re, gb);
134
135
103k
    buf >>= 32 - 9;
136
103k
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
103k
    CLOSE_READER(re, gb);
138
103k
#endif
139
140
103k
    return ff_ue_golomb_vlc_code[buf];
141
103k
}
Unexecuted instantiation: cavs.c:get_ue_golomb_31
hevcdec.c:get_ue_golomb_31
Line
Count
Source
121
106k
{
122
106k
    unsigned int buf;
123
124
#if CACHED_BITSTREAM_READER
125
    buf = show_bits_long(gb, 32);
126
127
    buf >>= 32 - 9;
128
    skip_bits_long(gb, ff_golomb_vlc_len[buf]);
129
#else
130
131
106k
    OPEN_READER(re, gb);
132
106k
    UPDATE_CACHE(re, gb);
133
106k
    buf = GET_CACHE(re, gb);
134
135
106k
    buf >>= 32 - 9;
136
106k
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
106k
    CLOSE_READER(re, gb);
138
106k
#endif
139
140
106k
    return ff_ue_golomb_vlc_code[buf];
141
106k
}
mobiclip.c:get_ue_golomb_31
Line
Count
Source
121
803k
{
122
803k
    unsigned int buf;
123
124
#if CACHED_BITSTREAM_READER
125
    buf = show_bits_long(gb, 32);
126
127
    buf >>= 32 - 9;
128
    skip_bits_long(gb, ff_golomb_vlc_len[buf]);
129
#else
130
131
803k
    OPEN_READER(re, gb);
132
803k
    UPDATE_CACHE(re, gb);
133
803k
    buf = GET_CACHE(re, gb);
134
135
803k
    buf >>= 32 - 9;
136
803k
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
803k
    CLOSE_READER(re, gb);
138
803k
#endif
139
140
803k
    return ff_ue_golomb_vlc_code[buf];
141
803k
}
Unexecuted instantiation: sonic.c:get_ue_golomb_31
Unexecuted instantiation: ffv1dec.c:get_ue_golomb_31
Unexecuted instantiation: rv40.c:get_ue_golomb_31
Unexecuted instantiation: aic.c:get_ue_golomb_31
Unexecuted instantiation: shorten.c:get_ue_golomb_31
Unexecuted instantiation: rv60dec.c:get_ue_golomb_31
Unexecuted instantiation: flacdec.c:get_ue_golomb_31
Unexecuted instantiation: fic.c:get_ue_golomb_31
Unexecuted instantiation: svq3.c:get_ue_golomb_31
Unexecuted instantiation: dstdec.c:get_ue_golomb_31
142
143
static inline unsigned get_interleaved_ue_golomb(GetBitContext *gb)
144
9.84M
{
145
9.84M
    uint32_t buf;
146
147
#if CACHED_BITSTREAM_READER
148
    buf = show_bits_long(gb, 32);
149
150
    if (buf & 0xAA800000) {
151
        buf >>= 32 - 8;
152
        skip_bits_long(gb, ff_interleaved_golomb_vlc_len[buf]);
153
154
        return ff_interleaved_ue_golomb_vlc_code[buf];
155
    } else {
156
        unsigned ret = 1;
157
158
        do {
159
            buf >>= 32 - 8;
160
            skip_bits_long(gb, FFMIN(ff_interleaved_golomb_vlc_len[buf], 8));
161
162
            if (ff_interleaved_golomb_vlc_len[buf] != 9) {
163
                ret <<= (ff_interleaved_golomb_vlc_len[buf] - 1) >> 1;
164
                ret  |= ff_interleaved_dirac_golomb_vlc_code[buf];
165
                break;
166
            }
167
            ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf];
168
            buf = show_bits_long(gb, 32);
169
        } while (get_bits_left(gb) > 0);
170
171
        return ret - 1;
172
    }
173
#else
174
9.84M
    OPEN_READER(re, gb);
175
9.84M
    UPDATE_CACHE(re, gb);
176
9.84M
    buf = GET_CACHE(re, gb);
177
178
9.84M
    if (buf & 0xAA800000) {
179
8.86M
        buf >>= 32 - 8;
180
8.86M
        LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
181
8.86M
        CLOSE_READER(re, gb);
182
183
8.86M
        return ff_interleaved_ue_golomb_vlc_code[buf];
184
8.86M
    } else {
185
984k
        unsigned ret = 1;
186
187
4.42M
        do {
188
4.42M
            buf >>= 32 - 8;
189
4.42M
            LAST_SKIP_BITS(re, gb,
190
4.42M
                           FFMIN(ff_interleaved_golomb_vlc_len[buf], 8));
191
192
4.42M
            if (ff_interleaved_golomb_vlc_len[buf] != 9) {
193
708k
                ret <<= (ff_interleaved_golomb_vlc_len[buf] - 1) >> 1;
194
708k
                ret  |= ff_interleaved_dirac_golomb_vlc_code[buf];
195
708k
                break;
196
708k
            }
197
3.71M
            ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf];
198
3.71M
            UPDATE_CACHE(re, gb);
199
3.71M
            buf = GET_CACHE(re, gb);
200
3.71M
        } while (ret<0x8000000U && BITS_AVAILABLE(re, gb));
201
202
984k
        CLOSE_READER(re, gb);
203
984k
        return ret - 1;
204
984k
    }
205
9.84M
#endif
206
9.84M
}
Unexecuted instantiation: dovi_rpudec.c:get_interleaved_ue_golomb
Unexecuted instantiation: evc_parse.c:get_interleaved_ue_golomb
Unexecuted instantiation: evc_ps.c:get_interleaved_ue_golomb
Unexecuted instantiation: h264_parse.c:get_interleaved_ue_golomb
Unexecuted instantiation: h264_ps.c:get_interleaved_ue_golomb
Unexecuted instantiation: ps.c:get_interleaved_ue_golomb
Unexecuted instantiation: h2645_vui.c:get_interleaved_ue_golomb
Unexecuted instantiation: h264_parser.c:get_interleaved_ue_golomb
Unexecuted instantiation: h264_sei.c:get_interleaved_ue_golomb
Unexecuted instantiation: parser.c:get_interleaved_ue_golomb
Unexecuted instantiation: sei.c:get_interleaved_ue_golomb
Unexecuted instantiation: h2645_sei.c:get_interleaved_ue_golomb
Unexecuted instantiation: h264dec.c:get_interleaved_ue_golomb
Unexecuted instantiation: shortendec.c:get_interleaved_ue_golomb
dirac.c:get_interleaved_ue_golomb
Line
Count
Source
144
340k
{
145
340k
    uint32_t buf;
146
147
#if CACHED_BITSTREAM_READER
148
    buf = show_bits_long(gb, 32);
149
150
    if (buf & 0xAA800000) {
151
        buf >>= 32 - 8;
152
        skip_bits_long(gb, ff_interleaved_golomb_vlc_len[buf]);
153
154
        return ff_interleaved_ue_golomb_vlc_code[buf];
155
    } else {
156
        unsigned ret = 1;
157
158
        do {
159
            buf >>= 32 - 8;
160
            skip_bits_long(gb, FFMIN(ff_interleaved_golomb_vlc_len[buf], 8));
161
162
            if (ff_interleaved_golomb_vlc_len[buf] != 9) {
163
                ret <<= (ff_interleaved_golomb_vlc_len[buf] - 1) >> 1;
164
                ret  |= ff_interleaved_dirac_golomb_vlc_code[buf];
165
                break;
166
            }
167
            ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf];
168
            buf = show_bits_long(gb, 32);
169
        } while (get_bits_left(gb) > 0);
170
171
        return ret - 1;
172
    }
173
#else
174
340k
    OPEN_READER(re, gb);
175
340k
    UPDATE_CACHE(re, gb);
176
340k
    buf = GET_CACHE(re, gb);
177
178
340k
    if (buf & 0xAA800000) {
179
292k
        buf >>= 32 - 8;
180
292k
        LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
181
292k
        CLOSE_READER(re, gb);
182
183
292k
        return ff_interleaved_ue_golomb_vlc_code[buf];
184
292k
    } else {
185
47.5k
        unsigned ret = 1;
186
187
138k
        do {
188
138k
            buf >>= 32 - 8;
189
138k
            LAST_SKIP_BITS(re, gb,
190
138k
                           FFMIN(ff_interleaved_golomb_vlc_len[buf], 8));
191
192
138k
            if (ff_interleaved_golomb_vlc_len[buf] != 9) {
193
23.4k
                ret <<= (ff_interleaved_golomb_vlc_len[buf] - 1) >> 1;
194
23.4k
                ret  |= ff_interleaved_dirac_golomb_vlc_code[buf];
195
23.4k
                break;
196
23.4k
            }
197
115k
            ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf];
198
115k
            UPDATE_CACHE(re, gb);
199
115k
            buf = GET_CACHE(re, gb);
200
115k
        } while (ret<0x8000000U && BITS_AVAILABLE(re, gb));
201
202
47.5k
        CLOSE_READER(re, gb);
203
47.5k
        return ret - 1;
204
47.5k
    }
205
340k
#endif
206
340k
}
diracdec.c:get_interleaved_ue_golomb
Line
Count
Source
144
2.90M
{
145
2.90M
    uint32_t buf;
146
147
#if CACHED_BITSTREAM_READER
148
    buf = show_bits_long(gb, 32);
149
150
    if (buf & 0xAA800000) {
151
        buf >>= 32 - 8;
152
        skip_bits_long(gb, ff_interleaved_golomb_vlc_len[buf]);
153
154
        return ff_interleaved_ue_golomb_vlc_code[buf];
155
    } else {
156
        unsigned ret = 1;
157
158
        do {
159
            buf >>= 32 - 8;
160
            skip_bits_long(gb, FFMIN(ff_interleaved_golomb_vlc_len[buf], 8));
161
162
            if (ff_interleaved_golomb_vlc_len[buf] != 9) {
163
                ret <<= (ff_interleaved_golomb_vlc_len[buf] - 1) >> 1;
164
                ret  |= ff_interleaved_dirac_golomb_vlc_code[buf];
165
                break;
166
            }
167
            ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf];
168
            buf = show_bits_long(gb, 32);
169
        } while (get_bits_left(gb) > 0);
170
171
        return ret - 1;
172
    }
173
#else
174
2.90M
    OPEN_READER(re, gb);
175
2.90M
    UPDATE_CACHE(re, gb);
176
2.90M
    buf = GET_CACHE(re, gb);
177
178
2.90M
    if (buf & 0xAA800000) {
179
2.08M
        buf >>= 32 - 8;
180
2.08M
        LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
181
2.08M
        CLOSE_READER(re, gb);
182
183
2.08M
        return ff_interleaved_ue_golomb_vlc_code[buf];
184
2.08M
    } else {
185
817k
        unsigned ret = 1;
186
187
4.00M
        do {
188
4.00M
            buf >>= 32 - 8;
189
4.00M
            LAST_SKIP_BITS(re, gb,
190
4.00M
                           FFMIN(ff_interleaved_golomb_vlc_len[buf], 8));
191
192
4.00M
            if (ff_interleaved_golomb_vlc_len[buf] != 9) {
193
619k
                ret <<= (ff_interleaved_golomb_vlc_len[buf] - 1) >> 1;
194
619k
                ret  |= ff_interleaved_dirac_golomb_vlc_code[buf];
195
619k
                break;
196
619k
            }
197
3.38M
            ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf];
198
3.38M
            UPDATE_CACHE(re, gb);
199
3.38M
            buf = GET_CACHE(re, gb);
200
3.38M
        } while (ret<0x8000000U && BITS_AVAILABLE(re, gb));
201
202
817k
        CLOSE_READER(re, gb);
203
817k
        return ret - 1;
204
817k
    }
205
2.90M
#endif
206
2.90M
}
Unexecuted instantiation: jpeglsdec.c:get_interleaved_ue_golomb
Unexecuted instantiation: h264_cavlc.c:get_interleaved_ue_golomb
Unexecuted instantiation: h264_refs.c:get_interleaved_ue_golomb
Unexecuted instantiation: h264_slice.c:get_interleaved_ue_golomb
Unexecuted instantiation: vmixdec.c:get_interleaved_ue_golomb
rv30.c:get_interleaved_ue_golomb
Line
Count
Source
144
2.11M
{
145
2.11M
    uint32_t buf;
146
147
#if CACHED_BITSTREAM_READER
148
    buf = show_bits_long(gb, 32);
149
150
    if (buf & 0xAA800000) {
151
        buf >>= 32 - 8;
152
        skip_bits_long(gb, ff_interleaved_golomb_vlc_len[buf]);
153
154
        return ff_interleaved_ue_golomb_vlc_code[buf];
155
    } else {
156
        unsigned ret = 1;
157
158
        do {
159
            buf >>= 32 - 8;
160
            skip_bits_long(gb, FFMIN(ff_interleaved_golomb_vlc_len[buf], 8));
161
162
            if (ff_interleaved_golomb_vlc_len[buf] != 9) {
163
                ret <<= (ff_interleaved_golomb_vlc_len[buf] - 1) >> 1;
164
                ret  |= ff_interleaved_dirac_golomb_vlc_code[buf];
165
                break;
166
            }
167
            ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf];
168
            buf = show_bits_long(gb, 32);
169
        } while (get_bits_left(gb) > 0);
170
171
        return ret - 1;
172
    }
173
#else
174
2.11M
    OPEN_READER(re, gb);
175
2.11M
    UPDATE_CACHE(re, gb);
176
2.11M
    buf = GET_CACHE(re, gb);
177
178
2.11M
    if (buf & 0xAA800000) {
179
2.09M
        buf >>= 32 - 8;
180
2.09M
        LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
181
2.09M
        CLOSE_READER(re, gb);
182
183
2.09M
        return ff_interleaved_ue_golomb_vlc_code[buf];
184
2.09M
    } else {
185
11.9k
        unsigned ret = 1;
186
187
36.4k
        do {
188
36.4k
            buf >>= 32 - 8;
189
36.4k
            LAST_SKIP_BITS(re, gb,
190
36.4k
                           FFMIN(ff_interleaved_golomb_vlc_len[buf], 8));
191
192
36.4k
            if (ff_interleaved_golomb_vlc_len[buf] != 9) {
193
9.19k
                ret <<= (ff_interleaved_golomb_vlc_len[buf] - 1) >> 1;
194
9.19k
                ret  |= ff_interleaved_dirac_golomb_vlc_code[buf];
195
9.19k
                break;
196
9.19k
            }
197
27.2k
            ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf];
198
27.2k
            UPDATE_CACHE(re, gb);
199
27.2k
            buf = GET_CACHE(re, gb);
200
27.2k
        } while (ret<0x8000000U && BITS_AVAILABLE(re, gb));
201
202
11.9k
        CLOSE_READER(re, gb);
203
11.9k
        return ret - 1;
204
11.9k
    }
205
2.11M
#endif
206
2.11M
}
Unexecuted instantiation: rv34.c:get_interleaved_ue_golomb
Unexecuted instantiation: loco.c:get_interleaved_ue_golomb
Unexecuted instantiation: ralf.c:get_interleaved_ue_golomb
Unexecuted instantiation: cavsdec.c:get_interleaved_ue_golomb
Unexecuted instantiation: cavs.c:get_interleaved_ue_golomb
Unexecuted instantiation: hevcdec.c:get_interleaved_ue_golomb
Unexecuted instantiation: mobiclip.c:get_interleaved_ue_golomb
Unexecuted instantiation: sonic.c:get_interleaved_ue_golomb
Unexecuted instantiation: ffv1dec.c:get_interleaved_ue_golomb
rv40.c:get_interleaved_ue_golomb
Line
Count
Source
144
449k
{
145
449k
    uint32_t buf;
146
147
#if CACHED_BITSTREAM_READER
148
    buf = show_bits_long(gb, 32);
149
150
    if (buf & 0xAA800000) {
151
        buf >>= 32 - 8;
152
        skip_bits_long(gb, ff_interleaved_golomb_vlc_len[buf]);
153
154
        return ff_interleaved_ue_golomb_vlc_code[buf];
155
    } else {
156
        unsigned ret = 1;
157
158
        do {
159
            buf >>= 32 - 8;
160
            skip_bits_long(gb, FFMIN(ff_interleaved_golomb_vlc_len[buf], 8));
161
162
            if (ff_interleaved_golomb_vlc_len[buf] != 9) {
163
                ret <<= (ff_interleaved_golomb_vlc_len[buf] - 1) >> 1;
164
                ret  |= ff_interleaved_dirac_golomb_vlc_code[buf];
165
                break;
166
            }
167
            ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf];
168
            buf = show_bits_long(gb, 32);
169
        } while (get_bits_left(gb) > 0);
170
171
        return ret - 1;
172
    }
173
#else
174
449k
    OPEN_READER(re, gb);
175
449k
    UPDATE_CACHE(re, gb);
176
449k
    buf = GET_CACHE(re, gb);
177
178
449k
    if (buf & 0xAA800000) {
179
436k
        buf >>= 32 - 8;
180
436k
        LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
181
436k
        CLOSE_READER(re, gb);
182
183
436k
        return ff_interleaved_ue_golomb_vlc_code[buf];
184
436k
    } else {
185
13.5k
        unsigned ret = 1;
186
187
33.1k
        do {
188
33.1k
            buf >>= 32 - 8;
189
33.1k
            LAST_SKIP_BITS(re, gb,
190
33.1k
                           FFMIN(ff_interleaved_golomb_vlc_len[buf], 8));
191
192
33.1k
            if (ff_interleaved_golomb_vlc_len[buf] != 9) {
193
7.57k
                ret <<= (ff_interleaved_golomb_vlc_len[buf] - 1) >> 1;
194
7.57k
                ret  |= ff_interleaved_dirac_golomb_vlc_code[buf];
195
7.57k
                break;
196
7.57k
            }
197
25.5k
            ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf];
198
25.5k
            UPDATE_CACHE(re, gb);
199
25.5k
            buf = GET_CACHE(re, gb);
200
25.5k
        } while (ret<0x8000000U && BITS_AVAILABLE(re, gb));
201
202
13.5k
        CLOSE_READER(re, gb);
203
13.5k
        return ret - 1;
204
13.5k
    }
205
449k
#endif
206
449k
}
Unexecuted instantiation: aic.c:get_interleaved_ue_golomb
Unexecuted instantiation: shorten.c:get_interleaved_ue_golomb
Unexecuted instantiation: rv60dec.c:get_interleaved_ue_golomb
Unexecuted instantiation: flacdec.c:get_interleaved_ue_golomb
Unexecuted instantiation: fic.c:get_interleaved_ue_golomb
svq3.c:get_interleaved_ue_golomb
Line
Count
Source
144
4.04M
{
145
4.04M
    uint32_t buf;
146
147
#if CACHED_BITSTREAM_READER
148
    buf = show_bits_long(gb, 32);
149
150
    if (buf & 0xAA800000) {
151
        buf >>= 32 - 8;
152
        skip_bits_long(gb, ff_interleaved_golomb_vlc_len[buf]);
153
154
        return ff_interleaved_ue_golomb_vlc_code[buf];
155
    } else {
156
        unsigned ret = 1;
157
158
        do {
159
            buf >>= 32 - 8;
160
            skip_bits_long(gb, FFMIN(ff_interleaved_golomb_vlc_len[buf], 8));
161
162
            if (ff_interleaved_golomb_vlc_len[buf] != 9) {
163
                ret <<= (ff_interleaved_golomb_vlc_len[buf] - 1) >> 1;
164
                ret  |= ff_interleaved_dirac_golomb_vlc_code[buf];
165
                break;
166
            }
167
            ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf];
168
            buf = show_bits_long(gb, 32);
169
        } while (get_bits_left(gb) > 0);
170
171
        return ret - 1;
172
    }
173
#else
174
4.04M
    OPEN_READER(re, gb);
175
4.04M
    UPDATE_CACHE(re, gb);
176
4.04M
    buf = GET_CACHE(re, gb);
177
178
4.04M
    if (buf & 0xAA800000) {
179
3.94M
        buf >>= 32 - 8;
180
3.94M
        LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
181
3.94M
        CLOSE_READER(re, gb);
182
183
3.94M
        return ff_interleaved_ue_golomb_vlc_code[buf];
184
3.94M
    } else {
185
93.2k
        unsigned ret = 1;
186
187
215k
        do {
188
215k
            buf >>= 32 - 8;
189
215k
            LAST_SKIP_BITS(re, gb,
190
215k
                           FFMIN(ff_interleaved_golomb_vlc_len[buf], 8));
191
192
215k
            if (ff_interleaved_golomb_vlc_len[buf] != 9) {
193
48.5k
                ret <<= (ff_interleaved_golomb_vlc_len[buf] - 1) >> 1;
194
48.5k
                ret  |= ff_interleaved_dirac_golomb_vlc_code[buf];
195
48.5k
                break;
196
48.5k
            }
197
166k
            ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf];
198
166k
            UPDATE_CACHE(re, gb);
199
166k
            buf = GET_CACHE(re, gb);
200
166k
        } while (ret<0x8000000U && BITS_AVAILABLE(re, gb));
201
202
93.2k
        CLOSE_READER(re, gb);
203
93.2k
        return ret - 1;
204
93.2k
    }
205
4.04M
#endif
206
4.04M
}
Unexecuted instantiation: dstdec.c:get_interleaved_ue_golomb
207
208
/**
209
 * read unsigned truncated exp golomb code.
210
 */
211
static inline int get_te0_golomb(GetBitContext *gb, int range)
212
0
{
213
0
    av_assert2(range >= 1);
214
0
215
0
    if (range == 1)
216
0
        return 0;
217
0
    else if (range == 2)
218
0
        return get_bits1(gb) ^ 1;
219
0
    else
220
0
        return get_ue_golomb(gb);
221
0
}
Unexecuted instantiation: dovi_rpudec.c:get_te0_golomb
Unexecuted instantiation: evc_parse.c:get_te0_golomb
Unexecuted instantiation: evc_ps.c:get_te0_golomb
Unexecuted instantiation: h264_parse.c:get_te0_golomb
Unexecuted instantiation: h264_ps.c:get_te0_golomb
Unexecuted instantiation: ps.c:get_te0_golomb
Unexecuted instantiation: h2645_vui.c:get_te0_golomb
Unexecuted instantiation: h264_parser.c:get_te0_golomb
Unexecuted instantiation: h264_sei.c:get_te0_golomb
Unexecuted instantiation: parser.c:get_te0_golomb
Unexecuted instantiation: sei.c:get_te0_golomb
Unexecuted instantiation: h2645_sei.c:get_te0_golomb
Unexecuted instantiation: h264dec.c:get_te0_golomb
Unexecuted instantiation: shortendec.c:get_te0_golomb
Unexecuted instantiation: dirac.c:get_te0_golomb
Unexecuted instantiation: diracdec.c:get_te0_golomb
Unexecuted instantiation: jpeglsdec.c:get_te0_golomb
Unexecuted instantiation: h264_cavlc.c:get_te0_golomb
Unexecuted instantiation: h264_refs.c:get_te0_golomb
Unexecuted instantiation: h264_slice.c:get_te0_golomb
Unexecuted instantiation: vmixdec.c:get_te0_golomb
Unexecuted instantiation: rv30.c:get_te0_golomb
Unexecuted instantiation: rv34.c:get_te0_golomb
Unexecuted instantiation: loco.c:get_te0_golomb
Unexecuted instantiation: ralf.c:get_te0_golomb
Unexecuted instantiation: cavsdec.c:get_te0_golomb
Unexecuted instantiation: cavs.c:get_te0_golomb
Unexecuted instantiation: hevcdec.c:get_te0_golomb
Unexecuted instantiation: mobiclip.c:get_te0_golomb
Unexecuted instantiation: sonic.c:get_te0_golomb
Unexecuted instantiation: ffv1dec.c:get_te0_golomb
Unexecuted instantiation: rv40.c:get_te0_golomb
Unexecuted instantiation: aic.c:get_te0_golomb
Unexecuted instantiation: shorten.c:get_te0_golomb
Unexecuted instantiation: rv60dec.c:get_te0_golomb
Unexecuted instantiation: flacdec.c:get_te0_golomb
Unexecuted instantiation: fic.c:get_te0_golomb
Unexecuted instantiation: svq3.c:get_te0_golomb
Unexecuted instantiation: dstdec.c:get_te0_golomb
222
223
/**
224
 * read unsigned truncated exp golomb code.
225
 */
226
static inline int get_te_golomb(GetBitContext *gb, int range)
227
0
{
228
0
    av_assert2(range >= 1);
229
0
230
0
    if (range == 2)
231
0
        return get_bits1(gb) ^ 1;
232
0
    else
233
0
        return get_ue_golomb(gb);
234
0
}
Unexecuted instantiation: dovi_rpudec.c:get_te_golomb
Unexecuted instantiation: evc_parse.c:get_te_golomb
Unexecuted instantiation: evc_ps.c:get_te_golomb
Unexecuted instantiation: h264_parse.c:get_te_golomb
Unexecuted instantiation: h264_ps.c:get_te_golomb
Unexecuted instantiation: ps.c:get_te_golomb
Unexecuted instantiation: h2645_vui.c:get_te_golomb
Unexecuted instantiation: h264_parser.c:get_te_golomb
Unexecuted instantiation: h264_sei.c:get_te_golomb
Unexecuted instantiation: parser.c:get_te_golomb
Unexecuted instantiation: sei.c:get_te_golomb
Unexecuted instantiation: h2645_sei.c:get_te_golomb
Unexecuted instantiation: h264dec.c:get_te_golomb
Unexecuted instantiation: shortendec.c:get_te_golomb
Unexecuted instantiation: dirac.c:get_te_golomb
Unexecuted instantiation: diracdec.c:get_te_golomb
Unexecuted instantiation: jpeglsdec.c:get_te_golomb
Unexecuted instantiation: h264_cavlc.c:get_te_golomb
Unexecuted instantiation: h264_refs.c:get_te_golomb
Unexecuted instantiation: h264_slice.c:get_te_golomb
Unexecuted instantiation: vmixdec.c:get_te_golomb
Unexecuted instantiation: rv30.c:get_te_golomb
Unexecuted instantiation: rv34.c:get_te_golomb
Unexecuted instantiation: loco.c:get_te_golomb
Unexecuted instantiation: ralf.c:get_te_golomb
Unexecuted instantiation: cavsdec.c:get_te_golomb
Unexecuted instantiation: cavs.c:get_te_golomb
Unexecuted instantiation: hevcdec.c:get_te_golomb
Unexecuted instantiation: mobiclip.c:get_te_golomb
Unexecuted instantiation: sonic.c:get_te_golomb
Unexecuted instantiation: ffv1dec.c:get_te_golomb
Unexecuted instantiation: rv40.c:get_te_golomb
Unexecuted instantiation: aic.c:get_te_golomb
Unexecuted instantiation: shorten.c:get_te_golomb
Unexecuted instantiation: rv60dec.c:get_te_golomb
Unexecuted instantiation: flacdec.c:get_te_golomb
Unexecuted instantiation: fic.c:get_te_golomb
Unexecuted instantiation: svq3.c:get_te_golomb
Unexecuted instantiation: dstdec.c:get_te_golomb
235
236
/**
237
 * read signed exp golomb code.
238
 */
239
static inline int get_se_golomb(GetBitContext *gb)
240
92.6M
{
241
92.6M
    unsigned int buf;
242
243
#if CACHED_BITSTREAM_READER
244
    buf = show_bits_long(gb, 32);
245
246
    if (buf >= (1 << 27)) {
247
        buf >>= 32 - 9;
248
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
249
250
        return ff_se_golomb_vlc_code[buf];
251
    } else {
252
        int log = 2 * av_log2(buf) - 31;
253
        buf >>= log;
254
255
        skip_bits_long(gb, 32 - log);
256
257
        if (buf & 1)
258
            buf = -(buf >> 1);
259
        else
260
            buf = (buf >> 1);
261
262
        return buf;
263
    }
264
#else
265
92.6M
    OPEN_READER(re, gb);
266
92.6M
    UPDATE_CACHE(re, gb);
267
92.6M
    buf = GET_CACHE(re, gb);
268
269
92.6M
    if (buf >= (1 << 27)) {
270
86.2M
        buf >>= 32 - 9;
271
86.2M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
86.2M
        CLOSE_READER(re, gb);
273
274
86.2M
        return ff_se_golomb_vlc_code[buf];
275
86.2M
    } else {
276
6.35M
        int log = av_log2(buf), sign;
277
6.35M
        LAST_SKIP_BITS(re, gb, 31 - log);
278
6.35M
        UPDATE_CACHE(re, gb);
279
6.35M
        buf = GET_CACHE(re, gb);
280
281
6.35M
        buf >>= log;
282
283
6.35M
        LAST_SKIP_BITS(re, gb, 32 - log);
284
6.35M
        CLOSE_READER(re, gb);
285
286
6.35M
        sign = -(buf & 1);
287
6.35M
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
6.35M
        return buf;
290
6.35M
    }
291
92.6M
#endif
292
92.6M
}
Unexecuted instantiation: dovi_rpudec.c:get_se_golomb
Unexecuted instantiation: evc_parse.c:get_se_golomb
Unexecuted instantiation: evc_ps.c:get_se_golomb
h264_parse.c:get_se_golomb
Line
Count
Source
240
10.2M
{
241
10.2M
    unsigned int buf;
242
243
#if CACHED_BITSTREAM_READER
244
    buf = show_bits_long(gb, 32);
245
246
    if (buf >= (1 << 27)) {
247
        buf >>= 32 - 9;
248
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
249
250
        return ff_se_golomb_vlc_code[buf];
251
    } else {
252
        int log = 2 * av_log2(buf) - 31;
253
        buf >>= log;
254
255
        skip_bits_long(gb, 32 - log);
256
257
        if (buf & 1)
258
            buf = -(buf >> 1);
259
        else
260
            buf = (buf >> 1);
261
262
        return buf;
263
    }
264
#else
265
10.2M
    OPEN_READER(re, gb);
266
10.2M
    UPDATE_CACHE(re, gb);
267
10.2M
    buf = GET_CACHE(re, gb);
268
269
10.2M
    if (buf >= (1 << 27)) {
270
9.56M
        buf >>= 32 - 9;
271
9.56M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
9.56M
        CLOSE_READER(re, gb);
273
274
9.56M
        return ff_se_golomb_vlc_code[buf];
275
9.56M
    } else {
276
657k
        int log = av_log2(buf), sign;
277
657k
        LAST_SKIP_BITS(re, gb, 31 - log);
278
657k
        UPDATE_CACHE(re, gb);
279
657k
        buf = GET_CACHE(re, gb);
280
281
657k
        buf >>= log;
282
283
657k
        LAST_SKIP_BITS(re, gb, 32 - log);
284
657k
        CLOSE_READER(re, gb);
285
286
657k
        sign = -(buf & 1);
287
657k
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
657k
        return buf;
290
657k
    }
291
10.2M
#endif
292
10.2M
}
h264_ps.c:get_se_golomb
Line
Count
Source
240
42.2M
{
241
42.2M
    unsigned int buf;
242
243
#if CACHED_BITSTREAM_READER
244
    buf = show_bits_long(gb, 32);
245
246
    if (buf >= (1 << 27)) {
247
        buf >>= 32 - 9;
248
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
249
250
        return ff_se_golomb_vlc_code[buf];
251
    } else {
252
        int log = 2 * av_log2(buf) - 31;
253
        buf >>= log;
254
255
        skip_bits_long(gb, 32 - log);
256
257
        if (buf & 1)
258
            buf = -(buf >> 1);
259
        else
260
            buf = (buf >> 1);
261
262
        return buf;
263
    }
264
#else
265
42.2M
    OPEN_READER(re, gb);
266
42.2M
    UPDATE_CACHE(re, gb);
267
42.2M
    buf = GET_CACHE(re, gb);
268
269
42.2M
    if (buf >= (1 << 27)) {
270
39.8M
        buf >>= 32 - 9;
271
39.8M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
39.8M
        CLOSE_READER(re, gb);
273
274
39.8M
        return ff_se_golomb_vlc_code[buf];
275
39.8M
    } else {
276
2.35M
        int log = av_log2(buf), sign;
277
2.35M
        LAST_SKIP_BITS(re, gb, 31 - log);
278
2.35M
        UPDATE_CACHE(re, gb);
279
2.35M
        buf = GET_CACHE(re, gb);
280
281
2.35M
        buf >>= log;
282
283
2.35M
        LAST_SKIP_BITS(re, gb, 32 - log);
284
2.35M
        CLOSE_READER(re, gb);
285
286
2.35M
        sign = -(buf & 1);
287
2.35M
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
2.35M
        return buf;
290
2.35M
    }
291
42.2M
#endif
292
42.2M
}
ps.c:get_se_golomb
Line
Count
Source
240
24.9M
{
241
24.9M
    unsigned int buf;
242
243
#if CACHED_BITSTREAM_READER
244
    buf = show_bits_long(gb, 32);
245
246
    if (buf >= (1 << 27)) {
247
        buf >>= 32 - 9;
248
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
249
250
        return ff_se_golomb_vlc_code[buf];
251
    } else {
252
        int log = 2 * av_log2(buf) - 31;
253
        buf >>= log;
254
255
        skip_bits_long(gb, 32 - log);
256
257
        if (buf & 1)
258
            buf = -(buf >> 1);
259
        else
260
            buf = (buf >> 1);
261
262
        return buf;
263
    }
264
#else
265
24.9M
    OPEN_READER(re, gb);
266
24.9M
    UPDATE_CACHE(re, gb);
267
24.9M
    buf = GET_CACHE(re, gb);
268
269
24.9M
    if (buf >= (1 << 27)) {
270
23.4M
        buf >>= 32 - 9;
271
23.4M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
23.4M
        CLOSE_READER(re, gb);
273
274
23.4M
        return ff_se_golomb_vlc_code[buf];
275
23.4M
    } else {
276
1.53M
        int log = av_log2(buf), sign;
277
1.53M
        LAST_SKIP_BITS(re, gb, 31 - log);
278
1.53M
        UPDATE_CACHE(re, gb);
279
1.53M
        buf = GET_CACHE(re, gb);
280
281
1.53M
        buf >>= log;
282
283
1.53M
        LAST_SKIP_BITS(re, gb, 32 - log);
284
1.53M
        CLOSE_READER(re, gb);
285
286
1.53M
        sign = -(buf & 1);
287
1.53M
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
1.53M
        return buf;
290
1.53M
    }
291
24.9M
#endif
292
24.9M
}
Unexecuted instantiation: h2645_vui.c:get_se_golomb
h264_parser.c:get_se_golomb
Line
Count
Source
240
1.31M
{
241
1.31M
    unsigned int buf;
242
243
#if CACHED_BITSTREAM_READER
244
    buf = show_bits_long(gb, 32);
245
246
    if (buf >= (1 << 27)) {
247
        buf >>= 32 - 9;
248
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
249
250
        return ff_se_golomb_vlc_code[buf];
251
    } else {
252
        int log = 2 * av_log2(buf) - 31;
253
        buf >>= log;
254
255
        skip_bits_long(gb, 32 - log);
256
257
        if (buf & 1)
258
            buf = -(buf >> 1);
259
        else
260
            buf = (buf >> 1);
261
262
        return buf;
263
    }
264
#else
265
1.31M
    OPEN_READER(re, gb);
266
1.31M
    UPDATE_CACHE(re, gb);
267
1.31M
    buf = GET_CACHE(re, gb);
268
269
1.31M
    if (buf >= (1 << 27)) {
270
930k
        buf >>= 32 - 9;
271
930k
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
930k
        CLOSE_READER(re, gb);
273
274
930k
        return ff_se_golomb_vlc_code[buf];
275
930k
    } else {
276
387k
        int log = av_log2(buf), sign;
277
387k
        LAST_SKIP_BITS(re, gb, 31 - log);
278
387k
        UPDATE_CACHE(re, gb);
279
387k
        buf = GET_CACHE(re, gb);
280
281
387k
        buf >>= log;
282
283
387k
        LAST_SKIP_BITS(re, gb, 32 - log);
284
387k
        CLOSE_READER(re, gb);
285
286
387k
        sign = -(buf & 1);
287
387k
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
387k
        return buf;
290
387k
    }
291
1.31M
#endif
292
1.31M
}
Unexecuted instantiation: h264_sei.c:get_se_golomb
Unexecuted instantiation: parser.c:get_se_golomb
sei.c:get_se_golomb
Line
Count
Source
240
25.3k
{
241
25.3k
    unsigned int buf;
242
243
#if CACHED_BITSTREAM_READER
244
    buf = show_bits_long(gb, 32);
245
246
    if (buf >= (1 << 27)) {
247
        buf >>= 32 - 9;
248
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
249
250
        return ff_se_golomb_vlc_code[buf];
251
    } else {
252
        int log = 2 * av_log2(buf) - 31;
253
        buf >>= log;
254
255
        skip_bits_long(gb, 32 - log);
256
257
        if (buf & 1)
258
            buf = -(buf >> 1);
259
        else
260
            buf = (buf >> 1);
261
262
        return buf;
263
    }
264
#else
265
25.3k
    OPEN_READER(re, gb);
266
25.3k
    UPDATE_CACHE(re, gb);
267
25.3k
    buf = GET_CACHE(re, gb);
268
269
25.3k
    if (buf >= (1 << 27)) {
270
10.5k
        buf >>= 32 - 9;
271
10.5k
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
10.5k
        CLOSE_READER(re, gb);
273
274
10.5k
        return ff_se_golomb_vlc_code[buf];
275
14.8k
    } else {
276
14.8k
        int log = av_log2(buf), sign;
277
14.8k
        LAST_SKIP_BITS(re, gb, 31 - log);
278
14.8k
        UPDATE_CACHE(re, gb);
279
14.8k
        buf = GET_CACHE(re, gb);
280
281
14.8k
        buf >>= log;
282
283
14.8k
        LAST_SKIP_BITS(re, gb, 32 - log);
284
14.8k
        CLOSE_READER(re, gb);
285
286
14.8k
        sign = -(buf & 1);
287
14.8k
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
14.8k
        return buf;
290
14.8k
    }
291
25.3k
#endif
292
25.3k
}
Unexecuted instantiation: h2645_sei.c:get_se_golomb
Unexecuted instantiation: h264dec.c:get_se_golomb
Unexecuted instantiation: shortendec.c:get_se_golomb
Unexecuted instantiation: dirac.c:get_se_golomb
Unexecuted instantiation: diracdec.c:get_se_golomb
Unexecuted instantiation: jpeglsdec.c:get_se_golomb
h264_cavlc.c:get_se_golomb
Line
Count
Source
240
5.64M
{
241
5.64M
    unsigned int buf;
242
243
#if CACHED_BITSTREAM_READER
244
    buf = show_bits_long(gb, 32);
245
246
    if (buf >= (1 << 27)) {
247
        buf >>= 32 - 9;
248
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
249
250
        return ff_se_golomb_vlc_code[buf];
251
    } else {
252
        int log = 2 * av_log2(buf) - 31;
253
        buf >>= log;
254
255
        skip_bits_long(gb, 32 - log);
256
257
        if (buf & 1)
258
            buf = -(buf >> 1);
259
        else
260
            buf = (buf >> 1);
261
262
        return buf;
263
    }
264
#else
265
5.64M
    OPEN_READER(re, gb);
266
5.64M
    UPDATE_CACHE(re, gb);
267
5.64M
    buf = GET_CACHE(re, gb);
268
269
5.64M
    if (buf >= (1 << 27)) {
270
4.99M
        buf >>= 32 - 9;
271
4.99M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
4.99M
        CLOSE_READER(re, gb);
273
274
4.99M
        return ff_se_golomb_vlc_code[buf];
275
4.99M
    } else {
276
649k
        int log = av_log2(buf), sign;
277
649k
        LAST_SKIP_BITS(re, gb, 31 - log);
278
649k
        UPDATE_CACHE(re, gb);
279
649k
        buf = GET_CACHE(re, gb);
280
281
649k
        buf >>= log;
282
283
649k
        LAST_SKIP_BITS(re, gb, 32 - log);
284
649k
        CLOSE_READER(re, gb);
285
286
649k
        sign = -(buf & 1);
287
649k
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
649k
        return buf;
290
649k
    }
291
5.64M
#endif
292
5.64M
}
Unexecuted instantiation: h264_refs.c:get_se_golomb
h264_slice.c:get_se_golomb
Line
Count
Source
240
4.51M
{
241
4.51M
    unsigned int buf;
242
243
#if CACHED_BITSTREAM_READER
244
    buf = show_bits_long(gb, 32);
245
246
    if (buf >= (1 << 27)) {
247
        buf >>= 32 - 9;
248
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
249
250
        return ff_se_golomb_vlc_code[buf];
251
    } else {
252
        int log = 2 * av_log2(buf) - 31;
253
        buf >>= log;
254
255
        skip_bits_long(gb, 32 - log);
256
257
        if (buf & 1)
258
            buf = -(buf >> 1);
259
        else
260
            buf = (buf >> 1);
261
262
        return buf;
263
    }
264
#else
265
4.51M
    OPEN_READER(re, gb);
266
4.51M
    UPDATE_CACHE(re, gb);
267
4.51M
    buf = GET_CACHE(re, gb);
268
269
4.51M
    if (buf >= (1 << 27)) {
270
4.08M
        buf >>= 32 - 9;
271
4.08M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
4.08M
        CLOSE_READER(re, gb);
273
274
4.08M
        return ff_se_golomb_vlc_code[buf];
275
4.08M
    } else {
276
425k
        int log = av_log2(buf), sign;
277
425k
        LAST_SKIP_BITS(re, gb, 31 - log);
278
425k
        UPDATE_CACHE(re, gb);
279
425k
        buf = GET_CACHE(re, gb);
280
281
425k
        buf >>= log;
282
283
425k
        LAST_SKIP_BITS(re, gb, 32 - log);
284
425k
        CLOSE_READER(re, gb);
285
286
425k
        sign = -(buf & 1);
287
425k
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
425k
        return buf;
290
425k
    }
291
4.51M
#endif
292
4.51M
}
Unexecuted instantiation: vmixdec.c:get_se_golomb
Unexecuted instantiation: rv30.c:get_se_golomb
Unexecuted instantiation: rv34.c:get_se_golomb
Unexecuted instantiation: loco.c:get_se_golomb
Unexecuted instantiation: ralf.c:get_se_golomb
cavsdec.c:get_se_golomb
Line
Count
Source
240
601k
{
241
601k
    unsigned int buf;
242
243
#if CACHED_BITSTREAM_READER
244
    buf = show_bits_long(gb, 32);
245
246
    if (buf >= (1 << 27)) {
247
        buf >>= 32 - 9;
248
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
249
250
        return ff_se_golomb_vlc_code[buf];
251
    } else {
252
        int log = 2 * av_log2(buf) - 31;
253
        buf >>= log;
254
255
        skip_bits_long(gb, 32 - log);
256
257
        if (buf & 1)
258
            buf = -(buf >> 1);
259
        else
260
            buf = (buf >> 1);
261
262
        return buf;
263
    }
264
#else
265
601k
    OPEN_READER(re, gb);
266
601k
    UPDATE_CACHE(re, gb);
267
601k
    buf = GET_CACHE(re, gb);
268
269
601k
    if (buf >= (1 << 27)) {
270
593k
        buf >>= 32 - 9;
271
593k
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
593k
        CLOSE_READER(re, gb);
273
274
593k
        return ff_se_golomb_vlc_code[buf];
275
593k
    } else {
276
7.99k
        int log = av_log2(buf), sign;
277
7.99k
        LAST_SKIP_BITS(re, gb, 31 - log);
278
7.99k
        UPDATE_CACHE(re, gb);
279
7.99k
        buf = GET_CACHE(re, gb);
280
281
7.99k
        buf >>= log;
282
283
7.99k
        LAST_SKIP_BITS(re, gb, 32 - log);
284
7.99k
        CLOSE_READER(re, gb);
285
286
7.99k
        sign = -(buf & 1);
287
7.99k
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
7.99k
        return buf;
290
7.99k
    }
291
601k
#endif
292
601k
}
cavs.c:get_se_golomb
Line
Count
Source
240
2.01M
{
241
2.01M
    unsigned int buf;
242
243
#if CACHED_BITSTREAM_READER
244
    buf = show_bits_long(gb, 32);
245
246
    if (buf >= (1 << 27)) {
247
        buf >>= 32 - 9;
248
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
249
250
        return ff_se_golomb_vlc_code[buf];
251
    } else {
252
        int log = 2 * av_log2(buf) - 31;
253
        buf >>= log;
254
255
        skip_bits_long(gb, 32 - log);
256
257
        if (buf & 1)
258
            buf = -(buf >> 1);
259
        else
260
            buf = (buf >> 1);
261
262
        return buf;
263
    }
264
#else
265
2.01M
    OPEN_READER(re, gb);
266
2.01M
    UPDATE_CACHE(re, gb);
267
2.01M
    buf = GET_CACHE(re, gb);
268
269
2.01M
    if (buf >= (1 << 27)) {
270
1.82M
        buf >>= 32 - 9;
271
1.82M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
1.82M
        CLOSE_READER(re, gb);
273
274
1.82M
        return ff_se_golomb_vlc_code[buf];
275
1.82M
    } else {
276
185k
        int log = av_log2(buf), sign;
277
185k
        LAST_SKIP_BITS(re, gb, 31 - log);
278
185k
        UPDATE_CACHE(re, gb);
279
185k
        buf = GET_CACHE(re, gb);
280
281
185k
        buf >>= log;
282
283
185k
        LAST_SKIP_BITS(re, gb, 32 - log);
284
185k
        CLOSE_READER(re, gb);
285
286
185k
        sign = -(buf & 1);
287
185k
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
185k
        return buf;
290
185k
    }
291
2.01M
#endif
292
2.01M
}
hevcdec.c:get_se_golomb
Line
Count
Source
240
662k
{
241
662k
    unsigned int buf;
242
243
#if CACHED_BITSTREAM_READER
244
    buf = show_bits_long(gb, 32);
245
246
    if (buf >= (1 << 27)) {
247
        buf >>= 32 - 9;
248
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
249
250
        return ff_se_golomb_vlc_code[buf];
251
    } else {
252
        int log = 2 * av_log2(buf) - 31;
253
        buf >>= log;
254
255
        skip_bits_long(gb, 32 - log);
256
257
        if (buf & 1)
258
            buf = -(buf >> 1);
259
        else
260
            buf = (buf >> 1);
261
262
        return buf;
263
    }
264
#else
265
662k
    OPEN_READER(re, gb);
266
662k
    UPDATE_CACHE(re, gb);
267
662k
    buf = GET_CACHE(re, gb);
268
269
662k
    if (buf >= (1 << 27)) {
270
580k
        buf >>= 32 - 9;
271
580k
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
580k
        CLOSE_READER(re, gb);
273
274
580k
        return ff_se_golomb_vlc_code[buf];
275
580k
    } else {
276
82.0k
        int log = av_log2(buf), sign;
277
82.0k
        LAST_SKIP_BITS(re, gb, 31 - log);
278
82.0k
        UPDATE_CACHE(re, gb);
279
82.0k
        buf = GET_CACHE(re, gb);
280
281
82.0k
        buf >>= log;
282
283
82.0k
        LAST_SKIP_BITS(re, gb, 32 - log);
284
82.0k
        CLOSE_READER(re, gb);
285
286
82.0k
        sign = -(buf & 1);
287
82.0k
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
82.0k
        return buf;
290
82.0k
    }
291
662k
#endif
292
662k
}
mobiclip.c:get_se_golomb
Line
Count
Source
240
369k
{
241
369k
    unsigned int buf;
242
243
#if CACHED_BITSTREAM_READER
244
    buf = show_bits_long(gb, 32);
245
246
    if (buf >= (1 << 27)) {
247
        buf >>= 32 - 9;
248
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
249
250
        return ff_se_golomb_vlc_code[buf];
251
    } else {
252
        int log = 2 * av_log2(buf) - 31;
253
        buf >>= log;
254
255
        skip_bits_long(gb, 32 - log);
256
257
        if (buf & 1)
258
            buf = -(buf >> 1);
259
        else
260
            buf = (buf >> 1);
261
262
        return buf;
263
    }
264
#else
265
369k
    OPEN_READER(re, gb);
266
369k
    UPDATE_CACHE(re, gb);
267
369k
    buf = GET_CACHE(re, gb);
268
269
369k
    if (buf >= (1 << 27)) {
270
351k
        buf >>= 32 - 9;
271
351k
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
351k
        CLOSE_READER(re, gb);
273
274
351k
        return ff_se_golomb_vlc_code[buf];
275
351k
    } else {
276
17.4k
        int log = av_log2(buf), sign;
277
17.4k
        LAST_SKIP_BITS(re, gb, 31 - log);
278
17.4k
        UPDATE_CACHE(re, gb);
279
17.4k
        buf = GET_CACHE(re, gb);
280
281
17.4k
        buf >>= log;
282
283
17.4k
        LAST_SKIP_BITS(re, gb, 32 - log);
284
17.4k
        CLOSE_READER(re, gb);
285
286
17.4k
        sign = -(buf & 1);
287
17.4k
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
17.4k
        return buf;
290
17.4k
    }
291
369k
#endif
292
369k
}
Unexecuted instantiation: sonic.c:get_se_golomb
Unexecuted instantiation: ffv1dec.c:get_se_golomb
Unexecuted instantiation: rv40.c:get_se_golomb
Unexecuted instantiation: aic.c:get_se_golomb
Unexecuted instantiation: shorten.c:get_se_golomb
Unexecuted instantiation: rv60dec.c:get_se_golomb
Unexecuted instantiation: flacdec.c:get_se_golomb
fic.c:get_se_golomb
Line
Count
Source
240
83.5k
{
241
83.5k
    unsigned int buf;
242
243
#if CACHED_BITSTREAM_READER
244
    buf = show_bits_long(gb, 32);
245
246
    if (buf >= (1 << 27)) {
247
        buf >>= 32 - 9;
248
        skip_bits_long(gb, ff_golomb_vlc_len[buf]);
249
250
        return ff_se_golomb_vlc_code[buf];
251
    } else {
252
        int log = 2 * av_log2(buf) - 31;
253
        buf >>= log;
254
255
        skip_bits_long(gb, 32 - log);
256
257
        if (buf & 1)
258
            buf = -(buf >> 1);
259
        else
260
            buf = (buf >> 1);
261
262
        return buf;
263
    }
264
#else
265
83.5k
    OPEN_READER(re, gb);
266
83.5k
    UPDATE_CACHE(re, gb);
267
83.5k
    buf = GET_CACHE(re, gb);
268
269
83.5k
    if (buf >= (1 << 27)) {
270
48.0k
        buf >>= 32 - 9;
271
48.0k
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
48.0k
        CLOSE_READER(re, gb);
273
274
48.0k
        return ff_se_golomb_vlc_code[buf];
275
48.0k
    } else {
276
35.4k
        int log = av_log2(buf), sign;
277
35.4k
        LAST_SKIP_BITS(re, gb, 31 - log);
278
35.4k
        UPDATE_CACHE(re, gb);
279
35.4k
        buf = GET_CACHE(re, gb);
280
281
35.4k
        buf >>= log;
282
283
35.4k
        LAST_SKIP_BITS(re, gb, 32 - log);
284
35.4k
        CLOSE_READER(re, gb);
285
286
35.4k
        sign = -(buf & 1);
287
35.4k
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
35.4k
        return buf;
290
35.4k
    }
291
83.5k
#endif
292
83.5k
}
Unexecuted instantiation: svq3.c:get_se_golomb
Unexecuted instantiation: dstdec.c:get_se_golomb
293
294
static inline int get_se_golomb_long(GetBitContext *gb)
295
27.1M
{
296
27.1M
    unsigned int buf = get_ue_golomb_long(gb);
297
27.1M
    int sign = (buf & 1) - 1;
298
27.1M
    return ((buf >> 1) ^ sign) + 1;
299
27.1M
}
dovi_rpudec.c:get_se_golomb_long
Line
Count
Source
295
13.2k
{
296
13.2k
    unsigned int buf = get_ue_golomb_long(gb);
297
13.2k
    int sign = (buf & 1) - 1;
298
13.2k
    return ((buf >> 1) ^ sign) + 1;
299
13.2k
}
Unexecuted instantiation: evc_parse.c:get_se_golomb_long
evc_ps.c:get_se_golomb_long
Line
Count
Source
295
331k
{
296
331k
    unsigned int buf = get_ue_golomb_long(gb);
297
331k
    int sign = (buf & 1) - 1;
298
331k
    return ((buf >> 1) ^ sign) + 1;
299
331k
}
Unexecuted instantiation: h264_parse.c:get_se_golomb_long
h264_ps.c:get_se_golomb_long
Line
Count
Source
295
5.23M
{
296
5.23M
    unsigned int buf = get_ue_golomb_long(gb);
297
5.23M
    int sign = (buf & 1) - 1;
298
5.23M
    return ((buf >> 1) ^ sign) + 1;
299
5.23M
}
ps.c:get_se_golomb_long
Line
Count
Source
295
1.82M
{
296
1.82M
    unsigned int buf = get_ue_golomb_long(gb);
297
1.82M
    int sign = (buf & 1) - 1;
298
1.82M
    return ((buf >> 1) ^ sign) + 1;
299
1.82M
}
Unexecuted instantiation: h2645_vui.c:get_se_golomb_long
Unexecuted instantiation: h264_parser.c:get_se_golomb_long
Unexecuted instantiation: h264_sei.c:get_se_golomb_long
Unexecuted instantiation: parser.c:get_se_golomb_long
Unexecuted instantiation: sei.c:get_se_golomb_long
h2645_sei.c:get_se_golomb_long
Line
Count
Source
295
19.7M
{
296
19.7M
    unsigned int buf = get_ue_golomb_long(gb);
297
19.7M
    int sign = (buf & 1) - 1;
298
19.7M
    return ((buf >> 1) ^ sign) + 1;
299
19.7M
}
Unexecuted instantiation: h264dec.c:get_se_golomb_long
Unexecuted instantiation: shortendec.c:get_se_golomb_long
Unexecuted instantiation: dirac.c:get_se_golomb_long
Unexecuted instantiation: diracdec.c:get_se_golomb_long
Unexecuted instantiation: jpeglsdec.c:get_se_golomb_long
Unexecuted instantiation: h264_cavlc.c:get_se_golomb_long
Unexecuted instantiation: h264_refs.c:get_se_golomb_long
Unexecuted instantiation: h264_slice.c:get_se_golomb_long
Unexecuted instantiation: vmixdec.c:get_se_golomb_long
Unexecuted instantiation: rv30.c:get_se_golomb_long
Unexecuted instantiation: rv34.c:get_se_golomb_long
Unexecuted instantiation: loco.c:get_se_golomb_long
Unexecuted instantiation: ralf.c:get_se_golomb_long
Unexecuted instantiation: cavsdec.c:get_se_golomb_long
Unexecuted instantiation: cavs.c:get_se_golomb_long
Unexecuted instantiation: hevcdec.c:get_se_golomb_long
Unexecuted instantiation: mobiclip.c:get_se_golomb_long
Unexecuted instantiation: sonic.c:get_se_golomb_long
Unexecuted instantiation: ffv1dec.c:get_se_golomb_long
Unexecuted instantiation: rv40.c:get_se_golomb_long
Unexecuted instantiation: aic.c:get_se_golomb_long
Unexecuted instantiation: shorten.c:get_se_golomb_long
Unexecuted instantiation: rv60dec.c:get_se_golomb_long
Unexecuted instantiation: flacdec.c:get_se_golomb_long
Unexecuted instantiation: fic.c:get_se_golomb_long
Unexecuted instantiation: svq3.c:get_se_golomb_long
Unexecuted instantiation: dstdec.c:get_se_golomb_long
300
301
static inline int get_interleaved_se_golomb(GetBitContext *gb)
302
4.94M
{
303
4.94M
    unsigned int buf;
304
305
#if CACHED_BITSTREAM_READER
306
    buf = show_bits_long(gb, 32);
307
308
    if (buf & 0xAA800000) {
309
        buf >>= 32 - 8;
310
        skip_bits_long(gb, ff_interleaved_golomb_vlc_len[buf]);
311
312
        return ff_interleaved_se_golomb_vlc_code[buf];
313
    } else {
314
        int log;
315
        skip_bits(gb, 8);
316
        buf |= 1 | show_bits(gb, 24);
317
318
        if ((buf & 0xAAAAAAAA) == 0)
319
            return INVALID_VLC;
320
321
        for (log = 31; (buf & 0x80000000) == 0; log--)
322
            buf = (buf << 2) - ((buf << log) >> (log - 1)) + (buf >> 30);
323
324
        skip_bits_long(gb, 63 - 2 * log - 8);
325
326
        return (signed) (((((buf << log) >> log) - 1) ^ -(buf & 0x1)) + 1) >> 1;
327
    }
328
#else
329
4.94M
    OPEN_READER(re, gb);
330
4.94M
    UPDATE_CACHE(re, gb);
331
4.94M
    buf = GET_CACHE(re, gb);
332
333
4.94M
    if (buf & 0xAA800000) {
334
4.54M
        buf >>= 32 - 8;
335
4.54M
        LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
336
4.54M
        CLOSE_READER(re, gb);
337
338
4.54M
        return ff_interleaved_se_golomb_vlc_code[buf];
339
4.54M
    } else {
340
404k
        int log;
341
404k
        LAST_SKIP_BITS(re, gb, 8);
342
404k
        UPDATE_CACHE(re, gb);
343
404k
        buf |= 1 | (GET_CACHE(re, gb) >> 8);
344
345
404k
        if ((buf & 0xAAAAAAAA) == 0)
346
158k
            return INVALID_VLC;
347
348
2.35M
        for (log = 31; (buf & 0x80000000) == 0; log--)
349
2.10M
            buf = (buf << 2) - ((buf << log) >> (log - 1)) + (buf >> 30);
350
351
245k
        LAST_SKIP_BITS(re, gb, 63 - 2 * log - 8);
352
245k
        CLOSE_READER(re, gb);
353
354
245k
        return (signed) (((((buf << log) >> log) - 1) ^ -(buf & 0x1)) + 1) >> 1;
355
404k
    }
356
4.94M
#endif
357
4.94M
}
Unexecuted instantiation: dovi_rpudec.c:get_interleaved_se_golomb
Unexecuted instantiation: evc_parse.c:get_interleaved_se_golomb
Unexecuted instantiation: evc_ps.c:get_interleaved_se_golomb
Unexecuted instantiation: h264_parse.c:get_interleaved_se_golomb
Unexecuted instantiation: h264_ps.c:get_interleaved_se_golomb
Unexecuted instantiation: ps.c:get_interleaved_se_golomb
Unexecuted instantiation: h2645_vui.c:get_interleaved_se_golomb
Unexecuted instantiation: h264_parser.c:get_interleaved_se_golomb
Unexecuted instantiation: h264_sei.c:get_interleaved_se_golomb
Unexecuted instantiation: parser.c:get_interleaved_se_golomb
Unexecuted instantiation: sei.c:get_interleaved_se_golomb
Unexecuted instantiation: h2645_sei.c:get_interleaved_se_golomb
Unexecuted instantiation: h264dec.c:get_interleaved_se_golomb
Unexecuted instantiation: shortendec.c:get_interleaved_se_golomb
Unexecuted instantiation: dirac.c:get_interleaved_se_golomb
Unexecuted instantiation: diracdec.c:get_interleaved_se_golomb
Unexecuted instantiation: jpeglsdec.c:get_interleaved_se_golomb
Unexecuted instantiation: h264_cavlc.c:get_interleaved_se_golomb
Unexecuted instantiation: h264_refs.c:get_interleaved_se_golomb
Unexecuted instantiation: h264_slice.c:get_interleaved_se_golomb
Unexecuted instantiation: vmixdec.c:get_interleaved_se_golomb
Unexecuted instantiation: rv30.c:get_interleaved_se_golomb
rv34.c:get_interleaved_se_golomb
Line
Count
Source
302
1.73M
{
303
1.73M
    unsigned int buf;
304
305
#if CACHED_BITSTREAM_READER
306
    buf = show_bits_long(gb, 32);
307
308
    if (buf & 0xAA800000) {
309
        buf >>= 32 - 8;
310
        skip_bits_long(gb, ff_interleaved_golomb_vlc_len[buf]);
311
312
        return ff_interleaved_se_golomb_vlc_code[buf];
313
    } else {
314
        int log;
315
        skip_bits(gb, 8);
316
        buf |= 1 | show_bits(gb, 24);
317
318
        if ((buf & 0xAAAAAAAA) == 0)
319
            return INVALID_VLC;
320
321
        for (log = 31; (buf & 0x80000000) == 0; log--)
322
            buf = (buf << 2) - ((buf << log) >> (log - 1)) + (buf >> 30);
323
324
        skip_bits_long(gb, 63 - 2 * log - 8);
325
326
        return (signed) (((((buf << log) >> log) - 1) ^ -(buf & 0x1)) + 1) >> 1;
327
    }
328
#else
329
1.73M
    OPEN_READER(re, gb);
330
1.73M
    UPDATE_CACHE(re, gb);
331
1.73M
    buf = GET_CACHE(re, gb);
332
333
1.73M
    if (buf & 0xAA800000) {
334
1.70M
        buf >>= 32 - 8;
335
1.70M
        LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
336
1.70M
        CLOSE_READER(re, gb);
337
338
1.70M
        return ff_interleaved_se_golomb_vlc_code[buf];
339
1.70M
    } else {
340
27.5k
        int log;
341
27.5k
        LAST_SKIP_BITS(re, gb, 8);
342
27.5k
        UPDATE_CACHE(re, gb);
343
27.5k
        buf |= 1 | (GET_CACHE(re, gb) >> 8);
344
345
27.5k
        if ((buf & 0xAAAAAAAA) == 0)
346
5.79k
            return INVALID_VLC;
347
348
190k
        for (log = 31; (buf & 0x80000000) == 0; log--)
349
168k
            buf = (buf << 2) - ((buf << log) >> (log - 1)) + (buf >> 30);
350
351
21.7k
        LAST_SKIP_BITS(re, gb, 63 - 2 * log - 8);
352
21.7k
        CLOSE_READER(re, gb);
353
354
21.7k
        return (signed) (((((buf << log) >> log) - 1) ^ -(buf & 0x1)) + 1) >> 1;
355
27.5k
    }
356
1.73M
#endif
357
1.73M
}
Unexecuted instantiation: loco.c:get_interleaved_se_golomb
Unexecuted instantiation: ralf.c:get_interleaved_se_golomb
Unexecuted instantiation: cavsdec.c:get_interleaved_se_golomb
Unexecuted instantiation: cavs.c:get_interleaved_se_golomb
Unexecuted instantiation: hevcdec.c:get_interleaved_se_golomb
Unexecuted instantiation: mobiclip.c:get_interleaved_se_golomb
Unexecuted instantiation: sonic.c:get_interleaved_se_golomb
Unexecuted instantiation: ffv1dec.c:get_interleaved_se_golomb
Unexecuted instantiation: rv40.c:get_interleaved_se_golomb
Unexecuted instantiation: aic.c:get_interleaved_se_golomb
Unexecuted instantiation: shorten.c:get_interleaved_se_golomb
rv60dec.c:get_interleaved_se_golomb
Line
Count
Source
302
1.82M
{
303
1.82M
    unsigned int buf;
304
305
#if CACHED_BITSTREAM_READER
306
    buf = show_bits_long(gb, 32);
307
308
    if (buf & 0xAA800000) {
309
        buf >>= 32 - 8;
310
        skip_bits_long(gb, ff_interleaved_golomb_vlc_len[buf]);
311
312
        return ff_interleaved_se_golomb_vlc_code[buf];
313
    } else {
314
        int log;
315
        skip_bits(gb, 8);
316
        buf |= 1 | show_bits(gb, 24);
317
318
        if ((buf & 0xAAAAAAAA) == 0)
319
            return INVALID_VLC;
320
321
        for (log = 31; (buf & 0x80000000) == 0; log--)
322
            buf = (buf << 2) - ((buf << log) >> (log - 1)) + (buf >> 30);
323
324
        skip_bits_long(gb, 63 - 2 * log - 8);
325
326
        return (signed) (((((buf << log) >> log) - 1) ^ -(buf & 0x1)) + 1) >> 1;
327
    }
328
#else
329
1.82M
    OPEN_READER(re, gb);
330
1.82M
    UPDATE_CACHE(re, gb);
331
1.82M
    buf = GET_CACHE(re, gb);
332
333
1.82M
    if (buf & 0xAA800000) {
334
1.46M
        buf >>= 32 - 8;
335
1.46M
        LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
336
1.46M
        CLOSE_READER(re, gb);
337
338
1.46M
        return ff_interleaved_se_golomb_vlc_code[buf];
339
1.46M
    } else {
340
353k
        int log;
341
353k
        LAST_SKIP_BITS(re, gb, 8);
342
353k
        UPDATE_CACHE(re, gb);
343
353k
        buf |= 1 | (GET_CACHE(re, gb) >> 8);
344
345
353k
        if ((buf & 0xAAAAAAAA) == 0)
346
147k
            return INVALID_VLC;
347
348
2.01M
        for (log = 31; (buf & 0x80000000) == 0; log--)
349
1.80M
            buf = (buf << 2) - ((buf << log) >> (log - 1)) + (buf >> 30);
350
351
205k
        LAST_SKIP_BITS(re, gb, 63 - 2 * log - 8);
352
205k
        CLOSE_READER(re, gb);
353
354
205k
        return (signed) (((((buf << log) >> log) - 1) ^ -(buf & 0x1)) + 1) >> 1;
355
353k
    }
356
1.82M
#endif
357
1.82M
}
Unexecuted instantiation: flacdec.c:get_interleaved_se_golomb
Unexecuted instantiation: fic.c:get_interleaved_se_golomb
svq3.c:get_interleaved_se_golomb
Line
Count
Source
302
1.39M
{
303
1.39M
    unsigned int buf;
304
305
#if CACHED_BITSTREAM_READER
306
    buf = show_bits_long(gb, 32);
307
308
    if (buf & 0xAA800000) {
309
        buf >>= 32 - 8;
310
        skip_bits_long(gb, ff_interleaved_golomb_vlc_len[buf]);
311
312
        return ff_interleaved_se_golomb_vlc_code[buf];
313
    } else {
314
        int log;
315
        skip_bits(gb, 8);
316
        buf |= 1 | show_bits(gb, 24);
317
318
        if ((buf & 0xAAAAAAAA) == 0)
319
            return INVALID_VLC;
320
321
        for (log = 31; (buf & 0x80000000) == 0; log--)
322
            buf = (buf << 2) - ((buf << log) >> (log - 1)) + (buf >> 30);
323
324
        skip_bits_long(gb, 63 - 2 * log - 8);
325
326
        return (signed) (((((buf << log) >> log) - 1) ^ -(buf & 0x1)) + 1) >> 1;
327
    }
328
#else
329
1.39M
    OPEN_READER(re, gb);
330
1.39M
    UPDATE_CACHE(re, gb);
331
1.39M
    buf = GET_CACHE(re, gb);
332
333
1.39M
    if (buf & 0xAA800000) {
334
1.37M
        buf >>= 32 - 8;
335
1.37M
        LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
336
1.37M
        CLOSE_READER(re, gb);
337
338
1.37M
        return ff_interleaved_se_golomb_vlc_code[buf];
339
1.37M
    } else {
340
22.8k
        int log;
341
22.8k
        LAST_SKIP_BITS(re, gb, 8);
342
22.8k
        UPDATE_CACHE(re, gb);
343
22.8k
        buf |= 1 | (GET_CACHE(re, gb) >> 8);
344
345
22.8k
        if ((buf & 0xAAAAAAAA) == 0)
346
4.84k
            return INVALID_VLC;
347
348
148k
        for (log = 31; (buf & 0x80000000) == 0; log--)
349
130k
            buf = (buf << 2) - ((buf << log) >> (log - 1)) + (buf >> 30);
350
351
18.0k
        LAST_SKIP_BITS(re, gb, 63 - 2 * log - 8);
352
18.0k
        CLOSE_READER(re, gb);
353
354
18.0k
        return (signed) (((((buf << log) >> log) - 1) ^ -(buf & 0x1)) + 1) >> 1;
355
22.8k
    }
356
1.39M
#endif
357
1.39M
}
Unexecuted instantiation: dstdec.c:get_interleaved_se_golomb
358
359
static inline int dirac_get_se_golomb(GetBitContext *gb)
360
2.21M
{
361
2.21M
    uint32_t ret = get_interleaved_ue_golomb(gb);
362
363
2.21M
    if (ret) {
364
1.35M
        int sign = -get_bits1(gb);
365
1.35M
        ret = (ret ^ sign) - sign;
366
1.35M
    }
367
368
2.21M
    return ret;
369
2.21M
}
Unexecuted instantiation: dovi_rpudec.c:dirac_get_se_golomb
Unexecuted instantiation: evc_parse.c:dirac_get_se_golomb
Unexecuted instantiation: evc_ps.c:dirac_get_se_golomb
Unexecuted instantiation: h264_parse.c:dirac_get_se_golomb
Unexecuted instantiation: h264_ps.c:dirac_get_se_golomb
Unexecuted instantiation: ps.c:dirac_get_se_golomb
Unexecuted instantiation: h2645_vui.c:dirac_get_se_golomb
Unexecuted instantiation: h264_parser.c:dirac_get_se_golomb
Unexecuted instantiation: h264_sei.c:dirac_get_se_golomb
Unexecuted instantiation: parser.c:dirac_get_se_golomb
Unexecuted instantiation: sei.c:dirac_get_se_golomb
Unexecuted instantiation: h2645_sei.c:dirac_get_se_golomb
Unexecuted instantiation: h264dec.c:dirac_get_se_golomb
Unexecuted instantiation: shortendec.c:dirac_get_se_golomb
Unexecuted instantiation: dirac.c:dirac_get_se_golomb
diracdec.c:dirac_get_se_golomb
Line
Count
Source
360
2.21M
{
361
2.21M
    uint32_t ret = get_interleaved_ue_golomb(gb);
362
363
2.21M
    if (ret) {
364
1.35M
        int sign = -get_bits1(gb);
365
1.35M
        ret = (ret ^ sign) - sign;
366
1.35M
    }
367
368
2.21M
    return ret;
369
2.21M
}
Unexecuted instantiation: jpeglsdec.c:dirac_get_se_golomb
Unexecuted instantiation: h264_cavlc.c:dirac_get_se_golomb
Unexecuted instantiation: h264_refs.c:dirac_get_se_golomb
Unexecuted instantiation: h264_slice.c:dirac_get_se_golomb
Unexecuted instantiation: vmixdec.c:dirac_get_se_golomb
Unexecuted instantiation: rv30.c:dirac_get_se_golomb
Unexecuted instantiation: rv34.c:dirac_get_se_golomb
Unexecuted instantiation: loco.c:dirac_get_se_golomb
Unexecuted instantiation: ralf.c:dirac_get_se_golomb
Unexecuted instantiation: cavsdec.c:dirac_get_se_golomb
Unexecuted instantiation: cavs.c:dirac_get_se_golomb
Unexecuted instantiation: hevcdec.c:dirac_get_se_golomb
Unexecuted instantiation: mobiclip.c:dirac_get_se_golomb
Unexecuted instantiation: sonic.c:dirac_get_se_golomb
Unexecuted instantiation: ffv1dec.c:dirac_get_se_golomb
Unexecuted instantiation: rv40.c:dirac_get_se_golomb
Unexecuted instantiation: aic.c:dirac_get_se_golomb
Unexecuted instantiation: shorten.c:dirac_get_se_golomb
Unexecuted instantiation: rv60dec.c:dirac_get_se_golomb
Unexecuted instantiation: flacdec.c:dirac_get_se_golomb
Unexecuted instantiation: fic.c:dirac_get_se_golomb
Unexecuted instantiation: svq3.c:dirac_get_se_golomb
Unexecuted instantiation: dstdec.c:dirac_get_se_golomb
370
371
/**
372
 * read unsigned golomb rice code (ffv1).
373
 */
374
static inline int get_ur_golomb(GetBitContext *gb, int k, int limit,
375
                                int esc_len)
376
33.8M
{
377
33.8M
    unsigned int buf;
378
33.8M
    int log;
379
380
#if CACHED_BITSTREAM_READER
381
    buf = show_bits_long(gb, 32);
382
383
    log = av_log2(buf);
384
385
    if (log > 31 - limit) {
386
        buf >>= log - k;
387
        buf  += (30 - log) << k;
388
        skip_bits_long(gb, 32 + k - log);
389
390
        return buf;
391
    } else {
392
        skip_bits_long(gb, limit);
393
        buf = get_bits_long(gb, esc_len);
394
395
        return buf + limit - 1;
396
    }
397
#else
398
33.8M
    OPEN_READER(re, gb);
399
33.8M
    UPDATE_CACHE(re, gb);
400
33.8M
    buf = GET_CACHE(re, gb);
401
402
33.8M
    log = av_log2(buf);
403
404
33.8M
    if (log > 31 - limit) {
405
16.1M
        av_assert2(log >= k);
406
16.1M
        buf >>= log - k;
407
16.1M
        buf  += (30U - log) << k;
408
16.1M
        LAST_SKIP_BITS(re, gb, 32 + k - log);
409
16.1M
        CLOSE_READER(re, gb);
410
411
16.1M
        return buf;
412
17.6M
    } else {
413
17.6M
        LAST_SKIP_BITS(re, gb, limit);
414
17.6M
        UPDATE_CACHE(re, gb);
415
416
17.6M
        buf = SHOW_UBITS(re, gb, esc_len);
417
418
17.6M
        LAST_SKIP_BITS(re, gb, esc_len);
419
17.6M
        CLOSE_READER(re, gb);
420
421
17.6M
        return buf + limit - 1;
422
17.6M
    }
423
33.8M
#endif
424
33.8M
}
Unexecuted instantiation: dovi_rpudec.c:get_ur_golomb
Unexecuted instantiation: evc_parse.c:get_ur_golomb
Unexecuted instantiation: evc_ps.c:get_ur_golomb
Unexecuted instantiation: h264_parse.c:get_ur_golomb
Unexecuted instantiation: h264_ps.c:get_ur_golomb
Unexecuted instantiation: ps.c:get_ur_golomb
Unexecuted instantiation: h2645_vui.c:get_ur_golomb
Unexecuted instantiation: h264_parser.c:get_ur_golomb
Unexecuted instantiation: h264_sei.c:get_ur_golomb
Unexecuted instantiation: parser.c:get_ur_golomb
Unexecuted instantiation: sei.c:get_ur_golomb
Unexecuted instantiation: h2645_sei.c:get_ur_golomb
Unexecuted instantiation: h264dec.c:get_ur_golomb
Unexecuted instantiation: shortendec.c:get_ur_golomb
Unexecuted instantiation: dirac.c:get_ur_golomb
Unexecuted instantiation: diracdec.c:get_ur_golomb
Unexecuted instantiation: jpeglsdec.c:get_ur_golomb
Unexecuted instantiation: h264_cavlc.c:get_ur_golomb
Unexecuted instantiation: h264_refs.c:get_ur_golomb
Unexecuted instantiation: h264_slice.c:get_ur_golomb
Unexecuted instantiation: vmixdec.c:get_ur_golomb
Unexecuted instantiation: rv30.c:get_ur_golomb
Unexecuted instantiation: rv34.c:get_ur_golomb
Unexecuted instantiation: loco.c:get_ur_golomb
Unexecuted instantiation: ralf.c:get_ur_golomb
Unexecuted instantiation: cavsdec.c:get_ur_golomb
Unexecuted instantiation: cavs.c:get_ur_golomb
Unexecuted instantiation: hevcdec.c:get_ur_golomb
Unexecuted instantiation: mobiclip.c:get_ur_golomb
Unexecuted instantiation: sonic.c:get_ur_golomb
ffv1dec.c:get_ur_golomb
Line
Count
Source
376
33.8M
{
377
33.8M
    unsigned int buf;
378
33.8M
    int log;
379
380
#if CACHED_BITSTREAM_READER
381
    buf = show_bits_long(gb, 32);
382
383
    log = av_log2(buf);
384
385
    if (log > 31 - limit) {
386
        buf >>= log - k;
387
        buf  += (30 - log) << k;
388
        skip_bits_long(gb, 32 + k - log);
389
390
        return buf;
391
    } else {
392
        skip_bits_long(gb, limit);
393
        buf = get_bits_long(gb, esc_len);
394
395
        return buf + limit - 1;
396
    }
397
#else
398
33.8M
    OPEN_READER(re, gb);
399
33.8M
    UPDATE_CACHE(re, gb);
400
33.8M
    buf = GET_CACHE(re, gb);
401
402
33.8M
    log = av_log2(buf);
403
404
33.8M
    if (log > 31 - limit) {
405
16.1M
        av_assert2(log >= k);
406
16.1M
        buf >>= log - k;
407
16.1M
        buf  += (30U - log) << k;
408
16.1M
        LAST_SKIP_BITS(re, gb, 32 + k - log);
409
16.1M
        CLOSE_READER(re, gb);
410
411
16.1M
        return buf;
412
17.6M
    } else {
413
17.6M
        LAST_SKIP_BITS(re, gb, limit);
414
17.6M
        UPDATE_CACHE(re, gb);
415
416
17.6M
        buf = SHOW_UBITS(re, gb, esc_len);
417
418
17.6M
        LAST_SKIP_BITS(re, gb, esc_len);
419
17.6M
        CLOSE_READER(re, gb);
420
421
17.6M
        return buf + limit - 1;
422
17.6M
    }
423
33.8M
#endif
424
33.8M
}
Unexecuted instantiation: rv40.c:get_ur_golomb
Unexecuted instantiation: aic.c:get_ur_golomb
Unexecuted instantiation: shorten.c:get_ur_golomb
Unexecuted instantiation: rv60dec.c:get_ur_golomb
Unexecuted instantiation: flacdec.c:get_ur_golomb
Unexecuted instantiation: fic.c:get_ur_golomb
Unexecuted instantiation: svq3.c:get_ur_golomb
Unexecuted instantiation: dstdec.c:get_ur_golomb
425
426
/**
427
 * read unsigned golomb rice code (jpegls).
428
 *
429
 * @returns -1 on error
430
 */
431
static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit,
432
                                       int esc_len)
433
258M
{
434
258M
    unsigned int buf;
435
258M
    int log;
436
437
#if CACHED_BITSTREAM_READER
438
    buf = show_bits_long(gb, 32);
439
440
    log = av_log2(buf);
441
442
    if (log - k >= 1 && 32 - log < limit) {
443
        buf >>= log - k;
444
        buf  += (30 - log) << k;
445
        skip_bits_long(gb, 32 + k - log);
446
447
        return buf;
448
    } else {
449
        int i;
450
        for (i = 0;
451
             i < limit && get_bits1(gb) == 0 && get_bits_left(gb) > 0;
452
             i++);
453
454
        if (i < limit - 1) {
455
            buf = get_bits_long(gb, k);
456
457
            return buf + (i << k);
458
        } else if (i == limit - 1) {
459
            buf = get_bits_long(gb, esc_len);
460
461
            return buf + 1;
462
        } else
463
            return -1;
464
    }
465
#else
466
258M
    OPEN_READER(re, gb);
467
258M
    UPDATE_CACHE(re, gb);
468
258M
    buf = GET_CACHE(re, gb);
469
470
258M
    log = av_log2(buf);
471
472
258M
    av_assert2(k <= 31);
473
474
258M
    if (log - k >= 32 - MIN_CACHE_BITS + (MIN_CACHE_BITS == 32) &&
475
240M
        32 - log < limit) {
476
240M
        buf >>= log - k;
477
240M
        buf  += (30U - log) << k;
478
240M
        LAST_SKIP_BITS(re, gb, 32 + k - log);
479
240M
        CLOSE_READER(re, gb);
480
481
240M
        return buf;
482
240M
    } else {
483
18.0M
        int i;
484
1.31G
        for (i = 0; i + MIN_CACHE_BITS <= limit && SHOW_UBITS(re, gb, MIN_CACHE_BITS) == 0; i += MIN_CACHE_BITS) {
485
1.30G
            if (gb->size_in_bits <= re_index) {
486
5.60M
                CLOSE_READER(re, gb);
487
5.60M
                return -1;
488
5.60M
            }
489
1.29G
            LAST_SKIP_BITS(re, gb, MIN_CACHE_BITS);
490
1.29G
            UPDATE_CACHE(re, gb);
491
1.29G
        }
492
117M
        for (; i < limit && SHOW_UBITS(re, gb, 1) == 0; i++) {
493
105M
            SKIP_BITS(re, gb, 1);
494
105M
        }
495
12.4M
        LAST_SKIP_BITS(re, gb, 1);
496
12.4M
        UPDATE_CACHE(re, gb);
497
498
12.4M
        if (i < limit - 1) {
499
8.75M
            if (k) {
500
6.33M
                if (k > MIN_CACHE_BITS - 1) {
501
2.10M
                    buf = SHOW_UBITS(re, gb, 16) << (k-16);
502
2.10M
                    LAST_SKIP_BITS(re, gb, 16);
503
2.10M
                    UPDATE_CACHE(re, gb);
504
2.10M
                    buf |= SHOW_UBITS(re, gb, k-16);
505
2.10M
                    LAST_SKIP_BITS(re, gb, k-16);
506
4.23M
                } else {
507
4.23M
                    buf = SHOW_UBITS(re, gb, k);
508
4.23M
                    LAST_SKIP_BITS(re, gb, k);
509
4.23M
                }
510
6.33M
            } else {
511
2.41M
                buf = 0;
512
2.41M
            }
513
514
8.75M
            buf += ((SUINT)i << k);
515
8.75M
        } else if (i == limit - 1) {
516
24.9k
            buf = SHOW_UBITS(re, gb, esc_len);
517
24.9k
            LAST_SKIP_BITS(re, gb, esc_len);
518
519
24.9k
            buf ++;
520
3.63M
        } else {
521
3.63M
            buf = -1;
522
3.63M
        }
523
12.4M
        CLOSE_READER(re, gb);
524
12.4M
        return buf;
525
18.0M
    }
526
258M
#endif
527
258M
}
Unexecuted instantiation: dovi_rpudec.c:get_ur_golomb_jpegls
Unexecuted instantiation: evc_parse.c:get_ur_golomb_jpegls
Unexecuted instantiation: evc_ps.c:get_ur_golomb_jpegls
Unexecuted instantiation: h264_parse.c:get_ur_golomb_jpegls
Unexecuted instantiation: h264_ps.c:get_ur_golomb_jpegls
Unexecuted instantiation: ps.c:get_ur_golomb_jpegls
Unexecuted instantiation: h2645_vui.c:get_ur_golomb_jpegls
Unexecuted instantiation: h264_parser.c:get_ur_golomb_jpegls
Unexecuted instantiation: h264_sei.c:get_ur_golomb_jpegls
Unexecuted instantiation: parser.c:get_ur_golomb_jpegls
Unexecuted instantiation: sei.c:get_ur_golomb_jpegls
Unexecuted instantiation: h2645_sei.c:get_ur_golomb_jpegls
Unexecuted instantiation: h264dec.c:get_ur_golomb_jpegls
shortendec.c:get_ur_golomb_jpegls
Line
Count
Source
433
21.1k
{
434
21.1k
    unsigned int buf;
435
21.1k
    int log;
436
437
#if CACHED_BITSTREAM_READER
438
    buf = show_bits_long(gb, 32);
439
440
    log = av_log2(buf);
441
442
    if (log - k >= 1 && 32 - log < limit) {
443
        buf >>= log - k;
444
        buf  += (30 - log) << k;
445
        skip_bits_long(gb, 32 + k - log);
446
447
        return buf;
448
    } else {
449
        int i;
450
        for (i = 0;
451
             i < limit && get_bits1(gb) == 0 && get_bits_left(gb) > 0;
452
             i++);
453
454
        if (i < limit - 1) {
455
            buf = get_bits_long(gb, k);
456
457
            return buf + (i << k);
458
        } else if (i == limit - 1) {
459
            buf = get_bits_long(gb, esc_len);
460
461
            return buf + 1;
462
        } else
463
            return -1;
464
    }
465
#else
466
21.1k
    OPEN_READER(re, gb);
467
21.1k
    UPDATE_CACHE(re, gb);
468
21.1k
    buf = GET_CACHE(re, gb);
469
470
21.1k
    log = av_log2(buf);
471
472
21.1k
    av_assert2(k <= 31);
473
474
21.1k
    if (log - k >= 32 - MIN_CACHE_BITS + (MIN_CACHE_BITS == 32) &&
475
13.9k
        32 - log < limit) {
476
13.9k
        buf >>= log - k;
477
13.9k
        buf  += (30U - log) << k;
478
13.9k
        LAST_SKIP_BITS(re, gb, 32 + k - log);
479
13.9k
        CLOSE_READER(re, gb);
480
481
13.9k
        return buf;
482
13.9k
    } else {
483
7.17k
        int i;
484
54.2k
        for (i = 0; i + MIN_CACHE_BITS <= limit && SHOW_UBITS(re, gb, MIN_CACHE_BITS) == 0; i += MIN_CACHE_BITS) {
485
47.7k
            if (gb->size_in_bits <= re_index) {
486
674
                CLOSE_READER(re, gb);
487
674
                return -1;
488
674
            }
489
47.0k
            LAST_SKIP_BITS(re, gb, MIN_CACHE_BITS);
490
47.0k
            UPDATE_CACHE(re, gb);
491
47.0k
        }
492
70.7k
        for (; i < limit && SHOW_UBITS(re, gb, 1) == 0; i++) {
493
64.2k
            SKIP_BITS(re, gb, 1);
494
64.2k
        }
495
6.50k
        LAST_SKIP_BITS(re, gb, 1);
496
6.50k
        UPDATE_CACHE(re, gb);
497
498
6.50k
        if (i < limit - 1) {
499
6.50k
            if (k) {
500
4.87k
                if (k > MIN_CACHE_BITS - 1) {
501
1.82k
                    buf = SHOW_UBITS(re, gb, 16) << (k-16);
502
1.82k
                    LAST_SKIP_BITS(re, gb, 16);
503
1.82k
                    UPDATE_CACHE(re, gb);
504
1.82k
                    buf |= SHOW_UBITS(re, gb, k-16);
505
1.82k
                    LAST_SKIP_BITS(re, gb, k-16);
506
3.04k
                } else {
507
3.04k
                    buf = SHOW_UBITS(re, gb, k);
508
3.04k
                    LAST_SKIP_BITS(re, gb, k);
509
3.04k
                }
510
4.87k
            } else {
511
1.63k
                buf = 0;
512
1.63k
            }
513
514
6.50k
            buf += ((SUINT)i << k);
515
6.50k
        } else if (i == limit - 1) {
516
0
            buf = SHOW_UBITS(re, gb, esc_len);
517
0
            LAST_SKIP_BITS(re, gb, esc_len);
518
519
0
            buf ++;
520
0
        } else {
521
0
            buf = -1;
522
0
        }
523
6.50k
        CLOSE_READER(re, gb);
524
6.50k
        return buf;
525
7.17k
    }
526
21.1k
#endif
527
21.1k
}
Unexecuted instantiation: dirac.c:get_ur_golomb_jpegls
Unexecuted instantiation: diracdec.c:get_ur_golomb_jpegls
jpeglsdec.c:get_ur_golomb_jpegls
Line
Count
Source
433
14.5M
{
434
14.5M
    unsigned int buf;
435
14.5M
    int log;
436
437
#if CACHED_BITSTREAM_READER
438
    buf = show_bits_long(gb, 32);
439
440
    log = av_log2(buf);
441
442
    if (log - k >= 1 && 32 - log < limit) {
443
        buf >>= log - k;
444
        buf  += (30 - log) << k;
445
        skip_bits_long(gb, 32 + k - log);
446
447
        return buf;
448
    } else {
449
        int i;
450
        for (i = 0;
451
             i < limit && get_bits1(gb) == 0 && get_bits_left(gb) > 0;
452
             i++);
453
454
        if (i < limit - 1) {
455
            buf = get_bits_long(gb, k);
456
457
            return buf + (i << k);
458
        } else if (i == limit - 1) {
459
            buf = get_bits_long(gb, esc_len);
460
461
            return buf + 1;
462
        } else
463
            return -1;
464
    }
465
#else
466
14.5M
    OPEN_READER(re, gb);
467
14.5M
    UPDATE_CACHE(re, gb);
468
14.5M
    buf = GET_CACHE(re, gb);
469
470
14.5M
    log = av_log2(buf);
471
472
14.5M
    av_assert2(k <= 31);
473
474
14.5M
    if (log - k >= 32 - MIN_CACHE_BITS + (MIN_CACHE_BITS == 32) &&
475
10.8M
        32 - log < limit) {
476
10.8M
        buf >>= log - k;
477
10.8M
        buf  += (30U - log) << k;
478
10.8M
        LAST_SKIP_BITS(re, gb, 32 + k - log);
479
10.8M
        CLOSE_READER(re, gb);
480
481
10.8M
        return buf;
482
10.8M
    } else {
483
3.63M
        int i;
484
8.97M
        for (i = 0; i + MIN_CACHE_BITS <= limit && SHOW_UBITS(re, gb, MIN_CACHE_BITS) == 0; i += MIN_CACHE_BITS) {
485
5.34M
            if (gb->size_in_bits <= re_index) {
486
7.27k
                CLOSE_READER(re, gb);
487
7.27k
                return -1;
488
7.27k
            }
489
5.33M
            LAST_SKIP_BITS(re, gb, MIN_CACHE_BITS);
490
5.33M
            UPDATE_CACHE(re, gb);
491
5.33M
        }
492
38.9M
        for (; i < limit && SHOW_UBITS(re, gb, 1) == 0; i++) {
493
35.3M
            SKIP_BITS(re, gb, 1);
494
35.3M
        }
495
3.62M
        LAST_SKIP_BITS(re, gb, 1);
496
3.62M
        UPDATE_CACHE(re, gb);
497
498
3.62M
        if (i < limit - 1) {
499
163k
            if (k) {
500
141k
                if (k > MIN_CACHE_BITS - 1) {
501
0
                    buf = SHOW_UBITS(re, gb, 16) << (k-16);
502
0
                    LAST_SKIP_BITS(re, gb, 16);
503
0
                    UPDATE_CACHE(re, gb);
504
0
                    buf |= SHOW_UBITS(re, gb, k-16);
505
0
                    LAST_SKIP_BITS(re, gb, k-16);
506
141k
                } else {
507
141k
                    buf = SHOW_UBITS(re, gb, k);
508
141k
                    LAST_SKIP_BITS(re, gb, k);
509
141k
                }
510
141k
            } else {
511
21.4k
                buf = 0;
512
21.4k
            }
513
514
163k
            buf += ((SUINT)i << k);
515
3.46M
        } else if (i == limit - 1) {
516
23.1k
            buf = SHOW_UBITS(re, gb, esc_len);
517
23.1k
            LAST_SKIP_BITS(re, gb, esc_len);
518
519
23.1k
            buf ++;
520
3.44M
        } else {
521
3.44M
            buf = -1;
522
3.44M
        }
523
3.62M
        CLOSE_READER(re, gb);
524
3.62M
        return buf;
525
3.63M
    }
526
14.5M
#endif
527
14.5M
}
Unexecuted instantiation: h264_cavlc.c:get_ur_golomb_jpegls
Unexecuted instantiation: h264_refs.c:get_ur_golomb_jpegls
Unexecuted instantiation: h264_slice.c:get_ur_golomb_jpegls
Unexecuted instantiation: vmixdec.c:get_ur_golomb_jpegls
Unexecuted instantiation: rv30.c:get_ur_golomb_jpegls
Unexecuted instantiation: rv34.c:get_ur_golomb_jpegls
loco.c:get_ur_golomb_jpegls
Line
Count
Source
433
3.41M
{
434
3.41M
    unsigned int buf;
435
3.41M
    int log;
436
437
#if CACHED_BITSTREAM_READER
438
    buf = show_bits_long(gb, 32);
439
440
    log = av_log2(buf);
441
442
    if (log - k >= 1 && 32 - log < limit) {
443
        buf >>= log - k;
444
        buf  += (30 - log) << k;
445
        skip_bits_long(gb, 32 + k - log);
446
447
        return buf;
448
    } else {
449
        int i;
450
        for (i = 0;
451
             i < limit && get_bits1(gb) == 0 && get_bits_left(gb) > 0;
452
             i++);
453
454
        if (i < limit - 1) {
455
            buf = get_bits_long(gb, k);
456
457
            return buf + (i << k);
458
        } else if (i == limit - 1) {
459
            buf = get_bits_long(gb, esc_len);
460
461
            return buf + 1;
462
        } else
463
            return -1;
464
    }
465
#else
466
3.41M
    OPEN_READER(re, gb);
467
3.41M
    UPDATE_CACHE(re, gb);
468
3.41M
    buf = GET_CACHE(re, gb);
469
470
3.41M
    log = av_log2(buf);
471
472
3.41M
    av_assert2(k <= 31);
473
474
3.41M
    if (log - k >= 32 - MIN_CACHE_BITS + (MIN_CACHE_BITS == 32) &&
475
3.26M
        32 - log < limit) {
476
3.26M
        buf >>= log - k;
477
3.26M
        buf  += (30U - log) << k;
478
3.26M
        LAST_SKIP_BITS(re, gb, 32 + k - log);
479
3.26M
        CLOSE_READER(re, gb);
480
481
3.26M
        return buf;
482
3.26M
    } else {
483
154k
        int i;
484
17.7M
        for (i = 0; i + MIN_CACHE_BITS <= limit && SHOW_UBITS(re, gb, MIN_CACHE_BITS) == 0; i += MIN_CACHE_BITS) {
485
17.6M
            if (gb->size_in_bits <= re_index) {
486
54.5k
                CLOSE_READER(re, gb);
487
54.5k
                return -1;
488
54.5k
            }
489
17.6M
            LAST_SKIP_BITS(re, gb, MIN_CACHE_BITS);
490
17.6M
            UPDATE_CACHE(re, gb);
491
17.6M
        }
492
1.44M
        for (; i < limit && SHOW_UBITS(re, gb, 1) == 0; i++) {
493
1.34M
            SKIP_BITS(re, gb, 1);
494
1.34M
        }
495
99.9k
        LAST_SKIP_BITS(re, gb, 1);
496
99.9k
        UPDATE_CACHE(re, gb);
497
498
99.9k
        if (i < limit - 1) {
499
99.9k
            if (k) {
500
94.5k
                if (k > MIN_CACHE_BITS - 1) {
501
0
                    buf = SHOW_UBITS(re, gb, 16) << (k-16);
502
0
                    LAST_SKIP_BITS(re, gb, 16);
503
0
                    UPDATE_CACHE(re, gb);
504
0
                    buf |= SHOW_UBITS(re, gb, k-16);
505
0
                    LAST_SKIP_BITS(re, gb, k-16);
506
94.5k
                } else {
507
94.5k
                    buf = SHOW_UBITS(re, gb, k);
508
94.5k
                    LAST_SKIP_BITS(re, gb, k);
509
94.5k
                }
510
94.5k
            } else {
511
5.39k
                buf = 0;
512
5.39k
            }
513
514
99.9k
            buf += ((SUINT)i << k);
515
99.9k
        } else if (i == limit - 1) {
516
0
            buf = SHOW_UBITS(re, gb, esc_len);
517
0
            LAST_SKIP_BITS(re, gb, esc_len);
518
519
0
            buf ++;
520
0
        } else {
521
0
            buf = -1;
522
0
        }
523
99.9k
        CLOSE_READER(re, gb);
524
99.9k
        return buf;
525
154k
    }
526
3.41M
#endif
527
3.41M
}
Unexecuted instantiation: ralf.c:get_ur_golomb_jpegls
Unexecuted instantiation: cavsdec.c:get_ur_golomb_jpegls
Unexecuted instantiation: cavs.c:get_ur_golomb_jpegls
Unexecuted instantiation: hevcdec.c:get_ur_golomb_jpegls
Unexecuted instantiation: mobiclip.c:get_ur_golomb_jpegls
Unexecuted instantiation: sonic.c:get_ur_golomb_jpegls
Unexecuted instantiation: ffv1dec.c:get_ur_golomb_jpegls
Unexecuted instantiation: rv40.c:get_ur_golomb_jpegls
Unexecuted instantiation: aic.c:get_ur_golomb_jpegls
shorten.c:get_ur_golomb_jpegls
Line
Count
Source
433
9.72M
{
434
9.72M
    unsigned int buf;
435
9.72M
    int log;
436
437
#if CACHED_BITSTREAM_READER
438
    buf = show_bits_long(gb, 32);
439
440
    log = av_log2(buf);
441
442
    if (log - k >= 1 && 32 - log < limit) {
443
        buf >>= log - k;
444
        buf  += (30 - log) << k;
445
        skip_bits_long(gb, 32 + k - log);
446
447
        return buf;
448
    } else {
449
        int i;
450
        for (i = 0;
451
             i < limit && get_bits1(gb) == 0 && get_bits_left(gb) > 0;
452
             i++);
453
454
        if (i < limit - 1) {
455
            buf = get_bits_long(gb, k);
456
457
            return buf + (i << k);
458
        } else if (i == limit - 1) {
459
            buf = get_bits_long(gb, esc_len);
460
461
            return buf + 1;
462
        } else
463
            return -1;
464
    }
465
#else
466
9.72M
    OPEN_READER(re, gb);
467
9.72M
    UPDATE_CACHE(re, gb);
468
9.72M
    buf = GET_CACHE(re, gb);
469
470
9.72M
    log = av_log2(buf);
471
472
9.72M
    av_assert2(k <= 31);
473
474
9.72M
    if (log - k >= 32 - MIN_CACHE_BITS + (MIN_CACHE_BITS == 32) &&
475
3.73M
        32 - log < limit) {
476
3.73M
        buf >>= log - k;
477
3.73M
        buf  += (30U - log) << k;
478
3.73M
        LAST_SKIP_BITS(re, gb, 32 + k - log);
479
3.73M
        CLOSE_READER(re, gb);
480
481
3.73M
        return buf;
482
5.99M
    } else {
483
5.99M
        int i;
484
11.5M
        for (i = 0; i + MIN_CACHE_BITS <= limit && SHOW_UBITS(re, gb, MIN_CACHE_BITS) == 0; i += MIN_CACHE_BITS) {
485
11.0M
            if (gb->size_in_bits <= re_index) {
486
5.44M
                CLOSE_READER(re, gb);
487
5.44M
                return -1;
488
5.44M
            }
489
5.57M
            LAST_SKIP_BITS(re, gb, MIN_CACHE_BITS);
490
5.57M
            UPDATE_CACHE(re, gb);
491
5.57M
        }
492
4.21M
        for (; i < limit && SHOW_UBITS(re, gb, 1) == 0; i++) {
493
3.66M
            SKIP_BITS(re, gb, 1);
494
3.66M
        }
495
548k
        LAST_SKIP_BITS(re, gb, 1);
496
548k
        UPDATE_CACHE(re, gb);
497
498
548k
        if (i < limit - 1) {
499
548k
            if (k) {
500
548k
                if (k > MIN_CACHE_BITS - 1) {
501
206k
                    buf = SHOW_UBITS(re, gb, 16) << (k-16);
502
206k
                    LAST_SKIP_BITS(re, gb, 16);
503
206k
                    UPDATE_CACHE(re, gb);
504
206k
                    buf |= SHOW_UBITS(re, gb, k-16);
505
206k
                    LAST_SKIP_BITS(re, gb, k-16);
506
341k
                } else {
507
341k
                    buf = SHOW_UBITS(re, gb, k);
508
341k
                    LAST_SKIP_BITS(re, gb, k);
509
341k
                }
510
548k
            } else {
511
390
                buf = 0;
512
390
            }
513
514
548k
            buf += ((SUINT)i << k);
515
548k
        } else if (i == limit - 1) {
516
0
            buf = SHOW_UBITS(re, gb, esc_len);
517
0
            LAST_SKIP_BITS(re, gb, esc_len);
518
519
0
            buf ++;
520
0
        } else {
521
0
            buf = -1;
522
0
        }
523
548k
        CLOSE_READER(re, gb);
524
548k
        return buf;
525
5.99M
    }
526
9.72M
#endif
527
9.72M
}
Unexecuted instantiation: rv60dec.c:get_ur_golomb_jpegls
flacdec.c:get_ur_golomb_jpegls
Line
Count
Source
433
230M
{
434
230M
    unsigned int buf;
435
230M
    int log;
436
437
#if CACHED_BITSTREAM_READER
438
    buf = show_bits_long(gb, 32);
439
440
    log = av_log2(buf);
441
442
    if (log - k >= 1 && 32 - log < limit) {
443
        buf >>= log - k;
444
        buf  += (30 - log) << k;
445
        skip_bits_long(gb, 32 + k - log);
446
447
        return buf;
448
    } else {
449
        int i;
450
        for (i = 0;
451
             i < limit && get_bits1(gb) == 0 && get_bits_left(gb) > 0;
452
             i++);
453
454
        if (i < limit - 1) {
455
            buf = get_bits_long(gb, k);
456
457
            return buf + (i << k);
458
        } else if (i == limit - 1) {
459
            buf = get_bits_long(gb, esc_len);
460
461
            return buf + 1;
462
        } else
463
            return -1;
464
    }
465
#else
466
230M
    OPEN_READER(re, gb);
467
230M
    UPDATE_CACHE(re, gb);
468
230M
    buf = GET_CACHE(re, gb);
469
470
230M
    log = av_log2(buf);
471
472
230M
    av_assert2(k <= 31);
473
474
230M
    if (log - k >= 32 - MIN_CACHE_BITS + (MIN_CACHE_BITS == 32) &&
475
222M
        32 - log < limit) {
476
222M
        buf >>= log - k;
477
222M
        buf  += (30U - log) << k;
478
222M
        LAST_SKIP_BITS(re, gb, 32 + k - log);
479
222M
        CLOSE_READER(re, gb);
480
481
222M
        return buf;
482
222M
    } else {
483
8.03M
        int i;
484
1.27G
        for (i = 0; i + MIN_CACHE_BITS <= limit && SHOW_UBITS(re, gb, MIN_CACHE_BITS) == 0; i += MIN_CACHE_BITS) {
485
1.26G
            if (gb->size_in_bits <= re_index) {
486
94.2k
                CLOSE_READER(re, gb);
487
94.2k
                return -1;
488
94.2k
            }
489
1.26G
            LAST_SKIP_BITS(re, gb, MIN_CACHE_BITS);
490
1.26G
            UPDATE_CACHE(re, gb);
491
1.26G
        }
492
72.9M
        for (; i < limit && SHOW_UBITS(re, gb, 1) == 0; i++) {
493
64.9M
            SKIP_BITS(re, gb, 1);
494
64.9M
        }
495
7.93M
        LAST_SKIP_BITS(re, gb, 1);
496
7.93M
        UPDATE_CACHE(re, gb);
497
498
7.93M
        if (i < limit - 1) {
499
7.93M
            if (k) {
500
5.54M
                if (k > MIN_CACHE_BITS - 1) {
501
1.90M
                    buf = SHOW_UBITS(re, gb, 16) << (k-16);
502
1.90M
                    LAST_SKIP_BITS(re, gb, 16);
503
1.90M
                    UPDATE_CACHE(re, gb);
504
1.90M
                    buf |= SHOW_UBITS(re, gb, k-16);
505
1.90M
                    LAST_SKIP_BITS(re, gb, k-16);
506
3.64M
                } else {
507
3.64M
                    buf = SHOW_UBITS(re, gb, k);
508
3.64M
                    LAST_SKIP_BITS(re, gb, k);
509
3.64M
                }
510
5.54M
            } else {
511
2.38M
                buf = 0;
512
2.38M
            }
513
514
7.93M
            buf += ((SUINT)i << k);
515
7.93M
        } else if (i == limit - 1) {
516
1.19k
            buf = SHOW_UBITS(re, gb, esc_len);
517
1.19k
            LAST_SKIP_BITS(re, gb, esc_len);
518
519
1.19k
            buf ++;
520
3.63k
        } else {
521
3.63k
            buf = -1;
522
3.63k
        }
523
7.93M
        CLOSE_READER(re, gb);
524
7.93M
        return buf;
525
8.03M
    }
526
230M
#endif
527
230M
}
Unexecuted instantiation: fic.c:get_ur_golomb_jpegls
Unexecuted instantiation: svq3.c:get_ur_golomb_jpegls
dstdec.c:get_ur_golomb_jpegls
Line
Count
Source
433
300k
{
434
300k
    unsigned int buf;
435
300k
    int log;
436
437
#if CACHED_BITSTREAM_READER
438
    buf = show_bits_long(gb, 32);
439
440
    log = av_log2(buf);
441
442
    if (log - k >= 1 && 32 - log < limit) {
443
        buf >>= log - k;
444
        buf  += (30 - log) << k;
445
        skip_bits_long(gb, 32 + k - log);
446
447
        return buf;
448
    } else {
449
        int i;
450
        for (i = 0;
451
             i < limit && get_bits1(gb) == 0 && get_bits_left(gb) > 0;
452
             i++);
453
454
        if (i < limit - 1) {
455
            buf = get_bits_long(gb, k);
456
457
            return buf + (i << k);
458
        } else if (i == limit - 1) {
459
            buf = get_bits_long(gb, esc_len);
460
461
            return buf + 1;
462
        } else
463
            return -1;
464
    }
465
#else
466
300k
    OPEN_READER(re, gb);
467
300k
    UPDATE_CACHE(re, gb);
468
300k
    buf = GET_CACHE(re, gb);
469
470
300k
    log = av_log2(buf);
471
472
300k
    av_assert2(k <= 31);
473
474
300k
    if (log - k >= 32 - MIN_CACHE_BITS + (MIN_CACHE_BITS == 32) &&
475
105k
        32 - log < limit) {
476
104k
        buf >>= log - k;
477
104k
        buf  += (30U - log) << k;
478
104k
        LAST_SKIP_BITS(re, gb, 32 + k - log);
479
104k
        CLOSE_READER(re, gb);
480
481
104k
        return buf;
482
196k
    } else {
483
196k
        int i;
484
5.28M
        for (i = 0; i + MIN_CACHE_BITS <= limit && SHOW_UBITS(re, gb, MIN_CACHE_BITS) == 0; i += MIN_CACHE_BITS) {
485
5.08M
            if (gb->size_in_bits <= re_index) {
486
0
                CLOSE_READER(re, gb);
487
0
                return -1;
488
0
            }
489
5.08M
            LAST_SKIP_BITS(re, gb, MIN_CACHE_BITS);
490
5.08M
            UPDATE_CACHE(re, gb);
491
5.08M
        }
492
268k
        for (; i < limit && SHOW_UBITS(re, gb, 1) == 0; i++) {
493
71.9k
            SKIP_BITS(re, gb, 1);
494
71.9k
        }
495
196k
        LAST_SKIP_BITS(re, gb, 1);
496
196k
        UPDATE_CACHE(re, gb);
497
498
196k
        if (i < limit - 1) {
499
5.83k
            if (k) {
500
4.74k
                if (k > MIN_CACHE_BITS - 1) {
501
0
                    buf = SHOW_UBITS(re, gb, 16) << (k-16);
502
0
                    LAST_SKIP_BITS(re, gb, 16);
503
0
                    UPDATE_CACHE(re, gb);
504
0
                    buf |= SHOW_UBITS(re, gb, k-16);
505
0
                    LAST_SKIP_BITS(re, gb, k-16);
506
4.74k
                } else {
507
4.74k
                    buf = SHOW_UBITS(re, gb, k);
508
4.74k
                    LAST_SKIP_BITS(re, gb, k);
509
4.74k
                }
510
4.74k
            } else {
511
1.09k
                buf = 0;
512
1.09k
            }
513
514
5.83k
            buf += ((SUINT)i << k);
515
190k
        } else if (i == limit - 1) {
516
546
            buf = SHOW_UBITS(re, gb, esc_len);
517
546
            LAST_SKIP_BITS(re, gb, esc_len);
518
519
546
            buf ++;
520
189k
        } else {
521
189k
            buf = -1;
522
189k
        }
523
196k
        CLOSE_READER(re, gb);
524
196k
        return buf;
525
196k
    }
526
300k
#endif
527
300k
}
528
529
/**
530
 * read signed golomb rice code (ffv1).
531
 */
532
static inline int get_sr_golomb(GetBitContext *gb, int k, int limit,
533
                                int esc_len)
534
33.8M
{
535
33.8M
    unsigned v = get_ur_golomb(gb, k, limit, esc_len);
536
33.8M
    return (v >> 1) ^ -(v & 1);
537
33.8M
}
Unexecuted instantiation: dovi_rpudec.c:get_sr_golomb
Unexecuted instantiation: evc_parse.c:get_sr_golomb
Unexecuted instantiation: evc_ps.c:get_sr_golomb
Unexecuted instantiation: h264_parse.c:get_sr_golomb
Unexecuted instantiation: h264_ps.c:get_sr_golomb
Unexecuted instantiation: ps.c:get_sr_golomb
Unexecuted instantiation: h2645_vui.c:get_sr_golomb
Unexecuted instantiation: h264_parser.c:get_sr_golomb
Unexecuted instantiation: h264_sei.c:get_sr_golomb
Unexecuted instantiation: parser.c:get_sr_golomb
Unexecuted instantiation: sei.c:get_sr_golomb
Unexecuted instantiation: h2645_sei.c:get_sr_golomb
Unexecuted instantiation: h264dec.c:get_sr_golomb
Unexecuted instantiation: shortendec.c:get_sr_golomb
Unexecuted instantiation: dirac.c:get_sr_golomb
Unexecuted instantiation: diracdec.c:get_sr_golomb
Unexecuted instantiation: jpeglsdec.c:get_sr_golomb
Unexecuted instantiation: h264_cavlc.c:get_sr_golomb
Unexecuted instantiation: h264_refs.c:get_sr_golomb
Unexecuted instantiation: h264_slice.c:get_sr_golomb
Unexecuted instantiation: vmixdec.c:get_sr_golomb
Unexecuted instantiation: rv30.c:get_sr_golomb
Unexecuted instantiation: rv34.c:get_sr_golomb
Unexecuted instantiation: loco.c:get_sr_golomb
Unexecuted instantiation: ralf.c:get_sr_golomb
Unexecuted instantiation: cavsdec.c:get_sr_golomb
Unexecuted instantiation: cavs.c:get_sr_golomb
Unexecuted instantiation: hevcdec.c:get_sr_golomb
Unexecuted instantiation: mobiclip.c:get_sr_golomb
Unexecuted instantiation: sonic.c:get_sr_golomb
ffv1dec.c:get_sr_golomb
Line
Count
Source
534
33.8M
{
535
33.8M
    unsigned v = get_ur_golomb(gb, k, limit, esc_len);
536
33.8M
    return (v >> 1) ^ -(v & 1);
537
33.8M
}
Unexecuted instantiation: rv40.c:get_sr_golomb
Unexecuted instantiation: aic.c:get_sr_golomb
Unexecuted instantiation: shorten.c:get_sr_golomb
Unexecuted instantiation: rv60dec.c:get_sr_golomb
Unexecuted instantiation: flacdec.c:get_sr_golomb
Unexecuted instantiation: fic.c:get_sr_golomb
Unexecuted instantiation: svq3.c:get_sr_golomb
Unexecuted instantiation: dstdec.c:get_sr_golomb
538
539
/**
540
 * read signed golomb rice code (flac).
541
 *
542
 * @returns INT_MIN on error
543
 */
544
static inline int get_sr_golomb_flac(GetBitContext *gb, int k, int limit,
545
                                     int esc_len)
546
230M
{
547
230M
    unsigned v = get_ur_golomb_jpegls(gb, k, limit, esc_len);
548
230M
    return (v >> 1) ^ -(v & 1);
549
230M
}
Unexecuted instantiation: dovi_rpudec.c:get_sr_golomb_flac
Unexecuted instantiation: evc_parse.c:get_sr_golomb_flac
Unexecuted instantiation: evc_ps.c:get_sr_golomb_flac
Unexecuted instantiation: h264_parse.c:get_sr_golomb_flac
Unexecuted instantiation: h264_ps.c:get_sr_golomb_flac
Unexecuted instantiation: ps.c:get_sr_golomb_flac
Unexecuted instantiation: h2645_vui.c:get_sr_golomb_flac
Unexecuted instantiation: h264_parser.c:get_sr_golomb_flac
Unexecuted instantiation: h264_sei.c:get_sr_golomb_flac
Unexecuted instantiation: parser.c:get_sr_golomb_flac
Unexecuted instantiation: sei.c:get_sr_golomb_flac
Unexecuted instantiation: h2645_sei.c:get_sr_golomb_flac
Unexecuted instantiation: h264dec.c:get_sr_golomb_flac
Unexecuted instantiation: shortendec.c:get_sr_golomb_flac
Unexecuted instantiation: dirac.c:get_sr_golomb_flac
Unexecuted instantiation: diracdec.c:get_sr_golomb_flac
Unexecuted instantiation: jpeglsdec.c:get_sr_golomb_flac
Unexecuted instantiation: h264_cavlc.c:get_sr_golomb_flac
Unexecuted instantiation: h264_refs.c:get_sr_golomb_flac
Unexecuted instantiation: h264_slice.c:get_sr_golomb_flac
Unexecuted instantiation: vmixdec.c:get_sr_golomb_flac
Unexecuted instantiation: rv30.c:get_sr_golomb_flac
Unexecuted instantiation: rv34.c:get_sr_golomb_flac
Unexecuted instantiation: loco.c:get_sr_golomb_flac
Unexecuted instantiation: ralf.c:get_sr_golomb_flac
Unexecuted instantiation: cavsdec.c:get_sr_golomb_flac
Unexecuted instantiation: cavs.c:get_sr_golomb_flac
Unexecuted instantiation: hevcdec.c:get_sr_golomb_flac
Unexecuted instantiation: mobiclip.c:get_sr_golomb_flac
Unexecuted instantiation: sonic.c:get_sr_golomb_flac
Unexecuted instantiation: ffv1dec.c:get_sr_golomb_flac
Unexecuted instantiation: rv40.c:get_sr_golomb_flac
Unexecuted instantiation: aic.c:get_sr_golomb_flac
Unexecuted instantiation: shorten.c:get_sr_golomb_flac
Unexecuted instantiation: rv60dec.c:get_sr_golomb_flac
flacdec.c:get_sr_golomb_flac
Line
Count
Source
546
230M
{
547
230M
    unsigned v = get_ur_golomb_jpegls(gb, k, limit, esc_len);
548
230M
    return (v >> 1) ^ -(v & 1);
549
230M
}
Unexecuted instantiation: fic.c:get_sr_golomb_flac
Unexecuted instantiation: svq3.c:get_sr_golomb_flac
Unexecuted instantiation: dstdec.c:get_sr_golomb_flac
550
551
/**
552
 * read unsigned golomb rice code (shorten).
553
 */
554
static inline unsigned int get_ur_golomb_shorten(GetBitContext *gb, int k)
555
2.85M
{
556
2.85M
    return get_ur_golomb_jpegls(gb, k, INT_MAX, 0);
557
2.85M
}
Unexecuted instantiation: dovi_rpudec.c:get_ur_golomb_shorten
Unexecuted instantiation: evc_parse.c:get_ur_golomb_shorten
Unexecuted instantiation: evc_ps.c:get_ur_golomb_shorten
Unexecuted instantiation: h264_parse.c:get_ur_golomb_shorten
Unexecuted instantiation: h264_ps.c:get_ur_golomb_shorten
Unexecuted instantiation: ps.c:get_ur_golomb_shorten
Unexecuted instantiation: h2645_vui.c:get_ur_golomb_shorten
Unexecuted instantiation: h264_parser.c:get_ur_golomb_shorten
Unexecuted instantiation: h264_sei.c:get_ur_golomb_shorten
Unexecuted instantiation: parser.c:get_ur_golomb_shorten
Unexecuted instantiation: sei.c:get_ur_golomb_shorten
Unexecuted instantiation: h2645_sei.c:get_ur_golomb_shorten
Unexecuted instantiation: h264dec.c:get_ur_golomb_shorten
shortendec.c:get_ur_golomb_shorten
Line
Count
Source
555
21.1k
{
556
    return get_ur_golomb_jpegls(gb, k, INT_MAX, 0);
557
21.1k
}
Unexecuted instantiation: dirac.c:get_ur_golomb_shorten
Unexecuted instantiation: diracdec.c:get_ur_golomb_shorten
Unexecuted instantiation: jpeglsdec.c:get_ur_golomb_shorten
Unexecuted instantiation: h264_cavlc.c:get_ur_golomb_shorten
Unexecuted instantiation: h264_refs.c:get_ur_golomb_shorten
Unexecuted instantiation: h264_slice.c:get_ur_golomb_shorten
Unexecuted instantiation: vmixdec.c:get_ur_golomb_shorten
Unexecuted instantiation: rv30.c:get_ur_golomb_shorten
Unexecuted instantiation: rv34.c:get_ur_golomb_shorten
Unexecuted instantiation: loco.c:get_ur_golomb_shorten
Unexecuted instantiation: ralf.c:get_ur_golomb_shorten
Unexecuted instantiation: cavsdec.c:get_ur_golomb_shorten
Unexecuted instantiation: cavs.c:get_ur_golomb_shorten
Unexecuted instantiation: hevcdec.c:get_ur_golomb_shorten
Unexecuted instantiation: mobiclip.c:get_ur_golomb_shorten
Unexecuted instantiation: sonic.c:get_ur_golomb_shorten
Unexecuted instantiation: ffv1dec.c:get_ur_golomb_shorten
Unexecuted instantiation: rv40.c:get_ur_golomb_shorten
Unexecuted instantiation: aic.c:get_ur_golomb_shorten
shorten.c:get_ur_golomb_shorten
Line
Count
Source
555
2.83M
{
556
    return get_ur_golomb_jpegls(gb, k, INT_MAX, 0);
557
2.83M
}
Unexecuted instantiation: rv60dec.c:get_ur_golomb_shorten
Unexecuted instantiation: flacdec.c:get_ur_golomb_shorten
Unexecuted instantiation: fic.c:get_ur_golomb_shorten
Unexecuted instantiation: svq3.c:get_ur_golomb_shorten
Unexecuted instantiation: dstdec.c:get_ur_golomb_shorten
558
559
/**
560
 * read signed golomb rice code (shorten).
561
 */
562
static inline int get_sr_golomb_shorten(GetBitContext *gb, int k)
563
6.89M
{
564
    int uvar = get_ur_golomb_jpegls(gb, k + 1, INT_MAX, 0);
565
6.89M
    return (uvar >> 1) ^ -(uvar & 1);
566
6.89M
}
Unexecuted instantiation: dovi_rpudec.c:get_sr_golomb_shorten
Unexecuted instantiation: evc_parse.c:get_sr_golomb_shorten
Unexecuted instantiation: evc_ps.c:get_sr_golomb_shorten
Unexecuted instantiation: h264_parse.c:get_sr_golomb_shorten
Unexecuted instantiation: h264_ps.c:get_sr_golomb_shorten
Unexecuted instantiation: ps.c:get_sr_golomb_shorten
Unexecuted instantiation: h2645_vui.c:get_sr_golomb_shorten
Unexecuted instantiation: h264_parser.c:get_sr_golomb_shorten
Unexecuted instantiation: h264_sei.c:get_sr_golomb_shorten
Unexecuted instantiation: parser.c:get_sr_golomb_shorten
Unexecuted instantiation: sei.c:get_sr_golomb_shorten
Unexecuted instantiation: h2645_sei.c:get_sr_golomb_shorten
Unexecuted instantiation: h264dec.c:get_sr_golomb_shorten
Unexecuted instantiation: shortendec.c:get_sr_golomb_shorten
Unexecuted instantiation: dirac.c:get_sr_golomb_shorten
Unexecuted instantiation: diracdec.c:get_sr_golomb_shorten
Unexecuted instantiation: jpeglsdec.c:get_sr_golomb_shorten
Unexecuted instantiation: h264_cavlc.c:get_sr_golomb_shorten
Unexecuted instantiation: h264_refs.c:get_sr_golomb_shorten
Unexecuted instantiation: h264_slice.c:get_sr_golomb_shorten
Unexecuted instantiation: vmixdec.c:get_sr_golomb_shorten
Unexecuted instantiation: rv30.c:get_sr_golomb_shorten
Unexecuted instantiation: rv34.c:get_sr_golomb_shorten
Unexecuted instantiation: loco.c:get_sr_golomb_shorten
Unexecuted instantiation: ralf.c:get_sr_golomb_shorten
Unexecuted instantiation: cavsdec.c:get_sr_golomb_shorten
Unexecuted instantiation: cavs.c:get_sr_golomb_shorten
Unexecuted instantiation: hevcdec.c:get_sr_golomb_shorten
Unexecuted instantiation: mobiclip.c:get_sr_golomb_shorten
Unexecuted instantiation: sonic.c:get_sr_golomb_shorten
Unexecuted instantiation: ffv1dec.c:get_sr_golomb_shorten
Unexecuted instantiation: rv40.c:get_sr_golomb_shorten
Unexecuted instantiation: aic.c:get_sr_golomb_shorten
shorten.c:get_sr_golomb_shorten
Line
Count
Source
563
6.89M
{
564
    int uvar = get_ur_golomb_jpegls(gb, k + 1, INT_MAX, 0);
565
6.89M
    return (uvar >> 1) ^ -(uvar & 1);
566
6.89M
}
Unexecuted instantiation: rv60dec.c:get_sr_golomb_shorten
Unexecuted instantiation: flacdec.c:get_sr_golomb_shorten
Unexecuted instantiation: fic.c:get_sr_golomb_shorten
Unexecuted instantiation: svq3.c:get_sr_golomb_shorten
Unexecuted instantiation: dstdec.c:get_sr_golomb_shorten
567
568
#ifdef TRACE
569
570
static inline int get_ue(GetBitContext *s, const char *file, const char *func,
571
                         int line)
572
{
573
    int show = show_bits(s, 24);
574
    int pos  = get_bits_count(s);
575
    int i    = get_ue_golomb(s);
576
    int len  = get_bits_count(s) - pos;
577
    int bits = show >> (24 - len);
578
579
    av_log(NULL, AV_LOG_DEBUG, "%5d %2d %3d ue  @%5d in %s %s:%d\n",
580
           bits, len, i, pos, file, func, line);
581
582
    return i;
583
}
584
585
static inline int get_se(GetBitContext *s, const char *file, const char *func,
586
                         int line)
587
{
588
    int show = show_bits(s, 24);
589
    int pos  = get_bits_count(s);
590
    int i    = get_se_golomb(s);
591
    int len  = get_bits_count(s) - pos;
592
    int bits = show >> (24 - len);
593
594
    av_log(NULL, AV_LOG_DEBUG, "%5d %2d %3d se  @%5d in %s %s:%d\n",
595
           bits, len, i, pos, file, func, line);
596
597
    return i;
598
}
599
600
static inline int get_te(GetBitContext *s, int r, char *file, const char *func,
601
                         int line)
602
{
603
    int show = show_bits(s, 24);
604
    int pos  = get_bits_count(s);
605
    int i    = get_te0_golomb(s, r);
606
    int len  = get_bits_count(s) - pos;
607
    int bits = show >> (24 - len);
608
609
    av_log(NULL, AV_LOG_DEBUG, "%5d %2d %3d te  @%5d in %s %s:%d\n",
610
           bits, len, i, pos, file, func, line);
611
612
    return i;
613
}
614
615
#define get_ue_golomb(a) get_ue(a, __FILE__, __func__, __LINE__)
616
#define get_se_golomb(a) get_se(a, __FILE__, __func__, __LINE__)
617
#define get_te_golomb(a, r)  get_te(a, r, __FILE__, __func__, __LINE__)
618
#define get_te0_golomb(a, r) get_te(a, r, __FILE__, __func__, __LINE__)
619
620
#endif /* TRACE */
621
#endif /* AVCODEC_GOLOMB_H */