diff options
author | Adrian Grange <agrange@google.com> | 2014-06-09 15:22:17 -0700 |
---|---|---|
committer | Adrian Grange <agrange@google.com> | 2014-07-08 16:24:03 -0700 |
commit | 7c43fb67ae5f8cd3ca39756281f63cc9e29bdb55 (patch) | |
tree | 79b0beab6a3f80f85075d5ec47e6e7faeba71369 /vp9/common | |
parent | c0061cc24f254d648737986ce14ac1a4bcb45874 (diff) | |
download | libvpx-7c43fb67ae5f8cd3ca39756281f63cc9e29bdb55.tar libvpx-7c43fb67ae5f8cd3ca39756281f63cc9e29bdb55.tar.gz libvpx-7c43fb67ae5f8cd3ca39756281f63cc9e29bdb55.tar.bz2 libvpx-7c43fb67ae5f8cd3ca39756281f63cc9e29bdb55.zip |
Fix decoder handling of intra-only frames
This patch fixes bug 633:
https://code.google.com/p/webm/issues/detail?id=633
The first decoded frame does not have to be a keyframe,
it could be an inter-frame that is coded intra-only.
This patch fixes the handling of intra-only frames.
A test vector has also been added that encodes 3
intra-only frames at the start of the clip. The
test vector was generated using the code in the
following patch:
https://gerrit.chromium.org/gerrit/#/c/70680/
Change-Id: Ib40b1dbf91aae2bc047e23c626eaef09d1860147
Diffstat (limited to 'vp9/common')
-rw-r--r-- | vp9/common/vp9_onyxc_int.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vp9/common/vp9_onyxc_int.h b/vp9/common/vp9_onyxc_int.h index e1753a11b..afe831a35 100644 --- a/vp9/common/vp9_onyxc_int.h +++ b/vp9/common/vp9_onyxc_int.h @@ -257,10 +257,14 @@ static INLINE void init_macroblockd(VP9_COMMON *cm, MACROBLOCKD *xd) { xd->mi_stride = cm->mi_stride; } +static INLINE int frame_is_intra_only(const VP9_COMMON *const cm) { + return cm->frame_type == KEY_FRAME || cm->intra_only; +} + static INLINE const vp9_prob* get_partition_probs(const VP9_COMMON *cm, int ctx) { - return cm->frame_type == KEY_FRAME ? vp9_kf_partition_probs[ctx] - : cm->fc.partition_prob[ctx]; + return frame_is_intra_only(cm) ? vp9_kf_partition_probs[ctx] + : cm->fc.partition_prob[ctx]; } static INLINE void set_skip_context(MACROBLOCKD *xd, int mi_row, int mi_col) { @@ -299,10 +303,6 @@ static INLINE void set_prev_mi(VP9_COMMON *cm) { cm->prev_mip + cm->mi_stride + 1 : NULL; } -static INLINE int frame_is_intra_only(const VP9_COMMON *const cm) { - return cm->frame_type == KEY_FRAME || cm->intra_only; -} - static INLINE void update_partition_context(MACROBLOCKD *xd, int mi_row, int mi_col, BLOCK_SIZE subsize, |