linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dikshita Agarwal <dikshita@codeaurora.org>
To: mchehab@kernel.org, hverkuil-cisco@xs4all.nl,
	ezequiel@collabora.com, boris.brezillon@collabora.com,
	ribalda@kernel.org, paul.kocialkowski@bootlin.com,
	posciak@chromium.org, linux-media@vger.kernel.org,
	stanimir.varbanov@linaro.org, linux-kernel@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org, vgarodia@codeaurora.org,
	majja@codeaurora.org, Dikshita Agarwal <dikshita@codeaurora.org>
Subject: [RFC PATCH 0/1] Add LTR controls
Date: Thu, 11 Jun 2020 15:55:20 +0530	[thread overview]
Message-ID: <1591871121-25420-1-git-send-email-dikshita@codeaurora.org> (raw)

LTR (Long Term Reference) frames are the frames that are encoded sometime in the past
and stored in the DPB buffer list to be used as reference to encode future frames.
One usage of LTR encoding is to reduce error propagation for video transmission
in packet lossy networks.  For example, encoder may want to specify some key frames as
LTR pictures and use them as reference frames for encoding. With extra protection
selectively on these LTR frames or synchronization with the receiver of reception of
the LTR frames during transmission, decoder can receive reference frames more reliably
than other non-reference frames. As a result, transmission error can be effectively
restricted within certain frames rather than propagated to future frames.

We are introducing below V4l2 Controls for this feature
1. V4L2_CID_MPEG_VIDEO_LTRCOUNT
    a. This is used to query or configure the number of LTR frames.
       This is a static control and is controlled by the client.
    b. The LTR index varies from 0 to the max LTR-1.
    c. If LTR Count is more than max supported LTR count (max LTR) by driver, it will be rejected.
    d. Auto Marking : If LTR count is non zero,
        1) first LTR count frames would be mark as LTR automatically after
      	   every IDR frame (inclusive).
        2) For multilayer encoding: first LTR count base layer reference frames starting after
           every IDR frame (inclusive) in encoding order would be marked as LTR frames by the encoder.
        3) Auto marking of LTR due to IDR should consider following conditions:
            1. The frame is not already set to be marked as LTR.
            2. The frame is part of the base layer in the hierarchical layer case.
            3. The number of frames currently marked as LTR is less than the maximum LTR frame index plus 1.
    e. Encoder needs to handle explicit Mark/Use command when encoder is still doing "auto" marking

2. V4L2_CID_MPEG_VIDEO_MARKLTRFRAME :
    a. This signals to mark the current frame as LTR frame. It is a dynamic control and also provide the LTR index to be used.
    b. the LTR index provided by this control should never exceed the max LTR-1. Else it will be rejected.

3. V4L2_CID_MPEG_VIDEO_USELTRFRAME :
    a. This specifies the LTR frame(s) to be used for encoding the current frame. This is a dynamic control.
    b. LTR Use Bitmap : this consists of bits [0, 15]. A total of N LSB bits of this field are valid,
       where N is the maximum number of LTRs supported. All the other bits are invalid and should be rejected.
       The LSB corresponds to the LTR index 0. Bit N-1 from the LSB corresponds to the LTR index max LTR-1.

Dikshita Agarwal (1):
  media: v4l2-ctrls:  add control for ltr

 drivers/media/v4l2-core/v4l2-ctrls.c | 6 ++++++
 include/uapi/linux/v4l2-controls.h   | 4 ++++
 2 files changed, 10 insertions(+)

-- 
1.9.1


             reply	other threads:[~2020-06-11 10:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 10:25 Dikshita Agarwal [this message]
2020-06-11 10:25 ` [RFC PATCH 1/1] media: v4l2-ctrls: add control for ltr Dikshita Agarwal
2020-06-11 14:22 ` [RFC PATCH 0/1] Add LTR controls Nicolas Dufresne
2020-06-12  9:11   ` Hans Verkuil
2020-06-16 18:41     ` dikshita
2020-07-14  7:21       ` dikshita
2020-07-16  8:55       ` Hans Verkuil
2020-07-20 14:33         ` dikshita
2020-07-22 14:26           ` Hans Verkuil
2020-08-06 11:05             ` dikshita
2020-08-07  8:39               ` 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=1591871121-25420-1-git-send-email-dikshita@codeaurora.org \
    --to=dikshita@codeaurora.org \
    --cc=boris.brezillon@collabora.com \
    --cc=ezequiel@collabora.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=majja@codeaurora.org \
    --cc=mchehab@kernel.org \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=posciak@chromium.org \
    --cc=ribalda@kernel.org \
    --cc=stanimir.varbanov@linaro.org \
    --cc=vgarodia@codeaurora.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).