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
39616fc3
Commit
39616fc3
authored
Nov 16, 2011
by
Nathan Caldwell
Committed by
Martin Storsjö
Nov 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lagarith: Add correct line prediction for RGB
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
52767d89
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lagarith.c
libavcodec/lagarith.c
+5
-5
No files found.
libavcodec/lagarith.c
View file @
39616fc3
...
@@ -245,21 +245,21 @@ static void lag_pred_line(LagarithContext *l, uint8_t *buf,
...
@@ -245,21 +245,21 @@ static void lag_pred_line(LagarithContext *l, uint8_t *buf,
{
{
int
L
,
TL
;
int
L
,
TL
;
/* Left pixel is actually prev_row[width] */
L
=
buf
[
width
-
stride
-
1
];
if
(
!
line
)
{
if
(
!
line
)
{
/* Left prediction only for first line */
/* Left prediction only for first line */
L
=
l
->
dsp
.
add_hfyu_left_prediction
(
buf
+
1
,
buf
+
1
,
L
=
l
->
dsp
.
add_hfyu_left_prediction
(
buf
+
1
,
buf
+
1
,
width
-
1
,
buf
[
0
]);
width
-
1
,
buf
[
0
]);
return
;
return
;
}
else
if
(
line
==
1
)
{
}
else
if
(
line
==
1
)
{
/* Second line, left predict first pixel, the rest of the line is median predicted
*/
/* Second line, left predict first pixel, the rest of the line is median predicted
/* FIXM
E: In the case of RGB this pixel is top predicted */
* NOT
E: In the case of RGB this pixel is top predicted */
TL
=
buf
[
-
stride
]
;
TL
=
l
->
avctx
->
pix_fmt
==
PIX_FMT_YUV420P
?
buf
[
-
stride
]
:
L
;
}
else
{
}
else
{
/* Top left is 2 rows back, last pixel */
/* Top left is 2 rows back, last pixel */
TL
=
buf
[
width
-
(
2
*
stride
)
-
1
];
TL
=
buf
[
width
-
(
2
*
stride
)
-
1
];
}
}
/* Left pixel is actually prev_row[width] */
L
=
buf
[
width
-
stride
-
1
];
add_lag_median_prediction
(
buf
,
buf
-
stride
,
buf
,
add_lag_median_prediction
(
buf
,
buf
-
stride
,
buf
,
width
,
&
L
,
&
TL
);
width
,
&
L
,
&
TL
);
...
...
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