[go: up one dir, main page]

CN105898565A - Video processing method and device - Google Patents

Video processing method and device Download PDF

Info

Publication number
CN105898565A
CN105898565A CN201610280341.8A CN201610280341A CN105898565A CN 105898565 A CN105898565 A CN 105898565A CN 201610280341 A CN201610280341 A CN 201610280341A CN 105898565 A CN105898565 A CN 105898565A
Authority
CN
China
Prior art keywords
played
video frame
video
quality level
processing
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
CN201610280341.8A
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.)
Leshi Zhixin Electronic Technology Tianjin Co Ltd
LeTV Holding Beijing Co Ltd
Original Assignee
Leshi Zhixin Electronic Technology Tianjin Co Ltd
LeTV Holding Beijing 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 Leshi Zhixin Electronic Technology Tianjin Co Ltd, LeTV Holding Beijing Co Ltd filed Critical Leshi Zhixin Electronic Technology Tianjin Co Ltd
Priority to CN201610280341.8A priority Critical patent/CN105898565A/en
Publication of CN105898565A publication Critical patent/CN105898565A/en
Priority to PCT/CN2016/099959 priority patent/WO2017185609A1/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440254Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering signal-to-noise parameters, e.g. requantization

Landscapes

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

Abstract

本发明实施例提供一种视频处理方法及设备,包括,获取待播放视频帧;确定所述待播放视频帧的像素深度,并根据所述待播放视频帧的像素深度确定所述待播放视频帧的视频质量等级;若确定所述待播放视频帧的视频质量等级小于预设等级,则在待播放视频帧为暗场场景图像时,对待播放视频帧进行图像增强处理。根据本发明实施例提供的视频处理方法及设备,在获取待播放视频帧之后,根据待播放视频帧的像素深度确定所述待播放视频帧的视频质量等级,并在确定待播放视频帧的视频质量等级小于预设等级时,对所述待播放视频帧中的暗场场景图像进行图像增强处理,从而提升待播放视频帧的质量,从而在视频播放时,实现为用户提供更好的视觉体验。

Embodiments of the present invention provide a video processing method and device, comprising: acquiring a video frame to be played; determining the pixel depth of the video frame to be played, and determining the video frame to be played according to the pixel depth of the video frame to be played If it is determined that the video quality level of the video frame to be played is less than the preset level, then when the video frame to be played is a dark scene image, image enhancement processing is performed on the video frame to be played. According to the video processing method and device provided in the embodiments of the present invention, after the video frame to be played is acquired, the video quality level of the video frame to be played is determined according to the pixel depth of the video frame to be played, and the video quality level of the video frame to be played is determined. When the quality level is lower than the preset level, image enhancement processing is performed on the dark field scene image in the video frame to be played, thereby improving the quality of the video frame to be played, thereby providing a better visual experience for the user during video playback .

Description

一种视频处理方法及设备A video processing method and device

技术领域technical field

本发明实施例涉及视频技术领域,尤其涉及一种视频处理方法及设备。Embodiments of the present invention relate to the field of video technologies, and in particular, to a video processing method and device.

背景技术Background technique

随着智能电视的发展,看电视直播已不再是电视的唯一用途,用户可以通过播放网络、本地存储设备、多屏幕共享等上的视频看所喜欢的电影、节目等。With the development of smart TVs, watching live TV is no longer the only purpose of TV. Users can watch their favorite movies and programs by playing videos on the network, local storage devices, multi-screen sharing, etc.

目前,现有的视频播放设备在进行视频播放时,只是根据视频的视频编码格式、视频编码参数、视频质量等视频参数进行播放,然而,有些视频的质量较差,导致播放时出现画面模糊等现象,从而不能满足用户的视觉体验。At present, when the existing video playback devices play video, they only play according to video parameters such as video encoding format, video encoding parameters, and video quality. However, some videos are of poor quality, resulting in blurred images during playback. Phenomenon, which cannot satisfy the user's visual experience.

因此,在进行视频播放时,如何根据视频的质量对视频进行处理,从而实现为用户提供更好的视觉体验,还没有一种有效的解决方法。Therefore, how to process the video according to the quality of the video when playing the video, so as to provide a better visual experience for the user, has not yet had an effective solution.

发明内容Contents of the invention

本发明实施例提供一种视频处理方法及设备,用以解决现有技术中只是根据视频资源的视频参数进行播放视频,导致性能较差的视频播放时出现画面模糊等问题。Embodiments of the present invention provide a video processing method and device to solve the problems in the prior art that video is only played according to video parameters of video resources, resulting in blurred images when playing videos with poor performance.

本发明实施例提供一种视频处理方法,包括:An embodiment of the present invention provides a video processing method, including:

获取待播放视频帧;Get the video frame to be played;

确定所述待播放视频帧的像素深度,并根据所述待播放视频帧的像素深度确定所述待播放视频帧的视频质量等级;Determine the pixel depth of the video frame to be played, and determine the video quality level of the video frame to be played according to the pixel depth of the video frame to be played;

