aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorLuca Abeni <lucabe72@email.it>2008-09-08 14:24:59 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-09-08 14:24:59 +0000
commitdd1c8f3e6e5380f993c86750bb09fd42e130143f (patch)
tree2ae5b2bbda1b685069f4db6ed408097288590dde /libavcodec
parent71375e05006e68fecdeb8d5fa80c3cce52a5cf86 (diff)
downloadffmpeg-dd1c8f3e6e5380f993c86750bb09fd42e130143f.tar.gz
Bump Major version, this commit is almost just renaming bits_per_sample to
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
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/8bps.c4
-rw-r--r--libavcodec/alac.c2
-rw-r--r--libavcodec/alacenc.c10
-rw-r--r--libavcodec/apedec.c2
-rw-r--r--libavcodec/avcodec.h4
-rw-r--r--libavcodec/cinepak.c2
-rw-r--r--libavcodec/cscd.c8
-rw-r--r--libavcodec/huffyuv.c16
-rw-r--r--libavcodec/imgresample.c18
-rw-r--r--libavcodec/lclenc.c2
-rw-r--r--libavcodec/libfaad.c4
-rw-r--r--libavcodec/msrle.c4
-rw-r--r--libavcodec/pcm.c8
-rw-r--r--libavcodec/qtrle.c8
-rw-r--r--libavcodec/qtrleenc.c2
-rw-r--r--libavcodec/rawdec.c10
-rw-r--r--libavcodec/shorten.c4
-rw-r--r--libavcodec/tscc.c6
-rw-r--r--libavcodec/tta.c6
-rw-r--r--libavcodec/utils.c1
-rw-r--r--libavcodec/vmdav.c2
-rw-r--r--libavcodec/vmnc.c2
-rw-r--r--libavcodec/zmbv.c2
23 files changed, 63 insertions, 64 deletions
diff --git a/libavcodec/8bps.c b/libavcodec/8bps.c
index 447d46064c..4376d07064 100644
--- a/libavcodec/8bps.c
+++ b/libavcodec/8bps.c
@@ -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;
}
diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index 1817161160..9c5f621904 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -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;
diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c
index afa1ac68e0..df4136f4c4 100644
--- a/libavcodec/alacenc.c
+++ b/libavcodec/alacenc.c
@@ -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
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 83281c1035..0489ab49dd 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -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;
}
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 18bde8e328..fa16c4ec1c 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -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, \
diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c
index b83edd19af..77e5ff1de1 100644
--- a/libavcodec/cinepak.c
+++ b/libavcodec/cinepak.c
@@ -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 {
diff --git a/libavcodec/cscd.c b/libavcodec/cscd.c
index 2999d443c5..ada6a712a3 100644
--- a/libavcodec/cscd.c
+++ b/libavcodec/cscd.c
@@ -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);
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
index 9d1a49a807..cf90adc701 100644
--- a/libavcodec/huffyuv.c
+++ b/libavcodec/huffyuv.c
@@ -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);
diff --git a/libavcodec/imgresample.c b/libavcodec/imgresample.c
index 8da1b4d315..2a89ddf6cb 100644
--- a/libavcodec/imgresample.c
+++ b/libavcodec/imgresample.c
@@ -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)
{
diff --git a/libavcodec/lclenc.c b/libavcodec/lclenc.c
index 2d89998c07..d0269655e5 100644
--- a/libavcodec/lclenc.c
+++ b/libavcodec/lclenc.c
@@ -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));
diff --git a/libavcodec/libfaad.c b/libavcodec/libfaad.c
index 3e7339d6f4..153fc41f62 100644
--- a/libavcodec/libfaad.c
+++ b/libavcodec/libfaad.c
@@ -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
diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c
index ceffae8bb0..4ea00f6915 100644
--- a/libavcodec/msrle.c
+++ b/libavcodec/msrle.c
@@ -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);
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index 4e534bb6ce..84aa098750 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -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;
diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c
index 547c689e63..33a7eb5731 100644
--- a/libavcodec/qtrle.c
+++ b/libavcodec/qtrle.c
@@ -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;
}
diff --git a/libavcodec/qtrleenc.c b/libavcodec/qtrleenc.c
index efb0e4066d..d38720d23f 100644
--- a/libavcodec/qtrleenc.c
+++ b/libavcodec/qtrleenc.c
@@ -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);
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 45f8f98788..6039f13232 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -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++){
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index 7f8ef819c0..6d0aace596 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -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;
}
diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c
index 3c9adc0690..51f0185aa0 100644
--- a/libavcodec/tscc.c
+++ b/libavcodec/tscc.c
@@ -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 */
diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index 45efdaecb0..adf48b2997 100644
--- a/libavcodec/tta.c
+++ b/libavcodec/tta.c
@@ -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);
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index b13cf377cd..a6dc5d8bbe 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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"},
diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c
index b6e10d7faa..328abbb3c7 100644
--- a/libavcodec/vmdav.c
+++ b/libavcodec/vmdav.c
@@ -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;
diff --git a/libavcodec/vmnc.c b/libavcodec/vmnc.c
index d7dd97424e..c07d0016f5 100644
--- a/libavcodec/vmnc.c
+++ b/libavcodec/vmnc.c
@@ -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){
diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c
index b9751a0faa..e36ff27301 100644
--- a/libavcodec/zmbv.c
+++ b/libavcodec/zmbv.c
@@ -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));