summaryrefslogtreecommitdiff
path: root/libavformat/mxfenc.c
Commit message (Collapse)AuthorAge
* lavf: move AVStream.last_in_packet_buffer to AVStreamInternalAnton Khirnov2020-10-28
| | | | | Those are private fields, no reason to have them exposed in a public header.
* avformat/mxfenc: Write Mastering Display Colour Volume to MXFHarry Mallon2020-09-17
| | | | | | Described in Annex B SMPTE ST 2067-21:2020 Signed-off-by: Harry Mallon <harry.mallon@codex.online>
* avformat/mxfdec: Read Mastering Display Colour Volume from MXFHarry Mallon2020-09-17
| | | | | | Described in Annex B SMPTE ST 2067-21:2020 Signed-off-by: Harry Mallon <harry.mallon@codex.online>
* libavformat/mxfenc: color_range should be inclusiveHarry Mallon2020-08-29
| | | | | | | | MXF CDCI color range was being set to (1<<sc->component_depth) - 1 for full range but it should be (1<<sc->component_depth) as 0 is a valid value. Signed-off-by: Harry Mallon <harry.mallon@codex.online>
* avformat/mxfenc: Write color metadata to MXFHarry Mallon2020-08-12
| | | | | | | Writes color_primaries, color_trc and color_space to mxf headers. ULs are from https://registry.smpte-ra.org/ site. Signed-off-by: Harry Mallon <harry.mallon@codex.online>
* avformat/avc, mxfenc: Avoid allocation of H264 SPS structure, fix memleakAndreas Rheinhardt2020-06-26
| | | | | | | | | | | | | | | | | | | | | | Up until now, ff_avc_decode_sps would parse a SPS and return some properties from it in a freshly allocated structure. Yet said structure is very small and completely internal to libavformat, so there is no reason to use the heap for it. This commit therefore changes the function to return an int and to modify a caller-provided structure. This will also allow ff_avc_decode_sps to return better error codes in the future. It also fixes a memleak in mxfenc: If a packet contained multiple SPS, only the SPS structure belonging to the last SPS would be freed, the other ones would leak when the pointer is overwritten to point to the new SPS structure. Of course, without allocations there are no leaks. This is Coverity issue #1445194. Furthermore, the SPS structure has been renamed from H264SequenceParameterSet to H264SPS in order to avoid overlong lines. Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat: implement retiming directly in mxfenc and gxfencMarton Balint2020-05-07
| | | | | | | | | | Generic retime functionality is replaced by a few lines of code directly in the muxers which used it, which seems a lot easier to understand and this way the retiming is not dependant of the input durations. Also remove retimeinterleave, since it is not used by anything anymore. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/audiointerleave: only keep the retime functionality of the audio ↵Marton Balint2020-05-07
| | | | | | | | | | | interleaver And rename it to retimeinterleave, use the pcm_rechunk bitstream filter for rechunking. By seperating the two functions we hopefully get cleaner code. Signed-off-by: Marton Balint <cus@passwd.hu>
* libavformat/mux, mxfenc: Don't initialize unnecessarilyAndreas Rheinhardt2020-04-18
| | | | | | | | | | | When no packet could be output, the interleavement functions nevertheless initialized the packet destined for output (with the exception of the data and size fields, making the initialization pointless), although it will not be used at all. So remove the initializations. Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mxfenc: allow all frame rates if -strict mode is set to unofficial ↵Marton Balint2020-03-14
| | | | | | | | | | or lower There was no consensus wheter or not to allow unofficial frame rates due to possible interoperability issues, a compromise is to only allow it if -strict mode is set to unofficial. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfenc: factorize timecode checking and settingMarton Balint2020-03-14
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxf: get rid of samples per frame array usageMarton Balint2020-03-14
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/audiointerleave: disallow using a samples_per_frame arrayMarton Balint2020-03-14
| | | | | | | Only MXF used an actual sample array, and that is unneeded there because simple rounding rules can be used instead. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfenc: Reorder fields in MXFIndexEntry to make it smallerAndreas Rheinhardt2020-03-14
| | | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfenc: use a zero based continuity counterMarton Balint2020-03-02
| | | | | | | | | | The standard does not seem to require the counter to be zero based, but some checker tools (MyriadBits MXFInspect, Interra Baton) have validations against 0 start... Fixes ticket #6781. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfenc: Add deinit functionAndreas Rheinhardt2020-01-26
| | | | | | | | Fixes memleaks when allocating the private data of the timecode_track fails or when the trailer is never written. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfenc: Don't free priv_data of AVStreamAndreas Rheinhardt2020-01-26
| | | | | | | It will be freed when the AVStream is freed later anyway. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: convert some avio_flush() calls to ↵Marton Balint2020-01-07
| | | | | | | | | | | | | | | | | avio_write_marker(AVIO_DATA_MARKER_FLUSH_POINT) Converting explicit avio_flush() calls helps us to buffer more data and avoid flushing the IO context too often which causes reduced IO throughput for non-streamed file output. The user can control FLUSH_POINT flushing behaviour using the -flush_packets option, the default typically means to flush unless a non-streamed file output is used, so this change should have no adverse effect on streaming even if it is assumed that after an avio_flush() the output buffer is clean so small seekbacks within the output buffer will work even when the IO context is not seekable. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat: remove avio_flush() calls from the end of write_packet functionsMarton Balint2020-01-07
| | | | | | | | | | | | | | | | Removing explicit avio_flush() calls helps us to buffer more data and avoid flushing the IO context too often which causes reduced IO throughput for non-streamed file output. The user can control flushing behaviour at the end of every packet using the -flush_packets option, the default typically means to flush unless a non-streamed file output is used. Therefore this change should have no adverse effect on streaming, even if it is assumed that a new packet has a clean buffer so small seekbacks within the output buffer work even when the IO context is not seekable. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfenc: simplify d-10 ul handlingBaptiste Coudurier2019-11-23
|
* avformat/mxfenc: simplify dv ul handlingBaptiste Coudurier2019-11-23
|
* avformat/mxfenc: correctly set width values for dvcprohdBaptiste Coudurier2019-11-13
|
* avformat/mxfenc: fix warning: unused function 'klv_ber_length' ↵Limin Wang2019-09-04
| | | | | | [-Wunused-function] Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/mux: Use const AVPacket * in compare functionsAndreas Rheinhardt2019-08-15
| | | | | | | | | There is no reason for these functions to modify the given packets at all. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfenc: fix index byte count in partition headerBaptiste Coudurier2019-07-22
|
* avformat/mxfenc: support XAVC long gopBaptiste Coudurier2019-05-20
|
* avformat/mxfenc: allow user comments for opatom muxerMark Reid2019-03-13
| | | | | Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfenc: support writing subsecond precision timestampsMarton Balint2018-12-25
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfenc: fix typoPaul B Mahol2018-12-17
|
* avformat/mxfenc: calculate and store DAR from user SARPaul B Mahol2018-12-10
|
* avformat/mxfenc: allow muxing proresPaul B Mahol2018-12-10
|
* avformat/mxfenc: simplify dnxhd handling and add more flavorsBaptiste Coudurier2018-10-24
|
* lavf/mxfenc: Remove a write-only variable.Carl Eugen Hoyos2018-10-17
| | | | | Fixes the following warning: libavformat/mxfenc.c:2125:22: warning: variable 'frame_size' set but not used
* lavf/mxfenc: Remove two unused variables.Carl Eugen Hoyos2018-10-13
| | | | | | Fixes the following warnings: libavformat/mxfenc.c:2036:9: warning: unused variable 'i' libavformat/mxfenc.c:2125:9: warning: unused variable 'i'
* lavf/mxfenc: support creating s436m data tracksBaptiste Coudurier2018-10-12
|
* avformat/mxfenc: correctly set content package rate in system elementBaptiste Coudurier2018-10-12
|
* avformat/mxfenc: update body partition with footer offsetBaptiste Coudurier2018-10-12
|
* avformat/mxfenc: add mpeg-2 specific metadata, fix compatibility with sony ↵Baptiste Coudurier2018-10-12
| | | | content browser
* avformat/mxfenc: write index delta entry array needed by sony vegas pro 11Baptiste Coudurier2018-10-12
|
* libavformat/mxfenc: fix dnxhr ul typoJason Stevens2018-09-15
| | | | | | | | byte 8 of dnxhr codec ul should be 0x0D Signed-off-by: Jason Stevens <jay@wizardofthenet.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavformat/mxfenc: add missing dnxhr mxfcontainer essence ULsJason Stevens2018-09-10
| | | | | | | | | | Add missing dnxhr mxf container essence ULs to the mxf encoder. This fixes dnxhr mxf files being quarantined by Avid Media Composer. Signed-off-by: Jason Stevens <jay@wizardofthenet.com> Reviewed-by: Baptiste Coudurier
* avformat/mxfenc: automatically update descriptors klv sizeBaptiste Coudurier2018-08-22
|
* avformat/mxfenc: fix muxing when audio tracks are longer than video trackBaptiste Coudurier2018-08-21
|
* libavformat/mxfenc: Add some () to attempt to workaround build issue on osxMichael Niedermayer2018-05-27
| | | | | | | fixes ticket7209 Tested-by: Jim DeLaHunt <from.ffmpeg-dev@jdlh.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfenc: Set color siting to 0 for D10-MXFMichael Niedermayer2018-05-12
| | | | | | | | | SMPTE 386M (D-10) lists 4 as value to be used SMPTE 377-1-2009 says "The definitions of 00h (coSiting) and 04h (Rec 601) are equivalent. The value of 04h is deprecated. New MXF encoders shall use the value of 00h instead." Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfenc: Add Sample width/height/x offset/y offset, Display x offset ↵Michael Niedermayer2018-05-12
| | | | | | and F2 offset Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfenc: add h264 profilesThomas Mundt2018-05-10
| | | | | | Signed-off-by: Thomas Mundt <tmundt75@gmail.com> Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfenc: Write transfer characteristicMichael Niedermayer2018-05-08
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfenc: Add Stored F2 Offset / Image Start/End Offset for D10Michael Niedermayer2018-05-08
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfenc: Write Audio Ref Level for D10Michael Niedermayer2018-05-08
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>