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
21cc343d
Commit
21cc343d
authored
Feb 01, 2008
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
const
Originally committed as revision 11722 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
75739ba2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
cook.c
libavcodec/cook.c
+7
-7
No files found.
libavcodec/cook.c
View file @
21cc343d
...
...
@@ -301,10 +301,10 @@ static void init_cplscales_table (COOKContext *q) {
#define DECODE_BYTES_PAD1(bytes) (3 - ((bytes)+3) % 4)
#define DECODE_BYTES_PAD2(bytes) ((bytes) % 4 + DECODE_BYTES_PAD1(2 * (bytes)))
static
inline
int
decode_bytes
(
uint8_t
*
inbuffer
,
uint8_t
*
out
,
int
bytes
){
static
inline
int
decode_bytes
(
const
uint8_t
*
inbuffer
,
uint8_t
*
out
,
int
bytes
){
int
i
,
off
;
uint32_t
c
;
uint32_t
*
buf
;
const
uint32_t
*
buf
;
uint32_t
*
obuf
=
(
uint32_t
*
)
out
;
/* FIXME: 64 bit platforms would be able to do 64 bits at a time.
* I'm too lazy though, should be something like
...
...
@@ -313,7 +313,7 @@ static inline int decode_bytes(uint8_t* inbuffer, uint8_t* out, int bytes){
* Buffer alignment needs to be checked. */
off
=
(
int
)((
long
)
inbuffer
&
3
);
buf
=
(
uint32_t
*
)
(
inbuffer
-
off
);
buf
=
(
const
uint32_t
*
)
(
inbuffer
-
off
);
c
=
be2me_32
((
0x37c511f2
>>
(
off
*
8
))
|
(
0x37c511f2
<<
(
32
-
(
off
*
8
))));
bytes
+=
3
+
off
;
for
(
i
=
0
;
i
<
bytes
/
4
;
i
++
)
...
...
@@ -875,7 +875,7 @@ static void joint_decode(COOKContext *q, float* mlt_buffer1,
*/
static
inline
void
decode_bytes_and_gain
(
COOKContext
*
q
,
uint8_t
*
inbuffer
,
decode_bytes_and_gain
(
COOKContext
*
q
,
const
uint8_t
*
inbuffer
,
cook_gains
*
gains_ptr
)
{
int
offset
;
...
...
@@ -944,7 +944,7 @@ mlt_compensate_output(COOKContext *q, float *decode_buffer,
*/
static
int
decode_subpacket
(
COOKContext
*
q
,
uint8_t
*
inbuffer
,
static
int
decode_subpacket
(
COOKContext
*
q
,
const
uint8_t
*
inbuffer
,
int
sub_packet_size
,
int16_t
*
outbuffer
)
{
/* packet dump */
// for (i=0 ; i<sub_packet_size ; i++) {
...
...
@@ -989,7 +989,7 @@ static int decode_subpacket(COOKContext *q, uint8_t *inbuffer,
static
int
cook_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_size
,
uint8_t
*
buf
,
int
buf_size
)
{
const
uint8_t
*
buf
,
int
buf_size
)
{
COOKContext
*
q
=
avctx
->
priv_data
;
if
(
buf_size
<
avctx
->
block_align
)
...
...
@@ -1038,7 +1038,7 @@ static void dump_cook_context(COOKContext *q)
static
int
cook_decode_init
(
AVCodecContext
*
avctx
)
{
COOKContext
*
q
=
avctx
->
priv_data
;
uint8_t
*
edata_ptr
=
avctx
->
extradata
;
const
uint8_t
*
edata_ptr
=
avctx
->
extradata
;
/* Take care of the codec specific extradata. */
if
(
avctx
->
extradata_size
<=
0
)
{
...
...
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