Video encoding/decoding method and device, method for video coding and device

文档序号:1759081 发布日期:2019-11-29 浏览:21次 中文

阅读说明:本技术 视频解码方法及装置,视频编码方法及装置 (Video encoding/decoding method and device, method for video coding and device ) 是由 高欣玮 李蔚然 谷沉沉 于 2019-09-27 设计创作,主要内容包括:本发明公开了一种视频解码方法及装置,视频编码方法及装置。其中,该方法包括:获取待解码视频帧,其中,待解码视频帧被划分为多个区域;为多个区域中的每个区域分别确定一个对应的分辨率,得到多个分辨率,其中,多个分辨率包括至少两个不同的分辨率;采用多个分辨率中对应的分辨率对多个区域中的每个区域上的视频块进行解码,其中,待解码视频帧被划分为多个视频块。本发明解决了相关技术中采用相同分辨率对视频进行编解码导致峰值信噪比波动较大的技术问题。(The invention discloses a kind of video encoding/decoding method and device, method for video coding and device.Wherein, this method comprises: obtaining video frame to be decoded, wherein video frame to be decoded is divided into multiple regions;A corresponding resolution ratio is determined respectively for each region in multiple regions, obtains multiple resolution ratio, wherein multiple resolution ratio include at least two different resolution ratio;The video block on each region in multiple regions is decoded using corresponding resolution ratio in multiple resolution ratio, wherein video frame to be decoded is divided into multiple video blocks.The present invention solves causes Y-PSNR to fluctuate larger technical problem video progress encoding and decoding using equal resolution in the related technology.)

1. a kind of video encoding/decoding method characterized by comprising

Obtain video frame to be decoded, wherein the video frame to be decoded is divided into multiple regions;

A corresponding resolution ratio is determined respectively for each region in the multiple region, obtains multiple resolution ratio, wherein institute Stating multiple resolution ratio includes at least two different resolution ratio;

The video block on each region in the multiple region is carried out using corresponding resolution ratio in the multiple resolution ratio Decoding, wherein the video frame to be decoded is divided into multiple video blocks.

2. the method according to claim 1, wherein the video frame to be decoded is divided into multiple regions packet It includes:

The multiple region is to be divided to obtain to the video frame to be decoded based on predetermined video encoding and decoding standard The multiple video block;Alternatively,

The multiple region is in response to divide the video frame to be decoded in the region division instruction of the input got It obtains.

3. the method according to claim 1, wherein it is described for each region difference in the multiple region it is true A fixed corresponding resolution ratio, comprising:

Not exactly the same resolution ratio is determined for the different zones in the multiple region.

4. the method according to claim 1, wherein determining one respectively for each region in the multiple region A corresponding resolution ratio includes:

Syntactic element is obtained from the video frame to be decoded;

From institute's syntax elements obtain flag bit data, wherein the flag bit data for identify the multiple region and Corresponding relationship between the multiple resolution ratio.

5. a kind of method for video coding characterized by comprising

Obtain video frame to be encoded, wherein the video frame to be encoded is divided into multiple regions;

A corresponding resolution ratio is determined respectively for each region in the multiple region, obtains multiple resolution ratio, wherein institute Stating multiple resolution ratio includes at least two different resolution ratio;

The video block on each region in the multiple region is carried out using corresponding resolution ratio in the multiple resolution ratio Coding, wherein the video frame to be encoded is divided into multiple video blocks.

6. according to the method described in claim 5, it is characterized in that, being determined respectively for each region in the multiple region Before one corresponding resolution ratio, the method also includes:

The video frame to be encoded is divided into the multiple video block based on predetermined video encoding and decoding standard;Alternatively,

The video frame to be encoded is divided into described by the region division instruction for obtaining input in response to region division instruction Multiple regions.

7. according to the method described in claim 6, it is characterized in that, in the region division instruction for obtaining input, in response to described It is described in the multiple region in the case that the video frame to be encoded is divided into the multiple region by region division instruction Each region respectively determine a corresponding resolution ratio, comprising:

Obtain the resolution ratio determine instruction of input, wherein it is right that the resolution ratio determine instruction is used to indicate each region institute The resolution ratio answered;

Resolution ratio indicated by the resolution ratio determine instruction is determined as to a corresponding resolution ratio in each region.

8. according to the method described in claim 5, it is characterized in that, it is described for each region difference in the multiple region it is true A fixed corresponding resolution ratio, comprising:

Not exactly the same resolution ratio is determined for the different zones in the multiple region.

9. according to the method described in claim 5, it is characterized in that, using corresponding resolution ratio in the multiple resolution ratio to institute It states each region in multiple regions and encode and include:

The video block on each region in the multiple region is carried out using corresponding resolution ratio in the multiple resolution ratio Coding, obtains coded data;

Determine the corresponding flag bit data of the coded data, wherein the flag bit data are for identifying the multiple area Corresponding relationship between domain and the multiple resolution ratio;

It is added in the coded data using the flag bit data as syntactic element, obtains encoded video frame.

10. a kind of video decoder characterized by comprising

First obtains module, for obtaining video frame to be decoded, wherein the video frame to be decoded is divided into multiple regions;

First determining module is obtained for determining a corresponding resolution ratio respectively for each region in the multiple region Multiple resolution ratio, wherein the multiple resolution ratio includes at least two different resolution ratio;

