CN116647704A - Video coding and decoding joint error control method for HEVC data option - Google Patents

Video coding and decoding joint error control method for HEVC data option Download PDF

Info

Publication number
CN116647704A
CN116647704A CN202310668881.3A CN202310668881A CN116647704A CN 116647704 A CN116647704 A CN 116647704A CN 202310668881 A CN202310668881 A CN 202310668881A CN 116647704 A CN116647704 A CN 116647704A
Authority
CN
China
Prior art keywords
data
gop
frame
coding
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310668881.3A
Other languages
Chinese (zh)
Other versions
CN116647704B (en
Inventor
晋荣
任鹏
李想
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Fortis Asia News Network Technology Co ltd
Original Assignee
Beijing Fortis Asia News Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Fortis Asia News Network Technology Co ltd filed Critical Beijing Fortis Asia News Network Technology Co ltd
Priority to CN202310668881.3A priority Critical patent/CN116647704B/en
Publication of CN116647704A publication Critical patent/CN116647704A/en
Application granted granted Critical
Publication of CN116647704B publication Critical patent/CN116647704B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/89Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving methods or arrangements for detection of transmission errors at the decoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • 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/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/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Landscapes

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

Abstract

The invention relates to the technical field of video coding and decoding, in particular to a video coding and decoding joint error control method of HEVC data options, which comprises the following steps: the preprocessing module performs GOP division on a source video and block division on a frame image, then determines a front quantization coefficient according to a macro block division mode adopted by an image processing block, determines a middle quantization coefficient according to the number of B frames in GOP on a time domain where the image processing block is positioned, the data entropy coding module determines the length of a cyclic redundancy check code added in data coding according to a final quantization coefficient, determines a data packet transmission error control method according to the difference value between the final quantization coefficient and a final quantization coefficient standard, and then the data decoding module determines an error correction mode according to the percentage of the detected number of error bits in the number of data packet bits, so that the anti-interference capability of HEVC code stream on errors is improved, and the image ornamental quality is improved.

Description

Video coding and decoding joint error control method for HEVC data option
Technical Field
The invention relates to the technical field of video coding and decoding, in particular to a video coding and decoding joint error control method of HEVC data options.
Background
The high-efficiency video coding (HighEfficiencyVideoCoding, HEVC) is a new generation of video coding international standard jointly formulated by ITU and ISO, and has wide prospect in future high-definition and ultra-high-definition video applications. HEVC is basically consistent with the previous standard H.264/AVC in terms of coding principle and basic structure, namely a block mixed coding mode of prediction and transformation, but almost adopts corresponding improvement measures on each coding link, so that the overall coding efficiency is doubled compared with that of H.264/AVC. However, while the coding efficiency is improved, compared with the h.264/AVC bitstream signal, the anti-interference capability of the HEVC bitstream against errors is more fragile, and an error of one bit means that more information is lost, and the correct decoding of the subsequent bitstream is often affected, so that the image viewing quality is seriously reduced. Therefore, when transmitting the HEVC video code stream, an appropriate error control method should be adopted to minimize the influence of errors and ensure the decoding quality of the video to the greatest extent.
Chinese patent publication No.: CN107277549B discloses a method for masking frame error of HEVC intra-frame coding based on texture angle prediction mode, comprising the steps of: step A: completing detection and positioning of the lost LCU; and (B) step (B): dividing the lost LCU into four parts of upper left, upper right, lower right and lower left, wherein each part corresponds to the size of 32x 32; step C: processing the upper left part, obtaining depth information of 16 correctly received 4x4 small blocks on the upper side and the left side of the part through a getDepth () function in HEVC standard reference software HM, and determining the division of the part with the maximum depth; step D: for each divided block, estimating a possible texture angle mode of the current divided block by referring to texture angle modes of two adjacent blocks, and for the upper left part, estimating according to the left block and the upper block, sequentially completing the texture angle mode estimation of all divided blocks of the part from the block at the upper left to the column after the block at the upper left starts; step E: after the texture angle mode of all the dividing blocks at the upper left part is judged, error concealment is carried out on the dividing blocks according to the mode in an intra-frame prediction mode, and reference pixels come from the left side pixels and the upper side pixels of the dividing blocks; the masking sequence is specifically: sequentially finishing covering all the division blocks of the part from the division block of the upper left corner to the next column; step F: C-E, masking the upper right part, wherein the positions and masking sequences of the reference block and the reference pixel of the part are required to be changed correspondingly, and the part and the upper left part are mirror symmetry about the X axis;
step G: c, masking the lower right part in the mode of the steps C-E, wherein the positions of the reference block and the reference pixel of the part, the masking sequence and the upper right part are in mirror symmetry about the Y axis; step H: C-E, masking the left lower part, wherein the reference block and the reference pixel position of the part, the masking sequence and the right lower part are in mirror symmetry about the X axis; wherein the above steps are filled with nearest neighbor pixels in the manner adopted when texture angle prediction is performed according to HEVC standard if reference pixels are not present or available when intra prediction masking is performed.
It can be seen that the following problems exist in the HEVC intra-frame coding frame error concealment method based on the texture angle prediction mode: HEVC code stream has weak anti-interference capability on errors and high requirement on network environment, so that the image ornamental quality is seriously reduced.
Disclosure of Invention
Therefore, the invention provides a video coding and decoding joint error control method of HEVC data options, which is used for solving the problems that HEVC code streams in the prior art have weak anti-interference capability on errors and high requirements on network environment, so that the image ornamental quality is seriously reduced.
To achieve the above object, in one aspect, the present invention provides a video coding and decoding joint error control method for HEVC data options, including:
step S1, a preprocessing module determines whether adjacent frame images are divided into the same GOP according to the mean square error of pixel values between the adjacent frame images of a source video, and counts the number of frames of the GOP;
step S2, a prediction coding module determines the macro block scale of a source video GOP according to the number of frames in the source video GOP;
step S3, a predictive coding module determines a division mode of macro blocks in a source video GOP according to the difference value between the number of frames in the source video GOP and the standard number of frames;
s4, determining the type of the current frame by a prediction coding module according to the time domain position of the current frame in the GOP, so as to determine the prediction mode of the current frame image coding;
step S5, the data quantization module determines a prepositioned quantization coefficient according to a macro block division mode adopted by the current image processing block;
step S6, the data quantization module determines a centrally-arranged quantization coefficient according to the ratio of the number of B frames in the GOP to the total number of frames in the GOP in the time domain where the current image processing block is positioned;
step S7, the data entropy coding module determines the length of the cyclic redundancy check code added in the data coding according to the final quantized coefficient;
step S8, the data entropy coding module determines a data packet transmission error control method according to the difference value between the final quantized coefficient and the final quantized coefficient standard;
step S9, the data decoding module detects the data packet according to the cyclic redundancy check code, and determines an error correction mode according to the percentage of the detected error bit number in the data packet bit number;
in the step S1, the preprocessing module determines whether the adjacent frame images are divided into the same GOP according to the comparison result of the mean square error of the pixel values and the mean square error standard of the pixel values between the adjacent frame images of the source video, counts the number of frames of the GOP, and divides the adjacent frame images into the same GOP if the mean square error of the pixel values is less than or equal to the mean square error standard of the pixel values; and if the pixel value mean square error is larger than the pixel value mean square error standard, dividing the adjacent frame image into the next GOP.
Further, the preprocessing module calculates a mean square error MSE of pixel values between adjacent frame images according to the following formula, and sets
MSE=1/mn×∑∑[x(i,j)-y(i,j)]^2
Wherein m and n respectively represent the width and height of the image, and x (i, j) and y (i, j) respectively represent the pixel gray values of the ith row and the jth column in the two images.
Further, the prediction coding module determines the macro block scale of the source video GOP according to the comparison result of the frame number in the source video GOP and the standard frame number;
if the frame number is less than or equal to the standard frame number, the macro block scale of the source video GOP is a first scale;
and if the frame number is greater than the standard frame number, the macro block scale of the source video GOP is a second scale.
Further, the predictive coding module determines a partition mode of macro blocks in the source video GOP according to a comparison result of a difference value between the number of frames in the source video GOP and the standard number of frames and a difference value between the standard number of frames, wherein the partition mode comprises a first macro block partition mode of dividing images according to a four-level tree structure and adaptively dividing image blocks according to the content and the characteristics of the current images, and a second macro block partition mode of determining partition positions and partition sizes by detecting the characteristics of edges, textures and the like.
Further, the prediction coding module determines a current frame type according to a time domain position of the current frame in the GOP, so as to determine a prediction mode of current frame image coding, if the current frame is positioned in a first frame or a last frame of the GOP, the current frame is determined to be an I frame, intra-frame prediction is adopted, and if the current frame is positioned in a second frame to a penultimate frame of the GOP, the current frame determines the current frame type and the prediction mode of image coding according to a comparison result of a structural similarity index SSIM between a neighboring previous frame and a next frame and a standard structural similarity index SSIM 0;
if SSIM is less than or equal to SSIM0, determining the current frame as a P frame, and adopting forward prediction;
if SSIM is greater than SSIM0, determining the current frame as a B frame, and adopting bidirectional prediction;
the predictive coding module calculates a structural similarity index SSIM according to the following formula, and sets ssim= ((2xμxμy+c1) × (2xσxy+c2))/(μx2+μy2+c1) × (σx2+σ)
y^2+c2))
Wherein x and y represent the two images to be compared respectively, μx and μy represent their luminance mean values respectively, σx2 and σy2 represent their luminance variances respectively, and σxy represents the covariance between them. And c1 and c2 are constant terms added to prevent denominator from being too small.
Further, the data quantization module determines a pre-quantization coefficient according to a macro block division mode adopted by the current image processing block;
if the macro block division mode adopted by the current image processing block is a first macro block division mode, the front quantization coefficient of the data quantization module is a first front quantization coefficient;
and if the macroblock division mode adopted by the current image processing block is a second macroblock division mode, the front quantization coefficient of the data quantization module is a second front quantization coefficient.
Further, the data quantization module determines a centrally-mounted quantization coefficient according to a comparison result of a ratio W of the number of B frames in the GOP in the time domain where the current image processing block is located to the total frame number in the GOP and a frame number ratio standard W0;
if W is less than or equal to W0, the middle quantization coefficient of the data quantization module is a first middle quantization coefficient;
if W is greater than W0, the middle quantization coefficient of the data quantization module is a second middle quantization coefficient.
Further, the data entropy coding module determines the length of the cyclic redundancy check code added in the data coding according to the comparison result of the final quantized coefficient L and the final quantized coefficient standard L0, wherein the final quantized coefficient L=the front quantized coefficient x the middle quantized coefficient;
if L is less than or equal to L0, the data entropy coding module determines that the redundancy coding length is the first cyclic redundancy check code length;
if L > L0, the data entropy coding module determines that the redundancy coding length is the second cyclic redundancy check code length.
Further, the data entropy encoding module determines a data packet transmission error control method according to a comparison result of a difference DeltaL between a final quantized coefficient L and a final quantized coefficient standard L0 and a final quantized coefficient difference standard DeltaL 0, the data packet transmission error control method comprises adding a unique serial number to each data packet, the data decoding module reassembles the data packets according to the serial number sequence, if the data packet with a certain serial number is missing, the data decoding module sends a feedback signal to the data entropy encoding module and requests to resend the data packets, if the data packet with a certain serial number is repeated, the data decoding module deletes a first error control method of redundant data packets and adds a unique timestamp to each data packet, identifies sending or receiving time of each data packet, and the data decoding module sorts the data packets and removes a second error control method of repeated packets.
Further, the data decoding module detects the data packets according to the cyclic redundancy check code, and determines an error correction mode according to the comparison result of the percentage of the detected error bit number in the data packet bit number and the standard percentage, wherein the error correction mode comprises the data decoding module sending a feedback signal to the data entropy coding module, informing the data entropy coding module which data packets have errors, requesting to resend the first error correction mode of the data packets and the data decoding module sending the feedback signal to the data entropy coding module, and the data entropy coding module sends the data to the data decoding module after resending the data codes according to the Hamming code, and the data decoding module restores the second error correction mode of the original data through decoding.
Compared with the prior art, the invention has the advantages that the invention can utilize the correlation of space and time to reduce redundant information and improve compression efficiency when the similar frames are put in the same GOP for coding, and each GOP is independently coded, thus realizing lower delay and being capable of responding to user operation more quickly.
Furthermore, the invention reasonably sets the macro block size according to different scenes and contents, can ensure that videos in different types and different scenes can obtain better visual quality, and can reduce the processing time required by encoding, thereby realizing lower delay and faster response to user operation.
Furthermore, the method for flexibly selecting and dividing the macro blocks according to the characteristics of the frame numbers in the GOP of the current image can better process the video in the complex scene and can realize the coding effect with higher coding efficiency and better quality.
Further, the invention determines the type of the current frame and the prediction mode of image coding according to the comparison result of the structural similarity index SSIM of the current frame and the standard structural similarity index SSIM0, so that the data volume and the transmission bandwidth can be reduced as much as possible on the premise of ensuring the video quality, the video coding efficiency and the transmission speed are improved, and the storage and transmission cost is reduced.
Further, the invention determines the pre-quantization coefficient according to the macro block division mode adopted by the current image processing block, and can carry out self-adaptive adjustment aiming at different macro block sizes and complexity degrees, thereby better adapting to the coding requirements under different scenes. In addition, the embodiment of the invention provides two choices of the first pre-quantization coefficient and the second pre-quantization coefficient, and the two choices can be adjusted according to specific conditions, so that the coding effect and the video quality are further improved.
Furthermore, the invention determines the centrally-arranged quantization coefficient according to the comparison result of the ratio of the number of B frames in the GOP in the time domain where the current image processing block is positioned to the total frame number in the GOP and the standard number ratio, and can carry out self-adaptive adjustment according to the information such as the number and the position of the B frames in the video sequence, thereby better adapting to the coding requirements under different scenes. In addition, the embodiment of the invention provides two choices of the first middle quantization coefficient and the second middle quantization coefficient, and the two choices can be adjusted according to specific conditions, so that the coding effect and the video quality are further improved. By the mode, the coding efficiency and the video quality can be ensured, and meanwhile, the coding requirements under different scenes can be better met.
Furthermore, the invention determines the final quantized coefficient according to the pre-quantized coefficient and the centrally-arranged quantized coefficient, and determines the length of the added cyclic redundancy check code in the data coding according to the comparison result of the pre-quantized coefficient and the centrally-arranged quantized coefficient standard, thereby improving the reliability of video transmission and storage, reducing the risks of data loss and transmission errors, and simultaneously, adjusting the parameters such as the final quantized coefficient standard, the first cyclic redundancy check code length, the second cyclic redundancy check code length and the like according to specific conditions under different scenes so as to achieve better effects.
Furthermore, the first error control method is suitable for network transmission scenes, transmission errors are reduced as much as possible on the premise of guaranteeing video quality, the second error control method is suitable for storage scenes, data packets can be played in correct sequence, the problem of repeated or lost data packets caused by network delay and the like is avoided, the data transmission and storage problems in different scenes are solved by adopting different error control methods, the reliability of video transmission and storage can be improved, transmission errors and storage errors are reduced as much as possible on the premise of guaranteeing video quality, and accordingly the transmission speed is improved and storage space is saved.
Further, the invention detects the data packet according to the cyclic redundancy check code, and determines the error correction mode according to the comparison result of the percentage of the error bit number in the data packet bit number and the standard percentage, so that the redundancy coding length can be reduced as much as possible on the premise of ensuring the video quality, thereby improving the transmission speed and saving the storage space.
Drawings
Fig. 1 is a schematic system architecture diagram of a video coding and decoding joint error control method applying HEVC data option according to an embodiment of the present invention;
fig. 2 is a flowchart of a video codec joint error control method of an HEVC data option according to an embodiment of the present invention.
Detailed Description
In order that the objects and advantages of the invention will become more apparent, the invention will be further described with reference to the following examples; it should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are merely for explaining the technical principles of the present invention, and are not intended to limit the scope of the present invention.
Referring to fig. 1 and fig. 2, fig. 1 is a schematic structural diagram of a video coding and decoding joint error control method of an HEVC data option according to an embodiment of the present invention, and fig. 2 is a flowchart of a video coding and decoding joint error control method of an HEVC data option according to an embodiment of the present invention.
The embodiment of the invention discloses a video coding and decoding joint error control method based on HEVC data options, which comprises the following steps:
step S1, a preprocessing module determines whether adjacent frame images are divided into the same GOP according to the mean square error of pixel values between the adjacent frame images of a source video, and counts the number of frames of the GOP;
step S2, a prediction coding module determines the macro block scale of a source video GOP according to the number of frames in the source video GOP;
step S3, the predictive coding module determines a division mode of macro blocks in the source video GOP according to the difference value between the frame number in the source video GOP and the standard frame number;
s4, determining the type of the current frame by a prediction coding module according to the time domain position of the current frame in the GOP, so as to determine the prediction mode of the current frame image coding;
step S5, the data quantization module determines a prepositioned quantization coefficient according to a macro block division mode adopted by the current image processing block;
step S6, the data quantization module determines a centrally-arranged quantization coefficient according to the ratio of the number of B frames in the GOP to the total number of frames in the GOP in the time domain where the current image processing block is positioned;
step S7, the data entropy coding module determines the length of the added cyclic redundancy check code in the data coding according to the final quantized coefficient;
step S8, the data entropy coding module determines a data packet transmission error control method according to the difference value between the final quantized coefficient and the final quantized coefficient standard;
and S9, the data decoding module detects the data packet according to the cyclic redundancy check code and determines an error correction mode according to the percentage of the detected error bit number in the data packet bit number.
Specifically, the preprocessing module determines whether the adjacent frame images are divided in the same GOP according to the comparison result of the pixel value mean square error MSE and the pixel value mean square error standard MSE0 between the adjacent frame images of the source video, calculates the frame number Z of the GOP, and sets the pixel value mean square error MSE between the adjacent frame images:
MSE=1/mn×∑∑[x(i,j)-y(i,j)]^2
where m represents the width of the image, n represents the height of the image, and x (i, j) and y (i, j) represent the pixel gray values of the ith row and jth column in the two images, respectively.
If the MSE is less than or equal to MSE0, dividing the adjacent frame images into the same GOP;
if MSE > MSE0, dividing the adjacent frame image into the next GOP;
in the embodiment of the present invention, the mean square error standard MSE0 of the pixel value is 20, and those skilled in the art can also adjust the mean square error standard MSE0 of the pixel value according to specific situations.
The present invention encodes similar frames in the same GOP, which can utilize their spatial and temporal correlation, reduce redundant information and improve compression efficiency, and since each GOP is independently encoded, lower latency can be achieved and user operation can be responded more quickly.
Specifically, the prediction coding module determines the macro block scale of the source video GOP according to the comparison result of the frame number Z in the source video GOP and the standard frame number Z0;
if Z is less than or equal to Z0, the macro block scale of the source video GOP is a first scale;
if Z is larger than Z0, the macro block scale of the source video GOP is a second scale;
in the embodiment of the present invention, the first macro block size of the source video GOP is 16×16, and the second macro block size of the source video GOP is 32×32, and those skilled in the art can also adjust the macro block size of the source video GOP according to specific situations.
The invention reasonably sets the macro block size according to different scenes and contents, can ensure that videos in different types and different scenes can obtain better visual quality, and can reduce the processing time required by encoding, thereby realizing lower delay and faster response to user operation.
Specifically, the prediction encoding module determines a partition mode of a macro block in the source video GOP according to a comparison result of a difference value delta Z between a frame number Z in the source video GOP and a standard frame number Z0 and a standard frame number difference value delta Z0, and sets delta z= -Z0;
if the delta Z is less than or equal to delta Z0, the predictive coding module determines a first macro block division mode of macro blocks in the source video GOP;
if DeltaZ > DeltaZ0, the predictive coding module determines a second macro block division mode of macro blocks in the source video GOP;
in the embodiment of the invention, the first macro block division mode is hierarchical division, and the image is divided according to a four-level tree structure; the second macro block dividing mode is self-adaptive dividing, image blocks are divided in a self-adaptive mode according to the content and the characteristics of the current image, and dividing positions and sizes are determined by detecting the characteristics of edges, textures and the like; the partitioning of the macro blocks can also be adjusted by those skilled in the art according to the specific circumstances.
The method for flexibly selecting and dividing the macro blocks according to the characteristics of the frame numbers in the GOP of the current image can better process the video in the complex scene and can realize the coding effect with higher coding efficiency and better quality.
In particular, the predictive coding module determines the current frame type according to the time domain position of the current frame in the GOP, thereby determining the predictive mode of the current frame image coding,
if the current frame is located in the first frame or the last frame of the GOP, the current frame is determined to be an I frame, intra-frame prediction is adopted, if the current frame is located in the second frame to the last but one frame of the GOP, the current frame determines the type of the current frame and the prediction mode of image coding according to the comparison result of the structural similarity index SSIM between the adjacent previous frame and the next frame and the standard structural similarity index SSIM0, and the structural similarity index SSIM is set:
SSIM=((2×μx×μy+c1)×(2×σxy+c2))/((μx^2+μy^2+c1)×(σx^2+σ
y^2+c2))
wherein x and y respectively represent two images to be compared, μx and μy respectively represent the luminance average value thereof, σx2 and σy2 respectively represent the luminance variance thereof, σxy represents the covariance between them, and c1 and c2 are constant terms;
if SSIM is less than or equal to SSIM0, determining the current frame as a P frame, and adopting forward prediction;
if SSIM is greater than SSIM0, determining the current frame as a B frame, and adopting bidirectional prediction;
in the embodiment of the invention, the standard structure similarity index SSIM0 has a value of 0.5, and a person skilled in the art can also adjust the standard structure similarity index according to specific conditions.
The invention determines the type of the current frame and the prediction mode of image coding according to the comparison result of the structural similarity index SSIM of the current frame and the standard structural similarity index SSIM0, can reduce the data quantity and the transmission bandwidth as much as possible on the premise of ensuring the video quality, improves the video coding efficiency and the transmission speed, and simultaneously reduces the storage and transmission cost.
Specifically, the data quantization module determines a pre-quantization coefficient according to a macro block division mode adopted by a current image processing block;
if the macro block division mode adopted by the current image processing block is a first macro block division mode, the front quantization coefficient of the data quantization module is a first front quantization coefficient;
if the macro block division mode adopted by the current image processing block is a second macro block division mode, the front quantization coefficient of the data quantization module is a second front quantization coefficient;
in the embodiment of the present invention, the first pre-quantization coefficient is 0.3, and the second pre-quantization coefficient is 0.4, and those skilled in the art can also adjust the pre-quantization coefficient according to specific situations.
The invention determines the prepositioned quantization coefficient according to the macro block division mode adopted by the current image processing block, and can carry out self-adaptive adjustment aiming at different macro block sizes and complexity degrees, thereby better adapting to the coding requirements under different scenes. In addition, the embodiment of the invention provides two choices of the first pre-quantization coefficient and the second pre-quantization coefficient, and the two choices can be adjusted according to specific conditions, so that the coding effect and the video quality are further improved.
Specifically, the HEVC data quantization module determines a centrally-mounted quantization coefficient according to a comparison result of a ratio W of the number of B frames in a GOP to the total frame number in the GOP to a frame number ratio standard W0 in a time domain where the current image processing block is located;
if W is less than or equal to W0, the middle-set quantization coefficient of the HEVC data quantization module is a first middle-set quantization coefficient;
if W is more than W0, the middle-set quantization coefficient of the HEVC data quantization module is a second middle-set quantization coefficient;
in the embodiment of the invention, the standard quantity ratio W0 is 50%, the first centrally-mounted quantized coefficient is 0.1, and the second pre-mounted quantized coefficient is 0.2, and those skilled in the art can adjust the standard quantity ratio and the centrally-mounted quantized coefficient according to specific conditions.
The invention determines the centrally-arranged quantization coefficient according to the comparison result of the ratio of the total frame number in the GOP occupied by the number of B frames in the GOP in the time domain where the current image processing block is positioned and the ratio of the standard number, and can carry out self-adaptive adjustment according to the information such as the number and the position of the B frames in the video sequence, thereby better adapting to the coding requirements in different scenes. In addition, the embodiment of the invention provides two choices of the first middle quantization coefficient and the second middle quantization coefficient, and the two choices can be adjusted according to specific conditions, so that the coding effect and the video quality are further improved. By the mode, the coding efficiency and the video quality can be ensured, and meanwhile, the coding requirements under different scenes can be better met.
Specifically, the data entropy coding module determines the length of a cyclic redundancy check code added in data coding according to the comparison result of the final quantized coefficient L and the final quantized coefficient standard L0, wherein the final quantized coefficient=the front quantized coefficient×the middle quantized coefficient;
if L is less than or equal to L0, the data entropy coding module determines that the redundancy coding length is the first cyclic redundancy check code length;
if L is more than L0, the data entropy coding module determines that the redundancy coding length is the second cyclic redundancy check code length;
in the embodiment of the present invention, the final quantized coefficient standard L0 is 0.1, the first cyclic redundancy check code length is 16 bits, and the second cyclic redundancy check code length is 32 bits, and those skilled in the art can adjust the final quantized coefficient standard, the first cyclic redundancy check code length, and the second cyclic redundancy check code length according to specific situations.
The invention determines the final quantized coefficient L according to the pre-quantized coefficient and the centrally-arranged quantized coefficient, and determines the length of the cyclic redundancy check code added in the data coding according to the comparison result of the pre-quantized coefficient and the centrally-arranged quantized coefficient standard L0, thereby improving the reliability of video transmission and storage, reducing the risks of data loss and transmission errors, and simultaneously adjusting the parameters such as the final quantized coefficient standard, the first cyclic redundancy check code length, the second cyclic redundancy check code length and the like according to specific conditions under different scenes so as to achieve better effects.
Specifically, the data entropy coding module determines a data packet transmission error control method according to a comparison result of a difference value delta L between a final quantized coefficient L and a final quantized coefficient standard L0 and a final quantized coefficient difference value standard delta L0;
if delta L is less than or equal to delta L0, the data packet transmission error control method of the data entropy coding module is a first error control method;
if delta L > -delta L0, the data packet transmission error control method of the data entropy coding module is a second error control method;
in the embodiment of the invention, the first error control method is to add a unique serial number to each data packet, the data decoding module reassembles the data packets according to the serial number sequence, if a data packet with a certain serial number is missing, the data decoding module sends a feedback signal to the data entropy encoding module and requests to resend the data packets, if a data packet with a certain serial number is repeated, the data decoding module deletes redundant data packets,
the second error control method is to add a unique time stamp to each data packet to identify the time of transmission or reception of each data packet, and the data decoding module sorts the data packets and removes duplicate packets.
The first error control method is suitable for network transmission scenes, transmission errors are reduced as much as possible on the premise of ensuring video quality, the second error control method is suitable for storage scenes, data packets can be played in correct sequence, the problem of repeated or lost data packets caused by network delay and the like is avoided, the data transmission and storage problems in different scenes are solved by adopting different error control methods, the reliability of video transmission and storage can be improved, transmission errors and storage errors are reduced as much as possible on the premise of ensuring video quality, and accordingly the transmission speed is improved and storage space is saved.
Specifically, the data decoding module detects the data packet according to the cyclic redundancy check code, and determines an error correction mode according to the comparison result of the percentage M of the detected error bit number in the data packet bit number and the standard percentage M0;
if M is less than or equal to M0, the error correction mode of the data decoding module is a first error correction mode;
if M is more than M0, the error correction mode of the data decoding module is a second error correction mode;
in the embodiment of the invention, the standard percentage M0 is 60%, the first error correction mode sends a feedback signal to the data entropy coding module for the data decoding module, tells the data entropy coding module which data packets have errors and requests to resend the data packets, the second error correction mode sends the feedback signal to the data entropy coding module for the data decoding module, the data entropy coding module carries out data coding again according to Hamming codes and then sends the data coded data to the data decoding module, and the data decoding module restores the original data through decoding.
The invention detects the data packet according to the cyclic redundancy check code, and determines the error correction mode according to the comparison result of the percentage of the error bit number in the data packet bit number and the standard percentage, and can reduce the redundancy coding length as much as possible on the premise of ensuring the video quality, thereby improving the transmission speed and saving the storage space.
Thus far, the technical solution of the present invention has been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of protection of the present invention is not limited to these specific embodiments. Equivalent modifications and substitutions for related technical features may be made by those skilled in the art without departing from the principles of the present invention, and such modifications and substitutions will be within the scope of the present invention.
The foregoing description is only of the preferred embodiments of the invention and is not intended to limit the invention; various modifications and variations of the present invention will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A video coding and decoding joint error control method for an HEVC data option, comprising:
step S1, a preprocessing module determines whether adjacent frame images are divided into the same GOP according to the mean square error of pixel values between the adjacent frame images of a source video, and counts the number of frames of the GOP;
step S2, a prediction coding module determines the macro block scale of a source video GOP according to the number of frames in the source video GOP;
step S3, a predictive coding module determines a division mode of macro blocks in a source video GOP according to the difference value between the number of frames in the source video GOP and the standard number of frames;
s4, determining the type of the current frame by a prediction coding module according to the time domain position of the current frame in the GOP, so as to determine the prediction mode of the current frame image coding;
step S5, the data quantization module determines a prepositioned quantization coefficient according to a macro block division mode adopted by the current image processing block;
step S6, the data quantization module determines a centrally-arranged quantization coefficient according to the ratio of the number of B frames in the GOP to the total number of frames in the GOP in the time domain where the current image processing block is positioned;
step S7, the data entropy coding module determines the length of the cyclic redundancy check code added in the data coding according to the final quantized coefficient;
step S8, the data entropy coding module determines a data packet transmission error control method according to the difference value between the final quantized coefficient and the final quantized coefficient standard;
step S9, the data decoding module detects the data packet according to the cyclic redundancy check code, and determines an error correction mode according to the percentage of the detected error bit number in the data packet bit number;
in the step S1, the preprocessing module determines whether the adjacent frame images are divided into the same GOP according to the comparison result of the mean square error of the pixel values and the mean square error standard of the pixel values between the adjacent frame images of the source video, counts the number of frames of the GOP, and divides the adjacent frame images into the same GOP if the mean square error of the pixel values is less than or equal to the mean square error standard of the pixel values; and if the pixel value mean square error is larger than the pixel value mean square error standard, dividing the adjacent frame image into the next GOP.
2. The joint error control method for video coding and decoding of HEVC data options according to claim 1, wherein the preprocessing module calculates the mean square error MSE of pixel values between adjacent frame images according to the following formula, and sets up
MSE=1/mn×∑∑[x(i,j)-y(i,j)]^2
Where m represents the width of the image, n represents the height of the image, and x (i, j) and y (i, j) represent the pixel gray values of the ith row and jth column in the two images, respectively.
3. The method for joint error control of video coding and decoding of HEVC data options according to claim 2, wherein the predictive coding module determines a macroblock size of a source video GOP based on a comparison of a number of frames in the source video GOP to a standard number of frames;
if the frame number is less than or equal to the standard frame number, the macro block scale of the source video GOP is a first scale;
and if the frame number is greater than the standard frame number, the macro block scale of the source video GOP is a second scale.
4. A video coding and decoding joint error control method according to the HEVC data option of claim 3, wherein the predictive coding module determines a partition mode of a macro block in a source video GOP according to a comparison result of a difference between a frame number in the source video GOP and a standard frame number difference, the partition mode including a first macro block partition mode of dividing an image into images according to a four-level tree structure and a second macro block partition mode of adaptively dividing an image block according to a current image content and characteristics, and determining a partition position and a partition size by detecting characteristics such as edges and textures.
5. The method for jointly controlling error in video coding and decoding according to claim 4, wherein the prediction coding module determines a current frame type according to a time domain position of the current frame in a GOP, so as to determine a prediction mode of image coding of the current frame, if the current frame is located in a first frame or a last frame of the GOP, the current frame is determined to be an I frame, intra-frame prediction is adopted, and if the current frame is located in a second frame to a last but one frame of the GOP, the current frame determines a prediction mode of image coding and a current frame type according to a comparison result of a structural similarity index SSIM between adjacent previous frames and next frames thereof and a standard structural similarity index SSIM 0;
if SSIM is less than or equal to SSIM0, determining the current frame as a P frame, and adopting forward prediction;
if SSIM is greater than SSIM0, determining the current frame as a B frame, and adopting bidirectional prediction;
the predictive coding module calculates the structural similarity index SSIM according to the following formula, and sets
SSIM=((2×μx×μy+c1)×(2×σxy+c2))/((μx^2+μy^2+c1)×(σx^2+σ
y^2+c2))
Wherein x and y represent two images to be compared respectively, μx and μy represent their luminance mean values respectively, σx2 and σy2 represent their luminance variances respectively, σxy represents the covariance between them, and c1 and c2 are constant terms.
6. The video coding joint error control method of HEVC data option of claim 5, wherein the data quantization module determines a pre-quantization coefficient according to a macroblock partitioning scheme employed by a current image processing block;
if the macro block division mode adopted by the current image processing block is a first macro block division mode, the front quantization coefficient of the data quantization module is a first front quantization coefficient;
and if the macroblock division mode adopted by the current image processing block is a second macroblock division mode, the front quantization coefficient of the data quantization module is a second front quantization coefficient.
7. The method for jointly controlling error in video coding and decoding according to claim 6, wherein the data quantization module determines a centrally-located quantization coefficient according to a comparison result of a ratio W of the number of B frames in a GOP to a total frame number in the GOP to a frame number ratio standard W0 in a time domain in which a current image processing block is located;
if W is less than or equal to W0, the middle quantization coefficient of the data quantization module is a first middle quantization coefficient;
if W is greater than W0, the middle quantization coefficient of the data quantization module is a second middle quantization coefficient.
8. The method according to claim 7, wherein the data entropy encoding module determines a cyclic redundancy check code length added in data encoding according to a comparison result of a final quantization coefficient L and a final quantization coefficient standard L0, wherein the final quantization coefficient l=a pre-quantization coefficient x a mid-quantization coefficient;
if L is less than or equal to L0, the data entropy coding module determines that the redundancy coding length is the first cyclic redundancy check code length;
if L > L0, the data entropy coding module determines that the redundancy coding length is the second cyclic redundancy check code length.
9. The joint error control method for video coding and decoding of HEVC data options according to claim 7, wherein the data entropy coding module determines a data packet transmission error control method according to a comparison result of a difference Δl of a final quantized coefficient L and a final quantized coefficient standard L0 and a final quantized coefficient difference standard Δl0, the data packet transmission error control method includes adding a unique sequence number to each data packet, the data decoding module reassembles the data packets according to the sequence number order, if a data packet of a certain sequence number is missing, indicating that the data packet has been lost, the data decoding module sends a feedback signal to the data entropy coding module and requests to retransmit the data packets, if a data packet of a certain sequence number is repeated, the data decoding module deletes a first error control method of an unnecessary data packet and adds a unique time stamp to each data packet, identifies a transmission or reception time of each data packet, and the data decoding module orders the data packets and removes a second error control method of repeated packets.
10. The method according to claim 7, wherein the data decoding module detects the data packets according to the cyclic redundancy check code, and determines an error correction mode according to a comparison result of a percentage of the number of detected error bits in the number of data packets to a standard percentage, the error correction mode includes the data decoding module sending a feedback signal to the data entropy encoding module informing the data entropy encoding module of which data packets have errors, and requesting the data decoding module to resend the first error correction mode of the data packets and sending the feedback signal to the data entropy encoding module, the data entropy encoding module encoding the data again according to the hamming code, and the data decoding module restoring the second error correction mode of the original data by decoding.
CN202310668881.3A 2023-06-07 2023-06-07 Video coding and decoding joint error control method for HEVC data option Active CN116647704B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310668881.3A CN116647704B (en) 2023-06-07 2023-06-07 Video coding and decoding joint error control method for HEVC data option

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310668881.3A CN116647704B (en) 2023-06-07 2023-06-07 Video coding and decoding joint error control method for HEVC data option

