blob: cb75eeb42e75a2b3bffd9957425085b2c069e90b [file] [log] [blame]
Dmitry Kovalev5ab63582014-01-17 17:02:37 -08001/*
Yaowu Xu9c01aa12016-09-01 14:32:49 -07002 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
Dmitry Kovalev5ab63582014-01-17 17:02:37 -08003 *
Yaowu Xu9c01aa12016-09-01 14:32:49 -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.
Dmitry Kovalev5ab63582014-01-17 17:02:37 -080010 */
11
12#ifndef Y4MENC_H_
13#define Y4MENC_H_
14
Dmitry Kovalev5ab63582014-01-17 17:02:37 -080015#include "./tools_common.h"
16
Yaowu Xuf883b422016-08-30 14:01:10 -070017#include "aom/aom_decoder.h"
Dmitry Kovalev5ab63582014-01-17 17:02:37 -080018
James Zern25cfd8e2014-01-18 12:16:11 -080019#ifdef __cplusplus
20extern "C" {
21#endif
22
Dmitry Kovalev5260b392014-01-28 11:12:58 -080023#define Y4M_BUFFER_SIZE 128
Dmitry Kovalev5ab63582014-01-17 17:02:37 -080024
Dmitry Kovalev5260b392014-01-28 11:12:58 -080025int y4m_write_file_header(char *buf, size_t len, int width, int height,
Yaowu Xuf883b422016-08-30 14:01:10 -070026 const struct AvxRational *framerate,
27 aom_img_fmt_t fmt, unsigned int bit_depth);
Dmitry Kovalev5260b392014-01-28 11:12:58 -080028int y4m_write_frame_header(char *buf, size_t len);
Dmitry Kovalev5ab63582014-01-17 17:02:37 -080029
James Zern25cfd8e2014-01-18 12:16:11 -080030#ifdef __cplusplus
31} // extern "C"
32#endif
33
Dmitry Kovalev5ab63582014-01-17 17:02:37 -080034#endif // Y4MENC_H_