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
2d82e8bf
Commit
2d82e8bf
authored
Jan 19, 2000
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrections de bugs dans le motion.
parent
bb545321
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
32 deletions
+34
-32
include/vpar_blocks.h
include/vpar_blocks.h
+3
-0
include/vpar_headers.h
include/vpar_headers.h
+1
-0
src/video_decoder/vdec_motion.c
src/video_decoder/vdec_motion.c
+22
-29
src/video_parser/vpar_blocks.c
src/video_parser/vpar_blocks.c
+7
-2
src/video_parser/vpar_headers.c
src/video_parser/vpar_headers.c
+1
-1
No files found.
include/vpar_blocks.h
View file @
2d82e8bf
...
...
@@ -45,6 +45,9 @@ typedef struct macroblock_s
int
ppi_field_select
[
2
][
2
];
int
pppi_motion_vectors
[
2
][
2
][
2
];
int
pi_dm_vector
[
2
];
int
i_motion_l_y
;
int
i_motion_c_y
;
boolean_t
b_motion_field
;
/* AddBlock information */
f_addb_t
pf_addb
[
12
];
/* pointer to the Add function */
...
...
include/vpar_headers.h
View file @
2d82e8bf
...
...
@@ -98,6 +98,7 @@ typedef struct picture_parsing_s
/* Relative to the current field */
int
i_coding_type
,
i_structure
;
boolean_t
b_frame_structure
;
boolean_t
b_motion_field
;
f_macroblock_type_t
pf_macroblock_type
;
boolean_t
b_error
;
...
...
src/video_decoder/vdec_motion.c
View file @
2d82e8bf
...
...
@@ -254,17 +254,14 @@ void vdec_MotionFieldField( macroblock_t * p_mb )
args.i_height = 16;
args.b_average = 0;
args.b_dest_field =
0
;
args.b_dest_field =
p_mb->b_motion_field
;
args.i_offset = 0;
if( p_mb->i_mb_type & MB_MOTION_FORWARD )
{
boolean_t b_current_field;
b_current_field = ( p_mb->i_structure == BOTTOM_FIELD );
if( p_mb->b_P_coding_type
&& (p_mb->i_current_structure == FRAME_STRUCTURE)
&& (
b_current
_field != p_mb->ppi_field_select[0][0]) )
&& (
p_mb->b_motion
_field != p_mb->ppi_field_select[0][0]) )
args.p_source = p_mb->p_picture;
else
args.p_source = p_mb->p_forward;
...
...
@@ -296,17 +293,14 @@ void vdec_MotionField16x8( macroblock_t * p_mb )
args.i_height = 8;
args.b_average = 0;
args.b_dest_field =
0
;
args.b_dest_field =
p_mb->b_motion_field
;
args.i_offset = 0;
if( p_mb->i_mb_type & MB_MOTION_FORWARD )
{
boolean_t b_current_field;
b_current_field = ( p_mb->i_structure == BOTTOM_FIELD );
if( p_mb->b_P_coding_type
&& (p_mb->i_current_structure == FRAME_STRUCTURE)
&& (
b_current
_field != p_mb->ppi_field_select[0][0]) )
&& (
p_mb->b_motion
_field != p_mb->ppi_field_select[0][0]) )
args.p_source = p_mb->p_picture;
else
args.p_source = p_mb->p_forward;
...
...
@@ -317,7 +311,7 @@ void vdec_MotionField16x8( macroblock_t * p_mb )
if( p_mb->b_P_coding_type
&& (p_mb->i_current_structure == FRAME_STRUCTURE)
&& (
b_current
_field != p_mb->ppi_field_select[1][0]) )
&& (
p_mb->b_motion
_field != p_mb->ppi_field_select[1][0]) )
args.p_source = p_mb->p_picture;
else
args.p_source = p_mb->p_forward;
...
...
@@ -406,18 +400,14 @@ void vdec_MotionFrameField( macroblock_t * p_mb )
if
(
p_mb
->
i_mb_type
&
MB_MOTION_FORWARD
)
{
args
.
p_source
=
p_mb
->
p_forward
;
#
args
.
b_source_field
=
p_mb
->
ppi_field_select
[
0
][
0
];
args
.
b_dest_field
=
0
;
args
.
i_mv_x
=
p_mb
->
pppi_motion_vectors
[
0
][
0
][
0
];
args
.
i_mv_y
=
p_mb
->
pppi_motion_vectors
[
0
][
0
][
1
]
>>
1
;
//
p_mb->pf_chroma_motion( p_mb, &args );
p_mb
->
pf_chroma_motion
(
p_mb
,
&
args
);
p_mb
->
i_l_y
++
;
p_mb
->
i_c_y
++
;
args
.
b_source_field
=
p_mb
->
ppi_field_select
[
1
][
0
]
-
1
;
//args.b_dest_field = 1;
args
.
b_source_field
=
p_mb
->
ppi_field_select
[
1
][
0
];
args
.
b_dest_field
=
1
;
args
.
i_mv_x
=
p_mb
->
pppi_motion_vectors
[
1
][
0
][
0
];
args
.
i_mv_y
=
p_mb
->
pppi_motion_vectors
[
1
][
0
][
1
]
>>
1
;
p_mb
->
pf_chroma_motion
(
p_mb
,
&
args
);
...
...
@@ -463,14 +453,15 @@ void vdec_Motion420( macroblock_t * p_mb, motion_arg_t * p_motion )
MotionComponent
(
/* source */
p_motion
->
p_source
->
p_y
+
(
p_mb
->
i_l_x
+
(
p_motion
->
i_mv_x
>>
1
))
+
(
(
p_mb
->
i
_l_y
+
p_motion
->
i_offset
+
(
p_motion
->
i_mv_y
>>
1
)
)
+
(
p_motion
->
b_source_field
-
p_motion
->
b_dest_field
)
)
+
(
p_mb
->
i_motion
_l_y
+
p_motion
->
i_offset
+
(
p_motion
->
i_mv_y
>>
1
)
+
p_motion
->
b_source_field
)
*
p_mb
->
p_picture
->
i_width
,
/* destination */
p_mb
->
p_picture
->
p_y
+
(
p_mb
->
i_l_x
)
+
(
p_mb
->
i_l_y
)
*
p_mb
->
p_picture
->
i_width
,
+
(
p_mb
->
i_motion_l_y
+
p_motion
->
b_dest_field
)
*
p_mb
->
p_picture
->
i_width
,
/* prediction width and height */
16
,
p_motion
->
i_height
,
/* step */
...
...
@@ -483,13 +474,14 @@ void vdec_Motion420( macroblock_t * p_mb, motion_arg_t * p_motion )
/* Chrominance Cr */
MotionComponent
(
p_motion
->
p_source
->
p_u
+
(
p_mb
->
i_c_x
+
((
p_motion
->
i_mv_x
/
2
)
>>
1
))
+
((
p_mb
->
i_c_y
+
(
p_motion
->
i_offset
>>
1
)
+
((
p_mb
->
i_
motion_
c_y
+
(
p_motion
->
i_offset
>>
1
)
+
((
p_motion
->
i_mv_y
/
2
)
>>
1
))
+
(
p_motion
->
b_source_field
-
p_motion
->
b_dest_field
)
)
+
p_motion
->
b_source_field
)
*
p_mb
->
p_picture
->
i_chroma_width
,
p_mb
->
p_picture
->
p_u
+
(
p_mb
->
i_c_x
)
+
(
p_mb
->
i_c_y
)
*
p_mb
->
p_picture
->
i_chroma_width
,
+
(
p_mb
->
i_motion_c_y
+
p_motion
->
b_dest_field
)
*
p_mb
->
p_picture
->
i_chroma_width
,
8
,
p_motion
->
i_height
>>
1
,
p_mb
->
i_c_stride
,
(
p_motion
->
b_average
<<
2
)
|
(((
p_motion
->
i_mv_y
/
2
)
&
1
)
<<
1
)
...
...
@@ -498,13 +490,14 @@ void vdec_Motion420( macroblock_t * p_mb, motion_arg_t * p_motion )
/* Chrominance Cb */
MotionComponent
(
p_motion
->
p_source
->
p_v
+
(
p_mb
->
i_c_x
+
((
p_motion
->
i_mv_x
/
2
)
>>
1
))
+
((
p_mb
->
i_c_y
+
(
p_motion
->
i_offset
>>
1
)
+
((
p_motion
->
i_mv_y
/
2
)
>>
1
))
+
(
p_motion
->
b_source_field
-
p_motion
->
b_dest_field
)
)
+
((
p_mb
->
i_
motion_
c_y
+
(
p_motion
->
i_offset
>>
1
)
+
((
p_motion
->
i_mv_y
/
2
)
>>
1
))
+
p_motion
->
b_source_field
)
*
p_mb
->
p_picture
->
i_chroma_width
,
p_mb
->
p_picture
->
p_v
+
(
p_mb
->
i_c_x
)
+
(
p_mb
->
i_c_y
)
*
p_mb
->
p_picture
->
i_chroma_width
,
+
(
p_mb
->
i_motion_c_y
+
p_motion
->
b_dest_field
)
*
p_mb
->
p_picture
->
i_chroma_width
,
8
,
p_motion
->
i_height
>>
1
,
p_mb
->
i_c_stride
,
(
p_motion
->
b_average
<<
2
)
|
(((
p_motion
->
i_mv_y
/
2
)
&
1
)
<<
1
)
...
...
src/video_parser/vpar_blocks.c
View file @
2d82e8bf
...
...
@@ -580,9 +580,9 @@ static __inline__ void InitMacroblock( vpar_thread_t * p_vpar,
p_mb
->
i_structure
=
p_vpar
->
picture
.
i_structure
;
p_mb
->
i_current_structure
=
p_vpar
->
picture
.
i_current_structure
;
p_mb
->
i_l_x
=
p_vpar
->
mb
.
i_l_x
;
p_mb
->
i_l_y
=
p_vpar
->
mb
.
i_l_y
;
p_mb
->
i_
motion_l_y
=
p_mb
->
i_
l_y
=
p_vpar
->
mb
.
i_l_y
;
p_mb
->
i_c_x
=
p_vpar
->
mb
.
i_c_x
;
p_mb
->
i_c_y
=
p_vpar
->
mb
.
i_c_y
;
p_mb
->
i_
motion_c_y
=
p_mb
->
i_
c_y
=
p_vpar
->
mb
.
i_c_y
;
p_mb
->
i_chroma_nb_blocks
=
p_vpar
->
sequence
.
i_chroma_nb_blocks
;
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
);
...
...
@@ -607,6 +607,11 @@ static __inline__ void InitMacroblock( vpar_thread_t * p_vpar,
*
(
2
-
p_vpar
->
picture
.
b_frame_structure
)
*
p_vpar
->
sequence
.
i_chroma_mb_height
;
p_vpar
->
mb
.
i_c_x
%=
p_vpar
->
sequence
.
i_chroma_width
;
if
(
p_mb
->
b_motion_field
=
p_vpar
->
picture
.
b_motion_field
)
{
p_mb
->
i_motion_l_y
--
;
p_mb
->
i_motion_c_y
--
;
}
}
/*****************************************************************************
...
...
src/video_parser/vpar_headers.c
View file @
2d82e8bf
...
...
@@ -699,7 +699,7 @@ memset( P_picture->p_data, 0, (p_vpar->sequence.i_mb_size*384));
p_vpar
->
picture
.
b_frame_structure
=
(
i_structure
==
FRAME_STRUCTURE
);
/* Initialize picture data for decoding. */
if
(
i_structure
==
BOTTOM_FIELD
)
if
(
p_vpar
->
picture
.
b_motion_field
=
(
i_structure
==
BOTTOM_FIELD
)
)
{
i_mb_base
=
p_vpar
->
sequence
.
i_mb_size
>>
1
;
p_vpar
->
mb
.
i_l_y
=
1
;
...
...
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