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
7104c23b
Commit
7104c23b
authored
Jan 16, 2012
by
Christophe GISQUET
Committed by
Ronald S. Bultje
Mar 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rv34: clean a bit availability checks.
Signed-off-by:
Ronald S. Bultje
<
rsbultje@gmail.com
>
parent
af49e176
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
rv34.c
libavcodec/rv34.c
+10
-10
No files found.
libavcodec/rv34.c
View file @
7104c23b
...
...
@@ -472,26 +472,26 @@ static void rv34_pred_mv(RV34DecContext *r, int block_type, int subblock_no, int
int
A
[
2
]
=
{
0
},
B
[
2
],
C
[
2
];
int
i
,
j
;
int
mx
,
my
;
int
avail_index
=
avail_indexes
[
subblock_no
];
int
*
avail
=
r
->
avail_cache
+
avail_indexes
[
subblock_no
];
int
c_off
=
part_sizes_w
[
block_type
];
mv_pos
+=
(
subblock_no
&
1
)
+
(
subblock_no
>>
1
)
*
s
->
b8_stride
;
if
(
subblock_no
==
3
)
c_off
=
-
1
;
if
(
r
->
avail_cache
[
avail_index
-
1
]){
if
(
avail
[
-
1
]){
A
[
0
]
=
s
->
current_picture_ptr
->
f
.
motion_val
[
0
][
mv_pos
-
1
][
0
];
A
[
1
]
=
s
->
current_picture_ptr
->
f
.
motion_val
[
0
][
mv_pos
-
1
][
1
];
}
if
(
r
->
avail_cache
[
avail_index
-
4
]){
if
(
avail
[
-
4
]){
B
[
0
]
=
s
->
current_picture_ptr
->
f
.
motion_val
[
0
][
mv_pos
-
s
->
b8_stride
][
0
];
B
[
1
]
=
s
->
current_picture_ptr
->
f
.
motion_val
[
0
][
mv_pos
-
s
->
b8_stride
][
1
];
}
else
{
B
[
0
]
=
A
[
0
];
B
[
1
]
=
A
[
1
];
}
if
(
!
r
->
avail_cache
[
avail_index
-
4
+
c_off
]){
if
(
r
->
avail_cache
[
avail_index
-
4
]
&&
(
r
->
avail_cache
[
avail_index
-
1
]
||
r
->
rv30
)){
if
(
!
avail
[
c_off
-
4
]){
if
(
avail
[
-
4
]
&&
(
avail
[
-
1
]
||
r
->
rv30
)){
C
[
0
]
=
s
->
current_picture_ptr
->
f
.
motion_val
[
0
][
mv_pos
-
s
->
b8_stride
-
1
][
0
];
C
[
1
]
=
s
->
current_picture_ptr
->
f
.
motion_val
[
0
][
mv_pos
-
s
->
b8_stride
-
1
][
1
];
}
else
{
...
...
@@ -611,21 +611,21 @@ static void rv34_pred_mv_rv3(RV34DecContext *r, int block_type, int dir)
int
A
[
2
]
=
{
0
},
B
[
2
],
C
[
2
];
int
i
,
j
,
k
;
int
mx
,
my
;
int
avail_index
=
avail_indexes
[
0
];
int
*
avail
=
r
->
avail_cache
+
avail_indexes
[
0
];
if
(
r
->
avail_cache
[
avail_index
-
1
]){
if
(
avail
[
-
1
]){
A
[
0
]
=
s
->
current_picture_ptr
->
f
.
motion_val
[
0
][
mv_pos
-
1
][
0
];
A
[
1
]
=
s
->
current_picture_ptr
->
f
.
motion_val
[
0
][
mv_pos
-
1
][
1
];
}
if
(
r
->
avail_cache
[
avail_index
-
4
]){
if
(
avail
[
-
4
]){
B
[
0
]
=
s
->
current_picture_ptr
->
f
.
motion_val
[
0
][
mv_pos
-
s
->
b8_stride
][
0
];
B
[
1
]
=
s
->
current_picture_ptr
->
f
.
motion_val
[
0
][
mv_pos
-
s
->
b8_stride
][
1
];
}
else
{
B
[
0
]
=
A
[
0
];
B
[
1
]
=
A
[
1
];
}
if
(
!
r
->
avail_cache
[
avail_index
-
4
+
2
]){
if
(
r
->
avail_cache
[
avail_index
-
4
]
&&
(
r
->
avail_cache
[
avail_index
-
1
])){
if
(
!
avail
[
-
4
+
2
]){
if
(
avail
[
-
4
]
&&
(
avail
[
-
1
])){
C
[
0
]
=
s
->
current_picture_ptr
->
f
.
motion_val
[
0
][
mv_pos
-
s
->
b8_stride
-
1
][
0
];
C
[
1
]
=
s
->
current_picture_ptr
->
f
.
motion_val
[
0
][
mv_pos
-
s
->
b8_stride
-
1
][
1
];
}
else
{
...
...
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