VP9 frame scaling

1,015 views
Skip to first unread message

ab.ma...@gmail.com

unread,
Oct 29, 2014, 12:14:53 PM10/29/14
to webm-d...@webmproject.org
Hi

So VP9 has the ability to change the frame size while coding the video. My question is how can I control which frame to be scaled? (for example say I want odd frames to be scaled down) Also how exactly should I tell VP9 to scale a particular frames? If it is not possible through configurations I would appriciate it if anyone can point me to the specific part of the code that I can modify to get what I am looking for.

Thank you

Adrian Grange

unread,
Oct 29, 2014, 12:33:34 PM10/29/14
to WebM Discussion
Hi,

Our VP9 encoder, vpxenc, does not support frame resizing.

An example encoder that makes use of the frame scaling feature of VP9 is provided in examples/vp9_spatial_svc_encoder.c and you might also find the unit test test/resize_test.cc a useful source of information on how to handle frame resizing using the API.

Hope this helps,
Adrian


--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webm-discuss...@webmproject.org.
To post to this group, send email to webm-d...@webmproject.org.
Visit this group at http://groups.google.com/a/webmproject.org/group/webm-discuss/.
For more options, visit https://groups.google.com/a/webmproject.org/d/optout.

ab.ma...@gmail.com

unread,
Oct 29, 2014, 3:38:21 PM10/29/14
to webm-d...@webmproject.org
Thank you for your comment Adrian,

 examples/vp9_spatial_svc_encoder.c does not compile even though it is enabled in the configuration.
Also it is not clear to me how to use Scalable video coding to scale some of the frames not all of them. At http://forum.doom9.org/showthread.php?t=168947: I found:

A new and exciting feature of VP9 is reference frame scaling. Each new inter frame can actually be coded using a different resolution than the previous frame. When creating inter predictions, the reference data is scaled up or down accordingly. The scaling filters are 16th pel accurate, 8-tap. This feature is allows for quick and seamless on-the-fly bitrate adjustment, for example during video conferencing. A very elegant solution, much less complicated than SVC for example.

I am really interested in the inter frame resizing while managing the prediction from the refernce frame (possibly a different size). Is this feature anywhere to find in libvpx?

Thank you

Adrian Grange

unread,
Oct 31, 2014, 12:52:49 PM10/31/14
to WebM Discussion
You'll need to add --enable-experimental --enable-spatial-svc to your configure to get examples/vp9_spatial_svc_encoder to compile.

Prediction from different sized reference frames is an integral part of VP9 and as such the mechanism is implemented in libvpx. It is up to the application to decide how to make use of this functionality.

vpxenc allows the user to scale *every* frame in the sequence to the same size by specifying the flags --resize-allowed=1 --resize-width=XXX --resize-height=YYY.

However, vpxenc does not allow variable frame scaling at all. If you look at examples/vp9_spatial_svc_encoder.c that provides an example of how to handle dynamic scaling in the context of a spatial scalable application.

These are only two specific implementations and other use-cases are very possible. Examination of examples/vp9_spatial_svc_encoder.c should help you to understand how to use lkibvpx to achieve your own desired solution.

Is this the information you needed?

Adrian


--

ab.ma...@gmail.com

unread,
Oct 31, 2014, 12:55:05 PM10/31/14
to webm-d...@webmproject.org
yes very helpful information. Thank you for your resoponse.

cely.t...@gmail.com

unread,
Oct 13, 2015, 3:46:03 PM10/13/15
to WebM Discussion
Hi Adrian,\n I tryied created stream file which has frame scaling.but i got eror in build libvpx-1.4.0: \n. ../libvpx-1.4.0/vpx/src/svc_encodeframe.c:421:error: 'VP9E_SET_SVC_PARAMETERS' undeclared , build is proceed on linux. Do I miss any setting? \n Configuration: ../libvpx-1.4.0/configure --enable-experimental --enable-spatial-svc --disanle-vp8 --enable-unit-tests \n Thanks and bét regards,\n Cely

Adrian Grange

unread,
Oct 13, 2015, 6:00:35 PM10/13/15
to WebM Discussion
Hi,

For that release we conditionally removed the SVC code from the default build.

To overcome this you'll have to modify line 62 of  vpx/vpx_encoder.h:

Change from:
#define VPX_ENCODER_ABI_VERSION (4 + VPX_CODEC_ABI_VERSION) /**<\hideinitializer*/

Change to:
#define VPX_ENCODER_ABI_VERSION (5 + VPX_CODEC_ABI_VERSION) /**<\hideinitializer*/

Your configure and build should then work, once you correct the flag to be "--disable-vp8" (a typo in your email).

This should not be a problem with our latest build.

Hope this helps,
Adrian

On Tue, Oct 13, 2015 at 2:56 AM, <cely.t...@gmail.com> wrote:
Hi Adrian,\n  I tryied created stream file which has frame scaling.but i got eror in build libvpx-1.4.0: \n. ../libvpx-1.4.0/vpx/src/svc_encodeframe.c:421:error: 'VP9E_SET_SVC_PARAMETERS' undeclared , build is proceed on linux. Do I miss any setting? \n Configuration: ../libvpx-1.4.0/configure --enable-experimental --enable-spatial-svc --disanle-vp8 --enable-unit-tests \n Thanks and bét regards,\n Cely
Reply all
Reply to author
Forward
0 new messages