CN113038179A - Video encoding method, video decoding method, video encoding device, video decoding device and electronic equipment - Google Patents

Video encoding method, video decoding method, video encoding device, video decoding device and electronic equipment Download PDF

Info

Publication number
CN113038179A
CN113038179A CN202110217976.4A CN202110217976A CN113038179A CN 113038179 A CN113038179 A CN 113038179A CN 202110217976 A CN202110217976 A CN 202110217976A CN 113038179 A CN113038179 A CN 113038179A
Authority
CN
China
Prior art keywords
video frame
video
frame
information
processed
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.)
Pending
Application number
CN202110217976.4A
Other languages
Chinese (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202110217976.4A priority Critical patent/CN113038179A/en
Publication of CN113038179A publication Critical patent/CN113038179A/en
Priority to PCT/CN2022/077888 priority patent/WO2022179600A1/en
Pending legal-status Critical Current

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • 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

Landscapes

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

Abstract

本申请公开了一种视频编码方法、视频解码方法、装置及电子设备,属于通信技术领域。方法包括:获取待处理视频的第一视频帧;对所述第一视频帧进行亮度‑色度YUV编码;获取所述待处理视频的第二视频帧,其中,所述第二视频帧为与所述第一视频帧关联的N帧视频帧中的任一视频帧,所述N为正整数;对所述第二视频帧仅进行亮度Y编码。本申请提供的视频编码方法,在出现带宽受限的情况下,无需通过降低每一视频帧的分辨率来适应带宽,进而可以保证视频播放的清晰度。

Figure 202110217976

The present application discloses a video encoding method, a video decoding method, an apparatus and an electronic device, which belong to the technical field of communication. The method includes: obtaining a first video frame of a video to be processed; performing luminance-chroma YUV encoding on the first video frame; obtaining a second video frame of the video to be processed, wherein the second video frame is the same as the Any video frame among the N video frames associated with the first video frame, where N is a positive integer; only luminance Y encoding is performed on the second video frame. The video coding method provided by the present application does not need to reduce the resolution of each video frame to adapt to the bandwidth in the case of limited bandwidth, thereby ensuring the clarity of video playback.

Figure 202110217976

Description

视频编码方法、视频解码方法、装置及电子设备Video encoding method, video decoding method, device and electronic device

技术领域technical field

本申请属于通信技术领域,具体涉及一种视频编码方法、视频解码方法、装置及电子设备。The present application belongs to the field of communication technologies, and in particular relates to a video encoding method, a video decoding method, an apparatus, and an electronic device.

背景技术Background technique

随着通信技术的飞速发展,智能手机及平板电脑等电子设备越来越普及,并成为人们日常生活中不可或缺的工具。其中,视频录制功能作为电子设备的主要功能之一,可以供用户实现动态地记录身边发生的一切事物,提升电子设备的用户体验效果。With the rapid development of communication technology, electronic devices such as smart phones and tablet computers are becoming more and more popular and become indispensable tools in people's daily life. Among them, the video recording function, as one of the main functions of the electronic device, can be used by the user to dynamically record everything that happens around him, so as to improve the user experience of the electronic device.

目前,在视频帧编码过程中,由于可能出现传输编码后得到的视频帧数据的带宽受限的情况,或者为了视频播放的实时性或流畅性,或为了节省空间,而为满足视频码率要求,通常是在编码过程中降低视频帧的分辨率来降低视频帧数据的占用空间,从而导致视频播放的清晰度降低。At present, in the process of video frame encoding, the bandwidth of the video frame data obtained after transmission encoding may be limited, or in order to meet the video bit rate requirements for real-time or smooth video playback, or in order to save space. , usually by reducing the resolution of the video frame during the encoding process to reduce the occupied space of the video frame data, thereby reducing the definition of the video playback.

发明内容SUMMARY OF THE INVENTION

本申请实施例的目的是提供一种视频编码方法、视频解码方法、装置及电子设备,能够解决目前的电子设备因带宽受限而降低视频帧分辨率,导致视频播放的清晰度低的问题。The purpose of the embodiments of the present application is to provide a video encoding method, a video decoding method, an apparatus, and an electronic device, which can solve the problem that the current electronic device reduces the video frame resolution due to limited bandwidth, resulting in low resolution of video playback.

为了解决上述技术问题,本申请是这样实现的:In order to solve the above technical problems, this application is implemented as follows:

第一方面,本申请实施例提供了一种视频编码方法,包括:In a first aspect, an embodiment of the present application provides a video encoding method, including:

获取待处理视频的第一视频帧;Obtain the first video frame of the video to be processed;

对所述第一视频帧进行亮度-色度YUV编码;performing luminance-chrominance YUV encoding on the first video frame;

获取所述待处理视频的第二视频帧,其中,所述第二视频帧为与所述第一视频帧关联的N帧视频帧中的任一视频帧,所述N为正整数;Acquiring a second video frame of the video to be processed, wherein the second video frame is any video frame in N video frames associated with the first video frame, and N is a positive integer;

对所述第二视频帧仅进行亮度Y编码。Only luminance Y encoding is performed on the second video frame.

第二方面,本申请实施例提供了一种视频解码方法,包括:In a second aspect, an embodiment of the present application provides a video decoding method, including:

获取待处理视频的第一视频帧数据和第二视频帧数据;Obtain the first video frame data and the second video frame data of the video to be processed;

对所述待处理视频中的所述第一视频帧数据进行解码,得到第一视频帧的第一YUV信息,其中,所述第一视频帧数据为对所述第一视频帧进行YUV编码后生成的数据;Decode the first video frame data in the to-be-processed video to obtain the first YUV information of the first video frame, wherein the first video frame data is after performing YUV encoding on the first video frame generated data;

对所述待处理视频中的所述第二视频帧数据进行解码,得到第二视频帧的Y信息,其中,所述第二视频帧数据为对所述第二视频帧进行Y编码后生成的数据;Decoding the second video frame data in the to-be-processed video to obtain Y information of the second video frame, wherein the second video frame data is generated after performing Y encoding on the second video frame data;

基于所述第一YUV信息和所述第二视频帧的Y信息,对所述第二视频帧进行色彩传递处理,得到具有彩色的第二视频帧。Based on the first YUV information and the Y information of the second video frame, color transfer processing is performed on the second video frame to obtain a second video frame with color.

第三方面,本申请实施例提供了一种视频编码装置,包括:In a third aspect, an embodiment of the present application provides a video encoding apparatus, including:

第一视频帧获取模块,用于获取待处理视频的第一视频帧;a first video frame acquisition module, used to acquire the first video frame of the video to be processed;

YUV编码模块,用于对所述第一视频帧进行亮度-色度YUV编码;YUV encoding module, for performing luminance-chrominance YUV encoding on the first video frame;

第二视频帧获取模块,用于获取所述待处理视频的第二视频帧,其中,所述第二视频帧为与所述第一视频帧关联的N帧视频帧中的任一视频帧,所述N为正整数;A second video frame obtaining module, configured to obtain a second video frame of the to-be-processed video, wherein the second video frame is any video frame among N video frames associated with the first video frame, The N is a positive integer;

Y编码模块,用于对所述第二视频帧仅进行亮度Y编码。A Y encoding module, configured to perform only luminance Y encoding on the second video frame.

第四方面,本申请实施例提供了一种视频解码装置,包括:In a fourth aspect, an embodiment of the present application provides a video decoding apparatus, including:

视频帧数据获取模块,用于获取待处理视频的第一视频帧数据和第二视频帧数据;a video frame data acquisition module for acquiring the first video frame data and the second video frame data of the video to be processed;

第一解码模块,用于对所述待处理视频中的所述第一视频帧数据进行解码,得到第一视频帧的第一YUV信息,其中,所述第一视频帧数据为对所述第一视频帧进行YUV编码后生成的数据;A first decoding module, configured to decode the first video frame data in the to-be-processed video, and obtain first YUV information of the first video frame, wherein the first video frame data is the data for the first video frame. Data generated after a video frame is YUV encoded;

第二解码模块,用于对所述待处理视频中的所述第二视频帧数据进行解码,得到第二视频帧的Y信息,其中,所述第二视频帧数据为对所述第二视频帧进行Y编码后生成的数据;A second decoding module, configured to decode the second video frame data in the to-be-processed video to obtain Y information of the second video frame, wherein the second video frame data is the data for the second video frame The data generated after the frame is Y-encoded;

色彩传递模块,用于基于所述第一YUV信息和所述第二视频帧的Y信息,对所述第二视频帧进行色彩传递处理,得到具有彩色的第二视频帧。A color transfer module, configured to perform color transfer processing on the second video frame based on the first YUV information and the Y information of the second video frame to obtain a second video frame with color.

第五方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面或者第二方面所述的方法的步骤。In a fifth aspect, an embodiment of the present application provides an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being The processor implements the steps of the method according to the first aspect or the second aspect when executed.

第六方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面或者第二方面所述的方法的步骤。In a sixth aspect, an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the implementation is as described in the first aspect or the second aspect steps of the method.

第七方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面或者第二方面所述的方法。In a seventh aspect, an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction, and implement the first aspect Or the method described in the second aspect.

在本申请实施例中,通过对待处理视频的第一视频帧进行YUV编码,而对与第一视频帧关联的第二视频帧仅进行Y编码,如此,通过本申请实施例中的视频编码方法,由于仅对第二视频帧进行Y编码,从而可以有效降低编码后的第二视频帧的数据的占用空间;在保证视频清晰度的情况下,可以节省空间,提高视频帧的编码解码速度,还可以保证视频录制时的实时播放;在出现带宽受限的情况下,无需通过降低每一视频帧的分辨率来适应带宽,进而可以保证视频播放的清晰度。In this embodiment of the present application, YUV encoding is performed on the first video frame of the video to be processed, and only Y encoding is performed on the second video frame associated with the first video frame. In this way, the video encoding method in the embodiment of the present application is used. , because only Y-coding is performed on the second video frame, the data occupied space of the encoded second video frame can be effectively reduced; in the case of ensuring the video clarity, space can be saved and the encoding and decoding speed of the video frame can be improved, It can also ensure real-time playback during video recording; in the case of limited bandwidth, there is no need to reduce the resolution of each video frame to adapt to the bandwidth, thereby ensuring the clarity of video playback.

附图说明Description of drawings

图1是本申请实施例提供的一种视频编码方法的流程示意图;1 is a schematic flowchart of a video encoding method provided by an embodiment of the present application;

图2是本申请实施例提供的基于H.265对视频帧进行编码的示意图;2 is a schematic diagram of encoding a video frame based on H.265 provided by an embodiment of the present application;

图3是本申请实施例提供的视频帧的编码过程的示意图;3 is a schematic diagram of an encoding process of a video frame provided by an embodiment of the present application;

图4是本申请实施例提供的一种视频解码方法的流程示意图;4 is a schematic flowchart of a video decoding method provided by an embodiment of the present application;

图5是本申请实施例提供的视频帧的解码过程的示意图;5 is a schematic diagram of a decoding process of a video frame provided by an embodiment of the present application;

图6是本申请实施例提供的计算RGB过程的示意图;6 is a schematic diagram of a process for calculating RGB provided by an embodiment of the present application;

图7是本申请实施例提供的视频编码装置的结构示意图;7 is a schematic structural diagram of a video encoding apparatus provided by an embodiment of the present application;

图8是本申请实施例提供的视频解码装置的结构示意图;8 is a schematic structural diagram of a video decoding apparatus provided by an embodiment of the present application;

图9是本申请实施例提供的电子设备的硬件结构示意图之一;9 is one of the schematic diagrams of the hardware structure of the electronic device provided by the embodiment of the present application;

图10是本申请实施例提供的电子设备的硬件结构示意图之二。FIG. 10 is the second schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and distinguish between "first", "second", etc. The objects are usually of one type, and the number of objects is not limited. For example, the first object may be one or more than one. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the associated objects are in an "or" relationship.

下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的视频编码方法进行详细地说明。The video coding method provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios.

请参见图1,是本申请实施例提供的一种视频编码方法的流程示意图,应用于电子设备,如图1所示,上述视频编码方法包括如下步骤:Please refer to FIG. 1, which is a schematic flowchart of a video encoding method provided by an embodiment of the present application, which is applied to an electronic device. As shown in FIG. 1, the above video encoding method includes the following steps:

步骤101、获取待处理视频的第一视频帧;Step 101, obtaining the first video frame of the video to be processed;

步骤102、对所述第一视频帧进行亮度-色彩YUV编码;Step 102, performing luminance-color YUV encoding on the first video frame;

步骤103、获取所述待处理视频的第二视频帧;Step 103, obtaining the second video frame of the video to be processed;

步骤104、对所述第二视频帧仅进行亮度Y编码。Step 104: Perform only luminance Y encoding on the second video frame.

基于此,通过对待处理视频的第一视频帧进行YUV编码,而对与第一视频帧关联的第二视频帧仅进行Y编码,如此,通过本申请实施例中的视频编码方法,由于仅对第二视频帧进行Y编码,从而可以有效降低编码后的第二视频帧的数据的占用空间;在保证视频清晰度的情况下,可以节省空间,提高视频帧的编码解码速度,还可以保证视频录制时的实时播放;进而可以保证视频播放的清晰度。Based on this, YUV encoding is performed on the first video frame of the video to be processed, and only Y encoding is performed on the second video frame associated with the first video frame. Thus, with the video encoding method in the embodiment of the present application, since only the The second video frame is Y-coded, so that the data occupied space of the encoded second video frame can be effectively reduced; in the case of ensuring the video clarity, space can be saved, the encoding and decoding speed of the video frame can be improved, and the video frame can also be guaranteed. Real-time playback during recording; in turn, the clarity of video playback can be guaranteed.

在上述步骤101中,在待处理视频的传输过程中,电子设备可以获取到待处理视频的第一视频帧。In the above step 101, during the transmission process of the video to be processed, the electronic device may acquire the first video frame of the video to be processed.

其中,上述待处理视频可以是已录制好并存储于电子设备中的视频,那么,上述获取待处理视频的第一视频帧,可以是提取待处理视频中的一帧视频帧作为上述第一视频帧。或者,上述待处理视频也可以是正在录制中的视频,那么,上述获取待处理视频的第一视频帧,可以包括:在录制待处理视频的过程中,采集第一视频帧。Wherein, the above-mentioned video to be processed may be a video that has been recorded and stored in the electronic device, then, the above-mentioned acquisition of the first video frame of the to-be-processed video may be to extract a frame of video frame in the to-be-processed video as the above-mentioned first video frame. Alternatively, the video to be processed may also be a video being recorded. Then, obtaining the first video frame of the video to be processed may include: collecting the first video frame during recording of the video to be processed.

另外,上述第一视频帧可以为上述待处理视频中的任一视频帧。例如,在上述待处理视频为正在录制中的视频的情况下,上述第一视频帧可以是录制视频当前的视频帧;或者,也可以是在电子设备存储的视频中提取的任一视频帧。In addition, the above-mentioned first video frame may be any video frame in the above-mentioned to-be-processed video. For example, when the video to be processed is a video being recorded, the first video frame may be the current video frame of the recorded video; or, it may be any video frame extracted from the video stored by the electronic device.

当然,上述第一视频帧也可以是满足预设条件的视频帧。具体地,上述第一视频帧可以是第M个视频帧采集周期内采集到的第1帧视频帧,且电子设备在每一上述视频帧采集周期内采集N+1帧视频帧,M和N均为正整数。Of course, the above-mentioned first video frame may also be a video frame that satisfies a preset condition. Specifically, the above-mentioned first video frame may be the first frame of video frame collected in the M-th video frame collection period, and the electronic device collects N+1 frames of video frames in each of the above-mentioned video frame collection periods, M and N All are positive integers.

或者,上述第一视频帧也可以是根据视频帧的色度确定的视频帧,更为具体地,上述获取第一视频帧,可以包括:在待处理视频的第k帧视频帧与第k-1帧视频帧之间的色度差值超出预设色度范围的情况下,将第k帧视频帧确定为第一视频帧,其中,所述k为大于1的整数,即,将与上一帧视频帧的色度差值超出预设色度范围的视频帧确定为需要进行YUV编码的第一视频帧。Alternatively, the above-mentioned first video frame may also be a video frame determined according to the chromaticity of the video frame. More specifically, the above-mentioned obtaining the first video frame may include: between the k-th video frame and the k-th video frame of the video to be processed In the case where the chrominance difference value between 1 frame of video frames exceeds the preset chromaticity range, the kth video frame is determined as the first video frame, wherein the k is an integer greater than 1, that is, the same as the above. A video frame whose chrominance difference value of one frame of video frame exceeds the preset chrominance range is determined as the first video frame that needs to be YUV encoded.

需要说明的是,上述待处理视频的视频帧可以是采用任意YUV格式的视频帧,具体地,上述待处理视频的视频帧的YUV格式可以是采用4:4:4、4:2:2、4:2:0和4:1:1等中的任一种格式。It should be noted that the video frame of the video to be processed may be a video frame using any YUV format, and specifically, the YUV format of the video frame of the video to be processed may be 4:4:4, 4:2:2, Either of 4:2:0 and 4:1:1, etc.

上述步骤102中,在电子设备获取到上述第一视频帧之后,电子设备可以对上述第一视频帧进行亮度-色度(YUV,“Y””表示明亮度,也就是灰阶值;“U”和“V”表示的则是色度,作用是描述影像色彩及饱和度,用于指定像素的颜色)编码,即对第一视频帧的彩色图像信息进行编码,且被编码的彩色图像信息包括第一视频帧中图像的亮度信息以及色度信息。In the above-mentioned step 102, after the electronic device obtains the above-mentioned first video frame, the electronic device can perform a luminance-chrominance (YUV, "Y"" on the above-mentioned first video frame to indicate the brightness, that is, the gray scale value; "U " and "V" represent chromaticity, which is used to describe the color and saturation of the image, and is used to specify the color of the pixel) encoding, that is, to encode the color image information of the first video frame, and the encoded color image information Including luminance information and chrominance information of the image in the first video frame.

本申请实施例中,上述待处理视频中的视频帧的YUV格式可以是采用4:4:4、4:2:2、4:2:0和4:1:1等中的任一种格式。In this embodiment of the present application, the YUV format of the video frame in the video to be processed may be any one of 4:4:4, 4:2:2, 4:2:0, and 4:1:1, etc. .

另外,上述对第一视频帧的彩色图像信息进行编码,可以是采用任意的视频压缩技术对视频帧的彩色图像信息进行编码,具体地,可以是采用视频编码标准H.264或者视频编码标准H.265等的视频压缩技术进行编码。In addition, the above-mentioned encoding of the color image information of the first video frame may be to use any video compression technology to encode the color image information of the video frame, specifically, the video encoding standard H.264 or the video encoding standard H. .265 and other video compression techniques for encoding.

以采用H.265为例,H.265将图像划分为编码树块(coding tree blocks,CTU),而不是像H.264那样的16×16的宏块。根据不同的编码设置,编码树块的尺寸可以被设置为64×64或有限的32×32或16×16。其中,更大的编码树块可以提供更高的压缩效率(同样也需要更高的编码速度)。每个编码树块可以被递归分割,如利用四叉树结构分割为32×32、16×16、8×8的子区域,如图2所示,就是一个64×64编码树块的分区示例(需要说明的是,图2中实际为彩色图像)。每个图像进一步被区分为特殊的编码树块组,称之为切割(Slices)和拼贴(Tiles)。编码树单元是H.265的基本编码单位,如同H.264的宏块。编码树单元可向下分区编码单元(Coding Unit,CU)、预测单元(Prediction Unit,PU)及转换单元(TransformUnit,TU)。Taking H.265 as an example, H.265 divides an image into coding tree blocks (coding tree blocks, CTUs) instead of 16×16 macroblocks like H.264. According to different coding settings, the size of the coding tree block can be set to 64×64 or a limited 32×32 or 16×16. Among them, larger coding tree blocks can provide higher compression efficiency (and also require higher coding speed). Each coding tree block can be recursively divided, such as using a quad-tree structure to divide into 32×32, 16×16, 8×8 sub-regions, as shown in Figure 2, which is a partition example of a 64×64 coding tree block (It should be noted that in FIG. 2, it is actually a color image). Each picture is further divided into special coding tree blocks called Slices and Tiles. The coding tree unit is the basic coding unit of H.265, just like the macroblock of H.264. A coding tree unit may be partitioned down a Coding Unit (CU), a Prediction Unit (PU), and a Transform Unit (TU).

每个编码树单元内包含1个亮度与2个色度编码树块,以及记录额外信息的语法元素。假设视频帧是以YUV 4:2:0色彩采样进行压缩,因此以16x16的编码树单元为例,其中会包含1个16x16的亮度编码树块,以及2个8x8的色度编码树块。而在采用H26.5对上述第一视频帧进行编码,编码后会保留编码树单元内的亮度编码树块和色度编码树块(即被编码的彩色图像信息包括亮度信息和色度信息)。Each coding tree unit contains 1 luma and 2 chroma coding tree blocks, and syntax elements for recording additional information. It is assumed that the video frame is compressed with YUV 4:2:0 color sampling, so take a 16x16 coding tree unit as an example, which will contain a 16x16 luma coding tree block and two 8x8 chroma coding tree blocks. When using H26.5 to encode the above-mentioned first video frame, after encoding, the luma coding tree block and the chroma coding tree block in the coding tree unit will be retained (that is, the encoded color image information includes luminance information and chrominance information) .

需要说明的是,在上述电子设备对第一视频帧进行YUV编码后,可以得到第一视频帧的视频帧数据,电子设备可以将该视频帧数据发送或者缓存。It should be noted that after the electronic device performs YUV encoding on the first video frame, video frame data of the first video frame can be obtained, and the electronic device can send or cache the video frame data.

例如,在上述录制视频的过程中,电子设备可以将上述第一视频帧数据缓存,以使电子设备在后续接收到播放录制视频的指令的情况下,电子设备解码第一视频帧数据以显示第一视频帧。For example, in the process of recording the video, the electronic device may buffer the first video frame data, so that when the electronic device subsequently receives an instruction to play the recorded video, the electronic device decodes the first video frame data to display the first video frame data. A video frame.

在上述步骤103中,电子设备还可以获取上述待处理视频的第二视频帧。In the foregoing step 103, the electronic device may further acquire the second video frame of the foregoing video to be processed.

需要说明的是,上述获取第二视频帧可以是在获取上述第一视频帧之后执行,例如,在录制视频过程中,第二视频帧为在第一视频帧之后采集到的视频帧;或者,上述获取第二视频帧也可以与上述获取第一视频帧同时执行,例如,在上述待处理视频为存储的视频的情况下,电子设备可以每次提取待处理视频的多张视频帧,该多张视频帧包括上述第一视频帧和上述第二视频帧,在此并不进行限定。It should be noted that the above-mentioned acquiring of the second video frame may be performed after acquiring the above-mentioned first video frame, for example, during the video recording process, the second video frame is a video frame collected after the first video frame; or, The above-mentioned acquisition of the second video frame may also be performed at the same time as the above-mentioned acquisition of the first video frame. For example, in the case where the above-mentioned video to be processed is a stored video, the electronic device can extract multiple video frames of the video to be processed each time. The video frame includes the above-mentioned first video frame and the above-mentioned second video frame, which is not limited herein.

本申请实施例中,上述第二视频帧为上述N帧视频帧中的任一视频帧,该N帧视频帧为与上述第一视频帧关联的至少一张视频帧。In this embodiment of the present application, the second video frame is any one of the N video frames, and the N video frames are at least one video frame associated with the first video frame.

其中,上述第一视频帧与上述N帧视频帧关联,可以是第一视频帧与N帧视频帧之间存在预设的关联关系,具体地,可以是上述N帧视频帧中每一视频帧与上述第一视频帧之间的时间间隔小于或者等于预设时长,即上述N帧视频帧与上述第一视频帧为在上述预设时长内的采集到的视频帧。The above-mentioned first video frame is associated with the above-mentioned N frames of video frames, which may be a preset association relationship between the first video frame and the N-frame video frames, and specifically, may be each video frame in the above-mentioned N-frame video frames The time interval between the first video frame and the first video frame is less than or equal to the preset duration, that is, the N video frames and the first video frame are video frames collected within the preset duration.

需要说明的是,上述预设时长可以是根据实际需要进行设定的时长。例如,上述预设时长可以是0.5s、1s或者2s,等等。It should be noted that, the above-mentioned preset duration may be a duration set according to actual needs. For example, the above-mentioned preset duration may be 0.5s, 1s or 2s, and so on.

如前所述,上述第一视频帧可以是录制视频过程中采集到的视频帧,那么,上述N帧视频帧中的任一视频帧也可以是录制视频过程中采集到的且与上述第一视频帧关联的视频帧;又如前所述,上述N帧视频帧中每一视频帧与上述第一视频帧之间的时间间隔小于或者等于预设时长,那么,上述第二视频帧也可以为在第一视频帧之前或者之后采集到的,且与第一视频帧之间的时间间隔小于或者等于预设时长,即:As mentioned above, the above-mentioned first video frame may be a video frame collected during the video recording process, then any video frame in the above-mentioned N video frames may also be collected during the video recording process and is the same as the above-mentioned first video frame. The video frame associated with the video frame; as mentioned above, the time interval between each video frame in the above-mentioned N video frames and the above-mentioned first video frame is less than or equal to the preset duration, then the above-mentioned second video frame can also be is collected before or after the first video frame, and the time interval between the first video frame and the first video frame is less than or equal to the preset duration, that is:

上述步骤101,可以包括:The above step 101 may include:

在录制所述待处理视频的过程中,采集所述第一视频帧;in the process of recording the video to be processed, collecting the first video frame;

其中,所述第二视频帧为在所述第一视频帧之前或者之后采集到的,且与所述第一视频帧之间的时间间隔小于或者等于预设时长。Wherein, the second video frame is collected before or after the first video frame, and the time interval between the second video frame and the first video frame is less than or equal to a preset duration.

基于此,由于在录制视频过程中,预设时长内采集的视频帧之间的图像差异较小,从而通过将与第一视频帧处于预设时长内采集到的视频帧作为上述第二视频帧,可以提升视频编码质量。Based on this, during the video recording process, the image difference between the video frames collected within the preset duration is relatively small, so by taking the video frame collected within the preset duration from the first video frame as the above-mentioned second video frame , which can improve the video encoding quality.

本申请实施例中,上述第二视频帧可以是在上述第一视频帧之前采集到的视频帧,例如,上述第二视频帧可以是上述第一视频帧的前一帧视频帧,或者,上述第一视频帧为上述预设时长内的最后一帧视频帧,等等。In this embodiment of the present application, the second video frame may be a video frame collected before the first video frame, for example, the second video frame may be a video frame preceding the first video frame, or the above The first video frame is the last video frame within the above-mentioned preset duration, and so on.

或者,上述第二视频帧也可以是在上述第一视频帧之后采集到的视频帧,例如,上述第二视频帧可以是上述第一视频帧的后一帧视频帧,或者,上述第一视频帧为上述预设时长内的第1帧视频帧,等等。Alternatively, the above-mentioned second video frame may also be a video frame collected after the above-mentioned first video frame, for example, the above-mentioned second video frame may be a video frame after the above-mentioned first video frame, or the above-mentioned first video frame The frame is the first video frame within the above preset duration, and so on.

具体地,所述第一视频帧为第M个视频帧采集周期内采集到的第1帧视频帧,且电子设备在每一所述视频帧采集周期内采集N+1帧视频帧,M为正整数;Specifically, the first video frame is the first video frame collected in the Mth video frame collection period, and the electronic device collects N+1 video frames in each of the video frame collection periods, and M is positive integer;

所述获取所述待处理视频的第二视频帧,可以包括:The acquiring the second video frame of the video to be processed may include:

将在所述第M个视频帧采集周期内采集到的第i+1帧视频帧确定为第二视频帧,其中,所述i为小于或者等于所述N的整数。The i+1 th video frame collected in the M th video frame collection period is determined as the second video frame, where the i is an integer less than or equal to the N.

基于此,通过将录制视频过程中每一采集周期内的第1帧视频帧作为上述第一视频帧,而采集周期内的其它视频帧(即上述N帧视频帧中的视频帧)确定为上述第二视频帧,即每一采集周期内仅第1帧视频帧进行YUV编码,而其它视频帧均进行Y编码,可以进一步缩减进行YUV编码的视频帧的数量;在保证视频清晰度的情况下,可以节省空间,提高视频帧的编码解码速度,还可以保证视频录制时的实时播放;在传输的带宽有限的情况下,可以保证视频播放的清晰度;另外,周期性地对上述待处理视频的视频帧进行上述编码过程,还可以提升视频编码质量。Based on this, the first video frame in each acquisition period in the video recording process is taken as the first video frame, and the other video frames in the acquisition period (that is, the video frames in the above N video frames) are determined as the above-mentioned first video frame. The second video frame, that is, only the first video frame is subjected to YUV encoding in each acquisition period, while the other video frames are all subjected to Y encoding, which can further reduce the number of video frames subjected to YUV encoding; in the case of ensuring video clarity , which can save space, improve the encoding and decoding speed of video frames, and ensure real-time playback during video recording; in the case of limited transmission bandwidth, it can ensure the clarity of video playback; The above encoding process is performed on the video frame of the video frame, and the video encoding quality can also be improved.

需要说明的是,上述第M个视频帧采集周期可以是录制视频过程中的任意一个视频帧采集周期,且电子设备在每一视频帧采集周期内可以采集到N+1帧视频帧。It should be noted that the M th video frame collection period may be any video frame collection period in the video recording process, and the electronic device may collect N+1 video frames in each video frame collection period.

例如,如图3所示,在N=3即第M个视频帧采集周期包括第1帧视频帧、第2帧视频帧、第3帧视频帧以及第4帧视频帧的情况下,电子设备可以将第1帧视频帧作为上述第一视频帧,而将第2帧视频帧、第3帧视频帧以及第4帧视频帧分别作为上述第二视频帧。For example, as shown in FIG. 3, in the case where N=3, that is, the M-th video frame collection period includes the first video frame, the second video frame, the third video frame, and the fourth video frame, the electronic device The first video frame may be regarded as the first video frame, and the second video frame, the third video frame, and the fourth video frame may be regarded as the second video frame, respectively.

当然,上述N帧视频帧也可以是上述第一视频帧也可以是在录制视频过程中满足预设条件的任意一帧视频帧,而第二视频帧为在该第二视频帧之后不满足该预设条件且与第二视频帧存在关联的视频帧。Of course, the above-mentioned N video frames may also be the above-mentioned first video frame or any video frame that satisfies the preset condition during the video recording process, and the second video frame does not satisfy the above-mentioned second video frame after the second video frame. A video frame with preset conditions and associated with the second video frame.

具体地,上述对所述第一视频帧进行YUV编码,可以包括:Specifically, performing YUV encoding on the first video frame above may include:

在检测到所述第一视频帧的亮度值大于或者等于预设亮度值的情况下,对所述第一视频帧进行YUV编码;Under the condition that the luminance value of the first video frame is detected to be greater than or equal to the preset luminance value, YUV encoding is performed on the first video frame;

上述在确定所述第二视频帧与所述第一视频帧关联的情况下,对所述第二视频帧仅进行Y编码,包括:In the above, when it is determined that the second video frame is associated with the first video frame, only Y-coding is performed on the second video frame, including:

在确定所述第二视频帧的亮度值的第一亮度值小于所述预设亮度值,且所述第二视频帧与所述第一视频帧之间不存在亮度值大于或者等于所述预设亮度值的视频帧的情况下,对所述第二视频帧仅进行Y编码。It is determined that the first luminance value of the luminance value of the second video frame is smaller than the preset luminance value, and there is no luminance value greater than or equal to the predetermined luminance value between the second video frame and the first video frame. In the case of a video frame with a luminance value, only Y encoding is performed on the second video frame.

基于此,通过对录制视频过程中亮度值大于或者等于预设亮度值的第二视频帧进行YUV编码,而对第二视频帧之后采集到的且亮度值小于预设亮度值的每一帧视频帧(即第一视频帧)进行Y编码,从而不仅可以实现进一步降低录制视频的占用空间,而且还使视频编码过程中的编码方式更灵活多样。Based on this, YUV encoding is performed on the second video frame whose brightness value is greater than or equal to the preset brightness value during the video recording process, and each frame of video that is collected after the second video frame and whose brightness value is less than the preset brightness value is subjected to YUV encoding. The frame (ie, the first video frame) is Y-coded, so that not only can the occupied space of the recorded video be further reduced, but also the coding modes in the video coding process can be more flexible and diverse.

例如,假设在视频录制过程中,采集到第i帧视频帧的亮度值大于预设亮度值,i为正整数,则对第i帧视频帧进行YUV编码;若采集到第i+1帧视频帧和第i+2帧视频帧的亮度值均小于预设亮度值,则对第i+1帧视频帧和第i+2帧视频帧进行Y编码;若采集到第i+3帧视频帧和第i+4帧视频帧的亮度值均大于预设亮度值,则对到第i+3帧视频帧和第i+4帧视频帧进行YUV编码;若采集到第i+5帧视频帧的亮度值小于预设亮度值,则对第i+5帧视频帧进行Y编码,……,等等。For example, assuming that during the video recording process, the brightness value of the i-th video frame collected is greater than the preset brightness value, and i is a positive integer, YUV encoding is performed on the i-th video frame; if the i+1-th video frame is captured If the brightness values of the frame and the i+2th video frame are both smaller than the preset brightness value, Y-encoding is performed on the i+1th video frame and the i+2th video frame; if the i+3th video frame is collected and the luminance value of the i+4th video frame is greater than the preset luminance value, YUV encoding is performed on the i+3th video frame and the i+4th video frame; if the i+5th video frame is collected If the brightness value is less than the preset brightness value, Y-coding is performed on the i+5th video frame, ..., and so on.

需要说明的是,在上述电子设备对上述第二视频帧进行编码之后,可以得到第二视频帧的视频帧数据,电子设备可以将该第二视频帧的视频帧数据进行缓存,以使电子设备可以对第二视频帧进行回放;或者,也可以是将第二视频帧的视频帧数据发送至其他设备,以使其他电子设备可以观看该第二视频帧,在此并不进行限定。It should be noted that after the electronic device encodes the second video frame, the video frame data of the second video frame can be obtained, and the electronic device can cache the video frame data of the second video frame, so that the electronic device can cache the video frame data of the second video frame. The second video frame may be played back; or, video frame data of the second video frame may also be sent to other devices, so that other electronic devices can view the second video frame, which is not limited herein.

另外,需要说明的是,上述步骤103可以是在步骤102之后执行,也可以是在步骤102之前执行,或者与步骤101同时执行,还可以是与步骤102同时执行,而本申请为对上述视频编码方法进行说明,仅在图1中示出步骤103在步骤102之后执行的情况,在此并不进行限定。In addition, it should be noted that the above step 103 may be executed after step 102, or before step 102, or concurrently with step 101, or concurrently with step 102, and this application is for the above video In the description of the encoding method, only the case where step 103 is executed after step 102 is shown in FIG. 1 , which is not limited here.

在上述步骤104中,在获取上述第二视频帧之后,电子设备可以对上述第二视频帧仅进行Y编码,即对第二视频帧的灰度图像信息进行编码,且被编码的灰度图像信息包括第二视频帧中图像的亮度信息,而不包括色度信息,从而可以降低编码后的第二视频帧的视频帧数据所占用的空间。In the above step 104, after acquiring the second video frame, the electronic device may only perform Y encoding on the second video frame, that is, encode the grayscale image information of the second video frame, and the encoded grayscale image The information includes the luminance information of the image in the second video frame, but does not include the chrominance information, so that the space occupied by the video frame data of the encoded second video frame can be reduced.

请参见图4,是本申请实施例提供的一种视频解码方法的流程示意图,应用于电子设备,如图4所示,上述视频编码方法包括如下步骤:Please refer to FIG. 4 , which is a schematic flowchart of a video decoding method provided by an embodiment of the present application, which is applied to an electronic device. As shown in FIG. 4 , the above video encoding method includes the following steps:

步骤401、获取待处理视频的第一视频帧数据和第二视频帧数据;Step 401, obtaining the first video frame data and the second video frame data of the video to be processed;

步骤402、对所述待处理视频中的所述第一视频帧数据进行解码,得到第一视频帧的第一YUV信息,其中,所述第一视频帧数据为对所述第一视频帧进行YUV编码后生成的数据;Step 402: Decode the first video frame data in the to-be-processed video to obtain the first YUV information of the first video frame, wherein the first video frame data is performed on the first video frame. Data generated after YUV encoding;

步骤403、对所述待处理视频中的所述第二视频帧数据进行解码,得到第二视频帧的Y信息,其中,所述第二视频帧数据为对所述第二视频帧进行Y编码后生成的数据;Step 403: Decode the second video frame data in the to-be-processed video to obtain Y information of the second video frame, where the second video frame data is Y-encoding the second video frame post-generated data;

步骤404、基于所述第一YUV信息和所述第二视频帧的Y信息,对所述第二视频帧进行色彩传递处理,得到具有彩色的第二视频帧。Step 404: Based on the first YUV information and the Y information of the second video frame, perform color transfer processing on the second video frame to obtain a second video frame with color.

基于此,在对待处理视频进行播放的情况下,通过进行YUV编码的第一视频帧的YUV信息,对与第一视频帧关联的第二视频帧在解码过程中进行彩色图像的复原,从而实现可以第二视频帧以彩色图像显示,保证视频播放的质量。Based on this, in the case of playing the video to be processed, by performing the YUV information of the first video frame of YUV encoding, the second video frame associated with the first video frame is decoded to restore the color image, so as to achieve The second video frame can be displayed as a color image to ensure the quality of video playback.

在上述步骤401中,在电子设备播放上述待处理视频的过程中,电子设备可以获取待处理视频的第一视频帧数据和第二视频帧数据。In the above step 401, during the process of playing the above video to be processed by the electronic device, the electronic device may acquire first video frame data and second video frame data of the video to be processed.

本申请实施例中,上述第一视频帧数据为对第一视频帧进行YUV编码后得到的视频帧数据,上述第二视频帧数据为对第二视频帧仅进行Y编码后得到的视频帧数据,且第一视频帧数据所对应的第一视频帧与第二视频帧数据所对应的第二视频帧之间存在关联关系。In the embodiment of the present application, the above-mentioned first video frame data is video frame data obtained after YUV encoding is performed on the first video frame, and the above-mentioned second video frame data is video frame data obtained by only Y-encoding the second video frame , and there is an association relationship between the first video frame corresponding to the first video frame data and the second video frame corresponding to the second video frame data.

其中,上述获取第一视频帧数据和第二视频帧数据,可以是电子设备在缓存中读取上述第一视频帧数据和上述第二视频帧数据;或者,也可以是接收其他电子设备实时发送的第一视频帧数据和第二视频帧数据。Wherein, the obtaining of the first video frame data and the second video frame data may be that the electronic device reads the first video frame data and the second video frame data in the cache; or, it may also be receiving real-time transmission from other electronic devices. The first video frame data and the second video frame data.

另外,需要说明的是,上述执行视频解码方法的电子设备与执行图1中视频编码方法的电子设备,可以是相同的电子设备。例如,可以是电子设备录制上述待处理视频过程中,对录制的视频帧进行编码得到视频帧数据,并缓存视频帧数据,而在该电子设备回放上述待处理视频的过程中,电子设备对缓存的视频帧数据进行解码。In addition, it should be noted that the electronic device for executing the video decoding method and the electronic device for executing the video encoding method in FIG. 1 may be the same electronic device. For example, in the process of recording the above-mentioned video to be processed by the electronic device, the recorded video frame is encoded to obtain video frame data, and the video frame data is buffered, and in the process of playing back the above-mentioned video to be processed by the electronic device, the electronic device records the buffered data. The video frame data is decoded.

或者,上述执行视频解码方法的电子设备与执行图1中视频编码方法的电子设备,可以是不同的电子设备。例如,可以是电子设备1在录制待处理视频过程中,对录制的视频帧进行编码得到视频帧数据,并将视频帧数据传输至电子设备2,电子设备2在接收到上述电子设备1传输的视频帧数据之后,可以将视频帧数据进行解码,以实现播放上述待处理视频。Alternatively, the electronic device that executes the video decoding method and the electronic device that executes the video encoding method in FIG. 1 may be different electronic devices. For example, in the process of recording the video to be processed, the electronic device 1 encodes the recorded video frame to obtain video frame data, and transmits the video frame data to the electronic device 2, and the electronic device 2 receives the above-mentioned transmission from the electronic device 1. After the video frame data is obtained, the video frame data can be decoded, so as to play the above-mentioned to-be-processed video.

上述步骤402中,在电子设备获取到上述第一视频帧数据之后,电子设备可以对第一视频帧数据进行解码,得到上述第一视频帧的YUV信息(即第一YUV信息);同样地,上述步骤403中,在电子设备获取到上述第二视频帧数据之后,电子设备可以对第二视频帧数据进行解码,得到上述第二视频帧的Y信息。In the above-mentioned step 402, after the electronic device obtains the above-mentioned first video frame data, the electronic device can decode the first video frame data to obtain the YUV information of the above-mentioned first video frame (that is, the first YUV information); Similarly, In the foregoing step 403, after the electronic device obtains the second video frame data, the electronic device may decode the second video frame data to obtain the Y information of the second video frame.

需要说明的是,上述对第一视频帧数据进行解码以及对第二视频帧数据进行解码,可以是在获取第一视频帧数据和第二视频帧数据的操作执行完成之后分别执行,且对第一视频帧数据进行解码可以是在对第二视频帧数据解码之前执行,即如图4中所示,或者,也可以是第一视频帧数据进行解码也可以是在对第二视频帧数据解码之后执行,或者,还可以是第一视频帧数据进行解码与对第二视频帧数据解码同时执行。It should be noted that the decoding of the first video frame data and the decoding of the second video frame data may be performed respectively after the operations of acquiring the first video frame data and the second video frame data are completed, and the first video frame data and the second video frame data are respectively performed. The decoding of one video frame data may be performed before decoding the second video frame data, as shown in FIG. 4 , or, the decoding of the first video frame data may be performed or the decoding of the second video frame data may be performed. It is performed after that, or, the decoding of the first video frame data and the decoding of the second video frame data can also be performed simultaneously.

或者,第一视频帧数据进行解码也可以是在对第二视频帧数据解码,也可以是在电子设备获取到第一视频帧数据之后,执行对第一视频帧数据解码,即无需等待获取第二视频帧数据;在电子设备获取到第二视频帧数据之后,执行对第二视频帧数据解码,而获取第二视频帧数据可以是在第一视频帧数据解码完成之前执行,也可以是在第一视频帧数据解码完成之后执行,在此并不进行限定。Alternatively, the decoding of the first video frame data may be performed while decoding the second video frame data, or may be performed after the electronic device obtains the first video frame data, that is, the decoding of the first video frame data is performed, that is, there is no need to wait for obtaining the first video frame data. Two video frame data; after the electronic device obtains the second video frame data, decoding the second video frame data, and obtaining the second video frame data may be performed before the decoding of the first video frame data is completed, or may be performed in It is executed after the decoding of the first video frame data is completed, which is not limited herein.

其中,上述对第一视频帧数据和第二视频帧数据进行解码,可以是通过预设的解码方法对各视频帧数据进行解码,即第一视频帧数据中存在色度编码单元,解码后可以得到第一视频帧的彩色图像信息;第二视频帧数据中心仅存在亮度编码单元,而不存在色度编码单元,解码后可以得到第二视频帧的灰度图像信息。The above-mentioned decoding of the first video frame data and the second video frame data may be to decode each video frame data by a preset decoding method, that is, there is a chrominance coding unit in the first video frame data, and after decoding The color image information of the first video frame is obtained; there is only a luminance coding unit in the data center of the second video frame, and no chrominance coding unit exists, and the grayscale image information of the second video frame can be obtained after decoding.

另外,上述第一YUV信息可以是包括第一视频帧的亮度信息以及色度信息;而上述Y信息可以是仅包括第二视频帧的亮度信息。In addition, the above-mentioned first YUV information may include luminance information and chrominance information of the first video frame; and the above-mentioned Y information may include only luminance information of the second video frame.

上述步骤404中,在电子设备获取到第一视频帧的第一YUV信息和第二视频帧的Y信息的情况下,电子设备可以通过预设的方法,计算得到上述第二视频帧的YUV信息或者与YUV信息关联的色彩显示信息等。In the above step 404, when the electronic device obtains the first YUV information of the first video frame and the Y information of the second video frame, the electronic device can obtain the YUV information of the above-mentioned second video frame through a preset method by calculation. Or color display information associated with YUV information, etc.

例如,电子设备可以是直接将第一视频帧的第一YUV信息中的色度信息,作为与第一视频帧关联的第二视频帧的色度信息,从而使第二视频帧恢复的彩色图像的YUV信息包括上述第二视频帧的Y信息(即亮度信息)以及第一视频帧的色度信息。For example, the electronic device may directly use the chrominance information in the first YUV information of the first video frame as the chrominance information of the second video frame associated with the first video frame, so as to restore the color image of the second video frame The YUV information includes the above-mentioned Y information (ie, luminance information) of the second video frame and chrominance information of the first video frame.

其中,由于在图像显示过程中,通常是将图像的YUV信息转换成每一像素点的红(Red)绿(Green)蓝(Blue)(简称“RGB”)信息,以实现对彩色图像的显示。Among them, because in the image display process, the YUV information of the image is usually converted into the red (Red) green (Green) blue (Blue) (referred to as "RGB") information of each pixel to realize the display of color images. .

具体地,上述对所述第二视频帧进行色彩传递处理,可以包括:Specifically, the above-mentioned color transfer processing on the second video frame may include:

基于预设的深度神经网络模型,计算得到所述第二视频帧的红绿蓝RGB信息。Based on a preset deep neural network model, the red, green, and blue RGB information of the second video frame is obtained by calculation.

基于此,通过神经网络模型计算得到第二视频帧的RGB信息,从而使颜色传递后第二视频帧的彩色图像更接近实际采集的彩色图像,进一步提升视频播放过程中的图像质量。Based on this, the RGB information of the second video frame is calculated through the neural network model, so that the color image of the second video frame after color transfer is closer to the actual collected color image, and the image quality during video playback is further improved.

需要说明的是,上述深度神经网络模型可以是在对上述第二视频帧进行色彩传递处理之前预设于电子设备中的模型,且深度神经网络模型可以是通过大量的视频帧数据训练得到的模型,该训练过程可以包括:将训练集的样本输入至初始深度神经网络模型中,通过对初始深度神经网络模型的权重进行不断迭代更新,直至迭代更新后得到的模型的损失趋向于不变,最终得到上述深度神经网络模型,其中,上述训练集中每一样本可以是包括具有YUV信息的至少一帧第三视频帧、仅具有Y信息且与各第三视频帧关联的第四视频帧以及各第四视频帧的标注数据,该标注数据可以是第四视频帧的实际YUV信息。It should be noted that the above-mentioned deep neural network model may be a model preset in an electronic device before performing color transfer processing on the above-mentioned second video frame, and the deep neural network model may be a model obtained by training a large amount of video frame data. , the training process may include: inputting the samples of the training set into the initial deep neural network model, and continuously iteratively updating the weights of the initial deep neural network model until the loss of the model obtained after the iterative update tends to remain unchanged, and finally Obtain the above-mentioned deep neural network model, wherein, each sample in the above-mentioned training set may include at least one third video frame with YUV information, a fourth video frame with only Y information and associated with each third video frame, and each third video frame. Labeling data of four video frames, the labeling data may be actual YUV information of the fourth video frame.

本申请实施例中,上述基于预设的深度神经网络模型,计算得到所述第二视频帧的RGB信息,可以包括:In the embodiment of the present application, the above-mentioned calculation based on the preset deep neural network model to obtain the RGB information of the second video frame may include:

将所述第一YUV信息和所述第二视频帧的Y信息输入至所述深度神经网络模型,计算得到所述第二视频帧的RGB信息;或者,Inputting the first YUV information and the Y information of the second video frame into the deep neural network model, and calculating the RGB information of the second video frame; or,

将第二YUV信息和所述第二视频帧的Y信息输入至所述深度神经网络模型,计算得到所述第二视频帧的RGB信息,其中,所述第二YUV信息为在所述第一视频帧之后采集到的第N-1帧视频帧的YUV信息,且第1帧视频帧的YUV信息基于所述第一YUV信息和所述第1帧视频帧的Y信息计算得到。Input the second YUV information and the Y information of the second video frame into the deep neural network model, and calculate the RGB information of the second video frame, wherein the second YUV information is in the first YUV information of the N-1th video frame collected after the video frame, and the YUV information of the first video frame is calculated based on the first YUV information and the Y information of the first video frame.

基于此,在对第二视频帧进行色彩传递处理过程中,可以是直接采用第一视频帧的YUV信息进行色彩传递;或者,在第二视频帧与第一视频帧之间间隔至少一帧视频帧的情况下,也可以是采用上一帧视频帧的YUV信息进行色彩传递,从而使实现色彩传递处理的方式更灵活多样。Based on this, in the process of performing color transfer processing on the second video frame, the YUV information of the first video frame may be directly used for color transfer; or, at least one frame of video is spaced between the second video frame and the first video frame. In the case of frames, the YUV information of the previous video frame can also be used for color transfer, so that the color transfer processing method is more flexible and diverse.

以如图5所示的解码过程为例,在电子设备对第M个视频帧采集周期采集到的视频帧进行解码的情况下,假设第M个视频帧采集周期包括第1帧视频帧、第2帧视频帧、第3帧视频帧以及第4帧视频帧,且第1帧视频帧为进行YUV编码的视频帧,而第2帧视频帧、第3帧视频帧以及第4帧视频帧均为进行Y编码的视频帧,那么,电子设备显示第2帧视频帧、第3帧视频帧以及第4帧视频帧时,分别对第2帧视频帧、第3帧视频帧以及第4帧视频帧进行Y解码,可以是将第1帧视频帧的YUV信息和第2至4帧视频帧中任一帧的Y信息输入至上述深度神经网络模型,计算得到上述第2至4帧视频帧中对应视频帧的RGB信息,实现对第2至4帧视频帧中每一帧视频帧的色彩传递处理,并将色彩传递处理后的视频帧显示;Taking the decoding process shown in FIG. 5 as an example, in the case where the electronic device decodes the video frames collected in the Mth video frame collection period, it is assumed that the Mth video frame collection period includes the first video frame, the first video frame, the The 2nd video frame, the 3rd video frame and the 4th video frame, and the 1st video frame is the video frame of YUV encoding, and the 2nd video frame, the 3rd video frame and the 4th video frame are all video frames. In order to perform Y-coded video frames, then, when the electronic device displays the second video frame, the third video frame and the fourth video frame, the second video frame, the third video frame and the fourth video frame are respectively displayed. The Y decoding of the frame can be performed by inputting the YUV information of the first video frame and the Y information of any one of the second to fourth video frames into the above-mentioned deep neural network model, and calculating to obtain the above-mentioned second to fourth video frames in the video frame. Corresponding to the RGB information of the video frame, realize the color transfer processing of each video frame in the 2nd to 4th video frames, and display the video frame after the color transfer process;

或者,也可以是将第1帧视频帧的YUV信息和第2帧视频帧的Y信息输入至深度神经网络模型,计算得到第2帧视频帧的RGB信息;将第2帧视频帧计算得到的RGB信息对应的YUV信息和第3帧视频帧的Y信息输入至深度神经网络模型,计算得到第3帧视频帧的RGB信息;将第3帧视频帧计算得到的RGB信息对应的YUV信息和第4帧视频帧的Y信息输入至深度神经网络模型,计算得到第4帧视频帧的RGB信息,实现对进行Y编码的各视频帧的色彩传递处理。Alternatively, the YUV information of the first frame of video frame and the Y information of the second frame of video frame can also be input into the deep neural network model, and the RGB information of the second frame of video frame is obtained by calculating; The YUV information corresponding to the RGB information and the Y information of the third video frame are input into the deep neural network model, and the RGB information of the third video frame is calculated; The Y information of the four video frames is input to the deep neural network model, and the RGB information of the fourth video frame is calculated to realize the color transfer processing of each video frame that is Y-coded.

另外,上述基于预设的深度神经网络模型,计算得到所述第二视频帧的RGB信息,可以是将第一视频帧或者上一帧视频帧解码后的YUV信息通过颜色转换成RGB分量,再将第二视频帧的Y通道组合(如通过Concat函数实现组合)成一个4通道的输入,通过神经网络(Network)模型进行计算后输出一个RGB分量的图像,输出图像即对应于第二视频帧着色后的图像(即具有彩色的第二视频帧),如图6所示。In addition, the above-mentioned calculation based on the preset deep neural network model to obtain the RGB information of the second video frame may be by converting the decoded YUV information of the first video frame or the previous video frame into RGB components by color, and then Combine the Y channel of the second video frame (such as through the Concat function) into a 4-channel input, and output an RGB component image after calculation through the neural network (Network) model, and the output image corresponds to the second video frame. The rendered image (ie, the second video frame with color) is shown in Figure 6.

需要说明的是,本申请实施例提供的视频编码方法,执行主体可以为视频编码装置,或者该视频编码装置中的用于视频编码方法的控制模块。本申请实施例中以视频编码装置执行视频编码方法为例,说明本申请实施例提供的视频编码装置。It should be noted that, in the video encoding method provided by the embodiments of the present application, the execution body may be a video encoding device, or a control module in the video encoding device for the video encoding method. In the embodiments of the present application, the video encoding device provided by the embodiments of the present application is described by taking the video encoding method performed by the video encoding device as an example.

请参见图7,本申请实施例提供一种视频编码装置,如图7所示,该视频编码装置700包括:Referring to FIG. 7 , an embodiment of the present application provides a video encoding apparatus. As shown in FIG. 7 , the video encoding apparatus 700 includes:

第一视频帧获取模块701,用于获取待处理视频的第一视频帧;A first video frame obtaining module 701, configured to obtain a first video frame of a video to be processed;

YUV编码模块702,用于对所述第一视频帧进行亮度-色度YUV编码;YUV encoding module 702, configured to perform luminance-chrominance YUV encoding on the first video frame;

第二视频帧获取模块703,用于获取所述待处理视频的第二视频帧,其中,所述第二视频帧为与所述第一视频帧关联的N帧视频帧中的任一视频帧,所述N为正整数;A second video frame obtaining module 703, configured to obtain a second video frame of the to-be-processed video, where the second video frame is any video frame among N video frames associated with the first video frame , the N is a positive integer;

Y编码模块704,用于对所述第二视频帧仅进行亮度Y编码。The Y encoding module 704 is configured to perform only luminance Y encoding on the second video frame.

基于此,通过对待处理视频的第一视频帧进行YUV编码,而对与第一视频帧关联的第二视频帧仅进行Y编码,如此,通过本申请实施例中的视频编码方法,由于仅对第二视频帧进行Y编码,从而可以有效降低编码后的第二视频帧的数据的占用空间,故在出现带宽受限的情况下,无需通过降低每一视频帧的分辨率的来适应带宽,进而可以保证视频帧的清晰度。Based on this, YUV encoding is performed on the first video frame of the video to be processed, and only Y encoding is performed on the second video frame associated with the first video frame. Thus, with the video encoding method in the embodiment of the present application, since only the The second video frame is Y-coded, so that the data occupied space of the encoded second video frame can be effectively reduced. Therefore, when the bandwidth is limited, it is not necessary to reduce the resolution of each video frame to adapt to the bandwidth. In turn, the clarity of the video frame can be guaranteed.

可选的,所述第一视频帧获取模块701,具体用于:Optionally, the first video frame acquisition module 701 is specifically used for:

在录制所述待处理视频的过程中,采集所述第一视频帧;in the process of recording the video to be processed, collecting the first video frame;

其中,所述第二视频帧为在所述第一视频帧之前或者之后采集到的,且与所述第一视频帧之间的时间间隔小于或者等于预设时长。Wherein, the second video frame is collected before or after the first video frame, and the time interval between the second video frame and the first video frame is less than or equal to a preset duration.

基于此,由于在录制视频过程中,预设时长内采集的视频帧之间的图像差异较小,从而通过将与第一视频帧处于预设时长内采集到的视频帧作为上述第二视频帧,可以提升视频编码质量。Based on this, during the video recording process, the image difference between the video frames collected within the preset duration is relatively small, so by taking the video frame collected within the preset duration from the first video frame as the above-mentioned second video frame , which can improve the video encoding quality.

可选的,所述第一视频帧为第M个视频帧采集周期内采集到的第1帧视频帧,且电子设备在每一所述视频帧采集周期内采集N+1帧视频帧;Optionally, the first video frame is the first video frame collected in the Mth video frame collection period, and the electronic device collects N+1 video frames in each of the video frame collection periods;

所述第二视频帧获取模块703,具体用于:The second video frame acquisition module 703 is specifically used for:

将在所述第M个视频帧采集周期内采集到的第i+1帧视频帧确定为第二视频帧,其中,所述i为小于或者等于所述N的整数。The i+1 th video frame collected in the M th video frame collection period is determined as the second video frame, where the i is an integer less than or equal to the N.

基于此,通过将录制视频过程中每一采集周期内的第1帧视频帧作为上述第一视频帧,而采集周期内的其它视频帧确定为上述第二视频帧,即每一采集周期内仅第1帧视频帧进行YUV编码,而其它视频帧均进行Y编码,可以进一步缩减进行YUV编码的视频帧的数量;在保证视频清晰度的情况下,可以节省空间,提高视频帧的编码解码速度,还可以保证视频录制时的实时播放;在传输的带宽有限的情况下,可以保证视频播放的清晰度;另外,周期性地对上述待处理视频的视频帧进行上述编码过程,还可以提升视频编码质量。Based on this, the first video frame in each capture period in the video recording process is determined as the above-mentioned first video frame, and the other video frames in the capture period are determined as the above-mentioned second video frame, that is, in each capture period, only The first video frame is YUV encoded, and other video frames are Y encoded, which can further reduce the number of video frames for YUV encoding; in the case of ensuring video clarity, it can save space and improve the encoding and decoding speed of video frames. , it can also ensure real-time playback during video recording; in the case of limited transmission bandwidth, it can ensure the clarity of video playback; in addition, periodically performing the above encoding process on the video frames of the video to be processed can also improve the video quality. encoding quality.

可选的,所述第一视频帧获取模块701,具体用于:Optionally, the first video frame acquisition module 701 is specifically used for:

在所述待处理视频的第k帧视频帧与第k-1帧视频帧之间的色度差值超出预设色度范围的情况下,将所述第k帧视频帧确定为第一视频帧,其中,所述k为大于1的整数;In the case that the chrominance difference value between the kth video frame of the video to be processed and the k-1th video frame exceeds the preset chrominance range, determine the kth video frame as the first video frame, wherein the k is an integer greater than 1;

所述第二视频帧获取模块703,具体用于:The second video frame acquisition module 703 is specifically used for:

在检测到所述待处理视频的第i帧视频帧与所述第k帧视频帧之间的色度差值处于所述预设色度范围,且所述第i帧视频帧与所述第k帧视频帧之间不存在目标视频帧的情况下,将所述第i帧视频帧确定为第二视频帧,其中,所述目标视频帧为:与所述第k帧视频帧之间的色度差值超出所述预设色度范围的视频帧;所述i为大于所述k的整数。It is detected that the chrominance difference value between the i-th video frame of the video to be processed and the k-th video frame is within the preset chromaticity range, and the i-th video frame and the In the case where there is no target video frame between the k video frames, the i-th video frame is determined as the second video frame, wherein the target video frame is: the video frame between the k-th video frame and the k-th video frame The video frame whose chrominance difference value exceeds the preset chrominance range; the i is an integer greater than the k.

基于此,通过对录制视频过程中亮度值大于或者等于预设亮度值的第二视频帧进行YUV编码,而对第二视频帧之后采集到的且亮度值小于预设亮度值的每一帧视频帧(即第一视频帧)进行Y编码,从而不仅可以实现进一步降低录制视频的占用空间,而且还使视频编码过程中的编码方式更灵活多样。Based on this, YUV encoding is performed on the second video frame whose brightness value is greater than or equal to the preset brightness value during the video recording process, and each frame of video that is collected after the second video frame and whose brightness value is less than the preset brightness value is subjected to YUV encoding. The frame (ie, the first video frame) is Y-coded, so that not only can the occupied space of the recorded video be further reduced, but also the coding modes in the video coding process can be more flexible and diverse.

需要说明的是,本申请实施例提供的视频解码方法,执行主体可以为视频解码装置,或者该视频解码装置中的用于视频解码方法的控制模块。本申请实施例中以视频解码装置执行视频解码方法为例,说明本申请实施例提供的视频解码装置。It should be noted that, in the video decoding method provided by the embodiments of the present application, the execution body may be a video decoding device, or a control module used in the video decoding method in the video decoding device. In the embodiments of the present application, a video decoding method performed by a video decoding device is used as an example to describe the video decoding device provided by the embodiments of the present application.

请参见图8,本申请实施例提供一种视频解码装置,如图8所示,该视频解码装置800包括:Referring to FIG. 8 , an embodiment of the present application provides a video decoding apparatus. As shown in FIG. 8 , the video decoding apparatus 800 includes:

视频帧数据获取模块801,用于获取待处理视频的第一视频帧数据和第二视频帧数据;A video frame data acquisition module 801, configured to acquire the first video frame data and the second video frame data of the video to be processed;

第一解码模块802,用于对所述待处理视频中的所述第一视频帧数据进行解码,得到第一视频帧的第一YUV信息,其中,所述第一视频帧数据为对所述第一视频帧进行YUV编码后生成的数据;The first decoding module 802 is configured to decode the first video frame data in the to-be-processed video to obtain the first YUV information of the first video frame, wherein the first video frame data is for the Data generated after the first video frame is YUV encoded;

第二解码模块803,用于对所述待处理视频中的所述第二视频帧数据进行解码,得到第二视频帧的Y信息,其中,所述第二视频帧数据为对所述第二视频帧进行Y编码后生成的数据;The second decoding module 803 is configured to decode the second video frame data in the to-be-processed video to obtain Y information of the second video frame, wherein the second video frame data is the second video frame data for the second video frame. The data generated after the video frame is Y-encoded;

色彩传递模块804,用于基于所述第一YUV信息和所述第二视频帧的Y信息,对所述第二视频帧进行色彩传递处理,得到具有彩色的第二视频帧。The color transfer module 804 is configured to perform color transfer processing on the second video frame based on the first YUV information and the Y information of the second video frame to obtain a second video frame with color.

基于此,在对待处理视频进行播放的情况下,通过进行YUV编码的第一视频帧的YUV信息,对与第一视频帧关联的第二视频帧在解码过程中进行彩色图像的复原,从而实现可以第二视频帧以彩色图像显示,保证视频播放的质量。Based on this, in the case of playing the video to be processed, by performing the YUV information of the first video frame of YUV encoding, the second video frame associated with the first video frame is decoded to restore the color image, so as to achieve The second video frame can be displayed as a color image to ensure the quality of video playback.

可选的,所述色彩传递模块804,具体用于:Optionally, the color transfer module 804 is specifically configured to:

基于预设的深度神经网络模型,计算得到所述第二视频帧的红绿蓝RGB信息。Based on a preset deep neural network model, the red, green, and blue RGB information of the second video frame is obtained by calculation.

基于此,通过神经网络模型计算得到第二视频帧的RGB信息,从而使颜色传递后第二视频帧的彩色图像更接近实际采集的彩色图像,进一步提升视频播放过程中的图像质量。Based on this, the RGB information of the second video frame is calculated through the neural network model, so that the color image of the second video frame after color transfer is closer to the actual collected color image, and the image quality during video playback is further improved.

可选的,所述N大于1;Optionally, the N is greater than 1;

所述色彩传递模块804,具体用于:The color transfer module 804 is specifically used for:

将所述第一YUV信息和所述第二视频帧的Y信息输入至所述深度神经网络模型,计算得到所述第二视频帧的RGB信息;或者,Inputting the first YUV information and the Y information of the second video frame into the deep neural network model, and calculating the RGB information of the second video frame; or,

将第二YUV信息和所述第二视频帧的Y信息输入至所述深度神经网络模型,计算得到所述第二视频帧的RGB信息,其中,所述第二YUV信息为在所述第一视频帧之后采集到的第N-1帧视频帧的YUV信息,且第1帧视频帧的YUV信息基于所述第一YUV信息和所述第1帧视频帧的Y信息计算得到。Input the second YUV information and the Y information of the second video frame into the deep neural network model, and calculate the RGB information of the second video frame, wherein the second YUV information is in the first YUV information of the N-1th video frame collected after the video frame, and the YUV information of the first video frame is calculated based on the first YUV information and the Y information of the first video frame.

基于此,在对第二视频帧进行色彩传递处理过程中,可以是直接采用第一视频帧的YUV信息进行色彩传递;或者,在第二视频帧与第一视频帧之间间隔至少一帧视频帧的情况下,也可以是采用上一帧视频帧的YUV信息进行色彩传递,从而使实现色彩传递处理的方式更灵活多样。Based on this, in the process of performing color transfer processing on the second video frame, the YUV information of the first video frame may be directly used for color transfer; or, at least one frame of video is spaced between the second video frame and the first video frame. In the case of frames, the YUV information of the previous video frame can also be used for color transfer, so that the color transfer processing method is more flexible and diverse.

本申请实施例中的视频编码装置以及视频解码装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The video encoding apparatus and the video decoding apparatus in the embodiments of the present application may be apparatuses, and may also be components, integrated circuits, or chips in a terminal. The apparatus may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant). assistant, PDA), etc., the non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc. This application Examples are not specifically limited.

