xine-lib 1.2.13-20230125hg15249
Data Structures | Macros | Typedefs | Functions
bitplane.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <xine/xine_internal.h>
#include <xine/video_out.h>
#include <xine/buffer.h>
#include <xine/xineutils.h>
#include "bswap.h"
#include "group_raw.h"
#include "demuxers/iff.h"

Data Structures

struct  bitplane_decoder_s
 

Macros

#define IFF_REPLACE_BYTE_SIMPLE(ptr, old_data, new_data, colorindexx)
 
#define IFF_REPLACE_BYTE(ptr, yuvy, yuvu, yuvv, yuv_palette, old_data, new_data, colorindexx)
 
#define IFF_REPLACE_SHORT_SIMPLE(ptr_s, old_data_s, new_data_s, colorindexx_s)
 
#define IFF_REPLACE_SHORT(ptr_s, yuvy_s, yuvu_s, yuvv_s, yuv_palette_s, old_data_s, new_data_s, colorindexx_s)
 
#define IFF_REPLACE_LONG_SIMPLE(ptr_l, old_data_l, new_data_l, colorindexx_l)
 
#define IFF_REPLACE_LONG(ptr_l, yuvy_l, yuvu_l, yuvv_l, yuv_palette_l, old_data_l, new_data_l, colorindexx_l)
 

Typedefs

typedef struct bitplane_decoder_s bitplane_decoder_t
 

Functions

static uint8_t * bitplane_decode_byterun1 (uint8_t *compressed, int size_compressed, int size_uncompressed)
 
static void bitplane_decode_bitplane (uint8_t *bitplane_buffer, uint8_t *index_buf, int width, int height, int num_bitplanes, int bytes_per_pixel)
 
static void bitplane_decode_ham (uint8_t *ham_buffer, yuv_planes_t *yuv_planes, int width, int height, int num_bitplanes, int bytes_per_pixel, unsigned char *rgb_palette)
 
static void bitplane_sdelta_opt_3 (bitplane_decoder_t *this)
 
static void bitplane_set_dlta_short (bitplane_decoder_t *this)
 
static void bitplane_dlta_5 (bitplane_decoder_t *this)
 
static void bitplane_dlta_7_short (bitplane_decoder_t *this)
 
static void bitplane_dlta_7_long (bitplane_decoder_t *this)
 
static void bitplane_dlta_8_short (bitplane_decoder_t *this)
 
static void bitplane_dlta_8_long (bitplane_decoder_t *this)
 
static void bitplane_decode_data (video_decoder_t *this_gen, buf_element_t *buf)
 
static void bitplane_flush (video_decoder_t *this_gen)
 
static void bitplane_reset (video_decoder_t *this_gen)
 
static void bitplane_discontinuity (video_decoder_t *this_gen)
 
static void bitplane_dispose (video_decoder_t *this_gen)
 
static video_decoder_topen_plugin (video_decoder_class_t *class_gen, xine_stream_t *stream)
 
void * decode_bitplane_init_class (xine_t *xine, const void *data)
 

Macro Definition Documentation

◆ IFF_REPLACE_BYTE

#define IFF_REPLACE_BYTE ( ptr,
yuvy,
yuvu,
yuvv,
yuv_palette,
old_data,
new_data,
colorindexx )

Referenced by bitplane_dlta_5().

◆ IFF_REPLACE_BYTE_SIMPLE

