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
6dc709f0
Commit
6dc709f0
authored
May 31, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/cljr: support width%4 encoding
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
59a70422
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
cljr.c
libavcodec/cljr.c
+6
-0
No files found.
libavcodec/cljr.c
View file @
6dc709f0
...
...
@@ -124,12 +124,18 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
uint8_t
*
luma
=
&
p
->
data
[
0
][
y
*
p
->
linesize
[
0
]];
uint8_t
*
cb
=
&
p
->
data
[
1
][
y
*
p
->
linesize
[
1
]];
uint8_t
*
cr
=
&
p
->
data
[
2
][
y
*
p
->
linesize
[
2
]];
uint8_t
luma_tmp
[
4
];
for
(
x
=
0
;
x
<
avctx
->
width
;
x
+=
4
)
{
switch
(
a
->
dither_type
)
{
case
0
:
dither
=
0x492A0000
;
break
;
case
1
:
dither
=
dither
*
1664525
+
1013904223
;
break
;
case
2
:
dither
=
ordered_dither
[
y
&
1
][
(
x
>>
2
)
&
1
];
break
;
}
if
(
x
+
3
>=
avctx
->
width
)
{
memset
(
luma_tmp
,
0
,
sizeof
(
luma_tmp
));
memcpy
(
luma_tmp
,
luma
,
avctx
->
width
-
x
);
luma
=
luma_tmp
;
}
put_bits
(
&
pb
,
5
,
(
249
*
(
luma
[
3
]
+
(
dither
>>
29
)
))
>>
11
);
put_bits
(
&
pb
,
5
,
(
249
*
(
luma
[
2
]
+
((
dither
>>
26
)
&
7
)))
>>
11
);
put_bits
(
&
pb
,
5
,
(
249
*
(
luma
[
1
]
+
((
dither
>>
23
)
&
7
)))
>>
11
);
...
...
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