[x265] [PATCH] Add: End Of Bitstream and End Of Sequence NAL units
Niranjan Bala
niranjan at multicorewareinc.com
Mon Mar 22 05:54:54 UTC 2021
>
>
>>
>> +.. option:: --eob, --no-eob
>> +
>> + Emit an end of bitstream NAL unit at the end of the bitstream.
>> +
>> +.. option:: --eos, --no-eos
>> +
>> + Emit an end of sequence NAL unit at the end of every coded
>> + video sequence.
>> +
>>
> [AM] Please mention the default settings.
> Also, API documentation for x265_encoder_end_nal_units() is missing.
>
Default settings and API documentation are added.
> + if ((m_param->bEnableEndOfBitstream ||
>> m_param->bEnableEndOfSequence) && outFrameCount ==
>> (uint32_t)m_param->totalFrames)
>>
> [AM] This may not work with live input streams. Please check.
>
EOB and EOS NAL units should be added at the end when we know the end of
the bitstream. Since we do not know the end in live input streams, it is
not added in that scenario.
> + {
>> + if (api->encoder_end_nal_units(m_encoder, &p_nal, &nal)
>> < 0)
>> + {
>> + x265_log(NULL, X265_LOG_ERROR, "Failure generating
>> end nal units\n");
>> + m_ret = 3;
>> + goto fail;
>> + }
>> + else
>> + m_cliopt.totalbytes +=
>> m_cliopt.output->writeHeaders(p_nal, nal);
>>
> [AM] Should we mark --eob as `CLI only` option? Given that EOB insertion
> is handled completely in the application, I don't see the need for the APIs
> specific to EOB. Please clarify.
>
No. --eob is not a 'CLI only' option. EOB insertion is handled in x265lib
using the API. We need to add EOB after the main encoder loop. I think it's
not appropriate to add EOB insertion in any previously existing APIs after
x265_encoder_encode. Hence, added an API for handling the end NAL units
similar to x265_encoder_headers.
--
Thanks & Regards
*Niranjan Kumar B*
Video Codec Engineer
Media & AI Analytics
+91 958 511 1449
<https://multicorewareinc.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20210322/9eee0ef1/attachment.html>
More information about the x265-devel
mailing list