About Decode WebM frame

51 views
Skip to first unread message

AA

unread,
Apr 26, 2012, 8:08:55 AM4/26/12
to WebM Discussion
Hi All,

My application running on Android 4.0 and it will be getting WebM
Decoded data from Windows , linux and may be from Mac,

but of different frame size, like 320X240, 640X480 , 1280X960 etc....

due to performance reason, i would like to decode at smaller frame
size i.e. 320X240, i.e. whatever be the bitstream, but let me get the
image / frame of size 320X240,

Is there any way to achieve it, i tried following way,

vpx_codec_dec_cfg_t
cfg;
memset(&cfg,
0x00,sizeof(vpx_codec_dec_cfg_t));

cfg.threads = 1;
cfg.w = 320;
cfg.h = 240;

if ( vpx_codec_dec_init( &webmCodec, &vpx_codec_vp8_dx_algo,
&cfg, 0 ) ) {

handleWebMError(&webmCodec);
}

this doesn't give any error, but


if ( vpx_codec_decode( webmCodec, (const uint8_t*)imgBits,
codedSize, NULL,0)){

handleWebMError(&webmCodec);
}
vpx_codec_iter_t iter = 0;
vpx_image_t *img;

img =
vpx_codec_get_frame( pWebCTX, &iter );
if client is sending video of size 640X480, in the img->d_w is coming
out to be 640 , and img_d_h is coming out to be 480, is there any way
to control them.

BTW if i can get frame of required size, will it improve the
performance ?

Thanks in advance....

Attila Nagy

unread,
Apr 26, 2012, 8:18:38 AM4/26/12
to webm-d...@webmproject.org
Hi,

You always decode at the encoded resolution, no way to avoid that. 
Once decoded you can downscale the video but that will not help if you have performance problems.

-Atti


--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To post to this group, send email to webm-d...@webmproject.org.
To unsubscribe from this group, send email to webm-discuss...@webmproject.org.
For more options, visit this group at http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.


Reply all
Reply to author
Forward
0 new messages