diff options
author | Dafna Hirschfeld <dafna3@gmail.com> | 2019-02-15 15:58:53 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-02-18 15:36:23 -0500 |
commit | 75e3e5b85da199e0c9a885c800933d74ee53ce3c (patch) | |
tree | 8364593c90178e8e371af49102a7fdb8fecec2e5 /drivers/media/platform/vicodec/vicodec-core.c | |
parent | 73a1d43293069eb19642cf7c110f229846a52213 (diff) |
media: vicodec: Add a flag for I-frames in fwht header
Add a flag 'FWHT_FL_I_FRAME' that indicates that
this is an I-frame. This requires incrementing
to version 3
This flag is needed for the upcoming stateless FWHT
decoder since it has to know if an encoded frame is
an I or a P frame.
Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
[hverkuil-cisco@xs4all.nl: added the last paragraph of the commit msg]
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/vicodec/vicodec-core.c')
-rw-r--r-- | drivers/media/platform/vicodec/vicodec-core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/vicodec/vicodec-core.c b/drivers/media/platform/vicodec/vicodec-core.c index 9d739ea5542d..d7636fe9e174 100644 --- a/drivers/media/platform/vicodec/vicodec-core.c +++ b/drivers/media/platform/vicodec/vicodec-core.c @@ -339,7 +339,7 @@ info_from_header(const struct fwht_cframe_hdr *p_hdr) unsigned int pixenc = 0; unsigned int version = ntohl(p_hdr->version); - if (version == FWHT_VERSION) { + if (version >= 2) { components_num = 1 + ((flags & FWHT_FL_COMPONENTS_NUM_MSK) >> FWHT_FL_COMPONENTS_NUM_OFFSET); pixenc = (flags & FWHT_FL_PIXENC_MSK); @@ -362,7 +362,7 @@ static bool is_header_valid(const struct fwht_cframe_hdr *p_hdr) if (w < MIN_WIDTH || w > MAX_WIDTH || h < MIN_HEIGHT || h > MAX_HEIGHT) return false; - if (version == FWHT_VERSION) { + if (version >= 2) { unsigned int components_num = 1 + ((flags & FWHT_FL_COMPONENTS_NUM_MSK) >> FWHT_FL_COMPONENTS_NUM_OFFSET); |