WO2018113308A1 - 视频解码错误的处理方法及装置、存储介质 - Google Patents

视频解码错误的处理方法及装置、存储介质 Download PDF

Info

Publication number
WO2018113308A1
WO2018113308A1 PCT/CN2017/095349 CN2017095349W WO2018113308A1 WO 2018113308 A1 WO2018113308 A1 WO 2018113308A1 CN 2017095349 W CN2017095349 W CN 2017095349W WO 2018113308 A1 WO2018113308 A1 WO 2018113308A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame
mode
preset
error
threshold
Prior art date
Application number
PCT/CN2017/095349
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 深圳市中兴微电子技术有限公司
Publication of WO2018113308A1 publication Critical patent/WO2018113308A1/zh

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/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/51Motion estimation or motion compensation
    • H04N19/573Motion compensation with multiple frame prediction using two or more reference frames in a given prediction direction
    • 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
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • H04N21/64784Data processing by the network
    • H04N21/64792Controlling the complexity of the content stream, e.g. by dropping packets

Definitions

  • the present invention relates to the field of video decoding technologies, and in particular, to a method and device for processing video decoding errors, and a storage medium.
  • the current patents and literatures mainly study the error concealment technology corresponding to each decoding standard.
  • block segmentation technology is used for error concealment.
  • Domain and airspace hiding algorithms propose improved error concealment algorithms.
  • the traditional spatial error concealment technology mainly adopts the adaptive selection weighted pixel average interpolation and direction interpolation based on direction entropy.
  • the patent literature has improved the direction interpolation and improved the accuracy of edge direction estimation. Improvements, mainly for the motion vector search match is not accurate enough and the motion is violent, the missing blocks are hidden inaccurately.
  • the problem is improved, and the accuracy of missing macroblock matching is improved by adopting methods such as outer boundary matching, increasing motion vector set, expanding reference frame range, and changing the minimum error calculation method.
  • embodiments of the present invention are directed to providing a video decoding error processing method and apparatus, and a storage medium, which can solve the phenomenon of video blooming and jamming.
  • An embodiment of the present invention provides a method for processing a video decoding error, where the method includes:
  • the preset mode is selected to adjust the error frame, and the error frame includes an I frame.
  • the embodiment of the invention further provides a processing device for processing a video decoding error, the device comprising: a detecting module, a comparing module and a processing module; wherein
  • the detecting module is configured to detect a network packet loss rate and an I frame interval
  • the comparing module is configured to compare the network packet loss rate with a preset first threshold, obtain a first comparison result, and compare the I frame interval with a preset second threshold to obtain a second comparison result;
  • the processing module is configured to: when the error frame is detected, select a preset mode to adjust the error frame according to the first comparison result and the second comparison result, where the error frame includes I frame.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the foregoing video decoding error processing method.
  • the method and device for processing video decoding errors and the storage medium provided by the embodiments of the present invention first detect a network packet loss rate and an I frame interval, and then compare the network packet loss rate with a preset first threshold to obtain a first comparison. As a result, comparing the I frame interval with a preset second threshold to obtain a second comparison result; when an error frame is detected, selecting a preset mode pair according to the first comparison result and the second comparison result The error frame is adjusted, and the error frame includes an I frame. It can be seen that the embodiment of the present invention selects an appropriate processing mode for video decoding errors according to the detected network packet loss rate and the distance of the I frame interval, and adjusts the error reference frame and simultaneously searches for re-decoding. The next non-incorrect frame avoids the phenomenon of video flowering and jamming, which greatly enhances the compatibility of video transmission to the network, improves the video decoding accuracy, and ensures the normal transmission of video data.
  • FIG. 1 is a schematic diagram of inter prediction encoding of motion estimation according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of interframe prediction coding according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of an implementation process of Embodiment 1 of a video decoding error processing method according to the present invention
  • FIG. 4 is a schematic diagram of a refinement process for selecting an preset mode to adjust an error frame in the implementation flow shown in FIG. 3;
  • FIG. 5 is a schematic diagram of a processing flow based on the first mode
  • FIG. 6 is a schematic diagram of a processing flow based on a second mode
  • FIG. 7 is a schematic diagram of a processing flow based on a third mode
  • FIG. 8 is a schematic diagram of a processing flow based on a fourth mode
  • FIG. 9 is a schematic flowchart of an implementation process of a second embodiment of a video decoding error processing method according to the present invention.
  • FIG. 10 is a schematic structural diagram of a first embodiment of a video decoding error processing apparatus according to the present invention.
  • FIG. 11 is a schematic structural diagram of a refinement of a processing module in the processing device shown in FIG. 10;
  • FIG. 12 is a schematic structural diagram of a second embodiment of a video decoding error processing apparatus according to the present invention.
  • the video decoding error processing method provided by the embodiment of the present invention is mainly applied to a video processing system, and selects an appropriate processing mode for video decoding errors according to the detected network packet loss rate and the I frame interval.
  • the video decoding error is processed, which can effectively balance the video screen and the card to avoid the phenomenon of video screen and jam.
  • FIG. 1 is a schematic diagram of inter prediction coding for motion estimation according to an embodiment of the present invention.
  • I is an original input
  • I′ is a predicted value
  • a difference e between I and I′ is quantized as e′, a video map.
  • I" is compensated for I'
  • the residual data e' is subjected to residual prediction coding.
  • the function Ce performs predictive coding
  • the motion vector n is predictively encoded by the motion vector predictive coding function Cn.
  • FIG. 2 is a schematic diagram of inter prediction coding according to an embodiment of the present invention.
  • the frame is used as the reference frame of the following frame, the subsequent frame is referenced by the error frame during decoding, and the error is amplified and deferred to the following frame, so when an error is detected Frame, the error reference frame needs to be adjusted.
  • FIG. 3 is a schematic flowchart of an implementation of a method for processing a video decoding error according to the first embodiment of the present invention.
  • the method for processing a video decoding error in this embodiment includes the following steps:
  • Step 301 Detect a network packet loss rate and an I frame interval.
  • the video network data packet will be lost due to the transmission in the middle of the video network, and the network packet loss rate is the ratio of the number of data packet loss to the total number of data packets transmitted, which is important for the video network. Therefore, in the case of normal transmission, the network packet loss rate should be controlled within a certain range; if the network packet loss rate is higher during the video decoding process, the more frame frames are bound to affect the user's viewing experience; In an embodiment, the network packet loss rate can be detected by using a ping command.
  • the I frame is an important frame of the video image, which is a complete reservation of one frame. Only the frame data can be decoded during decoding, and the distance of the I frame interval affects the length of the GOP, which affects the speed of reading the GOP. The longer the interval is, the longer the search for the I frame is, and the longer the video switching time is.
  • the I frame interval is determined by detecting the number of video frames between two adjacent I frames. That is, in the embodiment of the present invention, the I frame interval is the number of interval frames between two adjacent I frames in the video.
  • the preset mode of the video decoding error processing is selected according to the network packet loss rate and the I frame interval. Set the mode to perform the corresponding processing operations.
  • Step 302 Compare the network packet loss rate with a preset first threshold, obtain a first comparison result, compare the I frame interval with a preset second threshold, and obtain a second comparison result.
  • the first threshold is used to indicate a limit parameter of the network packet loss rate.
  • the size of the first threshold may be set according to actual needs.
  • the first threshold may be in the range of 2% to 6%.
  • the value in this embodiment, may be described in detail by taking the first threshold value as 2% as an example; the second threshold value is used to indicate a boundary parameter of the I frame interval, and the second threshold value may be based on
  • the value of the second threshold may be an integer value of 20 frames to 50 frames.
  • a second threshold value of 25 may be used as an example for detailed description.
  • the first threshold here is a threshold corresponding to the network packet loss rate, and is usually between 0 and 1.
  • the second threshold may be that the threshold of the I frame interval is a positive integer.
  • comparing the currently detected network packet loss rate with 2% to obtain a first comparison result two situations can be obtained: In the first case, when the network packet loss rate is greater than or equal to 2%, the The network packet loss rate is high. In the second case, when the network packet loss rate is less than 2%, the network packet loss rate is low.
  • Step 303 When an error frame is detected, according to the first comparison result and the second comparison result, selecting a preset mode to adjust an error frame, where the error frame includes an I frame.
  • the selecting the preset mode to adjust the error frame comprises: selecting the preset mode to adjust the error reference frame in the reference frame sequence, and simultaneously searching for the next non-error frame for re-decoding.
  • FIG. 4 is a schematic diagram of a refinement process for selecting an preset mode to adjust an error frame in the implementation flow shown in FIG. 3.
  • step 303 specifically includes the following steps:
  • Step 3031 When the network packet loss rate is greater than a preset first threshold, and the I frame interval is greater than a preset second threshold, selecting a first mode; when the network packet loss rate is greater than a preset first Selecting a second mode when the threshold is less than the preset second threshold; when the network packet loss rate is less than a preset first threshold and the I frame interval is greater than a preset second threshold, Selecting a third mode; selecting a fourth mode when the network packet loss rate is less than a preset first threshold and the I frame interval is less than a preset second threshold;
  • Step 3032 After setting the corresponding identifier value in each preset mode, the identifier value of the currently selected preset mode is matched with the first identifier value, and when the phase and the result are true, the third mode or the fourth mode is selected. And the error reference frame in the reference frame sequence is deleted when the error frame is detected; when the phase and result are false, the first mode or the second mode is selected, and when the error frame is detected, the error reference frame in the frame sequence is referenced Replaced with a target I frame, which is an I frame adjacent to the erroneous reference frame in the sequence of decoded reference frames;
  • the first identifier value may take 2;
  • Step 3033 The identifier value of the currently selected preset mode is matched with the second identifier value.
  • the second mode or the fourth mode is selected, and the next non-error I for re-decoding is searched. a frame; when the phase and the result are false, the first mode or the third mode is selected, and the next non-error frame for re-decoding is searched;
  • the second identification value may take one.
  • the preset mode is divided into four modes: a processing flow based on the first mode is as shown in FIG. 5, a processing flow based on the second mode is as shown in FIG. 6, and a processing flow based on the third mode is as follows.
  • the processing flow shown in FIG. 7 and based on the fourth mode is as shown in FIG. 8.
  • the four preset modes are configured when the decoder is initialized, and respective identification values are set for each preset mode, and each preset mode is set.
  • the value of the identifier can be set according to actual needs; in this embodiment, the identifier value can be set to: the identifier value of the first mode is 0, the identifier value of the second mode is 1, and the identifier value of the third mode is 2,
  • the four mode identification value is 3.
  • the first identifier value may be set according to actual needs.
  • the first identifier value may be used as an example for detailed description;
  • the second identifier value may be set according to actual needs, in this embodiment.
  • the second identification value is 1 as an example for detailed description.
  • detecting a network packet loss rate and an I frame interval comparing a network packet loss rate with 2%, determining a network packet loss rate, comparing an I frame interval with 25, and determining a distance of the I frame interval, according to
  • the network packet loss rate and the I frame interval are far and near, and the preset for video decoding error processing is selected. Mode; among them,
  • the first mode When the network packet loss rate is high (that is, the number of frames is large), and the video I frame interval is far, the first mode is selected; when the network packet loss rate is high (that is, the number of frames is large), and the video I frame interval is close, the second is selected. Mode; when the network packet loss rate is low (ie, the number of frames is small), and the video I frame interval is far, the third mode is selected; when the network packet loss rate is low (that is, the number of frames is small), and the video I frame interval is close, the selection is Fourth mode
  • the identification value of the currently selected preset mode is matched with 2 according to the binary code.
  • the error reference frame in the reference frame sequence is deleted when the error frame is detected; when the phase and the result are false
  • the address of the erroneous reference frame in the reference frame sequence is directed to the I frame adjacent to the erroneous reference frame in the sequence of decoded reference frames;
  • the identification value of the currently selected preset mode is matched with 1 according to the binary code.
  • the preset mode for video decoding error processing is selected, and the error frame can be adjusted by selecting the preset mode to avoid the video screen and
  • the phenomenon of Caton is because: in the case of high network packet loss rate, there are many frames, and the erroneous reference frame in the reference frame sequence is replaced with the I frame adjacent to the erroneous reference frame in the decoded reference frame sequence. Taking the I frame adjacent to the erroneous reference frame in the decoded reference frame sequence as the reference frame can avoid the phenomenon that the available reference frame can not be found all the time and cause the screen; in the case where the I frame interval is far, the search is performed when the decoding is wrong. The next non-error frame used for re-decoding can avoid the time-consuming overhead caused by the I-frame and cause the phenomenon of stagnation.
  • FIG. 9 is a schematic flowchart of the implementation of the video decoding error in the second embodiment of the present invention.
  • the video decoding error processing method in the first embodiment further includes:
  • Step 304 Set the fourth mode to adjust the error frame.
  • the decoder is initially configured to decode the video frame in the fourth mode, and the identifier is decoded.
  • the value is 3;
  • the identification values 3 and 2 of the fourth mode are phase-matched, and the result of the phase is true.
  • the error reference frame is deleted; and the identification value of the fourth mode is 3 and , the phase and the result are true, and the video frame is continuously decoded after searching for the next non-error I frame for re-decoding when the decoding is wrong;
  • the network packet loss rate is 2% and the I frame interval is 25, the first mode is selected, and the identifier value is 0.
  • the identification value 0 of the first mode is equal to 2, and the result is false.
  • the address of the erroneous reference frame in the reference frame sequence is pointed to the decoded reference frame sequence.
  • the decoder reinitializes the configuration, configures the first mode, and the identification value is 0, and continues to decode the video frame.
  • This switching mode process can be seamless during video viewing. Connection, from the user's point of view, basically can not see any abnormal changes in the picture, solve the problem of video screen and jam.
  • the video decoding error processing apparatus in this embodiment includes a detecting module 41, a comparing module 42, and a processing module 43.
  • the detecting module 41 is configured to detect a network packet loss rate and an I frame interval.
  • video network packets are transmitted during the data transmission process due to midway transmission.
  • the network packet loss rate is the ratio of the number of lost data packets to the total number of transmitted data packets. It is an important parameter of the video network; therefore, under normal transmission conditions, the network packet loss rate should be controlled within a certain range. If, in the video decoding process, the network packet loss rate is higher, the more frame frames are bound to affect the user's viewing experience. In this embodiment, the network packet loss rate can be detected by using a ping command.
  • the I frame is an important frame of the video image, which is a complete reservation of one frame. Only the frame data can be decoded during decoding, and the distance of the I frame interval affects the length of the GOP, which affects the speed of reading the GOP. The longer the interval is, the longer the search for the I frame is, and the longer the video switching time is.
  • the I frame interval is determined by detecting the number of video frames between two adjacent I frames.
  • the preset mode of the video decoding error processing is selected according to the network packet loss rate and the I frame interval. Set the mode to perform the corresponding processing operations.
  • the comparing module 42 is configured to compare the network packet loss rate with a preset first threshold, obtain a first comparison result, compare the I frame interval with a preset second threshold, and obtain a second comparison result. ;
  • the first threshold is used to indicate a limit parameter of the network packet loss rate.
  • the size of the first threshold may be set according to actual needs.
  • the first threshold may be in the range of 2% to 6%.
  • the value of the second threshold is used to describe the boundary parameter of the I frame interval, and the second threshold value can be set according to actual needs.
  • the value of the second threshold may be an integer value of 20 frames to 50 frames.
  • a second threshold value of 25 may be used as an example for detailed description.
  • comparing the currently detected network packet loss rate with 2% to obtain a first comparison result two situations can be obtained: In the first case, when the network packet loss rate is greater than or equal to 2%, the The network packet loss rate is high. In the second case, when the network packet loss rate is less than 2%, the network packet loss rate is low.
  • the processing module 43 is configured to: when an error frame is detected, select an preset mode to adjust an error frame according to the first comparison result and the second comparison result, where the error frame includes an I frame.
  • FIG. 11 is a schematic diagram showing a detailed structure of a processing module in the processing apparatus shown in FIG. 10.
  • the processing module 43 includes a selecting unit 431 and a processing unit 432;
  • the selecting unit 431 is configured to select the first mode when the network packet loss rate is greater than a preset first threshold and the I frame interval is greater than a preset second threshold; when the network packet loss rate is greater than Selecting a second mode when the first threshold is preset and the I frame interval is less than a preset second threshold; when the network packet loss rate is less than a preset first threshold and the I frame interval is greater than a preset
  • the third mode is selected, the third mode is selected; when the network packet loss rate is less than a preset first threshold and the I frame interval is less than a preset second threshold, the fourth mode is selected;
  • the processing unit 432 is configured to adjust an erroneous reference frame in the reference frame sequence according to the first comparison result and the second comparison result, and search for a next non-error frame for re-decoding; And after the corresponding identifier value is set in each preset mode, the identifier value of the currently selected preset mode is matched with the first identifier value, and when the phase and the result are true, the third mode or the fourth mode is selected.
  • the error reference frame in the reference frame sequence is deleted when the error frame is detected; when the phase and result are false, the first mode or the second mode is selected, and when the error frame is detected, the error reference frame in the frame sequence is referenced And replacing with the target I frame, the target I frame is an I frame adjacent to the erroneous reference frame in the sequence of the decoded reference frame; and the identifier value of the currently selected preset mode is matched with the second identification value, when When the result is true, the second mode or the fourth mode is selected, and the next non-error I frame for re-decoding is searched; when the phase and the result are false, the first mode or the third mode is selected, and the search is used for re- The next non-decoding Error frame
  • the first identifier value may take 2, and the second identifier value may take 1.
  • the preset mode is divided into four modes: a processing flow based on the first mode is as shown in FIG. 5, a processing flow based on the second mode is as shown in FIG. 6, and a processing flow based on the third mode is as follows.
  • the processing flow shown in FIG. 7 and based on the fourth mode is as shown in FIG. 8.
  • the four preset modes are configured when the decoder is initialized, and respective identification values are set for each preset mode, and each preset mode is set.
  • the value of the identifier can be set according to actual needs; in this embodiment, the identifier value can be set to: the identifier value of the first mode is 0, the identifier value of the second mode is 1, and the identifier value of the third mode is 2,
  • the four mode identification value is 3.
  • the first identifier value may be set according to actual needs.
  • the first identifier value may be used as an example for detailed description;
  • the second identifier value may be set according to actual needs, in this embodiment.
  • the second identification value is 1 as an example for detailed description.
  • detecting a network packet loss rate and an I frame interval comparing a network packet loss rate with 2%, determining a network packet loss rate, comparing an I frame interval with 25, and determining a distance of the I frame interval, according to The network packet loss rate is high and the I frame interval is near, and the preset mode for video decoding error processing is selected;
  • the first mode When the network packet loss rate is high (that is, the number of frames is large), and the video I frame interval is far, the first mode is selected; when the network packet loss rate is high (that is, the number of frames is large), and the video I frame interval is close, the second is selected. Mode; when the network packet loss rate is low (ie, the number of frames is small), and the video I frame interval is far, the third mode is selected; when the network packet loss rate is low (that is, the number of frames is small), and the video I frame interval is close, the selection is Fourth mode
  • the identification value of the currently selected mode is matched with 2 according to the binary code.
  • the error reference frame in the reference frame sequence is deleted when the error frame is detected; when the phase and the result are false, then When the error frame is detected, the address of the erroneous reference frame in the reference frame sequence is pointed to the I frame adjacent to the erroneous reference frame in the sequence of decoded reference frames;
  • the identification value of the currently selected mode is matched with 1 when the phase and the result are True, the next non-error I frame for re-decoding is searched for when decoding is wrong; when the phase and result are false, the next non-error frame for re-decoding is searched for when decoding is wrong.
  • the preset mode for video decoding error processing is selected, and the error frame can be adjusted by selecting the preset mode to avoid the video screen and
  • the phenomenon of Caton is because: in the case of high network packet loss rate, there are many frames, and the erroneous reference frame in the reference frame sequence is replaced with the I frame adjacent to the erroneous reference frame in the decoded reference frame sequence.
  • the I frame adjacent to the erroneous reference frame is used as the reference frame, which can avoid the phenomenon that the available reference frame can not be found all the time and cause the screen; in the case where the I frame interval is far, the decoding error occurs. Searching for the next non-error frame for re-decoding can avoid the time-consuming overhead caused by finding an I-frame and causing a stuck phenomenon.
  • FIG. 12 is a schematic structural diagram of a second embodiment of a video decoding error processing apparatus according to the present invention.
  • the video decoding error processing apparatus of this embodiment includes: a detection module, a comparison module, and a processing module, and includes:
  • the setting module 44 is configured to set a corresponding identification value for each preset mode; and is further configured to set the fourth mode to adjust the error frame.
  • the fourth mode is configured to decode the video frame.
  • the identification value is 3;
  • the identification values 3 and 2 of the fourth mode are phase-matched, and the result of the phase is true.
  • the error reference frame is deleted; and the identification value of the fourth mode is 3 and , the phase and the result are true, and the video frame is continuously decoded after searching for the next non-error I frame for re-decoding when the decoding is wrong;
  • the network packet loss rate is 2% and the I frame interval is 25, the first mode is selected, and the identifier value is 0.
  • the identification value 0 of the first mode is equal to 2, and the result is false.
  • the address of the erroneous reference frame in the reference frame sequence is pointed to the decoded reference frame sequence.
  • the decoder reinitializes the configuration, configures the first mode, and the identification value is 0, and continues to decode the video frame.
  • This switching mode process can be seamless during video viewing. Connection, from the user's point of view, basically can not see any abnormal changes in the picture, solve the problem of video screen and jam.
  • the detecting module 41, the comparing module 42, the processing module 43, the setting module 44, and the selecting unit 431 and the processing unit 432 may each be a central processing unit (CPU) located in the mobile terminal.
  • the processor MPU, Micro Processor Unit
  • DSP Digital Signal Processor
  • FPGA Field Programmable Gate Array
  • the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, where the computer executable instructions are used to perform video decoding errors provided by one or more technical solutions in the foregoing embodiments.
  • the processing method can be, for example, the method as shown in FIGS. 3, 4, and/or 9.
  • the computer storage medium may be various types of storage media, such as a random storage medium, a read-only storage medium, a flash memory, an application hard disk, a USB flash drive, or an optical disk, and the like, and may be a non-transitory storage medium.
  • a packet loss including an image frame occurs in a video
  • a network packet loss rate and an I frame interval of two adjacent I frames at a corresponding position are detected, and the network packet loss rate and the I frame interval and the pre-frame are detected.
  • Set the threshold comparison select the appropriate preset mode to adjust the error frame, and re-decode the next non-error frame as much as possible to reduce the problem of video output such as video screen and jam, and improve the correct rate of video decoding.
  • the invention has the positive industrial effect, and at the same time, the technical solution provided by the embodiment of the invention can be easily realized by the adjustment of the decoding code, and has industrial achievability.

