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
b60ad448
Commit
b60ad448
authored
Jun 01, 2003
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 4xm yuv->rgb565 transform
Originally committed as revision 1925 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
5be8a373
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
4xm.c
libavcodec/4xm.c
+15
-9
No files found.
libavcodec/4xm.c
View file @
b60ad448
...
...
@@ -416,32 +416,38 @@ static inline void idct_put(FourXContext *f, int x, int y){
int
stride
=
f
->
current_picture
.
linesize
[
0
]
>>
1
;
int
i
;
uint16_t
*
dst
=
((
uint16_t
*
)
f
->
current_picture
.
data
[
0
])
+
y
*
stride
+
x
;
for
(
i
=
0
;
i
<
4
;
i
++
){
block
[
i
][
0
]
+=
0x80
*
8
*
8
;
idct
(
block
[
i
]);
}
for
(
i
=
0
;
i
<
6
;
i
++
)
idct
(
block
[
i
]);
if
(
!
(
f
->
avctx
->
flags
&
CODEC_FLAG_GRAY
)){
for
(
i
=
4
;
i
<
6
;
i
++
)
idct
(
block
[
i
]);
}
for
(
y
=
0
;
y
<
8
;
y
++
){
for
(
x
=
0
;
x
<
8
;
x
++
){
DCTELEM
*
temp
=
block
[(
x
>>
2
)
+
2
*
(
y
>>
2
)]
+
2
*
(
x
&
3
)
+
2
*
8
*
(
y
&
3
);
//FIXME optimize
int
cb
=
block
[
4
][
x
+
8
*
y
]
+
0x80
;
int
cr
=
block
[
5
][
x
+
8
*
y
]
+
0x80
;
int
cb
=
block
[
4
][
x
+
8
*
y
];
int
cr
=
block
[
5
][
x
+
8
*
y
];
int
cg
=
(
cb
+
cr
)
>>
1
;
int
y
;
cb
+=
cb
-
0x80
;
cb
+=
cb
;
y
=
temp
[
0
];
dst
[
0
]
=
((
y
+
cb
)
>>
3
)
+
(((
y
+
cg
)
&
0xFC
)
<<
3
)
+
(((
y
+
cr
)
&
0xF8
)
<<
8
);
dst
[
0
]
=
((
y
+
cb
)
>>
3
)
+
(((
y
-
cg
)
&
0xFC
)
<<
3
)
+
(((
y
+
cr
)
&
0xF8
)
<<
8
);
y
=
temp
[
1
];
dst
[
1
]
=
((
y
+
cb
)
>>
3
)
+
(((
y
+
cg
)
&
0xFC
)
<<
3
)
+
(((
y
+
cr
)
&
0xF8
)
<<
8
);
dst
[
1
]
=
((
y
+
cb
)
>>
3
)
+
(((
y
-
cg
)
&
0xFC
)
<<
3
)
+
(((
y
+
cr
)
&
0xF8
)
<<
8
);
y
=
temp
[
8
];
dst
[
stride
]
=
((
y
+
cb
)
>>
3
)
+
(((
y
+
cg
)
&
0xFC
)
<<
3
)
+
(((
y
+
cr
)
&
0xF8
)
<<
8
);
dst
[
stride
]
=
((
y
+
cb
)
>>
3
)
+
(((
y
-
cg
)
&
0xFC
)
<<
3
)
+
(((
y
+
cr
)
&
0xF8
)
<<
8
);
y
=
temp
[
9
];
dst
[
1
+
stride
]
=
((
y
+
cb
)
>>
3
)
+
(((
y
+
cg
)
&
0xFC
)
<<
3
)
+
(((
y
+
cr
)
&
0xF8
)
<<
8
);
dst
[
1
+
stride
]
=
((
y
+
cb
)
>>
3
)
+
(((
y
-
cg
)
&
0xFC
)
<<
3
)
+
(((
y
+
cr
)
&
0xF8
)
<<
8
);
dst
+=
2
;
}
dst
+=
2
*
stride
-
2
*
8
;
}
// if(!(f->avctx->flags&CODEC_FLAG_GRAY)){
}
static
int
decode_i_mb
(
FourXContext
*
f
){
...
...
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