[x265] [PATCH] tcompicyuv: add right boundary padding while applying bottom row padding

Steve Borho steve at borho.org
Thu Nov 7 19:10:31 CET 2013


On Thu, Nov 7, 2013 at 5:52 AM, Aarthi Thirumalai <
aarthi at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Aarthi Thirumalai
> # Date 1383825146 -19800
> #      Thu Nov 07 17:22:26 2013 +0530
> # Node ID e87bef56a1b6ed9a7a20be7d7021c178c8ddc42a
> # Parent  0823d243b4e2f9eee6323a9750eeb811bccbad77
> tcompicyuv: add right boundary padding while applying bottom row padding.
>
> diff -r 0823d243b4e2 -r e87bef56a1b6 source/Lib/TLibCommon/TComPicYuv.cpp
> --- a/source/Lib/TLibCommon/TComPicYuv.cpp      Thu Nov 07 16:46:57 2013
> +0530
> +++ b/source/Lib/TLibCommon/TComPicYuv.cpp      Thu Nov 07 17:22:26 2013
> +0530
> @@ -395,13 +395,13 @@
>

Good catch, but above here is a line which assigned width back to
m_picWidth, which is the original padded (to 4) width, it needs to be
removed in this case.


>
>              for (uint32_t i = 1; i <= pady; i++)
>              {
> -                memcpy(Y + i * getStride(), Y, width * sizeof(Pel));
> +                memcpy(Y + i * getStride(), Y, (width + padx) *
> sizeof(Pel));
>              }
>
>              for (uint32_t j = 1; j <= pady >> m_vChromaShift; j++)
>              {
> -                memcpy(U + j * getCStride(), U, (width >> m_hChromaShift)
> * sizeof(Pel));
> -                memcpy(V + j * getCStride(), V, (width >> m_hChromaShift)
> * sizeof(Pel));
> +                memcpy(U + j * getCStride(), U, ((width + padx) >>
> m_hChromaShift) * sizeof(Pel));
> +                memcpy(V + j * getCStride(), V, ((width + padx) >>
> m_hChromaShift) * sizeof(Pel));
>              }
>          }
>      }
> @@ -461,13 +461,13 @@
>
>              for (uint32_t i = 1; i <= pady; i++)
>              {
> -                memcpy(Y + i * getStride(), Y, width * sizeof(Pel));
> +                memcpy(Y + i * getStride(), Y, (width + padx) *
> sizeof(Pel));
>              }
>
>              for (uint32_t j = 1; j <= pady >> m_vChromaShift; j++)
>              {
> -                memcpy(U + j * getCStride(), U, (width >> m_hChromaShift)
> * sizeof(Pel));
> -                memcpy(V + j * getCStride(), V, (width >> m_hChromaShift)
> * sizeof(Pel));
> +                memcpy(U + j * getCStride(), U, ((width + padx) >>
> m_hChromaShift) * sizeof(Pel));
> +                memcpy(V + j * getCStride(), V, ((width + padx) >>
> m_hChromaShift) * sizeof(Pel));
>              }
>          }
>      }
> @@ -525,13 +525,13 @@
>
>              for (uint32_t i = 1; i <= pady; i++)
>              {
> -                memcpy(Y + i * getStride(), Y, width * sizeof(pixel));
> +                memcpy(Y + i * getStride(), Y, (width + padx) *
> sizeof(pixel));
>              }
>
>              for (uint32_t j = 1; j <= pady >> m_vChromaShift; j++)
>              {
> -                memcpy(U + j * getCStride(), U, (width >> m_hChromaShift)
> * sizeof(pixel));
> -                memcpy(V + j * getCStride(), V, (width >> m_hChromaShift)
> * sizeof(pixel));
> +                memcpy(U + j * getCStride(), U, ((width + padx) >>
> m_hChromaShift) * sizeof(pixel));
> +                memcpy(V + j * getCStride(), V, ((width + padx) >>
> m_hChromaShift) * sizeof(pixel));
>              }
>          }
>      }
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>



-- 
Steve Borho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131107/00b4af24/attachment.html>


More information about the x265-devel mailing list