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
e2d09b65
Commit
e2d09b65
authored
May 28, 2008
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set coded_frame
Originally committed as revision 13492 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
bf1310c7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
targaenc.c
libavcodec/targaenc.c
+11
-1
tiffenc.c
libavcodec/tiffenc.c
+1
-0
No files found.
libavcodec/targaenc.c
View file @
e2d09b65
...
@@ -21,6 +21,10 @@
...
@@ -21,6 +21,10 @@
#include "avcodec.h"
#include "avcodec.h"
#include "rle.h"
#include "rle.h"
typedef
struct
TargaContext
{
AVFrame
picture
;
}
TargaContext
;
/**
/**
* RLE compress the image, with maximum size of out_size
* RLE compress the image, with maximum size of out_size
* @param outbuf Output buffer
* @param outbuf Output buffer
...
@@ -135,6 +139,12 @@ static int targa_encode_frame(AVCodecContext *avctx,
...
@@ -135,6 +139,12 @@ static int targa_encode_frame(AVCodecContext *avctx,
static
av_cold
int
targa_encode_init
(
AVCodecContext
*
avctx
)
static
av_cold
int
targa_encode_init
(
AVCodecContext
*
avctx
)
{
{
TargaContext
*
s
=
avctx
->
priv_data
;
avcodec_get_frame_defaults
(
&
s
->
picture
);
s
->
picture
.
key_frame
=
1
;
avctx
->
coded_frame
=
&
s
->
picture
;
return
0
;
return
0
;
}
}
...
@@ -142,7 +152,7 @@ AVCodec targa_encoder = {
...
@@ -142,7 +152,7 @@ AVCodec targa_encoder = {
.
name
=
"targa"
,
.
name
=
"targa"
,
.
type
=
CODEC_TYPE_VIDEO
,
.
type
=
CODEC_TYPE_VIDEO
,
.
id
=
CODEC_ID_TARGA
,
.
id
=
CODEC_ID_TARGA
,
.
priv_data_size
=
0
,
.
priv_data_size
=
sizeof
(
TargaContext
)
,
.
init
=
targa_encode_init
,
.
init
=
targa_encode_init
,
.
encode
=
targa_encode_frame
,
.
encode
=
targa_encode_frame
,
.
pix_fmts
=
(
enum
PixelFormat
[]){
PIX_FMT_BGR24
,
PIX_FMT_RGB555
,
PIX_FMT_GRAY8
,
PIX_FMT_NONE
},
.
pix_fmts
=
(
enum
PixelFormat
[]){
PIX_FMT_BGR24
,
PIX_FMT_RGB555
,
PIX_FMT_GRAY8
,
PIX_FMT_NONE
},
...
...
libavcodec/tiffenc.c
View file @
e2d09b65
...
@@ -222,6 +222,7 @@ static int encode_frame(AVCodecContext * avctx, unsigned char *buf,
...
@@ -222,6 +222,7 @@ static int encode_frame(AVCodecContext * avctx, unsigned char *buf,
*
p
=
*
pict
;
*
p
=
*
pict
;
p
->
pict_type
=
FF_I_TYPE
;
p
->
pict_type
=
FF_I_TYPE
;
p
->
key_frame
=
1
;
p
->
key_frame
=
1
;
avctx
->
coded_frame
=
&
s
->
picture
;
s
->
compr
=
TIFF_PACKBITS
;
s
->
compr
=
TIFF_PACKBITS
;
if
(
avctx
->
compression_level
==
0
)
{
if
(
avctx
->
compression_level
==
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