Resize picture in YV12 format

Hi!

I read frames from TV card (V4L) in YV12 format (764x572) and display over
SDL_Overlay.

How I can resize this image in YV12 format from 764x572 to another size
(800x600)?
Any suggestions, links and documentation?

Best regards.–
Vladimir Davydov

? ??? ?? ??? 12 ??? 2004 07:01 Vladimir Davydov ???(a):

Hi!

I read frames from TV card (V4L) in YV12 format (764x572) and display over
SDL_Overlay.

How I can resize this image in YV12 format from 764x572 to another size
(800x600)?
Any suggestions, links and documentation?

Best regards.
Sorry. No resize but zooming.–
Vladimir Davydov
Software Developer
IQ Media Inc.

Vladimir Davydov wrote:

? ??? ?? ??? 12 ??? 2004 07:01 Vladimir Davydov ???(a):

Hi!

I read frames from TV card (V4L) in YV12 format (764x572) and display over
SDL_Overlay.

How I can resize this image in YV12 format from 764x572 to another size
(800x600)?
Any suggestions, links and documentation?

Best regards.

Sorry. No resize but zooming.
764/572 != 800/600. Do you intend to crop, pad, or change the aspect ratio?–
Michel Bardiaux
Peaktime Belgium S.A. Bd. du Souverain, 191 B-1160 Bruxelles
Tel : +32 2 790.29.41

? ??? ?? ??? 11 ??? 2004 18:07 Michel Bardiaux ???(a):

Vladimir Davydov wrote:

? ??? ?? ??? 12 ??? 2004 07:01 Vladimir Davydov ???(a):

Hi!

I read frames from TV card (V4L) in YV12 format (764x572) and display
over SDL_Overlay.

How I can resize this image in YV12 format from 764x572 to another size
(800x600)?
Any suggestions, links and documentation?

Best regards.

Sorry. No resize but zooming.

764/572 != 800/600. Do you intend to crop, pad, or change the aspect ratio?
I change resolution of image from 764x572 to 640x480 (640/480 == 800/600 ).
How I can zoom from 640x480 to 800x600?–
Vladimir Davydov
Software Developer
IQ Media Inc.

Hello, Vladimir!

??>>> Sorry. No resize but zooming.
??>> 764/572 != 800/600. Do you intend to crop, pad, or change the aspect
??>> ratio?
VD> I change resolution of image from 764x572 to 640x480 (640/480 ==
VD> 800/600 ). How I can zoom from 640x480 to 800x600?

You can just change a viewport of displayed overlay, and it will be resized,
download the SDL sources and compile two tests: testoverlay (try -scale
option, is that what you need ?) and testoverlay2 (resize window size and
see how viewport is changed).

And see the SDL_DisplayYUVOverlay() function description in help, one of the
argument is SDL_Rect which can be setted to any size you want :slight_smile:

With best regards, Mike Gorchak. E-mail: @Mike_Gorchak

Michel Bardiaux wrote:

Sorry. No resize but zooming.
764/572 != 800/600. Do you intend to crop, pad, or change the aspect ratio?

If you are using overlays the resize is automatic (and done in HW is the
overlay is an hardware one).

Just resize the SDLRect you pass to the SDL_DisplayOverlay()

Bye,
Gabry