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
6f1316be
Commit
6f1316be
authored
Jan 19, 2000
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support pour le motion DMV.
parent
1346af34
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
118 additions
and
2 deletions
+118
-2
include/vpar_blocks.h
include/vpar_blocks.h
+1
-0
src/video_decoder/vdec_motion.c
src/video_decoder/vdec_motion.c
+116
-2
src/video_parser/vpar_blocks.c
src/video_parser/vpar_blocks.c
+1
-0
No files found.
include/vpar_blocks.h
View file @
6f1316be
...
...
@@ -45,6 +45,7 @@ typedef struct macroblock_s
int
ppi_field_select
[
2
][
2
];
int
pppi_motion_vectors
[
2
][
2
][
2
];
int
pi_dm_vector
[
2
];
boolean_t
b_top_field_first
;
int
i_motion_l_y
;
int
i_motion_c_y
;
boolean_t
b_motion_field
;
...
...
src/video_decoder/vdec_motion.c
View file @
6f1316be
...
...
@@ -225,6 +225,50 @@ static void __inline__ MotionComponent( yuv_data_t * p_src, yuv_data_t * p_dest,
}
}
/*****************************************************************************
* DualPrimeArithmetic : Dual Prime Additional arithmetic (7.6.3.6)
*****************************************************************************/
static
void
__inline__
DualPrimeArithmetic
(
macroblock_t
*
p_mb
,
int
ppi_dmv
[
2
][
2
],
int
i_mv_x
,
int
i_mv_y
)
{
if
(
p_mb
->
i_structure
==
FRAME_STRUCTURE
)
{
if
(
p_mb
->
b_top_field_first
)
{
/* vector for prediction of top field from bottom field */
ppi_dmv
[
0
][
0
]
=
((
i_mv_x
+
(
i_mv_x
>
0
))
>>
1
)
+
p_mb
->
pi_dm_vector
[
0
];
ppi_dmv
[
0
][
1
]
=
((
i_mv_y
+
(
i_mv_y
>
0
))
>>
1
)
+
p_mb
->
pi_dm_vector
[
1
]
-
1
;
/* vector for prediction of bottom field from top field */
ppi_dmv
[
1
][
0
]
=
((
3
*
i_mv_x
+
(
i_mv_x
>
0
))
>>
1
)
+
p_mb
->
pi_dm_vector
[
0
];
ppi_dmv
[
1
][
1
]
=
((
3
*
i_mv_y
+
(
i_mv_y
>
0
))
>>
1
)
+
p_mb
->
pi_dm_vector
[
1
]
+
1
;
}
else
{
/* vector for prediction of top field from bottom field */
ppi_dmv
[
0
][
0
]
=
((
3
*
i_mv_x
+
(
i_mv_x
>
0
))
>>
1
)
+
p_mb
->
pi_dm_vector
[
0
];
ppi_dmv
[
0
][
1
]
=
((
3
*
i_mv_y
+
(
i_mv_y
>
0
))
>>
1
)
+
p_mb
->
pi_dm_vector
[
1
]
-
1
;
/* vector for prediction of bottom field from top field */
ppi_dmv
[
1
][
0
]
=
((
i_mv_x
+
(
i_mv_x
>
0
))
>>
1
)
+
p_mb
->
pi_dm_vector
[
0
];
ppi_dmv
[
1
][
1
]
=
((
i_mv_y
+
(
i_mv_y
>
0
))
>>
1
)
+
p_mb
->
pi_dm_vector
[
1
]
+
1
;
}
}
else
{
/* vector for prediction from field of opposite 'parity' */
ppi_dmv
[
0
][
0
]
=
((
i_mv_x
+
(
i_mv_x
>
0
))
>>
1
)
+
p_mb
->
pi_dm_vector
[
0
];
ppi_dmv
[
0
][
1
]
=
((
i_mv_y
+
(
i_mv_y
>
0
))
>>
1
)
+
p_mb
->
pi_dm_vector
[
1
];
/* correct for vertical field shift */
if
(
p_mb
->
i_structure
==
TOP_FIELD
)
ppi_dmv
[
0
][
1
]
--
;
else
ppi_dmv
[
0
][
1
]
++
;
}
}
typedef
struct
motion_arg_s
{
...
...
@@ -348,7 +392,37 @@ void vdec_MotionField16x8( macroblock_t * p_mb )
void
vdec_MotionFieldDMV
(
macroblock_t
*
p_mb
)
{
/* This is necessarily a MOTION_FORWARD only macroblock */
fprintf
(
stderr
,
"DMV pas code !!!
\n
"
);
motion_arg_t
args
;
picture_t
*
p_pred
;
int
ppi_dmv
[
2
][
2
];
args
.
i_height
=
16
;
args
.
b_average
=
0
;
args
.
b_dest_field
=
p_mb
->
b_motion_field
;
args
.
i_offset
=
0
;
if
(
p_mb
->
i_current_structure
==
FRAME_STRUCTURE
)
p_pred
=
p_mb
->
p_picture
;
else
p_pred
=
p_mb
->
p_forward
;
DualPrimeArithmetic
(
p_mb
,
ppi_dmv
,
p_mb
->
pppi_motion_vectors
[
0
][
0
][
0
],
p_mb
->
pppi_motion_vectors
[
0
][
0
][
1
]
);
/* predict from field of same parity */
args
.
p_source
=
p_mb
->
p_forward
;
args
.
b_source_field
=
p_mb
->
b_motion_field
;
args
.
i_mv_x
=
p_mb
->
pppi_motion_vectors
[
0
][
0
][
0
];
args
.
i_mv_y
=
p_mb
->
pppi_motion_vectors
[
0
][
0
][
1
];
p_mb
->
pf_chroma_motion
(
p_mb
,
&
args
);
/* predict from field of opposite parity */
args
.
b_average
=
1
;
args
.
p_source
=
p_pred
;
args
.
b_source_field
=
!
p_mb
->
b_motion_field
;
args
.
i_mv_x
=
ppi_dmv
[
0
][
0
];
args
.
i_mv_y
=
ppi_dmv
[
0
][
1
];
p_mb
->
pf_chroma_motion
(
p_mb
,
&
args
);
}
/*****************************************************************************
...
...
@@ -440,7 +514,47 @@ void vdec_MotionFrameField( macroblock_t * p_mb )
void
vdec_MotionFrameDMV
(
macroblock_t
*
p_mb
)
{
/* This is necessarily a MOTION_FORWARD only macroblock */
fprintf
(
stderr
,
"DMV pas codee 2 !!!!!
\n
"
);
motion_arg_t
args
;
int
ppi_dmv
[
2
][
2
];
p_mb
->
i_l_stride
<<=
1
;
p_mb
->
i_c_stride
<<=
1
;
args
.
i_height
=
8
;
args
.
b_average
=
0
;
args
.
b_dest_field
=
0
;
args
.
i_offset
=
0
;
args
.
p_source
=
p_mb
->
p_forward
;
DualPrimeArithmetic
(
p_mb
,
ppi_dmv
,
p_mb
->
pppi_motion_vectors
[
0
][
0
][
0
],
p_mb
->
pppi_motion_vectors
[
0
][
0
][
1
]
);
/* predict top field from top field */
args
.
b_source_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
);
/* predict and add to top field from bottom field */
args
.
b_average
=
1
;
args
.
b_source_field
=
1
;
args
.
i_mv_x
=
ppi_dmv
[
0
][
0
];
args
.
i_mv_y
=
ppi_dmv
[
0
][
1
];
p_mb
->
pf_chroma_motion
(
p_mb
,
&
args
);
/* predict bottom field from bottom field */
args
.
b_average
=
0
;
args
.
b_dest_field
=
1
;
args
.
b_source_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
);
/* predict and add to bottom field from top field */
args
.
b_average
=
1
;
args
.
b_source_field
=
1
;
args
.
i_mv_x
=
ppi_dmv
[
1
][
0
];
args
.
i_mv_y
=
ppi_dmv
[
1
][
1
];
p_mb
->
pf_chroma_motion
(
p_mb
,
&
args
);
}
/*****************************************************************************
...
...
src/video_parser/vpar_blocks.c
View file @
6f1316be
...
...
@@ -579,6 +579,7 @@ static __inline__ void InitMacroblock( vpar_thread_t * p_vpar,
p_mb
->
p_picture
=
p_vpar
->
picture
.
p_picture
;
p_mb
->
i_structure
=
p_vpar
->
picture
.
i_structure
;
p_mb
->
i_current_structure
=
p_vpar
->
picture
.
i_current_structure
;
p_mb
->
b_top_field_first
=
p_vpar
->
picture
.
b_top_field_first
;
p_mb
->
i_l_x
=
p_vpar
->
mb
.
i_l_x
;
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
;
...
...
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