Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaling is not done when no (other) postprocessing filters are running #95

Closed
mighty-p opened this issue Mar 11, 2018 · 7 comments
Closed

Comments

@mighty-p
Copy link

With current GIT state, vaapidevice does not scale the video to the needed size (of window or fullscreen) in a case when no postprocessing filters are running.

I am not sure where exactly the scaling should happen in video.c. With current state, it seems to happen only within the function VaapiApplyFilters(). In that function, there are two checks

if (!decoder->filter_n)
return NULL;
[...]
if (!filter_count)
return NULL; /* no postprocessing if no filters applied */

If at any of these, the condition is true, we return from the function. As a result, then the picture is shown in an unscaled way. Which means we only see the upper left extract.

vaapidevice-no-scaling-windowed

When in fullscreen and the screensize is larger than the video (like for me in 720p videos), then the video does not use the full screen anymore and there are strange artifacts around it.

vaapidevice-no-scaling-fullscreen

Please note that I believe that the code in VaapiApplyFilters() is likely correct. I believe somewhere else there is code missing or wrong that causes the scaling not to happen in any case.

I believe #86 and maybe also #89 are potentially consequences of this issue here.

@9000h
Copy link
Contributor

9000h commented Mar 11, 2018

confirmed and you could see on the left the Osd and Video are not the same width
screenshot from 2018-03-11 15-10-56

@9000h
Copy link
Contributor

9000h commented Mar 11, 2018

is that releated intel/intel-vaapi-driver@354a6d5

@mighty-p
Copy link
Author

I am not sure. I have not changed vaapi drivers, but this problem did not exist in earlier vaapidevice (softhddevice) versions.

pesintta added a commit that referenced this issue Mar 11, 2018
This allows scaling to be performed even if/when no other filters are specified.

Most likely has an effect on issues #95 and #86
@pesintta
Copy link
Owner

I pushed a commit that will have an effect on this issue. Could you test if this one got resolved?

@9000h
Copy link
Contributor

9000h commented Mar 11, 2018

I do see the effect also with the old softhddevice with vaapi, vdpau is probably different
the video is 720p my screen is 1920x1080

xwininfo: Window id: 0x2600003 "vaapidevice"

  Absolute upper-left X:  298
  Absolute upper-left Y:  144
  Relative upper-left X:  10
  Relative upper-left Y:  38
  Width: 1389
  Height: 759
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x2600002 (not installed)
  Bit Gravity State: ForgetGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +298+144  -233+144  -233-177  +298-177
  -geometry 1389x759+288+106

screenshot from 2018-03-11 15-55-20

svdrpsend
220 <filter> SVDRP VideoDiskRecorder 2.3.8; Sun Mar 11 16:02:37 2018; UTF-8
900- Frames: missed(0) duped(54) dropped(2965) total(307) PTS(20:37:04.001) drift(97) audio(435) video(0)
900- Video: h264/vaapi_vld 1280x720p 16:9 @ 1389x759 - Intel i965 driver for Intel(R) Broxton - 2.0.0
900  Audio: mp2 48000Hz 2 channels
221 <filter> closing connection

@mighty-p
Copy link
Author

I tested again, and for me pesintta's commit fixes the problem. Thanks a lot!

@9000h I believe the problem you are referring to is a bit different from the one I filed here. For you, the problem seems to be just about a few pixels, if I interpret your screenshots correctly. The problem I described was about scaling not happening at all under some circumstances.

@pesintta
Copy link
Owner

As the completely missing scaling got resolved I'm closing this issue.
Please open new issues in case there is something else wrong with picture scaling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants