summaryrefslogtreecommitdiff
path: root/libavcodec/asvenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-26 09:09:44 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-05 03:21:41 +0200
commit5828e8209f48f206c42b69e314a6988b50e98924 (patch)
treeb1ce7a4fdbafb8e2ec3706340736812dae042016 /libavcodec/asvenc.c
parentcee40a945abc3568e270899eefb8bf6cf7e5ab3c (diff)
avcodec: Constify frame->data pointers for encoders where possible
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/asvenc.c')
-rw-r--r--libavcodec/asvenc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/asvenc.c b/libavcodec/asvenc.c
index c6fd6a519e..8b94868c93 100644
--- a/libavcodec/asvenc.c
+++ b/libavcodec/asvenc.c
@@ -190,9 +190,9 @@ static inline void dct_get(ASV1Context *a, const AVFrame *frame,
int linesize = frame->linesize[0];
int i;
- uint8_t *ptr_y = frame->data[0] + (mb_y * 16 * linesize) + mb_x * 16;
- uint8_t *ptr_cb = frame->data[1] + (mb_y * 8 * frame->linesize[1]) + mb_x * 8;
- uint8_t *ptr_cr = frame->data[2] + (mb_y * 8 * frame->linesize[2]) + mb_x * 8;
+ const uint8_t *ptr_y = frame->data[0] + (mb_y * 16 * linesize) + mb_x * 16;
+ const uint8_t *ptr_cb = frame->data[1] + (mb_y * 8 * frame->linesize[1]) + mb_x * 8;
+ const uint8_t *ptr_cr = frame->data[2] + (mb_y * 8 * frame->linesize[2]) + mb_x * 8;
a->pdsp.get_pixels(block[0], ptr_y, linesize);
a->pdsp.get_pixels(block[1], ptr_y + 8, linesize);