<div dir="ltr"><div>Hi,<br><br>Can you take a look at what the following does? Does the decoder actually detect HRD parameters? <br><br># HG changeset patch<br># User Deepthi Nandakumar <<a href="mailto:deepthi@multicorewareinc.com">deepthi@multicorewareinc.com</a>><br>
# Date 1387524067 -19800<br># Node ID 3e794e059f7ffe0edaaf5432df5297631a0f44f6<br># Parent  8133378e225020dbdd747d42a021588bef679ec3<br>Enable VUI<br><br>diff -r 8133378e2250 -r 3e794e059f7f source/encoder/encoder.cpp<br>
--- a/source/encoder/encoder.cpp    Thu Dec 19 17:47:16 2013 +0530<br>+++ b/source/encoder/encoder.cpp    Fri Dec 20 12:51:07 2013 +0530<br>@@ -1367,13 +1367,13 @@<br>     m_bUseASR = false; // adapt search range based on temporal distances<br>
     m_recoveryPointSEIEnabled = 0;<br>     m_bufferingPeriodSEIEnabled = 0;<br>-    m_pictureTimingSEIEnabled = 0;<br>+    m_pictureTimingSEIEnabled = 1;<br>     m_displayOrientationSEIAngle = 0;<br>     m_gradualDecodingRefreshInfoEnabled = 0;<br>
     m_decodingUnitInfoSEIEnabled = 0;<br>     m_useScalingListId = 0;<br>     m_activeParameterSetsSEIEnabled = 0;<br>-    m_vuiParametersPresentFlag = false;<br>+    m_vuiParametersPresentFlag = true;<br>     m_minSpatialSegmentationIdc = 0;<br>
     m_aspectRatioIdc = 0;<br>     m_sarWidth = 0;<br>diff -r 8133378e2250 -r 3e794e059f7f source/encoder/frameencoder.cpp<br>--- a/source/encoder/frameencoder.cpp    Thu Dec 19 17:47:16 2013 +0530<br>+++ b/source/encoder/frameencoder.cpp    Fri Dec 20 12:51:07 2013 +0530<br>
