diff mbox series

[FFmpeg-devel] avcodec/hevcdec: constrained intra predict, do not check top left IS_INTRA if it's not available

Message ID 20201016135734.9753-1-oddstone@gmail.com
State Accepted
Commit e5be4c5a88df90477f36cc81993d10f41d6180ce
Headers show
Series [FFmpeg-devel] avcodec/hevcdec: constrained intra predict, do not check top left IS_INTRA if it's not available | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make warning Make failed

Commit Message

Guangxin Xu Oct. 16, 2020, 1:57 p.m. UTC
fix ticket: 8932

For poc 2, we have tile boundary at x = 640.
When we predict cu(640,912),the top left pixel is not avaliable to the cu.
So, we can not check it's intra or not. We need set top[-1] = top[0] directly.
see 8.4.4.2.1 for details
---
 libavcodec/hevcpred_template.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Guangxin Xu Oct. 26, 2020, 2 p.m. UTC | #1
The bug reporter confirmed the fix.
https://trac.ffmpeg.org/ticket/8932

ping for review and merge.
thanks

On Fri, Oct 16, 2020 at 9:57 PM Xu Guangxin <oddstone@gmail.com> wrote:

> fix ticket: 8932
>
> For poc 2, we have tile boundary at x = 640.
> When we predict cu(640,912),the top left pixel is not avaliable to the cu.
> So, we can not check it's intra or not. We need set top[-1] = top[0]
> directly.
> see 8.4.4.2.1 for details
> ---
>  libavcodec/hevcpred_template.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/hevcpred_template.c
> b/libavcodec/hevcpred_template.c
> index 6fe33546b1..e550707874 100644
> --- a/libavcodec/hevcpred_template.c
> +++ b/libavcodec/hevcpred_template.c
> @@ -213,7 +213,7 @@ do {                                  \
>                  while (j < size_max_x && !IS_INTRA(j, -1))
>                      j++;
>                  if (j > 0)
> -                    if (x0 > 0) {
> +                    if (cand_up_left) {
>                          EXTEND_LEFT_CIP(top, j, j + 1);
>                      } else {
>                          EXTEND_LEFT_CIP(top, j, j);
> --
> 2.17.1
>
>
Linjie Fu Oct. 27, 2020, 1:48 a.m. UTC | #2
On Mon, Oct 26, 2020 at 10:29 PM Guangxin Xu <oddstone@gmail.com> wrote:

> The bug reporter confirmed the fix.
> https://trac.ffmpeg.org/ticket/8932
>
> ping for review and merge.
> thanks
>
> On Fri, Oct 16, 2020 at 9:57 PM Xu Guangxin <oddstone@gmail.com> wrote:
>
> > fix ticket: 8932
> >
> > For poc 2, we have tile boundary at x = 640.
> > When we predict cu(640,912),the top left pixel is not avaliable to the
> cu.
> > So, we can not check it's intra or not. We need set top[-1] = top[0]
> > directly.
> > see 8.4.4.2.1 for details
> > ---
> >  libavcodec/hevcpred_template.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavcodec/hevcpred_template.c
> > b/libavcodec/hevcpred_template.c
> > index 6fe33546b1..e550707874 100644
> > --- a/libavcodec/hevcpred_template.c
> > +++ b/libavcodec/hevcpred_template.c
> > @@ -213,7 +213,7 @@ do {                                  \
> >                  while (j < size_max_x && !IS_INTRA(j, -1))
> >                      j++;
> >                  if (j > 0)
> > -                    if (x0 > 0) {
> > +                    if (cand_up_left) {
> >                          EXTEND_LEFT_CIP(top, j, j + 1);
> >                      } else {
> >                          EXTEND_LEFT_CIP(top, j, j);
> > --
> > 2.17.1
> >
> >


Looks reasonable, also verified there is no garbage anymore.
Prefer to apply soon if no objections.

- Linjie
diff mbox series

Patch

diff --git a/libavcodec/hevcpred_template.c b/libavcodec/hevcpred_template.c
index 6fe33546b1..e550707874 100644
--- a/libavcodec/hevcpred_template.c
+++ b/libavcodec/hevcpred_template.c
@@ -213,7 +213,7 @@  do {                                  \
                 while (j < size_max_x && !IS_INTRA(j, -1))
                     j++;
                 if (j > 0)
-                    if (x0 > 0) {
+                    if (cand_up_left) {
                         EXTEND_LEFT_CIP(top, j, j + 1);
                     } else {
                         EXTEND_LEFT_CIP(top, j, j);