[MPlayer-users] Bad video quality with -vc ffmpeg12vdpau
Carl Eugen Hoyos
cehoyos at ag.or.at
Sun Jan 20 01:45:53 CET 2013
On Saturday 19 January 2013 04:01:16 pm Ilja Sekler wrote:
> about a week ago some changes in ffmpeg led to a very bad video quality
> when playing MPEG2
I am using attached "patch" since several days as a work-around,
unfortunately I don't know how to correctly fix the problem.
Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
index 7bf693a..bc807b2 100644
--- a/libavcodec/vdpau.c
+++ b/libavcodec/vdpau.c
@@ -52,6 +52,7 @@ int ff_vdpau_common_end_frame(AVCodecContext *avctx)
{
MpegEncContext * const s = avctx->priv_data;
AVVDPAUContext *hwctx = avctx->hwaccel_context;
+return 0;
if (hwctx->bitstream_buffers_used) {
VdpVideoSurface surf = ff_vdpau_get_surface_id(s->current_picture_ptr);
diff --git a/libavcodec/vdpau_mpeg12.c b/libavcodec/vdpau_mpeg12.c
index 1761b79..620f3d9 100644
--- a/libavcodec/vdpau_mpeg12.c
+++ b/libavcodec/vdpau_mpeg12.c
@@ -35,6 +35,7 @@ static int vdpau_mpeg_start_frame(AVCodecContext *avctx,
VdpPictureInfoMPEG1Or2 *info = &hwctx->info.mpeg;
VdpVideoSurface ref;
int i;
+return 0;
/* fill VdpPictureInfoMPEG1Or2 struct */
info->forward_reference = VDP_INVALID_HANDLE;
@@ -96,7 +97,7 @@ AVHWAccel ff_mpeg1_vdpau_hwaccel = {
.name = "mpeg1_vdpau",
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_MPEG1VIDEO,
- .pix_fmt = AV_PIX_FMT_VDPAU,
+ .pix_fmt = AV_PIX_FMT_VDPAU_MPEG1,
.start_frame = vdpau_mpeg_start_frame,
.end_frame = ff_vdpau_common_end_frame,
.decode_slice = vdpau_mpeg_decode_slice,
@@ -108,7 +109,7 @@ AVHWAccel ff_mpeg2_vdpau_hwaccel = {
.name = "mpeg2_vdpau",
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_MPEG2VIDEO,
- .pix_fmt = AV_PIX_FMT_VDPAU,
+ .pix_fmt = AV_PIX_FMT_VDPAU_MPEG2,
.start_frame = vdpau_mpeg_start_frame,
.end_frame = ff_vdpau_common_end_frame,
.decode_slice = vdpau_mpeg_decode_slice,
More information about the MPlayer-users
mailing list