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
fcbc799c
Commit
fcbc799c
authored
Mar 26, 2005
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make reverse[] non static
Originally committed as revision 4084 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
a8a15e9d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
asv1.c
libavcodec/asv1.c
+5
-5
bitstream.h
libavcodec/bitstream.h
+2
-0
No files found.
libavcodec/asv1.c
View file @
fcbc799c
...
...
@@ -63,7 +63,7 @@ static const uint8_t scantab[64]={
};
static
const
uint8_t
reverse
[
256
]
=
{
const
uint8_t
ff_
reverse
[
256
]
=
{
0x00
,
0x80
,
0x40
,
0xC0
,
0x20
,
0xA0
,
0x60
,
0xE0
,
0x10
,
0x90
,
0x50
,
0xD0
,
0x30
,
0xB0
,
0x70
,
0xF0
,
0x08
,
0x88
,
0x48
,
0xC8
,
0x28
,
0xA8
,
0x68
,
0xE8
,
0x18
,
0x98
,
0x58
,
0xD8
,
0x38
,
0xB8
,
0x78
,
0xF8
,
0x04
,
0x84
,
0x44
,
0xC4
,
0x24
,
0xA4
,
0x64
,
0xE4
,
0x14
,
0x94
,
0x54
,
0xD4
,
0x34
,
0xB4
,
0x74
,
0xF4
,
...
...
@@ -155,11 +155,11 @@ static void init_vlcs(ASV1Context *a){
//FIXME write a reversed bitstream reader to avoid the double reverse
static
inline
int
asv2_get_bits
(
GetBitContext
*
gb
,
int
n
){
return
reverse
[
get_bits
(
gb
,
n
)
<<
(
8
-
n
)
];
return
ff_
reverse
[
get_bits
(
gb
,
n
)
<<
(
8
-
n
)
];
}
static
inline
void
asv2_put_bits
(
PutBitContext
*
pb
,
int
n
,
int
v
){
put_bits
(
pb
,
n
,
reverse
[
v
<<
(
8
-
n
)
]);
put_bits
(
pb
,
n
,
ff_
reverse
[
v
<<
(
8
-
n
)
]);
}
static
inline
int
asv1_get_level
(
GetBitContext
*
gb
){
...
...
@@ -427,7 +427,7 @@ static int decode_frame(AVCodecContext *avctx,
else
{
int
i
;
for
(
i
=
0
;
i
<
buf_size
;
i
++
)
a
->
bitstream_buffer
[
i
]
=
reverse
[
buf
[
i
]
];
a
->
bitstream_buffer
[
i
]
=
ff_
reverse
[
buf
[
i
]
];
}
init_get_bits
(
&
a
->
gb
,
a
->
bitstream_buffer
,
buf_size
*
8
);
...
...
@@ -528,7 +528,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
else
{
int
i
;
for
(
i
=
0
;
i
<
4
*
size
;
i
++
)
buf
[
i
]
=
reverse
[
buf
[
i
]
];
buf
[
i
]
=
ff_
reverse
[
buf
[
i
]
];
}
return
size
*
4
;
...
...
libavcodec/bitstream.h
View file @
fcbc799c
...
...
@@ -14,6 +14,8 @@
//#define A32_BITSTREAM_READER
#define LIBMPEG2_BITSTREAM_READER_HACK //add BERO
extern
const
uint8_t
ff_reverse
[
256
];
#if defined(ARCH_X86) || defined(ARCH_X86_64)
// avoid +32 for shift optimization (gcc should do that ...)
static
inline
int32_t
NEG_SSR32
(
int32_t
a
,
int8_t
s
){
...
...
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