Hi,

On Fri, Dec 2, 2011 at 4:38 PM, KJT TOD <[email protected]> wrote:
[..]

Mostly good. Small comments:


@@ -265,21 +295,25 @@ static int alloc_frame_buffer(MpegEncContext *s,
Picture *pic)
+int ff_alloc_picture(MpegEncContext *s, Picture *pic, int shared)
+{
+    const int big_mb_num = s->mb_stride * (s->mb_height + 1) + 1;
+
+// the + 1 is needed so memset(,,stride*height) does not sig11

Indent the comment by 4 spaces.

+    int r =  -1;

Remove one of the two spaces after the '='.

+        FF_ALLOCZ_OR_GOTO(s->avctx, pic->qscale_table_base ,
+                         (big_mb_num + s->mb_stride) * sizeof(uint8_t),

Indent this by one more space, so the ( is aligned vertically with the
s, rather than with the (, of the previous line.

+                          fail)
+        FF_ALLOCZ_OR_GOTO(s->avctx, pic->mb_type_base ,
+                         (big_mb_num + s->mb_stride) * sizeof(uint32_t),

Same here.

+static int init_duplicate_context(MpegEncContext *s, MpegEncContext *base)
[..]
+    FF_ALLOCZ_OR_GOTO(s->avctx, s->edge_emu_buffer,
+                     (s->width + 64) * 2 * 21 * 2, fail);    //
(width + edge + align)*interlaced*MBsize*tolerance

Same here.

@@ -410,29 +474,32 @@ static int init_duplicate_context(MpegEncContext
*s, MpegEncContext *base){

     return 0;
 fail:
-    return -1; //free() through MPV_common_end()
+    return -1;    // free() through MPV_common_end()

Remove all but one of the spaces between ';' and "//".

+    // FIXME copy only needed parts
+// START_TIMER
     backup_duplicate_context(&bak, dst);
     memcpy(dst, src, sizeof(MpegEncContext));
     backup_duplicate_context(dst, &bak);
-    for(i=0;i<12;i++){
+    for (i = 0; i < 12; i++) {
         dst->pblocks[i] = &dst->block[i];
     }
-//STOP_TIMER("update_duplicate_context") //about 10k cycles / 0.01
sec for 1000frames on 1ghz with 2 threads
+// STOP_TIMER("update_duplicate_context")
+// about 10k cycles / 0.01 sec for  1000frames on 1ghz with 2 threads

You had this correct in an earlier patch: indent all comments like
this by 4 spaces also. Same above for START_TIMER. The line above
START_TIMER is correct.

         s->avctx                 = dst;
-        s->picture_range_start  += MAX_PICTURE_COUNT;
-        s->picture_range_end    += MAX_PICTURE_COUNT;
+        s->picture_range_start +=  MAX_PICTURE_COUNT;
+        s->picture_range_end   +=  MAX_PICTURE_COUNT;

Make sure the '=' is vertically aligned for all, including the
"s->avctx = dst" line.

Also your patch is truncated, i.e. if you cut it, cut it at the next
"@@", not the next unchanged line, else we can't apply it.

Ronald
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to