summaryrefslogtreecommitdiff
path: root/libavcodec/indeo5.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-15 13:33:18 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-15 13:33:18 +0200
commitaf388237093ed6df6f5118b34ef938a2ca2ffbda (patch)
tree8caf0550703e448f522762fbe9e652393a06f181 /libavcodec/indeo5.c
parent0846719dd11ab3f7a7caee13e7af71f71d913389 (diff)
indeo5: set transform_size like indeo4 does to prevent useage of too large transforms.
I dont know if this is needed, its a precautionary change. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/indeo5.c')
-rw-r--r--libavcodec/indeo5.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/indeo5.c b/libavcodec/indeo5.c
index 0b3d946588..50f4dd0c38 100644
--- a/libavcodec/indeo5.c
+++ b/libavcodec/indeo5.c
@@ -184,30 +184,35 @@ static int decode_gop_header(IVI5DecContext *ctx, AVCodecContext *avctx)
band->inv_transform = ff_ivi_inverse_slant_8x8;
band->dc_transform = ff_ivi_dc_slant_2d;
band->scan = ff_zigzag_direct;
+ band->transform_size= 8;
break;
case 1:
band->inv_transform = ff_ivi_row_slant8;
band->dc_transform = ff_ivi_dc_row_slant;
band->scan = ff_ivi_vertical_scan_8x8;
+ band->transform_size= 8;
break;
case 2:
band->inv_transform = ff_ivi_col_slant8;
band->dc_transform = ff_ivi_dc_col_slant;
band->scan = ff_ivi_horizontal_scan_8x8;
+ band->transform_size= 8;
break;
case 3:
band->inv_transform = ff_ivi_put_pixels_8x8;
band->dc_transform = ff_ivi_put_dc_pixel_8x8;
band->scan = ff_ivi_horizontal_scan_8x8;
+ band->transform_size= 8;
break;
case 4:
band->inv_transform = ff_ivi_inverse_slant_4x4;
band->dc_transform = ff_ivi_dc_slant_2d;
band->scan = ff_ivi_direct_scan_4x4;
+ band->transform_size= 4;
break;
}
@@ -258,6 +263,7 @@ static int decode_gop_header(IVI5DecContext *ctx, AVCodecContext *avctx)
band2->inv_transform = band1->inv_transform;
band2->dc_transform = band1->dc_transform;
band2->is_2d_trans = band1->is_2d_trans;
+ band2->transform_size= band1->transform_size;
}
/* reallocate internal structures if needed */