]> git.sesse.net Git - ffmpeg/commitdiff
Bump Major version, this commit is almost just renaming bits_per_sample to
authorLuca Abeni <lucabe72@email.it>
Mon, 8 Sep 2008 14:24:59 +0000 (14:24 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 8 Sep 2008 14:24:59 +0000 (14:24 +0000)
bits_per_coded_sample but that cannot be done seperately.
Patch by Luca Abeni
Also reset the minor version and fix the forgotton change to libfaad.
Note: The API/ABI should not be considered stable yet, there still may
be a change done here or there if some developer has some cleanup ideas and
patches!

Originally committed as revision 15262 to svn://svn.ffmpeg.org/ffmpeg/trunk

71 files changed:
libavcodec/8bps.c
libavcodec/alac.c
libavcodec/alacenc.c
libavcodec/apedec.c
libavcodec/avcodec.h
libavcodec/cinepak.c
libavcodec/cscd.c
libavcodec/huffyuv.c
libavcodec/imgresample.c
libavcodec/lclenc.c
libavcodec/libfaad.c
libavcodec/msrle.c
libavcodec/pcm.c
libavcodec/qtrle.c
libavcodec/qtrleenc.c
libavcodec/rawdec.c
libavcodec/shorten.c
libavcodec/tscc.c
libavcodec/tta.c
libavcodec/utils.c
libavcodec/vmdav.c
libavcodec/vmnc.c
libavcodec/zmbv.c
libavformat/4xm.c
libavformat/aiff.c
libavformat/apc.c
libavformat/ape.c
libavformat/asf.c
libavformat/avidec.c
libavformat/avs.c
libavformat/bethsoftvid.c
libavformat/bfi.c
libavformat/daud.c
libavformat/dsicin.c
libavformat/electronicarts.c
libavformat/flvdec.c
libavformat/flvenc.c
libavformat/gxf.c
libavformat/idcin.c
libavformat/idroq.c
libavformat/iff.c
libavformat/ipmovie.c
libavformat/mmf.c
libavformat/mov.c
libavformat/movenc.c
libavformat/mpc.c
libavformat/mpc8.c
libavformat/mpeg.c
libavformat/mtv.c
libavformat/mvi.c
libavformat/mxfdec.c
libavformat/mxfenc.c
libavformat/nsvdec.c
libavformat/nuv.c
libavformat/riff.c
libavformat/rl2.c
libavformat/rpl.c
libavformat/segafilm.c
libavformat/sierravmd.c
libavformat/siff.c
libavformat/smacker.c
libavformat/tiertexseq.c
libavformat/tta.c
libavformat/utils.c
libavformat/vocdec.c
libavformat/vocenc.c
libavformat/wc3movie.c
libavformat/westwood.c
libavformat/wv.c
libavformat/xa.c
tests/regression.sh

index 447d46064c00849057fc79b57b47d80c0a58381d..4376d0706472f54754bb3db1cbb0ac408090c256 100644 (file)
@@ -160,7 +160,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
         return 1;
     }
 
-        switch (avctx->bits_per_sample) {
+        switch (avctx->bits_per_coded_sample) {
                 case 8:
                         avctx->pix_fmt = PIX_FMT_PAL8;
                         c->planes = 1;
@@ -193,7 +193,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
 #endif
                         break;
                 default:
-                        av_log(avctx, AV_LOG_ERROR, "Error: Unsupported color depth: %u.\n", avctx->bits_per_sample);
+                        av_log(avctx, AV_LOG_ERROR, "Error: Unsupported color depth: %u.\n", avctx->bits_per_coded_sample);
                         return -1;
         }
 
index 1817161160817ace60fcf0bfd79cd0836b229fa4..9c5f621904752bb451c66c3ee8f81d5e2dfdda64 100644 (file)
@@ -597,7 +597,7 @@ static av_cold int alac_decode_init(AVCodecContext * avctx)
     alac->context_initialized = 0;
 
     alac->numchannels = alac->avctx->channels;
-    alac->bytespersample = (avctx->bits_per_sample / 8) * alac->numchannels;
+    alac->bytespersample = (avctx->bits_per_coded_sample / 8) * alac->numchannels;
     avctx->sample_fmt = SAMPLE_FMT_S16;
 
     return 0;
index afa1ac68e004c9339b80ef21088ab04de5810cf5..df4136f4c40df2f1431606b072c6a3716bdac4ba 100644 (file)
@@ -364,7 +364,7 @@ static av_cold int alac_encode_init(AVCodecContext *avctx)
     uint8_t *alac_extradata = av_mallocz(ALAC_EXTRADATA_SIZE+1);
 
     avctx->frame_size      = DEFAULT_FRAME_SIZE;
-    avctx->bits_per_sample = DEFAULT_SAMPLE_SIZE;
+    avctx->bits_per_coded_sample = DEFAULT_SAMPLE_SIZE;
 
     if(avctx->sample_fmt != SAMPLE_FMT_S16) {
         av_log(avctx, AV_LOG_ERROR, "only pcm_s16 input samples are supported\n");
@@ -384,17 +384,17 @@ static av_cold int alac_encode_init(AVCodecContext *avctx)
     s->rc.rice_modifier   = 4;
 
     s->max_coded_frame_size = (ALAC_FRAME_HEADER_SIZE + ALAC_FRAME_FOOTER_SIZE +
-                               avctx->frame_size*avctx->channels*avctx->bits_per_sample)>>3;
+                               avctx->frame_size*avctx->channels*avctx->bits_per_coded_sample)>>3;
 
-    s->write_sample_size  = avctx->bits_per_sample + avctx->channels - 1; // FIXME: consider wasted_bytes
+    s->write_sample_size  = avctx->bits_per_coded_sample + avctx->channels - 1; // FIXME: consider wasted_bytes
 
     AV_WB32(alac_extradata,    ALAC_EXTRADATA_SIZE);
     AV_WB32(alac_extradata+4,  MKBETAG('a','l','a','c'));
     AV_WB32(alac_extradata+12, avctx->frame_size);
-    AV_WB8 (alac_extradata+17, avctx->bits_per_sample);
+    AV_WB8 (alac_extradata+17, avctx->bits_per_coded_sample);
     AV_WB8 (alac_extradata+21, avctx->channels);
     AV_WB32(alac_extradata+24, s->max_coded_frame_size);
-    AV_WB32(alac_extradata+28, avctx->sample_rate*avctx->channels*avctx->bits_per_sample); // average bitrate
+    AV_WB32(alac_extradata+28, avctx->sample_rate*avctx->channels*avctx->bits_per_coded_sample); // average bitrate
     AV_WB32(alac_extradata+32, avctx->sample_rate);
 
     // Set relevant extradata fields
index 83281c1035e3cfd4265b6d0046d86a207c8479d4..0489ab49dd2b8863b70fe3372ac76546ddc8d729 100644 (file)
@@ -171,7 +171,7 @@ static av_cold int ape_decode_init(AVCodecContext * avctx)
         av_log(avctx, AV_LOG_ERROR, "Incorrect extradata\n");
         return -1;
     }
