TUT HEVC Encoder
|
#include <math.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "checkpoint.h"
#include "cli.h"
#include "encoder.h"
#include "kvazaar.h"
#include "kvazaar_internal.h"
#include "threads.h"
#include "yuv_io.h"
Data Structures | |
struct | input_handler_args |
Macros | |
#define | RETVAL_RUNNING 0 |
#define | RETVAL_FAILURE 1 |
#define | RETVAL_EOF 2 |
Functions | |
static FILE * | open_input_file (const char *filename) |
Open a file for reading. More... | |
static FILE * | open_output_file (const char *filename) |
Open a file for writing. More... | |
static unsigned | get_padding (unsigned width_or_height) |
static void | compute_psnr (const kvz_picture *const src, const kvz_picture *const rec, double psnr[3]) |
Calculates image PSNR value. More... | |
static void * | input_read_thread (void *in_args) |
Handles input reading in a thread. More... | |
void | output_recon_pictures (const kvz_api *const api, FILE *recout, kvz_picture *buffer[32], int *buffer_size, uint64_t *next_pts, unsigned width, unsigned height) |
static double | calc_avg_qp (uint64_t qp_sum, uint32_t frames_done) |
static bool | read_header (FILE *input, kvz_config *config) |
Reads the information in y4m header. More... | |
int | main (int argc, char *argv[]) |
Program main function. More... | |
Variables | |
static const double | MAX_PSNR = 999.99 |
Value that is printed instead of PSNR when SSE is zero. More... | |
static const double | MAX_SQUARED_ERROR = (double) ((1 << 8 ) - 1) * (double) ((1 << 8 ) - 1) |
#define RETVAL_EOF 2 |
#define RETVAL_FAILURE 1 |
#define RETVAL_RUNNING 0 |
|
static |
|
static |
src | source picture |
rec | reconstructed picture \prama psnr returns the PSNR |
|
static |
|
static |
in_args | pointer to argument struct |
int main | ( | int | argc, |
char * | argv[] | ||
) |
argc | Argument count from commandline |
argv | Argument list |
< Command line options
< input file (YUV)
< output file (HEVC NAL stream)
< reconstructed YUV output, –debug
|
static |
If the file is "-", stdin is used.
filename | name of the file to open or "-" |
|
static |
If the file is "-", stdout is used.
filename | name of the file to open or "-" |
void output_recon_pictures | ( | const kvz_api *const | api, |
FILE * | recout, | ||
kvz_picture * | buffer[32], | ||
int * | buffer_size, | ||
uint64_t * | next_pts, | ||
unsigned | width, | ||
unsigned | height | ||
) |
|
static |
input | Pointer to the input file |
config | Pointer to the config struct |
|
static |
|
static |