#include "contributors.h"
#include "global.h"
#include "mbuffer.h"
#include "image.h"
#include "memalloc.h"
#include "sei.h"

Go to the source code of this file.
Functions | |
| static void | write_out_picture (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) |
| int | testEndian (void) |
| static void | initOutput (int symbol_size_in_bytes) |
| void | write_picture (StorablePicture *p, int p_out, int real_structure) |
| void | init_out_buffer (void) |
| void | uninit_out_buffer (void) |
| void | clear_picture (StorablePicture *p) |
| void | write_unpaired_field (FrameStore *fs, int p_out) |
| void | flush_direct_output (int p_out) |
| void | write_stored_frame (FrameStore *fs, int p_out) |
| void | direct_output (StorablePicture *p, int p_out) |
Variables | |
| FrameStore * | out_buffer |
| StorablePicture * | pending_output = NULL |
| int | pending_output_state = FRAME |
| int | recovery_flag = 0 |
| int | non_conforming_stream |
| static void(* | img2buf )(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) |
Definition in file output.c.
| void clear_picture | ( | StorablePicture * | p | ) |
Initialize picture memory with (Y:0,U:128,V:128).
Definition at line 637 of file output.c.
References img, storable_picture::imgUV, storable_picture::imgY, storable_picture::size_x, storable_picture::size_x_cr, storable_picture::size_y, and storable_picture::size_y_cr.
Referenced by write_unpaired_field().
| void direct_output | ( | 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 | Picture for output | |
| p_out | Output file |
Definition at line 773 of file output.c.
References frame_store::bottom_field, calculate_frame_no(), dpb_combine_field_yuv(), find_snr(), flush_direct_output(), frame_store::frame, free_storable_picture(), frame_store::is_used, p_ref, params, snr, storable_picture::structure, frame_store::top_field, and write_picture().
Referenced by store_picture_in_dpb().

| void flush_direct_output | ( | int | p_out | ) |
Write out unpaired fields from output buffer.
| p_out | Output file |
Definition at line 718 of file output.c.
References frame_store::bottom_field, frame_store::frame, free_storable_picture(), frame_store::is_used, frame_store::top_field, 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 181 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 221 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 106 of file output.c.
Referenced by initOutput().
| void init_out_buffer | ( | void | ) |
Initialize output buffer for direct output.
Definition at line 603 of file output.c.
References alloc_frame_store(), storable_picture::imgUV, storable_picture::imgY, and no_mem_exit().
Referenced by main().

| static void initOutput | ( | int | symbol_size_in_bytes | ) | [static] |
selects appropriate output function given system arch. and data
Definition at line 67 of file output.c.
References img2buf_byte(), img2buf_endian(), img2buf_normal(), and testEndian().
Referenced by write_out_picture().

| int testEndian | ( | void | ) |
checks if the System is big- or little-endian
Definition at line 46 of file output.c.
Referenced by buf2img(), and initOutput().
| void uninit_out_buffer | ( | void | ) |
Uninitialize output buffer for direct output.
Definition at line 621 of file output.c.
References free_frame_store().
Referenced by main().

| static void write_out_picture | ( | StorablePicture * | p, | |
| int | p_out | |||
| ) | [static] |
Writes out a storable picture.
| p | Picture to be written | |
| p_out | Output file |
Definition at line 455 of file output.c.
References storable_picture::chroma_format_idc, error(), storable_picture::frame_cropping_flag, storable_picture::frame_cropping_rect_bottom_offset, storable_picture::frame_cropping_rect_left_offset, storable_picture::frame_cropping_rect_right_offset, storable_picture::frame_cropping_rect_top_offset, storable_picture::frame_mbs_only_flag, free_mem3Dpel(), get_mem3Dpel(), img, storable_picture::imgUV, storable_picture::imgY, initOutput(), no_mem_exit(), storable_picture::non_existing, params, storable_picture::seiHasTone_mapping, storable_picture::size_x, storable_picture::size_x_cr, storable_picture::size_y, storable_picture::size_y_cr, storable_picture::tone_mapping_lut, storable_picture::tonemapped_bit_depth, and YUV400.
Referenced by write_picture().

| void write_picture | ( | StorablePicture * | p, | |
| int | p_out, | |||
| int | real_structure | |||
| ) |
Writes out a storable picture without doing any output modifications.
| p | Picture to be written | |
| p_out | Output file | |
| real_structure | real picture structure |
Definition at line 437 of file output.c.
References write_out_picture().
Referenced by direct_output(), write_stored_frame(), and write_unpaired_field().

| void write_stored_frame | ( | FrameStore * | fs, | |
| int | p_out | |||
| ) |
Write a frame (from FrameStore).
| fs | FrameStore containing the frame | |
| p_out | Output file |
Definition at line 742 of file output.c.
References flush_direct_output(), frame_store::frame, frame_store::is_output, frame_store::is_used, frame_store::recovery_frame, write_picture(), and write_unpaired_field().
Referenced by output_one_frame_from_dpb(), and write_lost_non_ref_pic().

| void write_unpaired_field | ( | FrameStore * | fs, | |
| int | p_out | |||
| ) |
Write out not paired direct output fields. A second empty field is generated and combined into the frame buffer.
| fs | FrameStore that contains a single field | |
| p_out | Output file |
Definition at line 670 of file output.c.
References alloc_storable_picture(), frame_store::bottom_field, storable_picture::chroma_format_idc, clear_picture(), dpb_combine_field_yuv(), frame_store::frame, storable_picture::frame_cropping_flag, storable_picture::frame_cropping_rect_bottom_offset, storable_picture::frame_cropping_rect_left_offset, storable_picture::frame_cropping_rect_right_offset, storable_picture::frame_cropping_rect_top_offset, frame_store::is_used, storable_picture::size_x, storable_picture::size_x_cr, storable_picture::size_y, storable_picture::size_y_cr, frame_store::top_field, and write_picture().
Referenced by flush_direct_output(), and write_stored_frame().
