mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
update SetControl()
Origin commit data
------------------
Branch: master
Commit: 6c591461f8
Author: redblue-pkt <redblue-pkt@orange.pl>
Date: 2018-10-04 (Thu, 04 Oct 2018)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -787,7 +787,8 @@ void cVideo::SetDemux(cDemux *)
|
|||||||
lt_debug("#%d %s not implemented yet\n", devnum, __func__);
|
lt_debug("#%d %s not implemented yet\n", devnum, __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cVideo::SetControl(int control, int value) {
|
void cVideo::SetControl(int control, int value)
|
||||||
|
{
|
||||||
const char *p = NULL;
|
const char *p = NULL;
|
||||||
switch (control) {
|
switch (control) {
|
||||||
case VIDEO_CONTROL_BRIGHTNESS:
|
case VIDEO_CONTROL_BRIGHTNESS:
|
||||||
@@ -806,10 +807,47 @@ void cVideo::SetControl(int control, int value) {
|
|||||||
hue = value;
|
hue = value;
|
||||||
p = "/proc/stb/vmpeg/0/pep_hue";
|
p = "/proc/stb/vmpeg/0/pep_hue";
|
||||||
break;
|
break;
|
||||||
|
case VIDEO_CONTROL_SHARPNESS:
|
||||||
|
sharpness = value;
|
||||||
|
p = "/proc/stb/vmpeg/0/pep_sharpness";
|
||||||
|
break;
|
||||||
|
case VIDEO_CONTROL_BLOCK_NOISE_REDUCTION:
|
||||||
|
block_noise_reduction = value;
|
||||||
|
p = "/proc/stb/vmpeg/0/pep_block_noise_reduction";
|
||||||
|
break;
|
||||||
|
case VIDEO_CONTROL_MOSQUITO_NOISE_REDUCTION:
|
||||||
|
mosquito_noise_reduction = value;
|
||||||
|
p = "/proc/stb/vmpeg/0/pep_mosquito_noise_reduction";
|
||||||
|
break;
|
||||||
|
case VIDEO_CONTROL_DIGITAL_CONTOUR_REMOVAL:
|
||||||
|
digital_contour_removal = value;
|
||||||
|
p = "/proc/stb/vmpeg/0/pep_digital_contour_removal";
|
||||||
|
break;
|
||||||
|
case VIDEO_CONTROL_AUTO_FLESH:
|
||||||
|
auto_flesh = value;
|
||||||
|
p = "/proc/stb/vmpeg/0/pep_auto_flesh";
|
||||||
|
break;
|
||||||
|
case VIDEO_CONTROL_GREEN_BOOST:
|
||||||
|
green_boost = value;
|
||||||
|
p = "/proc/stb/vmpeg/0/pep_green_boost";
|
||||||
|
break;
|
||||||
|
case VIDEO_CONTROL_BLUE_BOOST:
|
||||||
|
blue_boost = value;
|
||||||
|
p = "/proc/stb/vmpeg/0/pep_blue_boost";
|
||||||
|
break;
|
||||||
|
case VIDEO_CONTROL_DYNAMIC_CONTRAST:
|
||||||
|
dynamic_contrast = value;
|
||||||
|
p = "/proc/stb/vmpeg/0/pep_dynamic_contrast";
|
||||||
|
break;
|
||||||
|
case VIDEO_CONTROL_SCALER_SHARPNESS:
|
||||||
|
scaler_sharpness = value;
|
||||||
|
p = "/proc/stb/vmpeg/0/pep_scaler_sharpness";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (p) {
|
if (p) {
|
||||||
char buf[20];
|
char buf[20];
|
||||||
int len = snprintf(buf, sizeof(buf), "%x00\n", value);
|
int fix_value = value * 256;
|
||||||
|
int len = snprintf(buf, sizeof(buf), "%0.8X", fix_value);
|
||||||
if (len < (int) sizeof(buf))
|
if (len < (int) sizeof(buf))
|
||||||
proc_put(p, buf, len);
|
proc_put(p, buf, len);
|
||||||
}
|
}
|
||||||
|
@@ -140,6 +140,14 @@ typedef enum
|
|||||||
VIDEO_CONTROL_SATURATION,
|
VIDEO_CONTROL_SATURATION,
|
||||||
VIDEO_CONTROL_HUE,
|
VIDEO_CONTROL_HUE,
|
||||||
VIDEO_CONTROL_SHARPNESS,
|
VIDEO_CONTROL_SHARPNESS,
|
||||||
|
VIDEO_CONTROL_BLOCK_NOISE_REDUCTION,
|
||||||
|
VIDEO_CONTROL_MOSQUITO_NOISE_REDUCTION,
|
||||||
|
VIDEO_CONTROL_DIGITAL_CONTOUR_REMOVAL,
|
||||||
|
VIDEO_CONTROL_AUTO_FLESH,
|
||||||
|
VIDEO_CONTROL_GREEN_BOOST,
|
||||||
|
VIDEO_CONTROL_BLUE_BOOST,
|
||||||
|
VIDEO_CONTROL_DYNAMIC_CONTRAST,
|
||||||
|
VIDEO_CONTROL_SCALER_SHARPNESS,
|
||||||
VIDEO_CONTROL_MAX = VIDEO_CONTROL_SHARPNESS
|
VIDEO_CONTROL_MAX = VIDEO_CONTROL_SHARPNESS
|
||||||
} VIDEO_CONTROL;
|
} VIDEO_CONTROL;
|
||||||
|
|
||||||
@@ -187,6 +195,15 @@ class cVideo
|
|||||||
int contrast;
|
int contrast;
|
||||||
int saturation;
|
int saturation;
|
||||||
int hue;
|
int hue;
|
||||||
|
int sharpness;
|
||||||
|
int block_noise_reduction;
|
||||||
|
int mosquito_noise_reduction;
|
||||||
|
int digital_contour_removal;
|
||||||
|
int auto_flesh;
|
||||||
|
int green_boost;
|
||||||
|
int blue_boost;
|
||||||
|
int dynamic_contrast;
|
||||||
|
int scaler_sharpness;
|
||||||
|
|
||||||
/* used internally by dmx */
|
/* used internally by dmx */
|
||||||
int64_t GetPTS(void);
|
int64_t GetPTS(void);
|
||||||
|
Reference in New Issue
Block a user