<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 10, 2016 at 5:35 PM, Mario *LigH* Rohkrämer <span dir="ltr"><<a href="mailto:contact@ligh.de" target="_blank">contact@ligh.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Typos in syntax documentation:<br>
<br>
The dash should be part of the optional negation: rather "[no-]..." instead of "[no]-..." each time.<br></blockquote><div><br></div><div>I have fixed this with a new patch.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
In the currently documented form, the result when omitting the "no" would be a triple dash.<div><div class="h5"><br>
<br>
<br>
Am 03.10.2016, 09:14 Uhr, schrieb Pradeep Ramachandran <<a href="mailto:pradeep@multicorewareinc.com" target="_blank">pradeep@multicorewareinc.com</a>><wbr>:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
# HG changeset patch<br>
# User Pradeep Ramachandran <<a href="mailto:pradeep@multicorewareinc.com" target="_blank">pradeep@multicorewareinc.com</a>><br>
# Date 1475478199 -19800<br>
# Mon Oct 03 12:33:19 2016 +0530<br>
# Node ID 91ed7cb38e66c43116e1d279e94d08<wbr>7d462e71ce<br>
# Parent 11bfa0ae971029fed69554e700185a<wbr>8ef93a289c<br>
bitstream: Modify API to discard optional VUI params, remove discard SEI API<br>
<br>
Cleaner API to remove optional timing & HRD info from VUI.<br>
Remove discard SEI API as it can be done through a combo of other API options<br>
<br>
diff -r 11bfa0ae9710 -r 91ed7cb38e66 doc/reST/cli.rst<br>
--- a/doc/reST/cli.rst Wed Sep 28 15:18:23 2016 +0530<br>
+++ b/doc/reST/cli.rst Mon Oct 03 12:33:19 2016 +0530<br>
@@ -1824,7 +1824,7 @@<br>
enhancement layer. A decoder may chose to drop the enhancement layer<br>
and only decode and display the base layer slices.<br>
<br>
- If used with a fixed GOP (:option:`b-adapt` 0) and :option:`bframes`<br>
+ If used with a fixed GOP (:option:`--b-adapt` 0) and :option:`--bframes`<br>
3 then the two layers evenly split the frame rate, with a cadence of<br>
PbBbP. You probably also want :option:`--no-scenecut` and a keyframe<br>
interval that is a multiple of 4.<br>
@@ -1833,15 +1833,15 @@<br>
Maximum of the picture order count. Default 8<br>
-.. option:: --discard-sei<br>
+.. option:: --[no]-vui-timing-info<br>
</blockquote>
<br></div></div>
Rather:<span class=""><br>
+.. option:: --[no-]vui-timing-info<br>
<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- Discard SEI messages generated from the final bitstream. HDR-related SEI<span class=""><br>
- messages are always dumped, immaterial of this option. Default disabled.<br>
- <br>
-.. option:: --discard-vui<br>
+ Discard optional VUI timing info from bitstream. Default enabled.<br>
- Discard optional VUI information (timing, HRD info) from the<br>
- bitstream. Default disabled.<br>
+.. option:: --[no]-vui-hrd-info<br>
</span></blockquote>
<br>
Rather:<br>
+.. option:: --[no-]vui-timing-info<div><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
+ Discard optional VUI HRD info from bitstream. Default enabled when<br>
+ :option:`--hrd` is enabled.<br>
+<br>
Debugging options<br>
=================<br>
diff -r 11bfa0ae9710 -r 91ed7cb38e66 source/CMakeLists.txt<br>
--- a/source/CMakeLists.txt Wed Sep 28 15:18:23 2016 +0530<br>
+++ b/source/CMakeLists.txt Mon Oct 03 12:33:19 2016 +0530<br>
@@ -30,7 +30,7 @@<br>
mark_as_advanced(FPROFILE_USE FPROFILE_GENERATE NATIVE_BUILD)<br>
# X265_BUILD must be incremented each time the public API is changed<br>
-set(X265_BUILD 95)<br>
+set(X265_BUILD 96)<br>
configure_file("${PROJECT_SOU<wbr>RCE_DIR}/<a href="http://x265.def.in" rel="noreferrer" target="_blank">x265.def.in</a>"<br>
"${PROJECT_BINARY_DIR}/<a href="http://x265.de">x265.de</a><wbr>f")<br>
configure_file("${PROJECT_SOU<wbr>RCE_DIR}/<a href="http://x265_config.h.in" rel="noreferrer" target="_blank">x265_config.h.in</a>"<br>
diff -r 11bfa0ae9710 -r 91ed7cb38e66 source/common/param.cpp<br>
--- a/source/common/param.cpp Wed Sep 28 15:18:23 2016 +0530<br>
+++ b/source/common/param.cpp Mon Oct 03 12:33:19 2016 +0530<br>
@@ -229,7 +229,8 @@<br>
param->rc.qpMin = 0;<br>
param->rc.qpMax = QP_MAX_MAX;<br>
- param->bDiscardOptionalVUI = 0;<br>
+ param->bEmitVUITimingInfo = 1;<br>
+ param->bEmitVUIHRDInfo = 1;<br>
/* Video Usability Information (VUI) */<br>
param->vui.aspectRatioIdc = 0;<br>
@@ -256,7 +257,6 @@<br>
param->minLuma = 0;<br>
param->maxLuma = PIXEL_MAX;<br>
param->log2MaxPocLsb = 8;<br>
- param->bDiscardSEI = false;<br>
param->maxSlices = 1;<br>
}<br>
@@ -914,8 +914,8 @@<br>
OPT("qpmin") p->rc.qpMin = atoi(value);<br>
OPT("analyze-src-pics") p->bSourceReferenceEstimation = atobool(value);<br>
OPT("log2-max-poc-lsb") p->log2MaxPocLsb = atoi(value);<br>
- OPT("discard-sei") p->bDiscardSEI = atobool(value);<br>
- OPT("discard-vui") p->bDiscardOptionalVUI = atobool(value);<br>
+ OPT("vui-timing-info") p->bEmitVUITimingInfo = atobool(value);<br>
+ OPT("vui-hrd-info") p->bEmitVUIHRDInfo = atobool(value);<br>
else<br>
return X265_PARAM_BAD_NAME;<br>
}<br>
diff -r 11bfa0ae9710 -r 91ed7cb38e66 source/common/slice.h<br>
--- a/source/common/slice.h Wed Sep 28 15:18:23 2016 +0530<br>
+++ b/source/common/slice.h Mon Oct 03 12:33:19 2016 +0530<br>
@@ -243,7 +243,8 @@<br>
bool bUseAMP; // use param<br>
bool bUseStrongIntraSmoothing; // use param<br>
bool bTemporalMVPEnabled;<br>
- bool bDiscardOptionalVUI;<br>
+ bool bEmitVUITimingInfo;<br>
+ bool bEmitVUIHRDInfo;<br>
Window conformanceWindow;<br>
VUI vuiParameters;<br>
diff -r 11bfa0ae9710 -r 91ed7cb38e66 source/encoder/encoder.cpp<br>
--- a/source/encoder/encoder.cpp Wed Sep 28 15:18:23 2016 +0530<br>
+++ b/source/encoder/encoder.cpp Mon Oct 03 12:33:19 2016 +0530<br>
@@ -1491,7 +1491,7 @@<br>
list.serialize(NAL_UNIT_PREFI<wbr>X_SEI, bs);<br>
}<br>
- if (!m_param->bDiscardSEI && m_param->bEmitInfoSEI)<br>
+ if (m_param->bEmitInfoSEI)<br>
{<br>
char *opts = x265_param2string(m_param);<br>
if (opts)<br>
@@ -1521,7 +1521,7 @@<br>
}<br>
}<br>
- if (!m_param->bDiscardSEI && (m_param->bEmitHRDSEI || !!m_param->interlaceMode))<br>
+ if ((m_param->bEmitHRDSEI || !!m_param->interlaceMode))<br>
{<br>
/* Picture Timing and Buffering Period SEI require the SPS to be "activated" */<br>
SEIActiveParameterSets sei;<br>
@@ -1576,7 +1576,8 @@<br>
sps->bUseStrongIntraSmoothing = m_param->bEnableStrongIntraSmo<wbr>othing;<br>
sps->bTemporalMVPEnabled = m_param->bEnableTemporalMvp;<br>
- sps->bDiscardOptionalVUI = m_param->bDiscardOptionalVUI;<br>
+ sps->bEmitVUITimingInfo = m_param->bEmitVUITimingInfo;<br>
+ sps->bEmitVUIHRDInfo = m_param->bEmitVUIHRDInfo;<br>
sps->log2MaxPocLsb = m_param->log2MaxPocLsb;<br>
int maxDeltaPOC = (m_param->bframes + 2) * (!!m_param->bBPyramid + 1) * 2;<br>
while ((1 << sps->log2MaxPocLsb) <= maxDeltaPOC * 2)<br>
diff -r 11bfa0ae9710 -r 91ed7cb38e66 source/encoder/entropy.cpp<br>
--- a/source/encoder/entropy.cpp Wed Sep 28 15:18:23 2016 +0530<br>
+++ b/source/encoder/entropy.cpp Mon Oct 03 12:33:19 2016 +0530<br>
@@ -319,7 +319,7 @@<br>
WRITE_FLAG(sps.bUseStrongIntr<wbr>aSmoothing, "sps_strong_intra_smoothing_en<wbr>able_flag");<br>
WRITE_FLAG(1, "vui_parameters_present_flag")<wbr>;<br>
- codeVUI(sps.vuiParameters, sps.maxTempSubLayers, sps.bDiscardOptionalVUI);<br>
+ codeVUI(sps.vuiParameters, sps.maxTempSubLayers, sps.bEmitVUITimingInfo, sps.bEmitVUIHRDInfo);<br>
WRITE_FLAG(0, "sps_extension_flag");<br>
}<br>
@@ -422,7 +422,7 @@<br>
}<br>
}<br>
-void Entropy::codeVUI(const VUI& vui, int maxSubTLayers, bool bDiscardOptionalVUI)<br>
+void Entropy::codeVUI(const VUI& vui, int maxSubTLayers, bool bEmitVUITimingInfo, bool bEmitVUIHRDInfo)<br>
{<br>
WRITE_FLAG(vui.aspectRatioInf<wbr>oPresentFlag, "aspect_ratio_info_present_fla<wbr>g");<br>
if (vui.aspectRatioInfoPresentFla<wbr>g)<br>
@@ -473,7 +473,7 @@<br>
WRITE_UVLC(vui.defaultDisplay<wbr>Window.bottomOffset, "def_disp_win_bottom_offset");<br>
}<br>
- if (bDiscardOptionalVUI)<br>
+ if (!bEmitVUITimingInfo)<br>
WRITE_FLAG(0, "vui_timing_info_present_flag"<wbr>);<br>
else<br>
{<br>
@@ -483,7 +483,7 @@<br>
WRITE_FLAG(0, "vui_poc_proportional_to_timin<wbr>g_flag");<br>
}<br>
- if (bDiscardOptionalVUI)<br>
+ if (!bEmitVUIHRDInfo)<br>
WRITE_FLAG(0, "vui_hrd_parameters_present_fl<wbr>ag");<br>
else<br>
{<br>
diff -r 11bfa0ae9710 -r 91ed7cb38e66 source/encoder/entropy.h<br>
--- a/source/encoder/entropy.h Wed Sep 28 15:18:23 2016 +0530<br>
+++ b/source/encoder/entropy.h Mon Oct 03 12:33:19 2016 +0530<br>
@@ -143,7 +143,7 @@<br>
void codeVPS(const VPS& vps);<br>
void codeSPS(const SPS& sps, const ScalingList& scalingList, const ProfileTierLevel& ptl);<br>
void codePPS( const PPS& pps, bool filerAcross, int iPPSInitQpMinus26 );<br>
- void codeVUI(const VUI& vui, int maxSubTLayers, bool discardOptionalVUI);<br>
+ void codeVUI(const VUI& vui, int maxSubTLayers, bool bEmitVUITimingInfo, bool bEmitVUIHRDInfo);<br>
void codeAUD(const Slice& slice);<br>
void codeHrdParameters(const HRDInfo& hrd, int maxSubTLayers);<br>
diff -r 11bfa0ae9710 -r 91ed7cb38e66 source/encoder/frameencoder.cp<wbr>p<br>
--- a/source/encoder/frameencoder.<wbr>cpp Wed Sep 28 15:18:23 2016 +0530<br>
+++ b/source/encoder/frameencoder.<wbr>cpp Mon Oct 03 12:33:19 2016 +0530<br>
@@ -525,7 +525,7 @@<br>
if (m_frame->m_lowres.bKeyframe)<br>
{<br>
- if (!m_param->bDiscardSEI && m_param->bEmitHRDSEI)<br>
+ if (m_param->bEmitHRDSEI)<br>
{<br>
SEIBufferingPeriod* bpSei = &m_top->m_rateControl->m_bufPe<wbr>riodSEI;<br>
@@ -547,7 +547,7 @@<br>
}<br>
}<br>
- if (!m_param->bDiscardSEI && (m_param->bEmitHRDSEI || !!m_param->interlaceMode))<br>
+ if ((m_param->bEmitHRDSEI || !!m_param->interlaceMode))<br>
{<br>
SEIPictureTiming *sei = m_rce.picTimingSEI;<br>
const VUI *vui = &slice->m_sps->vuiParameters;<br>
@@ -583,22 +583,19 @@<br>
}<br>
/* Write user SEI */<br>
- if (!m_param->bDiscardSEI)<br>
+ for (int i = 0; i < m_frame->m_userSEI.numPayloads<wbr>; i++)<br>
{<br>
- for (int i = 0; i < m_frame->m_userSEI.numPayloads<wbr>; i++)<br>
- {<br>
- x265_sei_payload *payload = &m_frame->m_userSEI.payloads[i<wbr>];<br>
- SEIuserDataUnregistered sei;<br>
+ x265_sei_payload *payload = &m_frame->m_userSEI.payloads[i<wbr>];<br>
+ SEIuserDataUnregistered sei;<br>
- sei.m_payloadType = payload->payloadType;<br>
- sei.m_userDataLength = payload->payloadSize;<br>
- sei.m_userData = payload->payload;<br>
+ sei.m_payloadType = payload->payloadType;<br>
+ sei.m_userDataLength = payload->payloadSize;<br>
+ sei.m_userData = payload->payload;<br>
- m_bs.resetBits();<br>
- sei.write(m_bs, *slice->m_sps);<br>
- m_bs.writeByteAlignment();<br>
- m_nalList.serialize(NAL_UNIT_P<wbr>REFIX_SEI, m_bs);<br>
- }<br>
+ m_bs.resetBits();<br>
+ sei.write(m_bs, *slice->m_sps);<br>
+ m_bs.writeByteAlignment();<br>
+ m_nalList.serialize(NAL_UNIT_P<wbr>REFIX_SEI, m_bs);<br>
}<br>
/* CQP and CRF (without capped VBV) doesn't use mid-frame statistics to<br>
@@ -895,7 +892,7 @@<br>
}<br>
- if (!m_param->bDiscardSEI && m_param->decodedPictureHashSEI<wbr>)<br>
+ if (m_param->decodedPictureHashSE<wbr>I)<br>
{<br>
int planes = (m_frame->m_param->internalCsp != X265_CSP_I400) ? 3 : 1;<br>
if (m_param->decodedPictureHashSE<wbr>I == 1)<br>
diff -r 11bfa0ae9710 -r 91ed7cb38e66 source/x265.h<br>
--- a/source/x265.h Wed Sep 28 15:18:23 2016 +0530<br>
+++ b/source/x265.h Mon Oct 03 12:33:19 2016 +0530<br>
@@ -1301,11 +1301,11 @@<br>
/* Maximum of the picture order count */<br>
int log2MaxPocLsb;<br>
- /* Dicard SEI messages when printing */<br>
- int bDiscardSEI;<br>
-<br>
- /* Control removing optional vui information (timing, HRD info) to get low bitrate */<br>
- int bDiscardOptionalVUI;<br>
+ /* Emit VUI Timing info, an optional VUI field */<br>
+ int bEmitVUITimingInfo;<br>
+<br>
+ /* Emit HRD Timing info */<br>
+ int bEmitVUIHRDInfo;<br>
/* Maximum count of Slices of picture, the value range is [1, maximum rows] */<br>
unsigned int maxSlices;<br>
diff -r 11bfa0ae9710 -r 91ed7cb38e66 source/x265cli.h<br>
--- a/source/x265cli.h Wed Sep 28 15:18:23 2016 +0530<br>
+++ b/source/x265cli.h Mon Oct 03 12:33:19 2016 +0530<br>
@@ -208,8 +208,10 @@<br>
{ "min-luma", required_argument, NULL, 0 },<br>
{ "max-luma", required_argument, NULL, 0 },<br>
{ "log2-max-poc-lsb", required_argument, NULL, 8 },<br>
- { "discard-sei", no_argument, NULL, 0 },<br>
- { "discard-vui", no_argument, NULL, 0 },<br>
+ { "vui-timing-info", no_argument, NULL, 0 },<br>
+ { "no-vui-timing-info", no_argument, NULL, 0 },<br>
+ { "vui-hrd-info", no_argument, NULL, 0 },<br>
+ { "no-vui-hrd-info", no_argument, NULL, 0 },<br>
{ "no-dither", no_argument, NULL, 0 },<br>
{ "dither", no_argument, NULL, 0 },<br>
{ "no-repeat-headers", no_argument, NULL, 0 },<br>
@@ -448,8 +450,8 @@<br>
H0(" --[no-]aud Emit access unit delimiters at the start of each access unit. Default %s\n", OPT(param->bEnableAccessUnitDe<wbr>limiters));<br>
H1(" --hash <integer> Decoded Picture Hash SEI 0: disabled, 1: MD5, 2: CRC, 3: Checksum. Default %d\n", param->decodedPictureHashSEI);<br>
H0(" --log2-max-poc-lsb <integer> Maximum of the picture order count\n");<br>
- H0(" --discard-sei Discard SEI packets in bitstream. Default %s\n", OPT(param->bDiscardSEI));<br>
- H0(" --discard-vui Discard optional VUI information from the bistream. Default %s\n", OPT(param->bDiscardOptionalVUI<wbr>));<br>
+ H0(" --[no]-vui-timing-info Discard optional VUI timing<br>
</blockquote>
<br></div></div>
Rather:<br>
+ H0(" --[no-]vui-timing-info Discard optional VUI timing<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
information from the bistream. Default %s\n", OPT(param->bEmitVUITimingInfo)<wbr>);<br>
+ H0(" --[no]-vui-hrd-info Discard optional HRD timing<br>
</blockquote>
<br></span>
Rather:<br>
+ H0(" --[no-]vui-hrd-info Discard optional HRD timing<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
information from the bistream. Default %s\n", OPT(param->bEmitVUIHRDInfo));<br>
H1("\nReconstructed video options (debugging):\n");<br>
H1("-r/--recon <filename> Reconstructed raw image YUV or Y4M output file name\n");<br>
H1(" --recon-depth <integer> Bit-depth of reconstructed raw image file. Defaults to input bit depth, or 8 if Y4M\n");<br>
</blockquote>
<br>
<br></div></div><span class="HOEnZb"><font color="#888888">
-- <br>
<br>
Fun and success!<br>
Mario *LigH* Rohkrämer<br>
mailto:<a href="mailto:contact@ligh.de" target="_blank">contact@ligh.de</a><br>
<br>
______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">https://mailman.videolan.org/l<wbr>istinfo/x265-devel</a><br>
</font></span></blockquote></div><br></div></div>