Decoder module, for corresponding resolution ratio in the multiple resolution ratio of use to each region in the multiple region Video block be decoded, wherein the video frame to be decoded is divided into multiple video blocks.

11. the apparatus according to claim 1, which is characterized in that first determining module, comprising:

First determination unit, for determining not exactly the same resolution ratio for the different zones in the multiple region.

12. the apparatus according to claim 1, which is characterized in that first determining module includes:

Second determination unit, for obtaining syntactic element from the video frame to be decoded;

First acquisition unit, for obtaining flag bit data from institute's syntax elements, wherein the flag bit data are for marking Know the corresponding relationship between the multiple region and the multiple resolution ratio.

13. a kind of video coding apparatus characterized by comprising

Second obtains module, for obtaining video frame to be encoded, wherein the video frame to be encoded is divided into multiple regions;

Second determining module is obtained for determining a corresponding resolution ratio respectively for each region in the multiple region Multiple resolution ratio, wherein the multiple resolution ratio includes at least two different resolution ratio;

Coding module, for corresponding resolution ratio in the multiple resolution ratio of use to each region in the multiple region Video block encoded, wherein the video frame to be encoded is divided into multiple video blocks.

14. a kind of storage medium, which is characterized in that be stored with computer program in the storage medium, wherein the computer Program is arranged to execute method described in any one of claim 1 to 9 when operation.

15. a kind of electronic device, including memory and processor, which is characterized in that be stored with computer journey in the memory Sequence, the processor are arranged to execute side described in any one of claim 1 to 9 by the computer program Method.

Technical field

The present invention relates to computer fields, in particular to a kind of video encoding/decoding method and device, method for video coding And device.

Background technique

In existing video coding process, as shown in Figure 1, if all being used for the different masses in the frame in video High-resolution is encoded, then the bandwidth of transmission smaller (for example, being less than bandwidth threshold Th shown in Fig. 1) the case where Under, corresponding Y-PSNR PSNR1 is wanted when being encoded for the different masses in the frame in video using high-resolution Lower than corresponding Y-PSNR PSNR2 when being encoded for the different masses in the frame in video using low resolution, That is, Y-PSNR PSNR1 when being encoded when transmission bandwidth is smaller using high-resolution is relatively small, distortion It is relatively large.

Similarly, it encodes, is transmitting if all using low resolution for the different masses in the frame in video Bandwidth bigger (for example, be greater than Fig. 1 shown in bandwidth threshold Th) in the case where, for the difference in the frame in video Block Y-PSNR PSNR3 corresponding when being encoded using low resolution will be lower than for the difference in the frame in video Block Y-PSNR PSNR4 corresponding when being encoded using high-resolution, that is to say, that used when transmission bandwidth is larger Y-PSNR PSNR3 when low resolution is encoded is relatively small, is distorted relatively large.

In addition, for the different masses in the different frame or same frame in different types of video or same video, on Stating intersection point D can move, so that it is difficult to increase the selection for selecting which kind of resolution ratio to encode the frame in video in the prior art Degree.

For above-mentioned problem, currently no effective solution has been proposed.

Summary of the invention

The embodiment of the invention provides a kind of video encoding/decoding method and device, method for video coding and device, at least to solve Certainly carrying out encoding and decoding to video using equal resolution in the related technology causes Y-PSNR to fluctuate larger technical problem.

According to an aspect of an embodiment of the present invention, a kind of video encoding/decoding method is provided, comprising:

Obtain video frame to be decoded, wherein the video frame to be decoded is divided into multiple regions;

A corresponding resolution ratio is determined respectively for each region in the multiple region, obtains multiple resolution ratio, In, the multiple resolution ratio includes at least two different resolution ratio;

Using corresponding resolution ratio in the multiple resolution ratio to the video block on each region in the multiple region It is decoded, wherein the video frame to be decoded is divided into multiple video blocks.

According to another aspect of an embodiment of the present invention, a kind of method for video coding is additionally provided, comprising:

Obtain video frame to be encoded, wherein the video frame to be encoded is divided into multiple regions;

A corresponding resolution ratio is determined respectively for each region in the multiple region, obtains multiple resolution ratio, In, the multiple resolution ratio includes at least two different resolution ratio;

Using corresponding resolution ratio in the multiple resolution ratio to the video block on each region in the multiple region It is encoded, wherein the video frame to be encoded is divided into multiple video blocks.

According to another aspect of an embodiment of the present invention, a kind of video decoder is additionally provided, comprising:

First obtains module, for obtaining video frame to be decoded, wherein the video frame to be decoded is divided into multiple areas Domain;

First determining module, for determining a corresponding resolution ratio respectively for each region in the multiple region, Obtain multiple resolution ratio, wherein the multiple resolution ratio includes at least two different resolution ratio;

Decoder module, for corresponding resolution ratio in the multiple resolution ratio of use to each area in the multiple region Video block on domain is decoded, wherein the video frame to be decoded is divided into multiple video blocks.

Optionally, the multiple region be based on predetermined video encoding and decoding standard to the video frame to be decoded into Row divides obtained the multiple video block;Alternatively,

The multiple region is in response to carry out the video frame to be decoded in the region division instruction of the input got What division obtained.

