Skip to content

Commit 81e22ca

Browse files
level param changed to float
1 parent 0299e5d commit 81e22ca

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ public:
487487
int mode{ 0 };
488488
/// Enhancement level for particular filter, as a percentage in range from
489489
/// 0% to 100%.
490-
int level{ 0 };
490+
float level{ 0 };
491491
/// Processing time in microseconds. Read only parameter.
492492
int processingTimeMcSec{ 0 };
493493
/// Type of the filter. Depends on the implementation.
@@ -522,7 +522,7 @@ public:
522522
| Field | type | Description |
523523
| -------------------- | ----- | ------------------------------------------------------ |
524524
| mode | int | Current filter mode, usually 0 - off, 1 - on (typical). Can have another meaning depends on implementation. |
525-
| level | int | Enhancement level for particular filter, as a percentage in range from 0% to 100% (typical). Can have another meaning depends on implementation. The video filter should keep this value in memory. After enable video filter this value should be implemented. |
525+
| level | float | Enhancement level for particular filter, as a percentage in range from 0% to 100% (typical). Can have another meaning depends on implementation. The video filter should keep this value in memory. After enable video filter this value should be implemented. |
526526
| processingTimeMcSec | int | Processing time in microseconds. Read only parameter. Used to control performance of video filter. |
527527
| type | int | Type of the filter. Depends on the implementation. |
528528
| custom1 | float | VFilter custom parameter. Custom parameters used when particular image filter has specific unusual parameter. |
3 Bytes
Binary file not shown.

src/VFilter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class VFilterParams
3636
int mode{ 0 };
3737
/// Enhancement level for particular filter, as a percentage in range from
3838
/// 0% to 100%. May have another meaning depends on implementation.
39-
int level{ 0 };
39+
float level{ 0 };
4040
/// Processing time in microseconds. Read only parameter.
4141
int processingTimeMcSec{ 0 };
4242
/// Type of the filter. Depends on the implementation.

test/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ bool copyParametersTest()
6767
// Prepare random params.
6868
cr::video::VFilterParams params1;
6969
params1.mode = rand() % 255;
70-
params1.level = rand() % 255;
70+
params1.level = (float)(rand() % 255);
7171
params1.processingTimeMcSec = rand() % 255;
7272
params1.type = rand() % 255;
7373
params1.custom1 = static_cast<float>(rand() % 255);
@@ -125,7 +125,7 @@ bool encodeDecodeTestWithoutMask()
125125
// Prepare random params.
126126
cr::video::VFilterParams params1;
127127
params1.mode = rand() % 255;
128-
params1.level = rand() % 255;
128+
params1.level = (float)(rand() % 255);
129129
params1.processingTimeMcSec = rand() % 255;
130130
params1.type = rand() % 255;
131131
params1.custom1 = static_cast<float>(rand() % 255);
@@ -198,7 +198,7 @@ bool encodeDecodeTestWithMask()
198198
{
199199
// Prepare random params.
200200
cr::video::VFilterParams params1;
201-
params1.level = rand() % 255;
201+
params1.level = (float)(rand() % 255);
202202
params1.mode = rand() % 255;
203203
params1.processingTimeMcSec = rand() % 255;
204204
params1.type = rand() % 255;

0 commit comments

Comments
 (0)