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
22f59a8c
Commit
22f59a8c
authored
Jan 06, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/huffyuv: add GBRP support
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
49a59124
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
huffyuvdec.c
libavcodec/huffyuvdec.c
+3
-0
huffyuvenc.c
libavcodec/huffyuvenc.c
+4
-2
No files found.
libavcodec/huffyuvdec.c
View file @
22f59a8c
...
...
@@ -364,6 +364,9 @@ static av_cold int decode_init(AVCodecContext *avctx)
&
s
->
chroma_v_shift
);
}
else
{
switch
(
(
s
->
chroma
<<
10
)
|
(
s
->
yuv
<<
9
)
|
(
s
->
alpha
<<
8
)
|
((
s
->
bps
-
1
)
<<
4
)
|
s
->
chroma_h_shift
|
(
s
->
chroma_v_shift
<<
2
))
{
case
0x470
:
avctx
->
pix_fmt
=
AV_PIX_FMT_GBRP
;
break
;
case
0x670
:
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV444P
;
break
;
...
...
libavcodec/huffyuvenc.c
View file @
22f59a8c
...
...
@@ -186,6 +186,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
case
AV_PIX_FMT_YUV410P
:
case
AV_PIX_FMT_YUV411P
:
case
AV_PIX_FMT_YUV440P
:
case
AV_PIX_FMT_GBRP
:
s
->
version
=
3
;
break
;
case
AV_PIX_FMT_RGB32
:
...
...
@@ -200,7 +201,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
}
avctx
->
bits_per_coded_sample
=
s
->
bitstream_bpp
;
s
->
decorrelate
=
s
->
bitstream_bpp
>=
24
&&
!
s
->
yuv
;
s
->
decorrelate
=
s
->
bitstream_bpp
>=
24
&&
!
s
->
yuv
&&
avctx
->
pix_fmt
!=
AV_PIX_FMT_GBRP
;
s
->
predictor
=
avctx
->
prediction_method
;
s
->
interlaced
=
avctx
->
flags
&
CODEC_FLAG_INTERLACED_ME
?
1
:
0
;
if
(
avctx
->
context_model
==
1
)
{
...
...
@@ -720,7 +721,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
}
encode_bgra_bitstream
(
s
,
width
,
3
);
}
}
else
if
(
s
->
yuv
)
{
}
else
if
(
s
->
version
>
2
)
{
int
plane
;
for
(
plane
=
0
;
plane
<
1
+
2
*
s
->
chroma
+
s
->
alpha
;
plane
++
)
{
int
left
,
y
;
...
...
@@ -856,6 +857,7 @@ AVCodec ff_ffvhuff_encoder = {
.
pix_fmts
=
(
const
enum
AVPixelFormat
[]){
AV_PIX_FMT_YUV420P
,
AV_PIX_FMT_YUV422P
,
AV_PIX_FMT_YUV444P
,
AV_PIX_FMT_YUV411P
,
AV_PIX_FMT_YUV410P
,
AV_PIX_FMT_YUV440P
,
AV_PIX_FMT_GBRP
,
AV_PIX_FMT_RGB24
,
AV_PIX_FMT_RGB32
,
AV_PIX_FMT_NONE
},
...
...
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