output.c File Reference

Output an image and Trance support. More...

#include "contributors.h"
#include "global.h"
#include "image.h"
#include "input.h"
#include "output.h"

Include dependency graph for output.c:

Go to the source code of this file.

Functions

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)
void write_picture (StorablePicture *p, FrameFormat *output, int p_out)
void write_out_picture (StorablePicture *p, FrameFormat *output, int p_out)
void init_out_buffer (ImageParameters *p_Img)
void uninit_out_buffer (ImageParameters *p_Img, InputParameters *p_Inp)
void clear_picture (ImageParameters *p_Img, StorablePicture *p)
void write_unpaired_field (ImageParameters *p_Img, InputParameters *p_Inp, FrameStore *fs, FrameFormat *output, int p_out)
void flush_direct_output (ImageParameters *p_Img, InputParameters *p_Inp, FrameFormat *output, int p_out)
void write_stored_frame (ImageParameters *p_Img, InputParameters *p_Inp, FrameStore *fs, FrameFormat *output, int p_out)
void direct_output (ImageParameters *p_Img, InputParameters *p_Inp, StorablePicture *p, FrameFormat *output, int p_out)
void direct_output_paff (ImageParameters *p_Img, InputParameters *p_Inp, StorablePicture *p, FrameFormat *output, int p_out)


Detailed Description

Output an image and Trance support.

Author:
Main contributors (see contributors.h for copyright, address and affiliation details)

Definition in file output.c.


Function Documentation

void clear_picture ( ImageParameters p_Img,
StorablePicture p 
)

Initialize picture memory with (Y:0,U:128,V:128).

Definition at line 305 of file output.c.

References img_par::dc_pred_value_comp, storable_picture::imgUV, and storable_picture::imgY.

Referenced by write_unpaired_field().

void direct_output ( ImageParameters p_Img,
InputParameters p_Inp,
StorablePicture p,
FrameFormat *  output,
int  p_out 
)

Directly output a picture without storing it in the DPB. Fields are buffered before they are written to the file.

Parameters:
p_Img ImageParameters structure
p_Inp Input configuration parameters
p Picture for output
output Frame format for output
p_out Output file

Definition at line 489 of file output.c.

References dpb_combine_field_yuv(), flush_direct_output(), free_storable_picture(), frame_store::is_used, and write_picture().

Referenced by direct_output_paff(), and store_picture_in_dpb().

Here is the call graph for this function:

void direct_output_paff ( ImageParameters p_Img,
InputParameters p_Inp,
StorablePicture p,
FrameFormat *  output,
int  p_out 
)

For adaptive frame/field coding remove dangling top field from direct output frame version instead.

Parameters:
p_Img Picture for output
p_Inp Input configuration parameters
p Picture for output
output Frame format for output
p_out Output file

Definition at line 551 of file output.c.

References direct_output(), free_storable_picture(), and frame_store::is_used.

Referenced by replace_top_pic_with_frame().

Here is the call graph for this function:

void flush_direct_output ( ImageParameters p_Img,
InputParameters p_Inp,
FrameFormat *  output,
int  p_out 
)

Write out unpaired fields from output buffer.

Parameters:
p_Img ImageParameters structure
p_Inp Input configuration parameters
output FrameFormat structure for output
p_out Output file

Definition at line 424 of file output.c.

References free_storable_picture(), frame_store::is_used, and write_unpaired_field().

Referenced by direct_output(), and write_stored_frame().

Here is the call graph for this function:

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 
)

Convert image plane to temporary buffer for file writing.

Parameters:
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 45 of file output.c.

References error(), and testEndian().

Referenced by write_out_picture().

Here is the call graph for this function:

void init_out_buffer ( ImageParameters p_Img  ) 

Initialize output buffer for direct output.

Definition at line 282 of file output.c.

References alloc_frame_store().

Referenced by init_encoder().

Here is the call graph for this function:

void uninit_out_buffer ( ImageParameters p_Img,
InputParameters p_Inp 
)

Uninitialize output buffer for direct output.

Definition at line 293 of file output.c.

References free_frame_store().

Referenced by free_encoder_memory().

Here is the call graph for this function:

void write_out_picture ( StorablePicture p,
FrameFormat *  output,
int  p_out 
)

Writes out a storable picture.

Parameters:
p Picture to be written
output Output format
p_out Output file

Definition at line 173 of file output.c.

References error(), img2buf(), storable_picture::imgUV, storable_picture::imgY, no_mem_exit(), YUV400, and YUV444.

Referenced by write_picture().

Here is the call graph for this function:

void write_picture ( StorablePicture p,
FrameFormat *  output,
int  p_out 
)

Writes out a storable picture without doing any output modifications.

Parameters:
p Picture to be written
output picture structure for output
p_out Output file

Definition at line 156 of file output.c.

References write_out_picture().

Referenced by direct_output(), write_stored_frame(), and write_unpaired_field().

Here is the call graph for this function:

void write_stored_frame ( ImageParameters p_Img,
InputParameters p_Inp,
FrameStore fs,
FrameFormat *  output,
int  p_out 
)

Write a frame (from FrameStore).

Parameters:
p_Img ImageParameters structure
p_Inp Input configuration parameters
fs FrameStore containing the frame
output Frame format for output
p_out Output file

Definition at line 454 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().

Here is the call graph for this function:

void write_unpaired_field ( ImageParameters p_Img,
InputParameters p_Inp,
FrameStore fs,
FrameFormat *  output,
int  p_out 
)

Write out not paired direct output fields. A second empty field is generated and combined into the frame buffer.

Parameters:
p_Img point to ImageParameters
p_Inp Input configuration parameters
fs FrameStore that contains a single field
output Frame format to
p_out Output file

Definition at line 360 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().

Here is the call graph for this function:


Documentation generated with DoxyGen