From: Dafna Hirschfeld <dafna3@gmail.com>
To: linux-media@vger.kernel.org
Cc: hverkuil@xs4all.nl, helen.koike@collabora.com,
Dafna Hirschfeld <dafna3@gmail.com>
Subject: [PATCH v2 09/10] media: vicodec: add a flag FWHT_FL_P_FRAME to fwht header
Date: Fri, 15 Feb 2019 05:05:09 -0800 [thread overview]
Message-ID: <20190215130509.86290-10-dafna3@gmail.com> (raw)
In-Reply-To: <20190215130509.86290-1-dafna3@gmail.com>
Add the flag 'FWHT_FL_P_FRAME' to indicate that
the frame is a p-frame so it needs the previous buffer
as a reference frame. This is needed for the stateless
codecs.
Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
---
drivers/media/platform/vicodec/codec-fwht.h | 1 +
drivers/media/platform/vicodec/codec-v4l2-fwht.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/drivers/media/platform/vicodec/codec-fwht.h b/drivers/media/platform/vicodec/codec-fwht.h
index eab4a97aa132..c2b1f3cc9fed 100644
--- a/drivers/media/platform/vicodec/codec-fwht.h
+++ b/drivers/media/platform/vicodec/codec-fwht.h
@@ -76,6 +76,7 @@
#define FWHT_FL_CHROMA_FULL_HEIGHT BIT(7)
#define FWHT_FL_CHROMA_FULL_WIDTH BIT(8)
#define FWHT_FL_ALPHA_IS_UNCOMPRESSED BIT(9)
+#define FWHT_FL_P_FRAME BIT(10)
/* A 4-values flag - the number of components - 1 */
#define FWHT_FL_COMPONENTS_NUM_MSK GENMASK(18, 16)
diff --git a/drivers/media/platform/vicodec/codec-v4l2-fwht.c b/drivers/media/platform/vicodec/codec-v4l2-fwht.c
index 40b1f4901fd3..1c20b5685201 100644
--- a/drivers/media/platform/vicodec/codec-v4l2-fwht.c
+++ b/drivers/media/platform/vicodec/codec-v4l2-fwht.c
@@ -257,6 +257,8 @@ int v4l2_fwht_encode(struct v4l2_fwht_state *state, u8 *p_in, u8 *p_out)
flags |= FWHT_FL_CR_IS_UNCOMPRESSED;
if (encoding & FWHT_ALPHA_UNENCODED)
flags |= FWHT_FL_ALPHA_IS_UNCOMPRESSED;
+ if (encoding & FWHT_FRAME_PCODED)
+ flags |= FWHT_FL_P_FRAME;
if (rf.height_div == 1)
flags |= FWHT_FL_CHROMA_FULL_HEIGHT;
if (rf.width_div == 1)
--
2.17.1
next prev parent reply other threads:[~2019-02-15 13:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-15 13:05 [PATCH v2 00/10] add support to stateless decoder Dafna Hirschfeld
2019-02-15 13:05 ` [PATCH v2 01/10] media: v4l2-ctrl: v4l2_ctrl_request_setup returns with error upon failure Dafna Hirschfeld
2019-02-15 13:05 ` [PATCH v2 02/10] media: vicodec: Move raw frame preparation code to a function Dafna Hirschfeld
2019-02-15 13:05 ` [PATCH v2 03/10] media: vicodec: add field 'buf' to fwht_raw_frame Dafna Hirschfeld
2019-02-15 13:05 ` [PATCH v2 04/10] media: vicodec: keep the ref frame according to the format in decoder Dafna Hirschfeld
2019-02-19 10:30 ` Hans Verkuil
2019-02-19 10:33 ` Hans Verkuil
2019-02-15 13:05 ` [PATCH v2 05/10] media: vicodec: add struct for encoder/decoder instance Dafna Hirschfeld
2019-02-15 13:05 ` [PATCH v2 06/10] media: vicodec: Introducing stateless fwht defs and structs Dafna Hirschfeld
2019-02-19 10:00 ` Hans Verkuil
2019-02-19 10:45 ` Hans Verkuil
2019-02-15 13:05 ` [PATCH v2 07/10] media: vicodec: Register another node for stateless decoder Dafna Hirschfeld
2019-02-15 21:37 ` kbuild test robot
2019-02-19 10:18 ` Hans Verkuil
2019-02-15 13:05 ` [PATCH v2 08/10] media: vicodec: call v4l2_m2m_buf_copy_metadata also upon error Dafna Hirschfeld
2019-02-19 10:02 ` Hans Verkuil
2019-02-15 13:05 ` Dafna Hirschfeld [this message]
2019-02-15 13:42 ` [PATCH v2 09/10] media: vicodec: add a flag FWHT_FL_P_FRAME to fwht header Hans Verkuil
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=20190215130509.86290-10-dafna3@gmail.com \
--to=dafna3@gmail.com \
--cc=helen.koike@collabora.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
/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).