@@ -136,7 +136,7 @@<br>     m_sps.setNumLongTermRefPicSPS(0);<br>     if (m_cfg->getPictureTimingSEIEnabled() || m_cfg->getDecodingUnitInfoSEIEnabled())<br>     {<br>-        m_sps.setHrdParameters(m_cfg->param.frameRate, 0, m_cfg->param.rc.bitrate, m_cfg->param.bframes > 0);<br>
+        m_sps.setHrdParameters(m_cfg->param.frameRate, 1, m_cfg->param.rc.bitrate, m_cfg->param.bframes > 0);<br>     }<br>     if (m_cfg->getBufferingPeriodSEIEnabled() || m_cfg->getPictureTimingSEIEnabled() || m_cfg->getDecodingUnitInfoSEIEnabled())<br>
     {<br><br><br><br></div>Thanks,<br>Deepthi<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 11, 2014 at 7:14 AM, dave <span dir="ltr"><<a href="mailto:dtyx265@gmail.com" target="_blank">dtyx265@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div><div class="h5">
    <div>On 02/10/2014 01:41 PM, Steve Borho
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr"><br>
        <div class="gmail_extra"><br>
          <br>
          <div class="gmail_quote">On Mon, Feb 10, 2014 at 1:46 PM, dave
            <span dir="ltr"><<a href="mailto:dtyx265@gmail.com" target="_blank">dtyx265@gmail.com</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000">
                <div>
                  <div>
                    <div>On 02/10/2014 10:41 AM, Steve Borho wrote:<br>
                    </div>
                  </div>
                </div>
                <blockquote type="cite">
                  <div>
                    <div>
                      <div dir="ltr"><br>
                        <div class="gmail_extra"><br>
                          <br>
                          <div class="gmail_quote">On Thu, Jan 30, 2014
                            at 12:31 PM, Steve Borho <span dir="ltr"><<a href="mailto:steve@borho.org" target="_blank">steve@borho.org</a>></span>
                            wrote:<br>
                            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                              <div dir="ltr"><br>
                                <div class="gmail_extra"><br>
                                  <br>
                                  <div class="gmail_quote">
                                    <div>On Wed, Jan 29, 2014 at 5:13
                                      PM, dave <span dir="ltr"><<a href="mailto:dtyx265@gmail.com" target="_blank">dtyx265@gmail.com</a>></span>
                                      wrote:<br>
                                      <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi

                                        All,<br>
                                        <br>
                                        I would like to offer my
                                        services and contribute to x265
                                        development.  From the wiki it
                                        looks like there are plenty
                                        things to do but I don't want to
                                        duplicate or interfere with the
                                        work of anyone else so if
                                        someone can give me something to
                                        do I would appreciate it.  I am
                                        open to anything needed by x265,
                                        both c/c++ and assembly work
                                        though I don't mind being given
                                        something simple just to get
                                        started.  You can find me in the
                                        x265 irc channel as dtyx265.</blockquote>
                                      <div><br>
                                      </div>
                                    </div>
                                    <div>Hi Dave.</div>
                                    <div><br>
                                    </div>
                                    <div>I've been collecting the more
                                      pressing TODO items in the
                                      bitbucket repository's issue
                                      tracker:  <a href="https://bitbucket.org/multicoreware/x265/issues?status=new&status=open" target="_blank">https://bitbucket.org/multicoreware/x265/issues?status=new&status=open</a> </div>

                                  </div>
                                  <div class="gmail_extra"><br>
                                  </div>
                                  #21 (enabling the VUI message) is the
                                  most pressing of the "simple"
                                  problems.  That would be a great place
                                  to start.</div>
                              </div>
                            </blockquote>
                            <div><br>
                            </div>
                            <div>Hi Dave,</div>
                            <div><br>
                            </div>
                            <div>How are things going on this front? </div>
                          </div>
                          <div><br>
                          </div>
                          -- <br>
                          Steve Borho </div>
                      </div>
                      <br>
                      <fieldset></fieldset>
                      <br>
                    </div>
                  </div>
                  <div>
                    <pre>_______________________________________________
x265-devel mailing list
<a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a>
</pre>
                  </div>
                </blockquote>
                I studied the VUI in the h265 spec, appendix E and have
                been studying the x265 code from your suggested starting
                point, setVuiParametersPresentFlag().  It looks like
                most fields are set to spec defaults.  Some look like
                values that can be options specified by the user, others
                look like values that are calculated from encoding a
                video.<br>
                <br>
                Can you tell me more about just what pts and dts are?  I
                understand generally what they are but it seems like
                there are a few places in the VUI where they might play
                a role in calculating values.  I haven't had a chance
                yet to compare to x264 code yet so if it all becomes
                obvious there then I will get it.<br>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>pts is the presentation time stamp of a frame, the
              point at which it is supposed to be displayed by the
              decoder.</div>
            <div><br>
            </div>
            <div>dts is the decode time stamp of a frame, the point when
              the decoder is supposed to begin decoding it.</div>
            <div><br>
            </div>
            <div>Both are usually specified in units of the frame rate.
               Since the pts & dts are frame parameters and the VUI
              is a stream parameter, I don't they are directly related,
              except that the denominator is likely signaled in some
              way.</div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000"> I tried to create a
                user account on bitbucket so I could have issue 21
                assigned to me but I keep getting<br>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>BB might not allow issues to be assigned to users who
              don't have push access anyway, so don't be too concerned
              about this.  You can add a comment to the issue stating
              you are working on it.  Patches should go through this
              mailing list anyway.</div>
            <div><br>
            </div>
            <div>--</div>
            <div>Steve</div>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
x265-devel mailing list
<a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a>
</pre>
    </blockquote></div></div>
    I think the denominator that you are looking for is already set in
    class TimingInfo.  vui_num_units_in_tick(confusingly named, if I
    understand it correctly) and vui_time_scale are set based on frame
    rate.  The other TimingInfo members that are not set depend on the
    consistency of timing of the frames.<br>
    <br>
    One other possibility is the hrd parameter m_tickDivisorMinus2.  It
    is set to 100 - 2 in TComSPS::setHrdParameters though given the
    description of tic_divisor_minus2 in the spec I am not sure if this
    is an accurate or useful value.<br>
    <br>
    Since it looks like currently no VUI is generated, perhaps I should
    just add what's needed so a VUI can optionally be added to an
    encoded video along with filling out the rest of the VUI's fields.<br>
  </div>

<br>_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
<br></blockquote></div><br></div>