summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure2
-rw-r--r--libavcodec/4xm.c42
-rw-r--r--libavcodec/Makefile24
-rw-r--r--libavcodec/bytestream.h44
-rw-r--r--libavcodec/mpegvideo_enc.c3
-rw-r--r--libavcodec/raw.c6
-rw-r--r--libavcodec/utils.c6
-rw-r--r--libavcodec/vc1dec.c3
-rw-r--r--libavcodec/vp3.c151
-rw-r--r--libavformat/mpegts.c5
-rw-r--r--libavformat/nut.c6
-rw-r--r--libavformat/oma.h7
-rw-r--r--tests/ref/lavfi/pixdesc12
-rw-r--r--tests/ref/lavfi/pixfmts_copy12
-rw-r--r--tests/ref/lavfi/pixfmts_null12
-rw-r--r--tests/ref/lavfi/pixfmts_scale12
-rw-r--r--tests/ref/lavfi/pixfmts_vflip12
17 files changed, 208 insertions, 151 deletions
diff --git a/configure b/configure
index 5b8bc3f825..50d811dd41 100755
--- a/configure
+++ b/configure
@@ -1423,6 +1423,8 @@ mp3adufloat_decoder_select="mpegaudiodsp"
mp3float_decoder_select="mpegaudiodsp"
mp3on4_decoder_select="mpegaudiodsp"
mp3on4float_decoder_select="mpegaudiodsp"
+mpc7_decoder_select="mpegaudiodsp"
+mpc8_decoder_select="mpegaudiodsp"
mpeg_vdpau_decoder_select="vdpau mpegvideo_decoder"
mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h"
mpeg_xvmc_decoder_select="mpegvideo_decoder"
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 43f6a21ea8..370fe6df47 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -132,10 +132,8 @@ typedef struct FourXContext{
AVFrame current_picture, last_picture;
GetBitContext pre_gb; ///< ac/dc prefix
GetBitContext gb;
- const uint8_t *bytestream;
- const uint8_t *bytestream_end;
- const uint16_t *wordstream;
- const uint16_t *wordstream_end;
+ GetByteContext g;
+ GetByteContext g2;
int mv[256];
VLC pre_vlc;
int last_dc;
@@ -330,11 +328,11 @@ static void decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src, int lo
assert(code>=0 && code<=6);
if(code == 0){
- if (f->bytestream_end - f->bytestream < 1){
+ if (f->g.buffer_end - f->g.buffer < 1){
av_log(f->avctx, AV_LOG_ERROR, "bytestream overread\n");
return;
}
- src += f->mv[ *f->bytestream++ ];
+ src += f->mv[ *f->g.buffer++ ];
if(start > src || src > end){
av_log(f->avctx, AV_LOG_ERROR, "mv out of pic\n");
return;
@@ -351,37 +349,37 @@ static void decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src, int lo
}else if(code == 3 && f->version<2){
mcdc(dst, src, log2w, h, stride, 1, 0);
}else if(code == 4){
- if (f->bytestream_end - f->bytestream < 1){
+ if (f->g.buffer_end - f->g.buffer < 1){
av_log(f->avctx, AV_LOG_ERROR, "bytestream overread\n");
return;
}
- src += f->mv[ *f->bytestream++ ];
+ src += f->mv[ *f->g.buffer++ ];
if(start > src || src > end){
av_log(f->avctx, AV_LOG_ERROR, "mv out of pic\n");
return;
}
- if (f->wordstream_end - f->wordstream < 1){
+ if (f->g2.buffer_end - f->g2.buffer < 1){
av_log(f->avctx, AV_LOG_ERROR, "wordstream overread\n");
return;
}
- mcdc(dst, src, log2w, h, stride, 1, av_le2ne16(*f->wordstream++));
+ mcdc(dst, src, log2w, h, stride, 1, bytestream2_get_le16(&f->g2));
}else if(code == 5){
- if (f->wordstream_end - f->wordstream < 1){
+ if (f->g2.buffer_end - f->g2.buffer < 1){
av_log(f->avctx, AV_LOG_ERROR, "wordstream overread\n");
return;
}
- mcdc(dst, src, log2w, h, stride, 0, av_le2ne16(*f->wordstream++));
+ mcdc(dst, src, log2w, h, stride, 0, bytestream2_get_le16(&f->g2));
}else if(code == 6){
- if (f->wordstream_end - f->wordstream < 2){
+ if (f->g2.buffer_end - f->g2.buffer < 2){
av_log(f->avctx, AV_LOG_ERROR, "wordstream overread\n");
return;
}
if(log2w){
- dst[0] = av_le2ne16(*f->wordstream++);
- dst[1] = av_le2ne16(*f->wordstream++);
+ dst[0] = bytestream2_get_le16(&f->g2);
+ dst[1] = bytestream2_get_le16(&f->g2);
}else{
- dst[0 ] = av_le2ne16(*f->wordstream++);
- dst[stride] = av_le2ne16(*f->wordstream++);
+ dst[0 ] = bytestream2_get_le16(&f->g2);
+ dst[stride] = bytestream2_get_le16(&f->g2);
}
}
}
@@ -393,7 +391,7 @@ static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length){
uint16_t *src= (uint16_t*)f->last_picture.data[0];
uint16_t *dst= (uint16_t*)f->current_picture.data[0];
const int stride= f->current_picture.linesize[0]>>1;
- unsigned int bitstream_size, bytestream_size, wordstream_size, extra;
+ unsigned int bitstream_size, bytestream_size, wordstream_size, extra, bytestream_offset, wordstream_offset;
if(f->version>1){
extra=20;
@@ -425,10 +423,10 @@ static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length){
memset((uint8_t*)f->bitstream_buffer + bitstream_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
init_get_bits(&f->gb, f->bitstream_buffer, 8*bitstream_size);
- f->wordstream= (const uint16_t*)(buf + extra + bitstream_size);
- f->wordstream_end= f->wordstream + wordstream_size/2;
- f->bytestream= buf + extra + bitstream_size + wordstream_size;
- f->bytestream_end = f->bytestream + bytestream_size;
+ wordstream_offset = extra + bitstream_size;
+ bytestream_offset = extra + bitstream_size + wordstream_size;
+ bytestream2_init(&f->g2, buf + wordstream_offset, length - wordstream_offset);
+ bytestream2_init(&f->g, buf + bytestream_offset, length - bytestream_offset);
init_mv(f);
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 9289494e05..61ebe6a6ea 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -525,14 +525,14 @@ OBJS-$(CONFIG_PCM_ZORK_DECODER) += pcm.o
OBJS-$(CONFIG_ADPCM_4XM_DECODER) += adpcm.o adpcm_data.o
OBJS-$(CONFIG_ADPCM_ADX_DECODER) += adxdec.o adx.o
-OBJS-$(CONFIG_ADPCM_ADX_ENCODER) += adxenc.o
+OBJS-$(CONFIG_ADPCM_ADX_ENCODER) += adxenc.o adx.o
OBJS-$(CONFIG_ADPCM_CT_DECODER) += adpcm.o adpcm_data.o
-OBJS-$(CONFIG_ADPCM_EA_DECODER) += adpcm.o
-OBJS-$(CONFIG_ADPCM_EA_MAXIS_XA_DECODER) += adpcm.o
-OBJS-$(CONFIG_ADPCM_EA_R1_DECODER) += adpcm.o
-OBJS-$(CONFIG_ADPCM_EA_R2_DECODER) += adpcm.o
-OBJS-$(CONFIG_ADPCM_EA_R3_DECODER) += adpcm.o
-OBJS-$(CONFIG_ADPCM_EA_XAS_DECODER) += adpcm.o
+OBJS-$(CONFIG_ADPCM_EA_DECODER) += adpcm.o adpcm_data.o
+OBJS-$(CONFIG_ADPCM_EA_MAXIS_XA_DECODER) += adpcm.o adpcm_data.o
+OBJS-$(CONFIG_ADPCM_EA_R1_DECODER) += adpcm.o adpcm_data.o
+OBJS-$(CONFIG_ADPCM_EA_R2_DECODER) += adpcm.o adpcm_data.o
+OBJS-$(CONFIG_ADPCM_EA_R3_DECODER) += adpcm.o adpcm_data.o
+OBJS-$(CONFIG_ADPCM_EA_XAS_DECODER) += adpcm.o adpcm_data.o
OBJS-$(CONFIG_ADPCM_G722_DECODER) += g722.o g722dec.o
OBJS-$(CONFIG_ADPCM_G722_ENCODER) += g722.o g722enc.o
OBJS-$(CONFIG_ADPCM_G726_DECODER) += g726.o
@@ -551,13 +551,13 @@ OBJS-$(CONFIG_ADPCM_IMA_WAV_ENCODER) += adpcmenc.o adpcm_data.o
OBJS-$(CONFIG_ADPCM_IMA_WS_DECODER) += adpcm.o adpcm_data.o
OBJS-$(CONFIG_ADPCM_MS_DECODER) += adpcm.o adpcm_data.o
OBJS-$(CONFIG_ADPCM_MS_ENCODER) += adpcmenc.o adpcm_data.o
-OBJS-$(CONFIG_ADPCM_SBPRO_2_DECODER) += adpcm.o
-OBJS-$(CONFIG_ADPCM_SBPRO_3_DECODER) += adpcm.o
-OBJS-$(CONFIG_ADPCM_SBPRO_4_DECODER) += adpcm.o
+OBJS-$(CONFIG_ADPCM_SBPRO_2_DECODER) += adpcm.o adpcm_data.o
+OBJS-$(CONFIG_ADPCM_SBPRO_3_DECODER) += adpcm.o adpcm_data.o
+OBJS-$(CONFIG_ADPCM_SBPRO_4_DECODER) += adpcm.o adpcm_data.o
OBJS-$(CONFIG_ADPCM_SWF_DECODER) += adpcm.o adpcm_data.o
OBJS-$(CONFIG_ADPCM_SWF_ENCODER) += adpcmenc.o adpcm_data.o
-OBJS-$(CONFIG_ADPCM_THP_DECODER) += adpcm.o
-OBJS-$(CONFIG_ADPCM_XA_DECODER) += adpcm.o
+OBJS-$(CONFIG_ADPCM_THP_DECODER) += adpcm.o adpcm_data.o
+OBJS-$(CONFIG_ADPCM_XA_DECODER) += adpcm.o adpcm_data.o
OBJS-$(CONFIG_ADPCM_YAMAHA_DECODER) += adpcm.o adpcm_data.o
OBJS-$(CONFIG_ADPCM_YAMAHA_ENCODER) += adpcmenc.o adpcm_data.o
diff --git a/libavcodec/bytestream.h b/libavcodec/bytestream.h
index b56f6ce743..7ca36f8ad3 100644
--- a/libavcodec/bytestream.h
+++ b/libavcodec/bytestream.h
@@ -26,6 +26,10 @@
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
+typedef struct {
+ const uint8_t *buffer, *buffer_end;
+} GetByteContext;
+
#define DEF_T(type, name, bytes, read, write) \
static av_always_inline type bytestream_get_ ## name(const uint8_t **b){\
(*b) += bytes;\
@@ -34,6 +38,18 @@ static av_always_inline type bytestream_get_ ## name(const uint8_t **b){\
static av_always_inline void bytestream_put_ ##name(uint8_t **b, const type value){\
write(*b, value);\
(*b) += bytes;\
+}\
+static av_always_inline type bytestream2_get_ ## name(GetByteContext *g)\
+{\
+ if (g->buffer_end - g->buffer < bytes)\
+ return 0;\
+ return bytestream_get_ ## name(&g->buffer);\
+}\
+static av_always_inline type bytestream2_peek_ ## name(GetByteContext *g)\
+{\
+ if (g->buffer_end - g->buffer < bytes)\
+ return 0;\
+ return read(g->buffer);\
}
#define DEF(name, bytes, read, write) \
@@ -55,6 +71,34 @@ DEF (byte, 1, AV_RB8 , AV_WB8 )
#undef DEF64
#undef DEF_T
+static av_always_inline void bytestream2_init(GetByteContext *g,
+ const uint8_t *buf, int buf_size)
+{
+ g->buffer = buf;
+ g->buffer_end = buf + buf_size;
+}
+
+static av_always_inline unsigned int bytestream2_get_bytes_left(GetByteContext *g)
+{
+ return g->buffer_end - g->buffer;
+}
+
+static av_always_inline void bytestream2_skip(GetByteContext *g,
+ unsigned int size)
+{
+ g->buffer += FFMIN(g->buffer_end - g->buffer, size);
+}
+
+static av_always_inline unsigned int bytestream2_get_buffer(GetByteContext *g,
+ uint8_t *dst,
+ unsigned int size)
+{
+ int size2 = FFMIN(g->buffer_end - g->buffer, size);
+ memcpy(dst, g->buffer, size2);
+ g->buffer += size2;
+ return size2;
+}
+
static av_always_inline unsigned int bytestream_get_buffer(const uint8_t **b, uint8_t *dst, unsigned int size)
{
memcpy(dst, *b, size);
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 83c4932d5b..690df08708 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1213,10 +1213,11 @@ no_output_pic:
if (s->reordered_input_picture[0]->f.type == FF_BUFFER_TYPE_SHARED || s->avctx->rc_buffer_size) {
// input is a shared pix, so we can't modifiy it -> alloc a new one & ensure that the shared one is reuseable
+ Picture *pic;
int i= ff_find_unused_picture(s, 0);
if (i < 0)
return i;
- Picture *pic= &s->picture[i];
+ pic = &s->picture[i];
pic->f.reference = s->reordered_input_picture[0]->f.reference;
if(ff_alloc_picture(s, pic, 0) < 0){
diff --git a/libavcodec/raw.c b/libavcodec/raw.c
index a26dea8146..42469fdf65 100644
--- a/libavcodec/raw.c
+++ b/libavcodec/raw.c
@@ -108,6 +108,12 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = {
{ PIX_FMT_BGR48BE, MKTAG( 48, 'B', 'G', 'R') },
{ PIX_FMT_GRAY16LE, MKTAG('Y', '1', 0 , 16 ) },
{ PIX_FMT_GRAY16BE, MKTAG(16 , 0 , '1', 'Y') },
+ { PIX_FMT_YUV420P10LE, MKTAG('Y', '3', 11 , 10 ) },
+ { PIX_FMT_YUV420P10BE, MKTAG(10 , 11 , '3', 'Y') },
+ { PIX_FMT_YUV422P10LE, MKTAG('Y', '3', 10 , 10 ) },
+ { PIX_FMT_YUV422P10BE, MKTAG(10 , 10 , '3', 'Y') },
+ { PIX_FMT_YUV444P10LE, MKTAG('Y', '3', 0 , 10 ) },
+ { PIX_FMT_YUV444P10BE, MKTAG(10 , 0 , '3', 'Y') },
{ PIX_FMT_YUV420P16LE, MKTAG('Y', '3', 11 , 16 ) },
{ PIX_FMT_YUV420P16BE, MKTAG(16 , 11 , '3', 'Y') },
{ PIX_FMT_YUV422P16LE, MKTAG('Y', '3', 10 , 16 ) },
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index af872a70e7..7bf729dac7 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -167,10 +167,8 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
case PIX_FMT_GBRP9BE:
case PIX_FMT_GBRP10LE:
case PIX_FMT_GBRP10BE:
- w_align= 16; //FIXME check for non mpeg style codecs and use less alignment
- h_align= 16;
- if(s->codec_id == CODEC_ID_MPEG2VIDEO || s->codec_id == CODEC_ID_MJPEG || s->codec_id == CODEC_ID_AMV || s->codec_id == CODEC_ID_THP || s->codec_id == CODEC_ID_H264 || s->codec_id == CODEC_ID_PRORES)
- h_align= 32; // interlaced is rounded up to 2 MBs
+ w_align = 16; //FIXME assume 16 pixel per macroblock
+ h_align = 16 * 2; // interlaced needs 2 macroblocks height
break;
case PIX_FMT_YUV411P:
case PIX_FMT_UYYVYY411:
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 96f6d655cb..e4ecf14b5b 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5426,13 +5426,12 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
AVFrame *pict = data;
uint8_t *buf2 = NULL;
const uint8_t *buf_start = buf;
- uint8_t *tmp;
int mb_height, n_slices1=-1;
struct {
uint8_t *buf;
GetBitContext gb;
int mby_start;
- } *slices = NULL;
+ } *slices = NULL, *tmp;
if(s->flags & CODEC_FLAG_LOW_DELAY)
s->low_delay = 1;
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index a6a3109dba..9e59dd8127 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -45,9 +45,6 @@
#define FRAGMENT_PIXELS 8
-static av_cold int vp3_decode_end(AVCodecContext *avctx);
-static void vp3_decode_flush(AVCodecContext *avctx);
-
//FIXME split things out into their own arrays
typedef struct Vp3Fragment {
int16_t dc;
@@ -256,6 +253,63 @@ typedef struct Vp3DecodeContext {
* VP3 specific functions
************************************************************************/
+static void vp3_decode_flush(AVCodecContext *avctx)
+{
+ Vp3DecodeContext *s = avctx->priv_data;
+
+ if (s->golden_frame.data[0]) {
+ if (s->golden_frame.data[0] == s->last_frame.data[0])
+ memset(&s->last_frame, 0, sizeof(AVFrame));
+ if (s->current_frame.data[0] == s->golden_frame.data[0])
+ memset(&s->current_frame, 0, sizeof(AVFrame));
+ ff_thread_release_buffer(avctx, &s->golden_frame);
+ }
+ if (s->last_frame.data[0]) {
+ if (s->current_frame.data[0] == s->last_frame.data[0])
+ memset(&s->current_frame, 0, sizeof(AVFrame));
+ ff_thread_release_buffer(avctx, &s->last_frame);
+ }
+ if (s->current_frame.data[0])
+ ff_thread_release_buffer(avctx, &s->current_frame);
+}
+
+static av_cold int vp3_decode_end(AVCodecContext *avctx)
+{
+ Vp3DecodeContext *s = avctx->priv_data;
+ int i;
+
+ av_free(s->superblock_coding);
+ av_free(s->all_fragments);
+ av_free(s->coded_fragment_list[0]);
+ av_free(s->dct_tokens_base);
+ av_free(s->superblock_fragments);
+ av_free(s->macroblock_coding);
+ av_free(s->motion_val[0]);
+ av_free(s->motion_val[1]);
+ av_free(s->edge_emu_buffer);
+
+ if (avctx->internal->is_copy)
+ return 0;
+
+ for (i = 0; i < 16; i++) {
+ free_vlc(&s->dc_vlc[i]);
+ free_vlc(&s->ac_vlc_1[i]);
+ free_vlc(&s->ac_vlc_2[i]);
+ free_vlc(&s->ac_vlc_3[i]);
+ free_vlc(&s->ac_vlc_4[i]);
+ }
+
+ free_vlc(&s->superblock_run_length_vlc);
+ free_vlc(&s->fragment_run_length_vlc);
+ free_vlc(&s->mode_code_vlc);
+ free_vlc(&s->motion_vector_vlc);
+
+ /* release all frames */
+ vp3_decode_flush(avctx);
+
+ return 0;
+}
+
/*
* This function sets up all of the various blocks mappings:
* superblocks <-> fragments, macroblocks <-> fragments,
@@ -2002,43 +2056,6 @@ error:
static void vp3_decode_flush(AVCodecContext *avctx);
-static av_cold int vp3_decode_end(AVCodecContext *avctx)
-{
- Vp3DecodeContext *s = avctx->priv_data;
- int i;
-
- av_free(s->superblock_coding);
- av_free(s->all_fragments);
- av_free(s->coded_fragment_list[0]);
- av_free(s->dct_tokens_base);
- av_free(s->superblock_fragments);
- av_free(s->macroblock_coding);
- av_free(s->motion_val[0]);
- av_free(s->motion_val[1]);
- av_free(s->edge_emu_buffer);
-
- if (avctx->internal->is_copy)
- return 0;
-
- for (i = 0; i < 16; i++) {
- free_vlc(&s->dc_vlc[i]);
- free_vlc(&s->ac_vlc_1[i]);
- free_vlc(&s->ac_vlc_2[i]);
- free_vlc(&s->ac_vlc_3[i]);
- free_vlc(&s->ac_vlc_4[i]);
- }
-
- free_vlc(&s->superblock_run_length_vlc);
- free_vlc(&s->fragment_run_length_vlc);
- free_vlc(&s->mode_code_vlc);
- free_vlc(&s->motion_vector_vlc);
-
- /* release all frames */
- vp3_decode_flush(avctx);
-
- return 0;
-}
-
static int read_huffman_tree(AVCodecContext *avctx, GetBitContext *gb)
{
Vp3DecodeContext *s = avctx->priv_data;
@@ -2073,6 +2090,23 @@ static int read_huffman_tree(AVCodecContext *avctx, GetBitContext *gb)
return 0;
}
+static int vp3_init_thread_copy(AVCodecContext *avctx)
+{
+ Vp3DecodeContext *s = avctx->priv_data;
+
+ s->superblock_coding = NULL;
+ s->all_fragments = NULL;
+ s->coded_fragment_list[0] = NULL;
+ s->dct_tokens_base = NULL;
+ s->superblock_fragments = NULL;
+ s->macroblock_coding = NULL;
+ s->motion_val[0] = NULL;
+ s->motion_val[1] = NULL;
+ s->edge_emu_buffer = NULL;
+
+ return 0;
+}
+
#if CONFIG_THEORA_DECODER
static const enum PixelFormat theora_pix_fmts[4] = {
PIX_FMT_YUV420P, PIX_FMT_NONE, PIX_FMT_YUV422P, PIX_FMT_YUV444P
@@ -2334,43 +2368,6 @@ static av_cold int theora_decode_init(AVCodecContext *avctx)
return vp3_decode_init(avctx);
}
-static void vp3_decode_flush(AVCodecContext *avctx)
-{
- Vp3DecodeContext *s = avctx->priv_data;
-
- if (s->golden_frame.data[0]) {
- if (s->golden_frame.data[0] == s->last_frame.data[0])
- memset(&s->last_frame, 0, sizeof(AVFrame));
- if (s->current_frame.data[0] == s->golden_frame.data[0])
- memset(&s->current_frame, 0, sizeof(AVFrame));
- ff_thread_release_buffer(avctx, &s->golden_frame);
- }
- if (s->last_frame.data[0]) {
- if (s->current_frame.data[0] == s->last_frame.data[0])
- memset(&s->current_frame, 0, sizeof(AVFrame));
- ff_thread_release_buffer(avctx, &s->last_frame);
- }
- if (s->current_frame.data[0])
- ff_thread_release_buffer(avctx, &s->current_frame);
-}
-
-static int vp3_init_thread_copy(AVCodecContext *avctx)
-{
- Vp3DecodeContext *s = avctx->priv_data;
-
- s->superblock_coding = NULL;
- s->all_fragments = NULL;
- s->coded_fragment_list[0] = NULL;
- s->dct_tokens_base = NULL;
- s->superblock_fragments = NULL;
- s->macroblock_coding = NULL;
- s->motion_val[0] = NULL;
- s->motion_val[1] = NULL;
- s->edge_emu_buffer = NULL;
-
- return 0;
-}
-
AVCodec ff_theora_decoder = {
.name = "theora",
.type = AVMEDIA_TYPE_VIDEO,
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 0fa472d0a2..3f154796fa 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -762,7 +762,8 @@ static int read_sl_header(PESContext *pes, SLConfigDescr *sl, const uint8_t *buf
if (cts != AV_NOPTS_VALUE)
pes->pts = cts;
- avpriv_set_pts_info(pes->st, sl->timestamp_len, 1, sl->timestamp_res);
+ if (sl->timestamp_len && sl->timestamp_res)
+ avpriv_set_pts_info(pes->st, sl->timestamp_len, 1, sl->timestamp_res);
return (get_bits_count(&gb) + 7) >> 3;
}
@@ -1496,7 +1497,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if (idx >= 0) {
st = ts->stream->streams[idx];
} else {
- st = avformat_new_stream(pes->stream, NULL);
+ st = avformat_new_stream(ts->stream, NULL);
st->id = pid;
st->codec->codec_type = AVMEDIA_TYPE_DATA;
}
diff --git a/libavformat/nut.c b/libavformat/nut.c
index 2a5e6fe567..0a44811c57 100644
--- a/libavformat/nut.c
+++ b/libavformat/nut.c
@@ -70,6 +70,12 @@ const AVCodecTag ff_nut_video_tags[] = {
{ CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 48 ) },
{ CODEC_ID_RAWVIDEO, MKTAG(48 , 'B', 'G', 'R') },
{ CODEC_ID_RAWVIDEO, MKTAG(48 , 'R', 'G', 'B') },
+ { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 11 , 10 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG(10 , 11 , '3', 'Y') },
+ { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 10 , 10 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG(10 , 10 , '3', 'Y') },
+ { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 0 , 10 ) },
+ { CODEC_ID_RAWVIDEO, MKTAG(10 , 0 , '3', 'Y') },
{ CODEC_ID_RAWVIDEO, MKTAG('Y', '1', 0 , 16 ) },
{ CODEC_ID_RAWVIDEO, MKTAG(16 , 0 , '1', 'Y') },
{ CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 11 , 16 ) },
diff --git a/libavformat/oma.h b/libavformat/oma.h
index 2830b34673..bac8bcb736 100644
--- a/libavformat/oma.h
+++ b/libavformat/oma.h
@@ -21,6 +21,10 @@
#ifndef AVFORMAT_OMA_H
#define AVFORMAT_OMA_H
+#include <stdint.h>
+
+#include "internal.h"
+
#define EA3_HEADER_SIZE 96
#define ID3v2_EA3_MAGIC "ea3"
#define OMA_ENC_HEADER_SIZE 16
@@ -36,4 +40,5 @@ enum {
extern const uint16_t ff_oma_srate_tab[6];
extern const AVCodecTag ff_oma_codec_tags[];
-#endif
+
+#endif /* AVFORMAT_OMA_H */
diff --git a/tests/ref/lavfi/pixdesc b/tests/ref/lavfi/pixdesc
index 63e2980dcc..07d1d36417 100644
--- a/tests/ref/lavfi/pixdesc
+++ b/tests/ref/lavfi/pixdesc
@@ -35,23 +35,23 @@ uyvy422 adcf64516a19fce44df77082bdb16291
yuv410p 2d9225153c83ee1132397d619d94d1b3
yuv411p 8b298af3e43348ca1b11eb8a3252ac6c
yuv420p eba2f135a08829387e2f698ff72a2939
-yuv420p10be ea2aee509286fa3d07a6c68fec9967a5
-yuv420p10le 645ef73e06de41c83a7bc724179d2ce3
+yuv420p10be 2f88c301feeaccd2a5fb55f54fc30be9
+yuv420p10le 93f175084af4e78f97c7710e505f3057
yuv420p16be ba858ff4246368c28f03152487f57ef3
yuv420p16le de239729a4fe1d4cfa3743e006654e78
yuv420p9be 64e36fd90573f67ac2006d103972a79b
yuv420p9le 9ed4b1dfabc53fd9e586ff6c4c43af80
yuv422p c9bba4529821d796a6ab09f6a5fd355a
-yuv422p10be bdc13b630fd668b34c6fe1aae28dfc71
-yuv422p10le d0607c260a45c973e6639f4e449730ad
+yuv422p10be 11af7dfafe8bc025c7e3bd82b830fe8a
+yuv422p10le ec04efb76efa79bf0d02b21572371a56
yuv422p16be 5499502e1c29534a158a1fe60e889f60
yuv422p16le e3d61fde6978591596bc36b914386623
yuv422p9be 29b71579946940a8c00fa844c9dff507
yuv422p9le 062b7f9cbb972bf36b5bdb1a7623701a
yuv440p 5a064afe2b453bb52cdb3f176b1aa1cf
yuv444p 0a98447b78fd476aa39686da6a74fa2e
-yuv444p10be e65cbae7e4f1892c23defbc8e8052cf6
-yuv444p10le 767179dd82846cf00ee4c340c9c1ab74
+yuv444p10be 71be185a2fb7a353eb024df9bc63212d
+yuv444p10le c1c6b30a12065c7901c0a267e4861a0f
yuv444p16be 1c6ea2c2f5e539006112ceec3d4e7d90
yuv444p16le 20f86bc2f68d2b3f1f2b48b97b2189f4
yuv444p9be 6ab31f4c12b533ce318ecdff83cdd054
diff --git a/tests/ref/lavfi/pixfmts_copy b/tests/ref/lavfi/pixfmts_copy
index 3a638c33c2..5ced4785c8 100644
--- a/tests/ref/lavfi/pixfmts_copy
+++ b/tests/ref/lavfi/pixfmts_copy
@@ -36,23 +36,23 @@ uyvy422 adcf64516a19fce44df77082bdb16291
yuv410p 2d9225153c83ee1132397d619d94d1b3
yuv411p 8b298af3e43348ca1b11eb8a3252ac6c
yuv420p eba2f135a08829387e2f698ff72a2939
-yuv420p10be ea2aee509286fa3d07a6c68fec9967a5
-yuv420p10le 645ef73e06de41c83a7bc724179d2ce3
+yuv420p10be 2f88c301feeaccd2a5fb55f54fc30be9
+yuv420p10le 93f175084af4e78f97c7710e505f3057
yuv420p16be ba858ff4246368c28f03152487f57ef3
yuv420p16le de239729a4fe1d4cfa3743e006654e78
yuv420p9be 64e36fd90573f67ac2006d103972a79b
yuv420p9le 9ed4b1dfabc53fd9e586ff6c4c43af80
yuv422p c9bba4529821d796a6ab09f6a5fd355a
-yuv422p10be bdc13b630fd668b34c6fe1aae28dfc71
-yuv422p10le d0607c260a45c973e6639f4e449730ad
+yuv422p10be 11af7dfafe8bc025c7e3bd82b830fe8a
+yuv422p10le ec04efb76efa79bf0d02b21572371a56
yuv422p16be 5499502e1c29534a158a1fe60e889f60
yuv422p16le e3d61fde6978591596bc36b914386623
yuv422p9be 29b71579946940a8c00fa844c9dff507
yuv422p9le 062b7f9cbb972bf36b5bdb1a7623701a
yuv440p 5a064afe2b453bb52cdb3f176b1aa1cf
yuv444p 0a98447b78fd476aa39686da6a74fa2e
-yuv444p10be e65cbae7e4f1892c23defbc8e8052cf6
-yuv444p10le 767179dd82846cf00ee4c340c9c1ab74
+yuv444p10be 71be185a2fb7a353eb024df9bc63212d
+yuv444p10le c1c6b30a12065c7901c0a267e4861a0f
yuv444p16be 1c6ea2c2f5e539006112ceec3d4e7d90
yuv444p16le 20f86bc2f68d2b3f1f2b48b97b2189f4
yuv444p9be 6ab31f4c12b533ce318ecdff83cdd054
diff --git a/tests/ref/lavfi/pixfmts_null b/tests/ref/lavfi/pixfmts_null
index 3a638c33c2..5ced4785c8 100644
--- a/tests/ref/lavfi/pixfmts_null
+++ b/tests/ref/lavfi/pixfmts_null
@@ -36,23 +36,23 @@ uyvy422 adcf64516a19fce44df77082bdb16291
yuv410p 2d9225153c83ee1132397d619d94d1b3
yuv411p 8b298af3e43348ca1b11eb8a3252ac6c
yuv420p eba2f135a08829387e2f698ff72a2939
-yuv420p10be ea2aee509286fa3d07a6c68fec9967a5
-yuv420p10le 645ef73e06de41c83a7bc724179d2ce3
+yuv420p10be 2f88c301feeaccd2a5fb55f54fc30be9
+yuv420p10le 93f175084af4e78f97c7710e505f3057
yuv420p16be ba858ff4246368c28f03152487f57ef3
yuv420p16le de239729a4fe1d4cfa3743e006654e78
yuv420p9be 64e36fd90573f67ac2006d103972a79b
yuv420p9le 9ed4b1dfabc53fd9e586ff6c4c43af80
yuv422p c9bba4529821d796a6ab09f6a5fd355a
-yuv422p10be bdc13b630fd668b34c6fe1aae28dfc71
-yuv422p10le d0607c260a45c973e6639f4e449730ad
+yuv422p10be 11af7dfafe8bc025c7e3bd82b830fe8a
+yuv422p10le ec04efb76efa79bf0d02b21572371a56
yuv422p16be 5499502e1c29534a158a1fe60e889f60
yuv422p16le e3d61fde6978591596bc36b914386623
yuv422p9be 29b71579946940a8c00fa844c9dff507
yuv422p9le 062b7f9cbb972bf36b5bdb1a7623701a
yuv440p 5a064afe2b453bb52cdb3f176b1aa1cf
yuv444p 0a98447b78fd476aa39686da6a74fa2e
-yuv444p10be e65cbae7e4f1892c23defbc8e8052cf6
-yuv444p10le 767179dd82846cf00ee4c340c9c1ab74
+yuv444p10be 71be185a2fb7a353eb024df9bc63212d
+yuv444p10le c1c6b30a12065c7901c0a267e4861a0f
yuv444p16be 1c6ea2c2f5e539006112ceec3d4e7d90
yuv444p16le 20f86bc2f68d2b3f1f2b48b97b2189f4
yuv444p9be 6ab31f4c12b533ce318ecdff83cdd054
diff --git a/tests/ref/lavfi/pixfmts_scale b/tests/ref/lavfi/pixfmts_scale
index 53ea7db703..597904d02c 100644
--- a/tests/ref/lavfi/pixfmts_scale
+++ b/tests/ref/lavfi/pixfmts_scale
@@ -36,23 +36,23 @@ uyvy422 314bd486277111a95d9369b944fa0400
yuv410p 7df8f6d69b56a8dcb6c7ee908e5018b5
yuv411p 1143e7c5cc28fe0922b051b17733bc4c
yuv420p fdad2d8df8985e3d17e73c71f713cb14
-yuv420p10be 6d335e75b553da590135cf8bb999610c
-yuv420p10le d510ddbabefd03ef39ec943fcb51b709
+yuv420p10be 418039dbd82cf612db88417276aa0d1a
+yuv420p10le ff7e5321208ab995b4f95634ebdf192b
yuv420p16be 31988e9a5d6acacaa710f67bc1172f3a
yuv420p16le f5390ce399f88e0e4e2621ed7833b250
yuv420p9be ec4983b7a949c0472110a7a2c58e278a
yuv420p9le c136dce5913a722eee44ab72cff664b2
yuv422p 918e37701ee7377d16a8a6c119c56a40
-yuv422p10be cea7ca6b0e66d6f29539885896c88603
-yuv422p10le a10c4a5837547716f13cd61918b145f9
+yuv422p10be 315654908d50718e175aae018c484732
+yuv422p10le 91bbc78a9a56f659b55abc17722dcc09
yuv422p16be e7e34fe9264784763ab6cb406524c0f3
yuv422p16le c435b76b08204dda6908640fb5fd4621
yuv422p9be 82494823944912f73cebc58ad2979bbd
yuv422p9le fc69c8a21f473916a4b4225636b97e06
yuv440p 461503fdb9b90451020aa3b25ddf041c
yuv444p 81b2eba962d12e8d64f003ac56f6faf2
-yuv444p10be e9d3c8e744b8b0d8187ca092fa203fc9
-yuv444p10le 02f0a336e9da062a64df1ba487e102c5
+yuv444p10be fb304d77c6d2e18df5938662a22176f0
+yuv444p10le b17136913eb066dca6be6af645b9f7e8
yuv444p16be 0da9bed80f5542682ab286f3261cf24c
yuv444p16le a0c5d3c7bf3f181db503cf8e450d1335
yuv444p9be 9ac2643ce7f7e5c4e17c8c9fd8494d4a
diff --git a/tests/ref/lavfi/pixfmts_vflip b/tests/ref/lavfi/pixfmts_vflip
index ce613debe5..333bd46484 100644
--- a/tests/ref/lavfi/pixfmts_vflip
+++ b/tests/ref/lavfi/pixfmts_vflip
@@ -36,23 +36,23 @@ uyvy422 ffbd36720c77398d9a0d03ce2625928f
yuv410p 7bfb39d7afb49d6a6173e6b23ae321eb
yuv411p 4a90048cc3a65fac150e53289700efe1
yuv420p 2e6d6062e8cad37fb3ab2c433b55f382
-yuv420p10be fac8e0ae5a81861cddac97ddc4100b66
-yuv420p10le cb83ed3552113e0292e30adee774359c
+yuv420p10be 7ce787a888381dd46b0212c099ecaad9
+yuv420p10le bf22a1c543a7b3dbc556a0eb9592e179
yuv420p16be b6d25ba55bc1831d352f379311b42b6d
yuv420p16le 1d7ef427b6f79a02b93948738dab5442
yuv420p9be 9865bf5c4392b56b1c4eb4f5a3fd32f9
yuv420p9le 0f1e371a1374d3cba2205b70cc7cac90
yuv422p d7f5cb44d9b0210d66d6a8762640ab34
-yuv422p10be 588fe319b96513c32e21d3e32b45447f
-yuv422p10le 11b57f2bd9661024153f3973b9090cdb
+yuv422p10be 0be8378c3773e1c0b394315ef4994351
+yuv422p10le 6518094fe8de6bee95af21af1e5dc1e1
yuv422p16be 9bd8f8c961822b586fa4cf992be54acc
yuv422p16le 9c4a1239605c7952b736ac3130163f14
yuv422p9be 7c6f1e140b3999ee7d923854e507752a
yuv422p9le 51f10d79c07989060dd06e767e6d7d60
yuv440p 876385e96165acf51271b20e5d85a416
yuv444p 9c3c667d1613b72d15bc6d851c5eb8f7
-yuv444p10be 944a4997c4edb3a8dd0f0493cfd5a1fd
-yuv444p10le 2d0947ae89ecc6a501eee6832cb27e06
+yuv444p10be ee069cc6db48975eb029d72f889a7fe6
+yuv444p10le 645b3335248113cafe3c29edb1d7f3be
yuv444p16be de2dedfc6f12073ffead113f86e07ecf
yuv444p16le 8e83323cf102d6c823a03ae8a7b7e033
yuv444p9be 6ac92b7dc9ab2fc59bee99204886899a