若确定所述待播放视频帧的视频质量等级小于预设等级,则针对所述待播放视频帧中的每一帧待播放视频帧,在所述待播放视频帧为暗场场景图像时,对所述待播放视频帧进行图像增强处理。If it is determined that the video quality level of the video frame to be played is less than the preset level, then for each video frame to be played in the video frame to be played, when the video frame to be played is a dark field scene image, Image enhancement processing is performed on the video frame to be played.

本发明实施例提供一种视频处理设备,包括:An embodiment of the present invention provides a video processing device, including:

获取单元,用于获取待播放视频帧;An acquisition unit, configured to acquire video frames to be played;

确定单元,用于确定所述待播放视频帧的像素深度,并根据所述待播放视频帧的像素深度确定所述待播放视频帧的视频质量等级;A determining unit, configured to determine the pixel depth of the video frame to be played, and determine the video quality level of the video frame to be played according to the pixel depth of the video frame to be played;

处理单元,用于若确定所述待播放视频帧的视频质量等级小于预设等级,则针对所述待播放视频帧中的每一帧待播放视频帧,在所述待播放视频帧为暗场场景图像时,对所述待播放视频帧进行图像增强处理。A processing unit, configured to determine that the video quality level of the video frame to be played is less than a preset level, for each video frame to be played in the video frame to be played, the video frame to be played is a dark field When the scene image is displayed, image enhancement processing is performed on the video frame to be played.

本发明实施例提供的视频处理方法及设备,在获取待播放视频帧之后,根据所述待播放视频帧的像素深度确定所述待播放视频帧的视频质量等级,并在确定所述待播放视频帧的视频质量等级小于预设等级时,对所述待播放视频帧中的暗场场景图像进行图像增强处理,从而提升待播放视频帧的质量,从而在视频播放时,实现为用户提供更好的视觉体验。In the video processing method and device provided by the embodiments of the present invention, after acquiring the video frame to be played, the video quality level of the video frame to be played is determined according to the pixel depth of the video frame to be played, and after determining the video frame to be played When the video quality level of the frame is less than the preset level, image enhancement processing is performed on the dark field scene image in the video frame to be played, thereby improving the quality of the video frame to be played, so as to provide users with better performance when the video is played. visual experience.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are For some embodiments of the present invention, those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1本发明实施例提供的一种视频处理方法流程示意图;FIG. 1 is a schematic flowchart of a video processing method provided by an embodiment of the present invention;

图2本发明实施例提供的一种视频处理方法流程图;Fig. 2 is a flow chart of a video processing method provided by an embodiment of the present invention;

图3本发明实施例提供的一种视频处理设备结构示意图。FIG. 3 is a schematic structural diagram of a video processing device provided by an embodiment of the present invention.

具体实施方式detailed description

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

基于上述论述,如图1所示,本发明实施例提供的一种视频处理方法流程示意图。图1中的执行主体可以为手机、计算机、机顶盒等设备。Based on the above discussion, as shown in FIG. 1 , a schematic flowchart of a video processing method provided by an embodiment of the present invention is shown. The execution subject in FIG. 1 may be a mobile phone, a computer, a set-top box and other devices.

如图1所示,该方法具体包括以下步骤:As shown in Figure 1, the method specifically includes the following steps:

步骤101:获取待播放视频帧;Step 101: Obtain video frames to be played;

步骤102:确定所述待播放视频帧的像素深度,并根据所述待播放视频帧的像素深度确定所述待播放视频帧的视频质量等级;Step 102: Determine the pixel depth of the video frame to be played, and determine the video quality level of the video frame to be played according to the pixel depth of the video frame to be played;

步骤103:若确定所述待播放视频帧的视频质量等级小于预设等级,则在所述待播放视频帧为暗场场景图像时,对所述待播放视频帧进行图像增强处理。Step 103: If it is determined that the video quality level of the video frame to be played is lower than a preset level, performing image enhancement processing on the video frame to be played when the video frame to be played is a dark scene image.

步骤101中,获取到的待播放视频帧为经过视频编码后的视频帧。因此,在获得所述待播放视频帧之后需要根据所述待播放视频帧的视频编码方式对所述待播放视频帧进行解码。In step 101, the acquired video frame to be played is a video frame after video encoding. Therefore, after the video frame to be played is obtained, the video frame to be played needs to be decoded according to the video encoding method of the video frame to be played.

本发明实施例中,所述待播放视频帧所对应的视频编码方式可以为现有视频编码方式中的任意一种,本发明实施例对此并不限定。例如,HEVC(HighEfficiency Video Coding,高效视频编码)、H264等。In the embodiment of the present invention, the video coding method corresponding to the video frame to be played may be any existing video coding method, which is not limited in the embodiment of the present invention. For example, HEVC (High Efficiency Video Coding, high-efficiency video coding), H264, and the like.

本发明实施例中,可以通过网络获取所述待播放视频帧,也可以通过本地存储的视频文件获取待播放视频帧,本发明实施例对此并不限定。In the embodiment of the present invention, the video frame to be played may be obtained through a network, or may be obtained through a locally stored video file, which is not limited in the embodiment of the present invention.

