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
13e9cc9c
Commit
13e9cc9c
authored
Nov 09, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a64multienc: use the AVFrame API properly.
parent
b9fb59d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
a64enc.h
libavcodec/a64enc.h
+0
-3
a64multienc.c
libavcodec/a64multienc.c
+8
-3
No files found.
libavcodec/a64enc.h
View file @
13e9cc9c
...
@@ -34,9 +34,6 @@
...
@@ -34,9 +34,6 @@
#define C64YRES 200
#define C64YRES 200
typedef
struct
A64Context
{
typedef
struct
A64Context
{
/* general variables */
AVFrame
picture
;
/* variables for multicolor modes */
/* variables for multicolor modes */
AVLFG
randctx
;
AVLFG
randctx
;
int
mc_lifetime
;
int
mc_lifetime
;
...
...
libavcodec/a64multienc.c
View file @
13e9cc9c
...
@@ -165,6 +165,7 @@ static void render_charset(AVCodecContext *avctx, uint8_t *charset,
...
@@ -165,6 +165,7 @@ static void render_charset(AVCodecContext *avctx, uint8_t *charset,
static
av_cold
int
a64multi_close_encoder
(
AVCodecContext
*
avctx
)
static
av_cold
int
a64multi_close_encoder
(
AVCodecContext
*
avctx
)
{
{
A64Context
*
c
=
avctx
->
priv_data
;
A64Context
*
c
=
avctx
->
priv_data
;
av_frame_free
(
&
avctx
->
coded_frame
);
av_free
(
c
->
mc_meta_charset
);
av_free
(
c
->
mc_meta_charset
);
av_free
(
c
->
mc_best_cb
);
av_free
(
c
->
mc_best_cb
);
av_free
(
c
->
mc_charset
);
av_free
(
c
->
mc_charset
);
...
@@ -216,8 +217,12 @@ static av_cold int a64multi_init_encoder(AVCodecContext *avctx)
...
@@ -216,8 +217,12 @@ static av_cold int a64multi_init_encoder(AVCodecContext *avctx)
AV_WB32
(
avctx
->
extradata
,
c
->
mc_lifetime
);
AV_WB32
(
avctx
->
extradata
,
c
->
mc_lifetime
);
AV_WB32
(
avctx
->
extradata
+
16
,
INTERLACED
);
AV_WB32
(
avctx
->
extradata
+
16
,
INTERLACED
);
avcodec_get_frame_defaults
(
&
c
->
picture
);
avctx
->
coded_frame
=
av_frame_alloc
();
avctx
->
coded_frame
=
&
c
->
picture
;
if
(
!
avctx
->
coded_frame
)
{
a64multi_close_encoder
(
avctx
);
return
AVERROR
(
ENOMEM
);
}
avctx
->
coded_frame
->
pict_type
=
AV_PICTURE_TYPE_I
;
avctx
->
coded_frame
->
pict_type
=
AV_PICTURE_TYPE_I
;
avctx
->
coded_frame
->
key_frame
=
1
;
avctx
->
coded_frame
->
key_frame
=
1
;
if
(
!
avctx
->
codec_tag
)
if
(
!
avctx
->
codec_tag
)
...
@@ -247,7 +252,7 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
...
@@ -247,7 +252,7 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const
AVFrame
*
pict
,
int
*
got_packet
)
const
AVFrame
*
pict
,
int
*
got_packet
)
{
{
A64Context
*
c
=
avctx
->
priv_data
;
A64Context
*
c
=
avctx
->
priv_data
;
AVFrame
*
const
p
=
&
c
->
pictur
e
;
AVFrame
*
const
p
=
avctx
->
coded_fram
e
;
int
frame
;
int
frame
;
int
x
,
y
;
int
x
,
y
;
...
...
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