API changes, most recent first:
+2011-06-06 - xxxxxx - lavfi 2.14.0 - AVFilterBufferRefAudioProps
+ Remove AVFilterBufferRefAudioProps.size, and use nb_samples in
+ avfilter_get_audio_buffer() and avfilter_default_get_audio_buffer() in
+ place of size.
+
+2011-06-06 - xxxxxx - lavu 51.6.0 - av_samples_alloc()
+ Switch nb_channels and nb_samples parameters order in
+ av_samples_alloc().
+
+2011-06-06 - xxxxxx - lavu 51.5.0 - av_samples_*
+ Change the data layout created by av_samples_fill_arrays() and
+ av_samples_alloc().
+
+2011-06-06 - xxxxxx - lavfi 2.13.0 - vsrc_buffer.h
+ Make av_vsrc_buffer_add_video_buffer_ref() accepts an additional
+ flags parameter in input.
+
+2011-06-03 - xxxxxx - lavfi 2.12.0 - avfilter_link_free()
+ Add avfilter_link_free() function.
+
+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().
+
+2011-05-22 - xxxxxx - lavfi 2.10.0 - vsrc_buffer.h
+ Make libavfilter/vsrc_buffer.h public.
+
+2011-05-XX - XXXXXX - lavfi 2.8.0 - avcodec.h
+ Add av_vsrc_buffer_add_frame() to libavfilter/avcodec.h.
+
+2011-05-XX - XXXXXX - lavfi 2.6.0 - avcodec.h
+ Add avfilter_get_video_buffer_ref_from_frame() to libavfilter/avcodec.h.
+
+ 2011-06-xx - xxxxxxx - lavu 51.5.0 - AVMetadata
+ Move AVMetadata from lavf to lavu and rename it to
+ AVDictionary -- new installed header dict.h.
+ All av_metadata_* functions renamed to av_dict_*.
+
2011-06-07 - a6703fa - lavu 51.4.0 - av_get_bytes_per_sample()
Add av_get_bytes_per_sample() in libavutil/samplefmt.h.
Deprecate av_get_bits_per_sample_fmt().
enum AVDiscard discard; ///< selects which program to discard and which to feed to the caller
unsigned int *stream_index;
unsigned int nb_stream_indexes;
- AVMetadata *metadata;
+ AVDictionary *metadata;
+
+ int program_num;
+ int pmt_pid;
+ int pcr_pid;
} AVProgram;
#define AVFMTCTX_NOHEADER 0x0001 /**< signal that no header is present
#include <strings.h>
#include "libavutil/intreadwrite.h"
#include "libavutil/bswap.h"
+#include "libavutil/opt.h"
+ #include "libavutil/dict.h"
#include "avformat.h"
#include "avi.h"
#include "dv.h"
for (i = 0; i < nb_entries; i++) {
char key[32];
char value[1024];
- avio_get_str(pb, INT_MAX, key, sizeof(key));
- avio_get_str(pb, INT_MAX, value, sizeof(value));
+ get_strz(pb, key, sizeof(key));
+ get_strz(pb, value, sizeof(value));
- av_metadata_set2(&s->metadata, key, value, 0);
+ av_dict_set(&s->metadata, key, value, 0);
}
}
static int read_header(AVFormatContext *s, AVFormatParameters *ap)
{
- AVMetadata **m = &s->metadata;
+ AVDictionary **m = &s->metadata;
uint8_t line[1024];
- while(!s->pb->eof_reached) {
+ while(!url_feof(s->pb)) {
get_line(s->pb, line, sizeof(line));
if (!memcmp(line, ID_STREAM, strlen(ID_STREAM))) {
* http://wiki.multimedia.cx/index.php?title=IFF
*/
+#include "libavcodec/bytestream.h"
#include "libavutil/intreadwrite.h"
+ #include "libavutil/dict.h"
#include "avformat.h"
#define ID_8SVX MKTAG('8','S','V','X')
// XXX: interlace flag?
put_ebml_uint (pb, MATROSKA_ID_VIDEOPIXELWIDTH , codec->width);
put_ebml_uint (pb, MATROSKA_ID_VIDEOPIXELHEIGHT, codec->height);
- if ((tag = av_dict_get(s->metadata, "stereo_mode", NULL, 0))) {
- uint8_t stereo_fmt = atoi(tag->value);
- int valid_fmt = 0;
-
- switch (mkv->mode) {
- case MODE_WEBM:
- if (stereo_fmt <= MATROSKA_VIDEO_STEREOMODE_TYPE_TOP_BOTTOM
- || stereo_fmt == MATROSKA_VIDEO_STEREOMODE_TYPE_RIGHT_LEFT)
- valid_fmt = 1;
- break;
- case MODE_MATROSKAv2:
- if (stereo_fmt <= MATROSKA_VIDEO_STEREOMODE_TYPE_BOTH_EYES_BLOCK_RL)
- valid_fmt = 1;
- break;
- }
-
- if (valid_fmt)
- put_ebml_uint (pb, MATROSKA_ID_VIDEOSTEREOMODE, stereo_fmt);
+
- if ((tag = av_metadata_get(st->metadata, "stereo_mode", NULL, 0)) ||
- (tag = av_metadata_get( s->metadata, "stereo_mode", NULL, 0))) {
++ if ((tag = av_dict_get(st->metadata, "stereo_mode", NULL, 0)) ||
++ (tag = av_dict_get( s->metadata, "stereo_mode", NULL, 0))) {
+ // save stereo mode flag
+ uint64_t st_mode = MATROSKA_VIDEO_STEREO_MODE_COUNT;
+
+ for (j=0; j<MATROSKA_VIDEO_STEREO_MODE_COUNT; j++)
+ if (!strcmp(tag->value, matroska_video_stereo_mode[j])){
+ st_mode = j;
+ break;
+ }
+
+ if ((mkv->mode == MODE_WEBM && st_mode > 3 && st_mode != 11)
+ || st_mode >= MATROSKA_VIDEO_STEREO_MODE_COUNT) {
+ av_log(s, AV_LOG_ERROR,
+ "The specified stereo mode is not valid.\n");
+ return AVERROR(EINVAL);
+ } else
+ put_ebml_uint(pb, MATROSKA_ID_VIDEOSTEREOMODE, st_mode);
}
+
if (st->sample_aspect_ratio.num) {
int d_width = codec->width*av_q2d(st->sample_aspect_ratio);
put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYWIDTH , d_width);
put_ebml_uint(s->pb, elementid, uid);
end_ebml_master(s->pb, targets);
- while ((t = av_metadata_get(m, "", t, AV_METADATA_IGNORE_SUFFIX)))
+ while ((t = av_dict_get(m, "", t, AV_DICT_IGNORE_SUFFIX)))
- if (strcasecmp(t->key, "title"))
+ if (strcasecmp(t->key, "title") && strcasecmp(t->key, "stereo_mode"))
mkv_write_simpletag(s->pb, t);
end_ebml_master(s->pb, tag);
avio_rb16(pb); // unknown
snprintf(buf, sizeof(buf), "%d", avio_rb16(pb));
- av_metadata_set2(&c->fc->metadata, type, buf, 0);
- av_dict_set(&c->fc->metadata, "track", buf, 0);
++ av_dict_set(&c->fc->metadata, type, buf, 0);
- avio_rb16(pb); // total tracks
+ avio_rb16(pb); // total tracks/discs
return 0;
}
#include "libavutil/avstring.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
+#include "libavcodec/mpegaudio.h"
+#include "libavcodec/mpegaudiodata.h"
+#include "libavcodec/mpegaudiodecheader.h"
+#include "libavformat/avio_internal.h"
+ #include "libavutil/dict.h"
static int id3v1_set_string(AVFormatContext *s, const char *key,
uint8_t *buf, int buf_size)
#include <string.h>
#include "libavutil/avstring.h"
#include "libavutil/base64.h"
+ #include "libavutil/dict.h"
#include "libavutil/parseutils.h"
#include "libavcodec/xiph.h"
+#include "libavcodec/mpeg4audio.h"
#include "avformat.h"
#include "internal.h"
#include "avc.h"
#include "avio_internal.h"
#include "internal.h"
#include "libavcodec/internal.h"
+#include "libavcodec/raw.h"
#include "libavutil/opt.h"
+ #include "libavutil/dict.h"
#include "metadata.h"
#include "id3v2.h"
#include "libavutil/avstring.h"
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
#define LIBAVUTIL_VERSION_MAJOR 51
- #define LIBAVUTIL_VERSION_MINOR 7
-#define LIBAVUTIL_VERSION_MINOR 5
++#define LIBAVUTIL_VERSION_MINOR 8
#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
#include "config.h"
#include "attributes.h"
#include "timer.h"
+#include "cpu.h"
+ #include "dict.h"
+
+ struct AVDictionary {
+ int count;
+ AVDictionaryEntry *elems;
+ };
#ifndef attribute_align_arg
#if ARCH_X86_32 && AV_GCC_VERSION_AT_LEAST(4,2)
yuv2NBPS(16, BE, 1);
yuv2NBPS(16, LE, 0);
- static inline void yuv2yuvX16_c(SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize,
- const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize,
- const int16_t **alpSrc, uint16_t *dest, uint16_t *uDest, uint16_t *vDest, uint16_t *aDest, int dstW, int chrDstW,
- enum PixelFormat dstFormat)
- {
- if (isNBPS(dstFormat)) {
- const int depth = av_pix_fmt_descriptors[dstFormat].comp[0].depth_minus1+1;
- yuv2yuvX16_c_template(lumFilter, lumSrc, lumFilterSize,
- chrFilter, chrUSrc, chrVSrc, chrFilterSize,
- alpSrc,
- dest, uDest, vDest, aDest,
- dstW, chrDstW, isBE(dstFormat), depth);
- } else {
- if (isBE(dstFormat)) {
- yuv2yuvX16_c_template(lumFilter, lumSrc, lumFilterSize,
- chrFilter, chrUSrc, chrVSrc, chrFilterSize,
- alpSrc,
- dest, uDest, vDest, aDest,
- dstW, chrDstW, 1, 16);
- } else {
- yuv2yuvX16_c_template(lumFilter, lumSrc, lumFilterSize,
- chrFilter, chrUSrc, chrVSrc, chrFilterSize,
- alpSrc,
- dest, uDest, vDest, aDest,
- dstW, chrDstW, 0, 16);
- }
- }
- }
-
- static void yuv2yuvX_c(SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize,
- const int16_t *chrFilter, const int16_t **chrUSrc,
- const int16_t **chrVSrc, int chrFilterSize,
- const int16_t **alpSrc, uint8_t *dest, uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, int dstW, int chrDstW,
- const uint8_t *lumDither, const uint8_t *chrDither)
+ static inline void yuv2yuvX_c(SwsContext *c, const int16_t *lumFilter,
+ const int16_t **lumSrc, int lumFilterSize,
+ const int16_t *chrFilter, const int16_t **chrUSrc,
+ const int16_t **chrVSrc,
+ int chrFilterSize, const int16_t **alpSrc,
+ uint8_t *dest, uint8_t *uDest, uint8_t *vDest,
- uint8_t *aDest, int dstW, int chrDstW)
++ uint8_t *aDest, int dstW, int chrDstW,
++ const uint8_t *lumDither, const uint8_t *chrDither)
{
//FIXME Optimize (just quickly written not optimized..)
int i;
while (p--) {
if (dst[p]) {
+ int i;
+ for(i=0; i<8; i++) c->dither16[i] = i<2 ? lumDither[i] : chrDither[i];
__asm__ volatile(
- YSCALEYUV2YV121_ACCURATE
+ "mov %2, %%"REG_a" \n\t"
- "pcmpeqw %%mm7, %%mm7 \n\t"
- "psrlw $15, %%mm7 \n\t"
- "psllw $6, %%mm7 \n\t"
++ "movq 0(%3), %%mm6 \n\t"
++ "movq 8(%3), %%mm7 \n\t"
+ ".p2align 4 \n\t" /* FIXME Unroll? */
+ "1: \n\t"
+ "movq (%0, %%"REG_a", 2), %%mm0 \n\t"
+ "movq 8(%0, %%"REG_a", 2), %%mm1 \n\t"
- "paddsw %%mm7, %%mm0 \n\t"
++ "paddsw %%mm6, %%mm0 \n\t"
+ "paddsw %%mm7, %%mm1 \n\t"
+ "psraw $7, %%mm0 \n\t"
+ "psraw $7, %%mm1 \n\t"
+ "packuswb %%mm1, %%mm0 \n\t"
+ MOVNTQ(%%mm0, (%1, %%REGa))
+ "add $8, %%"REG_a" \n\t"
+ "jnc 1b \n\t"
:: "r" (src[p]), "r" (dst[p] + counter[p]),
- "g" (-counter[p])
+ "g" (-counter[p]), "r"(c->dither16)
: "%"REG_a
);
}