需要说明的是,本发明实施例中,获得到的待播放视频帧所对应的视频文件的视频格式可以为现有视频格式中的任意一种。例如,AVI(Audio VideoInterleaved,音频视频交错)、ASF(Advanced Streaming format,高级流格式)、FLV(Flash Video)、MPEG(Motion Picture Experts Group,运动待播放视频帧专家组)等格式。It should be noted that, in this embodiment of the present invention, the video format of the obtained video file corresponding to the video frame to be played may be any of the existing video formats. For example, formats such as AVI (Audio Video Interleaved, Audio Video Interleaved), ASF (Advanced Streaming format, Advanced Streaming Format), FLV (Flash Video), MPEG (Motion Picture Experts Group, Motion Video Frame Expert Group).

步骤102中,在获得待播放视频帧后,可以确定待播放视频帧的分辨率。同时,还可以根据所述待播放视频帧在解码之前的数据大小以及分辨率确定所述待播放视频帧在解码之前存储每个像素所用的比特位数。In step 102, after the video frame to be played is obtained, the resolution of the video frame to be played may be determined. At the same time, the number of bits used for storing each pixel of the video frame to be played before decoding may also be determined according to the data size and resolution of the video frame to be played before decoding.

举例来说,一幅待播放视频帧的分辨率是1024×768,它在解码之前的数据量为768kb,则所述待播放视频帧在解码之前存储每个像素所用的比特位数为8=768×1024×8÷(1024×768)。For example, the resolution of a video frame to be played is 1024×768, and its data volume before decoding is 768kb, then the video frame to be played stores the number of bits used by each pixel before decoding as 8= 768×1024×8÷(1024×768).

本发明实施例中,确定待播放视频帧的分辨率之后,还可以先判断所述待播放视频帧的分辨率是否小于预设分辨率,若所述待播放视频帧的分辨率小于预设分辨率,则对所述待播放视频帧进行上采样处理;若所述待播放视频帧的分辨率大于或等于预设分辨率,则不再对所述待播放视频帧进行上采样处理。In the embodiment of the present invention, after determining the resolution of the video frame to be played, it is also possible to first determine whether the resolution of the video frame to be played is smaller than the preset resolution, if the resolution of the video frame to be played is smaller than the preset resolution rate, then perform upsampling processing on the video frame to be played; if the resolution of the video frame to be played is greater than or equal to the preset resolution, then no longer perform upsampling processing on the video frame to be played.

可选的,预设分辨率可以为720p。当然此处只是示例,预设分辨率还可以为其他值,在此不再赘述。Optionally, the preset resolution can be 720p. Of course, this is just an example, and the preset resolution can also be other values, which will not be repeated here.

本发明实施例中,上采样可以采用抽样滤波的方法实现。具体的,如果抽样滤波器的阶数为N,抽样的像素的像素值分别为x1,x2,……,xN-1,xN,抽样滤波器的系数为C1,C2,……,CN-1,CN,则插值的像素值y为:In the embodiment of the present invention, upsampling may be implemented by using a sampling filtering method. Specifically, if the order of the sampling filter is N, the pixel values of the sampled pixels are x 1 , x 2 , ..., x N-1 , x N , and the coefficients of the sampling filter are C 1 , C 2 , ..., C N-1 , C N , then the interpolated pixel value y is:

ythe y == ΣΣ ii == 11 NN CC ii ×× xx ii ...... (( 11 ))

本发明实施例中,在确定待播放视频帧的分辨率之后,或者,对所述待播放视频帧进行上采样处理之后,可以根据待播放视频帧的分辨率确定所述待播放视频帧的像素深度,即确定所述待播放视频帧在经过解码之后存储每个像素所用的比特位数。In the embodiment of the present invention, after determining the resolution of the video frame to be played, or after performing upsampling processing on the video frame to be played, the pixels of the video frame to be played may be determined according to the resolution of the video frame to be played The depth is to determine the number of bits used for storing each pixel of the video frame to be played after being decoded.

举例来说,一幅待播放视频帧的分辨率是1024×768,它的数据量为1.5M,则它的像素深度为16,即存储每个像素采用16个比特位。For example, if the resolution of a video frame to be played is 1024×768, and its data volume is 1.5M, its pixel depth is 16, that is, 16 bits are used to store each pixel.

步骤103中,在确定了待播放视频帧的像素深度之后,就可以根据所述待播放视频帧的像素深度确定所述待播放视频帧的视频质量等级。本发明实施例中,可以根据以下公式确定所述待播放视频帧的视频质量等级:In step 103, after the pixel depth of the video frame to be played is determined, the video quality level of the video frame to be played can be determined according to the pixel depth of the video frame to be played. In the embodiment of the present invention, the video quality level of the video frame to be played can be determined according to the following formula:

其中,q为所述待播放视频帧的视频质量等级;k为预设值;x为所述待播放视频帧在解码之前存储每个像素所用的比特位数;b为所述像素深度,即所述待播放视频帧在经过解码之后存储每个像素所用的比特位数。为向下取整运算。k的值可以根据实际情况确定,例如,可以取0至31中的任意一个值。Wherein, q is the video quality level of the video frame to be played; k is a preset value; x is the number of bits used for storing each pixel of the video frame to be played before decoding; b is the pixel depth, that is The video frame to be played stores the number of bits used by each pixel after being decoded. For rounding down operation. The value of k can be determined according to actual conditions, for example, any value from 0 to 31 can be taken.

