[x265] [PATCH 1/2] Add entropy coder support for tile header generation

Deepthi Nandakumar deepthi at multicorewareinc.com
Tue Nov 4 11:40:41 CET 2014


We do not foresee tile level parallelism in the near future. With pmode,
this has become even less desirable, since we're able to improve
utilization without sacrificing efficiency.

A few months ago, we removed exactly similar code with tile headers. We'd
rather not add unused features back in, as it makes x265 less easy to
maintain and bug-prone.

On Tue, Nov 4, 2014 at 1:58 PM, Nicolas Morey-Chaisemartin <nmorey at kalray.eu
> wrote:

> # HG changeset patch
> # User Nicolas Morey-Chaisemartin <nmorey at kalray.eu>
> # Date 1414077144 -7200
> #      Thu Oct 23 16:12:24 2014 +0200
>
> Add entropy coder support for tile header generation
>
> ---
>  source/common/slice.h      | 11 +++++++++++
>  source/encoder/encoder.cpp |  3 +++
>  source/encoder/entropy.cpp | 24 ++++++++++++++++++++++--
>  3 files changed, 36 insertions(+), 2 deletions(-)
>
> diff --git a/source/common/slice.h b/source/common/slice.h
> index bd0ba63..ea72d5b 100644
> --- a/source/common/slice.h
> +++ b/source/common/slice.h
> @@ -259,6 +259,17 @@ struct PPS
>      bool     bPicDisableDeblockingFilter;
>      int      deblockingFilterBetaOffsetDiv2;
>      int      deblockingFilterTcOffsetDiv2;
> +
> +    // Tile specific data
> +    // Note that although tile compliant header can be generated, there
> is no
> +    // official support for tiles yet.
> +    bool     bTilesEnabledFlag;
> +    uint32_t numTileColumns;
> +    uint32_t numTileRows;
> +    bool     bUniformSpacingFlag;
> +    uint32_t*columnWidth;
> +    uint32_t*rowHeight;
> +    bool     bLoopFilterAcrossTilesEnabledFlag;
>  };
>   struct WeightParam
> diff --git a/source/encoder/encoder.cpp b/source/encoder/encoder.cpp
> index 44e82af..002ebab 100644
> --- a/source/encoder/encoder.cpp
> +++ b/source/encoder/encoder.cpp
> @@ -1298,6 +1298,9 @@ void Encoder::initPPS(PPS *pps)
>      pps->deblockingFilterBetaOffsetDiv2 = 0;
>      pps->deblockingFilterTcOffsetDiv2 = 0;
>  +    pps->bTilesEnabledFlag = false;
> +    pps->bLoopFilterAcrossTilesEnabledFlag = false;
> +
>      pps->bEntropyCodingSyncEnabled = m_param->bEnableWavefront;
>  }
>  diff --git a/source/encoder/entropy.cpp b/source/encoder/entropy.cpp
> index 13eaf57..e881f00 100644
> --- a/source/encoder/entropy.cpp
> +++ b/source/encoder/entropy.cpp
> @@ -161,10 +161,30 @@ void Entropy::codePPS(const PPS& pps)
>      WRITE_FLAG(pps.bUseWeightPred,            "weighted_pred_flag");
>      WRITE_FLAG(pps.bUseWeightedBiPred,        "weighted_bipred_flag");
>      WRITE_FLAG(pps.bTransquantBypassEnabled,  "transquant_bypass_enable_
> flag");
> -    WRITE_FLAG(0,                             "tiles_enabled_flag");
> +    WRITE_FLAG(pps.bTilesEnabledFlag,         "tiles_enabled_flag");
>      WRITE_FLAG(pps.bEntropyCodingSyncEnabled,
> "entropy_coding_sync_enabled_flag");
> -    WRITE_FLAG(1,                             "loop_filter_across_slices_
> enabled_flag");
>  +    if (pps.bTilesEnabledFlag)
> +    {
> +        WRITE_UVLC(pps.numTileColumns - 1,
> "num_tile_columns_minus1");
> +        WRITE_UVLC(pps.numTileRows    - 1,        "num_tile_rows_minus1");
> +        WRITE_FLAG(pps.bUniformSpacingFlag ? 1 :
> 0,"uniform_spacing_flag");
> +        if (!pps.bUniformSpacingFlag){
> +            uint32_t * columns = pps.columnWidth;
> +            for (uint32_t column = 0; column < pps.numTileColumns - 1;
> ++column)
> +            {
> +                WRITE_UVLC(columns[column] - 1,
> "column_width_minus1");
> +            }
> +            uint32_t * rows = pps.rowHeight;
> +            for (uint32_t row = 0; row < pps.numTileRows - 1; ++row)
> +            {
> +                WRITE_UVLC(rows[row] - 1,        "row_height_minus1");
> +            }
> +        }
> +        WRITE_FLAG(pps.bLoopFilterAcrossTilesEnabledFlag ? 1 : 0,
> "loop_filter_across_tiles_enabled_flag");
> +    }
> +
> +    WRITE_FLAG(1,                             "loop_filter_across_slices_
> enabled_flag");
>      WRITE_FLAG(pps.bDeblockingFilterControlPresent,
> "deblocking_filter_control_present_flag");
>      if (pps.bDeblockingFilterControlPresent)
>      {
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20141104/bd4d449f/attachment.html>


More information about the x265-devel mailing list