本申请实施例中的视频编码装置以及视频解码装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The video encoding apparatus and the video decoding apparatus in the embodiments of the present application may be apparatuses having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.

本申请实施例提供的视频编码装置能够实现图1的方法实施例实现的各个过程,以及,本申请实施例提供的视频解码装置能够实现图4的方法实施例实现的各个过程,为避免重复,这里不再赘述。The video encoding apparatus provided in the embodiment of the present application can implement each process implemented by the method embodiment in FIG. 1 , and the video decoding apparatus provided in the embodiment of the present application can implement each process implemented in the method embodiment in FIG. 4 . To avoid repetition, I won't go into details here.

可选的,如图9所示,本申请实施例还提供一种电子设备900,电子设备900包括处理器901,存储器902,存储在存储器902上并可在所述处理器901上运行的程序或指令,该程序或指令被处理器901执行时实现上述视频编码方法实施例或者上述视频解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in FIG. 9 , an embodiment of the present application further provides an electronic device 900 . The electronic device 900 includes a processor 901 , a memory 902 , and a program stored in the memory 902 and running on the processor 901 . or instruction, when the program or instruction is executed by the processor 901, each process of the foregoing video encoding method embodiment or the foregoing video decoding method embodiment can be achieved, and the same technical effect can be achieved. To avoid repetition, details are not repeated here.

