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
bdfa2451
Commit
bdfa2451
authored
Nov 14, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aura: cosmetics, reformat
parent
b047c687
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
aura.c
libavcodec/aura.c
+10
-11
No files found.
libavcodec/aura.c
View file @
bdfa2451
...
...
@@ -49,8 +49,7 @@ static int aura_decode_frame(AVCodecContext *avctx,
void
*
data
,
int
*
got_frame
,
AVPacket
*
pkt
)
{
AuraDecodeContext
*
s
=
avctx
->
priv_data
;
AuraDecodeContext
*
s
=
avctx
->
priv_data
;
uint8_t
*
Y
,
*
U
,
*
V
;
uint8_t
val
;
int
x
,
y
;
...
...
@@ -68,12 +67,12 @@ static int aura_decode_frame(AVCodecContext *avctx,
/* pixel data starts 48 bytes in, after 3x16-byte tables */
buf
+=
48
;
if
(
s
->
frame
.
data
[
0
])
if
(
s
->
frame
.
data
[
0
])
avctx
->
release_buffer
(
avctx
,
&
s
->
frame
);
s
->
frame
.
buffer_hints
=
FF_BUFFER_HINTS_VALID
;
s
->
frame
.
reference
=
0
;
if
(
ff_get_buffer
(
avctx
,
&
s
->
frame
)
<
0
)
{
if
(
ff_get_buffer
(
avctx
,
&
s
->
frame
)
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
return
-
1
;
}
...
...
@@ -85,23 +84,23 @@ static int aura_decode_frame(AVCodecContext *avctx,
/* iterate through each line in the height */
for
(
y
=
0
;
y
<
avctx
->
height
;
y
++
)
{
/* reset predictors */
val
=
*
buf
++
;
val
=
*
buf
++
;
U
[
0
]
=
val
&
0xF0
;
Y
[
0
]
=
val
<<
4
;
val
=
*
buf
++
;
val
=
*
buf
++
;
V
[
0
]
=
val
&
0xF0
;
Y
[
1
]
=
Y
[
0
]
+
delta_table
[
val
&
0xF
];
Y
+=
2
;
U
++
;
V
++
;
Y
+=
2
;
U
++
;
V
++
;
/* iterate through the remaining pixel groups (4 pixels/group) */
for
(
x
=
1
;
x
<
(
avctx
->
width
>>
1
);
x
++
)
{
val
=
*
buf
++
;
val
=
*
buf
++
;
U
[
0
]
=
U
[
-
1
]
+
delta_table
[
val
>>
4
];
Y
[
0
]
=
Y
[
-
1
]
+
delta_table
[
val
&
0xF
];
val
=
*
buf
++
;
val
=
*
buf
++
;
V
[
0
]
=
V
[
-
1
]
+
delta_table
[
val
>>
4
];
Y
[
1
]
=
Y
[
0
]
+
delta_table
[
val
&
0xF
];
Y
+=
2
;
U
++
;
V
++
;
Y
+=
2
;
U
++
;
V
++
;
}
Y
+=
s
->
frame
.
linesize
[
0
]
-
avctx
->
width
;
U
+=
s
->
frame
.
linesize
[
1
]
-
(
avctx
->
width
>>
1
);
...
...
@@ -109,7 +108,7 @@ static int aura_decode_frame(AVCodecContext *avctx,
}
*
got_frame
=
1
;
*
(
AVFrame
*
)
data
=
s
->
frame
;
*
(
AVFrame
*
)
data
=
s
->
frame
;
return
pkt
->
size
;
}
...
...
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