Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
653053d2
Commit
653053d2
authored
Jan 19, 2000
by
Jean-Marc Dressler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avancement du debuggage du motion.
--Meuuh+Stef+Polux+Jimmy
parent
a47bce5f
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
37 deletions
+52
-37
src/video_decoder/vdec_motion.c
src/video_decoder/vdec_motion.c
+7
-3
src/video_decoder/video_decoder.c
src/video_decoder/video_decoder.c
+1
-1
src/video_parser/video_fifo.c
src/video_parser/video_fifo.c
+5
-5
src/video_parser/vpar_blocks.c
src/video_parser/vpar_blocks.c
+14
-4
src/video_parser/vpar_headers.c
src/video_parser/vpar_headers.c
+21
-20
src/video_parser/vpar_motion.c
src/video_parser/vpar_motion.c
+2
-2
src/video_parser/vpar_synchro.c
src/video_parser/vpar_synchro.c
+2
-2
No files found.
src/video_decoder/vdec_motion.c
View file @
653053d2
...
@@ -79,7 +79,10 @@ static void __inline__ MotionComponent( yuv_data_t * p_src, yuv_data_t * p_dest,
...
@@ -79,7 +79,10 @@ static void __inline__ MotionComponent( yuv_data_t * p_src, yuv_data_t * p_dest,
{
{
for
(
i_x
=
0
;
i_x
<
i_width
;
i_x
+=
8
)
for
(
i_x
=
0
;
i_x
<
i_width
;
i_x
+=
8
)
{
{
memcpy
(
&
p_dest
[
i_x
],
&
p_src
[
i_x
],
8
*
sizeof
(
yuv_data_t
)
);
for
(
i_x1
=
0
;
i_x1
<
8
;
i_x1
++
)
{
p_dest
[
i_x
+
i_x1
]
=
p_src
[
i_x
+
i_x1
];
}
}
}
p_dest
+=
i_x_step
;
p_dest
+=
i_x_step
;
p_src
+=
i_x_step
;
p_src
+=
i_x_step
;
...
@@ -219,7 +222,6 @@ static void __inline__ MotionComponent( yuv_data_t * p_src, yuv_data_t * p_dest,
...
@@ -219,7 +222,6 @@ static void __inline__ MotionComponent( yuv_data_t * p_src, yuv_data_t * p_dest,
}
}
}
}
break
;
break
;
}
}
}
}
...
@@ -445,6 +447,7 @@ void vdec_MotionFrameDMV( macroblock_t * p_mb )
...
@@ -445,6 +447,7 @@ void vdec_MotionFrameDMV( macroblock_t * p_mb )
*****************************************************************************/
*****************************************************************************/
void
vdec_Motion420
(
macroblock_t
*
p_mb
,
motion_arg_t
*
p_motion
)
void
vdec_Motion420
(
macroblock_t
*
p_mb
,
motion_arg_t
*
p_motion
)
{
{
p_motion
->
i_mv_x
=
p_motion
->
i_mv_y
=
0
;
/* Luminance */
/* Luminance */
MotionComponent
(
/* source */
MotionComponent
(
/* source */
p_motion
->
p_source
->
p_y
p_motion
->
p_source
->
p_y
...
@@ -495,6 +498,7 @@ void vdec_Motion420( macroblock_t * p_mb, motion_arg_t * p_motion )
...
@@ -495,6 +498,7 @@ void vdec_Motion420( macroblock_t * p_mb, motion_arg_t * p_motion )
(
p_motion
->
b_average
<<
2
)
(
p_motion
->
b_average
<<
2
)
|
(((
p_motion
->
i_mv_y
/
2
)
&
1
)
<<
1
)
|
(((
p_motion
->
i_mv_y
/
2
)
&
1
)
<<
1
)
|
((
p_motion
->
i_mv_x
/
2
)
&
1
)
);
|
((
p_motion
->
i_mv_x
/
2
)
&
1
)
);
}
}
/*****************************************************************************
/*****************************************************************************
...
...
src/video_decoder/video_decoder.c
View file @
653053d2
src/video_parser/video_fifo.c
View file @
653053d2
...
@@ -155,14 +155,14 @@ fprintf(stderr, "Image decodee\n");
...
@@ -155,14 +155,14 @@ fprintf(stderr, "Image decodee\n");
vpar_SynchroEnd
(
p_fifo
->
p_vpar
);
vpar_SynchroEnd
(
p_fifo
->
p_vpar
);
/* Unlink referenced pictures */
/* Unlink referenced pictures */
/*
if( p_mb->p_forward != NULL )
if
(
p_mb
->
p_forward
!=
NULL
)
{
{
vout_UnlinkPicture
(
p_fifo
->
p_vpar
->
p_vout
,
p_mb
->
p_forward
);
vout_UnlinkPicture
(
p_fifo
->
p_vpar
->
p_vout
,
p_mb
->
p_forward
);
}
}
if
(
p_mb
->
p_backward
!=
NULL
)
if
(
p_mb
->
p_backward
!=
NULL
)
{
{
vout_UnlinkPicture
(
p_fifo
->
p_vpar
->
p_vout
,
p_mb
->
p_backward
);
vout_UnlinkPicture
(
p_fifo
->
p_vpar
->
p_vout
,
p_mb
->
p_backward
);
}
*/
}
}
}
/* Release the macroblock_t structure */
/* Release the macroblock_t structure */
...
@@ -197,14 +197,14 @@ fprintf(stderr, "Image trashee\n");
...
@@ -197,14 +197,14 @@ fprintf(stderr, "Image trashee\n");
vpar_SynchroEnd
(
p_fifo
->
p_vpar
);
vpar_SynchroEnd
(
p_fifo
->
p_vpar
);
/* Unlink referenced pictures */
/* Unlink referenced pictures */
/*
if( p_mb->p_forward != NULL )
if
(
p_mb
->
p_forward
!=
NULL
)
{
{
vout_UnlinkPicture
(
p_fifo
->
p_vpar
->
p_vout
,
p_mb
->
p_forward
);
vout_UnlinkPicture
(
p_fifo
->
p_vpar
->
p_vout
,
p_mb
->
p_forward
);
}
}
if
(
p_mb
->
p_backward
!=
NULL
)
if
(
p_mb
->
p_backward
!=
NULL
)
{
{
vout_UnlinkPicture
(
p_fifo
->
p_vpar
->
p_vout
,
p_mb
->
p_backward
);
vout_UnlinkPicture
(
p_fifo
->
p_vpar
->
p_vout
,
p_mb
->
p_backward
);
}
*/
}
}
}
/* Release the macroblock_t structure */
/* Release the macroblock_t structure */
...
...
src/video_parser/vpar_blocks.c
View file @
653053d2
...
@@ -587,11 +587,14 @@ static __inline__ void InitMacroblock( vpar_thread_t * p_vpar,
...
@@ -587,11 +587,14 @@ static __inline__ void InitMacroblock( vpar_thread_t * p_vpar,
p_mb
->
pf_chroma_motion
=
pf_chroma_motion
[
p_vpar
->
sequence
.
i_chroma_format
];
p_mb
->
pf_chroma_motion
=
pf_chroma_motion
[
p_vpar
->
sequence
.
i_chroma_format
];
p_mb
->
b_P_coding_type
=
(
p_vpar
->
picture
.
i_coding_type
==
P_CODING_TYPE
);
p_mb
->
b_P_coding_type
=
(
p_vpar
->
picture
.
i_coding_type
==
P_CODING_TYPE
);
if
(
(
p_vpar
->
picture
.
i_coding_type
==
P_CODING_TYPE
)
||
(
p_vpar
->
picture
.
i_coding_type
==
B_CODING_TYPE
)
)
p_mb
->
p_forward
=
p_vpar
->
sequence
.
p_forward
;
p_mb
->
p_forward
=
p_vpar
->
sequence
.
p_forward
;
if
(
p_vpar
->
picture
.
i_coding_type
==
B_CODING_TYPE
)
p_mb
->
p_backward
=
p_vpar
->
sequence
.
p_backward
;
p_mb
->
p_backward
=
p_vpar
->
sequence
.
p_backward
;
p_mb
->
i_addb_l_stride
=
(
p_mb
->
i_l_stride
=
p_vpar
->
picture
.
i_l_stride
)
-
8
;
p_mb
->
i_addb_l_stride
=
(
p_mb
->
i_l_stride
=
p_vpar
->
picture
.
i_l_stride
)
-
8
;
p_mb
->
i_addb_c_stride
=
(
p_mb
->
i_c_stride
=
p_vpar
->
picture
.
i_c_stride
)
-
9
;
p_mb
->
i_addb_c_stride
=
(
p_mb
->
i_c_stride
=
p_vpar
->
picture
.
i_c_stride
)
-
8
;
/* Update macroblock real position. */
/* Update macroblock real position. */
p_vpar
->
mb
.
i_l_x
+=
16
;
p_vpar
->
mb
.
i_l_x
+=
16
;
...
@@ -754,7 +757,7 @@ i_count++;
...
@@ -754,7 +757,7 @@ i_count++;
static
int
pi_dc_dct_reinit
[
4
]
=
{
128
,
256
,
512
,
1024
};
static
int
pi_dc_dct_reinit
[
4
]
=
{
128
,
256
,
512
,
1024
};
static
f_motion_t
pf_motion_skipped
[
4
]
=
{
NULL
,
vdec_MotionFieldField
,
static
f_motion_t
pf_motion_skipped
[
4
]
=
{
NULL
,
vdec_MotionFieldField
,
vdec_MotionFieldField
,
vdec_MotionFrameFrame
};
vdec_MotionFieldField
,
vdec_MotionFrameFrame
};
fprintf
(
stderr
,
"On sauuuute !
\n
"
);
/* Reset DC predictors (7.2.1). */
/* Reset DC predictors (7.2.1). */
p_vpar
->
slice
.
pi_dc_dct_pred
[
0
]
=
p_vpar
->
slice
.
pi_dc_dct_pred
[
1
]
p_vpar
->
slice
.
pi_dc_dct_pred
[
0
]
=
p_vpar
->
slice
.
pi_dc_dct_pred
[
1
]
=
p_vpar
->
slice
.
pi_dc_dct_pred
[
2
]
=
p_vpar
->
slice
.
pi_dc_dct_pred
[
2
]
...
@@ -785,6 +788,7 @@ i_count++;
...
@@ -785,6 +788,7 @@ i_count++;
/* Motion type is picture structure. */
/* Motion type is picture structure. */
p_mb
->
pf_motion
=
pf_motion_skipped
[
p_vpar
->
picture
.
i_structure
];
p_mb
->
pf_motion
=
pf_motion_skipped
[
p_vpar
->
picture
.
i_structure
];
p_mb
->
i_mb_type
=
MB_MOTION_FORWARD
;
/* Set the field we use for motion compensation */
/* Set the field we use for motion compensation */
p_mb
->
ppi_field_select
[
0
][
0
]
=
p_mb
->
ppi_field_select
[
0
][
1
]
p_mb
->
ppi_field_select
[
0
][
0
]
=
p_mb
->
ppi_field_select
[
0
][
1
]
...
@@ -946,6 +950,12 @@ if( 0 )
...
@@ -946,6 +950,12 @@ if( 0 )
/* Reset MV predictors. */
/* Reset MV predictors. */
memset
(
p_vpar
->
slice
.
pppi_pmv
,
0
,
8
*
sizeof
(
int
)
);
memset
(
p_vpar
->
slice
.
pppi_pmv
,
0
,
8
*
sizeof
(
int
)
);
}
}
if
(
p_mb
->
b_P_coding_type
&&
!
(
p_vpar
->
mb
.
i_mb_type
&
(
MB_MOTION_FORWARD
|
MB_INTRA
))
)
{
p_mb
->
i_mb_type
|=
MB_MOTION_FORWARD
;
}
if
(
0
)
if
(
0
)
//i_count == 249)
//i_count == 249)
// i_count != *pi_mb_address)
// i_count != *pi_mb_address)
...
...
src/video_parser/vpar_headers.c
View file @
653053d2
...
@@ -614,23 +614,23 @@ static void PictureHeader( vpar_thread_t * p_vpar )
...
@@ -614,23 +614,23 @@ static void PictureHeader( vpar_thread_t * p_vpar )
intf_DbgMsg
(
"vpar debug: odd number of field picture.
\n
"
);
intf_DbgMsg
(
"vpar debug: odd number of field picture.
\n
"
);
}
}
if
(
p_vpar
->
picture
.
i_current_structure
)
{
/* Second field of a frame. We will decode it if, and only if we
* have decoded the first frame. */
b_parsable
=
(
p_vpar
->
picture
.
p_picture
!=
NULL
);
}
else
{
/* Do we have the reference pictures ? */
/* Do we have the reference pictures ? */
b_parsable
=
!
((
p_vpar
->
picture
.
i_coding_type
==
P_CODING_TYPE
)
&&
b_parsable
=
!
(
((
p_vpar
->
picture
.
i_coding_type
==
P_CODING_TYPE
)
&&
(
p_vpar
->
sequence
.
p_backward
==
NULL
))
||
(
p_vpar
->
sequence
.
p_backward
==
NULL
))
||
/* p_backward will become p_forward later */
/* p_backward will become p_forward later */
((
p_vpar
->
picture
.
i_coding_type
==
B_CODING_TYPE
)
&&
((
p_vpar
->
picture
.
i_coding_type
==
B_CODING_TYPE
)
&&
(
p_vpar
->
sequence
.
p_forward
==
NULL
||
(
p_vpar
->
sequence
.
p_forward
==
NULL
||
p_vpar
->
sequence
.
p_backward
==
NULL
));
p_vpar
->
sequence
.
p_backward
==
NULL
)
));
if
(
b_parsable
)
if
(
b_parsable
)
{
if
(
p_vpar
->
picture
.
i_current_structure
)
{
/* Second field of a frame. We will decode it if, and only if we
* have decoded the first frame. */
b_parsable
=
(
p_vpar
->
picture
.
p_picture
!=
NULL
);
}
else
{
{
/* Does synchro say we have enough time to decode it ? */
/* Does synchro say we have enough time to decode it ? */
b_parsable
=
vpar_SynchroChoose
(
p_vpar
,
b_parsable
=
vpar_SynchroChoose
(
p_vpar
,
...
@@ -688,6 +688,7 @@ static void PictureHeader( vpar_thread_t * p_vpar )
...
@@ -688,6 +688,7 @@ static void PictureHeader( vpar_thread_t * p_vpar )
P_picture
->
i_deccount
=
p_vpar
->
sequence
.
i_mb_size
;
P_picture
->
i_deccount
=
p_vpar
->
sequence
.
i_mb_size
;
memset
(
p_vpar
->
picture
.
pp_mb
,
0
,
MAX_MB
);
memset
(
p_vpar
->
picture
.
pp_mb
,
0
,
MAX_MB
);
memset
(
P_picture
->
p_data
,
0
,
(
p_vpar
->
sequence
.
i_mb_size
*
384
));
/* Update the reference pointers. */
/* Update the reference pointers. */
ReferenceUpdate
(
p_vpar
,
p_vpar
->
picture
.
i_coding_type
,
P_picture
);
ReferenceUpdate
(
p_vpar
,
p_vpar
->
picture
.
i_coding_type
,
P_picture
);
...
@@ -761,16 +762,16 @@ fprintf(stderr, "Image parsee (%d)\n", p_vpar->picture.i_coding_type);
...
@@ -761,16 +762,16 @@ fprintf(stderr, "Image parsee (%d)\n", p_vpar->picture.i_coding_type);
/* Link referenced pictures for the decoder
/* Link referenced pictures for the decoder
* They are unlinked in vpar_ReleaseMacroblock() & vpar_DestroyMacroblock() */
* They are unlinked in vpar_ReleaseMacroblock() & vpar_DestroyMacroblock() */
#if 0
if
(
p_vpar
->
picture
.
i_coding_type
==
P_CODING_TYPE
||
if( p_vpar->sequence.p_forward != NULL
)
p_vpar
->
picture
.
i_coding_type
==
B_CODING_TYPE
)
{
{
vout_LinkPicture
(
p_vpar
->
p_vout
,
p_vpar
->
sequence
.
p_forward
);
vout_LinkPicture
(
p_vpar
->
p_vout
,
p_vpar
->
sequence
.
p_forward
);
}
}
if( p_vpar->
sequence.p_backward != NULL
)
if
(
p_vpar
->
picture
.
i_coding_type
==
B_CODING_TYPE
)
{
{
vout_LinkPicture
(
p_vpar
->
p_vout
,
p_vpar
->
sequence
.
p_backward
);
vout_LinkPicture
(
p_vpar
->
p_vout
,
p_vpar
->
sequence
.
p_backward
);
}
}
#endif
/* Send signal to the video_decoder. */
/* Send signal to the video_decoder. */
vlc_mutex_lock
(
&
p_vpar
->
vfifo
.
lock
);
vlc_mutex_lock
(
&
p_vpar
->
vfifo
.
lock
);
vlc_cond_signal
(
&
p_vpar
->
vfifo
.
wait
);
vlc_cond_signal
(
&
p_vpar
->
vfifo
.
wait
);
...
...
src/video_parser/vpar_motion.c
View file @
653053d2
...
@@ -104,13 +104,13 @@ static __inline__ void vpar_DecodeMotionVector( int * pi_prediction, int i_r_siz
...
@@ -104,13 +104,13 @@ static __inline__ void vpar_DecodeMotionVector( int * pi_prediction, int i_r_siz
i_limit
=
16
<<
i_r_size
;
i_limit
=
16
<<
i_r_size
;
i_vector
=
*
pi_prediction
>>
i_full_pel
;
i_vector
=
*
pi_prediction
>>
i_full_pel
;
if
(
i_motion_code
<
0
)
if
(
i_motion_code
>
0
)
{
{
i_vector
+=
((
i_motion_code
-
1
)
<<
i_r_size
)
+
i_motion_residual
+
1
;
i_vector
+=
((
i_motion_code
-
1
)
<<
i_r_size
)
+
i_motion_residual
+
1
;
if
(
i_vector
>=
i_limit
)
if
(
i_vector
>=
i_limit
)
i_vector
-=
i_limit
<<
1
;
i_vector
-=
i_limit
<<
1
;
}
}
else
if
(
i_motion_code
>
0
)
else
if
(
i_motion_code
<
0
)
{
{
i_vector
-=
((
-
i_motion_code
-
1
)
<<
i_r_size
)
+
i_motion_residual
+
1
;
i_vector
-=
((
-
i_motion_code
-
1
)
<<
i_r_size
)
+
i_motion_residual
+
1
;
if
(
i_vector
<
i_limit
)
if
(
i_vector
<
i_limit
)
...
...
src/video_parser/vpar_synchro.c
View file @
653053d2
...
@@ -148,7 +148,7 @@ void vpar_SynchroUpdateStructures( vpar_thread_t * p_vpar,
...
@@ -148,7 +148,7 @@ void vpar_SynchroUpdateStructures( vpar_thread_t * p_vpar,
boolean_t
vpar_SynchroChoose
(
vpar_thread_t
*
p_vpar
,
int
i_coding_type
,
boolean_t
vpar_SynchroChoose
(
vpar_thread_t
*
p_vpar
,
int
i_coding_type
,
int
i_structure
)
int
i_structure
)
{
{
return
(
1
);
//
return( 1 );
return
(
i_coding_type
==
I_CODING_TYPE
||
i_coding_type
==
P_CODING_TYPE
);
return
(
i_coding_type
==
I_CODING_TYPE
||
i_coding_type
==
P_CODING_TYPE
);
//return( i_coding_type == I_CODING_TYPE );
//return( i_coding_type == I_CODING_TYPE );
}
}
...
@@ -171,7 +171,7 @@ mtime_t vpar_SynchroDecode( vpar_thread_t * p_vpar, int i_coding_type,
...
@@ -171,7 +171,7 @@ mtime_t vpar_SynchroDecode( vpar_thread_t * p_vpar, int i_coding_type,
{
{
vpar_SynchroUpdateStructures
(
p_vpar
,
i_coding_type
);
vpar_SynchroUpdateStructures
(
p_vpar
,
i_coding_type
);
return
mdate
()
+
30
00000
;
return
mdate
()
+
7
00000
;
}
}
/*****************************************************************************
/*****************************************************************************
...
...
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