Publications (2)

Publication Number Publication Date
CN116647704A true CN116647704A (en) 2023-08-25
CN116647704B CN116647704B (en) 2024-03-12

Family

ID=87615285

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310668881.3A Active CN116647704B (en) 2023-06-07 2023-06-07 Video coding and decoding joint error control method for HEVC data option

Country Status (1)

Country Link
CN (1) CN116647704B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116962685A (en) * 2023-09-21 2023-10-27 杭州爱芯元智科技有限公司 Video encoding method, video encoding device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101242540A (en) * 2007-02-09 2008-08-13 安凯(广州)软件技术有限公司 Error control method for video decoder chip
CN107277549A (en) * 2017-06-07 2017-10-20 南京邮电大学 A kind of HEVC intracoded frame error concealing methods based on grain angle predictive mode
WO2021244341A1 (en) * 2020-06-05 2021-12-09 中兴通讯股份有限公司 Picture coding method and apparatus, electronic device and computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101242540A (en) * 2007-02-09 2008-08-13 安凯(广州)软件技术有限公司 Error control method for video decoder chip
CN107277549A (en) * 2017-06-07 2017-10-20 南京邮电大学 A kind of HEVC intracoded frame error concealing methods based on grain angle predictive mode
WO2021244341A1 (en) * 2020-06-05 2021-12-09 中兴通讯股份有限公司 Picture coding method and apparatus, electronic device and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱徐来;汪勤;陈秀;李晓辉;: "一种基于H.264\\AVC的差错隐藏方法", 信息技术, no. 03 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116962685A (en) * 2023-09-21 2023-10-27 杭州爱芯元智科技有限公司 Video encoding method, video encoding device, electronic equipment and storage medium
CN116962685B (en) * 2023-09-21 2024-01-30 杭州爱芯元智科技有限公司 Video encoding method, video encoding device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN116647704B (en) 2024-03-12