需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the aforementioned mobile electronic devices and non-mobile electronic devices.

图10为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 10 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.

该电子设备1000包括但不限于:射频单元1001、网络模块1002、音频输出单元1003、输入单元1004、传感器1005、显示单元1006、用户输入单元1007、接口单元1008、存储器1009、以及处理器1010等部件。The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010, etc. part.

本领域技术人员可以理解,电子设备1000还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器1010逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图10中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 1000 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 1010 through a power management system, so that the power management system can manage charging, discharging, and power functions. consumption management and other functions. The structure of the electronic device shown in FIG. 10 does not constitute a limitation on the electronic device, and the electronic device may include more or less components than the one shown, or combine some components, or arrange different components, which will not be repeated here. .

其中,处理器1010,用于:The processor 1010 is used for:

获取待处理视频的第一视频帧;Obtain the first video frame of the video to be processed;

对所述第一视频帧进行亮度-色度YUV编码;performing luminance-chrominance YUV encoding on the first video frame;

获取所述待处理视频的第二视频帧,其中,所述第二视频帧为与所述第一视频帧关联的N帧视频帧中的任一视频帧,所述N为正整数;Acquiring a second video frame of the video to be processed, wherein the second video frame is any video frame in N video frames associated with the first video frame, and N is a positive integer;