Landscapes

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

Abstract

本发明公开了一种视频解码错误的处理方法,包括:检测网络丢包率和I帧间隔;将所述网络丢包率与预设的第一阈值比较,获得第一比较结果,将所述I帧间隔与预设的第二阈值比较,获得第二比较结果;当检测到错误帧时,根据所述第一比较结果和所述第二比较结果,选择预设模式对错误帧进行调整,所述错误帧包括I帧。本发明还同时公开了一种视频解码错误的处理装置及计算机存储介质。

Description

视频解码错误的处理方法及装置、存储介质
本申请要求申请号为201611184986.8,申请日为2016月12日20日的中国专利申请的优先权,并以该中国专利申请的全部内容作为本申请的参照依据。
技术领域
本发明涉及视频解码技术领域,尤其涉及一种视频解码错误的处理方法及装置、存储介质。
背景技术
随着4K电视的普及,大家对超高清视频的需求也越来越强烈,由于高清视频的数据传输量非常大,而目前的网络带宽对传输4K图像还有一些瓶颈,特别是移动终端的流媒体服务需求迅猛增长后,高清晰度的流媒体需求和日益紧缺的网络带宽资源的矛盾越来越突出,不可避免的会出现在数据输出过程中,由于网络丢包等因素,而导致视频图像花屏和卡顿的情况。
对于视频图像花屏和卡顿的现象,目前的专利和文献主要是针对各个解码标准相对应的错误隐藏技术进行研究,当视频数据出现错误的时候,采用块分割技术进行错误隐藏,通过具体分析时域和空域掩藏算法,提出改进的错误掩藏算法。传统的空域错误隐藏技术主要采用基于方向熵的自适应选择加权像素平均插值和方向插值,有专利文献对方向插值做了相应的改进,提高了边缘方向估计的精确度,对于时域隐藏技术的改进,主要是针对运动矢量搜索匹配不够精确和运动剧烈的丢失块掩藏不准确这两个 问题提出改进,通过采用外边界匹配、增加运动矢量集、扩大参考帧范围、更改计算最小误差方法等方法来提高丢失宏块匹配准确度。
然而,对于网络丢包严重的视频数据,即使采用改进的时域隐藏算法、改进的空域隐藏算法或者两种改进算法相结合,也不能避免花屏和卡顿的现象。因此,亟需寻找一种解决视频花屏和卡顿问题的方法。
发明内容
为解决现有存在的问题,本发明实施例期望提供一种视频解码错误的处理方法及装置、存储介质,能解决视频花屏和卡顿的现象。
为达到上述目的,本发明的技术方案是这样实现的:
本发明实施例提供了一种视频解码错误的处理方法,所述方法包括:
检测网络丢包率和I帧间隔;
将所述网络丢包率与预设的第一阈值比较,获得第一比较结果,将所述I帧间隔与预设的第二阈值比较,获得第二比较结果;
当检测到错误帧时,根据所述第一比较结果和所述第二比较结果,选择预设模式对错误帧进行调整,所述错误帧包括I帧。
本发明实施例还提供了一种视频解码错误的处理装置,所述装置包括:检测模块、比较模块和处理模块;其中,
所述检测模块,配置为检测网络丢包率和I帧间隔;
所述比较模块,配置为将所述网络丢包率与预设的第一阈值比较,获得第一比较结果,将所述I帧间隔与预设的第二阈值比较,获得第二比较结果;
所述处理模块,配置为当检测到错误帧时,根据所述第一比较结果和所述第二比较结果,选择预设模式对错误帧进行调整,所述错误帧包括I 帧。
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行前述视频解码错误的处理方法。
本发明实施例提供的视频解码错误的处理方法及装置、存储介质,先检测网络丢包率和I帧间隔;再将所述网络丢包率与预设的第一阈值比较,获得第一比较结果,将所述I帧间隔与预设的第二阈值比较,获得第二比较结果;当检测到错误帧时,根据所述第一比较结果和所述第二比较结果,选择预设模式对错误帧进行调整,所述错误帧包括I帧。可见,本发明实施例根据检测到的网络丢包率的高低和I帧间隔的远近,来选择针对视频解码错误的适当的处理模式,通过对错误参考帧进行调整并同时搜索用于重新解码的下一非错误的帧,避免了视频花屏和卡顿的现象,从而大大增强了视频传输对网络的兼容性,提高了视频解码准确率,保证了视频数据的正常传输。
附图说明
图1为本发明实施例运动估计的帧间预测编码原理图;
图2为本发明实施例帧间预测编码示意图;
图3为本发明视频解码错误的处理方法实施例一的实现流程示意图;
图4为图3所示实现流程中选择预设模式对错误帧进行调整的细化流程示意图;
图5为基于第一模式的处理流程示意图;
图6为基于第二模式的处理流程示意图;
图7为基于第三模式的处理流程示意图;
图8为基于第四模式的处理流程示意图;
图9为本发明视频解码错误的处理方法实施例二的实现流程示意图;
图10为本发明视频解码错误的处理装置实施例一的组成结构示意图;
图11为图10所示处理装置中处理模块的细化组成结构示意图;
图12为本发明视频解码错误的处理装置实施例二的组成结构示意图。
具体实施方式
本发明实施例提供的视频解码错误的处理方法,主要应用于视频处理系统中,根据检测到的网络丢包率的高低和I帧间隔的远近,来选择针对视频解码错误的适当的处理模式,对视频解码错误进行处理,能够有效均衡视频花屏和卡顿,避免视频花屏和卡顿的现象。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
为了说明当检测到错误帧时需要对错误参考帧进行处理,在图1、图2中,给出了视频图像帧间预测编码原理。
为了消除视频图像的时间冗余,通常采用运动估计的帧间预测编码方法对视频进行编码。图1为本发明实施例运动估计的帧间预测编码原理图,参照图1所示,I为原始输入,I'为预测值,I与I'之差e经过量化后为e',视频图象恢复数据为I”=I'+e',I”与原始数据相比,量化误差为q=e-e',I”经过补偿预测为I',残差数据e'经过残差预测编码函数Ce进行预测编码,运动矢量n经过运动矢量预测编码函数Cn进行预测编码。
图2为本发明实施例帧间预测编码示意图,参照图2所示,根据帧间预测编码的特性,当其中某个B帧或者P帧在传输的过程中数据丢失或者数据错误导致花屏时,由于该帧作为后面帧的参考帧,后面的帧在解码时以错误帧作为参考,错误就会放大和递延到后面的帧,所以当检测到错误 帧,需要将错误参考帧进行调整。
图3为本发明视频解码错误的处理方法实施例一的实现流程示意图,参照图3所示,本实施例中视频解码错误的处理方法包括以下步骤:
步骤301:检测网络丢包率和I帧间隔;
通常,视频网络数据包在数据传输过程中,由于中途的传输,会导致视频网络部分数据包丢失,而网络丢包率是数据包丢失数量与传输的数据包总数的比值,是视频网络的重要参数;因此,在正常传输情况下,网络丢包率应该控制在一定范围内;如果在视频解码过程中,网络丢包率越高,则花屏帧越多,势必会影响用户的观看体验;本实施例中,网络丢包率可以通过ping指令进行检测。
I帧是视频图像的重要帧,为一帧画面的完整保留,解码时只需要本帧数据就可以完成,而I帧间隔的远近会影响GOP长度,进而影响读取GOP的速度,如果I帧间隔越远,搜索I帧的时候越长,视频切换时间越长;本实施例中,通过检测相邻两个I帧之间,视频帧的数量确定I帧间隔。即在本发明实施例中I帧间隔为视频中相邻两个I帧之间的间隔帧数。
可见,网络丢包率和I帧间隔都会影响视频的质量,在本实施例中,根据网络丢包率的高低和I帧间隔的远近来选择视频解码错误处理的预设模式,根据选择的预设模式进行相应的处理操作。
步骤302:将所述网络丢包率与预设的第一阈值比较,获得第一比较结果,将所述I帧间隔与预设的第二阈值比较,获得第二比较结果;
这里,所述第一阈值用来表示网络丢包率高低的界限参数,第一阈值的大小可以根据实际需要进行设置,例如该第一阈值的取值范围可以为2%到6%的百分值,在本实施例中,可以以第一阈值为2%为例进行详细说明;所述第二阈值用来表示I帧间隔远近的界限参数,第二阈值的大小可以根据 实际需要进行设置,例如该第二阈值的取值范围可以为20帧到50帧的整数值,在本实施例中,可以以第二阈值为25为例进行详细说明。
这里的第一阈值为网络丢包率对应的阈值,通常取值为0到1之间。
所述第二阈值可为I帧间隔的阈值为正整数。
可选地,将当前检测到的网络丢包率与2%进行比较,获得第一比较结果,能够得到两种情况:第一种情况是,当网络丢包率大于或等于2%时,此时网络丢包率高;第二种情况是,当网络丢包率小于2%时,此时网络丢包率低。
将当前检测到的I帧间隔与25进行比较,获得第二比较结果,也能够得到两种情况:第一种情况是,I帧间隔大于等于25,此时I帧间隔远;第二种情况是,I帧间隔小于25,此时I帧间隔近。
步骤303:当检测到错误帧时,根据所述第一比较结果和所述第二比较结果,选择预设模式对错误帧进行调整,所述错误帧包括I帧。
可选地,所述选择预设模式对错误帧进行调整包括:选择预设模式对参考帧序列中错误参考帧进行调整,并同时搜索用于重新解码的下一非错误的帧。
图4为图3所示实现流程中选择预设模式对错误帧进行调整的细化流程示意图,参照图4所示,步骤303具体包括以下步骤:
步骤3031,当所述网络丢包率大于预设的第一阈值并且所述I帧间隔大于预设的第二阈值时,选择第一模式;当所述网络丢包率大于预设的第一阈值并且所述I帧间隔小于预设的第二阈值时,选择第二模式;当所述网络丢包率小于预设的第一阈值并且所述I帧间隔大于预设的第二阈值时,选择第三模式;当所述网络丢包率小于预设的第一阈值并且所述I帧间隔小于预设的第二阈值时,选择第四模式;
步骤3032,在每个预设模式设置对应的标识值后,将当前选择的预设模式的标识值和第一标识值相与,当相与结果为真时,选择第三模式或者第四模式,且检测到错误帧时将参考帧序列中的错误参考帧删除;当相与结果为假时,选择第一模式或者第二模式,且检测到错误帧时将参考帧序列中的错误参考帧替换为目标I帧,所述目标I帧为已解码的参考帧序列中与错误参考帧相邻的I帧;
本步骤中,第一标识值可以取2;
步骤3033,将当前选择的预设模式的标识值和第二标识值相与,当相与结果为真时,选择第二模式或者第四模式,且搜索用于重新解码的下一非错误I帧;当相与结果为假时,选择第一模式或者第三模式,且搜索用于重新解码的下一非错误帧;
本步骤中,第二标识值可以取1。
本实施例中,所述预设模式分为四种模式:基于第一模式的处理流程如图5所示、基于第二模式的处理流程如图6所示、基于第三模式的处理流程如图7所示和基于第四模式的处理流程如图8所示,所述四种预设模式在解码器初始化的时候配置,并为每种预设模式设置各自的标识值,各个预设模式的标识值可以根据实际需要进行设置;在本实施例中,标识值可以设置为:第一模式的标识值为0,第二模式的标识值为1,第三模式的标识值为2,第四模式的标识值为3。
所述第一标识值可以根据实际需要进行设置,在本实施例中,可以以第一标识值为2为例进行详细说明;所述第二标识值可以根据实际需要进行设置,在本实施例中,可以以第二标识值为1为例进行详细说明。
可选地,检测网络丢包率和I帧间隔,将网络丢包率与2%进行比较,判断网络丢包率的高低,将I帧间隔与25进行比较,判断I帧间隔的远近,根据网络丢包率的高低和I帧间隔的远近,选择对视频解码错误处理的预设 模式;其中,
当网络丢包率高(即花屏帧多),并且视频I帧间隔远时,选择第一模式;当网络丢包率高(即花屏帧多),并且视频I帧间隔近时,选择第二模式;当网络丢包率低(即花屏帧少),并且视频I帧间隔远时,选择第三模式;当网络丢包率低(即花屏帧少),并且视频I帧间隔近时,选择第四模式;
按照二进制编码将当前选择的预设模式的标识值与2相与,当相与结果为真时,则检测到错误帧时将参考帧序列中的错误参考帧删除;当相与结果为假时,则检测到错误帧时将参考帧序列中的错误参考帧的地址指向已解码的参考帧序列中与错误参考帧相邻的I帧;
按照二进制编码将当前选择的预设模式的标识值与1相与,当相与结果为真时,则解码出错时搜索用于重新解码的下一非错误I帧;当相与结果为假时,则解码出错时搜索用于重新解码的下一非错误帧。
可以理解的是,根据当前检测到的网络丢包率的高低和I帧间隔的远近选择对视频解码错误处理的预设模式,通过选择的预设模式对错误帧进行调整就能避免视频花屏和卡顿的现象,是因为:在网络丢包率高的情况下,花屏帧多,将参考帧序列中的错误参考帧替换为已解码的参考帧序列中与错误参考帧相邻的I帧,以已解码的参考帧序列中与错误参考帧相邻的I帧作为参考帧,可以避免一直找不到可用的参考帧而导致花屏的现象;在I帧间隔远的情况下,解码出错时搜索用于重新解码的下一非错误帧,可以避免找I帧带来的时间开销而导致卡顿的现象。
图9为本发明视频解码错误的处理方法实施例二的实现流程示意图,参照图9所示,本实施例的视频解码错误的处理方法,是在实施例一的步骤301之前还包括:
步骤304,设置所述第四模式对错误帧进行调整。
基于实施例一中视频解码错误的处理方法,在本实施例中,对本发明视频解码错误的处理方法的具体实现举例进行详细说明。
在正常情况下,默认网络情况良好,网络丢包率低(即花屏帧少),I帧间隔近,基本满足正常的视频传输要求,解码器初始化配置为第四模式对视频帧进行解码,标识值为3;
参照图8所示,将第四模式的标识值3与2相与,相与的结果为真,当检测到错误帧时,删除错误参考帧;将第四模式的标识值3与1相与,相与结果为真,解码出错时搜索用于重新解码的下一非错误I帧后继续对视频帧进行解码;
当检测到网络丢包率为2%,I帧间隔为25时,选择第一模式,标识值为0;
参照图5所示,将第一模式的标识值0与2相与,相与结果为假,当检测到错误帧时将参考帧序列中的错误参考帧的地址指向已解码的参考帧序列中与错误参考帧相邻的I帧;将第一模式的标识值0与3相与,相与结果为假,当解码出错时搜索用于重新解码的下一非错误帧。
从第四模式切换到第一模式,解码器重新初始化配置,配置为第一模式,标识值为0,继续对视频帧进行解码,这个切换模式的过程在视频观看的过程中可以做到无缝连接,从用户的角度基本看不到任何画面的异常变化,解决了视频花屏和卡顿的问题。
图10为本发明视频解码错误的处理装置实施例一的组成结构示意图,参照图10所示,本实施例中视频解码错误的处理装置包括检测模块41、比较模块42和处理模块43;其中,
所述检测模块41,配置为检测网络丢包率和I帧间隔;
通常,视频网络数据包在数据传输过程中,由于中途的传输,会导致 视频网络部分数据包丢失,而网络丢包率是数据包丢失数量与传输的数据包总数的比值,是视频网络的重要参数;因此,在正常传输情况下,网络丢包率应该控制在一定范围内,如果在视频解码过程中,网络丢包率越高,则花屏帧越多,势必会影响用户的观看体验;本实施例中,网络丢包率可以通过ping指令进行检测。
I帧是视频图像的重要帧,为一帧画面的完整保留,解码时只需要本帧数据就可以完成,而I帧间隔的远近会影响GOP长度,进而影响读取GOP的速度,如果I帧间隔越远,搜索I帧的时候越长,视频切换时间越长;本实施例中,通过检测相邻两个I帧之间,视频帧的数量确定I帧间隔。
可见,网络丢包率和I帧间隔都会影响视频的质量,在本实施例中,根据网络丢包率的高低和I帧间隔的远近来选择视频解码错误处理的预设模式,根据选择的预设模式进行相应的处理操作。
所述比较模块42,配置为将所述网络丢包率与预设的第一阈值比较,获得第一比较结果,将所述I帧间隔与预设的第二阈值比较,获得第二比较结果;
这里,所述第一阈值用来表示网络丢包率高低的界限参数,第一阈值的大小可以根据实际需要进行设置,例如该第一阈值的取值范围可以为2%到6%的百分值,在本实施例中,可以以第一阈值为2%为例进行详细说明;所述第二阈值用来表示I帧间隔远近的界限参数,第二阈值的大小可以根据实际需要进行设置,例如该第二阈值的取值范围可以为20帧到50帧的整数值,在本实施例中,可以以第二阈值为25为例进行详细说明。
可选地,将当前检测到的网络丢包率与2%进行比较,获得第一比较结果,能够得到两种情况:第一种情况是,当网络丢包率大于或等于2%时,此时网络丢包率高;第二种情况是,当网络丢包率小于2%时,此时网络丢包率低。
将当前检测到的I帧间隔与25进行比较,获得第二比较结果,也能够得到两种情况:第一种情况是,I帧间隔大于等于25,此时I帧间隔远;第二种情况是I帧间隔小于25,此时I帧间隔近。
所述处理模块43,配置为当检测到错误帧时,根据所述第一比较结果和所述第二比较结果,选择预设模式对错误帧进行调整,所述错误帧包括I帧。
图11为图10所示处理装置中处理模块的细化组成结构示意图,参照图11所示,所述处理模块43包括选择单元431和处理单元432;其中,
所述选择单元431,配置为当所述网络丢包率大于预设的第一阈值并且所述I帧间隔大于预设的第二阈值时,选择第一模式;当所述网络丢包率大于预设的第一阈值并且所述I帧间隔小于预设的第二阈值时,选择第二模式;当所述网络丢包率小于预设的第一阈值并且所述I帧间隔大于预设的第二阈值时,选择第三模式;当所述网络丢包率小于预设的第一阈值并且所述I帧间隔小于预设的第二阈值时,选择第四模式;
所述处理单元432,配置为根据所述第一比较结果和所述第二比较结果,对参考帧序列中的错误参考帧进行调整,并搜索用于重新解码的下一非错误的帧;具体用于,在每个预设模式设置对应的标识值后,将当前选择的预设模式的标识值和第一标识值相与,当相与结果为真时,选择第三模式或者第四模式,且检测到错误帧时将参考帧序列中的错误参考帧删除;当相与结果为假时,选择第一模式或者第二模式,且检测到错误帧时将参考帧序列中的错误参考帧替换为目标I帧,所述目标I帧为已解码的参考帧序列中与错误参考帧相邻的I帧;将当前选择的预设模式的标识值和第二标识值相与,当相与结果为真时,选择第二模式或者第四模式,且搜索用于重新解码的下一非错误I帧;当相与结果为假时,选择第一模式或者第三模式,且搜索用于重新解码的下一非错误帧;
所述处理单元432中,第一标识值可以取2,第二标识值可以取1。
本实施例中,所述预设模式分为四种模式:基于第一模式的处理流程如图5所示、基于第二模式的处理流程如图6所示、基于第三模式的处理流程如图7所示和基于第四模式的处理流程如图8所示,所述四种预设模式在解码器初始化的时候配置,并为每种预设模式设置各自的标识值,各个预设模式的标识值可以根据实际需要进行设置;在本实施例中,标识值可以设置为:第一模式的标识值为0,第二模式的标识值为1,第三模式的标识值为2,第四模式的标识值为3。
所述第一标识值可以根据实际需要进行设置,在本实施例中,可以以第一标识值为2为例进行详细说明;所述第二标识值可以根据实际需要进行设置,在本实施例中,可以以第二标识值为1为例进行详细说明。
可选地,检测网络丢包率和I帧间隔,将网络丢包率与2%进行比较,判断网络丢包率的高低,将I帧间隔与25进行比较,判断I帧间隔的远近,根据网络丢包率的高低和I帧间隔的远近,选择视频解码错误处理的预设模式;其中,
当网络丢包率高(即花屏帧多),并且视频I帧间隔远时,选择第一模式;当网络丢包率高(即花屏帧多),并且视频I帧间隔近时,选择第二模式;当网络丢包率低(即花屏帧少),并且视频I帧间隔远时,选择第三模式;当网络丢包率低(即花屏帧少),并且视频I帧间隔近时,选择第四模式;
按照二进制编码将当前选择的模式的标识值与2相与,当相与结果为真时,则检测到错误帧时将参考帧序列中的错误参考帧删除;当相与结果为假时,则检测到错误帧时将参考帧序列中的错误参考帧的地址指向已解码的参考帧序列中与错误参考帧相邻的I帧;
按照二进制编码将当前选择的模式的标识值与1相与,当相与结果为 真时,则解码出错时搜索用于重新解码的下一非错误I帧;当相与结果为假时,则解码出错时搜索用于重新解码的下一非错误帧。
可以理解的是,根据当前检测到的网络丢包率的高低和I帧间隔的远近选择对视频解码错误处理的预设模式,通过选择的预设模式对错误帧进行调整就能避免视频花屏和卡顿的现象,是因为:在网络丢包率高的情况下,花屏帧多,将参考帧序列中的错误的参考帧替换为已解码的参考帧序列中与错误参考帧相邻的I帧,以已解码的参考帧序列中与错误参考帧相邻的I帧作为参考帧,可以避免一直找不到可用的参考帧而导致花屏的现象;在I帧间隔远的情况下,解码出错时搜索用于重新解码的下一非错误帧,可以避免找I帧带来的时间开销而导致卡顿的现象。
图12为本发明视频解码错误的处理装置实施例二的组成结构示意图,参照图12所示,本实施例的视频解码错误的处理装置除了包括检测模块、比较模块和处理模块外,还包括:
设置模块44,用于为每个预设模式设置对应的标识值;还用于设置所述第四模式对错误帧进行调整。
基于实施例一中视频解码错误的处理装置,在本实施例中,对本发明视频解码错误的处理装置的具体实现举例进行详细说明。
在正常情况下,默认网络情况良好,网络丢包率低(即花屏帧少),I帧间隔近,基本满足正常的视频传输要求,解码器初始化时配置为第四模式对视频帧进行解码,标识值为3;
参照图8所示,将第四模式的标识值3与2相与,相与的结果为真,当检测到错误帧时,删除错误参考帧;将第四模式的标识值3与1相与,相与结果为真,解码出错时搜索用于重新解码的下一非错误I帧后继续对视频帧进行解码;
当检测到网络丢包率为2%,I帧间隔为25时,选择第一模式,标识值为0;
参照图5所示,将第一模式的标识值0与2相与,相与结果为假,当检测到错误帧时将参考帧序列中的错误参考帧的地址指向已解码的参考帧序列中与错误参考帧相邻的I帧;将第一模式的标识值0与3相与,相与结果为假,当解码出错时搜索用于重新解码的下一非错误帧。
从第四模式切换到第一模式,解码器重新初始化配置,配置为第一模式,标识值为0,继续对视频帧进行解码,这个切换模式的过程在视频观看的过程中可以做到无缝连接,从用户的角度基本看不到任何画面的异常变化,解决了视频花屏和卡顿的问题。
在实际应用中,所述检测模块41、比较模块42、处理模块43、设置模块44、以及选择单元431和处理单元432均可由位于移动终端中的中央处理器(CPU,Central Processing Unit)、微处理器(MPU,Micro Processor Unit)、数字信号处理器(DSP,Digital Signal Processor)、或现场可编程门阵列(FPGA,Field Programmable Gate Array)等实现。
本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行前述实施例中一个或多个技术方案提供的视频解码错误的处理方法,例如,可如图3、图4和/或图9所示的方法。
所述计算机存储介质可为各种类型的存储介质,例如,随机存储介质、只读存储介质、闪存、应用硬盘、U盘或光盘等,可选为非瞬间存储介质。
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡按照本发明原理所作的修改,都应当理解为落入本发明的保护范围。
工业实用性
本发明实施例中在视频中出现包括图像帧的丢包时,会检测出网络丢包率及对应位置处相邻两个I帧的I帧间隔,基于网络丢包率及I帧间隔与预设的阈值比较,选择合适的预设模式对错误帧进行调整,尽可能的通过重新解码下一个非错误的帧,减少视频花屏及卡顿等视频输出不良的问题,提高了视频解码的正确率,具有积极的工业效果,且同时可以通过解码代码的调整,简便实现本发明实施例提供的技术方案,具有工业可实现性强。

