diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-07-30 23:04:28 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-07-30 23:28:31 +0200 |
commit | b5da7d4c1a7f08f89aece651a8f0f8c4963e5ad9 (patch) | |
tree | c5ade4afd26c2cbd5fd7d5442e044e688724269a /libavcodec | |
parent | a85b4a5696787e36df8d7c805de8f86ea6365acb (diff) | |
parent | 6774247a9d7d15033c2b80118c03cb0cb10027df (diff) | |
download | ffmpeg-b5da7d4c1a7f08f89aece651a8f0f8c4963e5ad9.tar.gz |
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>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/dsputil.c | 3 | ||||
-rw-r--r-- | libavcodec/dsputil.h | 3 | ||||
-rw-r--r-- | libavcodec/eaidct.c | 1 | ||||
-rw-r--r-- | libavcodec/eaidct.h | 27 | ||||
-rw-r--r-- | libavcodec/eamad.c | 114 | ||||
-rw-r--r-- | libavcodec/eatgq.c | 26 | ||||
-rw-r--r-- | libavcodec/eatqi.c | 28 | ||||
-rw-r--r-- | libavcodec/h264_ps.c | 3 | ||||
-rw-r--r-- | libavcodec/mpegvideo.c | 1 | ||||
-rw-r--r-- | libavcodec/mpegvideo_common.h | 1 |
10 files changed, 106 insertions, 101 deletions
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); |