mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
er: replace VLA with malloc/free
(cherry picked from commit 5c2d016a85453f121285d125ed049a8cf492855a) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
364f367921
commit
39b0165f9e
@ -358,7 +358,7 @@ static void v_block_filter(MpegEncContext *s, uint8_t *dst, int w, int h, int st
|
||||
}
|
||||
|
||||
static void guess_mv(MpegEncContext *s){
|
||||
uint8_t fixed[s->mb_stride * s->mb_height];
|
||||
uint8_t *fixed = av_malloc(s->mb_stride * s->mb_height);
|
||||
#define MV_FROZEN 3
|
||||
#define MV_CHANGED 2
|
||||
#define MV_UNCHANGED 1
|
||||
@ -414,7 +414,7 @@ static void guess_mv(MpegEncContext *s){
|
||||
decode_mb(s, 0);
|
||||
}
|
||||
}
|
||||
return;
|
||||
goto end;
|
||||
}
|
||||
|
||||
for(depth=0;; depth++){
|
||||
@ -634,7 +634,7 @@ score_sum+= best_score;
|
||||
}
|
||||
|
||||
if(none_left)
|
||||
return;
|
||||
goto end;
|
||||
|
||||
for(i=0; i<s->mb_num; i++){
|
||||
int mb_xy= s->mb_index2xy[i];
|
||||
@ -643,6 +643,8 @@ score_sum+= best_score;
|
||||
}
|
||||
// printf(":"); fflush(stdout);
|
||||
}
|
||||
end:
|
||||
av_free(fixed);
|
||||
}
|
||||
|
||||
static int is_intra_more_likely(MpegEncContext *s){
|
||||
|
Loading…
Reference in New Issue
Block a user