summaryrefslogtreecommitdiff
path: root/libavcodec/hevc_sei.c
Commit message (Collapse)AuthorAge
* avcodec/hevc_sei: Check payload size in decode_nal_sei_message()Michael Niedermayer2021-02-10
| | | | | | | | Fixes: out of array access Fixes: 29392/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-4821602850177024.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* hevc: Use common SEI typesMark Thompson2021-01-21
|
* avcodec/hevc_sei: return the correct error code on User Data Registered ↵James Almer2020-12-18
| | | | | | parsing failure Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_sei: print a log message when a unsupported ITU-T T35 SEI ↵James Almer2020-12-18
| | | | | | messages is parsed Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_sei: refactor parsing User Data Registered ITU-T T35 SEI messagesJames Almer2020-12-18
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dynamic_hdr10_plus: don't take a GetBitContext as input argumentJames Almer2020-12-07
| | | | | | | Create a local one instead from a byte buffer input argument. This prevents skipping bytes that may belong to another SEI message. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_sei: keep size in sync with the registered ITU-T T35 SEI ↵James Almer2020-12-07
| | | | | | GetBitContext Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_sei: split Dynamic HDR10+ SEI parsing into its own functionJames Almer2020-12-07
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_sei: replace en dash character with a hyphenJames Almer2020-12-06
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_sei: add support for HDR10+ metadataMohammad Izadi2020-12-05
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_sei: use ff_parse_a53_cc() to parse A53 Closed CaptionsJames Almer2020-08-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_sei: support HEVC timecode decodeLimin Wang2020-06-28
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/hevc_sei: add support for user data unregistered SEI messageLimin Wang2020-06-15
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/hevc: add support for Frame Duplication (Doubling/Tripling)Praveen Karadugattu2020-02-06
| | | | Parse picture_struct SEI value.
* avcodec: Replace get_bits_long() by get_bits() where possibleMichael Niedermayer2019-12-31
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevc_sei: switch to AVBufferRef buffer for a53 captionLimin Wang2019-12-20
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_sei: Fix integer overflows in decode_nal_sei_message()Michael Niedermayer2017-12-17
| | | | | | | | Fixes: signed integer overflow: 2147483520 + 255 cannot be represented in type 'int' Fixes: 4554/clusterfuzz-testcase-minimized-4843714515042304 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '99e9697e3a12ab4a6638a36b95edafd6a98f9eaa'James Almer2017-11-29
|\ | | | | | | | | | | | | * commit '99e9697e3a12ab4a6638a36b95edafd6a98f9eaa': stereo3d: Support view type for frame sequence type Merged-by: James Almer <jamrial@gmail.com>
| * stereo3d: Support view type for frame sequence typeVittorio Giovara2017-11-28
| | | | | | | | | | | | Implement detection in h264 and hevc and insertion in framepack filter. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * hevc: Add support for alternative transfer characterics SEIVittorio Giovara2017-06-28
| | | | | | | | | | | | | | | | | | | | The use of this SEI is for backward compatibility in HLG HDR systems: older devices that cannot interpret the "arib-std-b67" transfer will get the compatible transfer (usually bt709 or bt2020) from the VUI, while newer devices that can interpret HDR will read the SEI and use its value instead. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * hevcdec: move SEI message parsing into a separate headerJames Almer2017-05-09
| | | | | | | | | | | | | | It doesn't depend on hevcdec anymore. Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * hevcdec: remove HEVCContext usage from hevc_seiJames Almer2017-05-09
| | | | | | | | | | | | | | | | | | | | Based on the H264 SEI implementation. This will be mainly useful once support for SEI messages that can be used by the hevc parser are implemented, like Picture Timing. Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * golomb: Convert to the new bitstream readerDiego Biurrun2017-01-31
| |
* | avcodec/hevc_sei: reorder some parameters in static functionsJames Almer2017-10-31
| | | | | | | | | | | | | | Cosmetic change skipped in 0b30cb8dae5e7edb2a5f35900547321499c217f1 by mistake. Signed-off-by: James Almer <jamrial@gmail.com>
* | avcodec/hevc_sei: rename HEVCSEIContext to HEVCSEIJames Almer2017-10-31
| | | | | | | | | | | | | | Cosmetic change skipped in 0b30cb8dae5e7edb2a5f35900547321499c217f1 by mistake. Signed-off-by: James Almer <jamrial@gmail.com>
* | avcodec/hevc_sei: Support HEVC paired fields.Brian Matherly2017-09-30
| | | | | | | | | | | | | | Correctly set the interlaced_frame and top_field_first fields when pic_struct indicates paired fields. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | hevc: Add support for alternative transfer characterics SEIVittorio Giovara2017-06-28
| | | | | | | | | | | | | | | | | | | | The use of this SEI is for backward compatibility in HLG HDR systems: older devices that cannot interpret the "arib-std-b67" transfer will get the compatible transfer (usually bt709 or bt2020) from the VUI, while newer devices that can interpret HDR will read the SEI and use its value instead. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avcodec/hevc_sei: remove bugus debug messageJames Almer2017-05-10
| | | | | | | | | | | | | | Also Change the active_parameter_sets function name to one more in line with the rest of the file. Signed-off-by: James Almer <jamrial@gmail.com>
* | avcodec/hevc_sei: fix amount of bits skipped when reading picture timing SEI ↵James Almer2017-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | message The code was skipping the entire reported SEI message size regardless of the amount of bits read. While in theory safe for NALU where the picture timing SEI message is alone or at the end as we're using the checked bitstream reader, it isn't in any other situation, where every SEI message in the NALU after the picture timing one would potentially fail to parse. Change the function name to one more in line with the rest of file, and remove the bogus "Skipped SEI" debug message while at it. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* | avcodec/hevc_sei: actually propagate error codesJames Almer2017-05-06
| |
* | avcodec/hevcdec: move SEI message parsing into a separate headerJames Almer2017-05-05
| | | | | | | | | | | | | | | | It doesn't depend on hevcdec anymore. Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Reviewed-by: Aaron Levinson <alevinsn@aracnet.com> Signed-off-by: James Almer <jamrial@gmail.com>
* | avcodec/hevcdec: remove HEVCContext usage from hevc_seiJames Almer2017-05-05
| | | | | | | | | | | | | | | | Based on the H264 SEI implementation. Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Reviewed-by: Aaron Levinson <alevinsn@aracnet.com> Signed-off-by: James Almer <jamrial@gmail.com>
* | lavc: Add Content Light Level side metadata found in HEVCSteve Lhomme2017-04-06
| | | | | | | | | | | | These data are necessary when transmitting HDR over HDMI. Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit '67351924fa91dea4339109100a4c0689f006581f'Clément Bœsch2017-03-30
|\| | | | | | | | | | | | | * commit '67351924fa91dea4339109100a4c0689f006581f': Drop unreachable break and return statements Merged-by: Clément Bœsch <cboesch@gopro.com>
| * Drop unreachable break and return statementsDiego Biurrun2016-11-03
| |
* | 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.
* | Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-21
|\| | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | hevc: Fix memory leak related to a53_caption dataWill Kelleher2016-05-15
| | | | | | | | | | Signed-off-by: Will Kelleher <wkelleher@gogoair.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavc/hevc Parse SEI_TYPE_MASTERING_DISPLAY_INFO and propagate content into ↵Neil Birkbeck2016-02-14
| | | | | | | | | | | | | | | | | | | | | | | | the AVMasteringDisplayMetadata side data. Add support for parsing SEI_TYPE_MASTERING_DISPLAY_INFO and propagate contents into the AVMasteringDisplayMetadata side data. Primaries are ordered in RGB order and the values are converted to rationals ([0,1] for CEI 1931 Chroma coords, and cd/m^2 for luma). Signed-off-by: Neil Birkbeck <neil.birkbeck@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec: Use get_ue_golomb_long() when neededMark Harris2015-12-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_ue_golomb() cannot decode values larger than 8190 (the maximum value that can be golomb encoded in 25 bits) and produces the error "Invalid UE golomb code" if a larger value is encountered. Use get_ue_golomb_long() instead (which supports 63 bits, up to 4294967294) when valid h264/hevc values can exceed 8190. This updates decoding of the following values: (maximum) first_mb_in_slice 36863* for level 5.2 abs_diff_pic_num_minus1 131071 difference_of_pic_nums_minus1 131071 idr_pic_id 65535 recovery_frame_cnt 65535 frame_packing_arrangement_id 4294967294 frame_packing_arrangement_repetition_period 16384 display_orientation_repetition_period 16384 An alternative would be to modify get_ue_golomb() to handle encoded values of up to 49 bits as was done for get_se_golomb() in a92816c. In that case get_ue_golomb() could continue to be used for all of these except frame_packing_arrangement_id. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | hevc: Fix a53 caption extractionWill Kelleher2015-11-12
| | | | | | | | | | | | | | | | | | | | | | Just realized my previous patch doesn't work quite right. I uploaded a better sample file that actually has visible captions to /incoming/hevc_cc.ts. I tested with that file doing hevc->x264 and it works. This is basically an exact copy of the existing h264 logic. Signed-off-by: Will Kelleher <wkelleher@gogoair.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | hevc: extract SEI caption dataWill Kelleher2015-11-07
| | | | | | | | | | Signed-off-by: Will Kelleher <wkelleher@gogoair.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '979cb55103fa8e8274806e496901203742c686d1'Hendrik Leppkes2015-08-02
|\| | | | | | | | | | | | | | | | | | | * commit '979cb55103fa8e8274806e496901203742c686d1': hevc: Split the sei parsing in 3 functions Conflicts: libavcodec/hevc_sei.c Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * hevc: Split the sei parsing in 3 functionsLuca Barbato2015-08-01
| |
* | Merge commit '043f46f5741e1a5caedf55d788e1a72aae3b7605'Hendrik Leppkes2015-08-02
|\| | | | | | | | | | | | | | | | | | | * commit '043f46f5741e1a5caedf55d788e1a72aae3b7605': hevc: Use switch instead of if-nests in decode_nal_sei_message Conflicts: libavcodec/hevc_sei.c Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * hevc: Use switch instead of if-nests in decode_nal_sei_messageLuca Barbato2015-08-01
| | | | | | | | | | | | Makes simpler to add support for more SEI types. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>