Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
fb13fe83
Commit
fb13fe83
authored
Oct 23, 2013
by
Vittorio Giovara
Committed by
Diego Biurrun
Oct 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
golomb: reduce scope of a few variables
Signed-off-by:
Diego Biurrun
<
diego@biurrun.de
>
parent
0e730494
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
golomb.h
libavcodec/golomb.h
+6
-12
No files found.
libavcodec/golomb.h
View file @
fb13fe83
...
@@ -53,7 +53,6 @@ extern const uint8_t ff_interleaved_dirac_golomb_vlc_code[256];
...
@@ -53,7 +53,6 @@ extern const uint8_t ff_interleaved_dirac_golomb_vlc_code[256];
static
inline
int
get_ue_golomb
(
GetBitContext
*
gb
)
static
inline
int
get_ue_golomb
(
GetBitContext
*
gb
)
{
{
unsigned
int
buf
;
unsigned
int
buf
;
int
log
;
OPEN_READER
(
re
,
gb
);
OPEN_READER
(
re
,
gb
);
UPDATE_CACHE
(
re
,
gb
);
UPDATE_CACHE
(
re
,
gb
);
...
@@ -66,7 +65,7 @@ static inline int get_ue_golomb(GetBitContext *gb)
...
@@ -66,7 +65,7 @@ static inline int get_ue_golomb(GetBitContext *gb)
return
ff_ue_golomb_vlc_code
[
buf
];
return
ff_ue_golomb_vlc_code
[
buf
];
}
else
{
}
else
{
log
=
2
*
av_log2
(
buf
)
-
31
;
int
log
=
2
*
av_log2
(
buf
)
-
31
;
buf
>>=
log
;
buf
>>=
log
;
buf
--
;
buf
--
;
LAST_SKIP_BITS
(
re
,
gb
,
32
-
log
);
LAST_SKIP_BITS
(
re
,
gb
,
32
-
log
);
...
@@ -180,7 +179,6 @@ static inline int get_te_golomb(GetBitContext *gb, int range)
...
@@ -180,7 +179,6 @@ static inline int get_te_golomb(GetBitContext *gb, int range)
static
inline
int
get_se_golomb
(
GetBitContext
*
gb
)
static
inline
int
get_se_golomb
(
GetBitContext
*
gb
)
{
{
unsigned
int
buf
;
unsigned
int
buf
;
int
log
;
OPEN_READER
(
re
,
gb
);
OPEN_READER
(
re
,
gb
);
UPDATE_CACHE
(
re
,
gb
);
UPDATE_CACHE
(
re
,
gb
);
...
@@ -193,7 +191,7 @@ static inline int get_se_golomb(GetBitContext *gb)
...
@@ -193,7 +191,7 @@ static inline int get_se_golomb(GetBitContext *gb)
return
ff_se_golomb_vlc_code
[
buf
];
return
ff_se_golomb_vlc_code
[
buf
];
}
else
{
}
else
{
log
=
2
*
av_log2
(
buf
)
-
31
;
int
log
=
2
*
av_log2
(
buf
)
-
31
;
buf
>>=
log
;
buf
>>=
log
;
LAST_SKIP_BITS
(
re
,
gb
,
32
-
log
);
LAST_SKIP_BITS
(
re
,
gb
,
32
-
log
);
...
@@ -211,7 +209,6 @@ static inline int get_se_golomb(GetBitContext *gb)
...
@@ -211,7 +209,6 @@ static inline int get_se_golomb(GetBitContext *gb)
static
inline
int
svq3_get_se_golomb
(
GetBitContext
*
gb
)
static
inline
int
svq3_get_se_golomb
(
GetBitContext
*
gb
)
{
{
unsigned
int
buf
;
unsigned
int
buf
;
int
log
;
OPEN_READER
(
re
,
gb
);
OPEN_READER
(
re
,
gb
);
UPDATE_CACHE
(
re
,
gb
);
UPDATE_CACHE
(
re
,
gb
);
...
@@ -224,6 +221,7 @@ static inline int svq3_get_se_golomb(GetBitContext *gb)
...
@@ -224,6 +221,7 @@ static inline int svq3_get_se_golomb(GetBitContext *gb)
return
ff_interleaved_se_golomb_vlc_code
[
buf
];
return
ff_interleaved_se_golomb_vlc_code
[
buf
];
}
else
{
}
else
{
int
log
;
LAST_SKIP_BITS
(
re
,
gb
,
8
);
LAST_SKIP_BITS
(
re
,
gb
,
8
);
UPDATE_CACHE
(
re
,
gb
);
UPDATE_CACHE
(
re
,
gb
);
buf
|=
1
|
(
GET_CACHE
(
re
,
gb
)
>>
8
);
buf
|=
1
|
(
GET_CACHE
(
re
,
gb
)
>>
8
);
...
@@ -243,12 +241,10 @@ static inline int svq3_get_se_golomb(GetBitContext *gb)
...
@@ -243,12 +241,10 @@ static inline int svq3_get_se_golomb(GetBitContext *gb)
static
inline
int
dirac_get_se_golomb
(
GetBitContext
*
gb
)
static
inline
int
dirac_get_se_golomb
(
GetBitContext
*
gb
)
{
{
uint32_t
buf
;
uint32_t
ret
=
svq3_get_ue_golomb
(
gb
);
uint32_t
ret
;
ret
=
svq3_get_ue_golomb
(
gb
);
if
(
ret
)
{
if
(
ret
)
{
uint32_t
buf
;
OPEN_READER
(
re
,
gb
);
OPEN_READER
(
re
,
gb
);
UPDATE_CACHE
(
re
,
gb
);
UPDATE_CACHE
(
re
,
gb
);
buf
=
SHOW_SBITS
(
re
,
gb
,
1
);
buf
=
SHOW_SBITS
(
re
,
gb
,
1
);
...
@@ -459,8 +455,6 @@ static inline int get_te(GetBitContext *s, int r, char *file, const char *func,
...
@@ -459,8 +455,6 @@ static inline int get_te(GetBitContext *s, int r, char *file, const char *func,
*/
*/
static
inline
void
set_ue_golomb
(
PutBitContext
*
pb
,
int
i
)
static
inline
void
set_ue_golomb
(
PutBitContext
*
pb
,
int
i
)
{
{
int
e
;
assert
(
i
>=
0
);
assert
(
i
>=
0
);
#if 0
#if 0
...
@@ -472,7 +466,7 @@ static inline void set_ue_golomb(PutBitContext *pb, int i)
...
@@ -472,7 +466,7 @@ static inline void set_ue_golomb(PutBitContext *pb, int i)
if
(
i
<
256
)
if
(
i
<
256
)
put_bits
(
pb
,
ff_ue_golomb_len
[
i
],
i
+
1
);
put_bits
(
pb
,
ff_ue_golomb_len
[
i
],
i
+
1
);
else
{
else
{
e
=
av_log2
(
i
+
1
);
int
e
=
av_log2
(
i
+
1
);
put_bits
(
pb
,
2
*
e
+
1
,
i
+
1
);
put_bits
(
pb
,
2
*
e
+
1
,
i
+
1
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment