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@xxxxxxxxx> --- 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