diff options
author | John Koleszar <jkoleszar@google.com> | 2012-11-20 17:22:50 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2012-11-20 17:22:50 -0800 |
commit | 414f68d2666ae150f727771180ee8bd2412640f9 (patch) | |
tree | 42ddd291bc1ecde46cb5a927316734e65a9665d8 /vp9/decoder | |
parent | b551d82d9230c626fef700c9e7eeb8b497f248a1 (diff) | |
parent | 64bcffc1ec56da76e4fe631cf31fbc091cc49392 (diff) | |
download | libvpx-414f68d2666ae150f727771180ee8bd2412640f9.tar libvpx-414f68d2666ae150f727771180ee8bd2412640f9.tar.gz libvpx-414f68d2666ae150f727771180ee8bd2412640f9.tar.bz2 libvpx-414f68d2666ae150f727771180ee8bd2412640f9.zip |
Merge "Pack invisible frames without lengths" into experimental
Diffstat (limited to 'vp9/decoder')
-rw-r--r-- | vp9/decoder/decodframe.c | 9 | ||||
-rw-r--r-- | vp9/decoder/onyxd_if.c | 5 | ||||
-rw-r--r-- | vp9/decoder/onyxd_int.h | 2 |
3 files changed, 12 insertions, 4 deletions
diff --git a/vp9/decoder/decodframe.c b/vp9/decoder/decodframe.c index b884bade9..e7d5667f8 100644 --- a/vp9/decoder/decodframe.c +++ b/vp9/decoder/decodframe.c @@ -992,7 +992,7 @@ static void read_coef_probs(VP9D_COMP *pbi, BOOL_DECODER* const bc) { } } -int vp9_decode_frame(VP9D_COMP *pbi) { +int vp9_decode_frame(VP9D_COMP *pbi, const unsigned char **p_data_end) { BOOL_DECODER header_bc, residual_bc; VP9_COMMON *const pc = &pbi->common; MACROBLOCKD *const xd = &pbi->mb; @@ -1456,5 +1456,12 @@ int vp9_decode_frame(VP9D_COMP *pbi) { #endif // printf("Frame %d Done\n", frame_count++); + /* Find the end of the coded buffer */ + while (residual_bc.count > CHAR_BIT + && residual_bc.count < VP9_BD_VALUE_SIZE) { + residual_bc.count -= CHAR_BIT; + residual_bc.user_buffer--; + } + *p_data_end = residual_bc.user_buffer; return 0; } diff --git a/vp9/decoder/onyxd_if.c b/vp9/decoder/onyxd_if.c index 924395dc7..6c20223d3 100644 --- a/vp9/decoder/onyxd_if.c +++ b/vp9/decoder/onyxd_if.c @@ -315,13 +315,14 @@ static int swap_frame_buffers(VP9_COMMON *cm) { } int vp9_receive_compressed_data(VP9D_PTR ptr, unsigned long size, - const unsigned char *source, + const unsigned char **psource, int64_t time_stamp) { #if HAVE_ARMV7 int64_t dx_store_reg[8]; #endif VP9D_COMP *pbi = (VP9D_COMP *) ptr; VP9_COMMON *cm = &pbi->common; + const unsigned char *source = *psource; int retcode = 0; /*if(pbi->ready_for_new_data == 0) @@ -380,7 +381,7 @@ int vp9_receive_compressed_data(VP9D_PTR ptr, unsigned long size, pbi->common.error.setjmp = 1; - retcode = vp9_decode_frame(pbi); + retcode = vp9_decode_frame(pbi, psource); if (retcode < 0) { #if HAVE_ARMV7 diff --git a/vp9/decoder/onyxd_int.h b/vp9/decoder/onyxd_int.h index 2684c0448..cbb13ffe8 100644 --- a/vp9/decoder/onyxd_int.h +++ b/vp9/decoder/onyxd_int.h @@ -83,7 +83,7 @@ typedef struct VP9Decompressor { } VP9D_COMP; -int vp9_decode_frame(VP9D_COMP *cpi); +int vp9_decode_frame(VP9D_COMP *cpi, const unsigned char **p_data_end); #if CONFIG_DEBUG |