|
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. | |
| static FILE * | open_output_file (const char *filename) |
| Open a file for writing. | |
| 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. | |
| static void * | input_read_thread (void *in_args) |
| Handles input reading in a thread. | |
| 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. | |
| int | main (int argc, char *argv[]) |
| Program main function. | |
Variables | |
| static const double | MAX_PSNR = 999.99 |
| Value that is printed instead of PSNR when SSE is zero. | |
| 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 |
| src | source picture |
| rec | reconstructed picture \prama psnr returns the PSNR |
| in_args | pointer to argument struct |
| argc | Argument count from commandline |
| argv | Argument list |
< Command line options
< input file (YUV)
< output file (HEVC NAL stream)
< reconstructed YUV output, –debug
If the file is "-", stdin is used.
| filename | name of the file to open or "-" |
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 |