#define IFF_REPLACE_BYTE_SIMPLE ( ptr,
old_data,
new_data,
colorindexx )
Value:
{ \
register uint8_t *index_ptr = ptr; \
register uint8_t colorindex = colorindexx; \
*index_ptr -= ((old_data & 0x80) ? colorindex : 0); \
*index_ptr++ += ((new_data & 0x80) ? colorindex : 0); \
*index_ptr -= ((old_data & 0x40) ? colorindex : 0); \
*index_ptr++ += ((new_data & 0x40) ? colorindex : 0); \
*index_ptr -= ((old_data & 0x20) ? colorindex : 0); \
*index_ptr++ += ((new_data & 0x20) ? colorindex : 0); \
*index_ptr -= ((old_data & 0x10) ? colorindex : 0); \
*index_ptr++ += ((new_data & 0x10) ? colorindex : 0); \
*index_ptr -= ((old_data & 0x08) ? colorindex : 0); \
*index_ptr++ += ((new_data & 0x08) ? colorindex : 0); \
*index_ptr -= ((old_data & 0x04) ? colorindex : 0); \
*index_ptr++ += ((new_data & 0x04) ? colorindex : 0); \
*index_ptr -= ((old_data & 0x02) ? colorindex : 0); \
*index_ptr++ += ((new_data & 0x02) ? colorindex : 0); \
*index_ptr -= ((old_data & 0x01) ? colorindex : 0); \
*index_ptr += ((new_data & 0x01) ? colorindex : 0); \
old_data = new_data; \
}

Referenced by bitplane_dlta_5().

◆ IFF_REPLACE_LONG

#define IFF_REPLACE_LONG ( ptr_l,
yuvy_l,
yuvu_l,
yuvv_l,
yuv_palette_l,
old_data_l,
new_data_l,
colorindexx_l )
Value:
{ \
uint8_t *xindex_ptr = (uint8_t *)ptr_l; \
uint8_t *xold_data = (uint8_t *)old_data_l; \
uint8_t *xnew_data = (uint8_t *)new_data_l; \
uint8_t *xyuv_y = yuvy_l; \
uint8_t *xyuv_u = yuvu_l; \
uint8_t *xyuv_v = yuvv_l; \
IFF_REPLACE_BYTE(xindex_ptr, xyuv_y, xyuv_u, xyuv_v, yuv_palette_l, *xold_data, *xnew_data, colorindexx_l ); \
xindex_ptr += 8; \
xold_data++; \
xnew_data++; \
xyuv_y += 8; \
xyuv_u += 8; \
xyuv_v += 8; \
IFF_REPLACE_BYTE(xindex_ptr, xyuv_y, xyuv_u, xyuv_v, yuv_palette_l, *xold_data, *xnew_data, colorindexx_l ); \
xindex_ptr += 8; \
xold_data++; \
xnew_data++; \
xyuv_y += 8; \
xyuv_u += 8; \
xyuv_v += 8; \
IFF_REPLACE_BYTE(xindex_ptr, xyuv_y, xyuv_u, xyuv_v, yuv_palette_l, *xold_data, *xnew_data, colorindexx_l ); \
xindex_ptr += 8; \
xold_data++; \
xnew_data++; \
xyuv_y += 8; \
xyuv_u += 8; \
xyuv_v += 8; \
IFF_REPLACE_BYTE(xindex_ptr, xyuv_y, xyuv_u, xyuv_v, yuv_palette_l, *xold_data, *xnew_data, colorindexx_l ); \
}

Referenced by bitplane_dlta_7_long(), and bitplane_dlta_8_long().

◆ IFF_REPLACE_LONG_SIMPLE

#define IFF_REPLACE_LONG_SIMPLE ( ptr_l,
old_data_l,
new_data_l,
colorindexx_l )
Value:
{ \
uint8_t *xindex_ptr = (uint8_t *)ptr_l; \
uint8_t *xold_data = (uint8_t *)old_data_l; \
uint8_t *xnew_data = (uint8_t *)new_data_l; \
IFF_REPLACE_BYTE_SIMPLE(xindex_ptr, *xold_data, *xnew_data, colorindexx_l ); \
xindex_ptr += 8; \
xold_data++; \
xnew_data++; \
IFF_REPLACE_BYTE_SIMPLE(xindex_ptr, *xold_data, *xnew_data, colorindexx_l ); \
xindex_ptr += 8; \
xold_data++; \
xnew_data++; \
IFF_REPLACE_BYTE_SIMPLE(xindex_ptr, *xold_data, *xnew_data, colorindexx_l ); \
xindex_ptr += 8; \
xold_data++; \
xnew_data++; \
IFF_REPLACE_BYTE_SIMPLE(xindex_ptr, *xold_data, *xnew_data, colorindexx_l ); \
}

