OpenJPH
Open-source implementation of JPEG2000 Part-15
ojph::yuv_in Class Reference

#include <ojph_img_io.h>

Inheritance diagram for ojph::yuv_in:
ojph::image_in_base

Public Member Functions

 yuv_in ()
 
virtual ~yuv_in ()
 
void open (const char *filename)
 
virtual ui32 read (const line_buf *line, ui32 comp_num)
 
void close ()
 
void set_bit_depth (ui32 num_bit_depths, ui32 *bit_depth)
 
void set_img_props (const size &s, ui32 num_components, ui32 num_downsampling, const point *downsampling)
 
ui32 get_num_components ()
 
ui32get_bit_depth ()
 
pointget_comp_subsampling ()
 
- Public Member Functions inherited from ojph::image_in_base
virtual ~image_in_base ()
 
virtual ui32 read (const line_buf *line, ui32 comp_num)=0
 
virtual void close ()
 

Private Attributes

FILE * fh
 
const char * fname
 
void * temp_buf
 
ui32 width [3]
 
ui32 height [3]
 
ui32 num_com
 
ui32 bytes_per_sample [3]
 
ui32 comp_address [3]
 
ui32 cur_line
 
ui32 last_comp
 
bool planar
 
ui32 bit_depth [3]
 
point subsampling [3]
 

Detailed Description

Definition at line 347 of file ojph_img_io.h.

Constructor & Destructor Documentation

◆ yuv_in()

ojph::yuv_in::yuv_in ( )
inline

◆ ~yuv_in()

virtual ojph::yuv_in::~yuv_in ( )
inlinevirtual

Definition at line 368 of file ojph_img_io.h.

References close(), and temp_buf.

Member Function Documentation

◆ close()

void ojph::yuv_in::close ( )
inlinevirtual

Reimplemented from ojph::image_in_base.

Definition at line 377 of file ojph_img_io.h.

References fh, and fname.

Referenced by read(), and ~yuv_in().

◆ get_bit_depth()

ui32 * ojph::yuv_in::get_bit_depth ( )
inline

Definition at line 384 of file ojph_img_io.h.

References bit_depth, and fh.

◆ get_comp_subsampling()

point * ojph::yuv_in::get_comp_subsampling ( )
inline

Definition at line 385 of file ojph_img_io.h.

References fh, and subsampling.

◆ get_num_components()

ui32 ojph::yuv_in::get_num_components ( )
inline

Definition at line 383 of file ojph_img_io.h.

References fh, and num_com.

◆ open()

void ojph::yuv_in::open ( const char *  filename)

Definition at line 1022 of file ojph_img_io.cpp.

References bit_depth, bytes_per_sample, comp_address, fh, fname, height, num_com, OJPH_ERROR, ojph_max, temp_buf, and width.

Referenced by load_yuv(), and main().

◆ read()

ui32 ojph::yuv_in::read ( const line_buf line,
ui32  comp_num 
)
virtual

Implements ojph::image_in_base.

Definition at line 1047 of file ojph_img_io.cpp.

References bytes_per_sample, close(), fh, fname, ojph::line_buf::i32, num_com, OJPH_ERROR, temp_buf, and width.

Referenced by load_yuv().

◆ set_bit_depth()

void ojph::yuv_in::set_bit_depth ( ui32  num_bit_depths,
ui32 bit_depth 
)

Definition at line 1104 of file ojph_img_io.cpp.

References bit_depth, and OJPH_ERROR.

Referenced by load_yuv(), and main().

◆ set_img_props()

void ojph::yuv_in::set_img_props ( const size s,
ui32  num_components,
ui32  num_downsampling,
const point downsampling 
)

Definition at line 1077 of file ojph_img_io.cpp.

References ojph::size::h, height, num_com, ojph_div_ceil, OJPH_ERROR, subsampling, ojph::size::w, and width.

Referenced by load_yuv(), and main().

Member Data Documentation

◆ bit_depth

ui32 ojph::yuv_in::bit_depth[3]
private

Definition at line 397 of file ojph_img_io.h.

Referenced by get_bit_depth(), open(), set_bit_depth(), and yuv_in().

◆ bytes_per_sample

ui32 ojph::yuv_in::bytes_per_sample[3]
private

Definition at line 392 of file ojph_img_io.h.

Referenced by open(), read(), and yuv_in().

◆ comp_address

ui32 ojph::yuv_in::comp_address[3]
private

Definition at line 393 of file ojph_img_io.h.

Referenced by open(), and yuv_in().

◆ cur_line

ui32 ojph::yuv_in::cur_line
private

Definition at line 395 of file ojph_img_io.h.

Referenced by yuv_in().

◆ fh

FILE* ojph::yuv_in::fh
private

◆ fname

const char* ojph::yuv_in::fname
private

Definition at line 389 of file ojph_img_io.h.

Referenced by close(), open(), read(), and yuv_in().

◆ height

ui32 ojph::yuv_in::height[3]
private

Definition at line 391 of file ojph_img_io.h.

Referenced by open(), set_img_props(), and yuv_in().

◆ last_comp

ui32 ojph::yuv_in::last_comp
private

Definition at line 395 of file ojph_img_io.h.

Referenced by yuv_in().

◆ num_com

ui32 ojph::yuv_in::num_com
private

Definition at line 391 of file ojph_img_io.h.

Referenced by get_num_components(), open(), read(), set_img_props(), and yuv_in().

◆ planar

bool ojph::yuv_in::planar
private

Definition at line 396 of file ojph_img_io.h.

Referenced by yuv_in().

◆ subsampling

point ojph::yuv_in::subsampling[3]
private

Definition at line 398 of file ojph_img_io.h.

Referenced by get_comp_subsampling(), set_img_props(), and yuv_in().

◆ temp_buf

void* ojph::yuv_in::temp_buf
private

Definition at line 390 of file ojph_img_io.h.

Referenced by open(), read(), yuv_in(), and ~yuv_in().

◆ width

ui32 ojph::yuv_in::width[3]
private

Definition at line 391 of file ojph_img_io.h.

Referenced by open(), read(), set_img_props(), and yuv_in().


The documentation for this class was generated from the following files: