Convert XvMC to hwaccel v3
Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:

committed by
Michael Niedermayer

parent
c19f193c6b
commit
1c63aed232
@@ -767,7 +767,13 @@ typedef struct RcOverride{
|
||||
#define CODEC_CAP_DR1 0x0002
|
||||
#define CODEC_CAP_TRUNCATED 0x0008
|
||||
#if FF_API_XVMC
|
||||
/* Codec can export data for HW decoding (XvMC). */
|
||||
/* Codec can export data for HW decoding. This flag indicates that
|
||||
* the codec would call get_format() with list that might contain HW accelerated
|
||||
* pixel formats (XvMC, VDPAU, VAAPI, etc). The application can pick any of them
|
||||
* including raw image format.
|
||||
* The application can use the passed context to determine bitstream version,
|
||||
* chroma format, resolution etc.
|
||||
*/
|
||||
#define CODEC_CAP_HWACCEL 0x0010
|
||||
#endif /* FF_API_XVMC */
|
||||
/**
|
||||
@@ -1695,7 +1701,7 @@ typedef struct AVCodecContext {
|
||||
* XVideo Motion Acceleration
|
||||
* - encoding: forbidden
|
||||
* - decoding: set by decoder
|
||||
* @deprecated XvMC support is slated for removal.
|
||||
* @deprecated XvMC doesn't need it anymore.
|
||||
*/
|
||||
attribute_deprecated int xvmc_acceleration;
|
||||
#endif /* FF_API_XVMC */
|
||||
@@ -3100,6 +3106,8 @@ typedef struct AVCodec {
|
||||
|
||||
int av_codec_get_max_lowres(const AVCodec *codec);
|
||||
|
||||
struct MpegEncContext;
|
||||
|
||||
/**
|
||||
* AVHWAccel.
|
||||
*/
|
||||
@@ -3161,6 +3169,7 @@ typedef struct AVHWAccel {
|
||||
*
|
||||
* Meaningful slice information (codec specific) is guaranteed to
|
||||
* be parsed at this point. This function is mandatory.
|
||||
* The only exception is XvMC, that works on MB level.
|
||||
*
|
||||
* @param avctx the codec context
|
||||
* @param buf the slice data buffer base
|
||||
@@ -3188,6 +3197,17 @@ typedef struct AVHWAccel {
|
||||
* AVCodecContext.release_buffer().
|
||||
*/
|
||||
int priv_data_size;
|
||||
|
||||
/**
|
||||
* Called for every Macroblock in a slice.
|
||||
*
|
||||
* XvMC uses it to replace the ff_MPV_decode_mb().
|
||||
* Instead of decoding to raw picture, MB parameters are
|
||||
* stored in an array provided by the video driver.
|
||||
*
|
||||
* @param s the mpeg context
|
||||
*/
|
||||
void (*decode_mb)(struct MpegEncContext *s);
|
||||
} AVHWAccel;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user