diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-09-07 00:16:31 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-09-12 09:42:43 +0200 |
commit | da784b81a671677342c54e32add39d7d9ce15563 (patch) | |
tree | acdcc275b0f5fd028b5dc24506e6366121a55b51 /libavfilter/vf_framepack.c | |
parent | 423b6a7e493828dd91d5e590e0905236f1f46557 (diff) | |
download | ffmpeg-da784b81a671677342c54e32add39d7d9ce15563.tar.gz |
avfilter/vf_framepack: Use dedicated pointer for access
Improves readability.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/vf_framepack.c')
-rw-r--r-- | libavfilter/vf_framepack.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/libavfilter/vf_framepack.c b/libavfilter/vf_framepack.c index cbfcf1e036..3b915ddddf 100644 --- a/libavfilter/vf_framepack.c +++ b/libavfilter/vf_framepack.c @@ -233,19 +233,20 @@ static void horizontal_frame_pack(AVFilterLink *outlink, } } else { for (i = 0; i < 2; i++) { + const AVFrame *const input_view = s->input_views[i]; const int psize = 1 + (s->depth > 8); uint8_t *dst[4]; - int sub_w = psize * s->input_views[i]->width >> s->pix_desc->log2_chroma_w; + int sub_w = psize * input_view->width >> s->pix_desc->log2_chroma_w; - dst[0] = out->data[0] + i * s->input_views[i]->width * psize; + dst[0] = out->data[0] + i * input_view->width * psize; dst[1] = out->data[1] + i * sub_w; dst[2] = out->data[2] + i * sub_w; av_image_copy2(dst, out->linesize, - s->input_views[i]->data, s->input_views[i]->linesize, - s->input_views[i]->format, - s->input_views[i]->width, - s->input_views[i]->height); + input_view->data, input_view->linesize, + input_view->format, + input_view->width, + input_view->height); } } } @@ -259,12 +260,13 @@ static void vertical_frame_pack(AVFilterLink *outlink, int i; for (i = 0; i < 2; i++) { + const AVFrame *const input_view = s->input_views[i]; uint8_t *dst[4]; int linesizes[4]; - int sub_h = s->input_views[i]->height >> s->pix_desc->log2_chroma_h; + int sub_h = input_view->height >> s->pix_desc->log2_chroma_h; dst[0] = out->data[0] + i * out->linesize[0] * - (interleaved + s->input_views[i]->height * (1 - interleaved)); + (interleaved + input_view->height * (1 - interleaved)); dst[1] = out->data[1] + i * out->linesize[1] * (interleaved + sub_h * (1 - interleaved)); dst[2] = out->data[2] + i * out->linesize[2] * @@ -278,10 +280,10 @@ static void vertical_frame_pack(AVFilterLink *outlink, interleaved * out->linesize[2]; av_image_copy2(dst, linesizes, - s->input_views[i]->data, s->input_views[i]->linesize, - s->input_views[i]->format, - s->input_views[i]->width, - s->input_views[i]->height); + input_view->data, input_view->linesize, + input_view->format, + input_view->width, + input_view->height); } } |