Skip to content
Permalink
Browse files
Subject: [PATCH] staging: media: meson: vdec: declare u32 as static c…
…onst

Declared 32 bit unsigned int as static constant inside a function and
replaced u32[] {x,y} as canvas3, canvas4 in codec_h264.c
This indicates the value of canvas indexes will remain constant throughout execution.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
  • Loading branch information
M810-B authored and intel-lab-lkp committed Apr 12, 2021
1 parent f2f560e commit c9873622761b42d977b48804bb0b4b9a7fbcd6b3
Showing 1 changed file with 3 additions and 3 deletions.
@@ -287,10 +287,10 @@ static void codec_h264_resume(struct amvdec_session *sess)
struct amvdec_core *core = sess->core;
struct codec_h264 *h264 = sess->priv;
u32 mb_width, mb_height, mb_total;
static const u32[] canvas3 = { ANCO_CANVAS_ADDR, 0 };
static const u32[] canvas4 = { 24, 0 };

amvdec_set_canvases(sess,
(u32[]){ ANC0_CANVAS_ADDR, 0 },
(u32[]){ 24, 0 });
amvdec_set_canvases(sess, canvas3, canvas4);

dev_dbg(core->dev, "max_refs = %u; actual_dpb_size = %u\n",
h264->max_refs, sess->num_dst_bufs);

0 comments on commit c987362

Please sign in to comment.