Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
a949d72e
Commit
a949d72e
authored
22 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
avcodec_alloc_context()
Originally committed as revision 954 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
947ac25a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavcodec/avcodec.h
+7
-4
7 additions, 4 deletions
libavcodec/avcodec.h
libavcodec/utils.c
+21
-0
21 additions, 0 deletions
libavcodec/utils.c
with
28 additions
and
4 deletions
libavcodec/avcodec.h
+
7
−
4
View file @
a949d72e
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
#define LIBAVCODEC_VERSION_INT 0x000406
#define LIBAVCODEC_VERSION_INT 0x000406
#define LIBAVCODEC_VERSION "0.4.6"
#define LIBAVCODEC_VERSION "0.4.6"
#define LIBAVCODEC_BUILD 462
3
#define LIBAVCODEC_BUILD 462
4
#define LIBAVCODEC_BUILD_STR "462
3
"
#define LIBAVCODEC_BUILD_STR "462
4
"
enum
CodecID
{
enum
CodecID
{
CODEC_ID_NONE
,
CODEC_ID_NONE
,
...
@@ -100,8 +100,10 @@ static const int Motion_Est_QTab[] = { ME_ZERO, ME_PHODS, ME_LOG,
...
@@ -100,8 +100,10 @@ static const int Motion_Est_QTab[] = { ME_ZERO, ME_PHODS, ME_LOG,
#define FF_MAX_B_FRAMES 4
#define FF_MAX_B_FRAMES 4
/* encoding support */
/* encoding support
/* note not everything is supported yet */
these flags can be passed in AVCodecContext.flags before initing
Note: note not everything is supported yet
*/
#define CODEC_FLAG_HQ 0x0001
/* high quality (non real time) encoding */
#define CODEC_FLAG_HQ 0x0001
/* high quality (non real time) encoding */
#define CODEC_FLAG_QSCALE 0x0002
/* use fixed qscale */
#define CODEC_FLAG_QSCALE 0x0002
/* use fixed qscale */
...
@@ -514,6 +516,7 @@ AVCodec *avcodec_find_decoder(enum CodecID id);
...
@@ -514,6 +516,7 @@ AVCodec *avcodec_find_decoder(enum CodecID id);
AVCodec
*
avcodec_find_decoder_by_name
(
const
char
*
name
);
AVCodec
*
avcodec_find_decoder_by_name
(
const
char
*
name
);
void
avcodec_string
(
char
*
buf
,
int
buf_size
,
AVCodecContext
*
enc
,
int
encode
);
void
avcodec_string
(
char
*
buf
,
int
buf_size
,
AVCodecContext
*
enc
,
int
encode
);
AVCodecContext
*
avcodec_alloc_context
();
int
avcodec_open
(
AVCodecContext
*
avctx
,
AVCodec
*
codec
);
int
avcodec_open
(
AVCodecContext
*
avctx
,
AVCodec
*
codec
);
int
avcodec_decode_audio
(
AVCodecContext
*
avctx
,
INT16
*
samples
,
int
avcodec_decode_audio
(
AVCodecContext
*
avctx
,
INT16
*
samples
,
int
*
frame_size_ptr
,
int
*
frame_size_ptr
,
...
...
This diff is collapsed.
Click to expand it.
libavcodec/utils.c
+
21
−
0
View file @
a949d72e
...
@@ -49,6 +49,27 @@ void register_avcodec(AVCodec *format)
...
@@ -49,6 +49,27 @@ void register_avcodec(AVCodec *format)
format
->
next
=
NULL
;
format
->
next
=
NULL
;
}
}
void
avcodec_get_context_defaults
(
AVCodecContext
*
s
){
s
->
qmin
=
2
;
s
->
qmax
=
31
;
s
->
rc_eq
=
"tex^qComp"
;
s
->
qcompress
=
0
.
5
;
}
/**
* allocates a AVCodecContext and set it to defaults.
* this can be deallocated by simply calling free()
*/
AVCodecContext
*
avcodec_alloc_context
(){
AVCodecContext
*
avctx
=
av_mallocz
(
sizeof
(
AVCodecContext
));
if
(
avctx
==
NULL
)
return
NULL
;
avcodec_get_context_defaults
(
avctx
);
return
avctx
;
}
int
avcodec_open
(
AVCodecContext
*
avctx
,
AVCodec
*
codec
)
int
avcodec_open
(
AVCodecContext
*
avctx
,
AVCodec
*
codec
)
{
{
int
ret
;
int
ret
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment