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
c0234aa4
Commit
c0234aa4
authored
Feb 08, 2006
by
Loren Merritt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slightly faster loopfilter
Originally committed as revision 4958 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
4accd1fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
h264.c
libavcodec/h264.c
+14
-2
No files found.
libavcodec/h264.c
View file @
c0234aa4
...
@@ -6547,6 +6547,18 @@ static void filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8
...
@@ -6547,6 +6547,18 @@ static void filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8
* frame numbers, not indices. */
* frame numbers, not indices. */
static
const
int
ref2frm
[
18
]
=
{
-
1
,
-
1
,
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
};
static
const
int
ref2frm
[
18
]
=
{
-
1
,
-
1
,
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
};
//for sufficiently low qp, filtering wouldn't do anything
//this is a conservative estimate: could also check beta_offset and more accurate chroma_qp
if
(
!
h
->
mb_aff_frame
){
int
qp_thresh
=
15
-
h
->
slice_alpha_c0_offset
-
FFMAX
(
0
,
h
->
pps
.
chroma_qp_index_offset
);
int
qp
=
s
->
current_picture
.
qscale_table
[
mb_xy
];
if
(
qp
<=
qp_thresh
&&
(
mb_x
==
0
||
((
qp
+
s
->
current_picture
.
qscale_table
[
mb_xy
-
1
]
+
1
)
>>
1
)
<=
qp_thresh
)
&&
(
mb_y
==
0
||
((
qp
+
s
->
current_picture
.
qscale_table
[
h
->
top_mb_xy
]
+
1
)
>>
1
)
<=
qp_thresh
)){
return
;
}
}
if
(
h
->
mb_aff_frame
if
(
h
->
mb_aff_frame
// left mb is in picture
// left mb is in picture
&&
h
->
slice_table
[
mb_xy
-
1
]
!=
255
&&
h
->
slice_table
[
mb_xy
-
1
]
!=
255
...
@@ -6617,8 +6629,8 @@ static void filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8
...
@@ -6617,8 +6629,8 @@ static void filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8
const
int
mbm_type
=
s
->
current_picture
.
mb_type
[
mbm_xy
];
const
int
mbm_type
=
s
->
current_picture
.
mb_type
[
mbm_xy
];
int
start
=
h
->
slice_table
[
mbm_xy
]
==
255
?
1
:
0
;
int
start
=
h
->
slice_table
[
mbm_xy
]
==
255
?
1
:
0
;
const
int
edges
=
(
(
mb_type
&
mbm_type
)
&
(
MB_TYPE_16x16
|
MB_TYPE_SKIP
))
const
int
edges
=
(
mb_type
&
(
MB_TYPE_16x16
|
MB_TYPE_SKIP
))
==
(
MB_TYPE_16x16
|
MB_TYPE_SKIP
)
?
1
:
4
;
==
(
MB_TYPE_16x16
|
MB_TYPE_SKIP
)
?
1
:
4
;
// how often to recheck mv-based bS when iterating between edges
// how often to recheck mv-based bS when iterating between edges
const
int
mask_edge
=
(
mb_type
&
(
MB_TYPE_16x16
|
(
MB_TYPE_16x8
<<
dir
)))
?
3
:
const
int
mask_edge
=
(
mb_type
&
(
MB_TYPE_16x16
|
(
MB_TYPE_16x8
<<
dir
)))
?
3
:
(
mb_type
&
(
MB_TYPE_8x16
>>
dir
))
?
1
:
0
;
(
mb_type
&
(
MB_TYPE_8x16
>>
dir
))
?
1
:
0
;
...
...
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