Advertisement
Guest User

SmplayerFHD

a guest
May 31st, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.90 KB | None | 0 0
  1. diff -aur smplayer-0.8.5/src/core.cpp smplayer-0.8.5.new/src/core.cpp
  2. --- smplayer-0.8.5/src/core.cpp 2013-04-30 03:09:47.000000000 +0200
  3. +++ smplayer-0.8.5.new/src/core.cpp 2013-05-31 17:49:23.068625523 +0200
  4. @@ -1524,6 +1524,14 @@
  5. lavdopts += "skiploopfilter=all";
  6. }
  7.  
  8. + if ( (pref->h264_skip_loop_filter == Preferences::LoopDisabled) ||
  9. + ((pref->h264_skip_loop_filter == Preferences::LoopDisabledOnHD) &&
  10. + (mset.is264andFHD)) )
  11. + {
  12. + if (!lavdopts.isEmpty()) lavdopts += ":";
  13. + lavdopts += "skiploopfilter=all:skipframe=nonref";
  14. + }
  15. +
  16. if (pref->threads > 1) {
  17. if (!lavdopts.isEmpty()) lavdopts += ":";
  18. lavdopts += "threads=" + QString::number(pref->threads);
  19. @@ -4112,13 +4120,22 @@
  20. qDebug("Core::checkIfVideoIsHD");
  21.  
  22. // Check if the video is in HD and uses ffh264 codec.
  23. - if ((mdat.video_codec=="ffh264") && (mset.win_height >= pref->HD_height)) {
  24. - qDebug("Core::checkIfVideoIsHD: video == ffh264 and height >= %d", pref->HD_height);
  25. + if ((mdat.video_codec=="ffh264") && (mset.win_height == pref->HD_height)) {
  26. + qDebug("Core::checkIfVideoIsHD: video == ffh264 and height == %d", pref->HD_height);
  27. if (!mset.is264andHD) {
  28. mset.is264andHD = true;
  29. if (pref->h264_skip_loop_filter == Preferences::LoopDisabledOnHD) {
  30. qDebug("Core::checkIfVideoIsHD: we're about to restart the video");
  31. restartPlay();
  32. + }
  33. + }
  34. + } else if ((mdat.video_codec=="ffh264") && (mset.win_height >= pref->FHD_height)) {
  35. + qDebug("Core::checkIfVideoIsHD: video == ffh264 and height >= %d", pref->FHD_height);
  36. + if (!mset.is264andFHD) {
  37. + mset.is264andFHD = true;
  38. + if (pref->h264_skip_loop_filter == Preferences::LoopDisabledOnHD) {
  39. + qDebug("Core::checkIfVideoIsHD: we're about to restart the video");
  40. + restartPlay();
  41. }
  42. }
  43. } else {
  44. diff -aur smplayer-0.8.5/src/mediasettings.cpp smplayer-0.8.5.new/src/mediasettings.cpp
  45. --- smplayer-0.8.5/src/mediasettings.cpp 2013-02-16 22:49:17.000000000 +0100
  46. +++ smplayer-0.8.5.new/src/mediasettings.cpp 2013-05-31 17:54:17.999938374 +0200
  47. @@ -108,6 +108,7 @@
  48. B_marker = -1;
  49.  
  50. is264andHD = false;
  51. + is264andFHD = false;
  52.  
  53. forced_demuxer="";
  54. forced_video_codec="";
  55. @@ -262,6 +263,7 @@
  56.  
  57. qDebug(" starting_time: %f", starting_time);
  58. qDebug(" is264andHD: %d", is264andHD);
  59. + qDebug(" is264andFHD: %d", is264andFHD);
  60. }
  61.  
  62. #ifndef NO_USE_INI_FILES
  63. @@ -361,6 +363,7 @@
  64. set->setValue( "starting_time", starting_time );
  65.  
  66. set->setValue( "is264andHD", is264andHD );
  67. + set->setValue( "is264andFHD", is264andFHD );
  68.  
  69. /*set->endGroup();*/
  70. }
  71. @@ -461,6 +464,7 @@
  72. starting_time = set->value( "starting_time", starting_time ).toDouble();
  73.  
  74. is264andHD = set->value( "is264andHD", is264andHD ).toBool();
  75. + is264andFHD = set->value( "is264andFHD", is264andFHD ).toBool();
  76.  
  77. /*set->endGroup();*/
  78.  
  79. diff -aur smplayer-0.8.5/src/mediasettings.h smplayer-0.8.5.new/src/mediasettings.h
  80. --- smplayer-0.8.5/src/mediasettings.h 2013-04-21 00:59:33.000000000 +0200
  81. +++ smplayer-0.8.5.new/src/mediasettings.h 2013-05-31 17:56:33.665242325 +0200
  82. @@ -141,6 +141,7 @@
  83.  
  84. //! The codec of the video is ffh264 and it's high definition
  85. bool is264andHD;
  86. + bool is264andFHD;
  87.  
  88. // Advanced settings
  89. QString forced_demuxer;
  90. diff -aur smplayer-0.8.5/src/preferences.cpp smplayer-0.8.5.new/src/preferences.cpp
  91. --- smplayer-0.8.5/src/preferences.cpp 2013-05-02 01:15:42.000000000 +0200
  92. +++ smplayer-0.8.5.new/src/preferences.cpp 2013-05-31 17:58:07.486069403 +0200
  93. @@ -179,6 +179,7 @@
  94. coreavc = false;
  95. h264_skip_loop_filter = LoopEnabled;
  96. HD_height = 720;
  97. + FHD_height= 1080;
  98.  
  99. // MPlayer 1.0rc1 require restart, new versions don't
  100. fast_audio_change = Detect;
  101. @@ -620,6 +621,7 @@
  102. set->setValue("coreavc", coreavc);
  103. set->setValue("h264_skip_loop_filter", h264_skip_loop_filter);
  104. set->setValue("HD_height", HD_height);
  105. + set->setValue("FHD_height", FHD_height);
  106.  
  107. set->setValue("fast_audio_change", fast_audio_change);
  108. #if !SMART_DVD_CHAPTERS
  109. @@ -1079,6 +1081,7 @@
  110. coreavc = set->value("coreavc", coreavc).toBool();
  111. h264_skip_loop_filter = (H264LoopFilter) set->value("h264_skip_loop_filter", h264_skip_loop_filter).toInt();
  112. HD_height = set->value("HD_height", HD_height).toInt();
  113. + HD_height = set->value("FHD_height", FHD_height).toInt();
  114.  
  115. fast_audio_change = (OptionState) set->value("fast_audio_change", fast_audio_change).toInt();
  116. #if !SMART_DVD_CHAPTERS
  117. diff -aur smplayer-0.8.5/src/preferences.h smplayer-0.8.5.new/src/preferences.h
  118. --- smplayer-0.8.5/src/preferences.h 2013-03-11 23:44:00.000000000 +0100
  119. +++ smplayer-0.8.5.new/src/preferences.h 2013-05-31 17:59:09.648292268 +0200
  120. @@ -163,6 +163,7 @@
  121. bool hard_frame_drop;
  122. bool coreavc;
  123. H264LoopFilter h264_skip_loop_filter;
  124. + int FHD_height;
  125. int HD_height; //!< An HD is a video which height is equal or greater than this.
  126.  
  127. OptionState fast_audio_change; // If activated, not restart mplayer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement