summaryrefslogtreecommitdiff
path: root/libavcodec/vaapi_h264.c
Commit message (Collapse)AuthorAge
* lavc: Rename hwaccel.h to hwconfig.hMark Thompson2020-04-26
| | | | | This already applied to decoders as well as hwaccels, and adding encoder support was going to make the name even more inaccurate.
* lavc/vaapi_h264: Do not set FMO fields.Carl Eugen Hoyos2019-03-28
| | | | | | | | | | | | | | | | | | | The fields are deprecated in current vaapi, setting them to 0 in old versions is fine as FMO is not implemented. Fixes the following warnings: libavcodec/vaapi_h264.c:259:10: warning: 'num_slice_groups_minus1' is deprecated [-Wdeprecated-declarations] .num_slice_groups_minus1 = pps->slice_group_count - 1, ^ libavcodec/vaapi_h264.c:260:10: warning: 'slice_group_map_type' is deprecated [-Wdeprecated-declarations] .slice_group_map_type = pps->mb_slice_group_map_type, ^ libavcodec/vaapi_h264.c:261:10: warning: 'slice_group_change_rate_minus1' is deprecated [-Wdeprecated-declarations] .slice_group_change_rate_minus1 = 0, /* FMO is not implemented */ ^ Reviewed-by: Mark Thompson
* lavc: Mark all AVHWAccel structures as constMark Thompson2017-11-26
|
* Merge commit 'b46a77f19ddc4b2b5fa3187835ceb602a5244e24'James Almer2017-11-11
|\ | | | | | | | | | | | | | | | | * commit 'b46a77f19ddc4b2b5fa3187835ceb602a5244e24': lavc: external hardware frame pool initialization Includes the fix from e724bdfffbd3c27aac53d1f32f20f105f37caef0 Merged-by: James Almer <jamrial@gmail.com>
| * lavc: external hardware frame pool initializationwm42017-10-19
| | | | | | | | | | | | | | | | | | | | | | | | This adds a new API, which allows the API user to query the required AVHWFramesContext parameters. This also reduces code duplication across the hwaccels by introducing ff_decode_get_hw_frames_ctx(), which uses the new API function. It takes care of initializing the hw_frames_ctx if needed, and does additional error handling and API usage checking. Support for VDA and Cuvid missing. Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * pthread_frame: do not run hwaccel decoding asynchronously unless it's safeAnton Khirnov2016-12-19
| | | | | | | | | | | | | | | | | | | | Certain hardware decoding APIs are not guaranteed to be thread-safe, so having the user access decoded hardware surfaces while the decoder is running in another thread can cause failures (this is mainly known to happen with DXVA2). For such hwaccels, only allow the decoding thread to run while the user is inside a lavc decode call (avcodec_send_packet/receive_frame).
| * vaapi_h264: fix RefPicList[] field flags.Gwenole Beauchesne2016-10-24
| | | | | | | | | | | | | | | | | | | | | | Use new H264Ref.reference field to track field picture flags. The H264Picture.reference flag in DPB is now irrelevant here. This is a regression from git commit a12d3188, and that affected multiple interlaced video streams. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
| * vaapi_h264: Convert to use the new VAAPI hwaccel codeMark Thompson2016-08-30
| |
| * vaapi_h264: Constify pointersMark Thompson2016-08-13
| |
* | pthread_frame: do not run hwaccel decoding asynchronously unless it's safeAnton Khirnov2017-03-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Certain hardware decoding APIs are not guaranteed to be thread-safe, so having the user access decoded hardware surfaces while the decoder is running in another thread can cause failures (this is mainly known to happen with DXVA2). For such hwaccels, only allow the decoding thread to run while the user is inside a lavc decode call (avcodec_send_packet/receive_frame). Merges Libav commit d4a91e65. Signed-off-by: wm4 <nfxjfg@googlemail.com> Tested-by: Michael Niedermayer <michael@niedermayer.cc>
* | vaapi_h264: Convert to use the new VAAPI hwaccel codeMark Thompson2017-01-17
| | | | | | | | (cherry picked from commit 2fe93244ab9465ef19c756a41524cbbf0580ee48)
* | vaapi_h264: Constify pointersMark Thompson2017-01-17
| | | | | | | | (cherry picked from commit 03adfe913062c6995136eb1ca51152b6d596c0f4)
* | Merge commit 'f638b67e5790735f34620bf82025c9b9d6fc7216'James Almer2016-08-01
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'f638b67e5790735f34620bf82025c9b9d6fc7216': h264: move the parameter set definitions to a new header file Conflicts: libavcodec/h264_parse.h libavcodec/h264_ps.c libavcodec/h264dec.h Merged-by: James Almer <jamrial@gmail.com>
| * h264: move the parameter set definitions to a new header fileAnton Khirnov2016-06-21
| | | | | | | | | | The PS parsing code is independent from the decoder, so it makes more sense for it to have its own separate header.
* | Merge commit '9df889a5f116c1ee78c2f239e0ba599c492431aa'Clément Bœsch2016-07-29
|\| | | | | | | | | | | | | * commit '9df889a5f116c1ee78c2f239e0ba599c492431aa': h264: rename h264.[ch] to h264dec.[ch] Merged-by: Clément Bœsch <u@pkh.me>
| * h264: rename h264.[ch] to h264dec.[ch]Anton Khirnov2016-06-21
| | | | | | | | This is more consistent with the naming of other decoders.
* | Merge commit '5f1c3cbd524728317bf460259aa8f3ef5ec935c6'Clément Bœsch2016-06-21
|\| | | | | | | | | | | | | * commit '5f1c3cbd524728317bf460259aa8f3ef5ec935c6': vaapi: Drop pointless debug output Merged-by: Clément Bœsch <clement@stupeflix.com>
| * vaapi: Drop pointless debug outputDiego Biurrun2016-05-03
| |
* | Merge commit 'c8dcff0cdb17d0aa03ac729eba12d1a20f1f59c8'Clément Bœsch2016-06-12
|\| | | | | | | | | | | | | * commit 'c8dcff0cdb17d0aa03ac729eba12d1a20f1f59c8': h264: factor out calculating the POC count into a separate file Merged-by: Clément Bœsch <u@pkh.me>
| * h264: factor out calculating the POC count into a separate fileAnton Khirnov2016-04-24
| | | | | | | | This will allow decoupling the parser from the decoder.
* | Merge commit '3176217c60ca7828712985092d9102d331ea4f3d'Clément Bœsch2016-06-12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '3176217c60ca7828712985092d9102d331ea4f3d': h264: decouple h264_ps from the h264 decoder Main changes: - a local GetBitContext is created for the various ff_h264_decode_seq_parameter_set() attempts - just like the old code, remove_sps() is adjusted so it doesn't remove the pps. Fixes decode with Ticket #631 http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20111108/dae58f17/attachment.mp4 but see next point as well. - ff_h264_update_thread_context() is updated to work even when SPS isn't set as it breaks current skip_frame code. This makes sure we can still decode the sample from ticket #631 without the need for -flags2 +chunks. (Thanks to Michael) - keep {sps,pps}_ref pointers that stay alive even when the active pps/sps get removed from the available lists (patch by michaelni with additionnal frees in ff_h264_free_context() from mateo) - added a check on sps in avpriv_h264_has_num_reorder_frames() to fix crashes with mpegts_with_dvbsubs.ts from Ticket #4074 http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket4074/mpegts_with_dvbsubs.ts - in h264_parser.c:h264_parse(), after the ff_h264_decode_extradata() is called, the pps and sps from the local parser context are updated with the pps and sps from the used h264context. This fixes fate-flv-demux. - in h264_slice.c, "PPS changed between slices" error is not triggered anymore in one condition as it makes fate-h264-xavc-4389 fails with THREADS=N (Thanks to Michael) Merged-by: Clément Bœsch <clement@stupeflix.com> Merged-by: Michael Niedermayer <michael@niedermayer.cc> Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
| * h264: decouple h264_ps from the h264 decoderAnton Khirnov2016-04-24
| | | | | | | | | | | | | | | | | | Make the SPS/PPS parsing independent of the H264Context, to allow decoupling the parser from the decoder. The change is modelled after the one done earlier for HEVC. Move the dequant buffers to the PPS to avoid complex checks whether they changed and an expensive copy for frame threads.
| * vaapi_h264: Fix bit offset of slice data.Mark Thompson2016-04-02
| | | | | | | | | | | | | | | | | | | | | | | | Commit ca2f19b9cc37be509d85f05c8f902860475905f8 modified the meaning of H264SliceContext.gb: it is now initialised at the start of the NAL unit header, rather than at the start of the slice header. The VAAPI slice decoder uses the offset after parsing to determine the offset of the slice data in the bitstream, so with the changed meaning we no longer need to add the extra byte to account for the NAL unit header because it is now included directly. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | vaapi_h264: Fix bit offset of slice data.Mark Thompson2016-05-08
| | | | | | | | | | | | | | | | | | | | | | | | Commit ca2f19b9cc37be509d85f05c8f902860475905f8 modified the meaning of H264SliceContext.gb: it is now initialised at the start of the NAL unit header, rather than at the start of the slice header. The VAAPI slice decoder uses the offset after parsing to determine the offset of the slice data in the bitstream, so with the changed meaning we no longer need to add the extra byte to account for the NAL unit header because it is now included directly. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | Merge commit 'e481458bc308ee838deaeacac51929514762e7a7'Derek Buitenhuis2016-04-26
|\| | | | | | | | | | | | | * commit 'e481458bc308ee838deaeacac51929514762e7a7': h264: factor out pred weight table parsing into a separate file Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * h264: factor out pred weight table parsing into a separate fileAnton Khirnov2016-03-28
| | | | | | | | This will allow decoupling the parser from the decoder.
| * lavu: deprecate AV_PIX_FMT_VAAPI_*, replace with AV_PIX_FMT_VAAPIMark Thompson2016-03-19
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | vaapi: streamline public context structure.Gwenole Beauchesne2015-08-19
| | | | | | | | | | | | | | | | | | | | | | | | Move libavcodec managed objects from the public struct vaapi_context to a new privately owned FFVAContext. This is done so that to clean up and streamline the public structure, but also to prepare for new codec support, thus requiring new internal data to be added in there. The AVCodecContext.hwaccel_context, that holds the public vaapi_context, shall no longer be accessed from within vaapi_*.c codec support files. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
* | vaapi: define a unique pixel format for VA-API (AV_PIX_FMT_VAAPI).Gwenole Beauchesne2015-08-19
| | | | | | | | | | | | | | | | | | | | Deprecate older VA pixel formats (MOCO, IDCT) as it is now very unlikely to ever be useful in the future. Only keep plain AV_PIX_FMT_VAAPI format that is aliased to the older VLD variant. This is an API change. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
* | vaapi_h264: fix RefPicList[] field flags.Gwenole Beauchesne2015-06-23
| | | | | | | | | | | | | | | | | | | | Use new H264Ref.reference field to track field picture flags. The H264Picture.reference flag in DPB is now irrelevant here. This is a regression from git commit d8151a7, and that affected multiple interlaced video streams. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
* | Merge commit 'a0f2946068c62e18cb05ac25c0df3d86077251a6'Michael Niedermayer2015-04-29
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a0f2946068c62e18cb05ac25c0df3d86077251a6': h264: use properly allocated AVFrames Conflicts: libavcodec/h264.c libavcodec/h264.h libavcodec/h264_refs.c libavcodec/h264_slice.c libavcodec/svq3.c libavcodec/vda_h264.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: use properly allocated AVFramesAnton Khirnov2015-04-29
| |
* | Merge commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25'Michael Niedermayer2015-04-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25': lavc: Replace av_dlog and tprintf with internal macros Conflicts: libavcodec/aacdec.c libavcodec/audio_frame_queue.c libavcodec/bitstream.c libavcodec/dcadec.c libavcodec/dnxhddec.c libavcodec/dvbsubdec.c libavcodec/dvdec.c libavcodec/dvdsubdec.c libavcodec/get_bits.h libavcodec/gifdec.c libavcodec/h264.h libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_loopfilter.c libavcodec/h264_refs.c libavcodec/imc.c libavcodec/interplayvideo.c libavcodec/jpeglsdec.c libavcodec/libopencore-amr.c libavcodec/mjpegdec.c libavcodec/mpeg12dec.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_parser.c libavcodec/pngdec.c libavcodec/ratecontrol.c libavcodec/rv10.c libavcodec/svq1dec.c libavcodec/vqavideo.c libavcodec/wmadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: Replace av_dlog and tprintf with internal macrosVittorio Giovara2015-04-19
| |
| * vaapi_h264: fix slice data offsetHendrik Leppkes2015-03-23
| |
* | vaapi_h264: fix slice data offsetHendrik Leppkes2015-03-23
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'a12d3188cbec15e22070e139fa5cc541da07e2c3'Michael Niedermayer2015-03-21
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a12d3188cbec15e22070e139fa5cc541da07e2c3': h264: use a smaller struct for the ref lists Conflicts: libavcodec/h264_direct.c libavcodec/h264_mb.c libavcodec/h264_picture.c libavcodec/h264_refs.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: use a smaller struct for the ref listsAnton Khirnov2015-03-21
| | | | | | | | | | | | There is no need to store a whole H264Picture, with a full AVFrame embedded in it. This should allow getting rid of the embedded AVFrame later.
* | Merge commit 'd4d9068cdf8f4b2b87ae87a2ef880d243f77b977'Michael Niedermayer2015-03-21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'd4d9068cdf8f4b2b87ae87a2ef880d243f77b977': h264: move mb_{x,y} into the per-slice context Conflicts: libavcodec/h264.c libavcodec/h264_cavlc.c libavcodec/h264_mb.c libavcodec/h264_slice.c libavcodec/svq3.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: move mb_{x,y} into the per-slice contextAnton Khirnov2015-03-21
| |
* | Merge commit 'a9b201cacf85d710b102010cb4baef97f00ea39b'Michael Niedermayer2015-03-21
|\| | | | | | | | | | | | | * commit 'a9b201cacf85d710b102010cb4baef97f00ea39b': h264: move cabac_init_idc into the per-slice context Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: move cabac_init_idc into the per-slice contextAnton Khirnov2015-03-21
| |
* | Merge commit 'e6c90ce94f1b07f50cea2babf7471af455cca0ff'Michael Niedermayer2015-03-21
|\| | | | | | | | | | | | | * commit 'e6c90ce94f1b07f50cea2babf7471af455cca0ff': h264: move loopfilter parameters into the per-slice context Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: move loopfilter parameters into the per-slice contextAnton Khirnov2015-03-21
| |
* | Merge commit '95eb35f30513e335990ad0d5dca6ddc318477291'Michael Niedermayer2015-03-21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '95eb35f30513e335990ad0d5dca6ddc318477291': h264: move the ref lists variables into the per-slice context Conflicts: libavcodec/h264.c libavcodec/h264.h libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_direct.c libavcodec/h264_mb.c libavcodec/h264_picture.c libavcodec/h264_refs.c libavcodec/h264_slice.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: move the ref lists variables into the per-slice contextAnton Khirnov2015-03-21
| |
* | Merge commit '066aafced4dc6c7c9e7b37082635472249f1e93e'Michael Niedermayer2015-03-21
|\| | | | | | | | | | | | | | | | | | | * commit '066aafced4dc6c7c9e7b37082635472249f1e93e': h264: move direct_spatial_mv_pred into the per-slice context Conflicts: libavcodec/h264_mvpred.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: move direct_spatial_mv_pred into the per-slice contextAnton Khirnov2015-03-21
| |
* | Merge commit '56febc993b928ccc039a32158ca60b234c311875'Michael Niedermayer2015-03-21
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit '56febc993b928ccc039a32158ca60b234c311875': h264: move the slice type variables into the per-slice context Conflicts: libavcodec/h264.c libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_slice.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: move the slice type variables into the per-slice contextAnton Khirnov2015-03-21
| |