Merge commit '578ea75a9e4ac56e0bbbbe668700be756aa699f8'
* 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>
This commit is contained in:
@@ -38,7 +38,6 @@
|
||||
#include "msmpeg4data.h"
|
||||
#include "unary.h"
|
||||
#include "mathops.h"
|
||||
#include "vdpau_internal.h"
|
||||
#include "libavutil/avassert.h"
|
||||
|
||||
#undef NDEBUG
|
||||
@@ -5773,13 +5772,6 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
|
||||
return buf_size;
|
||||
}
|
||||
|
||||
if (s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) {
|
||||
if (v->profile < PROFILE_ADVANCED)
|
||||
avctx->pix_fmt = AV_PIX_FMT_VDPAU_WMV3;
|
||||
else
|
||||
avctx->pix_fmt = AV_PIX_FMT_VDPAU_VC1;
|
||||
}
|
||||
|
||||
//for advanced profile we may need to parse and unescape data
|
||||
if (avctx->codec_id == AV_CODEC_ID_VC1 || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) {
|
||||
int buf_size2 = 0;
|
||||
@@ -5798,8 +5790,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
|
||||
if (size <= 0) continue;
|
||||
switch (AV_RB32(start)) {
|
||||
case VC1_CODE_FRAME:
|
||||
if (avctx->hwaccel ||
|
||||
s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
|
||||
if (avctx->hwaccel)
|
||||
buf_start = start;
|
||||
buf_size2 = vc1_unescape_buffer(start + 4, size, buf2);
|
||||
break;
|
||||
@@ -6002,15 +5993,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
|
||||
s->me.qpel_put = s->dsp.put_qpel_pixels_tab;
|
||||
s->me.qpel_avg = s->dsp.avg_qpel_pixels_tab;
|
||||
|
||||
if ((CONFIG_VC1_VDPAU_DECODER)
|
||||
&&s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) {
|
||||
if (v->field_mode && buf_start_second_field) {
|
||||
ff_vdpau_vc1_decode_picture(s, buf_start, buf_start_second_field - buf_start);
|
||||
ff_vdpau_vc1_decode_picture(s, buf_start_second_field, (buf + buf_size) - buf_start_second_field);
|
||||
} else {
|
||||
ff_vdpau_vc1_decode_picture(s, buf_start, (buf + buf_size) - buf_start);
|
||||
}
|
||||
} else if (avctx->hwaccel) {
|
||||
if (avctx->hwaccel) {
|
||||
if (v->field_mode && buf_start_second_field) {
|
||||
// decode first field
|
||||
s->picture_structure = PICT_BOTTOM_FIELD - v->tff;
|
||||
@@ -6240,38 +6223,6 @@ AVCodec ff_wmv3_decoder = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#if CONFIG_WMV3_VDPAU_DECODER
|
||||
AVCodec ff_wmv3_vdpau_decoder = {
|
||||
.name = "wmv3_vdpau",
|
||||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
.id = AV_CODEC_ID_WMV3,
|
||||
.priv_data_size = sizeof(VC1Context),
|
||||
.init = vc1_decode_init,
|
||||
.close = ff_vc1_decode_end,
|
||||
.decode = vc1_decode_frame,
|
||||
.capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9 VDPAU"),
|
||||
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_VDPAU_WMV3, AV_PIX_FMT_NONE },
|
||||
.profiles = NULL_IF_CONFIG_SMALL(profiles)
|
||||
};
|
||||
#endif
|
||||
|
||||
#if CONFIG_VC1_VDPAU_DECODER
|
||||
AVCodec ff_vc1_vdpau_decoder = {
|
||||
.name = "vc1_vdpau",
|
||||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
.id = AV_CODEC_ID_VC1,
|
||||
.priv_data_size = sizeof(VC1Context),
|
||||
.init = vc1_decode_init,
|
||||
.close = ff_vc1_decode_end,
|
||||
.decode = vc1_decode_frame,
|
||||
.capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1 VDPAU"),
|
||||
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_VDPAU_VC1, AV_PIX_FMT_NONE },
|
||||
.profiles = NULL_IF_CONFIG_SMALL(profiles)
|
||||
};
|
||||
#endif
|
||||
|
||||
#if CONFIG_WMV3IMAGE_DECODER
|
||||
AVCodec ff_wmv3image_decoder = {
|
||||
.name = "wmv3image",
|
||||
|
||||
Reference in New Issue
Block a user