Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
4090d5ba
Commit
4090d5ba
authored
Mar 25, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/h261dec: fix motion vector vissualization
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
8f20e3d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
h261dec.c
libavcodec/h261dec.c
+8
-1
No files found.
libavcodec/h261dec.c
View file @
4090d5ba
...
...
@@ -341,7 +341,8 @@ static int h261_decode_block(H261Context *h, int16_t *block, int n, int coded)
static
int
h261_decode_mb
(
H261Context
*
h
)
{
MpegEncContext
*
const
s
=
&
h
->
s
;
int
i
,
cbp
,
xy
;
int
i
,
cbp
,
xy
,
b_xy
;
int
b_stride
=
2
*
s
->
mb_width
+
1
;
cbp
=
63
;
// Read mba
...
...
@@ -374,6 +375,7 @@ static int h261_decode_mb(H261Context *h)
s
->
mb_x
=
((
h
->
gob_number
-
1
)
%
2
)
*
11
+
((
h
->
current_mba
-
1
)
%
11
);
s
->
mb_y
=
((
h
->
gob_number
-
1
)
/
2
)
*
3
+
((
h
->
current_mba
-
1
)
/
11
);
xy
=
s
->
mb_x
+
s
->
mb_y
*
s
->
mb_stride
;
b_xy
=
2
*
s
->
mb_x
+
(
2
*
s
->
mb_y
)
*
b_stride
;
ff_init_block_index
(
s
);
ff_update_block_index
(
s
);
...
...
@@ -432,6 +434,11 @@ static int h261_decode_mb(H261Context *h)
s
->
mv
[
0
][
0
][
0
]
=
h
->
current_mv_x
*
2
;
// gets divided by 2 in motion compensation
s
->
mv
[
0
][
0
][
1
]
=
h
->
current_mv_y
*
2
;
if
(
s
->
current_picture
.
motion_val
[
0
])
{
s
->
current_picture
.
motion_val
[
0
][
b_xy
][
0
]
=
s
->
mv
[
0
][
0
][
0
];
s
->
current_picture
.
motion_val
[
0
][
b_xy
][
1
]
=
s
->
mv
[
0
][
0
][
1
];
}
intra:
/* decode each block */
if
(
s
->
mb_intra
||
HAS_CBP
(
h
->
mtype
))
{
...
...
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