Skip to content

Commit 7933527

Browse files
committed
Removing old commented out code
1 parent 65d9134 commit 7933527

File tree

4 files changed

+6
-27
lines changed

4 files changed

+6
-27
lines changed

doc/HW-ACCEL.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,19 @@ This information might be wrong, and we would love to continue improving
7474
our support for hardware acceleration in OpenShot. Please help us update
7575
this document if you find an error or discover some new information.
7676

77-
**Desperately Needed:** a way to compile ffmpeg 4.0 and up with working nVidia
77+
**Desperately Needed:** A way to compile ffmpeg 4.0 and up with working nVidia
7878
hardware acceleration support on Ubuntu Linux!
7979

80-
**BUG:** hardware supported decoding still has a bug. The speed gains with
80+
**BUG:** Hardware supported decoding still has a bug. The speed gains with
8181
decoding are by far not as great as with encoding. In case hardware accelerated
82-
decoding does not work disable it.
83-
Hardware acceleration might also break because of graphics drivers that have
84-
bugs.
82+
decoding does not work disable it. Hardware acceleration might also break
83+
because of graphics drivers that have bugs.
8584

86-
**Needed:** a way to get the options and limits of the GPU, like
85+
**Needed:** A way to get the options and limits of the GPU, like
8786
supported codecs and the supported dimensions (width and height).
8887

8988
**Further improvement:** Right now the frame can be decoded on the GPU but the
90-
frame is then copied to CPU memory. Before encoding the frame the frame is then
89+
frame is then copied to CPU memory. Before encoding the frame is then
9190
copied to GPU memory for encoding. That is necessary because the modifications
9291
are done by the CPU. Using the GPU for that too will make it possible to do
9392
away with these two copies. A possible solution would be to use Vulkan compute

include/Settings.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,9 @@ namespace openshot {
7676
static Settings * m_pInstance;
7777

7878
public:
79-
/// Use video card for faster video decoding (if supported)
80-
// REMOVE_HW_OLD
81-
//bool HARDWARE_DECODE = false;
82-
8379
/// Use video codec for faster video decoding (if supported)
8480
int HARDWARE_DECODER = 0;
8581

86-
/// Use video card for faster video encoding (if supported)
87-
// REMOVE_HW_OLD
88-
//bool HARDWARE_ENCODE = false;
89-
9082
/// Scale mode used in FFmpeg decoding and encoding (used as an optimization for faster previews)
9183
bool HIGH_QUALITY_SCALING = false;
9284

src/Settings.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@ Settings *Settings::Instance()
4040
if (!m_pInstance) {
4141
// Create the actual instance of logger only once
4242
m_pInstance = new Settings;
43-
// REMOVE_HW_OLD
44-
//m_pInstance->HARDWARE_DECODE = false;
4543
m_pInstance->HARDWARE_DECODER = 0;
46-
// REMOVE_HW_OLD
47-
//m_pInstance->HARDWARE_ENCODE = false;
4844
m_pInstance->HIGH_QUALITY_SCALING = false;
4945
m_pInstance->MAX_WIDTH = 0;
5046
m_pInstance->MAX_HEIGHT = 0;

tests/Settings_Tests.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ TEST(Settings_Default_Constructor)
3737
Settings *s = Settings::Instance();
3838

3939
CHECK_EQUAL(0, s->HARDWARE_DECODER);
40-
// REMOVE_HW_OLD
41-
//CHECK_EQUAL(false, s->HARDWARE_ENCODE);
4240
CHECK_EQUAL(false, s->HIGH_QUALITY_SCALING);
4341
CHECK_EQUAL(false, s->WAIT_FOR_VIDEO_PROCESSING_TASK);
4442
}
@@ -48,20 +46,14 @@ TEST(Settings_Change_Settings)
4846
// Create an empty color
4947
Settings *s = Settings::Instance();
5048
s->HARDWARE_DECODER = 1;
51-
// REMOVE_HW_OLD
52-
//s->HARDWARE_ENCODE = true;
5349
s->HIGH_QUALITY_SCALING = true;
5450
s->WAIT_FOR_VIDEO_PROCESSING_TASK = true;
5551

5652
CHECK_EQUAL(1, s->HARDWARE_DECODER);
57-
// REMOVE_HW_OLD
58-
//CHECK_EQUAL(true, s->HARDWARE_ENCODE);
5953
CHECK_EQUAL(true, s->HIGH_QUALITY_SCALING);
6054
CHECK_EQUAL(true, s->WAIT_FOR_VIDEO_PROCESSING_TASK);
6155

6256
CHECK_EQUAL(1, s->HARDWARE_DECODER);
63-
// REMOVE_HW_OLD
64-
//CHECK_EQUAL(true, s->HARDWARE_ENCODE);
6557
CHECK_EQUAL(true, Settings::Instance()->HIGH_QUALITY_SCALING);
6658
CHECK_EQUAL(true, Settings::Instance()->WAIT_FOR_VIDEO_PROCESSING_TASK);
6759
}

0 commit comments

Comments
 (0)