在确定了待播放视频帧的视频质量等级之后,若确定所述待播放视频帧的视频质量等级大于或等于预设等级,则可以直接播放所述待播放视频帧。其中,预设等级可以根据实际情况取值,在此不再赘述。After the video quality level of the video frame to be played is determined, if it is determined that the video quality level of the video frame to be played is greater than or equal to a preset level, the video frame to be played may be played directly. Wherein, the preset level may take a value according to the actual situation, which will not be repeated here.

可选的,本发明实施例中,在确定了待播放视频帧的视频质量等级之后,还可以对所述待播放视频帧进行去块效应滤波,从而进一步提高待播放视频帧的视频质量。具体的,针对所述待播放视频帧中的每一帧待播放视频帧,对所述待播放视频帧进行去块效应滤波处理。通过对每一帧待播放视频帧进行去块效应滤波处理,从而可以实现对待播放视频帧的边缘进行平滑滤波,从而消除待播放视频帧中由于分块编码算法带来的伪边界。Optionally, in this embodiment of the present invention, after the video quality level of the video frame to be played is determined, deblocking filtering may be performed on the video frame to be played, so as to further improve the video quality of the video frame to be played. Specifically, for each of the video frames to be played, deblocking filter processing is performed on the video frames to be played. By performing deblocking filter processing on each frame of the video frame to be played, smoothing filtering can be performed on the edge of the video frame to be played, thereby eliminating the false boundary caused by the block coding algorithm in the video frame to be played.

可选的,本发明实施例中,在确定了待播放视频帧的视频质量等级之后,对所述待播放视频帧进行去块效应滤波之前,还可以判断所述待播放视频帧是否经过了环路滤波,如果进行了环路滤波,则可以不再对所述待播放视频帧进行去块效应滤波处理。Optionally, in this embodiment of the present invention, after the video quality level of the video frame to be played is determined, before deblocking filtering is performed on the video frame to be played, it may also be determined whether the video frame to be played has passed the loop If loop filtering is performed, deblocking filter processing may no longer be performed on the video frame to be played.

最后可以将进行去块效应滤波处理后的待播放视频帧进行显示。Finally, the to-be-played video frame after the deblocking filtering process can be displayed.

可选的,本发明实施例中,若确定所述待播放视频帧的视频质量等级小于预设等级,则针对所述待播放视频帧中的每一帧待播放视频帧,判断所述待播放视频帧是否为暗场场景图像,若所述待播放视频帧不为暗场场景图像,则可以直接显示所述待播放视频帧。若所述待播放视频帧为暗场场景图像,则对所述待播放视频帧进行图像增强处理。Optionally, in this embodiment of the present invention, if it is determined that the video quality level of the video frame to be played is lower than a preset level, then for each video frame to be played in the video frame to be played, it is determined that the video frame to be played Whether the video frame is a dark field scene image, if the video frame to be played is not a dark field scene image, the video frame to be played can be directly displayed. If the video frame to be played is a dark scene image, image enhancement processing is performed on the video frame to be played.

本发明实施例中,若确定所述待播放视频帧中每个像素的亮度分量值小于亮度阈值,则确定所述待播放视频帧为暗场场景图像。In the embodiment of the present invention, if it is determined that the brightness component value of each pixel in the video frame to be played is smaller than a brightness threshold, then it is determined that the video frame to be played is a dark field scene image.

可选的,所述亮度阈值可以通过以下公式计算:Optionally, the brightness threshold can be calculated by the following formula:

Hh == hh mm aa xx ++ hh mm ii nno 1616 ...... (( 33 ))

其中,H为亮度阈值,hmax为所述待播放视频帧中的像素点所能达到的最大的亮度值,hmin为所述待播放视频帧中的像素点所能达到的最小的亮度值。Wherein, H is the brightness threshold, h max is the maximum brightness value that the pixel in the video frame to be played can reach, and h min is the minimum brightness value that the pixel in the video frame to be played can reach .

当然,以上只是示例,还可以通过其他方法确定亮度阈值,在此不再赘述。Of course, the above are just examples, and the brightness threshold can also be determined by other methods, which will not be repeated here.

在确定所述待播放视频帧为暗场场景图像之后,对所述待播放视频帧进行离散余弦变换(Discrete Cosine Transformation,DCT),并将离散余弦变换后的所述待播放视频帧进行量化处理;然后将经过所述量化处理后的所述待播放视频帧进行逆离散余弦变换(Inverse Discrete Cosine Transformation,IDCT),获得图像增强处理后的所述待播放视频帧。After determining that the video frame to be played is a dark field scene image, performing discrete cosine transformation (Discrete Cosine Transformation, DCT) on the video frame to be played, and performing quantization processing on the video frame to be played after the discrete cosine transform ; Then, perform an inverse discrete cosine transformation (Inverse Discrete Cosine Transformation, IDCT) on the video frame to be played after the quantization process, to obtain the video frame to be played after image enhancement processing.

