Coverage Report

Created: 2026-10-28 08:13

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.27M
#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
94.3M
{
55
94.3M
    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
94.3M
    OPEN_READER(re, gb);
78
94.3M
    UPDATE_CACHE(re, gb);
79
94.3M
    buf = GET_CACHE(re, gb);
80
81
94.3M
    if (buf >= (1 << 27)) {
82
88.8M
        buf >>= 32 - 9;
83
88.8M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
88.8M
        CLOSE_READER(re, gb);
85
86
88.8M
        return ff_ue_golomb_vlc_code[buf];
87
88.8M
    } else {
88
5.47M
        int log = 2 * av_log2(buf) - 31;
89
5.47M
        LAST_SKIP_BITS(re, gb, 32 - log);
90
5.47M
        CLOSE_READER(re, gb);
91
5.47M
        if (log < 7)
92
3.06M
            return AVERROR_INVALIDDATA;
93
2.41M
        buf >>= log;
94
2.41M
        buf--;
95
96
2.41M
        return buf;
97
5.47M
    }
98
94.3M
#endif
99
94.3M
}
dovi_rpudec.c:get_ue_golomb
Line
Count
Source
54
6.63k
{
55
6.63k
    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.63k
    OPEN_READER(re, gb);
78
6.63k
    UPDATE_CACHE(re, gb);
79
6.63k
    buf = GET_CACHE(re, gb);
80
81
6.63k
    if (buf >= (1 << 27)) {
82
6.32k
        buf >>= 32 - 9;
83
6.32k
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
6.32k
        CLOSE_READER(re, gb);
85
86
6.32k
        return ff_ue_golomb_vlc_code[buf];
87
6.32k
    } else {
88
307
        int log = 2 * av_log2(buf) - 31;
89
307
        LAST_SKIP_BITS(re, gb, 32 - log);
90
307
        CLOSE_READER(re, gb);
91
307
        if (log < 7)
92
261
            return AVERROR_INVALIDDATA;
93
46
        buf >>= log;
94
46
        buf--;
95
96
46
        return buf;
97
307
    }
98
6.63k
#endif
99
6.63k
}
Unexecuted instantiation: evc_parse.c:get_ue_golomb
evc_ps.c:get_ue_golomb
Line
Count
Source
54
1.31M
{
55
1.31M
    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.31M
    OPEN_READER(re, gb);
78
1.31M
    UPDATE_CACHE(re, gb);
79
1.31M
    buf = GET_CACHE(re, gb);
80
81
1.31M
    if (buf >= (1 << 27)) {
82
1.16M
        buf >>= 32 - 9;
83
1.16M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
1.16M
        CLOSE_READER(re, gb);
85
86
1.16M
        return ff_ue_golomb_vlc_code[buf];
87
1.16M
    } 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
82.8k
            return AVERROR_INVALIDDATA;
93
69.3k
        buf >>= log;
94
69.3k
        buf--;
95
96
69.3k
        return buf;
97
152k
    }
98
1.31M
#endif
99
1.31M
}
h264_parse.c:get_ue_golomb
Line
Count
Source
54
3.04M
{
55
3.04M
    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.04M
    OPEN_READER(re, gb);
78
3.04M
    UPDATE_CACHE(re, gb);
79
3.04M
    buf = GET_CACHE(re, gb);
80
81
3.04M
    if (buf >= (1 << 27)) {
82
2.80M
        buf >>= 32 - 9;
83
2.80M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
2.80M
        CLOSE_READER(re, gb);
85
86
2.80M
        return ff_ue_golomb_vlc_code[buf];
87
2.80M
    } else {
88
233k
        int log = 2 * av_log2(buf) - 31;
89
233k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
233k
        CLOSE_READER(re, gb);
91
233k
        if (log < 7)
92
147k
            return AVERROR_INVALIDDATA;
93
85.9k
        buf >>= log;
94
85.9k
        buf--;
95
96
85.9k
        return buf;
97
233k
    }
98
3.04M
#endif
99
3.04M
}
h264_ps.c:get_ue_golomb
Line
Count
Source
54
20.8M
{
55
20.8M
    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
20.8M
    OPEN_READER(re, gb);
78
20.8M
    UPDATE_CACHE(re, gb);
79
20.8M
    buf = GET_CACHE(re, gb);
80
81
20.8M
    if (buf >= (1 << 27)) {
82
19.5M
        buf >>= 32 - 9;
83
19.5M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
19.5M
        CLOSE_READER(re, gb);
85
86
19.5M
        return ff_ue_golomb_vlc_code[buf];
87
19.5M
    } else {
88
1.30M
        int log = 2 * av_log2(buf) - 31;
89
1.30M
        LAST_SKIP_BITS(re, gb, 32 - log);
90
1.30M
        CLOSE_READER(re, gb);
91
1.30M
        if (log < 7)
92
646k
            return AVERROR_INVALIDDATA;
93
658k
        buf >>= log;
94
658k
        buf--;
95
96
658k
        return buf;
97
1.30M
    }
98
20.8M
#endif
99
20.8M
}
ps.c:get_ue_golomb
Line
Count
Source
54
4.83M
{
55
4.83M
    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
4.83M
    OPEN_READER(re, gb);
78
4.83M
    UPDATE_CACHE(re, gb);
79
4.83M
    buf = GET_CACHE(re, gb);
80
81
4.83M
    if (buf >= (1 << 27)) {
82
3.98M
        buf >>= 32 - 9;
83
3.98M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
3.98M
        CLOSE_READER(re, gb);
85
86
3.98M
        return ff_ue_golomb_vlc_code[buf];
87
3.98M
    } else {
88
845k
        int log = 2 * av_log2(buf) - 31;
89
845k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
845k
        CLOSE_READER(re, gb);
91
845k
        if (log < 7)
92
451k
            return AVERROR_INVALIDDATA;
93
394k
        buf >>= log;
94
394k
        buf--;
95
96
394k
        return buf;
97
845k
    }
98
4.83M
#endif
99
4.83M
}
Unexecuted instantiation: h2645_vui.c:get_ue_golomb
h264_parser.c:get_ue_golomb
Line
Count
Source
54
7.69M
{
55
7.69M
    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
7.69M
    OPEN_READER(re, gb);
78
7.69M
    UPDATE_CACHE(re, gb);
79
7.69M
    buf = GET_CACHE(re, gb);
80
81
7.69M
    if (buf >= (1 << 27)) {
82
6.97M
        buf >>= 32 - 9;
83
6.97M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
6.97M
        CLOSE_READER(re, gb);
85
86
6.97M
        return ff_ue_golomb_vlc_code[buf];
87
6.97M
    } else {
88
723k
        int log = 2 * av_log2(buf) - 31;
89
723k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
723k
        CLOSE_READER(re, gb);
91
723k
        if (log < 7)
92
459k
            return AVERROR_INVALIDDATA;
93
264k
        buf >>= log;
94
264k
        buf--;
95
96
264k
        return buf;
97
723k
    }
98
7.69M
#endif
99
7.69M
}
Unexecuted instantiation: h264_sei.c:get_ue_golomb
parser.c:get_ue_golomb
Line
Count
Source
54
910k
{
55
910k
    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
910k
    OPEN_READER(re, gb);
78
910k
    UPDATE_CACHE(re, gb);
79
910k
    buf = GET_CACHE(re, gb);
80
81
910k
    if (buf >= (1 << 27)) {
82
842k
        buf >>= 32 - 9;
83
842k
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
842k
        CLOSE_READER(re, gb);
85
86
842k
        return ff_ue_golomb_vlc_code[buf];
87
842k
    } else {
88
68.2k
        int log = 2 * av_log2(buf) - 31;
89
68.2k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
68.2k
        CLOSE_READER(re, gb);
91
68.2k
        if (log < 7)
92
31.8k
            return AVERROR_INVALIDDATA;
93
36.3k
        buf >>= log;
94
36.3k
        buf--;
95
96
36.3k
        return buf;
97
68.2k
    }
98
910k
#endif
99
910k
}
sei.c:get_ue_golomb
Line
Count
Source
54
2.25M
{
55
2.25M
    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.25M
    OPEN_READER(re, gb);
78
2.25M
    UPDATE_CACHE(re, gb);
79
2.25M
    buf = GET_CACHE(re, gb);
80
81
2.25M
    if (buf >= (1 << 27)) {
82
1.60M
        buf >>= 32 - 9;
83
1.60M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
1.60M
        CLOSE_READER(re, gb);
85
86
1.60M
        return ff_ue_golomb_vlc_code[buf];
87
1.60M
    } else {
88
653k
        int log = 2 * av_log2(buf) - 31;
89
653k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
653k
        CLOSE_READER(re, gb);
91
653k
        if (log < 7)
92
305k
            return AVERROR_INVALIDDATA;
93
347k
        buf >>= log;
94
347k
        buf--;
95
96
347k
        return buf;
97
653k
    }
98
2.25M
#endif
99
2.25M
}
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
5.47M
{
55
5.47M
    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
5.47M
    OPEN_READER(re, gb);
78
5.47M
    UPDATE_CACHE(re, gb);
79
5.47M
    buf = GET_CACHE(re, gb);
80
81
5.47M
    if (buf >= (1 << 27)) {
82
5.25M
        buf >>= 32 - 9;
83
5.25M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
5.25M
        CLOSE_READER(re, gb);
85
86
5.25M
        return ff_ue_golomb_vlc_code[buf];
87
5.25M
    } else {
88
224k
        int log = 2 * av_log2(buf) - 31;
89
224k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
224k
        CLOSE_READER(re, gb);
91
224k
        if (log < 7)
92
140k
            return AVERROR_INVALIDDATA;
93
83.7k
        buf >>= log;
94
83.7k
        buf--;
95
96
83.7k
        return buf;
97
224k
    }
98
5.47M
#endif
99
5.47M
}
Unexecuted instantiation: h264_refs.c:get_ue_golomb
h264_slice.c:get_ue_golomb
Line
Count
Source
54
5.95M
{
55
5.95M
    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
5.95M
    OPEN_READER(re, gb);
78
5.95M
    UPDATE_CACHE(re, gb);
79
5.95M
    buf = GET_CACHE(re, gb);
80
81
5.95M
    if (buf >= (1 << 27)) {
82
5.53M
        buf >>= 32 - 9;
83
5.53M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
5.53M
        CLOSE_READER(re, gb);
85
86
5.53M
        return ff_ue_golomb_vlc_code[buf];
87
5.53M
    } else {
88
421k
        int log = 2 * av_log2(buf) - 31;
89
421k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
421k
        CLOSE_READER(re, gb);
91
421k
        if (log < 7)
92
336k
            return AVERROR_INVALIDDATA;
93
85.2k
        buf >>= log;
94
85.2k
        buf--;
95
96
85.2k
        return buf;
97
421k
    }
98
5.95M
#endif
99
5.95M
}
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
672k
{
55
672k
    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
672k
    OPEN_READER(re, gb);
78
672k
    UPDATE_CACHE(re, gb);
79
672k
    buf = GET_CACHE(re, gb);
80
81
672k
    if (buf >= (1 << 27)) {
82
534k
        buf >>= 32 - 9;
83
534k
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
534k
        CLOSE_READER(re, gb);
85
86
534k
        return ff_ue_golomb_vlc_code[buf];
87
534k
    } else {
88
138k
        int log = 2 * av_log2(buf) - 31;
89
138k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
138k
        CLOSE_READER(re, gb);
91
138k
        if (log < 7)
92
119k
            return AVERROR_INVALIDDATA;
93
18.5k
        buf >>= log;
94
18.5k
        buf--;
95
96
18.5k
        return buf;
97
138k
    }
98
672k
#endif
99
672k
}
cavsdec.c:get_ue_golomb
Line
Count
Source
54
36.1M
{
55
36.1M
    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
36.1M
    OPEN_READER(re, gb);
78
36.1M
    UPDATE_CACHE(re, gb);
79
36.1M
    buf = GET_CACHE(re, gb);
80
81
36.1M
    if (buf >= (1 << 27)) {
82
35.5M
        buf >>= 32 - 9;
83
35.5M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
35.5M
        CLOSE_READER(re, gb);
85
86
35.5M
        return ff_ue_golomb_vlc_code[buf];
87
35.5M
    } else {
88
659k
        int log = 2 * av_log2(buf) - 31;
89
659k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
659k
        CLOSE_READER(re, gb);
91
659k
        if (log < 7)
92
334k
            return AVERROR_INVALIDDATA;
93
324k
        buf >>= log;
94
324k
        buf--;
95
96
324k
        return buf;
97
659k
    }
98
36.1M
#endif
99
36.1M
}
Unexecuted instantiation: cavs.c:get_ue_golomb
Unexecuted instantiation: hevcdec.c:get_ue_golomb
mobiclip.c:get_ue_golomb
Line
Count
Source
54
3.90M
{
55
3.90M
    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.90M
    OPEN_READER(re, gb);
78
3.90M
    UPDATE_CACHE(re, gb);
79
3.90M
    buf = GET_CACHE(re, gb);
80
81
3.90M
    if (buf >= (1 << 27)) {
82
3.89M
        buf >>= 32 - 9;
83
3.89M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
3.89M
        CLOSE_READER(re, gb);
85
86
3.89M
        return ff_ue_golomb_vlc_code[buf];
87
3.89M
    } else {
88
5.76k
        int log = 2 * av_log2(buf) - 31;
89
5.76k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
5.76k
        CLOSE_READER(re, gb);
91
5.76k
        if (log < 7)
92
3.17k
            return AVERROR_INVALIDDATA;
93
2.58k
        buf >>= log;
94
2.58k
        buf--;
95
96
2.58k
        return buf;
97
5.76k
    }
98
3.90M
#endif
99
3.90M
}
Unexecuted instantiation: ffv1dec.c:get_ue_golomb
Unexecuted instantiation: rv40.c:get_ue_golomb
aic.c:get_ue_golomb
Line
Count
Source
54
1.20M
{
55
1.20M
    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.20M
    OPEN_READER(re, gb);
78
1.20M
    UPDATE_CACHE(re, gb);
79
1.20M
    buf = GET_CACHE(re, gb);
80
81
1.20M
    if (buf >= (1 << 27)) {
82
1.15M
        buf >>= 32 - 9;
83
1.15M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
84
1.15M
        CLOSE_READER(re, gb);
85
86
1.15M
        return ff_ue_golomb_vlc_code[buf];
87
1.15M
    } else {
88
45.9k
        int log = 2 * av_log2(buf) - 31;
89
45.9k
        LAST_SKIP_BITS(re, gb, 32 - log);
90
45.9k
        CLOSE_READER(re, gb);
91
45.9k
        if (log < 7)
92
1.44k
            return AVERROR_INVALIDDATA;
93
44.5k
        buf >>= log;
94
44.5k
        buf--;
95
96
44.5k
        return buf;
97
45.9k
    }
98
1.20M
#endif
99
1.20M
}
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
401M
{
106
401M
    unsigned buf, log;
107
108
401M
    buf = show_bits_long(gb, 32);
109
401M
    log = 31 - av_log2(buf);
110
401M
    skip_bits_long(gb, log);
111
112
401M
    return get_bits_long(gb, log + 1) - 1;
113
401M
}
dovi_rpudec.c:get_ue_golomb_long
Line
Count
Source
105
36.3k
{
106
36.3k
    unsigned buf, log;
107
108
36.3k
    buf = show_bits_long(gb, 32);
109
36.3k
    log = 31 - av_log2(buf);
110
36.3k
    skip_bits_long(gb, log);
111
112
36.3k
    return get_bits_long(gb, log + 1) - 1;
113
36.3k
}
evc_parse.c:get_ue_golomb_long
Line
Count
Source
105
373k
{
106
373k
    unsigned buf, log;
107
108
373k
    buf = show_bits_long(gb, 32);
109
373k
    log = 31 - av_log2(buf);
110
373k
    skip_bits_long(gb, log);
111
112
373k
    return get_bits_long(gb, log + 1) - 1;
113
373k
}
evc_ps.c:get_ue_golomb_long
Line
Count
Source
105
2.43M
{
106
2.43M
    unsigned buf, log;
107
108
2.43M
    buf = show_bits_long(gb, 32);
109
2.43M
    log = 31 - av_log2(buf);
110
2.43M
    skip_bits_long(gb, log);
111
112
2.43M
    return get_bits_long(gb, log + 1) - 1;
113
2.43M
}
Unexecuted instantiation: h264_parse.c:get_ue_golomb_long
h264_ps.c:get_ue_golomb_long
Line
Count
Source
105
14.1M
{
106
14.1M
    unsigned buf, log;
107
108
14.1M
    buf = show_bits_long(gb, 32);
109
14.1M
    log = 31 - av_log2(buf);
110
14.1M
    skip_bits_long(gb, log);
111
112
14.1M
    return get_bits_long(gb, log + 1) - 1;
113
14.1M
}
ps.c:get_ue_golomb_long
Line
Count
Source
105
289M
{
106
289M
    unsigned buf, log;
107
108
289M
    buf = show_bits_long(gb, 32);
109
289M
    log = 31 - av_log2(buf);
110
289M
    skip_bits_long(gb, log);
111
112
289M
    return get_bits_long(gb, log + 1) - 1;
113
289M
}
Unexecuted instantiation: h2645_vui.c:get_ue_golomb_long
h264_parser.c:get_ue_golomb_long
Line
Count
Source
105
24.6M
{
106
24.6M
    unsigned buf, log;
107
108
24.6M
    buf = show_bits_long(gb, 32);
109
24.6M
    log = 31 - av_log2(buf);
110
24.6M
    skip_bits_long(gb, log);
111
112
24.6M
    return get_bits_long(gb, log + 1) - 1;
113
24.6M
}
h264_sei.c:get_ue_golomb_long
Line
Count
Source
105
424k
{
106
424k
    unsigned buf, log;
107
108
424k
    buf = show_bits_long(gb, 32);
109
424k
    log = 31 - av_log2(buf);
110
424k
    skip_bits_long(gb, log);
111
112
424k
    return get_bits_long(gb, log + 1) - 1;
113
424k
}
Unexecuted instantiation: parser.c:get_ue_golomb_long
sei.c:get_ue_golomb_long
Line
Count
Source
105
312k
{
106
312k
    unsigned buf, log;
107
108
312k
    buf = show_bits_long(gb, 32);
109
312k
    log = 31 - av_log2(buf);
110
312k
    skip_bits_long(gb, log);
111
112
312k
    return get_bits_long(gb, log + 1) - 1;
113
312k
}
h2645_sei.c:get_ue_golomb_long
Line
Count
Source
105
55.5M
{
106
55.5M
    unsigned buf, log;
107
108
55.5M
    buf = show_bits_long(gb, 32);
109
55.5M
    log = 31 - av_log2(buf);
110
55.5M
    skip_bits_long(gb, log);
111
112
55.5M
    return get_bits_long(gb, log + 1) - 1;
113
55.5M
}
h264dec.c:get_ue_golomb_long
Line
Count
Source
105
2.15M
{
106
2.15M
    unsigned buf, log;
107
108
2.15M
    buf = show_bits_long(gb, 32);
109
2.15M
    log = 31 - av_log2(buf);
110
2.15M
    skip_bits_long(gb, log);
111
112
2.15M
    return get_bits_long(gb, log + 1) - 1;
113
2.15M
}
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
2.41M
{
106
2.41M
    unsigned buf, log;
107
108
2.41M
    buf = show_bits_long(gb, 32);
109
2.41M
    log = 31 - av_log2(buf);
110
2.41M
    skip_bits_long(gb, log);
111
112
2.41M
    return get_bits_long(gb, log + 1) - 1;
113
2.41M
}
h264_refs.c:get_ue_golomb_long
Line
Count
Source
105
1.09M
{
106
1.09M
    unsigned buf, log;
107
108
1.09M
    buf = show_bits_long(gb, 32);
109
1.09M
    log = 31 - av_log2(buf);
110
1.09M
    skip_bits_long(gb, log);
111
112
1.09M
    return get_bits_long(gb, log + 1) - 1;
113
1.09M
}
h264_slice.c:get_ue_golomb_long
Line
Count
Source
105
6.72M
{
106
6.72M
    unsigned buf, log;
107
108
6.72M
    buf = show_bits_long(gb, 32);
109
6.72M
    log = 31 - av_log2(buf);
110
6.72M
    skip_bits_long(gb, log);
111
112
6.72M
    return get_bits_long(gb, log + 1) - 1;
113
6.72M
}
vmixdec.c:get_ue_golomb_long
Line
Count
Source
105
1.13M
{
106
1.13M
    unsigned buf, log;
107
108
1.13M
    buf = show_bits_long(gb, 32);
109
1.13M
    log = 31 - av_log2(buf);
110
1.13M
    skip_bits_long(gb, log);
111
112
1.13M
    return get_bits_long(gb, log + 1) - 1;
113
1.13M
}
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
941k
{
106
941k
    unsigned buf, log;
107
108
941k
    buf = show_bits_long(gb, 32);
109
941k
    log = 31 - av_log2(buf);
110
941k
    skip_bits_long(gb, log);
111
112
941k
    return get_bits_long(gb, log + 1) - 1;
113
941k
}
Unexecuted instantiation: mobiclip.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
75.4M
{
122
75.4M
    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
75.4M
    OPEN_READER(re, gb);
132
75.4M
    UPDATE_CACHE(re, gb);
133
75.4M
    buf = GET_CACHE(re, gb);
134
135
75.4M
    buf >>= 32 - 9;
136
75.4M
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
75.4M
    CLOSE_READER(re, gb);
138
75.4M
#endif
139
140
75.4M
    return ff_ue_golomb_vlc_code[buf];
141
75.4M
}
dovi_rpudec.c:get_ue_golomb_31
Line
Count
Source
121
156k
{
122
156k
    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
156k
    OPEN_READER(re, gb);
132
156k
    UPDATE_CACHE(re, gb);
133
156k
    buf = GET_CACHE(re, gb);
134
135
156k
    buf >>= 32 - 9;
136
156k
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
156k
    CLOSE_READER(re, gb);
138
156k
#endif
139
140
156k
    return ff_ue_golomb_vlc_code[buf];
141
156k
}
evc_parse.c:get_ue_golomb_31
Line
Count
Source
121
320k
{
122
320k
    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
320k
    OPEN_READER(re, gb);
132
320k
    UPDATE_CACHE(re, gb);
133
320k
    buf = GET_CACHE(re, gb);
134
135
320k
    buf >>= 32 - 9;
136
320k
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
320k
    CLOSE_READER(re, gb);
138
320k
#endif
139
140
320k
    return ff_ue_golomb_vlc_code[buf];
141
320k
}
evc_ps.c:get_ue_golomb_31
Line
Count
Source
121
879k
{
122
879k
    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
879k
    OPEN_READER(re, gb);
132
879k
    UPDATE_CACHE(re, gb);
133
879k
    buf = GET_CACHE(re, gb);
134
135
879k
    buf >>= 32 - 9;
136
879k
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
879k
    CLOSE_READER(re, gb);
138
879k
#endif
139
140
879k
    return ff_ue_golomb_vlc_code[buf];
141
879k
}
h264_parse.c:get_ue_golomb_31
Line
Count
Source
121
4.17M
{
122
4.17M
    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
4.17M
    OPEN_READER(re, gb);
132
4.17M
    UPDATE_CACHE(re, gb);
133
4.17M
    buf = GET_CACHE(re, gb);
134
135
4.17M
    buf >>= 32 - 9;
136
4.17M
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
4.17M
    CLOSE_READER(re, gb);
138
4.17M
#endif
139
140
4.17M
    return ff_ue_golomb_vlc_code[buf];
141
4.17M
}
h264_ps.c:get_ue_golomb_31
Line
Count
Source
121
27.7M
{
122
27.7M
    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
27.7M
    OPEN_READER(re, gb);
132
27.7M
    UPDATE_CACHE(re, gb);
133
27.7M
    buf = GET_CACHE(re, gb);
134
135
27.7M
    buf >>= 32 - 9;
136
27.7M
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
27.7M
    CLOSE_READER(re, gb);
138
27.7M
#endif
139
140
27.7M
    return ff_ue_golomb_vlc_code[buf];
141
27.7M
}
ps.c:get_ue_golomb_31
Line
Count
Source
121
11.4M
{
122
11.4M
    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
11.4M
    OPEN_READER(re, gb);
132
11.4M
    UPDATE_CACHE(re, gb);
133
11.4M
    buf = GET_CACHE(re, gb);
134
135
11.4M
    buf >>= 32 - 9;
136
11.4M
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
11.4M
    CLOSE_READER(re, gb);
138
11.4M
#endif
139
140
11.4M
    return ff_ue_golomb_vlc_code[buf];
141
11.4M
}
h2645_vui.c:get_ue_golomb_31
Line
Count
Source
121
3.00M
{
122
3.00M
    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.00M
    OPEN_READER(re, gb);
132
3.00M
    UPDATE_CACHE(re, gb);
133
3.00M
    buf = GET_CACHE(re, gb);
134
135
3.00M
    buf >>= 32 - 9;
136
3.00M
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
3.00M
    CLOSE_READER(re, gb);
138
3.00M
#endif
139
140
3.00M
    return ff_ue_golomb_vlc_code[buf];
141
3.00M
}
h264_parser.c:get_ue_golomb_31
Line
Count
Source
121
10.7M
{
122
10.7M
    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
10.7M
    OPEN_READER(re, gb);
132
10.7M
    UPDATE_CACHE(re, gb);
133
10.7M
    buf = GET_CACHE(re, gb);
134
135
10.7M
    buf >>= 32 - 9;
136
10.7M
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
10.7M
    CLOSE_READER(re, gb);
138
10.7M
#endif
139
140
10.7M
    return ff_ue_golomb_vlc_code[buf];
141
10.7M
}
h264_sei.c:get_ue_golomb_31
Line
Count
Source
121
548k
{
122
548k
    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
548k
    OPEN_READER(re, gb);
132
548k
    UPDATE_CACHE(re, gb);
133
548k
    buf = GET_CACHE(re, gb);
134
135
548k
    buf >>= 32 - 9;
136
548k
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
548k
    CLOSE_READER(re, gb);
138
548k
#endif
139
140
548k
    return ff_ue_golomb_vlc_code[buf];
141
548k
}
parser.c:get_ue_golomb_31
Line
Count
Source
121
457k
{
122
457k
    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
457k
    OPEN_READER(re, gb);
132
457k
    UPDATE_CACHE(re, gb);
133
457k
    buf = GET_CACHE(re, gb);
134
135
457k
    buf >>= 32 - 9;
136
457k
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
457k
    CLOSE_READER(re, gb);
138
457k
#endif
139
140
457k
    return ff_ue_golomb_vlc_code[buf];
141
457k
}
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
2.00M
{
122
2.00M
    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.00M
    OPEN_READER(re, gb);
132
2.00M
    UPDATE_CACHE(re, gb);
133
2.00M
    buf = GET_CACHE(re, gb);
134
135
2.00M
    buf >>= 32 - 9;
136
2.00M
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
2.00M
    CLOSE_READER(re, gb);
138
2.00M
#endif
139
140
2.00M
    return ff_ue_golomb_vlc_code[buf];
141
2.00M
}
h264_refs.c:get_ue_golomb_31
Line
Count
Source
121
4.35M
{
122
4.35M
    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
4.35M
    OPEN_READER(re, gb);
132
4.35M
    UPDATE_CACHE(re, gb);
133
4.35M
    buf = GET_CACHE(re, gb);
134
135
4.35M
    buf >>= 32 - 9;
136
4.35M
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
4.35M
    CLOSE_READER(re, gb);
138
4.35M
#endif
139
140
4.35M
    return ff_ue_golomb_vlc_code[buf];
141
4.35M
}
h264_slice.c:get_ue_golomb_31
Line
Count
Source
121
8.65M
{
122
8.65M
    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
8.65M
    OPEN_READER(re, gb);
132
8.65M
    UPDATE_CACHE(re, gb);
133
8.65M
    buf = GET_CACHE(re, gb);
134
135
8.65M
    buf >>= 32 - 9;
136
8.65M
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
8.65M
    CLOSE_READER(re, gb);
138
8.65M
#endif
139
140
8.65M
    return ff_ue_golomb_vlc_code[buf];
141
8.65M
}
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
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
}
Unexecuted instantiation: cavs.c:get_ue_golomb_31
hevcdec.c:get_ue_golomb_31
Line
Count
Source
121
95.0k
{
122
95.0k
    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
95.0k
    OPEN_READER(re, gb);
132
95.0k
    UPDATE_CACHE(re, gb);
133
95.0k
    buf = GET_CACHE(re, gb);
134
135
95.0k
    buf >>= 32 - 9;
136
95.0k
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
95.0k
    CLOSE_READER(re, gb);
138
95.0k
#endif
139
140
95.0k
    return ff_ue_golomb_vlc_code[buf];
141
95.0k
}
mobiclip.c:get_ue_golomb_31
Line
Count
Source
121
761k
{
122
761k
    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
761k
    OPEN_READER(re, gb);
132
761k
    UPDATE_CACHE(re, gb);
133
761k
    buf = GET_CACHE(re, gb);
134
135
761k
    buf >>= 32 - 9;
136
761k
    LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
137
761k
    CLOSE_READER(re, gb);
138
761k
#endif
139
140
761k
    return ff_ue_golomb_vlc_code[buf];
141
761k
}
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.12M
{
145
9.12M
    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.12M
    OPEN_READER(re, gb);
175
9.12M
    UPDATE_CACHE(re, gb);
176
9.12M
    buf = GET_CACHE(re, gb);
177
178
9.12M
    if (buf & 0xAA800000) {
179
7.62M
        buf >>= 32 - 8;
180
7.62M
        LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
181
7.62M
        CLOSE_READER(re, gb);
182
183
7.62M
        return ff_interleaved_ue_golomb_vlc_code[buf];
184
7.62M
    } else {
185
1.50M
        unsigned ret = 1;
186
187
6.93M
        do {
188
6.93M
            buf >>= 32 - 8;
189
6.93M
            LAST_SKIP_BITS(re, gb,
190
6.93M
                           FFMIN(ff_interleaved_golomb_vlc_len[buf], 8));
191
192
6.93M
            if (ff_interleaved_golomb_vlc_len[buf] != 9) {
193
1.24M
                ret <<= (ff_interleaved_golomb_vlc_len[buf] - 1) >> 1;
194
1.24M
                ret  |= ff_interleaved_dirac_golomb_vlc_code[buf];
195
1.24M
                break;
196
1.24M
            }
197
5.69M
            ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf];
198
5.69M
            UPDATE_CACHE(re, gb);
199
5.69M
            buf = GET_CACHE(re, gb);
200
5.69M
        } while (ret<0x8000000U && BITS_AVAILABLE(re, gb));
201
202
1.50M
        CLOSE_READER(re, gb);
203
1.50M
        return ret - 1;
204
1.50M
    }
