<div dir="ltr"><div><div>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.<br></div><br></div><div>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.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 4, 2014 at 1:58 PM, Nicolas Morey-Chaisemartin <span dir="ltr"><<a href="mailto:nmorey@kalray.eu" target="_blank">nmorey@kalray.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Nicolas Morey-Chaisemartin <<a href="mailto:nmorey@kalray.eu" target="_blank">nmorey@kalray.eu</a>><br>
# Date 1414077144 -7200<br>
# Thu Oct 23 16:12:24 2014 +0200<br>
<br>
Add entropy coder support for tile header generation<br>
<br>
---<br>
source/common/slice.h | 11 +++++++++++<br>
source/encoder/encoder.cpp | 3 +++<br>
source/encoder/entropy.cpp | 24 ++++++++++++++++++++++--<br>
3 files changed, 36 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/source/common/slice.h b/source/common/slice.h<br>
index bd0ba63..ea72d5b 100644<br>
--- a/source/common/slice.h<br>
+++ b/source/common/slice.h<br>
@@ -259,6 +259,17 @@ struct PPS<br>
bool bPicDisableDeblockingFilter;<br>
int deblockingFilterBetaOffsetDiv2<u></u>;<br>
int deblockingFilterTcOffsetDiv2;<br>
+<br>
+ // Tile specific data<br>
+ // Note that although tile compliant header can be generated, there is no<br>
+ // official support for tiles yet.<br>
+ bool bTilesEnabledFlag;<br>
+ uint32_t numTileColumns;<br>
+ uint32_t numTileRows;<br>
+ bool bUniformSpacingFlag;<br>
+ uint32_t*columnWidth;<br>
+ uint32_t*rowHeight;<br>
+ bool bLoopFilterAcrossTilesEnabledF<u></u>lag;<br>
};<br>
struct WeightParam<br>
diff --git a/source/encoder/encoder.cpp b/source/encoder/encoder.cpp<br>
index 44e82af..002ebab 100644<br>
--- a/source/encoder/encoder.cpp<br>
+++ b/source/encoder/encoder.cpp<br>
@@ -1298,6 +1298,9 @@ void Encoder::initPPS(PPS *pps)<br>
pps-><u></u>deblockingFilterBetaOffsetDiv2 = 0;<br>
pps-><u></u>deblockingFilterTcOffsetDiv2 = 0;<br>
+ pps->bTilesEnabledFlag = false;<br>
+ pps-><u></u>bLoopFilterAcrossTilesEnabledF<u></u>lag = false;<br>
+<br>
pps->bEntropyCodingSyncEnabled = m_param->bEnableWavefront;<br>
}<br>
diff --git a/source/encoder/entropy.cpp b/source/encoder/entropy.cpp<br>
index 13eaf57..e881f00 100644<br>
--- a/source/encoder/entropy.cpp<br>
+++ b/source/encoder/entropy.cpp<br>
@@ -161,10 +161,30 @@ void Entropy::codePPS(const PPS& pps)<br>
WRITE_FLAG(pps.bUseWeightPred, "weighted_pred_flag");<br>
WRITE_FLAG(pps.<u></u>bUseWeightedBiPred, "weighted_bipred_flag");<br>
WRITE_FLAG(pps.<u></u>bTransquantBypassEnabled, "transquant_bypass_enable_<u></u>flag");<br>
- WRITE_FLAG(0, "tiles_enabled_flag");<br>
+ WRITE_FLAG(pps.<u></u>bTilesEnabledFlag, "tiles_enabled_flag");<br>
WRITE_FLAG(pps.<u></u>bEntropyCodingSyncEnabled, "entropy_coding_sync_enabled_<u></u>flag");<br>
- WRITE_FLAG(1, "loop_filter_across_slices_<u></u>enabled_flag");<br>
+ if (pps.bTilesEnabledFlag)<br>
+ {<br>
+ WRITE_UVLC(pps.numTileColumns - 1, "num_tile_columns_minus1");<br>
+ WRITE_UVLC(pps.numTileRows - 1, "num_tile_rows_minus1");<br>
+ WRITE_FLAG(pps.<u></u>bUniformSpacingFlag ? 1 : 0,"uniform_spacing_flag");<br>
+ if (!pps.bUniformSpacingFlag){<br>
+ uint32_t * columns = pps.columnWidth;<br>
+ for (uint32_t column = 0; column < pps.numTileColumns - 1; ++column)<br>
+ {<br>
+ WRITE_UVLC(columns[column] - 1, "column_width_minus1");<br>
+ }<br>
+ uint32_t * rows = pps.rowHeight;<br>
+ for (uint32_t row = 0; row < pps.numTileRows - 1; ++row)<br>
+ {<br>
+ WRITE_UVLC(rows[row] - 1, "row_height_minus1");<br>
+ }<br>
+ }<br>
+ WRITE_FLAG(pps.<u></u>bLoopFilterAcrossTilesEnabledF<u></u>lag ? 1 : 0, "loop_filter_across_tiles_<u></u>enabled_flag");<br>
+ }<br>
+<br>
+ WRITE_FLAG(1, "loop_filter_across_slices_<u></u>enabled_flag");<br>
WRITE_FLAG(pps.<u></u>bDeblockingFilterControlPresen<u></u>t, "deblocking_filter_control_<u></u>present_flag");<br>
if (pps.<u></u>bDeblockingFilterControlPresen<u></u>t)<br>
{<br>
______________________________<u></u>_________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/<u></u>listinfo/x265-devel</a><br>
</blockquote></div><br></div>