summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2008-07-29 20:57:54 +0000
committerphintuka <phintuka>2008-07-29 20:57:54 +0000
commit0837f54c5c71f513a744b5950b378403107d23e3 (patch)
tree30c44345ede5fe31dd9188fa27c2023101210034
parent21e17ffb6890c1d45a5fe98cf362033af9fe7e83 (diff)
downloadxineliboutput-0837f54c5c71f513a744b5950b378403107d23e3.tar.gz
xineliboutput-0837f54c5c71f513a744b5950b378403107d23e3.tar.bz2
Added configuration entries for ffmpeg video decoder:
Video.Decoder.H264.SpeedOverAccuracy Video.Decoder.H264.SkipLoopFilter
-rw-r--r--config.c30
-rw-r--r--config.h47
2 files changed, 72 insertions, 5 deletions
diff --git a/config.c b/config.c
index 1b4abc7c..c16d7eb1 100644
--- a/config.c
+++ b/config.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: config.c,v 1.68 2008-07-20 10:54:32 phintuka Exp $
+ * $Id: config.c,v 1.69 2008-07-29 20:57:54 phintuka Exp $
*
*/
@@ -248,6 +248,23 @@ const char * const config_t::s_decoders_H264[] = {
NULL
};
+const char * const config_t::s_ff_skip_loop_filters[] = {
+ trNOOP("automatic"),
+ trNOOP("default"),
+ trNOOP("none"),
+ trNOOP("nonref"),
+ trNOOP("bidir"),
+ trNOOP("nonkey"),
+ trNOOP("all"),
+ NULL
+};
+
+const char * const config_t::s_ff_speed_over_accuracy[] = {
+ trNOOP("automatic"),
+ trNOOP("yes"),
+ trNOOP("no"),
+};
+
static const char exts_playlist[][4] = {
"asx",
"m3u",
@@ -567,6 +584,8 @@ config_t::config_t() {
decoder_mpeg2 = DECODER_MPEG2_auto;
decoder_h264 = DECODER_H264_auto;
+ ff_h264_speed_over_accurancy = FF_H264_SPEED_OVER_ACCURACY_auto;
+ ff_h264_skip_loop_filter = FF_H264_SKIP_LOOPFILTER_auto;
strn0cpy(browse_files_dir, VideoDirectory, sizeof(browse_files_dir));
strn0cpy(browse_music_dir, VideoDirectory, sizeof(browse_music_dir));
@@ -773,6 +792,7 @@ bool config_t::SetupParse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "Video.DeinterlaceOptions")) STRN0CPY(deinterlace_opts, Value);
else if (!strcasecmp(Name, "Video.Deinterlace")) STRN0CPY(deinterlace_method, Value);
else if (!strcasecmp(Name, "Video.FieldOrder")) field_order=atoi(Value)?1:0;
+
else if (!strcasecmp(Name, "Video.AutoCrop")) autocrop = atoi(Value);
else if (!strcasecmp(Name, "Video.AutoCrop.AutoDetect")) autocrop_autodetect = atoi(Value);
else if (!strcasecmp(Name, "Video.AutoCrop.SoftStart")) autocrop_soft = atoi(Value);
@@ -794,12 +814,16 @@ bool config_t::SetupParse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "Video.IBPTrickSpeed")) ibp_trickspeed = atoi(Value);
else if (!strcasecmp(Name, "Video.MaxTrickSpeed")) max_trickspeed = atoi(Value);
else if (!strcasecmp(Name, "Video.AspectRatio")) vo_aspect_ratio = atoi(Value);
+
else if (!strcasecmp(Name, "Video.Decoder.MPEG2")) decoder_mpeg2 = strstra(Value, s_decoders_MPEG2, 0);
else if (!strcasecmp(Name, "Video.Decoder.H264")) decoder_h264 = strstra(Value, s_decoders_H264, 0);
+ else if (!strcasecmp(Name, "Video.Decoder.H264.SpeedOverAccuracy")) ff_h264_speed_over_accurancy = strstra(Value, s_ff_speed_over_accuracy, 0);
+ else if (!strcasecmp(Name, "Video.Decoder.H264.SkipLoopFilter")) ff_h264_skip_loop_filter = strstra(Value, s_ff_skip_loop_filters, 0);
else if (!strcasecmp(Name, "Post.pp.Enable")) ffmpeg_pp = atoi(Value);
else if (!strcasecmp(Name, "Post.pp.Quality")) ffmpeg_pp_quality = atoi(Value);
else if (!strcasecmp(Name, "Post.pp.Mode")) STRN0CPY(ffmpeg_pp_mode, Value);
+
else if (!strcasecmp(Name, "Post.unsharp.Enable")) unsharp = atoi(Value);
else if (!strcasecmp(Name, "Post.unsharp.luma_matrix_width")) unsharp_luma_matrix_width = atoi(Value);
else if (!strcasecmp(Name, "Post.unsharp.luma_matrix_height")) unsharp_luma_matrix_height = atoi(Value);
@@ -807,6 +831,7 @@ bool config_t::SetupParse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "Post.unsharp.chroma_matrix_width")) unsharp_chroma_matrix_width = atoi(Value);
else if (!strcasecmp(Name, "Post.unsharp.chroma_matrix_height")) unsharp_chroma_matrix_height = atoi(Value);
else if (!strcasecmp(Name, "Post.unsharp.chroma_amount")) unsharp_chroma_amount = atoi(Value);
+
else if (!strcasecmp(Name, "Post.denoise3d.Enable")) denoise3d = atoi(Value);
else if (!strcasecmp(Name, "Post.denoise3d.luma")) denoise3d_luma = atoi(Value);
else if (!strcasecmp(Name, "Post.denoise3d.chroma")) denoise3d_chroma = atoi(Value);
@@ -817,10 +842,11 @@ bool config_t::SetupParse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "Media.BrowseImagesDir")) STRN0CPY(browse_images_dir, Value);
else if (!strcasecmp(Name, "Media.CacheImplicitPlaylists")) cache_implicit_playlists = atoi(Value);
else if (!strcasecmp(Name, "Media.EnableID3Scanner")) enable_id3_scanner = atoi(Value);
+ else if (!strcasecmp(Name, "Media.DVD.ArrowKeysControlPlayback")) dvd_arrow_keys_control_playback = atoi(Value);
+
else if (!strcasecmp(Name, "Playlist.Tracknumber")) playlist_tracknumber = atoi(Value);
else if (!strcasecmp(Name, "Playlist.Artist")) playlist_artist = atoi(Value);
else if (!strcasecmp(Name, "Playlist.Album")) playlist_album = atoi(Value);
- else if (!strcasecmp(Name, "Media.DVD.ArrowKeysControlPlayback")) dvd_arrow_keys_control_playback = atoi(Value);
else if (!strcasecmp(Name, "Advanced.LiveModeSync")) live_mode_sync = atoi(Value);
else if (!strcasecmp(Name, "Advanced.AdjustSCR")) scr_tunning = atoi(Value);
diff --git a/config.h b/config.h
index 8b52363f..bfc5b908 100644
--- a/config.h
+++ b/config.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: config.h,v 1.51 2008-07-20 10:54:32 phintuka Exp $
+ * $Id: config.h,v 1.52 2008-07-29 20:57:54 phintuka Exp $
*
*/
@@ -80,6 +80,30 @@
#define X11_DRIVER_NONE 9
#define X11_DRIVER_count 10
+#if 0
+class ConfEntry {
+ const enum target {vdr, xine_lib, xine_fe};
+ const enum type { integer, boolean, enumeration, string };
+ const char *key; /* xineliboutput.xine.$xinekey */
+ const char *xine_key; /* xineliboutput.xine.$xinekey */
+ union {
+ char *strvalue;
+ int intvalue;
+ bool boolvalue;
+ };
+
+ //operator T() { return value; };
+ //operator *T() { return &value; };
+ void Store(void); /* store to Setup. Send to xine, etc. */
+ void Parse(const char *value);
+ bool Parse(const char *key, const char *value) {
+ if(strcasecmp(key, )) return false; Parse(); return true; }
+ //void Set(T value);
+};
+//ConfEntry<int> subtitle_offset;
+//ConfEntry<bool> subtitle_offset;
+#endif
+
#define FB_DRIVER_AUTO 0
#define FB_DRIVER_FB 1
#define FB_DRIVER_DIRECTFB 2
@@ -154,16 +178,29 @@
#define OSD_SCALING_count 3
// Video decoder
-#define DECODER_MPEG2_auto 0
+#define DECODER_MPEG2_auto 0 /* use value from frontend config_xineliboutput */
#define DECODER_MPEG2_LIBMPEG2 1
#define DECODER_MPEG2_FFMPEG 2
#define DECODER_MPEG2_count 3
-#define DECODER_H264_auto 0
+#define DECODER_H264_auto 0 /* use value from frontend config_xineliboutput */
#define DECODER_H264_FFMPEG 1
#define DECODER_H264_COREAVC 2
#define DECODER_H264_count 3
+#define FF_H264_SKIP_LOOPFILTER_auto 0 /* use value from frontend config_xineliboutput */
+#define FF_H264_SKIP_LOOPFILTER_DEFAULT 1
+#define FF_H264_SKIP_LOOPFILTER_NONE 2
+#define FF_H264_SKIP_LOOPFILTER_NONREF 3
+#define FF_H264_SKIP_LOOPFILTER_BIDIR 4
+#define FF_H264_SKIP_LOOPFILTER_NONKEY 5
+#define FF_H264_SKIP_LOOPFILTER_ALL 6
+#define FF_H264_SKIP_LOOPFILTER_count 7
+
+#define FF_H264_SPEED_OVER_ACCURACY_auto 0 /* use value from frontend config_xineliboutput */
+#define FF_H264_SPEED_OVER_ACCURACY_no 1
+#define FF_H264_SPEED_OVER_ACCURACY_yes 2
+#define FF_H264_SPEED_OVER_ACCURACY_count 3
#if VDRVERSNUM >= 10510
# define DEVICE_SUPPORTS_IBP_TRICKSPEED
@@ -213,6 +250,8 @@ class config_t {
static const char * const s_osdScalings [OSD_SCALING_count + 1];
static const char * const s_decoders_MPEG2 [DECODER_MPEG2_count + 1];
static const char * const s_decoders_H264 [DECODER_H264_count + 1];
+ static const char * const s_ff_skip_loop_filters [FF_H264_SKIP_LOOPFILTER_count + 1];
+ static const char * const s_ff_speed_over_accuracy [FF_H264_SPEED_OVER_ACCURACY_count + 1];
static const char * const s_subExts[];
@@ -369,6 +408,8 @@ class config_t {
int decoder_mpeg2; /* DECODER_MPEG2_... */
int decoder_h264; /* DECODER_H264_... */
+ int ff_h264_speed_over_accurancy;
+ int ff_h264_skip_loop_filter; /* FF_H264_SKIP_LOOPFILTER_* */
config_t();