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
6b3661b2
Commit
6b3661b2
authored
Jan 23, 2010
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimize filter_mb_mbaff_edge*()
Originally committed as revision 21397 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
933bea77
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
14 deletions
+8
-14
h264_loopfilter.c
libavcodec/h264_loopfilter.c
+8
-14
No files found.
libavcodec/h264_loopfilter.c
View file @
6b3661b2
...
...
@@ -136,20 +136,16 @@ static void av_noinline filter_mb_edgecv( uint8_t *pix, int stride, int16_t bS[4
static
void
filter_mb_mbaff_edgev
(
H264Context
*
h
,
uint8_t
*
pix
,
int
stride
,
int16_t
bS
[
4
],
int
bsi
,
int
qp
)
{
int
i
;
int
index_a
=
qp
+
h
->
slice_alpha_c0_offset
;
int
alpha
=
(
alpha_table
+
52
)[
index_a
];
int
beta
=
(
beta_table
+
52
)[
qp
+
h
->
slice_beta_offset
];
for
(
i
=
0
;
i
<
8
;
i
++
,
pix
+=
stride
)
{
int
index_a
;
int
alpha
;
int
beta
;
const
int
bS_index
=
(
i
>>
1
)
*
bsi
;
if
(
bS
[
bS_index
]
==
0
)
{
continue
;
}
index_a
=
qp
+
h
->
slice_alpha_c0_offset
;
alpha
=
(
alpha_table
+
52
)[
index_a
];
beta
=
(
beta_table
+
52
)[
qp
+
h
->
slice_beta_offset
];
if
(
bS
[
bS_index
]
<
4
)
{
const
int
tc0
=
(
tc0_table
+
52
)[
index_a
][
bS
[
bS_index
]];
const
int
p0
=
pix
[
-
1
];
...
...
@@ -166,10 +162,12 @@ static void filter_mb_mbaff_edgev( H264Context *h, uint8_t *pix, int stride, int
int
i_delta
;
if
(
FFABS
(
p2
-
p0
)
<
beta
)
{
if
(
tc0
)
pix
[
-
2
]
=
p1
+
av_clip
(
(
p2
+
(
(
p0
+
q0
+
1
)
>>
1
)
-
(
p1
<<
1
)
)
>>
1
,
-
tc0
,
tc0
);
tc
++
;
}
if
(
FFABS
(
q2
-
q0
)
<
beta
)
{
if
(
tc0
)
pix
[
1
]
=
q1
+
av_clip
(
(
q2
+
(
(
p0
+
q0
+
1
)
>>
1
)
-
(
q1
<<
1
)
)
>>
1
,
-
tc0
,
tc0
);
tc
++
;
}
...
...
@@ -227,20 +225,16 @@ static void filter_mb_mbaff_edgev( H264Context *h, uint8_t *pix, int stride, int
}
static
void
filter_mb_mbaff_edgecv
(
H264Context
*
h
,
uint8_t
*
pix
,
int
stride
,
int16_t
bS
[
4
],
int
bsi
,
int
qp
)
{
int
i
;
int
index_a
=
qp
+
h
->
slice_alpha_c0_offset
;
int
alpha
=
(
alpha_table
+
52
)[
index_a
];
int
beta
=
(
beta_table
+
52
)[
qp
+
h
->
slice_beta_offset
];
for
(
i
=
0
;
i
<
4
;
i
++
,
pix
+=
stride
)
{
int
index_a
;
int
alpha
;
int
beta
;
const
int
bS_index
=
i
*
bsi
;
if
(
bS
[
bS_index
]
==
0
)
{
continue
;
}
index_a
=
qp
+
h
->
slice_alpha_c0_offset
;
alpha
=
(
alpha_table
+
52
)[
index_a
];
beta
=
(
beta_table
+
52
)[
qp
+
h
->
slice_beta_offset
];
if
(
bS
[
bS_index
]
<
4
)
{
const
int
tc
=
(
tc0_table
+
52
)[
index_a
][
bS
[
bS_index
]]
+
1
;
const
int
p0
=
pix
[
-
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