由于暗场场景图像容易出现块效应、色斑、伪彩等现象,经过增强处理后的所述待播放视频帧,能够克服块效应、色斑、伪彩等现象,从而在播放所述待播放视频帧时,提高用户的视觉体验。Since dark field scene images are prone to block effects, color spots, false colors, etc., the video frames to be played after enhanced processing can overcome block effects, color spots, false colors, etc. Improve the user's visual experience when viewing video frames.

下面结合实施例详细描述上面的过程。The above process will be described in detail below in conjunction with the embodiments.

如图2所示,为本发明实施例提供的一种视频处理方法流程图。As shown in FIG. 2 , it is a flowchart of a video processing method provided by an embodiment of the present invention.

步骤201:获取待播放视频帧。Step 201: Obtain video frames to be played.

此处获取到的待播放视频帧为经过视频编码后的视频帧,此时需要对所述待播放视频帧进行视频解码。The video frame to be played obtained here is a video frame after video encoding, and video decoding needs to be performed on the video frame to be played at this time.

步骤202:确定所述待播放视频帧的分辨率,并判断待播放视频帧的分辨率是否大于预设分辨率,若否,则转至步骤203,否则转至步骤204。Step 202: Determine the resolution of the video frame to be played, and judge whether the resolution of the video frame to be played is greater than a preset resolution, if not, go to step 203, otherwise go to step 204.

步骤203:对所述待播放视频帧进行上采样处理。Step 203: Perform upsampling processing on the video frame to be played.

步骤204:确定所述待播放视频帧的像素深度,并根据所述像素深度确定所述待播放视频帧的视频质量等级。Step 204: Determine the pixel depth of the video frame to be played, and determine the video quality level of the video frame to be played according to the pixel depth.

步骤205:判断所述待播放视频帧是否小于预设等级,若否,则转至步骤206,否则,转至步骤207。Step 205: Determine whether the video frame to be played is lower than a preset level, if not, go to step 206, otherwise, go to step 207.

步骤206:对所述待播放视频帧进行去块效应滤波处理,转至步骤209。Step 206: Perform deblocking filter processing on the to-be-played video frame, and go to step 209.

步骤207:判断所述待播放视频帧是否为暗场场景图像,若是,则转至步骤208,否则转至步骤209。Step 207: Determine whether the video frame to be played is a dark field scene image, if yes, go to step 208, otherwise go to step 209.

步骤208:对所述待播放视频帧进行图像增强处理。Step 208: Perform image enhancement processing on the video frame to be played.

步骤209:播放所述待播放视频帧。Step 209: Play the video frame to be played.

具体的,对所述待播放视频帧进行离散余弦变换,并将离散余弦变换后的所述待播放视频帧进行量化处理;将经过所述量化处理后的所述待播放视频帧进行逆离散余弦变换,获得图像增强处理后的所述待播放视频帧。Specifically, perform discrete cosine transform on the video frame to be played, and perform quantization processing on the video frame to be played after the discrete cosine transform; perform inverse discrete cosine on the video frame to be played after the quantization process Transform to obtain the video frame to be played after image enhancement processing.

步骤209:播放所述待播放视频帧。Step 209: Play the video frame to be played.

基于相同的发明构思,本发明实施例还提供一种视频处理设备,该视频处理设备可以执行上述方法。Based on the same inventive concept, an embodiment of the present invention further provides a video processing device, which can execute the above method.

如图3所示,为本发明实施例还提供一种视频处理设备结构示意图,包括:As shown in FIG. 3, a schematic structural diagram of a video processing device is also provided for an embodiment of the present invention, including:

获取单元301,用于获取待播放视频帧;An acquisition unit 301, configured to acquire video frames to be played;

确定单元302,用于确定所述待播放视频帧的像素深度,并根据所述待播放视频帧的像素深度确定所述待播放视频帧的视频质量等级;A determining unit 302, configured to determine the pixel depth of the video frame to be played, and determine the video quality level of the video frame to be played according to the pixel depth of the video frame to be played;

处理单元303,用于若确定所述待播放视频帧的视频质量等级小于预设等级,则在所述待播放视频帧为暗场场景图像时,对所述待播放视频帧进行图像增强处理。The processing unit 303 is configured to perform image enhancement processing on the video frame to be played when it is determined that the video quality level of the video frame to be played is lower than a preset level when the video frame to be played is a dark scene image.

可选的,所述根据所述待播放视频帧的像素深度确定所述待播放视频帧的视频质量等级之前,所述处理单元还用于:Optionally, before determining the video quality level of the video frame to be played according to the pixel depth of the video frame to be played, the processing unit is further configured to:

若确定所述待播放视频帧的分辨率小于预设分辨率,则对所述待播放视频帧进行上采样处理。If it is determined that the resolution of the video frame to be played is smaller than the preset resolution, performing upsampling processing on the video frame to be played.

可选的,所述确定单元302具体用于:Optionally, the determining unit 302 is specifically configured to:

根据以下公式确定所述待播放视频帧的视频质量等级:Determine the video quality level of the video frame to be played according to the following formula:

