Hi,

This patch adds copy of HDR  VUI info from decode ctx to encode ctx. Currently, 
information under colour_description_present_flag (eg. colour primaries, 
transfer_characteristics, matrix_coeffs) do not get copied to output stream 
when trancode happens.

Testing performed:
ffmpeg.exe -y -hwaccel cuvid -vcodec hevc_cuvid -i input.h265 -vcodec 
hevc_nvenc output.h265
Ensure the output bitstream contains the same colour_description_present_flag 
fields as input.

Also attaching previous discussion on this subject.

Thanks,
Ben

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

Attachment: HDR_transcode_VUI_copy.patch
Description: HDR_transcode_VUI_copy.patch

--- Begin Message ---
On Fri, Mar 3, 2017 at 4:38 AM, Ben Chang <b...@nvidia.com> wrote:
>
> In short, is there any way to transfer meta data between a decode and encode 
> context in transcode scenario? If not, would it be supported in foreseeable 
> future?
>

Hi,

AVFrames do contain fields for:
* color_primaries
* color_trc
* colorspace
... and then there is the "new" side data type for the mastering
display data (AVMasteringDisplayMetadata).

So in theory if the decoder exports that information (AVC supports at
least the first three, and HEVC the latter side data as well) and you
utilize those values of the AVFrame in the encoder module, that should
be possible to obtain. Also I think AVFilter also takes in AVFrames,
which makes utilization of such information and updating it throughout
the chain possible when using the libav* framework.

Also, the recently merged better initialization of inputs in ffmpeg.c
might possibly help with some formats if ffmpeg.c is utilized and the
components involved support using the information within the AVFrames.

Best regards,
Jan Ekström
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

--- End Message ---
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to