2010-05-18 17:58:33 +02:00
|
|
|
/*
|
2010-09-09 14:16:39 +02:00
|
|
|
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
|
2010-05-18 17:58:33 +02:00
|
|
|
*
|
2010-06-18 18:39:21 +02:00
|
|
|
* Use of this source code is governed by a BSD-style license
|
2010-06-04 22:19:40 +02:00
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
2010-06-18 18:39:21 +02:00
|
|
|
* in the file PATENTS. All contributing project authors may
|
2010-06-04 22:19:40 +02:00
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
2010-05-18 17:58:33 +02:00
|
|
|
*/
|
|
|
|
|
2012-12-23 16:20:10 +01:00
|
|
|
#include "./vpx_config.h"
|
2013-10-04 23:35:01 +02:00
|
|
|
#include "./vp9_rtcd.h"
|
2012-11-28 19:41:40 +01:00
|
|
|
#include "vp9/encoder/vp9_quantize.h"
|
2012-11-27 22:59:17 +01:00
|
|
|
#include "vp9/common/vp9_reconintra.h"
|
2012-11-28 19:41:40 +01:00
|
|
|
#include "vp9/encoder/vp9_encodemb.h"
|
|
|
|
#include "vp9/encoder/vp9_encodeintra.h"
|
2010-05-18 17:58:33 +02:00
|
|
|
|
2013-08-16 21:51:20 +02:00
|
|
|
int vp9_encode_intra(MACROBLOCK *x, int use_16x16_pred) {
|
2013-09-11 19:45:44 +02:00
|
|
|
MB_MODE_INFO * mbmi = &x->e_mbd.mi_8x8[0]->mbmi;
|
2013-07-09 01:48:47 +02:00
|
|
|
x->skip_encode = 0;
|
2013-05-31 02:08:14 +02:00
|
|
|
mbmi->mode = DC_PRED;
|
2013-06-06 22:44:34 +02:00
|
|
|
mbmi->ref_frame[0] = INTRA_FRAME;
|
2013-08-28 04:47:53 +02:00
|
|
|
mbmi->tx_size = use_16x16_pred ? (mbmi->sb_type >= BLOCK_16X16 ? TX_16X16
|
|
|
|
: TX_8X8)
|
2013-08-16 21:51:20 +02:00
|
|
|
: TX_4X4;
|
|
|
|
vp9_encode_intra_block_y(x, mbmi->sb_type);
|
2013-04-23 17:26:10 +02:00
|
|
|
return vp9_get_mb_ss(x->plane[0].src_diff);
|
2011-06-14 12:39:06 +02:00
|
|
|
}
|