Skip to content

Commit

Permalink
Merge pull request xbmc#15047 from samnazarko/fix_aml_contrast
Browse files Browse the repository at this point in the history
AMLCodec: fix contrast setting
  • Loading branch information
MartijnKaijser authored Dec 16, 2018
2 parents 0bbeefd + dba8747 commit 5c2ecda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2206,8 +2206,8 @@ void CAMLCodec::SetVideoZoom(const float zoom)
void CAMLCodec::SetVideoContrast(const int contrast)
{
// input contrast range is 0 to 100 with default of 50.
// output contrast range is -255 to 255 with default of 0.
int aml_contrast = (255 * (contrast - 50)) / 50;
// output contrast range is -127 to 127 with default of 0.
int aml_contrast = (127 * (contrast - 50)) / 50;
SysfsUtils::SetInt("/sys/class/video/contrast", aml_contrast);
}
void CAMLCodec::SetVideoBrightness(const int brightness)
Expand Down

0 comments on commit 5c2ecda

Please sign in to comment.