[FFmpeg-cvslog] Merge commit '7effebde78977fafce935776153ea2f7c0981fa3'

Clément Bœsch git at videolan.org
Sun Mar 19 17:11:00 EET 2017


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Sun Mar 19 16:10:17 2017 +0100| [ff66ba6feb3e996d5984ee3f7ae2ff9c7d946d0b] | committer: Clément Bœsch

Merge commit '7effebde78977fafce935776153ea2f7c0981fa3'

* commit '7effebde78977fafce935776153ea2f7c0981fa3':
  dvbsubdec: Remove disabled, near-duplicate debug code

Merged-by: Clément Bœsch <u at pkh.me>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ff66ba6feb3e996d5984ee3f7ae2ff9c7d946d0b
---

 libavcodec/dvbsubdec.c | 62 ++------------------------------------------------
 1 file changed, 2 insertions(+), 60 deletions(-)

diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index bf3b1a1..7c27d69 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -36,65 +36,7 @@
 #define cm (ff_crop_tab + MAX_NEG_CROP)
 
 #ifdef DEBUG
-#if 0
-static void png_save(const char *filename, uint8_t *bitmap, int w, int h,
-                     uint32_t *rgba_palette)
-{
-    int x, y, v;
-    FILE *f;
-    char fname[40], fname2[40];
-    char command[1024];
-
-    snprintf(fname, 40, "%s.ppm", filename);
-
-    f = fopen(fname, "w");
-    if (!f) {
-        perror(fname);
-        return;
-    }
-    fprintf(f, "P6\n"
-            "%d %d\n"
-            "%d\n",
-            w, h, 255);
-    for(y = 0; y < h; y++) {
-        for(x = 0; x < w; x++) {
-            v = rgba_palette[bitmap[y * w + x]];
-            putc((v >> 16) & 0xff, f);
-            putc((v >> 8) & 0xff, f);
-            putc((v >> 0) & 0xff, f);
-        }
-    }
-    fclose(f);
-
-
-    snprintf(fname2, 40, "%s-a.pgm", filename);
-
-    f = fopen(fname2, "w");
-    if (!f) {
-        perror(fname2);
-        return;
-    }
-    fprintf(f, "P5\n"
-            "%d %d\n"
-            "%d\n",
-            w, h, 255);
-    for(y = 0; y < h; y++) {
-        for(x = 0; x < w; x++) {
-            v = rgba_palette[bitmap[y * w + x]];
-            putc((v >> 24) & 0xff, f);
-        }
-    }
-    fclose(f);
-
-    snprintf(command, 1024, "pnmtopng -alpha %s %s > %s.png 2> /dev/null", fname2, fname, filename);
-    system(command);
-
-    snprintf(command, 1024, "rm %s %s", fname, fname2);
-    system(command);
-}
-#endif
-
-static void png_save2(const char *filename, uint32_t *bitmap, int w, int h)
+static void png_save(const char *filename, uint32_t *bitmap, int w, int h)
 {
     int x, y, v;
     FILE *f;
@@ -1540,7 +1482,7 @@ static int save_display_set(DVBSubContext *ctx)
 
         snprintf(filename, sizeof(filename), "dvbs.%d", fileno_index);
 
-        png_save2(filename, pbuf, width, height);
+        png_save(filename, pbuf, width, height);
 
         av_freep(&pbuf);
     }


======================================================================

diff --cc libavcodec/dvbsubdec.c
index bf3b1a1,ccdfc01..7c27d69
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@@ -1540,9 -1204,9 +1482,9 @@@ static int save_display_set(DVBSubConte
  
          snprintf(filename, sizeof(filename), "dvbs.%d", fileno_index);
  
-         png_save2(filename, pbuf, width, height);
+         png_save(filename, pbuf, width, height);
  
 -        av_free(pbuf);
 +        av_freep(&pbuf);
      }
  
      fileno_index++;



More information about the ffmpeg-cvslog mailing list