WO2015196718A1 - Video encoding method and device - Google Patents

Video encoding method and device Download PDF

Info

Publication number
WO2015196718A1
WO2015196718A1 PCT/CN2014/091932 CN2014091932W WO2015196718A1 WO 2015196718 A1 WO2015196718 A1 WO 2015196718A1 CN 2014091932 W CN2014091932 W CN 2014091932W WO 2015196718 A1 WO2015196718 A1 WO 2015196718A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
frame image
dividing
image
frame
Prior art date
Application number
PCT/CN2014/091932
Other languages
French (fr)
Chinese (zh)
Inventor
张林涛
毛丹
苗军
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2015196718A1 publication Critical patent/WO2015196718A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals

Definitions

  • the present invention relates to the field of video coding technologies, and in particular, to a video coding method and apparatus.
  • the existing single-core DSP architecture is difficult to meet the performance requirements and is difficult to meet.
  • Real-time codec requirements while high-definition real-time image applications such as video conferencing require high-speed encoding on multi-core architectures to enable larger-scale parallel data calculations.
  • the original video data is usually distributed to multiple cores of the processor and simultaneously encoded in parallel, and the encoded data is collected and packaged after the encoding is completed.
  • the video frame is usually uniformly and horizontally divided into a plurality of parts, and then encoded by a plurality of cores.
  • this will bring a problem.
  • dual-core encoding if one frame of image is divided into upper and lower half frames and then separately encoded, the coding parameters on both sides of the upper and lower field boundaries will be different, and after merging the images, A visual intermediate divider difference effect is produced during video playback. Since the static segmentation method in the multi-core encoding of the video frame in the related art is relatively fixed, the effect of the intermediate dividing line generated in the video is continuously accumulated, thereby affecting the quality of the video encoding.
  • the embodiment of the invention provides a video encoding method and device, which avoids the influence of the difference effect caused by the static intermediate dividing line in the prior art and affects the video encoding quality.
  • an embodiment of the present invention provides a video coding method, which is applied to a multi-core video coding environment, and includes:
  • the sub-image obtained by dividing the current frame image is encoded.
  • the second dividing manner is different from the first dividing manner, and includes: dividing positions when the image frames in the video are divided.
  • the second dividing manner is different from the first dividing manner, and further includes: the number of the divided sub-images is different.
  • the first dividing manner and the second dividing manner each include: dividing an image frame in the video into at least two sub-images.
  • the dividing the image frame in the video into at least two sub-images includes:
  • the image frames in the video are vertically divided into at least two sub-images.
  • each sub-image obtained by the division is the same size.
  • an embodiment of the present invention further provides a video encoding apparatus, including:
  • a detecting module configured to detect a first dividing manner of a previous frame image in the video if the current frame image is not the first frame image in the video;
  • a dividing module configured to divide the current frame image by using a second dividing manner, where the second dividing manner is different from the first dividing manner
  • the encoding module is configured to encode the sub-image obtained by dividing the current frame image.
  • the second dividing manner is different from the first dividing manner, and includes: dividing positions when the image frames in the video are divided.
  • the first dividing manner and the second dividing manner each include: dividing an image frame in the video into at least two sub-images.
  • the dividing the image frame in the video into at least two sub-images includes:
  • the image frames in the video are vertically divided into at least two sub-images.
  • each of the divided sub-images has the same size.
  • an embodiment of the present invention further provides a video encoding terminal, including:
  • a processor configured to detect a first division manner of a previous frame image in the video when the current frame image is not the first frame image in the video; and divide the current frame image by using a second division manner, where The second dividing manner is different from the first dividing manner; the divided sub-images of the current frame image are encoded.
  • the embodiment of the invention further provides a computer program and a carrier thereof, the program comprising program instructions, when the program instruction is executed by the video encoding device, enabling the device to perform the above video encoding method.
  • the embodiment of the present invention has at least the following advantages:
  • the video encoding method and device adopts a dynamic segmentation mode for each frame image in the video in the video multi-core encoding process, which can avoid the influence of the difference effect of the static intermediate dividing line in the prior art.
  • FIG. 1 is a flowchart of a video encoding method according to a first embodiment of the present invention
  • FIG. 2 is a schematic diagram of frame image division in the first embodiment of the present invention.
  • FIG. 3 is a schematic diagram of horizontal division of a frame image in the first embodiment of the present invention.
  • FIG. 4 is a schematic diagram showing vertical division of a frame image in the first embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a video encoding apparatus according to a second embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a video encoding terminal according to a third embodiment of the present invention.
  • a first embodiment of the present invention is applied to a multi-core video encoding environment, as shown in FIG. 1, and includes the following specific steps:
  • Step S101 In a case where the current frame image is not the first frame image in the video, the first division manner of the previous frame image in the video is detected.
  • the frame image currently required to be encoded in the video is an IDR (Instantaneous Decoding Refresh) frame, because the IDR frame in the video frame is the first frame image in the video, if the current frame image is detected as For an IDR frame, the current frame image is the first frame image in the video. If it is detected that the current frame image is not an IDR frame, the image division mode in the image coding of the previous frame is detected, that is, the first division mode.
  • IDR Intelligent Decoding Refresh
  • Step S102 Perform a second division manner on the current frame image, where the second division manner is different from the first division manner.
  • the current frame image in the video is divided, that is, the second division mode is used for division; wherein the second division manner is the first division manner
  • the adjacent frame images in the video are divided in different ways, so that the position of the middle dividing line of each frame of the frame image in the video is dynamically adjusted, so that the middle dividing line of the image of the latter frame is not intersected with the middle dividing line of the image of the previous frame.
  • the coincidence avoids the phenomenon that the intermediate dividing line is superimposed on the same division mode for each frame of the video, which ensures the quality of the video.
  • the current frame image is not an IDR frame
  • the IDR frame is defined as the 0th frame
  • the frame distance between the frame image currently required to be encoded and the IDR frame may also be detected. If the frame distance is an even number, the frame image currently required to be encoded may be in the same division manner as the IDR frame; if the frame distance between the currently required frame image and the IDR frame is an odd number, a different division manner from the IDR frame image may be adopted. In this way, The current frame image is adjacent to the IDR frame image, and the current frame image and the IDR frame image are not divided in the same manner.
  • the present invention may also select a division manner required for each frame image according to the frame number frame_num allocated when the frame image is encoded in the video; wherein the frame_num value of the IDR frame is 0, and the frame_num value of the subsequent frame image and the IDR The frame spacing, so that the frame image of the frame to be encoded in the video can be purposefully selected.
  • the encoded frame image may be divided into multiple manners, such as a horizontal division manner and a vertical division manner.
  • Fig. 2 is a diagram showing the division of frame images in the first embodiment of the present invention.
  • the frame image in the video is divided into four parts, and four sub-images are obtained: slice 0, slice 1, slice 2, and slice 3.
  • Chip 0, slice 1, slice 2, and slice 3 are respectively handed over to DSP1, DSP2, DSP3, and DSP4 for simultaneous parallel encoding processing.
  • FIG. 3 is a schematic diagram of horizontal division of a frame image in the first embodiment of the present invention.
  • FIG. 3 Three consecutive frame images are shown in Figure 3.
  • the division manner of the previous frame image in the video is checked, that is, the division manner of the 2j-1 frame image in FIG. 3 is detected. Since the current frame image and the previous frame image are all divided by the horizontal division method, the specific division of the current frame image can be avoided by adjusting the number or size of the divided sub-images of the current frame image.
  • the method is the same as the specific division of the image of the previous frame, so that the problem that the current frame image is generated at the same position as the intermediate dividing line when the image of the previous frame is divided can be avoided. Similarly, when the next frame image is specifically divided, the same specific division method as the current frame image should be avoided.
  • FIG. 3 is a method for vertically dividing an image in the first embodiment of the present invention, so that the position of the intermediate dividing line generated by the adjacent frame images in FIG. 4 is different, as shown in FIG. 4 .
  • the positions of the intermediate dividing lines L1, L2, ..., Ln-1 generated in the 2j-1th frame image are different from the positions of the intermediate dividing lines L1, L2, ..., Ln-1 generated in the 2jth frame image.
  • the manner of dividing the video frame image is not limited to the horizontal division and the vertical division. In other embodiments, other division manners may also be adopted.
  • Step S103 encoding the sub-image obtained by dividing the current frame image.
  • the embodiment of the present invention divides the frame image in the video into four sub-images, and then passes the divided four sub-images to four DSP cores for parallel simultaneous encoding processing, which adopts the embodiment of the present invention.
  • the method of encoding and processing all the frame images in the video frame is re-consolidated into a video image, and the position of the intermediate dividing line generated by dividing the adjacent video frame image into different sub-images is different, and the phase is not in the video playing process.
  • the superposition of the intermediate dividing lines of the adjacent frame images results in a reduction in video encoding quality.
  • a second embodiment of the present invention is a video encoding apparatus, including:
  • the detecting module 10 is configured to detect a first dividing manner of the previous frame image in the video if the current frame image is not the first frame image in the video.
  • the detecting module 10 detects an image division manner in the image encoding of the previous frame, that is, a first division manner.
  • the dividing module 20 is configured to divide the current frame image by using a second dividing manner, and the second dividing manner is different from the first dividing manner.
  • the dividing module 20 divides the current frame image in the video, that is, divides by using the second division manner; wherein, the second division manner To be different from the first division method, so that adjacent frame images in the video
  • the division mode is different, so that the position of the middle dividing line of each frame of the frame image in the video is dynamically adjusted, so that the middle dividing line of the image of the latter frame does not coincide with the middle dividing line of the image of the previous frame, thereby avoiding each frame in the video.
  • the phenomenon that the images are superimposed by the same division mode and the intermediate dividing lines appear ensures the quality of the video.
  • the frame distance between the frame image currently required to be encoded and the IDR frame may also be detected. If the frame distance is an even number, the frame image currently required to be encoded may be in the same division manner as the IDR frame; if the frame distance between the currently required frame image and the IDR frame is an odd number, a different division manner from the IDR frame image may be adopted. Thus, even if the current frame image is adjacent to the IDR frame image, the current frame image and the IDR frame image are not divided in the same manner.
  • the present invention may also select a division manner required for each frame image according to the frame number frame_num allocated when the frame image is encoded in the video; wherein the frame_num value of the IDR frame is 0, and the frame_num value of the subsequent frame image and the IDR The frame spacing, so that the frame image of the frame to be encoded in the video can be purposefully selected.
  • the encoded frame image may be divided into multiple manners, such as a horizontal division manner and a vertical division manner.
  • a horizontal division manner and a vertical division manner.
  • the encoding module 30 is configured to encode the divided sub-images in the current frame image.
  • the frame image in the video is divided into four parts, and four sub-images are obtained: slice 0, slice 1, slice 2, and slice 3.
  • Chip 0, slice 1, slice 2, and slice 3 are respectively handed over to DSP1, DSP2, DSP3, and DSP4 for simultaneous parallel encoding processing.
  • a third embodiment of the present invention is a video encoding terminal, including:
  • the processor 40 is configured to: when the current frame image is not the first frame image in the video, detect a first division manner of the previous frame image in the video; and divide the current frame image by using a second division manner, and the second division manner Different from the first division manner; encoding the sub-image obtained after division in the current frame image.
  • the frame image currently required to be encoded in the video is an IDR frame. Since the IDR frame in the video screen is the first frame image in the video, if the current frame image is detected as an IDR frame, the current frame image is in the video. The first frame of the image. If it is detected that the current frame image is not an IDR frame, the image division mode in the image coding of the previous frame is detected, that is, the first division mode.
  • the current frame image in the video is divided, that is, divided according to the second division manner.
  • the second division mode is different from the first division manner, so that adjacent frame images in the video are divided in different manners.
  • the middle dividing line of the latter frame image does not coincide with the middle dividing line of the previous frame image, thereby avoiding adopting each frame image in the video.
  • the phenomenon of superposition of intermediate dividing lines appearing in the same division mode ensures the quality of the video.
  • This application example uses the four cores of the model TCI6678 to complete the video data encoding of 1080 format, the encoding type is IPPPPP, and select the "1080P_example.yuv" sequence with the resolution of 1920 ⁇ 1080 as the test sequence, combined with the above figure 1.
  • the specific implementation steps are as follows:
  • Step 1 Determine whether the current encoded frame is an IDR frame or an even frame, that is, whether it is a 2j frame. If yes, go to step 2. If not, go to step 3.
  • Step 2 The 2j frame image of the "1080P_example.yuv" sequence is spatially divided into four slices, which are respectively coded by four cores of DSP0, DSP1, DSP2, and DSP3, and each image has the same size. Then, go to step 4.
  • Step 3 The 2j+1 frame image of the "1080P_example.yuv" sequence is re-divided into 4 slices based on step 2, and the horizontal dividing lines are all shifted down by one macroblock row, and respectively coded by four DSP cores. See Figure 2.
  • Step 4 Return to step 1 and continue the next frame encoding.
  • frame images and image frames in a video refer to the same concept and are well known to those skilled in the art.
  • the video encoding method and apparatus use a dynamic segmentation mode for each frame of video in the video multi-core encoding process, thereby avoiding the difference effect of the static intermediate dividing line in the related art.
  • the problem of constantly accumulating and affecting the quality of video coding can be obtained. Better video image quality.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve. Thus, the invention is not limited to any specific combination of hardware and software.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • each device/function module/functional unit in the above embodiment When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the video encoding method and device provided by the embodiments of the present invention use a dynamic segmentation mode for each frame of video in the video multi-core encoding process, which can avoid affecting the video due to the continuous accumulation of the difference of the static intermediate dividing line in the related art. Coding quality issues to get better video image quality.

