summaryrefslogtreecommitdiff
path: root/libavcodec/vdpau_internal.h
Commit message (Collapse)AuthorAge
* 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/vdpau: Re-factor pre-hwaccel helper functions into separate headerPhilip Langdale2015-05-25
| | | | | | | | | | | | | h264.h and hevc.h are mutually exclusive due to defining some of the same names. As such, we need to avoid forcing h264.h to be included if we want hevc decode acceleration to be possible. However, some of the pre-hwaccel helper functions need h264.h. To avoid messy collisions, let's move the declaration of all those helpers to a separate header which we will exclude for the hevc support (which will be hwaccel-only). Signed-off-by: Philip Langdale <philipl@overt.org>
* Merge commit 'ecbcebde344c9eaeb8877ba2c5d32eb3af621e7f'Michael Niedermayer2015-02-14
|\ | | | | | | | | | | | | | | | | | | * commit 'ecbcebde344c9eaeb8877ba2c5d32eb3af621e7f': vdpau: Adjust necessary #includes for vdpau_internal.h Conflicts: libavcodec/vdpau_internal.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vdpau: Adjust necessary #includes for vdpau_internal.hDiego Biurrun2015-02-14
| |
* | Merge commit '737d35e33408263c04d7730f5487eed0d04938ba'Michael Niedermayer2014-12-27
|\| | | | | | | | | | | | | | | | | | | * commit '737d35e33408263c04d7730f5487eed0d04938ba': vdpau: add support for the H.264 High 4:4:4 Predictive profile Conflicts: libavcodec/vdpau_internal.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vdpau: add support for the H.264 High 4:4:4 Predictive profileRémi Denis-Courmont2014-12-25
| | | | | | | | | | Signed-off-by: Rémi Denis-Courmont <remi@remlab.net> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit 'd565fef1b83b6c5f8afb32229260b79f67c68109'Michael Niedermayer2014-10-15
|\| | | | | | | | | | | | | | | | | | | * commit 'd565fef1b83b6c5f8afb32229260b79f67c68109': vdpau: add AV_HWACCEL_FLAG_IGNORE_LEVEL to skip the codec level check Conflicts: libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vdpau: add AV_HWACCEL_FLAG_IGNORE_LEVEL to skip the codec level checkRémi Denis-Courmont2014-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | Decoding acceleration may work even if the codec level is higher than the stated limit of the VDPAU driver. Or the problem may be considered acceptable by the user. This flag allows skipping the codec level capability checks and proceed with decoding. Applications should obviously not set this flag by default, but only if the user explicitly requested this behavior (and presumably knows how to turn it back off if it fails). Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit 'e3e158e81f0666b8fe66be9ce1cad63a535920e0'Michael Niedermayer2014-10-06
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'e3e158e81f0666b8fe66be9ce1cad63a535920e0': vdpau: add av_vdpau_bind_context() Conflicts: doc/APIchanges libavcodec/vdpau.h libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vdpau: add av_vdpau_bind_context()Rémi Denis-Courmont2014-10-06
| | | | | | | | | | | | | | | | | | | | | | | | This function provides an explicit VDPAU device and VDPAU driver to libavcodec, so that the application is relieved from codec specifics and VdpDevice life cycle management. A stub flags parameter is added for future extension. For instance, it could be used to ignore codec level capabilities (if someone feels dangerous). Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '502cde409ca5ee97ef70c2cdede88b9101746ff6'Michael Niedermayer2014-10-06
|\| | | | | | | | | | | | | | | | | | | * commit '502cde409ca5ee97ef70c2cdede88b9101746ff6': vdpau: force reinitialization when output resolution changes Conflicts: libavcodec/vdpau.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vdpau: force reinitialization when output resolution changesRémi Denis-Courmont2014-10-06
| | | | | | | | | | | | | | This is necessary to recreate the decoder with the correct parameters, as not all codecs invoke get_format() in this case. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avcodec/vdpau_internal: add comment to #endifMichael Niedermayer2014-10-06
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'ce083282f0a8b7d63c4047c30b7bac498f9806dd'Michael Niedermayer2014-10-06
|\| | | | | | | | | | | | | | | | | | | * commit 'ce083282f0a8b7d63c4047c30b7bac498f9806dd': vdpau: common support for managing the VdpDecoder in avcodec Conflicts: libavcodec/vdpau.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vdpau: common support for managing the VdpDecoder in avcodecRémi Denis-Courmont2014-10-05
| | | | | | | | | | | | | | | | | | | | | | | | Using the not so new init and uninit callbacks, avcodec can now take care of creating and destroying the VDPAU decoder instance. The application is still responsible for creating the VDPAU device and allocating video surfaces - this is necessary to keep video surfaces on the GPU all the way to the output. But the application will no longer needs to care about any codec-specific aspects. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit 'fcc1022611f79c2f3aa2f392a5ce14c74be9c1d7'Michael Niedermayer2014-10-06
|\| | | | | | | | | | | | | | | | | | | | | * commit 'fcc1022611f79c2f3aa2f392a5ce14c74be9c1d7': vdpau: factor out common end-of-frame handling Conflicts: libavcodec/vdpau.c libavcodec/vdpau_h264.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vdpau: factor out common end-of-frame handlingRémi Denis-Courmont2014-10-05
| | | | | | | | | | | | Also add error handling. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avcodec/vdpau_internal: move "struct vdpau_picture_context" up to avoid "#else"Michael Niedermayer2014-05-22
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Fix compilation error around struct visibility when VDPAU disabled.Dale Curtis2014-05-22
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '1b1094a19d9e41baf3253c83841f9e5343cecbd0'Michael Niedermayer2014-03-20
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '1b1094a19d9e41baf3253c83841f9e5343cecbd0': vdpau: switch ff_vdpau_get_surface_id from Picture to AVFrame Conflicts: libavcodec/vdpau_internal.h libavcodec/vdpau_vc1.c See: 2a37e560dccb81328f610c51e74ce6cc53f1a5c7 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vdpau: switch ff_vdpau_get_surface_id from Picture to AVFramewm42014-03-20
| | | | | | | | | | | | | | | | This gets rid of aliasing completely unrelated structs to Picture. Fixes the remaining compilation warnings in the vdpau code. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '7948a51b5c3d08e1a1173442a7ff72b220def303'Michael Niedermayer2014-03-20
|\| | | | | | | | | | | | | | | | | | | * commit '7948a51b5c3d08e1a1173442a7ff72b220def303': vdpau: don't assume Picture and H264Picture are the same Conflicts: libavcodec/vdpau.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vdpau: don't assume Picture and H264Picture are the samewm42014-03-20
| | | | | | | | | | | | | | | | | | The code passed H264Picture* and Picture*, and assumed the hwaccel_picture_private field was in the same place in both structs. Somehow this happened to work in Libav, but broke in FFmpeg (and probably subtly breaks in Libav too). Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avcodec/vdpau: fix ff_vdpau_get_surface_id() argument after H264PictureMichael Niedermayer2014-03-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '48e139409556861c9e561ce34133891d8eecc3cf'Michael Niedermayer2013-11-30
|\| | | | | | | | | | | | | * commit '48e139409556861c9e561ce34133891d8eecc3cf': mpeg4videodec: move MpegEncContext.resync_marker into Mpeg4DecContext. Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '70cbf33405f50dfaf77e85f382a188acf17dc71a'Michael Niedermayer2013-11-05
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '70cbf33405f50dfaf77e85f382a188acf17dc71a': vdpau: Add missing #includes to fix standalone header compilation Conflicts: libavcodec/vdpau_internal.h Not completely merged as this would break use of vdpau.h from C++ Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vdpau: Add missing #includes to fix standalone header compilationDiego Biurrun2013-11-04
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Fix make checkheaders for vdpau_internal.hCarl Eugen Hoyos2013-08-31
| |
* | avcodec: fix compilation without vdpauMichael Niedermayer2013-08-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Revert "Merge commit of 'vdpau: remove old-style decoders'"Michael Niedermayer2013-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit bf36dc50ea448999c8f8c7a35f6139a7040f6275, reversing changes made to b7fc2693c70fe72936e4ce124c802ac23857c476. Conflicts: libavcodec/h264.c Keeping support for the old VDPAU API has been requested by our VDPAU maintainer Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | vdpau_internal.h: Add missing include for FF_API_BUFS_VDPAU.Reimar Döffinger2013-08-11
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Merge commit 'f824535a4a79c260b59d3178b8d958217caffd78'Michael Niedermayer2013-08-06
|\| | | | | | | | | | | | | | | | | | | * commit 'f824535a4a79c260b59d3178b8d958217caffd78': vdpau: deprecate bitstream buffers within the hardware context Conflicts: libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vdpau: deprecate bitstream buffers within the hardware contextRémi Denis-Courmont2013-08-05
| | | | | | | | | | | | | | | | The bitstream buffers are now private and freed by libavcodec. For backward compatibility, the hold bitstream buffer pointer is left NULL (applications were supposed to av_freep() it). Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '2852740e23f91d6775714d7cc29b9a73e1111ce0'Michael Niedermayer2013-08-06
|\| | | | | | | | | | | | | * commit '2852740e23f91d6775714d7cc29b9a73e1111ce0': vdpau: store picture data in picture's rather than codec's context Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vdpau: store picture data in picture's rather than codec's contextRémi Denis-Courmont2013-08-05
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '578ea75a9e4ac56e0bbbbe668700be756aa699f8'Michael Niedermayer2013-08-06
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '578ea75a9e4ac56e0bbbbe668700be756aa699f8': vdpau: remove old-style decoders Conflicts: libavcodec/allcodecs.c libavcodec/h263dec.c libavcodec/h264.c libavcodec/mpeg12dec.c libavcodec/mpeg4videodec.c libavcodec/vc1dec.c libavcodec/vdpau.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vdpau: remove old-style decodersRémi Denis-Courmont2013-08-05
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-02-16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: h264: deMpegEncContextize Conflicts: libavcodec/dxva2_h264.c libavcodec/h264.c libavcodec/h264.h libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_loopfilter.c libavcodec/h264_mb_template.c libavcodec/h264_parser.c libavcodec/h264_ps.c libavcodec/h264_refs.c libavcodec/h264_sei.c libavcodec/svq3.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: deMpegEncContextizeAnton Khirnov2013-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the changes are just trivial are just trivial replacements of fields from MpegEncContext with equivalent fields in H264Context. Everything in h264* other than h264.c are those trivial changes. The nontrivial parts are: 1) extracting a simplified version of the frame management code from mpegvideo.c. We don't need last/next_picture anymore, since h264 uses its own more complex system already and those were set only to appease the mpegvideo parts. 2) some tables that need to be allocated/freed in appropriate places. 3) hwaccels -- mostly trivial replacements. for dxva, the draw_horiz_band() call is moved from ff_dxva2_common_end_frame() to per-codec end_frame() callbacks, because it's now different for h264 and MpegEncContext-based decoders. 4) svq3 -- it does not use h264 complex reference system, so I just added some very simplistic frame management instead and dropped the use of ff_h264_frame_start(). Because of this I also had to move some initialization code to svq3. Additional fixes for chroma format and bit depth changes by Janne Grunau <janne-libav@jannau.net> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit 'd8c772de53d29afb1bada88afa859fce8489c668'Michael Niedermayer2013-01-15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'd8c772de53d29afb1bada88afa859fce8489c668': nutdec: Always return a value from nut_read_timestamp() configure: Make warnings from -Wreturn-type fatal errors x86: ABS2: port to cpuflags vdpau: Remove av_unused attribute from function declaration h264: fix ff_generate_sliding_window_mmcos() prototype. Conflicts: configure libavformat/nutdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vdpau: Remove av_unused attribute from function declarationRémi Denis-Courmont2013-01-14
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '44e065d56c87d6a9d0effccec5f31517f72924ec'Michael Niedermayer2013-01-14
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit '44e065d56c87d6a9d0effccec5f31517f72924ec': vdpau: Add context and common helpers for hwaccel support Conflicts: Changelog doc/APIchanges libavcodec/vdpau.h libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vdpau: Add context and common helpers for hwaccel supportRémi Denis-Courmont2013-01-13
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-24
|\| | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: adpcm: use sign_extend() mpeg12: fix mpeg_decode_slice context parameter type Revert "mpeg12: move full_pel from MpegEncContext to Mpeg1Context" Conflicts: libavcodec/mpeg12.c libavcodec/mpeg12.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Revert "mpeg12: move full_pel from MpegEncContext to Mpeg1Context"Janne Grunau2011-10-24
| | | | | | | | | | | | | | | | This reverts commit da22ba7df461c13bf0b0eabc953303803a285d91 since it broke slice threading. Slice threading just duplicates MpegEncContext so every value used during mpeg_decode_slice has to be in it. A second patch will fix the illusion that Mpeg1Context is available in mpeg_decode_slice.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-24
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Move id3v2 tag writing to a separate file. swscale: add missing colons to x86 assembly yuv2planeX. g722: split decoder and encoder into separate files cosmetics: remove extra spaces before end-of-statement semi-colons vorbisdec: check output buffer size before writing output wavpack: calculate bpp using av_get_bytes_per_sample() ac3enc: Set max value for mode options correctly lavc: move get_b_cbp() from h263.h to mpeg4videoenc.c mpeg12: move closed_gop from MpegEncContext to Mpeg1Context mpeg12: move full_pel from MpegEncContext to Mpeg1Context mpeg12: move Mpeg1Context from mpeg12.c to mpeg12.h mpegvideo: remove some unused variables from MpegEncContext. Conflicts: libavcodec/mpeg12.c libavformat/mp3enc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpeg12: move full_pel from MpegEncContext to Mpeg1ContextAnton Khirnov2011-10-23
| | | | | | | | It's MPEG-1 specific.
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
|/ | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Set VDPAU H264 picture parameter field_order_cnt and frame_num at theStephen Warren2010-03-30
| | | | | | | | | start of decoding a picture instead of at the end. Fixes mmco01.264 Patch by Stephen Warren Originally committed as revision 22728 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add VDPAU hardware accelerated decoding for MPEG-4 ASP which can be usedNVIDIA Corporation2009-11-10
| | | | | | | | by video players. Original patch by NVIDIA corporation. Originally committed as revision 20502 to svn://svn.ffmpeg.org/ffmpeg/trunk