对所述第二视频帧仅进行亮度Y编码。Only luminance Y encoding is performed on the second video frame.

基于此,通过对待处理视频的第一视频帧进行YUV编码,而对与第一视频帧关联的第二视频帧仅进行Y编码,如此,通过本申请实施例中的视频编码方法,由于仅对第二视频帧进行Y编码,从而可以有效降低编码后的第二视频帧的数据的占用空间,故在出现带宽受限的情况下,无需通过降低每一视频帧的分辨率的来适应带宽,进而可以保证视频帧的清晰度。Based on this, YUV encoding is performed on the first video frame of the video to be processed, and only Y encoding is performed on the second video frame associated with the first video frame. Thus, with the video encoding method in the embodiment of the present application, since only the The second video frame is Y-coded, so that the data occupied space of the encoded second video frame can be effectively reduced. Therefore, when the bandwidth is limited, it is not necessary to reduce the resolution of each video frame to adapt to the bandwidth. In turn, the clarity of the video frame can be guaranteed.

可选的,处理器1010,具体用于:Optionally, the processor 1010 is specifically configured to:

在录制所述待处理视频的过程中,采集所述第一视频帧;in the process of recording the video to be processed, collecting the first video frame;

其中,所述第二视频帧为在所述第一视频帧之前或者之后采集到的,且与所述第一视频帧之间的时间间隔小于或者等于预设时长。Wherein, the second video frame is collected before or after the first video frame, and the time interval between the second video frame and the first video frame is less than or equal to a preset duration.

基于此,由于在录制视频过程中,预设时长内采集的视频帧之间的图像差异较小,从而通过将与第一视频帧处于预设时长内采集到的视频帧作为上述第二视频帧,可以提升视频编码质量。Based on this, during the video recording process, the image difference between the video frames collected within the preset duration is relatively small, so by taking the video frame collected within the preset duration from the first video frame as the above-mentioned second video frame , which can improve the video encoding quality.

可选的,所述第一视频帧为第M个视频帧采集周期内采集到的第1帧视频帧,且电子设备在每一所述视频帧采集周期内采集N+1帧视频帧;Optionally, the first video frame is the first video frame collected in the Mth video frame collection period, and the electronic device collects N+1 video frames in each of the video frame collection periods;

处理器1010,具体用于:The processor 1010 is specifically used for:

将在所述第M个视频帧采集周期内采集到的第i+1帧视频帧确定为第二视频帧,其中,所述i为小于或者等于所述N的整数。The i+1 th video frame collected in the M th video frame collection period is determined as the second video frame, where the i is an integer less than or equal to the N.

基于此,通过将录制视频过程中每一采集周期内的第1帧视频帧作为上述第一视频帧,而采集周期内的其它视频帧确定为上述第二视频帧,即每一采集周期内仅第1帧视频帧进行YUV编码,而其它视频帧均进行Y编码,可以进一步缩减进行YUV编码的视频帧的数量;在保证视频清晰度的情况下,可以节省空间,提高视频帧的编码解码速度,还可以保证视频录制时的实时播放;在传输的带宽有限的情况下,可以保证视频播放的清晰度;另外,周期性地对上述待处理视频的视频帧进行上述编码过程,还可以提升视频编码质量。Based on this, the first video frame in each capture period in the video recording process is determined as the above-mentioned first video frame, and the other video frames in the capture period are determined as the above-mentioned second video frame, that is, in each capture period, only The first video frame is YUV encoded, and other video frames are Y encoded, which can further reduce the number of video frames for YUV encoding; in the case of ensuring video clarity, it can save space and improve the encoding and decoding speed of video frames. , it can also ensure real-time playback during video recording; in the case of limited transmission bandwidth, it can ensure the clarity of video playback; in addition, periodically performing the above encoding process on the video frames of the video to be processed can also improve the video quality. encoding quality.

可选的,处理器1010,具体用于:Optionally, the processor 1010 is specifically configured to:

在所述待处理视频的第k帧视频帧与第k-1帧视频帧之间的色度差值超出预设色度范围的情况下,将所述第k帧视频帧确定为第一视频帧,其中,所述k为大于1的整数;In the case that the chrominance difference value between the kth video frame of the video to be processed and the k-1th video frame exceeds the preset chrominance range, determine the kth video frame as the first video frame, wherein the k is an integer greater than 1;

在检测到所述待处理视频的第i帧视频帧与所述第k帧视频帧之间的色度差值处于所述预设色度范围,且所述第i帧视频帧与所述第k帧视频帧之间不存在目标视频帧的情况下,将所述第i帧视频帧确定为第二视频帧,其中,所述目标视频帧为:与所述第k帧视频帧之间的色度差值超出所述预设色度范围的视频帧;所述i为大于所述k的整数。It is detected that the chrominance difference value between the i-th video frame of the video to be processed and the k-th video frame is within the preset chromaticity range, and the i-th video frame and the In the case where there is no target video frame between the k video frames, the i-th video frame is determined as the second video frame, wherein the target video frame is: the video frame between the k-th video frame and the k-th video frame The video frame whose chrominance difference value exceeds the preset chrominance range; the i is an integer greater than the k.