Optionally, first determining module, comprising:

First determination unit, for determining not exactly the same resolution ratio for the different zones in the multiple region.

Optionally, first determining module includes:

Second determination unit, for obtaining syntactic element from the video frame to be decoded;

First acquisition unit, for obtaining flag bit data from institute's syntax elements, wherein the flag bit data are used Corresponding relationship between the multiple region of mark and the multiple resolution ratio.

According to another aspect of an embodiment of the present invention, a kind of video coding apparatus is additionally provided, comprising:

Second obtains module, for obtaining video frame to be encoded, wherein the video frame to be encoded is divided into multiple areas Domain;

Second determining module, for determining a corresponding resolution ratio respectively for each region in the multiple region, Obtain multiple resolution ratio, wherein the multiple resolution ratio includes at least two different resolution ratio;

Coding module, for corresponding resolution ratio in the multiple resolution ratio of use to each area in the multiple region Video block on domain is encoded, wherein the video frame to be encoded is divided into multiple video blocks.

Optionally, described device further include:

Division unit, for determining a corresponding resolution ratio respectively in each region in the multiple region Before, the video frame to be encoded is divided by the multiple video block based on predetermined video encoding and decoding standard;Alternatively,

Second acquisition unit will be described in response to region division instruction for obtaining the region division instruction of input Video frame to be encoded is divided into the multiple region.

Optionally, second determining module, comprising:

Third acquiring unit, for obtaining the resolution ratio determine instruction of input, wherein the resolution ratio determine instruction is used for Indicate resolution ratio corresponding to each region;

Third determination unit, for resolution ratio indicated by the resolution ratio determine instruction to be determined as each region A corresponding resolution ratio.

Optionally, second determining module, comprising:

4th determination unit, for determining not exactly the same resolution ratio for the different zones in the multiple region.

Optionally, coding module includes:

Coding unit, for corresponding resolution ratio in the multiple resolution ratio of use to each area in the multiple region Video block on domain is encoded, and coded data is obtained;

5th determination unit, for determining the corresponding flag bit data of the coded data, wherein the mark digit According to for identifying the corresponding relationship between the multiple region and the multiple resolution ratio;

Adding unit is obtained for being added in the coded data using the flag bit data as syntactic element Encoded video frame.

In embodiments of the present invention, using acquisition video frame to be decoded, wherein video frame to be decoded is divided into multiple areas Domain;A corresponding resolution ratio is determined respectively for each region in multiple regions, obtains multiple resolution ratio, wherein Duo Gefen Resolution includes at least two different resolution ratio;Using corresponding resolution ratio in multiple resolution ratio to each area in multiple regions Video block on domain is decoded, wherein video frame to be decoded is divided into the mode of multiple video blocks, for one in video Different block adaptives in frame are encoded using corresponding resolution ratio, in this way situation either smaller in the bandwidth of transmission Under, or in the case where the bandwidth of transmission is bigger, corresponding Y-PSNR is all relatively large, and distortion is relatively small, from And ensure that Y-PSNR can change in a lesser range, and Y-PSNR is all relatively large, thus real Show and the Y-PSNR for carrying out encoding and decoding to video is avoided to fluctuate biggish technical effect, and then has solved and adopt in the related technology Carrying out encoding and decoding to video with equal resolution causes Y-PSNR to fluctuate larger technical problem.

Detailed description of the invention

The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:

Fig. 1 is the schematic diagram of the Y-PSNR of code encoding/decoding mode in the related technology;

Fig. 2 is a kind of schematic diagram of optional video encoding/decoding method according to an embodiment of the present invention;

Fig. 3 is a kind of application environment schematic diagram of optional video encoding/decoding method according to an embodiment of the present invention;

Fig. 4 is a kind of schematic diagram one of optional video encoding/decoding method of optional embodiment according to the present invention;

Fig. 5 is a kind of schematic diagram two of optional video encoding/decoding method of optional embodiment according to the present invention;

Fig. 6 is a kind of schematic diagram of optional video encoding/decoding method according to an embodiment of the present invention;

Fig. 7 is a kind of application environment schematic diagram of optional video encoding/decoding method according to an embodiment of the present invention;

Fig. 8 is a kind of schematic diagram of optional video decoder according to an embodiment of the present invention;

Fig. 9 is a kind of schematic diagram of optional video coding apparatus according to an embodiment of the present invention;

Figure 10 is a kind of application scenarios schematic diagram one of optional video coding-decoding method according to an embodiment of the present invention;

Figure 11 is a kind of application scenarios schematic diagram two of optional video coding-decoding method according to an embodiment of the present invention;With And

Figure 12 is a kind of schematic diagram of optional electronic device according to an embodiment of the present invention.

Specific embodiment

In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work It encloses.

It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, " Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product Or other step or units that equipment is intrinsic.

According to an aspect of an embodiment of the present invention, a kind of video encoding/decoding method is provided, as shown in Fig. 2, this method packet It includes:

S202 obtains video frame to be decoded, wherein the video frame to be decoded is divided into multiple regions;

S204 is that each region in the multiple region determines a corresponding resolution ratio respectively, obtains multiple resolutions Rate, wherein the multiple resolution ratio includes at least two different resolution ratio;

