Merge remote-tracking branch 'qatar/master'

* qatar/master:
  avformat: Drop pointless "format" from container long names
  swscale: bury one more piece of inline asm under HAVE_INLINE_ASM.
  wv: K&R formatting cosmetics
  configure: Add missing descriptions to help output
  h264_ps: declare array of colorspace strings on its own line.
  fate: amix: specify f32 sample format for comparison
  tiny_psnr: support 32-bit float samples
  eamad/eatgq/eatqi: call special EA IDCT directly
  eamad: remove use of MpegEncContext
  mpegvideo: remove unnecessary inclusions of faandct.h
  af_asyncts: avoid overflow in out_size with large delta values
  af_asyncts: add first_pts option

Conflicts:
	configure
	libavcodec/eamad.c
	libavcodec/h264_ps.c
	libavformat/crcenc.c
	libavformat/ffmdec.c
	libavformat/ffmenc.c
	libavformat/framecrcenc.c
	libavformat/md5enc.c
	libavformat/nutdec.c
	libavformat/rawenc.c
	libavformat/yuv4mpeg.c
	tests/tiny_psnr.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-07-30 23:04:28 +02:00
commit b5da7d4c1a
104 changed files with 400 additions and 324 deletions

7
configure vendored
View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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 */

27
libavcodec/eaidct.h Normal file
View File

@ -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 */

View File

@ -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;
}

View File

@ -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,

View File

@ -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,

View File

@ -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

View File

@ -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>

View File

@ -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);

View File

@ -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);

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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),

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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",

View File

@ -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)

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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)

View File

@ -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,

View File

@ -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),

View File

@ -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,

View File

@ -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,

View File

@ -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),

View File

@ -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),

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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),

View File

@ -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,

View File

@ -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)

View File

@ -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)

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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),

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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),

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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),

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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;
}

View File

@ -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,

View File

@ -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,

Some files were not shown because too many files have changed in this diff Show More