[FFmpeg-cvslog] prefer "SAR" over "PAR" in av_dump_format()

Stefano Sabatini git at videolan.org
Thu Jul 28 10:31:04 CEST 2011


ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Wed Jul 27 10:35:08 2011 +0200| [fdd130a2131912133c72b5ff532726784aaa70a2] | committer: Stefano Sabatini

prefer "SAR" over "PAR" in av_dump_format()

"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.

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

 libavcodec/utils.c  |    2 +-
 libavformat/utils.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 301e33e..49891ad 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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);
             }
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 38407b9..7489104 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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);
     }



More information about the ffmpeg-cvslog mailing list