/* copy 4 bytes from the above right down so that the 4x4 prediction modes using pixels above and
* to the right prediction have filled in pixels to use.
*/
-void vp8_intra_prediction_down_copy(MACROBLOCKD *xd) {
+void vp8_intra_prediction_down_copy(MACROBLOCKD *xd, int extend_edge) {
unsigned char *above_right = *(xd->block[0].base_dst) + xd->block[0].dst -
xd->block[0].dst_stride + 16;
unsigned int *src_ptr = (unsigned int *)
unsigned int *dst_ptr3 =
(unsigned int *)(above_right + 12 * xd->block[0].dst_stride);
+ if (extend_edge) {
+ *src_ptr = ((uint8_t *) src_ptr)[-1] * 0x01010101U;
+ }
+
*dst_ptr0 = *src_ptr;
*dst_ptr1 = *src_ptr;
*dst_ptr2 = *src_ptr;
#ifndef __INC_RECONINTRA4x4_H
#define __INC_RECONINTRA4x4_H
-extern void vp8_intra_prediction_down_copy(MACROBLOCKD *xd);
+extern void vp8_intra_prediction_down_copy(MACROBLOCKD *xd, int extend_edge);
#endif
}
static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
- unsigned int mb_col,
+ int mb_row, unsigned int mb_col,
BOOL_DECODER* const bc) {
int eobtotal = 0;
MB_PREDICTION_MODE mode;
int i;
int tx_size;
TX_TYPE tx_type;
-#if CONFIG_SUPERBLOCKS
VP8_COMMON *pc = &pbi->common;
+#if CONFIG_SUPERBLOCKS
int orig_skip_flag = xd->mode_info_context->mbmi.mb_skip_coeff;
#endif
b->dst_stride);
}
} else if (mode == B_PRED) {
- vp8_intra_prediction_down_copy(xd);
+ vp8_intra_prediction_down_copy(xd, mb_col == pc->mb_cols - 1 &&
+ !(mb_row & 1));
for (i = 0; i < 16; i++) {
BLOCKD *b = &xd->block[i];
int b_mode = xd->mode_info_context->bmi[i].as_mode.first;
mi[pc->mode_info_stride + 1] = mi[0];
}
#endif
- decode_macroblock(pbi, xd, mb_col, bc);
+ decode_macroblock(pbi, xd, mb_row, mb_col, bc);
#if CONFIG_SUPERBLOCKS
if (xd->mode_info_context->mbmi.encoded_as_sb) {
mi[1].mbmi.txfm_size = mi[0].mbmi.txfm_size;
#include "vp8/common/quant_common.h"
#include "segmentation.h"
#include "vp8/common/setupintrarecon.h"
+#include "vp8/common/reconintra4x4.h"
#include "encodeintra.h"
#include "vp8/common/reconinter.h"
#include "vp8/common/invtrans.h"
cpi->update_context = 0; // TODO Do we need this now??
+ vp8_intra_prediction_down_copy(xd, mb_col == cm->mb_cols - 1 &&
+ (mb_row & 1) == 0);
+
// Find best coding mode & reconstruct the MB so it is available
// as a predictor for MBs that follow in the SB
if (cm->frame_type == KEY_FRAME) {
vp8_encode_intra8x8mby(IF_RTCD(&cpi->rtcd), x);
vp8_encode_intra8x8mbuv(IF_RTCD(&cpi->rtcd), x);
} else if (mbmi->mode == B_PRED) {
- vp8_intra_prediction_down_copy(&x->e_mbd);
vp8_encode_intra4x4mby(IF_RTCD(&cpi->rtcd), x);
} else {
vp8_encode_intra16x16mby(IF_RTCD(&cpi->rtcd), x);
if (mbmi->ref_frame == INTRA_FRAME) {
if (mbmi->mode == B_PRED) {
- vp8_intra_prediction_down_copy(xd);
vp8_encode_intra16x16mbuv(IF_RTCD(&cpi->rtcd), x);
vp8_encode_intra4x4mby(IF_RTCD(&cpi->rtcd), x);
} else if (mbmi->mode == I8X8_PRED) {
xd->mode_info_context->mbmi.mode = B_PRED;
bmode_costs = mb->inter_bmode_costs;
- vp8_intra_prediction_down_copy(xd);
-
for (i = 0; i < 16; i++) {
MODE_INFO *const mic = xd->mode_info_context;
const int mis = xd->mode_info_stride;