diff mbox

[FFmpeg-devel,1/7] libavfilter/vf_overlay.c: change the commands style for the macro defined function

Message ID 20190524093616.74647-1-lance.lmwang@gmail.com
State Superseded
Headers show

Commit Message

Lance Wang May 24, 2019, 9:36 a.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

---
 libavfilter/vf_overlay.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

James Darnley May 24, 2019, 10:06 a.m. UTC | #1
On 2019-05-24 11:36, lance.lmwang@gmail.com wrote:
> From: Limin Wang <lance.lmwang@gmail.com>
> 
> ...

Why?  And these are "comments" not "commands".
Moritz Barsnick May 24, 2019, 10:22 a.m. UTC | #2
On Fri, May 24, 2019 at 17:36:10 +0800, lance.lmwang@gmail.com wrote:
> Subject: [PATCH 1/7] libavfilter/vf_overlay.c: change the commands style for the macro defined function
                                                            ^
It's not "commands", it's "comments", or "comment style".

Moritz
James Darnley May 24, 2019, 10:27 a.m. UTC | #3
On 2019-05-24 12:06, James Darnley wrote:
> On 2019-05-24 11:36, lance.lmwang@gmail.com wrote:
>> From: Limin Wang <lance.lmwang@gmail.com>
>>
>> ...
> 
> Why?

I see why: so you don't screw-up the macros you create later.
diff mbox

Patch

diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index 0a8f089c0d..b468cedf2e 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -500,7 +500,7 @@  static av_always_inline void blend_plane(AVFilterContext *ctx,
         for (; k < kmax; k++) {
             int alpha_v, alpha_h, alpha;
 
-            // average alpha for color components, improve quality
+            /* average alpha for color components, improve quality */
             if (hsub && vsub && j+1 < src_hp && k+1 < src_wp) {
                 alpha = (a[0] + a[src->linesize[3]] +
                          a[1] + a[src->linesize[3]+1]) >> 2;
@@ -512,10 +512,10 @@  static av_always_inline void blend_plane(AVFilterContext *ctx,
                 alpha = (alpha_v + alpha_h) >> 1;
             } else
                 alpha = a[0];
-            // if the main channel has an alpha channel, alpha has to be calculated
-            // to create an un-premultiplied (straight) alpha value
+            /* if the main channel has an alpha channel, alpha has to be calculated */
+            /* to create an un-premultiplied (straight) alpha value */
             if (main_has_alpha && alpha != 0 && alpha != 255) {
-                // average alpha for color components, improve quality
+                /* average alpha for color components, improve quality */
                 uint8_t alpha_d;
                 if (hsub && vsub && j+1 < src_hp && k+1 < src_wp) {
                     alpha_d = (da[0] + da[dst->linesize[3]] +
@@ -556,7 +556,7 @@  static inline void alpha_composite(const AVFrame *src, const AVFrame *dst,
                                    int x, int y,
                                    int jobnr, int nb_jobs)
 {
-    uint8_t alpha;          ///< the amount of overlay to blend on to main
+    uint8_t alpha;          /* the amount of overlay to blend on to main */
     uint8_t *s, *sa, *d, *da;
     int i, imax, j, jmax;
     int slice_start, slice_end;
@@ -587,7 +587,7 @@  static inline void alpha_composite(const AVFrame *src, const AVFrame *dst,
                 *d = *s;
                 break;
             default:
-                // apply alpha compositing: main_alpha += (1-main_alpha) * overlay_alpha
+                /* apply alpha compositing: main_alpha += (1-main_alpha) * overlay_alpha */
                 *d += FAST_DIV255((255 - *d) * *s);
             }
             d += 1;