[FFmpeg-cvslog] avfilter/showvolume : add comment for orientation condition

Martin Vignali git at videolan.org
Sat Mar 31 10:36:29 EEST 2018


ffmpeg | branch: master | Martin Vignali <martin.vignali at gmail.com> | Fri Mar 30 21:13:27 2018 +0200| [34304677c05be782964b9fb704b13c01e19c9c80] | committer: Paul B Mahol

avfilter/showvolume : add comment for orientation condition

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

 libavfilter/avf_showvolume.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavfilter/avf_showvolume.c b/libavfilter/avf_showvolume.c
index af8ac1da6c..ab1fb619b9 100644
--- a/libavfilter/avf_showvolume.c
+++ b/libavfilter/avf_showvolume.c
@@ -222,7 +222,7 @@ static void drawtext(AVFrame *pic, int x, int y, const char *txt, int o)
     for (i = 0; txt[i]; i++) {
         int char_y, mask;
 
-        if (o) {
+        if (o) { /* vertical orientation */
             for (char_y = font_height - 1; char_y >= 0; char_y--) {
                 uint8_t *p = pic->data[0] + (y + i * 10) * pic->linesize[0] + x * 4;
                 for (mask = 0x80; mask; mask >>= 1) {
@@ -231,7 +231,7 @@ static void drawtext(AVFrame *pic, int x, int y, const char *txt, int o)
                     p += pic->linesize[0];
                 }
             }
-        } else {
+        } else { /* horizontal orientation */
             uint8_t *p = pic->data[0] + y * pic->linesize[0] + (x + i * 8) * 4;
             for (char_y = 0; char_y < font_height; char_y++) {
                 for (mask = 0x80; mask; mask >>= 1) {
@@ -285,7 +285,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
         }
     }
 
-    if (s->orientation) {
+    if (s->orientation) { /* vertical */
         for (c = 0; c < inlink->channels; c++) {
             float *src = (float *)insamples->extended_data[c];
             uint32_t *lut = s->color_lut + s->w * c;
@@ -313,7 +313,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
                 drawtext(s->out, c * (s->h + s->b) + (s->h - 10) / 2, outlink->h - 35, channel_name, 1);
             }
         }
-    } else {
+    } else { /* horizontal */
         for (c = 0; c < inlink->channels; c++) {
             float *src = (float *)insamples->extended_data[c];
             uint32_t *lut = s->color_lut + s->w * c;



More information about the ffmpeg-cvslog mailing list