Multiple-resolution encoder
authorYunqing Wang <yunqingwang@google.com>
Tue, 25 Oct 2011 19:14:16 +0000 (15:14 -0400)
committerYunqing Wang <yunqingwang@google.com>
Mon, 5 Dec 2011 22:59:42 +0000 (17:59 -0500)
commitaa7335e610b961626f77130bc99b24de1031601d
treecfdd17dd049a005e30ec8d515fd6d303e035754c
parent6127af60c1eb4f20b03a4a34eb53704592194bed
Multiple-resolution encoder

The example encoder down-samples the input video frames a number of
times with a down-sampling factor, and then encodes and outputs
bitstreams with different resolutions.

Support arbitrary down-sampling factor, and down-sampling factor
can be different for each encoding level.

For example, the encoder can be tested as follows.
1. Configure with multi-resolution encoding enabled:
../libvpx/configure --target=x86-linux-gcc --disable-codecs
--enable-vp8 --enable-runtime_cpu_detect --enable-debug
--disable-install-docs --enable-error-concealment
--enable-multi-res-encoding
2. Run make
3. Encode:
If input video is 1280x720, run:
./vp8_multi_resolution_encoder 1280 720 input.yuv 1.ivf 2.ivf 3.ivf 1
(output: 1.ivf(1280x720); 2.ivf(640x360); 3.ivf(320x180).
The last parameter is set to 1/0 to show/not show PSNR.)
4. Decode:
./simple_decoder 1.ivf 1.yuv
./simple_decoder 2.ivf 2.yuv
./simple_decoder 3.ivf 3.yuv
5. View video:
mplayer 1.yuv -demuxer rawvideo -rawvideo w=1280:h=720 -loop 0 -fps 30
mplayer 2.yuv -demuxer rawvideo -rawvideo w=640:h=360 -loop 0 -fps 30
mplayer 3.yuv -demuxer rawvideo -rawvideo w=320:h=180 -loop 0 -fps 30

The encoding parameters can be modified in vp8_multi_resolution_encoder.c,
for example, target bitrate, frame rate...

Modified API. John helped a lot with that. Thanks!

Change-Id: I03be9a51167eddf94399f92d269599fb3f3d54f5
31 files changed:
configure
examples.mk
third_party/libyuv/README.webm [new file with mode: 0644]
third_party/libyuv/include/libyuv/basic_types.h [new file with mode: 0644]
third_party/libyuv/include/libyuv/cpu_id.h [new file with mode: 0644]
third_party/libyuv/include/libyuv/scale.h [new file with mode: 0644]
third_party/libyuv/source/cpu_id.c [new file with mode: 0644]
third_party/libyuv/source/row.h [new file with mode: 0644]
third_party/libyuv/source/scale.c [new file with mode: 0644]
usage.dox
usage_cx.dox
vp8/common/blockd.h
vp8/common/onyx.h
vp8/encoder/encodeframe.c
vp8/encoder/mcomp.c
vp8/encoder/mr_dissim.c [new file with mode: 0644]
vp8/encoder/mr_dissim.h [new file with mode: 0644]
vp8/encoder/onyx_if.c
vp8/encoder/onyx_int.h
vp8/encoder/pickinter.c
vp8/encoder/pickinter.h
vp8/encoder/rdopt.c
vp8/encoder/rdopt.h
vp8/vp8_cx_iface.c
vp8/vp8_dx_iface.c
vp8/vp8cx.mk
vp8_multi_resolution_encoder.c [new file with mode: 0644]
vpx/internal/vpx_codec_internal.h
vpx/src/vpx_decoder.c
vpx/src/vpx_encoder.c
vpx/vpx_encoder.h