CN110166798B - 一种基于4k hdr编辑的下变换方法及装置 - Google Patents

一种基于4k hdr编辑的下变换方法及装置 Download PDF

Info

Publication number
CN110166798B
CN110166798B CN201910469194.2A CN201910469194A CN110166798B CN 110166798 B CN110166798 B CN 110166798B CN 201910469194 A CN201910469194 A CN 201910469194A CN 110166798 B CN110166798 B CN 110166798B
Authority
CN
China
Prior art keywords
pixel point
target pixel
target
point
order
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910469194.2A
Other languages
English (en)
Other versions
CN110166798A (zh
Inventor
马萧萧
康佳星
代淑群
周熙
冯良怀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Dongfangshengxing Electronics Co ltd
Original Assignee
Chengdu Dongfangshengxing Electronics Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Dongfangshengxing Electronics Co ltd filed Critical Chengdu Dongfangshengxing Electronics Co ltd
Priority to CN201910469194.2A priority Critical patent/CN110166798B/zh
Publication of CN110166798A publication Critical patent/CN110166798A/zh
Application granted granted Critical
Publication of CN110166798B publication Critical patent/CN110166798B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234309Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4 or from Quicktime to Realvideo
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234363Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by altering the spatial resolution, e.g. for clients with a lower screen resolution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440218Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440263Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Image Processing (AREA)

Abstract

本发明公开了一种基于4K HDR编辑的下变换方法及装置,将待处理视频解码,得到视频源格式,分别对每一帧的Y、U、V分量执行下变换操作,所述下变换操作包括以下步骤:S1:将目标像素位置映射至源帧,得到虚拟像素点;S2:在虚拟像素点周围选取像素点矩阵作为目标像素的参考点;S3:对参考点进行水平一阶lanczos插值和垂直一阶lanczos插值,得到目标像素点的值。确保了4K数据下变换到高清数据时的高质量和画面流畅性,提供了良好的用户体验。

Description

一种基于4K HDR编辑的下变换方法及装置
技术领域
本发明涉及视频编辑领域,尤其涉及一种基于4K HDR编辑的下变换方法及装置。
背景技术
当前大量的无人机、手机、摄机像都支持4K的拍摄,在电视台的应用中,都使用4K进行编辑,打包输出文件时下变换到高清进行播出。现有的编辑方式无法确保4K数据下变换到高清数据的质量和画面流畅性。
发明内容
为了解决上述问题,本发明提出一种基于4K HDR编辑的下变换方法,将待处理视频解码,得到视频源格式,分别对每一帧的Y、U、V分量执行下变换操作,所述下变换操作包括以下步骤:
S1:将目标像素位置映射至源帧,得到虚拟像素点;
S2:在虚拟像素点周围选取像素点矩阵作为目标像素的参考点;
S3:对参考点进行水平一阶lanczos插值和垂直一阶lanczos插值,得到目标像素点的值。
重复步骤S1-S3,求取所有目标像素点;将处理后的Y、U、V分量进行编码得到目标视频。
进一步的,所述步骤S1包括以下子步骤:
S11:按以下方式确定缩放比例:
W_ratio=srcWidth/dstWidth;
H_ratio=srcHeight/dstHeight;
式中,W_ratio为宽度缩放比例,H_ratio为长度缩放比例,srcWidth为源帧宽度,srcHeight 为源帧高度,dstWidth为目标帧宽度,srcHeight为目标帧高度;
S12:按以下方式计算目标像素在源帧中的位置:
srcX=dstX×H_ratio;
srcY=dstY×W_ratio;
式中,dstX、dstY为目标像素位置,srcX、srcY为目标像素在源帧中的虚拟位置。
进一步的,所述步骤S2,当lanczos插值的半径为2时,选取虚拟像素点周围的4×4个点作为计算目标像素值的参考点。
进一步的,所述步骤S3,先通过四次水平一阶lanczos插值,得到4个点,再进行一次垂直一阶lanczos插值得到目标像素点的值。
进一步的,每次参与一阶lanczos运算的4个点的权重通过如下表达式确定,插值结果为 4个像素点的加权平均值:
Figure BDA0002080310740000021
式中,x表示像素点到原始帧待插值点的距离,a表示lanczos插值的半径。
一种下变换装置,包括解码单元、下变换器和编码单元;所述解码单元用于将待处理视频解码,提取Y、U、V分量,所述下变换器用于将目标像素位置映射至源帧,得到虚拟像素点,并在虚拟像素点周围选取像素点矩阵作为目标像素的参考点,再对参考点进行水平一阶lanczos插值和垂直一阶lanczos插值,得到目标像素点的值;所述编码单元将处理后的Y、 U、V分量进行编码得到目标视频。
本发明的有益效果在于:通过本发明,确保了4K数据下变换到高清数据时的高质量和画面流畅性,提供了良好的用户体验。
附图说明
图1是下变换方法流程图;
图2是实施例示意图。
具体实施方式
为了使本领域的技术人员更好地理解本发明的技术方案,下面结合附图和具体实施例对本发明作进一步的详细说明。
一种基于4K HDR编辑的下变换方法,将待处理视频解码,得到视频源格式,即.yuv文件,分别对每一帧的Y、U、V分量执行下变换操作,所述下变换操作如图1所示:
S1:将目标像素位置映射至源帧,得到虚拟像素点;
S2:在虚拟像素点周围选取像素点矩阵作为目标像素的参考点;
S3:对参考点进行水平一阶lanczos插值和垂直一阶lanczos插值,得到目标像素点的值。
重复步骤S1-S3,求取所有目标像素点;将处理后的Y、U、V分量进行编码得到目标视频。
本发明的一个实施例通过对原始帧进行下采样实现将4K视频转换为高清视频,采用lanczos插值进行视频帧下变换,
所述步骤S1包括以下子步骤:
S11:按以下方式确定缩放比例:
W_ratio=srcWidth/dstWidth;
H_ratio=srcHeight/dstHeight;
式中,W_ratio为宽度缩放比例,H_ratio为长度缩放比例,srcWidth为源帧宽度,srcHeight 为源帧高度,dstWidth为目标帧宽度,srcHeight为目标帧高度;
S12:按以下方式计算目标像素在源帧中的位置:
srcX=dstX×H_ratio;
srcY=dstY×W_ratio;
式中,dstX、dstY为目标像素位置,srcX、srcY为目标像素在源帧中的虚拟位置。srcX 和srcX一般都是浮点数,像素点O(srcX,srcY)在源帧中是虚拟存在的。
进一步的,所述步骤S2,当lanczos插值的半径为2时,选取虚拟像素点周围的4×4个点作为计算目标像素值的参考点。如图2中所示的位于线条交叉处的点。
进一步的,所述步骤S3,先通过四次水平一阶lanczos插值,得到4个点,再进行一次垂直一阶lanczos插值得到目标像素点的值。
在图2中,为计算目标像素的值,水平方向分别进行四次一阶lanczos插值,得到A、B、 C、D四点,然后再进行一次竖直方向上的lanczos插值,利用A、B、C、D点即可得到像素点O的值,即目标像素点的值。
进一步的,每次参与一阶lanczos运算的4个点的权重通过如下表达式确定,插值结果为 4个像素点的加权平均值:
Figure BDA0002080310740000031
式中,x表示像素点到原始帧待插值点的距离,a表示lanczos插值的半径。下变换时a的值取2较为适宜。
最后将处理好的Y、U、V分量写为.yuv文件,然后经编码得到最终经下变换后的视频。
一种下变换装置,包括解码单元、下变换器和编码单元;所述解码单元用于将待处理视频解码,提取Y、U、V分量,所述下变换器用于将目标像素位置映射至源帧,得到虚拟像素点,并在虚拟像素点周围选取像素点矩阵作为目标像素的参考点,再对参考点进行水平一阶lanczos插值和垂直一阶lanczos插值,得到目标像素点的值;所述编码单元将处理后的Y、 U、V分量进行编码得到目标视频。
需要说明的是,对于前述的各个方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某一些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和单元并不一定是本申请所必须的。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、 ROM、RAM等。
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。

Claims (7)

1.一种基于4K HDR编辑的下变换方法,将待处理视频解码,得到视频源格式,其特征在于:分别对每一帧的Y、U、V分量执行下变换操作,所述下变换操作包括以下步骤:
S1:将目标像素位置映射至源帧,通过缩放的方式计算得到虚拟像素点;
S2:在虚拟像素点周围选取像素点矩阵作为目标像素的参考点;
S3:对参考点进行水平一阶lanczos插值和垂直一阶lanczos插值,得到目标像素点的值。
2.根据权利要求1所述的一种基于4K HDR编辑的下变换方法,其特征在于:还包括:重复步骤S1-S3,求取所有目标像素点;将处理后的Y、U、V分量进行编码得到目标视频。
3.根据权利要求1所述的一种基于4K HDR编辑的下变换方法,其特征在于:所述步骤S1包括以下子步骤:
S11:按以下方式确定缩放比例:
W_ratio=srcWidth/dstWidth;
H_ratio=srcHeight/dstHeight;
式中,W_ratio为宽度缩放比例,H_ratio为长度缩放比例,srcWidth为源帧宽度,srcHeight为源帧高度,dstWidth为目标帧宽度,srcHeight为目标帧高度;
S12:按以下方式计算目标像素在源帧中的位置:
srcX=dstX×H_ratio;
srcY=dstY×W_ratio;
式中,dstX、dstY为目标像素位置,srcX、srcY为目标像素在源帧中的虚拟位置。
4.根据权利要求1所述的一种基于4K HDR编辑的下变换方法,其特征在于:所述步骤S2,当lanczos插值的半径为2时,选取虚拟像素点周围的4×4个点作为计算目标像素值的参考点。
5.根据权利要求4所述的一种基于4K HDR编辑的下变换方法,其特征在于:所述步骤S3,先通过四次水平一阶lanczos插值,得到4个点,再进行一次垂直一阶lanczos插值得到目标像素点的值。
6.根据权利要求5所述的一种基于4K HDR编辑的下变换方法,其特征在于:每次参与一阶lanczos运算的4个点的权重通过如下表达式确定,插值结果为4个像素点的加权平均值:
Figure FDA0003000315040000011
式中,x表示像素点到原始帧待插值点的距离,a表示lanczos插值的半径。
7.一种基于4K HDR编辑的下变换装置,其特征在于,执行权利要求1-6任意一项所述方法的步骤,包括解码单元、下变换器和编码单元;所述解码单元用于将待处理视频解码,提取Y、U、V分量,所述下变换器用于将目标像素位置映射至源帧,得到虚拟像素点,并在虚拟像素点周围选取像素点矩阵作为目标像素的参考点,再对参考点进行水平一阶lanczos插值和垂直一阶lanczos插值,得到目标像素点的值;所述编码单元将处理后的Y、U、V分量进行编码得到目标视频。
CN201910469194.2A 2019-05-31 2019-05-31 一种基于4k hdr编辑的下变换方法及装置 Active CN110166798B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910469194.2A CN110166798B (zh) 2019-05-31 2019-05-31 一种基于4k hdr编辑的下变换方法及装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910469194.2A CN110166798B (zh) 2019-05-31 2019-05-31 一种基于4k hdr编辑的下变换方法及装置

Publications (2)

Publication Number Publication Date
CN110166798A CN110166798A (zh) 2019-08-23
CN110166798B true CN110166798B (zh) 2021-08-10

Family

ID=67630465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910469194.2A Active CN110166798B (zh) 2019-05-31 2019-05-31 一种基于4k hdr编辑的下变换方法及装置

Country Status (1)

Country Link
CN (1) CN110166798B (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7232160B2 (ja) * 2019-09-19 2023-03-02 Tvs Regza株式会社 画質回路、映像処理装置および信号特徴検出方法
CN111885335B (zh) * 2020-06-19 2022-03-29 成都东方盛行电子有限责任公司 一种超高清下变换渲染方法
CN111901551A (zh) * 2020-06-19 2020-11-06 成都东方盛行电子有限责任公司 超高清小分辨率渲染编辑方法、***、终端设备及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1688166A (zh) * 2005-04-28 2005-10-26 天津大学 Hdtv到sdtv转换编码器
CN1750636A (zh) * 2005-09-29 2006-03-22 西安交通大学 数字高清晰度电视芯片输入高清晰电视和计算机信号方法
CN102016971A (zh) * 2008-06-27 2011-04-13 夏普株式会社 液晶显示装置的控制装置、液晶显示装置、液晶显示装置的控制方法、程序及其记录介质
CN102438135A (zh) * 2011-01-14 2012-05-02 展讯通信(上海)有限公司 高分辨率视频在小尺寸显示设备上的降采样解码方法及装置
CN103714512A (zh) * 2013-12-25 2014-04-09 中国船舶重工集团公司第七0九研究所 一种基于Lanczos核的实时彩色图像缩放方法
WO2015124754A1 (en) * 2014-02-21 2015-08-27 Koninklijke Philips N.V. High definition and high dynamic range capable video decoder
CN108681992A (zh) * 2018-04-23 2018-10-19 南京理工大学 用于探测器阵列法测量激光光斑的图像插值算法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011216948A (ja) * 2010-03-31 2011-10-27 Sony Corp カメラシステム、映像処理装置及びカメラ装置
US8508621B2 (en) * 2010-09-30 2013-08-13 Apple Inc. Image sensor data formats and memory addressing techniques for image signal processing

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1688166A (zh) * 2005-04-28 2005-10-26 天津大学 Hdtv到sdtv转换编码器
CN1750636A (zh) * 2005-09-29 2006-03-22 西安交通大学 数字高清晰度电视芯片输入高清晰电视和计算机信号方法
CN102016971A (zh) * 2008-06-27 2011-04-13 夏普株式会社 液晶显示装置的控制装置、液晶显示装置、液晶显示装置的控制方法、程序及其记录介质
CN102438135A (zh) * 2011-01-14 2012-05-02 展讯通信(上海)有限公司 高分辨率视频在小尺寸显示设备上的降采样解码方法及装置
CN103714512A (zh) * 2013-12-25 2014-04-09 中国船舶重工集团公司第七0九研究所 一种基于Lanczos核的实时彩色图像缩放方法
WO2015124754A1 (en) * 2014-02-21 2015-08-27 Koninklijke Philips N.V. High definition and high dynamic range capable video decoder
CN108681992A (zh) * 2018-04-23 2018-10-19 南京理工大学 用于探测器阵列法测量激光光斑的图像插值算法

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
4K超高清节目制播中HDR与SDR的兼容与转换;成六祥 邢卫东;《广播与电视技术》;20190415;全文 *
下变换设备在播出***中的使用和分析;陈登耀;《西部广播电视》;20161225;全文 *
关于下变换的思考;蒋光华;《现代电视技术》;20170215;全文 *

Also Published As

Publication number Publication date
CN110166798A (zh) 2019-08-23

Similar Documents

Publication Publication Date Title
US20200349680A1 (en) Image processing method and device, storage medium and electronic device
US9501818B2 (en) Local multiscale tone-mapping operator
CN110166798B (zh) 一种基于4k hdr编辑的下变换方法及装置
US9652829B2 (en) Video super-resolution by fast video segmentation for boundary accuracy control
JP5182957B2 (ja) アスペクト比変換のための画像データの可変スケーリング
US9001274B2 (en) Image processing method
US9471958B2 (en) Image processing method and apparatus
JP6039657B2 (ja) 3dコンテンツをリターゲティングするための方法およびデバイス
CN102291531A (zh) 图像处理装置、图像处理方法和程序
JP2014522596A5 (zh)
JP2002185776A (ja) 小サイズ画像処理エンジン
CN111986601B (zh) 屏幕显示方法、装置、终端设备和存储介质
CN110572713B (zh) 一种自适应视频宽高比的转码方法及处理终端
US10026013B2 (en) Clustering method with a two-stage local binary pattern and an iterative image testing system thereof
CN114245027B (zh) 一种视频数据混合处理方法、***、电子设备和存储介质
US20220138906A1 (en) Image Processing Method, Apparatus, and Device
KR102411911B1 (ko) 프레임 레이트 변환 장치 및 그 프레임 레이트 변환 방법
US20230196721A1 (en) Low-light video processing method, device and storage medium
CN110121032B (zh) 一种显示动画特效的方法、装置、设备及存储介质
JP2016095667A (ja) 画像処理装置および電子機器
WO2024130715A1 (zh) 视频处理方法、视频处理装置和可读存储介质
CN115019225A (zh) 全景视频行为识别方法、装置、设备与介质
CN113068029A (zh) 用于移动端的视频解码方法、***、存储介质及电子设备
CN115249207A (zh) 视频超分方法、装置、视频超分模型、介质及终端设备
CN113298705A (zh) 一种图像超分辨率处理方法及装置

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant