#include "contributors.h"
#include <math.h>
#include <time.h>
#include "global.h"
#include "input.h"
#include "report.h"
#include "img_io.h"
#include "memalloc.h"
Go to the source code of this file.
Functions | |
void | buf2img_basic (imgpel **imgX,unsigned char *buf,int size_x,int size_y,int o_size_x,int o_size_y,int symbol_size_in_bytes,int dummy) |
void | buf2img_endian (imgpel **imgX,unsigned char *buf,int size_x,int size_y,int o_size_x,int o_size_y,int symbol_size_in_bytes,int dummy) |
void | buf2img_bitshift (imgpel **imgX,unsigned char *buf,int size_x,int size_y,int o_size_x,int o_size_y,int symbol_size_in_bytes,int bitshift) |
void | fillPlane (imgpel **imgX,int nVal,int size_x,int size_y) |
void | initInput (ImageParameters *p_Img, FrameFormat *source, FrameFormat *output) |
int | testEndian (void) |
static void | deinterleave (unsigned char **input, unsigned char **output, FrameFormat *source, int symbol_size_in_bytes) |
void | AllocateFrameMemory (ImageParameters *p_Img, InputParameters *p_Inp, FrameFormat *source) |
void | DeleteFrameMemory (ImageParameters *p_Img) |
int | ReadOneFrame (ImageParameters *p_Img, InputParameters *p_Inp, VideoDataFile *input_file, int FrameNoInFile, int HeaderSize, FrameFormat *source, FrameFormat *output, imgpel **pImage[3]) |
void | PaddAutoCropBorders (FrameFormat output, int img_size_x, int img_size_y, int img_size_x_cr, int img_size_y_cr, imgpel **pImage[3]) |
Definition in file input.c.
void AllocateFrameMemory | ( | ImageParameters * | p_Img, | |
InputParameters * | p_Inp, | |||
FrameFormat * | source | |||
) |
Create Frame Memory buffer.
Definition at line 545 of file input.c.
References no_mem_exit().
void buf2img_basic | ( | imgpel ** | imgX, | |
unsigned char * | buf, | |||
int | size_x, | |||
int | size_y, | |||
int | o_size_x, | |||
int | o_size_y, | |||
int | symbol_size_in_bytes, | |||
int | dummy | |||
) |
Convert file read buffer to source picture structure.
imgX | Pointer to image plane | |
buf | Buffer for file output | |
size_x | horizontal size of picture | |
size_y | vertical size of picture | |
o_size_x | horizontal size of picture | |
o_size_y | vertical size of picture | |
symbol_size_in_bytes | number of bytes in file used for one pixel | |
dummy | dummy variable used for allowing function pointer use |
Definition at line 353 of file input.c.
References error().
Referenced by initInput().
void buf2img_bitshift | ( | imgpel ** | imgX, | |
unsigned char * | buf, | |||
int | size_x, | |||
int | size_y, | |||
int | o_size_x, | |||
int | o_size_y, | |||
int | symbol_size_in_bytes, | |||
int | bitshift | |||
) |
Convert file read buffer to source picture structure.
imgX | Pointer to image plane | |
buf | Buffer for file output | |
size_x | horizontal size of picture | |
size_y | vertical size of picture | |
o_size_x | horizontal size of picture | |
o_size_y | vertical size of picture | |
symbol_size_in_bytes | number of bytes in file used for one pixel | |
bitshift | variable for bitdepth expansion |
Definition at line 226 of file input.c.
References error(), and testEndian().
Referenced by initInput().
void buf2img_endian | ( | imgpel ** | imgX, | |
unsigned char * | buf, | |||
int | size_x, | |||
int | size_y, | |||
int | o_size_x, | |||
int | o_size_y, | |||
int | symbol_size_in_bytes, | |||
int | dummy | |||
) |
Convert file read buffer to source picture structure.
imgX | Pointer to image plane | |
buf | Buffer for file output | |
size_x | horizontal size of picture | |
size_y | vertical size of picture | |
o_size_x | horizontal size of picture | |
o_size_y | vertical size of picture | |
symbol_size_in_bytes | number of bytes in file used for one pixel | |
dummy | dummy variable used for allowing function pointer use |
Definition at line 465 of file input.c.
References error().
Referenced by initInput().
static void deinterleave | ( | unsigned char ** | input, | |
unsigned char ** | output, | |||
FrameFormat * | source, | |||
int | symbol_size_in_bytes | |||
) | [static] |
void DeleteFrameMemory | ( | ImageParameters * | p_Img | ) |
void fillPlane | ( | imgpel ** | imgX, | |
int | nVal, | |||
int | size_x, | |||
int | size_y | |||
) |
void initInput | ( | ImageParameters * | p_Img, | |
FrameFormat * | source, | |||
FrameFormat * | output | |||
) |
checks if the System is big- or little-endian
Definition at line 41 of file input.c.
References buf2img_basic(), buf2img_bitshift(), buf2img_endian(), and testEndian().
void PaddAutoCropBorders | ( | FrameFormat | output, | |
int | img_size_x, | |||
int | img_size_y, | |||
int | img_size_x_cr, | |||
int | img_size_y_cr, | |||
imgpel ** | pImage[3] | |||
) |
Padding of automatically added border for picture sizes that are not multiples of macroblock/macroblock pair size.
output | Image dimensions | |
img_size_x | coded image horizontal size (luma) | |
img_size_y | code image vertical size (luma) | |
img_size_x_cr | coded image horizontal size (chroma) | |
img_size_y_cr | code image vertical size (chroma) | |
pImage | image planes |
Definition at line 679 of file input.c.
References YUV400.
int ReadOneFrame | ( | ImageParameters * | p_Img, | |
InputParameters * | p_Inp, | |||
VideoDataFile * | input_file, | |||
int | FrameNoInFile, | |||
int | HeaderSize, | |||
FrameFormat * | source, | |||
FrameFormat * | output, | |||
imgpel ** | pImage[3] | |||
) |
Reads one new frame from file.
p_Img | image encoding parameters for current picture | |
p_Inp | Input configuration parameters | |
input_file | structure containing information (filename, format) about the source file | |
FrameNoInFile | Frame number in the source file | |
HeaderSize | Number of bytes in the source file to be skipped | |
source | source file (on disk) information | |
output | output file (for encoding) information | |
pImage | Image planes |
Definition at line 594 of file input.c.
References deinterleave(), ReadFrameConcatenated(), ReadFrameSeparate(), ReadTIFFImage(), YUV400, and YUV444.
int testEndian | ( | void | ) |
checks if the System is big- or little-endian
Definition at line 64 of file input.c.
Referenced by buf2img_bitshift(), buffer2img(), initInput(), and initOutput().