1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

102 Commits

Author SHA1 Message Date
Michael Niedermayer
c263102298 avcodec/vdpau: fix assertion failure and < vs > error
Fixes Ticket4211

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-28 01:47:05 +01:00
Michael Niedermayer
6f764d2911 Merge commit '737d35e33408263c04d7730f5487eed0d04938ba'
* 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>
2014-12-27 14:46:15 +01:00
Michael Niedermayer
751731540f Merge commit 'ebd5320afd42d4315851f3e0ca7f5d4a6300eb68'
* commit 'ebd5320afd42d4315851f3e0ca7f5d4a6300eb68':
  vdpau: add support for 4:2:2 and 4:4:4 chroma sampling

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-27 13:17:20 +01:00
Michael Niedermayer
d7aaeea540 Merge commit 'c220a60f92dde9c7c118fc4deddff5c1f617cda9'
* commit 'c220a60f92dde9c7c118fc4deddff5c1f617cda9':
  vdpau: add helper for surface chroma type and size

Conflicts:
	libavcodec/vdpau.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-27 13:06:25 +01:00
Rémi Denis-Courmont
ebd5320afd vdpau: add support for 4:2:2 and 4:4:4 chroma sampling
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-25 20:47:49 +01:00
Rémi Denis-Courmont
c220a60f92 vdpau: add helper for surface chroma type and size
Since the VDPAU pixel format does not distinguish between different
VDPAU video surface chroma types, we need another way to pass this
data to the application.

Originally VDPAU in libavcodec only supported decoding to 8-bits YUV
with 4:2:0 chroma sampling. Correspondingly, applications assumed that
libavcodec expected VDP_CHROMA_TYPE_420 video surfaces for output.
However some of the new HEVC profiles proposed for addition to VDPAU
would require different depth and/or sampling:
http://lists.freedesktop.org/archives/vdpau/2014-July/000167.html
...as would lossless AVC profiles:
http://lists.freedesktop.org/archives/vdpau/2014-November/000241.html

To preserve backward binary compatibility with existing applications,
a new av_vdpau_bind_context() flag is introduced in a further change.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-25 20:47:49 +01:00
Michael Niedermayer
27f2e211aa Merge commit '559fa0d41b5cf8f7e1ba89d1ac70e74712eb2816'
* commit '559fa0d41b5cf8f7e1ba89d1ac70e74712eb2816':
  vdpau: add mapping for H.264 Constrained Baseline profile and fallback

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-14 22:23:53 +01:00
Michael Niedermayer
3f679f73a2 Merge commit '8502c1e9ff9c1dbb6e467630c048d098f4064021'
* commit '8502c1e9ff9c1dbb6e467630c048d098f4064021':
  vdpau: add mapping for H.264 Extended profile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-14 22:14:58 +01:00
Michael Niedermayer
0b30d186f1 Merge commit '8b51bcfed75721e0d20832e5a90e1d585318c9d9'
* commit '8b51bcfed75721e0d20832e5a90e1d585318c9d9':
  vdpau: revector macro to reduce line span

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-14 22:07:41 +01:00
Rémi Denis-Courmont
559fa0d41b vdpau: add mapping for H.264 Constrained Baseline profile and fallback
Old VDPAU drivers do not support this newly defined profile, so falling
back to Main profile is necessary for backward binary compatibility.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-14 18:30:03 +01:00
Rémi Denis-Courmont
8502c1e9ff vdpau: add mapping for H.264 Extended profile
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-14 18:29:27 +01:00
Rémi Denis-Courmont
8b51bcfed7 vdpau: revector macro to reduce line span
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-14 18:29:07 +01:00
Michael Niedermayer
dd5123a04c Merge commit 'ce91b2eae6ea52fc1a7003566d26db20ca62d745'
* commit 'ce91b2eae6ea52fc1a7003566d26db20ca62d745':
  vdpau: return MAIN instead of BASELINE for H.264 CBP

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-28 11:05:12 +01:00
Rémi Denis-Courmont
ce91b2eae6 vdpau: return MAIN instead of BASELINE for H.264 CBP
This is the same as the previous change, but for applications using the
old API (such as VLC 2.2).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-28 07:06:33 +01:00
Michael Niedermayer
51c810e62b Merge commit 'd565fef1b83b6c5f8afb32229260b79f67c68109'
* 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>
2014-10-15 12:30:07 +02:00
Michael Niedermayer
fd937866f7 Merge commit 'c1724623ce0433c6a9ee72133b1fd4db75ec7193'
* commit 'c1724623ce0433c6a9ee72133b1fd4db75ec7193':
  vdpau: have av_vdpau_bind_context() fail on unsupported flag

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-15 12:17:59 +02:00
Rémi Denis-Courmont
d565fef1b8 vdpau: add AV_HWACCEL_FLAG_IGNORE_LEVEL to skip the codec level check
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>
2014-10-15 06:21:56 +00:00
Rémi Denis-Courmont
c1724623ce vdpau: have av_vdpau_bind_context() fail on unsupported flag
Currently, no flags are supported.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-15 06:21:47 +00:00
Michael Niedermayer
67ddf21611 avcodec/vdpau: do not dereference hwctx before checking it for NULL
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-06 17:39:28 +02:00
Michael Niedermayer
0e57c05118 avcodec/vdpau: fix render2() check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-06 16:23:36 +02:00
Michael Niedermayer
573d333010 Merge commit 'bef067f88c74190cdf7e76d12f02e12e069974aa'
* commit 'bef067f88c74190cdf7e76d12f02e12e069974aa':
  vdpau: check video surface and decoder capabilities

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-06 15:12:19 +02:00
Michael Niedermayer
a61899a0f1 Merge commit 'e3e158e81f0666b8fe66be9ce1cad63a535920e0'
* commit 'e3e158e81f0666b8fe66be9ce1cad63a535920e0':
  vdpau: add av_vdpau_bind_context()

