Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-07-09cbs: ff_cbs_delete_unit: Replace return value with assertAndreas Rheinhardt
ff_cbs_delete_unit never fails if the index of the unit to delete is valid, as it is with all current callers of the function. So just assert in ff_cbs_delete_unit that the index is valid and change the return value to void in order to remove the callers' checks for whether ff_cbs_delete_unit failed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-07-08av1_metadata: Error out if fragment is emptyAndreas Rheinhardt
If the fragment is empty after parsing (i.e. it contains no OBUs), then the check for the type of the fragment's first OBU is nonsensical; so error out in this case just as h264_metadata and hevc_metadata do. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-07-08av1/h264_metadata, filter_units: Count down when deleting unitsAndreas Rheinhardt
When testing whether a particular unit should be kept or discarded, it is best to start at the very last unit of a fragment and count down, because that way a unit that will eventually be deleted won't be memmoved during earlier deletions; and frag/au->nb_units need only be evaluated once in this case and the counter is automatically correct when a unit got deleted. It also works for double loops, i.e. when looping over all SEI messages in all SEI units of an access unit. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-07-08av1_metadata: Avoid allocations and copies of packet structuresAndreas Rheinhardt
This commit changes av1_metadata to (a) use ff_bsf_get_packet_ref instead of ff_bsf_get_packet (thereby avoiding one malloc and free per filtered packet) and (b) to use only one packet structure at all, thereby avoiding a call to av_packet_copy_props. (b) has been made possible by the recent changes to ff_cbs_write_packet. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-04-04avcodec/av1_metadata: add an option to remove Padding OBUsJames Almer
Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
2019-02-26libavcodec/cbs: Stop needlessly reallocating the units arrayAndreas Rheinhardt
Currently, a fragment's unit array is constantly reallocated during splitting of a packet. This commit changes this: One can keep the units array by distinguishing between the number of allocated and the number of valid units in the units array. The more units a packet is split into, the bigger the benefit. So MPEG-2 benefits the most; for a video coming from an NTSC-DVD (usually 32 units per frame) the average cost of cbs_insert_unit (for a single unit) went down from 6717 decicycles to 450 decicycles (based upon 10 runs with 4194304 runs each); if each packet consists of only one unit, it went down from 2425 to 448; for a H.264 video where most packets contain nine units, it went from 4431 to 450. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
2018-10-06av1_metadata: Fix constraint on setting chroma_sample_positionMark Thompson
It can't be set for 4:2:2 streams.
2018-10-04avcodec/av1_metadata: add an option to insert and remove Temporal Delimiter OBUsJames Almer
Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
2018-09-27lavc: Add AV1 metadata bitstream filterMark Thompson
Can adjust colour and timing information.