S206, using corresponding resolution ratio in the multiple resolution ratio to the view on each region in the multiple region Frequency block is decoded, wherein the video frame to be decoded is divided into multiple video blocks.

Optionally, in the present embodiment, above-mentioned video encoding/decoding method can be applied to 302 He of server as shown in Figure 3 In the hardware environment that client 304 is constituted.As shown in figure 3, server 302 obtains video frame to be decoded, wherein view to be decoded Frequency frame is divided into multiple regions;A corresponding resolution ratio is determined respectively for each region in multiple regions, is obtained multiple Resolution ratio, wherein multiple resolution ratio include at least two different resolution ratio;Using corresponding resolution ratio pair in multiple resolution ratio The video block on each region in multiple regions is decoded, wherein video frame to be decoded is divided into multiple video blocks.Clothes The video obtained after decoding is sent to client 304 and played out by business device 302.

Optionally, in the present embodiment, above-mentioned video encoding/decoding method can be, but not limited to the field for being applied to audio-video processing Jing Zhong.Such as: customer end A and customer end B carry out video calling, and customer end A side and customer end B side acquire video pictures respectively, Collected video pictures are encoded, the video after coding is sent to other side, the video received is carried out in other side Decoding, and the video after broadcast decoder.

Optionally, in the present embodiment, above-mentioned video encoding/decoding method can with but be not limited to broadcasting applied to video file It puts, in the scenes such as net cast.

Wherein, above-mentioned client can be, but not limited to as various types of applications, for example, online education application, Instant Messenger Interrogate application, community space application, game application, shopping application, browser application, financial application, multimedia application, live streaming application Deng.Specifically, can be, but not limited in the scene for being applied to handle audio-video in above-mentioned instant messaging application, or also It can be, but not limited in the scene for being applied to handle audio-video in above-mentioned multimedia application, carried out to avoid to video The Y-PSNR fluctuation of encoding and decoding is larger.Above-mentioned is only a kind of example, does not do any restriction to this in the present embodiment.

Optionally, in the present embodiment, multiple regions included by video frame to be decoded are at least different using two What resolution ratio was decoded.

Optionally, in the present embodiment, video frame to be decoded is divided into multiple video blocks, and the multiple regions of division can be with Be it is corresponding with multiple video blocks, be also possible to not corresponding.Decoded resolution ratio can be determined according to the region of division, then press Video frame is decoded according to the video block of division, when decoding, used resolution ratio was that the region institute that the video block is fallen into is right The resolution ratio answered.

In an optional embodiment, as shown in figure 4, getting video frame to be decoded, wherein video frame to be decoded It is divided into multiple regions, comprising: region 1, region 2, region 3 and region 4 can determine that the corresponding resolution ratio in region 1 is Resolution ratio 1, the corresponding resolution ratio in region 2 are resolution ratio 2, and the corresponding resolution ratio in region 3 is resolution ratio 2, the corresponding resolution in region 4 Rate is resolution ratio 1, is decoded, is decoded using resolution ratio 2 to region 2, using resolution ratio 2 to region 1 using resolution ratio 1 Region 3 is decoded, region 4 is decoded using resolution ratio 1.

As it can be seen that through the above steps, for the different block adaptives in the frame in video using corresponding resolution ratio into Row decoding, it is right so either in the case where the bandwidth of transmission is smaller, or in the case where the bandwidth of transmission is bigger The Y-PSNR answered is all relatively large, and distortion is relatively small, to ensure that Y-PSNR can be in a lesser model Interior variation is enclosed, and Y-PSNR is all relatively large, to realize the Y-PSNR for avoiding carrying out encoding and decoding to video Biggish technical effect is fluctuated, and then solves and equal resolution is used to lead to peak value to video progress encoding and decoding in the related technology Signal-to-noise ratio fluctuates larger technical problem.

As a kind of optional scheme, the video frame to be decoded is divided into multiple regions and includes:

S1, the multiple region are to be drawn based on predetermined video encoding and decoding standard to the video frame to be decoded The multiple video block got;Alternatively,

S2, the multiple region be in response in the input got region division instruction to the video frame to be decoded into Row division obtains.

Optionally, in the present embodiment, multiple regions can be, but not limited to using various division modes, such as: using mark The division mode of video block in quasi- agreement, binary tree, ternary tree, quaternary tree etc., each video block are a region, or Person can instruct the division mode of indicating area by the region division of input, such as: as shown in figure 5, by video call process In lesser video window be divided into a region, as region 1, biggish video window removes lesser video window in other words Part except mouthful is divided into a region, as region 2.

As a kind of optional scheme, each region in the multiple region determines one corresponding point respectively Resolution, comprising:

S1 determines not exactly the same resolution ratio for the different zones in the multiple region.

Optionally, in the present embodiment, the incomplete phase of resolution ratio determined for the different zones in above-mentioned multiple regions Together.That is, can be completely not identical for the resolution ratio that the different zones in above-mentioned multiple regions are determined, i.e., each region A resolution ratio is all corresponded to, each region is not identical.There may also be the identical situations of the corresponding resolution ratio of different zones, but Be multiple regions resolution ratio it is not all the same.Such as: the resolution ratio of each region can be from a resolution ratio in multiple regions Set in select, different resolution ratio can be selected from resolution ratio set for each region, or can choose Not exactly the same resolution ratio.