205
9.12M
#endif
206
9.12M
}
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
353k
{
145
353k
    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
353k
    OPEN_READER(re, gb);
175
353k
    UPDATE_CACHE(re, gb);
176
353k
    buf = GET_CACHE(re, gb);
177
178
353k
    if (buf & 0xAA800000) {
179
303k
        buf >>= 32 - 8;
180
303k
        LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
181
303k
        CLOSE_READER(re, gb);
182
183
303k
        return ff_interleaved_ue_golomb_vlc_code[buf];
184
303k
    } else {
185
49.9k
        unsigned ret = 1;
186
187
145k
        do {
188
145k
            buf >>= 32 - 8;
189
145k
            LAST_SKIP_BITS(re, gb,
190
145k
                           FFMIN(ff_interleaved_golomb_vlc_len[buf], 8));
191
192
145k
            if (ff_interleaved_golomb_vlc_len[buf] != 9) {
193
23.7k
                ret <<= (ff_interleaved_golomb_vlc_len[buf] - 1) >> 1;
194
23.7k
                ret  |= ff_interleaved_dirac_golomb_vlc_code[buf];
195
23.7k
                break;
196
23.7k
            }
197
121k
            ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf];
198
121k
            UPDATE_CACHE(re, gb);
199
121k
            buf = GET_CACHE(re, gb);
200
121k
        } while (ret<0x8000000U && BITS_AVAILABLE(re, gb));
201
202
49.9k
        CLOSE_READER(re, gb);
203
49.9k
        return ret - 1;
204
49.9k
    }
