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
e71f2608
Commit
e71f2608
authored
May 26, 2011
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavu: add av_get_pix_fmt_name() convenience function
Also deprecate avcodec_get_pix_fmt_name() in its favor.
parent
34e9c9b1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
7 deletions
+32
-7
APIchanges
doc/APIchanges
+4
-0
avcodec.h
libavcodec/avcodec.h
+4
-0
imgconvert.c
libavcodec/imgconvert.c
+3
-4
version.h
libavcodec/version.h
+4
-1
avutil.h
libavutil/avutil.h
+2
-2
pixdesc.c
libavutil/pixdesc.c
+6
-0
pixdesc.h
libavutil/pixdesc.h
+9
-0
No files found.
doc/APIchanges
View file @
e71f2608
...
...
@@ -13,6 +13,10 @@ libavutil: 2011-04-18
API changes, most recent first:
2011-05-28 - xxxxxx - lavu 51.3.0 - pixdesc.h
Add av_get_pix_fmt_name() in libavutil/pixdesc.h, and deprecate
avcodec_get_pix_fmt_name() in libavcodec/avcodec.h in its favor.
2011-05-22 - xxxxxx - lavf 53.2.0 - avformat.h
Introduce avformat_alloc_output_context2() and deprecate
avformat_alloc_output_context().
...
...
libavcodec/avcodec.h
View file @
e71f2608
...
...
@@ -3391,12 +3391,16 @@ int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width,
int
avpicture_get_size
(
enum
PixelFormat
pix_fmt
,
int
width
,
int
height
);
void
avcodec_get_chroma_sub_sample
(
enum
PixelFormat
pix_fmt
,
int
*
h_shift
,
int
*
v_shift
);
#if FF_API_GET_PIX_FMT_NAME
/**
* Return the short name for a pixel format.
*
* \see av_get_pix_fmt(), av_get_pix_fmt_string().
* @deprecated Deprecated in favor of av_get_pix_fmt_name().
*/
attribute_deprecated
const
char
*
avcodec_get_pix_fmt_name
(
enum
PixelFormat
pix_fmt
);
#endif
void
avcodec_set_dimensions
(
AVCodecContext
*
s
,
int
width
,
int
height
);
...
...
libavcodec/imgconvert.c
View file @
e71f2608
...
...
@@ -417,13 +417,12 @@ void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *
*
v_shift
=
av_pix_fmt_descriptors
[
pix_fmt
].
log2_chroma_h
;
}
#if FF_API_GET_PIX_FMT_NAME
const
char
*
avcodec_get_pix_fmt_name
(
enum
PixelFormat
pix_fmt
)
{
if
((
unsigned
)
pix_fmt
>=
PIX_FMT_NB
)
return
NULL
;
else
return
av_pix_fmt_descriptors
[
pix_fmt
].
name
;
return
av_get_pix_fmt_name
(
pix_fmt
);
}
#endif
int
ff_is_hwaccel_pix_fmt
(
enum
PixelFormat
pix_fmt
)
{
...
...
libavcodec/version.h
View file @
e71f2608
...
...
@@ -22,7 +22,7 @@
#define LIBAVCODEC_VERSION_MAJOR 53
#define LIBAVCODEC_VERSION_MINOR 6
#define LIBAVCODEC_VERSION_MICRO
0
#define LIBAVCODEC_VERSION_MICRO
1
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
...
...
@@ -65,5 +65,8 @@
#ifndef FF_API_FLAC_GLOBAL_OPTS
#define FF_API_FLAC_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 54)
#endif
#ifndef FF_API_GET_PIX_FMT_NAME
#define FF_API_GET_PIX_FMT_NAME (LIBAVCODEC_VERSION_MAJOR < 54)
#endif
#endif
/* AVCODEC_VERSION_H */
libavutil/avutil.h
View file @
e71f2608
...
...
@@ -40,8 +40,8 @@
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
#define LIBAVUTIL_VERSION_MAJOR 51
#define LIBAVUTIL_VERSION_MINOR
2
#define LIBAVUTIL_VERSION_MICRO
2
#define LIBAVUTIL_VERSION_MINOR
3
#define LIBAVUTIL_VERSION_MICRO
0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
...
...
libavutil/pixdesc.c
View file @
e71f2608
...
...
@@ -906,6 +906,12 @@ static enum PixelFormat get_pix_fmt_internal(const char *name)
return
PIX_FMT_NONE
;
}
const
char
*
av_get_pix_fmt_name
(
enum
PixelFormat
pix_fmt
)
{
return
(
unsigned
)
pix_fmt
<
PIX_FMT_NB
?
av_pix_fmt_descriptors
[
pix_fmt
].
name
:
NULL
;
}
#if HAVE_BIGENDIAN
# define X_NE(be, le) be
#else
...
...
libavutil/pixdesc.h
View file @
e71f2608
...
...
@@ -22,6 +22,7 @@
#ifndef AVUTIL_PIXDESC_H
#define AVUTIL_PIXDESC_H
#include "pixfmt.h"
#include <inttypes.h>
typedef
struct
AVComponentDescriptor
{
...
...
@@ -141,6 +142,14 @@ void av_write_image_line(const uint16_t *src, uint8_t *data[4], const int linesi
*/
enum
PixelFormat
av_get_pix_fmt
(
const
char
*
name
);
/**
* Return the short name for a pixel format, NULL in case pix_fmt is
* unknown.
*
* @see av_get_pix_fmt(), av_get_pix_fmt_string()
*/
const
char
*
av_get_pix_fmt_name
(
enum
PixelFormat
pix_fmt
);
/**
* Print in buf the string corresponding to the pixel format with
* number pix_fmt, or an header if pix_fmt is negative.
...
...
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