Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
a1c4ba2f
Commit
a1c4ba2f
authored
Dec 26, 2003
by
Rocky Bernstein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keep in synch with rest of source. Should also have no effect on upcoming release
parent
1170be35
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
134 additions
and
180 deletions
+134
-180
modules/codec/ogt/ogt.c
modules/codec/ogt/ogt.c
+71
-125
modules/codec/ogt/ogt.h
modules/codec/ogt/ogt.h
+63
-55
No files found.
modules/codec/ogt/ogt.c
View file @
a1c4ba2f
This diff is collapsed.
Click to expand it.
modules/codec/ogt/ogt.h
View file @
a1c4ba2f
...
...
@@ -2,7 +2,7 @@
* ogt.h : Overlay Graphics Text (SVCD subtitles) decoder thread interface
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: ogt.h,v 1.
3 2003/12/22 14:32:55 sam
Exp $
* $Id: ogt.h,v 1.
4 2003/12/26 02:47:59 rocky
Exp $
*
* Author: Rocky Bernstein
* based on code from:
...
...
@@ -27,7 +27,8 @@
#define DECODE_DBG_EXT 1
/* Calls from external routines */
#define DECODE_DBG_CALL 2
/* all calls */
#define DECODE_DBG_PACKET 4
/* packet assembly info */
#define DECODE_DBG_INFO 8
#define DECODE_DBG_IMAGE 8
/* image bitmaps */
#define DECODE_DBG_INFO 16
#define DECODE_DEBUG 1
#if DECODE_DEBUG
...
...
@@ -46,54 +47,68 @@
#define GETINT32(p) ( (p[0] << 24) + (p[1] << 16) + \
(p[2] << 8) + (p[3]) ) ; p += 4;
/* The number of color palette entries allowed in a subtitle. */
#define NUM_SUBTITLE_COLORS 4
typedef
enum
{
SUBTITLE_BLOCK_EMPTY
,
SUBTITLE_BLOCK_PARTIAL
,
SUBTITLE_BLOCK_COMPLETE
}
packet_state_t
;
/* FIXME: REMOVE THE BELOW. */
/* Color and transparency of a pixel or a palette (CLUT) entry */
typedef
struct
ogt_yuvt_val_s
{
uint8_t
y
;
uint8_t
u
;
uint8_t
v
;
uint8_t
t
;
}
ogt_yuvt_val_t
;
}
ogt_yuvt_t
;
/* The storage used by one pixel */
#define PIXEL_SIZE 4
/* Size in bytes of YUV portion above. */
#define YUV_SIZE 3
/* Transparency plane. NOTE: see vlc_video.h for V_PLANE */
#define T_PLANE V_PLANE+1
struct
decoder_sys_t
{
int
i_debug
;
/* debugging mask */
int
b_packetizer
;
mtime_t
i_pts
;
/* Start PTS of subtitle block */
int
i_spu_size
;
/* size of the allocated subtitle_data */
int
i_spu
;
packet_state_t
state
;
/* data-gathering state for this subtitle */
uint16_t
i_image
;
/* image number in the subtitle stream; 0 is the
first one. */
uint8_t
i_packet
;
/* packet number for above image number; 0 is the
uint8_t
i_packet
;
/* packet number for above image number; 0 is the
first one. */
block_t
*
p_block
;
/* Bytes of the packet. */
block_t
*
p_block
;
/* Bytes of the packet. */
uint8_t
buffer
[
65536
+
20
];
/* we will never overflow more than 11 bytes if I'm right */
uint8_t
buffer
[
65536
+
20
];
/* we will never overflow more than 11
bytes if I'm right */
int
b_packetizer
;
int
i_spu_size
;
/* goal for subtitle_data_pos while gathering,
size of used subtitle_data later */
vout_thread_t
*
p_vout
;
/* FIXME: Remove this? */
uint8_t
*
subtitle_data
;
/* buffer used to accumulate data from
successive packets in the same subtitle */
int
subtitle_data_size
;
/* size of the allocated subtitle_data */
/* Move into subpicture_sys_t? */
uint16_t
comp_image_offset
;
/* offset from subtitle_data to compressed
image data */
int
comp_image_length
;
/* size of the compressed image data */
int
first_field_offset
;
int
second_field_offset
;
int
second_field_offset
;
/* offset of odd raster lines */
int
metadata_offset
;
/* offset to data describing the image */
int
metadata_length
;
/* length of metadata */
int
subtitle_data_pos
;
/* where to write next chunk */
int
subtitle_data_length
;
/* goal for subtitle_data_pos while gathering,
length of used subtitle_data later */
uint32_t
i_duration
;
/* how long to display the image, 0 stands
for "until next subtitle" */
...
...
@@ -102,7 +117,7 @@ struct decoder_sys_t
image when displayed */
uint16_t
i_width
,
i_height
;
/* dimensions in pixels of image */
ogt_yuvt_
val_t
pi_palette
[
4
];
ogt_yuvt_
t
pi_palette
[
NUM_SUBTITLE_COLORS
];
uint8_t
i_options
;
uint8_t
i_options2
;
...
...
@@ -114,17 +129,10 @@ struct subpicture_sys_t
{
mtime_t
i_pts
;
/* presentation timestamp */
int
pi_offset
[
2
];
/* byte offsets to data */
void
*
p_data
;
u_int8_t
*
p_data
;
/* Image data one byte T, Y, U, V */
/* Color information */
vlc_bool_t
b_palette
;
ogt_yuvt_val_t
pi_palette
[
4
];
#ifndef FIXED
uint8_t
pi_alpha
[
4
];
uint8_t
pi_yuv
[
4
][
3
];
#endif
/* Link to our input */
vlc_object_t
*
p_input
;
...
...
@@ -138,7 +146,7 @@ struct subpicture_sys_t
/*****************************************************************************
* Prototypes
*****************************************************************************/
void
E_
(
ParseHeader
)(
decoder_t
*
,
uint8_t
*
,
block_t
*
);
void
E_
(
ParsePacket
)(
decoder_t
*
);
void
E_
(
RenderSPU
)
(
vout_thread_t
*
,
picture_t
*
,
const
subpicture_t
*
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment