[MPlayer-dev-eng] [patch][rfc] screenshot. Aspect Ratio problems
Jindrich Makovicka
makovick at kmlinux.fjfi.cvut.cz
Fri Aug 26 13:05:37 CEST 2005
Jan Knutar wrote:
> On Friday 26 August 2005 08:22, ObsessiveMathsFreak wrote:
>
>
>>really like taking screenshots. A lot of distros now include some kind
>>of screen capture function as well, which is more or less a poor mans
>>WYSIWYG.
>
>
> To clarify in case it was lost in all the yelling...
>
> With the most advanced video out options available, such as mga_vid and
> Xvideo, you give the graphics board the pixels in YV12 colourspace (which
> is not the RGB that PNG files need), in the original, unscaled size.
>
> The graphics board then replaces a part of the screen with the video, scaled
> apropriately and converted to the RGB signal the monitor wants.
>
> There is no way for the computer to retrieve the image on the monitor, there exists
> no electrical pathways on the graphics board to route back the signal, and there
> exists no ADC on the graphics board to digitize the signal.
>
> I'm not sure it's even possible to read back the unscaled YV12 image you
> give the graphics board :)
>
> So unless there's some filter sitting in between the decoder and the video output,
> once a frame is decoded and pushed the the graphics board, it's "lost". As png
> requires RGB, you have first scale filter converting from YV12 to RGB, screenshot
> filter, then scale to do RGB->YV12 again. What a CPU waste, and you don't even
> get WYSIWYG despite throwing all that CPU at it! :)
It shouldn't be so hard using swscaler to convert the image to a
temporary buffer directly in vf_screenshot. It will be certainly easier
than rewriting vf.c, although not so mind-challenging :)
--
Jindrich Makovicka
More information about the MPlayer-dev-eng
mailing list