Unified · Split
| @@ -13,6 +13,9 @@ libavutil: 2011-04-18 · 12 unmodified lines | |||
| 13 | 13 | ||
| 14 | API changes, most recent first: | 14 | API changes, most recent first: |
| 15 | 15 | ||
| 16 | 2012-02-21 - xxxxxxx - lavc 54.4.100 | ||
| 17 | Add av_get_pcm_codec() function. | ||
| 18 | |||
| 16 | 2012-02-16 - xxxxxxx - libswr 0.7.100 | 19 | 2012-02-16 - xxxxxxx - libswr 0.7.100 |
| 17 | Add swr_set_matrix() function. | 20 | Add swr_set_matrix() function. |
| 18 | 21 | ||
| @@ -4055,6 +4055,14 @@ void avcodec_default_free_buffers(AVCodecContext *s); · 4054 unmodified lines | |||
| 4055 | */ | 4055 | */ |
| 4056 | int av_get_bits_per_sample(enum CodecID codec_id); | 4056 | int av_get_bits_per_sample(enum CodecID codec_id); |
| 4057 | 4057 | ||
| 4058 | /** | ||
| 4059 | * Return the PCM codec associated with a sample format. | ||
| 4060 | * @param be endianness, 0 for little, 1 for big, | ||
| 4061 | * -1 (or anything else) for native | ||
| 4062 | * @return CODEC_ID_PCM_* or CODEC_ID_NONE | ||
| 4063 | */ | ||
| 4064 | enum CodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be); | ||
| 4065 | |||
| 4058 | /* frame parsing */ | 4066 | /* frame parsing */ |
| 4059 | typedef struct AVCodecParserContext { | 4067 | typedef struct AVCodecParserContext { |
| 4060 | void *priv_data; | 4068 | void *priv_data; |
| @@ -1902,6 +1902,27 @@ int av_get_bits_per_sample(enum CodecID codec_id){ · 1901 unmodified lines | |||
| 1902 | } | 1902 | } |
| 1903 | } | 1903 | } |
| 1904 | 1904 | ||
| 1905 | enum CodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be) | ||
| 1906 | { | ||
| 1907 | static const enum CodecID map[AV_SAMPLE_FMT_NB][2] = { | ||
| 1908 | [AV_SAMPLE_FMT_U8 ] = { CODEC_ID_PCM_U8, CODEC_ID_PCM_U8 }, | ||
| 1909 | [AV_SAMPLE_FMT_S16 ] = { CODEC_ID_PCM_S16LE, CODEC_ID_PCM_S16BE }, | ||
| 1910 | [AV_SAMPLE_FMT_S32 ] = { CODEC_ID_PCM_S32LE, CODEC_ID_PCM_S32BE }, | ||
| 1911 | [AV_SAMPLE_FMT_FLT ] = { CODEC_ID_PCM_F32LE, CODEC_ID_PCM_F32BE }, | ||
| 1912 | [AV_SAMPLE_FMT_DBL ] = { CODEC_ID_PCM_F64LE, CODEC_ID_PCM_F64BE }, | ||
| 1913 | [AV_SAMPLE_FMT_U8P ] = { CODEC_ID_PCM_U8, CODEC_ID_PCM_U8 }, | ||
| 1914 | [AV_SAMPLE_FMT_S16P] = { CODEC_ID_PCM_S16LE, CODEC_ID_PCM_S16BE }, | ||
| 1915 | [AV_SAMPLE_FMT_S32P] = { CODEC_ID_PCM_S32LE, CODEC_ID_PCM_S32BE }, | ||
| 1916 | [AV_SAMPLE_FMT_FLTP] = { CODEC_ID_PCM_F32LE, CODEC_ID_PCM_F32BE }, | ||
| 1917 | [AV_SAMPLE_FMT_DBLP] = { CODEC_ID_PCM_F64LE, CODEC_ID_PCM_F64BE }, | ||
| 1918 | }; | ||
| 1919 | if (fmt < 0 || fmt >= AV_SAMPLE_FMT_NB) | ||
| 1920 | return CODEC_ID_NONE; | ||
| 1921 | if (be < 0 || be > 1) | ||
| 1922 | be = AV_NE(1, 0); | ||
| 1923 | return map[fmt][be]; | ||
| 1924 | } | ||
| 1925 | |||
| 1905 | #if !HAVE_THREADS | 1926 | #if !HAVE_THREADS |
| 1906 | int ff_thread_init(AVCodecContext *s){ | 1927 | int ff_thread_init(AVCodecContext *s){ |
| 1907 | return -1; | 1928 | return -1; |
| @@ -21,8 +21,8 @@ · 20 unmodified lines | |||
| 21 | #define AVCODEC_VERSION_H | 21 | #define AVCODEC_VERSION_H |
| 22 | 22 | ||
| 23 | #define LIBAVCODEC_VERSION_MAJOR 54 | 23 | #define LIBAVCODEC_VERSION_MAJOR 54 |
| 24 | #define LIBAVCODEC_VERSION_MINOR 3 | 24 | #define LIBAVCODEC_VERSION_MINOR 4 |
| 25 | #define LIBAVCODEC_VERSION_MICRO 101 | 25 | #define LIBAVCODEC_VERSION_MICRO 100 |
| 26 | 26 | ||
| 27 | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ | 27 | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |
| 28 | LIBAVCODEC_VERSION_MINOR, \ | 28 | LIBAVCODEC_VERSION_MINOR, \ |