You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
hevc: report more precise progress
There's a lag of one CTB line for SAO behind deblocking filter, except for last line. However, once SAO has been completed on a line, all its pixels, i.e. up to y+ctb_size are filtered and ready to be used as reference. Without SAO, when deblocking filter finishes a CTB line, only the bottom bottom 4 pixels may be filtered when next CTB is process by the deblocing. The await_progess for hevc then checks whether the bottom pixels of a PU requires access beyond that point, so the reporting should effectively report up to the the above limits. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
7bdbd2653f
commit
5e55c7e1bc
@@ -705,9 +705,9 @@ void ff_hevc_deblocking_boundary_strengths(HEVCContext *s, int x0, int y0,
|
|||||||
|
|
||||||
void ff_hevc_hls_filter(HEVCContext *s, int x, int y, int ctb_size)
|
void ff_hevc_hls_filter(HEVCContext *s, int x, int y, int ctb_size)
|
||||||
{
|
{
|
||||||
|
int x_end = x >= s->sps->width - ctb_size;
|
||||||
deblocking_filter_CTB(s, x, y);
|
deblocking_filter_CTB(s, x, y);
|
||||||
if (s->sps->sao_enabled) {
|
if (s->sps->sao_enabled) {
|
||||||
int x_end = x >= s->sps->width - ctb_size;
|
|
||||||
int y_end = y >= s->sps->height - ctb_size;
|
int y_end = y >= s->sps->height - ctb_size;
|
||||||
if (y && x)
|
if (y && x)
|
||||||
sao_filter_CTB(s, x - ctb_size, y - ctb_size);
|
sao_filter_CTB(s, x - ctb_size, y - ctb_size);
|
||||||
@@ -716,18 +716,15 @@ void ff_hevc_hls_filter(HEVCContext *s, int x, int y, int ctb_size)
|
|||||||
if (y && x_end) {
|
if (y && x_end) {
|
||||||
sao_filter_CTB(s, x, y - ctb_size);
|
sao_filter_CTB(s, x, y - ctb_size);
|
||||||
if (s->threads_type & FF_THREAD_FRAME )
|
if (s->threads_type & FF_THREAD_FRAME )
|
||||||
ff_thread_report_progress(&s->ref->tf, y - ctb_size, 0);
|
ff_thread_report_progress(&s->ref->tf, y, 0);
|
||||||
}
|
}
|
||||||
if (x_end && y_end) {
|
if (x_end && y_end) {
|
||||||
sao_filter_CTB(s, x , y);
|
sao_filter_CTB(s, x , y);
|
||||||
if (s->threads_type & FF_THREAD_FRAME )
|
if (s->threads_type & FF_THREAD_FRAME )
|
||||||
ff_thread_report_progress(&s->ref->tf, y, 0);
|
ff_thread_report_progress(&s->ref->tf, y + ctb_size, 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (s->threads_type & FF_THREAD_FRAME && x_end)
|
||||||
if (y && x >= s->sps->width - ctb_size)
|
ff_thread_report_progress(&s->ref->tf, y + ctb_size - 4, 0);
|
||||||
if (s->threads_type & FF_THREAD_FRAME )
|
|
||||||
ff_thread_report_progress(&s->ref->tf, y, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ff_hevc_hls_filters(HEVCContext *s, int x_ctb, int y_ctb, int ctb_size)
|
void ff_hevc_hls_filters(HEVCContext *s, int x_ctb, int y_ctb, int ctb_size)
|
||||||
|
Reference in New Issue
Block a user