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