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
61088051
Commit
61088051
authored
Apr 16, 2017
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: add Screen Recorder Gold Codec decoder
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
a96db6be
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
35 additions
and
4 deletions
+35
-4
configure
configure
+1
-0
general.texi
doc/general.texi
+1
-0
Makefile
libavcodec/Makefile
+1
-0
allcodecs.c
libavcodec/allcodecs.c
+1
-0
avcodec.h
libavcodec/avcodec.h
+1
-0
codec_desc.c
libavcodec/codec_desc.c
+7
-0
mscc.c
libavcodec/mscc.c
+21
-3
version.h
libavcodec/version.h
+1
-1
riff.c
libavformat/riff.c
+1
-0
No files found.
configure
View file @
61088051
...
...
@@ -2514,6 +2514,7 @@ sonic_decoder_select="golomb rangecoder"
sonic_encoder_select
=
"golomb rangecoder"
sonic_ls_encoder_select
=
"golomb rangecoder"
sp5x_decoder_select
=
"mjpeg_decoder"
srgc_decoder_select
=
"zlib"
svq1_decoder_select
=
"hpeldsp"
svq1_encoder_select
=
"aandcttables hpeldsp me_cmp mpegvideoenc"
svq3_decoder_select
=
"golomb h264dsp h264parse h264pred hpeldsp tpeldsp videodsp"
...
...
doc/general.texi
View file @
61088051
...
...
@@ -857,6 +857,7 @@ following image formats are supported:
@tab used in some games by Entertainment Software Partners
@item ScreenPressor @tab @tab X
@item Screenpresso @tab @tab X
@item Screen Recorder Gold Codec @tab @tab X
@item Sierra VMD video @tab @tab X
@tab Used in Sierra VMD files.
@item Silicon Graphics Motion Video Compressor 1 (MVC1) @tab @tab X
...
...
libavcodec/Makefile
View file @
61088051
...
...
@@ -541,6 +541,7 @@ OBJS-$(CONFIG_SONIC_ENCODER) += sonic.o
OBJS-$(CONFIG_SONIC_LS_ENCODER)
+=
sonic.o
OBJS-$(CONFIG_SPEEDHQ_DECODER)
+=
speedhq.o
simple_idct.o
OBJS-$(CONFIG_SP5X_DECODER)
+=
sp5xdec.o
OBJS-$(CONFIG_SRGC_DECODER)
+=
mscc.o
OBJS-$(CONFIG_SRT_DECODER)
+=
srtdec.o
ass.o
htmlsubtitles.o
OBJS-$(CONFIG_SRT_ENCODER)
+=
srtenc.o
ass_split.o
OBJS-$(CONFIG_STL_DECODER)
+=
textdec.o
ass.o
...
...
libavcodec/allcodecs.c
View file @
61088051
...
...
@@ -317,6 +317,7 @@ static void register_all(void)
REGISTER_ENCDEC
(
SNOW
,
snow
);
REGISTER_DECODER
(
SP5X
,
sp5x
);
REGISTER_DECODER
(
SPEEDHQ
,
speedhq
);
REGISTER_DECODER
(
SRGC
,
srgc
);
REGISTER_ENCDEC
(
SUNRAST
,
sunrast
);
REGISTER_ENCDEC
(
SVQ1
,
svq1
);
REGISTER_DECODER
(
SVQ3
,
svq3
);
...
...
libavcodec/avcodec.h
View file @
61088051
...
...
@@ -444,6 +444,7 @@ enum AVCodecID {
AV_CODEC_ID_AV1
,
AV_CODEC_ID_BITPACKED
,
AV_CODEC_ID_MSCC
,
AV_CODEC_ID_SRGC
,
/* various PCM "codecs" */
AV_CODEC_ID_FIRST_AUDIO
=
0x10000
,
///< A dummy id pointing at the start of audio codecs
...
...
libavcodec/codec_desc.c
View file @
61088051
...
...
@@ -1395,6 +1395,13 @@ static const AVCodecDescriptor codec_descriptors[] = {
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Mandsoft Screen Capture Codec"
),
.
props
=
AV_CODEC_PROP_INTRA_ONLY
|
AV_CODEC_PROP_LOSSLESS
,
},
{
.
id
=
AV_CODEC_ID_SRGC
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
name
=
"srgc"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Screen Recorder Gold Codec"
),
.
props
=
AV_CODEC_PROP_INTRA_ONLY
|
AV_CODEC_PROP_LOSSLESS
,
},
/* image codecs */
{
...
...
libavcodec/mscc.c
View file @
61088051
...
...
@@ -121,6 +121,8 @@ static int decode_frame(AVCodecContext *avctx,
{
MSCCContext
*
s
=
avctx
->
priv_data
;
AVFrame
*
frame
=
data
;
uint8_t
*
buf
=
avpkt
->
data
;
int
buf_size
=
avpkt
->
size
;
GetByteContext
gb
;
PutByteContext
pb
;
int
ret
,
j
;
...
...
@@ -130,15 +132,19 @@ static int decode_frame(AVCodecContext *avctx,
if
((
ret
=
ff_get_buffer
(
avctx
,
frame
,
0
))
<
0
)
return
ret
;
avpkt
->
data
[
2
]
^=
avpkt
->
data
[
0
];
if
(
avctx
->
codec_id
==
AV_CODEC_ID_MSCC
)
{
avpkt
->
data
[
2
]
^=
avpkt
->
data
[
0
];
buf
+=
2
;
buf_size
-=
2
;
}
ret
=
inflateReset
(
&
s
->
zstream
);
if
(
ret
!=
Z_OK
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Inflate reset error: %d
\n
"
,
ret
);
return
AVERROR_UNKNOWN
;
}
s
->
zstream
.
next_in
=
avpkt
->
data
+
2
;
s
->
zstream
.
avail_in
=
avpkt
->
size
-
2
;
s
->
zstream
.
next_in
=
buf
;
s
->
zstream
.
avail_in
=
buf_size
;
s
->
zstream
.
next_out
=
s
->
decomp_buf
;
s
->
zstream
.
avail_out
=
s
->
decomp_size
;
ret
=
inflate
(
&
s
->
zstream
,
Z_FINISH
);
...
...
@@ -229,3 +235,15 @@ AVCodec ff_mscc_decoder = {
.
decode
=
decode_frame
,
.
capabilities
=
AV_CODEC_CAP_DR1
,
};
AVCodec
ff_srgc_decoder
=
{
.
name
=
"srgc"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Screen Recorder Gold Codec"
),
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
id
=
AV_CODEC_ID_SRGC
,
.
priv_data_size
=
sizeof
(
MSCCContext
),
.
init
=
decode_init
,
.
close
=
decode_close
,
.
decode
=
decode_frame
,
.
capabilities
=
AV_CODEC_CAP_DR1
,
};
libavcodec/version.h
View file @
61088051
...
...
@@ -28,7 +28,7 @@
#include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 57
#define LIBAVCODEC_VERSION_MINOR 9
2
#define LIBAVCODEC_VERSION_MINOR 9
3
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
...
...
libavformat/riff.c
View file @
61088051
...
...
@@ -453,6 +453,7 @@ const AVCodecTag ff_codec_bmp_tags[] = {
{
AV_CODEC_ID_CLEARVIDEO
,
MKTAG
(
'U'
,
'C'
,
'O'
,
'D'
)
},
{
AV_CODEC_ID_AV1
,
MKTAG
(
'A'
,
'V'
,
'0'
,
'1'
)
},
{
AV_CODEC_ID_MSCC
,
MKTAG
(
'M'
,
'S'
,
'C'
,
'C'
)
},
{
AV_CODEC_ID_SRGC
,
MKTAG
(
'S'
,
'R'
,
'G'
,
'C'
)
},
{
AV_CODEC_ID_NONE
,
0
}
};
...
...
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