MLK-25464 [8QM_MEK/8QXP_MEK] mxc: vpu_windsor: append end_of_seq instead of end_of_st...
authorShijie Qin <shijie.qin@nxp.com>
Mon, 26 Apr 2021 10:27:21 +0000 (18:27 +0800)
committerShijie Qin <shijie.qin@nxp.com>
Tue, 27 Apr 2021 06:01:44 +0000 (14:01 +0800)
Append end of sequence data instead of end of stream data at the end.
This is more appropriate since drvice doesn't know is current user
case is reset or actual end encode.
Besides, Amphion decoder will quit early during decoding if parse
end of stream data.

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: ming_qian <ming.qian@nxp.com>
(cherry picked from commit 9c9b3e52885e90d2ed2ceb925fe67e1c67161d31)

drivers/mxc/vpu_windsor/vpu_encoder_b0.c
drivers/mxc/vpu_windsor/vpu_encoder_config.h

index 8c34ed7..2ea5c61 100644 (file)
@@ -2659,7 +2659,7 @@ static int transfer_stream_output(struct vpu_ctx *ctx,
 static int append_empty_end_frame(struct vb2_data_req *p_data_req)
 {
        struct vb2_buffer *vb = NULL;
-       const u8 pattern[] = VPU_STRM_END_PATTERN;
+       const u8 pattern[] = VPU_STRM_END_OF_SEQ;
        void *pdst;
 
        WARN_ON(!p_data_req);
index 8f977b9..2b583c7 100644 (file)
@@ -30,6 +30,7 @@
 #define VPU_TAIL_SERACH_SIZE           16
 #define VPU_STRM_END_PATTERN           {0x0, 0x0, 0x1, 0xb}
 #define VPU_STRM_BEGIN_PATTERN         {0x0, 0x0, 0x1}
+#define VPU_STRM_END_OF_SEQ            {0x0, 0x0, 0x1, 0xa}
 
 #define MSG_DATA_DEFAULT_SIZE          256
 #define MSG_COUNT_THD                  16