[FFmpeg-devel] [PATCH 2/2] mpegvideo: re-indent buffer clearing code

Hendrik Leppkes h.leppkes at gmail.com
Tue Feb 25 11:47:28 CET 2014


---
 libavcodec/mpegvideo.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index b9d8f54..3df1310 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1775,20 +1775,20 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
         }
 
         if (!avctx->hwaccel) {
-        for(i=0; i<avctx->height; i++)
-            memset(s->last_picture_ptr->f.data[0] + s->last_picture_ptr->f.linesize[0]*i,
-                   0x80, avctx->width);
-        for(i=0; i<FF_CEIL_RSHIFT(avctx->height, v_chroma_shift); i++) {
-            memset(s->last_picture_ptr->f.data[1] + s->last_picture_ptr->f.linesize[1]*i,
-                   0x80, FF_CEIL_RSHIFT(avctx->width, h_chroma_shift));
-            memset(s->last_picture_ptr->f.data[2] + s->last_picture_ptr->f.linesize[2]*i,
-                   0x80, FF_CEIL_RSHIFT(avctx->width, h_chroma_shift));
-        }
-
-        if(s->codec_id == AV_CODEC_ID_FLV1 || s->codec_id == AV_CODEC_ID_H263){
             for(i=0; i<avctx->height; i++)
-            memset(s->last_picture_ptr->f.data[0] + s->last_picture_ptr->f.linesize[0]*i, 16, avctx->width);
-        }
+                memset(s->last_picture_ptr->f.data[0] + s->last_picture_ptr->f.linesize[0]*i,
+                       0x80, avctx->width);
+            for(i=0; i<FF_CEIL_RSHIFT(avctx->height, v_chroma_shift); i++) {
+                memset(s->last_picture_ptr->f.data[1] + s->last_picture_ptr->f.linesize[1]*i,
+                       0x80, FF_CEIL_RSHIFT(avctx->width, h_chroma_shift));
+                memset(s->last_picture_ptr->f.data[2] + s->last_picture_ptr->f.linesize[2]*i,
+                       0x80, FF_CEIL_RSHIFT(avctx->width, h_chroma_shift));
+            }
+
+            if(s->codec_id == AV_CODEC_ID_FLV1 || s->codec_id == AV_CODEC_ID_H263){
+                for(i=0; i<avctx->height; i++)
+                memset(s->last_picture_ptr->f.data[0] + s->last_picture_ptr->f.linesize[0]*i, 16, avctx->width);
+            }
         }
 
         ff_thread_report_progress(&s->last_picture_ptr->tf, INT_MAX, 0);
-- 
1.8.5.2.msysgit.0



More information about the ffmpeg-devel mailing list