[MPlayer-dev-eng] [PATCH] Add "strict" option to lavdopts to allow HEVC playback

Arne Bochem arneb.mp at ccan.de
Sun Oct 20 04:01:44 CEST 2013


This patch adds the "strict" ffmpeg option to lavdopts.

The recently added HEVC decoder in ffmpeg is currently marked as
experimental. For this reason, the strict option needs to be set to -2
to use it. This patch makes it possible to set it accordingly.

Sample:
http://trailers.divx.com/hevc/TearsOfSteelFull12min_720p_24fps_27qp_831kbps_720p_GPSNR_41.65_HM11.mkv

mplayer -lavdopts strict=-2 \
  TearsOfSteelFull12min_720p_24fps_27qp_831kbps_720p_GPSNR_41.65_HM11.mkv

Regards,
Arne Bochem
-------------- next part --------------
Index: libmpcodecs/vd_ffmpeg.c
===================================================================
--- libmpcodecs/vd_ffmpeg.c	(revision 36479)
+++ libmpcodecs/vd_ffmpeg.c	(working copy)
@@ -109,6 +109,7 @@
 static int lavc_param_vstats=0;
 static int lavc_param_idct_algo=0;
 static int lavc_param_debug=0;
+static int lavc_param_strict=-1;
 static int lavc_param_vismv=0;
 #ifdef CODEC_FLAG2_SHOW_ALL
 static int lavc_param_wait_keyframe=0;
@@ -140,6 +141,7 @@
     {"ec"            , &lavc_param_error_concealment    , CONF_TYPE_INT     , CONF_RANGE, 0, 99, NULL},
     {"vstats"        , &lavc_param_vstats               , CONF_TYPE_FLAG    , 0, 0, 1, NULL},
     {"debug"         , &lavc_param_debug                , CONF_TYPE_INT     , CONF_RANGE, 0, 9999999, NULL},
+    {"strict"        , &lavc_param_strict               , CONF_TYPE_INT     , CONF_RANGE, -2, 2, NULL},
     {"vismv"         , &lavc_param_vismv                , CONF_TYPE_INT     , CONF_RANGE, 0, 9999999, NULL},
 #ifdef CODEC_FLAG2_SHOW_ALL
     {"wait_keyframe" , &lavc_param_wait_keyframe        , CONF_TYPE_FLAG    , 0, 0, 1, NULL},
@@ -344,6 +346,7 @@
 
     avctx->get_format = get_format;
     avctx->flags|= lavc_param_bitexact;
+    avctx->strict_std_compliance = lavc_param_strict;
 
     avctx->coded_width = sh->disp_w;
     avctx->coded_height= sh->disp_h;
Index: DOCS/man/en/mplayer.1
===================================================================
--- DOCS/man/en/mplayer.1	(revision 36479)
+++ DOCS/man/en/mplayer.1	(working copy)
@@ -5244,6 +5244,20 @@
 Skips decoding of frames completely.
 Big speedup, but jerky motion and sometimes bad artifacts
 (see skiploopfilter for available skip values).
+.IPs strict=<value>
+Set level of strictness with respect to standard conformance.
+.RSss
+.br
+-2: Allow nonstandardized experimental things.
+.br
+-1: Allow unofficial extensions. (default)
+.br
+0: Disabled.
+.br
+1: Strictly conform to all the things in the spec no matter what consequences.
+.br
+2: Strictly conform to an older more strict version of the spec or reference software.
+.REss
 .IPs "threads=<1\-8> (MPEG-1/2 and H.264 only)"
 number of threads to use for decoding (default: 1)
 .IPs vismv=<value>


More information about the MPlayer-dev-eng mailing list