205
353k
#endif
206
353k
}
diracdec.c:get_interleaved_ue_golomb
Line
Count
Source
144
2.99M
{
145
2.99M
    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.99M
    OPEN_READER(re, gb);
175
2.99M
    UPDATE_CACHE(re, gb);
176
2.99M
    buf = GET_CACHE(re, gb);
177
178
2.99M
    if (buf & 0xAA800000) {
179
1.64M
        buf >>= 32 - 8;
180
1.64M
        LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
181
1.64M
        CLOSE_READER(re, gb);
182
183
1.64M
        return ff_interleaved_ue_golomb_vlc_code[buf];
184
1.64M
    } else {
185
1.35M
        unsigned ret = 1;
186
187
6.51M
        do {
188
6.51M
            buf >>= 32 - 8;
189
6.51M
            LAST_SKIP_BITS(re, gb,
190
6.51M
                           FFMIN(ff_interleaved_golomb_vlc_len[buf], 8));
191
192
6.51M
            if (ff_interleaved_golomb_vlc_len[buf] != 9) {
193
1.14M
                ret <<= (ff_interleaved_golomb_vlc_len[buf] - 1) >> 1;
194
1.14M
                ret  |= ff_interleaved_dirac_golomb_vlc_code[buf];
195
1.14M
                break;
196
1.14M
            }
197
5.37M
            ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf];
198
5.37M
            UPDATE_CACHE(re, gb);
199
5.37M
            buf = GET_CACHE(re, gb);
200
5.37M
        } while (ret<0x8000000U && BITS_AVAILABLE(re, gb));
201
202
1.35M
        CLOSE_READER(re, gb);
203
1.35M
        return ret - 1;
204
1.35M
    }
205
2.99M
#endif
206
2.99M
}
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.06M
{
145
2.06M
    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.06M
    OPEN_READER(re, gb);
175
2.06M
    UPDATE_CACHE(re, gb);
176
2.06M
    buf = GET_CACHE(re, gb);
177
178
2.06M
    if (buf & 0xAA800000) {
179
2.02M
        buf >>= 32 - 8;
180
2.02M
        LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
181
2.02M
        CLOSE_READER(re, gb);
182
183
2.02M
        return ff_interleaved_ue_golomb_vlc_code[buf];
184
2.02M
    } else {
185
37.7k
        unsigned ret = 1;
186
187
114k
        do {
188
114k
            buf >>= 32 - 8;
189
114k
            LAST_SKIP_BITS(re, gb,
190
114k
                           FFMIN(ff_interleaved_golomb_vlc_len[buf], 8));
191
192
114k
            if (ff_interleaved_golomb_vlc_len[buf] != 9) {
193
34.3k
                ret <<= (ff_interleaved_golomb_vlc_len[buf] - 1) >> 1;
194
34.3k
                ret  |= ff_interleaved_dirac_golomb_vlc_code[buf];
195
34.3k
                break;
196
34.3k
            }
197
79.9k
            ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf];
198
79.9k
            UPDATE_CACHE(re, gb);
199
79.9k
            buf = GET_CACHE(re, gb);
200
79.9k
        } while (ret<0x8000000U && BITS_AVAILABLE(re, gb));
201
202
37.7k
        CLOSE_READER(re, gb);
203
37.7k
        return ret - 1;
204
37.7k
    }
205
2.06M
#endif
206
2.06M
}
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: ffv1dec.c:get_interleaved_ue_golomb
rv40.c:get_interleaved_ue_golomb
Line
Count
Source
144
448k
{
145
448k
    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
448k
    OPEN_READER(re, gb);
175
448k
    UPDATE_CACHE(re, gb);
176
448k
    buf = GET_CACHE(re, gb);
177
178
448k
    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
11.8k
        unsigned ret = 1;
186
187
28.1k
        do {
188
28.1k
            buf >>= 32 - 8;
189
28.1k
            LAST_SKIP_BITS(re, gb,
190
28.1k
                           FFMIN(ff_interleaved_golomb_vlc_len[buf], 8));
191
192
28.1k
            if (ff_interleaved_golomb_vlc_len[buf] != 9) {
193
7.31k
                ret <<= (ff_interleaved_golomb_vlc_len[buf] - 1) >> 1;
194
7.31k
                ret  |= ff_interleaved_dirac_golomb_vlc_code[buf];
195
7.31k
                break;
196
7.31k
            }
197
20.8k
            ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf];
198
20.8k
            UPDATE_CACHE(re, gb);
199
20.8k
            buf = GET_CACHE(re, gb);
200
20.8k
        } while (ret<0x8000000U && BITS_AVAILABLE(re, gb));
201
202
11.8k
        CLOSE_READER(re, gb);
203
11.8k
        return ret - 1;
204
11.8k
    }
205
448k
#endif
206
448k
}
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
3.26M
{
145
3.26M
    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
3.26M
    OPEN_READER(re, gb);
175
3.26M
    UPDATE_CACHE(re, gb);
176
3.26M
    buf = GET_CACHE(re, gb);
177
178
3.26M
    if (buf & 0xAA800000) {
179
3.21M
        buf >>= 32 - 8;
180
3.21M
        LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
181
3.21M
        CLOSE_READER(re, gb);
182
183
3.21M
        return ff_interleaved_ue_golomb_vlc_code[buf];
184
3.21M
    } else {
185
54.5k
        unsigned ret = 1;
186
187
131k
        do {
188
131k
            buf >>= 32 - 8;
189
131k
            LAST_SKIP_BITS(re, gb,
190
131k
                           FFMIN(ff_interleaved_golomb_vlc_len[buf], 8));
191
192
131k
            if (ff_interleaved_golomb_vlc_len[buf] != 9) {
193
26.7k
                ret <<= (ff_interleaved_golomb_vlc_len[buf] - 1) >> 1;
194
26.7k
                ret  |= ff_interleaved_dirac_golomb_vlc_code[buf];
195
26.7k
                break;
196
26.7k
            }
197
104k
            ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf];
198
104k
            UPDATE_CACHE(re, gb);
199
104k
            buf = GET_CACHE(re, gb);
200
104k
        } while (ret<0x8000000U && BITS_AVAILABLE(re, gb));
201
202
54.5k
        CLOSE_READER(re, gb);
203
54.5k
        return ret - 1;
204
54.5k
    }
