[FFmpeg-devel] [PATCH 3/6] lavc/libx265: mark disposable frames

John Stebbins stebbins at jetheaddev.com
Sat Dec 2 18:52:48 EET 2017


On 12/02/2017 01:40 AM, Marton Balint wrote:
> On Thu, 30 Nov 2017, John Stebbins wrote:
>
>> Used by movenc to fill sdtp box
>> ---
>> libavcodec/libx265.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
>> index 4456e300f2..c137fe4ae1 100644
>> --- a/libavcodec/libx265.c
>> +++ b/libavcodec/libx265.c
>> @@ -329,6 +329,9 @@ FF_DISABLE_DEPRECATION_WARNINGS
>> FF_ENABLE_DEPRECATION_WARNINGS
>> #endif
>>
>> +    if (x265pic_out.sliceType == X265_TYPE_B)
>> +        pkt->flags |= AV_PKT_FLAG_DISPOSABLE;
> You can only set this for B pictures which are not referenced by other 
> frames, no? Otherwise they can't be dropped independently from the others.
>
>

Correct.  x265 version 2.5 and above returns X265_TYPE_BREF for frames that are referenced.  There is a way to
distinguish on version 2.4 and below as well using x265pic_out.frameData.sliceType, and an earlier version of my patch
used that.  But it's really not the "right" way going forward.  I can restore it if supporting earlier versions of x265
is important.  But my feeling with such fast moving projects as x265 is it's best not to keep too much cruft in support
of old versions.

-- 
John      GnuPG fingerprint: D0EC B3DB C372 D1F1 0B01  83F0 49F1 D7B2 60D4 D0F7


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171202/e86c6803/attachment.sig>


More information about the ffmpeg-devel mailing list