2 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
4 * 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.
11 * Based on code from the OggTheora software codec source code,
12 * Copyright (C) 2002-2010 The Xiph.Org Foundation and contributors.
19 #include "aom/aom_image.h"
25 typedef struct y4m_input y4m_input
;
27 /*The function used to perform chroma conversion.*/
28 typedef void (*y4m_convert_func
)(y4m_input
*_y4m
, unsigned char *_dst
,
44 /*The size of each converted frame buffer.*/
46 /*The amount to read directly into the converted frame buffer.*/
47 size_t dst_buf_read_sz
;
48 /*The size of the auxilliary buffer.*/
50 /*The amount to read into the auxilliary buffer.*/
51 size_t aux_buf_read_sz
;
52 y4m_convert_func convert
;
53 unsigned char *dst_buf
;
54 unsigned char *aux_buf
;
55 enum aom_img_fmt aom_fmt
;
57 unsigned int bit_depth
;
60 int y4m_input_open(y4m_input
*_y4m
, FILE *_fin
, char *_skip
, int _nskip
,
62 void y4m_input_close(y4m_input
*_y4m
);
63 int y4m_input_fetch_frame(y4m_input
*_y4m
, FILE *_fin
, aom_image_t
*img
);