summaryrefslogtreecommitdiff
path: root/libavfilter/avf_showvolume.c
diff options
context:
space:
mode:
authorMartin Vignali <martin.vignali@gmail.com>2018-03-30 21:13:27 +0200
committerPaul B Mahol <onemda@gmail.com>2018-03-31 09:11:34 +0200
commit34304677c05be782964b9fb704b13c01e19c9c80 (patch)
tree489d8728f88e84790088d9fa025102222313432b /libavfilter/avf_showvolume.c
parentcdd6a525e4922b20c26c47de5da6d191f9b1b52e (diff)
avfilter/showvolume : add comment for orientation condition
Diffstat (limited to 'libavfilter/avf_showvolume.c')
-rw-r--r--libavfilter/avf_showvolume.c8
1 files 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;