Claims (13)

  1. 一种视频解码错误的处理方法,所述方法包括:
    检测网络丢包率和I帧间隔;
    将所述网络丢包率与预设的第一阈值比较,获得第一比较结果,将所述I帧间隔与预设的第二阈值比较,获得第二比较结果;
    当检测到错误帧时,根据所述第一比较结果和所述第二比较结果,选择预设模式对错误帧进行调整,所述错误帧包括I帧。
  2. 根据权利要求1所述的方法,其中,所述选择预设模式对错误帧进行调整,包括:
    选择预设模式对参考帧序列中的错误参考帧进行调整,并搜索用于重新解码的下一非错误的帧。
  3. 根据权利要求1或2所述的方法,其中,所述预设模式为第一模式:将参考帧序列中的错误参考帧替换为目标I帧,同时搜索用于重新解码的下一非错误帧,所述目标I帧为已解码的参考帧序列中与错误参考帧相邻的I帧;或,
    所述预设模式为第二模式:将参考帧序列中的错误参考帧替换为目标I帧,同时搜索用于重新解码的下一非错误I帧,所述目标I帧为已解码的参考帧序列中与错误参考帧相邻的I帧;或,
    所述预设模式为第三模式:删除参考帧序列中的错误参考帧,同时搜索用于重新解码的下一非错误帧;或,
    所述预设模式为第四模式:删除错误参考帧序列中的错误参考帧,同时搜索用于重新解码的下一非错误I帧。
  4. 根据权利要求3所述的方法,其中,所述根据所述第一比较结果和所述第二比较结果,选择预设模式,包括:
    当所述网络丢包率大于预设的第一阈值并且所述I帧间隔大于预设的第二阈值时,选择所述第一模式;
    当所述网络丢包率大于预设的第一阈值并且所述I帧间隔小于预设的第二阈值时,选择所述第二模式;
    当所述网络丢包率小于预设的第一阈值并且所述I帧间隔大于预设的第二阈值时,选择所述第三模式;
    当所述网络丢包率小于预设的第一阈值并且所述I帧间隔小于预设的第二阈值时,选择所述第四模式。
  5. 根据权利要求3所述的方法,其中,所述方法还包括:为每个预设模式设置对应的标识值;
    所述选择预设模式对参考帧序列中错误参考帧进行调整,并搜索用于重新解码的下一非错误的帧,包括:
    将当前选择的预设模式的标识值和第一标识值相与,当相与结果为真时,选择第三模式或者第四模式,且检测到错误帧时将参考帧序列中的错误参考帧删除;当相与结果为假时,选择第一模式或者第二模式,且检测到错误帧时将参考帧序列中的错误参考帧替换为目标I帧,所述目标I帧为已解码的参考帧序列中与错误参考帧相邻的I帧;
    将当前选择的预设模式的标识值和第二标识值相与,当相与结果为真时,选择第二模式或者第四模式,且搜索用于重新解码的下一非错误I帧;当相与结果为假时,选择第一模式或者第三模式,且搜索用于重新解码的下一非错误帧。
  6. 根据权利要求3所述的方法,其中,所述检测网络丢包率和I帧间 隔之前,所述方法还包括:
    设置所述第四模式对错误帧进行调整。
  7. 一种视频解码错误的处理装置所述装置包括:检测模块、比较模块和处理模块;其中,
    所述检测模块,配置为检测网络丢包率和I帧间隔;
    所述比较模块,配置为将所述网络丢包率与预设的第一阈值比较,获得第一比较结果,将所述I帧间隔与预设的第二阈值比较,获得第二比较结果;
    所述处理模块,配置为当检测到错误帧时,根据所述第一比较结果和所述第二比较结果,选择预设模式对错误帧进行调整,所述错误帧包括I帧。
  8. 根据权利要求7所述的装置,其中,所述处理模块包括:
    处理单元,配置为根据所述第一比较结果和所述第二比较结果,对参考帧序列中的错误参考帧进行调整,并搜索用于重新解码的下一非错误的帧。
  9. 根据权利要求7或8所述的装置,其中,所述预设模式为第一模式时,所述处理单元,配置为根据所述第一比较结果和所述第二比较结果,将参考帧序列中的错误参考帧替换为目标I帧,同时搜索用于重新解码的下一非错误帧,所述目标I帧为已解码的参考帧序列中与错误参考帧相邻的I帧;或,
    所述预设模式为第二模式时,所述处理单元,配置为根据所述第一比较结果和所述第二比较结果,将参考帧序列中的错误参考帧替换为目标I帧,同时搜索用于重新解码的下一非错误I帧,所述目标I帧为已解码的参考帧序列中与错误参考帧相邻的I帧;或,
    所述预设模式为第三模式时,所述处理单元,配置为根据所述第一比 较结果和所述第二比较结果,删除参考帧序列中的错误参考帧,同时搜索用于重新解码的下一非错误帧;或,
    所述预设模式为第四模式时,所述处理单元,配置为根据所述第一比较结果和所述第二比较结果,删除错误参考帧序列中的错误参考帧,同时搜索用于重新解码的下一非错误I帧。
  10. 根据权利要求9所述的装置,其中,所述处理模块还包括:
    选择单元,配置为当所述网络丢包率大于预设的第一阈值并且所述I帧间隔大于预设的第二阈值时,选择第一模式;当所述网络丢包率大于预设的第一阈值并且所述I帧间隔小于预设的第二阈值时,选择第二模式;当所述网络丢包率小于预设的第一阈值并且所述I帧间隔大于预设的第二阈值时,选择第三模式;当所述网络丢包率小于预设的第一阈值并且所述I帧间隔小于预设的第二阈值时,选择第四模式。
  11. 根据权利要求9所述的装置,其中,所述装置还包括:设置模块,配置为为每个预设模式设置对应的标识值;
    所述处理单元,配置为将当前选择的预设模式的标识值和第一标识值相与,当相与结果为真时,选择第三模式或者第四模式,且检测到错误帧时将参考帧序列中的错误参考帧删除;当相与结果为假时,选择第一模式或者第二模式,且检测到错误帧时将参考帧序列中的错误参考帧替换为目标I帧,所述目标I帧为已解码的参考帧序列中与错误参考帧相邻的I帧;具体还用于将当前选择的预设模式的标识值和第二标识值相与,当相与结果为真时,选择第二模式或者第四模式,且搜索用于重新解码的下一非错误I帧,当相与结果为假时,选择第一模式或者第三模式,且搜索用于重新解码的下一非错误帧。
  12. 根据权利要求11所述的装置,其中,所述设置模块,还配置为设置所述第四模式对错误帧进行调整。
  13. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1至6任一项所述的方法。