Similar Documents

Publication Publication Date Title
EP2258113B1 (en) Fast macroblock delta qp decision
EP0901288B1 (en) Moving image coding method and apparatus
US5847776A (en) Method for entropy constrained motion estimation and coding of motion vectors with increased search range
CN111819854B (en) Method and apparatus for coordinating multi-sign bit concealment and residual sign prediction
KR101016168B1 (en) Method and apparatus for encoder assisted-frame rate up conversion (ea-fruc) for video compression
US20060188025A1 (en) Error concealment
US10171829B2 (en) Picture encoding device and picture encoding method
US20090086828A1 (en) MPEG-4 Streaming System With Adaptive Error Concealment
US20090147847A1 (en) Image coding method and apparatus, and image decoding method
US8891892B2 (en) Image encoding method using adaptive preprocessing scheme
CA2641522A1 (en) Coding device, coding method, and program
JP2003533954A (en) Video coding method
US20090245371A1 (en) Method and apparatus for encoding/decoding information about intra-prediction mode of video
CN1128099A (en) A method for determining whether to intra code a video block
CN116647704B (en) Video coding and decoding joint error control method for HEVC data option
CN105191312A (en) Resource for encoding a video signal
CN110933430B (en) Secondary coding optimization method
CN110113610B (en) Data transmission method and device
TWI689198B (en) Method and apparatus for encoding processing blocks of a frame of a sequence of video frames using skip scheme
Li et al. A bit allocation method based on inter-view dependency and spatio-temporal correlation for multi-view texture video coding
CN1206994A (en) Signal encoding device and method, signal recording medium and signal transmission method
US8964836B2 (en) Method and apparatus for spatial predictive encoding and/or decoding of video data
CN101895752B (en) Video transmission method, system and device based on visual quality of images
US20120281756A1 (en) Complexity change detection for video transmission system
US20050141616A1 (en) Video encoding and decoding methods and apparatuses using mesh-based motion compensation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant