TUT HEVC Encoder
input_frame_buffer.h
Go to the documentation of this file.
1#ifndef INPUT_FRAME_BUFFER_H_
2#define INPUT_FRAME_BUFFER_H_
3/*****************************************************************************
4 * This file is part of Kvazaar HEVC encoder.
5 *
6 * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without modification,
10 * are permitted provided that the following conditions are met:
11 *
12 * * Redistributions of source code must retain the above copyright notice, this
13 * list of conditions and the following disclaimer.
14 *
15 * * Redistributions in binary form must reproduce the above copyright notice, this
16 * list of conditions and the following disclaimer in the documentation and/or
17 * other materials provided with the distribution.
18 *
19 * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its
20 * contributors may be used to endorse or promote products derived from
21 * this software without specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
27 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON
30 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS
33 ****************************************************************************/
34
41#include "global.h" // IWYU pragma: keep
42#include "kvazaar.h"
43
44
45// Forward declaration.
46struct encoder_state_t;
47
48typedef struct input_frame_buffer_t {
51
54
56 uint64_t num_in;
57
59 uint64_t num_out;
60
67 int64_t delay;
68
74
76
78
80 struct encoder_state_t *const state,
81 struct kvz_picture *const img_in,
82 int first_done);
83
84#endif // INPUT_FRAME_BUFFER_H_
Header that is included in every other header.
void kvz_init_input_frame_buffer(input_frame_buffer_t *input_buffer)
Definition: input_frame_buffer.c:40
kvz_picture * kvz_encoder_feed_frame(input_frame_buffer_t *buf, struct encoder_state_t *const state, struct kvz_picture *const img_in, int first_done)
Pass an input frame to the encoder state.
Definition: input_frame_buffer.c:66
struct input_frame_buffer_t input_frame_buffer_t
This file defines the public API of Kvazaar when used as a library.
#define KVZ_MAX_GOP_LENGTH
Maximum length of a GoP structure.
Definition: kvazaar.h:78
Definition: encoderstate.h:274
Definition: input_frame_buffer.h:48
struct kvz_picture * pic_buffer[3 *32]
An array for stroring the input frames.
Definition: input_frame_buffer.h:50
int64_t delay
Value to subtract from the DTS values of the first frames.
Definition: input_frame_buffer.h:67
uint64_t num_in
Number of pictures input.
Definition: input_frame_buffer.h:56
int64_t pts_buffer[3 *32]
An array for stroring the timestamps.
Definition: input_frame_buffer.h:53
uint64_t num_out
Number of pictures output.
Definition: input_frame_buffer.h:59
int gop_skipped
Number of GOP pictures skipped.
Definition: input_frame_buffer.h:73
Struct which contains all picture data.
Definition: kvazaar.h:504