openjpeg-svn468-mj2-noscroll.patch 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. diff -urN -x '*.orig' -x '*.rej' -x '*~' -x '.*' OpenJPEG.patched/mj2/frames_to_mj2.c OpenJPEG.foo/mj2/frames_to_mj2.c
  2. --- OpenJPEG.patched/mj2/frames_to_mj2.c 2007-10-18 07:26:11.000000000 -0500
  3. +++ OpenJPEG.foo/mj2/frames_to_mj2.c 2007-11-03 22:48:45.000000000 -0500
  4. @@ -758,7 +758,7 @@
  5. fwrite(buf, 1, len+8, mj2file);
  6. offset += len+8;
  7. elapsed_time = opj_clock()-init_time;
  8. - fprintf(stderr, "Frame number %d/%d encoded in %.2f mseconds\n", sampleno + 1, numframes, elapsed_time*1000);
  9. + fprintf(stderr, "Frame number %d/%d encoded in %.2f mseconds \r", sampleno + 1, numframes, elapsed_time*1000);
  10. total_time += elapsed_time;
  11. }
  12. @@ -787,7 +787,7 @@
  13. fwrite(buf,cio_tell(cio),1,mj2file);
  14. free(buf);
  15. - fprintf(stdout,"Total encoding time: %.2f s for %d frames (%.1f fps)\n", total_time, numframes, (float)numframes/total_time);
  16. + fprintf(stdout,"\nTotal encoding time: %.2f s for %d frames (%.1f fps)\n", total_time, numframes, (float)numframes/total_time);
  17. // Ending program
  18. diff -urN -x '*.orig' -x '*.rej' -x '*~' -x '.*' OpenJPEG.patched/mj2/mj2_to_frames.c OpenJPEG.foo/mj2/mj2_to_frames.c
  19. --- OpenJPEG.patched/mj2/mj2_to_frames.c 2007-10-18 07:26:11.000000000 -0500
  20. +++ OpenJPEG.foo/mj2/mj2_to_frames.c 2007-11-03 22:48:45.000000000 -0500
  21. @@ -204,7 +204,7 @@
  22. /* free image data structure */
  23. opj_image_destroy(img);
  24. elapsed_time = opj_clock()-init_time;
  25. - fprintf(stderr, "Frame number %d/%d decoded in %.2f mseconds\n", snum + 1, numframes, elapsed_time*1000);
  26. + fprintf(stderr, "Frame number %d/%d decoded in %.2f mseconds \r", snum + 1, numframes, elapsed_time*1000);
  27. total_time += elapsed_time;
  28. }
  29. @@ -218,7 +218,7 @@
  30. }
  31. free(dinfo);
  32. - fprintf(stdout, "%d frame(s) correctly decompressed\n", snum);
  33. + fprintf(stdout, "\n%d frame(s) correctly decompressed\n", snum);
  34. fprintf(stdout,"Total decoding time: %.2f seconds (%.1f fps)\n", total_time, (float)numframes/total_time);
  35. return 0;