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
366b72f1
Commit
366b72f1
authored
Oct 11, 2012
by
Mans Rullgard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
svq3: replace unsafe pointer casting with intreadwrite macros
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
68e360a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
svq3.c
libavcodec/svq3.c
+8
-8
No files found.
libavcodec/svq3.c
View file @
366b72f1
...
...
@@ -409,17 +409,17 @@ static inline int svq3_mc_dir(H264Context *h, int size, int mode, int dir,
int32_t
mv
=
pack16to32
(
mx
,
my
);
if
(
part_height
==
8
&&
i
<
8
)
{
*
(
int32_t
*
)
h
->
mv_cache
[
dir
][
scan8
[
k
]
+
1
*
8
]
=
mv
;
AV_WN32A
(
h
->
mv_cache
[
dir
][
scan8
[
k
]
+
1
*
8
],
mv
)
;
if
(
part_width
==
8
&&
j
<
8
)
{
*
(
int32_t
*
)
h
->
mv_cache
[
dir
][
scan8
[
k
]
+
1
+
1
*
8
]
=
mv
;
AV_WN32A
(
h
->
mv_cache
[
dir
][
scan8
[
k
]
+
1
+
1
*
8
],
mv
)
;
}
}
if
(
part_width
==
8
&&
j
<
8
)
{
*
(
int32_t
*
)
h
->
mv_cache
[
dir
][
scan8
[
k
]
+
1
]
=
mv
;
AV_WN32A
(
h
->
mv_cache
[
dir
][
scan8
[
k
]
+
1
],
mv
)
;
}
if
(
part_width
==
4
||
part_height
==
4
)
{
*
(
int32_t
*
)
h
->
mv_cache
[
dir
][
scan8
[
k
]]
=
mv
;
AV_WN32A
(
h
->
mv_cache
[
dir
][
scan8
[
k
]],
mv
)
;
}
}
...
...
@@ -487,11 +487,11 @@ static int svq3_decode_mb(SVQ3Context *svq3, unsigned int mb_type)
for
(
m
=
0
;
m
<
2
;
m
++
)
{
if
(
s
->
mb_x
>
0
&&
h
->
intra4x4_pred_mode
[
h
->
mb2br_xy
[
mb_xy
-
1
]
+
6
]
!=
-
1
)
{
for
(
i
=
0
;
i
<
4
;
i
++
)
{
*
(
uint32_t
*
)
h
->
mv_cache
[
m
][
scan8
[
0
]
-
1
+
i
*
8
]
=
*
(
uint32_t
*
)
s
->
current_picture
.
f
.
motion_val
[
m
][
b_xy
-
1
+
i
*
h
->
b_stride
]
;
AV_COPY32
(
h
->
mv_cache
[
m
][
scan8
[
0
]
-
1
+
i
*
8
],
s
->
current_picture
.
f
.
motion_val
[
m
][
b_xy
-
1
+
i
*
h
->
b_stride
])
;
}
}
else
{
for
(
i
=
0
;
i
<
4
;
i
++
)
{
*
(
uint32_t
*
)
h
->
mv_cache
[
m
][
scan8
[
0
]
-
1
+
i
*
8
]
=
0
;
AV_ZERO32
(
h
->
mv_cache
[
m
][
scan8
[
0
]
-
1
+
i
*
8
])
;
}
}
if
(
s
->
mb_y
>
0
)
{
...
...
@@ -499,14 +499,14 @@ static int svq3_decode_mb(SVQ3Context *svq3, unsigned int mb_type)
memset
(
&
h
->
ref_cache
[
m
][
scan8
[
0
]
-
1
*
8
],
(
h
->
intra4x4_pred_mode
[
h
->
mb2br_xy
[
mb_xy
-
s
->
mb_stride
]]
==
-
1
)
?
PART_NOT_AVAILABLE
:
1
,
4
);
if
(
s
->
mb_x
<
(
s
->
mb_width
-
1
))
{
*
(
uint32_t
*
)
h
->
mv_cache
[
m
][
scan8
[
0
]
+
4
-
1
*
8
]
=
*
(
uint32_t
*
)
s
->
current_picture
.
f
.
motion_val
[
m
][
b_xy
-
h
->
b_stride
+
4
]
;
AV_COPY32
(
h
->
mv_cache
[
m
][
scan8
[
0
]
+
4
-
1
*
8
],
s
->
current_picture
.
f
.
motion_val
[
m
][
b_xy
-
h
->
b_stride
+
4
])
;
h
->
ref_cache
[
m
][
scan8
[
0
]
+
4
-
1
*
8
]
=
(
h
->
intra4x4_pred_mode
[
h
->
mb2br_xy
[
mb_xy
-
s
->
mb_stride
+
1
]
+
6
]
==
-
1
||
h
->
intra4x4_pred_mode
[
h
->
mb2br_xy
[
mb_xy
-
s
->
mb_stride
]
]
==
-
1
)
?
PART_NOT_AVAILABLE
:
1
;
}
else
h
->
ref_cache
[
m
][
scan8
[
0
]
+
4
-
1
*
8
]
=
PART_NOT_AVAILABLE
;
if
(
s
->
mb_x
>
0
)
{
*
(
uint32_t
*
)
h
->
mv_cache
[
m
][
scan8
[
0
]
-
1
-
1
*
8
]
=
*
(
uint32_t
*
)
s
->
current_picture
.
f
.
motion_val
[
m
][
b_xy
-
h
->
b_stride
-
1
]
;
AV_COPY32
(
h
->
mv_cache
[
m
][
scan8
[
0
]
-
1
-
1
*
8
],
s
->
current_picture
.
f
.
motion_val
[
m
][
b_xy
-
h
->
b_stride
-
1
])
;
h
->
ref_cache
[
m
][
scan8
[
0
]
-
1
-
1
*
8
]
=
(
h
->
intra4x4_pred_mode
[
h
->
mb2br_xy
[
mb_xy
-
s
->
mb_stride
-
1
]
+
3
]
==
-
1
)
?
PART_NOT_AVAILABLE
:
1
;
}
else
h
->
ref_cache
[
m
][
scan8
[
0
]
-
1
-
1
*
8
]
=
PART_NOT_AVAILABLE
;
...
...
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