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
776fe466
Commit
776fe466
authored
Aug 29, 2006
by
Loren Merritt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slightly faster deblock
Originally committed as revision 6121 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
a1b65018
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
14 deletions
+22
-14
h264.c
libavcodec/h264.c
+22
-14
No files found.
libavcodec/h264.c
View file @
776fe466
...
...
@@ -371,6 +371,7 @@ typedef struct H264Context{
/* 0x100 -> non null luma_dc, 0x80/0x40 -> non null chroma_dc (cb/cr), 0x?0 -> chroma_cbp(0,1,2), 0x0? luma_cbp */
uint16_t
*
cbp_table
;
int
cbp
;
int
top_cbp
;
int
left_cbp
;
/* chroma_pred_mode for i4x4 or i16x16, else 0 */
...
...
@@ -5479,6 +5480,7 @@ decode_intra_mb:
else
cbp
=
golomb_to_inter_cbp
[
cbp
];
}
h
->
cbp
=
cbp
;
if
(
dct8x8_allowed
&&
(
cbp
&
15
)
&&
!
IS_INTRA
(
mb_type
)){
if
(
get_bits1
(
&
s
->
gb
))
...
...
@@ -6581,7 +6583,7 @@ decode_intra_mb:
cbp
|=
decode_cabac_mb_cbp_chroma
(
h
)
<<
4
;
}
h
->
cbp_table
[
mb_xy
]
=
cbp
;
h
->
cbp_table
[
mb_xy
]
=
h
->
cbp
=
cbp
;
if
(
dct8x8_allowed
&&
(
cbp
&
15
)
&&
!
IS_INTRA
(
mb_type
)
)
{
if
(
decode_cabac_mb_transform_size
(
h
)
)
...
...
@@ -7020,11 +7022,12 @@ static void filter_mb_fast( H264Context *h, int mb_x, int mb_y, uint8_t *img_y,
qpc1
=
get_chroma_qp
(
h
->
pps
.
chroma_qp_index_offset
,
qp1
);
qp0
=
(
qp
+
qp0
+
1
)
>>
1
;
qp1
=
(
qp
+
qp1
+
1
)
>>
1
;
qp_thresh
=
15
-
h
->
slice_alpha_c0_offset
-
FFMAX
(
0
,
h
->
pps
.
chroma_qp_index_offset
);
if
(
qp
<=
qp_thresh
&&
qp0
<=
qp_thresh
&&
qp1
<=
qp_thresh
)
return
;
qpc0
=
(
qpc
+
qpc0
+
1
)
>>
1
;
qpc1
=
(
qpc
+
qpc1
+
1
)
>>
1
;
qp_thresh
=
15
-
h
->
slice_alpha_c0_offset
;
if
(
qp
<=
qp_thresh
&&
qp0
<=
qp_thresh
&&
qp1
<=
qp_thresh
&&
qpc
<=
qp_thresh
&&
qpc0
<=
qp_thresh
&&
qpc1
<=
qp_thresh
)
return
;
if
(
IS_INTRA
(
mb_type
)
)
{
int16_t
bS4
[
4
]
=
{
4
,
4
,
4
,
4
};
...
...
@@ -7056,16 +7059,21 @@ static void filter_mb_fast( H264Context *h, int mb_x, int mb_y, uint8_t *img_y,
}
else
{
DECLARE_ALIGNED_8
(
int16_t
,
bS
[
2
][
4
][
4
]);
uint64_t
(
*
bSv
)[
4
]
=
(
uint64_t
(
*
)[
4
])
bS
;
int
edges
=
(
mb_type
&
(
MB_TYPE_16x16
|
MB_TYPE_SKIP
))
==
(
MB_TYPE_16x16
|
MB_TYPE_SKIP
)
?
1
:
4
;
int
edges
;
if
(
IS_8x8DCT
(
mb_type
)
&&
(
h
->
cbp
&
7
)
==
7
)
{
edges
=
4
;
bSv
[
0
][
0
]
=
bSv
[
0
][
2
]
=
bSv
[
1
][
0
]
=
bSv
[
1
][
2
]
=
0x0002000200020002ULL
;
}
else
{
int
mask_edge1
=
(
mb_type
&
(
MB_TYPE_16x16
|
MB_TYPE_8x16
))
?
3
:
(
mb_type
&
MB_TYPE_16x8
)
?
1
:
0
;
int
mask_edge0
=
(
mb_type
&
(
MB_TYPE_16x16
|
MB_TYPE_8x16
))
&&
(
s
->
current_picture
.
mb_type
[
mb_xy
-
1
]
&
(
MB_TYPE_16x16
|
MB_TYPE_8x16
))
?
3
:
0
;
int
step
=
IS_8x8DCT
(
mb_type
)
?
2
:
1
;
edges
=
(
mb_type
&
MB_TYPE_16x16
)
&&
!
(
h
->
cbp
&
15
)
?
1
:
4
;
s
->
dsp
.
h264_loop_filter_strength
(
bS
,
h
->
non_zero_count_cache
,
h
->
ref_cache
,
h
->
mv_cache
,
(
h
->
slice_type
==
B_TYPE
),
edges
,
step
,
mask_edge0
,
mask_edge1
);
}
if
(
IS_INTRA
(
s
->
current_picture
.
mb_type
[
mb_xy
-
1
])
)
bSv
[
0
][
0
]
=
0x0004000400040004ULL
;
if
(
IS_INTRA
(
s
->
current_picture
.
mb_type
[
h
->
top_mb_xy
])
)
...
...
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