summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2015-07-02 12:06:04 +0300
committerMarco Nelissen <marcone@google.com>2015-07-31 18:51:09 +0000
commit860f75203e35283c03d6cd75dfddec88db12a51b (patch)
tree0a4f5b96637058c552dcac880f0ed51a7d3ef6e5
parent33134b2617821c5c3b812fb3ed6d9079f68cc6f9 (diff)
downloadandroid_external_libavc-860f75203e35283c03d6cd75dfddec88db12a51b.tar.gz
android_external_libavc-860f75203e35283c03d6cd75dfddec88db12a51b.tar.bz2
android_external_libavc-860f75203e35283c03d6cd75dfddec88db12a51b.zip
Always do recon of 4x4 intra blocks
Even if this 4x4 block isn't at the bottom or right border, the other 4x4 intra blocks within the same macroblock may use it for intra prediction. This fixes intra coded macroblocks in b-frames. Bug: 22860270 Change-Id: Ifdf48c1b2bbf232e785d6d5b8244aacba1ad3dd6
-rw-r--r--encoder/ih264e_core_coding.c34
1 files changed, 13 insertions, 21 deletions
diff --git a/encoder/ih264e_core_coding.c b/encoder/ih264e_core_coding.c
index 76266d7..5b36aef 100644
--- a/encoder/ih264e_core_coding.c
+++ b/encoder/ih264e_core_coding.c
@@ -1823,27 +1823,19 @@ UWORD8 ih264e_code_luma_intra_macroblock_4x4(process_ctxt_t *ps_proc)
/* itransform */
/* iquantization */
/********************************************************/
- /* If the frame is not to be used for P frame reference or dumping recon
- * we only will use the recon for only predicting intra Mbs
- * This will need only right and bottom edge 4x4 blocks recon
- * Hence we selectively enable them
- */
- if (ps_proc->u4_compute_recon || (0xF888 & (1 << ((b8 << 2) + b4))))
- {
- if (u1_nnz)
- ps_codec->pf_iquant_itrans_recon_4x4(
- pi2_res_mb, pu1_pred_mb, pu1_ref_mb,
- /*No input stride,*/i4_pred_strd,
- i4_rec_strd, ps_qp_params->pu2_iscale_mat,
- ps_qp_params->pu2_weigh_mat,
- ps_qp_params->u1_qp_div,
- ps_proc->pv_scratch_buff, 0, 0);
- else
- ps_codec->pf_inter_pred_luma_copy(pu1_pred_mb, pu1_ref_mb,
- i4_pred_strd, i4_rec_strd,
- BLK_SIZE, BLK_SIZE, NULL,
- 0);
- }
+ if (u1_nnz)
+ ps_codec->pf_iquant_itrans_recon_4x4(
+ pi2_res_mb, pu1_pred_mb, pu1_ref_mb,
+ /*No input stride,*/i4_pred_strd,
+ i4_rec_strd, ps_qp_params->pu2_iscale_mat,
+ ps_qp_params->pu2_weigh_mat,
+ ps_qp_params->u1_qp_div,
+ ps_proc->pv_scratch_buff, 0, 0);
+ else
+ ps_codec->pf_inter_pred_luma_copy(pu1_pred_mb, pu1_ref_mb,
+ i4_pred_strd, i4_rec_strd,
+ BLK_SIZE, BLK_SIZE, NULL,
+ 0);
}