#include "contributors.h"
#include "global.h"
#include "mbuffer.h"
#include "image.h"
#include "memalloc.h"
#include "sei.h"
#include "input.h"
Go to the source code of this file.
Functions | |
static void | write_out_picture (ImageParameters *p_Img, StorablePicture *p, int p_out) |
static void | img2buf_byte (imgpel **imgX, unsigned char *buf, int size_x, int size_y, int symbol_size_in_bytes, int crop_left, int crop_right, int crop_top, int crop_bottom) |
static void | img2buf_normal (imgpel **imgX, unsigned char *buf, int size_x, int size_y, int symbol_size_in_bytes, int crop_left, int crop_right, int crop_top, int crop_bottom) |
static void | img2buf_endian (imgpel **imgX, unsigned char *buf, int size_x, int size_y, int symbol_size_in_bytes, int crop_left, int crop_right, int crop_top, int crop_bottom) |
static void | initOutput (ImageParameters *p_Img, int symbol_size_in_bytes) |
void | write_picture (ImageParameters *p_Img, StorablePicture *p, int p_out, int real_structure) |
void | init_out_buffer (ImageParameters *p_Img) |
void | uninit_out_buffer (ImageParameters *p_Img) |
void | clear_picture (ImageParameters *p_Img, StorablePicture *p) |
void | write_unpaired_field (ImageParameters *p_Img, FrameStore *fs, int p_out) |
void | flush_direct_output (ImageParameters *p_Img, int p_out) |
void | write_stored_frame (ImageParameters *p_Img, FrameStore *fs, int p_out) |
void | direct_output (ImageParameters *p_Img, StorablePicture *p, int p_out) |
Definition in file output.c.
void clear_picture | ( | ImageParameters * | p_Img, | |
StorablePicture * | p | |||
) |
Initialize picture memory with (Y:0,U:128,V:128).
Definition at line 617 of file output.c.
References storable_picture::imgUV, and storable_picture::imgY.
Referenced by write_unpaired_field().
void direct_output | ( | ImageParameters * | p_Img, | |
StorablePicture * | p, | |||
int | p_out | |||
) |
Directly output a picture without storing it in the DPB. Fields are buffered before they are written to the file.
p_Img | image decoding parameters for current picture | |
p | Picture for output | |
p_out | Output file |
Definition at line 764 of file output.c.
References calculate_frame_no(), dpb_combine_field_yuv(), find_snr(), flush_direct_output(), free_storable_picture(), and write_picture().
Referenced by store_picture_in_dpb().
void flush_direct_output | ( | ImageParameters * | p_Img, | |
int | p_out | |||
) |
Write out unpaired fields from output buffer.
p_Img | image decoding parameters for current picture | |
p_out | Output file |
Definition at line 703 of file output.c.
References free_storable_picture(), and write_unpaired_field().
Referenced by direct_output(), and write_stored_frame().
static void img2buf_byte | ( | imgpel ** | imgX, | |
unsigned char * | buf, | |||
int | size_x, | |||
int | size_y, | |||
int | symbol_size_in_bytes, | |||
int | crop_left, | |||
int | crop_right, | |||
int | crop_top, | |||
int | crop_bottom | |||
) | [static] |
Convert image plane to temporary buffer for file writing.
imgX | Pointer to image plane | |
buf | Buffer for file output | |
size_x | horizontal size | |
size_y | vertical size | |
symbol_size_in_bytes | number of bytes used per pel | |
crop_left | pixels to crop from left | |
crop_right | pixels to crop from right | |
crop_top | pixels to crop from top | |
crop_bottom | pixels to crop from bottom |
Definition at line 153 of file output.c.
Referenced by initOutput().
static void img2buf_endian | ( | imgpel ** | imgX, | |
unsigned char * | buf, | |||
int | size_x, | |||
int | size_y, | |||
int | symbol_size_in_bytes, | |||
int | crop_left, | |||
int | crop_right, | |||
int | crop_top, | |||
int | crop_bottom | |||
) | [static] |
Convert image plane to temporary buffer for file writing.
imgX | Pointer to image plane | |
buf | Buffer for file output | |
size_x | horizontal size | |
size_y | vertical size | |
symbol_size_in_bytes | number of bytes used per pel | |
crop_left | pixels to crop from left | |
crop_right | pixels to crop from right | |
crop_top | pixels to crop from top | |
crop_bottom | pixels to crop from bottom |
Definition at line 193 of file output.c.
References error().
Referenced by initOutput().
static void img2buf_normal | ( | imgpel ** | imgX, | |
unsigned char * | buf, | |||
int | size_x, | |||
int | size_y, | |||
int | symbol_size_in_bytes, | |||
int | crop_left, | |||
int | crop_right, | |||
int | crop_top, | |||
int | crop_bottom | |||
) | [static] |
Convert image plane to temporary buffer for file writing.
imgX | Pointer to image plane | |
buf | Buffer for file output | |
size_x | horizontal size | |
size_y | vertical size | |
symbol_size_in_bytes | number of bytes used per pel | |
crop_left | pixels to crop from left | |
crop_right | pixels to crop from right | |
crop_top | pixels to crop from top | |
crop_bottom | pixels to crop from bottom |
Definition at line 78 of file output.c.
Referenced by initOutput().
void init_out_buffer | ( | ImageParameters * | p_Img | ) |
Initialize output buffer for direct output.
Definition at line 583 of file output.c.
References alloc_frame_store(), and no_mem_exit().
Referenced by main().
static void initOutput | ( | ImageParameters * | p_Img, | |
int | symbol_size_in_bytes | |||
) | [static] |
selects appropriate output function given system arch. and data
Definition at line 39 of file output.c.
References img2buf_byte(), img2buf_endian(), img2buf_normal(), and testEndian().
Referenced by write_out_picture().
void uninit_out_buffer | ( | ImageParameters * | p_Img | ) |
Uninitialize output buffer for direct output.
Definition at line 601 of file output.c.
References free_frame_store().
Referenced by main().
static void write_out_picture | ( | ImageParameters * | p_Img, | |
StorablePicture * | p, | |||
int | p_out | |||
) | [static] |
Writes out a storable picture.
p_Img | image decoding parameters for current picture | |
p | Picture to be written | |
p_out | Output file |
Definition at line 433 of file output.c.
References error(), free_mem3Dpel(), get_mem3Dpel(), storable_picture::imgUV, storable_picture::imgY, initOutput(), no_mem_exit(), storable_picture::tone_mapping_lut, and YUV400.
Referenced by write_picture().
void write_picture | ( | ImageParameters * | p_Img, | |
StorablePicture * | p, | |||
int | p_out, | |||
int | real_structure | |||
) |
Writes out a storable picture without doing any output modifications.
p_Img | image decoding parameters for current picture | |
p | Picture to be written | |
p_out | Output file | |
real_structure | real picture structure |
Definition at line 412 of file output.c.
References write_out_picture().
Referenced by direct_output(), write_stored_frame(), and write_unpaired_field().
void write_stored_frame | ( | ImageParameters * | p_Img, | |
FrameStore * | fs, | |||
int | p_out | |||
) |
Write a frame (from FrameStore).
p_Img | image decoding parameters for current picture | |
fs | FrameStore containing the frame | |
p_out | Output file |
Definition at line 730 of file output.c.
References flush_direct_output(), frame_store::is_used, write_picture(), and write_unpaired_field().
Referenced by output_one_frame_from_dpb(), and write_lost_non_ref_pic().
void write_unpaired_field | ( | ImageParameters * | p_Img, | |
FrameStore * | fs, | |||
int | p_out | |||
) |
Write out not paired direct output fields. A second empty field is generated and combined into the frame buffer.
p_Img | image decoding parameters for current picture | |
fs | FrameStore that contains a single field | |
p_out | Output file |
Definition at line 652 of file output.c.
References alloc_storable_picture(), clear_picture(), dpb_combine_field_yuv(), frame_store::is_used, and write_picture().
Referenced by flush_direct_output(), and write_stored_frame().