diff options
author | hui su <huisu@google.com> | 2016-06-15 11:39:41 -0700 |
---|---|---|
committer | hui su <huisu@google.com> | 2016-06-21 10:33:57 -0700 |
commit | a5af392aaec8f91d62ab68812f090697b06cce33 (patch) | |
tree | 3936f70311d494f6a7c92f7f51546469ea042c3d /vp9/encoder/vp9_rdopt.c | |
parent | b4aa5c9408595e6d618a6bd2718435ee40eeffb7 (diff) | |
download | libvpx-a5af392aaec8f91d62ab68812f090697b06cce33.tar libvpx-a5af392aaec8f91d62ab68812f090697b06cce33.tar.gz libvpx-a5af392aaec8f91d62ab68812f090697b06cce33.tar.bz2 libvpx-a5af392aaec8f91d62ab68812f090697b06cce33.zip |
Add a hardware compatibility feature
This commit adds an encoder workaround to support better
compatibility with a non-compliant hardware vp9 profile 2 decoder.
The known issue with this decoder is:
The decoder assumes a wrong value, 127 instead of the correct
value of 511 and 2047, for any assumed top-left corner pixel in
UV planes for 10 and 12 bit, respectively. Such assumed
top-left corner pixel is used for INTRA prediction when a real
decoded/reconstructed pixel is not avalable, e.g. when it is
located inside the row above the top row or inside the column
left to the leftest column of a video image.
Change-Id: Ic15a938a3107e1b85e96cb7903a5c4220986b99d
Diffstat (limited to 'vp9/encoder/vp9_rdopt.c')
-rw-r--r-- | vp9/encoder/vp9_rdopt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index a30418286..f15fc31fd 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -1214,6 +1214,11 @@ static int64_t rd_pick_intra_sbuv_mode(VP9_COMP *cpi, MACROBLOCK *x, for (mode = DC_PRED; mode <= TM_PRED; ++mode) { if (!(cpi->sf.intra_uv_mode_mask[max_tx_size] & (1 << mode))) continue; +#if CONFIG_BETTER_HW_COMPATIBILITY && CONFIG_VP9_HIGHBITDEPTH + if ((xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) && + (xd->above_mi == NULL || xd->left_mi == NULL) && need_top_left[mode]) + continue; +#endif // CONFIG_BETTER_HW_COMPATIBILITY && CONFIG_VP9_HIGHBITDEPTH xd->mi[0]->uv_mode = mode; |