Referenced by bitplane_dlta_7_long(), and bitplane_dlta_8_long().

◆ IFF_REPLACE_SHORT

#define IFF_REPLACE_SHORT ( ptr_s,
yuvy_s,
yuvu_s,
yuvv_s,
yuv_palette_s,
old_data_s,
new_data_s,
colorindexx_s )
Value:
{ \
uint8_t *xindex_ptr = (uint8_t *)ptr_s; \
uint8_t *xold_data = (uint8_t *)old_data_s; \
uint8_t *xnew_data = (uint8_t *)new_data_s; \
uint8_t *xyuv_y = yuvy_s; \
uint8_t *xyuv_u = yuvu_s; \
uint8_t *xyuv_v = yuvv_s; \
IFF_REPLACE_BYTE(xindex_ptr, xyuv_y, xyuv_u, xyuv_v, yuv_palette_s, *xold_data, *xnew_data, colorindexx_s ); \
xindex_ptr += 8; \
xold_data++; \
xnew_data++; \
xyuv_y += 8; \
xyuv_u += 8; \
xyuv_v += 8; \
IFF_REPLACE_BYTE(xindex_ptr, xyuv_y, xyuv_u, xyuv_v, yuv_palette_s, *xold_data, *xnew_data, colorindexx_s ); \
}

Referenced by bitplane_dlta_7_short(), bitplane_dlta_8_short(), bitplane_sdelta_opt_3(), and bitplane_set_dlta_short().

◆ IFF_REPLACE_SHORT_SIMPLE

#define IFF_REPLACE_SHORT_SIMPLE ( ptr_s,
old_data_s,
new_data_s,
colorindexx_s )
Value:
{ \
uint8_t *xindex_ptr = (uint8_t *)ptr_s; \
uint8_t *xold_data = (uint8_t *)old_data_s; \
uint8_t *xnew_data = (uint8_t *)new_data_s; \
IFF_REPLACE_BYTE_SIMPLE(xindex_ptr, *xold_data, *xnew_data, colorindexx_s ); \
xindex_ptr += 8; \
xold_data++; \
xnew_data++; \
IFF_REPLACE_BYTE_SIMPLE(xindex_ptr, *xold_data, *xnew_data, colorindexx_s ); \
}

Referenced by bitplane_dlta_7_short(), bitplane_dlta_8_short(), bitplane_sdelta_opt_3(), and bitplane_set_dlta_short().

Typedef Documentation

◆ bitplane_decoder_t

Function Documentation

◆ bitplane_decode_bitplane()

static void bitplane_decode_bitplane ( uint8_t * bitplane_buffer,
uint8_t * index_buf,
int width,
int height,
int num_bitplanes,
int bytes_per_pixel )
static

◆ bitplane_decode_byterun1()

static uint8_t * bitplane_decode_byterun1 ( uint8_t * compressed,
int size_compressed,
int size_uncompressed )
static

References NULL.

Referenced by bitplane_decode_data().

◆ bitplane_decode_data()

static void bitplane_decode_data ( video_decoder_t * this_gen,
buf_element_t * buf )
static