It is that each region in the multiple region determines a corresponding resolution respectively as a kind of optional scheme Rate includes:

S1 obtains syntactic element from the video frame to be decoded;

S2 obtains flag bit data from institute's syntax elements, wherein the flag bit data are the multiple for identifying Corresponding relationship between region and the multiple resolution ratio.

Optionally, in the present embodiment, the corresponding resolution ratio in each region can be, but not limited to be existed by coding side addition Decoding end is passed in syntactic element.By the flag bit data in syntactic element come pair between indicating area and resolution ratio It should be related to, so that the corresponding resolution ratio of decoding end using area is decoded it.

Optionally, in the present embodiment, the syntactic element for being used to indicate resolution ratio used by decoding each region can be with It is the one piece of data on the fixation position of video frame to be decoded, different data values represents different points on the position Resolution.It can will represent the syntactic element addition of the corresponding resolution ratio in region on the position.

Optionally, in the present embodiment, in the restructuring procedure of video, from current video frame to be decoded, determination is wanted At least a pair of of decoding region of reconstruct, wherein each pair of decoding region at least a pair of of decoding region includes using resolution ratio A The first decoding region and the second decoding region using resolution ratio B, the first decoding region and the second decoding region are that position is adjacent The decoding region connect;

The resolution ratio A of first decoding region is adjusted to target resolution, and the resolution ratio B of the second decoding region is adjusted For target resolution;

First edge pixel point set is determined from the first decoding region, and the second side is determined from the second decoding region Edge pixel point set, wherein the position of first edge pixel point set and the position of second edge pixel point set are adjacent;

First edge pixel point set is filtered, obtains filtered first edge pixel point set, and to second Edge pixel point set is filtered, and obtains filtered second edge pixel point set, wherein filtered first edge picture Vegetarian refreshments collection matches with filtered second edge pixel point set.

Filtered first edge pixel concentrates the pixel value and filtered second edge pixel of ith pixel point The first difference between the pixel value of j-th of pixel corresponding with ith pixel point is concentrated, first edge pixel point set is less than The pixel value and second edge pixel of middle ith pixel point concentrate the second difference between the pixel value of j-th of pixel, i For positive integer, and it is less than or equal to the sum that first edge pixel concentrates pixel, j is positive integer, and is less than or equal to the second side The sum of edge pixel concentration pixel.

Wherein, being adjusted to target resolution includes:

1) in the case where target resolution is equal to resolution ratio A, resolution ratio B is adjusted to resolution ratio A;

2) in the case where target resolution is equal to resolution ratio B, resolution ratio A is adjusted to resolution ratio B;

3) in the case where target resolution is equal to resolution ratio C, resolution ratio A is adjusted to resolution ratio C, and by resolution ratio B It is adjusted to resolution ratio C, wherein resolution ratio C is different from resolution ratio A, and different from resolution ratio B.

Resolution ratio after reunification, just can be with edge filter.By carrying out resolution adjustment to above-mentioned decoding region, and to solution The edge pixel point set determined in code region carries out edge filter processing, so that can be to avoid in video in restructuring procedure It is middle obvious seam occur, to guarantee accurately to restore the content in video, and then it is inconsistent caused to solve resolution ratio The technical issues of video distortion.

Other side according to an embodiment of the present invention provides a kind of method for video coding, as shown in fig. 6, this method Include:

S602 obtains video frame to be encoded, wherein the video frame to be encoded is divided into multiple regions;

S604 is that each region in the multiple region determines a corresponding resolution ratio respectively, obtains multiple resolutions Rate, wherein the multiple resolution ratio includes at least two different resolution ratio;

S606, using corresponding resolution ratio in the multiple resolution ratio to the view on each region in the multiple region Frequency block is encoded, wherein the video frame to be encoded is divided into multiple video blocks.

Optionally, in the present embodiment, above-mentioned method for video coding can be applied to server 702 as shown in Figure 7, clothes In the hardware environment that business device 302, client 704 and client 304 are constituted.As shown in fig. 7, server 702 gets client The video frame to be encoded of 704 acquisition of end, wherein video frame to be encoded is divided into multiple regions;For each of multiple regions Region determines a corresponding resolution ratio respectively, obtains multiple resolution ratio, wherein multiple resolution ratio include at least two different Resolution ratio;The video block on each region in multiple regions is encoded using corresponding resolution ratio in multiple resolution ratio, Wherein, video frame to be encoded is divided into multiple video blocks.The video obtained after coding is sent to server by server 702 302 are decoded.Decoded video is sent to client 304 and played out by server 302.

Optionally, in the present embodiment, above-mentioned method for video coding can be, but not limited to the field for being applied to audio-video processing Jing Zhong.Such as: customer end A and customer end B carry out video calling, and customer end A side and customer end B side acquire video pictures respectively, Collected video pictures are encoded, the video after coding is sent to other side, the video received is carried out in other side Decoding, and the video after broadcast decoder.

Optionally, in the present embodiment, above-mentioned method for video coding can with but be not limited to broadcasting applied to video file It puts, in the scenes such as net cast.