PCT/CN2017/095349 2016-12-20 2017-07-31 视频解码错误的处理方法及装置、存储介质 WO2018113308A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611184986.8A CN108206956B (zh) 2016-12-20 2016-12-20 一种视频解码错误的处理方法及装置
CN201611184986.8 2016-12-20

Publications (1)

Publication Number Publication Date
WO2018113308A1 true WO2018113308A1 (zh) 2018-06-28

Family

ID=62603757

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/095349 WO2018113308A1 (zh) 2016-12-20 2017-07-31 视频解码错误的处理方法及装置、存储介质

Country Status (2)

Country Link
CN (1) CN108206956B (zh)
WO (1) WO2018113308A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112995702A (zh) * 2019-12-16 2021-06-18 天翼智慧家庭科技有限公司 基于质量监测探针判断视频卡顿的方法及系统
CN116055803A (zh) * 2022-07-29 2023-05-02 荣耀终端有限公司 视频播放方法和系统、电子设备

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113645490B (zh) * 2021-06-23 2023-05-09 天津津航计算技术研究所 一种软硬结合的多通道视频同步解码方法
CN113727116B (zh) * 2021-07-21 2024-04-23 天津津航计算技术研究所 基于过滤机制的视频解码方法
CN114007065B (zh) * 2021-11-02 2023-05-30 深圳市瑞云科技有限公司 一种基于WebRTC实时音视频黑屏检测方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090178096A1 (en) * 2008-01-03 2009-07-09 Microsoft Corporation Intelligent over-transmission of media data segments
CN101742271A (zh) * 2008-11-10 2010-06-16 华为技术有限公司 流媒体数据的传输方法、系统和装置
CN101990087A (zh) * 2010-09-28 2011-03-23 深圳中兴力维技术有限公司 无线视频监控系统及根据网络状态动态调整码流的方法
US8477846B2 (en) * 2009-10-07 2013-07-02 Ittiam Systems (P) Ltd. System and method for adaptive intra refresh rate setting in a video encoder

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090178096A1 (en) * 2008-01-03 2009-07-09 Microsoft Corporation Intelligent over-transmission of media data segments
CN101742271A (zh) * 2008-11-10 2010-06-16 华为技术有限公司 流媒体数据的传输方法、系统和装置
US8477846B2 (en) * 2009-10-07 2013-07-02 Ittiam Systems (P) Ltd. System and method for adaptive intra refresh rate setting in a video encoder
CN101990087A (zh) * 2010-09-28 2011-03-23 深圳中兴力维技术有限公司 无线视频监控系统及根据网络状态动态调整码流的方法

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112995702A (zh) * 2019-12-16 2021-06-18 天翼智慧家庭科技有限公司 基于质量监测探针判断视频卡顿的方法及系统
CN112995702B (zh) * 2019-12-16 2023-09-15 天翼数字生活科技有限公司 基于质量监测探针判断视频卡顿的方法及系统
CN116055803A (zh) * 2022-07-29 2023-05-02 荣耀终端有限公司 视频播放方法和系统、电子设备
CN116055803B (zh) * 2022-07-29 2024-04-02 荣耀终端有限公司 视频播放方法和系统、电子设备

