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
a33c7159
Commit
a33c7159
authored
Jan 12, 2003
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get_format()
Originally committed as revision 1451 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
2a006cd3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
0 deletions
+18
-0
avcodec.h
libavcodec/avcodec.h
+10
-0
mpegvideo.c
libavcodec/mpegvideo.c
+2
-0
mpegvideo.h
libavcodec/mpegvideo.h
+1
-0
utils.c
libavcodec/utils.c
+5
-0
No files found.
libavcodec/avcodec.h
View file @
a33c7159
...
...
@@ -923,6 +923,16 @@ typedef struct AVCodecContext {
*/
int
me_subpel_quality
;
/**
* callback to negotiate the pixelFormat
* @param fmt is the list of formats which are supported by the codec,
* its terminated by -1 as 0 is a valid format, the formats are ordered by quality
* the first is allways the native one
* @return the choosen format
* encoding: unused
* decoding: set by user, if not set then the native format will always be choosen
*/
enum
PixelFormat
(
*
get_format
)(
struct
AVCodecContext
*
s
,
enum
PixelFormat
*
fmt
);
}
AVCodecContext
;
typedef
struct
AVCodec
{
...
...
libavcodec/mpegvideo.c
View file @
a33c7159
...
...
@@ -86,6 +86,8 @@ static const uint8_t h263_chroma_roundtab[16] = {
static
UINT16
(
*
default_mv_penalty
)[
MAX_MV
*
2
+
1
]
=
NULL
;
static
UINT8
default_fcode_tab
[
MAX_MV
*
2
+
1
];
enum
PixelFormat
ff_yuv420p_list
[
2
]
=
{
PIX_FMT_YUV420P
,
-
1
};
static
void
convert_matrix
(
MpegEncContext
*
s
,
int
(
*
qmat
)[
64
],
uint16_t
(
*
qmat16
)[
64
],
uint16_t
(
*
qmat16_bias
)[
64
],
const
UINT16
*
quant_matrix
,
int
bias
,
int
qmin
,
int
qmax
)
{
...
...
libavcodec/mpegvideo.h
View file @
a33c7159
...
...
@@ -597,6 +597,7 @@ void ff_emulated_edge_mc(MpegEncContext *s, UINT8 *src, int linesize, int block_
int
src_x
,
int
src_y
,
int
w
,
int
h
);
char
ff_get_pict_type_char
(
int
pict_type
);
extern
enum
PixelFormat
ff_yuv420p_list
[
2
];
extern
int
ff_bit_exact
;
...
...
libavcodec/utils.c
View file @
a33c7159
...
...
@@ -185,6 +185,10 @@ void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic){
//printf("R%X\n", pic->opaque);
}
enum
PixelFormat
avcodec_default_get_format
(
struct
AVCodecContext
*
s
,
enum
PixelFormat
*
fmt
){
return
fmt
[
0
];
}
void
avcodec_get_context_defaults
(
AVCodecContext
*
s
){
s
->
bit_rate
=
800
*
1000
;
s
->
bit_rate_tolerance
=
s
->
bit_rate
*
10
;
...
...
@@ -207,6 +211,7 @@ void avcodec_get_context_defaults(AVCodecContext *s){
s
->
me_method
=
ME_EPZS
;
s
->
get_buffer
=
avcodec_default_get_buffer
;
s
->
release_buffer
=
avcodec_default_release_buffer
;
s
->
get_format
=
avcodec_default_get_format
;
s
->
me_subpel_quality
=
8
;
}
...
...
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