WO2016154888A1 - 一种图像编码的方法及编码装置 - Google Patents

一种图像编码的方法及编码装置 Download PDF

Info

Publication number
WO2016154888A1
WO2016154888A1 PCT/CN2015/075485 CN2015075485W WO2016154888A1 WO 2016154888 A1 WO2016154888 A1 WO 2016154888A1 CN 2015075485 W CN2015075485 W CN 2015075485W WO 2016154888 A1 WO2016154888 A1 WO 2016154888A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame
area
encoding
source
refresh
Prior art date
Application number
PCT/CN2015/075485
Other languages
English (en)
French (fr)
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 深圳市大疆创新科技有限公司
Priority to PCT/CN2015/075485 priority Critical patent/WO2016154888A1/zh
Priority to CN201580002740.1A priority patent/CN105765973B/zh
Publication of WO2016154888A1 publication Critical patent/WO2016154888A1/zh
Priority to US15/720,627 priority patent/US10469855B2/en
Priority to US16/594,788 priority patent/US10715822B2/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
    • H04N19/20Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video object coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/107Selection of coding mode or of prediction mode between spatial and temporal predictive coding, e.g. picture refresh
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/174Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a slice, e.g. a line of blocks or a group of blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/177Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a group of pictures [GOP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • H04N19/192Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding the adaptation method, adaptation tool or adaptation type being iterative or recursive
    • H04N19/194Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding the adaptation method, adaptation tool or adaptation type being iterative or recursive involving only two passes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/40Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video transcoding, i.e. partial or full decoding of a coded input stream followed by re-encoding of the decoded output stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/507Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction using conditional replenishment

Definitions

  • the present invention relates to the field of image processing technologies, and in particular, to a method and an apparatus for encoding an image.
  • I frame block is striped into a plurality of P frames, and then each of the sub-I frames is continuously refreshed from top to bottom or left to right in the P frames until The I frame is completely refreshed.
  • continuous refresh operation is performed on multi-frame images, the image size of each frame can be made smooth, which is more suitable for real-time transmission, but it is prone to roll-rolling phenomenon.
  • the image is divided into several refresh areas, but they adjust the refresh order according to the global mv, which can prevent the error from rapidly spreading from the "dirty area" to the refresh area, so in theory, the refresh efficiency will be better than The first method is better, but since this method does not solve the problem of low efficiency of the I block, the problem of refresh flicker can still be clearly seen.
  • the problem of low compression efficiency of the I frame or the I block cannot be solved, and the image "breathing effect" can be easily seen whether the I frame is inserted or the P block I block is refreshed, and the user experience is better. low.
  • the invention provides a method and an encoding device for image coding, which can solve the problem of breathing effect generated by low-latency transmission of video under a fixed bandwidth.
  • a first aspect of the present invention provides a method of image encoding, including:
  • the updated P frame includes a new refresh area and a source area other than the new refresh area, the new refresh area and the new Reconstruct the image correspondence;
  • the image data in the source refreshing region performs the first encoding according to the P frame.
  • the performing, by the P frame, the source area is encoded a second time, specifically including one of the following steps:
  • the unrefreshed area is encoded a second time according to a P frame
  • the refreshed area is encoded a second time according to the P frame
  • the unrefreshed area and the refreshed area are respectively encoded a second time according to a P frame.
  • the N P frames are consecutive N P frames, and each of the P frames is performed.
  • the coding order of the first coding and the second coding is arranged from left to right according to P1, P2, ... PN;
  • Each of the P frames refers to the previous P when performing the first encoding on its own source refresh region. Completing the second refreshed new refresh region in the frame to obtain a reconstructed image corresponding to itself;
  • the updating the source refresh area to the reconstructed image to obtain the updated P frame includes:
  • the reconstructed image includes a plurality of macroblocks, and a parameter value corresponding to each macroblock in the source refresh region is assigned in units of macroblocks, so that the parameter value is
  • the source refresh area is updated to the reconstructed image, and a new refresh area is obtained to form an updated P frame.
  • the method further includes: performing the first coding and each of the P frames in sequence The second encoding.
  • each of the P frames includes N areas, except for the first P frame that is encoded,
  • the Nm area of the mth P frame is the same as the Nm area of the m-1th P frame, and the new refresh area of the mth area refers to the first part to the N-2 part of the m-1th P frame
  • the new refresh area is obtained, 2 ⁇ m ⁇ N.
  • each of the P frames includes multiple macroblocks, and the P-frames are sequentially Performing the first coding and the second coding, specifically:
  • the N P frames are sequentially refreshed from top to bottom or the macroblock column from left to right in a macroblock row until the I frame completes the refresh operation, wherein Each time the P frame is refreshed, the previous P frame of the P frame does not overlap or overlap at the boundary with the next P frame of the P frame.
  • the source coding area of the P frame is first encoded according to a P frame, specifically including :
  • each of the source refresh regions is first encoded in accordance with a P frame; and the QP is recorded with a primary quantization FirstQ, the QP being adjusted according to a required code rate for transmitting the P frame.
  • a second aspect of the present invention provides an encoding apparatus, including:
  • a processing unit configured to determine N P frames from a set of image sequences, respectively, from each of said P Determining the source refresh area in the frame;
  • a coding unit configured to perform the first coding on the source refresh region to obtain a reconstructed image corresponding to the source refresh region, where the N is a positive integer;
  • the processing unit is further configured to update the source refresh area to the reconstructed image to obtain an updated P frame;
  • the coding unit is further configured to perform the second coding on the updated P frame.
  • the updated P frame includes a new refresh area and a source area other than the new refresh area, the new refresh area and the Corresponding to the reconstructed image;
  • the coding unit is specifically configured to:
  • the source region is encoded a second time in accordance with a P frame.
  • the coding unit specifically performs one of the following steps:
  • the unrefreshed area is encoded a second time according to a P frame
  • the refreshed area is encoded a second time according to the P frame
  • the unrefreshed area and the refreshed area are respectively encoded a second time according to a P frame.
  • the N P frames are consecutive N P frames, and each of the P frames performs the foregoing
  • the coding order of the first coding and the second coding is arranged from left to right according to P1, P2, ... PN;
  • the coding unit is further specifically configured to:
  • Each of the P frames when performing the first encoding of the source refresh region of the first frame, completes the new refresh region of the second encoding in the previous P frame, and obtains a reconstructed image corresponding to itself;
  • the processing unit is further specifically configured to:
  • the reconstructed image includes a plurality of macroblocks, and a parameter value corresponding to each macroblock in the source refresh region is assigned in units of macroblocks, so that the parameter value is Source
  • the refresh area is updated to the reconstructed image to obtain a new refresh area to form an updated P frame.
  • the coding unit is further configured to:
  • the first encoding and the second encoding are performed for each of the P frames in sequence.
  • each of the P frames includes N regions, except for the first P frame to be encoded,
  • the Nm area of the m P frames is the same as the Nm area of the m-1th P frame, and the new refresh area of the mth area refers to the first part to the N-2 part of the m-1th P frame
  • the new refresh area is obtained, 2 ⁇ m ⁇ N.
  • each of the P frames includes a plurality of macroblocks, and the coding unit is further configured to:
  • the N P frames are sequentially refreshed from top to bottom or the macroblock column from left to right in a macroblock row until the I frame completes the refresh operation, wherein Each time the P frame is refreshed, the previous P frame of the P frame does not overlap or overlap at the boundary with the next P frame of the P frame.
  • the coding unit is further configured to:
  • each of the source refresh regions is first encoded in accordance with a P frame; and the QP is recorded with a primary quantization FirstQ, the QP being adjusted according to a required code rate for transmitting the P frame.
  • the source refresh region of the P frame is first encoded to obtain the reconstructed image, and then the source is refreshed.
  • the area is updated to the reconstructed image, and the updated P frame is obtained.
  • the updated P frame is encoded a second time, and the coding efficiency is optimized for each P frame twice, thereby improving the compression efficiency and the stability of the code rate.
  • FIG. 1 is a flowchart of a method for encoding an image according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of refreshing from top to bottom according to a macroblock row according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of refreshing from left to right according to a macroblock column according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of generating a reconstructed image according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of updating a source refresh region by using a reconstructed image according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of an encoding apparatus according to an embodiment of the present invention.
  • the terms “comprises” and “comprises” and “the” and “the” are intended to cover a non-exclusive inclusion, for example, a process, method, system, product, or device that comprises a series of steps or modules is not necessarily limited to Those steps or modules, but may include other steps or modules not explicitly listed or inherent to such processes, methods, products or devices, the division of the modules presented herein is merely a logical division. There may be additional divisions in the implementation of the actual application, for example, multiple modules may be combined or integrated into another system, or some features may be ignored, or not executed, and the displayed or discussed mutual coupling.
  • the direct coupling or the communication connection may be through some interfaces, and the indirect coupling or communication connection between the modules may be electrical or the like, which is not limited herein.
  • the module or the sub-module described as the separate component may or may not be physically separated, may not be a physical module, or may not be divided into a plurality of circuit modules, and may select a part thereof according to actual needs or All modules are used to achieve the objectives of the embodiments of the present invention.
  • the embodiment of the invention provides a method and an encoding device for image coding, which are mainly used in the technical field of image processing, and can solve the problem of breathing effect generated by low-latency transmission of video under a fixed bandwidth.
  • the I frame is an intra-coded image, and the macro within the same frame image can be spatially removed.
  • Redundancy between blocks that is, a compressed image that does not utilize the correlation between pixels between pictures, but utilizes correlation between pixels within a picture
  • P frames are forward predictive coded pictures that can be removed from time
  • the redundancy between the image frame and the frame that is, the compressed image using the correlation between the pixels between the pictures and the correlation between the pixels in the picture, the encoding efficiency of the P frame is higher than that of the I frame.
  • Macroblock A collection of pixels that constitute a two-dimensional rectangular area.
  • Quantization coefficient In video decoding, quantization, determining the quantized mapping relationship by QP, directly determines the code rate of image compression.
  • the H264 encoding device is used for intra prediction or inter prediction of the YUV image to implement spatial and temporal correlation compression, and may also be other encoding devices having similar functions.
  • the specific encoding device type is not limited herein. Since the two frames before or after or the adjacent pixels of the same image have similarity and correlation, the next frame image can be inferred by the current frame and a set of prediction coefficients, and the H264 encoding device can predictively encode the video signal.
  • the compression algorithm removes the redundancy between the video signals (ie, the correlation between the signals), and after removing the partial redundancy, the dynamic range of the video signal is reduced, that is, the compression purpose is achieved.
  • the low-latency transmission video is generally used, and the I frame compression efficiency is lower than that of the P frame, and the I frame needs to consume a higher code rate to maintain the compression effect of the P frame.
  • the present invention divides the I frame into stripes. The image is dispersed into a plurality of P frames, and then a refresh area is refreshed for each P frame, and the encoding is performed twice in the refresh to realize continuous refreshing of the multi-frame image, thereby ensuring that each frame image is stable.
  • the method for image coding provided by the embodiment of the present invention is described in detail below with reference to FIG. 1 , and the embodiment of the present invention includes:
  • Each P frame has the same size, and each P frame includes a source refresh area.
  • Step 102 Perform a first encoding on the source refresh region of the P frame, to obtain a reconstructed image corresponding to the source refresh region, where N is a positive integer;
  • the image can be effectively compressed by the first encoding.
  • Updating the source refresh area to the reconstructed image may improve the compression ratio when performing the second encoding in step 104, so that the code rate is more stable.
  • the updating process may specifically be: first obtaining parameter values of pixel points in each macroblock in the reconstructed image and the source refresh region, and then assigning values to pixel values of pixel points of each macroblock in the source refresh region to achieve The parameter values of the pixels in the source refresh area are updated to the parameter values of the pixels in the reconstructed image.
  • the second encoding of the P frame further improves the compression efficiency and is advantageous for transmission.
  • each P frame obtained after the dispersion is separately subjected to the first coding and the second coding (refer to step 102 to step 104) until all the P frames are refreshed. Complete the refresh of the entire frame.
  • the source refresh region is first encoded to obtain the reconstructed image, and then the source refresh region is updated to Reconstructing the image, obtaining the updated P frame, performing the second encoding on the updated P frame, and encoding the P frame twice, effectively improving the compression efficiency and the stability of the code rate, and solving the fixed The problem of respiratory effects generated by low-latency transmission of video under bandwidth.
  • the updated P frame includes a new refresh area and the new refresh area. a source area other than the new refresh area corresponding to the reconstructed image;
  • the source region is encoded a second time in accordance with a P frame.
  • the source area is encoded a second time according to a P frame, and specifically includes the following One of the steps:
  • the source area includes an unrefreshed area
  • the refreshed area is encoded a second time according to the P frame, that is, a P2 frame, a P3 frame, a Pn frame;
  • the unrefreshed area and the refreshed area are respectively coded for the second time according to the P frame, that is, the last Pn frame to be encoded.
  • the N P frames are consecutive, on the basis of the foregoing embodiment and the first or the second optional embodiment.
  • Each of the P frames performs the first encoding of the source refresh region of the self, and refers to the new refresh region of the second P frame in the previous P frame to obtain a reconstructed image corresponding to itself, as shown in FIG. 4 . ;
  • the updating the source refresh area to the reconstructed image to obtain the updated P frame includes:
  • the reconstructed image includes a plurality of macroblocks, and a parameter value corresponding to each macroblock in the source refresh region is assigned in units of macroblocks, so that the parameter value is
  • the source refresh area is updated to the reconstructed image, and a new refresh area is obtained to form an updated P frame. As shown in FIG. 5, P1" is the updated P1 frame.
  • the method further includes: sequentially The first encoding and the second encoding are performed for each of the P frames.
  • each of the P frames includes N, based on the foregoing embodiment corresponding to FIG. 1 and the first to fourth alternative embodiments.
  • the area, except for the first P frame to be encoded, the Nm area of the mth P frame is the same as the Nm area of the m-1th P frame, and the new refresh area of the mth area refers to the mth-
  • the new refresh area of the first part to the N-2 part of one P frame is obtained, 2 ⁇ m ⁇ N;
  • the image sequence includes 4 P frames, namely P1, P2, P3, and P4, by macroblock.
  • the source refresh area (shaded portion) of P1 in the figure is at 1/4, and the others are similar.
  • the order from top to bottom is shown in Fig. 3.
  • each of the P frames includes multiple macroblocks, and the sequentially Performing the first coding and the second coding in each of the P frames, specifically:
  • the N P frames are sequentially refreshed from top to bottom or the macroblock column from left to right in a macroblock row until the I frame completes the refresh operation.
  • the previous P frame of the P frame does not overlap or overlap at the boundary with the next P frame of the P frame.
  • the foregoing is performed according to the P frame pair, on the basis of the foregoing embodiment corresponding to FIG. 1 and the first to sixth alternative embodiments.
  • the source code of the P frame is encoded for the first time, and specifically includes:
  • each of the source refresh regions is first encoded according to a P frame; and the QP is recorded with a primary quantization FirstQ, and the QP is adjusted according to a required code rate for transmitting the P frame,
  • the QP is recorded by FirstQ, and the purpose is to use the current prediction mode as a reference for the next coded macroblock, and the QP value ranges from 0 to 51.
  • the QP used in the second coding is lower than the first coding.
  • the specific QP value can be adjusted and calculated according to the motion scene of the frame, which is not limited in this paper.
  • the I frame of the entire frame is performed on the basis of the foregoing embodiment corresponding to FIG. 1 and the first to seventh optional embodiments.
  • Decentralized into N P frames including:
  • the I frame of the entire frame is divided into averages and then dispersed in the N P frames, so that the plurality of source refresh regions corresponding to the I frame are dispersed into the N P frames.
  • One of the source refresh regions is included in the P frame.
  • the encoding device in this embodiment may be an encoder, such as an H264 encoder.
  • the specific encoder type is not limited herein.
  • FIG. 5, which is an embodiment of the present invention. include:
  • the processing unit 201 is configured to determine N P frames from a set of image sequences, and determine a source refresh region from each of the P frames respectively;
  • the encoding unit 202 is configured to perform the first encoding on the source refresh region to obtain a reconstructed image corresponding to the source refresh region, where the N is a positive integer;
  • the processing unit 201 is further configured to update the source refresh area to the reconstructed image to obtain an updated P frame.
  • the encoding unit 202 is further configured to perform the second encoding on the updated P frame.
  • the encoding unit 202 performs the first encoding on the source refresh region to obtain the reconstructed image, and then refreshes the source.
  • the area is updated to the reconstructed image, and the updated P frame is obtained, and the updated P frame is encoded a second time, and the compression efficiency and the code rate stability are effectively improved by encoding each P frame twice. Solve the problem of breathing effect caused by low-latency transmission of video at a fixed bandwidth.
  • the updated P frame includes a new refresh area and the new refresh area. a source area other than the new refresh area corresponding to the reconstructed image;
  • the coding unit 202 is specifically configured to:
  • the image data in the source refreshing region performs the first encoding according to the P frame.
  • the coding unit 202 specifically performs one of the following steps:
  • the unrefreshed area is encoded a second time according to a P frame
  • the refreshed area is encoded a second time according to the P frame
  • the unrefreshed area and the refreshed area are respectively encoded a second time according to a P frame.
  • the N P frames are consecutive, on the basis of the foregoing embodiment and the first or the second optional embodiment.
  • the processing unit 201 is further specifically configured to:
  • the reconstructed image includes a plurality of macroblocks, and a parameter value corresponding to each macroblock in the source refresh region is assigned in units of macroblocks, so that the parameter value is Updating the source refresh area to the reconstructed image to obtain a new refresh area to form an updated P frame;
  • the coding unit 202 is further specifically configured to:
  • Each of the P frames performs the first encoding of the source refresh region of itself, and refers to the new refresh region of the second P frame in the previous P frame to obtain a reconstructed image corresponding to itself.
  • the coding unit 202 is further used in the fourth embodiment of the present disclosure. :
  • the first encoding and the second encoding are performed for each of the P frames in sequence.
  • each of the P frames includes N according to the foregoing embodiment corresponding to FIG. 2 and the first to fourth alternative embodiments.
  • the area, except for the first P frame to be encoded, the Nm area of the mth P frame is the same as the Nm area of the m-1th P frame, and the new refresh area of the mth area refers to the mth-
  • the new refresh area of the first part to the N-2 part of one P frame is obtained, 2 ⁇ m ⁇ N.
  • each of the P frames includes multiple macroblocks, and the coding unit is selected.
  • 202 is also specifically used to:
  • the N P frames are sequentially refreshed from top to bottom or the macroblock column from left to right in a macroblock row until the I frame completes the refresh operation, wherein Each time the P frame is refreshed, the previous P frame of the P frame does not overlap or overlap at the boundary with the next P frame of the P frame.
  • the coding unit 202 is specifically used in the foregoing, according to the foregoing embodiment and the first to sixth optional embodiments. to:
  • each of the source refresh regions is first encoded in accordance with a P frame; and the QP is recorded with a primary quantization FirstQ, the QP being adjusted according to a required code rate for transmitting the P frame.
  • the processing unit 201 is specifically configured to be used in the foregoing embodiment of the foregoing FIG. 2 and the first to seventh optional embodiments. :
  • the I frame of the entire frame is divided into averages and then dispersed in the N P frames, so that the plurality of source refresh regions corresponding to the I frame are dispersed into the N P frames.
  • One of the source refresh regions is included in the P frame.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

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

Abstract

本发明提供了一种图像编码的方法及编码装置,所述方法包括:从一组图像序列中确定出N个P帧,分别从每个所述P帧中确定出源刷新区域;对所述源刷新区域进行第一次编码,得到所述源刷新区域对应的重建图像,所述N为正整数;将所述源刷新区域更新为所述重建图像,得到更新后的P帧;对所述更新后的P帧进行第二次编码。有效提高压缩效率及码率的稳定性。

Description

一种图像编码的方法及编码装置 技术领域
本发明涉及图像处理技术领域,尤其涉及的是一种图像编码的方法及编码装置。
背景技术
在视频解码领域,在低延时传输视频或图像过程中,需要用I帧对传输失效的视频或图像进行刷新,容易出现图像周期性的忽好忽坏,即呼吸效应。一般为减小呼吸效应,会将I帧块以条带方式分散到多个P帧中,然后在这些P帧中对每部分子I帧从上至下或从左至右进行连续刷新,直至I帧完成刷新。虽然对多帧图像进行连续刷新操作,可以使每帧图像大小平稳,比较适合实时传送,但容易出现滚条现象,目前,主要有以下两种方式可以减弱滚条现象:
一种方式中,通过将刷新块分散在整帧图像中,虽然在一定程度上滚条现象不容易被察觉,但这种方法很难保护到“刷新区”,即先前刷过的区域,后面又会参考未刷新的“脏区”,使得刷过的区域过几帧又变脏,这样需要反复多次才能勉强把图像刷干净,其刷新效率比较低。
另一种方式中,将图像分成若干刷新区,但他们根据global mv来调整刷新顺序,一定程度可以防止错误从“脏区”快速扩散到刷新区上,所以理论上看,其刷新效率会比第一种方式好些,但由于这类方法没有解决I块效率低的问题,仍然可以很清楚看到刷新闪烁的问题。
根据以上两种方式,均不能解决I帧或I块压缩效率低的问题,导致不管是插入I帧还是分散在P帧I块刷新,都可以很容易看出图像“呼吸效应”,用户体验较低。
发明内容
本发明提供了一种图像编码的方法及编码装置,能够解决在固定带宽下,低延时传输视频产生的呼吸效应的问题。
本发明第一方面提供了一种图像编码的方法,包括:
从一组图像序列中确定出N个P帧,分别从每个所述P帧中确定出源刷新区域;
对所述源刷新区域进行第一次编码,得到所述源刷新区域对应的重建图像,所述N为正整数;
将所述源刷新区域更新为所述重建图像,得到更新后的P帧;
对所述更新后的P帧进行第二次编码。
结合第一方面,本发明的第一个可能的实现方式中,所述更新后的P帧包含一个新刷新区域和除所述新刷新区域之外的源区域,所述新刷新区域与所述重建图像对应;
所述对所述更新后的P帧进行第二次编码,具体包括:
按照全I块对所述新刷新区域进行第二次编码;
按照P帧的编码方式对所述源区域进行第二次编码;
可选的,在进行上述第一次编码时,所述源刷新区域中的图像数据基于P帧进行上述第一次编码。
结合第一方面的第一个可能的实施例,本发明的第二个可能的实现方式中,所述按照P帧对所述源区域进行第二次编码,具体包括如下步骤中的一个:
在所述源区域包括未刷新区域时,按照P帧对所述未刷新区域进行第二次编码;
在所述源区域包括已刷新区域时,按照P帧对所述已刷新区域进行第二次编码;
在所述源区域包括未刷新区域和已刷新区域时,按照P帧对所述未刷新区域和所述已刷新区域分别进行第二次编码。
结合第一方面及第一个或第二个可能的实现方式,本发明的第三个可能的实现方式中,所述N个P帧为连续的N个P帧,每个所述P帧进行所述第一次编码和所述第二次编码的编码顺序,按照P1、P2……PN从左至右排列;
所述对所述P帧的源刷新区域进行第一次编码,得到所述源刷新区域对应的重建图像,具体包括:
每个所述P帧在对自身的源刷新区域进行第一次编码时,参考上一个P 帧中完成所述第二次编码的新刷新区域,得到自身对应的重建图像;
所述将所述源刷新区域更新为所述重建图像,得到更新后的P帧,具体包括:
所述重建图像包括多个宏块,以所述重建图像对应的参数值为参考,以宏块为单位对所述源刷新区域中的每个宏块对应的参数值进行赋值,以使所述源刷新区域更新为所述重建图像,得到新刷新区域,以形成更新后的P帧。
结合第一方面及第一至第三个可能的实现方式,本发明的第四个可能的实现方式中,所述方法还包括:依次对每个所述P帧进行所述第一次编码和所述第二次编码。
结合第一方面及第一至第四个可能的实现方式,本发明的第五个可能的实现方式中,每个所述P帧包括N个区域,除第一个进行编码的P帧外,第m个P帧的第N-m区域与第m-1个P帧的第N-m区域相同,第m区域的新刷新区域参考所述第m-1个P帧的第1部分至第N-2部分的新刷新区域得到,2≤m≤N。
结合第一方面的第三至第五个可能的实现方式,本发明的第六个可能的实现方式中,每个所述P帧包括多个宏块,所述依次对每个所述P帧进行所述第一次编码和所述第二次编码,具体包括:
根据所述编码顺序,以宏块为单位,按宏块行从上至下或宏块列从左至右,依次对所述N个P帧进行刷新,直至所述I帧完成刷新操作,其中,每刷新一个所述P帧,所述P帧的上一个P帧与所述P帧的下一个P帧之间不重叠或在边界处重叠。
结合第一方面及第一至第六个可能的实现方式,本发明的第七个可能的实现方式中,所述按照P帧对所述P帧的源刷新区域进行第一次编码,具体包括:
利用量化参数QP,按照P帧分别对所述每个源刷新区域进行第一次编码;并用一次量化FirstQ记录所述QP,所述QP根据传输所述P帧的所需的码率调整得到。
本发明第二方面提供一种编码装置,包括:
处理单元,用于从一组图像序列中确定出N个P帧,分别从每个所述P 帧中确定出源刷新区域;
编码单元,用于对所述源刷新区域进行第一次编码,得到所述源刷新区域对应的重建图像,所述N为正整数;
所述处理单元还用于将所述源刷新区域更新为所述重建图像,得到更新后的P帧;
所述编码单元还用于对所述更新后的P帧进行第二次编码。
结合第二方面,本发明第二方面的第一种实现方式中,所述更新后的P帧包含一个新刷新区域和除所述新刷新区域之外的源区域,所述新刷新区域与所述重建图像对应;
所述编码单元具体用于:
按照I帧对所述新刷新区域进行第二次编码;
按照P帧对所述源区域进行第二次编码。
结合第二方面的第一种实现方式,本发明第二发明的第二种实现方式中,所述编码单元具体执行如下步骤中的一个:
在所述源区域包括未刷新区域时,按照P帧对所述未刷新区域进行第二次编码;
在所述源区域包括已刷新区域时,按照P帧对所述已刷新区域进行第二次编码;
在所述源区域包括未刷新区域和已刷新区域时,按照P帧对所述未刷新区域和所述已刷新区域分别进行第二次编码。
结合第二方面及第一或第二种实现方式,本发明第二发明的第三种实现方式中,所述N个P帧为连续的N个P帧,每个所述P帧进行所述第一次编码和所述第二次编码的编码顺序,按照P1、P2……PN从左至右排列;
所述编码单元具体还用于:
每个所述P帧在对自身的源刷新区域进行第一次编码时,参考上一个P帧中完成所述第二次编码的新刷新区域,得到自身对应的重建图像;
所述处理单元具体还用于:
所述重建图像包括多个宏块,以所述重建图像对应的参数值为参考,以宏块为单位对所述源刷新区域中的每个宏块对应的参数值进行赋值,以使所述源 刷新区域更新为所述重建图像,得到新刷新区域,以形成更新后的P帧。
结合第二方面及第一至第三种实现方式,本发明第二发明的第四种实现方式中,所述编码单元还用于:
依次对每个所述P帧进行所述第一次编码和所述第二次编码。
结合第二方面及第一至第四种实现方式,本发明第二发明的第五种实现方式中,每个所述P帧包括N个区域,除第一个进行编码的P帧外,第m个P帧的第N-m区域与第m-1个P帧的第N-m区域相同,第m区域的新刷新区域参考所述第m-1个P帧的第1部分至第N-2部分的新刷新区域得到,2≤m≤N。
结合第二方面的第三至第五种实现方式,本发明第二发明的第六种实现方式中,每个所述P帧包括多个宏块,所述编码单元具体还用于:
根据所述编码顺序,以宏块为单位,按宏块行从上至下或宏块列从左至右,依次对所述N个P帧进行刷新,直至所述I帧完成刷新操作,其中,每刷新一个所述P帧,所述P帧的上一个P帧与所述P帧的下一个P帧之间不重叠或在边界处重叠。
结合第二方面及第一至第六种实现方式,本发明第二发明的第七种实现方式中,所述编码单元具体还用于:
利用量化参数QP,按照P帧分别对所述每个源刷新区域进行第一次编码;并用一次量化FirstQ记录所述QP,所述QP根据传输所述P帧的所需的码率调整得到。
从以上技术方案可以看出,本发明中,在将I帧分散至N个P帧后,对所述P帧的源刷新区域进行第一次编码,得到上述重建图像,然后将所述源刷新区域更新为所述重建图像,得到更新后的P帧,对所述更新后的P帧进行第二次编码,通过对每个P帧两次编码,有效提高压缩效率及码率的稳定性。
附图说明
图1为本发明实施例一种图像编码的方法一流程图;
图2为本发明实施例按宏块行从上至下刷新一示意图;
图3为本发明实施例按宏块列从左至右刷新一示意图;
图4为本发明实施例生成重建图像一示意图;
图5为本发明实施例利用重建图像更新源刷新区域一示意图;
图6为本发明实施例一种编码装置一结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例,基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或模块的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或模块,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或模块,本文中所出现的模块的划分,仅仅是一种逻辑上的划分,实际应用中实现时可以有另外的划分方式,例如多个模块可以结合成或集成在另一个系统中,或一些特征可以忽略,或不执行,另外,所显示的或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,模块之间的间接耦合或通信连接可以是电性或其他类似的形式,本文中均不作限定。并且,作为分离部件说明的模块或子模块可以是也可以不是物理上的分离,可以是也可以不是物理模块,或者可以分不到多个电路模块中,可以根据实际的需要选择其中的部分或全部模块来实现本发明实施例方案的目的。
本发明实施例提供一种图像编码的方法及编码装置,主要用于图像处理技术领域,能够解决在固定带宽下,低延时传输视频产生的呼吸效应的问题。
需要理解的是,I帧为帧内编码图像,可以从空间上去除同一帧图像内宏 块之间的冗余,即不利用图片之间的像素的相关性,而利用图片内的像素之间的相关性的压缩后的图像;P帧为前向预测编码图像,可以从时间上去除图像帧与帧之间的冗余,即利用图片之间的像素的相关性,及图片内的像素之间的相关性的压缩后的图像,P帧的编码效率比I帧高。
宏块:构成作为二维的矩形区域的像素的集合。
量化系数(QP,Quantization):视频解码中,量化,通过QP确定量化的映射关系,直接决定图像压缩的码率。
一般采用H264编码装置对YUV图像进行帧内预测或帧间预测,实现空间和时间相关性压缩,也可以是其它有类似功能的编码装置,具体编码装置类型本文中不做限定。由于前后两帧或者同一图像的相邻像素都存在着相似性、相关性,因此,可以通过当前帧和一组预测系数,推测出下一帧图像,H264编码装置可以对视频信号进行预测编码,通过压缩算法去除视频信号间的冗余(即信号之间的相关性),去除部分冗余后,减小视频信号的动态范围,即达到压缩目的。
本领域中,一般采用低延时传输视频,I帧压缩效率比P帧低,I帧需要消耗较高的码率才可以保持P帧的压缩效果,本发明将I帧以条带化的方式分散至多个P帧中,然后分别对每个P帧刷新一个刷新区域,且刷新时采用两次编码,以实现连续刷新多帧图像,从而保证每帧图像平稳。
以下结合图1所示对本发明实施例所提供的一种图像编码的方法进行详细说明,本发明实施例包括:
101、从一组图像序列中确定出N个P帧,分别从每个所述P帧中确定出源刷新区域;
其中,每个P帧大小相同,每个P帧中包括一个源刷新区域。
102、对所述P帧的源刷新区域进行第一次编码,得到所述源刷新区域对应的重建图像,所述N为正整数;
由于P帧的压缩率比I帧高,通过第一次编码,可以有效压缩图像。
103、将所述源刷新区域更新为所述重建图像,得到更新后的P帧;
将所述源刷新区域更新为所述重建图像,可以提高步骤104中在进行第二次编码时的压缩率,使码率更加平稳。
更新的过程具体可以是,先获取重建图像和源刷新区域中各个宏块内的像素点的参数值,然后通过对源刷新区域内的各个宏块的像素点的参数值进行赋值,以达到将源刷新区域内各像素点的参数值更新为重建图像内各像素点的参数值。
104、对所述更新后的P帧进行第二次编码;
对P帧进行第二次编码,进一步的提高压缩效率,有利于传输。
可以理解的是,本发明实施例中,分散后得到的每个P帧都要分别进行第一次编码和第二次编码(参考步骤102至步骤104),直至N个P帧全部刷新,才完成整帧的刷新。
本发明实施例中,在从图像序列中N个P帧确定P帧的源刷新区域后,对所述源刷新区域进行第一次编码,得到上述重建图像,然后将所述源刷新区域更新为所述重建图像,得到更新后的P帧,对所述更新后的P帧进行第二次编码,通过对每个P帧两次编码,有效提高压缩效率及码率的稳定性,解决在固定带宽下,低延时传输视频产生的呼吸效应的问题。
可选的,在上述图1所对应的实施例的基础上,本发明实施例的第一个可选实施例中,所述更新后的P帧包含一个新刷新区域和除所述新刷新区域之外的源区域,所述新刷新区域与所述重建图像对应;
所述对所述更新后的P帧进行第二次编码,具体包括:
按照I帧对所述新刷新区域进行第二次编码;
按照P帧对所述源区域进行第二次编码。
可选的,在上述第一个可选实施例的基础上,本发明实施例的第二个可选实施例中,所述按照P帧对所述源区域进行第二次编码,具体包括如下步骤中的一个:
在所述源区域包括未刷新区域时,按照P帧对所述未刷新区域进行第二次编码,即第一个进行编码的P1帧;
在所述源区域包括已刷新区域时,按照P帧对所述已刷新区域进行第二次编码,即P2帧、P3帧…Pn帧;
在所述源区域包括未刷新区域和已刷新区域时,按照P帧对所述未刷新区域和所述已刷新区域分别进行第二次编码,即最后一个进行编码的Pn帧。
可选的,在上述图1所对应的实施例及第一或第二个可选实施例的基础上,本发明实施例的第三个可选实施例中,所述N个P帧为连续的N个P帧,每个所述P帧进行所述第一次编码和所述第二次编码的编码顺序,按照P1、P2……PN从左至右排列;
所述对所述P帧的源刷新区域进行第一次编码,得到所述源刷新区域对应的重建图像,具体包括:
每个所述P帧在对自身的源刷新区域进行第一次编码时,参考上一个P帧中完成所述第二次编码的新刷新区域,得到自身对应的重建图像,如图4所示;
所述将所述源刷新区域更新为所述重建图像,得到更新后的P帧,具体包括:
所述重建图像包括多个宏块,以所述重建图像对应的参数值为参考,以宏块为单位对所述源刷新区域中的每个宏块对应的参数值进行赋值,以使所述源刷新区域更新为所述重建图像,得到新刷新区域,以形成更新后的P帧,如图5所示,P1”为更新后的P1帧;
可选的,在上述图1所对应的实施例及第一至第三个可选实施例的基础上,本发明实施例的第四个可选实施例中,所述方法还包括:依次对每个所述P帧进行所述第一次编码和所述第二次编码。
可选的,在上述图1所对应的实施例及第一至第四个可选实施例的基础上,本发明实施例的第五个可选实施例中,每个所述P帧包括N个区域,除第一个进行编码的P帧外,第m个P帧的第N-m区域与第m-1个P帧的第N-m区域相同,第m区域的新刷新区域参考所述第m-1个P帧的第1部分至第N-2部分的新刷新区域得到,2≤m≤N;
如图2所示,假设图像序列包括4个P帧,即P1、P2、P3及P4,按宏块 行从上至下刷新时,图中P1的源刷新区域(阴影部分)在1/4处,其它类似,从上至下的顺序如图3。
可选的,在上述第三至第五个可选实施例的基础上,本发明实施例的第六个可选实施例中,每个所述P帧包括多个宏块,所述依次对每个所述P帧进行所述第一次编码和所述第二次编码,具体包括:
根据所述编码顺序,以宏块为单位,按宏块行从上至下或宏块列从左至右,依次对所述N个P帧进行刷新,直至所述I帧完成刷新操作,可选的,每刷新一个所述P帧,所述P帧的上一个P帧与所述P帧的下一个P帧之间不重叠或在边界处重叠。
可选的,在上述图1所对应的实施例及第一至第六个可选实施例的基础上,本发明实施例的第七个可选实施例中,所述按照P帧对所述P帧的源刷新区域进行第一次编码,具体包括:
利用量化参数QP,按照P帧分别对所述每个源刷新区域进行第一次编码;并用一次量化FirstQ记录所述QP,所述QP根据传输所述P帧的所需的码率调整得到,其中,用FirstQ记录所述QP,目的是将当前的预测模式作为下一次编码宏块的参考,QP取值范围为0-51,一般第二次编码使用的QP都较第一次编码要低,具体QP取值可以根据帧的运动场景来调整、计算得到,本文中不做限定。
可选的,在上述图1所对应的实施例及第一至第七个可选实施例的基础上,本发明实施例的第八个可选实施例中,所述将整帧的I帧分散至N个P帧中,具体包括:
将整帧的I帧以条带化方式,平均拆分后分散在N个P帧中,以使所述I帧对应的多个源刷新区域分散至所述N个P帧中,每个所述P帧中包括一个所述源刷新区域。
上面对本发明实施例的一种图像编码的方法进行详细描述,下面基于上述 方法实施例对本发明实施例的一种编码装置进行举例说明,本文中的编码装置可以是编码器,如H264编码器,具体编码器类型本文中不做限定,请参阅图5,本发明实施例包括:
处理单元201,用于从一组图像序列中确定出N个P帧,分别从每个所述P帧中确定出源刷新区域;
编码单元202,用于对所述源刷新区域进行第一次编码,得到所述源刷新区域对应的重建图像,所述N为正整数;
所述处理单元201还用于将所述源刷新区域更新为所述重建图像,得到更新后的P帧;
所述编码单元202还用于对所述更新后的P帧进行第二次编码。
本发明实施例中,处理单元201在从图像序列中N个P帧的源刷新区域后,编码单元202对所述源刷新区域进行第一次编码,得到上述重建图像,然后将所述源刷新区域更新为所述重建图像,得到更新后的P帧,对所述更新后的P帧进行第二次编码,通过对每个P帧两次编码,有效提高压缩效率及码率的稳定性,解决在固定带宽下,低延时传输视频产生的呼吸效应的问题。
可选的,在上述图2所对应的实施例的基础上,本发明实施例的第一个可选实施例中,所述更新后的P帧包含一个新刷新区域和除所述新刷新区域之外的源区域,所述新刷新区域与所述重建图像对应;
所述编码单元202具体用于:
按照I帧对所述新刷新区域进行第二次编码;
按照P帧对所述源区域进行第二次编码;
可选的,在进行上述第一次编码时,所述源刷新区域中的图像数据基于P帧进行上述第一次编码。
可选的,在上述第一个可选实施例的基础上,本发明实施例的第二个可选实施例中,所述编码单元202具体执行如下步骤中的一个:
在所述源区域包括未刷新区域时,按照P帧对所述未刷新区域进行第二次编码;
在所述源区域包括已刷新区域时,按照P帧对所述已刷新区域进行第二次编码;
在所述源区域包括未刷新区域和已刷新区域时,按照P帧对所述未刷新区域和所述已刷新区域分别进行第二次编码。
可选的,在上述图2所对应的实施例及第一或第二个可选实施例的基础上,本发明实施例的第三个可选实施例中,所述N个P帧为连续的N个P帧,每个所述P帧进行所述第一次编码和所述第二次编码的编码顺序,按照P1、P2……PN从左至右排列;
所述处理单元201具体还用于:
所述重建图像包括多个宏块,以所述重建图像对应的参数值为参考,以宏块为单位对所述源刷新区域中的每个宏块对应的参数值进行赋值,以使所述源刷新区域更新为所述重建图像,得到新刷新区域,以形成更新后的P帧,;
所述编码单元202具体还用于:
每个所述P帧在对自身的源刷新区域进行第一次编码时,参考上一个P帧中完成所述第二次编码的新刷新区域,得到自身对应的重建图像。
可选的,在上述图2所对应的实施例及第一至第三个可选实施例的基础上,本发明实施例的第四个可选实施例中,所述编码单元202还用于:
依次对每个所述P帧进行所述第一次编码和所述第二次编码。
可选的,在上述图2所对应的实施例及第一至第四个可选实施例的基础上,本发明实施例的第五个可选实施例中,每个所述P帧包括N个区域,除第一个进行编码的P帧外,第m个P帧的第N-m区域与第m-1个P帧的第N-m区域相同,第m区域的新刷新区域参考所述第m-1个P帧的第1部分至第N-2部分的新刷新区域得到,2≤m≤N。
可选的,在上述第三至第五个可选实施例的基础上,本发明实施例的第六个可选实施例中,每个所述P帧包括多个宏块,所述编码单元202具体还用于:
根据所述编码顺序,以宏块为单位,按宏块行从上至下或宏块列从左至右,依次对所述N个P帧进行刷新,直至所述I帧完成刷新操作,其中,每刷新一个所述P帧,所述P帧的上一个P帧与所述P帧的下一个P帧之间不重叠或在边界处重叠。
可选的,在上述图2所对应的实施例及第一至第六个可选实施例的基础上,本发明实施例的第七个可选实施例中,所述编码单元202具体还用于:
利用量化参数QP,按照P帧分别对所述每个源刷新区域进行第一次编码;并用一次量化FirstQ记录所述QP,所述QP根据传输所述P帧的所需的码率调整得到。
可选的,在上述图2所对应的实施例及第一至第七个可选实施例的基础上,本发明实施例的第八个可选实施例中,所述处理单元201具体用于:
将整帧的I帧以条带化方式,平均拆分后分散在N个P帧中,以使所述I帧对应的多个源刷新区域分散至所述N个P帧中,每个所述P帧中包括一个所述源刷新区域。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上对本发明所提供的一种图像编码的方法及编码装置进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。

Claims (16)

  1. 一种图像编码的方法,其特征在于,包括:
    从一组图像序列中确定出N个P帧,分别从每个所述P帧中确定出源刷新区域;
    对所述源刷新区域进行第一次编码,得到所述源刷新区域对应的重建图像;
    将所述源刷新区域更新为所述重建图像,得到更新后的P帧;
    对所述更新后的P帧进行第二次编码。
  2. 根据权利要求1所述的方法,其特征在于,所述更新后的P帧包含一个新刷新区域和除所述新刷新区域之外的源区域,所述新刷新区域与所述重建图像对应;
    所述对所述更新后的P帧进行第二次编码,具体包括:
    按照全I块对所述新刷新区域进行第二次编码;
    按照P帧的编码方式对所述源区域进行第二次编码。
  3. 根据权利要求2所述的方法,其特征在于,所述按照P帧对所述源区域进行第二次编码,具体包括如下步骤中的一个:
    在所述源区域包括未刷新区域时,按照P帧对所述未刷新区域进行第二次编码;
    在所述源区域包括已刷新区域时,按照P帧对所述已刷新区域进行第二次编码;
    在所述源区域包括未刷新区域和已刷新区域时,按照P帧对所述未刷新区域和所述已刷新区域分别进行第二次编码。
  4. 根据权利要求1至3任一所述的方法,其特征在于,所述N个P帧为连续的N个P帧,每个所述P帧进行所述第一次编码和所述第二次编码的编码顺序,按照P1、P2……PN从左至右排列;
    所述对所述P帧的源刷新区域进行第一次编码,得到所述源刷新区域对应的重建图像,具体包括:
    每个所述P帧在对自身的源刷新区域进行第一次编码时,参考上一个P帧中完成所述第二次编码的新刷新区域,得到自身对应的重建图像;
    所述将所述源刷新区域更新为所述重建图像,得到更新后的P帧,具体包 括:
    所述重建图像包括多个宏块,以所述重建图像对应的参数值为参考,以宏块为单位对所述源刷新区域中的每个宏块对应的参数值进行赋值,以使所述源刷新区域更新为所述重建图像,得到新刷新区域,以形成更新后的P帧。
  5. 根据权利要求1至4任一所述的方法,其特征在于,所述方法还包括:依次对每个所述P帧进行所述第一次编码和所述第二次编码。
  6. 根据权利要求1至5任一所述的方法,其特征在于,每个所述P帧包括N个区域,除第一个进行编码的P帧外,第m个P帧的第N-m区域与第m-1个P帧的第N-m区域相同,第m区域的新刷新区域参考所述第m-1个P帧的第1部分至第N-2部分的新刷新区域得到,2≤m≤N。
  7. 根据权利要求4至6任一所述的方法,其特征在于,每个所述P帧包括多个宏块,所述依次对每个所述P帧进行所述第一次编码和所述第二次编码,具体包括:
    根据所述编码顺序,以宏块为单位,按宏块行从上至下或宏块列从左至右,依次对所述N个P帧进行刷新,直至所述I帧完成刷新操作,其中,每刷新一个所述P帧,所述P帧的上一个P帧与所述P帧的下一个P帧之间不重叠或在边界处重叠。
  8. 根据权利要求1至7任一所述的方法,其特征在于,所述按照P帧对所述P帧的源刷新区域进行第一次编码,具体包括:
    利用量化参数QP,按照P帧分别对所述每个源刷新区域进行第一次编码;并用一次量化FirstQ记录所述QP,所述QP根据传输所述P帧的所需的码率调整得到。
  9. 一种编码装置,其特征在于,所述编码装置包括:
    处理单元,用于从一组图像序列中确定出N个P帧,分别从每个所述P帧中确定出源刷新区域;
    编码单元,用于对所述源刷新区域进行第一次编码,得到所述源刷新区域对应的重建图像,所述N为正整数;
    所述处理单元还用于将所述源刷新区域更新为所述重建图像,得到更新后的P帧;
    所述编码单元还用于对所述更新后的P帧进行第二次编码。
  10. 根据权利要求9所述的编码装置,其特征在于,所述更新后的P帧包含一个新刷新区域和除所述新刷新区域之外的源区域,所述新刷新区域与所述重建图像对应;
    所述编码单元具体用于:
    按照I帧对所述新刷新区域进行第二次编码;
    按照P帧对所述源区域进行第二次编码。
  11. 根据权利要求10所述的编码装置,其特征在于,所述编码单元具体执行如下步骤中的一个:
    在所述源区域包括未刷新区域时,按照P帧对所述未刷新区域进行第二次编码;
    在所述源区域包括已刷新区域时,按照P帧对所述已刷新区域进行第二次编码;
    在所述源区域包括未刷新区域和已刷新区域时,按照P帧对所述未刷新区域和所述已刷新区域分别进行第二次编码。
  12. 根据权利要求9至11任一所述的编码装置,其特征在于,所述N个P帧为连续的N个P帧,每个所述P帧进行所述第一次编码和所述第二次编码的编码顺序,按照P1、P2……PN从左至右排列;
    所述编码单元具体还用于:
    每个所述P帧在对自身的源刷新区域进行第一次编码时,参考上一个P帧中完成所述第二次编码的新刷新区域,得到自身对应的重建图像;
    所述处理单元具体还用于:
    所述重建图像包括多个宏块,以所述重建图像对应的参数值为参考,以宏块为单位对所述源刷新区域中的每个宏块对应的参数值进行赋值,以使所述源刷新区域更新为所述重建图像,得到新刷新区域,以形成更新后的P帧。
  13. 根据权利要求9至12任一所述的编码装置,其特征在于,所述编码单元还用于:
    依次对每个所述P帧进行所述第一次编码和所述第二次编码。
  14. 根据权利要求9至13任一所述的编码装置,其特征在于,每个所述 P帧包括N个区域,除第一个进行编码的P帧外,第m个P帧的第N-m区域与第m-1个P帧的第N-m区域相同,第m区域的新刷新区域参考所述第m-1个P帧的第1部分至第N-2部分的新刷新区域得到,2≤m≤N。
  15. 根据权利要求12至14任一所述的编码装置,其特征在于,每个所述P帧包括多个宏块,所述编码单元具体还用于:
    根据所述编码顺序,以宏块为单位,按宏块行从上至下或宏块列从左至右,依次对所述N个P帧进行刷新,直至所述I帧完成刷新操作,其中,每刷新一个所述P帧,所述P帧的上一个P帧与所述P帧的下一个P帧之间不重叠或在边界处重叠。
  16. 根据权利要求9至15任一所述的编码装置,其特征在于,所述编码单元具体还用于:
    利用量化参数QP,按照P帧分别对所述每个源刷新区域进行第一次编码;并用一次量化FirstQ记录所述QP,所述QP根据传输所述P帧的所需的码率调整得到。
PCT/CN2015/075485 2015-03-31 2015-03-31 一种图像编码的方法及编码装置 WO2016154888A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
PCT/CN2015/075485 WO2016154888A1 (zh) 2015-03-31 2015-03-31 一种图像编码的方法及编码装置
CN201580002740.1A CN105765973B (zh) 2015-03-31 2015-03-31 一种图像编码的方法及编码装置
US15/720,627 US10469855B2 (en) 2015-03-31 2017-09-29 Image encoding method and encoder
US16/594,788 US10715822B2 (en) 2015-03-31 2019-10-07 Image encoding method and encoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/075485 WO2016154888A1 (zh) 2015-03-31 2015-03-31 一种图像编码的方法及编码装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/720,627 Continuation US10469855B2 (en) 2015-03-31 2017-09-29 Image encoding method and encoder

Publications (1)

Publication Number Publication Date
WO2016154888A1 true WO2016154888A1 (zh) 2016-10-06

Family

ID=56343054

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/075485 WO2016154888A1 (zh) 2015-03-31 2015-03-31 一种图像编码的方法及编码装置

Country Status (3)

Country Link
US (2) US10469855B2 (zh)
CN (1) CN105765973B (zh)
WO (1) WO2016154888A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4030767A1 (en) 2016-11-30 2022-07-20 Panasonic Intellectual Property Corporation of America Three-dimensional model distribution method and three-dimensional model distribution device
CN110996102B (zh) * 2020-03-03 2020-05-22 眸芯科技(上海)有限公司 抑制p/b帧中帧内块呼吸效应的视频编码方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010026677A1 (en) * 1998-11-20 2001-10-04 General Instrument Corporation Methods and apparatus for transcoding progressive I-slice refreshed MPEG data streams to enable trick play mode features on a television appliance
KR20060081970A (ko) * 2005-01-11 2006-07-14 엘지전자 주식회사 H.264 기반의 동영상 디코더에서 인트라 프레임을 랜덤억세스 가능 포인트로 선택하는 방법
CN101321284A (zh) * 2007-06-10 2008-12-10 华为技术有限公司 一种编解码方法、设备及系统
CN103796019A (zh) * 2012-11-05 2014-05-14 北京勤能通达科技有限公司 一种均衡码率编码方法
CN103873869A (zh) * 2012-12-18 2014-06-18 北京市勤能通达科技有限公司 一种码率控制方法

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AUPR212600A0 (en) * 2000-12-18 2001-01-25 Canon Kabushiki Kaisha Efficient video coding
US6816552B2 (en) * 2001-07-11 2004-11-09 Dolby Laboratories Licensing Corporation Interpolation of video compression frames
FI114527B (fi) * 2002-01-23 2004-10-29 Nokia Corp Kuvakehysten ryhmittely videokoodauksessa
AU2003228047A1 (en) * 2002-06-12 2003-12-31 Koninklijke Philips Electronics N.V. Method and apparatus for processing a stream that contains encrypted information
US8948266B2 (en) * 2004-10-12 2015-02-03 Qualcomm Incorporated Adaptive intra-refresh for digital video encoding
US8023562B2 (en) * 2007-09-07 2011-09-20 Vanguard Software Solutions, Inc. Real-time video coding/decoding
CN101232619B (zh) * 2008-01-25 2011-05-11 浙江大学 嵌入帧内编码块的视频编码方法
JP5016561B2 (ja) * 2008-06-25 2012-09-05 シャープ株式会社 動画像符号化装置、動画像復号装置、動画像符号化方法、及び動画像復号方法
US8451896B2 (en) * 2009-10-19 2013-05-28 Hong Kong Applied Science and Technology Research Institute Company Limited Method and apparatus for adaptive quantization in digital video coding
JP5678743B2 (ja) * 2011-03-14 2015-03-04 富士通株式会社 情報処理装置、画像送信プログラム、画像送信方法および画像表示方法
JP6248671B2 (ja) * 2014-02-10 2017-12-20 富士通株式会社 情報処理装置、方法、プログラム、および情報処理システム

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010026677A1 (en) * 1998-11-20 2001-10-04 General Instrument Corporation Methods and apparatus for transcoding progressive I-slice refreshed MPEG data streams to enable trick play mode features on a television appliance
KR20060081970A (ko) * 2005-01-11 2006-07-14 엘지전자 주식회사 H.264 기반의 동영상 디코더에서 인트라 프레임을 랜덤억세스 가능 포인트로 선택하는 방법
CN101321284A (zh) * 2007-06-10 2008-12-10 华为技术有限公司 一种编解码方法、设备及系统
CN103796019A (zh) * 2012-11-05 2014-05-14 北京勤能通达科技有限公司 一种均衡码率编码方法
CN103873869A (zh) * 2012-12-18 2014-06-18 北京市勤能通达科技有限公司 一种码率控制方法

Also Published As

Publication number Publication date
US20180027248A1 (en) 2018-01-25
CN105765973A (zh) 2016-07-13
US10469855B2 (en) 2019-11-05
CN105765973B (zh) 2018-06-08
US10715822B2 (en) 2020-07-14
US20200045324A1 (en) 2020-02-06

Similar Documents

Publication Publication Date Title
KR102390695B1 (ko) 픽처 예측 방법 및 픽처 예측 장치
CN106331703B (zh) 视频编码和解码方法、视频编码和解码装置
CN111819854B (zh) 用于协调多符号位隐藏和残差符号预测的方法和装置
CN111010495B (zh) 一种视频降噪处理方法及装置
WO2016050051A1 (zh) 图像预测方法及相关装置
CN110324623B (zh) 一种双向帧间预测方法及装置
US8594189B1 (en) Apparatus and method for coding video using consistent regions and resolution scaling
JP6636615B2 (ja) 動きベクトル場の符号化方法、復号方法、符号化装置、および復号装置
US9185414B1 (en) Video encoding using variance
US20150222926A1 (en) Inter-prediction method and video encoding/decoding method using the inter-prediction method
CN111669589B (zh) 图像编码方法、装置、计算机设备以及存储介质
WO2019084792A1 (zh) 一种编码方法及装置
US20160073110A1 (en) Object-based adaptive brightness compensation method and apparatus
WO2016154888A1 (zh) 一种图像编码的方法及编码装置
KR20170125154A (ko) 곡선 화면 내 예측을 사용하는 비디오 복호화 방법 및 장치
CN111669600A (zh) 视频编码方法、装置、编码器及存储装置
CN107509074B (zh) 基于压缩感知的自适应3d视频压缩编解码方法
Liu et al. Reconstruction of compressed-sensed multiview video with disparity-and motion-compensated total variation minimization
Dane et al. Encoder-assisted adaptive video frame interpolation
CN114827616A (zh) 一种基于时空信息平衡的压缩视频质量增强方法
CN112640458A (zh) 信息处理方法及装置、设备、存储介质
JP3935667B2 (ja) Dct及び予測エラー係数のフィルタリングによるビデオ画像の活動の測定
CN106688235B (zh) 非因果预测的信号编码方法、解码方法
JP2022540982A (ja) 情報処理方法及び装置、設備、記憶媒体
US9451285B2 (en) Inter-prediction method and video encoding/decoding method using the inter-prediction method

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: 15886874

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: 15886874

Country of ref document: EP

Kind code of ref document: A1