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
cebe4432
Commit
cebe4432
authored
Jun 18, 2003
by
Nick Kurshev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimization: merge phases 0 and 1
Originally committed as revision 1970 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
cb906609
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
15 deletions
+9
-15
ra288.c
libavcodec/ra288.c
+9
-15
No files found.
libavcodec/ra288.c
View file @
cebe4432
...
@@ -386,14 +386,13 @@ static void prodsum(float *tgt, float *src, int len, int n)
...
@@ -386,14 +386,13 @@ static void prodsum(float *tgt, float *src, int len, int n)
}
}
}
}
void
*
decode_block
(
AVCodecContext
*
avctx
,
unsigned
char
*
in
,
signed
short
int
*
out
)
void
*
decode_block
(
AVCodecContext
*
avctx
,
unsigned
char
*
in
,
signed
short
int
*
out
,
unsigned
len
)
{
{
int
x
,
y
;
int
x
,
y
;
Real288_internal
*
glob
=
avctx
->
priv_data
;
Real288_internal
*
glob
=
avctx
->
priv_data
;
int
cfs
=
((
short
*
)(
avctx
->
extradata
))[
3
];
/* coded frame size 38 */
unsigned
short
int
buffer
[
len
];
unsigned
short
int
buffer
[
cfs
];
unpack
(
buffer
,
in
,
cfs
);
unpack
(
buffer
,
in
,
len
);
for
(
x
=
0
;
x
<
32
;
x
++
)
for
(
x
=
0
;
x
<
32
;
x
++
)
{
{
glob
->
phasep
=
(
glob
->
phase
=
x
&
7
)
*
5
;
glob
->
phasep
=
(
glob
->
phase
=
x
&
7
)
*
5
;
...
@@ -417,30 +416,25 @@ static int ra288_decode_frame(AVCodecContext * avctx,
...
@@ -417,30 +416,25 @@ static int ra288_decode_frame(AVCodecContext * avctx,
//((short*)(avctx->extradata))[3]; /* coded frame size */
//((short*)(avctx->extradata))[3]; /* coded frame size */
//((short*)(avctx->extradata))[4]; /* codec's data length */
//((short*)(avctx->extradata))[4]; /* codec's data length */
//((short*)(avctx->extradata))[5...] /* codec's data */
//((short*)(avctx->extradata))[5...] /* codec's data */
int
z
,
bret
;
int
bret
;
void
*
datao
;
void
*
datao
;
int
w
=
avctx
->
block_align
;
/* 228 */
int
w
=
avctx
->
block_align
;
/* 228 */
int
h
=
((
short
*
)(
avctx
->
extradata
))[
1
];
/* 12 */
int
h
=
((
short
*
)(
avctx
->
extradata
))[
1
];
/* 12 */
int
cfs
=
((
short
*
)(
avctx
->
extradata
))[
3
];
/* coded frame size 38 */
int
cfs
=
((
short
*
)(
avctx
->
extradata
))[
3
];
/* coded frame size 38 */
int
i
,
j
;
int
i
,
j
;
unsigned
char
tb
[
h
*
w
],
*
ptb
;
if
(
buf_size
<
w
*
h
)
if
(
buf_size
<
w
*
h
)
{
{
fprintf
(
stderr
,
"ffra288: Error! Input buffer is too small [%d<%d]
\n
"
,
buf_size
,
w
*
h
);
fprintf
(
stderr
,
"ffra288: Error! Input buffer is too small [%d<%d]
\n
"
,
buf_size
,
w
*
h
);
return
0
;
return
0
;
}
}
datao
=
data
;
datao
=
data
;
ptb
=
buf
;
bret
=
0
;
/* Phase 0: deinterleave */
for
(
j
=
0
;
j
<
h
/
2
;
j
++
)
for
(
j
=
0
;
j
<
h
;
j
++
)
for
(
i
=
0
;
i
<
h
;
i
++
)
for
(
i
=
0
;
i
<
h
/
2
;
i
++
)
{
{
memcpy
(
&
tb
[
i
*
2
*
w
+
j
*
cfs
],
ptb
,
cfs
);
data
=
decode_block
(
avctx
,
&
buf
[
j
*
cfs
+
cfs
*
i
*
h
/
2
],(
signed
short
*
)
data
,
cfs
);
ptb
+=
cfs
;
bret
+=
cfs
;
}
}
/* Phase 1: decode */
bret
=
ptb
-
buf
;
for
(
z
=
0
;
z
<
bret
;
z
+=
cfs
)
data
=
decode_block
(
avctx
,
&
tb
[
z
],(
signed
short
*
)
data
);
*
data_size
=
data
-
datao
;
*
data_size
=
data
-
datao
;
return
bret
;
return
bret
;
}
}
...
...
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