mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
snow: remove the runs[] VLA.
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
4d8516fdb1
commit
cbd9b2f918
@ -451,6 +451,7 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){
|
|||||||
FF_ALLOCZ_OR_GOTO(avctx, s->spatial_dwt_buffer, width * height * sizeof(DWTELEM), fail); //FIXME this does not belong here
|
FF_ALLOCZ_OR_GOTO(avctx, s->spatial_dwt_buffer, width * height * sizeof(DWTELEM), fail); //FIXME this does not belong here
|
||||||
FF_ALLOCZ_OR_GOTO(avctx, s->temp_dwt_buffer, width * sizeof(DWTELEM), fail);
|
FF_ALLOCZ_OR_GOTO(avctx, s->temp_dwt_buffer, width * sizeof(DWTELEM), fail);
|
||||||
FF_ALLOCZ_OR_GOTO(avctx, s->temp_idwt_buffer, width * sizeof(IDWTELEM), fail);
|
FF_ALLOCZ_OR_GOTO(avctx, s->temp_idwt_buffer, width * sizeof(IDWTELEM), fail);
|
||||||
|
FF_ALLOC_OR_GOTO(avctx, s->run_buffer, ((width + 1) >> 1) * ((height + 1) >> 1) * sizeof(*s->run_buffer), fail);
|
||||||
|
|
||||||
for(i=0; i<MAX_REF_FRAMES; i++)
|
for(i=0; i<MAX_REF_FRAMES; i++)
|
||||||
for(j=0; j<MAX_REF_FRAMES; j++)
|
for(j=0; j<MAX_REF_FRAMES; j++)
|
||||||
@ -637,6 +638,7 @@ av_cold void ff_snow_common_end(SnowContext *s)
|
|||||||
av_freep(&s->temp_dwt_buffer);
|
av_freep(&s->temp_dwt_buffer);
|
||||||
av_freep(&s->spatial_idwt_buffer);
|
av_freep(&s->spatial_idwt_buffer);
|
||||||
av_freep(&s->temp_idwt_buffer);
|
av_freep(&s->temp_idwt_buffer);
|
||||||
|
av_freep(&s->run_buffer);
|
||||||
|
|
||||||
s->m.me.temp= NULL;
|
s->m.me.temp= NULL;
|
||||||
av_freep(&s->m.me.scratchpad);
|
av_freep(&s->m.me.scratchpad);
|
||||||
|
@ -135,6 +135,7 @@ typedef struct SnowContext{
|
|||||||
DWTELEM *temp_dwt_buffer;
|
DWTELEM *temp_dwt_buffer;
|
||||||
IDWTELEM *spatial_idwt_buffer;
|
IDWTELEM *spatial_idwt_buffer;
|
||||||
IDWTELEM *temp_idwt_buffer;
|
IDWTELEM *temp_idwt_buffer;
|
||||||
|
int *run_buffer;
|
||||||
int colorspace_type;
|
int colorspace_type;
|
||||||
int chroma_h_shift;
|
int chroma_h_shift;
|
||||||
int chroma_v_shift;
|
int chroma_v_shift;
|
||||||
|
@ -836,7 +836,7 @@ static int encode_subband_c0run(SnowContext *s, SubBand *b, IDWTELEM *src, IDWTE
|
|||||||
|
|
||||||
if(1){
|
if(1){
|
||||||
int run=0;
|
int run=0;
|
||||||
int runs[w*h];
|
int *runs = s->run_buffer;
|
||||||
int run_index=0;
|
int run_index=0;
|
||||||
int max_index;
|
int max_index;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user