summaryrefslogtreecommitdiff
path: root/libavcodec/hevc.c
Commit message (Collapse)AuthorAge
* 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>
| * hevcdsp: fix a function nameAnton Khirnov2015-08-21
| | | | | | | | | | put_weighted_pred_avg should be put_unweighted_pred_avg, there is no weighting there.
* | vaapi: Add hevc hwaccel supportTimo Rothenpieler2015-08-27
| | | | | | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* | Merge commit 'a1926a29fb4325afa46842883f197c74d4535c36'Hendrik Leppkes2015-08-24
|\| | | | | | | | | | | | | * commit 'a1926a29fb4325afa46842883f197c74d4535c36': hevc: avoid invalid shifts of negative values Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * hevc: avoid invalid shifts of negative valuesAnton Khirnov2015-08-21
| |
* | lavc: propagate hwaccel errorswm42015-08-06
| | | | | | | | | | | | | | | | At least the new videotoolbox decoder does not actually set a frame if end_frame fails. This causes the API to return success and signals that a picture was decoded, even though AVFrame->data[0] is NULL. Fix this by propagating end_frame errors.
* | 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>
| * hevc_parser: fix standalone build with the hevc decoder disabledAnton Khirnov2015-07-13
| | | | | | | | | | | | The parser depends on hevc_ps, which in turn needs some data tables. Found-by: James Almer <jamrial@gmail.com>
* | Merge commit '077b55943330150db0eafd36bbee614697cabd98'Michael Niedermayer2015-07-13
|\| | | | | | | | | | | | | * commit '077b55943330150db0eafd36bbee614697cabd98': hevc: handle a NULL sps in set_sps() properly Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * hevc: handle a NULL sps in set_sps() properlyAnton Khirnov2015-07-12
| | | | | | | | | | This can happen in update_thread_context(), when the previous frame was corrupted.
* | Merge commit '18156b53f9b642b71c182c5c9818175a61572d2b'Michael Niedermayer2015-07-13
|\| | | | | | | | | | | | | * commit '18156b53f9b642b71c182c5c9818175a61572d2b': hevc: do not pass an entire HEVCContext into export_stream_params() Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * hevc: do not pass an entire HEVCContext into export_stream_params()Anton Khirnov2015-07-12
| | | | | | | | It only needs the parameter sets.
* | avcodec/hevc: Simplify skipped_bytes_pos code furtherMichael Niedermayer2015-07-13
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/hevc: Move skipped_bytes_pos_nal to HEVCNAL, simplify codeMichael Niedermayer2015-07-13
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/hevc: Move skipped_bytes_pos_size_nal into HAVCNALMichael Niedermayer2015-07-13
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/hevc: Remove skipped_bytes_nal, simplify codeMichael Niedermayer2015-07-13
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '7f78155dc6b65be55efb5309b6dd2bb33925a8c4'Michael Niedermayer2015-07-12
|\| | | | | | | | | | | | | * commit '7f78155dc6b65be55efb5309b6dd2bb33925a8c4': hevc: improve a comment Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * hevc: improve a commentAnton Khirnov2015-07-12
| | | | | | | | That loop does the actual full decoding, so 'parse' can be misleading.
* | Merge commit 'd82e1adc2019135a2fc45372e0ed0b5ef107cdd0'Michael Niedermayer2015-07-12
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'd82e1adc2019135a2fc45372e0ed0b5ef107cdd0': hevc: move splitting the packet into NALUs into a separate function Conflicts: libavcodec/hevc.c libavcodec/hevc.h libavcodec/hevc_parse.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * hevc: move splitting the packet into NALUs into a separate functionAnton Khirnov2015-07-12
| | | | | | | | | | This function is independent of the decoding context, so we'll be able to use it in the parser.
* | Merge commit 'ae05b4865514fd71b5e9431e93aa0d03d7ba7751'Michael Niedermayer2015-07-12
|\| | | | | | | | | | | | | | | | | | | * commit 'ae05b4865514fd71b5e9431e93aa0d03d7ba7751': hevc: eliminate the second call to hls_nal_unit() Conflicts: libavcodec/hevc.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * hevc: eliminate the second call to hls_nal_unit()Anton Khirnov2015-07-12
| | | | | | | | | | | | | | Also, make hls_nal_unit() work only on the provided NAL unit, without requiring a whole decoding context. This will allow splitting this code for reuse by the parser.
* | Merge commit 'd7bebe4805193783f0b6f292f9127a75709fb7d9'Michael Niedermayer2015-07-12
|\| | | | | | | | | | | | | * commit 'd7bebe4805193783f0b6f292f9127a75709fb7d9': hevc: skip invalid/ignored NALUs when splitting the packet Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * hevc: skip invalid/ignored NALUs when splitting the packetAnton Khirnov2015-07-12
| | | | | | | | | | There is no need to wait until actually decoding the NALU. This will allow to get rid of the second hls_nal_unit() call later.
* | Merge commit 'b11acd57326db6c2cc1475dd0bea2a06fbc85aa2'Michael Niedermayer2015-07-12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b11acd57326db6c2cc1475dd0bea2a06fbc85aa2': hevc: remove HEVCContext usage from hevc_ps Conflicts: libavcodec/hevc.c libavcodec/hevc_cabac.c libavcodec/hevc_filter.c libavcodec/hevc_mvs.c libavcodec/hevc_ps.c libavcodec/hevc_refs.c libavcodec/hevcpred_template.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * hevc: remove HEVCContext usage from hevc_psAnton Khirnov2015-07-12
| | | | | | | | | | | | Factor out the parameter sets into a separate struct and use it instead. This will allow us to reuse this code in the parser.
| * hevc: check slice address lengthAndreas Cadhalpun2015-07-12
| | | | | | | | | | | | | | It is used as get_bits argument and reading 0 bits doesn't make sense. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | hevc: check slice address lengthAndreas Cadhalpun2015-07-10
| | | | | | | | | | | | | | It is used as get_bits argument and reading 0 bits isn't supported. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | Merge commit '69ab9f53f901eac6a649e22d28cf093357870627'Michael Niedermayer2015-07-09
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '69ab9f53f901eac6a649e22d28cf093357870627': hevc: split bitstream unescaping to a separate file Conflicts: libavcodec/Makefile libavcodec/hevc.c See: afa93d198aaf2cc661c4df6d4095cd030265d30a Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hevc: split bitstream unescaping to a separate fileAnton Khirnov2015-07-08
| | | | | | | | It will be useful in the QSV HEVC encoder.
* | Merge commit 'fd124d8357b1becfde3ac8d5e3320127cf97a5b7'Michael Niedermayer2015-07-09
|\| | | | | | | | | | | | | | | | | | | | | * commit 'fd124d8357b1becfde3ac8d5e3320127cf97a5b7': hevc_ps: split the code for parsing the SPS and exporting it into the context Conflicts: libavcodec/hevc.c libavcodec/hevc_ps.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hevc_ps: split the code for parsing the SPS and exporting it into the contextAnton Khirnov2015-07-08
| | | | | | | | | | This will be useful in the later commits, where we want to parse an SPS without having a whole decoding context.
| * hevc: Fix HWACCEL_MAX for D3D11Michael Niedermayer2015-06-01
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | avcodec/vdpau: Support for VDPAU accelerated HEVC decodingPhilip Langdale2015-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces basic support for HEVC decoding through vdpau. Right now, there are problems with the nvidia driver/library implementation that mean that frames are incorrectly laid out in memory when they are returned from the decoder, and it is normally impossible to recover the complete decoded frame due to loss of data from alignment inconsistencies. I obviously hope that nvidia will be fixing it in due course - I've verified the problems exist with their example application. As such, this support is not useful for any real world application, but I believe that it is correct (with the caveat that the mangled frames may hide problems) and will work properly once the nvidia problem is fixed. Right now it appears that any file encoded by x265 or nvenc is decoded correctly, but that's because these files don't use a bunch of HEVC features. Quick summary: Features that seem to work: 1) Short Term References 2) Scaling Lists 3) Tiling Features with known problems: 1) Long Term References It's hard to tell what's going on here. After I read the nvidia example app that does not set the IsLongTerm flag on LTRs, and changed my code, a bunch of frames using LTR started to display correctly, but there are still samples with glitches that are related to LTRs. In terms of real world files, both x265 and nvenc only use short term refs from this list. The divx encoder seems similar. Signed-off-by: Philip Langdale <philipl@overt.org>
* | avcodec/hevc: Track long and short term RPS size for VDPAUPhilip Langdale2015-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Today, we track the short term RPS size for DXVA, but only if the SliceHeader RPS is being used. Otherwise it's left uninitialized. NVIDIA's VDPAU implementation requires that the size be accurately tracked even if an SPS RPS is being used. In this case, it's really counting the size of the RPS idx information, but you end up with mangled output if the value is not accurate. VDPAU also needs the size of the long term RPS. Signed-off-by: Philip Langdale <philipl@overt.org>
* | hevc: fix typo (mpv -> mvp).Ronald S. Bultje2015-06-06
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: Fix HWACCEL_MAX for D3D11Michael Niedermayer2015-05-26
| | | | | | | | | | Found-by: philipl Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'd8039ef8d221ea273aa4f1e62e5df21bf618c772'Michael Niedermayer2015-05-25
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'd8039ef8d221ea273aa4f1e62e5df21bf618c772': D3D11va: add a Direct3D11 video decoder similar to DXVA2 Conflicts: Changelog configure libavcodec/Makefile libavcodec/allcodecs.c libavcodec/dxva2_vc1.c libavcodec/version.h libavutil/pixdesc.c libavutil/pixfmt.h libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * D3D11va: add a Direct3D11 video decoder similar to DXVA2Steve Lhomme2015-05-25
| | | | | | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * hevc: make avcodec_decode_video2() fail if get_format() failswm42015-05-19
| | | | | | | | | | | | | | | | | | | | | | | | Personally, I need the decoder to back out if get_format() returns no usable pixel format. This didn't work because the error code was not propagated down the call chain. This in turn happened because the variable declaration removed in this patch shadowed the variable, whose value is returned at the end of the function. Consequently, failures of decode_nal_unit() were ignored in this place. Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: Remove unused variableMichael Niedermayer2015-05-20
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: Fix typo in num_entry_point_offsets checkMichael Niedermayer2015-05-15
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc: make avcodec_decode_video2() fail if get_format() failswm42015-05-14
| | | | | | | | | | | | | | | | | | | | | | | | Personally, I need the decoder to back out if get_format() returns no usable pixel format. This didn't work because the error code was not propagated down the call chain. This in turn happened because the variable declaration removed in this patch shadowed the variable, whose value is returned at the end of the function. Consequently, failures of decode_nal_unit() were ignored in this place. Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: Simplify entry_point_offset parsingMichael Niedermayer2015-05-13
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: Check num_entry_point_offsetsMichael Niedermayer2015-05-13
| | | | | | | | | | | | Fixes CID1239099 part 2 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: Check offset_lenMichael Niedermayer2015-05-13
| | | | | | | | | | | | Fixes CID1239099 part 1 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: Fix order of operations in hls_decode_neighbour()Michael Niedermayer2015-05-12
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: Remove current_spsMichael Niedermayer2015-04-28
| | | | | | | | | | | | The variable should not be needed anymore Signed-off-by: Michael Niedermayer <michaelni@gmx.at>