Conflicts:
	doc/APIchanges
	libavcodec/vdpau.h
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-06 15:04:03 +02:00
Michael Niedermayer
067d11bf71 Merge commit '502cde409ca5ee97ef70c2cdede88b9101746ff6'
* commit '502cde409ca5ee97ef70c2cdede88b9101746ff6':
  vdpau: force reinitialization when output resolution changes

Conflicts:
	libavcodec/vdpau.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-06 14:17:40 +02:00
Michael Niedermayer
ec6a855b3a avcodec/vdpau: warn if the user application has not setup avctx->hwaccel_context instead of potentially crashing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-06 14:10:37 +02:00
Michael Niedermayer
0ba887bbf4 Merge commit '89ac99ba5f2dc9f69ad3bc294753930eb0b3e4a4'
* commit '89ac99ba5f2dc9f69ad3bc294753930eb0b3e4a4':
  vdpau: pass codec-specific parameters from hwaccel

Conflicts:
	libavcodec/vdpau.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-06 13:21:52 +02:00
Michael Niedermayer
10b6d7462c Merge commit 'ce083282f0a8b7d63c4047c30b7bac498f9806dd'
* commit 'ce083282f0a8b7d63c4047c30b7bac498f9806dd':
  vdpau: common support for managing the VdpDecoder in avcodec

Conflicts:
	libavcodec/vdpau.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-06 12:38:26 +02:00
Michael Niedermayer
b64b719ad5 Merge commit 'fcc1022611f79c2f3aa2f392a5ce14c74be9c1d7'
* 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>
2014-10-06 12:09:17 +02:00
Michael Niedermayer
567c0dcee6 Merge commit '319424d25c53f82b87187ce03ed984d438f1bee6'
* commit '319424d25c53f82b87187ce03ed984d438f1bee6':
  vdpau: add helper for VDPAU to libav error codes conversion

Conflicts:
	libavcodec/vdpau.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-06 11:38:06 +02:00
Rémi Denis-Courmont
bef067f88c vdpau: check video surface and decoder capabilities
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-06 06:20:40 +00:00
Rémi Denis-Courmont
e3e158e81f vdpau: add av_vdpau_bind_context()
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>
2014-10-06 06:20:40 +00:00
Rémi Denis-Courmont
502cde409c vdpau: force reinitialization when output resolution changes
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>
2014-10-06 06:18:56 +00:00
Rémi Denis-Courmont
89ac99ba5f vdpau: pass codec-specific parameters from hwaccel
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-05 10:41:31 +00:00
Rémi Denis-Courmont
ce083282f0 vdpau: common support for managing the VdpDecoder in avcodec
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>
2014-10-05 10:17:02 +00:00
Rémi Denis-Courmont
fcc1022611 vdpau: factor out common end-of-frame handling
Also add error handling.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-05 10:13:44 +00:00
Rémi Denis-Courmont
319424d25c vdpau: add helper for VDPAU to libav error codes conversion
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-10-05 10:08:53 +00:00
Michael Niedermayer
59a53842d3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegvideo: operate with pointers to AVFrames instead of whole structs

