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
a6c01275
Commit
a6c01275
authored
Sep 10, 2004
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get/set_sr_golomb() cleanup
Originally committed as revision 3451 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
8bf5d58f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
28 deletions
+5
-28
ffv1.c
libavcodec/ffv1.c
+2
-2
golomb.h
libavcodec/golomb.h
+3
-26
No files found.
libavcodec/ffv1.c
View file @
a6c01275
...
...
@@ -325,7 +325,7 @@ static inline void put_vlc_symbol(PutBitContext *pb, VlcState * const state, int
#endif
//printf("v:%d/%d bias:%d error:%d drift:%d count:%d k:%d\n", v, code, state->bias, state->error_sum, state->drift, state->count, k);
set_sr_golomb
_ffv1
(
pb
,
code
,
k
,
12
,
bits
);
set_sr_golomb
(
pb
,
code
,
k
,
12
,
bits
);
update_vlc_state
(
state
,
v
);
}
...
...
@@ -342,7 +342,7 @@ static inline int get_vlc_symbol(GetBitContext *gb, VlcState * const state, int
assert
(
k
<=
8
);
v
=
get_sr_golomb
_ffv1
(
gb
,
k
,
12
,
bits
);
v
=
get_sr_golomb
(
gb
,
k
,
12
,
bits
);
//printf("v:%d bias:%d error:%d drift:%d count:%d k:%d", v, state->bias, state->error_sum, state->drift, state->count, k);
#if 0 // JPEG LS
...
...
libavcodec/golomb.h
View file @
a6c01275
...
...
@@ -263,7 +263,7 @@ static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit, int
/**
* read signed golomb rice code (ffv1).
*/
static
inline
int
get_sr_golomb
_ffv1
(
GetBitContext
*
gb
,
int
k
,
int
limit
,
int
esc_len
){
static
inline
int
get_sr_golomb
(
GetBitContext
*
gb
,
int
k
,
int
limit
,
int
esc_len
){
int
v
=
get_ur_golomb
(
gb
,
k
,
limit
,
esc_len
);
v
++
;
...
...
@@ -272,8 +272,8 @@ static inline int get_sr_golomb_ffv1(GetBitContext *gb, int k, int limit, int es
// return (v>>1) ^ -(v&1);
}
/**
/**
* read signed golomb rice code (flac).
*/
static
inline
int
get_sr_golomb_flac
(
GetBitContext
*
gb
,
int
k
,
int
limit
,
int
esc_len
){
...
...
@@ -281,17 +281,6 @@ static inline int get_sr_golomb_flac(GetBitContext *gb, int k, int limit, int es
return
(
v
>>
1
)
^
-
(
v
&
1
);
}
/**
* read signed golomb rice code (sonic).
*/
static
inline
int
get_sr_golomb_sonic
(
GetBitContext
*
gb
,
int
k
,
int
limit
,
int
esc_len
){
int
v
=
get_ur_golomb
(
gb
,
k
,
limit
,
esc_len
);
v
++
;
if
(
v
&
1
)
return
-
(
v
>>
1
);
else
return
v
>>
1
;
}
#ifdef TRACE
static
inline
int
get_ue
(
GetBitContext
*
s
,
char
*
file
,
char
*
func
,
int
line
){
...
...
@@ -432,7 +421,7 @@ static inline void set_ur_golomb_jpegls(PutBitContext *pb, int i, int k, int lim
/**
* write signed golomb rice code (ffv1).
*/
static
inline
void
set_sr_golomb
_ffv1
(
PutBitContext
*
pb
,
int
i
,
int
k
,
int
limit
,
int
esc_len
){
static
inline
void
set_sr_golomb
(
PutBitContext
*
pb
,
int
i
,
int
k
,
int
limit
,
int
esc_len
){
int
v
;
v
=
-
2
*
i
-
1
;
...
...
@@ -452,15 +441,3 @@ static inline void set_sr_golomb_flac(PutBitContext *pb, int i, int k, int limit
set_ur_golomb_jpegls
(
pb
,
v
,
k
,
limit
,
esc_len
);
}
/**
* write signed golomb rice code (sonic).
*/
static
inline
void
set_sr_golomb_sonic
(
PutBitContext
*
pb
,
int
i
,
int
k
,
int
limit
,
int
esc_len
){
int
v
;
v
=
2
*
i
-
1
;
if
(
v
<
0
)
v
^=
-
1
;
set_ur_golomb
(
pb
,
v
,
k
,
limit
,
esc_len
);
}
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