其中,q为所述待播放视频帧的视频质量等级;k为预设值;x为所述待播放视频帧在解码之前存储每个像素所用的比特位数;b为所述像素深度。Wherein, q is the video quality level of the video frame to be played; k is a preset value; x is the number of bits used for storing each pixel of the video frame to be played before decoding; b is the pixel depth.

可选的,所述处理单元303还用于:Optionally, the processing unit 303 is further configured to:

若确定所述待播放视频帧的视频质量等级大于或等于所述预设等级,则对所述待播放视频帧进行去块效应滤波处理。If it is determined that the video quality level of the video frame to be played is greater than or equal to the preset level, performing deblocking filter processing on the video frame to be played.

可选的,所述处理单元303具体用于:Optionally, the processing unit 303 is specifically configured to:

对所述待播放视频帧进行离散余弦变换,并将离散余弦变换后的所述待播放视频帧进行量化处理;Perform discrete cosine transform on the video frame to be played, and perform quantization processing on the video frame to be played after the discrete cosine transform;

将经过所述量化处理后的所述待播放视频帧进行逆离散余弦变换,获得图像增强处理后的所述待播放视频帧。performing an inverse discrete cosine transform on the video frame to be played after the quantization processing, to obtain the video frame to be played after image enhancement processing.

综上所述,根据本发明实施例提供的视频处理方法及设备,在获取待播放视频帧之后,根据所述待播放视频帧的像素深度确定所述待播放视频帧的视频质量等级,并在确定所述待播放视频帧的视频质量等级小于预设等级时,对所述待播放视频帧中的暗场场景图像进行图像增强处理,从而提升待播放视频帧的质量。由于本发明实施例提供的方法,是根据待播放视频帧的视频质量等级,对待播放视频帧选择不同的后处理方法及处理强度,待播放视频帧的视频质量等级较高时,不进行或者选择性进行后处理;待播放视频帧的视频质量等级较低时,提高处理待播放视频帧的处理强度,从而以牺牲有限处理量的前提下获得视频质量的提高,给用户更好的视觉体验In summary, according to the video processing method and device provided by the embodiments of the present invention, after the video frame to be played is acquired, the video quality level of the video frame to be played is determined according to the pixel depth of the video frame to be played, and the When it is determined that the video quality level of the video frame to be played is lower than a preset level, image enhancement processing is performed on the dark field scene image in the video frame to be played, thereby improving the quality of the video frame to be played. Because the method provided by the embodiment of the present invention is to select different post-processing methods and processing intensities for the video frames to be played according to the video quality level of the video frames to be played, when the video quality level of the video frames to be played is higher, do not perform or select When the video quality level of the video frame to be played is low, the processing intensity of the video frame to be played is increased, so as to improve the video quality at the expense of limited processing capacity and give users a better visual experience

以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without any creative effort.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the above description of the implementations, those skilled in the art can clearly understand that each implementation can be implemented by means of software plus a necessary general hardware platform, and of course also by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, magnetic discs, optical discs, etc., including several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) execute the methods described in various embodiments or some parts of the embodiments.

最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims (10)

1.一种视频处理方法,其特征在于,包括:1. A video processing method, characterized in that, comprising: 获取待播放视频帧;Get the video frame to be played; 确定所述待播放视频帧的像素深度,并根据所述待播放视频帧的像素深度确定所述待播放视频帧的视频质量等级;Determine the pixel depth of the video frame to be played, and determine the video quality level of the video frame to be played according to the pixel depth of the video frame to be played; 若确定所述待播放视频帧的视频质量等级小于预设等级,则在所述待播放视频帧为暗场场景图像时,对所述待播放视频帧进行图像增强处理。If it is determined that the video quality level of the video frame to be played is lower than a preset level, performing image enhancement processing on the video frame to be played when the video frame to be played is a dark scene image. 2.根据权利要求1所述的方法,其特征在于,所述根据所述待播放视频帧的像素深度确定所述待播放视频帧的视频质量等级之前,还包括:2. The method according to claim 1, wherein, before determining the video quality level of the video frame to be played according to the pixel depth of the video frame to be played, further comprising: 若确定所述待播放视频帧的分辨率小于预设分辨率,则对所述待播放视频帧进行上采样处理。If it is determined that the resolution of the video frame to be played is smaller than the preset resolution, performing upsampling processing on the video frame to be played. 3.根据权利要求1或2所述的方法,其特征在于,所述根据所述待播放视频帧的像素深度确定所述待播放视频帧的视频质量等级,包括:3. The method according to claim 1 or 2, wherein the determining the video quality level of the video frame to be played according to the pixel depth of the video frame to be played comprises: 根据以下公式确定所述待播放视频帧的视频质量等级:Determine the video quality level of the video frame to be played according to the following formula: 其中,q为所述待播放视频帧的视频质量等级;k为预设值;x为所述待播放视频帧在解码之前存储每个像素所用的比特位数;b为所述像素深度。Wherein, q is the video quality level of the video frame to be played; k is a preset value; x is the number of bits used for storing each pixel of the video frame to be played before decoding; b is the pixel depth. 4.根据权利要求1至3任一所述的方法,其特征在于,所述方法还包括:4. The method according to any one of claims 1 to 3, wherein the method further comprises: 若确定所述待播放视频帧的视频质量等级大于或等于所述预设等级,则对所述待播放视频帧进行去块效应滤波处理。If it is determined that the video quality level of the video frame to be played is greater than or equal to the preset level, performing deblocking filter processing on the video frame to be played. 5.根据权利要求1至3任一所述的方法,其特征在于,所述对所述待播放视频帧进行图像增强处理,包括:5. The method according to any one of claims 1 to 3, wherein the performing image enhancement processing on the video frame to be played comprises: 对所述待播放视频帧进行离散余弦变换,并将离散余弦变换后的所述待播放视频帧进行量化处理;Perform discrete cosine transform on the video frame to be played, and perform quantization processing on the video frame to be played after the discrete cosine transform; 将经过所述量化处理后的所述待播放视频帧进行逆离散余弦变换,获得图像增强处理后的所述待播放视频帧。performing an inverse discrete cosine transform on the video frame to be played after the quantization processing, to obtain the video frame to be played after image enhancement processing. 6.一种视频处理设备,其特征在于,包括:6. A video processing device, characterized in that, comprising: 获取单元,用于获取待播放视频帧;An acquisition unit, configured to acquire video frames to be played; 确定单元,用于确定所述待播放视频帧的像素深度,并根据所述待播放视频帧的像素深度确定所述待播放视频帧的视频质量等级;A determining unit, configured to determine the pixel depth of the video frame to be played, and determine the video quality level of the video frame to be played according to the pixel depth of the video frame to be played; 处理单元,用于若确定所述待播放视频帧的视频质量等级小于预设等级,则在所述待播放视频帧为暗场场景图像时,对所述待播放视频帧进行图像增强处理。A processing unit, configured to perform image enhancement processing on the video frame to be played when it is determined that the video quality level of the video frame to be played is lower than a preset level when the video frame to be played is a dark field scene image. 7.根据权利要求6所述的设备,其特征在于,所述根据所述待播放视频帧的像素深度确定所述待播放视频帧的视频质量等级之前,所述处理单元还用于:7. The device according to claim 6, wherein before determining the video quality level of the video frame to be played according to the pixel depth of the video frame to be played, the processing unit is further configured to: 若确定所述待播放视频帧的分辨率小于预设分辨率,则对所述待播放视频帧进行上采样处理。If it is determined that the resolution of the video frame to be played is smaller than the preset resolution, performing upsampling processing on the video frame to be played. 8.根据权利要求6或7所述的设备,其特征在于,所述确定单元具体用于:8. The device according to claim 6 or 7, wherein the determining unit is specifically configured to: 根据以下公式确定所述待播放视频帧的视频质量等级:Determine the video quality level of the video frame to be played according to the following formula: 其中,q为所述待播放视频帧的视频质量等级;k为预设值;x为所述待播放视频帧在解码之前存储每个像素所用的比特位数;b为所述像素深度。Wherein, q is the video quality level of the video frame to be played; k is a preset value; x is the number of bits used for storing each pixel of the video frame to be played before decoding; b is the pixel depth. 9.根据权利要求6至8任一所述的设备,其特征在于,所述处理单元还用于:9. The device according to any one of claims 6 to 8, wherein the processing unit is further used for: 若确定所述待播放视频帧的视频质量等级大于或等于所述预设等级,则对所述待播放视频帧进行去块效应滤波处理。If it is determined that the video quality level of the video frame to be played is greater than or equal to the preset level, performing deblocking filter processing on the video frame to be played. 10.根据权利要求6至8任一所述的设备,其特征在于,所述处理单元具体用于:10. The device according to any one of claims 6 to 8, wherein the processing unit is specifically configured to: 对所述待播放视频帧进行离散余弦变换,并将离散余弦变换后的所述待播放视频帧进行量化处理;Perform discrete cosine transform on the video frame to be played, and perform quantization processing on the video frame to be played after the discrete cosine transform; 将经过所述量化处理后的所述待播放视频帧进行逆离散余弦变换,获得图像增强处理后的所述待播放视频帧。performing an inverse discrete cosine transform on the video frame to be played after the quantization processing, to obtain the video frame to be played after image enhancement processing.
CN201610280341.8A 2016-04-28 2016-04-28 Video processing method and device Pending CN105898565A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610280341.8A CN105898565A (en) 2016-04-28 2016-04-28 Video processing method and device
PCT/CN2016/099959 WO2017185609A1 (en) 2016-04-28 2016-09-23 Video processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610280341.8A CN105898565A (en) 2016-04-28 2016-04-28 Video processing method and device

Publications (1)

Publication Number Publication Date
CN105898565A true CN105898565A (en) 2016-08-24

Family

ID=56702996

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610280341.8A Pending CN105898565A (en) 2016-04-28 2016-04-28 Video processing method and device

Country Status (2)

