Browse Source

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
tags/v0.6
Reimar Döffinger 16 years ago
parent
commit
4a49ab77c6
18 changed files with 0 additions and 64 deletions
  1. +0
    -4
      libavcodec/8bps.c
  2. +0
    -3
      libavcodec/cscd.c
  3. +0
    -4
      libavcodec/dxa.c
  4. +0
    -4
      libavcodec/flashsvenc.c
  5. +0
    -4
      libavcodec/lcldec.c
  6. +0
    -3
      libavcodec/mmvideo.c
  7. +0
    -4
      libavcodec/qdrw.c
  8. +0
    -6
      libavcodec/roqvideoenc.c
  9. +0
    -4
      libavcodec/smacker.c
  10. +0
    -3
      libavcodec/truemotion2.c
  11. +0
    -4
      libavcodec/tscc.c
  12. +0
    -2
      libavcodec/v210dec.c
  13. +0
    -2
      libavcodec/v210x.c
  14. +0
    -4
      libavcodec/vb.c
  15. +0
    -3
      libavcodec/vmnc.c
  16. +0
    -3
      libavcodec/xan.c
  17. +0
    -3
      libavcodec/zmbv.c
  18. +0
    -4
      libavcodec/zmbvenc.c

+ 0
- 4
libavcodec/8bps.c View File

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


+ 0
- 3
libavcodec/cscd.c View File

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


+ 0
- 4
libavcodec/dxa.c View File

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


+ 0
- 4
libavcodec/flashsvenc.c View File

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



+ 0
- 4
libavcodec/lcldec.c View File

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


+ 0
- 3
libavcodec/mmvideo.c View File

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


+ 0
- 4
libavcodec/qdrw.c View File

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


+ 0
- 6
libavcodec/roqvideoenc.c View File

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



+ 0
- 4
libavcodec/smacker.c View File

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




+ 0
- 3
libavcodec/truemotion2.c View File

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


+ 0
- 4
libavcodec/tscc.c View File

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


+ 0
- 2
libavcodec/v210dec.c View File

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



+ 0
- 2
libavcodec/v210x.c View File

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



+ 0
- 4
libavcodec/vb.c View File

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



+ 0
- 3
libavcodec/vmnc.c View File

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



+ 0
- 3
libavcodec/xan.c View File

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


+ 0
- 3
libavcodec/zmbv.c View File

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


+ 0
- 4
libavcodec/zmbvenc.c View File

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


Loading…
Cancel
Save