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
e93947b7
Commit
e93947b7
authored
Dec 08, 2011
by
Paul B Mahol
Committed by
Diego Biurrun
Dec 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cljr: add encoder
Signed-off-by:
Diego Biurrun
<
diego@biurrun.de
>
parent
47b20a1d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
21 deletions
+31
-21
Changelog
Changelog
+1
-0
general.texi
doc/general.texi
+1
-1
allcodecs.c
libavcodec/allcodecs.c
+1
-1
cljr.c
libavcodec/cljr.c
+26
-17
version.h
libavcodec/version.h
+1
-1
riff.c
libavformat/riff.c
+1
-1
No files found.
Changelog
View file @
e93947b7
...
...
@@ -105,6 +105,7 @@ easier to use. The changes are:
- CRI ADX audio format demuxer
- Playstation Portable PMP format demuxer
- PCM format support in OMA demuxer
- CLJR encoder
version 0.7:
...
...
doc/general.texi
View file @
e93947b7
...
...
@@ -382,7 +382,7 @@ following image formats are supported:
@tab Codec used in Delphine Software International games.
@item Discworld II BMV Video @tab @tab X
@item Cinepak @tab @tab X
@item Cirrus Logic AccuPak @tab
@tab X
@item Cirrus Logic AccuPak @tab
X
@tab X
@tab fourcc: CLJR
@item Creative YUV (CYUV) @tab @tab X
@item DFA @tab @tab X
...
...
libavcodec/allcodecs.c
View file @
e93947b7
...
...
@@ -87,7 +87,7 @@ void avcodec_register_all(void)
REGISTER_DECODER
(
CAVS
,
cavs
);
REGISTER_DECODER
(
CDGRAPHICS
,
cdgraphics
);
REGISTER_DECODER
(
CINEPAK
,
cinepak
);
REGISTER_
DECODER
(
CLJR
,
cljr
);
REGISTER_
ENCDEC
(
CLJR
,
cljr
);
REGISTER_DECODER
(
CSCD
,
cscd
);
REGISTER_DECODER
(
CYUV
,
cyuv
);
REGISTER_DECODER
(
DFA
,
dfa
);
...
...
libavcodec/cljr.c
View file @
e93947b7
...
...
@@ -25,12 +25,8 @@
*/
#include "avcodec.h"
#include "dsputil.h"
#include "get_bits.h"
/* Disable the encoder. */
#undef CONFIG_CLJR_ENCODER
#define CONFIG_CLJR_ENCODER 0
#include "put_bits.h"
typedef
struct
CLJRContext
{
AVCodecContext
*
avctx
;
...
...
@@ -92,24 +88,35 @@ static int decode_frame(AVCodecContext *avctx,
#if CONFIG_CLJR_ENCODER
static
int
encode_frame
(
AVCodecContext
*
avctx
,
unsigned
char
*
buf
,
int
buf_size
,
void
*
data
){
CLJRContext
*
const
a
=
avctx
->
priv_data
;
AVFrame
*
pict
=
data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
a
->
picture
;
int
size
;
PutBitContext
pb
;
AVFrame
*
p
=
data
;
int
x
,
y
;
*
p
=
*
pict
;
p
->
pict_type
=
AV_PICTURE_TYPE_I
;
p
->
key_frame
=
1
;
emms_c
();
init_put_bits
(
&
pb
,
buf
,
buf_size
/
8
);
for
(
y
=
0
;
y
<
avctx
->
height
;
y
++
)
{
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
]];
for
(
x
=
0
;
x
<
avctx
->
width
;
x
+=
4
)
{
put_bits
(
&
pb
,
5
,
luma
[
3
]
>>
3
);
put_bits
(
&
pb
,
5
,
luma
[
2
]
>>
3
);
put_bits
(
&
pb
,
5
,
luma
[
1
]
>>
3
);
put_bits
(
&
pb
,
5
,
luma
[
0
]
>>
3
);
luma
+=
4
;
put_bits
(
&
pb
,
6
,
*
(
cb
++
)
>>
2
);
put_bits
(
&
pb
,
6
,
*
(
cr
++
)
>>
2
);
}
}
avpriv_align_put_bits
(
&
a
->
pb
);
while
(
get_bit_count
(
&
a
->
pb
)
&
31
)
put_bits
(
&
a
->
pb
,
8
,
0
);
flush_put_bits
(
&
pb
);
size
=
get_bit_count
(
&
a
->
pb
)
/
32
;
emms_c
()
;
return
size
*
4
;
return
put_bits_count
(
&
pb
)
/
8
;
}
#endif
...
...
@@ -165,6 +172,8 @@ AVCodec ff_cljr_encoder = {
.
priv_data_size
=
sizeof
(
CLJRContext
),
.
init
=
encode_init
,
.
encode
=
encode_frame
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Cirrus Logic AccuPak"
),
.
pix_fmts
=
(
const
enum
PixelFormat
[])
{
PIX_FMT_YUV411P
,
PIX_FMT_NONE
},
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Cirrus Logic AccuPak"
),
};
#endif
libavcodec/version.h
View file @
e93947b7
...
...
@@ -21,7 +21,7 @@
#define AVCODEC_VERSION_H
#define LIBAVCODEC_VERSION_MAJOR 53
#define LIBAVCODEC_VERSION_MINOR 2
6
#define LIBAVCODEC_VERSION_MINOR 2
7
#define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
...
...
libavformat/riff.c
View file @
e93947b7
...
...
@@ -264,7 +264,7 @@ const AVCodecTag ff_codec_bmp_tags[] = {
{
CODEC_ID_TARGA
,
MKTAG
(
't'
,
'g'
,
'a'
,
' '
)
},
{
CODEC_ID_PNG
,
MKTAG
(
'M'
,
'P'
,
'N'
,
'G'
)
},
{
CODEC_ID_PNG
,
MKTAG
(
'P'
,
'N'
,
'G'
,
'1'
)
},
{
CODEC_ID_CLJR
,
MKTAG
(
'
c'
,
'l'
,
'j'
,
'r
'
)
},
{
CODEC_ID_CLJR
,
MKTAG
(
'
C'
,
'L'
,
'J'
,
'R
'
)
},
{
CODEC_ID_DIRAC
,
MKTAG
(
'd'
,
'r'
,
'a'
,
'c'
)
},
{
CODEC_ID_RPZA
,
MKTAG
(
'a'
,
'z'
,
'p'
,
'r'
)
},
{
CODEC_ID_RPZA
,
MKTAG
(
'R'
,
'P'
,
'Z'
,
'A'
)
},
...
...
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