From: Boris Brezillon <boris.brezillon@collabora.com>
To: Ezequiel Garcia <ezequiel@collabora.com>
Cc: linux-media@vger.kernel.org,
Hans Verkuil <hans.verkuil@cisco.com>,
kernel@collabora.com,
Nicolas Dufresne <nicolas.dufresne@collabora.com>,
Tomasz Figa <tfiga@chromium.org>,
linux-rockchip@lists.infradead.org,
Heiko Stuebner <heiko@sntech.de>, Jonas Karlman <jonas@kwiboo.se>,
Philipp Zabel <p.zabel@pengutronix.de>,
ZhiChao Yu <zhichao.yu@rock-chips.com>
Subject: Re: [PATCH 2/2] media: hantro: Add support for VP8 decoding on rk3288
Date: Mon, 17 Jun 2019 15:40:24 +0200 [thread overview]
Message-ID: <20190617154024.1fdb5d3c@collabora.com> (raw)
In-Reply-To: <20190613151040.8971-3-ezequiel@collabora.com>
On Thu, 13 Jun 2019 12:10:40 -0300
Ezequiel Garcia <ezequiel@collabora.com> wrote:
> +static void cfg_parts(struct hantro_ctx *ctx,
> + const struct v4l2_ctrl_vp8_frame_header *hdr)
> +{
> + struct hantro_dev *vpu = ctx->dev;
> + struct vb2_v4l2_buffer *vb2_src;
> + u32 first_part_offset = VP8_FRAME_IS_KEY_FRAME(hdr) ? 10 : 3;
> + u32 dct_part_total_len = 0;
> + u32 dct_size_part_size = 0;
> + u32 dct_part_offset = 0;
> + u32 mb_offset_bytes = 0;
> + u32 mb_offset_bits = 0;
> + u32 mb_start_bits = 0;
> + struct vp8_dec_reg reg;
> + dma_addr_t src_dma;
> + u32 mb_size = 0;
> + u32 count = 0;
> + u32 i;
> +
> + vb2_src = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
> + src_dma = vb2_dma_contig_plane_dma_addr(&vb2_src->vb2_buf, 0);
> +
> + /*
> + * Calculate control partition mb data info
> + * @macroblock_bit_offset: bits offset of mb data from first
> + * part start pos
> + * @mb_offset_bits: bits offset of mb data from src_dma
> + * base addr
> + * @mb_offset_byte: bytes offset of mb data from src_dma
> + * base addr
> + * @mb_start_bits: bits offset of mb data from mb data
> + * 64bits alignment addr
> + */
> + mb_offset_bits = first_part_offset * 8
> + + hdr->macroblock_bit_offset + 8;
> + mb_offset_bytes = mb_offset_bits / 8;
> + mb_start_bits = mb_offset_bits
> + - (mb_offset_bytes & (~DEC_8190_ALIGN_MASK)) * 8;
> + mb_size = hdr->first_part_size
> + - (mb_offset_bytes - first_part_offset)
> + + (mb_offset_bytes & DEC_8190_ALIGN_MASK);
Nit: can we have operators placed at the end of a line instead of
the beginning of the following line?
next prev parent reply other threads:[~2019-06-17 13:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-13 15:10 [PATCH 0/2] RK3288 VP8 decoding support Ezequiel Garcia
2019-06-13 15:10 ` [PATCH 1/2] media: uapi: Add VP8 stateless decoder API Ezequiel Garcia
2019-06-17 13:23 ` Boris Brezillon
2019-06-20 3:46 ` Ezequiel Garcia
2019-06-13 15:10 ` [PATCH 2/2] media: hantro: Add support for VP8 decoding on rk3288 Ezequiel Garcia
2019-06-17 13:40 ` Boris Brezillon [this message]
2019-06-20 3:47 ` Ezequiel Garcia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190617154024.1fdb5d3c@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=ezequiel@collabora.com \
--cc=hans.verkuil@cisco.com \
--cc=heiko@sntech.de \
--cc=jonas@kwiboo.se \
--cc=kernel@collabora.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=nicolas.dufresne@collabora.com \
--cc=p.zabel@pengutronix.de \
--cc=tfiga@chromium.org \
--cc=zhichao.yu@rock-chips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).