summaryrefslogtreecommitdiff
path: root/vp8/encoder/encodeframe.c
diff options
context:
space:
mode:
Diffstat (limited to 'vp8/encoder/encodeframe.c')
-rw-r--r--vp8/encoder/encodeframe.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/vp8/encoder/encodeframe.c b/vp8/encoder/encodeframe.c
index c951ac8a6..1606a19ba 100644
--- a/vp8/encoder/encodeframe.c
+++ b/vp8/encoder/encodeframe.c
@@ -1396,6 +1396,7 @@ static void encode_frame_internal(VP8_COMP *cpi) {
vpx_memset(cpi->comp_pred_count, 0, sizeof(cpi->comp_pred_count));
#if CONFIG_TX_SELECT
vpx_memset(cpi->txfm_count, 0, sizeof(cpi->txfm_count));
+ vpx_memset(cpi->txfm_count_8x8p, 0, sizeof(cpi->txfm_count_8x8p));
vpx_memset(cpi->rd_tx_select_diff, 0, sizeof(cpi->rd_tx_select_diff));
#endif
{
@@ -1598,13 +1599,14 @@ void vp8_encode_frame(VP8_COMP *cpi) {
#if CONFIG_TX_SELECT
if (cpi->common.txfm_mode == TX_MODE_SELECT) {
- const int count4x4 = cpi->txfm_count[TX_4X4];
+ const int count4x4 = cpi->txfm_count[TX_4X4] + cpi->txfm_count_8x8p[TX_4X4];
const int count8x8 = cpi->txfm_count[TX_8X8];
+ const int count8x8_8x8p = cpi->txfm_count_8x8p[TX_8X8];
const int count16x16 = cpi->txfm_count[TX_16X16];
if (count4x4 == 0 && count16x16 == 0) {
cpi->common.txfm_mode = ALLOW_8X8;
- } else if (count8x8 == 0 && count16x16 == 0) {
+ } else if (count8x8 == 0 && count16x16 == 0 && count8x8_8x8p == 0) {
cpi->common.txfm_mode = ONLY_4X4;
} else if (count8x8 == 0 && count4x4 == 0) {
cpi->common.txfm_mode = ALLOW_16X16;
@@ -1946,6 +1948,8 @@ void vp8cx_encode_intra_macro_block(VP8_COMP *cpi,
get_segdata(&x->e_mbd, segment_id, SEG_LVL_EOB) == 0))) {
if (mbmi->mode != B_PRED && mbmi->mode != I8X8_PRED) {
cpi->txfm_count[mbmi->txfm_size]++;
+ } else if (mbmi->mode == I8X8_PRED) {
+ cpi->txfm_count_8x8p[mbmi->txfm_size]++;
}
} else
#endif
@@ -2138,6 +2142,8 @@ void vp8cx_encode_inter_macroblock (VP8_COMP *cpi, MACROBLOCK *x,
if (mbmi->mode != B_PRED && mbmi->mode != I8X8_PRED &&
mbmi->mode != SPLITMV) {
cpi->txfm_count[mbmi->txfm_size]++;
+ } else if (mbmi->mode == I8X8_PRED) {
+ cpi->txfm_count_8x8p[mbmi->txfm_size]++;
}
} else
#endif