blob: a9bb97af26e9935e88be69aa4f74838f51171fd0 [file] [log] [blame]
Jingning Han3ee6db62015-08-05 19:00:31 -07001/*
Adrian Grangeee9843d2016-03-24 12:08:51 -07002 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
Jingning Han3ee6db62015-08-05 19:00:31 -07003 *
Adrian Grangeee9843d2016-03-24 12:08:51 -07004 * This source code is subject to the terms of the BSD 2 Clause License and
5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6 * was not distributed with this source code in the LICENSE file, you can
7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8 * Media Patent License 1.0 was not distributed with this source code in the
9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
Jingning Han3ee6db62015-08-05 19:00:31 -070010 */
11
Yaowu Xu01dee0b2016-03-25 12:43:01 -070012#ifndef AV1_ENCODER_BITSTREAM_H_
13#define AV1_ENCODER_BITSTREAM_H_
Jingning Han3ee6db62015-08-05 19:00:31 -070014
15#ifdef __cplusplus
16extern "C" {
17#endif
18
Yaowu Xucfea7dd2016-03-22 09:52:13 -070019#include "av1/encoder/encoder.h"
Jingning Han3ee6db62015-08-05 19:00:31 -070020
Yaowu Xu01dee0b2016-03-25 12:43:01 -070021void av1_encode_token_init();
22void av1_pack_bitstream(AV1_COMP *const cpi, uint8_t *dest, size_t *size);
Jingning Han3ee6db62015-08-05 19:00:31 -070023
Yaowu Xu01dee0b2016-03-25 12:43:01 -070024static INLINE int av1_preserve_existing_gf(AV1_COMP *cpi) {
Jingning Han3ee6db62015-08-05 19:00:31 -070025 return !cpi->multi_arf_allowed && cpi->refresh_golden_frame &&
Yunqing Wangc147c4d2015-08-27 15:11:38 -070026 cpi->rc.is_src_frame_alt_ref;
Jingning Han3ee6db62015-08-05 19:00:31 -070027}
28
29#ifdef __cplusplus
30} // extern "C"
31#endif
32
Yaowu Xu01dee0b2016-03-25 12:43:01 -070033#endif // AV1_ENCODER_BITSTREAM_H_