From a5af392aaec8f91d62ab68812f090697b06cce33 Mon Sep 17 00:00:00 2001 From: hui su Date: Wed, 15 Jun 2016 11:39:41 -0700 Subject: 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 --- vp9/encoder/vp9_rdopt.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'vp9/encoder/vp9_rdopt.c') 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; -- cgit v1.2.3