diff options
author | Jingning Han <jingning@google.com> | 2013-02-27 17:09:12 -0800 |
---|---|---|
committer | Jingning Han <jingning@google.com> | 2013-03-04 11:08:41 -0800 |
commit | 5957b2b514f12fcb9549f3a97ec82dbab34f1ad7 (patch) | |
tree | b93cc3faab9bf17799ab2c1c2808fc29a2b5e5f3 /vp9/encoder/vp9_bitstream.c | |
parent | 2d3e879fccef330d89f5e5ae6c718cb37d888d2a (diff) | |
download | libvpx-5957b2b514f12fcb9549f3a97ec82dbab34f1ad7.tar libvpx-5957b2b514f12fcb9549f3a97ec82dbab34f1ad7.tar.gz libvpx-5957b2b514f12fcb9549f3a97ec82dbab34f1ad7.tar.bz2 libvpx-5957b2b514f12fcb9549f3a97ec82dbab34f1ad7.zip |
Support 16K sequence coding
Fixed a couple of variable/function definitions, as well as header
handling to support 16K sequence coding at high bit-rates.
The width and height are each specified by two bytes in the header.
Use an extra byte to explicitly indicate the scaling factors in
both directions, each ranging from 0 to 15.
Tested coding up to 16400x16400 dimension.
Change-Id: Ibc2225c6036620270f2c0cf5172d1760aaec10ec
Diffstat (limited to 'vp9/encoder/vp9_bitstream.c')
-rw-r--r-- | vp9/encoder/vp9_bitstream.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c index 7101947a6..d0e97db7b 100644 --- a/vp9/encoder/vp9_bitstream.c +++ b/vp9/encoder/vp9_bitstream.c @@ -1500,17 +1500,20 @@ void vp9_pack_bitstream(VP9_COMP *cpi, unsigned char *dest, { int v; - /* TODO(jkoleszar): support arbitrary resolutions */ - v = (pc->horiz_scale << 14) | pc->Width; + // support arbitrary resolutions + v = pc->Width; cx_data[0] = v; cx_data[1] = v >> 8; - v = (pc->vert_scale << 14) | pc->Height; + v = pc->Height; cx_data[2] = v; cx_data[3] = v >> 8; - extra_bytes_packed += 4; - cx_data += 4; + // use a separate byte to store the scale factors, each ranging 0-15 + cx_data[4] = (pc->horiz_scale << 4) | (pc->vert_scale); + + extra_bytes_packed += 5; + cx_data += 5; } vp9_start_encode(&header_bc, cx_data); |