-    if (avctx->bits_per_sample != 16) {
+    if (avctx->bits_per_coded_sample != 16) {
         av_log(avctx, AV_LOG_ERROR, "Only 16-bit samples are supported\n");
         return -1;
     }
index 18bde8e32846518300cb094e96b2bfcd6c057c62..fa16c4ec1c7525c3cef7048e7c7cbce0c3c99c44 100644 (file)
@@ -29,8 +29,8 @@
 
 #include "libavutil/avutil.h"
 
-#define LIBAVCODEC_VERSION_MAJOR 51
-#define LIBAVCODEC_VERSION_MINOR 71
+#define LIBAVCODEC_VERSION_MAJOR 52
+#define LIBAVCODEC_VERSION_MINOR  0
 #define LIBAVCODEC_VERSION_MICRO  0
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
index b83edd19afe0297756f6f050b4431bfed8cd7adf..77e5ff1de1d7933fd111d46b522eb7f276d69b2f 100644 (file)
@@ -395,7 +395,7 @@ static av_cold int cinepak_decode_init(AVCodecContext *avctx)
     s->sega_film_skip_bytes = -1;  /* uninitialized state */
 
     // check for paletted data
-    if ((avctx->palctrl == NULL) || (avctx->bits_per_sample == 40)) {
+    if ((avctx->palctrl == NULL) || (avctx->bits_per_coded_sample == 40)) {
         s->palette_video = 0;
         avctx->pix_fmt = PIX_FMT_YUV420P;
     } else {
index 2999d443c5a20b195f4fb94263bceba914073d08..ada6a712a3b8000592deb4e051943f0b9b4a1e06 100644 (file)
@@ -217,19 +217,19 @@ static av_cold int decode_init(AVCodecContext *avctx) {
     if (avcodec_check_dimensions(avctx, avctx->height, avctx->width) < 0) {
         return 1;
     }
-    switch (avctx->bits_per_sample) {
+    switch (avctx->bits_per_coded_sample) {
         case 16: avctx->pix_fmt = PIX_FMT_RGB555; break;
         case 24: avctx->pix_fmt = PIX_FMT_BGR24; break;
         case 32: avctx->pix_fmt = PIX_FMT_RGB32; break;
         default:
             av_log(avctx, AV_LOG_ERROR,
                    "CamStudio codec error: invalid depth %i bpp\n",
-                   avctx->bits_per_sample);
+                   avctx->bits_per_coded_sample);
              return 1;
     }
-    c->bpp = avctx->bits_per_sample;
+    c->bpp = avctx->bits_per_coded_sample;
     c->pic.data[0] = NULL;
-    c->linelen = avctx->width * avctx->bits_per_sample / 8;
+    c->linelen = avctx->width * avctx->bits_per_coded_sample / 8;
     c->height = avctx->height;
     c->decomp_size = c->height * c->linelen;
     c->decomp_buf = av_malloc(c->decomp_size + LZO_OUTPUT_PADDING);
index 9d1a49a8074e8240e156a64b582dc3fcb5a0bfa5..cf90adc70122ccfd5437c40c8e70272fe6b9b8c4 100644 (file)
@@ -492,7 +492,7 @@ s->bgr32=1;
 //if(avctx->extradata)
 //  printf("extradata:%X, extradata_size:%d\n", *(uint32_t*)avctx->extradata, avctx->extradata_size);
     if(avctx->extradata_size){
-        if((avctx->bits_per_sample&7) && avctx->bits_per_sample != 12)
+        if((avctx->bits_per_coded_sample&7) && avctx->bits_per_coded_sample != 12)
             s->version=1; // do such files exist at all?
         else
             s->version=2;
@@ -507,7 +507,7 @@ s->bgr32=1;
         s->predictor= method&63;
         s->bitstream_bpp= ((uint8_t*)avctx->extradata)[1];
         if(s->bitstream_bpp==0)
-            s->bitstream_bpp= avctx->bits_per_sample&~7;
+            s->bitstream_bpp= avctx->bits_per_coded_sample&~7;
         interlace= (((uint8_t*)avctx->extradata)[2] & 0x30) >> 4;
         s->interlaced= (interlace==1) ? 1 : (interlace==2) ? 0 : s->interlaced;
         s->context= ((uint8_t*)avctx->extradata)[2] & 0x40 ? 1 : 0;
@@ -515,7 +515,7 @@ s->bgr32=1;
         if(read_huffman_tables(s, ((uint8_t*)avctx->extradata)+4, avctx->extradata_size) < 0)
             return -1;
     }else{
-        switch(avctx->bits_per_sample&7){
+        switch(avctx->bits_per_coded_sample&7){
         case 1:
             s->predictor= LEFT;
             s->decorrelate= 0;
@@ -526,7 +526,7 @@ s->bgr32=1;
             break;
         case 3:
             s->predictor= PLANE;
-            s->decorrelate= avctx->bits_per_sample >= 24;
+            s->decorrelate= avctx->bits_per_coded_sample >= 24;
             break;
         case 4:
             s->predictor= MEDIAN;
@@ -537,7 +537,7 @@ s->bgr32=1;
             s->decorrelate= 0;
             break;
         }
-        s->bitstream_bpp= avctx->bits_per_sample & ~7;
+        s->bitstream_bpp= avctx->bits_per_coded_sample & ~7;
         s->context= 0;
 
         if(read_old_huffman_tables(s) < 0)
@@ -569,7 +569,7 @@ s->bgr32=1;
 
     alloc_temp(s);
 
-//    av_log(NULL, AV_LOG_DEBUG, "pred:%d bpp:%d hbpp:%d il:%d\n", s->predictor, s->bitstream_bpp, avctx->bits_per_sample, s->interlaced);
+//    av_log(NULL, AV_LOG_DEBUG, "pred:%d bpp:%d hbpp:%d il:%d\n", s->predictor, s->bitstream_bpp, avctx->bits_per_coded_sample, s->interlaced);
 
     return 0;
 }
@@ -626,7 +626,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
         av_log(avctx, AV_LOG_ERROR, "format not supported\n");
         return -1;
     }
-    avctx->bits_per_sample= s->bitstream_bpp;
+    avctx->bits_per_coded_sample= s->bitstream_bpp;
     s->decorrelate= s->bitstream_bpp >= 24;
     s->predictor= avctx->prediction_method;
     s->interlaced= avctx->flags&CODEC_FLAG_INTERLACED_ME ? 1 : 0;
@@ -717,7 +717,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
                 s->stats[i][j]= 0;
     }
 
-//    printf("pred:%d bpp:%d hbpp:%d il:%d\n", s->predictor, s->bitstream_bpp, avctx->bits_per_sample, s->interlaced);
+//    printf("pred:%d bpp:%d hbpp:%d il:%d\n", s->predictor, s->bitstream_bpp, avctx->bits_per_coded_sample, s->interlaced);
 
     alloc_temp(s);
 
index 8da1b4d315f3fb9392c60bafafe55437f8ac56cc..2a89ddf6cbdd0f92c9e975ad67d48d02cdef2486 100644 (file)
@@ -53,7 +53,7 @@ struct SwsContext {
     enum PixelFormat src_pix_fmt, dst_pix_fmt;
 };
 
-struct ImgReSampleContext {
+typedef struct ImgReSampleContext {
     int iwidth, iheight, owidth, oheight;
     int topBand, bottomBand, leftBand, rightBand;
     int padtop, padbottom, padleft, padright;
@@ -62,7 +62,7 @@ struct ImgReSampleContext {
     DECLARE_ALIGNED_8(int16_t, h_filters[NB_PHASES][NB_TAPS]); /* horizontal filters */
     DECLARE_ALIGNED_8(int16_t, v_filters[NB_PHASES][NB_TAPS]); /* vertical filters */
     uint8_t *line_buf;
-};
+} ImgReSampleContext;
 
 void av_build_filter(int16_t *filter, double factor, int tap_count, int phase_count, int scale, int type);
 
@@ -424,13 +424,6 @@ static void component_resample(ImgReSampleContext *s,
     }
 }
 
-ImgReSampleContext *img_resample_init(int owidth, int oheight,
-                                      int iwidth, int iheight)
-{
-    return img_resample_full_init(owidth, oheight, iwidth, iheight,
-            0, 0, 0, 0, 0, 0, 0, 0);
-}
-
 ImgReSampleContext *img_resample_full_init(int owidth, int oheight,
                                       int iwidth, int iheight,
                                       int topBand, int bottomBand,
@@ -484,6 +477,13 @@ fail:
     return NULL;
 }
 
+ImgReSampleContext *img_resample_init(int owidth, int oheight,
+                                      int iwidth, int iheight)
+{
+    return img_resample_full_init(owidth, oheight, iwidth, iheight,
+            0, 0, 0, 0, 0, 0, 0, 0);
+}
+
 void img_resample(ImgReSampleContext *s,
                   AVPicture *output, const AVPicture *input)
 {
index 2d89998c07ad42180f05da61faf2081849f4456c..d0269655e5ff46061e8f1400669a4a94343c74ae 100644 (file)
@@ -164,7 +164,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
         case PIX_FMT_BGR24:
             c->imgtype = IMGTYPE_RGB24;
             c->decomp_size = avctx->width * avctx->height * 3;
-            avctx->bits_per_sample= 24;
+            avctx->bits_per_coded_sample= 24;
             break;
         default:
             av_log(avctx, AV_LOG_ERROR, "Input pixel format %s not supported\n", avcodec_get_pix_fmt_name(avctx->pix_fmt));
index 3e7339d6f49f036d0ab080accd077683a4261272..153fc41f6200dfda74c51bde0930abff8015d386 100644 (file)
@@ -279,8 +279,8 @@ static av_cold int faac_decode_init(AVCodecContext *avctx)
     faac_cfg = s->faacDecGetCurrentConfiguration(s->faac_handle);
 
     if (faac_cfg) {
-        switch (avctx->bits_per_sample) {
-        case 8: av_log(avctx, AV_LOG_ERROR, "FAADlib unsupported bps %d\n", avctx->bits_per_sample); break;
+        switch (avctx->bits_per_coded_sample) {
+        case 8: av_log(avctx, AV_LOG_ERROR, "FAADlib unsupported bps %d\n", avctx->bits_per_coded_sample); break;
         default:
         case 16:
 #ifdef FAAD2_VERSION
index ceffae8bb0cd702c9c4bf6feb7d98c7af87a22aa..4ea00f691583119493706cb8b710538ae5e4b6d5 100644 (file)
@@ -264,7 +264,7 @@ static int msrle_decode_frame(AVCodecContext *avctx,
         return -1;
     }
 
-    switch (avctx->bits_per_sample) {
+    switch (avctx->bits_per_coded_sample) {
         case 8:
             msrle_decode_pal8(s);
             break;
@@ -273,7 +273,7 @@ static int msrle_decode_frame(AVCodecContext *avctx,
             break;
         default:
             av_log(avctx, AV_LOG_ERROR, "Don't know how to decode depth %u.\n",
-                   avctx->bits_per_sample);
+                   avctx->bits_per_coded_sample);
     }
 
     *data_size = sizeof(AVFrame);
index 4e534bb6ce972ad00c341582ba49e386886de1f5..84aa098750a36ff1dec5623adaa62c721e60270f 100644 (file)
@@ -118,8 +118,8 @@ static av_cold int pcm_encode_init(AVCodecContext *avctx)
         break;
     }
 
-    avctx->bits_per_sample = av_get_bits_per_sample(avctx->codec->id);
-    avctx->block_align = avctx->channels * avctx->bits_per_sample/8;
+    avctx->bits_per_coded_sample = av_get_bits_per_sample(avctx->codec->id);
+    avctx->block_align = avctx->channels * avctx->bits_per_coded_sample/8;
     avctx->coded_frame= avcodec_alloc_frame();
     avctx->coded_frame->key_frame= 1;
 
@@ -354,7 +354,7 @@ static int pcm_decode_frame(AVCodecContext *avctx,
     /* av_get_bits_per_sample returns 0 for CODEC_ID_PCM_DVD */
     if (CODEC_ID_PCM_DVD == avctx->codec_id)
         /* 2 samples are interleaved per block in PCM_DVD */
-        sample_size = avctx->bits_per_sample * 2 / 8;
+        sample_size = avctx->bits_per_coded_sample * 2 / 8;
 
     n = avctx->channels * sample_size;
 
@@ -470,7 +470,7 @@ static int pcm_decode_frame(AVCodecContext *avctx,
     case CODEC_ID_PCM_DVD:
         dst_int32_t = data;
         n /= avctx->channels;
-        switch (avctx->bits_per_sample) {
+        switch (avctx->bits_per_coded_sample) {
         case 20:
             while (n--) {
                 c = avctx->channels;
index 547c689e63cf80361d8e52f93451358ff41e9de8..33a7eb57319f8aca62449b99e171a8855c8576d7 100644 (file)
@@ -383,7 +383,7 @@ static av_cold int qtrle_decode_init(AVCodecContext *avctx)
     QtrleContext *s = avctx->priv_data;
 
     s->avctx = avctx;
-    switch (avctx->bits_per_sample) {
+    switch (avctx->bits_per_coded_sample) {
     case 1:
     case 33:
         avctx->pix_fmt = PIX_FMT_MONOWHITE;
@@ -412,7 +412,7 @@ static av_cold int qtrle_decode_init(AVCodecContext *avctx)
 
     default:
         av_log (avctx, AV_LOG_ERROR, "Unsupported colorspace: %d bits/sample?\n",
-            avctx->bits_per_sample);
+            avctx->bits_per_coded_sample);
         break;
     }
 
@@ -466,7 +466,7 @@ static int qtrle_decode_frame(AVCodecContext *avctx,
     }
     row_ptr = s->frame.linesize[0] * start_line;
 
-    switch (avctx->bits_per_sample) {
+    switch (avctx->bits_per_coded_sample) {
     case 1:
     case 33:
         qtrle_decode_1bpp(s, stream_ptr, row_ptr, height);
@@ -504,7 +504,7 @@ static int qtrle_decode_frame(AVCodecContext *avctx,
 
     default:
         av_log (s->avctx, AV_LOG_ERROR, "Unsupported colorspace: %d bits/sample?\n",
-            avctx->bits_per_sample);
+            avctx->bits_per_coded_sample);
         break;
     }
 
index efb0e4066dd6d3f9c30e8f728c2f0934adc11cee..d38720d23f19c48782c0b9ef6ccc07a91d7f544b 100644 (file)
@@ -78,7 +78,7 @@ static av_cold int qtrle_encode_init(AVCodecContext *avctx)
         av_log(avctx, AV_LOG_ERROR, "Unsupported colorspace.\n");
         break;
     }
-    avctx->bits_per_sample = s->pixel_size*8;
+    avctx->bits_per_coded_sample = s->pixel_size*8;
 
     s->rlecode_table = av_mallocz(s->avctx->width);
     s->skip_table    = av_mallocz(s->avctx->width);
index 45f8f98788e5bd3d4b2749240e88ae63fc3ff89a..6039f132320b49be8176522e186573cea90d8e19 100644 (file)
@@ -69,11 +69,11 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
     RawVideoContext *context = avctx->priv_data;
 
     if (avctx->codec_tag == MKTAG('r','a','w',' '))
-        avctx->pix_fmt = findPixelFormat(pixelFormatBpsMOV, avctx->bits_per_sample);
+        avctx->pix_fmt = findPixelFormat(pixelFormatBpsMOV, avctx->bits_per_coded_sample);
     else if (avctx->codec_tag)
         avctx->pix_fmt = findPixelFormat(ff_raw_pixelFormatTags, avctx->codec_tag);
-    else if (avctx->bits_per_sample)
-        avctx->pix_fmt = findPixelFormat(pixelFormatBpsAVI, avctx->bits_per_sample);
+    else if (avctx->bits_per_coded_sample)
+        avctx->pix_fmt = findPixelFormat(pixelFormatBpsAVI, avctx->bits_per_coded_sample);
 
     context->length = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);
     context->buffer = av_malloc(context->length);
@@ -89,7 +89,7 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
 }
 
 static void flip(AVCodecContext *avctx, AVPicture * picture){
-    if(!avctx->codec_tag && avctx->bits_per_sample && picture->linesize[2]==0){
+    if(!avctx->codec_tag && avctx->bits_per_coded_sample && picture->linesize[2]==0){
         picture->data[0] += picture->linesize[0] * (avctx->height-1);
         picture->linesize[0] *= -1;
     }
@@ -108,7 +108,7 @@ static int raw_decode(AVCodecContext *avctx,
     frame->top_field_first = avctx->coded_frame->top_field_first;
 
     //4bpp raw in avi and mov (yes this is ugly ...)
-    if(avctx->bits_per_sample == 4 && avctx->pix_fmt==PIX_FMT_PAL8 &&
+    if(avctx->bits_per_coded_sample == 4 && avctx->pix_fmt==PIX_FMT_PAL8 &&
        (!avctx->codec_tag || avctx->codec_tag == MKTAG('r','a','w',' '))){
         int i;
         for(i=256*2; i+1 < context->length>>1; i++){
index 7f8ef819c003fd8c3b2a1020d285c7a23ce4a078..6d0aace596b9dea228904d86f0b06a2187f412a5 100644 (file)
@@ -228,9 +228,9 @@ static int decode_wave_header(AVCodecContext *avctx, uint8_t *header, int header
     avctx->sample_rate = get_le32(&hb);
     avctx->bit_rate = get_le32(&hb) * 8;
     avctx->block_align = get_le16(&hb);
-    avctx->bits_per_sample = get_le16(&hb);
+    avctx->bits_per_coded_sample = get_le16(&hb);
 
-    if (avctx->bits_per_sample != 16) {
+    if (avctx->bits_per_coded_sample != 16) {
         av_log(avctx, AV_LOG_ERROR, "unsupported number of bits per sample\n");
         return -1;
     }
index 3c9adc0690c7dfba434f1fd2da61b0a29ae84c90..51f0185aa0ffb74bbf4dbf60b97cb953d5e31431 100644 (file)
@@ -274,17 +274,17 @@ static av_cold int decode_init(AVCodecContext *avctx)
     av_log(avctx, AV_LOG_ERROR, "Zlib support not compiled.\n");
     return 1;
 #endif
-    switch(avctx->bits_per_sample){
+    switch(avctx->bits_per_coded_sample){
     case  8: avctx->pix_fmt = PIX_FMT_PAL8; break;
     case 16: avctx->pix_fmt = PIX_FMT_RGB555; break;
     case 24:
              avctx->pix_fmt = PIX_FMT_BGR24;
              break;
     case 32: avctx->pix_fmt = PIX_FMT_RGB32; break;
-    default: av_log(avctx, AV_LOG_ERROR, "Camtasia error: unknown depth %i bpp\n", avctx->bits_per_sample);
+    default: av_log(avctx, AV_LOG_ERROR, "Camtasia error: unknown depth %i bpp\n", avctx->bits_per_coded_sample);
              return -1;
     }
-    c->bpp = avctx->bits_per_sample;
+    c->bpp = avctx->bits_per_coded_sample;
     c->decomp_size = (avctx->width * c->bpp + (avctx->width + 254) / 255 + 2) * avctx->height + 2;//RLE in the 'best' case
 
     /* Allocate decompression buffer */
index 45efdaecb079d3d9edb8f36578b51872ba68b569..adf48b2997d12b16f782133ae5f08fc8c181d3df 100644 (file)
@@ -226,8 +226,8 @@ static av_cold int tta_decode_init(AVCodecContext * avctx)
         }
         s->is_float = (s->flags == FORMAT_FLOAT);
         avctx->channels = s->channels = get_bits(&s->gb, 16);
-        avctx->bits_per_sample = get_bits(&s->gb, 16);
-        s->bps = (avctx->bits_per_sample + 7) / 8;
+        avctx->bits_per_coded_sample = get_bits(&s->gb, 16);
+        s->bps = (avctx->bits_per_coded_sample + 7) / 8;
         avctx->sample_rate = get_bits_long(&s->gb, 32);
         if(avctx->sample_rate > 1000000){ //prevent FRAME_TIME * avctx->sample_rate from overflowing and sanity check
             av_log(avctx, AV_LOG_ERROR, "sample_rate too large\n");
@@ -261,7 +261,7 @@ static av_cold int tta_decode_init(AVCodecContext * avctx)
                         (s->last_frame_length ? 1 : 0);
 
         av_log(s->avctx, AV_LOG_DEBUG, "flags: %x chans: %d bps: %d rate: %d block: %d\n",
-            s->flags, avctx->channels, avctx->bits_per_sample, avctx->sample_rate,
+            s->flags, avctx->channels, avctx->bits_per_coded_sample, avctx->sample_rate,
             avctx->block_align);
         av_log(s->avctx, AV_LOG_DEBUG, "data_length: %d frame_length: %d last: %d total: %d\n",
             s->data_length, s->frame_length, s->last_frame_length, s->total_frames);
index b13cf377cd582d374097b68c3248dbc2f9630f32..a6dc5d8bbe97eac544dea4842307879b830a1ddc 100644 (file)
@@ -544,7 +544,6 @@ static const AVOption options[]={
 {"scplx_mask", "spatial complexity masking", OFFSET(spatial_cplx_masking), FF_OPT_TYPE_FLOAT, 0, -FLT_MAX, FLT_MAX, V|E},
 {"p_mask", "inter masking", OFFSET(p_masking), FF_OPT_TYPE_FLOAT, 0, -FLT_MAX, FLT_MAX, V|E},
 {"dark_mask", "compresses dark areas stronger than medium ones", OFFSET(dark_masking), FF_OPT_TYPE_FLOAT, 0, -FLT_MAX, FLT_MAX, V|E},
-{"unused", NULL, OFFSET(unused), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX},
 {"idct", "select IDCT implementation", OFFSET(idct_algo), FF_OPT_TYPE_INT, DEFAULT, 0, INT_MAX, V|E|D, "idct"},
 {"auto", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_AUTO, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"int", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_INT, INT_MIN, INT_MAX, V|E|D, "idct"},
index b6e10d7faa8a67c2a16667f0a2ce4be1fd8032b5..328abbb3c7d8eca6334cbbc3c8999b7faf3cd112 100644 (file)
@@ -444,7 +444,7 @@ static av_cold int vmdaudio_decode_init(AVCodecContext *avctx)
 
     s->avctx = avctx;
     s->channels = avctx->channels;
-    s->bits = avctx->bits_per_sample;
+    s->bits = avctx->bits_per_coded_sample;
     s->block_align = avctx->block_align;
     avctx->sample_fmt = SAMPLE_FMT_S16;
 
index d7dd97424e7d8a074fac06ac652e73a4148136bc..c07d0016f59af07bf4d4a33cfb98dab48577df2e 100644 (file)
@@ -469,7 +469,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
     if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
         return 1;
     }
-    c->bpp = avctx->bits_per_sample;
+    c->bpp = avctx->bits_per_coded_sample;
     c->bpp2 = c->bpp/8;
 
     switch(c->bpp){
index b9751a0faaf2714460c8b5835a1c3a54ba0c43bb..e36ff27301326291a35e5872052c2e0978c6adf0 100644 (file)
@@ -603,7 +603,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
     if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
         return 1;
     }
-    c->bpp = avctx->bits_per_sample;
+    c->bpp = avctx->bits_per_coded_sample;
 
     // Needed if zlib unused or init aborted before inflateInit
     memset(&(c->zstream), 0, sizeof(z_stream));
index 25c2080d7f0b99acf88b37e46f2e265c32578d70..f8537165b53be705975581fe69f3626f2e3ff7d8 100644 (file)
@@ -193,13 +193,13 @@ static int fourxm_read_header(AVFormatContext *s,
             st->codec->codec_tag = 0;
             st->codec->channels = fourxm->tracks[current_track].channels;
             st->codec->sample_rate = fourxm->tracks[current_track].sample_rate;
-            st->codec->bits_per_sample = fourxm->tracks[current_track].bits;
+            st->codec->bits_per_coded_sample = fourxm->tracks[current_track].bits;
             st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
-                st->codec->bits_per_sample;
-            st->codec->block_align = st->codec->channels * st->codec->bits_per_sample;
+                st->codec->bits_per_coded_sample;
+            st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;
             if (fourxm->tracks[current_track].adpcm)
                 st->codec->codec_id = CODEC_ID_ADPCM_4XM;
-            else if (st->codec->bits_per_sample == 8)
+            else if (st->codec->bits_per_coded_sample == 8)
                 st->codec->codec_id = CODEC_ID_PCM_U8;
             else
                 st->codec->codec_id = CODEC_ID_PCM_S16LE;
index 0eedfba88ca34724d35801c59ce52a0e18c70d6a..911814bf92701844617f2c6d5e29feda9f31f09b 100644 (file)
@@ -112,7 +112,7 @@ static unsigned int get_aiff_header(ByteIOContext *pb, AVCodecContext *codec,
     codec->codec_type = CODEC_TYPE_AUDIO;
     codec->channels = get_be16(pb);
     num_frames = get_be32(pb);
-    codec->bits_per_sample = get_be16(pb);
+    codec->bits_per_coded_sample = get_be16(pb);
 
     get_buffer(pb, (uint8_t*)&ext, sizeof(ext));/* Sample rate is in */
     sample_rate = av_ext2dbl(ext);          /* 80 bits BE IEEE extended float */
@@ -126,8 +126,8 @@ static unsigned int get_aiff_header(ByteIOContext *pb, AVCodecContext *codec,
 
         switch (codec->codec_id) {
         case CODEC_ID_PCM_S16BE:
-            codec->codec_id = aiff_codec_get_id(codec->bits_per_sample);
-            codec->bits_per_sample = av_get_bits_per_sample(codec->codec_id);
+            codec->codec_id = aiff_codec_get_id(codec->bits_per_coded_sample);
+            codec->bits_per_coded_sample = av_get_bits_per_sample(codec->codec_id);
             break;
         case CODEC_ID_ADPCM_IMA_QT:
             codec->block_align = 34*codec->channels;
@@ -151,14 +151,14 @@ static unsigned int get_aiff_header(ByteIOContext *pb, AVCodecContext *codec,
         size -= 4;
     } else {
         /* Need the codec type */
-        codec->codec_id = aiff_codec_get_id(codec->bits_per_sample);
-        codec->bits_per_sample = av_get_bits_per_sample(codec->codec_id);
+        codec->codec_id = aiff_codec_get_id(codec->bits_per_coded_sample);
+        codec->bits_per_coded_sample = av_get_bits_per_sample(codec->codec_id);
     }
 
     /* Block align needs to be computed in all cases, as the definition
      * is specific to applications -> here we use the WAVE format definition */
     if (!codec->block_align)
-        codec->block_align = (codec->bits_per_sample * codec->channels) >> 3;
+        codec->block_align = (codec->bits_per_coded_sample * codec->channels) >> 3;
 
     codec->bit_rate = (codec->frame_size ? codec->sample_rate/codec->frame_size :
                        codec->sample_rate) * (codec->block_align << 3);
@@ -198,7 +198,7 @@ static int aiff_write_header(AVFormatContext *s)
     put_tag(pb, aifc ? "AIFC" : "AIFF");
 
     if (aifc) { // compressed audio
-        enc->bits_per_sample = 16;
+        enc->bits_per_coded_sample = 16;
         if (!enc->block_align) {
             av_log(s, AV_LOG_ERROR, "block align not set\n");
             return -1;
@@ -217,16 +217,16 @@ static int aiff_write_header(AVFormatContext *s)
     aiff->frames = url_ftell(pb);
     put_be32(pb, 0);              /* Number of frames */
 
-    if (!enc->bits_per_sample)
-        enc->bits_per_sample = av_get_bits_per_sample(enc->codec_id);
-    if (!enc->bits_per_sample) {
+    if (!enc->bits_per_coded_sample)
+        enc->bits_per_coded_sample = av_get_bits_per_sample(enc->codec_id);
+    if (!enc->bits_per_coded_sample) {
         av_log(s, AV_LOG_ERROR, "could not compute bits per sample\n");
         return -1;
     }
     if (!enc->block_align)
-        enc->block_align = (enc->bits_per_sample * enc->channels) >> 3;
+        enc->block_align = (enc->bits_per_coded_sample * enc->channels) >> 3;
 
-    put_be16(pb, enc->bits_per_sample); /* Sample size */
+    put_be16(pb, enc->bits_per_coded_sample); /* Sample size */
 
     sample_rate = av_dbl2ext((double)enc->sample_rate);
     put_buffer(pb, (uint8_t*)&sample_rate, sizeof(sample_rate));
index 20de1c7e589534b70d60599e4dfe890bc7c4a110..14701d92296150575d8197ed785ce2a51e9d6121 100644 (file)
@@ -62,8 +62,8 @@ static int apc_read_header(AVFormatContext *s, AVFormatParameters *ap)
     if (get_le32(pb))
         st->codec->channels = 2;
 
-    st->codec->bits_per_sample = 4;
-    st->codec->bit_rate = st->codec->bits_per_sample * st->codec->channels
+    st->codec->bits_per_coded_sample = 4;
+    st->codec->bit_rate = st->codec->bits_per_coded_sample * st->codec->channels
                           * st->codec->sample_rate;
     st->codec->block_align = 1;
 
index 4c5d0461e28e5d82b28559168c6ac60e0bc49d9f..5ab92b10e1be0a082f42d7a36530b0279b6080d0 100644 (file)
@@ -424,7 +424,7 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap)
     st->codec->codec_tag       = MKTAG('A', 'P', 'E', ' ');
     st->codec->channels        = ape->channels;
     st->codec->sample_rate     = ape->samplerate;
-    st->codec->bits_per_sample = ape->bps;
+    st->codec->bits_per_coded_sample = ape->bps;
     st->codec->frame_size      = MAC_SUBFRAME_SIZE;
 
     st->nb_frames = ape->totalframes;
index 6d35b8f56da24c72ce01db62646fa47bea6fe1c5..b837e7689160f54da5e96c1359970e7a2ff861b5 100644 (file)
@@ -315,7 +315,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
                 st->codec->height = get_le32(pb);
                 /* not available for asf */
                 get_le16(pb); /* panes */
-                st->codec->bits_per_sample = get_le16(pb); /* depth */
+                st->codec->bits_per_coded_sample = get_le16(pb); /* depth */
                 tag1 = get_le32(pb);
                 url_fskip(pb, 20);
 //                av_log(NULL, AV_LOG_DEBUG, "size:%d tsize:%d sizeX:%d\n", size, total_size, sizeX);
@@ -329,7 +329,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
         /* Extract palette from extradata if bpp <= 8 */
         /* This code assumes that extradata contains only palette */
         /* This is true for all paletted codecs implemented in ffmpeg */
-        if (st->codec->extradata_size && (st->codec->bits_per_sample <= 8)) {
+        if (st->codec->extradata_size && (st->codec->bits_per_coded_sample <= 8)) {
             st->codec->palctrl = av_mallocz(sizeof(AVPaletteControl));
 #ifdef WORDS_BIGENDIAN
             for (i = 0; i < FFMIN(st->codec->extradata_size, AVPALETTE_SIZE)/4; i++)
index ae19e5303314955531594bcf0b3c0de7b7657909..b4494f7fbd36658502e6fcf8d4008528030430a3 100644 (file)
@@ -445,7 +445,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
                     st->codec->width = get_le32(pb);
                     st->codec->height = get_le32(pb);
                     get_le16(pb); /* panes */
-                    st->codec->bits_per_sample= get_le16(pb); /* depth */
+                    st->codec->bits_per_coded_sample= get_le16(pb); /* depth */
                     tag1 = get_le32(pb);
                     get_le32(pb); /* ImageSize */
                     get_le32(pb); /* XPelsPerMeter */
@@ -472,7 +472,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
                     /* Extract palette from extradata if bpp <= 8. */
                     /* This code assumes that extradata contains only palette. */
                     /* This is true for all paletted codecs implemented in FFmpeg. */
-                    if (st->codec->extradata_size && (st->codec->bits_per_sample <= 8)) {
+                    if (st->codec->extradata_size && (st->codec->bits_per_coded_sample <= 8)) {
                         st->codec->palctrl = av_mallocz(sizeof(AVPaletteControl));
 #ifdef WORDS_BIGENDIAN
                         for (i = 0; i < FFMIN(st->codec->extradata_size, AVPALETTE_SIZE)/4; i++)
index 16be4dc617edab395bb49e859c2fc9b1ccb93433..6fcb23010038a80a0e85932b74e7a0ecb68658de 100644 (file)
@@ -182,7 +182,7 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt)
                     avs->st_video->codec->codec_id = CODEC_ID_AVS;
                     avs->st_video->codec->width = avs->width;
                     avs->st_video->codec->height = avs->height;
-                    avs->st_video->codec->bits_per_sample=avs->bits_per_sample;
+                    avs->st_video->codec->bits_per_coded_sample=avs->bits_per_sample;
                     avs->st_video->nb_frames = avs->nb_frames;
                     avs->st_video->codec->time_base = (AVRational) {
                     1, avs->fps};
index e3024c22b8127180bcb22e33cfe21d4e44c63477..a80b105e2c5dd6e72ebc22960ce45d7cac2622b3 100644 (file)
@@ -89,8 +89,8 @@ static int vid_read_header(AVFormatContext *s,
     stream->codec->codec_id = CODEC_ID_PCM_U8;
     stream->codec->channels = 1;
     stream->codec->sample_rate = 11025;
-    stream->codec->bits_per_sample = 8;
-    stream->codec->bit_rate = stream->codec->channels * stream->codec->sample_rate * stream->codec->bits_per_sample;
+    stream->codec->bits_per_coded_sample = 8;
+    stream->codec->bit_rate = stream->codec->channels * stream->codec->sample_rate * stream->codec->bits_per_coded_sample;
 
     return 0;
 }
@@ -197,7 +197,7 @@ static int vid_read_packet(AVFormatContext *s,
             get_le16(pb);
             // soundblaster DAC used for sample rate, as on specification page (link above)
             s->streams[1]->codec->sample_rate = 1000000 / (256 - get_byte(pb));
-            s->streams[1]->codec->bit_rate = s->streams[1]->codec->channels * s->streams[1]->codec->sample_rate * s->streams[1]->codec->bits_per_sample;
+            s->streams[1]->codec->bit_rate = s->streams[1]->codec->channels * s->streams[1]->codec->sample_rate * s->streams[1]->codec->bits_per_coded_sample;
         case AUDIO_BLOCK:
             audio_length = get_le16(pb);
             ret_value = av_get_packet(pb, pkt, audio_length);
index 5a8d56919d79d1670ad573d01352f4a9c066d6d7..c6efdd47e0d61414365f9f57d1f85def078d38cb 100644 (file)
@@ -94,9 +94,9 @@ static int bfi_read_header(AVFormatContext * s, AVFormatParameters * ap)
     astream->codec->codec_type      = CODEC_TYPE_AUDIO;
     astream->codec->codec_id        = CODEC_ID_PCM_U8;
     astream->codec->channels        = 1;
-    astream->codec->bits_per_sample = 8;
+    astream->codec->bits_per_coded_sample = 8;
     astream->codec->bit_rate        =
-        astream->codec->sample_rate * astream->codec->bits_per_sample;
+        astream->codec->sample_rate * astream->codec->bits_per_coded_sample;
     url_fseek(pb, chunk_header - 3, SEEK_SET);
     av_set_pts_info(astream, 64, 1, astream->codec->sample_rate);
     return 0;
index c0626dfb240c7d8f90f0e8e6dffa2c923e0be3a9..2bca9478ea4b42494f8f7bd71925883f0cc7c199 100644 (file)
@@ -31,7 +31,7 @@ static int daud_header(AVFormatContext *s, AVFormatParameters *ap) {
     st->codec->sample_rate = 96000;
     st->codec->bit_rate = 3 * 6 * 96000 * 8;
     st->codec->block_align = 3 * 6;
-    st->codec->bits_per_sample = 24;
+    st->codec->bits_per_coded_sample = 24;
     return 0;
 }
 
index eef205cf5538ec76b83a7e28f91181ade35831ae..945bacbb475bf92346696d3d19dab7eecd244771 100644 (file)
@@ -130,9 +130,9 @@ static int cin_read_header(AVFormatContext *s, AVFormatParameters *ap)
     st->codec->codec_tag = 0;  /* no tag */
     st->codec->channels = 1;
     st->codec->sample_rate = 22050;
-    st->codec->bits_per_sample = 16;
-    st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_sample * st->codec->channels;
-    st->codec->block_align = st->codec->channels * st->codec->bits_per_sample;
+    st->codec->bits_per_coded_sample = 16;
+    st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_coded_sample * st->codec->channels;
+    st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;
 
     return 0;
 }
index 2e627792c3c9ce65446ef3d64cc61a9f3dc0665c..09da524ffd6246e0d40213e962057f77e34dbd9f 100644 (file)
@@ -411,10 +411,10 @@ static int ea_read_header(AVFormatContext *s,
         st->codec->codec_tag = 0;  /* no tag */
         st->codec->channels = ea->num_channels;
         st->codec->sample_rate = ea->sample_rate;
-        st->codec->bits_per_sample = ea->bytes * 8;
+        st->codec->bits_per_coded_sample = ea->bytes * 8;
         st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
-            st->codec->bits_per_sample / 4;
-        st->codec->block_align = st->codec->channels*st->codec->bits_per_sample;
+            st->codec->bits_per_coded_sample / 4;
+        st->codec->block_align = st->codec->channels*st->codec->bits_per_coded_sample;
         ea->audio_stream_index = st->index;
         ea->audio_frame_counter = 0;
     }
index ff6f98106dda1006c34298e28558fcab57f4e89d..e548fb4a8504932a7d88badfb34b2ffa0b083a9d 100644 (file)
@@ -42,7 +42,7 @@ static void flv_set_audio_codec(AVFormatContext *s, AVStream *astream, int flv_c
     switch(flv_codecid) {
         //no distinction between S16 and S8 PCM codec flags
         case FLV_CODECID_PCM:
-            acodec->codec_id = acodec->bits_per_sample == 8 ? CODEC_ID_PCM_S8 :
+            acodec->codec_id = acodec->bits_per_coded_sample == 8 ? CODEC_ID_PCM_S8 :
 #ifdef WORDS_BIGENDIAN
                                 CODEC_ID_PCM_S16BE;
 #else
@@ -50,7 +50,7 @@ static void flv_set_audio_codec(AVFormatContext *s, AVStream *astream, int flv_c
 #endif
             break;
         case FLV_CODECID_PCM_LE:
-            acodec->codec_id = acodec->bits_per_sample == 8 ? CODEC_ID_PCM_S8 : CODEC_ID_PCM_S16LE; break;
+            acodec->codec_id = acodec->bits_per_coded_sample == 8 ? CODEC_ID_PCM_S8 : CODEC_ID_PCM_S16LE; break;
         case FLV_CODECID_AAC  : acodec->codec_id = CODEC_ID_AAC;                                    break;
         case FLV_CODECID_ADPCM: acodec->codec_id = CODEC_ID_ADPCM_SWF;                              break;
         case FLV_CODECID_SPEEX: acodec->codec_id = CODEC_ID_SPEEX;                                  break;
@@ -185,7 +185,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst
             else if(!strcmp(key, "videocodecid") && vcodec && 0 <= (int)num_val)
                 flv_set_video_codec(s, vstream, (int)num_val);
             else if(!strcmp(key, "audiosamplesize") && acodec && 0 < (int)num_val) {
-                acodec->bits_per_sample = num_val;
+                acodec->bits_per_coded_sample = num_val;
                 //we may have to rewrite a previously read codecid because FLV only marks PCM endianness.
                 if(num_val == 8 && (acodec->codec_id == CODEC_ID_PCM_S16BE || acodec->codec_id == CODEC_ID_PCM_S16LE))
                     acodec->codec_id = CODEC_ID_PCM_S8;
@@ -382,13 +382,13 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
     }
 
     if(is_audio){
-        if(!st->codec->sample_rate || !st->codec->bits_per_sample || (!st->codec->codec_id && !st->codec->codec_tag)) {
+        if(!st->codec->sample_rate || !st->codec->bits_per_coded_sample || (!st->codec->codec_id && !st->codec->codec_tag)) {
             st->codec->channels = (flags & FLV_AUDIO_CHANNEL_MASK) == FLV_STEREO ? 2 : 1;
             if((flags & FLV_AUDIO_CODECID_MASK) == FLV_CODECID_NELLYMOSER_8HZ_MONO)
                 st->codec->sample_rate= 8000;
             else
                 st->codec->sample_rate = (44100 << ((flags & FLV_AUDIO_SAMPLERATE_MASK) >> FLV_AUDIO_SAMPLERATE_OFFSET) >> 3);
-            st->codec->bits_per_sample = (flags & FLV_AUDIO_SAMPLESIZE_MASK) ? 16 : 8;
+            st->codec->bits_per_coded_sample = (flags & FLV_AUDIO_SAMPLESIZE_MASK) ? 16 : 8;
             flv_set_audio_codec(s, st, flags & FLV_AUDIO_CODECID_MASK);
         }
     }else{
index 81c43bf4c970e7aca2a7a6d2c7518eadfb814df4..16c18d9c519f8b682729571aa21843d786d4edc1 100644 (file)
@@ -55,7 +55,7 @@ typedef struct FLVContext {
 } FLVContext;
 
 static int get_audio_flags(AVCodecContext *enc){
-    int flags = (enc->bits_per_sample == 16) ? FLV_SAMPLESSIZE_16BIT : FLV_SAMPLESSIZE_8BIT;
+    int flags = (enc->bits_per_coded_sample == 16) ? FLV_SAMPLESSIZE_16BIT : FLV_SAMPLESSIZE_8BIT;
 
     if (enc->codec_id == CODEC_ID_AAC) // specs force these parameters
         return FLV_CODECID_AAC | FLV_SAMPLERATE_44100HZ | FLV_SAMPLESSIZE_16BIT | FLV_STEREO;
index 43193beb72d3ed14b2ec48097e3b09b88bfa2517..dbc069c1935e04c6851d28c8abdf4071a31d6078 100644 (file)
@@ -120,7 +120,7 @@ static int get_sindex(AVFormatContext *s, int id, int format) {
             st->codec->sample_rate = 48000;
             st->codec->bit_rate = 3 * 1 * 48000 * 8;
             st->codec->block_align = 3 * 1;
-            st->codec->bits_per_sample = 24;
+            st->codec->bits_per_coded_sample = 24;
             break;
         case 10:
             st->codec->codec_type = CODEC_TYPE_AUDIO;
@@ -129,7 +129,7 @@ static int get_sindex(AVFormatContext *s, int id, int format) {
             st->codec->sample_rate = 48000;
             st->codec->bit_rate = 2 * 1 * 48000 * 8;
             st->codec->block_align = 2 * 1;
-            st->codec->bits_per_sample = 16;
+            st->codec->bits_per_coded_sample = 16;
             break;
         case 17:
             st->codec->codec_type = CODEC_TYPE_AUDIO;
index 1a8e558e5d912160fc99c2257853fde4c1516500..55ad28b080fc4f41f69bb9e166e6baed0b16331e 100644 (file)
@@ -181,7 +181,7 @@ static int idcin_read_header(AVFormatContext *s,
         st->codec->codec_tag = 1;
         st->codec->channels = channels;
         st->codec->sample_rate = sample_rate;
-        st->codec->bits_per_sample = bytes_per_sample * 8;
+        st->codec->bits_per_coded_sample = bytes_per_sample * 8;
         st->codec->bit_rate = sample_rate * bytes_per_sample * 8 * channels;
         st->codec->block_align = bytes_per_sample * channels;
         if (bytes_per_sample == 1)
index 801f3dc4500ef6918a1bd2d986797cd09a6abec5..b5dae21b04dff59fda7308ae4bd01f21d804eddc 100644 (file)
@@ -161,10 +161,10 @@ static int roq_read_header(AVFormatContext *s,
         st->codec->codec_tag = 0;  /* no tag */
         st->codec->channels = roq->audio_channels;
         st->codec->sample_rate = RoQ_AUDIO_SAMPLE_RATE;
-        st->codec->bits_per_sample = 16;
+        st->codec->bits_per_coded_sample = 16;
         st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
-            st->codec->bits_per_sample;
-        st->codec->block_align = st->codec->channels * st->codec->bits_per_sample;
+            st->codec->bits_per_coded_sample;
+        st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;
     }
 
     return 0;
index a996a7fbc200fa8acde3b3f17fb203423a4fe47c..1fb94c057a55f0c65c7424eb8dcbbd9ac0035ce0 100644 (file)
@@ -149,9 +149,9 @@ static int iff_read_header(AVFormatContext *s,
         return -1;
     }
 
-    st->codec->bits_per_sample = 8;
-    st->codec->bit_rate = st->codec->channels * st->codec->sample_rate * st->codec->bits_per_sample;
-    st->codec->block_align = st->codec->channels * st->codec->bits_per_sample;
+    st->codec->bits_per_coded_sample = 8;
+    st->codec->bit_rate = st->codec->channels * st->codec->sample_rate * st->codec->bits_per_coded_sample;
+    st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;
 
     return 0;
 }
index c2c5585daa75a94e003ecbbe413967175814c25b..839e099a5e960b4d8b7399e34198f4243b158659 100644 (file)
@@ -574,12 +574,12 @@ static int ipmovie_read_header(AVFormatContext *s,
         st->codec->codec_tag = 0;  /* no tag */
         st->codec->channels = ipmovie->audio_channels;
         st->codec->sample_rate = ipmovie->audio_sample_rate;
-        st->codec->bits_per_sample = ipmovie->audio_bits;
+        st->codec->bits_per_coded_sample = ipmovie->audio_bits;
         st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
-            st->codec->bits_per_sample;
+            st->codec->bits_per_coded_sample;
         if (st->codec->codec_id == CODEC_ID_INTERPLAY_DPCM)
             st->codec->bit_rate /= 2;
-        st->codec->block_align = st->codec->channels * st->codec->bits_per_sample;
+        st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;
     }
 
     return 0;
index d23df6345468498fa2027c983479c44728b9a25e..3941bee14ad5e905e893290beb5249b6b6691607 100644 (file)
@@ -248,8 +248,8 @@ static int mmf_read_header(AVFormatContext *s,
     st->codec->codec_id = CODEC_ID_ADPCM_YAMAHA;
     st->codec->sample_rate = rate;
     st->codec->channels = 1;
-    st->codec->bits_per_sample = 4;
-    st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_sample;
+    st->codec->bits_per_coded_sample = 4;
+    st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_coded_sample;
 
     av_set_pts_info(st, 64, 1, st->codec->sample_rate);
 
index 2cd73d702ffd14ce4ea446d7e7d15b10acb9c3d6..73ed11ddade5c5093865d1f084d6bb2bf7debfd0 100644 (file)
@@ -796,13 +796,13 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
                 st->codec->codec_name[codec_name[0]] = 0;
             }
 
-            st->codec->bits_per_sample = get_be16(pb); /* depth */
+            st->codec->bits_per_coded_sample = get_be16(pb); /* depth */
             st->codec->color_table_id = get_be16(pb); /* colortable id */
             dprintf(c->fc, "depth %d, ctab id %d\n",
-                   st->codec->bits_per_sample, st->codec->color_table_id);
+                   st->codec->bits_per_coded_sample, st->codec->color_table_id);
             /* figure out the palette situation */
-            color_depth = st->codec->bits_per_sample & 0x1F;
-            color_greyscale = st->codec->bits_per_sample & 0x20;
+            color_depth = st->codec->bits_per_coded_sample & 0x1F;
+            color_greyscale = st->codec->bits_per_coded_sample & 0x20;
 
             /* if the depth is 2, 4, or 8 bpp, file is palettized */
             if ((color_depth == 2) || (color_depth == 4) ||
@@ -814,7 +814,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
                 if (color_greyscale) {
                     int color_index, color_dec;
                     /* compute the greyscale palette */
-                    st->codec->bits_per_sample = color_depth;
+                    st->codec->bits_per_coded_sample = color_depth;
                     color_count = 1 << color_depth;
                     color_index = 255;
                     color_dec = 256 / (color_count - 1);
@@ -882,7 +882,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
 
             st->codec->channels = get_be16(pb);             /* channel count */
             dprintf(c->fc, "audio channels %d\n", st->codec->channels);
-            st->codec->bits_per_sample = get_be16(pb);      /* sample size */
+            st->codec->bits_per_coded_sample = get_be16(pb);      /* sample size */
 
             sc->audio_cid = get_be16(pb);
             get_be16(pb); /* packet size = 0 */
@@ -902,26 +902,26 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
                     st->codec->sample_rate = av_int2dbl(get_be64(pb)); /* float 64 */
                     st->codec->channels = get_be32(pb);
                     get_be32(pb); /* always 0x7F000000 */
-                    st->codec->bits_per_sample = get_be32(pb); /* bits per channel if sound is uncompressed */
+                    st->codec->bits_per_coded_sample = get_be32(pb); /* bits per channel if sound is uncompressed */
                     flags = get_be32(pb); /* lcpm format specific flag */
                     sc->bytes_per_frame = get_be32(pb); /* bytes per audio packet if constant */
                     sc->samples_per_frame = get_be32(pb); /* lpcm frames per audio packet if constant */
                     if (format == MKTAG('l','p','c','m'))
-                        st->codec->codec_id = mov_get_lpcm_codec_id(st->codec->bits_per_sample, flags);
+                        st->codec->codec_id = mov_get_lpcm_codec_id(st->codec->bits_per_coded_sample, flags);
                 }
             }
 
             switch (st->codec->codec_id) {
             case CODEC_ID_PCM_S8:
             case CODEC_ID_PCM_U8:
-                if (st->codec->bits_per_sample == 16)
+                if (st->codec->bits_per_coded_sample == 16)
                     st->codec->codec_id = CODEC_ID_PCM_S16BE;
                 break;
             case CODEC_ID_PCM_S16LE:
             case CODEC_ID_PCM_S16BE:
-                if (st->codec->bits_per_sample == 8)
+                if (st->codec->bits_per_coded_sample == 8)
                     st->codec->codec_id = CODEC_ID_PCM_S8;
-                else if (st->codec->bits_per_sample == 24)
+                else if (st->codec->bits_per_coded_sample == 24)
                     st->codec->codec_id =
                         st->codec->codec_id == CODEC_ID_PCM_S16BE ?
                         CODEC_ID_PCM_S24BE : CODEC_ID_PCM_S24LE;
@@ -949,7 +949,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
 
             bits_per_sample = av_get_bits_per_sample(st->codec->codec_id);
             if (bits_per_sample) {
-                st->codec->bits_per_sample = bits_per_sample;
+                st->codec->bits_per_coded_sample = bits_per_sample;
                 sc->sample_size = (bits_per_sample >> 3) * st->codec->channels;
             }
         } else if(st->codec->codec_type==CODEC_TYPE_SUBTITLE){
index f1afa82a5c128ac0ad03b8be762df0f5cdb533b7..8ddc8e9e24a6345bf62d4df3e15bdb8adb003362 100644 (file)
@@ -684,8 +684,8 @@ static int mov_write_video_tag(ByteIOContext *pb, MOVTrack *track)
     put_byte(pb, strlen(compressor_name));
     put_buffer(pb, compressor_name, 31);
 
-    if (track->mode == MODE_MOV && track->enc->bits_per_sample)
-        put_be16(pb, track->enc->bits_per_sample);
+    if (track->mode == MODE_MOV && track->enc->bits_per_coded_sample)
+        put_be16(pb, track->enc->bits_per_coded_sample);
     else
         put_be16(pb, 0x18); /* Reserved */
     put_be16(pb, 0xffff); /* Reserved */
index 7ed574d866f1c96213f96e36968846dfe77b2730..1a22c113b0536188bd3acb5ea008f569cb32058f 100644 (file)
@@ -97,7 +97,7 @@ static int mpc_read_header(AVFormatContext *s, AVFormatParameters *ap)
     st->codec->codec_type = CODEC_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_MUSEPACK7;
     st->codec->channels = 2;
-    st->codec->bits_per_sample = 16;
+    st->codec->bits_per_coded_sample = 16;
 
     st->codec->extradata_size = 16;
     st->codec->extradata = av_mallocz(st->codec->extradata_size+FF_INPUT_BUFFER_PADDING_SIZE);
index 6ede777b5fe901935bcf34763949e82c856ddd35..9487b99496fa2c03be73eff6bf18da70f9049060 100644 (file)
@@ -182,7 +182,7 @@ static int mpc8_read_header(AVFormatContext *s, AVFormatParameters *ap)
         return AVERROR(ENOMEM);
     st->codec->codec_type = CODEC_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_MUSEPACK8;
-    st->codec->bits_per_sample = 16;
+    st->codec->bits_per_coded_sample = 16;
 
     st->codec->extradata_size = 2;
     st->codec->extradata = av_mallocz(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
index 0d9b9fde7fa8ecc467adb5a5c1e492a0ab33cb13..289be8caf6c612b018c2fa594c6d0db311773b3c 100644 (file)
@@ -520,13 +520,13 @@ static int mpegps_read_packet(AVFormatContext *s,
         freq = (b1 >> 4) & 3;
         st->codec->sample_rate = lpcm_freq_tab[freq];
         st->codec->channels = 1 + (b1 & 7);
-        st->codec->bits_per_sample = 16 + ((b1 >> 6) & 3) * 4;
+        st->codec->bits_per_coded_sample = 16 + ((b1 >> 6) & 3) * 4;
         st->codec->bit_rate = st->codec->channels *
                               st->codec->sample_rate *
-                              st->codec->bits_per_sample;
-        if (st->codec->bits_per_sample == 16)
+                              st->codec->bits_per_coded_sample;
+        if (st->codec->bits_per_coded_sample == 16)
             st->codec->codec_id = CODEC_ID_PCM_S16BE;
-        else if (st->codec->bits_per_sample == 28)
+        else if (st->codec->bits_per_coded_sample == 28)
             return AVERROR(EINVAL);
     }
     av_new_packet(pkt, len);
index d97b9cdd856c032ab700a24d113f0cbbb7063479..75da0e76e304c122f436a828d37d4a88e9eb640c 100644 (file)
@@ -102,7 +102,7 @@ static int mtv_read_header(AVFormatContext *s, AVFormatParameters *ap)
     st->codec->codec_tag       = MKTAG('R', 'G', 'B', mtv->img_bpp);
     st->codec->width           = mtv->img_width;
     st->codec->height          = mtv->img_height;
-    st->codec->bits_per_sample = mtv->img_bpp;
+    st->codec->bits_per_coded_sample = mtv->img_bpp;
     st->codec->sample_rate     = mtv->video_fps;
 
     /* audio - mp3 */
index 03d4a5d6b50eb305e2145193ef87e1f581ccbc83..2dc4667a68d5c1dddb3e411fffe3057e80b8db78 100644 (file)
@@ -80,7 +80,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
     ast->codec->codec_type      = CODEC_TYPE_AUDIO;
     ast->codec->codec_id        = CODEC_ID_PCM_U8;
     ast->codec->channels        = 1;
-    ast->codec->bits_per_sample = 8;
+    ast->codec->bits_per_coded_sample = 8;
     ast->codec->bit_rate        = ast->codec->sample_rate * 8;
 
     av_set_pts_info(vst, 64, msecs_per_frame, 1000000);
index 2bf0cbc224bec8fc12abfce6c6472e6d66387f89..913848fa8fad61d2faedf5a65ea672c0e25c85c6 100644 (file)
@@ -222,7 +222,7 @@ static int mxf_get_d10_aes3_packet(ByteIOContext *pb, AVStream *st, AVPacket *pk
     for (; buf_ptr < end_ptr; ) {
         for (i = 0; i < st->codec->channels; i++) {
             uint32_t sample = bytestream_get_le32(&buf_ptr);
-            if (st->codec->bits_per_sample == 24)
+            if (st->codec->bits_per_coded_sample == 24)
                 bytestream_put_le24(&data_ptr, (sample >> 4) & 0xffffff);
             else
                 bytestream_put_le16(&data_ptr, (sample >> 12) & 0xffff);
@@ -788,7 +788,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
                 st->codec->codec_id = container_ul->id;
             st->codec->width = descriptor->width;
             st->codec->height = descriptor->height;
-            st->codec->bits_per_sample = descriptor->bits_per_sample; /* Uncompressed */
+            st->codec->bits_per_coded_sample = descriptor->bits_per_sample; /* Uncompressed */
             st->sample_aspect_ratio = descriptor->aspect_ratio;
             st->need_parsing = AVSTREAM_PARSE_HEADERS;
         } else if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
@@ -796,7 +796,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
             if (st->codec->codec_id == CODEC_ID_NONE)
                 st->codec->codec_id = container_ul->id;
             st->codec->channels = descriptor->channels;
-            st->codec->bits_per_sample = descriptor->bits_per_sample;
+            st->codec->bits_per_coded_sample = descriptor->bits_per_sample;
             st->codec->sample_rate = descriptor->sample_rate.num / descriptor->sample_rate.den;
             /* TODO: implement CODEC_ID_RAWAUDIO */
             if (st->codec->codec_id == CODEC_ID_PCM_S16LE) {
index 1d36f447572fd24ee74e4e66229c79dc1a2e1650..c649870aac3c0737d2d58377207fce4d4cca4e72 100644 (file)
@@ -588,7 +588,7 @@ static void mxf_write_wav_desc(AVFormatContext *s, AVStream *st)
     put_be32(pb, st->codec->channels);
 
     mxf_write_local_tag(pb, 4, 0x3D01);
-    put_be32(pb, st->codec->bits_per_sample);
+    put_be32(pb, st->codec->bits_per_coded_sample);
 }
 
 static void mxf_write_package(AVFormatContext *s, enum MXFMetadataSetType type)
index 9fdb1a8796cd2344f54d065800a70924a569d63c..dbc2d00a24be8fa8370f35ab56f8aaa1301e1ef2 100644 (file)
@@ -456,7 +456,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap)
             st->codec->codec_id = codec_get_id(nsv_codec_video_tags, vtag);
             st->codec->width = vwidth;
             st->codec->height = vheight;
-            st->codec->bits_per_sample = 24; /* depth XXX */
+            st->codec->bits_per_coded_sample = 24; /* depth XXX */
 
             av_set_pts_info(st, 64, framerate.den, framerate.num);
             st->start_time = 0;
index c3439c12bc79b92894aaa5313af52829a8465b1c..bd988398ffa8dd29fa2640726524f274e72c58e5 100644 (file)
@@ -93,11 +93,11 @@ static int get_codec_data(ByteIOContext *pb, AVStream *vst,
                 if (ast) {
                     ast->codec->codec_tag = get_le32(pb);
                     ast->codec->sample_rate = get_le32(pb);
-                    ast->codec->bits_per_sample = get_le32(pb);
+                    ast->codec->bits_per_coded_sample = get_le32(pb);
                     ast->codec->channels = get_le32(pb);
                     ast->codec->codec_id =
                         wav_codec_get_id(ast->codec->codec_tag,
-                                         ast->codec->bits_per_sample);
+                                         ast->codec->bits_per_coded_sample);
                     ast->need_parsing = AVSTREAM_PARSE_FULL;
                 } else
                     url_fskip(pb, 4 * 4);
@@ -157,7 +157,7 @@ static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) {
         vst->codec->codec_id = CODEC_ID_NUV;
         vst->codec->width = width;
         vst->codec->height = height;
-        vst->codec->bits_per_sample = 10;
+        vst->codec->bits_per_coded_sample = 10;
         vst->sample_aspect_ratio = av_d2q(aspect * height / width, 10000);
         vst->r_frame_rate = av_d2q(fps, 60000);
         av_set_pts_info(vst, 32, 1, 1000);
@@ -175,7 +175,7 @@ static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) {
         ast->codec->sample_rate = 44100;
         ast->codec->bit_rate = 2 * 2 * 44100 * 8;
         ast->codec->block_align = 2 * 2;
-        ast->codec->bits_per_sample = 16;
+        ast->codec->bits_per_coded_sample = 16;
         av_set_pts_info(ast, 32, 1, 1000);
     } else
         ctx->a_id = -1;
index 95e62481933189740339891195c1db5662461e7b..0cab2650ce01c0a9e77e357c78a7ffe8c6ac7bc2 100644 (file)
@@ -251,8 +251,8 @@ int put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
         if (!(bps = av_get_bits_per_sample(enc->codec_id)))
             bps = 16; // default to 16
     }
-    if(bps != enc->bits_per_sample && enc->bits_per_sample){
-        av_log(enc, AV_LOG_WARNING, "requested bits_per_sample (%d) and actually stored (%d) differ\n", enc->bits_per_sample, bps);
+    if(bps != enc->bits_per_coded_sample && enc->bits_per_coded_sample){
+        av_log(enc, AV_LOG_WARNING, "requested bits_per_coded_sample (%d) and actually stored (%d) differ\n", enc->bits_per_coded_sample, bps);
     }
 
     if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3 || enc->codec_id == CODEC_ID_AC3) {
@@ -327,7 +327,7 @@ void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const AVCodecTag *ta
     put_le32(pb, enc->height);
     put_le16(pb, 1); /* planes */
 
-    put_le16(pb, enc->bits_per_sample ? enc->bits_per_sample : 24); /* depth */
+    put_le16(pb, enc->bits_per_coded_sample ? enc->bits_per_coded_sample : 24); /* depth */
     /* compression type */
     put_le32(pb, enc->codec_tag);
     put_le32(pb, enc->width * enc->height * 3);
@@ -363,15 +363,15 @@ void get_wav_header(ByteIOContext *pb, AVCodecContext *codec, int size)
     codec->bit_rate = get_le32(pb) * 8;
     codec->block_align = get_le16(pb);
     if (size == 14) {  /* We're dealing with plain vanilla WAVEFORMAT */
-        codec->bits_per_sample = 8;
+        codec->bits_per_coded_sample = 8;
     }else
-        codec->bits_per_sample = get_le16(pb);
+        codec->bits_per_coded_sample = get_le16(pb);
     if (size >= 18) {  /* We're obviously dealing with WAVEFORMATEX */
         int cbSize = get_le16(pb); /* cbSize */
         size -= 18;
         cbSize = FFMIN(size, cbSize);
         if (cbSize >= 22 && id == 0xfffe) { /* WAVEFORMATEXTENSIBLE */
-            codec->bits_per_sample = get_le16(pb);
+            codec->bits_per_coded_sample = get_le16(pb);
             get_le32(pb); /* dwChannelMask */
             id = get_le32(pb); /* 4 first bytes of GUID */
             url_fskip(pb, 12); /* skip end of GUID */
@@ -389,7 +389,7 @@ void get_wav_header(ByteIOContext *pb, AVCodecContext *codec, int size)
         if (size > 0)
             url_fskip(pb, size);
     }
-    codec->codec_id = wav_codec_get_id(id, codec->bits_per_sample);
+    codec->codec_id = wav_codec_get_id(id, codec->bits_per_coded_sample);
 }
 
 
index 407867fb5bb7ea4d5ea868e26f200510573de5da..5bab85b331fb15399c8a48c79dca9b2da9d5f65c 100644 (file)
@@ -148,12 +148,12 @@ static av_cold int rl2_read_header(AVFormatContext *s,
         st->codec->codec_id = CODEC_ID_PCM_U8;
         st->codec->codec_tag = 1;
         st->codec->channels = channels;
-        st->codec->bits_per_sample = 8;
+        st->codec->bits_per_coded_sample = 8;
         st->codec->sample_rate = rate;
         st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
-            st->codec->bits_per_sample;
+            st->codec->bits_per_coded_sample;
         st->codec->block_align = st->codec->channels *
-            st->codec->bits_per_sample / 8;
+            st->codec->bits_per_coded_sample / 8;
         av_set_pts_info(st,32,1,rate);
     }
 
index 7340e18e632242232a8dd75110c68c8309a4968f..dd5dedf817580eb74e6793254b72cf1641319230 100644 (file)
@@ -142,7 +142,7 @@ static int rpl_read_header(AVFormatContext *s, AVFormatParameters *ap)
     vst->codec->codec_tag       = read_line_and_int(pb, &error);  // video format
     vst->codec->width           = read_line_and_int(pb, &error);  // video width
     vst->codec->height          = read_line_and_int(pb, &error);  // video height
-    vst->codec->bits_per_sample = read_line_and_int(pb, &error);  // video bits per sample
+    vst->codec->bits_per_coded_sample = read_line_and_int(pb, &error);  // video bits per sample
     error |= read_line(pb, line, sizeof(line));                   // video frames per second
     fps = read_fps(line, &error);
     av_set_pts_info(vst, 32, fps.den, fps.num);
@@ -157,7 +157,7 @@ static int rpl_read_header(AVFormatContext *s, AVFormatParameters *ap)
         case 124:
             vst->codec->codec_id = CODEC_ID_ESCAPE124;
             // The header is wrong here, at least sometimes
-            vst->codec->bits_per_sample = 16;
+            vst->codec->bits_per_coded_sample = 16;
             break;
 #if 0
         case 130:
@@ -184,20 +184,20 @@ static int rpl_read_header(AVFormatContext *s, AVFormatParameters *ap)
         ast->codec->codec_tag       = audio_format;
         ast->codec->sample_rate     = read_line_and_int(pb, &error);  // audio bitrate
         ast->codec->channels        = read_line_and_int(pb, &error);  // number of audio channels
-        ast->codec->bits_per_sample = read_line_and_int(pb, &error);  // audio bits per sample
+        ast->codec->bits_per_coded_sample = read_line_and_int(pb, &error);  // audio bits per sample
         // At least one sample uses 0 for ADPCM, which is really 4 bits
         // per sample.
-        if (ast->codec->bits_per_sample == 0)
-            ast->codec->bits_per_sample = 4;
+        if (ast->codec->bits_per_coded_sample == 0)
+            ast->codec->bits_per_coded_sample = 4;
 
         ast->codec->bit_rate = ast->codec->sample_rate *
-                               ast->codec->bits_per_sample *
+                               ast->codec->bits_per_coded_sample *
                                ast->codec->channels;
 
         ast->codec->codec_id = CODEC_ID_NONE;
         switch (audio_format) {
             case 1:
-                if (ast->codec->bits_per_sample == 16) {
+                if (ast->codec->bits_per_coded_sample == 16) {
                     // 16-bit audio is always signed
                     ast->codec->codec_id = CODEC_ID_PCM_S16LE;
                     break;
@@ -206,12 +206,12 @@ static int rpl_read_header(AVFormatContext *s, AVFormatParameters *ap)
                 // samples needed.
                 break;
             case 101:
-                if (ast->codec->bits_per_sample == 8) {
+                if (ast->codec->bits_per_coded_sample == 8) {
                     // The samples with this kind of audio that I have
                     // are all unsigned.
                     ast->codec->codec_id = CODEC_ID_PCM_U8;
                     break;
-                } else if (ast->codec->bits_per_sample == 4) {
+                } else if (ast->codec->bits_per_coded_sample == 4) {
                     ast->codec->codec_id = CODEC_ID_ADPCM_IMA_EA_SEAD;
                     break;
                 }
index 4c6d138d6be27d243032809c1871145fddc31902..4bc46c2773fd3889728f26a9e5804e3d42e28746 100644 (file)
@@ -148,12 +148,12 @@ static int film_read_header(AVFormatContext *s,
         st->codec->codec_id = film->audio_type;
         st->codec->codec_tag = 1;
         st->codec->channels = film->audio_channels;
-        st->codec->bits_per_sample = film->audio_bits;
+        st->codec->bits_per_coded_sample = film->audio_bits;
         st->codec->sample_rate = film->audio_samplerate;
         st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
-            st->codec->bits_per_sample;
+            st->codec->bits_per_coded_sample;
         st->codec->block_align = st->codec->channels *
-            st->codec->bits_per_sample / 8;
+            st->codec->bits_per_coded_sample / 8;
     }
 
     /* load the sample table */
index 7b0e70071883cecfa2567f360f853d73dc0cb310..20c4f58022b86f41819c04060d31a1d4b464548f 100644 (file)
@@ -120,13 +120,13 @@ static int vmd_read_header(AVFormatContext *s,
         st->codec->sample_rate = vmd->sample_rate;
         st->codec->block_align = AV_RL16(&vmd->vmd_header[806]);
         if (st->codec->block_align & 0x8000) {
-            st->codec->bits_per_sample = 16;
+            st->codec->bits_per_coded_sample = 16;
             st->codec->block_align = -(st->codec->block_align - 0x10000);
         } else {
-            st->codec->bits_per_sample = 8;
+            st->codec->bits_per_coded_sample = 8;
         }
         st->codec->bit_rate = st->codec->sample_rate *
-            st->codec->bits_per_sample * st->codec->channels;
+            st->codec->bits_per_coded_sample * st->codec->channels;
 
         /* calculate pts */
         num = st->codec->block_align;
index 30bd307c9736e439ce8861387b83c0157c58ed5e..63fe80dadbe457bb53b51b24b8d294850730a934 100644 (file)
@@ -75,7 +75,7 @@ static int create_audio_stream(AVFormatContext *s, SIFFContext *c)
     ast->codec->codec_type      = CODEC_TYPE_AUDIO;
     ast->codec->codec_id        = CODEC_ID_PCM_U8;
     ast->codec->channels        = 1;
-    ast->codec->bits_per_sample = c->bits;
+    ast->codec->bits_per_coded_sample = c->bits;
     ast->codec->sample_rate     = c->rate;
     ast->codec->frame_size      = c->block_align;
     av_set_pts_info(ast, 16, 1, c->rate);
index 8d0b7428baaf2d25295286062ccd3e7b84ace6eb..d11bddc1455163292a57270e7a39cf0d26e80460 100644 (file)
@@ -179,11 +179,11 @@ static int smacker_read_header(AVFormatContext *s, AVFormatParameters *ap)
             ast[i]->codec->codec_tag = MKTAG('S', 'M', 'K', 'A');
             ast[i]->codec->channels = (smk->rates[i] & SMK_AUD_STEREO) ? 2 : 1;
             ast[i]->codec->sample_rate = smk->rates[i] & 0xFFFFFF;
-            ast[i]->codec->bits_per_sample = (smk->rates[i] & SMK_AUD_16BITS) ? 16 : 8;
-            if(ast[i]->codec->bits_per_sample == 16 && ast[i]->codec->codec_id == CODEC_ID_PCM_U8)
+            ast[i]->codec->bits_per_coded_sample = (smk->rates[i] & SMK_AUD_16BITS) ? 16 : 8;
+            if(ast[i]->codec->bits_per_coded_sample == 16 && ast[i]->codec->codec_id == CODEC_ID_PCM_U8)
                 ast[i]->codec->codec_id = CODEC_ID_PCM_S16LE;
             av_set_pts_info(ast[i], 64, 1, ast[i]->codec->sample_rate
-                    * ast[i]->codec->channels * ast[i]->codec->bits_per_sample / 8);
+                    * ast[i]->codec->channels * ast[i]->codec->bits_per_coded_sample / 8);
         }
     }
 
index 00dcb5e2329ca7211fe28c4b52780b12692e6616..7588ff037d446b5971f50f31e9fe60de7350292f 100644 (file)
@@ -230,9 +230,9 @@ static int seq_read_header(AVFormatContext *s, AVFormatParameters *ap)
     st->codec->codec_tag = 0;  /* no tag */
     st->codec->channels = 1;
     st->codec->sample_rate = SEQ_SAMPLE_RATE;
-    st->codec->bits_per_sample = 16;
-    st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_sample * st->codec->channels;
-    st->codec->block_align = st->codec->channels * st->codec->bits_per_sample;
+    st->codec->bits_per_coded_sample = 16;
+    st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_coded_sample * st->codec->channels;
+    st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;
 
     return 0;
 }
index 9a30e1fc87ed4081f1e948dde922cdb258e75a4a..884664c98d011c50f6079b1da169a2c685f3f710 100644 (file)
@@ -91,7 +91,7 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap)
     st->codec->codec_id = CODEC_ID_TTA;
     st->codec->channels = channels;
     st->codec->sample_rate = samplerate;
-    st->codec->bits_per_sample = bps;
+    st->codec->bits_per_coded_sample = bps;
 
     st->codec->extradata_size = url_ftell(s->pb);
     if(st->codec->extradata_size+FF_INPUT_BUFFER_PADDING_SIZE <= (unsigned)st->codec->extradata_size){
index 87376485dd2e4a799a261b8a9f24d4c3a279bc00..e82324f323efd06d0afe95e8de8a987973a0064e 100644 (file)
@@ -2166,7 +2166,7 @@ int av_find_stream_info(AVFormatContext *ic)
     for(i=0;i<ic->nb_streams;i++) {
         st = ic->streams[i];
         if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
-            if(st->codec->codec_id == CODEC_ID_RAWVIDEO && !st->codec->codec_tag && !st->codec->bits_per_sample)
+            if(st->codec->codec_id == CODEC_ID_RAWVIDEO && !st->codec->codec_tag && !st->codec->bits_per_coded_sample)
                 st->codec->codec_tag= avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt);
 
             if(duration_count[i]
@@ -2198,8 +2198,8 @@ int av_find_stream_info(AVFormatContext *ic)
                 }
             }
         }else if(st->codec->codec_type == CODEC_TYPE_AUDIO) {
-            if(!st->codec->bits_per_sample)
-                st->codec->bits_per_sample= av_get_bits_per_sample(st->codec->codec_id);
+            if(!st->codec->bits_per_coded_sample)
+                st->codec->bits_per_coded_sample= av_get_bits_per_sample(st->codec->codec_id);
         }
     }
 
index 178ecb5ac6bd0d2e605402f33180fad24c8f35dc..7aec2ab6df9296c649bf9db1cb862719c285a14d 100644 (file)
@@ -84,7 +84,7 @@ voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
                 dec->sample_rate = sample_rate;
             dec->channels = channels;
             dec->codec_id = codec_get_id(ff_voc_codec_tags, get_byte(pb));
-            dec->bits_per_sample = av_get_bits_per_sample(dec->codec_id);
+            dec->bits_per_coded_sample = av_get_bits_per_sample(dec->codec_id);
             voc->remaining_size -= 2;
             max_size -= 2;
             channels = 1;
@@ -104,7 +104,7 @@ voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
 
         case VOC_TYPE_NEW_VOICE_DATA:
             dec->sample_rate = get_le32(pb);
-            dec->bits_per_sample = get_byte(pb);
+            dec->bits_per_coded_sample = get_byte(pb);
             dec->channels = get_byte(pb);
             dec->codec_id = codec_get_id(ff_voc_codec_tags, get_le16(pb));
             url_fskip(pb, 4);
@@ -120,7 +120,7 @@ voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
         }
     }
 
-    dec->bit_rate = dec->sample_rate * dec->bits_per_sample;
+    dec->bit_rate = dec->sample_rate * dec->bits_per_coded_sample;
 
     if (max_size <= 0)
         max_size = 2048;
index 0802f50e62c18a775200ff66b7f7872fad1ae598..4badb1d5335c68004f48822c286a1866d48fc8f6 100644 (file)
@@ -55,7 +55,7 @@ static int voc_write_packet(AVFormatContext *s, AVPacket *pkt)
             put_byte(pb, VOC_TYPE_NEW_VOICE_DATA);
             put_le24(pb, pkt->size + 12);
             put_le32(pb, enc->sample_rate);
-            put_byte(pb, enc->bits_per_sample);
+            put_byte(pb, enc->bits_per_coded_sample);
             put_byte(pb, enc->channels);
             put_le16(pb, enc->codec_tag);
             put_le32(pb, 0);
index bb9a6e275d8930dee1090c546883a4a64d10582b..df207ef9d9371d03d0cdb5d271d8e4a2679f398c 100644 (file)
@@ -259,10 +259,10 @@ static int wc3_read_header(AVFormatContext *s,
     st->codec->codec_id = CODEC_ID_PCM_S16LE;
     st->codec->codec_tag = 1;
     st->codec->channels = WC3_AUDIO_CHANNELS;
-    st->codec->bits_per_sample = WC3_AUDIO_BITS;
+    st->codec->bits_per_coded_sample = WC3_AUDIO_BITS;
     st->codec->sample_rate = WC3_SAMPLE_RATE;
     st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
-        st->codec->bits_per_sample;
+        st->codec->bits_per_coded_sample;
     st->codec->block_align = WC3_AUDIO_BITS * WC3_AUDIO_CHANNELS;
 
     return 0;
index d1ac63c762f12548235e037a6da45b3014086e31..600863e8377c9012535ce6b6fd99934476e123c6 100644 (file)
@@ -154,10 +154,10 @@ static int wsaud_read_header(AVFormatContext *s,
     st->codec->codec_tag = 0;  /* no tag */
     st->codec->channels = wsaud->audio_channels;
     st->codec->sample_rate = wsaud->audio_samplerate;
-    st->codec->bits_per_sample = wsaud->audio_bits;
+    st->codec->bits_per_coded_sample = wsaud->audio_bits;
     st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
-        st->codec->bits_per_sample / 4;
-    st->codec->block_align = st->codec->channels * st->codec->bits_per_sample;
+        st->codec->bits_per_coded_sample / 4;
+    st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;
 
     wsaud->audio_stream_index = st->index;
     wsaud->audio_frame_counter = 0;
@@ -264,10 +264,10 @@ static int wsvqa_read_header(AVFormatContext *s,
         st->codec->channels = header[26];
         if (!st->codec->channels)
             st->codec->channels = 1;
-        st->codec->bits_per_sample = 16;
+        st->codec->bits_per_coded_sample = 16;
         st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
-            st->codec->bits_per_sample / 4;
-        st->codec->block_align = st->codec->channels * st->codec->bits_per_sample;
+            st->codec->bits_per_coded_sample / 4;
+        st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;
 
         wsvqa->audio_stream_index = st->index;
         wsvqa->audio_samplerate = st->codec->sample_rate;
index eddd32148ad76dc65100773937087cabfa099d46..c9f71f95bd0470c59abb08ce92e8fbb13e26b2d9 100644 (file)
@@ -151,7 +151,7 @@ static int wv_read_header(AVFormatContext *s,
     st->codec->codec_id = CODEC_ID_WAVPACK;
     st->codec->channels = wc->chan;
     st->codec->sample_rate = wc->rate;
-    st->codec->bits_per_sample = wc->bpp;
+    st->codec->bits_per_coded_sample = wc->bpp;
     av_set_pts_info(st, 64, 1, wc->rate);
     s->start_time = 0;
     s->duration = (int64_t)wc->samples * AV_TIME_BASE / st->codec->sample_rate;
index c79df78a48b783a6d8d0720c9bad933b468ccc03..3ea2aaecc9a1f0b06c4ea99ca0f76ec3a50e0186 100644 (file)
@@ -72,7 +72,7 @@ static int xa_read_header(AVFormatContext *s,
     /* Value in file is average byte rate*/
     st->codec->bit_rate     = get_le32(pb) * 8;
     st->codec->block_align  = get_le16(pb);
-    st->codec->bits_per_sample = get_le16(pb);
+    st->codec->bits_per_coded_sample = get_le16(pb);
 
     av_set_pts_info(st, 64, 1, st->codec->sample_rate);
 
index f3f4d822b51ad61f31c257c13f854a5c9187b00a..5626f19a56fbe4a81143724f3eb3bb5396d0143f 100755 (executable)
@@ -180,7 +180,7 @@ do_video_encoding mpeg2.mpg "-qscale 10" "-vcodec mpeg2video -f mpeg1video"
 do_video_decoding
 
 # mpeg2 encoding intra vlc qprd
-do_video_encoding mpeg2ivlc-qprd.mpg "-vb 500k -bf 2 -flags +trell+qprd+mv0 -flags2 +ivlc -cmp 2 -subcmp 2 -mbd rd" "-vcodec mpeg2video -f mpeg2video"
+do_video_encoding mpeg2ivlc-qprd.mpg "-vb 500k -bf 2 -trellis 1 -flags +qprd+mv0 -flags2 +ivlc -cmp 2 -subcmp 2 -mbd rd" "-vcodec mpeg2video -f mpeg2video"
 do_video_decoding
 
 #mpeg2 4:2:2 encoding
@@ -262,13 +262,13 @@ do_video_decoding
 fi
 
 if [ -n "$do_mpeg4adv" ] ; then
-do_video_encoding mpeg4-adv.avi "-qscale 9 -flags +mv4+part+aic+trell -mbd bits -ps 200" "-an -vcodec mpeg4"
+do_video_encoding mpeg4-adv.avi "-qscale 9 -flags +mv4+part+aic -trellis 1 -mbd bits -ps 200" "-an -vcodec mpeg4"
 do_video_decoding
 
-do_video_encoding mpeg4-qprd.avi "-b 450k -bf 2 -flags +mv4+trell+qprd+mv0 -cmp 2 -subcmp 2 -mbd rd" "-an -vcodec mpeg4"
+do_video_encoding mpeg4-qprd.avi "-b 450k -bf 2 -trellis 1 -flags +mv4+qprd+mv0 -cmp 2 -subcmp 2 -mbd rd" "-an -vcodec mpeg4"
 do_video_decoding
 
-do_video_encoding mpeg4-adap.avi "-b 550k -bf 2 -flags +mv4+trell+mv0 -cmp 1 -subcmp 2 -mbd rd -scplx_mask 0.3" "-an -vcodec mpeg4"
+do_video_encoding mpeg4-adap.avi "-b 550k -bf 2 -flags +mv4+mv0 -trellis 1 -cmp 1 -subcmp 2 -mbd rd -scplx_mask 0.3" "-an -vcodec mpeg4"
 do_video_decoding
 
 do_video_encoding mpeg4-Q.avi "-qscale 7 -flags +mv4+qpel -mbd 2 -bf 2 -cmp 1 -subcmp 2" "-an -vcodec mpeg4"
@@ -276,7 +276,7 @@ do_video_decoding
 fi
 
 if [ -n "$do_mpeg4thread" ] ; then
-do_video_encoding mpeg4-thread.avi "-b 500k -flags +mv4+part+aic+trell -mbd bits -ps 200 -bf 2" "-an -vcodec mpeg4 -threads 2"
+do_video_encoding mpeg4-thread.avi "-b 500k -flags +mv4+part+aic -trellis 1 -mbd bits -ps 200 -bf 2" "-an -vcodec mpeg4 -threads 2"
 do_video_decoding
 fi
 
@@ -341,7 +341,7 @@ do_video_decoding
 fi
 
 if [ -n "$do_snow" ] ; then
-do_video_encoding snow.avi "-strict -2" "-an -vcodec snow -qscale 2 -flags +qpel -me iter -dia_size 2 -cmp 12 -subcmp 12 -s 128x64"
+do_video_encoding snow.avi "-strict -2" "-an -vcodec snow -qscale 2 -flags +qpel -me_method iter -dia_size 2 -cmp 12 -subcmp 12 -s 128x64"
 do_video_decoding "" "-s 352x288"
 fi