summaryrefslogtreecommitdiff
path: root/libavformat/hevc.c
Commit message (Collapse)AuthorAge
* avutil/common: Don't auto-include mem.hAndreas Rheinhardt2024-03-31
| | | | | | | | | | | There are lots of files that don't need it: The number of object files that actually need it went down from 2011 to 884 here. Keep it for external users in order to not cause breakages. Also improve the other headers a bit while just at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavf/hevc: Fix type specifiers, missed in 8b5d1553Carl Eugen Hoyos2022-10-23
| | | | | Fixes several warnings with msvc: warning: format specifies type 'unsigned char' but the argument has type 'unsigned int'
* avformat/hevc: Reindent after the previous commitAndreas Rheinhardt2022-09-02
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/hevc: Fix crash on allocation failure, avoid allocationsAndreas Rheinhardt2022-09-02
| | | | | | | | | | | | | | | | | | The HEVC code currently uses an array of arrays of NALUs; one such array contains all the SPS NALUs, one all PPS NALUs etc. The array of arrays is grown dynamically via av_reallocp_array(), but given that the latter function automatically frees its buffer upon reallocation error, it may only be used with PODs, which this case is not. Even worse: While the pointer to the arrays is reset, the counter for the number of arrays is not, leading to a segfault in hvcc_close(). Fix this by avoiding the allocations of the array of arrays altogether. This is easily possible because their number is bounded (by five). Furthermore, as a byproduct we can ensure that the code always produces the recommended ordering of VPS-SPS-PPS-SEI (which was not guaranteed before). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavf/hevc: replace the unicode signal quotation with normal quotationJun Zhao2022-08-05
| | | | | | | replace the unicode left/right signal quotation mark with normal signal quotation. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/hevc: drop unnecessary avcodec.h includeAnton Khirnov2021-06-10
|
* avformat/hevc: Defer initializations in ff_isom_write_hvcc()Andreas Rheinhardt2020-07-02
| | | | | | | Saves initialization of an HEVCDecoderConfigurationRecord when the data is already in ISOBMFF-format or if it is plainly invalid. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/av1, hevc: Make *_buf-functions return 0 on successAndreas Rheinhardt2020-01-26
| | | | | | | | | | | The output size is already returned via a pointer argument, so there is no need to return it via the ordinary return value as well. The rationale behind this is to not poison the return value on success. It also unifies the behaviour of the *_buf-functions for AVC, AV1 and HEVC. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/hevc: Fix potential leak in case of ff_hevc_annexb2mp4_buf failureAndreas Rheinhardt2020-01-26
| | | | | | | | | | | | ff_hevc_annexb2mp4_buf() could indicate an error, yet leave cleaning after itself to the caller, so that a caller could not simply return the error, but had to free the buffer first. (Given that all current callers have set filter_ps = 0, this error can currently not be triggered.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mxfenc: support XAVC long gopBaptiste Coudurier2019-05-20
|
* avformat/hvcc: zero initialize the nal buffers past the last written byteJames Almer2018-02-24
| | | | | | | | | Prevents use of uninitialized values. Fixes ticket #7038. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* hevc: Improve stream constraint values in common headerMark Thompson2017-10-17
| | | | | | | | | | Add comments to describe the sources of the constraint values expressed here, and add some more related values which will be used in following patches. Fix the incorrect values for SPS and PPS count (they are not the same as those used for H.264), and remove HEVC_MAX_CU_SIZE because it is not used anywhere. (cherry picked from commit b88da98b34809dedf8882d43ed543632ed233538)
* Merge commit 'c359d624d3efc3fd1d83210d78c4152bd329b765'James Almer2017-03-23
|\ | | | | | | | | | | | | * commit 'c359d624d3efc3fd1d83210d78c4152bd329b765': hevcdec: move decoder-independent declarations into a separate header Merged-by: James Almer <jamrial@gmail.com>
| * hevcdec: move decoder-independent declarations into a separate headerAnton Khirnov2016-10-16
| | | | | | | | | | | | | | This way they can be reused by other code without including the whole decoder-specific hevcdec.h Also, add the HEVC_ prefix to them, since similarly named values exist for H.264 as well and are sometimes used in the same code.
* | Merge commit '4abe3b049d987420eb891f74a35af2cebbf52144'Clément Bœsch2017-03-23
|\| | | | | | | | | | | | | * commit '4abe3b049d987420eb891f74a35af2cebbf52144': hevc: rename hevc.[ch] to hevcdec.[ch] Merged-by: Clément Bœsch <u@pkh.me>
| * hevc: rename hevc.[ch] to hevcdec.[ch]Anton Khirnov2016-10-16
| | | | | | | | | | This is more consistent with the rest of libav and frees up the hevc.h name for decoder-independent shared declarations.
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | avformat/hevc: Check num_long_term_ref_pics_sps to avoid potentially long loopsMichael Niedermayer2015-08-24
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/hevc: Fix parsing errorsArthur Grant2015-08-24
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '059a934806d61f7af9ab3fd9f74994b838ea5eba': lavc: Consistently prefix input buffer defines Conflicts: doc/examples/decoding_encoding.c libavcodec/4xm.c libavcodec/aac_adtstoasc_bsf.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.h libavcodec/asvenc.c libavcodec/avcodec.h libavcodec/avpacket.c libavcodec/dvdec.c libavcodec/ffv1enc.c libavcodec/g2meet.c libavcodec/gif.c libavcodec/h264.c libavcodec/h264_mp4toannexb_bsf.c libavcodec/huffyuvdec.c libavcodec/huffyuvenc.c libavcodec/jpeglsenc.c libavcodec/libxvid.c libavcodec/mdec.c libavcodec/motionpixels.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/noise_bsf.c libavcodec/nuv.c libavcodec/nvenc.c libavcodec/options.c libavcodec/parser.c libavcodec/pngenc.c libavcodec/proresenc_kostya.c libavcodec/qsvdec.c libavcodec/svq1enc.c libavcodec/tiffenc.c libavcodec/truemotion2.c libavcodec/utils.c libavcodec/utvideoenc.c libavcodec/vc1dec.c libavcodec/wmalosslessdec.c libavformat/adxdec.c libavformat/aiffdec.c libavformat/apc.c libavformat/apetag.c libavformat/avidec.c libavformat/bink.c libavformat/cafdec.c libavformat/flvdec.c libavformat/id3v2.c libavformat/isom.c libavformat/matroskadec.c libavformat/mov.c libavformat/mpc.c libavformat/mpc8.c libavformat/mpegts.c libavformat/mvi.c libavformat/mxfdec.c libavformat/mxg.c libavformat/nutdec.c libavformat/oggdec.c libavformat/oggparsecelt.c libavformat/oggparseflac.c libavformat/oggparseopus.c libavformat/oggparsespeex.c libavformat/omadec.c libavformat/rawdec.c libavformat/riffdec.c libavformat/rl2.c libavformat/rmdec.c libavformat/rtpdec_latm.c libavformat/rtpdec_mpeg4.c libavformat/rtpdec_qdm2.c libavformat/rtpdec_svq3.c libavformat/sierravmd.c libavformat/smacker.c libavformat/smush.c libavformat/spdifenc.c libavformat/takdec.c libavformat/tta.c libavformat/utils.c libavformat/vqf.c libavformat/westwood_vqa.c libavformat/xmv.c libavformat/xwma.c libavformat/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '0e7c0ec344f542e68e3cc9680e8d41dffeffdb4e'Michael Niedermayer2015-07-09
|\| | | | | | | | | | | | | * commit '0e7c0ec344f542e68e3cc9680e8d41dffeffdb4e': lavf/hevc: pad the RBSP buffer as required by the bistream reader Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf/hevc: pad the RBSP buffer as required by the bistream readerAnton Khirnov2015-07-08
| |
* | avformat: Fix bug in parse_rps for HEVC.Deliang Fu2015-06-11
| | | | | | | | | | | | Make the logic in libavformat/hevc.c parse_rps align with libavcodec/hevc_ps.c ff_hevc_decode_short_term_rps Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/hevc: Check num_negative_pics and num_positive_picsMichael Niedermayer2015-05-12
| | | | | | | | | | | | Fixes CID1238994 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/hevc: Check cpb_cnt_minus1Michael Niedermayer2015-05-12
| | | | | | | | | | | | Fixes CID1239014 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '1a3eb042c704dea190c644def5b32c9cee8832b8'Michael Niedermayer2015-04-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1a3eb042c704dea190c644def5b32c9cee8832b8': Replace av_dlog with normal av_log at trace level Conflicts: ffplay.c libavdevice/fbdev_dec.c libavfilter/avfilter.c libavfilter/internal.h libavfilter/setpts.c libavfilter/src_movie.c libavfilter/vf_crop.c libavfilter/vf_drawtext.c libavfilter/vf_fieldorder.c libavformat/assdec.c libavformat/avidec.c libavformat/flvdec.c libavformat/http.c libavformat/ipmovie.c libavformat/isom.c libavformat/mov.c libavformat/mpegenc.c libavformat/mpegts.c libavformat/mpegtsenc.c libavformat/mux.c libavformat/mxfdec.c libavformat/nsvdec.c libavformat/oggdec.c libavformat/r3d.c libavformat/rtspdec.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace av_dlog with normal av_log at trace levelVittorio Giovara2015-04-19
| | | | | | | | This applies to every library where performance is not critical.
| * lavf: always use av_freeMichael Niedermayer2014-03-10
| | | | | | | | Signed-off-by: Tim Walker <tdskywalker@gmail.com>
* | fix various typosLou Logan2014-06-03
| | | | | | | | | | Signed-off-by: Lou Logan <lou@lrcd.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '34bbc81de8a49fbddb92b76dc733f40890480b2b'Michael Niedermayer2014-03-10
|\| | | | | | | | | | | | | | | | | | | | | * commit '34bbc81de8a49fbddb92b76dc733f40890480b2b': lavf: simplify ff_hevc_annexb2mp4_buf Conflicts: libavformat/hevc.c libavformat/hevc.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: simplify ff_hevc_annexb2mp4_bufTim Walker2014-03-10
| | | | | | | | | | | | Use ff_hevc_annexb2mp4 instead of duplicating its functionality, and update the documentation to match the new behavior.
* | Merge commit 'ee17be3fdd37f63f4b77676820e387858908b0f4'Michael Niedermayer2014-03-10
|\| | | | | | | | | | | | | * commit 'ee17be3fdd37f63f4b77676820e387858908b0f4': hevc: Use get_se_golomb_long Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hevc: Use get_se_golomb_longLuca Barbato2014-03-10
| | | | | | | | | | Do not use inline functions that refer to tables present in other libraries.
* | avformat/hevc: fix mix of av_malloc() with free()Michael Niedermayer2014-03-09
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'b6c61fb83e876d404ac3b0b3657ebfcafdcd1926'Michael Niedermayer2014-03-09
|\| | | | | | | | | | | | | * commit 'b6c61fb83e876d404ac3b0b3657ebfcafdcd1926': movenc: enable Annex B to MP4 conversion for HEVC tracks. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: enable Annex B to MP4 conversion for HEVC tracks.Tim Walker2014-03-09
| |
* | Merge commit '20b40a597cdd4969cf1147d7c7efee2b6232524b'Michael Niedermayer2014-03-09
|/ | | | | | | | | | * commit '20b40a597cdd4969cf1147d7c7efee2b6232524b': movenc: write hvcC tag for HEVC. Conflicts: libavformat/Makefile Merged-by: Michael Niedermayer <michaelni@gmx.at>
* movenc: write hvcC tag for HEVC.Tim Walker2014-03-09