Also Published As

Publication number Publication date
CN108206956B (zh) 2020-04-24
CN108206956A (zh) 2018-06-26

Similar Documents

Publication Publication Date Title
WO2018113308A1 (zh) 视频解码错误的处理方法及装置、存储介质
US9591316B2 (en) Scalable video encoding rate adaptation based on perceived quality
US11881945B2 (en) Reference picture selection and coding type decision processing based on scene contents
US20100211690A1 (en) Block partitioning for a data stream
US8861586B2 (en) Adaptive deblocking in a decoding pipeline
US9832463B2 (en) Robust encoding and decoding of pictures in video
WO2017197828A1 (zh) 一种视频编解码方法及设备
US20210409685A1 (en) Video encoding method, video decoding method, and related apparatuses
KR20060043051A (ko) 영상 신호의 인코딩 및 디코딩 방법
WO2017063404A1 (zh) 编码处理、解码处理方法及装置、编码器及解码器
US12015763B2 (en) Video encoding method, video decoding method, and related apparatuses
WO2023226915A1 (zh) 视频传输方法、系统、设备及存储介质
US20120106632A1 (en) Method and apparatus for error resilient long term referencing block refresh
JP5275810B2 (ja) 基準フレームの選択ルールを使用したビデオエラー隠蔽の方法及び装置
KR20140115262A (ko) 인터-이미지 예측 방법 및 디바이스, 및 대응하는 코딩 방법 및 장치
JP2016005043A (ja) 情報処理装置およびプログラム
US20170249120A1 (en) Sharing of Multimedia Content
US20080267296A1 (en) Method and apparatus for concealing an error of an image using residual data
US20220103826A1 (en) Encoding/decoding method and apparatus for motion vector information
US10856002B2 (en) Method, device and system for method of encoding a sequence of frames in a video stream
US20160112710A1 (en) Decoder, application processor including the decoder, and method of operating the decoder
US8588299B1 (en) Decoding video data
US20160330486A1 (en) Method and apparatus for processing video signal for reducing visibility of blocking artifacts
Patel et al. Hybrid spatio-temporal error concealment technique for image/video transmission
US10652548B2 (en) Video system and method with minimized streaming latency

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

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

Country of ref document: EP

Kind code of ref document: A1