Browse code

lavfi/drawutils: add const to blending mask.

Nicolas George authored on 2015/10/25 19:27:15
Showing 2 changed files
... ...
@@ -408,7 +408,7 @@ void ff_blend_rectangle(FFDrawContext *draw, FFDrawColor *color,
408 408
 }
409 409
 
410 410
 static void blend_pixel(uint8_t *dst, unsigned src, unsigned alpha,
411
-                        uint8_t *mask, int mask_linesize, int l2depth,
411
+                        const uint8_t *mask, int mask_linesize, int l2depth,
412 412
                         unsigned w, unsigned h, unsigned shift, unsigned xm0)
413 413
 {
414 414
     unsigned xm, x, y, t = 0;
... ...
@@ -432,7 +432,7 @@ static void blend_pixel(uint8_t *dst, unsigned src, unsigned alpha,
432 432
 
433 433
 static void blend_line_hv(uint8_t *dst, int dst_delta,
434 434
                           unsigned src, unsigned alpha,
435
-                          uint8_t *mask, int mask_linesize, int l2depth, int w,
435
+                          const uint8_t *mask, int mask_linesize, int l2depth, int w,
436 436
                           unsigned hsub, unsigned vsub,
437 437
                           int xm, int left, int right, int hband)
438 438
 {
... ...
@@ -457,12 +457,13 @@ static void blend_line_hv(uint8_t *dst, int dst_delta,
457 457
 
458 458
 void ff_blend_mask(FFDrawContext *draw, FFDrawColor *color,
459 459
                    uint8_t *dst[], int dst_linesize[], int dst_w, int dst_h,
460
-                   uint8_t *mask,  int mask_linesize, int mask_w, int mask_h,
460
+                   const uint8_t *mask,  int mask_linesize, int mask_w, int mask_h,
461 461
                    int l2depth, unsigned endianness, int x0, int y0)
462 462
 {
463 463
     unsigned alpha, nb_planes, nb_comp, plane, comp;
464 464
     int xm0, ym0, w_sub, h_sub, x_sub, y_sub, left, right, top, bottom, y;
465
-    uint8_t *p0, *p, *m;
465
+    uint8_t *p0, *p;
466
+    const uint8_t *m;
466 467
 
467 468
     clip_interval(dst_w, &x0, &mask_w, &xm0);
468 469
     clip_interval(dst_h, &y0, &mask_h, &ym0);
... ...
@@ -130,7 +130,7 @@ void ff_blend_rectangle(FFDrawContext *draw, FFDrawColor *color,
130 130
  */
131 131
 void ff_blend_mask(FFDrawContext *draw, FFDrawColor *color,
132 132
                    uint8_t *dst[], int dst_linesize[], int dst_w, int dst_h,
133
-                   uint8_t *mask, int mask_linesize, int mask_w, int mask_h,
133
+                   const uint8_t *mask, int mask_linesize, int mask_w, int mask_h,
134 134
                    int l2depth, unsigned endianness, int x0, int y0);
135 135
 
136 136
 /**