Conflicts:
	libavcodec/h261dec.c
	libavcodec/h263dec.c
	libavcodec/intrax8.c
	libavcodec/mpeg12enc.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo.h
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/mpegvideo_xvmc.c
	libavcodec/msmpeg4.c
	libavcodec/ratecontrol.c
	libavcodec/vaapi.c
	libavcodec/vc1dec.c
	libavcodec/vdpau_vc1.c

See: fc567ac49e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-09 15:18:46 +02:00
wm4
f6774f905f mpegvideo: operate with pointers to AVFrames instead of whole structs
The most interesting parts are initialization in ff_MPV_common_init() and
uninitialization in ff_MPV_common_end().

ff_mpeg_unref_picture and ff_thread_release_buffer have additional NULL
checks for Picture.f, because these functions can be called on
uninitialized or partially initialized Pictures.

NULL pointer checks are added to ff_thread_release_buffer() stub function.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-04-09 02:12:19 +02:00
Michael Niedermayer
4d216420be Merge commit '7948a51b5c3d08e1a1173442a7ff72b220def303'
* commit '7948a51b5c3d08e1a1173442a7ff72b220def303':
  vdpau: don't assume Picture and H264Picture are the same

Conflicts:
	libavcodec/vdpau.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-20 22:39:54 +01:00
wm4
1b1094a19d vdpau: switch ff_vdpau_get_surface_id from Picture to AVFrame
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>
2014-03-20 17:00:39 +01:00
wm4
7948a51b5c vdpau: don't assume Picture and H264Picture are the same
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>
2014-03-20 16:59:46 +01:00
Michael Niedermayer
3e3b0b3a40 avcodec/vdpau: update ff_vdpau_h264_set_reference_frames() to H264Picture
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-17 13:35:23 +01:00
Michael Niedermayer
2a37e560dc avcodec/vdpau: fix ff_vdpau_get_surface_id() argument after H264Picture
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-17 13:05:13 +01:00
Michael Niedermayer
a44a27b5c8 Merge commit 'eeaf4f3b87815cbae4c12856cfaafb3a2dae8e0c'
* commit 'eeaf4f3b87815cbae4c12856cfaafb3a2dae8e0c':
  av_vdpau_get_profile: mask out H.264 intra profile flag

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-05 11:49:27 +01:00
Rémi Denis-Courmont
eeaf4f3b87 av_vdpau_get_profile: mask out H.264 intra profile flag
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-03-04 22:48:55 +01:00
Hendrik Leppkes
23bc1351ad vdpau: restore compatibility with deprecated fields in AVVDPAUContext
Fixes ticket #3133.

Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
Tested-by: EricV
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-10 23:54:14 +01:00
Michael Niedermayer
ee9d53e572 Merge commit '48e139409556861c9e561ce34133891d8eecc3cf'
* commit '48e139409556861c9e561ce34133891d8eecc3cf':
  mpeg4videodec: move MpegEncContext.resync_marker into Mpeg4DecContext.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-30 01:28:04 +01:00
Michael Niedermayer
31c09b7663 Merge commit '728c4658563dc82115ade0f1679679eddb7be5ff'
* commit '728c4658563dc82115ade0f1679679eddb7be5ff':
  vdpau: add a constructor for AVVDPAUContext.

Conflicts:
	libavcodec/vdpau.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-14 13:08:36 +01:00
Michael Niedermayer
5f231d909f Merge commit 'ca22d1dea2842fca0422dd1d2bd09e7eb2c8f118'
* commit 'ca22d1dea2842fca0422dd1d2bd09e7eb2c8f118':
  vdpau: add a convenience function for getting a decoder profile.

Conflicts:
	doc/APIchanges
	libavcodec/vdpau.c
	libavcodec/vdpau.h
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-14 13:00:10 +01:00
Anton Khirnov
728c465856 vdpau: add a constructor for AVVDPAUContext.
We will likely want to add new fields to it in the future, so this is
needed to avoid breaking ABI.
2013-11-14 09:38:58 +01:00
Anton Khirnov
ca22d1dea2 vdpau: add a convenience function for getting a decoder profile.
Based on the code by Rémi Denis-Courmont <remi@remlab.net> from VLC.
2013-11-14 09:38:50 +01:00