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
c010d69a
Commit
c010d69a
authored
Oct 09, 2006
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decrease ff_h264_norm_shift[] size
Originally committed as revision 6596 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
158256a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
17 deletions
+9
-17
cabac.c
libavcodec/cabac.c
+6
-14
cabac.h
libavcodec/cabac.h
+3
-3
No files found.
libavcodec/cabac.c
View file @
c010d69a
...
...
@@ -72,23 +72,15 @@ const uint8_t ff_h264_lps_state[64]= {
36
,
36
,
37
,
37
,
37
,
38
,
38
,
63
,
};
const
uint8_t
ff_h264_norm_shift
[
256
]
=
{
9
,
8
,
7
,
7
,
6
,
6
,
6
,
6
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
const
uint8_t
ff_h264_norm_shift
[
128
]
=
{
7
,
6
,
5
,
5
,
4
,
4
,
4
,
4
,
3
,
3
,
3
,
3
,
3
,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
0
,
0
,
0
,
};
/**
...
...
libavcodec/cabac.h
View file @
c010d69a
...
...
@@ -51,7 +51,7 @@ typedef struct CABACContext{
extern
const
uint8_t
ff_h264_lps_range
[
64
][
4
];
extern
const
uint8_t
ff_h264_mps_state
[
64
];
extern
const
uint8_t
ff_h264_lps_state
[
64
];
extern
const
uint8_t
ff_h264_norm_shift
[
256
];
extern
const
uint8_t
ff_h264_norm_shift
[
128
];
void
ff_init_cabac_encoder
(
CABACContext
*
c
,
uint8_t
*
buf
,
int
buf_size
);
...
...
@@ -270,7 +270,7 @@ static void refill2(CABACContext *c){
int
i
,
x
;
x
=
c
->
low
^
(
c
->
low
-
1
);
i
=
9
-
ff_h264_norm_shift
[
x
>>
(
CABAC_BITS
+
1
)];
i
=
7
-
ff_h264_norm_shift
[
x
>>
(
CABAC_BITS
+
1
)];
x
=
-
CABAC_MASK
;
...
...
@@ -393,7 +393,7 @@ asm(
#endif
renorm_cabac_decoder_once
(
c
);
}
else
{
bit
=
ff_h264_norm_shift
[
RangeLPS
>>
1
7
];
bit
=
ff_h264_norm_shift
[
RangeLPS
>>
1
9
];
c
->
low
-=
c
->
range
;
*
state
=
c
->
lps_state
[
s
];
c
->
range
=
RangeLPS
<<
bit
;
...
...
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