diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-20 16:51:42 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-20 17:37:23 +0400 |
commit | c7a435aab2637b9f48930f998b7f9f3d776a44ac (patch) | |
tree | 147014db83493b8c1e0740f15cf4350a67d3fd56 /libavcodec/ffv1.c | |
parent | 32883c0667c9516bb3e1507c334170eea8371da8 (diff) |
ffv1: split clear_slice_state() out so individual slices can be cleared.
This allows us to clear outside of the main thread for example.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ffv1.c')
-rw-r--r-- | libavcodec/ffv1.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c index 2bad0f2d53..df3949cd14 100644 --- a/libavcodec/ffv1.c +++ b/libavcodec/ffv1.c @@ -1118,11 +1118,9 @@ static av_cold int encode_init(AVCodecContext *avctx) #endif /* CONFIG_FFV1_ENCODER */ -static void clear_state(FFV1Context *f){ - int i, si, j; +static void clear_slice_state(FFV1Context *f, FFV1Context *fs){ + int i, j; - for(si=0; si<f->slice_count; si++){ - FFV1Context *fs= f->slice_context[si]; for(i=0; i<f->plane_count; i++){ PlaneContext *p= &fs->plane[i]; @@ -1143,6 +1141,14 @@ static void clear_state(FFV1Context *f){ } } } +} + +static void clear_state(FFV1Context *f){ + int si; + + for(si=0; si<f->slice_count; si++){ + FFV1Context *fs= f->slice_context[si]; + clear_slice_state(f, fs); } } |