基于此,通过对录制视频过程中亮度值大于或者等于预设亮度值的第二视频帧进行YUV编码,而对第二视频帧之后采集到的且亮度值小于预设亮度值的每一帧视频帧(即第一视频帧)进行Y编码,从而不仅可以实现进一步降低录制视频的占用空间,而且还使视频编码过程中的编码方式更灵活多样。Based on this, YUV encoding is performed on the second video frame whose brightness value is greater than or equal to the preset brightness value during the video recording process, and each frame of video that is collected after the second video frame and whose brightness value is less than the preset brightness value is subjected to YUV encoding. The frame (ie, the first video frame) is Y-coded, so that not only can the occupied space of the recorded video be further reduced, but also the coding modes in the video coding process can be more flexible and diverse.

或者,处理器1010,用于:Alternatively, processor 1010 for:

获取待处理视频的第一视频帧数据和第二视频帧数据;Obtain the first video frame data and the second video frame data of the video to be processed;

对所述待处理视频中的所述第一视频帧数据进行解码,得到第一视频帧的第一YUV信息,其中,所述第一视频帧数据为对所述第一视频帧进行YUV编码后生成的数据;Decode the first video frame data in the to-be-processed video to obtain the first YUV information of the first video frame, wherein the first video frame data is after performing YUV encoding on the first video frame generated data;

对所述待处理视频中的所述第二视频帧数据进行解码,得到第二视频帧的Y信息,其中,所述第二视频帧数据为对所述第二视频帧进行Y编码后生成的数据;Decoding the second video frame data in the to-be-processed video to obtain Y information of the second video frame, wherein the second video frame data is generated after performing Y encoding on the second video frame data;

基于所述第一YUV信息和所述第二视频帧的Y信息,对所述第二视频帧进行色彩传递处理,得到具有彩色的第二视频帧。Based on the first YUV information and the Y information of the second video frame, color transfer processing is performed on the second video frame to obtain a second video frame with color.

基于此,在对待处理视频进行播放的情况下,通过进行YUV编码的第一视频帧的YUV信息,对与第一视频帧关联的第二视频帧在解码过程中进行彩色图像的复原,从而实现可以第二视频帧以彩色图像显示,保证视频播放的质量。Based on this, in the case of playing the video to be processed, by performing the YUV information of the first video frame of YUV encoding, the second video frame associated with the first video frame is decoded to restore the color image, so as to achieve The second video frame can be displayed as a color image to ensure the quality of video playback.

可选的,处理器1010,具体用于:Optionally, the processor 1010 is specifically configured to:

基于预设的深度神经网络模型,计算得到所述第二视频帧的红绿蓝RGB信息。Based on a preset deep neural network model, the red, green, and blue RGB information of the second video frame is obtained by calculation.

基于此,通过神经网络模型计算得到第二视频帧的RGB信息,从而使颜色传递后第二视频帧的彩色图像更接近实际采集的彩色图像,进一步提升视频播放过程中的图像质量。Based on this, the RGB information of the second video frame is calculated through the neural network model, so that the color image of the second video frame after color transfer is closer to the actual collected color image, and the image quality during video playback is further improved.

可选的,所述N大于1;Optionally, the N is greater than 1;

处理器1010,具体用于:The processor 1010 is specifically used for:

将所述第一YUV信息和所述第二视频帧的Y信息输入至所述深度神经网络模型,计算得到所述第二视频帧的RGB信息;或者,Inputting the first YUV information and the Y information of the second video frame into the deep neural network model, and calculating the RGB information of the second video frame; or,

将第二YUV信息和所述第二视频帧的Y信息输入至所述深度神经网络模型,计算得到所述第二视频帧的RGB信息,其中,所述第二YUV信息为在所述第一视频帧之后采集到的第N-1帧视频帧的YUV信息,且第1帧视频帧的YUV信息基于所述第一YUV信息和所述第1帧视频帧的Y信息计算得到。Input the second YUV information and the Y information of the second video frame into the deep neural network model, and calculate the RGB information of the second video frame, wherein the second YUV information is in the first YUV information of the N-1th video frame collected after the video frame, and the YUV information of the first video frame is calculated based on the first YUV information and the Y information of the first video frame.

基于此,在对第二视频帧进行色彩传递处理过程中,可以是直接采用第一视频帧的YUV信息进行色彩传递;或者,在第二视频帧与第一视频帧之间间隔至少一帧视频帧的情况下,也可以是采用上一帧视频帧的YUV信息进行色彩传递,从而使实现色彩传递处理的方式更灵活多样。Based on this, in the process of performing color transfer processing on the second video frame, the YUV information of the first video frame may be directly used for color transfer; or, at least one frame of video is spaced between the second video frame and the first video frame. In the case of frames, the YUV information of the previous video frame can also be used for color transfer, so that the color transfer processing method is more flexible and diverse.

应理解的是,本申请实施例中,输入单元1004可以包括图形处理器(GraphicsProcessing Unit,GPU)10041和麦克风10042,图形处理器10041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1006可包括显示面板10061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板10061。用户输入单元1007包括触控面板10071以及其他输入设备10072。触控面板10071,也称为触摸屏。触控面板10071可包括触摸检测装置和触摸控制器两个部分。其他输入设备10072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器1009可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理器1010可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1010中。It should be understood that, in this embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042. camera) to process the image data of still pictures or videos. The display unit 1006 may include a display panel 10061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 1007 includes a touch panel 10071 and other input devices 10072 . The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts, a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here. Memory 1009 may be used to store software programs as well as various data, including but not limited to application programs and operating systems. The processor 1010 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the like, and the modem processor mainly processes wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 1010.

