prefer "SAR" over "PAR" in av_dump_format()
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Wed, 27 Jul 2011 08:35:08 +0000 (10:35 +0200)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Thu, 28 Jul 2011 08:24:43 +0000 (10:24 +0200)
"SAR" (Sample Aspect Ratio) is globally preferred over "PAR" (Pixel
Aspect Ratio), although the two terms share the same semantics.

For example the corresponding AVStream field is called
sample_aspect_ratio, and libavfilter has a filter named setsar.

Therefore prefer the term "SAR" over "PAR" in the
libavformat/utils.c:dump_stream_format() and avcodec_string() output
for avoiding confusion.

libavcodec/utils.c
libavformat/utils.c

index 301e33e..49891ad 100644 (file)
@@ -1053,7 +1053,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
                           enc->height*enc->sample_aspect_ratio.den,
                           1024*1024);
                 snprintf(buf + strlen(buf), buf_size - strlen(buf),
-                         " [PAR %d:%d DAR %d:%d]",
+                         " [SAR %d:%d DAR %d:%d]",
                          enc->sample_aspect_ratio.num, enc->sample_aspect_ratio.den,
                          display_aspect_ratio.num, display_aspect_ratio.den);
             }
index 38407b9..7489104 100644 (file)
@@ -3402,7 +3402,7 @@ static void dump_stream_format(AVFormatContext *ic, int i, int index, int is_out
                   st->codec->width*st->sample_aspect_ratio.num,
                   st->codec->height*st->sample_aspect_ratio.den,
                   1024*1024);
-        av_log(NULL, AV_LOG_INFO, ", PAR %d:%d DAR %d:%d",
+        av_log(NULL, AV_LOG_INFO, ", SAR %d:%d DAR %d:%d",
                  st->sample_aspect_ratio.num, st->sample_aspect_ratio.den,
                  display_aspect_ratio.num, display_aspect_ratio.den);
     }