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
4a0ec85b
Commit
4a0ec85b
authored
Jun 13, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/rv34: fix edge emu with uv stride <= 25
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
6a65f3fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
14 deletions
+20
-14
rv34.c
libavcodec/rv34.c
+20
-14
No files found.
libavcodec/rv34.c
View file @
4a0ec85b
...
...
@@ -672,6 +672,7 @@ static inline void rv34_mc(RV34DecContext *r, const int block_type,
int
dxy
,
mx
,
my
,
umx
,
umy
,
lx
,
ly
,
uvmx
,
uvmy
,
src_x
,
src_y
,
uvsrc_x
,
uvsrc_y
;
int
mv_pos
=
s
->
mb_x
*
2
+
s
->
mb_y
*
2
*
s
->
b8_stride
+
mv_off
;
int
is16x16
=
1
;
int
emu
=
0
;
if
(
thirdpel
){
int
chroma_mx
,
chroma_my
;
...
...
@@ -723,8 +724,6 @@ static inline void rv34_mc(RV34DecContext *r, const int block_type,
if
(
s
->
h_edge_pos
-
(
width
<<
3
)
<
6
||
s
->
v_edge_pos
-
(
height
<<
3
)
<
6
||
(
unsigned
)(
src_x
-
!!
lx
*
2
)
>
s
->
h_edge_pos
-
!!
lx
*
2
-
(
width
<<
3
)
-
4
||
(
unsigned
)(
src_y
-
!!
ly
*
2
)
>
s
->
v_edge_pos
-
!!
ly
*
2
-
(
height
<<
3
)
-
4
)
{
uint8_t
*
uvbuf
=
s
->
edge_emu_buffer
+
22
*
s
->
linesize
;
srcY
-=
2
+
2
*
s
->
linesize
;
s
->
vdsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
srcY
,
s
->
linesize
,
s
->
linesize
,
...
...
@@ -732,18 +731,7 @@ static inline void rv34_mc(RV34DecContext *r, const int block_type,
src_x
-
2
,
src_y
-
2
,
s
->
h_edge_pos
,
s
->
v_edge_pos
);
srcY
=
s
->
edge_emu_buffer
+
2
+
2
*
s
->
linesize
;
s
->
vdsp
.
emulated_edge_mc
(
uvbuf
,
srcU
,
s
->
uvlinesize
,
s
->
uvlinesize
,
(
width
<<
2
)
+
1
,
(
height
<<
2
)
+
1
,
uvsrc_x
,
uvsrc_y
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
s
->
vdsp
.
emulated_edge_mc
(
uvbuf
+
16
,
srcV
,
s
->
uvlinesize
,
s
->
uvlinesize
,
(
width
<<
2
)
+
1
,
(
height
<<
2
)
+
1
,
uvsrc_x
,
uvsrc_y
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
srcU
=
uvbuf
;
srcV
=
uvbuf
+
16
;
emu
=
1
;
}
if
(
!
weighted
){
Y
=
s
->
dest
[
0
]
+
xoff
+
yoff
*
s
->
linesize
;
...
...
@@ -766,6 +754,24 @@ static inline void rv34_mc(RV34DecContext *r, const int block_type,
}
is16x16
=
(
block_type
!=
RV34_MB_P_8x8
)
&&
(
block_type
!=
RV34_MB_P_16x8
)
&&
(
block_type
!=
RV34_MB_P_8x16
);
qpel_mc
[
!
is16x16
][
dxy
](
Y
,
srcY
,
s
->
linesize
);
if
(
emu
)
{
uint8_t
*
uvbuf
=
s
->
edge_emu_buffer
;
s
->
vdsp
.
emulated_edge_mc
(
uvbuf
,
srcU
,
s
->
uvlinesize
,
s
->
uvlinesize
,
(
width
<<
2
)
+
1
,
(
height
<<
2
)
+
1
,
uvsrc_x
,
uvsrc_y
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
srcU
=
uvbuf
;
uvbuf
+=
9
*
s
->
uvlinesize
;
s
->
vdsp
.
emulated_edge_mc
(
uvbuf
,
srcV
,
s
->
uvlinesize
,
s
->
uvlinesize
,
(
width
<<
2
)
+
1
,
(
height
<<
2
)
+
1
,
uvsrc_x
,
uvsrc_y
,
s
->
h_edge_pos
>>
1
,
s
->
v_edge_pos
>>
1
);
srcV
=
uvbuf
;
}
chroma_mc
[
2
-
width
]
(
U
,
srcU
,
s
->
uvlinesize
,
height
*
4
,
uvmx
,
uvmy
);
chroma_mc
[
2
-
width
]
(
V
,
srcV
,
s
->
uvlinesize
,
height
*
4
,
uvmx
,
uvmy
);
}
...
...
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