2009-04-24 04:51:04     Scale Video Image X2...

Document created by Aaronwu Employee on Aug 15, 2013
Version 1Show Document
  • View in full screen mode

2009-04-24 04:51:04     Scale Video Image X2...

Samuel Ayet (SPAIN)

Message: 73153   

 

Hi all,

 

I'm developing a video over IP system where the output is a composite video signal from the ADV7393 card connected to a BF537 STAMP board. As video over IP program, I use the linphone. The scenario of my 'test system' is: in one side I have a laptop with a webcam and running linphone 3.1.1 on WIndows Vista (here I can set the resolution wich I want to stream to the other side), and then in the other side the STAMP-BF537 with the ADV7393 conected to an a screen wich has a input of Composite VIdeo Signal. Then, I call from the STAMP to the laptop and I can see the video but not in full screen.

 

The problem I'm having is that the ADV7393 lowest resolution is 640x480 and the linphone only can recieve video in 320x240 resolution, so I can see the video in a quarter of the display. My question is if I can scale the video recived from the other side at 320x240 to 640x480 to have a full screen video.

 

 

 

First thing I've tried is to transmit video from the laptop at 640x480 to have full screen video (because is the lowest resolution of the ADV7393) but I get the next error from the Linphone (exactly from the oRTP), this is the trace:

 

 

 

root:/> modprobe bfin_adv7393fb mode=3 mem=1

i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller Driver, Version 1.8, regs_base@ffc01400

 

bfin_adv7393_fb: initializing: PAL 640x480

adv7393.c: starting probe for adapter i2c-bfin-twi(0x190001)

adv7393.c: detecting adv7393 client on address 0x56

fb0: BFIN ADV7393 frame buffer device

fb memory address : 0x03e87000

root:/> export SDL_NOMOUSE=1

root:/> tftp -g -r .linphonerc 192.168.0.101

root:/> linphonec -D

NLS disabled.

Ready

linphonec> Registration on sip:192.168.0.101 successful.

linphonec> call laptop

Contacting sip:laptop@192.168.0.101

linphonec> linphonec> Connected.

linphonec> ortp-error-Unsupported image size.

ortp-error-Unsupported image size.

ortp-error-Unsupported image size.

ortp-error-Unsupported image size.

ortp-error-Unsupported image size.

ortp-error-Unsupported image size.

ortp-error-Unsupported image size.

ortp-error-Unsupported image size.

ortp-error-Unsupported image size.

ortp-error-Unsupported image size.

ortp-error-Unsupported image size.

ortp-error-Unsupported image size.

ortp-error-Unsupported image size.

...

 

 

 

So another time, the question is, can I resize the video recived at 320x240 in the linphone to 640x480 to have full screen video image in a composite video signal with the ADV7393? I don't know if where exactly could be a SCALE_IMAGE_X2 or something like this in the code...if you have any ideas...

 

 

 

Thank You!!

 

Samuel

 

 

 

 

 

 

 

 

 

QuoteReplyEditDelete

 

 

2009-04-25 00:12:44     Re: Scale Video Image X2...

Mike Frysinger (UNITED STATES)

Message: 73184   

 

linphone defaults to cif, so try changing it to vga.  probably do this by the size option of the video section in the linphone rc file.

 

[video]

size=vga

QuoteReplyEditDelete

 

 

2009-04-27 07:57:10     Re: Scale Video Image X2...

Samuel Ayet (SPAIN)

Message: 73282   

 

I have done it, but it doesn't seems to do nothing. What I have done to achieve this is go to the mediastreamer2 source and here you can set the Heigth and Width of the video that you want to display.

 

What I have changed is:

 

In file uClinux-dist-2008R1.5-RC3/user/blkfin-apps/linphone/linphone-2.0.1/mediastreamer2/src/videoout.c

 

In sdl_create_window:

 

sdl_screen = SDL_SetVideoMode(w,h, 0,SDL_SWSURFACE);

 

for this other:

 

sdl_screen = SDL_SetVideoMode(MS_VIDEO_SIZE_VGA_W,MS_VIDEO_SIZE_VGA_H, 0,SDL_SWSURFACE);

 

Tiis just create a window of 2 times the resolution of the video recived, in this case QVGA scaled x2 = VGA. (Be careful: It is supposed you are reciving video at 320x240 like me)

 

And the most important change the output resolution video (this is what scales de video x2 as you can read here   sdl.beuc.net/sdl.wiki/SDL_DisplayYUVOverlay). In function sdl_display_update, change:

 

    rect.w=lay->w;

    rect.h=lay->h;

 

for this lines:

 

 

    rect.w=MS_VIDEO_SIZE_VGA_W;

    rect.h=MS_VIDEO_SIZE_VGA_H;

 

It just change the resolution of the output video to VGA mode.

 

That's working in a 640x480 display resolution only using the bandwidth of the video transmited at 320x240. Thank you! =)

Attachments

    Outcomes