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
20e5d64a
Commit
20e5d64a
authored
May 04, 2011
by
Reimar Döffinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvideo1enc: minor cosmetic cleanup, use FFALIGN, avoid calculating value
twice and add a missing "const".
parent
e5a85164
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
msvideo1enc.c
libavcodec/msvideo1enc.c
+4
-4
No files found.
libavcodec/msvideo1enc.c
View file @
20e5d64a
...
...
@@ -78,8 +78,8 @@ static int encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_size, void
*
p
=
*
pict
;
if
(
!
c
->
prev
)
c
->
prev
=
av_malloc
(
avctx
->
width
*
3
*
(
avctx
->
height
+
3
));
prevptr
=
c
->
prev
+
avctx
->
width
*
3
*
(
((
avctx
->
height
+
3
)
&~
3
)
-
1
);
src
=
(
uint16_t
*
)(
p
->
data
[
0
]
+
p
->
linesize
[
0
]
*
(
((
avctx
->
height
+
3
)
&~
3
)
-
1
));
prevptr
=
c
->
prev
+
avctx
->
width
*
3
*
(
FFALIGN
(
avctx
->
height
,
4
)
-
1
);
src
=
(
uint16_t
*
)(
p
->
data
[
0
]
+
p
->
linesize
[
0
]
*
(
FFALIGN
(
avctx
->
height
,
4
)
-
1
));
if
(
c
->
keyint
>=
avctx
->
keyint_min
)
keyframe
=
1
;
...
...
@@ -96,7 +96,7 @@ static int encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_size, void
for
(
i
=
0
;
i
<
4
;
i
++
){
uint16_t
val
=
src
[
x
+
i
-
j
*
p
->
linesize
[
0
]
/
2
];
for
(
k
=
0
;
k
<
3
;
k
++
){
c
->
block
[(
i
+
j
*
4
)
*
3
+
k
]
=
(
val
>>
(
10
-
k
*
5
))
&
0x1F
;
c
->
block
[(
i
+
j
*
4
)
*
3
+
k
]
=
c
->
block2
[
remap
[
i
+
j
*
4
]
*
3
+
k
]
=
(
val
>>
(
10
-
k
*
5
))
&
0x1F
;
}
}
...
...
@@ -293,6 +293,6 @@ AVCodec ff_msvideo1_encoder = {
encode_init
,
encode_frame
,
encode_end
,
.
pix_fmts
=
(
enum
PixelFormat
[]){
PIX_FMT_RGB555
,
PIX_FMT_NONE
},
.
pix_fmts
=
(
const
enum
PixelFormat
[]){
PIX_FMT_RGB555
,
PIX_FMT_NONE
},
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Microsoft Video-1"
),
};
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