[FFmpeg-devel] [PATCH 3/6] lavc/libx265: mark disposable frames
James Almer
jamrial at gmail.com
Sat Dec 2 19:48:08 EET 2017
On 12/2/2017 2:37 PM, John Stebbins wrote:
> On 12/02/2017 09:25 AM, James Almer wrote:
>> On 12/2/2017 1:52 PM, John Stebbins wrote:
>>> 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.
>> You can bump the minimum required version. Just make the necessary
>> changes in configure.
>>
>
> Ah, good point. That should be done, or I should add back support for earlier versions. Is there any desire by anyone
> to keep support for earlier versions?
No, 2.5 is not even the most recent version, so it's fine as the minimum
supported version.
More information about the ffmpeg-devel
mailing list