References _, _x_meta_info_set_utf8(), _x_stream_info_set(), palette_entry_s::b, vo_frame_s::bad_frame, vo_frame_s::base, xine_bmiheader::biBitCount, xine_bmiheader::biCompression, xine_bmiheader::biHeight, xine_bmiheader::biPlanes, bitplane_decode_bitplane(), bitplane_decode_byterun1(), bitplane_decode_ham(), bitplane_dlta_5(), bitplane_dlta_7_long(), bitplane_dlta_7_short(), bitplane_dlta_8_long(), bitplane_dlta_8_short(), bitplane_sdelta_opt_3(), bitplane_set_dlta_short(), AnimHeader::bits, xine_bmiheader::biWidth, BUF_FLAG_FRAME_END, BUF_FLAG_FRAMERATE, BUF_FLAG_PREVIEW, BUF_FLAG_SPECIAL, BUF_FLAG_STDHEADER, BUF_SPECIAL_PALETTE, BUF_VIDEO_BITPLANE, BUF_VIDEO_BITPLANE_BR1, bytes_per_pixel, CAMG_EHB, CAMG_HAM, CAMG_HIRES, CAMG_LACE, COMPUTE_U, COMPUTE_V, COMPUTE_Y, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, buf_element_s::decoder_info_ptr, vo_frame_s::draw, vo_frame_s::duration, vo_frame_s::free, palette_entry_s::g, height, IFF_ANHD_ASCIIJ, IFF_ANHD_BVDELTA, IFF_ANHD_ILBM, IFF_ANHD_LDELTA, IFF_ANHD_OPT7, IFF_ANHD_OPT8, IFF_ANHD_SDELTA, IFF_ANHD_SLDELTA, IFF_ANHD_STEREOO5, IFF_ANHD_XOR, init_yuv_planes(), LOG_MODULE, NULL, AnimHeader::operation, vo_frame_s::pitches, buf_element_s::pts, vo_frame_s::pts, palette_entry_s::r, buf_element_s::size, buf_element_s::type, VIDEOBUFSIZE, VO_BOTH_FIELDS, VO_GET_FRAME_MAY_FAIL, width, xine_fast_memcpy, XINE_IMGFMT_YUY2, xine_log(), XINE_LOG_MSG, XINE_META_INFO_VIDEOCODEC, XINE_STREAM_INFO_VIDEO_HANDLED, xine_usec_sleep(), XINE_VERBOSITY_LOG, xprintf, and yuv444_to_yuy2.

Referenced by open_plugin().

◆ bitplane_decode_ham()

static void bitplane_decode_ham ( uint8_t * ham_buffer,
yuv_planes_t * yuv_planes,
int width,
int height,
int num_bitplanes,
int bytes_per_pixel,
unsigned char * rgb_palette )
static

◆ bitplane_discontinuity()

static void bitplane_discontinuity ( video_decoder_t * this_gen)
static

Referenced by open_plugin().

◆ bitplane_dispose()

static void bitplane_dispose ( video_decoder_t * this_gen)
static

Referenced by open_plugin().

◆ bitplane_dlta_5()

static void bitplane_dlta_5 ( bitplane_decoder_t * this)
static

◆ bitplane_dlta_7_long()

static void bitplane_dlta_7_long ( bitplane_decoder_t * this)
static

◆ bitplane_dlta_7_short()

static void bitplane_dlta_7_short ( bitplane_decoder_t * this)
static

◆ bitplane_dlta_8_long()

static void bitplane_dlta_8_long ( bitplane_decoder_t * this)
static

◆ bitplane_dlta_8_short()

static void bitplane_dlta_8_short ( bitplane_decoder_t * this)
static

◆ bitplane_flush()

static void bitplane_flush ( video_decoder_t * this_gen)
static

Referenced by open_plugin().

◆ bitplane_reset()

static void bitplane_reset ( video_decoder_t * this_gen)
static

Referenced by open_plugin().

◆ bitplane_sdelta_opt_3()

static void bitplane_sdelta_opt_3 ( bitplane_decoder_t * this)
static

◆ bitplane_set_dlta_short()

static void bitplane_set_dlta_short ( bitplane_decoder_t * this)
static

◆ decode_bitplane_init_class()

void * decode_bitplane_init_class ( xine_t * xine,
const void * data )

◆ open_plugin()

static video_decoder_t * open_plugin ( video_decoder_class_t * class_gen,
xine_stream_t * stream )
static