* commit '0352ff102d62ee94e79e0baaf64d5ad4e66f907b':
ffv1: const correctness for encode_rgb_frame()
Conflicts:
libavcodec/ffv1enc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -405,7 +405,8 @@ static int encode_plane(FFV1Context *s, uint8_t *src, int w, int h, |
405 | 405 |
return 0; |
406 | 406 |
} |
407 | 407 |
|
408 |
-static int encode_rgb_frame(FFV1Context *s, uint8_t *src[3], int w, int h, const int stride[3]) |
|
408 |
+static int encode_rgb_frame(FFV1Context *s, const uint8_t *src[3], |
|
409 |
+ int w, int h, const int stride[3]) |
|
409 | 410 |
{ |
410 | 411 |
int x, y, p, i; |
411 | 412 |
const int ring_size = s->avctx->context_model ? 3 : 2; |
... | ... |
@@ -427,15 +428,15 @@ static int encode_rgb_frame(FFV1Context *s, uint8_t *src[3], int w, int h, const |
427 | 427 |
for (x = 0; x < w; x++) { |
428 | 428 |
int b, g, r, av_uninit(a); |
429 | 429 |
if (lbd) { |
430 |
- unsigned v = *((uint32_t*)(src[0] + x*4 + stride[0]*y)); |
|
430 |
+ unsigned v = *((const uint32_t*)(src[0] + x*4 + stride[0]*y)); |
|
431 | 431 |
b = v & 0xFF; |
432 | 432 |
g = (v >> 8) & 0xFF; |
433 | 433 |
r = (v >> 16) & 0xFF; |
434 | 434 |
a = v >> 24; |
435 | 435 |
} else { |
436 |
- b = *((uint16_t*)(src[0] + x*2 + stride[0]*y)); |
|
437 |
- g = *((uint16_t*)(src[1] + x*2 + stride[1]*y)); |
|
438 |
- r = *((uint16_t*)(src[2] + x*2 + stride[2]*y)); |
|
436 |
+ b = *((const uint16_t *)(src[0] + x*2 + stride[0]*y)); |
|
437 |
+ g = *((const uint16_t *)(src[1] + x*2 + stride[1]*y)); |
|
438 |
+ r = *((const uint16_t *)(src[2] + x*2 + stride[2]*y)); |
|
439 | 439 |
} |
440 | 440 |
|
441 | 441 |
if (s->slice_coding_mode != 1) { |
... | ... |
@@ -1110,9 +1111,9 @@ static int encode_slice(AVCodecContext *c, void *arg) |
1110 | 1110 |
const int ps = av_pix_fmt_desc_get(c->pix_fmt)->comp[0].step_minus1 + 1; |
1111 | 1111 |
int ret; |
1112 | 1112 |
RangeCoder c_bak = fs->c; |
1113 |
- uint8_t *planes[3] = {p->data[0] + ps*x + y*p->linesize[0], |
|
1114 |
- p->data[1] + ps*x + y*p->linesize[1], |
|
1115 |
- p->data[2] + ps*x + y*p->linesize[2]}; |
|
1113 |
+ const uint8_t *planes[3] = {p->data[0] + ps*x + y*p->linesize[0], |
|
1114 |
+ p->data[1] + ps*x + y*p->linesize[1], |
|
1115 |
+ p->data[2] + ps*x + y*p->linesize[2]}; |
|
1116 | 1116 |
|
1117 | 1117 |
fs->slice_coding_mode = 0; |
1118 | 1118 |
if (f->version > 3) { |