On Mon, May 5, 2014 at 1:06 PM, dave <[email protected]> wrote: > Many parameter set fields are encoded in a form that is modified I am > guessing for the purpose of maximizing the range of possible encoded values > but are probably more useful for the encoding of frames in their unmodified > forms. For example, both the VPS and SPS have a field called > m_maxSubLayersMinus1 but m_maxSubLayers may be more useful for analyzing and > encoding of frames.
As far as I know, the +1 and -1, etc are there to make the most likely values as small as possible to save bits > When the unmodified form is more useful, I think it would be less confusing > to use the unmodified form with the variable name without the modification > and then modify the field at the time of encoding. That is, use > m_maxSubLayers, then at the time of encoding in TEncSbac, encode > m_maxSubLayers - 1. Agreed, it would be best for these +1/-1 offsets to be applied when generating the bitstream. > This would break from naming h265 fields after the names used in the > specification but removes any thought of "Do I need to add one to > m_maxSubLayersMinus1 before using it.." or "do I need to subtract 1 before > encoding it.." I don't think removing MinusX or PlusX from a field name is > going to hurt too much, especially if it's documented in comments at it's > declaration. > > Of course some fields may be more useful in their modified form. Either way, > I prefer to have the name of the field match the state of the value it > holds. If anyone knows of any particular field that should be treated one > way or the other please let me know. I'm not aware of any off-hand. -- Steve _______________________________________________ x265-devel mailing list [email protected] https://mailman.videolan.org/listinfo/x265-devel