Landscapes

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

Abstract

A video encoding method and device, which are applied to a multi-core video encoding environment. The method comprises: in the case where a current frame image is not a first frame image in a video, detecting a first division manner of a previous frame image in the video; dividing the current frame image in a second division manner, wherein the second division manner is different form the first division manner; and encoding sub-images obtained by dividing the current frame image. By means of the video encoding method and device provided in the embodiments of the present invention, each frame image in a video is dynamically partitioned during the process of encoding a multi-core video, thereby avoiding the problem in the related art that the video encoding quality is affected due to the fact that difference effects are continuously accumulated since the position of an intermediate partition line for static partition is fixed.

Description

视频编码方法及装置Video coding method and device 技术领域Technical field
本发明涉及视频编码技术领域,尤其涉及一种视频编码方法及装置。The present invention relates to the field of video coding technologies, and in particular, to a video coding method and apparatus.
背景技术Background technique
随着互联网的发展,对多媒体服务尤其是视频服务的需求出现加速增长的趋势。视频编解码技术作为多媒体应用的核心技术,在远程监控、远程教学、远程医疗诊断、远程购物、远程探视、视频会议及可视电话等应用中发挥着巨大的作用。随着对高画质视频压缩传输等需求的日益增长,高性能编解码等相关技术已成为研究热点。随着主流视频压缩标准的发展,其越来越高的计算复杂度与目前DSP(Digital Signal Processor,数字信号处理器)的单核计算能力限制的矛盾相当突出。随着网络多媒体服务对超高分辨率支持和高清画质流媒体的广泛应用,对高性能并行计算需求也不断增大,现有的单核DSP结构很难满足计算性能的需求,也难以满足实时编解码的要求,而类似视频会议等高清实时图像应用则需要实现多核结构上的高速编码,以便实现更大规模的并行数据计算。With the development of the Internet, the demand for multimedia services, especially video services, is accelerating. As the core technology of multimedia applications, video codec technology plays a huge role in applications such as remote monitoring, distance learning, telemedicine diagnosis, remote shopping, remote viewing, video conferencing and video telephony. With the increasing demand for high-definition video compression transmission, high-performance codec and other related technologies have become research hotspots. With the development of mainstream video compression standards, the contradiction between its increasingly high computational complexity and the current single-core computing power limitation of DSP (Digital Signal Processor) is quite prominent. With the wide application of network multimedia services for ultra-high resolution support and high-definition picture quality streaming media, the demand for high-performance parallel computing is also increasing. The existing single-core DSP architecture is difficult to meet the performance requirements and is difficult to meet. Real-time codec requirements, while high-definition real-time image applications such as video conferencing require high-speed encoding on multi-core architectures to enable larger-scale parallel data calculations.
发明内容Summary of the invention
为实现在多核DSP上实时编码,通常将原始视频数据分发给处理器多个核同时并行编码,编码完成后再对编码数据进行收集封装。因视频场景中水平运动更为常见,所以相关技术当中通常对视频帧进行统一水平固定分割成多个部分,然后分别由多个核进行编码。但是这样会带来一个问题,以双核编码为例,如果将一帧图像被分割成上下半帧,然后分别进行编码,那么在上下半帧分界处两侧编码参数会有差别,合并图像后在视频播放中会产生视觉上的中间分隔线差异效果。由于相关技术中对视频帧进行多核编码中的静态分割方式较为固定,导致视频中产生的中间分割线差异效果会不断累加,进而影响视频编码的质量。 In order to realize real-time encoding on a multi-core DSP, the original video data is usually distributed to multiple cores of the processor and simultaneously encoded in parallel, and the encoded data is collected and packaged after the encoding is completed. Since the horizontal motion in the video scene is more common, in the related art, the video frame is usually uniformly and horizontally divided into a plurality of parts, and then encoded by a plurality of cores. However, this will bring a problem. Taking dual-core encoding as an example, if one frame of image is divided into upper and lower half frames and then separately encoded, the coding parameters on both sides of the upper and lower field boundaries will be different, and after merging the images, A visual intermediate divider difference effect is produced during video playback. Since the static segmentation method in the multi-core encoding of the video frame in the related art is relatively fixed, the effect of the intermediate dividing line generated in the video is continuously accumulated, thereby affecting the quality of the video encoding.
本发明实施例提供一种视频编码方法及装置,避免现有技术中由于静态中间分割线导致的差异效果不断累加而影响视频编码质量。The embodiment of the invention provides a video encoding method and device, which avoids the influence of the difference effect caused by the static intermediate dividing line in the prior art and affects the video encoding quality.
根据本发明的一个方面,本发明实施例提供了一种视频编码方法,应用于多核视频编码环境中,包括:According to an aspect of the present invention, an embodiment of the present invention provides a video coding method, which is applied to a multi-core video coding environment, and includes:
在当前帧图像不是视频中第一帧图像的情况下,检测所述视频中上一帧图像的第一划分方式;In a case where the current frame image is not the first frame image in the video, detecting a first division manner of the previous frame image in the video;
对所述当前帧图像采用第二划分方式进行划分,所述第二划分方式不同于所述第一划分方式;And dividing the current frame image by using a second dividing manner, where the second dividing manner is different from the first dividing manner;
对所述当前帧图像进行划分后得到的子图像进行编码。The sub-image obtained by dividing the current frame image is encoded.
可选地,所述第二划分方式不同于所述第一划分方式,包括:针对视频中的图像帧进行划分时的划分位置不同。Optionally, the second dividing manner is different from the first dividing manner, and includes: dividing positions when the image frames in the video are divided.
可选地,所述第二划分方式不同于所述第一划分方式,还包括:划分出的子图像的个数不同。Optionally, the second dividing manner is different from the first dividing manner, and further includes: the number of the divided sub-images is different.
可选地,所述第一划分方式和第二划分方式均包括:将视频中的图像帧划分为至少两个子图像。Optionally, the first dividing manner and the second dividing manner each include: dividing an image frame in the video into at least two sub-images.
可选地,所述将视频中的图像帧划分为至少两个子图像,包括:Optionally, the dividing the image frame in the video into at least two sub-images includes:
将所述视频中的图像帧水平划分为至少两个子图像;Dividing the image frame in the video horizontally into at least two sub-images;
或者,将所述视频中的图像帧垂直划分为至少两个子图像。Alternatively, the image frames in the video are vertically divided into at least two sub-images.
可选地,划分得到的各子图像大小相同。Optionally, each sub-image obtained by the division is the same size.
根据本发明的另一方面,本发明实施例还提供一种一种视频编码装置,包括:According to another aspect of the present invention, an embodiment of the present invention further provides a video encoding apparatus, including:
检测模块,设置为在当前帧图像不是视频中第一帧图像的情况下,检测所述视频中上一帧图像的第一划分方式;a detecting module, configured to detect a first dividing manner of a previous frame image in the video if the current frame image is not the first frame image in the video;
划分模块,设置为对所述当前帧图像采用第二划分方式进行划分,所述第二划分方式不同于所述第一划分方式;a dividing module, configured to divide the current frame image by using a second dividing manner, where the second dividing manner is different from the first dividing manner;
编码模块,设置为对所述当前帧图像进行划分后得到的子图像进行编码。 The encoding module is configured to encode the sub-image obtained by dividing the current frame image.
可选地,所述第二划分方式不同于所述第一划分方式,包括:针对视频中的图像帧进行划分时的划分位置不同。Optionally, the second dividing manner is different from the first dividing manner, and includes: dividing positions when the image frames in the video are divided.
可选地,所述第一划分方式和第二划分方式均包括:将视频中的图像帧划分为至少两个子图像。Optionally, the first dividing manner and the second dividing manner each include: dividing an image frame in the video into at least two sub-images.
可选地,所述将视频中的图像帧划分为至少两个子图像,包括:Optionally, the dividing the image frame in the video into at least two sub-images includes:
将所述视频中的图像帧水平划分为至少两个子图像;Dividing the image frame in the video horizontally into at least two sub-images;
或者,将所述视频中的图像帧垂直划分为至少两个子图像。Alternatively, the image frames in the video are vertically divided into at least two sub-images.
可选地,其中划分得到的各子图像大小相同。Optionally, each of the divided sub-images has the same size.
根据本发明的又一方面,本发明实施例还提供了一种视频编码终端,包括:According to still another aspect of the present invention, an embodiment of the present invention further provides a video encoding terminal, including:
处理器,设置为在当前帧图像不是视频中第一帧图像的情况下,检测所述视频中上一帧图像的第一划分方式;对所述当前帧图像采用第二划分方式进行划分,所述第二划分方式不同于所述第一划分方式;对所述当前帧图像进行划分后的子图像进行编码。a processor, configured to detect a first division manner of a previous frame image in the video when the current frame image is not the first frame image in the video; and divide the current frame image by using a second division manner, where The second dividing manner is different from the first dividing manner; the divided sub-images of the current frame image are encoded.
本发明实施例还提供了一种计算机程序及其载体,该程序包括程序指令,当该程序指令被视频编码设备执行时,使得该设备可执行上述视频编码的方法。The embodiment of the invention further provides a computer program and a carrier thereof, the program comprising program instructions, when the program instruction is executed by the video encoding device, enabling the device to perform the above video encoding method.
采用上述技术方案,本发明实施例至少具有下列优点:With the above technical solution, the embodiment of the present invention has at least the following advantages:
本发明实施例所述视频编码方法及装置,在视频多核编码过程中对视频中的每一帧图像采用动态的分割方式,可以避免现有技术中由于静态中间分割线的差异效果不断累加而影响视频编码质量的问题。The video encoding method and device according to the embodiment of the present invention adopts a dynamic segmentation mode for each frame image in the video in the video multi-core encoding process, which can avoid the influence of the difference effect of the static intermediate dividing line in the prior art. The problem of video coding quality.
附图概述BRIEF abstract
图1是本发明第一实施例的视频编码方法方法流程图;1 is a flowchart of a video encoding method according to a first embodiment of the present invention;
图2是本发明第一实施例中帧图像划分的示意图;2 is a schematic diagram of frame image division in the first embodiment of the present invention;
图3为本发明第一实施例中帧图像水平划分的示意图; 3 is a schematic diagram of horizontal division of a frame image in the first embodiment of the present invention;
图4为本发明第一实施例中帧图像垂直划分的示意图;4 is a schematic diagram showing vertical division of a frame image in the first embodiment of the present invention;
图5为本发明第二实施例中视频编码装置示意图;FIG. 5 is a schematic diagram of a video encoding apparatus according to a second embodiment of the present invention; FIG.
图6为本发明第三实施例中视频编码终端示意图。FIG. 6 is a schematic diagram of a video encoding terminal according to a third embodiment of the present invention.
本发明的较佳实施方式Preferred embodiment of the invention
下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.
本发明第一实施例,一种视频编码方法,应用于多核视频编码环境中,如图1所示,包括以下具体步骤:A first embodiment of the present invention, a video encoding method, is applied to a multi-core video encoding environment, as shown in FIG. 1, and includes the following specific steps:
步骤S101,在当前帧图像不是视频中第一帧图像的情况下,检测视频中上一帧图像的第一划分方式。Step S101: In a case where the current frame image is not the first frame image in the video, the first division manner of the previous frame image in the video is detected.
具体地,首先判断视频中当前需要进行编码的帧图像是不是为IDR(Instantaneous Decoding Refresh,解码立即刷新)帧,由于视屏当中IDR帧为视频中的第一帧图像,如果检测到当前帧图像为IDR帧,则当前帧图像就是视频中的第一帧图像。如果检测到当前帧图像不是IDR帧,则检测上一帧图像编码中的图像划分方式,即第一划分方式。Specifically, it is first determined whether the frame image currently required to be encoded in the video is an IDR (Instantaneous Decoding Refresh) frame, because the IDR frame in the video frame is the first frame image in the video, if the current frame image is detected as For an IDR frame, the current frame image is the first frame image in the video. If it is detected that the current frame image is not an IDR frame, the image division mode in the image coding of the previous frame is detected, that is, the first division mode.
步骤S102,对当前帧图像采用第二划分方式进行划分,第二划分方式不同于所述第一划分方式。Step S102: Perform a second division manner on the current frame image, where the second division manner is different from the first division manner.
具体地,当检测到视频中当前帧图像的上一帧图像划分方式后,对视频中当前帧图像进行划分,即采用第二划分方式进行划分;其中,第二划分方式要与第一划分方式不同,使得视频中相邻的帧图像划分方式不同,这样通过动态的调整视频中帧图像每帧中间分割线的位置,使后一帧图像的中间分割线不与前一帧图像的中间分割线重合,避免了对视频中每一帧图像都采用相同的划分方式而出现的中间分割线叠加的现象,保证了视频的质量。Specifically, after detecting the previous frame image division mode of the current frame image in the video, the current frame image in the video is divided, that is, the second division mode is used for division; wherein the second division manner is the first division manner Different, the adjacent frame images in the video are divided in different ways, so that the position of the middle dividing line of each frame of the frame image in the video is dynamically adjusted, so that the middle dividing line of the image of the latter frame is not intersected with the middle dividing line of the image of the previous frame. The coincidence avoids the phenomenon that the intermediate dividing line is superimposed on the same division mode for each frame of the video, which ensures the quality of the video.
在当前帧图像不是IDR帧的情况下,若定义IDR帧为第0帧,还可以检测当前需要编码的帧图像与IDR帧的帧距。如果帧距为偶数,则当前需要编码的帧图像可以采用与IDR帧相同的划分方式;如果当前需要编码的帧图像与IDR帧的帧距为奇数,可以采用与IDR帧图像不同的划分方式。这样,即 使当前帧图像与IDR帧图像相邻,也不会使得当前帧图像与IDR帧图像的划分方式相同。根据当前需要编码的帧图像与IDR帧的帧距奇偶性,即使只采用两种帧图像的划分方式,也能避免视频中相邻两帧图像划分方式相同的情况。当然,帧图像的划分方式越多,越能避免对视频中每一帧图像都采用相同的划分方式而出现的中间分割线叠加的现象。另外,本发明还可以根据视频中帧图像编码时分配的帧编号frame_num来选择各帧图像所需采用的划分方式;其中,IDR帧的frame_num值为0,后续的帧图像的frame_num值为与IDR的帧距,这样可以有目的地对视频中需要编码的帧图像进行选择帧图像划分方式。In the case that the current frame image is not an IDR frame, if the IDR frame is defined as the 0th frame, the frame distance between the frame image currently required to be encoded and the IDR frame may also be detected. If the frame distance is an even number, the frame image currently required to be encoded may be in the same division manner as the IDR frame; if the frame distance between the currently required frame image and the IDR frame is an odd number, a different division manner from the IDR frame image may be adopted. In this way, The current frame image is adjacent to the IDR frame image, and the current frame image and the IDR frame image are not divided in the same manner. According to the frame-to-parity of the currently-coded frame image and the IDR frame, even if only two frame images are divided, it is possible to avoid the case where the adjacent two frames of the video are equally divided. Of course, the more the division of the frame image, the more the phenomenon that the intermediate dividing line is superimposed on the same division mode for each frame of the video can be avoided. In addition, the present invention may also select a division manner required for each frame image according to the frame number frame_num allocated when the frame image is encoded in the video; wherein the frame_num value of the IDR frame is 0, and the frame_num value of the subsequent frame image and the IDR The frame spacing, so that the frame image of the frame to be encoded in the video can be purposefully selected.
可选地,对视频中帧图像的划分方式中,可以采用多种方式对编码的帧图像进行划分,如:水平划分方式和垂直划分方式。Optionally, in the manner of dividing the frame image in the video, the encoded frame image may be divided into multiple manners, such as a horizontal division manner and a vertical division manner.
图2给出了本发明第一实施例中帧图像划分的示意图。Fig. 2 is a diagram showing the division of frame images in the first embodiment of the present invention.
如图2所示,将视频中的帧图像划分为4个部分,得到4个子图像:片0、片1、片2和片3。分别将片0、片1、片2和片3交给DSP1、DSP2、DSP3和DSP4进行同时并行编码处理。As shown in FIG. 2, the frame image in the video is divided into four parts, and four sub-images are obtained: slice 0, slice 1, slice 2, and slice 3. Chip 0, slice 1, slice 2, and slice 3 are respectively handed over to DSP1, DSP2, DSP3, and DSP4 for simultaneous parallel encoding processing.
图3为本发明第一实施例中帧图像水平划分的示意图。FIG. 3 is a schematic diagram of horizontal division of a frame image in the first embodiment of the present invention.
图3中给出了连续的三个帧图像。如图3所示,把中间的2j帧图像看做当前帧图像,那么首先检查视频中上一帧图像的划分方式,即检测图3中的2j-1帧图像的划分方式。由于当前帧图像和上一帧图像都采用了水平划分的方式对帧图像进行划分,因此,可以通过调整当前帧图像的划分子图像的个数或大小的不同,避免使当前帧图像的具体划分方式与上一帧图像的具体划分方式相同,这样就能避免使当前帧图像产生与上一帧图像划分时的中间分割线位置相同的问题。同理,对下一帧图像进行具体的划分时要避免与当前帧图像相同的具体划分方式。Three consecutive frame images are shown in Figure 3. As shown in FIG. 3, considering the middle 2j frame image as the current frame image, firstly, the division manner of the previous frame image in the video is checked, that is, the division manner of the 2j-1 frame image in FIG. 3 is detected. Since the current frame image and the previous frame image are all divided by the horizontal division method, the specific division of the current frame image can be avoided by adjusting the number or size of the divided sub-images of the current frame image. The method is the same as the specific division of the image of the previous frame, so that the problem that the current frame image is generated at the same position as the intermediate dividing line when the image of the previous frame is divided can be avoided. Similarly, when the next frame image is specifically divided, the same specific division method as the current frame image should be avoided.
从图3中可以看出,视频图像中相邻的帧图像划分方式不同,其目的就是使相邻的帧图像产生的中间分割线的位置不同。如图3中第2j-1帧图像中产生的中间分割线为L1、L2…Ln-1的位置与第2j帧图像中产生的中间分割线L1、L2…Ln-1的位置不同。同理,图4为本发明第一实施例中图像垂直划分的方法,使得图4中相邻的帧图像产生的中间分割线位置不同,如图4中 第2j-1帧图像中产生的中间分割线为L1、L2…Ln-1的位置与第2j帧图像中产生的中间分割线L1、L2…Ln-1的位置不同。As can be seen from FIG. 3, the adjacent frame images in the video image are divided in different ways, and the purpose is to make the positions of the intermediate dividing lines generated by the adjacent frame images different. The positions of the intermediate dividing lines L1, L2, ..., Ln-1 generated in the 2j-1th frame image in Fig. 3 are different from the positions of the intermediate dividing lines L1, L2, ..., Ln-1 generated in the 2jth frame image. Similarly, FIG. 4 is a method for vertically dividing an image in the first embodiment of the present invention, so that the position of the intermediate dividing line generated by the adjacent frame images in FIG. 4 is different, as shown in FIG. 4 . The positions of the intermediate dividing lines L1, L2, ..., Ln-1 generated in the 2j-1th frame image are different from the positions of the intermediate dividing lines L1, L2, ..., Ln-1 generated in the 2jth frame image.
需要说明的是,本发明实施例中对视频帧图像编码的划分方式不限于水平划分和垂直划分,在其它实施例中还可以采用其他的划分方式。It should be noted that, in the embodiment of the present invention, the manner of dividing the video frame image is not limited to the horizontal division and the vertical division. In other embodiments, other division manners may also be adopted.
步骤S103,对当前帧图像经过划分后得到的子图像进行编码。Step S103, encoding the sub-image obtained by dividing the current frame image.
具体地,结合图2,本发明实施例将视频中的帧图像划分为4个子图像,然后将划分出来的这4个子图像分别交给4个DSP核进行并行同时编码处理,采用本发明实施例的方法将视频帧中所有的帧图像编码处理后重新合并为视频图像,由于相邻的视频帧图像划分成不同的子图像而产生的中间分割线位置不同,在视频播放过程中不会因为相邻的帧图像的中间分割线的叠加而造成视频编码质量的降低。Specifically, with reference to FIG. 2, the embodiment of the present invention divides the frame image in the video into four sub-images, and then passes the divided four sub-images to four DSP cores for parallel simultaneous encoding processing, which adopts the embodiment of the present invention. The method of encoding and processing all the frame images in the video frame is re-consolidated into a video image, and the position of the intermediate dividing line generated by dividing the adjacent video frame image into different sub-images is different, and the phase is not in the video playing process. The superposition of the intermediate dividing lines of the adjacent frame images results in a reduction in video encoding quality.
另外,在当前帧是所述视频中第一帧图像的情况下,不检测其它帧图像的划分方式,直接对所述当前帧图像进行划分。由于当前帧图像是视频中第一帧图像,也是需要进行编码处理的第一帧图像。由于后面的其他帧图像还没有进行编码处理,也就没有进行帧图像的划分。因此,只需直接对当前帧图像按照上述的一种的帧图像划分对当前帧图像进行划分编码即可。本发明第二实施例,如图5所示,一种视频编码装置示,包括:In addition, in a case where the current frame is the first frame image in the video, the division mode of the other frame image is not detected, and the current frame image is directly divided. Since the current frame image is the first frame image in the video, it is also the first frame image that needs to be encoded. Since the subsequent other frame images have not been subjected to encoding processing, the division of the frame images is not performed. Therefore, it is only necessary to directly divide and encode the current frame image according to the frame image division of the above-described one of the current frame images. A second embodiment of the present invention, as shown in FIG. 5, is a video encoding apparatus, including:
检测模块10,设置为在当前帧图像不是视频中第一帧图像的情况下,检测视频中上一帧图像的第一划分方式。The detecting module 10 is configured to detect a first dividing manner of the previous frame image in the video if the current frame image is not the first frame image in the video.
具体地,首先判断视频中当前需要进行编码的帧图像是不是IDR帧,由于视屏当中IDR帧为视频中的第一帧图像,如果检测到当前帧图像是IDR帧,则当前帧图像就是视频中的第一帧图像。如果检测到当前帧图像不是IDR帧,那么检测模块10检测上一帧图像编码中的图像划分方式,即第一划分方式。Specifically, it is first determined whether the frame image currently required to be encoded in the video is an IDR frame. Since the IDR frame in the video screen is the first frame image in the video, if the current frame image is detected as an IDR frame, the current frame image is in the video. The first frame of the image. If it is detected that the current frame image is not an IDR frame, the detecting module 10 detects an image division manner in the image encoding of the previous frame, that is, a first division manner.
划分模块20,设置为对当前帧图像采用第二划分方式进行划分,第二划分方式不同于第一划分方式。The dividing module 20 is configured to divide the current frame image by using a second dividing manner, and the second dividing manner is different from the first dividing manner.
具体地,当检测模块10检测到视频中当前帧图像的上一帧图像划分方式后,划分模块20对视频中当前帧图像进行划分,即采用第二划分方式进行划分;其中,第二划分方式要与第一划分方式不同,使得视频中相邻的帧图像 划分方式不同,这样通过动态的调整视频中帧图像每帧中间分割线的位置,使后一帧图像的中间分割线不与前一帧图像的中间分割线重合,避免了对视频中每一帧图像都采用相同的划分方式而出现的中间分割线叠加的现象,保证了视频的质量。Specifically, after the detection module 10 detects the previous frame image division mode of the current frame image in the video, the dividing module 20 divides the current frame image in the video, that is, divides by using the second division manner; wherein, the second division manner To be different from the first division method, so that adjacent frame images in the video The division mode is different, so that the position of the middle dividing line of each frame of the frame image in the video is dynamically adjusted, so that the middle dividing line of the image of the latter frame does not coincide with the middle dividing line of the image of the previous frame, thereby avoiding each frame in the video. The phenomenon that the images are superimposed by the same division mode and the intermediate dividing lines appear ensures the quality of the video.
在当前帧图像不是IDR帧的情况下,若定义IDR帧为第0帧,还可以检测当前需要编码的帧图像与IDR帧的帧距。如果帧距为偶数,则当前需要编码的帧图像可以采用与IDR帧相同的划分方式;如果当前需要编码的帧图像与IDR帧的帧距为奇数,可以采用与IDR帧图像不同的划分方式。这样,即使当前帧图像与IDR帧图像相邻,也不会使得当前帧图像与IDR帧图像的划分方式相同。根据当前需要编码的帧图像与IDR帧的帧距奇偶性,即使只采用两种帧图像的划分方式,也能避免视频中相邻两帧图像划分方式相同的情况。当然,帧图像的划分方式越多,越能避免对视频中每一帧图像都采用相同的划分方式而出现的中间分割线叠加的现象。另外,本发明还可以根据视频中帧图像编码时分配的帧编号frame_num来选择各帧图像所需采用的划分方式;其中,IDR帧的frame_num值为0,后续的帧图像的frame_num值为与IDR的帧距,这样可以有目的地对视频中需要编码的帧图像进行选择帧图像划分方式。In the case that the current frame image is not an IDR frame, if the IDR frame is defined as the 0th frame, the frame distance between the frame image currently required to be encoded and the IDR frame may also be detected. If the frame distance is an even number, the frame image currently required to be encoded may be in the same division manner as the IDR frame; if the frame distance between the currently required frame image and the IDR frame is an odd number, a different division manner from the IDR frame image may be adopted. Thus, even if the current frame image is adjacent to the IDR frame image, the current frame image and the IDR frame image are not divided in the same manner. According to the frame-to-parity of the currently-coded frame image and the IDR frame, even if only two frame images are divided, it is possible to avoid the case where the adjacent two frames of the video are equally divided. Of course, the more the division of the frame image, the more the phenomenon that the intermediate dividing line is superimposed on the same division mode for each frame of the video can be avoided. In addition, the present invention may also select a division manner required for each frame image according to the frame number frame_num allocated when the frame image is encoded in the video; wherein the frame_num value of the IDR frame is 0, and the frame_num value of the subsequent frame image and the IDR The frame spacing, so that the frame image of the frame to be encoded in the video can be purposefully selected.
可选地,对视频中帧图像的划分方式中,可以采用多种方式对编码的帧图像进行划分,如:水平划分方式和垂直划分方式,具体参见图3和图4。Optionally, in the manner of dividing the frame image in the video, the encoded frame image may be divided into multiple manners, such as a horizontal division manner and a vertical division manner. For details, refer to FIG. 3 and FIG. 4.
编码模块30,设置为对当前帧图像中经过划分后的子图像进行编码。The encoding module 30 is configured to encode the divided sub-images in the current frame image.
具体地,结合图2,将视频中的帧图像划分为4个部分,得到4个子图像:片0、片1、片2和片3。分别将片0、片1、片2和片3交给DSP1、DSP2、DSP3和DSP4进行同时并行编码处理。Specifically, in combination with FIG. 2, the frame image in the video is divided into four parts, and four sub-images are obtained: slice 0, slice 1, slice 2, and slice 3. Chip 0, slice 1, slice 2, and slice 3 are respectively handed over to DSP1, DSP2, DSP3, and DSP4 for simultaneous parallel encoding processing.
本发明第三实施例,如图6所示,一种视频编码终端,包括:A third embodiment of the present invention, as shown in FIG. 6, is a video encoding terminal, including:
处理器40,设置为在当前帧图像不是视频中第一帧图像的情况下,检测视频中上一帧图像的第一划分方式;对当前帧图像采用第二划分方式进行划分,第二划分方式不同于所述第一划分方式;对当前帧图像中经过划分后得到的子图像进行编码。 The processor 40 is configured to: when the current frame image is not the first frame image in the video, detect a first division manner of the previous frame image in the video; and divide the current frame image by using a second division manner, and the second division manner Different from the first division manner; encoding the sub-image obtained after division in the current frame image.
具体地,首先判断视频中当前需要进行编码的帧图像是不是IDR帧,由于视屏当中IDR帧为视频中的第一帧图像,如果检测到当前帧图像是IDR帧,则当前帧图像就是视频中的第一帧图像。如果检测到当前帧图像不是IDR帧,则检测上一帧图像编码中的图像划分方式,即第一划分方式。Specifically, it is first determined whether the frame image currently required to be encoded in the video is an IDR frame. Since the IDR frame in the video screen is the first frame image in the video, if the current frame image is detected as an IDR frame, the current frame image is in the video. The first frame of the image. If it is detected that the current frame image is not an IDR frame, the image division mode in the image coding of the previous frame is detected, that is, the first division mode.
当检测到视频中当前帧图像的上一帧图像划分方式后,对视频中当前帧图像进行划分,即按第二划分方式进行划分。其中,第二划分方式要与第一划分方式不同,使得视频中相邻的帧图像划分方式不同。这样,通过动态的调整视频中帧图像每帧中间分割线的位置,使后一帧图像的中间分割线不与前一帧图像的中间分割线重合,避免了对视频中每一帧图像都采用相同的划分方式而出现的中间分割线叠加的现象,保证了视频的质量。After detecting the previous frame image division mode of the current frame image in the video, the current frame image in the video is divided, that is, divided according to the second division manner. The second division mode is different from the first division manner, so that adjacent frame images in the video are divided in different manners. In this way, by dynamically adjusting the position of the intermediate dividing line of each frame of the frame image in the video, the middle dividing line of the latter frame image does not coincide with the middle dividing line of the previous frame image, thereby avoiding adopting each frame image in the video. The phenomenon of superposition of intermediate dividing lines appearing in the same division mode ensures the quality of the video.
本发明应用实施例:Application examples of the invention:
本应用实例采用型号为TCI6678的4个核完成格式为1080的视频数据编码,编码类型为IPPPPP,选取分辨率大小为1920×1080的“1080P_示例.yuv”序列作为测试序列,结合上述图1~图4,具体实施步骤如下:This application example uses the four cores of the model TCI6678 to complete the video data encoding of 1080 format, the encoding type is IPPPPP, and select the "1080P_example.yuv" sequence with the resolution of 1920×1080 as the test sequence, combined with the above figure 1. ~ Figure 4, the specific implementation steps are as follows:
步骤1、判断当前编码帧是否为IDR帧或偶数帧,即是否为2j帧,如果是则转入步骤2,如果不是则转入步骤3。 Step 1. Determine whether the current encoded frame is an IDR frame or an even frame, that is, whether it is a 2j frame. If yes, go to step 2. If not, go to step 3.
步骤2、将“1080P_示例.yuv”序列的2j帧图像在空间上划分为4个片,分别交由DSP0、DSP1、DSP2、DSP3四个核编码,每片图像大小相同。然后,转步骤4。Step 2: The 2j frame image of the "1080P_example.yuv" sequence is spatially divided into four slices, which are respectively coded by four cores of DSP0, DSP1, DSP2, and DSP3, and each image has the same size. Then, go to step 4.
步骤3、将“1080P_示例.yuv”序列的2j+1帧图像步骤2的基础上重新划分为4个片,水平分割线均下移一个宏块行,并分别由四个DSP核编码,参见图2。Step 3: The 2j+1 frame image of the "1080P_example.yuv" sequence is re-divided into 4 slices based on step 2, and the horizontal dividing lines are all shifted down by one macroblock row, and respectively coded by four DSP cores. See Figure 2.
步骤4、返回步骤1,继续下一帧编码。Step 4. Return to step 1 and continue the next frame encoding.
需要指出的是,本发明所有实施例中,视频中的帧图像和图像帧所指的是同一概念,并为本领域的技术人员所熟知。It should be noted that in all embodiments of the present invention, frame images and image frames in a video refer to the same concept and are well known to those skilled in the art.
综上所述,本发明实施例提供的视频编码方法及装置,在视频多核编码过程中对视频中的每一帧图像采用动态的分割方式,避免了相关技术中由于静态中间分割线的差异效果不断累加而影响视频编码质量的问题,可以得到 更佳的视频图像质量。In summary, the video encoding method and apparatus provided by the embodiments of the present invention use a dynamic segmentation mode for each frame of video in the video multi-core encoding process, thereby avoiding the difference effect of the static intermediate dividing line in the related art. The problem of constantly accumulating and affecting the quality of video coding can be obtained. Better video image quality.
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。One of ordinary skill in the art will appreciate that all or a portion of the steps of the above-described embodiments can be implemented using a computer program flow, which can be stored in a computer readable storage medium, such as on a corresponding hardware platform (eg, The system, device, device, device, etc. are executed, and when executed, include one or a combination of the steps of the method embodiments.
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Alternatively, all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve. Thus, the invention is not limited to any specific combination of hardware and software.
上述实施例中的各装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。The devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
上述实施例中的各装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. The above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求所述的保护范围为准。Variations or substitutions are readily conceivable within the scope of the present invention by those skilled in the art and are within the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the claims.
工业实用性Industrial applicability
本发明实施例提供的视频编码方法及装置,在视频多核编码过程中对视频中的每一帧图像采用动态的分割方式,可以避免相关技术中由于静态中间分割线的差异效果不断累加而影响视频编码质量的问题,以得到更佳的视频图像质量。 The video encoding method and device provided by the embodiments of the present invention use a dynamic segmentation mode for each frame of video in the video multi-core encoding process, which can avoid affecting the video due to the continuous accumulation of the difference of the static intermediate dividing line in the related art. Coding quality issues to get better video image quality.

Claims (14)

  1. 一种视频编码方法,应用于多核视频编码环境中,包括:A video coding method applied to a multi-core video coding environment, comprising:
    在当前帧图像不是视频中第一帧图像的情况下,检测所述视频中上一帧图像的第一划分方式;In a case where the current frame image is not the first frame image in the video, detecting a first division manner of the previous frame image in the video;
    对所述当前帧图像采用第二划分方式进行划分,所述第二划分方式不同于所述第一划分方式;And dividing the current frame image by using a second dividing manner, where the second dividing manner is different from the first dividing manner;
    对所述当前帧图像经过划分后得到的子图像进行编码。Sub-images obtained by dividing the current frame image are encoded.
  2. 根据权利要求1所述的视频编码方法,其中,The video encoding method according to claim 1, wherein
    所述第二划分方式不同于所述第一划分方式,包括:针对视频中的图像帧进行划分时的划分位置不同。The second division manner is different from the first division manner, and includes: a division position when the image frame in the video is divided.
  3. 根据权利要求2所述的视频编码方法,其中,所述第二划分方式不同于所述第一划分方式,还包括:划分出的子图像的个数不同。The video encoding method according to claim 2, wherein the second dividing manner is different from the first dividing manner, and further comprising: the number of divided sub-images is different.
  4. 根据权利要求1所述的视频编码方法,其中,所述第一划分方式和第二划分方式均包括:将视频中的图像帧划分为至少两个子图像。The video encoding method according to claim 1, wherein the first dividing manner and the second dividing manner each comprise: dividing an image frame in the video into at least two sub-images.
  5. 根据权利要求4所述的,其中,所述将视频中的图像帧划分为至少两个子图像,包括:The method according to claim 4, wherein the dividing the image frame in the video into at least two sub-images comprises:
    将所述视频中的图像帧水平划分为至少两个子图像;Dividing the image frame in the video horizontally into at least two sub-images;
    或者,将所述视频中的图像帧垂直划分为至少两个子图像。Alternatively, the image frames in the video are vertically divided into at least two sub-images.
  6. 根据权利要求4或5所述的视频编码方法,其中,划分得到的各子图像大小相同。The video encoding method according to claim 4 or 5, wherein each of the divided sub-images has the same size.
  7. 一种视频编码装置,包括:A video encoding device comprising:
    检测模块,设置为在当前帧图像不是视频中第一帧图像的情况下,检测所述视频中上一帧图像的第一划分方式;a detecting module, configured to detect a first dividing manner of a previous frame image in the video if the current frame image is not the first frame image in the video;
    划分模块,设置为对所述当前帧图像采用第二划分方式进行划分,所述第二划分方式不同于所述第一划分方式;a dividing module, configured to divide the current frame image by using a second dividing manner, where the second dividing manner is different from the first dividing manner;
    编码模块,设置为对所述当前帧图像经过划分后得到的子图像进行编码。 The encoding module is configured to encode the sub-image obtained by dividing the current frame image.
  8. 根据权利要求7所述的装置,其中,The apparatus according to claim 7, wherein
    所述第二划分方式不同于所述第一划分方式,包括:针对视频中的图像帧进行划分时的划分位置不同。The second division manner is different from the first division manner, and includes: a division position when the image frame in the video is divided.
  9. 根据权利要求1所述的装置,其中,所述第一划分方式和第二划分方式均包括:将视频中的图像帧划分为至少两个子图像。The apparatus of claim 1, wherein the first division manner and the second division manner each comprise dividing an image frame in the video into at least two sub-images.
  10. 根据权利要求9所述的装置,所述将视频中的图像帧划分为至少两个子图像,包括:The apparatus according to claim 9, wherein dividing the image frame in the video into at least two sub-images comprises:
    将所述视频中的图像帧水平划分为至少两个子图像;Dividing the image frame in the video horizontally into at least two sub-images;
    或者,将所述视频中的图像帧垂直划分为至少两个子图像。Alternatively, the image frames in the video are vertically divided into at least two sub-images.
  11. 根据权利要求9或10所述的装置,其中,划分得到的各子图像大小相同。The apparatus according to claim 9 or 10, wherein each of the divided sub-images has the same size.
  12. 一种视频编码终端,包括:A video encoding terminal comprising:
    处理器,设置为在当前帧图像不是视频中第一帧图像的情况下,检测所述视频中上一帧图像的第一划分方式;对所述当前帧图像采用第二划分方式进行划分,所述第二划分方式不同于所述第一划分方式;对所述当前帧图像经过划分后得到的子图像进行编码。a processor, configured to detect a first division manner of a previous frame image in the video when the current frame image is not the first frame image in the video; and divide the current frame image by using a second division manner, where The second division manner is different from the first division manner; and the sub-image obtained by dividing the current frame image is encoded.
  13. 一种计算机程序,包括程序指令,当该程序指令被视频编码设备执行时,使得该设备可执行权利要求1-6任一项的方法。A computer program comprising program instructions which, when executed by a video encoding device, cause the apparatus to perform the method of any of claims 1-6.
  14. 一种载有权利要求13所述计算机程序的载体。 A carrier carrying the computer program of claim 13.
PCT/CN2014/091932 2014-06-25 2014-11-21 Video encoding method and device WO2015196718A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410290471.0A CN105208381A (en) 2014-06-25 2014-06-25 Video coding method and apparatus
CN201410290471.0 2014-06-25

Publications (1)

Publication Number Publication Date
WO2015196718A1 true WO2015196718A1 (en) 2015-12-30

Family

ID=54936644

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/091932 WO2015196718A1 (en) 2014-06-25 2014-11-21 Video encoding method and device

Country Status (2)

Country Link
CN (1) CN105208381A (en)
WO (1) WO2015196718A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109146916B (en) * 2018-08-22 2021-02-02 浙江大华技术股份有限公司 Moving object tracking method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101267564A (en) * 2008-04-16 2008-09-17 中国科学院计算技术研究所 A multi-processor video coding chip device and method
CN101282478A (en) * 2008-04-24 2008-10-08 上海华平信息技术股份有限公司 Method and system for implementing parallel encoding of high-definition video
CN101583041A (en) * 2009-06-18 2009-11-18 中兴通讯股份有限公司 Image filtering method of multi-core image encoding processing equipment and equipment
CN102215395A (en) * 2010-04-09 2011-10-12 华为技术有限公司 Video coding and decoding method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008109637A (en) * 2006-09-25 2008-05-08 Toshiba Corp Motion picture encoding apparatus and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101267564A (en) * 2008-04-16 2008-09-17 中国科学院计算技术研究所 A multi-processor video coding chip device and method
CN101282478A (en) * 2008-04-24 2008-10-08 上海华平信息技术股份有限公司 Method and system for implementing parallel encoding of high-definition video
CN101583041A (en) * 2009-06-18 2009-11-18 中兴通讯股份有限公司 Image filtering method of multi-core image encoding processing equipment and equipment
CN102215395A (en) * 2010-04-09 2011-10-12 华为技术有限公司 Video coding and decoding method and device

Also Published As

Publication number Publication date
CN105208381A (en) 2015-12-30

Similar Documents

Publication Publication Date Title
US10405009B2 (en) Generating videos with multiple viewpoints
CN103310820B (en) A kind of method that multimedia player is optimized
CN103621102B (en) Method, device and system for synchronization of audio and video
CN108063976B (en) Video processing method and device
CN110868625A (en) Video playing method and device, electronic equipment and storage medium
US10819994B2 (en) Image encoding and decoding methods and devices thereof
CN104284098B (en) The processing method and system of video data
US20230144483A1 (en) Method for encoding video data, device, and storage medium
CN107155093B (en) Video preview method, device and equipment
WO2021036795A1 (en) Video super-resolution processing method and device
CN107241598A (en) A kind of GPU coding/decoding methods for multichannel h.264 video conference
CN103108160B (en) Monitor video data capture method, server and terminal
US20190327481A1 (en) Intra-prediction video coding method and device
WO2017101350A1 (en) Variable-resolution encoding mode prediction method and device
WO2019156819A1 (en) Method and apparatus for processing and distributing live virtual reality content
US8090028B2 (en) Video deblocking memory utilization
KR101625910B1 (en) Method and device for image processing by image division
CN105472203A (en) Genlock system and method
US20170155967A1 (en) Method and apparatus for facilitaing live virtual reality streaming
WO2015196718A1 (en) Video encoding method and device
WO2016054889A1 (en) Image dynamic range adjustment method, terminal, and storage media
CN115665493A (en) Large screen splicing device supporting recording and playing, splicer, playing control method and system
KR20160008011A (en) Apparatus for Processing super resolution image
CN104519360B (en) A kind of compression method based on HEVC
CN103139610A (en) Method and device of cluster video synchronized broadcast

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14895816

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14895816

Country of ref document: EP

Kind code of ref document: A1