Country Link
CN (1) CN105898565A (en)
WO (1) WO2017185609A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017185609A1 (en) * 2016-04-28 2017-11-02 乐视控股(北京)有限公司 Video processing method and device
CN108366293A (en) * 2017-01-03 2018-08-03 黑帆科技有限公司 VR video transcoding methods and device
US20200342572A1 (en) * 2018-04-02 2020-10-29 Tencent Technology (Shenzhen) Company Limited Image related processing method and apparatus, device and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112804577B (en) * 2019-11-14 2023-10-20 西安诺瓦星云科技股份有限公司 Video switching display method and device, video processing equipment and storage medium
CN112068771A (en) * 2020-08-17 2020-12-11 Oppo广东移动通信有限公司 Video processing method, video processing device, terminal device and storage medium
CN114401445B (en) * 2021-12-31 2024-03-22 深圳云天励飞技术股份有限公司 Video processing control method, device, monitoring equipment, client and storage medium
CN118803356A (en) * 2022-11-22 2024-10-18 荣耀终端有限公司 Method and electronic device for enhancing video quality

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1875635A (en) * 2003-09-04 2006-12-06 高通股份有限公司 Transform domain sub-sampling for video transcoding
CN101272489A (en) * 2007-03-21 2008-09-24 中兴通讯股份有限公司 Encoding and decoding device and method for video image quality enhancement
US20090161768A1 (en) * 2007-12-20 2009-06-25 Young-O Park Method and apparatus for video decoding, in the presence of noise
CN102158699A (en) * 2011-03-28 2011-08-17 广州市聚晖电子科技有限公司 Embedded video compression coding system with image enhancement function

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102056009B (en) * 2009-11-05 2012-08-29 中国移动通信集团公司 Method and device for evaluating image quality of video sequence
CN102811354B (en) * 2011-05-30 2015-04-29 深圳市快播科技有限公司 Video image quality enhanced playing method and on-demand terminal
CN102314673B (en) * 2011-08-02 2013-06-05 中国科学院长春光学精密机械与物理研究所 Self-adapting image enhancement method
EP2819414A3 (en) * 2013-06-28 2015-02-25 Samsung Electronics Co., Ltd Image processing device and image processing method
CN105898565A (en) * 2016-04-28 2016-08-24 乐视控股(北京)有限公司 Video processing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1875635A (en) * 2003-09-04 2006-12-06 高通股份有限公司 Transform domain sub-sampling for video transcoding
CN101272489A (en) * 2007-03-21 2008-09-24 中兴通讯股份有限公司 Encoding and decoding device and method for video image quality enhancement
US20090161768A1 (en) * 2007-12-20 2009-06-25 Young-O Park Method and apparatus for video decoding, in the presence of noise
CN102158699A (en) * 2011-03-28 2011-08-17 广州市聚晖电子科技有限公司 Embedded video compression coding system with image enhancement function

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017185609A1 (en) * 2016-04-28 2017-11-02 乐视控股(北京)有限公司 Video processing method and device
CN108366293A (en) * 2017-01-03 2018-08-03 黑帆科技有限公司 VR video transcoding methods and device
US20200342572A1 (en) * 2018-04-02 2020-10-29 Tencent Technology (Shenzhen) Company Limited Image related processing method and apparatus, device and storage medium
US11836891B2 (en) * 2018-04-02 2023-12-05 Tencent Technology (Shenzhen) Company Ltd Image related processing method and apparatus, device and storage medium

Also Published As

Publication number Publication date
WO2017185609A1 (en) 2017-11-02

Similar Documents

Publication Publication Date Title
CN105898565A (en) Video processing method and device
US9912945B2 (en) Hybrid backward-compatible signal encoding and decoding
US8948253B2 (en) Networked image/video processing system
US9918116B2 (en) Image domain compliance
CN108833938B (en) Method and apparatus for selecting video covers
US9137548B2 (en) Networked image/video processing system and network site therefor
CN105472205B (en) Real-time video noise reduction method and device in encoding process
US8594449B2 (en) MPEG noise reduction
CN104378636B (en) A kind of video encoding method and device
CN103281525A (en) Networked image/video processing system for enhancing photos and videos
CN110766637B (en) Video processing method, processing device, electronic equipment and storage medium
US8077773B2 (en) Systems and methods for highly efficient video compression using selective retention of relevant visual detail
CN115511756A (en) Video enhancement processing method, device, electronic device and storage medium
TW202209879A (en) Image encoding method, image decoding method and related devices capable of improving the accuracy of intra-frame prediction and encoding efficiency
WO2022022622A1 (en) Image coding method, image decoding method, and related apparatus
CN111182310A (en) Video processing method and device, computer readable medium and electronic equipment
CN101188765A (en) Method and apparatus for encoding and decoding RGB image
CN106954074B (en) Video data processing method and device
CN112449185B (en) Video decoding method, video encoding device, video encoding medium, and electronic apparatus
Venkataramanan et al. Quality Assessment in Media and Entertainment: Challenges and Trends
US20150078433A1 (en) Reducing bandwidth and/or storage of video bitstreams
US20160173876A1 (en) Advanced video coding and decoding chip and advanced video coding and decoding method
CN106954073B (en) Video data input and output method, device and system
US20160173908A1 (en) Advanced video coding and decoding chip and advanced video coding and decoding method
CN113965748A (en) A High-Fidelity Video Stream Compression Control Method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned
AD01 Patent right deemed abandoned

Effective date of abandoning: 20200417