1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

snow: set frame defaults

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-03-12 04:29:00 +01:00
parent b5e5ed8ea7
commit c536253854

View File

@ -456,9 +456,14 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){
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); 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++)
ff_scale_mv_ref[i][j] = 256*(i+1)/(j+1); ff_scale_mv_ref[i][j] = 256*(i+1)/(j+1);
avcodec_get_frame_defaults(&s->last_picture[i]);
}
avcodec_get_frame_defaults(&s->mconly_picture);
avcodec_get_frame_defaults(&s->current_picture);
return 0; return 0;
fail: fail: