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
06789ad3
Commit
06789ad3
authored
Jan 17, 2015
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264: move qp_thresh into the per-slice context
parent
d231e84b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
h264.h
libavcodec/h264.h
+1
-2
h264_slice.c
libavcodec/h264_slice.c
+4
-4
No files found.
libavcodec/h264.h
View file @
06789ad3
...
...
@@ -301,6 +301,7 @@ typedef struct H264SliceContext {
int
qscale
;
int
chroma_qp
[
2
];
// QPc
int
qp_thresh
;
///< QP threshold to skip loopfilter
// Weighted pred stuff
int
use_weight
;
...
...
@@ -336,8 +337,6 @@ typedef struct H264Context {
int
pixel_shift
;
///< 0 for 8-bit H264, 1 for high-bit-depth H264
int
qp_thresh
;
///< QP threshold to skip loopfilter
/* coded dimensions -- 16 * mb w/h */
int
width
,
height
;
ptrdiff_t
linesize
,
uvlinesize
;
...
...
libavcodec/h264_slice.c
View file @
06789ad3
...
...
@@ -1730,7 +1730,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl, H264Contex
}
}
}
h
->
qp_thresh
=
15
-
sl
->
qp_thresh
=
15
-
FFMIN
(
h
->
slice_alpha_c0_offset
,
h
->
slice_beta_offset
)
-
FFMAX3
(
0
,
h
->
pps
.
chroma_qp_index_offset
[
0
],
...
...
@@ -1903,7 +1903,7 @@ static av_always_inline void fill_filter_caches_inter(H264Context *h,
*
* @return non zero if the loop filter can be skipped
*/
static
int
fill_filter_caches
(
H264Context
*
h
,
int
mb_type
)
static
int
fill_filter_caches
(
H264Context
*
h
,
H264SliceContext
*
sl
,
int
mb_type
)
{
const
int
mb_xy
=
h
->
mb_xy
;
int
top_xy
,
left_xy
[
LEFT_MBS
];
...
...
@@ -1939,7 +1939,7 @@ static int fill_filter_caches(H264Context *h, int mb_type)
/* For sufficiently low qp, filtering wouldn't do anything.
* This is a conservative estimate: could also check beta_offset
* and more accurate chroma_qp. */
int
qp_thresh
=
h
->
qp_thresh
;
// FIXME strictly we should store qp_thresh for each mb of a slice
int
qp_thresh
=
sl
->
qp_thresh
;
// FIXME strictly we should store qp_thresh for each mb of a slice
int
qp
=
h
->
cur_pic
.
qscale_table
[
mb_xy
];
if
(
qp
<=
qp_thresh
&&
(
left_xy
[
LTOP
]
<
0
||
...
...
@@ -2096,7 +2096,7 @@ static void loop_filter(H264Context *h, H264SliceContext *sl, int start_x, int e
}
backup_mb_border
(
h
,
dest_y
,
dest_cb
,
dest_cr
,
linesize
,
uvlinesize
,
0
);
if
(
fill_filter_caches
(
h
,
mb_type
))
if
(
fill_filter_caches
(
h
,
sl
,
mb_type
))
continue
;
sl
->
chroma_qp
[
0
]
=
get_chroma_qp
(
h
,
0
,
h
->
cur_pic
.
qscale_table
[
mb_xy
]);
sl
->
chroma_qp
[
1
]
=
get_chroma_qp
(
h
,
1
,
h
->
cur_pic
.
qscale_table
[
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