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
f2e9156e
Commit
f2e9156e
authored
Dec 09, 2017
by
Martin Vignali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/utvideodec : use gradient_pred dsp in interlace decoding
parent
b1781caf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
utvideodec.c
libavcodec/utvideodec.c
+5
-1
No files found.
libavcodec/utvideodec.c
View file @
f2e9156e
...
...
@@ -502,6 +502,7 @@ static void restore_gradient_planar_il(UtvideoContext *c, uint8_t *src, ptrdiff_
int
slice_start
,
slice_height
;
const
int
cmask
=
~
(
rmode
?
3
:
1
);
const
ptrdiff_t
stride2
=
stride
<<
1
;
int
min_width
=
FFMIN
(
width
,
32
);
for
(
slice
=
0
;
slice
<
slices
;
slice
++
)
{
slice_start
=
((
slice
*
height
)
/
slices
)
&
cmask
;
...
...
@@ -523,12 +524,15 @@ static void restore_gradient_planar_il(UtvideoContext *c, uint8_t *src, ptrdiff_
for
(
j
=
1
;
j
<
slice_height
;
j
++
)
{
// second line - first element has top prediction, the rest uses gradient
bsrc
[
0
]
=
(
bsrc
[
0
]
+
bsrc
[
-
stride2
])
&
0xFF
;
for
(
i
=
1
;
i
<
width
;
i
++
)
{
for
(
i
=
1
;
i
<
min_width
;
i
++
)
{
/* dsp need align 32 */
A
=
bsrc
[
i
-
stride2
];
B
=
bsrc
[
i
-
(
stride2
+
1
)];
C
=
bsrc
[
i
-
1
];
bsrc
[
i
]
=
(
A
-
B
+
C
+
bsrc
[
i
])
&
0xFF
;
}
if
(
width
>
32
)
c
->
llviddsp
.
add_gradient_pred
(
bsrc
+
32
,
stride2
,
width
-
32
);
A
=
bsrc
[
-
stride
];
B
=
bsrc
[
-
(
1
+
stride
+
stride
-
width
)];
C
=
bsrc
[
width
-
1
];
...
...
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