[MPlayer-cvslog] r37151 - in trunk: fmt-conversion.c libmpcodecs/vd_ffmpeg.c
iive
subversion at mplayerhq.hu
Tue Apr 15 14:10:59 CEST 2014
Author: iive
Date: Tue Apr 15 14:10:59 2014
New Revision: 37151
Log:
Update XvMC implementation to the changes in FFmpeg.
Use the common AV_PIX_FMT_XVMC.
Remove usage of avctx->xvmc_acceleration and CODEC_CAP_HWACCEL.
Return error instead of exiting.
Modified:
trunk/fmt-conversion.c
trunk/libmpcodecs/vd_ffmpeg.c
Modified: trunk/fmt-conversion.c
==============================================================================
--- trunk/fmt-conversion.c Sun Apr 13 01:45:58 2014 (r37150)
+++ trunk/fmt-conversion.c Tue Apr 15 14:10:59 2014 (r37151)
@@ -134,9 +134,7 @@ static const struct {
{ IMGFMT_422P, AV_PIX_FMT_YUVJ422P },
{ IMGFMT_444P, AV_PIX_FMT_YUVJ444P },
{ IMGFMT_440P, AV_PIX_FMT_YUVJ440P },
-
- { IMGFMT_XVMC_MOCO_MPEG2, AV_PIX_FMT_XVMC_MPEG2_MC },
- { IMGFMT_XVMC_IDCT_MPEG2, AV_PIX_FMT_XVMC_MPEG2_IDCT },
+ { IMGFMT_XVMC_IDCT_MPEG2, AV_PIX_FMT_XVMC },
{ IMGFMT_VDPAU_MPEG1, AV_PIX_FMT_VDPAU_MPEG1 },
{ IMGFMT_VDPAU_MPEG2, AV_PIX_FMT_VDPAU_MPEG2 },
{ IMGFMT_VDPAU_H264, AV_PIX_FMT_VDPAU_H264 },
Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c Sun Apr 13 01:45:58 2014 (r37150)
+++ trunk/libmpcodecs/vd_ffmpeg.c Tue Apr 15 14:10:59 2014 (r37151)
@@ -477,9 +477,6 @@ static int init(sh_video_t *sh){
avctx->bits_per_coded_sample= sh->bih->biBitCount;
set_dr_slice_settings(avctx, lavc_codec);
- if(lavc_codec->capabilities & CODEC_CAP_HWACCEL)
- // HACK around badly placed checks in mpeg_mc_decode_init
- set_format_params(avctx, PIX_FMT_XVMC_MPEG2_IDCT);
avctx->thread_count = lavc_param_threads;
avctx->thread_type = FF_THREAD_FRAME | FF_THREAD_SLICE;
avctx->refcounted_frames = 1;
@@ -751,17 +748,10 @@ static int get_buffer(AVCodecContext *av
#if CONFIG_XVMC
if(IMGFMT_IS_XVMC(mpi->imgfmt)) {
struct xvmc_pix_fmt *render = mpi->priv; //same as data[2]
- if(!avctx->xvmc_acceleration) {
- mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_McGetBufferShouldWorkOnlyWithXVMC);
- assert(0);
- exit(1);
-// return -1;//!!fixme check error conditions in ffmpeg
- }
if(!(mpi->flags & MP_IMGFLAG_DIRECT)) {
mp_msg(MSGT_DECVIDEO, MSGL_ERR, MSGTR_MPCODECS_OnlyBuffersAllocatedByVoXvmcAllowed);
assert(0);
- exit(1);
-// return -1;//!!fixme check error conditions in ffmpeg
+ return -1;//!!fixme check error conditions in ffmpeg
}
if(mp_msg_test(MSGT_DECVIDEO, MSGL_DBG5))
mp_msg(MSGT_DECVIDEO, MSGL_DBG5, "vd_ffmpeg::get_buffer (xvmc render=%p)\n", render);
More information about the MPlayer-cvslog
mailing list