xine-lib  1.2.10
alterh264_bits_reader.h
Go to the documentation of this file.
1 /* kate: tab-indent on; indent-width 4; mixedindent off; indent-mode cstyle; remove-trailing-space on; */
2 /*
3  * Copyright (C) 2008-2013 the xine project
4  *
5  * This file is part of xine, a free video player.
6  *
7  * xine is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * xine is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
20  *
21  */
22 
23 #ifndef ALTERH264_BITS_READER_H
24 #define ALTERH264_BITS_READER_H
25 #include <sys/types.h>
26 #include <inttypes.h>
27 #include <stdio.h>
28 
29 
30 
31 typedef struct {
32  const uint8_t *buffer, *start;
33  int offbits, length, oflow;
35 
36 
37 
38 static void
39 bits_reader_set (bits_reader_t * br, const uint8_t * buf, int len)
40 {
41  br->buffer = br->start = buf;
42  br->offbits = 0;
43  br->length = len;
44  br->oflow = 0;
45 }
46 
47 
48 
49 static inline uint32_t
51 {
52  uint8_t val[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 };
53  const uint8_t *buf = br->start + br->length;
54  int bit;
55 
56  while (--buf >= br->buffer)
57  {
58  for (bit = 7; bit > -1; bit--)
59  if (*buf & val[bit])
60  return ((buf - br->buffer) * 8) - br->offbits + bit;
61  }
62  return 0;
63 }
64 
65 
66 
67 static inline uint8_t
69 {
70  br->offbits = 0;
71  if ((br->buffer + 1) > (br->start + br->length - 1))
72  {
73  br->oflow = 1;
74  //printf("!!!!! buffer overflow !!!!!\n");
75  return 0;
76  }
77  ++br->buffer;
78  if ((*(br->buffer) == 3) && ((br->buffer - br->start) > 2)
79  && (*(br->buffer - 2) == 0) && (*(br->buffer - 1) == 0))
80  {
81  if ((br->buffer + 1) > (br->start + br->length - 1))
82  {
83  br->oflow = 1;
84  //printf("!!!!! buffer overflow !!!!!\n");
85  return 0;
86  }
87  ++br->buffer;
88  }
89  return 1;
90 }
91 
92 
93 
94 static inline uint32_t
95 read_bits (bits_reader_t * br, int nbits)
96 {
97  uint8_t val[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 };
98  uint32_t res = 0;
99 
100  while (nbits)
101  {
102  res = (res << 1) + ((*br->buffer & val[br->offbits]) ? 1 : 0);
103  --nbits;
104  ++br->offbits;
105  if (br->offbits > 7)
106  if (!bits_reader_shift (br))
107  return 1;
108  }
109  return res;
110 }
111 
112 
113 
114 static inline void
115 skip_bits (bits_reader_t * br, int nbits)
116 {
117  while (nbits)
118  {
119  --nbits;
120  ++br->offbits;
121  if (br->offbits > 7)
122  bits_reader_shift (br);
123  }
124 }
125 
126 
127 
128 static inline uint32_t
130 {
131  int leading = -1;
132  uint8_t b;
133 
134  for (b = 0; !b; leading++)
135  b = read_bits (br, 1);
136 
137  return (1 << leading) - 1 + read_bits (br, leading);
138 }
139 
140 
141 
142 static inline int32_t
144 {
145  uint32_t res = read_exp_ue (br);
146  return (res & 0x01) ? (res + 1) / 2 : -(res / 2);
147 }
148 #endif /* ALTERH264_BITS_READER_H */
xine_s
Definition: xine_internal.h:80
XINE_STREAM_INFO_VIDEO_WIDTH
#define XINE_STREAM_INFO_VIDEO_WIDTH
Definition: xine.h:1007
XINE_IMGFMT_YV12
#define XINE_IMGFMT_YV12
Definition: xine.h:494
vo_frame_s::pitches
int pitches[3]
Definition: video_out.h:117
img_state_t
Definition: xine_mpeg2new_decoder.c:52
buf_element_s::size
int32_t size
Definition: buffer.h:343
xine_stream_s::xine
xine_t * xine
Definition: xine_internal.h:126
mpeg2_custom_fbuf
void mpeg2_custom_fbuf(mpeg2dec_t *mpeg2dec, int custom_fbuf)
Definition: decode.c:350
SEQ_FLAG_MPEG2
#define SEQ_FLAG_MPEG2
Definition: mpeg2.h:30
mpeg2_video_discontinuity
static void mpeg2_video_discontinuity(video_decoder_t *this_gen)
Definition: xine_mpeg2new_decoder.c:430
bits_reader_t
Definition: alterh264_bits_reader.h:31
video_decoder_s
Definition: video_decoder.h:73
XINE_STREAM_INFO_VIDEO_RATIO
#define XINE_STREAM_INFO_VIDEO_RATIO
Definition: xine.h:1009
xine_stream_s
Definition: xine_internal.h:123
VO_GET_FRAME_MAY_FAIL
#define VO_GET_FRAME_MAY_FAIL
Definition: video_out.h:299
mpeg2_malloc
void * mpeg2_malloc(unsigned size, mpeg2_alloc_t reason)
Definition: alloc.c:32
LOG_MODULE
#define LOG_MODULE
Definition: libopenhevc.c:27
XINE_STREAM_INFO_VIDEO_BITRATE
#define XINE_STREAM_INFO_VIDEO_BITRATE
Definition: xine.h:1012
mpeg2dec_s
Definition: mpeg2.h:29
vo_frame_s::pts
int64_t pts
Definition: video_out.h:109
xine_buffer_copyin
#define xine_buffer_copyin(buf, i, data, len)
Definition: xine_buffer.c:194
BUF_FLAG_FRAME_END
#define BUF_FLAG_FRAME_END
Definition: buffer.h:371
xine_buffer_free
#define xine_buffer_free(buf)
Definition: xine_buffer.c:149
xineutils.h
ldl
#define ldl(p)
Definition: alpha_asm.h:76
mpeg2_video_decoder_s::rff_pattern
uint32_t rff_pattern
Definition: xine_mpeg2new_decoder.c:66
mpeg2_idct_add_mvi
void mpeg2_idct_add_mvi(int last, int16_t *block, uint8_t *dest, int stride)
MPEG2_ACCEL_SPARC_VIS
#define MPEG2_ACCEL_SPARC_VIS
Definition: mpeg2.h:163
mpeg2_sequence_s::picture_width
unsigned int picture_width
Definition: mpeg2.h:51
W2
#define W2
Definition: idct.c:52
free_hook
static int(* free_hook)(void *buf)
Definition: alloc.c:30
hevc_decoder_s::stream
xine_stream_t * stream
Definition: libopenhevc.c:40
CLIP
#define CLIP(i)
Definition: idct.c:65
mpeg2_info
const mpeg2_info_t * mpeg2_info(mpeg2dec_t *mpeg2dec)
Definition: decode.c:38
VO_PROP_MAX_VIDEO_WIDTH
#define VO_PROP_MAX_VIDEO_WIDTH
Definition: video_out.h:273
mpeg2_picture_s::flags
uint32_t flags
Definition: mpeg2.h:91
dec_data::pos
int pos
Definition: libpng.c:66
xine_fast_memcpy
void *(* xine_fast_memcpy)(void *to, const void *from, size_t len)
Definition: memcpy.c:60
BUF_FLAG_COLOR_MATRIX
#define BUF_FLAG_COLOR_MATRIX
Definition: buffer.h:421
mpeg2.h
W7
#define W7
Definition: idct.c:56
buf_element_s::decoder_info
uint32_t decoder_info[5]
Definition: buffer.h:353
MPEG2_ACCEL_PPC_ALTIVEC
#define MPEG2_ACCEL_PPC_ALTIVEC
Definition: mpeg2.h:160
img_state_t::id
uint32_t id
Definition: xine_mpeg2new_decoder.c:53
MM_ACCEL_X86_MMX
#define MM_ACCEL_X86_MMX
Definition: xineutils.h:164
MM_ACCEL_MLIB
#define MM_ACCEL_MLIB
Definition: xineutils.h:161
mpeg2_idct_alpha_init
void mpeg2_idct_alpha_init(void)
bits_reader_t::oflow
int oflow
Definition: alterh264_bits_reader.h:33
mpeg2_fbuf_s::id
void * id
Definition: mpeg2.h:99
W1
#define W1
Definition: idct.c:51
MPEG2_ACCEL_ALPHA
#define MPEG2_ACCEL_ALPHA
Definition: mpeg2.h:161
MPEG2_ACCEL_DETECT
#define MPEG2_ACCEL_DETECT
Definition: mpeg2.h:165
mpeg2_video_dispose
static void mpeg2_video_dispose(video_decoder_t *this_gen)
Definition: xine_mpeg2new_decoder.c:438
mpeg2_alloc_t
mpeg2_alloc_t
Definition: mpeg2.h:189
dec_info_video
static const decoder_info_t dec_info_video
Definition: libopenhevc.c:255
avg2
#define avg2(a, b)
Definition: motion_comp.c:87
mpeg2_picture_s::nb_fields
unsigned int nb_fields
Definition: mpeg2.h:89
VO_BOTTOM_FIELD
#define VO_BOTTOM_FIELD
Definition: video_out.h:292
STATE_GOP
@ STATE_GOP
Definition: mpeg2.h:124
png_decoder_s::video_decoder
video_decoder_t video_decoder
Definition: libpng.c:47
BUF_VIDEO_PNG
#define BUF_VIDEO_PNG
Definition: buffer.h:197
read_bits
static uint32_t read_bits(bits_reader_t *br, int nbits)
Definition: alterh264_bits_reader.h:95
rgb2yuy2_slice
void rgb2yuy2_slice(rgb2yuy2_t *rgb2yuy2, const uint8_t *restrict in, int ipitch, uint8_t *restrict out, int opitch, int width, int height)
Definition: color.c:2063
mpeg2_malloc_hooks
void mpeg2_malloc_hooks(void *malloc(unsigned, mpeg2_alloc_t), int free(void *))
Definition: alloc.c:65
vo_frame_s::proc_slice
void(* proc_slice)(vo_frame_t *vo_img, uint8_t **src)
Definition: video_out.h:83
hevc_decoder_s::video_decoder
video_decoder_t video_decoder
Definition: libopenhevc.c:38
dec_data::xine
xine_t * xine
Definition: libpng.c:63
mpeg2_video_decoder_s
Definition: xine_mpeg2new_decoder.c:57
vo_frame_s::id
int id
Definition: video_out.h:166
mpeg2_video_reset
static void mpeg2_video_reset(video_decoder_t *this_gen)
Definition: xine_mpeg2new_decoder.c:315
vo_frame_s::top_field_first
int top_field_first
Definition: video_out.h:120
bits_reader_t::buffer
const uint8_t * buffer
Definition: alterh264_bits_reader.h:32
lprintf
#define lprintf(...)
Definition: xineutils.h:620
STATE_SEQUENCE
@ STATE_SEQUENCE
Definition: mpeg2.h:121
XINE_STREAM_INFO_VIDEO_HEIGHT
#define XINE_STREAM_INFO_VIDEO_HEIGHT
Definition: xine.h:1008
hevc_dispose
static void hevc_dispose(video_decoder_t *this_gen)
Definition: libopenhevc.c:184
put
#define put(predictor, i)
Definition: motion_comp.c:96
mpeg2_video_decoder_s::stream
xine_stream_t * stream
Definition: xine_mpeg2new_decoder.c:60
mpeg2_video_decoder_s::force_aspect
int32_t force_aspect
Definition: xine_mpeg2new_decoder.c:61
video_types
static const uint32_t video_types[]
Definition: libopenhevc.c:250
_user_warning
static void _user_warning(png_structp png, png_const_charp msg)
Definition: libpng.c:81
MPEG2_ACCEL_ALPHA_MVI
#define MPEG2_ACCEL_ALPHA_MVI
Definition: mpeg2.h:162
W3
#define W3
Definition: idct.c:53
BUTTERFLY
#define BUTTERFLY(t0, t1, W0, W1, d0, d1)
Definition: idct.c:61
attributes.h
LOG_MODULE
#define LOG_MODULE
Definition: libpng.c:32
STATE_BUFFER
@ STATE_BUFFER
Definition: mpeg2.h:120
hevc_decoder_s::frame_flags
int frame_flags
Definition: libopenhevc.c:50
hevc_decoder_t
struct hevc_decoder_s hevc_decoder_t
W6
#define W6
Definition: idct.c:55
ldq
#define ldq(p)
Definition: alpha_asm.h:75
mpeg2_video_decode_data
static void mpeg2_video_decode_data(video_decoder_t *this_gen, buf_element_t *buf_element)
Definition: xine_mpeg2new_decoder.c:118
mpeg2_video_decoder_s::mpeg2dec
mpeg2dec_t * mpeg2dec
Definition: xine_mpeg2new_decoder.c:59
video_out.h
hevc_decoder_s::pts
int64_t pts
Definition: libopenhevc.c:42
MPEG2_ACCEL_X86_3DNOW
#define MPEG2_ACCEL_X86_3DNOW
Definition: mpeg2.h:156
W5
#define W5
Definition: idct.c:54
mpeg2_sequence_s::frame_period
unsigned int frame_period
Definition: mpeg2.h:54
dec_data::image
const uint8_t * image
Definition: libpng.c:64
STATE_SLICE
@ STATE_SLICE
Definition: mpeg2.h:128
buf_element_s::pts
int64_t pts
Definition: buffer.h:345
more_rbsp_data
static uint32_t more_rbsp_data(bits_reader_t *br)
Definition: alterh264_bits_reader.h:50
mpeg2_video_decoder_s::img_state
img_state_t img_state[30]
Definition: xine_mpeg2new_decoder.c:64
vo_frame_s::height
int height
Definition: video_out.h:138
MPEG2_ACCEL_X86_MMX
#define MPEG2_ACCEL_X86_MMX
Definition: mpeg2.h:155
mpeg2_video_decoder_s::video_decoder
video_decoder_t video_decoder
Definition: xine_mpeg2new_decoder.c:58
EXPORTED
const plugin_info_t xine_plugin_info[] EXPORTED
Definition: xine_mpeg2new_decoder.c:502
NULL
NULL
Definition: xine_plugin.c:78
MM_ACCEL_X86_SSE3
#define MM_ACCEL_X86_SSE3
Definition: xineutils.h:169
mpeg2_init
void mpeg2_init(mpeg2dec_t *mpeg2dec, xine_video_port_t *output)
Definition: decode.c:57
mpeg2_video_flush
static void mpeg2_video_flush(video_decoder_t *this_gen)
Definition: xine_mpeg2new_decoder.c:306
png_decode_data
static void png_decode_data(video_decoder_t *this_gen, buf_element_t *buf)
Definition: libpng.c:314
mpeg2_clip
uint8_t mpeg2_clip[3840 *2+256]
Definition: idct.c:51
_png_decode_data
static vo_frame_t * _png_decode_data(png_decoder_t *this, const uint8_t *data, size_t size)
Definition: libpng.c:106
XINE_VERBOSITY_LOG
#define XINE_VERBOSITY_LOG
Definition: xine.h:425
png_decoder_s::pts
int64_t pts
Definition: libpng.c:50
xine_mm_accel
uint32_t xine_mm_accel(void)
Definition: cpu_accel.c:390
vo_frame_s::bad_frame
int bad_frame
Definition: video_out.h:111
mpeg2_info_s::display_fbuf
const mpeg2_fbuf_t * display_fbuf
Definition: mpeg2.h:110
hevc_decoder_s::handle
OpenHevc_Handle handle
Definition: libopenhevc.c:43
sextw
#define sextw(x)
Definition: alpha_asm.h:79
mpeg2_parse
mpeg2_state_t mpeg2_parse(mpeg2dec_t *mpeg2dec)
Definition: decode.c:152
idct_col
static void idct_col(int16_t *block)
Definition: idct.c:146
skip_bits
static void skip_bits(bits_reader_t *br, int nbits)
Definition: alterh264_bits_reader.h:115
mpeg2_mc_t
Definition: mpeg2_internal.h:284
hevc_flush
static void hevc_flush(video_decoder_t *this_gen)
Definition: libopenhevc.c:162
_x_abort
#define _x_abort()
Definition: xine_mpeg2new_decoder.c:50
decoder_info_t
Definition: xine_plugin.h:77
vo_frame_s::progressive_frame
int progressive_frame
Definition: video_out.h:125
mpeg2_info_s::discard_fbuf
const mpeg2_fbuf_t * discard_fbuf
Definition: mpeg2.h:111
width
unsigned int width
Definition: gfontrle.c:4
read_exp_se
static int32_t read_exp_se(bits_reader_t *br)
Definition: alterh264_bits_reader.h:143
_x_stream_info_set
void _x_stream_info_set(xine_stream_t *s, int info, int value)
Definition: info_helper.c:79
MPEG2_ACCEL_SPARC_VIS2
#define MPEG2_ACCEL_SPARC_VIS2
Definition: mpeg2.h:164
png_dispose
static void png_dispose(video_decoder_t *this_gen)
Definition: libpng.c:393
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition: xine_internal.h:57
vo_frame_s::repeat_first_field
int repeat_first_field
Definition: video_out.h:121
dec_data
Definition: libpng.c:62
mpeg2_sequence_s::picture_height
unsigned int picture_height
Definition: mpeg2.h:51
stl
#define stl(l, p)
Definition: alpha_asm.h:77
MM_ACCEL_X86_3DNOW
#define MM_ACCEL_X86_3DNOW
Definition: xineutils.h:165
MM_ACCEL_X86_AVX
#define MM_ACCEL_X86_AVX
Definition: xineutils.h:173
MM_ACCEL_X86_SSE
#define MM_ACCEL_X86_SSE
Definition: xineutils.h:167
vo_frame_s::duration
int duration
Definition: video_out.h:112
BUF_FLAG_SPECIAL
#define BUF_FLAG_SPECIAL
Definition: buffer.h:395
VO_CAP_FULLRANGE
#define VO_CAP_FULLRANGE
Definition: video_out.h:320
decoder_info_t::supported_types
const uint32_t * supported_types
Definition: xine_plugin.h:78
mpeg2_idct_add_alpha
void mpeg2_idct_add_alpha(int last, int16_t *block, uint8_t *dest, int stride)
_cpu_count
static int _cpu_count()
Definition: cpu_accel.c:445
dec_data::size
int size
Definition: libpng.c:65
_user_read
static void _user_read(png_structp png, png_bytep data, png_size_t length)
Definition: libpng.c:88
hevc_decoder_s::size
int size
Definition: libopenhevc.c:48
xine_cpu_count
int xine_cpu_count(void)
Definition: cpu_accel.c:489
open_plugin
static video_decoder_t * open_plugin(video_decoder_class_t *class_gen, xine_stream_t *stream)
Definition: libopenhevc.c:198
alpha_asm.h
png_decoder_s::vo_frame
vo_frame_t * vo_frame
Definition: libpng.c:52
hevc_decoder_s::bufsize
int bufsize
Definition: libopenhevc.c:47
idct_row
static void idct_row(int16_t *block)
Definition: idct.c:77
PIC_FLAG_TOP_FIELD_FIRST
#define PIC_FLAG_TOP_FIELD_FIRST
Definition: mpeg2.h:80
init_plugin
static void * init_plugin(xine_t *xine, const void *data)
Definition: xine_mpeg2new_decoder.c:480
mpeg2_sequence_s::byte_rate
unsigned int byte_rate
Definition: mpeg2.h:47
_user_error
static void _user_error(png_structp png, png_const_charp msg)
Definition: libpng.c:73
PLUGIN_VIDEO_DECODER
#define PLUGIN_VIDEO_DECODER
Definition: xine_plugin.h:33
_x_meta_info_set_utf8
void _x_meta_info_set_utf8(xine_stream_t *s, int info, const char *str)
Definition: info_helper.c:341
hevc_decoder_s::decoder_ok
int decoder_ok
Definition: libopenhevc.c:44
VO_BOTH_FIELDS
#define VO_BOTH_FIELDS
Definition: video_out.h:293
STATE_PICTURE
@ STATE_PICTURE
Definition: mpeg2.h:125
avg
#define avg(predictor, i)
Definition: motion_comp.c:97
buf_element_s
Definition: buffer.h:337
mpeg2_sequence_s::pixel_width
unsigned int pixel_width
Definition: mpeg2.h:53
MM_ACCEL_SPARC_VIS2
#define MM_ACCEL_SPARC_VIS2
Definition: xineutils.h:182
xine_buffer.h
XINE_VERBOSITY_DEBUG
#define XINE_VERBOSITY_DEBUG
Definition: xine.h:426
xine_stream_s::video_out
xine_video_port_t *volatile video_out
Definition: xine_internal.h:135
buffer.h
png_decoder_t
struct png_decoder_s png_decoder_t
MPEG2_ACCEL_X86_MMXEXT
#define MPEG2_ACCEL_X86_MMXEXT
Definition: mpeg2.h:157
VO_SET_FLAGS_CM
#define VO_SET_FLAGS_CM(cm, flags)
Definition: video_out.h:304
mpeg2_scan_alt
uint8_t mpeg2_scan_alt[64]
Definition: header.c:68
MM_ACCEL_X86_SSE4
#define MM_ACCEL_X86_SSE4
Definition: xineutils.h:171
dec_info_png
static const decoder_info_t dec_info_png
Definition: libpng.c:464
read_exp_ue
static uint32_t read_exp_ue(bits_reader_t *br)
Definition: alterh264_bits_reader.h:129
video_decoder_class_s
Definition: video_decoder.h:41
open_plugin
static video_decoder_t * open_plugin(video_decoder_class_t *class_gen, xine_stream_t *stream)
Definition: libpng.c:410
BUF_FLAG_STDHEADER
#define BUF_FLAG_STDHEADER
Definition: buffer.h:401
BUF_VIDEO_HEVC
#define BUF_VIDEO_HEVC
Definition: buffer.h:195
png_decoder_s
Definition: libpng.c:46
MM_ACCEL_X86_SSSE3
#define MM_ACCEL_X86_SSSE3
Definition: xineutils.h:170
XINE_STREAM_INFO_FRAME_DURATION
#define XINE_STREAM_INFO_FRAME_DURATION
Definition: xine.h:1015
mpeg2_video_decoder_s::ratio
double ratio
Definition: xine_mpeg2new_decoder.c:63
MM_ACCEL_X86_SSE42
#define MM_ACCEL_X86_SSE42
Definition: xineutils.h:172
buf_element_s::mem
unsigned char * mem
Definition: buffer.h:340
EXPORTED
const plugin_info_t xine_plugin_info[] EXPORTED
Definition: libopenhevc.c:260
png_discontinuity
static void png_discontinuity(video_decoder_t *this_gen)
Definition: libpng.c:387
xine_video_port_s::open
void(* open)(xine_video_port_t *self, xine_stream_t *stream)
Definition: video_out.h:183
vo_frame_s::format
int format
Definition: video_out.h:140
XINE_META_INFO_VIDEOCODEC
#define XINE_META_INFO_VIDEOCODEC
Definition: xine.h:1068
height
unsigned int height
Definition: gfontrle.c:5
MM_ACCEL_X86_SSE2
#define MM_ACCEL_X86_SSE2
Definition: xineutils.h:168
png_decoder_s::buf
uint8_t * buf
Definition: libpng.c:54
png_reset
static void png_reset(video_decoder_t *this_gen)
Definition: libpng.c:375
hevc_decoder_s::buf
unsigned char * buf
Definition: libopenhevc.c:46
bits_reader_t::offbits
int offbits
Definition: alterh264_bits_reader.h:33
MPEG2_ACCEL_X86_SSE3
#define MPEG2_ACCEL_X86_SSE3
Definition: mpeg2.h:159
mpeg2_internal.h
mpeg2_info_s
Definition: mpeg2.h:102
likely
#define likely(x)
Definition: attributes.h:31
hevc_discontinuity
static void hevc_discontinuity(video_decoder_t *this_gen)
Definition: libopenhevc.c:178
png_decoder_s::buf_size
int buf_size
Definition: libpng.c:55
mpeg2_mc_alpha
mpeg2_mc_t mpeg2_mc_alpha
mpeg2_video_print_bad_state
static void mpeg2_video_print_bad_state(img_state_t *img_state)
Definition: xine_mpeg2new_decoder.c:71
rgb2yuy2_alloc
rgb2yuy2_t * rgb2yuy2_alloc(int color_matrix, const char *format)
Definition: color.c:1768
mpeg2_info_s::current_fbuf
const mpeg2_fbuf_t * current_fbuf
Definition: mpeg2.h:107
png_flush
static void png_flush(video_decoder_t *this_gen)
Definition: libpng.c:363
mpeg2_idct_copy_mvi
void mpeg2_idct_copy_mvi(int16_t *block, uint8_t *dest, int stride)
bits_reader_t::length
int length
Definition: alterh264_bits_reader.h:33
MM_ACCEL_SPARC_VIS
#define MM_ACCEL_SPARC_VIS
Definition: xineutils.h:181
open_plugin
static video_decoder_t * open_plugin(video_decoder_class_t *class_gen, xine_stream_t *stream)
Definition: xine_mpeg2new_decoder.c:453
BUF_VIDEO_MPEG
#define BUF_VIDEO_MPEG
Definition: buffer.h:90
mpeg2_reset
void mpeg2_reset(mpeg2dec_t *mpeg2dec)
Definition: decode.c:741
vo_frame_s::draw
int(* draw)(vo_frame_t *vo_img, xine_stream_t *stream)
Definition: video_out.h:91
buf_element_s::content
unsigned char * content
Definition: buffer.h:341
png_decoder_s::stream
xine_stream_t * stream
Definition: libpng.c:49
hevc_decode_data
static void hevc_decode_data(video_decoder_t *this_gen, buf_element_t *buf)
Definition: libopenhevc.c:55
bits_reader_shift
static uint8_t bits_reader_shift(bits_reader_t *br)
Definition: alterh264_bits_reader.h:68
img_state_t::img
vo_frame_t * img
Definition: xine_mpeg2new_decoder.c:54
PLUGIN_NONE
#define PLUGIN_NONE
Definition: xine_plugin.h:29
mpeg2_state_t
mpeg2_state_t
Definition: mpeg2.h:119
bits_reader_t::start
const uint8_t * start
Definition: alterh264_bits_reader.h:32
mpeg2_sequence_s::flags
uint32_t flags
Definition: mpeg2.h:49
xine_internal.h
mpeg2_fbuf_s
Definition: mpeg2.h:97
BUF_SPECIAL_ASPECT
#define BUF_SPECIAL_ASPECT
Definition: buffer.h:479
init_class
static void * init_class(xine_t *xine, const void *data)
Definition: libpng.c:443
rgb2yuy2_s
Definition: color.c:1752
mpeg2_idct_copy_alpha
void mpeg2_idct_copy_alpha(int16_t *block, uint8_t *dest, int stride)
buf_element_s::decoder_flags
uint32_t decoder_flags
Definition: buffer.h:350
VO_TOP_FIELD
#define VO_TOP_FIELD
Definition: video_out.h:291
config.h
VO_CAP_YUY2
#define VO_CAP_YUY2
Definition: video_out.h:308
vo_frame_s
Definition: video_out.h:59
mpeg2_video_free_all
static void mpeg2_video_free_all(img_state_t *img_state)
Definition: xine_mpeg2new_decoder.c:87
MPEG2_ACCEL_X86_SSE2
#define MPEG2_ACCEL_X86_SSE2
Definition: mpeg2.h:158
hevc_decoder_s
Definition: libopenhevc.c:37
stq
#define stq(l, p)
Definition: alpha_asm.h:78
STATE_END
@ STATE_END
Definition: mpeg2.h:129
mpeg2_detect_accel
uint32_t mpeg2_detect_accel(uint32_t accel)
Definition: cpu_accel.c:252
supported_types
static const uint32_t supported_types[]
Definition: xine_mpeg2new_decoder.c:495
supported_types
static const uint32_t supported_types[]
Definition: libpng.c:462
mpeg2_video_decoder_s::frame_number
uint32_t frame_number
Definition: xine_mpeg2new_decoder.c:65
mpeg2_info_s::current_picture
const mpeg2_picture_t * current_picture
Definition: mpeg2.h:105
rgb2yv12_slice
void rgb2yv12_slice(rgb2yuy2_t *rgb2yuy2, const uint8_t *src, int src_stride, uint8_t *y_dst, int y_pitch, uint8_t *u_dst, int u_pitch, uint8_t *v_dst, int v_pitch, int width, int height)
Definition: color.c:2231
png_decoder_s::error
uint8_t error
Definition: libpng.c:57
vo_frame_s::width
int width
Definition: video_out.h:138
mpeg2_close
void mpeg2_close(mpeg2dec_t *mpeg2dec)
Definition: decode.c:811
png_decoder_s::video_open
uint8_t video_open
Definition: libpng.c:58
malloc_hook
static void *(* malloc_hook)(unsigned size, mpeg2_alloc_t reason)
Definition: alloc.c:29
dec_info_mpeg2
static const decoder_info_t dec_info_mpeg2
Definition: xine_mpeg2new_decoder.c:497
bits_reader_set
static void bits_reader_set(bits_reader_t *br, const uint8_t *buf, int len)
Definition: alterh264_bits_reader.h:39
init_plugin
static void * init_plugin(xine_t *xine, const void *data)
Definition: libopenhevc.c:231
vo_frame_s::base
uint8_t * base[3]
Definition: video_out.h:116
BYTE_VEC
static uint64_t BYTE_VEC(uint64_t x)
Definition: alpha_asm.h:61
mpeg2_set_buf
void mpeg2_set_buf(mpeg2dec_t *mpeg2dec, uint8_t *buf[3], void *id)
Definition: decode.c:328
video_decoder_class_s::open_plugin
video_decoder_t *(* open_plugin)(video_decoder_class_t *this_gen, xine_stream_t *stream)
Definition: video_decoder.h:46
xine_buffer_init
void * xine_buffer_init(int chunk_size)
Definition: xine_buffer.c:129
hevc_reset
static void hevc_reset(video_decoder_t *this_gen)
Definition: libopenhevc.c:169
mpeg2_buffer
void mpeg2_buffer(mpeg2dec_t *mpeg2dec, uint8_t *start, uint8_t *end)
Definition: decode.c:111
mpeg2_video_decoder_t
struct mpeg2_video_decoder_s mpeg2_video_decoder_t
mpeg2_sequence_s
Definition: mpeg2.h:44
mpeg2_scan_norm
uint8_t mpeg2_scan_norm[64]
Definition: header.c:55
EXPORTED
const plugin_info_t xine_plugin_info[] EXPORTED
Definition: libpng.c:469
MM_ACCEL_PPC_ALTIVEC
#define MM_ACCEL_PPC_ALTIVEC
Definition: xineutils.h:176
XINE_IMGFMT_YUY2
#define XINE_IMGFMT_YUY2
Definition: xine.h:495
mpeg2_video_decoder_s::force_pan_scan
int force_pan_scan
Definition: xine_mpeg2new_decoder.c:62
rgb2yuy2_free
void rgb2yuy2_free(rgb2yuy2_t *rgb2yuy2)
Definition: color.c:1943
plugin_info_t
Definition: xine_plugin.h:55
MM_ACCEL_X86_MMXEXT
#define MM_ACCEL_X86_MMXEXT
Definition: xineutils.h:166
xprintf
#define xprintf(xine, verbose,...)
Definition: xineutils.h:664
mpeg2_info_s::sequence
const mpeg2_sequence_t * sequence
Definition: mpeg2.h:103
N_
#define N_(String)
Definition: xineintl.h:47
vo_frame_s::free
void(* free)(vo_frame_t *vo_img)
Definition: video_out.h:100
BUF_FLAG_PREVIEW
#define BUF_FLAG_PREVIEW
Definition: buffer.h:380
VO_PROP_MAX_VIDEO_HEIGHT
#define VO_PROP_MAX_VIDEO_HEIGHT
Definition: video_out.h:274
mpeg2_free
void mpeg2_free(void *buf)
Definition: alloc.c:56