1
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2024-11-24 21:56:19 +00:00
Lakka-LibreELEC/projects/Samsung/patches/linux/samsung-0012-MEMEKA-media-s5p-mfc-copy-timestamp-and-timecode-in-.patch
2022-08-21 12:36:05 +00:00

53 lines
2.1 KiB
Diff

From ddff825a6c234556d761c8cb23d6c28c97d85339 Mon Sep 17 00:00:00 2001
From: Marian Mihailescu <mihailescu2m@gmail.com>
Date: Fri, 24 Jun 2022 17:36:37 +0000
Subject: [PATCH 12/21] MEMEKA: media: s5p-mfc: copy timestamp and timecode in
encoder output
Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
---
drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c
index b65e506665af..d445466046eb 100644
--- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c
+++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c
@@ -1214,6 +1214,7 @@ static int enc_post_frame_start(struct s5p_mfc_ctx *ctx)
{
struct s5p_mfc_dev *dev = ctx->dev;
struct s5p_mfc_buf *mb_entry;
+ struct s5p_mfc_buf *dst_buf;
unsigned long enc_y_addr = 0, enc_c_addr = 0;
unsigned long mb_y_addr, mb_c_addr;
int slice_type;
@@ -1233,8 +1234,12 @@ static int enc_post_frame_start(struct s5p_mfc_ctx *ctx)
&mb_entry->b->vb2_buf, 0);
mb_c_addr = vb2_dma_contig_plane_dma_addr(
&mb_entry->b->vb2_buf, 1);
+ dst_buf = list_entry(ctx->dst_queue.next,
+ struct s5p_mfc_buf, list);
if ((enc_y_addr == mb_y_addr) &&
(enc_c_addr == mb_c_addr)) {
+ dst_buf->b->timecode = mb_entry->b->timecode;
+ dst_buf->b->vb2_buf.timestamp = mb_entry->b->vb2_buf.timestamp;
list_del(&mb_entry->list);
ctx->src_queue_cnt--;
vb2_buffer_done(&mb_entry->b->vb2_buf,
@@ -1247,8 +1252,12 @@ static int enc_post_frame_start(struct s5p_mfc_ctx *ctx)
&mb_entry->b->vb2_buf, 0);
mb_c_addr = vb2_dma_contig_plane_dma_addr(
&mb_entry->b->vb2_buf, 1);
+ dst_buf = list_entry(ctx->dst_queue.next,
+ struct s5p_mfc_buf, list);
if ((enc_y_addr == mb_y_addr) &&
(enc_c_addr == mb_c_addr)) {
+ dst_buf->b->timecode = mb_entry->b->timecode;
+ dst_buf->b->vb2_buf.timestamp = mb_entry->b->vb2_buf.timestamp;
list_del(&mb_entry->list);
ctx->ref_queue_cnt--;
vb2_buffer_done(&mb_entry->b->vb2_buf,
--
2.17.1