summaryrefslogtreecommitdiff
path: root/libavcodec/libx265.c
Commit message (Collapse)AuthorAge
* avcodec/libx265: add support for setting chroma sample locationJan Ekström2021-09-01
| | | | | | | Unlike libx264, libx265 does not handle the chroma format check on its own side, so in order to not write out values which are supposed to be ignored according to the specification, we limit the writing out of chroma sample location to 4:2:0 only.
* avcodec/libx265: only call av_pix_fmt_desc_get once in initJan Ekström2021-08-29
| | | | Now both current usages utilize an already found descriptor.
* avcodec/libx265: improve full range flag setting logicJan Ekström2021-08-18
| | | | | | | | | | | | | Unlike libx264, libx265 does not have a separate "unspecified"/"auto" default for color range, so we do always have to specify it. Thus, we are required to handle the RGB case on the libavcodec side to enable the correct value to be written out in in case of RGB content with unspecified color range being received. In other words: 1. If the user has set color range specifically, follow that. 2. If the user has not set color range specifically, set full range by default in case of RGB and YUVJ pixel formats.
* libavcodec/libx265: add user data unregistered SEI encodingBrad Hards2021-08-01
| | | | | | | | | | | | | MISB ST 0604 and ST 2101 require user data unregistered SEI messages (precision timestamps and sensor identifiers) to be included. That currently isn't supported for libx265. This patch adds support for user data unregistered SEI messages in accordance with ISO/IEC 23008-2:2020 Section D.2.7 The design is based on nvenc, with support finished up at 57de80673cb Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avcodec/libx265: Allow user-supplied buffersAndreas Rheinhardt2021-05-23
| | | | | | | | Here the packet size is known before allocating the packet, so that supporting user-supplied buffers is trivial. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Remove deprecated AVCodecContext.coded_frameAndreas Rheinhardt2021-04-27
| | | | | | | | | | Deprecated in 40cf1bbacc6220a0aa6bed5c331871d43f9ce370. (The currently disabled filter vf_mcdeint and vf_uspp were users of this field; they have not been changed, so that whoever wants to fix them can see the state of these filters when they were disabled.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* lavc: rename AV_CODEC_CAP_AUTO_THREADS->AV_CODEC_CAP_OTHER_THREADSAnton Khirnov2021-03-16
| | | | | | | | | | This cap is currently used to mark multithreading-capable codecs that wrap external libraries with their own multithreading code. The name is highly confusing for our API users, since libavcodec ALWAYS handles thread_count=0 (see commit message in previous commit). Therefore rename the cap and update its documentation to make its meaning clear. The old name is kept deprecated until next+1 major bump.
* lavc: replace internal use of AV_CODEC_CAP_AUTO_THREADS with an internal capAnton Khirnov2021-03-16
| | | | | | | | | | | | | | | | AV_CODEC_CAP_AUTO_THREADS was originally added in b4d44a45f9a to mark codecs that spawn threads internally and are able to select an optimal threads count by themselves (all such codecs are wrappers around external libraries). It is used by lavc generic code to check whether it should handle thread_count=0 itself or pass the zero directly to the codec implementation. Within this meaning, it is clearly supposed to be an internal cap rather than a public one, since from the viewpoint of a libavcodec user, lavc ALWAYS handles thread_count=0. Whether it happens in the generic code or within the codec internals is not a meaningful difference for the caller. External aspects of this flag will be dealt with in the following commit.
* avcodec/libx265: Fix integer overflow in computation of max and avg bitrateLimin Wang2020-06-19
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/internal: move packet related functions to their own headerJames Almer2020-06-02
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libx265: add support for reordered_opaqueJames Almer2020-05-19
| | | | | Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libx265: Fix Uninitialized scalar variableLimin Wang2020-05-08
| | | | | | | return error if unknown picture type encountered Fixes CID 1457234 Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/libx265: zero the padding bytes in extradataJames Almer2020-01-18
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libx265: use AV_OPT_TYPE_DICT for x265-paramsMarton Balint2020-01-01
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/libx265: export encoded frame statsJames Almer2020-01-01
| | | | | Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit 66b6005301894823052b437a950003ffbe3ba6de)
* avcodec/libx265: add a qp option and apply the relevant global ↵James Almer2020-01-01
| | | | | | AVCodecContext settings to the encoder context Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libx265: apply some global AVCodecContext settings to the encoder ↵James Almer2020-01-01
| | | | | | | | context There's no reason to ignore them if set. Signed-off-by: James Almer <jamrial@gmail.com>
* lavc/x265: set preferred_transfer_characteristics for HLGZhong Li2019-12-12
| | | | | | | | | | | "HEVC HDR UHDTV Bitstreams using HLG10 shall also contain the alternative_transfer_characteristics SEI message. The alternative_transfer_characteristics SEI message shall be inserted on the HEVC DVB_RAP, and preferred_transfer_characteristics shall be set equal to "18", indicating Recommendation ITU-R BT. 2100 [45] HLG system." Signed-off-by: Zhong Li <zhongli_dev@126.com>
* libavcodec/libx265: add a flag to output ROI warnings only once.Guo, Yejun2019-09-24
| | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* libx265: Update ROI behaviour to match documentationMark Thompson2019-07-07
| | | | Equivalent to the previous patch for libx264.
* avcodec/libx265: Support full range videosDerek Buitenhuis2019-05-26
| | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* lavc/libx265: Use avctx->framerate first for frame rate settingJun Zhao2019-05-11
| | | | | | | | | perfer avctx->framerate first than use avctx->time_base when setting the frame rate to encoder. 1/time_base is not the average frame rate if the frame rate is not constant, so use avctx->framerate if the value is not zero. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavc/libx265: signal CPB properties through side dataJan Ekström2019-03-03
| | | | | This way values such as maxrate/bufsize can be utilized further down the chain.
* avcodec/libx265: add support for ROI-based encodingGuo, Yejun2019-01-24
| | | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avcodec/libx265: apply lavc maxrate, bufsize & rc_init_occupancyGyan Doshi2018-06-19
| | | | | | CLI options -maxrate, -bufsize and -rc_init_occupancy can now be picked up by the x265 wrapper. Min. rc init has to be 1001 to avoid x265 setting it to vbv-bufsize.
* lavc/libx265: allow users to set closed GOP via generic lavc flagGyan Doshi2018-06-02
| | | | | | lavc flag 'cgop' can be used to set closed GOP. Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* Merge commit 'cc06f7bd10c236539b4f6f87b795c459dd873770'James Almer2018-04-13
|\ | | | | | | | | | | | | * commit 'cc06f7bd10c236539b4f6f87b795c459dd873770': libx265: Support tiny video sizes Merged-by: James Almer <jamrial@gmail.com>
| * libx265: Support tiny video sizesVittorio Giovara2018-04-09
| | | | | | | | | | | | Where tiny is less than the default CTU size. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * avcodec: add metadata to identify wrappers and hardware decoderswm42017-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicitly identify decoder/encoder wrappers with a common name. This saves API users from guessing by the name suffix. For example, they don't have to guess that "h264_qsv" is the h264 QSV implementation, and instead they can just check the AVCodec .codec and .wrapper_name fields. Explicitly mark AVCodec entries that are hardware decoders or most likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing API users listing hardware decoders in a more generic way. The proposed AVCodecHWConfig does not provide this information fully, because it's concerned with decoder configuration, not information about the fact whether the hardware is used or not. AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software implementations in case the hardware is not capable. Based on a patch by Philip Langdale <philipl@overt.org>. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * libx265: Add option to force IDR framesDerek Buitenhuis2016-11-07
| | | | | | | | | | | | | | This is in the same the same vein as 380146924ecad2e05e9dcc5c3c2e1b5ba47c51e8. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* | lavc/libx265: support all color parameters that x265 doesRodger Combs2018-01-12
| |
* | avcodec: add metadata to identify wrappers and hardware decoderswm42017-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicitly identify decoder/encoder wrappers with a common name. This saves API users from guessing by the name suffix. For example, they don't have to guess that "h264_qsv" is the h264 QSV implementation, and instead they can just check the AVCodec .codec and .wrapper_name fields. Explicitly mark AVCodec entries that are hardware decoders or most likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing API users listing hardware decoders in a more generic way. The proposed AVCodecHWConfig does not provide this information fully, because it's concerned with decoder configuration, not information about the fact whether the hardware is used or not. AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software implementations in case the hardware is not capable. Based on a patch by Philip Langdale <philipl@overt.org>. Merges Libav commit 47687a2f8aca3f65b6fdd117b1cb66a7409a7fd1.
* | lavc/libx265: mark disposable framesJohn Stebbins2017-12-07
| | | | | | | | | | | | Used by movenc to fill sdtp box Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/libx265 - Add named option to set profileGyan Doshi2017-12-06
| | | | | | | | | | | | | | | | | | | | | | Adds call to x265_param_apply_profile after x265_param_parse. Added as private option since HEVC profiles other than Main, Main 10 and MSP in AVCodecContext are consolidated in a single constant. Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Reviewed-by: Lou Logan <lou@lrcd.com>
* | lavc/libx265: switch to ff_alloc_packet2Jun Zhao2017-11-10
| | | | | | | | | | | | | | | | | | ff_alloc_packet have been deprecated, switch to use ff_alloc_packet2. Signed-off-by: Jun Zhao <jun.zhao@intel.com> Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavc/libx265: Add gray10 and gray12 encoding support.Carl Eugen Hoyos2017-03-08
| |
* | libx265: Add option to force IDR framesDerek Buitenhuis2016-11-04
| | | | | | | | | | | | | | This is in the same the same vein as c981b1145a857c8f962c93b8eecb1c613b20ffe9. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavc/libx265: Support gray encoding.Carl Eugen Hoyos2016-07-06
| | | | | | | | Gray encoding crashes with libx265 <= 84, so check the library version.
* | lavc/libx265: Support GBR encoding.Carl Eugen Hoyos2016-03-13
| |
* | libx265: Enable 12-bit encodingStephen Hutchinson2016-02-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The configure detection is bumped to X265_BUILD >= 68, since API version 68 corresponds with the x265 1.8 release tarball. The warnings inside x265 about 12-bit being experimental were removed prior to API version 72 a short time later. At this time of writing, X265_BUILD is at version 80. 12-bit support in the HEVC standard was approved in October 2014 as part of HEVC Version 2 and published in January 2015: http://www.itu.int/ITU-T/recommendations/rec.aspx?rec=12296 http://www.itu.int/rec/T-REC-H.265-201410-S https://hevc.hhi.fraunhofer.de/rext Reveiwed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | libx265: Remove experimental flag when encoding 4:2:2 and 4:4:4Stephen Hutchinson2016-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | 4:2:2 and 4:4:4 support in the HEVC standard was approved in October 2014 as part of HEVC Version 2 and published in January 2015: http://www.itu.int/ITU-T/recommendations/rec.aspx?rec=12296 http://www.itu.int/rec/T-REC-H.265-201410-S https://hevc.hhi.fraunhofer.de/rext Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '2268db2cd052674fde55c7d48b7a5098ce89b4ba'Hendrik Leppkes2015-09-08
|\| | | | | | | | | | | | | * commit '2268db2cd052674fde55c7d48b7a5098ce89b4ba': lavu: Drop the {minus,plus}1 suffix from AVComponentDescriptor fields Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavu: Drop the {minus,plus}1 suffix from AVComponentDescriptor fieldsVittorio Giovara2015-09-07
| | | | | | | | | | | | The new fields can be accessed directly and are more intelligible. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | 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 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'def97856de6021965db86c25a732d78689bd6bb0': lavc: AV-prefix all codec capabilities Conflicts: cmdutils.c ffmpeg.c ffplay.c libavcodec/8svx.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/adpcm.c libavcodec/alac.c libavcodec/atrac3plusdec.c libavcodec/bink.c libavcodec/dnxhddec.c libavcodec/dvdec.c libavcodec/dvenc.c libavcodec/ffv1dec.c libavcodec/ffv1enc.c libavcodec/fic.c libavcodec/flacdec.c libavcodec/flacenc.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/hevc.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopenjpegdec.c libavcodec/libvo-aacenc.c libavcodec/libvorbisenc.c libavcodec/libvpxdec.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpegaudiodec_float.c libavcodec/msmpeg4dec.c libavcodec/mxpegdec.c libavcodec/nvenc_h264.c libavcodec/nvenc_hevc.c libavcodec/pngdec.c libavcodec/qpeg.c libavcodec/ra288.c libavcodec/rv10.c libavcodec/s302m.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tiff.c libavcodec/tta.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/vp9.c libavcodec/wavpack.c libavcodec/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: AV-prefix all codec capabilitiesVittorio Giovara2015-07-27
| | | | | | | | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615': lavc: AV-prefix all codec flags Conflicts: doc/examples/muxing.c ffmpeg.c ffmpeg_opt.c ffplay.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/ac3enc_float.c libavcodec/atrac1.c libavcodec/atrac3.c libavcodec/atrac3plusdec.c libavcodec/dcadec.c libavcodec/ffv1enc.c libavcodec/h264.c libavcodec/h264_loopfilter.c libavcodec/h264_mb.c libavcodec/imc.c libavcodec/libmp3lame.c libavcodec/libtheoraenc.c libavcodec/libtwolame.c libavcodec/libvpxenc.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/mpeg12dec.c libavcodec/mpeg12enc.c libavcodec/mpegaudiodec_template.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/nellymoserdec.c libavcodec/nellymoserenc.c libavcodec/nvenc.c libavcodec/on2avc.c libavcodec/options_table.h libavcodec/opus_celt.c libavcodec/pngenc.c libavcodec/ra288.c libavcodec/ratecontrol.c libavcodec/twinvq.c libavcodec/vc1_block.c libavcodec/vc1_loopfilter.c libavcodec/vc1_mc.c libavcodec/vc1dec.c libavcodec/vorbisdec.c libavcodec/vp3.c libavcodec/wma.c libavcodec/wmaprodec.c libavcodec/x86/hpeldsp_init.c libavcodec/x86/me_cmp_init.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: AV-prefix all codec flagsVittorio Giovara2015-07-27
| | | | | | | | | | | | Convert doxygen to multiline and express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '40cf1bbacc6220a0aa6bed5c331871d43f9ce370'Michael Niedermayer2015-07-21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '40cf1bbacc6220a0aa6bed5c331871d43f9ce370': Deprecate avctx.coded_frame Conflicts: ffmpeg.c libavcodec/a64multienc.c libavcodec/asvenc.c libavcodec/cljrenc.c libavcodec/dpxenc.c libavcodec/gif.c libavcodec/mpegvideo_enc.c libavcodec/nvenc.c libavcodec/proresenc_kostya.c libavcodec/pthread_frame.c libavcodec/rawenc.c libavcodec/sunrastenc.c libavcodec/tiffenc.c libavcodec/version.h libavcodec/xbmenc.c libavcodec/xwdenc.c libavdevice/v4l2.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>