summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-10-13 20:13:28 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-10-13 20:13:28 +0000
commit4a49ab77c6bb2348992e1e70b14f2d1efaf7ddbb (patch)
tree2b41f67485760f7e8dc666bfea9924e8ba87eb6a
parent0fbb0185b999169a265e5fac2145483dacd73e74 (diff)
Remove unnecessary calls to avcodec_check_dimensions, the check is already
done at a higher level. Originally committed as revision 20229 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/8bps.c4
-rw-r--r--libavcodec/cscd.c3
-rw-r--r--libavcodec/dxa.c4
-rw-r--r--libavcodec/flashsvenc.c4
-rw-r--r--libavcodec/lcldec.c4
-rw-r--r--libavcodec/mmvideo.c3
-rw-r--r--libavcodec/qdrw.c4
-rw-r--r--libavcodec/roqvideoenc.c6
-rw-r--r--libavcodec/smacker.c4
-rw-r--r--libavcodec/truemotion2.c3
-rw-r--r--libavcodec/tscc.c4
-rw-r--r--libavcodec/v210dec.c2
-rw-r--r--libavcodec/v210x.c2
-rw-r--r--libavcodec/vb.c4
-rw-r--r--libavcodec/vmnc.c3
-rw-r--r--libavcodec/xan.c3
-rw-r--r--libavcodec/zmbv.c3
-rw-r--r--libavcodec/zmbvenc.c4
18 files changed, 0 insertions, 64 deletions
diff --git a/libavcodec/8bps.c b/libavcodec/8bps.c
index 28187b0360..fb5ef71732 100644
--- a/libavcodec/8bps.c
+++ b/libavcodec/8bps.c
@@ -159,10 +159,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
c->pic.data[0] = NULL;
- if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
- return 1;
- }
-
switch (avctx->bits_per_coded_sample) {
case 8:
avctx->pix_fmt = PIX_FMT_PAL8;
diff --git a/libavcodec/cscd.c b/libavcodec/cscd.c
index e58cf7861d..45edca382c 100644
--- a/libavcodec/cscd.c
+++ b/libavcodec/cscd.c
@@ -216,9 +216,6 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
static av_cold int decode_init(AVCodecContext *avctx) {
CamStudioContext *c = avctx->priv_data;
- if (avcodec_check_dimensions(avctx, avctx->height, avctx->width) < 0) {
- return 1;
- }
switch (avctx->bits_per_coded_sample) {
case 16: avctx->pix_fmt = PIX_FMT_RGB555; break;
case 24: avctx->pix_fmt = PIX_FMT_BGR24; break;
diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c
index 69aed3c89e..c06ab85cc7 100644
--- a/libavcodec/dxa.c
+++ b/libavcodec/dxa.c
@@ -295,10 +295,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
c->avctx = avctx;
avctx->pix_fmt = PIX_FMT_PAL8;
- if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
- return -1;
- }
-
c->dsize = avctx->width * avctx->height * 2;
if((c->decomp_buf = av_malloc(c->dsize)) == NULL) {
av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n");
diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c
index 3512b02698..4d2b47979f 100644
--- a/libavcodec/flashsvenc.c
+++ b/libavcodec/flashsvenc.c
@@ -108,10 +108,6 @@ static av_cold int flashsv_encode_init(AVCodecContext *avctx)
return -1;
}
- if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
- return -1;
- }
-
// Needed if zlib unused or init aborted before deflateInit
memset(&(s->zstream), 0, sizeof(z_stream));
diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index 15c686e0a9..d4fe65cceb 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -458,10 +458,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
return 1;
}
- if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
- return 1;
- }
-
/* Check codec type */
if ((avctx->codec_id == CODEC_ID_MSZH && avctx->extradata[7] != CODEC_MSZH) ||
(avctx->codec_id == CODEC_ID_ZLIB && avctx->extradata[7] != CODEC_ZLIB)) {
diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c
index 6dc95589c6..596ca7aec4 100644
--- a/libavcodec/mmvideo.c
+++ b/libavcodec/mmvideo.c
@@ -58,9 +58,6 @@ static av_cold int mm_decode_init(AVCodecContext *avctx)
avctx->pix_fmt = PIX_FMT_PAL8;
- if (avcodec_check_dimensions(avctx, avctx->width, avctx->height))
- return -1;
-
s->frame.reference = 1;
if (avctx->get_buffer(avctx, &s->frame)) {
av_log(s->avctx, AV_LOG_ERROR, "mmvideo: get_buffer() failed\n");
diff --git a/libavcodec/qdrw.c b/libavcodec/qdrw.c
index 0f9609159c..cd53bfb338 100644
--- a/libavcodec/qdrw.c
+++ b/libavcodec/qdrw.c
@@ -135,10 +135,6 @@ static int decode_frame(AVCodecContext *avctx,
static av_cold int decode_init(AVCodecContext *avctx){
// QdrawContext * const a = avctx->priv_data;
- if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
- return 1;
- }
-
avctx->pix_fmt= PIX_FMT_PAL8;
return 0;
diff --git a/libavcodec/roqvideoenc.c b/libavcodec/roqvideoenc.c
index 0f74ddd671..8dc77bd414 100644
--- a/libavcodec/roqvideoenc.c
+++ b/libavcodec/roqvideoenc.c
@@ -939,12 +939,6 @@ static int roq_encode_init(AVCodecContext *avctx)
if (((avctx->width)&(avctx->width-1))||((avctx->height)&(avctx->height-1)))
av_log(avctx, AV_LOG_ERROR, "Warning: dimensions not power of two\n");
- if (avcodec_check_dimensions(avctx, avctx->width, avctx->height)) {
- av_log(avctx, AV_LOG_ERROR, "Invalid dimensions (%dx%d)\n",
- avctx->width, avctx->height);
- return -1;
- }
-
enc->width = avctx->width;
enc->height = avctx->height;
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 0d39027b0b..18eaebc6ad 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -514,10 +514,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
c->avctx = avctx;
- if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
- return 1;
- }
-
avctx->pix_fmt = PIX_FMT_PAL8;
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index ee3d6d9212..09c500146d 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -813,9 +813,6 @@ static av_cold int decode_init(AVCodecContext *avctx){
TM2Context * const l = avctx->priv_data;
int i;
- if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
- return -1;
- }
if((avctx->width & 3) || (avctx->height & 3)){
av_log(avctx, AV_LOG_ERROR, "Width and height must be multiple of 4\n");
return -1;
diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c
index d1a924da40..b00b5c5568 100644
--- a/libavcodec/tscc.c
+++ b/libavcodec/tscc.c
@@ -141,10 +141,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
c->height = avctx->height;
- if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
- return 1;
- }
-
// Needed if zlib unused or init aborted before inflateInit
memset(&(c->zstream), 0, sizeof(z_stream));
switch(avctx->bits_per_coded_sample){
diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c
index 08c954d88e..ceeccb6346 100644
--- a/libavcodec/v210dec.c
+++ b/libavcodec/v210dec.c
@@ -30,8 +30,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
av_log(avctx, AV_LOG_ERROR, "v210 needs even width\n");
return -1;
}
- if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0)
- return -1;
avctx->pix_fmt = PIX_FMT_YUV422P16;
avctx->bits_per_raw_sample = 10;
diff --git a/libavcodec/v210x.c b/libavcodec/v210x.c
index fe1b6de30a..549a157f41 100644
--- a/libavcodec/v210x.c
+++ b/libavcodec/v210x.c
@@ -27,8 +27,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
av_log(avctx, AV_LOG_ERROR, "v210x needs even width\n");
return -1;
}
- if(avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0)
- return -1;
avctx->pix_fmt = PIX_FMT_YUV422P16;
avctx->bits_per_raw_sample= 10;
diff --git a/libavcodec/vb.c b/libavcodec/vb.c
index 02efa030a5..551b10657c 100644
--- a/libavcodec/vb.c
+++ b/libavcodec/vb.c
@@ -251,10 +251,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
c->avctx = avctx;
avctx->pix_fmt = PIX_FMT_PAL8;
- if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
- return -1;
- }
-
c->frame = av_malloc( avctx->width * avctx->height);
c->prev_frame = av_malloc( avctx->width * avctx->height);
diff --git a/libavcodec/vmnc.c b/libavcodec/vmnc.c
index a97655a27c..b4c07f76e4 100644
--- a/libavcodec/vmnc.c
+++ b/libavcodec/vmnc.c
@@ -468,9 +468,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
c->width = avctx->width;
c->height = avctx->height;
- if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
- return 1;
- }
c->bpp = avctx->bits_per_coded_sample;
c->bpp2 = c->bpp/8;
diff --git a/libavcodec/xan.c b/libavcodec/xan.c
index 83b64ca050..fcfd9c6d0c 100644
--- a/libavcodec/xan.c
+++ b/libavcodec/xan.c
@@ -74,9 +74,6 @@ static av_cold int xan_decode_init(AVCodecContext *avctx)
avctx->pix_fmt = PIX_FMT_PAL8;
- if(avcodec_check_dimensions(avctx, avctx->width, avctx->height))
- return -1;
-
s->buffer1_size = avctx->width * avctx->height;
s->buffer1 = av_malloc(s->buffer1_size);
s->buffer2_size = avctx->width * avctx->height;
diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c
index de2eb9c4c6..35a31c0924 100644
--- a/libavcodec/zmbv.c
+++ b/libavcodec/zmbv.c
@@ -602,9 +602,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
c->width = avctx->width;
c->height = avctx->height;
- if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
- return 1;
- }
c->bpp = avctx->bits_per_coded_sample;
// Needed if zlib unused or init aborted before inflateInit
diff --git a/libavcodec/zmbvenc.c b/libavcodec/zmbvenc.c
index 5a1428e4a8..0131b5d1f3 100644
--- a/libavcodec/zmbvenc.c
+++ b/libavcodec/zmbvenc.c
@@ -263,10 +263,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
return -1;
}
- if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
- return -1;
- }
-
// Needed if zlib unused or init aborted before deflateInit
memset(&(c->zstream), 0, sizeof(z_stream));
c->comp_size = avctx->width * avctx->height + 1024 +