summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure7
-rw-r--r--doc/filters.texi7
-rw-r--r--libavcodec/dsputil.c3
-rw-r--r--libavcodec/dsputil.h3
-rw-r--r--libavcodec/eaidct.c1
-rw-r--r--libavcodec/eaidct.h27
-rw-r--r--libavcodec/eamad.c114
-rw-r--r--libavcodec/eatgq.c26
-rw-r--r--libavcodec/eatqi.c28
-rw-r--r--libavcodec/h264_ps.c3
-rw-r--r--libavcodec/mpegvideo.c1
-rw-r--r--libavcodec/mpegvideo_common.h1
-rw-r--r--libavfilter/af_asyncts.c5
-rw-r--r--libavformat/4xm.c2
-rw-r--r--libavformat/amr.c4
-rw-r--r--libavformat/apc.c2
-rw-r--r--libavformat/assdec.c2
-rw-r--r--libavformat/assenc.c2
-rw-r--r--libavformat/avs.c2
-rw-r--r--libavformat/bethsoftvid.c2
-rw-r--r--libavformat/cdg.c2
-rw-r--r--libavformat/cdxl.c2
-rw-r--r--libavformat/crcenc.c2
-rw-r--r--libavformat/daud.c4
-rw-r--r--libavformat/dsicin.c2
-rw-r--r--libavformat/dv.c2
-rw-r--r--libavformat/dvenc.c2
-rw-r--r--libavformat/electronicarts.c2
-rw-r--r--libavformat/ffmdec.c2
-rw-r--r--libavformat/ffmenc.c2
-rw-r--r--libavformat/ffmetadec.c2
-rw-r--r--libavformat/ffmetaenc.c2
-rw-r--r--libavformat/flic.c2
-rw-r--r--libavformat/framecrcenc.c2
-rw-r--r--libavformat/g723_1.c2
-rw-r--r--libavformat/h264dec.c2
-rw-r--r--libavformat/hls.c2
-rw-r--r--libavformat/idcin.c2
-rw-r--r--libavformat/idroqdec.c2
-rw-r--r--libavformat/idroqenc.c2
-rw-r--r--libavformat/ilbc.c4
-rw-r--r--libavformat/ipmovie.c2
-rw-r--r--libavformat/iss.c2
-rw-r--r--libavformat/lmlm4.c2
-rw-r--r--libavformat/lxfdec.c2
-rw-r--r--libavformat/m4vdec.c2
-rw-r--r--libavformat/matroskadec.c2
-rw-r--r--libavformat/matroskaenc.c6
-rw-r--r--libavformat/md5enc.c4
-rw-r--r--libavformat/mm.c2
-rw-r--r--libavformat/movenc.c2
-rw-r--r--libavformat/mpegenc.c4
-rw-r--r--libavformat/mpjpeg.c2
-rw-r--r--libavformat/mtv.c2
-rw-r--r--libavformat/mvi.c2
-rw-r--r--libavformat/mxg.c2
-rw-r--r--libavformat/ncdec.c2
-rw-r--r--libavformat/nullenc.c2
-rw-r--r--libavformat/nutdec.c2
-rw-r--r--libavformat/nutenc.c2
-rw-r--r--libavformat/nuv.c2
-rw-r--r--libavformat/pcmdec.c40
-rw-r--r--libavformat/pcmenc.c40
-rw-r--r--libavformat/pmpdec.c2
-rw-r--r--libavformat/psxstr.c2
-rw-r--r--libavformat/pva.c2
-rw-r--r--libavformat/qcp.c2
-rw-r--r--libavformat/r3d.c2
-rw-r--r--libavformat/rawenc.c6
-rw-r--r--libavformat/rawvideodec.c2
-rw-r--r--libavformat/rl2.c2
-rw-r--r--libavformat/rmdec.c2
-rw-r--r--libavformat/rmenc.c2
-rw-r--r--libavformat/rpl.c2
-rw-r--r--libavformat/rsodec.c2
-rw-r--r--libavformat/rsoenc.c2
-rw-r--r--libavformat/rtpenc.c2
-rw-r--r--libavformat/rtsp.c2
-rw-r--r--libavformat/rtspdec.c2
-rw-r--r--libavformat/rtspenc.c2
-rw-r--r--libavformat/sapdec.c2
-rw-r--r--libavformat/sapenc.c2
-rw-r--r--libavformat/segafilm.c2
-rw-r--r--libavformat/sierravmd.c2
-rw-r--r--libavformat/sol.c2
-rw-r--r--libavformat/soxdec.c2
-rw-r--r--libavformat/soxenc.c2
-rw-r--r--libavformat/srtdec.c2
-rw-r--r--libavformat/srtenc.c2
-rw-r--r--libavformat/tiertexseq.c2
-rw-r--r--libavformat/vc1test.c2
-rw-r--r--libavformat/vocdec.c2
-rw-r--r--libavformat/vocenc.c2
-rw-r--r--libavformat/wav.c2
-rw-r--r--libavformat/wc3movie.c2
-rw-r--r--libavformat/westwood_aud.c2
-rw-r--r--libavformat/westwood_vqa.c2
-rw-r--r--libavformat/wv.c175
-rw-r--r--libavformat/xa.c2
-rw-r--r--libavformat/yop.c2
-rw-r--r--libavformat/yuv4mpeg.c4
-rw-r--r--libswscale/swscale.c2
-rw-r--r--tests/fate/filter.mak1
-rw-r--r--tests/tiny_psnr.c50
104 files changed, 400 insertions, 324 deletions
diff --git a/configure b/configure
index 54b2ce24bf..6203eca025 100755
--- a/configure
+++ b/configure
@@ -119,6 +119,8 @@ Component options:
--enable-x11grab enable X11 grabbing [no]
--disable-network disable network support [no]
--disable-dct disable DCT code
+ --disable-dwt disable DWT code
+ --disable-lsp disable LSP code
--disable-mdct disable MDCT code
--disable-rdft disable RDFT code
--disable-fft disable FFT code
@@ -229,17 +231,19 @@ Advanced options (experts only):
--yasmexe=EXE use yasm-compatible assembler EXE [$yasmexe_default]
--cc=CC use C compiler CC [$cc_default]
--cxx=CXX use C compiler CXX [$cxx_default]
+ --dep-cc=DEPCC use dependency generator DEPCC [$cc_default]
--ld=LD use linker LD [$ld_default]
--host-cc=HOSTCC use host C compiler HOSTCC
--host-cflags=HCFLAGS use HCFLAGS when compiling for host
--host-ldflags=HLDFLAGS use HLDFLAGS when linking for host
--host-libs=HLIBS use libs HLIBS when linking for host
+ --host-os=OS compiler host OS [$target_os]
--extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]
--extra-cxxflags=ECFLAGS add ECFLAGS to CXXFLAGS [$CXXFLAGS]
--extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]
--extra-libs=ELIBS add ELIBS [$ELIBS]
--extra-version=STRING version string suffix []
- --optflags override optimization-related compiler flags
+ --optflags=OPTFLAGS override optimization-related compiler flags
--build-suffix=SUFFIX library name suffix []
--malloc-prefix=PREFIX prefix malloc and related names with PREFIX
--progs-suffix=SUFFIX program name suffix []
@@ -248,6 +252,7 @@ Advanced options (experts only):
instruction selection, may crash on older CPUs)
--enable-pic build position-independent code
--enable-sram allow use of on-chip SRAM
+ --enable-thumb compile for Thumb instruction set
--disable-symver disable symbol versioning
--disable-fastdiv disable table-based division
--enable-hardcoded-tables use hardcoded tables instead of runtime generation
diff --git a/doc/filters.texi b/doc/filters.texi
index 73895ebc7f..cb325be90c 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -707,6 +707,13 @@ adding/dropping samples.
@item max_comp
Maximum compensation in samples per second.
+@item first_pts
+Assume the first pts should be this value.
+This allows for padding/trimming at the start of stream. By default, no
+assumption is made about the first frame's expected pts, so no padding or
+trimming is done. For example, this could be set to 0 to pad the beginning with
+silence if an audio stream starts after the video stream.
+
@end table
@section channelsplit
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index ef3143132e..3c9dd47c2f 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -2880,9 +2880,6 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx)
c->idct_add= ff_faanidct_add;
c->idct = ff_faanidct;
c->idct_permutation_type= FF_NO_IDCT_PERM;
- }else if(CONFIG_EATGQ_DECODER && avctx->idct_algo==FF_IDCT_EA) {
- c->idct_put= ff_ea_idct_put_c;
- c->idct_permutation_type= FF_NO_IDCT_PERM;
}else{ //accurate/default
c->idct_put = ff_simple_idct_put_8;
c->idct_add = ff_simple_idct_add_8;
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index 7b533cc0ab..42e1c9e61e 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -108,9 +108,6 @@ PUTAVG_PIXELS(14)
#define ff_put_pixels16x16_c ff_put_pixels16x16_8_c
#define ff_avg_pixels16x16_c ff_avg_pixels16x16_8_c
-/* EA functions */
-void ff_ea_idct_put_c(uint8_t *dest, int linesize, DCTELEM *block);
-
/* RV40 functions */
void ff_put_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride);
void ff_avg_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride);
diff --git a/libavcodec/eaidct.c b/libavcodec/eaidct.c
index 9972e422ed..d1bc350098 100644
--- a/libavcodec/eaidct.c
+++ b/libavcodec/eaidct.c
@@ -26,6 +26,7 @@
*/
#include "dsputil.h"
+#include "eaidct.h"
#define ASQRT 181 /* (1/sqrt(2))<<8 */
#define A4 669 /* cos(pi/8)*sqrt(2)<<9 */
diff --git a/libavcodec/eaidct.h b/libavcodec/eaidct.h
new file mode 100644
index 0000000000..a436673e88
--- /dev/null
+++ b/libavcodec/eaidct.h
@@ -0,0 +1,27 @@
+/*
+ * This file is part of FFmpeg
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_EAIDCT_H
+#define AVCODEC_EAIDCT_H
+
+#include <stdint.h>
+#include "dsputil.h"
+
+void ff_ea_idct_put_c(uint8_t *dest, int linesize, DCTELEM *block);
+
+#endif /* AVCODEC_EAIDCT_H */
diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c
index d36ef9afce..d6839b17ea 100644
--- a/libavcodec/eamad.c
+++ b/libavcodec/eamad.c
@@ -32,6 +32,7 @@
#include "get_bits.h"
#include "dsputil.h"
#include "aandcttab.h"
+#include "eaidct.h"
#include "mpeg12.h"
#include "mpeg12data.h"
#include "libavutil/imgutils.h"
@@ -42,12 +43,18 @@
#define MADe_TAG MKTAG('M', 'A', 'D', 'e') /* MAD lqp-frame */
typedef struct MadContext {
- MpegEncContext s;
+ AVCodecContext *avctx;
+ DSPContext dsp;
AVFrame frame;
AVFrame last_frame;
+ GetBitContext gb;
void *bitstream_buf;
unsigned int bitstream_buf_size;
DECLARE_ALIGNED(16, DCTELEM, block)[64];
+ ScanTable scantable;
+ uint16_t quant_matrix[64];
+ int mb_x;
+ int mb_y;
} MadContext;
static void bswap16_buf(uint16_t *dst, const uint16_t *src, int count)
@@ -59,14 +66,12 @@ static void bswap16_buf(uint16_t *dst, const uint16_t *src, int count)
static av_cold int decode_init(AVCodecContext *avctx)
{
- MadContext *t = avctx->priv_data;
- MpegEncContext *s = &t->s;
+ MadContext *s = avctx->priv_data;
s->avctx = avctx;
avctx->pix_fmt = PIX_FMT_YUV420P;
- if (avctx->idct_algo == FF_IDCT_AUTO)
- avctx->idct_algo = FF_IDCT_EA;
ff_dsputil_init(&s->dsp, avctx);
- ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable, ff_zigzag_direct);
+ ff_init_scantable_permutation(s->dsp.idct_permutation, FF_NO_IDCT_PERM);
+ ff_init_scantable(s->dsp.idct_permutation, &s->scantable, ff_zigzag_direct);
ff_mpeg12_init_vlcs();
return 0;
}
@@ -83,19 +88,18 @@ static inline void comp(unsigned char *dst, int dst_stride,
static inline void comp_block(MadContext *t, int mb_x, int mb_y,
int j, int mv_x, int mv_y, int add)
{
- MpegEncContext *s = &t->s;
if (j < 4) {
unsigned offset = (mb_y*16 + ((j&2)<<2) + mv_y)*t->last_frame.linesize[0] + mb_x*16 + ((j&1)<<3) + mv_x;
- if (offset >= (s->height - 7) * t->last_frame.linesize[0] - 7)
+ if (offset >= (t->avctx->height - 7) * t->last_frame.linesize[0] - 7)
return;
comp(t->frame.data[0] + (mb_y*16 + ((j&2)<<2))*t->frame.linesize[0] + mb_x*16 + ((j&1)<<3),
t->frame.linesize[0],
t->last_frame.data[0] + offset,
t->last_frame.linesize[0], add);
- } else if (!(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ } else if (!(t->avctx->flags & CODEC_FLAG_GRAY)) {
int index = j - 3;
unsigned offset = (mb_y * 8 + (mv_y/2))*t->last_frame.linesize[index] + mb_x * 8 + (mv_x/2);
- if (offset >= (s->height/2 - 7) * t->last_frame.linesize[index] - 7)
+ if (offset >= (t->avctx->height/2 - 7) * t->last_frame.linesize[index] - 7)
return;
comp(t->frame.data[index] + (mb_y*8)*t->frame.linesize[index] + mb_x * 8,
t->frame.linesize[index],
@@ -106,26 +110,24 @@ static inline void comp_block(MadContext *t, int mb_x, int mb_y,
static inline void idct_put(MadContext *t, DCTELEM *block, int mb_x, int mb_y, int j)
{
- MpegEncContext *s = &t->s;
if (j < 4) {
- s->dsp.idct_put(
+ ff_ea_idct_put_c(
t->frame.data[0] + (mb_y*16 + ((j&2)<<2))*t->frame.linesize[0] + mb_x*16 + ((j&1)<<3),
t->frame.linesize[0], block);
- } else if (!(s->avctx->flags & CODEC_FLAG_GRAY)) {
+ } else if (!(t->avctx->flags & CODEC_FLAG_GRAY)) {
int index = j - 3;
- s->dsp.idct_put(
+ ff_ea_idct_put_c(
t->frame.data[index] + (mb_y*8)*t->frame.linesize[index] + mb_x*8,
t->frame.linesize[index], block);
}
}
-static inline int decode_block_intra(MadContext * t, DCTELEM * block)
+static inline int decode_block_intra(MadContext *s, DCTELEM * block)
{
- MpegEncContext *s = &t->s;
int level, i, j, run;
RLTable *rl = &ff_rl_mpeg1;
- const uint8_t *scantable = s->intra_scantable.permutated;
- int16_t *quant_matrix = s->intra_matrix;
+ const uint8_t *scantable = s->scantable.permutated;
+ int16_t *quant_matrix = s->quant_matrix;
block[0] = (128 + get_sbits(&s->gb, 8)) * quant_matrix[0];
@@ -191,9 +193,8 @@ static int decode_motion(GetBitContext *gb)
return value;
}
-static int decode_mb(MadContext *t, int inter)
+static int decode_mb(MadContext *s, int inter)
{
- MpegEncContext *s = &t->s;
int mv_map = 0;
int mv_x, mv_y;
int j;
@@ -210,32 +211,25 @@ static int decode_mb(MadContext *t, int inter)
for (j=0; j<6; j++) {
if (mv_map & (1<<j)) { // mv_x and mv_y are guarded by mv_map
int add = 2*decode_motion(&s->gb);
- if (t->last_frame.data[0])
- comp_block(t, s->mb_x, s->mb_y, j, mv_x, mv_y, add);
+ if (s->last_frame.data[0])
+ comp_block(s, s->mb_x, s->mb_y, j, mv_x, mv_y, add);
} else {
- s->dsp.clear_block(t->block);
- if(decode_block_intra(t, t->block) < 0)
+ s->dsp.clear_block(s->block);
+ if(decode_block_intra(s, s->block) < 0)
return -1;
- idct_put(t, t->block, s->mb_x, s->mb_y, j);
+ idct_put(s, s->block, s->mb_x, s->mb_y, j);
}
}
return 0;
}
-static void calc_intra_matrix(MadContext *t, int qscale)
+static void calc_quant_matrix(MadContext *s, int qscale)
{
- MpegEncContext *s = &t->s;
int i;
- if (s->avctx->idct_algo == FF_IDCT_EA) {
- s->intra_matrix[0] = (ff_inv_aanscales[0]*ff_mpeg1_default_intra_matrix[0]) >> 11;
- for (i=1; i<64; i++)
- s->intra_matrix[i] = (ff_inv_aanscales[i]*ff_mpeg1_default_intra_matrix[i]*qscale + 32) >> 10;
- } else {
- s->intra_matrix[0] = ff_mpeg1_default_intra_matrix[0];
- for (i=1; i<64; i++)
- s->intra_matrix[i] = (ff_mpeg1_default_intra_matrix[i]*qscale) << 1;
- }
+ s->quant_matrix[0] = (ff_inv_aanscales[0]*ff_mpeg1_default_intra_matrix[0]) >> 11;
+ for (i=1; i<64; i++)
+ s->quant_matrix[i] = (ff_inv_aanscales[i]*ff_mpeg1_default_intra_matrix[i]*qscale + 32) >> 10;
}
static int decode_frame(AVCodecContext *avctx,
@@ -245,8 +239,8 @@ static int decode_frame(AVCodecContext *avctx,
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
const uint8_t *buf_end = buf+buf_size;
- MadContext *t = avctx->priv_data;
- MpegEncContext *s = &t->s;
+ MadContext *s = avctx->priv_data;
+ int width, height;
int chunk_type;
int inter;
@@ -263,48 +257,48 @@ static int decode_frame(AVCodecContext *avctx,
av_reduce(&avctx->time_base.num, &avctx->time_base.den,
AV_RL16(&buf[6]), 1000, 1<<30);
- s->width = AV_RL16(&buf[8]);
- s->height = AV_RL16(&buf[10]);
- calc_intra_matrix(t, buf[13]);
+ width = AV_RL16(&buf[8]);
+ height = AV_RL16(&buf[10]);
+ calc_quant_matrix(s, buf[13]);
buf += 16;
- if (avctx->width != s->width || avctx->height != s->height) {
- if((s->width * s->height)/2048*7 > buf_end-buf)
+ if (avctx->width != width || avctx->height != height) {
+ if((width * height)/2048*7 > buf_end-buf)
return -1;
- if (av_image_check_size(s->width, s->height, 0, avctx) < 0)
+ if (av_image_check_size(width, height, 0, avctx) < 0)
return -1;
- avcodec_set_dimensions(avctx, s->width, s->height);
- if (t->frame.data[0])
- avctx->release_buffer(avctx, &t->frame);
- if (t->last_frame.data[0])
- avctx->release_buffer(avctx, &t->last_frame);
+ avcodec_set_dimensions(avctx, width, height);
+ if (s->frame.data[0])
+ avctx->release_buffer(avctx, &s->frame);
+ if (s->last_frame.data[0])
+ avctx->release_buffer(avctx, &s->last_frame);
}
- t->frame.reference = 3;
- if (!t->frame.data[0]) {
- if (avctx->get_buffer(avctx, &t->frame) < 0) {
+ s->frame.reference = 3;
+ if (!s->frame.data[0]) {
+ if (avctx->get_buffer(avctx, &s->frame) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
}
- av_fast_malloc(&t->bitstream_buf, &t->bitstream_buf_size, (buf_end-buf) + FF_INPUT_BUFFER_PADDING_SIZE);
- if (!t->bitstream_buf)
+ av_fast_malloc(&s->bitstream_buf, &s->bitstream_buf_size, (buf_end-buf) + FF_INPUT_BUFFER_PADDING_SIZE);
+ if (!s->bitstream_buf)
return AVERROR(ENOMEM);
- bswap16_buf(t->bitstream_buf, (const uint16_t*)buf, (buf_end-buf)/2);
- memset((uint8_t*)t->bitstream_buf + (buf_end-buf), 0, FF_INPUT_BUFFER_PADDING_SIZE);
- init_get_bits(&s->gb, t->bitstream_buf, 8*(buf_end-buf));
+ bswap16_buf(s->bitstream_buf, (const uint16_t*)buf, (buf_end-buf)/2);
+ memset((uint8_t*)s->bitstream_buf + (buf_end-buf), 0, FF_INPUT_BUFFER_PADDING_SIZE);
+ init_get_bits(&s->gb, s->bitstream_buf, 8*(buf_end-buf));
for (s->mb_y=0; s->mb_y < (avctx->height+15)/16; s->mb_y++)
for (s->mb_x=0; s->mb_x < (avctx->width +15)/16; s->mb_x++)
- if(decode_mb(t, inter) < 0)
+ if(decode_mb(s, inter) < 0)
return -1;
*data_size = sizeof(AVFrame);
- *(AVFrame*)data = t->frame;
+ *(AVFrame*)data = s->frame;
if (chunk_type != MADe_TAG)
- FFSWAP(AVFrame, t->frame, t->last_frame);
+ FFSWAP(AVFrame, s->frame, s->last_frame);
return buf_size;
}
diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c
index 69bed3d1b8..7326af388a 100644
--- a/libavcodec/eatgq.c
+++ b/libavcodec/eatgq.c
@@ -34,10 +34,10 @@
#include "bytestream.h"
#include "dsputil.h"
#include "aandcttab.h"
+#include "eaidct.h"
typedef struct TgqContext {
AVCodecContext *avctx;
- DSPContext dsp;
AVFrame frame;
int width,height;
ScanTable scantable;
@@ -48,11 +48,10 @@ typedef struct TgqContext {
static av_cold int tgq_decode_init(AVCodecContext *avctx){
TgqContext *s = avctx->priv_data;
+ uint8_t idct_permutation[64];
s->avctx = avctx;
- if(avctx->idct_algo==FF_IDCT_AUTO)
- avctx->idct_algo=FF_IDCT_EA;
- ff_dsputil_init(&s->dsp, avctx);
- ff_init_scantable(s->dsp.idct_permutation, &s->scantable, ff_zigzag_direct);
+ ff_init_scantable_permutation(idct_permutation, FF_NO_IDCT_PERM);
+ ff_init_scantable(idct_permutation, &s->scantable, ff_zigzag_direct);
avctx->time_base = (AVRational){1, 15};
avctx->pix_fmt = PIX_FMT_YUV420P;
return 0;
@@ -109,13 +108,13 @@ static void tgq_idct_put_mb(TgqContext *s, DCTELEM (*block)[64], int mb_x, int m
uint8_t *dest_cb = s->frame.data[1] + (mb_y * 8 * s->frame.linesize[1]) + mb_x * 8;
uint8_t *dest_cr = s->frame.data[2] + (mb_y * 8 * s->frame.linesize[2]) + mb_x * 8;
- s->dsp.idct_put(dest_y , linesize, block[0]);
- s->dsp.idct_put(dest_y + 8, linesize, block[1]);
- s->dsp.idct_put(dest_y + 8*linesize , linesize, block[2]);
- s->dsp.idct_put(dest_y + 8*linesize + 8, linesize, block[3]);
+ ff_ea_idct_put_c(dest_y , linesize, block[0]);
+ ff_ea_idct_put_c(dest_y + 8, linesize, block[1]);
+ ff_ea_idct_put_c(dest_y + 8*linesize , linesize, block[2]);
+ ff_ea_idct_put_c(dest_y + 8*linesize + 8, linesize, block[3]);
if(!(s->avctx->flags&CODEC_FLAG_GRAY)){
- s->dsp.idct_put(dest_cb, s->frame.linesize[1], block[4]);
- s->dsp.idct_put(dest_cr, s->frame.linesize[2], block[5]);
+ ff_ea_idct_put_c(dest_cb, s->frame.linesize[1], block[4]);
+ ff_ea_idct_put_c(dest_cr, s->frame.linesize[2], block[5]);
}
}
@@ -180,10 +179,7 @@ static void tgq_calculate_qtable(TgqContext *s, int quant){
const int b = (11*(100-quant))/100 + 4;
for(j=0;j<8;j++)
for(i=0;i<8;i++)
- if (s->avctx->idct_algo==FF_IDCT_EA)
- s->qtable[j*8+i] = ((a*(j+i)/(7+7) + b)*ff_inv_aanscales[j*8+i])>>(14-4);
- else
- s->qtable[j*8+i] = (a*(j+i)/(7+7) + b)<<3;
+ s->qtable[j*8+i] = ((a*(j+i)/(7+7) + b)*ff_inv_aanscales[j*8+i])>>(14-4);
}
static int tgq_decode_frame(AVCodecContext *avctx,
diff --git a/libavcodec/eatqi.c b/libavcodec/eatqi.c
index 55c080dea8..6ca4e51ecd 100644
--- a/libavcodec/eatqi.c
+++ b/libavcodec/eatqi.c
@@ -30,6 +30,7 @@
#include "get_bits.h"
#include "dsputil.h"
#include "aandcttab.h"
+#include "eaidct.h"
#include "mpeg12.h"
#include "mpegvideo.h"
@@ -46,9 +47,8 @@ static av_cold int tqi_decode_init(AVCodecContext *avctx)
TqiContext *t = avctx->priv_data;
MpegEncContext *s = &t->s;
s->avctx = avctx;
- if(avctx->idct_algo==FF_IDCT_AUTO)
- avctx->idct_algo=FF_IDCT_EA;
ff_dsputil_init(&s->dsp, avctx);
+ ff_init_scantable_permutation(s->dsp.idct_permutation, FF_NO_IDCT_PERM);
ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable, ff_zigzag_direct);
s->qscale = 1;
avctx->time_base = (AVRational){1, 15};
@@ -76,13 +76,13 @@ static inline void tqi_idct_put(TqiContext *t, DCTELEM (*block)[64])
uint8_t *dest_cb = t->frame.data[1] + (s->mb_y * 8 * t->frame.linesize[1]) + s->mb_x * 8;
uint8_t *dest_cr = t->frame.data[2] + (s->mb_y * 8 * t->frame.linesize[2]) + s->mb_x * 8;
- s->dsp.idct_put(dest_y , linesize, block[0]);
- s->dsp.idct_put(dest_y + 8, linesize, block[1]);
- s->dsp.idct_put(dest_y + 8*linesize , linesize, block[2]);
- s->dsp.idct_put(dest_y + 8*linesize + 8, linesize, block[3]);
+ ff_ea_idct_put_c(dest_y , linesize, block[0]);
+ ff_ea_idct_put_c(dest_y + 8, linesize, block[1]);
+ ff_ea_idct_put_c(dest_y + 8*linesize , linesize, block[2]);
+ ff_ea_idct_put_c(dest_y + 8*linesize + 8, linesize, block[3]);
if(!(s->avctx->flags&CODEC_FLAG_GRAY)) {
- s->dsp.idct_put(dest_cb, t->frame.linesize[1], block[4]);
- s->dsp.idct_put(dest_cr, t->frame.linesize[2], block[5]);
+ ff_ea_idct_put_c(dest_cb, t->frame.linesize[1], block[4]);
+ ff_ea_idct_put_c(dest_cr, t->frame.linesize[2], block[5]);
}
}
@@ -90,15 +90,9 @@ static void tqi_calculate_qtable(MpegEncContext *s, int quant)
{
const int qscale = (215 - 2*quant)*5;
int i;
- if (s->avctx->idct_algo==FF_IDCT_EA) {
- s->intra_matrix[0] = (ff_inv_aanscales[0]*ff_mpeg1_default_intra_matrix[0])>>11;
- for(i=1; i<64; i++)
- s->intra_matrix[i] = (ff_inv_aanscales[i]*ff_mpeg1_default_intra_matrix[i]*qscale + 32)>>14;
- }else{
- s->intra_matrix[0] = ff_mpeg1_default_intra_matrix[0];
- for(i=1; i<64; i++)
- s->intra_matrix[i] = (ff_mpeg1_default_intra_matrix[i]*qscale + 32)>>3;
- }
+ s->intra_matrix[0] = (ff_inv_aanscales[0]*ff_mpeg1_default_intra_matrix[0])>>11;
+ for(i=1; i<64; i++)
+ s->intra_matrix[i] = (ff_inv_aanscales[i]*ff_mpeg1_default_intra_matrix[i]*qscale + 32)>>14;
}
static int tqi_decode_frame(AVCodecContext *avctx,
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index 28bee2e105..2945948c41 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -491,6 +491,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
sps->sar.den= 1;
if(s->avctx->debug&FF_DEBUG_PICT_INFO){
+ static const char csp[4][5] = { "Gray", "420", "422", "444" };
av_log(h->s.avctx, AV_LOG_DEBUG, "sps:%u profile:%d/%d poc:%d ref:%d %dx%d %s %s crop:%d/%d/%d/%d %s %s %d/%d b%d\n",
sps_id, sps->profile_idc, sps->level_idc,
sps->poc_type,
@@ -501,7 +502,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
sps->crop_left, sps->crop_right,
sps->crop_top, sps->crop_bottom,
sps->vui_parameters_present_flag ? "VUI" : "",
- ((const char*[]){"Gray","420","422","444"})[sps->chroma_format_idc],
+ csp[sps->chroma_format_idc],
sps->timing_info_present_flag ? sps->num_units_in_tick : 0,
sps->timing_info_present_flag ? sps->time_scale : 0,
sps->bit_depth_luma
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index a3c55d048f..ce5d40e8bf 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -36,7 +36,6 @@
#include "mpegvideo_common.h"
#include "mjpegenc.h"
#include "msmpeg4.h"
-#include "faandct.h"
#include "xvmc_internal.h"
#include "thread.h"
#include <limits.h>
diff --git a/libavcodec/mpegvideo_common.h b/libavcodec/mpegvideo_common.h
index 1802a9b0f5..9f7d0601b7 100644
--- a/libavcodec/mpegvideo_common.h
+++ b/libavcodec/mpegvideo_common.h
@@ -37,7 +37,6 @@
#include "mpegvideo.h"
#include "mjpegenc.h"
#include "msmpeg4.h"
-#include "faandct.h"
#include <limits.h>
int ff_dct_quantize_c(MpegEncContext *s, DCTELEM *block, int n, int qscale, int *overflow);
diff --git a/libavfilter/af_asyncts.c b/libavfilter/af_asyncts.c
index 7459610af8..1737d6138d 100644
--- a/libavfilter/af_asyncts.c
+++ b/libavfilter/af_asyncts.c
@@ -49,6 +49,7 @@ static const AVOption asyncts_options[] = {
{ "min_delta", "Minimum difference between timestamps and audio data "
"(in seconds) to trigger padding/trimmin the data.", OFFSET(min_delta_sec), AV_OPT_TYPE_FLOAT, { 0.1 }, 0, INT_MAX, A },
{ "max_comp", "Maximum compensation in samples per second.", OFFSET(max_comp), AV_OPT_TYPE_INT, { 500 }, 0, INT_MAX, A },
+ { "first_pts", "Assume the first pts should be this value.", OFFSET(pts), AV_OPT_TYPE_INT64, { AV_NOPTS_VALUE }, INT64_MIN, INT64_MAX, A },
{ NULL },
};
@@ -68,8 +69,6 @@ static int init(AVFilterContext *ctx, const char *args)
}
av_opt_free(s);
- s->pts = AV_NOPTS_VALUE;
-
return 0;
}
@@ -182,7 +181,7 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf)
if (labs(delta) > s->min_delta) {
av_log(ctx, AV_LOG_VERBOSE, "Discontinuity - %"PRId64" samples.\n", delta);
- out_size += delta;
+ out_size = av_clipl_int32((int64_t)out_size + delta);
} else {
if (s->resample) {
int comp = av_clip(delta, -s->max_comp, s->max_comp);
diff --git a/libavformat/4xm.c b/libavformat/4xm.c
index a794e88916..61fa886e70 100644
--- a/libavformat/4xm.c
+++ b/libavformat/4xm.c
@@ -359,7 +359,7 @@ static int fourxm_read_close(AVFormatContext *s)
AVInputFormat ff_fourxm_demuxer = {
.name = "4xm",
- .long_name = NULL_IF_CONFIG_SMALL("4X Technologies format"),
+ .long_name = NULL_IF_CONFIG_SMALL("4X Technologies"),
.priv_data_size = sizeof(FourxmDemuxContext),
.read_probe = fourxm_probe,
.read_header = fourxm_read_header,
diff --git a/libavformat/amr.c b/libavformat/amr.c
index 23272e4caa..299dbc91fc 100644
--- a/libavformat/amr.c
+++ b/libavformat/amr.c
@@ -157,7 +157,7 @@ static int amr_read_packet(AVFormatContext *s, AVPacket *pkt)
#if CONFIG_AMR_DEMUXER
AVInputFormat ff_amr_demuxer = {
.name = "amr",
- .long_name = NULL_IF_CONFIG_SMALL("3GPP AMR file format"),
+ .long_name = NULL_IF_CONFIG_SMALL("3GPP AMR"),
.read_probe = amr_probe,
.read_header = amr_read_header,
.read_packet = amr_read_packet,
@@ -168,7 +168,7 @@ AVInputFormat ff_amr_demuxer = {
#if CONFIG_AMR_MUXER
AVOutputFormat ff_amr_muxer = {
.name = "amr",
- .long_name = NULL_IF_CONFIG_SMALL("3GPP AMR file format"),
+ .long_name = NULL_IF_CONFIG_SMALL("3GPP AMR"),
.mime_type = "audio/amr",
.extensions = "amr",
.audio_codec = CODEC_ID_AMR_NB,
diff --git a/libavformat/apc.c b/libavformat/apc.c
index 2e160ccab5..c4774f1375 100644
--- a/libavformat/apc.c
+++ b/libavformat/apc.c
@@ -83,7 +83,7 @@ static int apc_read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat ff_apc_demuxer = {
.name = "apc",
- .long_name = NULL_IF_CONFIG_SMALL("CRYO APC format"),
+ .long_name = NULL_IF_CONFIG_SMALL("CRYO APC"),
.read_probe = apc_probe,
.read_header = apc_read_header,
.read_packet = apc_read_packet,
diff --git a/libavformat/assdec.c b/libavformat/assdec.c
index f76424a36c..157d2282bb 100644
--- a/libavformat/assdec.c
+++ b/libavformat/assdec.c
@@ -205,7 +205,7 @@ static int read_seek2(AVFormatContext *s, int stream_index,
AVInputFormat ff_ass_demuxer = {
.name = "ass",
- .long_name = NULL_IF_CONFIG_SMALL("Advanced SubStation Alpha subtitle format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Advanced SubStation Alpha subtitle"),
.priv_data_size = sizeof(ASSContext),
.read_probe = probe,
.read_header = read_header,
diff --git a/libavformat/assenc.c b/libavformat/assenc.c
index b367668d2d..515ee0447b 100644
--- a/libavformat/assenc.c
+++ b/libavformat/assenc.c
@@ -79,7 +79,7 @@ static int write_trailer(AVFormatContext *s)
AVOutputFormat ff_ass_muxer = {
.name = "ass",
- .long_name = NULL_IF_CONFIG_SMALL("Advanced SubStation Alpha subtitle format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Advanced SubStation Alpha subtitle"),
.mime_type = "text/x-ssa",
.extensions = "ass,ssa",
.priv_data_size = sizeof(ASSContext),
diff --git a/libavformat/avs.c b/libavformat/avs.c
index 7bd4bcf82c..124d43f33f 100644
--- a/libavformat/avs.c
+++ b/libavformat/avs.c
@@ -223,7 +223,7 @@ static int avs_read_close(AVFormatContext * s)
AVInputFormat ff_avs_demuxer = {
.name = "avs",
- .long_name = NULL_IF_CONFIG_SMALL("AVS format"),
+ .long_name = NULL_IF_CONFIG_SMALL("AVS"),
.priv_data_size = sizeof(AvsFormat),
.read_probe = avs_probe,
.read_header = avs_read_header,
diff --git a/libavformat/bethsoftvid.c b/libavformat/bethsoftvid.c
index a98b1bda2c..77c45eefa1 100644
--- a/libavformat/bethsoftvid.c
+++ b/libavformat/bethsoftvid.c
@@ -283,7 +283,7 @@ static int vid_read_close(AVFormatContext *s)
AVInputFormat ff_bethsoftvid_demuxer = {
.name = "bethsoftvid",
- .long_name = NULL_IF_CONFIG_SMALL("Bethesda Softworks VID format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Bethesda Softworks VID"),
.priv_data_size = sizeof(BVID_DemuxContext),
.read_probe = vid_probe,
.read_header = vid_read_header,
diff --git a/libavformat/cdg.c b/libavformat/cdg.c
index e93a6b29d1..256fc21873 100644
--- a/libavformat/cdg.c
+++ b/libavformat/cdg.c
@@ -71,7 +71,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat ff_cdg_demuxer = {
.name = "cdg",
- .long_name = NULL_IF_CONFIG_SMALL("CD Graphics Format"),
+ .long_name = NULL_IF_CONFIG_SMALL("CD Graphics"),
.read_header = read_header,
.read_packet = read_packet,
.flags = AVFMT_GENERIC_INDEX,
diff --git a/libavformat/cdxl.c b/libavformat/cdxl.c
index b8a4558d53..736ce3d634 100644
--- a/libavformat/cdxl.c
+++ b/libavformat/cdxl.c
@@ -171,7 +171,7 @@ static const AVClass cdxl_demuxer_class = {
AVInputFormat ff_cdxl_demuxer = {
.name = "cdxl",
- .long_name = NULL_IF_CONFIG_SMALL("Commodore CDXL video format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Commodore CDXL video"),
.priv_data_size = sizeof(CDXLDemuxContext),
.read_header = cdxl_read_header,
.read_packet = cdxl_read_packet,
diff --git a/libavformat/crcenc.c b/libavformat/crcenc.c
index 1f5854e080..210ef2c4dd 100644
--- a/libavformat/crcenc.c
+++ b/libavformat/crcenc.c
@@ -56,7 +56,7 @@ static int crc_write_trailer(struct AVFormatContext *s)
AVOutputFormat ff_crc_muxer = {
.name = "crc",
- .long_name = NULL_IF_CONFIG_SMALL("CRC testing format"),
+ .long_name = NULL_IF_CONFIG_SMALL("CRC testing"),
.priv_data_size = sizeof(CRCState),
.audio_codec = CODEC_ID_PCM_S16LE,
.video_codec = CODEC_ID_RAWVIDEO,
diff --git a/libavformat/daud.c b/libavformat/daud.c
index 916489fc0e..a25c0bff4c 100644
--- a/libavformat/daud.c
+++ b/libavformat/daud.c
@@ -72,7 +72,7 @@ static int daud_write_packet(struct AVFormatContext *s, AVPacket *pkt)
#if CONFIG_DAUD_DEMUXER
AVInputFormat ff_daud_demuxer = {
.name = "daud",
- .long_name = NULL_IF_CONFIG_SMALL("D-Cinema audio format"),
+ .long_name = NULL_IF_CONFIG_SMALL("D-Cinema audio"),
.read_header = daud_header,
.read_packet = daud_packet,
.extensions = "302,daud",
@@ -82,7 +82,7 @@ AVInputFormat ff_daud_demuxer = {
#if CONFIG_DAUD_MUXER
AVOutputFormat ff_daud_muxer = {
.name = "daud",
- .long_name = NULL_IF_CONFIG_SMALL("D-Cinema audio format"),
+ .long_name = NULL_IF_CONFIG_SMALL("D-Cinema audio"),
.extensions = "302",
.audio_codec = CODEC_ID_PCM_S24DAUD,
.video_codec = CODEC_ID_NONE,
diff --git a/libavformat/dsicin.c b/libavformat/dsicin.c
index d525da650d..5a97e75971 100644
--- a/libavformat/dsicin.c
+++ b/libavformat/dsicin.c
@@ -222,7 +222,7 @@ static int cin_read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat ff_dsicin_demuxer = {
.name = "dsicin",
- .long_name = NULL_IF_CONFIG_SMALL("Delphine Software International CIN format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Delphine Software International CIN"),
.priv_data_size = sizeof(CinDemuxContext),
.read_probe = cin_probe,
.read_header = cin_read_header,
diff --git a/libavformat/dv.c b/libavformat/dv.c
index 75b42b01ab..2faeb95897 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -591,7 +591,7 @@ static int dv_probe(AVProbeData *p)
#if CONFIG_DV_DEMUXER
AVInputFormat ff_dv_demuxer = {
.name = "dv",
- .long_name = NULL_IF_CONFIG_SMALL("DV video format"),
+ .long_name = NULL_IF_CONFIG_SMALL("DV video"),
.priv_data_size = sizeof(RawDVContext),
.read_probe = dv_probe,
.read_header = dv_read_header,
diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c
index f3056f7892..b936c693b1 100644
--- a/libavformat/dvenc.c
+++ b/libavformat/dvenc.c
@@ -407,7 +407,7 @@ static int dv_write_trailer(struct AVFormatContext *s)
AVOutputFormat ff_dv_muxer = {
.name = "dv",
- .long_name = NULL_IF_CONFIG_SMALL("DV video format"),
+ .long_name = NULL_IF_CONFIG_SMALL("DV video"),
.extensions = "dv",
.priv_data_size = sizeof(DVMuxContext),
.audio_codec = CODEC_ID_PCM_S16LE,
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index d6dfd92f2f..7c54ab6a97 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -617,7 +617,7 @@ get_video_packet:
AVInputFormat ff_ea_demuxer = {
.name = "ea",
- .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts Multimedia Format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts Multimedia"),
.priv_data_size = sizeof(EaDemuxContext),
.read_probe = ea_probe,
.read_header = ea_read_header,
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index 0c943fbe09..df9ac8d9fc 100644
--- a/libavformat/ffmdec.c
+++ b/libavformat/ffmdec.c
@@ -528,7 +528,7 @@ static int ffm_probe(AVProbeData *p)
AVInputFormat ff_ffm_demuxer = {
.name = "ffm",
- .long_name = NULL_IF_CONFIG_SMALL("FFM (FFserver live feed) format"),
+ .long_name = NULL_IF_CONFIG_SMALL("FFM (FFserver live feed)"),
.priv_data_size = sizeof(FFMContext),
.read_probe = ffm_probe,
.read_header = ffm_read_header,
diff --git a/libavformat/ffmenc.c b/libavformat/ffmenc.c
index 74807d9813..a8d038ac68 100644
--- a/libavformat/ffmenc.c
+++ b/libavformat/ffmenc.c
@@ -240,7 +240,7 @@ static int ffm_write_trailer(AVFormatContext *s)
AVOutputFormat ff_ffm_muxer = {
.name = "ffm",
- .long_name = NULL_IF_CONFIG_SMALL("FFM (FFserver live feed) format"),
+ .long_name = NULL_IF_CONFIG_SMALL("FFM (FFserver live feed)"),
.extensions = "ffm",
.priv_data_size = sizeof(FFMContext),
.audio_codec = CODEC_ID_MP2,
diff --git a/libavformat/ffmetadec.c b/libavformat/ffmetadec.c
index 98620bd321..5a4bc82c99 100644
--- a/libavformat/ffmetadec.c
+++ b/libavformat/ffmetadec.c
@@ -168,7 +168,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat ff_ffmetadata_demuxer = {
.name = "ffmetadata",
- .long_name = NULL_IF_CONFIG_SMALL("FFmpeg metadata in text format"),
+ .long_name = NULL_IF_CONFIG_SMALL("FFmpeg metadata in text"),
.read_probe = probe,
.read_header = read_header,
.read_packet = read_packet,
diff --git a/libavformat/ffmetaenc.c b/libavformat/ffmetaenc.c
index 200c9940a4..36107df2b3 100644
--- a/libavformat/ffmetaenc.c
+++ b/libavformat/ffmetaenc.c
@@ -92,7 +92,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
AVOutputFormat ff_ffmetadata_muxer = {
.name = "ffmetadata",
- .long_name = NULL_IF_CONFIG_SMALL("FFmpeg metadata in text format"),
+ .long_name = NULL_IF_CONFIG_SMALL("FFmpeg metadata in text"),
.extensions = "ffmeta",
.write_header = write_header,
.write_packet = write_packet,
diff --git a/libavformat/flic.c b/libavformat/flic.c
index 3ad7c86cdc..85c5564f5e 100644
--- a/libavformat/flic.c
+++ b/libavformat/flic.c
@@ -262,7 +262,7 @@ static int flic_read_packet(AVFormatContext *s,
AVInputFormat ff_flic_demuxer = {
.name = "flic",
- .long_name = NULL_IF_CONFIG_SMALL("FLI/FLC/FLX animation format"),
+ .long_name = NULL_IF_CONFIG_SMALL("FLI/FLC/FLX animation"),
.priv_data_size = sizeof(FlicDemuxContext),
.read_probe = flic_probe,
.read_header = flic_read_header,
diff --git a/libavformat/framecrcenc.c b/libavformat/framecrcenc.c
index 72eeba707b..78f7131a5d 100644
--- a/libavformat/framecrcenc.c
+++ b/libavformat/framecrcenc.c
@@ -37,7 +37,7 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
AVOutputFormat ff_framecrc_muxer = {
.name = "framecrc",
- .long_name = NULL_IF_CONFIG_SMALL("framecrc testing format"),
+ .long_name = NULL_IF_CONFIG_SMALL("framecrc testing"),
.audio_codec = CODEC_ID_PCM_S16LE,
.video_codec = CODEC_ID_RAWVIDEO,
.write_header = ff_framehash_write_header,
diff --git a/libavformat/g723_1.c b/libavformat/g723_1.c
index 388283f80e..fa8011cd28 100644
--- a/libavformat/g723_1.c
+++ b/libavformat/g723_1.c
@@ -77,7 +77,7 @@ static int g723_1_read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat ff_g723_1_demuxer = {
.name = "g723_1",
- .long_name = NULL_IF_CONFIG_SMALL("G.723.1 format"),
+ .long_name = NULL_IF_CONFIG_SMALL("G.723.1"),
.read_header = g723_1_init,
.read_packet = g723_1_read_packet,
.extensions = "tco,rco,g723_1",
diff --git a/libavformat/h264dec.c b/libavformat/h264dec.c
index e7c6d70deb..96f93e258e 100644
--- a/libavformat/h264dec.c
+++ b/libavformat/h264dec.c
@@ -67,4 +67,4 @@ static int h264_probe(AVProbeData *p)
return 0;
}
-FF_DEF_RAWVIDEO_DEMUXER(h264 , "raw H.264 video format", h264_probe, "h26l,h264,264", CODEC_ID_H264)
+FF_DEF_RAWVIDEO_DEMUXER(h264 , "raw H.264 video", h264_probe, "h26l,h264,264", CODEC_ID_H264)
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 11b6ab1273..b56b6918bb 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -749,7 +749,7 @@ static int hls_probe(AVProbeData *p)
AVInputFormat ff_hls_demuxer = {
.name = "hls,applehttp",
- .long_name = NULL_IF_CONFIG_SMALL("Apple HTTP Live Streaming format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Apple HTTP Live Streaming"),
.priv_data_size = sizeof(HLSContext),
.read_probe = hls_probe,
.read_header = hls_read_header,
diff --git a/libavformat/idcin.c b/libavformat/idcin.c
index fd4504a566..81432c187f 100644
--- a/libavformat/idcin.c
+++ b/libavformat/idcin.c
@@ -295,7 +295,7 @@ static int idcin_read_packet(AVFormatContext *s,
AVInputFormat ff_idcin_demuxer = {
.name = "idcin",
- .long_name = NULL_IF_CONFIG_SMALL("id Cinematic format"),
+ .long_name = NULL_IF_CONFIG_SMALL("id Cinematic"),
.priv_data_size = sizeof(IdcinDemuxContext),
.read_probe = idcin_probe,
.read_header = idcin_read_header,
diff --git a/libavformat/idroqdec.c b/libavformat/idroqdec.c
index ab3ef96647..d832e354a3 100644
--- a/libavformat/idroqdec.c
+++ b/libavformat/idroqdec.c
@@ -221,7 +221,7 @@ static int roq_read_packet(AVFormatContext *s,
AVInputFormat ff_roq_demuxer = {
.name = "roq",
- .long_name = NULL_IF_CONFIG_SMALL("id RoQ format"),
+ .long_name = NULL_IF_CONFIG_SMALL("id RoQ"),
.priv_data_size = sizeof(RoqDemuxContext),
.read_probe = roq_probe,
.read_header = roq_read_header,
diff --git a/libavformat/idroqenc.c b/libavformat/idroqenc.c
index dba9c84c20..58bf7e98ad 100644
--- a/libavformat/idroqenc.c
+++ b/libavformat/idroqenc.c
@@ -37,7 +37,7 @@ static int roq_write_header(struct AVFormatContext *s)
AVOutputFormat ff_roq_muxer = {
.name = "roq",
- .long_name = NULL_IF_CONFIG_SMALL("raw id RoQ format"),
+ .long_name = NULL_IF_CONFIG_SMALL("raw id RoQ"),
.extensions = "roq",
.audio_codec = CODEC_ID_ROQ_DPCM,
.video_codec = CODEC_ID_ROQ,
diff --git a/libavformat/ilbc.c b/libavformat/ilbc.c
index d4f4583545..11959f4028 100644
--- a/libavformat/ilbc.c
+++ b/libavformat/ilbc.c
@@ -122,7 +122,7 @@ static int ilbc_read_packet(AVFormatContext *s,
AVInputFormat ff_ilbc_demuxer = {
.name = "ilbc",
- .long_name = NULL_IF_CONFIG_SMALL("iLBC storage file format"),
+ .long_name = NULL_IF_CONFIG_SMALL("iLBC storage"),
.read_probe = ilbc_probe,
.read_header = ilbc_read_header,
.read_packet = ilbc_read_packet,
@@ -131,7 +131,7 @@ AVInputFormat ff_ilbc_demuxer = {
AVOutputFormat ff_ilbc_muxer = {
.name = "ilbc",
- .long_name = NULL_IF_CONFIG_SMALL("iLBC storage file format"),
+ .long_name = NULL_IF_CONFIG_SMALL("iLBC storage"),
.mime_type = "audio/iLBC",
.extensions = "lbc",
.audio_codec = CODEC_ID_ILBC,
diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c
index 30ed16dd78..4886b8260b 100644
--- a/libavformat/ipmovie.c
+++ b/libavformat/ipmovie.c
@@ -645,7 +645,7 @@ static int ipmovie_read_packet(AVFormatContext *s,
AVInputFormat ff_ipmovie_demuxer = {
.name = "ipmovie",
- .long_name = NULL_IF_CONFIG_SMALL("Interplay MVE format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Interplay MVE"),
.priv_data_size = sizeof(IPMVEContext),
.read_probe = ipmovie_probe,
.read_header = ipmovie_read_header,
diff --git a/libavformat/iss.c b/libavformat/iss.c
index f8ec119356..c9b7dc2d3e 100644
--- a/libavformat/iss.c
+++ b/libavformat/iss.c
@@ -129,7 +129,7 @@ static int iss_read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat ff_iss_demuxer = {
.name = "iss",
- .long_name = NULL_IF_CONFIG_SMALL("Funcom ISS format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Funcom ISS"),
.priv_data_size = sizeof(IssDemuxContext),
.read_probe = iss_probe,
.read_header = iss_read_header,
diff --git a/libavformat/lmlm4.c b/libavformat/lmlm4.c
index 24ae289cbe..4d68eea2b8 100644
--- a/libavformat/lmlm4.c
+++ b/libavformat/lmlm4.c
@@ -120,7 +120,7 @@ static int lmlm4_read_packet(AVFormatContext *s, AVPacket *pkt) {
AVInputFormat ff_lmlm4_demuxer = {
.name = "lmlm4",
- .long_name = NULL_IF_CONFIG_SMALL("lmlm4 raw format"),
+ .long_name = NULL_IF_CONFIG_SMALL("raw lmlm4"),
.read_probe = lmlm4_probe,
.read_header = lmlm4_read_header,
.read_packet = lmlm4_read_packet,
diff --git a/libavformat/lxfdec.c b/libavformat/lxfdec.c
index 21e7290665..e3b7bea625 100644
--- a/libavformat/lxfdec.c
+++ b/libavformat/lxfdec.c
@@ -365,7 +365,7 @@ static int lxf_read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat ff_lxf_demuxer = {
.name = "lxf",
- .long_name = NULL_IF_CONFIG_SMALL("VR native stream format (LXF)"),
+ .long_name = NULL_IF_CONFIG_SMALL("VR native stream (LXF)"),
.priv_data_size = sizeof(LXFDemuxContext),
.read_probe = lxf_probe,
.read_header = lxf_read_header,
diff --git a/libavformat/m4vdec.c b/libavformat/m4vdec.c
index 88f838022e..cc8c11b9b0 100644
--- a/libavformat/m4vdec.c
+++ b/libavformat/m4vdec.c
@@ -49,4 +49,4 @@ static int mpeg4video_probe(AVProbeData *probe_packet)
return 0;
}
-FF_DEF_RAWVIDEO_DEMUXER(m4v, "raw MPEG-4 video format", mpeg4video_probe, "m4v", CODEC_ID_MPEG4)
+FF_DEF_RAWVIDEO_DEMUXER(m4v, "raw MPEG-4 video", mpeg4video_probe, "m4v", CODEC_ID_MPEG4)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 8640aeeee0..f75763284b 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2305,7 +2305,7 @@ static int matroska_read_close(AVFormatContext *s)
AVInputFormat ff_matroska_demuxer = {
.name = "matroska,webm",
- .long_name = NULL_IF_CONFIG_SMALL("Matroska/WebM file format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Matroska / WebM"),
.priv_data_size = sizeof(MatroskaDemuxContext),
.read_probe = matroska_probe,
.read_header = matroska_read_header,
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index bbab728ba7..f5fdaae2cd 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1307,7 +1307,7 @@ static int mkv_query_codec(enum CodecID codec_id, int std_compliance)
#if CONFIG_MATROSKA_MUXER
AVOutputFormat ff_matroska_muxer = {
.name = "matroska",
- .long_name = NULL_IF_CONFIG_SMALL("Matroska file format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Matroska"),
.mime_type = "video/x-matroska",
.extensions = "mkv",
.priv_data_size = sizeof(MatroskaMuxContext),
@@ -1328,7 +1328,7 @@ AVOutputFormat ff_matroska_muxer = {
#if CONFIG_WEBM_MUXER
AVOutputFormat ff_webm_muxer = {
.name = "webm",
- .long_name = NULL_IF_CONFIG_SMALL("WebM file format"),
+ .long_name = NULL_IF_CONFIG_SMALL("WebM"),
.mime_type = "video/webm",
.extensions = "webm",
.priv_data_size = sizeof(MatroskaMuxContext),
@@ -1345,7 +1345,7 @@ AVOutputFormat ff_webm_muxer = {
#if CONFIG_MATROSKA_AUDIO_MUXER
AVOutputFormat ff_matroska_audio_muxer = {
.name = "matroska",
- .long_name = NULL_IF_CONFIG_SMALL("Matroska file format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Matroska"),
.mime_type = "audio/x-matroska",
.extensions = "mka",
.priv_data_size = sizeof(MatroskaMuxContext),
diff --git a/libavformat/md5enc.c b/libavformat/md5enc.c
index 4ea7924a34..9c51cf1d43 100644
--- a/libavformat/md5enc.c
+++ b/libavformat/md5enc.c
@@ -68,7 +68,7 @@ static int write_trailer(struct AVFormatContext *s)
AVOutputFormat ff_md5_muxer = {
.name = "md5",
- .long_name = NULL_IF_CONFIG_SMALL("MD5 testing format"),
+ .long_name = NULL_IF_CONFIG_SMALL("MD5 testing"),
.priv_data_size = PRIVSIZE,
.audio_codec = CODEC_ID_PCM_S16LE,
.video_codec = CODEC_ID_RAWVIDEO,
@@ -98,7 +98,7 @@ static int framemd5_write_packet(struct AVFormatContext *s, AVPacket *pkt)
AVOutputFormat ff_framemd5_muxer = {
.name = "framemd5",
- .long_name = NULL_IF_CONFIG_SMALL("Per-frame MD5 testing format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Per-frame MD5 testing"),
.priv_data_size = PRIVSIZE,
.audio_codec = CODEC_ID_PCM_S16LE,
.video_codec = CODEC_ID_RAWVIDEO,
diff --git a/libavformat/mm.c b/libavformat/mm.c
index d7308b9a90..889aa12e86 100644
--- a/libavformat/mm.c
+++ b/libavformat/mm.c
@@ -187,7 +187,7 @@ static int read_packet(AVFormatContext *s,
AVInputFormat ff_mm_demuxer = {
.name = "mm",
- .long_name = NULL_IF_CONFIG_SMALL("American Laser Games MM format"),
+ .long_name = NULL_IF_CONFIG_SMALL("American Laser Games MM"),
.priv_data_size = sizeof(MmDemuxContext),
.read_probe = probe,
.read_header = read_header,
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index b50218cd99..48b7e6ae37 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3691,7 +3691,7 @@ AVOutputFormat ff_ipod_muxer = {
MOV_CLASS(ismv)
AVOutputFormat ff_ismv_muxer = {
.name = "ismv",
- .long_name = NULL_IF_CONFIG_SMALL("ISMV/ISMA (Smooth Streaming) format"),
+ .long_name = NULL_IF_CONFIG_SMALL("ISMV/ISMA (Smooth Streaming)"),
.mime_type = "application/mp4",
.extensions = "ismv,isma",
.priv_data_size = sizeof(MOVMuxContext),
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index d07a0471bf..cf92631433 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -1178,7 +1178,7 @@ AVOutputFormat ff_mpeg1vcd_muxer = {
MPEGENC_CLASS(vob)
AVOutputFormat ff_mpeg2vob_muxer = {
.name = "vob",
- .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 PS format (VOB)"),
+ .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 PS (VOB)"),
.mime_type = "video/mpeg",
.extensions = "vob",
.priv_data_size = sizeof(MpegMuxContext),
@@ -1214,7 +1214,7 @@ AVOutputFormat ff_mpeg2svcd_muxer = {
MPEGENC_CLASS(dvd)
AVOutputFormat ff_mpeg2dvd_muxer = {
.name = "dvd",
- .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 PS format (DVD VOB)"),
+ .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 PS (DVD VOB)"),
.mime_type = "video/mpeg",
.extensions = "dvd",
.priv_data_size = sizeof(MpegMuxContext),
diff --git a/libavformat/mpjpeg.c b/libavformat/mpjpeg.c
index dce53ce3de..3e5a18fada 100644
--- a/libavformat/mpjpeg.c
+++ b/libavformat/mpjpeg.c
@@ -58,7 +58,7 @@ static int mpjpeg_write_trailer(AVFormatContext *s)
AVOutputFormat ff_mpjpeg_muxer = {
.name = "mpjpeg",
- .long_name = NULL_IF_CONFIG_SMALL("MIME multipart JPEG format"),
+ .long_name = NULL_IF_CONFIG_SMALL("MIME multipart JPEG"),
.mime_type = "multipart/x-mixed-replace;boundary=" BOUNDARY_TAG,
.extensions = "mjpg",
.audio_codec = CODEC_ID_NONE,
diff --git a/libavformat/mtv.c b/libavformat/mtv.c
index 30c8ed7911..37719caacf 100644
--- a/libavformat/mtv.c
+++ b/libavformat/mtv.c
@@ -195,7 +195,7 @@ static int mtv_read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat ff_mtv_demuxer = {
.name = "mtv",
- .long_name = NULL_IF_CONFIG_SMALL("MTV format"),
+ .long_name = NULL_IF_CONFIG_SMALL("MTV"),
.priv_data_size = sizeof(MTVDemuxContext),
.read_probe = mtv_probe,
.read_header = mtv_read_header,
diff --git a/libavformat/mvi.c b/libavformat/mvi.c
index 0444b4a00c..9a6e9d7632 100644
--- a/libavformat/mvi.c
+++ b/libavformat/mvi.c
@@ -126,7 +126,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat ff_mvi_demuxer = {
.name = "mvi",
- .long_name = NULL_IF_CONFIG_SMALL("Motion Pixels MVI format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Motion Pixels MVI"),
.priv_data_size = sizeof(MviDemuxContext),
.read_header = read_header,
.read_packet = read_packet,
diff --git a/libavformat/mxg.c b/libavformat/mxg.c
index 2ad611062e..6ecde121c6 100644
--- a/libavformat/mxg.c
+++ b/libavformat/mxg.c
@@ -241,7 +241,7 @@ static int mxg_close(struct AVFormatContext *s)
AVInputFormat ff_mxg_demuxer = {
.name = "mxg",
- .long_name = NULL_IF_CONFIG_SMALL("MxPEG clip file format"),
+ .long_name = NULL_IF_CONFIG_SMALL("MxPEG clip"),
.priv_data_size = sizeof(MXGContext),
.read_header = mxg_read_header,
.read_packet = mxg_read_packet,
diff --git a/libavformat/ncdec.c b/libavformat/ncdec.c
index bd4ff6827b..7d7b390373 100644
--- a/libavformat/ncdec.c
+++ b/libavformat/ncdec.c
@@ -93,7 +93,7 @@ static int nc_read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat ff_nc_demuxer = {
.name = "nc",
- .long_name = NULL_IF_CONFIG_SMALL("NC camera feed format"),
+ .long_name = NULL_IF_CONFIG_SMALL("NC camera feed"),
.read_probe = nc_probe,
.read_header = nc_read_header,
.read_packet = nc_read_packet,
diff --git a/libavformat/nullenc.c b/libavformat/nullenc.c
index de863ab0c5..99899923e2 100644
--- a/libavformat/nullenc.c
+++ b/libavformat/nullenc.c
@@ -28,7 +28,7 @@ static int null_write_packet(struct AVFormatContext *s, AVPacket *pkt)
AVOutputFormat ff_null_muxer = {
.name = "null",
- .long_name = NULL_IF_CONFIG_SMALL("raw null video format"),
+ .long_name = NULL_IF_CONFIG_SMALL("raw null video"),
.audio_codec = AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE),
.video_codec = CODEC_ID_RAWVIDEO,
.write_packet = null_write_packet,
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index f3da58acfa..c025451221 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -1014,7 +1014,7 @@ static int nut_read_close(AVFormatContext *s)
AVInputFormat ff_nut_demuxer = {
.name = "nut",
- .long_name = NULL_IF_CONFIG_SMALL("NUT format"),
+ .long_name = NULL_IF_CONFIG_SMALL("NUT"),
.flags = AVFMT_SEEK_TO_PTS,
.priv_data_size = sizeof(NUTContext),
.read_probe = nut_probe,
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index 326da1caba..6ace0d0bc2 100644
--- a/libavformat/nutenc.c
+++ b/libavformat/nutenc.c
@@ -866,7 +866,7 @@ static int nut_write_trailer(AVFormatContext *s){
AVOutputFormat ff_nut_muxer = {
.name = "nut",
- .long_name = NULL_IF_CONFIG_SMALL("NUT format"),
+ .long_name = NULL_IF_CONFIG_SMALL("NUT"),
.mime_type = "video/x-nut",
.extensions = "nut",
.priv_data_size = sizeof(NUTContext),
diff --git a/libavformat/nuv.c b/libavformat/nuv.c
index 928f856c88..21df6d2856 100644
--- a/libavformat/nuv.c
+++ b/libavformat/nuv.c
@@ -338,7 +338,7 @@ static int64_t nuv_read_dts(AVFormatContext *s, int stream_index,
AVInputFormat ff_nuv_demuxer = {
.name = "nuv",
- .long_name = NULL_IF_CONFIG_SMALL("NuppelVideo format"),
+ .long_name = NULL_IF_CONFIG_SMALL("NuppelVideo"),
.priv_data_size = sizeof(NUVContext),
.read_probe = nuv_probe,
.read_header = nuv_header,
diff --git a/libavformat/pcmdec.c b/libavformat/pcmdec.c
index 4eb3c73ff9..7a1eb41624 100644
--- a/libavformat/pcmdec.c
+++ b/libavformat/pcmdec.c
@@ -76,62 +76,62 @@ AVInputFormat ff_pcm_ ## name_ ## _demuxer = { \
.priv_class = &name_ ## _demuxer_class, \
};
-PCMDEF(f64be, "PCM 64 bit floating-point big-endian format",
+PCMDEF(f64be, "PCM 64-bit floating-point big-endian",
NULL, CODEC_ID_PCM_F64BE)
-PCMDEF(f64le, "PCM 64 bit floating-point little-endian format",
+PCMDEF(f64le, "PCM 64-bit floating-point little-endian",
NULL, CODEC_ID_PCM_F64LE)
-PCMDEF(f32be, "PCM 32 bit floating-point big-endian format",
+PCMDEF(f32be, "PCM 32-bit floating-point big-endian",
NULL, CODEC_ID_PCM_F32BE)
-PCMDEF(f32le, "PCM 32 bit floating-point little-endian format",
+PCMDEF(f32le, "PCM 32-bit floating-point little-endian",
NULL, CODEC_ID_PCM_F32LE)
-PCMDEF(s32be, "PCM signed 32 bit big-endian format",
+PCMDEF(s32be, "PCM signed 32-bit big-endian",
NULL, CODEC_ID_PCM_S32BE)
-PCMDEF(s32le, "PCM signed 32 bit little-endian format",
+PCMDEF(s32le, "PCM signed 32-bit little-endian",
NULL, CODEC_ID_PCM_S32LE)
-PCMDEF(s24be, "PCM signed 24 bit big-endian format",
+PCMDEF(s24be, "PCM signed 24-bit big-endian",
NULL, CODEC_ID_PCM_S24BE)
-PCMDEF(s24le, "PCM signed 24 bit little-endian format",
+PCMDEF(s24le, "PCM signed 24-bit little-endian",
NULL, CODEC_ID_PCM_S24LE)
-PCMDEF(s16be, "PCM signed 16 bit big-endian format",
+PCMDEF(s16be, "PCM signed 16-bit big-endian",
AV_NE("sw", NULL), CODEC_ID_PCM_S16BE)
-PCMDEF(s16le, "PCM signed 16 bit little-endian format",
+PCMDEF(s16le, "PCM signed 16-bit little-endian",
AV_NE(NULL, "sw"), CODEC_ID_PCM_S16LE)
-PCMDEF(s8, "PCM signed 8 bit format",
+PCMDEF(s8, "PCM signed 8-bit",
"sb", CODEC_ID_PCM_S8)
-PCMDEF(u32be, "PCM unsigned 32 bit big-endian format",
+PCMDEF(u32be, "PCM unsigned 32-bit big-endian",
NULL, CODEC_ID_PCM_U32BE)
-PCMDEF(u32le, "PCM unsigned 32 bit little-endian format",
+PCMDEF(u32le, "PCM unsigned 32-bit little-endian",
NULL, CODEC_ID_PCM_U32LE)
-PCMDEF(u24be, "PCM unsigned 24 bit big-endian format",
+PCMDEF(u24be, "PCM unsigned 24-bit big-endian",
NULL, CODEC_ID_PCM_U24BE)
-PCMDEF(u24le, "PCM unsigned 24 bit little-endian format",
+PCMDEF(u24le, "PCM unsigned 24-bit little-endian",
NULL, CODEC_ID_PCM_U24LE)
-PCMDEF(u16be, "PCM unsigned 16 bit big-endian format",
+PCMDEF(u16be, "PCM unsigned 16-bit big-endian",
AV_NE("uw", NULL), CODEC_ID_PCM_U16BE)
-PCMDEF(u16le, "PCM unsigned 16 bit little-endian format",
+PCMDEF(u16le, "PCM unsigned 16-bit little-endian",
AV_NE(NULL, "uw"), CODEC_ID_PCM_U16LE)
-PCMDEF(u8, "PCM unsigned 8 bit format",
+PCMDEF(u8, "PCM unsigned 8-bit",
"ub", CODEC_ID_PCM_U8)
-PCMDEF(alaw, "PCM A-law format",
+PCMDEF(alaw, "PCM A-law",
"al", CODEC_ID_PCM_ALAW)
-PCMDEF(mulaw, "PCM mu-law format",
+PCMDEF(mulaw, "PCM mu-law",
"ul", CODEC_ID_PCM_MULAW)
diff --git a/libavformat/pcmenc.c b/libavformat/pcmenc.c
index 12e64b0fb8..b7877ddd32 100644
--- a/libavformat/pcmenc.c
+++ b/libavformat/pcmenc.c
@@ -33,62 +33,62 @@ AVOutputFormat ff_pcm_ ## name_ ## _muxer = { \
.flags = AVFMT_NOTIMESTAMPS, \
};
-PCMDEF(f64be, "PCM 64 bit floating-point big-endian format",
+PCMDEF(f64be, "PCM 64-bit floating-point big-endian",
NULL, CODEC_ID_PCM_F64BE)
-PCMDEF(f64le, "PCM 64 bit floating-point little-endian format",
+PCMDEF(f64le, "PCM 64-bit floating-point little-endian",
NULL, CODEC_ID_PCM_F64LE)
-PCMDEF(f32be, "PCM 32 bit floating-point big-endian format",
+PCMDEF(f32be, "PCM 32-bit floating-point big-endian",
NULL, CODEC_ID_PCM_F32BE)
-PCMDEF(f32le, "PCM 32 bit floating-point little-endian format",
+PCMDEF(f32le, "PCM 32-bit floating-point little-endian",
NULL, CODEC_ID_PCM_F32LE)
-PCMDEF(s32be, "PCM signed 32 bit big-endian format",
+PCMDEF(s32be, "PCM signed 32-bit big-endian",
NULL, CODEC_ID_PCM_S32BE)
-PCMDEF(s32le, "PCM signed 32 bit little-endian format",
+PCMDEF(s32le, "PCM signed 32-bit little-endian",
NULL, CODEC_ID_PCM_S32LE)
-PCMDEF(s24be, "PCM signed 24 bit big-endian format",
+PCMDEF(s24be, "PCM signed 24-bit big-endian",
NULL, CODEC_ID_PCM_S24BE)
-PCMDEF(s24le, "PCM signed 24 bit little-endian format",
+PCMDEF(s24le, "PCM signed 24-bit little-endian",
NULL, CODEC_ID_PCM_S24LE)
-PCMDEF(s16be, "PCM signed 16 bit big-endian format",
+PCMDEF(s16be, "PCM signed 16-bit big-endian",
AV_NE("sw", NULL), CODEC_ID_PCM_S16BE)
-PCMDEF(s16le, "PCM signed 16 bit little-endian format",
+PCMDEF(s16le, "PCM signed 16-bit little-endian",
AV_NE(NULL, "sw"), CODEC_ID_PCM_S16LE)
-PCMDEF(s8, "PCM signed 8 bit format",
+PCMDEF(s8, "PCM signed 8-bit",
"sb", CODEC_ID_PCM_S8)
-PCMDEF(u32be, "PCM unsigned 32 bit big-endian format",
+PCMDEF(u32be, "PCM unsigned 32-bit big-endian",
NULL, CODEC_ID_PCM_U32BE)
-PCMDEF(u32le, "PCM unsigned 32 bit little-endian format",
+PCMDEF(u32le, "PCM unsigned 32-bit little-endian",
NULL, CODEC_ID_PCM_U32LE)
-PCMDEF(u24be, "PCM unsigned 24 bit big-endian format",
+PCMDEF(u24be, "PCM unsigned 24-bit big-endian",
NULL, CODEC_ID_PCM_U24BE)
-PCMDEF(u24le, "PCM unsigned 24 bit little-endian format",
+PCMDEF(u24le, "PCM unsigned 24-bit little-endian",
NULL, CODEC_ID_PCM_U24LE)
-PCMDEF(u16be, "PCM unsigned 16 bit big-endian format",
+PCMDEF(u16be, "PCM unsigned 16-bit big-endian",
AV_NE("uw", NULL), CODEC_ID_PCM_U16BE)
-PCMDEF(u16le, "PCM unsigned 16 bit little-endian format",
+PCMDEF(u16le, "PCM unsigned 16-bit little-endian",
AV_NE(NULL, "uw"), CODEC_ID_PCM_U16LE)
-PCMDEF(u8, "PCM unsigned 8 bit format",
+PCMDEF(u8, "PCM unsigned 8-bit",
"ub", CODEC_ID_PCM_U8)
-PCMDEF(alaw, "PCM A-law format",
+PCMDEF(alaw, "PCM A-law",
"al", CODEC_ID_PCM_ALAW)
-PCMDEF(mulaw, "PCM mu-law format",
+PCMDEF(mulaw, "PCM mu-law",
"ul", CODEC_ID_PCM_MULAW)
diff --git a/libavformat/pmpdec.c b/libavformat/pmpdec.c
index 315e58c184..593a355b6b 100644
--- a/libavformat/pmpdec.c
+++ b/libavformat/pmpdec.c
@@ -173,7 +173,7 @@ static int pmp_close(AVFormatContext *s)
AVInputFormat ff_pmp_demuxer = {
.name = "pmp",
- .long_name = NULL_IF_CONFIG_SMALL("Playstation Portable PMP format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Playstation Portable PMP"),
.priv_data_size = sizeof(PMPContext),
.read_probe = pmp_probe,
.read_header = pmp_header,
diff --git a/libavformat/psxstr.c b/libavformat/psxstr.c
index ff9b7edceb..b978e01f41 100644
--- a/libavformat/psxstr.c
+++ b/libavformat/psxstr.c
@@ -296,7 +296,7 @@ static int str_read_close(AVFormatContext *s)
AVInputFormat ff_str_demuxer = {
.name = "psxstr",
- .long_name = NULL_IF_CONFIG_SMALL("Sony Playstation STR format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Sony Playstation STR"),
.priv_data_size = sizeof(StrDemuxContext),
.read_probe = str_probe,
.read_header = str_read_header,
diff --git a/libavformat/pva.c b/libavformat/pva.c
index 97efa61e4c..0e1605d326 100644
--- a/libavformat/pva.c
+++ b/libavformat/pva.c
@@ -216,7 +216,7 @@ static int64_t pva_read_timestamp(struct AVFormatContext *s, int stream_index,
AVInputFormat ff_pva_demuxer = {
.name = "pva",
- .long_name = NULL_IF_CONFIG_SMALL("TechnoTrend PVA file and stream format"),
+ .long_name = NULL_IF_CONFIG_SMALL("TechnoTrend PVA"),
.priv_data_size = sizeof(PVAContext),
.read_probe = pva_probe,
.read_header = pva_read_header,
diff --git a/libavformat/qcp.c b/libavformat/qcp.c
index 929fce48e9..4d91c05e6e 100644
--- a/libavformat/qcp.c
+++ b/libavformat/qcp.c
@@ -188,7 +188,7 @@ static int qcp_read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat ff_qcp_demuxer = {
.name = "qcp",
- .long_name = NULL_IF_CONFIG_SMALL("QCP format"),
+ .long_name = NULL_IF_CONFIG_SMALL("QCP"),
.priv_data_size = sizeof(QCPContext),
.read_probe = qcp_probe,
.read_header = qcp_read_header,
diff --git a/libavformat/r3d.c b/libavformat/r3d.c
index 4c32d90af5..bd456baaab 100644
--- a/libavformat/r3d.c
+++ b/libavformat/r3d.c
@@ -396,7 +396,7 @@ static int r3d_close(AVFormatContext *s)
AVInputFormat ff_r3d_demuxer = {
.name = "r3d",
- .long_name = NULL_IF_CONFIG_SMALL("REDCODE R3D format"),
+ .long_name = NULL_IF_CONFIG_SMALL("REDCODE R3D"),
.priv_data_size = sizeof(R3DContext),
.read_probe = r3d_probe,
.read_header = r3d_read_header,
diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c
index 8be3cc999e..d14824839b 100644
--- a/libavformat/rawenc.c
+++ b/libavformat/rawenc.c
@@ -174,7 +174,7 @@ AVOutputFormat ff_h263_muxer = {
#if CONFIG_H264_MUXER
AVOutputFormat ff_h264_muxer = {
.name = "h264",
- .long_name = NULL_IF_CONFIG_SMALL("raw H.264 video format"),
+ .long_name = NULL_IF_CONFIG_SMALL("raw H.264 video"),
.extensions = "h264",
.audio_codec = CODEC_ID_NONE,
.video_codec = CODEC_ID_H264,
@@ -186,7 +186,7 @@ AVOutputFormat ff_h264_muxer = {
#if CONFIG_M4V_MUXER
AVOutputFormat ff_m4v_muxer = {
.name = "m4v",
- .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-4 video format"),
+ .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-4 video"),
.extensions = "m4v",
.audio_codec = CODEC_ID_NONE,
.video_codec = CODEC_ID_MPEG4,
@@ -248,7 +248,7 @@ AVOutputFormat ff_mpeg2video_muxer = {
#if CONFIG_RAWVIDEO_MUXER
AVOutputFormat ff_rawvideo_muxer = {
.name = "rawvideo",
- .long_name = NULL_IF_CONFIG_SMALL("raw video format"),
+ .long_name = NULL_IF_CONFIG_SMALL("raw video"),
.extensions = "yuv,rgb",
.audio_codec = CODEC_ID_NONE,
.video_codec = CODEC_ID_RAWVIDEO,
diff --git a/libavformat/rawvideodec.c b/libavformat/rawvideodec.c
index da80ae9c19..c349a5338f 100644
--- a/libavformat/rawvideodec.c
+++ b/libavformat/rawvideodec.c
@@ -62,7 +62,7 @@ static const AVClass rawvideo_demuxer_class = {
AVInputFormat ff_rawvideo_demuxer = {
.name = "rawvideo",
- .long_name = NULL_IF_CONFIG_SMALL("raw video format"),
+ .long_name = NULL_IF_CONFIG_SMALL("raw video"),
.priv_data_size = sizeof(FFRawVideoDemuxerContext),
.read_header = ff_raw_read_header,
.read_packet = rawvideo_read_packet,
diff --git a/libavformat/rl2.c b/libavformat/rl2.c
index fbf52f4660..e9c961b3f1 100644
--- a/libavformat/rl2.c
+++ b/libavformat/rl2.c
@@ -289,7 +289,7 @@ static int rl2_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
AVInputFormat ff_rl2_demuxer = {
.name = "rl2",
- .long_name = NULL_IF_CONFIG_SMALL("RL2 format"),
+ .long_name = NULL_IF_CONFIG_SMALL("RL2"),
.priv_data_size = sizeof(Rl2DemuxContext),
.read_probe = rl2_probe,
.read_header = rl2_read_header,
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 24d80c820c..cce43319c1 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -989,7 +989,7 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index,
AVInputFormat ff_rm_demuxer = {
.name = "rm",
- .long_name = NULL_IF_CONFIG_SMALL("RealMedia format"),
+ .long_name = NULL_IF_CONFIG_SMALL("RealMedia"),
.priv_data_size = sizeof(RMDemuxContext),
.read_probe = rm_probe,
.read_header = rm_read_header,
diff --git a/libavformat/rmenc.c b/libavformat/rmenc.c
index 3919ee9219..390b7f6215 100644
--- a/libavformat/rmenc.c
+++ b/libavformat/rmenc.c
@@ -467,7 +467,7 @@ static int rm_write_trailer(AVFormatContext *s)
AVOutputFormat ff_rm_muxer = {
.name = "rm",
- .long_name = NULL_IF_CONFIG_SMALL("RealMedia format"),
+ .long_name = NULL_IF_CONFIG_SMALL("RealMedia"),
.mime_type = "application/vnd.rn-realmedia",
.extensions = "rm,ra",
.priv_data_size = sizeof(RMMuxContext),
diff --git a/libavformat/rpl.c b/libavformat/rpl.c
index c1c66b77b4..96af67d521 100644
--- a/libavformat/rpl.c
+++ b/libavformat/rpl.c
@@ -351,7 +351,7 @@ static int rpl_read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat ff_rpl_demuxer = {
.name = "rpl",
- .long_name = NULL_IF_CONFIG_SMALL("RPL/ARMovie format"),
+ .long_name = NULL_IF_CONFIG_SMALL("RPL / ARMovie"),
.priv_data_size = sizeof(RPLContext),
.read_probe = rpl_probe,
.read_header = rpl_read_header,
diff --git a/libavformat/rsodec.c b/libavformat/rsodec.c
index 3fa85be163..e07d5f5179 100644
--- a/libavformat/rsodec.c
+++ b/libavformat/rsodec.c
@@ -88,7 +88,7 @@ static int rso_read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat ff_rso_demuxer = {
.name = "rso",
- .long_name = NULL_IF_CONFIG_SMALL("Lego Mindstorms RSO format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Lego Mindstorms RSO"),
.extensions = "rso",
.read_header = rso_read_header,
.read_packet = rso_read_packet,
diff --git a/libavformat/rsoenc.c b/libavformat/rsoenc.c
index ef4350b970..3d18c6022f 100644
--- a/libavformat/rsoenc.c
+++ b/libavformat/rsoenc.c
@@ -102,7 +102,7 @@ static int rso_write_trailer(AVFormatContext *s)
AVOutputFormat ff_rso_muxer = {
.name = "rso",
- .long_name = NULL_IF_CONFIG_SMALL("Lego Mindstorms RSO format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Lego Mindstorms RSO"),
.extensions = "rso",
.audio_codec = CODEC_ID_PCM_U8,
.video_codec = CODEC_ID_NONE,
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index 0a3071d190..bda43a095c 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -546,7 +546,7 @@ static int rtp_write_trailer(AVFormatContext *s1)
AVOutputFormat ff_rtp_muxer = {
.name = "rtp",
- .long_name = NULL_IF_CONFIG_SMALL("RTP output format"),
+ .long_name = NULL_IF_CONFIG_SMALL("RTP output"),
.priv_data_size = sizeof(RTPMuxContext),
.audio_codec = CODEC_ID_PCM_MULAW,
.video_codec = CODEC_ID_MPEG4,
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index cbcda2e71d..7c6e24e107 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -2076,7 +2076,7 @@ static const AVClass rtp_demuxer_class = {
AVInputFormat ff_rtp_demuxer = {
.name = "rtp",
- .long_name = NULL_IF_CONFIG_SMALL("RTP input format"),
+ .long_name = NULL_IF_CONFIG_SMALL("RTP input"),
.priv_data_size = sizeof(RTSPState),
.read_probe = rtp_probe,
.read_header = rtp_read_header,
diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
index f642a56644..856be56788 100644
--- a/libavformat/rtspdec.c
+++ b/libavformat/rtspdec.c
@@ -919,7 +919,7 @@ static const AVClass rtsp_demuxer_class = {
AVInputFormat ff_rtsp_demuxer = {
.name = "rtsp",
- .long_name = NULL_IF_CONFIG_SMALL("RTSP input format"),
+ .long_name = NULL_IF_CONFIG_SMALL("RTSP input"),
.priv_data_size = sizeof(RTSPState),
.read_probe = rtsp_probe,
.read_header = rtsp_read_header,
diff --git a/libavformat/rtspenc.c b/libavformat/rtspenc.c
index 927dd38d56..b89eb02956 100644
--- a/libavformat/rtspenc.c
+++ b/libavformat/rtspenc.c
@@ -235,7 +235,7 @@ static int rtsp_write_close(AVFormatContext *s)
AVOutputFormat ff_rtsp_muxer = {
.name = "rtsp",
- .long_name = NULL_IF_CONFIG_SMALL("RTSP output format"),
+ .long_name = NULL_IF_CONFIG_SMALL("RTSP output"),
.priv_data_size = sizeof(RTSPState),
.audio_codec = CODEC_ID_AAC,
.video_codec = CODEC_ID_MPEG4,
diff --git a/libavformat/sapdec.c b/libavformat/sapdec.c
index 4626af7410..ed3e8578d5 100644
--- a/libavformat/sapdec.c
+++ b/libavformat/sapdec.c
@@ -227,7 +227,7 @@ static int sap_fetch_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat ff_sap_demuxer = {
.name = "sap",
- .long_name = NULL_IF_CONFIG_SMALL("SAP input format"),
+ .long_name = NULL_IF_CONFIG_SMALL("SAP input"),
.priv_data_size = sizeof(struct SAPState),
.read_probe = sap_probe,
.read_header = sap_read_header,
diff --git a/libavformat/sapenc.c b/libavformat/sapenc.c
index c1d8db3761..ba5ce1baeb 100644
--- a/libavformat/sapenc.c
+++ b/libavformat/sapenc.c
@@ -254,7 +254,7 @@ static int sap_write_packet(AVFormatContext *s, AVPacket *pkt)
AVOutputFormat ff_sap_muxer = {
.name = "sap",
- .long_name = NULL_IF_CONFIG_SMALL("SAP output format"),
+ .long_name = NULL_IF_CONFIG_SMALL("SAP output"),
.priv_data_size = sizeof(struct SAPState),
.audio_codec = CODEC_ID_AAC,
.video_codec = CODEC_ID_MPEG4,
diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c
index 9c171f0b50..dea1afa3f0 100644
--- a/libavformat/segafilm.c
+++ b/libavformat/segafilm.c
@@ -327,7 +327,7 @@ static int film_read_close(AVFormatContext *s)
AVInputFormat ff_segafilm_demuxer = {
.name = "film_cpk",
- .long_name = NULL_IF_CONFIG_SMALL("Sega FILM/CPK format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Sega FILM / CPK"),
.priv_data_size = sizeof(FilmDemuxContext),
.read_probe = film_probe,
.read_header = film_read_header,
diff --git a/libavformat/sierravmd.c b/libavformat/sierravmd.c
index 18bcb38bbf..cdeb1740ca 100644
--- a/libavformat/sierravmd.c
+++ b/libavformat/sierravmd.c
@@ -285,7 +285,7 @@ static int vmd_read_close(AVFormatContext *s)
AVInputFormat ff_vmd_demuxer = {
.name = "vmd",
- .long_name = NULL_IF_CONFIG_SMALL("Sierra VMD format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Sierra VMD"),
.priv_data_size = sizeof(VmdDemuxContext),
.read_probe = vmd_probe,
.read_header = vmd_read_header,
diff --git a/libavformat/sol.c b/libavformat/sol.c
index 8650f0b355..7df107a946 100644
--- a/libavformat/sol.c
+++ b/libavformat/sol.c
@@ -140,7 +140,7 @@ static int sol_read_packet(AVFormatContext *s,
AVInputFormat ff_sol_demuxer = {
.name = "sol",
- .long_name = NULL_IF_CONFIG_SMALL("Sierra SOL format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Sierra SOL"),
.read_probe = sol_probe,
.read_header = sol_read_header,
.read_packet = sol_read_packet,
diff --git a/libavformat/soxdec.c b/libavformat/soxdec.c
index 46b07b73c8..fe59fd47a2 100644
--- a/libavformat/soxdec.c
+++ b/libavformat/soxdec.c
@@ -146,7 +146,7 @@ static int sox_read_packet(AVFormatContext *s,
AVInputFormat ff_sox_demuxer = {
.name = "sox",
- .long_name = NULL_IF_CONFIG_SMALL("SoX native format"),
+ .long_name = NULL_IF_CONFIG_SMALL("SoX native"),
.read_probe = sox_probe,
.read_header = sox_read_header,
.read_packet = sox_read_packet,
diff --git a/libavformat/soxenc.c b/libavformat/soxenc.c
index 811cb0e97d..e68b7e568f 100644
--- a/libavformat/soxenc.c
+++ b/libavformat/soxenc.c
@@ -117,7 +117,7 @@ static int sox_write_trailer(AVFormatContext *s)
AVOutputFormat ff_sox_muxer = {
.name = "sox",
- .long_name = NULL_IF_CONFIG_SMALL("SoX native format"),
+ .long_name = NULL_IF_CONFIG_SMALL("SoX native"),
.extensions = "sox",
.priv_data_size = sizeof(SoXContext),
.audio_codec = CODEC_ID_PCM_S32LE,
diff --git a/libavformat/srtdec.c b/libavformat/srtdec.c
index 9cd393ef7f..8eba5abf9a 100644
--- a/libavformat/srtdec.c
+++ b/libavformat/srtdec.c
@@ -94,7 +94,7 @@ static int srt_read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat ff_srt_demuxer = {
.name = "srt",
- .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle format"),
+ .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"),
.read_probe = srt_probe,
.read_header = srt_read_header,
.read_packet = srt_read_packet,
diff --git a/libavformat/srtenc.c b/libavformat/srtenc.c
index b8fc8fac7e..171c45b445 100644
--- a/libavformat/srtenc.c
+++ b/libavformat/srtenc.c
@@ -88,7 +88,7 @@ static int srt_write_packet(AVFormatContext *avf, AVPacket *pkt)
AVOutputFormat ff_srt_muxer = {
.name = "srt",
- .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle format"),
+ .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"),
.mime_type = "application/x-subrip",
.extensions = "srt",
.priv_data_size = sizeof(SRTContext),
diff --git a/libavformat/tiertexseq.c b/libavformat/tiertexseq.c
index a0c06deab6..f7a9ff3bb3 100644
--- a/libavformat/tiertexseq.c
+++ b/libavformat/tiertexseq.c
@@ -306,7 +306,7 @@ static int seq_read_close(AVFormatContext *s)
AVInputFormat ff_tiertexseq_demuxer = {
.name = "tiertexseq",
- .long_name = NULL_IF_CONFIG_SMALL("Tiertex Limited SEQ format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Tiertex Limited SEQ"),
.priv_data_size = sizeof(SeqDemuxContext),
.read_probe = seq_probe,
.read_header = seq_read_header,
diff --git a/libavformat/vc1test.c b/libavformat/vc1test.c
index 1b662af5bb..1f1ec222b7 100644
--- a/libavformat/vc1test.c
+++ b/libavformat/vc1test.c
@@ -111,7 +111,7 @@ static int vc1t_read_packet(AVFormatContext *s,
AVInputFormat ff_vc1t_demuxer = {
.name = "vc1test",
- .long_name = NULL_IF_CONFIG_SMALL("VC-1 test bitstream format"),
+ .long_name = NULL_IF_CONFIG_SMALL("VC-1 test bitstream"),
.read_probe = vc1t_probe,
.read_header = vc1t_read_header,
.read_packet = vc1t_read_packet,
diff --git a/libavformat/vocdec.c b/libavformat/vocdec.c
index 8060864406..91e787ea10 100644
--- a/libavformat/vocdec.c
+++ b/libavformat/vocdec.c
@@ -166,7 +166,7 @@ static int voc_read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat ff_voc_demuxer = {
.name = "voc",
- .long_name = NULL_IF_CONFIG_SMALL("Creative Voice file format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Creative Voice"),
.priv_data_size = sizeof(VocDecContext),
.read_probe = voc_probe,
.read_header = voc_read_header,
diff --git a/libavformat/vocenc.c b/libavformat/vocenc.c
index 4e382bf26f..5deda78579 100644
--- a/libavformat/vocenc.c
+++ b/libavformat/vocenc.c
@@ -91,7 +91,7 @@ static int voc_write_trailer(AVFormatContext *s)
AVOutputFormat ff_voc_muxer = {
.name = "voc",
- .long_name = NULL_IF_CONFIG_SMALL("Creative Voice file format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Creative Voice"),
.mime_type = "audio/x-voc",
.extensions = "voc",
.priv_data_size = sizeof(VocEncContext),
diff --git a/libavformat/wav.c b/libavformat/wav.c
index cb0f7bbd1b..749b2c5808 100644
--- a/libavformat/wav.c
+++ b/libavformat/wav.c
@@ -788,7 +788,7 @@ static int w64_read_header(AVFormatContext *s)
AVInputFormat ff_w64_demuxer = {
.name = "w64",
- .long_name = NULL_IF_CONFIG_SMALL("Sony Wave64 format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Sony Wave64"),
.priv_data_size = sizeof(WAVContext),
.read_probe = w64_probe,
.read_header = w64_read_header,
diff --git a/libavformat/wc3movie.c b/libavformat/wc3movie.c
index d79d7687f4..45bdde0c57 100644
--- a/libavformat/wc3movie.c
+++ b/libavformat/wc3movie.c
@@ -293,7 +293,7 @@ static int wc3_read_close(AVFormatContext *s)
AVInputFormat ff_wc3_demuxer = {
.name = "wc3movie",
- .long_name = NULL_IF_CONFIG_SMALL("Wing Commander III movie format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Wing Commander III movie"),
.priv_data_size = sizeof(Wc3DemuxContext),
.read_probe = wc3_probe,
.read_header = wc3_read_header,
diff --git a/libavformat/westwood_aud.c b/libavformat/westwood_aud.c
index 37d3ced94f..6dee8b535f 100644
--- a/libavformat/westwood_aud.c
+++ b/libavformat/westwood_aud.c
@@ -173,7 +173,7 @@ static int wsaud_read_packet(AVFormatContext *s,
AVInputFormat ff_wsaud_demuxer = {
.name = "wsaud",
- .long_name = NULL_IF_CONFIG_SMALL("Westwood Studios audio format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Westwood Studios audio"),
.read_probe = wsaud_probe,
.read_header = wsaud_read_header,
.read_packet = wsaud_read_packet,
diff --git a/libavformat/westwood_vqa.c b/libavformat/westwood_vqa.c
index c3bd0df6a9..89a985605e 100644
--- a/libavformat/westwood_vqa.c
+++ b/libavformat/westwood_vqa.c
@@ -268,7 +268,7 @@ static int wsvqa_read_packet(AVFormatContext *s,
AVInputFormat ff_wsvqa_demuxer = {
.name = "wsvqa",
- .long_name = NULL_IF_CONFIG_SMALL("Westwood Studios VQA format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Westwood Studios VQA"),
.priv_data_size = sizeof(WsVqaDemuxContext),
.read_probe = wsvqa_probe,
.read_header = wsvqa_read_header,
diff --git a/libavformat/wv.c b/libavformat/wv.c
index a80cad776d..cc01ff16f4 100644
--- a/libavformat/wv.c
+++ b/libavformat/wv.c
@@ -36,7 +36,7 @@
#define WV_END_BLOCK 0x1000
#define WV_SINGLE_BLOCK (WV_START_BLOCK | WV_END_BLOCK)
-enum WV_FLAGS{
+enum WV_FLAGS {
WV_MONO = 0x0004,
WV_HYBRID = 0x0008,
WV_JOINT = 0x0010,
@@ -51,11 +51,11 @@ enum WV_FLAGS{
};
static const int wv_rates[16] = {
- 6000, 8000, 9600, 11025, 12000, 16000, 22050, 24000,
- 32000, 44100, 48000, 64000, 88200, 96000, 192000, -1
+ 6000, 8000, 9600, 11025, 12000, 16000, 22050, 24000,
+ 32000, 44100, 48000, 64000, 88200, 96000, 192000, -1
};
-typedef struct{
+typedef struct {
uint32_t blksize, flags;
int rate, chan, bpp;
uint32_t chmask;
@@ -64,7 +64,7 @@ typedef struct{
int block_parsed;
uint8_t extra[WV_EXTRA_SIZE];
int64_t pos;
-}WVContext;
+} WVContext;
static int wv_probe(AVProbeData *p)
{
@@ -78,7 +78,8 @@ static int wv_probe(AVProbeData *p)
return 0;
}
-static int wv_read_block_header(AVFormatContext *ctx, AVIOContext *pb, int append)
+static int wv_read_block_header(AVFormatContext *ctx, AVIOContext *pb,
+ int append)
{
WVContext *wc = ctx->priv_data;
uint32_t tag, ver;
@@ -87,64 +88,67 @@ static int wv_read_block_header(AVFormatContext *ctx, AVIOContext *pb, int appen
uint32_t chmask;
wc->pos = avio_tell(pb);
- if(!append){
+ if (!append) {
tag = avio_rl32(pb);
if (tag != MKTAG('w', 'v', 'p', 'k'))
return AVERROR_INVALIDDATA;
size = avio_rl32(pb);
- if(size < 24 || size > WV_BLOCK_LIMIT){
+ if (size < 24 || size > WV_BLOCK_LIMIT) {
av_log(ctx, AV_LOG_ERROR, "Incorrect block size %i\n", size);
return AVERROR_INVALIDDATA;
}
wc->blksize = size;
ver = avio_rl16(pb);
- if(ver < 0x402 || ver > 0x410){
+ if (ver < 0x402 || ver > 0x410) {
av_log(ctx, AV_LOG_ERROR, "Unsupported version %03X\n", ver);
return AVERROR_PATCHWELCOME;
}
avio_r8(pb); // track no
avio_r8(pb); // track sub index
wc->samples = avio_rl32(pb); // total samples in file
- wc->soff = avio_rl32(pb); // offset in samples of current block
+ wc->soff = avio_rl32(pb); // offset in samples of current block
avio_read(pb, wc->extra, WV_EXTRA_SIZE);
- }else{
+ } else {
size = wc->blksize;
}
wc->flags = AV_RL32(wc->extra + 4);
- // blocks with zero samples don't contain actual audio information and should be ignored
+ /* Blocks with zero samples don't contain actual audio information
+ * and should be ignored */
if (!AV_RN32(wc->extra))
return 0;
- //parse flags
- bpp = ((wc->flags & 3) + 1) << 3;
- chan = 1 + !(wc->flags & WV_MONO);
+ // parse flags
+ bpp = ((wc->flags & 3) + 1) << 3;
+ chan = 1 + !(wc->flags & WV_MONO);
chmask = wc->flags & WV_MONO ? AV_CH_LAYOUT_MONO : AV_CH_LAYOUT_STEREO;
- rate = wv_rates[(wc->flags >> 23) & 0xF];
+ rate = wv_rates[(wc->flags >> 23) & 0xF];
wc->multichannel = !!((wc->flags & WV_SINGLE_BLOCK) != WV_SINGLE_BLOCK);
- if(wc->multichannel){
- chan = wc->chan;
+ if (wc->multichannel) {
+ chan = wc->chan;
chmask = wc->chmask;
}
- if((rate == -1 || !chan) && !wc->block_parsed){
+ if ((rate == -1 || !chan) && !wc->block_parsed) {
int64_t block_end = avio_tell(pb) + wc->blksize - 24;
- if(!pb->seekable){
- av_log(ctx, AV_LOG_ERROR, "Cannot determine additional parameters\n");
+ if (!pb->seekable) {
+ av_log(ctx, AV_LOG_ERROR,
+ "Cannot determine additional parameters\n");
return AVERROR_INVALIDDATA;
}
- while(avio_tell(pb) < block_end){
+ while (avio_tell(pb) < block_end) {
int id, size;
- id = avio_r8(pb);
+ id = avio_r8(pb);
size = (id & 0x80) ? avio_rl24(pb) : avio_r8(pb);
size <<= 1;
- if(id&0x40)
+ if (id & 0x40)
size--;
- switch(id&0x3F){
+ switch (id & 0x3F) {
case 0xD:
- if(size <= 1){
- av_log(ctx, AV_LOG_ERROR, "Insufficient channel information\n");
+ if (size <= 1) {
+ av_log(ctx, AV_LOG_ERROR,
+ "Insufficient channel information\n");
return AVERROR_INVALIDDATA;
}
chan = avio_r8(pb);
- switch(size - 2){
+ switch (size - 2) {
case 0:
chmask = avio_r8(pb);
break;
@@ -159,11 +163,12 @@ static int wv_read_block_header(AVFormatContext *ctx, AVIOContext *pb, int appen
break;
case 5:
avio_skip(pb, 1);
- chan |= (avio_r8(pb) & 0xF) << 8;
+ chan |= (avio_r8(pb) & 0xF) << 8;
chmask = avio_rl24(pb);
break;
default:
- av_log(ctx, AV_LOG_ERROR, "Invalid channel info size %d\n", size);
+ av_log(ctx, AV_LOG_ERROR,
+ "Invalid channel info size %d\n", size);
return AVERROR_INVALIDDATA;
}
break;
@@ -173,30 +178,41 @@ static int wv_read_block_header(AVFormatContext *ctx, AVIOContext *pb, int appen
default:
avio_skip(pb, size);
}
- if(id&0x40)
+ if (id & 0x40)
avio_skip(pb, 1);
}
- if(rate == -1){
- av_log(ctx, AV_LOG_ERROR, "Cannot determine custom sampling rate\n");
+ if (rate == -1) {
+ av_log(ctx, AV_LOG_ERROR,
+ "Cannot determine custom sampling rate\n");
return AVERROR_INVALIDDATA;
}
avio_seek(pb, block_end - wc->blksize + 24, SEEK_SET);
}
- if(!wc->bpp) wc->bpp = bpp;
- if(!wc->chan) wc->chan = chan;
- if(!wc->chmask) wc->chmask = chmask;
- if(!wc->rate) wc->rate = rate;
+ if (!wc->bpp)
+ wc->bpp = bpp;
+ if (!wc->chan)
+ wc->chan = chan;
+ if (!wc->chmask)
+ wc->chmask = chmask;
+ if (!wc->rate)
+ wc->rate = rate;
- if(wc->flags && bpp != wc->bpp){
- av_log(ctx, AV_LOG_ERROR, "Bits per sample differ, this block: %i, header block: %i\n", bpp, wc->bpp);
+ if (wc->flags && bpp != wc->bpp) {
+ av_log(ctx, AV_LOG_ERROR,
+ "Bits per sample differ, this block: %i, header block: %i\n",
+ bpp, wc->bpp);
return AVERROR_INVALIDDATA;
}
- if(wc->flags && !wc->multichannel && chan != wc->chan){
- av_log(ctx, AV_LOG_ERROR, "Channels differ, this block: %i, header block: %i\n", chan, wc->chan);
+ if (wc->flags && !wc->multichannel && chan != wc->chan) {
+ av_log(ctx, AV_LOG_ERROR,
+ "Channels differ, this block: %i, header block: %i\n",
+ chan, wc->chan);
return AVERROR_INVALIDDATA;
}
- if(wc->flags && rate != -1 && rate != wc->rate){
- av_log(ctx, AV_LOG_ERROR, "Sampling rate differ, this block: %i, header block: %i\n", rate, wc->rate);
+ if (wc->flags && rate != -1 && rate != wc->rate) {
+ av_log(ctx, AV_LOG_ERROR,
+ "Sampling rate differ, this block: %i, header block: %i\n",
+ rate, wc->rate);
return AVERROR_INVALIDDATA;
}
wc->blksize = size - 24;
@@ -211,10 +227,10 @@ static int wv_read_header(AVFormatContext *s)
int ret;
wc->block_parsed = 0;
- for(;;){
+ for (;;) {
if ((ret = wv_read_block_header(s, pb, 0)) < 0)
return ret;
- if(!AV_RN32(wc->extra))
+ if (!AV_RN32(wc->extra))
avio_skip(pb, wc->blksize - 24);
else
break;
@@ -224,20 +240,20 @@ static int wv_read_header(AVFormatContext *s)
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
- st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_WAVPACK;
- st->codec->channels = wc->chan;
- st->codec->channel_layout = wc->chmask;
- st->codec->sample_rate = wc->rate;
+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
+ st->codec->codec_id = CODEC_ID_WAVPACK;
+ st->codec->channels = wc->chan;
+ st->codec->channel_layout = wc->chmask;
+ st->codec->sample_rate = wc->rate;
st->codec->bits_per_coded_sample = wc->bpp;
avpriv_set_pts_info(st, 64, 1, wc->rate);
st->start_time = 0;
- st->duration = wc->samples;
+ st->duration = wc->samples;
- if(s->pb->seekable) {
+ if (s->pb->seekable) {
int64_t cur = avio_tell(s->pb);
ff_ape_parse_tag(s);
- if(!av_dict_get(s->metadata, "", NULL, AV_DICT_IGNORE_SUFFIX))
+ if (!av_dict_get(s->metadata, "", NULL, AV_DICT_IGNORE_SUFFIX))
ff_id3v1_read(s);
avio_seek(s->pb, cur, SEEK_SET);
}
@@ -245,8 +261,7 @@ static int wv_read_header(AVFormatContext *s)
return 0;
}
-static int wv_read_packet(AVFormatContext *s,
- AVPacket *pkt)
+static int wv_read_packet(AVFormatContext *s, AVPacket *pkt)
{
WVContext *wc = s->priv_data;
int ret;
@@ -256,41 +271,41 @@ static int wv_read_packet(AVFormatContext *s,
if (url_feof(s->pb))
return AVERROR_EOF;
- if(wc->block_parsed){
+ if (wc->block_parsed) {
if ((ret = wv_read_block_header(s, s->pb, 0)) < 0)
return ret;
}
pos = wc->pos;
off = wc->multichannel ? 4 : 0;
- if(av_new_packet(pkt, wc->blksize + WV_EXTRA_SIZE + off) < 0)
+ if (av_new_packet(pkt, wc->blksize + WV_EXTRA_SIZE + off) < 0)
return AVERROR(ENOMEM);
- if(wc->multichannel)
+ if (wc->multichannel)
AV_WL32(pkt->data, wc->blksize + WV_EXTRA_SIZE + 12);
memcpy(pkt->data + off, wc->extra, WV_EXTRA_SIZE);
ret = avio_read(s->pb, pkt->data + WV_EXTRA_SIZE + off, wc->blksize);
- if(ret != wc->blksize){
+ if (ret != wc->blksize) {
av_free_packet(pkt);
return AVERROR(EIO);
}
- while(!(wc->flags & WV_END_BLOCK)){
- if(avio_rl32(s->pb) != MKTAG('w', 'v', 'p', 'k')){
+ while (!(wc->flags & WV_END_BLOCK)) {
+ if (avio_rl32(s->pb) != MKTAG('w', 'v', 'p', 'k')) {
av_free_packet(pkt);
return AVERROR_INVALIDDATA;
}
- if((ret = av_append_packet(s->pb, pkt, 4)) < 0){
+ if ((ret = av_append_packet(s->pb, pkt, 4)) < 0) {
av_free_packet(pkt);
return ret;
}
size = AV_RL32(pkt->data + pkt->size - 4);
- if(size < 24 || size > WV_BLOCK_LIMIT){
+ if (size < 24 || size > WV_BLOCK_LIMIT) {
av_free_packet(pkt);
av_log(s, AV_LOG_ERROR, "Incorrect block size %d\n", size);
return AVERROR_INVALIDDATA;
}
wc->blksize = size;
- ver = avio_rl16(s->pb);
- if(ver < 0x402 || ver > 0x410){
+ ver = avio_rl16(s->pb);
+ if (ver < 0x402 || ver > 0x410) {
av_free_packet(pkt);
av_log(s, AV_LOG_ERROR, "Unsupported version %03X\n", ver);
return AVERROR_PATCHWELCOME;
@@ -298,29 +313,30 @@ static int wv_read_packet(AVFormatContext *s,
avio_r8(s->pb); // track no
avio_r8(s->pb); // track sub index
wc->samples = avio_rl32(s->pb); // total samples in file
- wc->soff = avio_rl32(s->pb); // offset in samples of current block
- if((ret = av_append_packet(s->pb, pkt, WV_EXTRA_SIZE)) < 0){
+ wc->soff = avio_rl32(s->pb); // offset in samples of current block
+ if ((ret = av_append_packet(s->pb, pkt, WV_EXTRA_SIZE)) < 0) {
av_free_packet(pkt);
return ret;
}
memcpy(wc->extra, pkt->data + pkt->size - WV_EXTRA_SIZE, WV_EXTRA_SIZE);
- if ((ret = wv_read_block_header(s, s->pb, 1)) < 0){
+ if ((ret = wv_read_block_header(s, s->pb, 1)) < 0) {
av_free_packet(pkt);
return ret;
}
ret = av_append_packet(s->pb, pkt, wc->blksize);
- if(ret < 0){
+ if (ret < 0) {
av_free_packet(pkt);
return ret;
}
}
pkt->stream_index = 0;
- wc->block_parsed = 1;
- pkt->pts = wc->soff;
- block_samples = AV_RN32(wc->extra);
+ wc->block_parsed = 1;
+ pkt->pts = wc->soff;
+ block_samples = AV_RN32(wc->extra);
if (block_samples > INT32_MAX)
- av_log(s, AV_LOG_WARNING, "Too many samples in block: %"PRIu32"\n", block_samples);
+ av_log(s, AV_LOG_WARNING,
+ "Too many samples in block: %"PRIu32"\n", block_samples);
else
pkt->duration = block_samples;
@@ -328,9 +344,10 @@ static int wv_read_packet(AVFormatContext *s,
return 0;
}
-static int wv_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
+static int wv_read_seek(AVFormatContext *s, int stream_index,
+ int64_t timestamp, int flags)
{
- AVStream *st = s->streams[stream_index];
+ AVStream *st = s->streams[stream_index];
WVContext *wc = s->priv_data;
AVPacket pkt1, *pkt = &pkt1;
int ret;
@@ -345,19 +362,19 @@ static int wv_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp,
return 0;
}
/* if timestamp is out of bounds, return error */
- if(timestamp < 0 || timestamp >= s->duration)
+ if (timestamp < 0 || timestamp >= s->duration)
return AVERROR(EINVAL);
pos = avio_tell(s->pb);
- do{
+ do {
ret = av_read_frame(s, pkt);
- if (ret < 0){
+ if (ret < 0) {
avio_seek(s->pb, pos, SEEK_SET);
return ret;
}
pts = pkt->pts;
av_free_packet(pkt);
- }while(pts < timestamp);
+ } while(pts < timestamp);
return 0;
}
diff --git a/libavformat/xa.c b/libavformat/xa.c
index c54d7f8b9c..f9d9f47ba3 100644
--- a/libavformat/xa.c
+++ b/libavformat/xa.c
@@ -120,7 +120,7 @@ static int xa_read_packet(AVFormatContext *s,
AVInputFormat ff_xa_demuxer = {
.name = "xa",
- .long_name = NULL_IF_CONFIG_SMALL("Maxis XA File Format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Maxis XA"),
.priv_data_size = sizeof(MaxisXADemuxContext),
.read_probe = xa_probe,
.read_header = xa_read_header,
diff --git a/libavformat/yop.c b/libavformat/yop.c
index c7d3f65192..7fd28af0e2 100644
--- a/libavformat/yop.c
+++ b/libavformat/yop.c
@@ -211,7 +211,7 @@ static int yop_read_seek(AVFormatContext *s, int stream_index,
AVInputFormat ff_yop_demuxer = {
.name = "yop",
- .long_name = NULL_IF_CONFIG_SMALL("Psygnosis YOP Format"),
+ .long_name = NULL_IF_CONFIG_SMALL("Psygnosis YOP"),
.priv_data_size = sizeof(YopDecContext),
.read_probe = yop_probe,
.read_header = yop_read_header,
diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c
index 21967505d9..547b0dfcc0 100644
--- a/libavformat/yuv4mpeg.c
+++ b/libavformat/yuv4mpeg.c
@@ -266,7 +266,7 @@ static int yuv4_write_header(AVFormatContext *s)
AVOutputFormat ff_yuv4mpegpipe_muxer = {
.name = "yuv4mpegpipe",
- .long_name = NULL_IF_CONFIG_SMALL("YUV4MPEG pipe format"),
+ .long_name = NULL_IF_CONFIG_SMALL("YUV4MPEG pipe"),
.extensions = "y4m",
.priv_data_size = sizeof(int),
.audio_codec = CODEC_ID_NONE,
@@ -543,7 +543,7 @@ static int yuv4_probe(AVProbeData *pd)
#if CONFIG_YUV4MPEGPIPE_DEMUXER
AVInputFormat ff_yuv4mpegpipe_demuxer = {
.name = "yuv4mpegpipe",
- .long_name = NULL_IF_CONFIG_SMALL("YUV4MPEG pipe format"),
+ .long_name = NULL_IF_CONFIG_SMALL("YUV4MPEG pipe"),
.priv_data_size = sizeof(struct frame_attributes),
.read_probe = yuv4_probe,
.read_header = yuv4_read_header,
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 8c4c934dd0..5a28ce1d58 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -663,7 +663,7 @@ static int swScale(SwsContext *c, const uint8_t *src[],
if (isPlanar(dstFormat) && isALPHA(dstFormat) && !alpPixBuf)
fillPlane(dst[3], dstStride[3], dstW, dstY - lastDstY, lastDstY, 255);
-#if HAVE_MMX2
+#if HAVE_MMX2 && HAVE_INLINE_ASM
if (av_get_cpu_flags() & AV_CPU_FLAG_MMX2)
__asm__ volatile ("sfence" ::: "memory");
#endif
diff --git a/tests/fate/filter.mak b/tests/fate/filter.mak
index c3e368cc24..73b317b347 100644
--- a/tests/fate/filter.mak
+++ b/tests/fate/filter.mak
@@ -16,6 +16,7 @@ $(FATE_AMIX): tests/data/asynth-44100-2.wav tests/data/asynth-44100-2-2.wav
$(FATE_AMIX): SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav
$(FATE_AMIX): SRC1 = $(TARGET_PATH)/tests/data/asynth-44100-2-2.wav
$(FATE_AMIX): CMP = oneoff
+$(FATE_AMIX): CMP_UNIT = f32
FATE_FILTER += $(FATE_AMIX)
FATE_SAMPLES_AVCONV += $(FATE_AMIX)
diff --git a/tests/tiny_psnr.c b/tests/tiny_psnr.c
index 4f307b02b2..b4d05d300d 100644
--- a/tests/tiny_psnr.c
+++ b/tests/tiny_psnr.c
@@ -24,6 +24,8 @@
#include <inttypes.h>
#include <assert.h>
+#include "libavutil/intfloat.h"
+
#define FFMIN(a, b) ((a) > (b) ? (b) : (a))
#define F 100
#define SIZE 2048
@@ -103,6 +105,23 @@ static uint64_t int_sqrt(uint64_t a)
return ret;
}
+static int16_t get_s16l(uint8_t *p)
+{
+ union {
+ uint16_t u;
+ int16_t s;
+ } v;
+ v.u = p[0] | p[1] << 8;
+ return v.s;
+}
+
+static float get_f32l(uint8_t *p)
+{
+ union av_intfloat32 v;
+ v.i = p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24;
+ return v.f;
+}
+
static int run_psnr(FILE *f[2], int len, int shift, int skip_bytes)
{
int i, j;
@@ -149,13 +168,19 @@ static int run_psnr(FILE *f[2], int len, int shift, int skip_bytes)
int s0 = fread(buf[0], 1, SIZE, f[0]);
int s1 = fread(buf[1], 1, SIZE, f[1]);
- for (j = 0; j < FFMIN(s0, s1); j++) {
+ for (j = 0; j < FFMIN(s0, s1); j += len) {
int64_t a = buf[0][j];
int64_t b = buf[1][j];
int dist;
if (len == 2) {
- a = (int16_t)(a | (buf[0][++j] << 8));
- b = (int16_t)(b | (buf[1][ j] << 8));
+ a = get_s16l(buf[0] + j);
+ b = get_s16l(buf[1] + j);
+ } else if (len == 4) {
+ a = get_f32l(buf[0] + j) * (1 << 24);
+ b = get_f32l(buf[1] + j) * (1 << 24);
+ } else {
+ a = buf[0][j];
+ b = buf[1][j];
}
sse += (a - b) * (a - b);
dist = abs(a - b);
@@ -188,7 +213,7 @@ static int run_psnr(FILE *f[2], int len, int shift, int skip_bytes)
int main(int argc, char *argv[])
{
FILE *f[2];
- int len = argc < 4 ? 1 : atoi(argv[3]);
+ int len = 1;
int shift_first= argc < 5 ? 0 : atoi(argv[4]);
int skip_bytes = argc < 6 ? 0 : atoi(argv[5]);
int shift_last = shift_first + (argc < 7 ? 0 : atoi(argv[6]));
@@ -196,6 +221,23 @@ int main(int argc, char *argv[])
int max_psnr = -1;
int max_psnr_shift = 0;
+ if (argc > 3) {
+ if (!strcmp(argv[3], "u8")) {
+ len = 1;
+ } else if (!strcmp(argv[3], "s16")) {
+ len = 2;
+ } else if (!strcmp(argv[3], "f32")) {
+ len = 4;
+ } else {
+ char *end;
+ len = strtol(argv[3], &end, 0);
+ if (*end || len > 2) {
+ fprintf(stderr, "Unsupported sample format: %s\n", argv[3]);
+ return 1;
+ }
+ }
+ }
+
if (argc < 3) {
printf("tiny_psnr <file1> <file2> [<elem size> [<shift> [<skip bytes> [<shift search range>]]]]\n");
printf("WAV headers are skipped automatically.\n");