本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述视频编码方法或者上述视频解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, each process of the foregoing video encoding method or the foregoing video decoding method embodiment is implemented , and can achieve the same technical effect, in order to avoid repetition, it is not repeated here.

其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the foregoing embodiments. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.

本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述视频编码方法或者上述视频解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement the above video encoding method or the above video Each process of the decoding method embodiment can achieve the same technical effect, and to avoid repetition, it will not be repeated here.

应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in the reverse order depending on the functions involved. To perform functions, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to some examples may be combined in other examples.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or in a part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of this application.

上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of this application, without departing from the scope of protection of the purpose of this application and the claims, many forms can be made, which all fall within the protection of this application.

Claims (10)

1. A video encoding method, comprising:
acquiring a first video frame of a video to be processed;
performing luminance-chrominance YUV encoding on the first video frame;
acquiring a second video frame of the video to be processed, wherein the second video frame is any one of N video frames associated with the first video frame, and N is a positive integer;
only luma Y-coding is performed on the second video frame.
2. The method of claim 1, wherein obtaining the first video frame of the video to be processed comprises:
collecting the first video frame in the process of recording the video to be processed;
the second video frame is acquired before or after the first video frame, and the time interval between the second video frame and the first video frame is less than or equal to a preset time length.
3. The method according to claim 2, wherein the first video frame is a 1 st video frame captured in an mth video frame capture period, and the electronic device captures N +1 video frames in each of the video frame capture periods;
the acquiring a second video frame of the video to be processed includes:
determining an i +1 frame video frame acquired in the Mth video frame acquisition period as a second video frame, wherein i is an integer less than or equal to N.
4. The method of claim 1, wherein obtaining the first video frame of the video to be processed comprises:
determining a kth frame video frame of the video to be processed as a first video frame under the condition that a chromaticity difference value between the kth frame video frame and a kth-1 frame video frame of the video to be processed exceeds a preset chromaticity range, wherein k is an integer greater than 1;
the acquiring a second video frame of the video to be processed includes:
determining an ith frame video frame of the video to be processed as a second video frame when detecting that a chrominance difference value between the ith frame video frame and the kth frame video frame is in the preset chrominance range and a target video frame does not exist between the ith frame video frame and the kth frame video frame, wherein the target video frame is: the video frames with the chrominance difference value exceeding the preset chrominance range with the k frame video frames; and i is an integer greater than k.
5. A video decoding method, comprising:
acquiring first video frame data and second video frame data of a video to be processed;
decoding the first video frame data in the video to be processed to obtain first YUV information of a first video frame, wherein the first video frame data is generated after YUV coding is performed on the first video frame;
decoding second video frame data in the video to be processed to obtain Y information of a second video frame, wherein the second video frame data is generated after Y coding is performed on the second video frame;
and carrying out color transfer processing on the second video frame based on the first YUV information and the Y information of the second video frame to obtain a second video frame with color.
6. The method of claim 5, wherein the color-transferring the second video frame comprises:
and calculating to obtain the red, green and blue (RGB) information of the second video frame based on a preset deep neural network model.
7. The method of claim 6, wherein N is greater than 1;
the calculating to obtain the RGB information of the second video frame based on the preset deep neural network model includes:
inputting the first YUV information and the Y information of the second video frame into the deep neural network model, and calculating to obtain RGB information of the second video frame; or,
inputting second YUV information and Y information of the second video frame into the deep neural network model, and calculating to obtain RGB information of the second video frame, wherein the second YUV information is YUV information of an N-1 frame video frame collected after the first video frame, and the YUV information of the 1 frame video frame is calculated based on the first YUV information and the Y information of the 1 frame video frame.
8. A video encoding apparatus, comprising:
the first video frame acquisition module is used for acquiring a first video frame of a video to be processed;
a YUV encoding module for performing luminance-chrominance YUV encoding on the first video frame;
a second video frame obtaining module, configured to obtain a second video frame of the video to be processed, where the second video frame is any one of N video frames associated with the first video frame, and N is a positive integer;
and the Y coding module is used for only carrying out brightness Y coding on the second video frame.
9. A video decoding apparatus, comprising:
the video frame data acquisition module is used for acquiring first video frame data and second video frame data of a video to be processed;
the first decoding module is used for decoding the first video frame data in the video to be processed to obtain first YUV information of a first video frame, wherein the first video frame data is generated after YUV coding is performed on the first video frame;
the second decoding module is configured to decode second video frame data in the video to be processed to obtain Y information of a second video frame, where the second video frame data is data generated by Y-coding the second video frame;
and the color transfer module is used for carrying out color transfer processing on the second video frame based on the first YUV information and the Y information of the second video frame to obtain a second video frame with color.
10. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, which when executed by the processor, implement the steps of the video encoding method of any of claims 1 to 4 or the video decoding method of any of claims 5 to 7.
CN202110217976.4A 2021-02-26 2021-02-26 Video encoding method, video decoding method, video encoding device, video decoding device and electronic equipment Pending CN113038179A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110217976.4A CN113038179A (en) 2021-02-26 2021-02-26 Video encoding method, video decoding method, video encoding device, video decoding device and electronic equipment
PCT/CN2022/077888 WO2022179600A1 (en) 2021-02-26 2022-02-25 Video coding method and apparatus, video decoding method and apparatus, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110217976.4A CN113038179A (en) 2021-02-26 2021-02-26 Video encoding method, video decoding method, video encoding device, video decoding device and electronic equipment

Publications (1)

Publication Number Publication Date
CN113038179A true CN113038179A (en) 2021-06-25

Family

ID=76461755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110217976.4A Pending CN113038179A (en) 2021-02-26 2021-02-26 Video encoding method, video decoding method, video encoding device, video decoding device and electronic equipment

Country Status (2)

Country Link
CN (1) CN113038179A (en)
WO (1) WO2022179600A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022179600A1 (en) * 2021-02-26 2022-09-01 维沃移动通信有限公司 Video coding method and apparatus, video decoding method and apparatus, and electronic device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404765A (en) * 2008-10-24 2009-04-08 宁波大学 Interactive multi-view point video encoding method
CN103237225A (en) * 2013-05-10 2013-08-07 上海国茂数字技术有限公司 Method for correcting video encoding and decoding errors through utilizing luma and chroma (YUV) and red, green and blue (RGB) space union
CN104919804A (en) * 2012-10-01 2015-09-16 微软技术许可有限责任公司 Frame packing and depacking of higher resolution chroma sampling formats
US20160142721A1 (en) * 2014-11-13 2016-05-19 Fujitsu Limited Picture encoding method, picture encoding apparatus, picture decoding method and picture decoding apparatus
CN106464887A (en) * 2014-03-06 2017-02-22 三星电子株式会社 Image decoding method and device thereof, image encoding method and device thereof
CN108062746A (en) * 2016-11-09 2018-05-22 深圳市优朋普乐传媒发展有限公司 A kind of method of video image processing and device, video coding system
CN111770347A (en) * 2020-07-17 2020-10-13 广州市奥威亚电子科技有限公司 A kind of video transmission method and system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FI103628B (en) * 1997-09-02 1999-07-30 Nokia Mobile Phones Ltd Uploading video data
EP0905987B1 (en) * 1997-09-26 2005-06-15 Matsushita Electric Industrial Co., Ltd. Image decoding method and apparatus, and data recording medium
CN102801948B (en) * 2012-08-14 2015-12-02 武汉微创光电股份有限公司 High-definition serial digital interface data transfer device and device
EP3453174B1 (en) * 2016-05-06 2024-11-27 InterDigital Madison Patent Holdings, SAS Method and system for decoder-side intra mode derivation for block-based video coding
CN107580222B (en) * 2017-08-01 2020-02-14 北京交通大学 Image or video coding method based on linear model prediction
US20190045198A1 (en) * 2017-12-28 2019-02-07 Intel Corporation Region adaptive data-efficient generation of partitioning and mode decisions for video encoding
CN113038179A (en) * 2021-02-26 2021-06-25 维沃移动通信有限公司 Video encoding method, video decoding method, video encoding device, video decoding device and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404765A (en) * 2008-10-24 2009-04-08 宁波大学 Interactive multi-view point video encoding method
CN104919804A (en) * 2012-10-01 2015-09-16 微软技术许可有限责任公司 Frame packing and depacking of higher resolution chroma sampling formats
CN103237225A (en) * 2013-05-10 2013-08-07 上海国茂数字技术有限公司 Method for correcting video encoding and decoding errors through utilizing luma and chroma (YUV) and red, green and blue (RGB) space union
CN106464887A (en) * 2014-03-06 2017-02-22 三星电子株式会社 Image decoding method and device thereof, image encoding method and device thereof
US20160142721A1 (en) * 2014-11-13 2016-05-19 Fujitsu Limited Picture encoding method, picture encoding apparatus, picture decoding method and picture decoding apparatus
CN108062746A (en) * 2016-11-09 2018-05-22 深圳市优朋普乐传媒发展有限公司 A kind of method of video image processing and device, video coding system
CN111770347A (en) * 2020-07-17 2020-10-13 广州市奥威亚电子科技有限公司 A kind of video transmission method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022179600A1 (en) * 2021-02-26 2022-09-01 维沃移动通信有限公司 Video coding method and apparatus, video decoding method and apparatus, and electronic device

Also Published As

Publication number Publication date
WO2022179600A1 (en) 2022-09-01

Similar Documents

Publication Publication Date Title
WO2020097888A1 (en) Video processing method and apparatus, electronic device, and computer-readable storage medium
WO2021068598A1 (en) Encoding method and device for screen sharing, and storage medium and electronic equipment
US11985358B2 (en) Artifact removal method and apparatus based on machine learning, and method and apparatus for training artifact removal model based on machine learning
CN115842916A (en) Decoding method, encoding method and device
CN113099233B (en) Video encoding method, apparatus, video encoding device and storage medium
WO2018196864A1 (en) Image prediction method and related product
CN112565603B (en) Image processing method, device and electronic device
WO2021196994A1 (en) Encoding method and apparatus, terminal, and storage medium
CN112367486B (en) Video processing method and device
CN105554375A (en) Method and device of video preview in digital video recorder
WO2022179600A1 (en) Video coding method and apparatus, video decoding method and apparatus, and electronic device
US20250063204A1 (en) Image encoding, decoding method and device, coder-decoder
CN111263216B (en) Video transmission method, device, storage medium and terminal
CN115866263A (en) Video decoding method, video encoding method and related equipment
CN115834906A (en) Video encoding and decoding method, device, electronic equipment and medium
CN111246123B (en) Image processing method and related products
CN111526366B (en) Image processing method, image processing apparatus, image capturing device, and storage medium
CN117768650A (en) Image block chroma prediction method and device, electronic equipment and storage medium
CN116170633A (en) Decoding method, device, terminal, storage medium and program product
CN103369325B (en) A kind of low complex degree video compress transmission method being applicable to wireless video Sensor Network
CN115883833A (en) Intra-frame prediction method and device
CN1295939C (en) Multifunctional image processor
CN116366841A (en) Loop filtering method and terminal
WO2025138180A1 (en) Processing method, processing device, and storage medium
CN116614623A (en) Predictive encoding method, predictive decoding method and terminal

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