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
d3fc335b
Commit
d3fc335b
authored
Nov 28, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huffyuvenc: support alphaless rgb32
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
0af7d708
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
huffyuv.c
libavcodec/huffyuv.c
+6
-3
No files found.
libavcodec/huffyuv.c
View file @
d3fc335b
...
...
@@ -600,6 +600,9 @@ static av_cold int encode_init(AVCodecContext *avctx)
case
PIX_FMT_RGB32
:
s
->
bitstream_bpp
=
32
;
break
;
case
PIX_FMT_0RGB32
:
s
->
bitstream_bpp
=
24
;
break
;
default
:
av_log
(
avctx
,
AV_LOG_ERROR
,
"format not supported
\n
"
);
return
-
1
;
...
...
@@ -1369,7 +1372,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
encode_422_bitstream
(
s
,
0
,
width
);
}
}
}
else
if
(
avctx
->
pix_fmt
==
PIX_FMT_RGB32
){
}
else
if
(
avctx
->
pix_fmt
==
PIX_FMT_RGB32
||
avctx
->
pix_fmt
==
PIX_FMT_0RGB32
){
uint8_t
*
data
=
p
->
data
[
0
]
+
(
height
-
1
)
*
p
->
linesize
[
0
];
const
int
stride
=
-
p
->
linesize
[
0
];
const
int
fake_stride
=
-
fake_ystride
;
...
...
@@ -1482,7 +1485,7 @@ AVCodec ff_huffyuv_encoder = {
.
init
=
encode_init
,
.
encode
=
encode_frame
,
.
close
=
encode_end
,
.
pix_fmts
=
(
const
enum
PixelFormat
[]){
PIX_FMT_YUV422P
,
PIX_FMT_RGB32
,
PIX_FMT_NONE
},
.
pix_fmts
=
(
const
enum
PixelFormat
[]){
PIX_FMT_YUV422P
,
PIX_FMT_
0RGB32
,
PIX_FMT_
RGB32
,
PIX_FMT_NONE
},
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Huffyuv / HuffYUV"
),
};
#endif
...
...
@@ -1496,7 +1499,7 @@ AVCodec ff_ffvhuff_encoder = {
.
init
=
encode_init
,
.
encode
=
encode_frame
,
.
close
=
encode_end
,
.
pix_fmts
=
(
const
enum
PixelFormat
[]){
PIX_FMT_YUV420P
,
PIX_FMT_YUV422P
,
PIX_FMT_RGB32
,
PIX_FMT_NONE
},
.
pix_fmts
=
(
const
enum
PixelFormat
[]){
PIX_FMT_YUV420P
,
PIX_FMT_YUV422P
,
PIX_FMT_
0RGB32
,
PIX_FMT_
RGB32
,
PIX_FMT_NONE
},
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Huffyuv FFmpeg variant"
),
};
#endif
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