increase brightness gets blurry

This forum is about all development around libVLC.
sanmool
Blank Cone
Blank Cone
Posts: 20
Joined: 02 Apr 2023 12:01

increase brightness gets blurry

Postby sanmool » 16 Jun 2023 07:53

Hi

After installing VLC-Android from google play, I could increase the brightness.
It increases the brightness and color gets clearer as I increase the brightness, it improves picture quality.

However, When I use the code

Code: Select all

libvlc_video_set_adjust_int(vlcPlayer, libvlc_adjust_Enable,1); libvlc_video_set_adjust_float(vlcPlayer, libvlc_adjust_Brightness, 1.5);
The result is,
https://ibb.co/bX8Q2w3 -- before
https://ibb.co/HG4Y9LG -- after

it just makes the image whiter and picture becomes blurry with white color as you can see. It feels like putting a white paper on top of the picture.
It seems changing brightness on VLC-Android does not use above code. How can I get the same effect as VLC-Android did? Thank you for reading.

sanmool
Blank Cone
Blank Cone
Posts: 20
Joined: 02 Apr 2023 12:01

Re: increase brightness gets blurry

Postby sanmool » 17 Jun 2023 08:19

It turns out that that's not about the brightness of video player, it was the brightness of android device. So we could do it using the function

Code: Select all

void changeBrightness(float delta) { // Estimate and adjust Brightness final WindowManager.LayoutParams lp = getWindow().getAttributes(); float brightness = Math.min(Math.max(lp.screenBrightness + delta, 0.01f), 1f); setWindowBrightness(brightness); brightness = Math.round(brightness * 100); showInfoWithVerticalBar(getString(R.string.brightness) + "\n" + (int) brightness + '%', 1000, (int) brightness, 100); }
But it is not about vlc. I will delete this post once I find how to do it.

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: increase brightness gets blurry

Postby unidan » 20 Jun 2023 11:07

You can keep the post here, thanks for sharing this problem!


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 18 guests