Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
ea23960c
Commit
ea23960c
authored
Jan 04, 2000
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
video_fifo.c et vpar_headers.c compilent � peu pr�s. Correction d'environ
4212 fautes de frappe.
parent
56bb1291
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
139 additions
and
101 deletions
+139
-101
include/video_fifo.h
include/video_fifo.h
+2
-2
include/vpar_blocks.h
include/vpar_blocks.h
+12
-0
include/vpar_headers.h
include/vpar_headers.h
+6
-3
src/video_parser/video_fifo.c
src/video_parser/video_fifo.c
+36
-31
src/video_parser/vpar_headers.c
src/video_parser/vpar_headers.c
+83
-65
No files found.
include/video_fifo.h
View file @
ea23960c
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
*****************************************************************************
*****************************************************************************
* This rotative FIFO contains undecoded macroblocks that are to be decoded
* This rotative FIFO contains undecoded macroblocks that are to be decoded
*****************************************************************************/
*****************************************************************************/
struct
v
ideo_parser
_s
;
struct
v
par_thread
_s
;
typedef
struct
video_fifo_s
typedef
struct
video_fifo_s
{
{
...
@@ -43,7 +43,7 @@ typedef struct video_fifo_s
...
@@ -43,7 +43,7 @@ typedef struct video_fifo_s
int
i_start
;
int
i_start
;
int
i_end
;
int
i_end
;
struct
v
ideo_parser_s
*
p_vpar
;
struct
v
par_thread_s
*
p_vpar
;
}
video_fifo_t
;
}
video_fifo_t
;
/*****************************************************************************
/*****************************************************************************
...
...
include/vpar_blocks.h
View file @
ea23960c
...
@@ -77,3 +77,15 @@ typedef struct
...
@@ -77,3 +77,15 @@ typedef struct
#define MOTION_FRAME 2
#define MOTION_FRAME 2
#define MOTION_16X8 2
#define MOTION_16X8 2
#define MOTION_DMV 3
#define MOTION_DMV 3
/*****************************************************************************
* Prototypes
*****************************************************************************/
void
vpar_CodedPattern420
(
struct
vpar_thread_s
*
p_vpar
);
void
vpar_CodedPattern422
(
struct
vpar_thread_s
*
p_vpar
);
void
vpar_CodedPattern444
(
struct
vpar_thread_s
*
p_vpar
);
int
vpar_IMBType
(
struct
vpar_thread_s
*
p_vpar
);
int
vpar_PMBType
(
struct
vpar_thread_s
*
p_vpar
);
int
vpar_BMBType
(
struct
vpar_thread_s
*
p_vpar
);
int
vpar_DMBType
(
struct
vpar_thread_s
*
p_vpar
);
include/vpar_headers.h
View file @
ea23960c
...
@@ -20,7 +20,9 @@
...
@@ -20,7 +20,9 @@
*****************************************************************************/
*****************************************************************************/
struct
vpar_thread_s
;
struct
vpar_thread_s
;
typedef
void
(
*
f_slice_header_t
)(
struct
vpar_thread_s
*
,
int
*
,
int
,
elem_t
*
,
u32
);
typedef
void
(
*
f_slice_header_t
)(
struct
vpar_thread_s
*
,
int
*
,
int
,
u32
);
typedef
void
(
*
f_chroma_pattern_t
)(
struct
vpar_thread_s
*
);
typedef
int
(
*
f_macroblock_type_t
)(
struct
vpar_thread_s
*
);
/*****************************************************************************
/*****************************************************************************
* quant_matrix_t : Quantization Matrix
* quant_matrix_t : Quantization Matrix
...
@@ -53,7 +55,7 @@ typedef struct sequence_s
...
@@ -53,7 +55,7 @@ typedef struct sequence_s
quant_matrix_t
intra_quant
,
nonintra_quant
;
quant_matrix_t
intra_quant
,
nonintra_quant
;
quant_matrix_t
chroma_intra_quant
,
chroma_nonintra_quant
;
quant_matrix_t
chroma_intra_quant
,
chroma_nonintra_quant
;
void
(
*
pf_decode_mv
)(
struct
vpar_thread_s
*
,
int
);
void
(
*
pf_decode_mv
)(
struct
vpar_thread_s
*
,
int
);
void
(
*
pf_decode_pattern
)(
struct
vpar_thread_s
*
)
;
f_chroma_pattern_t
pf_decode_pattern
;
/* Parser context */
/* Parser context */
picture_t
*
p_forward
;
picture_t
*
p_forward
;
...
@@ -79,6 +81,7 @@ typedef struct picture_parsing_s
...
@@ -79,6 +81,7 @@ typedef struct picture_parsing_s
int
ppi_f_code
[
2
][
2
];
int
ppi_f_code
[
2
][
2
];
int
i_intra_dc_precision
;
int
i_intra_dc_precision
;
boolean_t
b_frame_pred_frame_dct
,
b_q_scale_type
;
boolean_t
b_frame_pred_frame_dct
,
b_q_scale_type
;
boolean_t
b_intra_vlc_format
;
boolean_t
b_alternate_scan
,
b_progressive_frame
;
boolean_t
b_alternate_scan
,
b_progressive_frame
;
boolean_t
b_top_field_first
,
b_concealment_mv
;
boolean_t
b_top_field_first
,
b_concealment_mv
;
boolean_t
b_repeat_first_field
;
boolean_t
b_repeat_first_field
;
...
@@ -93,7 +96,7 @@ typedef struct picture_parsing_s
...
@@ -93,7 +96,7 @@ typedef struct picture_parsing_s
/* Relative to the current field */
/* Relative to the current field */
int
i_coding_type
,
i_structure
;
int
i_coding_type
,
i_structure
;
boolean_t
b_frame_structure
;
boolean_t
b_frame_structure
;
int
(
*
pf_macroblock_type
)(
struct
vpar_thread_s
*
)
;
f_macroblock_type_t
pf_macroblock_type
;
boolean_t
b_error
;
boolean_t
b_error
;
}
picture_parsing_t
;
}
picture_parsing_t
;
...
...
src/video_parser/video_fifo.c
View file @
ea23960c
...
@@ -28,11 +28,15 @@
...
@@ -28,11 +28,15 @@
#include "decoder_fifo.h"
#include "decoder_fifo.h"
#include "video.h"
#include "video.h"
#include "video_output.h"
#include "video_output.h"
#include "video_parser.h"
#include "macroblock.h"
#include "vdec_idct.h"
#include "video_fifo.h"
#include "video_decoder.h"
#include "video_decoder.h"
#include "vdec_motion.h"
#include "vpar_blocks.h"
#include "vpar_headers.h"
#include "video_fifo.h"
#include "video_parser.h"
/*****************************************************************************
/*****************************************************************************
* vpar_InitFIFO : initialize the video FIFO
* vpar_InitFIFO : initialize the video FIFO
...
@@ -42,19 +46,20 @@ void vpar_InitFIFO( vpar_thread_t * p_vpar )
...
@@ -42,19 +46,20 @@ void vpar_InitFIFO( vpar_thread_t * p_vpar )
int
i_dummy
;
int
i_dummy
;
/* Initialize mutex and cond */
/* Initialize mutex and cond */
vlc_mutex_init
(
p_vpar
->
vfifo
.
lock
);
vlc_mutex_init
(
&
p_vpar
->
vfifo
.
lock
);
vlc_cond_init
(
p_vpar
->
vfifo
.
wait
);
vlc_cond_init
(
&
p_vpar
->
vfifo
.
wait
);
vlc_mutex_init
(
p_vpar
->
vbuffer
.
lock
);
vlc_mutex_init
(
&
p_vpar
->
vbuffer
.
lock
);
/* Initialize FIFO properties */
/* Initialize FIFO properties */
p_vpar
->
vfifo
.
i_start
=
p_vpar
->
vfifo
.
i_end
=
0
;
p_vpar
->
vfifo
.
i_start
=
p_vpar
->
vfifo
.
i_end
=
0
;
p_vpar
->
vfifo
.
p_vpar
=
p_vpar
;
p_vpar
->
vfifo
.
p_vpar
=
p_vpar
;
/* Initialize buffer properties */
/* Initialize buffer properties */
i_index
=
VFIFO_SIZE
;
/* all structures are available */
p_vpar
->
vbuffer
.
i_index
=
VFIFO_SIZE
;
/* all structures are available */
for
(
i_dummy
=
0
;
i_dummy
<
VFIFO_SIZE
+
1
;
i_dummy
++
)
for
(
i_dummy
=
0
;
i_dummy
<
VFIFO_SIZE
+
1
;
i_dummy
++
)
{
{
p_vpar
->
vfifo
.
pp_mb_free
[
i_dummy
]
=
p_vpar
->
vfifo
.
p_macroblocks
+
i
;
p_vpar
->
vbuffer
.
pp_mb_free
[
i_dummy
]
=
p_vpar
->
vbuffer
.
p_macroblocks
+
i_dummy
;
}
}
}
}
...
@@ -91,18 +96,18 @@ macroblock_t * vpar_NewMacroblock( video_fifo_t * p_fifo )
...
@@ -91,18 +96,18 @@ macroblock_t * vpar_NewMacroblock( video_fifo_t * p_fifo )
{
{
macroblock_t
*
p_mb
;
macroblock_t
*
p_mb
;
#define P_buffer p_fifo->p_vpar
.
vbuffer
#define P_buffer p_fifo->p_vpar
->
vbuffer
vlc_mutex_lock
(
&
P_buffer
->
lock
);
vlc_mutex_lock
(
&
P_buffer
.
lock
);
if
(
P_buffer
.
i_index
==
-
1
)
if
(
P_buffer
.
i_index
==
-
1
)
{
{
/* No more structures available. This should not happen ! */
/* No more structures available. This should not happen ! */
return
NULL
;
return
NULL
;
}
}
p_mb
=
P_buffer
->
pp_undec_free
[
P_buffer
->
i_index
--
];
p_mb
=
P_buffer
.
pp_mb_free
[
P_buffer
.
i_index
--
];
#undef P_buffer
vlc_mutex_unlock
(
&
P_buffer
->
lock
);
vlc_mutex_unlock
(
&
P_buffer
.
lock
);
#undef P_buffer
return
(
p_mb
);
return
(
p_mb
);
}
}
...
@@ -130,19 +135,19 @@ void vpar_ReleaseMacroblock( video_fifo_t * p_fifo, macroblock_t * p_mb )
...
@@ -130,19 +135,19 @@ void vpar_ReleaseMacroblock( video_fifo_t * p_fifo, macroblock_t * p_mb )
/* Unlink referenced pictures */
/* Unlink referenced pictures */
if
(
p_mb
->
p_forw_top
!=
NULL
)
if
(
p_mb
->
p_forw_top
!=
NULL
)
{
{
vout_UnlinkPicture
(
p_fifo
->
p_vpar
.
p_vout
,
p_mb
->
p_forw_top
);
vout_UnlinkPicture
(
p_fifo
->
p_vpar
->
p_vout
,
p_mb
->
p_forw_top
);
}
}
if
(
p_mb
->
p_backw_top
!=
NULL
)
if
(
p_mb
->
p_backw_top
!=
NULL
)
{
{
vout_UnlinkPicture
(
p_fifo
->
p_vpar
.
p_vout
,
p_mb
->
p_backw_top
);
vout_UnlinkPicture
(
p_fifo
->
p_vpar
->
p_vout
,
p_mb
->
p_backw_top
);
}
}
if
(
p_mb
->
p_forw_bot
!=
NULL
)
if
(
p_mb
->
p_forw_bot
!=
NULL
)
{
{
vout_UnlinkPicture
(
p_fifo
->
p_vpar
.
p_vout
,
p_mb
->
p_forw_bot
);
vout_UnlinkPicture
(
p_fifo
->
p_vpar
->
p_vout
,
p_mb
->
p_forw_bot
);
}
}
if
(
p_mb
->
p_backw_bot
!=
NULL
)
if
(
p_mb
->
p_backw_bot
!=
NULL
)
{
{
vout_UnlinkPicture
(
p_fifo
->
p_vpar
.
p_vout
,
p_mb
->
p_backw_bot
);
vout_UnlinkPicture
(
p_fifo
->
p_vpar
->
p_vout
,
p_mb
->
p_backw_bot
);
}
}
/* Unlink picture buffer */
/* Unlink picture buffer */
...
@@ -151,7 +156,7 @@ void vpar_ReleaseMacroblock( video_fifo_t * p_fifo, macroblock_t * p_mb )
...
@@ -151,7 +156,7 @@ void vpar_ReleaseMacroblock( video_fifo_t * p_fifo, macroblock_t * p_mb )
if
(
p_mb
->
p_picture
->
i_deccount
==
0
)
if
(
p_mb
->
p_picture
->
i_deccount
==
0
)
{
{
/* Mark the picture to be displayed */
/* Mark the picture to be displayed */
vout_DisplayPicture
(
p_fifo
->
p_vpar
.
p_vout
,
p_mb
->
p_picture
);
vout_DisplayPicture
(
p_fifo
->
p_vpar
->
p_vout
,
p_mb
->
p_picture
);
/* Warn Synchro for its records. */
/* Warn Synchro for its records. */
vpar_SynchroEnd
(
p_fifo
->
p_vpar
);
vpar_SynchroEnd
(
p_fifo
->
p_vpar
);
...
@@ -159,10 +164,10 @@ void vpar_ReleaseMacroblock( video_fifo_t * p_fifo, macroblock_t * p_mb )
...
@@ -159,10 +164,10 @@ void vpar_ReleaseMacroblock( video_fifo_t * p_fifo, macroblock_t * p_mb )
vlc_mutex_unlock
(
&
p_mb
->
p_picture
->
lock_deccount
);
vlc_mutex_unlock
(
&
p_mb
->
p_picture
->
lock_deccount
);
/* Release the macroblock_t structure */
/* Release the macroblock_t structure */
#define P_buffer p_fifo->p_vpar
.
vbuffer
#define P_buffer p_fifo->p_vpar
->
vbuffer
vlc_mutex_lock
(
&
P_buffer
->
lock
);
vlc_mutex_lock
(
&
P_buffer
.
lock
);
P_buffer
->
pp_mb_free
[
++
P_buffer
->
i_index
]
=
p_mb
;
P_buffer
.
pp_mb_free
[
++
P_buffer
.
i_index
]
=
p_mb
;
vlc_mutex_unlock
(
&
P_buffer
->
lock
);
vlc_mutex_unlock
(
&
P_buffer
.
lock
);
#undef P_buffer
#undef P_buffer
}
}
...
@@ -174,25 +179,25 @@ void vpar_DestroyMacroblock( video_fifo_t * p_fifo, macroblock_t * p_mb )
...
@@ -174,25 +179,25 @@ void vpar_DestroyMacroblock( video_fifo_t * p_fifo, macroblock_t * p_mb )
/* Unlink referenced pictures */
/* Unlink referenced pictures */
if
(
p_mb
->
p_forw_top
!=
NULL
)
if
(
p_mb
->
p_forw_top
!=
NULL
)
{
{
vout_UnlinkPicture
(
p_fifo
->
p_vpar
.
p_vout
,
p_mb
->
p_forw_top
);
vout_UnlinkPicture
(
p_fifo
->
p_vpar
->
p_vout
,
p_mb
->
p_forw_top
);
}
}
if
(
p_mb
->
p_backw_top
!=
NULL
)
if
(
p_mb
->
p_backw_top
!=
NULL
)
{
{
vout_UnlinkPicture
(
p_fifo
->
p_vpar
.
p_vout
,
p_mb
->
p_backw_top
);
vout_UnlinkPicture
(
p_fifo
->
p_vpar
->
p_vout
,
p_mb
->
p_backw_top
);
}
}
if
(
p_mb
->
p_forw_bot
!=
NULL
)
if
(
p_mb
->
p_forw_bot
!=
NULL
)
{
{
vout_UnlinkPicture
(
p_fifo
->
p_vpar
.
p_vout
,
p_mb
->
p_forw_bot
);
vout_UnlinkPicture
(
p_fifo
->
p_vpar
->
p_vout
,
p_mb
->
p_forw_bot
);
}
}
if
(
p_mb
->
p_backw_bot
!=
NULL
)
if
(
p_mb
->
p_backw_bot
!=
NULL
)
{
{
vout_UnlinkPicture
(
p_fifo
->
p_vpar
.
p_vout
,
p_mb
->
p_backw_bot
);
vout_UnlinkPicture
(
p_fifo
->
p_vpar
->
p_vout
,
p_mb
->
p_backw_bot
);
}
}
/* Release the macroblock_t structure */
/* Release the macroblock_t structure */
#define P_buffer p_fifo->p_vpar
.
vbuffer
#define P_buffer p_fifo->p_vpar
->
vbuffer
vlc_mutex_lock
(
&
P_buffer
->
lock
);
vlc_mutex_lock
(
&
P_buffer
.
lock
);
P_buffer
->
pp_mb_free
[
++
P_buffer
->
i_index
]
=
p_mb
;
P_buffer
.
pp_mb_free
[
++
P_buffer
.
i_index
]
=
p_mb
;
vlc_mutex_unlock
(
&
P_buffer
->
lock
);
vlc_mutex_unlock
(
&
P_buffer
.
lock
);
#undef P_buffer
#undef P_buffer
}
}
src/video_parser/vpar_headers.c
View file @
ea23960c
This diff is collapsed.
Click to expand it.
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