Wherein, above-mentioned client can be, but not limited to as various types of applications, for example, online education application, Instant Messenger Interrogate application, community space application, game application, shopping application, browser application, financial application, multimedia application, live streaming application Deng.Specifically, can be, but not limited in the scene for being applied to handle audio-video in above-mentioned instant messaging application, or also It can be, but not limited in the scene for being applied to handle audio-video in above-mentioned multimedia application, carried out to avoid to video The Y-PSNR fluctuation of encoding and decoding is larger.Above-mentioned is only a kind of example, does not do any restriction to this in the present embodiment.

Optionally, in the present embodiment, the different zones in video frame to be encoded are encoded using different resolution.Than Such as: video frame to be encoded is divided into 4 regions, is region 1, region 2, region 3 and region 4 respectively, wherein determine region 1 corresponding resolution ratio 1, the corresponding resolution ratio 2 in region 2 and region 3, the corresponding resolution ratio 3 in region 4 carry out region 1 using resolution ratio 1 Coding, is encoded region 2 and region 3 using resolution ratio 2, is encoded using resolution ratio 3 to region 4.

Optionally, in the present embodiment, it is at least treated using two different resolution ratio more included by encoded video frame A region is encoded.

Optionally, in the present embodiment, video frame to be encoded is divided into multiple video blocks, and the multiple regions of division can be with Be it is corresponding with multiple video blocks, be also possible to not corresponding.The resolution ratio of coding can be determined according to the region of division, then press Video frame is encoded according to the video block of division, when coding, used resolution ratio was that the region institute that the video block is fallen into is right The resolution ratio answered.

As it can be seen that through the above steps, for the different block adaptives in the frame in video using corresponding resolution ratio into Row coding, it is right so either in the case where the bandwidth of transmission is smaller, or in the case where the bandwidth of transmission is bigger The Y-PSNR answered is all relatively large, and distortion is relatively small, to ensure that Y-PSNR can be in a lesser model Interior variation is enclosed, and Y-PSNR is all relatively large, to realize the Y-PSNR for avoiding carrying out encoding and decoding to video Biggish technical effect is fluctuated, and then solves and equal resolution is used to lead to peak value to video progress encoding and decoding in the related technology Signal-to-noise ratio fluctuates larger technical problem.

As a kind of optional scheme, each region in the multiple region determine respectively one it is corresponding Before resolution ratio, the method also includes:

The video frame to be encoded is divided into the multiple video based on predetermined video encoding and decoding standard by S1 Block;Alternatively,

S2 obtains the region division instruction of input, draws the video frame to be encoded in response to region division instruction It is divided into the multiple region.

Optionally, in the present embodiment, multiple regions can be, but not limited to using various division modes, such as: using mark The division mode of video block in quasi- agreement, binary tree, ternary tree, quaternary tree etc., each video block are a region, or Person can instruct the division mode of indicating area by the region division of input.

As a kind of optional scheme, in the region division instruction for obtaining input, instructing in response to the region division will In the case that the video frame to be encoded is divided into the multiple region, each region difference in the multiple region Determine a corresponding resolution ratio, comprising:

S1 obtains the resolution ratio determine instruction of input, wherein the resolution ratio determine instruction is used to indicate each area Resolution ratio corresponding to domain;

Resolution ratio indicated by the resolution ratio determine instruction is determined as one corresponding point of each region by S2 Resolution.

Optionally, in the present embodiment, the corresponding resolution ratio in each region can be as indicated by resolution ratio determine instruction 's.Resolution ratio indicated by the resolution ratio determine instruction can be according to preset rules (such as: according to the position in region Set, the information such as feature determine) determine.

As a kind of optional scheme, each region in the multiple region determines one corresponding point respectively Resolution, comprising:

S1 determines not exactly the same resolution ratio for the different zones in the multiple region.

Optionally, in the present embodiment, the incomplete phase of resolution ratio determined for the different zones in above-mentioned multiple regions Together.That is, can be completely not identical for the resolution ratio that the different zones in above-mentioned multiple regions are determined, i.e., each region A resolution ratio is all corresponded to, each region is not identical.There may also be the identical situations of the corresponding resolution ratio of different zones, but Be multiple regions resolution ratio it is not all the same.Such as: the resolution ratio of each region can be from a resolution ratio in multiple regions Set in select, different resolution ratio can be selected from resolution ratio set for each region, or can choose Not exactly the same resolution ratio.

As a kind of optional scheme, using corresponding resolution ratio in the multiple resolution ratio in the multiple region Each region is encoded, comprising:

S1, using corresponding resolution ratio in the multiple resolution ratio to the video on each region in the multiple region Block is encoded, and coded data is obtained;

S2 determines the corresponding flag bit data of the coded data, wherein the flag bit data are described for identifying Corresponding relationship between multiple regions and the multiple resolution ratio;

S3 is added in the coded data using the flag bit data as syntactic element, obtains encoded video Frame.

Optionally, in the present embodiment, can by way of adding flag bit data to indicate each regional code when The resolution ratio used.Such as: video frame to be encoded is divided into 4 regions, is region 1, region 2, region 3 and region 4 respectively, Wherein, region 1 is encoded using resolution ratio 1, adds the syntactic element for indicating resolution ratio 1, region 2 and area for region 1 Domain 3 is encoded using resolution ratio 2, adds the syntactic element for indicating resolution ratio 2, region 4 respectively for region 2 and region 3 It is to be encoded using resolution ratio 3, adds the syntactic element for indicating resolution ratio 3 for region 4.

