[xiph-cvs] cvs commit: theora/win32/experimental/splayer splayer.c

Mauricio Piacentini mauricio at xiph.org
Mon Jun 9 08:42:08 PDT 2003



mauricio    03/06/09 11:42:08

  Modified:    win32/experimental/splayer splayer.c
  Log:
  propagating rillian's changes from player_example to the experimental win player

Revision  Changes    Path
1.7       +7 -6      theora/win32/experimental/splayer/splayer.c

Index: splayer.c
===================================================================
RCS file: /usr/local/cvsroot/theora/win32/experimental/splayer/splayer.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- splayer.c	9 Jun 2003 01:45:20 -0000	1.6
+++ splayer.c	9 Jun 2003 15:42:07 -0000	1.7
@@ -232,15 +232,15 @@
   /* and crop input properly, respecting the encoded frame rect */
   crop_offset=ti.offset_x+yuv.y_stride*ti.offset_y;
   for(i=0;i<yuv_overlay->h;i++)
-    memcpy(yuv_overlay->pixels[0]+yuv_overlay->w*i, 
+    memcpy(yuv_overlay->pixels[0]+yuv_overlay->pitches[0]*i, 
            yuv.y+crop_offset+yuv.y_stride*i, 
            yuv_overlay->w);
   crop_offset=(ti.offset_x/2)+(yuv.uv_stride)*(ti.offset_y/2);
   for(i=0;i<yuv_overlay->h/2;i++){
-    memcpy(yuv_overlay->pixels[1]+yuv_overlay->w/2*i, 
+    memcpy(yuv_overlay->pixels[1]+yuv_overlay->pitches[1]*i, 
            yuv.v+crop_offset+yuv.uv_stride*i, 
            yuv_overlay->w/2);
-    memcpy(yuv_overlay->pixels[2]+yuv_overlay->w/2*i, 
+    memcpy(yuv_overlay->pixels[2]+yuv_overlay->pitches[2]*i, 
            yuv.u+crop_offset+yuv.uv_stride*i, 
            yuv_overlay->w/2);
   }
@@ -437,12 +437,13 @@
 
   /* initialize decoders */
   if(theora_p){
-    dump_comments(&tc);
     theora_decode_init(&td,&ti);
-    printf("Ogg logical stream %x is Theora %dx%d %.02f fps video\nEncoded frame content is %dx%d with %dx%d offset\n",
+    printf("Ogg logical stream %x is Theora %dx%d %.02f fps video\n"
+           "  Frame content is %dx%d with offset (%d,%d).\n",
             to.serialno,ti.width,ti.height, (double)ti.fps_numerator/ti.fps_denominator,
                 ti.frame_width, ti.frame_height, ti.offset_x, ti.offset_y);
-	report_colorspace(&ti);
+    report_colorspace(&ti);
+    dump_comments(&tc);
   }else{
     /* tear down the partial theora setup */
     theora_info_clear(&ti);

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list