205
3.26M
#endif
206
3.26M
}
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: 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: 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
181M
{
241
181M
    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
181M
    OPEN_READER(re, gb);
266
181M
    UPDATE_CACHE(re, gb);
267
181M
    buf = GET_CACHE(re, gb);
268
269
181M
    if (buf >= (1 << 27)) {
270
166M
        buf >>= 32 - 9;
271
166M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
166M
        CLOSE_READER(re, gb);
273
274
166M
        return ff_se_golomb_vlc_code[buf];
275
166M
    } else {
276
14.1M
        int log = av_log2(buf), sign;
277
14.1M
        LAST_SKIP_BITS(re, gb, 31 - log);
278
14.1M
        UPDATE_CACHE(re, gb);
279
14.1M
        buf = GET_CACHE(re, gb);
280
281
14.1M
        buf >>= log;
282
283
14.1M
        LAST_SKIP_BITS(re, gb, 32 - log);
284
14.1M
        CLOSE_READER(re, gb);
285
286
14.1M
        sign = -(buf & 1);
287
14.1M
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
14.1M
        return buf;
290
14.1M
    }
291
181M
#endif
292
181M
}
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
14.7M
{
241
14.7M
    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
14.7M
    OPEN_READER(re, gb);
266
14.7M
    UPDATE_CACHE(re, gb);
267
14.7M
    buf = GET_CACHE(re, gb);
268
269
14.7M
    if (buf >= (1 << 27)) {
270
13.8M
        buf >>= 32 - 9;
271
13.8M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
13.8M
        CLOSE_READER(re, gb);
273
274
13.8M
        return ff_se_golomb_vlc_code[buf];
275
13.8M
    } else {
276
824k
        int log = av_log2(buf), sign;
277
824k
        LAST_SKIP_BITS(re, gb, 31 - log);
278
824k
        UPDATE_CACHE(re, gb);
279
824k
        buf = GET_CACHE(re, gb);
280
281
824k
        buf >>= log;
282
283
824k
        LAST_SKIP_BITS(re, gb, 32 - log);
284
824k
        CLOSE_READER(re, gb);
285
286
824k
        sign = -(buf & 1);
287
824k
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
824k
        return buf;
290
824k
    }
291
14.7M
#endif
292
14.7M
}
h264_ps.c:get_se_golomb
Line
Count
Source
240
81.2M
{
241
81.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
81.2M
    OPEN_READER(re, gb);
266
81.2M
    UPDATE_CACHE(re, gb);
267
81.2M
    buf = GET_CACHE(re, gb);
268
269
81.2M
    if (buf >= (1 << 27)) {
270
75.6M
        buf >>= 32 - 9;
271
75.6M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
75.6M
        CLOSE_READER(re, gb);
273
274
75.6M
        return ff_se_golomb_vlc_code[buf];
275
75.6M
    } else {
276
5.55M
        int log = av_log2(buf), sign;
277
5.55M
        LAST_SKIP_BITS(re, gb, 31 - log);
278
5.55M
        UPDATE_CACHE(re, gb);
279
5.55M
        buf = GET_CACHE(re, gb);
280
281
5.55M
        buf >>= log;
282
283
5.55M
        LAST_SKIP_BITS(re, gb, 32 - log);
284
5.55M
        CLOSE_READER(re, gb);
285
286
5.55M
        sign = -(buf & 1);
287
5.55M
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
5.55M
        return buf;
290
5.55M
    }
291
81.2M
#endif
292
81.2M
}
ps.c:get_se_golomb
Line
Count
Source
240
64.6M
{
241
64.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
64.6M
    OPEN_READER(re, gb);
266
64.6M
    UPDATE_CACHE(re, gb);
267
64.6M
    buf = GET_CACHE(re, gb);
268
269
64.6M
    if (buf >= (1 << 27)) {
270
59.7M
        buf >>= 32 - 9;
271
59.7M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
59.7M
        CLOSE_READER(re, gb);
273
274
59.7M
        return ff_se_golomb_vlc_code[buf];
275
59.7M
    } else {
276
4.97M
        int log = av_log2(buf), sign;
277
4.97M
        LAST_SKIP_BITS(re, gb, 31 - log);
278
4.97M
        UPDATE_CACHE(re, gb);
279
4.97M
        buf = GET_CACHE(re, gb);
280
281
4.97M
        buf >>= log;
282
283
4.97M
        LAST_SKIP_BITS(re, gb, 32 - log);
284
4.97M
        CLOSE_READER(re, gb);
285
286
4.97M
        sign = -(buf & 1);
287
4.97M
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
4.97M
        return buf;
290
4.97M
    }
291
64.6M
#endif
292
64.6M
}
Unexecuted instantiation: h2645_vui.c:get_se_golomb
h264_parser.c:get_se_golomb
Line
Count
Source
240
2.17M
{
241
2.17M
    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.17M
    OPEN_READER(re, gb);
266
2.17M
    UPDATE_CACHE(re, gb);
267
2.17M
    buf = GET_CACHE(re, gb);
268
269
2.17M
    if (buf >= (1 << 27)) {
270
1.26M
        buf >>= 32 - 9;
271
1.26M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
1.26M
        CLOSE_READER(re, gb);
273
274
1.26M
        return ff_se_golomb_vlc_code[buf];
275
1.26M
    } else {
276
909k
        int log = av_log2(buf), sign;
277
909k
        LAST_SKIP_BITS(re, gb, 31 - log);
278
909k
        UPDATE_CACHE(re, gb);
279
909k
        buf = GET_CACHE(re, gb);
280
281
909k
        buf >>= log;
282
283
909k
        LAST_SKIP_BITS(re, gb, 32 - log);
284
909k
        CLOSE_READER(re, gb);
285
286
909k
        sign = -(buf & 1);
287
909k
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
909k
        return buf;
290
909k
    }
291
2.17M
#endif
292
2.17M
}
Unexecuted instantiation: h264_sei.c:get_se_golomb
Unexecuted instantiation: parser.c:get_se_golomb
sei.c:get_se_golomb
Line
Count
Source
240
112k
{
241
112k
    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
112k
    OPEN_READER(re, gb);
266
112k
    UPDATE_CACHE(re, gb);
267
112k
    buf = GET_CACHE(re, gb);
268
269
112k
    if (buf >= (1 << 27)) {
270
23.8k
        buf >>= 32 - 9;
271
23.8k
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
23.8k
        CLOSE_READER(re, gb);
273
274
23.8k
        return ff_se_golomb_vlc_code[buf];
275
89.1k
    } else {
276
89.1k
        int log = av_log2(buf), sign;
277
89.1k
        LAST_SKIP_BITS(re, gb, 31 - log);
278
89.1k
        UPDATE_CACHE(re, gb);
279
89.1k
        buf = GET_CACHE(re, gb);
280
281
89.1k
        buf >>= log;
282
283
89.1k
        LAST_SKIP_BITS(re, gb, 32 - log);
284
89.1k
        CLOSE_READER(re, gb);
285
286
89.1k
        sign = -(buf & 1);
287
89.1k
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
89.1k
        return buf;
290
89.1k
    }
291
112k
#endif
292
112k
}
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
7.77M
{
241
7.77M
    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
7.77M
    OPEN_READER(re, gb);
266
7.77M
    UPDATE_CACHE(re, gb);
267
7.77M
    buf = GET_CACHE(re, gb);
268
269
7.77M
    if (buf >= (1 << 27)) {
270
7.08M
        buf >>= 32 - 9;
271
7.08M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
7.08M
        CLOSE_READER(re, gb);
273
274
7.08M
        return ff_se_golomb_vlc_code[buf];
275
7.08M
    } else {
276
689k
        int log = av_log2(buf), sign;
277
689k
        LAST_SKIP_BITS(re, gb, 31 - log);
278
689k
        UPDATE_CACHE(re, gb);
279
689k
        buf = GET_CACHE(re, gb);
280
281
689k
        buf >>= log;
282
283
689k
        LAST_SKIP_BITS(re, gb, 32 - log);
284
689k
        CLOSE_READER(re, gb);
285
286
689k
        sign = -(buf & 1);
287
689k
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
689k
        return buf;
290
689k
    }
291
7.77M
#endif
292
7.77M
}
Unexecuted instantiation: h264_refs.c:get_se_golomb
h264_slice.c:get_se_golomb
Line
Count
Source
240
7.09M
{
241
7.09M
    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
7.09M
    OPEN_READER(re, gb);
266
7.09M
    UPDATE_CACHE(re, gb);
267
7.09M
    buf = GET_CACHE(re, gb);
268
269
7.09M
    if (buf >= (1 << 27)) {
270
6.26M
        buf >>= 32 - 9;
271
6.26M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
6.26M
        CLOSE_READER(re, gb);
273
274
6.26M
        return ff_se_golomb_vlc_code[buf];
275
6.26M
    } else {
276
827k
        int log = av_log2(buf), sign;
277
827k
        LAST_SKIP_BITS(re, gb, 31 - log);
278
827k
        UPDATE_CACHE(re, gb);
279
827k
        buf = GET_CACHE(re, gb);
280
281
827k
        buf >>= log;
282
283
827k
        LAST_SKIP_BITS(re, gb, 32 - log);
284
827k
        CLOSE_READER(re, gb);
285
286
827k
        sign = -(buf & 1);
287
827k
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
827k
        return buf;
290
827k
    }
291
7.09M
#endif
292
7.09M
}
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
536k
{
241
536k
    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
536k
    OPEN_READER(re, gb);
266
536k
    UPDATE_CACHE(re, gb);
267
536k
    buf = GET_CACHE(re, gb);
268
269
536k
    if (buf >= (1 << 27)) {
270
528k
        buf >>= 32 - 9;
271
528k
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
528k
        CLOSE_READER(re, gb);
273
274
528k
        return ff_se_golomb_vlc_code[buf];
275
528k
    } else {
276
8.26k
        int log = av_log2(buf), sign;
277
8.26k
        LAST_SKIP_BITS(re, gb, 31 - log);
278
8.26k
        UPDATE_CACHE(re, gb);
279
8.26k
        buf = GET_CACHE(re, gb);
280
281
8.26k
        buf >>= log;
282
283
8.26k
        LAST_SKIP_BITS(re, gb, 32 - log);
284
8.26k
        CLOSE_READER(re, gb);
285
286
8.26k
        sign = -(buf & 1);
287
8.26k
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
8.26k
        return buf;
290
8.26k
    }
291
536k
#endif
292
536k
}
cavs.c:get_se_golomb
Line
Count
Source
240
1.73M
{
241
1.73M
    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.73M
    OPEN_READER(re, gb);
266
1.73M
    UPDATE_CACHE(re, gb);
267
1.73M
    buf = GET_CACHE(re, gb);
268
269
1.73M
    if (buf >= (1 << 27)) {
270
1.57M
        buf >>= 32 - 9;
271
1.57M
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
1.57M
        CLOSE_READER(re, gb);
273
274
1.57M
        return ff_se_golomb_vlc_code[buf];
275
1.57M
    } else {
276
154k
        int log = av_log2(buf), sign;
277
154k
        LAST_SKIP_BITS(re, gb, 31 - log);
278
154k
        UPDATE_CACHE(re, gb);
279
154k
        buf = GET_CACHE(re, gb);
280
281
154k
        buf >>= log;
282
283
154k
        LAST_SKIP_BITS(re, gb, 32 - log);
284
154k
        CLOSE_READER(re, gb);
285
286
154k
        sign = -(buf & 1);
287
154k
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
154k
        return buf;
290
154k
    }
291
1.73M
#endif
292
1.73M
}
hevcdec.c:get_se_golomb
Line
Count
Source
240
621k
{
241
621k
    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
621k
    OPEN_READER(re, gb);
266
621k
    UPDATE_CACHE(re, gb);
267
621k
    buf = GET_CACHE(re, gb);
268
269
621k
    if (buf >= (1 << 27)) {
270
534k
        buf >>= 32 - 9;
271
534k
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
534k
        CLOSE_READER(re, gb);
273
274
534k
        return ff_se_golomb_vlc_code[buf];
275
534k
    } else {
276
87.1k
        int log = av_log2(buf), sign;
277
87.1k
        LAST_SKIP_BITS(re, gb, 31 - log);
278
87.1k
        UPDATE_CACHE(re, gb);
279
87.1k
        buf = GET_CACHE(re, gb);
280
281
87.1k
        buf >>= log;
282
283
87.1k
        LAST_SKIP_BITS(re, gb, 32 - log);
284
87.1k
        CLOSE_READER(re, gb);
285
286
87.1k
        sign = -(buf & 1);
287
87.1k
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
87.1k
        return buf;
290
87.1k
    }
291
621k
#endif
292
621k
}
mobiclip.c:get_se_golomb
Line
Count
Source
240
375k
{
241
375k
    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
375k
    OPEN_READER(re, gb);
266
375k
    UPDATE_CACHE(re, gb);
267
375k
    buf = GET_CACHE(re, gb);
268
269
375k
    if (buf >= (1 << 27)) {
270
354k
        buf >>= 32 - 9;
271
354k
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
354k
        CLOSE_READER(re, gb);
273
274
354k
        return ff_se_golomb_vlc_code[buf];
275
354k
    } else {
276
21.4k
        int log = av_log2(buf), sign;
277
21.4k
        LAST_SKIP_BITS(re, gb, 31 - log);
278
21.4k
        UPDATE_CACHE(re, gb);
279
21.4k
        buf = GET_CACHE(re, gb);
280
281
21.4k
        buf >>= log;
282
283
21.4k
        LAST_SKIP_BITS(re, gb, 32 - log);
284
21.4k
        CLOSE_READER(re, gb);
285
286
21.4k
        sign = -(buf & 1);
287
21.4k
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
21.4k
        return buf;
290
21.4k
    }
291
375k
#endif
292
375k
}
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
79.1k
{
241
79.1k
    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
79.1k
    OPEN_READER(re, gb);
266
79.1k
    UPDATE_CACHE(re, gb);
267
79.1k
    buf = GET_CACHE(re, gb);
268
269
79.1k
    if (buf >= (1 << 27)) {
270
40.0k
        buf >>= 32 - 9;
271
40.0k
        LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
272
40.0k
        CLOSE_READER(re, gb);
273
274
40.0k
        return ff_se_golomb_vlc_code[buf];
275
40.0k
    } else {
276
39.1k
        int log = av_log2(buf), sign;
277
39.1k
        LAST_SKIP_BITS(re, gb, 31 - log);
278
39.1k
        UPDATE_CACHE(re, gb);
279
39.1k
        buf = GET_CACHE(re, gb);
280
281
39.1k
        buf >>= log;
282
283
39.1k
        LAST_SKIP_BITS(re, gb, 32 - log);
284
39.1k
        CLOSE_READER(re, gb);
285
286
39.1k
        sign = -(buf & 1);
287
39.1k
        buf  = ((buf >> 1) ^ sign) - sign;
288
289
39.1k
        return buf;
290
39.1k
    }
291
79.1k
#endif
292
79.1k
}
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
65.4M
{
296
65.4M
    unsigned int buf = get_ue_golomb_long(gb);
297
65.4M
    int sign = (buf & 1) - 1;
298
65.4M
    return ((buf >> 1) ^ sign) + 1;
299
65.4M
}
dovi_rpudec.c:get_se_golomb_long
Line
Count
Source
295
13.8k
{
296
13.8k
    unsigned int buf = get_ue_golomb_long(gb);
297
13.8k
    int sign = (buf & 1) - 1;
298
13.8k
    return ((buf >> 1) ^ sign) + 1;
299
13.8k
}
Unexecuted instantiation: evc_parse.c:get_se_golomb_long
evc_ps.c:get_se_golomb_long
Line
Count
Source
295
321k
{
296
321k
    unsigned int buf = get_ue_golomb_long(gb);
297
321k
    int sign = (buf & 1) - 1;
298
321k
    return ((buf >> 1) ^ sign) + 1;
299
321k
}
Unexecuted instantiation: h264_parse.c:get_se_golomb_long
h264_ps.c:get_se_golomb_long
Line
Count
Source
295
7.27M
{
296
7.27M
    unsigned int buf = get_ue_golomb_long(gb);
297
7.27M
    int sign = (buf & 1) - 1;
298
7.27M
    return ((buf >> 1) ^ sign) + 1;
299
7.27M
}
ps.c:get_se_golomb_long
Line
Count
Source
295
2.78M
{
296
2.78M
    unsigned int buf = get_ue_golomb_long(gb);
297
2.78M
    int sign = (buf & 1) - 1;
298
2.78M
    return ((buf >> 1) ^ sign) + 1;
299
2.78M
}
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
55.0M
{
296
55.0M
    unsigned int buf = get_ue_golomb_long(gb);
297
55.0M
    int sign = (buf & 1) - 1;
298
55.0M
    return ((buf >> 1) ^ sign) + 1;
299
55.0M
}
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: 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
3.86M
{
303
3.86M
    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
3.86M
    OPEN_READER(re, gb);
330
3.86M
    UPDATE_CACHE(re, gb);
331
3.86M
    buf = GET_CACHE(re, gb);
332
333
3.86M
    if (buf & 0xAA800000) {
334
3.67M
        buf >>= 32 - 8;
335
3.67M
        LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
336
3.67M
        CLOSE_READER(re, gb);
337
338
3.67M
        return ff_interleaved_se_golomb_vlc_code[buf];
339
3.67M
    } else {
340
188k
        int log;
341
188k
        LAST_SKIP_BITS(re, gb, 8);
342
188k
        UPDATE_CACHE(re, gb);
343
188k
        buf |= 1 | (GET_CACHE(re, gb) >> 8);
344
345
188k
        if ((buf & 0xAAAAAAAA) == 0)
346
52.6k
            return INVALID_VLC;
347
348
1.32M
        for (log = 31; (buf & 0x80000000) == 0; log--)
349
1.18M
            buf = (buf << 2) - ((buf << log) >> (log - 1)) + (buf >> 30);
350
351
136k
        LAST_SKIP_BITS(re, gb, 63 - 2 * log - 8);
352
136k
        CLOSE_READER(re, gb);
353
354
136k
        return (signed) (((((buf << log) >> log) - 1) ^ -(buf & 0x1)) + 1) >> 1;
355
188k
    }
356
3.86M
#endif
357
3.86M
}
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.48M
{
303
1.48M
    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.48M
    OPEN_READER(re, gb);
330
1.48M
    UPDATE_CACHE(re, gb);
331
1.48M
    buf = GET_CACHE(re, gb);
332
333
1.48M
    if (buf & 0xAA800000) {
334
1.45M
        buf >>= 32 - 8;
335
1.45M
        LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
336
1.45M
        CLOSE_READER(re, gb);
337
338
1.45M
        return ff_interleaved_se_golomb_vlc_code[buf];
339
1.45M
    } else {
340
28.1k
        int log;
341
28.1k
        LAST_SKIP_BITS(re, gb, 8);
342
28.1k
        UPDATE_CACHE(re, gb);
343
28.1k
        buf |= 1 | (GET_CACHE(re, gb) >> 8);
344
345
28.1k
        if ((buf & 0xAAAAAAAA) == 0)
346
7.66k
            return INVALID_VLC;
347
348
179k
        for (log = 31; (buf & 0x80000000) == 0; log--)
349
159k
            buf = (buf << 2) - ((buf << log) >> (log - 1)) + (buf >> 30);
350
351
20.4k
        LAST_SKIP_BITS(re, gb, 63 - 2 * log - 8);
352
20.4k
        CLOSE_READER(re, gb);
353
354
20.4k
        return (signed) (((((buf << log) >> log) - 1) ^ -(buf & 0x1)) + 1) >> 1;
355
28.1k
    }
356
1.48M
#endif
357
1.48M
}
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: 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.11M
{
303
1.11M
    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.11M
    OPEN_READER(re, gb);
330
1.11M
    UPDATE_CACHE(re, gb);
331
1.11M
    buf = GET_CACHE(re, gb);
332
333
1.11M
    if (buf & 0xAA800000) {
334
972k
        buf >>= 32 - 8;
335
972k
        LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
336
972k
        CLOSE_READER(re, gb);
337
338
972k
        return ff_interleaved_se_golomb_vlc_code[buf];
339
972k
    } else {
340
144k
        int log;
341
144k
        LAST_SKIP_BITS(re, gb, 8);
342
144k
        UPDATE_CACHE(re, gb);
343
144k
        buf |= 1 | (GET_CACHE(re, gb) >> 8);
344
345
144k
        if ((buf & 0xAAAAAAAA) == 0)
346
41.1k
            return INVALID_VLC;
347
348
1.03M
        for (log = 31; (buf & 0x80000000) == 0; log--)
349
933k
            buf = (buf << 2) - ((buf << log) >> (log - 1)) + (buf >> 30);
350
351
103k
        LAST_SKIP_BITS(re, gb, 63 - 2 * log - 8);
352
103k
        CLOSE_READER(re, gb);
353
354
103k
        return (signed) (((((buf << log) >> log) - 1) ^ -(buf & 0x1)) + 1) >> 1;
355
144k
    }
356
1.11M
#endif
357
1.11M
}
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.26M
{
303
1.26M
    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.26M
    OPEN_READER(re, gb);
330
1.26M
    UPDATE_CACHE(re, gb);
331
1.26M
    buf = GET_CACHE(re, gb);
332
333
1.26M
    if (buf & 0xAA800000) {
334
1.24M
        buf >>= 32 - 8;
335
1.24M
        LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
336
1.24M
        CLOSE_READER(re, gb);
337
338
1.24M
        return ff_interleaved_se_golomb_vlc_code[buf];
339
1.24M
    } else {
340
16.2k
        int log;
341
16.2k
        LAST_SKIP_BITS(re, gb, 8);
342
16.2k
        UPDATE_CACHE(re, gb);
343
16.2k
        buf |= 1 | (GET_CACHE(re, gb) >> 8);
344
345
16.2k
        if ((buf & 0xAAAAAAAA) == 0)
346
3.78k
            return INVALID_VLC;
347
348
108k
        for (log = 31; (buf & 0x80000000) == 0; log--)
349
96.2k
            buf = (buf << 2) - ((buf << log) >> (log - 1)) + (buf >> 30);
350
351
12.5k
        LAST_SKIP_BITS(re, gb, 63 - 2 * log - 8);
352
12.5k
        CLOSE_READER(re, gb);
353
354
12.5k
        return (signed) (((((buf << log) >> log) - 1) ^ -(buf & 0x1)) + 1) >> 1;
355
16.2k
    }
356
1.26M
#endif
357
1.26M
}
Unexecuted instantiation: dstdec.c:get_interleaved_se_golomb
358
359
static inline int dirac_get_se_golomb(GetBitContext *gb)
360
2.26M
{
361
2.26M
    uint32_t ret = get_interleaved_ue_golomb(gb);
362
363
2.26M
    if (ret) {
364
1.59M
        int sign = -get_bits1(gb);
365
1.59M
        ret = (ret ^ sign) - sign;
366
1.59M
    }
367
368
2.26M
    return ret;
369
2.26M
}
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.26M
{
361
2.26M
    uint32_t ret = get_interleaved_ue_golomb(gb);
362
363
2.26M
    if (ret) {
364
1.59M
        int sign = -get_bits1(gb);
365
1.59M
        ret = (ret ^ sign) - sign;
366
1.59M
    }
367
368
2.26M
    return ret;
369
2.26M
}
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: 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
37.9M
{
377
37.9M
    unsigned int buf;
378
37.9M
    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
37.9M
    OPEN_READER(re, gb);
399
37.9M
    UPDATE_CACHE(re, gb);
400
37.9M
    buf = GET_CACHE(re, gb);
401
402
37.9M
    log = av_log2(buf);
403
404
37.9M
    if (log > 31 - limit) {
405
28.3M
        av_assert2(log >= k);
406
28.3M
        buf >>= log - k;
407
28.3M
        buf  += (30U - log) << k;
408
28.3M
        LAST_SKIP_BITS(re, gb, 32 + k - log);
409
28.3M
        CLOSE_READER(re, gb);
410
411
28.3M
        return buf;
412
28.3M
    } else {
413
9.69M
        LAST_SKIP_BITS(re, gb, limit);
414
9.69M
        UPDATE_CACHE(re, gb);
415
416
9.69M
        buf = SHOW_UBITS(re, gb, esc_len);
417
418
9.69M
        LAST_SKIP_BITS(re, gb, esc_len);
419
9.69M
        CLOSE_READER(re, gb);
420
421
9.69M
        return buf + limit - 1;
422
9.69M
    }
423
37.9M
#endif
424
37.9M
}
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
ffv1dec.c:get_ur_golomb
Line
Count
Source
376
37.9M
{
377
37.9M
    unsigned int buf;
378
37.9M
    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
37.9M
    OPEN_READER(re, gb);
399
37.9M
    UPDATE_CACHE(re, gb);
400
37.9M
    buf = GET_CACHE(re, gb);
401
402
37.9M
    log = av_log2(buf);
403
404
37.9M
    if (log > 31 - limit) {
405
28.3M
        av_assert2(log >= k);
406
28.3M
        buf >>= log - k;
407
28.3M
        buf  += (30U - log) << k;
408
28.3M
        LAST_SKIP_BITS(re, gb, 32 + k - log);
409
28.3M
        CLOSE_READER(re, gb);
410
411
28.3M
        return buf;
412
28.3M
    } else {
413
9.69M
        LAST_SKIP_BITS(re, gb, limit);
414
9.69M
        UPDATE_CACHE(re, gb);
415
416
9.69M
        buf = SHOW_UBITS(re, gb, esc_len);
417
418
9.69M
        LAST_SKIP_BITS(re, gb, esc_len);
419
9.69M
        CLOSE_READER(re, gb);
420
421
9.69M
        return buf + limit - 1;
422
9.69M
    }
423
37.9M
#endif
424
37.9M
}
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
213M
{
434
213M
    unsigned int buf;
435
213M
    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 (esc_len && 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
213M
    OPEN_READER(re, gb);
467
213M
    UPDATE_CACHE(re, gb);
468
213M
    buf = GET_CACHE(re, gb);
469
470
213M
    log = av_log2(buf);
471
472
213M
    av_assert2(k <= 31);
473
474
213M
    if (log - k >= 32 - MIN_CACHE_BITS + (MIN_CACHE_BITS == 32) &&
475
180M
        32 - log < limit) {
476
180M
        buf >>= log - k;
477
180M
        buf  += (30U - log) << k;
478
180M
        LAST_SKIP_BITS(re, gb, 32 + k - log);
479
180M
        CLOSE_READER(re, gb);
480
481
180M
        return buf;
482
180M
    } else {
483
33.1M
        int i;
484
1.58G
        for (i = 0; i + MIN_CACHE_BITS <= limit && SHOW_UBITS(re, gb, MIN_CACHE_BITS) == 0; i += MIN_CACHE_BITS) {
485
1.56G
            if (gb->size_in_bits <= re_index) {
486
6.24M
                CLOSE_READER(re, gb);
487
6.24M
                return -1;
488
6.24M
            }
489
1.55G
            LAST_SKIP_BITS(re, gb, MIN_CACHE_BITS);
490
1.55G
            UPDATE_CACHE(re, gb);
491
1.55G
        }
492
275M
        for (; i < limit && SHOW_UBITS(re, gb, 1) == 0; i++) {
493
248M
            SKIP_BITS(re, gb, 1);
494
248M
        }
495
26.9M
        LAST_SKIP_BITS(re, gb, 1);
496
26.9M
        UPDATE_CACHE(re, gb);
497
498
26.9M
        if (i < limit - 1) {
499
22.5M
            if (k) {
500
20.9M
                if (k > MIN_CACHE_BITS - 1) {
501
7.92M
                    buf = SHOW_UBITS(re, gb, 16) << (k-16);
502
7.92M
                    LAST_SKIP_BITS(re, gb, 16);
503
7.92M
                    UPDATE_CACHE(re, gb);
504
7.92M
                    buf |= SHOW_UBITS(re, gb, k-16);
505
7.92M
                    LAST_SKIP_BITS(re, gb, k-16);
506
13.0M
                } else {
507
13.0M
                    buf = SHOW_UBITS(re, gb, k);
508
13.0M
                    LAST_SKIP_BITS(re, gb, k);
509
13.0M
                }
510
20.9M
            } else {
511
1.61M
                buf = 0;
512
1.61M
            }
513
514
22.5M
            buf += ((SUINT)i << k);
515
22.5M
        } else if (esc_len && i == limit - 1) {
516
111k
            buf = SHOW_UBITS(re, gb, esc_len);
517
111k
            LAST_SKIP_BITS(re, gb, esc_len);
518
519
111k
            buf ++;
520
4.21M
        } else {
521
4.21M
            buf = -1;
522
4.21M
        }
523
26.9M
        CLOSE_READER(re, gb);
524
26.9M
        return buf;
525
33.1M
    }
526
213M
#endif
527
213M
}
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
31.0k
{
434
31.0k
    unsigned int buf;
435
31.0k
    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 (esc_len && 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
31.0k
    OPEN_READER(re, gb);
467
31.0k
    UPDATE_CACHE(re, gb);
468
31.0k
    buf = GET_CACHE(re, gb);
469
470
31.0k
    log = av_log2(buf);
471
472
31.0k
    av_assert2(k <= 31);
473
474
31.0k
    if (log - k >= 32 - MIN_CACHE_BITS + (MIN_CACHE_BITS == 32) &&
475
19.6k
        32 - log < limit) {
476
19.6k
        buf >>= log - k;
477
19.6k
        buf  += (30U - log) << k;
478
19.6k
        LAST_SKIP_BITS(re, gb, 32 + k - log);
479
19.6k
        CLOSE_READER(re, gb);
480
481
19.6k
        return buf;
482
19.6k
    } else {
483
11.4k
        int i;
484
754k
        for (i = 0; i + MIN_CACHE_BITS <= limit && SHOW_UBITS(re, gb, MIN_CACHE_BITS) == 0; i += MIN_CACHE_BITS) {
485
744k
            if (gb->size_in_bits <= re_index) {
486
1.54k
                CLOSE_READER(re, gb);
487
1.54k
                return -1;
488
1.54k
            }
489
743k
            LAST_SKIP_BITS(re, gb, MIN_CACHE_BITS);
490
743k
            UPDATE_CACHE(re, gb);
491
743k
        }
492
111k
        for (; i < limit && SHOW_UBITS(re, gb, 1) == 0; i++) {
493
101k
            SKIP_BITS(re, gb, 1);
494
101k
        }
495
9.86k
        LAST_SKIP_BITS(re, gb, 1);
496
9.86k
        UPDATE_CACHE(re, gb);
497
498
9.86k
        if (i < limit - 1) {
499
9.86k
            if (k) {
500
7.98k
                if (k > MIN_CACHE_BITS - 1) {
501
2.36k
                    buf = SHOW_UBITS(re, gb, 16) << (k-16);
502
2.36k
                    LAST_SKIP_BITS(re, gb, 16);
503
2.36k
                    UPDATE_CACHE(re, gb);
504
2.36k
                    buf |= SHOW_UBITS(re, gb, k-16);
505
2.36k
                    LAST_SKIP_BITS(re, gb, k-16);
506
5.62k
                } else {
507
5.62k
                    buf = SHOW_UBITS(re, gb, k);
508
5.62k
                    LAST_SKIP_BITS(re, gb, k);
509
5.62k
                }
510
7.98k
            } else {
511
1.87k
                buf = 0;
512
1.87k
            }
513
514
9.86k
            buf += ((SUINT)i << k);
515
9.86k
        } else if (esc_len && 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
9.86k
        CLOSE_READER(re, gb);
524
9.86k
        return buf;
525
11.4k
    }
526
31.0k
#endif
527
31.0k
}
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
40.2M
{
434
40.2M
    unsigned int buf;
435
40.2M
    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 (esc_len && 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
40.2M
    OPEN_READER(re, gb);
467
40.2M
    UPDATE_CACHE(re, gb);
468
40.2M
    buf = GET_CACHE(re, gb);
469
470
40.2M
    log = av_log2(buf);
471
472
40.2M
    av_assert2(k <= 31);
473
474
40.2M
    if (log - k >= 32 - MIN_CACHE_BITS + (MIN_CACHE_BITS == 32) &&
475
33.3M
        32 - log < limit) {
476
33.1M
        buf >>= log - k;
477
33.1M
        buf  += (30U - log) << k;
478
33.1M
        LAST_SKIP_BITS(re, gb, 32 + k - log);
479
33.1M
        CLOSE_READER(re, gb);
480
481
33.1M
        return buf;
482
33.1M
    } else {
483
7.10M
        int i;
484
10.6M
        for (i = 0; i + MIN_CACHE_BITS <= limit && SHOW_UBITS(re, gb, MIN_CACHE_BITS) == 0; i += MIN_CACHE_BITS) {
485
3.50M
            if (gb->size_in_bits <= re_index) {
486
9.68k
                CLOSE_READER(re, gb);
487
9.68k
                return -1;
488
9.68k
            }
489
3.49M
            LAST_SKIP_BITS(re, gb, MIN_CACHE_BITS);
490
3.49M
            UPDATE_CACHE(re, gb);
491
3.49M
        }
492
121M
        for (; i < limit && SHOW_UBITS(re, gb, 1) == 0; i++) {
493
114M
            SKIP_BITS(re, gb, 1);
494
114M
        }
495
7.09M
        LAST_SKIP_BITS(re, gb, 1);
496
7.09M
        UPDATE_CACHE(re, gb);
497
498
7.09M
        if (i < limit - 1) {
499
3.09M
            if (k) {
500
3.07M
                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
3.07M
                } else {
507
3.07M
                    buf = SHOW_UBITS(re, gb, k);
508
3.07M
                    LAST_SKIP_BITS(re, gb, k);
509
3.07M
                }
510
3.07M
            } else {
511
18.4k
                buf = 0;
512
18.4k
            }
513
514
3.09M
            buf += ((SUINT)i << k);
515
4.00M
        } else if (esc_len && i == limit - 1) {
516
72.2k
            buf = SHOW_UBITS(re, gb, esc_len);
517
72.2k
            LAST_SKIP_BITS(re, gb, esc_len);
518
519
72.2k
            buf ++;
520
3.93M
        } else {
521
3.93M
            buf = -1;
522
3.93M
        }
523
7.09M
        CLOSE_READER(re, gb);
524
7.09M
        return buf;
525
7.10M
    }
526
40.2M
#endif
527
40.2M
}
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.76M
{
434
3.76M
    unsigned int buf;
435
3.76M
    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 (esc_len && 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.76M
    OPEN_READER(re, gb);
467
3.76M
    UPDATE_CACHE(re, gb);
468
3.76M
    buf = GET_CACHE(re, gb);
469
470
3.76M
    log = av_log2(buf);
471
472
3.76M
    av_assert2(k <= 31);
473
474
3.76M
    if (log - k >= 32 - MIN_CACHE_BITS + (MIN_CACHE_BITS == 32) &&
475
3.62M
        32 - log < limit) {
476
3.62M
        buf >>= log - k;
477
3.62M
        buf  += (30U - log) << k;
478
3.62M
        LAST_SKIP_BITS(re, gb, 32 + k - log);
479
3.62M
        CLOSE_READER(re, gb);
480
481
3.62M
        return buf;
482
3.62M
    } else {
483
142k
        int i;
484
18.0M
        for (i = 0; i + MIN_CACHE_BITS <= limit && SHOW_UBITS(re, gb, MIN_CACHE_BITS) == 0; i += MIN_CACHE_BITS) {
485
17.9M
            if (gb->size_in_bits <= re_index) {
486
44.4k
                CLOSE_READER(re, gb);
487
44.4k
                return -1;
488
44.4k
            }
489
17.9M
            LAST_SKIP_BITS(re, gb, MIN_CACHE_BITS);
490
17.9M
            UPDATE_CACHE(re, gb);
491
17.9M
        }
492
1.42M
        for (; i < limit && SHOW_UBITS(re, gb, 1) == 0; i++) {
493
1.32M
            SKIP_BITS(re, gb, 1);
494
1.32M
        }
495
98.1k
        LAST_SKIP_BITS(re, gb, 1);
496
98.1k
        UPDATE_CACHE(re, gb);
497
498
98.1k
        if (i < limit - 1) {
499
98.1k
            if (k) {
500
92.0k
                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
92.0k
                } else {
507
92.0k
                    buf = SHOW_UBITS(re, gb, k);
508
92.0k
                    LAST_SKIP_BITS(re, gb, k);
509
92.0k
                }
510
92.0k
            } else {
511
6.13k
                buf = 0;
512
6.13k
            }
513
514
98.1k
            buf += ((SUINT)i << k);
515
98.1k
        } else if (esc_len && 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
98.1k
        CLOSE_READER(re, gb);
524
98.1k
        return buf;
525
142k
    }
526
3.76M
#endif
527
3.76M
}
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: 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
11.0M
{
434
11.0M
    unsigned int buf;
435
11.0M
    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 (esc_len && 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
11.0M
    OPEN_READER(re, gb);
467
11.0M
    UPDATE_CACHE(re, gb);
468
11.0M
    buf = GET_CACHE(re, gb);
469
470
11.0M
    log = av_log2(buf);
471
472
11.0M
    av_assert2(k <= 31);
473
474
11.0M
    if (log - k >= 32 - MIN_CACHE_BITS + (MIN_CACHE_BITS == 32) &&
475
4.31M
        32 - log < limit) {
476
4.31M
        buf >>= log - k;
477
4.31M
        buf  += (30U - log) << k;
478
4.31M
        LAST_SKIP_BITS(re, gb, 32 + k - log);
479
4.31M
        CLOSE_READER(re, gb);
480
481
4.31M
        return buf;
482
6.72M
    } else {
483
6.72M
        int i;
484
16.5M
        for (i = 0; i + MIN_CACHE_BITS <= limit && SHOW_UBITS(re, gb, MIN_CACHE_BITS) == 0; i += MIN_CACHE_BITS) {
485
15.9M
            if (gb->size_in_bits <= re_index) {
486
6.13M
                CLOSE_READER(re, gb);
487
6.13M
                return -1;
488
6.13M
            }
489
9.86M
            LAST_SKIP_BITS(re, gb, MIN_CACHE_BITS);
490
9.86M
            UPDATE_CACHE(re, gb);
491
9.86M
        }
492
5.33M
        for (; i < limit && SHOW_UBITS(re, gb, 1) == 0; i++) {
493
4.74M
            SKIP_BITS(re, gb, 1);
494
4.74M
        }
495
587k
        LAST_SKIP_BITS(re, gb, 1);
496
587k
        UPDATE_CACHE(re, gb);
497
498
587k
        if (i < limit - 1) {
499
587k
            if (k) {
500
586k
                if (k > MIN_CACHE_BITS - 1) {
501
197k
                    buf = SHOW_UBITS(re, gb, 16) << (k-16);
502
197k
                    LAST_SKIP_BITS(re, gb, 16);
503
197k
                    UPDATE_CACHE(re, gb);
504
197k
                    buf |= SHOW_UBITS(re, gb, k-16);
505
197k
                    LAST_SKIP_BITS(re, gb, k-16);
506
389k
                } else {
507
389k
                    buf = SHOW_UBITS(re, gb, k);
508
389k
                    LAST_SKIP_BITS(re, gb, k);
509
389k
                }
510
586k
            } else {
511
982
                buf = 0;
512
982
            }
513
514
587k
            buf += ((SUINT)i << k);
515
587k
        } else if (esc_len && 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
587k
        CLOSE_READER(re, gb);
524
587k
        return buf;
525
6.72M
    }
526
11.0M
#endif
527
11.0M
}
Unexecuted instantiation: rv60dec.c:get_ur_golomb_jpegls
flacdec.c:get_ur_golomb_jpegls
Line
Count
Source
433
158M
{
434
158M
    unsigned int buf;
435
158M
    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 (esc_len && 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
158M
    OPEN_READER(re, gb);
467
158M
    UPDATE_CACHE(re, gb);
468
158M
    buf = GET_CACHE(re, gb);
469
470
158M
    log = av_log2(buf);
471
472
158M
    av_assert2(k <= 31);
473
474
158M
    if (log - k >= 32 - MIN_CACHE_BITS + (MIN_CACHE_BITS == 32) &&
475
139M
        32 - log < limit) {
476
139M
        buf >>= log - k;
477
139M
        buf  += (30U - log) << k;
478
139M
        LAST_SKIP_BITS(re, gb, 32 + k - log);
479
139M
        CLOSE_READER(re, gb);
480
481
139M
        return buf;
482
139M
    } else {
483
18.9M
        int i;
484
1.53G
        for (i = 0; i + MIN_CACHE_BITS <= limit && SHOW_UBITS(re, gb, MIN_CACHE_BITS) == 0; i += MIN_CACHE_BITS) {
485
1.51G
            if (gb->size_in_bits <= re_index) {
486
56.4k
                CLOSE_READER(re, gb);
487
56.4k
                return -1;
488
56.4k
            }
489
1.51G
            LAST_SKIP_BITS(re, gb, MIN_CACHE_BITS);
490
1.51G
            UPDATE_CACHE(re, gb);
491
1.51G
        }
492
146M
        for (; i < limit && SHOW_UBITS(re, gb, 1) == 0; i++) {
493
127M
            SKIP_BITS(re, gb, 1);
494
127M
        }
495
18.8M
        LAST_SKIP_BITS(re, gb, 1);
496
18.8M
        UPDATE_CACHE(re, gb);
497
498
18.8M
        if (i < limit - 1) {
499
18.7M
            if (k) {
500
17.2M
                if (k > MIN_CACHE_BITS - 1) {
501
7.72M
                    buf = SHOW_UBITS(re, gb, 16) << (k-16);
502
7.72M
                    LAST_SKIP_BITS(re, gb, 16);
503
7.72M
                    UPDATE_CACHE(re, gb);
504
7.72M
                    buf |= SHOW_UBITS(re, gb, k-16);
505
7.72M
                    LAST_SKIP_BITS(re, gb, k-16);
506
9.47M
                } else {
507
9.47M
                    buf = SHOW_UBITS(re, gb, k);
508
9.47M
                    LAST_SKIP_BITS(re, gb, k);
509
9.47M
                }
510
17.2M
            } else {
511
1.58M
                buf = 0;
512
1.58M
            }
513
514
18.7M
            buf += ((SUINT)i << k);
515
18.7M
        } else if (esc_len && i == limit - 1) {
516
39.6k
            buf = SHOW_UBITS(re, gb, esc_len);
517
39.6k
            LAST_SKIP_BITS(re, gb, esc_len);
518
519
39.6k
            buf ++;
520
55.2k
        } else {
521
55.2k
            buf = -1;
522
55.2k
        }
523
18.8M
        CLOSE_READER(re, gb);
524
18.8M
        return buf;
525
18.9M
    }
526
158M
#endif
527
158M
}
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
340k
{
434
340k
    unsigned int buf;
435
340k
    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 (esc_len && 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
340k
    OPEN_READER(re, gb);
467
340k
    UPDATE_CACHE(re, gb);
468
340k
    buf = GET_CACHE(re, gb);
469
470
340k
    log = av_log2(buf);
471
472
340k
    av_assert2(k <= 31);
473
474
340k
    if (log - k >= 32 - MIN_CACHE_BITS + (MIN_CACHE_BITS == 32) &&
475
108k
        32 - log < limit) {
476
108k
        buf >>= log - k;
477
108k
        buf  += (30U - log) << k;
478
108k
        LAST_SKIP_BITS(re, gb, 32 + k - log);
479
108k
        CLOSE_READER(re, gb);
480
481
108k
        return buf;
482
232k
    } else {
483
232k
        int i;
484
5.72M
        for (i = 0; i + MIN_CACHE_BITS <= limit && SHOW_UBITS(re, gb, MIN_CACHE_BITS) == 0; i += MIN_CACHE_BITS) {
485
5.49M
            if (gb->size_in_bits <= re_index) {
486
0
                CLOSE_READER(re, gb);
487
0
                return -1;
488
0
            }
489
5.49M
            LAST_SKIP_BITS(re, gb, MIN_CACHE_BITS);
490
5.49M
            UPDATE_CACHE(re, gb);
491
5.49M
        }
492
309k
        for (; i < limit && SHOW_UBITS(re, gb, 1) == 0; i++) {
493
77.5k
            SKIP_BITS(re, gb, 1);
494
77.5k
        }
495
232k
        LAST_SKIP_BITS(re, gb, 1);
496
232k
        UPDATE_CACHE(re, gb);
497
498
232k
        if (i < limit - 1) {
499
6.35k
            if (k) {
500
4.90k
                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.90k
                } else {
507
4.90k
                    buf = SHOW_UBITS(re, gb, k);
508
4.90k
                    LAST_SKIP_BITS(re, gb, k);
509
4.90k
                }
510
4.90k
            } else {
511
1.45k
                buf = 0;
512
1.45k
            }
513
514
6.35k
            buf += ((SUINT)i << k);
515
226k
        } else if (esc_len && 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
226k
        } else {
521
226k
            buf = -1;
522
226k
        }
523
232k
        CLOSE_READER(re, gb);
524
232k
        return buf;
525
232k
    }
526
340k
#endif
527
340k
}
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
37.9M
{
535
37.9M
    unsigned v = get_ur_golomb(gb, k, limit, esc_len);
536
37.9M
    return (v >> 1) ^ -(v & 1);
537
37.9M
}
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
ffv1dec.c:get_sr_golomb
Line
Count
Source
534
37.9M
{
535
37.9M
    unsigned v = get_ur_golomb(gb, k, limit, esc_len);
536
37.9M
    return (v >> 1) ^ -(v & 1);
537
37.9M
}
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
158M
{
547
158M
    unsigned v = get_ur_golomb_jpegls(gb, k, limit, esc_len);
548
158M
    return (v >> 1) ^ -(v & 1);
549
158M
}
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: 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
158M
{
547
158M
    unsigned v = get_ur_golomb_jpegls(gb, k, limit, esc_len);
548
158M
    return (v >> 1) ^ -(v & 1);
549
158M
}
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
4.48M
{
556
4.48M
    return get_ur_golomb_jpegls(gb, k, INT_MAX, 0);
557
4.48M
}
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
31.0k
{
556
    return get_ur_golomb_jpegls(gb, k, INT_MAX, 0);
557
31.0k
}
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: 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
4.45M
{
556
    return get_ur_golomb_jpegls(gb, k, INT_MAX, 0);
557
4.45M
}
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.58M
{
564
    int uvar = get_ur_golomb_jpegls(gb, k + 1, INT_MAX, 0);
565
6.58M
    return (uvar >> 1) ^ -(uvar & 1);
566
6.58M
}
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: 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.58M
{
564
    int uvar = get_ur_golomb_jpegls(gb, k + 1, INT_MAX, 0);
565
6.58M
    return (uvar >> 1) ^ -(uvar & 1);
566
6.58M
}
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 */