Optionally, in the present embodiment, the syntactic element for being used to indicate resolution ratio used by encoding each region can be with It is the one piece of data on the fixation position of video frame to be decoded, different data values represents different points on the position Resolution.It can will represent the syntactic element addition of the corresponding resolution ratio in region on the position.

It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because According to the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules is not necessarily of the invention It is necessary.

Other side according to an embodiment of the present invention additionally provides a kind of for implementing the view of above-mentioned video encoding/decoding method Frequency decoding apparatus, as shown in figure 8, the device includes:

First obtains module 82, for obtaining video frame to be decoded, wherein the video frame to be decoded is divided into multiple Region;

First determining module 84, for determining a corresponding resolution respectively for each region in the multiple region Rate obtains multiple resolution ratio, wherein the multiple resolution ratio includes at least two different resolution ratio;

Decoder module 86, for corresponding resolution ratio in the multiple resolution ratio of use to each of the multiple region Video block on region is decoded, wherein the video frame to be decoded is divided into multiple video blocks.

Optionally, the multiple region be based on predetermined video encoding and decoding standard to the video frame to be decoded into Row divides obtained the multiple video block;Alternatively,

The multiple region is in response to carry out the video frame to be decoded in the region division instruction of the input got What division obtained.

Optionally, first determining module, comprising:

First determination unit, for determining not exactly the same resolution ratio for the different zones in the multiple region.

Optionally, first determining module includes:

Second determination unit, for obtaining syntactic element from the video frame to be decoded;

First acquisition unit, for obtaining flag bit data from institute's syntax elements, wherein the flag bit data are used Corresponding relationship between the multiple region of mark and the multiple resolution ratio.

Other side according to an embodiment of the present invention additionally provides a kind of for implementing the view of above-mentioned method for video coding Frequency code device, as shown in figure 9, the device includes:

Second obtains module 92, for obtaining video frame to be encoded, wherein the video frame to be encoded is divided into multiple Region;

Second determining module 94, for determining a corresponding resolution respectively for each region in the multiple region Rate obtains multiple resolution ratio, wherein the multiple resolution ratio includes at least two different resolution ratio;

Coding module 96, for corresponding resolution ratio in the multiple resolution ratio of use to each of the multiple region Video block on region is encoded, wherein the video frame to be encoded is divided into multiple video blocks.

Optionally, described device further include:

Division unit, for determining a corresponding resolution ratio respectively in each region in the multiple region Before, the video frame to be encoded is divided by the multiple video block based on predetermined video encoding and decoding standard;Alternatively,

Second acquisition unit will be described in response to region division instruction for obtaining the region division instruction of input Video frame to be encoded is divided into the multiple region.

Optionally, second determining module, comprising:

Third acquiring unit, for obtaining the resolution ratio determine instruction of input, wherein the resolution ratio determine instruction is used for Indicate resolution ratio corresponding to each region;

Third determination unit, for resolution ratio indicated by the resolution ratio determine instruction to be determined as each region A corresponding resolution ratio.

Optionally, second determining module, comprising:

4th determination unit, for determining not exactly the same resolution ratio for the different zones in the multiple region.

Optionally, coding module includes:

Coding unit, for corresponding resolution ratio in the multiple resolution ratio of use to each area in the multiple region Video block on domain is encoded, and coded data is obtained;

5th determination unit, for determining the corresponding flag bit data of the coded data, wherein the mark digit According to for identifying the corresponding relationship between the multiple region and the multiple resolution ratio;

Adding unit is obtained for being added in the coded data using the flag bit data as syntactic element Encoded video frame.

The application environment of the embodiment of the present invention can be, but not limited to referring to the application environment in above-described embodiment, the present embodiment In this is repeated no more.The embodiment of the invention provides the optional tools of one kind of the connection method for implementing above-mentioned real time communication Body application example.

As a kind of optional embodiment, the method for above-mentioned coding and decoding video can be, but not limited to be applied to as shown in Figure 10 To video carry out encoding and decoding processing scene in.In video coding process in this scene, in the frame in video Different block adaptives encoded using different resolution ratio.Specifically, for being based on video encoding and decoding standard in a frame Or the different zones of artificial regular partition, select corresponding resolution ratio to be encoded respectively.

For t frame to be encoded in video, the region in t frame is drawn based on video encoding and decoding standard or artificial rule It is divided into different regions, as shown in Figure 10, region 1-7.Division mode in Fig. 2 is a kind of example, the embodiment of the present invention pair The number and shape in the region divided in one frame are without limitation.

Then, different zones are encoded respectively using different resolution.For example, for region 1, in resolution ratio set Resolution ratio 1, resolution ratio 2, determine in resolution ratio 3 block in region 1 encoded using resolution ratio 2.

As shown in figure 11, in video coding process of the invention, for the different block adaptives in the frame in video It is encoded using corresponding resolution ratio, it is either smaller (for example, being less than band shown in Figure 11 in the bandwidth of transmission in this way Wide threshold value Th) in the case where, or the feelings of the bandwidth bigger (for example, being greater than bandwidth threshold Th shown in Figure 11) in transmission Under condition, corresponding Y-PSNR is all relatively large, is distorted relatively small.

Further, since the different block adaptives in the frame in video are encoded using corresponding resolution ratio, from Without when being encoded to the frame in video according to different types of video or the different frame or same frame of same video Intersection point corresponding to middle different block (e.g., the intersection point in Fig. 1) selects corresponding resolution ratio, reduces encoder complexity.

Another aspect according to an embodiment of the present invention, additionally provide it is a kind of for implement above-mentioned method for video coding or The electronic device of video encoding/decoding method, as shown in figure 12, the electronic device include: at one or more (only showing one in figure) Device 1202, memory 1204, sensor 1206, encoder 1208 and transmitting device 1210 are managed, is stored with meter in the memory Calculation machine program, the processor are arranged to execute the step in any of the above-described embodiment of the method by computer program.

Optionally, in the present embodiment, above-mentioned electronic device can be located in multiple network equipments of computer network At least one network equipment.

Optionally, in the present embodiment, above-mentioned processor can be set to execute following steps by computer program:

S1 obtains video frame to be decoded, wherein the video frame to be decoded is divided into multiple regions;

S2 is that each region in the multiple region determines a corresponding resolution ratio respectively, obtains multiple resolution ratio, Wherein, the multiple resolution ratio includes at least two different resolution ratio;

S3, using corresponding resolution ratio in the multiple resolution ratio to the video on each region in the multiple region Block is decoded, wherein the video frame to be decoded is divided into multiple video blocks.

Optionally, it will appreciated by the skilled person that structure shown in Figure 12 is only to illustrate, electronic device can also To be smart phone (such as Android phone, iOS mobile phone), tablet computer, palm PC and mobile internet device The terminal devices such as (Mobile Internet Devices, MID), PAD.Figure 12 it does not make to the structure of above-mentioned electronic device At restriction.For example, electronic device may also include more or less component (such as network interface, display dress than shown in Figure 12 Set), or with the configuration different from shown in Figure 12.

Wherein, memory 1204 can be used for storing software program and module, such as the video decoding in the embodiment of the present invention Corresponding program instruction/the module of method and apparatus, the software program that processor 1202 is stored in memory 1204 by operation And module realizes the control method of above-mentioned target element thereby executing various function application and data processing.Storage Device 1204 may include high speed random access memory, can also include nonvolatile memory, as one or more magnetic storage fills It sets, flash memory or other non-volatile solid state memories.In some instances, memory 1204 can further comprise relative to The remotely located memory of processor 1202, these remote memories can pass through network connection to terminal.The reality of above-mentioned network Example includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.

Above-mentioned transmitting device 1210 is used to that data to be received or sent via a network.Above-mentioned network specific example It may include cable network and wireless network.In an example, transmitting device 1210 includes a network adapter (Network Interface Controller, NIC), can be connected by cable with other network equipments with router so as to interconnection Net or local area network are communicated.In an example, transmitting device 1210 is radio frequency (Radio Frequency, RF) module, For wirelessly being communicated with internet.

Wherein, specifically, memory 1204 is for storing application program.

The embodiments of the present invention also provide a kind of storage medium, computer program is stored in the storage medium, wherein The computer program is arranged to execute the step in any of the above-described embodiment of the method when operation.

Optionally, in the present embodiment, above-mentioned storage medium can be set to store by executing based on following steps Calculation machine program:

S1 obtains video frame to be decoded, wherein the video frame to be decoded is divided into multiple regions;

S2 is that each region in the multiple region determines a corresponding resolution ratio respectively, obtains multiple resolution ratio, Wherein, the multiple resolution ratio includes at least two different resolution ratio;

S3, using corresponding resolution ratio in the multiple resolution ratio to the video on each region in the multiple region Block is decoded, wherein the video frame to be decoded is divided into multiple video blocks.

Optionally, storage medium is also configured to store for executing step included in the method in above-described embodiment Computer program, this is repeated no more in the present embodiment.

Optionally, in the present embodiment, those of ordinary skill in the art will appreciate that in the various methods of above-described embodiment All or part of the steps be that the relevant hardware of terminal device can be instructed to complete by program, the program can store in In one computer readable storage medium, storage medium may include: flash disk, read-only memory (Read-Only Memory, ROM), random access device (Random Access Memory, RAM), disk or CD etc..

The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.

If the integrated unit in above-described embodiment is realized in the form of SFU software functional unit and as independent product When selling or using, it can store in above-mentioned computer-readable storage medium.Based on this understanding, skill of the invention Substantially all or part of the part that contributes to existing technology or the technical solution can be with soft in other words for art scheme The form of part product embodies, which is stored in a storage medium, including some instructions are used so that one Platform or multiple stage computers equipment (can be personal computer, server or network equipment etc.) execute each embodiment institute of the present invention State all or part of the steps of method.

In the above embodiment of the invention, it all emphasizes particularly on different fields to the description of each embodiment, does not have in some embodiment The part of detailed description, reference can be made to the related descriptions of other embodiments.

In several embodiments provided herein, it should be understood that disclosed client, it can be by others side Formula is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, and only one Kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or It is desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed it is mutual it Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of unit or module It connects, can be electrical or other forms.

The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.

It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.

The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered It is considered as protection scope of the present invention.

21页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:针对插入图像后图像集的编码结构调整方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类