WO2020237466A1 - Video transmission method and apparatus, and aircraft, playback device, and storage medium - Google Patents

Video transmission method and apparatus, and aircraft, playback device, and storage medium Download PDF

Info

Publication number
WO2020237466A1
WO2020237466A1 PCT/CN2019/088596 CN2019088596W WO2020237466A1 WO 2020237466 A1 WO2020237466 A1 WO 2020237466A1 CN 2019088596 W CN2019088596 W CN 2019088596W WO 2020237466 A1 WO2020237466 A1 WO 2020237466A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame
refresh
error correction
intra
current image
Prior art date
Application number
PCT/CN2019/088596
Other languages
French (fr)
Chinese (zh)
Inventor
赵亮
周士贞
陈颖
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2019/088596 priority Critical patent/WO2020237466A1/en
Priority to CN201980012282.8A priority patent/CN111758262A/en
Publication of WO2020237466A1 publication Critical patent/WO2020237466A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234345Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements the reformatting operation being performed only on part of the stream, e.g. a region of the image or a time segment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/172Methods 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 picture, frame or field
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440245Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display the reformatting operation being performed only on part of the stream, e.g. a region of the image or a time segment

Definitions

  • This application relates to the field of video transmission technology, and in particular to a video transmission method, device, aircraft, playback device, and storage medium.
  • the coding and decoding of the predicted frame needs to refer to the information of other video frames.
  • the sending end re-encodes a complete key frame (I frame) and sends it to the receiving end, and the receiving end decodes the key frame.
  • Frame gets new reference information to make the subsequent prediction frame decode correctly; but because the compression efficiency of the key frame is relatively low, it is easy to have a burst of coding rate, sending and receiving the key frame takes more time, which affects the subsequent video
  • this method is not very friendly to the wireless transmission physical channel, especially in scenarios where the channel conditions are not very good or the channel changes quickly. The image transmission delay and the feeling of freezing will be more obvious.
  • GDR Gradual Decoder Refresh
  • this application provides a video transmission method, device, aircraft, playback device, and storage medium, aiming to solve the problem of encoding rate bursts when video frame receiving and decoding errors occur in the existing video transmission process.
  • There are technical problems such as increased delay and freeze, which affect the transmission of video frames.
  • this application provides a video sending method applied to the sending end, including:
  • this application provides a video receiving method applied to the receiving end, including:
  • error feedback information is sent to the sending end, and the receiving end performs error correction of intra-frame coding on the partial area sent by the sending end in response to the error feedback information Refresh frame
  • the error correction refresh frame is decoded, and the reference data used for decoding is refreshed according to the decoding result.
  • this application provides a video transmission method, including:
  • the sending end encodes the acquired current image frame, and sends the encoded current image frame to the receiving end;
  • the receiving end receives and decodes the current image frame, and if there is an error in receiving the current image frame or decoding the current image frame, sending error feedback information to the sending end;
  • the sending end determines an error correction refresh frame according to the error feedback information, performs intra-frame coding on a part of the error correction refresh frame, and sends the coded error correction refresh frame to the receiving end;
  • the receiving end decodes the error correction refresh frame, and refreshes the reference data used for decoding according to the decoding result.
  • the present application provides a video sending device, including a memory and a processor
  • the memory is used to store computer programs
  • the processor is configured to execute the computer program, and when executing the computer program, implement the following steps:
  • this application provides an aircraft, including:
  • Image acquisition component used to acquire images
  • the aforementioned video sending device is used to acquire the image collected by the image collection component, and send it to the receiving end after encoding;
  • Flight components used for flight.
  • the present application provides a video receiving device, including a memory and a processor
  • the memory is used to store computer programs
  • the processor is configured to execute the computer program, and when executing the computer program, implement the following steps:
  • error feedback information is sent to the sending end, and the receiving end performs error correction of intra-frame coding on the partial area sent by the sending end in response to the error feedback information Refresh frame
  • the error correction refresh frame is decoded, and the reference data used for decoding is refreshed according to the decoding result.
  • this application provides a video playback device, including:
  • the aforementioned video receiving device is used to receive images from the sending end and decode them;
  • the display component is used to display the data decoded by the video receiving device.
  • the present application provides a computer-readable storage medium that stores a computer program that, when executed by a processor, causes the processor to implement the aforementioned video sending method; or
  • the embodiments of the application provide a video transmission method, device, aircraft, playback device, and storage medium.
  • the network resources can be reduced. Resource occupancy, avoiding the burst of code rate caused by intra-encoding of the complete image frame and increasing delay and jitter, and can provide the receiving end with reference data required for decoding in time, so that transmission errors can be recovered quickly.
  • FIG. 1 is a schematic flowchart of a video sending method provided by an embodiment of the present application
  • Fig. 2 is a schematic diagram of a scene in which the sender sends image frames to the receiver;
  • 3 to 5 are schematic flowcharts of other implementation manners of the video sending method of this application.
  • Fig. 6 and Fig. 7 are schematic diagrams of the intra-frame coding process of part of the error correction refresh frame in Fig. 1;
  • Fig. 10 and Fig. 11 are schematic diagrams of the intra-frame coding process of part of the error correction refresh frame in Fig. 1;
  • FIG. 12 is a schematic flow chart of intra-encoding a part of the error correction refresh frame in FIG. 1;
  • FIG. 13 is a schematic diagram of determining an intra-frame coding region according to region index information in error feedback information
  • Fig. 14 and Fig. 15 are schematic diagrams of the intra-frame coding process of part of the error correction refresh frame in Fig. 1;
  • 16 and 17 are schematic diagrams of the flow of encoding the current image frame in FIG. 1;
  • FIG. 18 is a schematic diagram of performing intra-frame coding on interval refresh frames in a refresh period
  • Fig. 19 is a schematic diagram of performing intra-frame coding on a partial area of an interval refresh frame in a refresh period
  • FIG. 20 is a schematic flowchart of another implementation manner of a video sending method according to the present application.
  • FIG. 21 is a schematic diagram of performing intra-frame encoding on one image frame in FIG. 20 and performing inter-frame encoding on subsequent image frames;
  • FIG. 22 is a schematic flowchart of a video receiving method provided by an embodiment of the present application.
  • Fig. 23 and Fig. 24 are schematic diagrams of the flow of decoding the current image frame in Fig. 22;
  • 25 is a schematic diagram of the flow of decoding error correction refresh frame and refreshing reference data in FIG. 22;
  • FIG. 26 is a schematic flowchart of a video transmission method provided by an embodiment of the present application.
  • FIG. 27 is a schematic diagram of image frame transmission in an embodiment of a video transmission method.
  • FIG. 28 is a schematic block diagram of a video sending device according to an embodiment of the present application.
  • FIG. 29 is a schematic block diagram of an aircraft according to an embodiment of the present application.
  • FIG. 30 is a schematic block diagram of a video receiving device according to an embodiment of the present application.
  • FIG. 31 is a schematic block diagram of a video playback device provided by an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a video sending method for the sending end according to an embodiment of the present application.
  • the video sending method can be applied to a terminal device or a server for sending video to the receiving end, etc.
  • the terminal device can be a mobile phone, tablet computer, notebook computer, desktop computer, personal digital assistant, wearable device or drone, etc.
  • the server can be an independent server or a server cluster.
  • the UAV can be a rotary-wing UAV, such as a quadrotor UAV, a hexarotor UAV, an eight-rotor UAV, or a fixed-wing UAV, and the UAV has Camera equipment.
  • the video sending method of this embodiment includes steps S110 to S130.
  • the sending end sends image frames to the receiving end frame by frame, as shown in FIG. 2;
  • the camera on the sending end acquires image frames in real time, encodes the acquired image frames frame by frame, and sends them to the receiving end .
  • the current image frame is an image frame acquired in real time by a camera set on the sending end, which represents an image frame acquired and to be sent by the sending end at the current moment.
  • the sending end performs interframe encoding on the current image frame to obtain a predictive-coded picture frame (Predictive-coded Picture), that is, a P frame; by referring to the previous image frame, the interframe is performed by motion prediction Predictive coding.
  • a predictive-coded picture frame Predictive-coded Picture
  • the sending end sequentially takes the second image frame to the n-1th image frame as the current image frame, performs inter-frame coding to obtain the P frame and then sends it to the receiving end.
  • the sending end sends the encoded image frame to the receiving end, and if the receiving end receives an error in an image frame or the decoded image frame has an error, it sends error feedback information to the sending end.
  • the receiving end after receiving and decoding any image frame, sends success feedback information to the sending end, and decodes the image frame; the sending end obtains a new image frame after receiving the success feedback information, performs encoding and sends it to the receiving end; If the receiving end receives a certain image frame error or the decoded image frame has an error, it sends error feedback information to the transmitting end.
  • the receiving end sends success feedback information and error feedback information to the sending end through an uplink channel between the receiving end and the sending end.
  • the uplink channel can also be used to transmit flight control instructions to the sending end, such as drones, and various control instructions, such as taking pictures, videos, and returning to home.
  • the error feedback information includes the feedback information of the receiving end in response to the packet loss event, or includes the feedback information of the receiving end in response to an integrity check error.
  • the sending end When sending an image frame to the receiving end, the sending end receives error feedback information sent by the receiving end, which indicates that the image frame has failed to be sent or decoded, and the error correction refresh frame is determined according to the image frame corresponding to the error feedback information.
  • the partial area of the error correction refresh frame is intraframe encoded, and the encoded error correction refresh frame is sent to the receiving end send.
  • intra-frame coding is performed on a partial region from the nth image frame to the n+2th image frame.
  • the video transmission method provided in this embodiment performs intra-frame coding on part of the error correction refresh frame when a certain image frame is transmitted incorrectly, which can reduce the resource occupation of network resources and avoid the intra-frame coding of the complete image frame.
  • the burst of code rate causes delay and jitter to increase, and can provide the receiving end with reference data required for decoding in time, so that transmission errors can be recovered quickly.
  • performing intra-frame coding on a partial area of the error correction refresh frame in step S130, and sending the coded error correction refresh frame to the receiving end includes:
  • S1301 Perform intra-frame coding on a partial area of the error correction refresh frame, perform inter-frame coding on the remaining area of the error correction refresh frame, and send the coded error correction refresh frame to the receiving end.
  • the data volume after inter-frame encoding is relatively small, and the network resources occupied when transmitting to the receiving end is relatively small; therefore, the data volume of the error correction refresh frame after encoding can be small, and it includes the area of intra-frame encoding, which can be used at the receiving end Refresh the reference data.
  • determining an error correction refresh frame according to the current image frame includes:
  • a preset number of error correction refresh frames are determined in the image frame corresponding to the error feedback information, that is, the current image frame and/or the image frames subsequent to the current image frame.
  • the sending end obtains the nth image frame in S110, encodes the image frame, and sends it to the receiving end; but receiving error feedback information sent by the receiving end in S120, it can be used in the nth image frame and/or
  • the preset number is determined in the image frames after n image frames, such as M error correction refresh frames, and n and M are natural numbers that are not 0. As shown in Figure 2, M is equal to 3.
  • step S121 determining a preset number of error correction refresh frames in the current image frame and/or the image frames subsequent to the current image frame includes:
  • M image frames starting from the nth image frame that is, the nth image frame to the n+M-1th image frame are determined as M error correction refresh frames.
  • step S130 performs intra-frame coding on a part of the error correction refresh frame, and sends the coded error correction refresh frame to the receiving end, including steps S131 to S134.
  • a preset number of image frames starting from the current image frame corresponding to the error feedback information are used as error correction refresh frames.
  • the receiving end makes an error when receiving and decoding the nth image frame, and sends error feedback information to the sending end, and the sending end determines the nth image frame to the n+M-1th image frame as M errors.
  • Error refresh frame the first error correction refresh frame is the current image frame corresponding to the error feedback information, that is, the nth image frame.
  • intra-frame coding is performed on a partial area of the n-th image frame, and the remaining areas are subjected to inter-frame coding, and then the coded n-th image frame is sent to the receiving end.
  • the camera on the drone acquires image frames frame by frame, and while or after a certain image frame is encoded and transmitted by the sending end, the sending end may obtain the next image frames in real time. Since the speed at which the camera acquires the image frame is approximately constant, the transmission time of the image frame by the sender needs to be limited to a small range so that the video transmission will not be stuck.
  • intra-encoding is performed on a part of the error correction refresh frame, the bit rate of the transmission is small, and the time is shorter; it can be realized that the error correction refresh frame is transmitted at least before the next image frame is taken to ensure the video Real-time transmission, reducing delay.
  • an image frame newly captured by the camera is acquired, for example, the n+sth image frame is used as the next error correction refresh frame, where s is less than M, and s is a natural number that is not 0.
  • S133 Perform intra-frame coding on a partial area of the error correction refresh frame, and send the coded error correction refresh frame to the receiving end.
  • intra-encoding is performed on a part of the n+sth image frame, and the remaining areas are inter-encoded, and then the encoded n+sth image frame is sent to the receiving end.
  • different error correction refresh frames corresponding to the same error feedback information perform intra-frame coding in different regions. Therefore, the receiving end can update different parts of the reference data according to the decoding of different error correction refresh frames.
  • step S134 returns to the acquisition of the next error correction refresh frame, and performs intra-frame encoding on a part of the error correction refresh frame, and transfers the encoded error correction refresh frame to
  • the steps sent by the receiving end continue to be executed until the last error correction refresh frame is coded and sent to the receiving end, including:
  • the last error correction refresh frame is sent to the receiving end after it has not been encoded, return to the acquisition of the next error correction refresh frame, and perform intra-frame encoding on a part of the error correction refresh frame, and The step of sending the encoded error correction refresh frame to the receiving end is continued; if the last error correction refresh frame has been encoded and sent to the receiving end, it can return to step S110 to continue execution.
  • step S132 return to step S132 to obtain the n+s+1th image frame, perform intra-frame coding on a partial area of the image frame, and send the coded image frame to the receiving end; if s is equal to M-1, then the n+M-1 image frame, that is, the last error correction refresh frame has been partially intra-coded and sent to the receiving end, and there is no need to return to obtain a new error correction refresh frame.
  • the preset number of error correction refresh frames determined in step S121 are sequentially coded in partial regions, and the coded error correction refresh frames are sent to the receiving end.
  • the union of the regions where the corresponding preset number of error correction refresh frames is intra-coded is equal to the range of any error correction refresh frame. After the preset number of error correction refresh frames are intra-encoded in some areas, it is equivalent to that all areas of an entire image frame are intra-encoded; therefore, the receiving end decodes the preset number of error corrections Refresh the frame, you can completely refresh the reference data to improve the accuracy of the receiver's decoding of subsequent image frames, and prevent the received video from blurring.
  • step S130 performs intra-frame coding on a partial area of the error correction refresh frame, and after sending the coded error correction refresh frame to the receiving end, if error feedback information sent by the receiving end is received, It means that there is an error in the error correction refresh frame currently received and decoded by the receiving end; the sending end returns to step S120 and step S130 to continue execution, for example, determines the error correction refresh frame according to the error correction refresh frame, that is, the current image frame, and performs another round of correction The determination of the wrong refresh frame and the intra-frame coding of some areas.
  • step S130 performs intra-frame coding on a part of the error correction refresh frame, and after sending the coded error correction refresh frame to the receiving end, it includes:
  • the reference data of the receiving end is updated, and normal decoding can be performed, such as inter-frame decoding.
  • the sending end may return to step S110 to obtain, for example, an image frame newly captured by the camera, that is, a current image frame, encode the current image frame, and send the encoded current image frame to the receiving end. If the error feedback information sent by the receiving end is received later, steps S120 to S140 are executed to implement the update of the reference data by the receiving end.
  • determining an error correction refresh frame according to the current image frame includes:
  • S122 If error feedback information sent by the receiving end is received, determine an error correction sequence according to the current image frame.
  • the error correction sequence includes a preset number of error correction refresh frames and a predicted frame after the preset number of error correction refresh frames.
  • the receiving end receives the error correction refresh frame in which the transmitting end performs partial intra-frame coding, and decoding the error correction refresh frame can update the reference data; for the sending end, you can refer to the error correction refresh frame to the error correction refresh frame after the error correction refresh frame.
  • Several image frames are inter-encoded; for the receiving end, several image frames after the error correction refresh frame can be inter-decoded based on the reference data.
  • the receiving end makes an error when receiving and decoding the nth image frame, and sends error feedback information to the sending end, and the sending end determines the nth image frame to the n+M-1th image frame as M errors.
  • Error refresh frame determine the n+M image frame to n+M+p-1 image frame as p prediction frames; the error correction refresh frame and the prediction frame after the error correction refresh frame constitute the error feedback information corresponding Error correction sequence.
  • step S140 returns to the acquisition of the current image frame, encodes the current image frame, and continues the steps of sending the encoded current image frame to the receiving end until it is received Before the error feedback information sent by the receiving end, it includes:
  • step S150 is performed after performing intra-frame coding on a partial area of the error correction refresh frame in step S130, and the coded error correction refresh frame is sent to the receiving end.
  • the receiving end receives each error correction refresh frame and decodes each error correction refresh frame, the reference data is updated, and correct feedback information can be sent to the sending end.
  • the sending end After receiving the correct feedback information, the sending end performs inter-frame encoding on the predicted frame in the error correction sequence, and sends the encoded predicted frame to the receiving end.
  • any prediction frame before the prediction frame in the error correction sequence may be referred to.
  • any prediction frame before the prediction frame in the error correction sequence may be referred to.
  • inter-coding the n+Mth image frame you can refer to the n+M-1th image frame; when inter-coding the n+M+p-1th image frame, you can refer to the nth Image frames to any one of the n+M+p-2th image frames.
  • step S130 performs intra-frame coding on a partial area of the error correction refresh frame, and after sending the coded error correction refresh frame to the receiving end, if error feedback information sent by the receiving end is received, It means that there is an error in the error correction refresh frame currently received and decoded by the receiving end; the sending end returns to step S120 and step S130 to continue execution, for example, the error correction refresh frame is determined according to the error correction refresh frame, that is, the current image frame, and the error correction is performed again Refresh frame determination and partial area intra-frame coding.
  • performing intra-frame coding on a partial area of the first error correction refresh frame in step S131 includes:
  • S1311 Perform intra-frame coding on the header area of the first error correction refresh frame.
  • the sending end determines the nth image frame to the n+M-1th image frame as M error correction refresh frames according to the error feedback information sent by the receiving end, where the nth image frame is the first An error correction refresh frame.
  • the header area of the first error correction refresh frame is used as the area for intra-frame encoding, and other areas can be inter-frame encoding.
  • the image of the partial area acquired first is the image of the head area, for example, several rows of pixels in front of an image frame.
  • each image frame acquired by the sending end has a resolution of 1920x1080, in the horizontal direction, that is, there are 1920 pixels in each row, and in the vertical direction, that is, there are 1080 pixels in each column; then the first 200 rows, a total of The area of 200 ⁇ 1920 pixels is the head area of the image frame.
  • performing intra-frame coding on a partial area of the error correction refresh frame in step S133 includes:
  • S1331 Move back the area where the previous error correction refresh frame of the error correction refresh frame is intra-encoded to obtain the area where the error correction refresh frame is intra-encoded, and perform intra-frame encoding on the error correction refresh frame The area is intra-coded.
  • the region where the n-th image frame is intra-coded is moved away from the head region, that is, moved backward, to obtain the region where the n+1-th image frame is intra-coded;
  • the region where the n+1th image frame is intra-coded is moved to a direction away from the head region, that is, moved backward, and the region where the n+2th image frame is intra-coded is obtained.
  • the areas where the error correction refresh frames are intra-coded do not overlap; for example, the area where the nth image frame is intra-coded is the pixel area from row 0 to row 200.
  • the area where n+1 image frames are intra-coded is the pixel area from line 201 to line 400, and the area where n+2 image frames are intra-coded is the pixel area from line 401 to line 800; each The area of the error correction refresh frame for intra-frame coding may be equal or unequal.
  • the intra-encoded area of each error correction refresh frame in the same error correction sequence may be partially overlapped; for example, the area where the nth image frame is intra-encoded is the 0th to 300th line.
  • the pixel area of the row, the area where the n+1 image frame is intra-coded is the pixel area from the 201st line to the 500th line, and the area where the n+2 image frame is intra-coded is the 401th to the 700th line
  • the pixel area of the row; the area of each error correction refresh frame for intra-frame coding can be equal or unequal.
  • the union of regions where all preset number of error correction refresh frames in the same error correction sequence are intra-coded is equal to the range of any error correction refresh frame.
  • all the error correction refresh frames in the same error correction sequence need to perform intra-frame coding for each pixel range from the 1st line to the 1080th line.
  • the union of the regions where the intra-frame coding is performed from the nth image frame to the n+2th image frame is equal to the range of a complete image frame. Therefore, the receiving end can refresh the reference data completely by decoding the preset number of error correction refresh frames, so as to improve the accuracy of the receiving end to decode subsequent image frames and prevent the received video from being blurred.
  • step S121 determines a preset number of error correction refresh frames in the current image frame and/or image frames subsequent to the current image frame, including:
  • S1211 according to the number of stripes in the current image frame, determine the same number of error correction refresh frames in the current image frame and/or image frames subsequent to the current image frame.
  • a slice contains part or all of the data of a frame of image.
  • a frame of video image can be encoded into one or several slices.
  • a strip contains at least one macroblock (Macroblock) and at most contains the data of the entire frame of image.
  • Macroblock macroblock
  • the number of stripes formed in the same frame of image may not be the same.
  • each image frame includes at least two slices; the encoding and decoding between different slices in the same image frame are independent; the data referred to in the decoding process of slices, such as predictive coding, cannot exceed the The border of the strip can prevent the spread of errors.
  • 3 error correction refresh frames are determined in the current image frame and/or the image frames after the current image frame; as shown in FIG. 2, the first image frame is determined
  • the n image frames to the n+2th image frame are error correction refresh frames.
  • the step S1311 performing intra-frame encoding on the header area of the first error correction refresh frame includes:
  • intra-frame coding is performed on the first slice of the first error correction refresh frame, and inter-frame coding is performed on other slices.
  • the slice is intra-coded to obtain I slice, namely I slice; the slice is inter-coded, and P slice is obtained, namely P slice.
  • intra-frame coding is performed on the first slice of the n-th image frame.
  • I macroblocks are included in the I slice, that is, intra-frame prediction macroblocks, and no P macroblocks, that is, inter-frame prediction macroblocks are not included; in the P slice, except for the corresponding P macroblocks , Can also contain I macroblocks.
  • an I slice or P slice is obtained;
  • the slice type information slice_type included in the I slice is the code corresponding to the I slice, and the I slice also includes the first slice contained in the slice.
  • the slice type information slice_type included in the P slice is the code corresponding to the P slice, and the P slice also includes the first macroblock contained in the slice in the whole frame Location information, etc.
  • the receiving end judges whether to perform intra-frame decoding or inter-frame decoding according to the slice type information slice_type; if the slice type information slice_type is the code corresponding to the I slice, the intra-frame decoding is performed, If the slice type information slice_type is the code corresponding to the P slice, then inter-frame decoding is performed; after decoding, the decoded data is spliced into the image frame according to the position information of the first macroblock contained in each slice in the whole frame data.
  • step S1331 the area where the previous error correction refresh frame of the error correction refresh frame is intra-encoded is moved back to obtain the area where the error correction refresh frame is intra-coded, and the error correction is performed Refresh the frame for intra-frame coding in the area where intra-frame coding is performed, including:
  • the slice number of the n-th image frame subjected to intra-coding is increased by one, and the slice number of the n+1-th image frame subjected to intra-coding is obtained as two; Perform intra-frame coding on the second slice of +1 image frame, and perform inter-frame coding on the first and third slices of the n+1th image frame; then obtain the n+2th image frame , Add one to the strip number of the n+1th image frame for intra-encoding, and get the strip number of the n+2th image frame for intra-encoding as three; then add one to the strip number of the n+2th image frame.
  • Three slices are subjected to intra-frame coding, and the other two slices of the n+2th image frame are subjected to inter-frame coding.
  • Each error correction refresh frame in the same error correction sequence performs intra-coding on a stripe respectively, and the union of the regions where all the preset number of error correction refresh frames are intra-coded is equal to the range of any error correction refresh frame.
  • the receiving end decodes an error correction refresh frame, it updates the reference information of a strip in the image frame; after decoding all the preset number of error correction refresh frames in the same error correction sequence, the reference information of each strip in the image frame is all Get updated; combining the division of the area for intra-frame coding in the error correction refresh frame into the coding unit, that is, the strip, which can reduce the amount of calculation and improve the accuracy.
  • the error feedback information received by the transmitting end from the receiving end includes area index information.
  • an error occurs when the receiving end receives and decodes data of a certain area in the current image frame, it generates error feedback information according to the area index information of the area and sends it to the sending end.
  • the sending end when the sending end sends the encoded current image frame to the receiving end, the error feedback information sent by the receiving end is received, and the error feedback information includes the area index corresponding to the pixel area from line 201 to line 400 of the image frame information.
  • performing intra-frame coding on a partial area of the first error correction refresh frame in step S131 includes:
  • S1312. Determine the region where the first error correction refresh frame is intra-coded according to the region index information in the acquired error feedback information, and perform intra-frame coding on the region where the first error correction refresh frame is intra-coded .
  • the area where the first error correction refresh frame is intra-coded is the pixel area from the 201st line to the 400th line of the first error correction refresh frame.
  • intra-frame coding is performed on the region where the first error correction refresh frame is intra-coded, and other regions are inter-frame coding.
  • the pixel area from line 201 to line 400 of the nth image frame is intra-encoded, and other areas are inter-encoded; then the encoded nth image frame is sent to the receiving end.
  • the receiving end decodes the n-th image frame, especially after intra-frame decoding is performed on the area where the n-th image frame is intra-encoded, the reference data of the area can be updated; therefore, the reference data of the receiving and decoding error area can be updated more quickly
  • the data is conducive to the rapid recovery of the error state and reduces the probability of the phenomenon of blurring.
  • the region index information in the error feedback information it is determined that the region where the n-th image frame is intra-coded is the middle region, and then the middle region of the n-th image frame is intra-coded. Perform inter-frame coding on the head area and the tail area of the nth image frame.
  • performing intra-frame coding on a partial area of the error correction refresh frame in step S133 includes:
  • S1332 Move back the area where the previous error correction refresh frame of the error correction refresh frame is intra-coded to obtain the area where the error correction refresh frame is intra-coded, and perform intra-coding on the error correction refresh frame The area is intra-coded.
  • the region where the nth image frame is intra-coded is moved backward, and the region where the n+1th image frame is intra-coded is the tail; then the tail region of the n+1th image frame is framed Intra coding, inter-coding the header area and middle area of the n+1th image frame.
  • the area where the first error correction refresh frame is intra-encoded is not at the head. Therefore, when the area where an error correction refresh frame is intra-coded is moved to the end, the head area of the image frame may still be No intra-frame coding is performed, and a subsequent error correction refresh frame is required to perform intra-frame coding on this part of the area.
  • the region where the previous error correction refresh frame of the error correction refresh frame is intra-coded in step S1332 is moved backward to obtain the region where the error correction refresh frame is intra-coded ,include:
  • S320 Determine whether the intra-frame coding area of the previous error correction refresh frame of the error correction refresh frame is at the end of the previous error correction refresh frame.
  • S321 Move back the region where the previous error correction refresh frame is intra-coded to obtain the region where the error correction refresh frame is intra-coded.
  • the region where the n-th image frame is intra-encoded is the middle region. If it is not at the end of the n-th image frame, the region where the n-th image frame is intra-encoded is moved backward. The region where the n+1th image frame is intra-encoded is the tail.
  • the area where the n+1th image frame is intra-coded is the tail, and the area where the n+2th image frame is intra-coded is the head;
  • the header area of the two image frames is intra-encoded, and the middle area and the tail area of the n+2th image frame are inter-encoded.
  • step S1332 the area where the previous error correction refresh frame of the error correction refresh frame is intra-encoded is moved back to obtain the area where the error correction refresh frame is intra-encoded, and a partial area frame is performed on the error correction refresh frame
  • the sending end may return to step S110 to obtain, for example, the image frame newly shot by the camera, that is, the current image frame, and encode the current image frame, Send the encoded current image frame to the receiving end.
  • the intra-frame coding area After each error correction refresh frame in the error correction sequence corresponding to the error feedback information, the intra-frame coding area is moved back, and the intra-frame coding area reaches the tail and returns to the head for intra-frame coding; realizes all errors in the error correction sequence After intra-encoding is performed on some areas of the wrong refresh frame, all areas in the image frame are intra-encoded; after sending to the receiving end, the receiving end can completely refresh the reference data corresponding to the entire image frame.
  • step S121 determining a preset number of error correction refresh frames in the current image frame and/or image frames subsequent to the current image frame includes:
  • S1212 Determine the same number of error correction refresh frames in the current image frame and/or image frames subsequent to the current image frame according to the number of stripes in the current image frame.
  • each image frame includes at least two slices; the encoding and decoding between different slices in the same image frame are independent; the data referred to in the decoding process of slices, such as predictive coding, cannot exceed the The border of the strip can prevent the spread of errors.
  • 3 error correction refresh frames are determined in the current image frame and/or the image frames after the current image frame; as shown in FIG. 13, the first The n image frames to the n+2th image frame are error correction refresh frames.
  • determining the region where the first error correction refresh frame performs intra-frame coding according to the region index information in the acquired error feedback information in step S1312 includes:
  • the sending end encodes each strip in the image frame and sends it to the receiving end. If an error occurs when the receiving end receives and decodes a certain strip, the error feedback information is generated according to the strip sequence number of the strip, and the error is fed back The information is sent to the sender.
  • the error feedback information sent to the sending end includes the strip sequence number of the second slice.
  • the sending end determines, according to the strip sequence number in the error feedback information, that the region where the first error correction refresh frame is intra-coded is the second strip.
  • intra-frame coding is performed on the second slice of the first error correction refresh frame, and the first slice and the third slice are subjected to inter-frame coding.
  • shifting the region where the previous error correction refresh frame is intra-coded in step S321 to obtain the region where the error correction refresh frame is intra-coded includes:
  • the determining the header area of the error correction refresh frame as the area where the error correction refresh frame performs intra-frame coding in step S322 includes:
  • the strip number of the n+1th image frame for intra-encoding is the strip number corresponding to the end of the image frame, that is, three, then the n+2th image frame is obtained, and the n+1th image frame
  • the sequence number of the slice for intra-coding is determined to be one, then the first slice of the n+2th image frame is intra-coded, and the other two slices of the n+2th image frame are inter-coded .
  • Each error correction refresh frame in the same error correction sequence performs intra-coding on a stripe respectively, and the union of the regions where all the preset number of error correction refresh frames are intra-coded is equal to the range of any error correction refresh frame.
  • the first error correction refresh frame first performs intra-frame coding on the receiving and decoding error areas. After decoding, the receiving end can update the error reference information first, which can recover transmission errors more quickly.
  • encoding the current image frame in step S110 includes at least step S111 to step S112.
  • S111 Determine whether the current image frame is an interval refresh frame according to an interval refresh condition.
  • an inter-encoded frame namely P frame
  • some image frames can also be framed at intervals.
  • Intra-coding or intra-frame coding of a part of the area so that the receiving end can update the reference data in time.
  • the acquired image frame is encoded according to the refresh cycle.
  • the refresh period includes adjacent refresh ranges and prediction ranges.
  • the image frames within the prediction range in the same refresh period are all located behind all the image frames within the refresh range.
  • the sender In a refresh cycle, the sender first performs intra-frame encoding on the image frame within the refresh range, and the receiver can update the reference data of the image frame after decoding; then the sender refers to the image frame or prediction range within the refresh range within the refresh period The previous image frame within the frame performs inter-frame coding on the newly acquired image frame; the receiving end can decode the inter-coded image according to the reference data.
  • step S111 determines whether the current image frame is an interval refresh frame according to an interval refresh condition, including: if the number of the current image frame is within the refresh range of any refresh period, determining that the current image frame is an interval refresh Frame; if the number of the current image frame is within the prediction range of any refresh period, it is determined that the current image frame is not an interval refresh frame.
  • the error feedback information sent by the receiving end is not received, it is determined whether the current image frame is an interval refresh frame according to the rules of the group of pictures (GOP) division.
  • GOP group of pictures
  • An image sequence that is, an image group, is a group of consecutive pictures in an encoded video stream.
  • Each coded video stream consists of a continuous sequence of images.
  • the data change between each image frame in the same image sequence is small; for example, the previous one of two adjacent image frames with large data changes can be used as the last frame in the previous image sequence, and The latter of two adjacent image frames with large data changes is taken as the first frame in the subsequent image sequence.
  • the image sequence includes adjacent refresh subsequences and predictive subsequences
  • the refresh subsequence includes at least one image frame at the beginning of the image sequence.
  • the predictor subsequence in the same image sequence is located after the refresh subsequence.
  • the sender When encoding image frames in an image sequence, the sender first performs intra-frame encoding on the image frames in the refresh subsequence, and the receiver can update the reference data of the image frame after decoding; then the sender refers to the refresh subsequence
  • the newly acquired image frame is inter-encoded on the image frame or the previous image frame in the predicted sub-sequence; the receiving end can decode the inter-encoded image according to the reference data.
  • step S111 judging whether the current image frame is an interval refresh frame according to the interval refresh condition includes: if the number of the current image frame is in the refresh subsequence of any image sequence, determining that the current image frame is Interval refresh frame; if the number of the current image frame is in the predicted subsequence of any image sequence, it is determined that the current image frame is not an interval refresh frame.
  • every 8 image frames is a refresh period, wherein the first image frame in each refresh period is an interval refresh frame, and the second to eighth image frames are not interval refresh frames ; Then respectively perform inter-frame encoding on the acquired second to eighth image frames to obtain respective corresponding inter-frame encoded frames, namely P frames.
  • P frames For example, refer to the first image frame to perform inter-coding on the second to eighth image frames; or refer to any one of the first to seventh image frames to perform inter-frame coding on the eighth image frame.
  • every 8 image frames is a refresh period, wherein the first to third image frames in each refresh period are interval refresh frames, and the fourth to eighth image frames It is not an interval refresh frame; then the acquired 4th to 8th image frames are inter-encoded respectively to obtain respective corresponding inter-encoded frames, namely P frames.
  • the first image frame to perform inter-frame coding on the fourth to eighth image frames; or refer to any one of the first to seventh image frames to perform inter-frame coding on the eighth image frame.
  • step S111 determines whether the current image frame is an interval refresh frame according to the interval refresh condition
  • the method includes:
  • the first image frame in each refresh cycle is an interval refresh frame; then the entire frame of the image frame is intra-coded to obtain an intra-coded frame, that is, an I frame.
  • the receiving end can update the reference data completely to improve the refresh cycle or each non-refresh frame in the image sequence. Refresh the accuracy of frame decoding at intervals to prevent blurring.
  • step S111 after determining whether the current image frame is an interval refresh frame according to the interval refresh condition includes:
  • every 8 image frames is a refresh period, and the first to third image frames in each refresh period are interval refresh frames; part of each interval refresh frame is performed Intra coding.
  • the region where each interval refresh frame in the same refresh period or image sequence undergoes intra-coding is different, and the union of the regions where all interval refresh frames in the same refresh period or image sequence undergo intra-frame encoding is equal to the image of each image frame range.
  • regions where intra-frame coding is performed on refresh frames at different intervals may partially overlap, or may not overlap with each other.
  • the receiving end can update the reference data completely to improve the refresh period or image sequence The accuracy of the decoding of the non-interval refresh frames in the middle, to prevent the screen blur.
  • step S114 if the current image frame is an interval refresh frame, performing intra-frame encoding on a partial area of the current image frame includes: if the current image frame is an interval refresh frame, performing intra-frame encoding on the current image frame Part of the area is intra-coded, and the remaining area is inter-coded.
  • Performing intra-frame coding on part of the interval refresh frame can not only reduce the resource occupation of network resources, avoid the intra-frame coding of the complete image frame, which will cause the burst rate and increase the delay and jitter, and it can be received at intervals.
  • the terminal provides the reference data needed for decoding.
  • step S110 acquires a current image frame, encodes the current image frame, and before sending the encoded current image frame to the receiving end, the method includes:
  • the image frame a is the first image frame sent by the sending end to the receiving end at a certain moment.
  • the transmitting end performs intra-frame encoding on the image frame to obtain an I frame, and sends the encoded image frame to the receiving end; so that the receiving end can quickly obtain complete reference data after decoding.
  • the first image frame collected by the sending end after the camera is turned on for a certain time is the initial image frame, and the sending end performs intra-frame coding on the image frame.
  • step S101 performs intra-frame encoding on an image frame, and after sending the encoded image frame to the receiving end, the method further includes:
  • S102 Perform inter-frame encoding on several image frames following the image frame according to the intra-encoded image frame, and send the encoded image frame to the receiving end.
  • the receiving end can obtain the complete reference data; the sending end can refer to the image frame a to perform inter-frame encoding on the obtained image frame b, and obtain the P frame and send it to the receiving end , The receiving end decodes the image frame b according to the reference data.
  • the sending end may refer to the image frame a or the image frame b to perform inter-frame encoding on the acquired image frame c, and obtain the P frame to send to the receiving end, and the receiving end decodes the image frame c according to the reference data.
  • the number of image frames to be inter-encoded in step S102 is equal to the number of image frames in one refresh cycle minus one. It is convenient for the sender to plan the interval refresh frame and the non-interval refresh frame in the refresh cycle.
  • the inter-encoded area may refer to the image frame before the error correction refresh frame or the interval refresh frame. Corresponding area.
  • the embodiment of the present application performs intra-frame coding on part of the error correction refresh frame when an image frame is transmitted incorrectly, which can reduce the resource occupation of network resources and avoid the intra-frame coding of the complete image frame.
  • the burst of code rate causes delay and jitter to increase, and can provide the receiving end with reference data required for decoding in time, so that transmission errors can be recovered quickly.
  • FIG. 22 is a schematic flowchart of a video receiving method for the receiving end according to an embodiment of the present application.
  • the video receiving method can be applied to a terminal device or a server for receiving video from the receiving end, etc.
  • the terminal device can be a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, a wearable device, a projector or a display, etc.
  • the server can be an independent server or a server cluster, such as providing live video services Server.
  • the terminal device may be a virtual reality head-mounted display device used to obtain video data from a drone, such as VR glasses, or a ground station used to obtain video data from a drone.
  • the video sending method of this embodiment includes step S210 to step S230.
  • S210 Receive an encoded current image frame from the sending end, and decode the current image frame.
  • the sending end acquires the current image frame, encodes the current image frame, and sends the encoded current image frame to the receiving end.
  • the current image frame is an image frame acquired in real time by a camera set on the sending end, which represents an image frame acquired and to be sent by the sending end at the current moment.
  • the receiving end receives the encoded image frames from the sending end in real time, decodes the received image frames; and then stores and/or plays the decoded video data.
  • the receiving end if it receives an error in an image frame or decodes an image frame, it sends error feedback information to the transmitting end.
  • the receiving end after receiving and decoding any image frame, sends success feedback information to the sending end, and decodes the image frame; the sending end obtains a new image frame after receiving the success feedback information, performs encoding and sends it to the receiving end; If the receiving end receives a certain image frame error or the decoded image frame has an error, it sends error feedback information to the transmitting end.
  • the receiving end sends success feedback information and error feedback information to the sending end through an uplink channel between the receiving end and the sending end.
  • the uplink channel can also be used to transmit flight control instructions to the sending end, such as drones, and various control instructions, such as taking pictures, videos, and returning to home.
  • the error feedback information includes feedback information of the receiving end when a packet loss event occurs, or includes feedback information of the receiving end when an integrity check error occurs.
  • the sending end When sending an image frame to the receiving end, the sending end receives error feedback information sent by the receiving end, which indicates that the image frame has failed to be sent or decoded, and the error correction refresh frame is determined according to the image frame corresponding to the error feedback information.
  • the sending end performs intraframe coding on a partial area of the error correction refresh frame, and sends the coded error correction refresh frame to the The receiving end sends; the receiving end receives the error correction refresh frame that the sender sends in response to the part of the error feedback information to perform intra-frame coding.
  • the sending end performs intra-frame coding on a partial area from the nth image frame to the n+2th image frame.
  • the receiving end When the receiving end decodes the area of the error correction refresh frame for intra-frame coding, it can decode this part of the data without referring to other image frames.
  • the decoded data can be used as the reference data required when decoding other image frames, realizing interoperability. Update of reference data for decoding.
  • the sending end when an image frame transmission error occurs, the sending end performs intra-frame coding error correction refresh frames for some areas; it can reduce the resource occupation of network resources and avoid receiving the entire frame for intra-frame
  • the encoded image frame causes a burst of code rate and causes delay and jitter to increase, and the receiving end can update the reference data required for decoding in time, so that transmission errors can be recovered quickly.
  • the decoding of the current image frame in step S210 includes step S2101 and step S211.
  • the sending end when the sending end sends the encoded image frame to the receiving end, the sent data includes the encoding format corresponding to the image frame; the receiving end can obtain the encoding format corresponding to the current image frame by analyzing the received data.
  • the transmitting end performs interframe encoding on the current image frame to obtain a predictive-coded picture (P frame); the receiving end can perform interframe encoding on the image frame based on the reference data. decoding.
  • P frame predictive-coded picture
  • the decoding of the current image frame in step S210 includes step S2121 to step S2122.
  • the first image frame in each refresh cycle is an interval refresh frame; the sending end performs intra-frame encoding on the entire image frame to obtain an intra-frame coded frame, that is, an I frame. After receiving the image frame, the receiving end performs intra-frame decoding on the image frame.
  • the receiving end receives and decodes the interval refresh period or the interval refresh frame in the image sequence, such as an intra-frame encoding frame
  • the reference data can be completely updated once to improve the refresh period or each non-interval refresh in the image sequence
  • the accuracy of frame decoding prevents screen flickering.
  • the method includes:
  • the receiving end correctly updates the reference data, and then sends correct feedback information to the transmitting end.
  • the sending end After receiving the correct feedback information, the sending end performs inter-frame coding on the second to eighth image frames in the acquired refresh cycle to obtain respective inter-coded frames, that is, P frames and send them to the receiving end.
  • the decoding of the current image frame in step S210 includes step S2131 to step S2132.
  • the encoding format corresponding to the current image frame is intra-encoding of a partial area, perform intra-frame decoding on the intra-encoded area of the current image frame to obtain refresh segment data corresponding to the current image frame.
  • every 8 image frames is a refresh period, and the first to third image frames in each refresh period are interval refresh frames; the sending end refreshes the part of each interval The region is intra-coded and sent to the receiving end. After receiving the interval refresh frame coded in the partial region, the receiving end performs intra-frame decoding on the intra-coded area of the interval refresh frame.
  • the region where each interval refresh frame in the same refresh period or image sequence undergoes intra-coding is different, and the union of the regions where all interval refresh frames in the same refresh period or image sequence undergo intra-frame encoding is equal to the image of each image frame range.
  • regions where intra-frame coding is performed on refresh frames at different intervals may partially overlap, or may not overlap with each other.
  • the receiving end when the receiving end decodes the intra-coded region of the current image frame, it can decode the part of the data without referring to other image frames, and the decoded data can be used as reference data for decoding other image frames , To realize the periodic update of the reference data used for decoding.
  • the receiving end can update the reference data completely to improve the refresh period or image sequence The accuracy of the decoding of the non-interval refresh frames in the middle, to prevent the screen blur.
  • the decoding of the current image frame in step S210 further includes:
  • the sender performs intra-frame coding on some areas of the interval refresh frame, and performs inter-frame coding on the remaining areas; this can reduce the resource occupation of network resources and avoid the intra-frame coding of the complete image frame, which may cause a burst of bit rate. It causes delay and jitter to increase, and can provide the receiver with the reference data needed for decoding at intervals.
  • the step S2132 after the step S2132 updates part of the data in the reference data corresponding to the intra-coded region to the refresh segment data, the step S2132 includes:
  • the union of regions where all interval refresh frames in the same refresh period or image sequence undergo intra-frame coding is equal to the image range of each image frame; as shown in Figure 19, the receiving end receives and decodes three After refreshing the frame at intervals, the reference data can be completely updated once, and then correct feedback information is sent to the sending end.
  • the sending end can perform inter-frame coding on the 4th to 8th image frames in the acquired refresh period to obtain respective inter-frame coded frames, that is, P frames and send them to the receiving end.
  • the receiving end when the receiving end receives and decodes an image frame whose encoding format is inter-frame encoding, intra-frame encoding, or intra-encoded in a partial area, if there is an error in receiving or decoding, it will send the corresponding image frame to the transmitting end. Error feedback information.
  • the sending end receives the error feedback information corresponding to any image frame, it determines the error correction refresh frame according to the image frame, and performs intra-frame encoding on a part of the error correction refresh frame, and the encoded error correction refresh frame Send to the receiving end.
  • the sending end determines the error correction refresh frame corresponding to the error feedback information in response to the error feedback information of the receiving end, performs intra-frame coding on a part of the error correction refresh frame, and sends the coded error correction refresh frame to the receiver
  • the receiving end receives and decodes the error correction refresh frame, and refreshes the reference data used for decoding according to the decoding result.
  • the receiving end receives the encoded current image frame from the sending end, and decoding the current image frame is specifically: the receiving end receives from the sending end the image area data encoded for each area of the current image frame, Decoding each image area data of the current image frame.
  • the sending end when the sending end encodes an image frame, it divides the image frame into multiple areas and encodes the image area data respectively, and sends each image area data to the receiving end; the receiving end receives and decodes each image area data one by one .
  • the sending end divides the image frame into multiple slices, and the encoding and decoding of different slices in the same image frame are independent.
  • the sending end sends the image area data obtained by encoding each strip to the receiving end; the receiving end receives and decodes each image area data one by one.
  • the image area data includes encoding format information, and the image area data can be decoded according to a decoding manner corresponding to the encoding format information.
  • the transmitting end performs intra-frame coding and inter-frame coding on the slices to obtain image area data whose coding format information is intra-frame coding and inter-frame coding, namely, I-strip and P-strip.
  • the coding format information included in the I slice such as slice type information slice_type is the code corresponding to the I slice
  • the coding format information included in the P slice such as the slice type information slice_type is the code corresponding to the P slice
  • the I slice also includes the information (first_mb_in_slice) of the position of the first macroblock contained in the slice in the whole frame, etc.
  • the P slice also includes the information of the position of the first macroblock contained in the slice in the whole frame ( first_mb_in_slice) and so on.
  • the encoding format is the current image frame of intra-encoded, and the encoding format information of each image area data after encoding is intra-encoded; the encoding format is the current image frame of intra-encoded partial area, corresponding to the frame
  • the coding format information of the image area data in the inner coding area is intra-frame coding, and the coding format information of the image area data corresponding to other areas is inter-frame coding.
  • the receiving end judges whether the image area data is an I stripe or a P stripe according to the encoding format information in the image area data; if it is an I stripe, it performs intra-frame decoding on the image area data; if so, P strips, then perform inter-frame decoding on the image area data.
  • sending error feedback information to the sending end includes: if the current image frame is lost when receiving the encoded current image frame. Packet events, send error feedback information to the sender.
  • the receiving end receives the encoded image frame from the sending end, performs protocol header parsing and error-tolerant processing, and decodes it if it is confirmed to be correct; if the sequence number of the encoded frame in the frame header protocol is not continuous, it means there is packet loss, that is Packet loss event.
  • the sender has a global coded frame counter (frame_idx), which records the frame number of the coded frame by frame.
  • frame_idx the frame sequence number will be sent along with the protocol header. If the frame numbers of adjacent frames received by the receiving end are not continuous, indicating that there is frame loss during the transmission process, error feedback information is sent to the sending end.
  • error feedback information is generated based on the image area data, and the error feedback information is sent to the sending end.
  • the receiving end receives the encoded image area data of each area of the image frame from the sending end one by one. If the area corresponding to the image area data received in a certain time is not continuous with the area corresponding to the image area data received in the previous time, it means the middle If the data in the image area is lost and not received, an error feedback message is sent to the sender.
  • the receiving end receives the image area data encoded by each stripe of the image frame from the sending end one by one; the sending end strictly sends the image area data of a single strip as a data service packet, and the receiving end can be based on the physical layer business
  • the packet number index corresponds to the stripe index of the image area data; if the stripe index of the image area data received by the receiving end is not continuous with the stripe index of the image area data received the previous time, it means that there is an image corresponding to the stripe If the area data is lost and not received, an error feedback message is sent to the sender.
  • the transmission protocol header may not include the slice index corresponding to the current transmission code stream.
  • the image area data encoded in each area of the current image frame at the sending end includes a data packet sequence number.
  • the packet sequence number of the image area data if the packet sequence number of the image area data is not continuous with the packet sequence number of the previous image area data, according to the packet sequence number of the previous image area data and the first image corresponding to the current image frame The data packet sequence number of the area data calculates the area index information corresponding to the image area data; and generates error feedback information including the area index information.
  • the area index information may indicate the position of the area in the image frame corresponding to the error image area data. For example, if the packet sequence number of the image area data received by the receiving end at a certain time is 17, but the packet sequence number of the image area data received before is 14, it means that the image area data with packet numbers 15 and 16 has not been received; if The data packet sequence number of the first image area data corresponding to the current image frame is 12, then the packet sequence number 14 of the previous image area data can be subtracted from the data packet sequence number 12 of the first image area data corresponding to the current image frame, and then Add one to obtain the area index information corresponding to the image area data as 3; or subtract the packet sequence number of the first image area data corresponding to the current image frame from 15 from the packet sequence number 15 of the first unreceived image area data , The area index information corresponding to the image area data is 3; it means that the first unreceived image area data is the image area data corresponding to the strip after the third strip in the current image frame, that is, the fourth Image
  • each image area data sent by the sending end to the receiving end includes a slice index corresponding to the coded slice.
  • each data packet sent from the sender to the receiver includes a transmission protocol header with a strip index.
  • the strip index of the image area data is not continuous with the strip index of the previous image area data, according to the strip index of the previous image area data and the first image area corresponding to the current image frame
  • the strip index of the data calculates the area index information corresponding to the image area data; and generates error feedback information including the area index information.
  • the stripe index of the image area data received by the receiving end at a certain time is 6, but the stripe index of the previous image area data is 3, it means that the image area with the stripe index of 4 and 5 has not been received.
  • the data stripe index of the first image area data corresponding to the current image frame is 1, then the stripe index 3 of the previous image area data can be subtracted from the data stripe of the first image area data corresponding to the current image frame With index 1, then add one to get the area index information corresponding to the image area data as 3; or subtract the first image area corresponding to the current image frame from the strip index 4 of the first unreceived image area data
  • the data stripe index of the data is 1, and the area index information corresponding to the image area data is 3; it means that the first unreceived image area data corresponds to the stripe after the third stripe in the current image frame Image area data, that is, the image area data corresponding to the fourth band.
  • the area index information corresponding to the image area data is calculated, and error feedback information including the area index information is generated; the error feedback information received by the sending end from the receiving end includes area index information. Therefore, the sending end can determine the region where the first error correction refresh frame is intra-coded according to the region index information in the acquired error feedback information, and frame the region where the first error correction refresh frame is intra-coded. Intra coding; for example, intra coding is performed on the fourth slice in the first error correction refresh frame.
  • the receiving end decodes the first error correction refresh frame, especially after intra-frame decoding is performed on the region where the first error correction refresh frame is intra-coded, the reference data of the region can be updated; therefore, it can be faster Update the reference data of the receiving and decoding error area, which is conducive to the rapid recovery of the error state and reduces the probability of the screen blur phenomenon.
  • the sender determines the region where the n-th image frame is intra-encoded as the middle region according to the region index information in the error feedback information, and then performs intra-frame coding on the middle region of the n-th image frame. Encoding, inter-coding the header area and tail area of the nth image frame. After receiving the image frame, the receiving end performs intra-frame decoding on the middle region of the nth image frame, and updates the data corresponding to the middle region in the reference data.
  • the image area data of each area of the current image frame at the transmitting end received by the receiving end from the transmitting end includes area index information.
  • the certain image area data received by the receiving end from the sending end includes area index information, such as stripe index 3.
  • error feedback information including the area index information is generated, and the error feedback information is sent to the sending end.
  • the receiving end makes an error when receiving the image area data corresponding to the area index information of strip index 3, for example, although the area index information is obtained through protocol header analysis, the image data is incomplete or the bit error rate is too high, then Generate error feedback information including region index information of stripe index 3, and send the error feedback information to the sending end.
  • the sending end may perform intra-frame coding on the third slice in the first error correction refresh frame according to the area index information in the obtained error feedback information.
  • sending error feedback information to the sending end includes: if the received current image frame fails the integrity Checking, sending error feedback information to the sending end, where the error feedback information includes area index information corresponding to the header area of the current image frame.
  • the received current image frame fails the integrity check, it indicates that the current image frame received an error, and the error feedback information that can be sent to the sender includes the area index information corresponding to the header area of the current image frame, such as a stripe Index 1:
  • the sender performs intra-frame coding on the first slice in the first error correction refresh frame after the error feedback information of the slice index is 1.
  • the stripe index corresponding to the header area of the current image frame is 0, and the sending end performs intra-frame on the first stripe in the first error correction refresh frame according to the error feedback information with the stripe index of 0 coding.
  • sending error feedback information to the sending end includes: if decoding the current image frame fails, sending error feedback to the The sending end sends error feedback information.
  • an error feedback message containing the index information of the image area data area is sent to the sending end.
  • the receiving of the error correction refresh frame for intra-frame coding of the partial area sent by the sending end in response to the error feedback information in step S220 includes: receiving a preset number of codes from the sending end After the error correction refresh frame, the error correction refresh frame is obtained by the transmitting end performing intra-frame encoding on a partial area of the error correction refresh frame determined according to the error feedback information.
  • a preset one is determined in the image frame corresponding to the error feedback information, that is, the current image frame and/or the image frames subsequent to the current image frame. Number of error correction refresh frames.
  • the sending end uses a preset number of image frames starting from the image frame corresponding to the error feedback information as the error correction refresh frame.
  • the sending end determines the M image frames starting from the nth image frame, that is, the nth image frame to the n+M-1th image frame as M error correction refresh frames.
  • the sending end determines the M image frames starting from the nth image frame, that is, the nth image frame to the n+M-1th image frame as M error correction refresh frames.
  • the region where the receiving end receives the first error correction refresh frame from the sending end for intra-frame coding may be the header area, such as the first stripe.
  • the region where the receiving end receives the first error correction refresh frame from the sending end for intra-frame coding may also be an area determined according to the area index information in the error feedback information, such as the middle area or the fourth stripe.
  • step S230 the receiving end decodes the error correction refresh frame and refreshes the reference data for decoding according to the decoding result, including steps S231 to S232.
  • the receiving end After receiving the error correction refresh frame from the sending end, the receiving end performs intra-frame decoding on the intra-encoded area to obtain the refresh segment data corresponding to the area.
  • the receiving end when the receiving end receives the error correction refresh frame in which the partial area sent by the transmitting end in response to the error feedback information performs intra-frame coding, the coded image area data is received from the transmitting end, and the image area The data includes data encoded by the sending end on a partial area of the error correction refresh frame, and encoding format information.
  • the encoding format information of the image area data obtained by intra-encoding some areas in the error correction refresh frame is intra-frame encoding
  • the encoding format information of several image area data obtained after inter-encoding the remaining areas is Inter-frame coding.
  • intra-frame decoding is performed on the partial area-encoded data in the image area data to obtain the image area data The corresponding refresh fragment data.
  • the image area data further includes area index information of the partial area.
  • the receiving end performs intra-frame decoding on the encoded data of the partial region to obtain refresh segment data corresponding to the region index information.
  • the sending end performs intra-frame encoding on the third stripe of a certain error correction refresh frame, and performs inter-frame encoding on the first and second stripe to obtain three image area data, of which the third stripe
  • the encoding format information of the corresponding image area data is intra-frame encoding; after receiving the image area data corresponding to the third stripe, the receiving end performs intra-frame decoding on the image area data to obtain the refresh corresponding to the third stripe Fragment data.
  • intra-frame decoding is performed on the area coded in the error correction refresh frame, and the remaining areas are inter-decoded according to the reference data used for decoding. For example, after receiving the image area data corresponding to the first and second slices, the receiving end performs inter-frame decoding according to the data corresponding to the first and second slices in the reference data.
  • the receiving end decodes the part of the intra-encoded area to obtain part of the reference data corresponding to the corresponding area, that is, refresh segment data, and then update the reference data according to the refresh segment data. Part of the data corresponding to this area.
  • part of the data corresponding to the partial area in the reference data is updated to the refresh segment data.
  • the image area data further includes area index information of the partial area.
  • the receiving end updates part of the data corresponding to the area index information in the reference data to the refresh segment data.
  • the receiving end after receiving the image area data corresponding to the third stripe, the receiving end performs intra-frame decoding on the image area data to obtain the refresh segment data corresponding to the third stripe; the reference data corresponds to the third stripe. Part of the data of each stripe is updated to the refresh segment data.
  • correct feedback information is sent to the sending end.
  • the union of the regions where the preset number of error correction refresh frames corresponding to the same error feedback information is intra-encoded is equal to the image range of each image frame; as shown in Figure 2, the receiving end receives and decodes three errors After the wrong refresh frame, the reference data can be completely updated, and then correct feedback information is sent to the sending end. After receiving the correct feedback information, the sending end can continue to encode subsequent image frames.
  • the sending end determines an error correction sequence according to the error feedback information sent by the receiving end, and the error correction sequence includes a preset number of error correction refresh frames and several non-error correction refresh frames, such as predicted frames .
  • the receiving end After refreshing the reference data according to the refresh segment data corresponding to the preset number of error correction refresh frames, the receiving end sends correct feedback information to the sending end; after receiving the correct feedback information, the sending end corrects the error correction sequence
  • the predicted frame of is subjected to inter-frame encoding, and the encoded predicted frame is sent to the receiving end.
  • the error feedback information is sent to the transmitting end; the transmitting end determines the preset number of error correction refresh frames according to the error correction refresh frame, and repeats One-time error correction refresh frame determination and partial area intra-frame coding.
  • the receiving end refreshes the reference data according to the refresh segment data corresponding to the preset number of error correction refresh frames, then returns to step S210 to continue execution; that is, continues to receive the encoded current image frame from the sender , The step of decoding the current image frame continues to be executed until receiving the current image frame error or decoding the current image frame error.
  • the receiving end after refreshing the reference data according to the refresh segment data corresponding to the preset number of error correction refresh frames, the receiving end sends correct feedback information to the sending end; after the sending end receives the correct feedback information, Obtain, for example, the image frame newly shot by the camera, that is, the current image frame, encode the current image frame, and send the encoded current image frame to the receiving end; the receiving end receives the encoded current image frame from the sending end, and decodes the current image frame. Describe the current image frame.
  • FIG. 26 is a schematic flowchart of a video transmission method provided by an embodiment of the present application, which is used for the aforementioned sending end to transmit video to the aforementioned receiving end.
  • the video transmission method of this embodiment includes steps S510 to S540.
  • S510 The sending end encodes the acquired current image frame, and sends the encoded current image frame to the receiving end.
  • the sending end sends image frames to the receiving end frame by frame, as shown in Figure 2;
  • the camera on the sending end acquires the image frames in real time, encodes the acquired image frames frame by frame, and sends them to the receiving end. .
  • the sending end determines whether the current image frame is an interval refresh frame according to an interval refresh condition; if the current image frame is not an interval refresh frame, the sending end performs inter-frame encoding on the current image frame.
  • the sending end determines that the current image frame is an interval refresh frame, and the refresh period includes adjacent refresh ranges and prediction ranges; If the number of the current image frame is within the prediction range of any refresh period, the sending end determines that the current image frame is not an interval refresh frame.
  • the sending end determines that the current image frame is an interval refresh frame, and the image sequence includes adjacent refresh subsequences and A predictive subsequence, where the refresh subsequence includes at least one image frame at the beginning of the image sequence; if the number of the current image frame is in the predictor subsequence of any image sequence, the sending end determines the current image The frame is not an interval refresh frame.
  • the sending end if the current image frame is an interval refresh frame, the sending end performs intra-frame encoding on the current image frame.
  • every 8 image frames is a refresh period, wherein the first image frame in each refresh period is an interval refresh frame, and the second to eighth image frames are not interval refresh frames ; Then respectively perform inter-frame encoding on the acquired second to eighth image frames to obtain respective corresponding inter-frame encoded frames, namely P frames.
  • the receiving end can update the reference data completely to improve the refresh cycle or each non-refresh frame in the image sequence. Refresh the accuracy of frame decoding at intervals to prevent blurring.
  • the sending end performs intra-frame coding on a partial area of the current image frame.
  • the sending end performs intra-frame coding on a partial area of the current image frame, and performs inter-frame coding on the remaining areas.
  • every 8 image frames is a refresh period, wherein the first to third image frames in each refresh period are interval refresh frames, and the fourth to eighth image frames It is not an interval refresh frame; then the acquired 4th to 8th image frames are inter-encoded respectively to obtain respective corresponding inter-encoded frames, namely P frames.
  • the region where each interval refresh frame in the same refresh period or image sequence undergoes intra-coding is different, and the union of the regions where all interval refresh frames in the same refresh period or image sequence undergo intra-frame encoding is equal to the image of each image frame range.
  • regions where intra-frame coding is performed on refresh frames at different intervals may partially overlap, or may not overlap with each other.
  • the receiving end can update the reference data completely to improve the refresh period or image sequence The accuracy of the decoding of the non-interval refresh frames in the middle, to prevent the screen blur.
  • step S510 the sending end encodes the acquired current image frame, and before sending the encoded current image frame to the receiving end, the sending end performs intra-frame encoding on an image frame, and the encoded The image frame is sent to the receiving end; the sending end performs inter-frame encoding on several image frames following the image frame according to the intra-encoded image frame, and sends the encoded image frame to the receiving end.
  • the image frame a is the first image frame sent by the sending end to the receiving end at a certain moment.
  • the transmitting end performs intra-frame encoding on the image frame to obtain an I frame, and sends the encoded image frame to the receiving end; so that the receiving end can quickly obtain complete reference data after decoding.
  • the receiving end can obtain the complete reference data;
  • the sending end can refer to the image frame a to perform inter-frame encoding on the obtained image frame b, and obtain the P frame and send it to the receiving end ,
  • the receiving end decodes the image frame b according to the reference data.
  • the sending end may refer to the image frame a or the image frame b to perform inter-frame encoding on the acquired image frame c, and obtain the P frame to send to the receiving end, and the receiving end decodes the image frame c according to the reference data.
  • the receiving end receives and decodes the current image frame, and if there is an error in receiving the current image frame or decoding the current image frame, it sends error feedback information to the sending end.
  • the receiving end receives and decodes the current image frame sent by the sending end.
  • the receiving end decodes the current image frame according to the reference data used for decoding.
  • the receiving end if the encoding format corresponding to the current image frame is intra-frame encoding, the receiving end performs intra-frame decoding on the current image frame; the receiving end refreshes the reference according to the result of the intra-frame decoding data.
  • the receiving end receives and decodes the refresh period or interval refresh frame in the image sequence, such as an intra-frame encoding frame, can update the reference data completely to improve the refresh period or each non-interval refresh frame in the image sequence
  • the accuracy of decoding prevents screen flickering.
  • the receiving end after refreshing the reference data according to the result of intra-frame decoding, the receiving end sends correct feedback information to the sending end.
  • the receiving end performs intra-frame decoding on the intra-encoded area of the current image frame to obtain the current image Refresh segment data corresponding to the frame; the receiving end updates part of the data in the reference data corresponding to the region encoded in the frame to the refresh segment data.
  • the receiving end performs inter-frame decoding on the remaining areas of the current image frame according to the reference data.
  • the receiving end when the receiving end decodes the intra-coded region of the current image frame, it can decode the part of the data without referring to other image frames, and the decoded data can be used as reference data for decoding other image frames , To realize the periodic update of the reference data used for decoding.
  • the receiving end sends correct feedback information to the sending end.
  • the receiving end can update the reference data completely, and then send correct feedback information to the sending end.
  • the sender performs intra-frame coding on some areas of the interval refresh frame, and inter-frame coding for the remaining areas; it can reduce the resource occupation of network resources and avoid the complete image frame intra-frame coding that causes a burst of code rate and causes delay and jitter Increase, and can provide the receiving end with reference data needed for decoding at intervals.
  • the receiving end determines that a packet loss event or an integrity check error occurs when receiving an image frame, it sends error feedback information to the transmitting end; the error feedback information includes the receiving end's response to the packet loss The feedback information of the event or the feedback information of the receiving end in response to the integrity check error.
  • the receiving end sends success feedback information and error feedback information to the sending end through an uplink channel between the receiving end and the sending end.
  • error feedback information is sent to the sending end.
  • the receiving end receives the encoded image frame from the sending end, performs protocol header parsing and error-tolerant processing, and decodes it if it is confirmed to be correct; if the sequence number of the encoded frame in the frame header protocol is not continuous, it means there is packet loss, that is Packet loss event.
  • the receiving end receives from the sending end the image area data that has been encoded for each area of the current image frame, and decodes each image area data of the current image frame.
  • the image area data includes encoding format information.
  • the receiving end decodes the image region data according to a decoding manner corresponding to the encoding format information.
  • the receiving end does not correctly receive the encoded image area data from the transmitting end, error feedback information is generated according to the image area data, and the error feedback information is sent to the transmitting end.
  • the receiving end receives the encoded image area data of each area of the image frame from the sending end one by one. If the area corresponding to the image area data received in a certain time is not continuous with the area corresponding to the image area data received in the previous time, it means the middle If the data in the image area is lost and not received, an error feedback message is sent to the sender.
  • the image area data includes a data packet sequence number.
  • the receiving end uses the packet sequence number of the previous image area data and the first one corresponding to the current image frame.
  • the data packet sequence number of the image area data calculates the area index information corresponding to the image area data; the receiving end generates error feedback information including the area index information.
  • the image area data includes area index information.
  • error feedback information including the area index information is generated.
  • the receiving end if the current image frame received by the receiving end fails the integrity check, the receiving end sends error feedback information to the sending end, and the error feedback information includes the current image frame Area index information corresponding to the header area.
  • the stripe index corresponding to the header area of the current image frame is 0, and the sending end performs intra-frame on the first stripe in the first error correction refresh frame according to the error feedback information with the stripe index of 0 coding.
  • the receiving end if the receiving end fails to decode the current image frame, the receiving end sends error feedback information to the sending end.
  • error feedback information including the index information of the image area data area is sent to the sending end.
  • the sending end determines an error correction refresh frame according to the error feedback information, performs intra-frame coding on a part of the error correction refresh frame, and sends the coded error correction refresh frame to the receiving end.
  • the sending end performs intra-frame coding on a partial area of the error correction refresh frame, and after sending the coded error correction refresh frame to the receiving end, it returns to the current image frame obtained in step S510 Encoding is performed, and the step of sending the encoded current image frame to the receiving end is continued until the error feedback information sent by the receiving end is received.
  • the sending end determines a preset number of error correction refresh frames in the current image frame and/or image frames subsequent to the current image frame, and performs part of each of the error correction refresh frames The region is intra-coded. For example, the sending end uses a preset number of image frames starting from the current image frame as error correction refresh frames.
  • the M image frames starting from the nth image frame that is, the nth image frame to the n+M-1th image frame, are determined as M error correction refresh frames.
  • the sending end performs intra-frame coding on a part of the error correction refresh frame, and performs inter-frame coding on the remaining areas.
  • the union of the regions where the preset number of error correction refresh frames is intra-coded is equal to the range of any error correction refresh frame.
  • the sending end uses the current image frame as the first error correction refresh frame, performs intra-frame encoding on a partial area of the first error correction refresh frame, and encodes the first
  • the error correction refresh frame is sent to the receiving end; then the sending end obtains the next error correction refresh frame; then the sending end performs intra-frame encoding on a part of the error correction refresh frame, and the encoded
  • the error correction refresh frame is sent to the receiving end; then it returns to the sending end to obtain the next error correction refresh frame, and the sending end performs intra-frame coding on a part of the error correction refresh frame, and the encoded all
  • the step of sending the error correction refresh frame to the receiving end is continued until the last error correction refresh frame is encoded and sent to the receiving end.
  • the sending end performs intra-frame coding on the header area of the first error correction refresh frame; the sending end performs intra-frame coding on the previous error correction refresh frame of the error correction refresh frame
  • the coded area is moved backward to obtain the area where the error correction refresh frame is intra-coded, and the area where the error correction refresh frame is intra-coded is intra-coded.
  • the sending end determines the same number of error correction refresh frames in the current image frame and/or image frames subsequent to the current image frame according to the number of stripes in the current image frame; The sending end performs intra-frame coding on the first slice of the first error correction refresh frame; the sending end adds the sequence number of the intra-coded slice of the previous error correction refresh frame of the error correction refresh frame 1. Obtain the stripe sequence number for intra-coding of the error correction refresh frame, and perform intra-frame coding on the stripe corresponding to the stripe sequence number in the error correction refresh frame.
  • the receiving end decodes the preset number of error corrections Refresh the frame, you can completely refresh the reference data to improve the accuracy of the receiver's decoding of subsequent image frames, and prevent the received video from blurring.
  • the error feedback information includes area index information.
  • an error occurs when the receiving end receives and decodes data of a certain area in the current image frame, it generates error feedback information according to the area index information of the area and sends it to the sending end.
  • the sending end determines the intra-encoded area of the first error correction refresh frame according to the area index information in the obtained error feedback information, and performs intra-frame encoding on the area of the first error correction refresh frame Intra coding; the sending end shifts the area where the previous error correction refresh frame of the error correction refresh frame is intra-encoded to obtain the area where the error correction refresh frame is intra-coded, and refresh the error correction The area where the frame is intra-encoded is intra-encoded.
  • the transmitting end will be after the region where the previous error correction refresh frame is intra-coded To obtain the intra-frame coding area of the error correction refresh frame; if the intra-frame coding area of the previous error correction refresh frame is at the end of the previous error correction refresh frame, the sending end will The header area of the error correction refresh frame is determined as the area where the error correction refresh frame performs intra-frame coding.
  • the sending end determines the same number of error correction refresh frames in the current image frame and/or image frames subsequent to the current image frame according to the number of stripes in the current image frame; The sending end determines that the strip corresponding to the strip number in the error feedback information in the first error correction refresh frame is the area for intra-coding; if the previous error correction refresh frame is the area for intra-coding Not at the end of the previous error correction refresh frame, the sending end adds one to the stripe sequence number of the previous error correction refresh frame that is intra-coded to obtain the stripe of the error correction refresh frame that is intra-coded Serial number; if the area where the previous error correction refresh frame is intra-encoded is at the end of the previous error correction refresh frame, the sending end determines the first stripe of the error correction refresh frame as the Error correction refreshes the frame for intra-encoded stripes.
  • the area where the first error correction refresh frame is intra-coded is the pixel area from the 201st line to the 400th line of the first error correction refresh frame.
  • the pixel area from line 201 to line 400 of the n-th image frame is intra-encoded, and other areas are inter-encoded; then the encoded n-th image frame is sent to the receiving end.
  • the receiving end decodes the n-th image frame, especially after intra-frame decoding is performed on the area where the n-th image frame is intra-encoded, the reference data of the area can be updated; therefore, the reference data of the receiving and decoding error area can be updated more quickly
  • the data is conducive to the rapid recovery of the error state and reduces the probability of the phenomenon of blurring.
  • the receiving end decodes the error correction refresh frame, and refreshes reference data used for decoding according to the decoding result.
  • the receiving end receives a preset number of coded error correction refresh frames from the sending end.
  • the receiving end performs intra-frame decoding on the region coded in the error correction refresh frame, and performs inter-frame decoding on the remaining regions according to the reference data used for decoding.
  • the receiving end performs intra-frame decoding on the area coded in the error correction refresh frame to obtain refresh segment data corresponding to the error correction refresh frame; the receiving end corresponds to the error correction refresh frame
  • the refresh segment data refreshes the reference data.
  • the receiving end when the receiving end decodes the area of the error correction refresh frame for intra-frame encoding, it can decode this part of the data without referring to other image frames, and the decoded data can be used as the reference data required for decoding other image frames , To achieve the update of the reference data used for decoding.
  • the receiving end when the receiving end receives a preset number of coded error correction refresh frames from the sending end, the receiving end receives the coded image area data from the sending end, and the image The area data includes data after the sending end encodes a partial area of the error correction refresh frame, and encoding format information.
  • the receiving end performs intra-frame decoding on the partial area-encoded data to obtain refresh segment data corresponding to the image area data;
  • the receiving end updates partial data corresponding to the partial area in the reference data to the refresh fragment data.
  • the image area data further includes area index information of the partial area.
  • the receiving end performs intra-frame decoding on the partial area coded data to obtain refresh segment data corresponding to the area index information; then the receiving end converts the reference data corresponding to the area index Part of the data of the information is updated to the refresh segment data.
  • the receiving end after refreshing the reference data according to the refresh segment data corresponding to the preset number of error correction refresh frames, the receiving end sends correct feedback information to the sending end.
  • the union of the regions where the preset number of error correction refresh frames corresponding to the same error feedback information is intra-encoded is equal to the image range of each image frame; as shown in Figure 2, the receiving end receives and decodes three errors After the wrong refresh frame, the reference data can be completely updated, and then correct feedback information is sent to the sending end. After receiving the correct feedback information, the sending end can continue to encode subsequent image frames.
  • the sending end determines an error correction sequence according to the current image frame, and the error correction sequence includes a preset number of errors.
  • the receiving end after refreshing the reference data according to the refresh segment data corresponding to the preset number of error correction refresh frames, the receiving end sends correct feedback information to the sending end.
  • the sending end performs intra-frame encoding on a partial area of the error correction refresh frame, and after sending the encoded error correction refresh frame to the receiving end, if the receiving end decodes the error correction refresh
  • the correct feedback information sent at the time of the frame, the prediction frame in the error correction sequence is inter-frame coded, and the coded prediction frame is sent to the receiving end.
  • the error feedback information is sent to the transmitting end; the transmitting end determines the preset number of error correction refresh frames according to the error correction refresh frame, and repeats One-time error correction refresh frame determination and partial area intra-frame coding.
  • the sending end performs inter-frame encoding on the predicted frame in the error correction sequence, and after sending the encoded predicted frame to the receiving end, returns the current image frame obtained by the sending end to Perform encoding, send the encoded current image frame to the receiving end, and the steps of receiving and decoding the current image frame by the receiving end continue until the receiving end receives the current image frame in error or decodes the current image If a frame error occurs, error feedback information is sent to the sending end.
  • each refresh period in the video transmission method includes N image frames, where the interval refresh frame includes consecutive M frames, and each image frame is divided into M strips for encoding, where N is greater than M.
  • the receiving end sends feedback information to the sending end through the uplink channel.
  • the feedback information includes error status
  • the error status is a first value, such as 1, it means that the feedback information is wrong feedback information
  • the error status is a second value, such as 0, it means that the feedback information is correct feedback information; wrong feedback
  • the information may also include the slice_idx of the slice_idx of the slice with errors received and decoded.
  • Figure 27 shows a schematic diagram of image frame transmission.
  • processing logic of the sender is as follows:
  • the sending end receives the first value in the feedback information sent by the receiving end at any time, it immediately determines M error correction refresh frames according to the frame corresponding to the feedback information, and performs partial area detection on each error correction refresh frame.
  • Intra-frame coding the obtained error correction refresh frame is sent to the receiving end.
  • the union of the regions where these M frames are intra-coded is equal to the range of one frame, that is, the refresh regions are superimposed into a whole frame; among them, according to the feedback
  • the slice index slice_idx of the information determines the region where the first error correction refresh frame performs intra-frame coding;
  • the slice_idx of the feedback information is used to determine the first frame in the refresh cycle for intra-frame encoding Area; if the error status in the feedback information sent by the receiving end is the second value, it is determined that the area where the first frame in the refresh cycle is intra-encoded is the first stripe;
  • processing logic of the receiving end is as follows:
  • the error status in the initial feedback information is the second value, and the slice_idx of the slice index is 0;
  • the protocol header when the protocol header is analyzed, if the physical layer packet sequence number or the encoded frame sequence number in the frame header protocol is not continuous, it means that there is packet loss, then the difference between the first packet sequence number and the first packet sequence number of the frame is recorded as slice_idx, at the same time the error status is set to the first value, and the feedback information is sent to the sender. If the coded frame length and checksum in the end-of-frame protocol fail, the error status is also set to the first value, slice_idx is recorded as 0, and the feedback information is sent to the sender.
  • the transmitting end when a transmission error occurs in a certain image frame, the transmitting end performs intra-frame coding on part of the error correction refresh frame, and the receiving end can update the reference data required for decoding in time.
  • This enables faster recovery of transmission errors; and can reduce the resource occupation of network resources, avoiding the burst of code rate caused by the intra-frame encoding of the complete image frame and the increase of delay and jitter.
  • the interval refresh frame and the error correction refresh frame are divided according to the stripe of the image frame, the number of each group of refresh frames is the same as the number of strips of the image frame, and each strip corresponds to a frame within a refresh frame Coding area.
  • the receiving end sends feedback information to the sending order through the uplink channel, and the sending end can adjust the refresh period and the refresh mode according to the feedback information; for example, after receiving the error feedback information, break the original refresh period and encode M error corrections in time Refresh the frame so that the receiver can update the reference data.
  • the transmission protocol guarantees that the transmitted code stream data service contains strip index information, and the receiving end can correspond to the two, so as to determine the strip index of the error location.
  • the following two implementation methods one is to add a transmission protocol header with a stripe index to each sent data packet, and the other is that the transmission protocol header does not contain the stripe index corresponding to the current transmission code stream.
  • the end sends a data service packet strictly according to a single strip, and the receiving end can obtain the strip index corresponding to the service packet number index of the physical layer.
  • the sender when the sender receives the error feedback information, it readjusts the refresh cycle and refresh format, which is not limited to the following implementation: if an error occurs, the refresh area corresponding to the strip index of the error feedback information starts to perform intra-frame encoding and Send, complete a full frame area refresh after M frames; after refresh complete, start a new refresh cycle after several P frames.
  • one I frame, or a complete set of M interval refresh frames, or a complete set of M error correction refresh frames will be received, and the correct reception and decoding will be used as a judgment basis for error recovery.
  • the video sending method provided in the embodiments of the present application can still perform decoding and display when the upstream error packet is relatively high or the upstream feedback is not timely, and the sending end will still maintain periodic refresh; when an error occurs , The sender will break the original refresh cycle, send out the error correction refresh frame as soon as possible, and the refresh area is the area corresponding to the stripe index of the error, ensuring the fastest and maximum error recovery; it can take into account the delay of image transmission and the delay Error recovery speed is the two most important image transmission indicators.
  • the video sending method is particularly suitable for application scenarios that have extremely high requirements for image transmission delay and error recovery speed, such as traversing machines.
  • FIG. 28 is a schematic block diagram of a video sending device 600 according to an embodiment of the present application.
  • the video sending device 600 includes a processor 601 and a memory 602.
  • the processor 601 and the memory 602 are connected by a bus 603, which is, for example, an I2C (Inter-integrated Circuit) bus.
  • I2C Inter-integrated Circuit
  • the processor 601 may be a micro-controller unit (MCU), a central processing unit (Central Processing Unit, CPU), a digital signal processor (Digital Signal Processor, DSP), or the like.
  • MCU micro-controller unit
  • CPU Central Processing Unit
  • DSP Digital Signal Processor
  • the memory 602 may be a Flash chip, a read-only memory (ROM, Read-Only Memory) disk, an optical disk, a U disk, or a mobile hard disk.
  • the processor 601 is configured to run a computer program stored in the memory 602, and implement the aforementioned video sending method when the computer program is executed.
  • the processor 601 is configured to run a computer program stored in the memory 602, and implement the following steps when executing the computer program:
  • FIG. 29 is a schematic block diagram of an aircraft 10 according to an embodiment of the present application.
  • the aircraft 10 includes:
  • the image acquisition component 11 is used to acquire images
  • the above-mentioned video sending device 600 is used to obtain the image collected by the image collecting component, and send it to the receiving end after encoding;
  • the flight component 12 is used for flight.
  • FIG. 30 is a schematic block diagram of a video receiving apparatus 700 according to an embodiment of the present application.
  • the video receiving device 700 includes a processor 701 and a memory 702, and the processor 701 and the memory 502 are connected by a bus 703, which is, for example, an I2C (Inter-integrated Circuit) bus.
  • I2C Inter-integrated Circuit
  • the processor 701 may be a micro-controller unit (MCU), a central processing unit (Central Processing Unit, CPU), a digital signal processor (Digital Signal Processor, DSP), or the like.
  • MCU micro-controller unit
  • CPU Central Processing Unit
  • DSP Digital Signal Processor
  • the memory 702 may be a Flash chip, a read-only memory (ROM, Read-Only Memory) disk, an optical disk, a U disk, or a mobile hard disk.
  • the processor 701 is configured to run a computer program stored in the memory 702, and implement the aforementioned video receiving method when the computer program is executed.
  • the processor 701 is configured to run a computer program stored in the memory 702, and implement the following steps when executing the computer program:
  • error feedback information is sent to the sending end, and the receiving end performs error correction of intra-frame coding on the partial area sent by the sending end in response to the error feedback information Refresh frame
  • the error correction refresh frame is decoded, and the reference data used for decoding is refreshed according to the decoding result.
  • FIG. 31 is a schematic block diagram of a video playback device 20 according to an embodiment of the present application.
  • video playback equipment includes:
  • the above-mentioned video receiving device 700 is used for receiving and decoding an image from a sending end
  • the display component 21 is used to display the data decoded by the video receiving device.
  • the sending end performs intra-frame coding on part of the error correction refresh frame when an image frame transmission error occurs, and the receiving end can update in time
  • the reference data required for decoding enables faster recovery of transmission errors; and can reduce the resource occupation of network resources, avoiding the burst of code rate caused by the intra-frame encoding of the complete image frame and the increase of delay and jitter.
  • the embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes program instructions, and the processor executes the program instructions to implement the foregoing implementation Example provides the steps of the video sending method.
  • the computer-readable storage medium may be the internal storage unit of the video sending device described in any of the foregoing embodiments, such as the hard disk or memory of the video sending device.
  • the computer-readable storage medium may also be an external storage device of the video sending device, for example, a plug-in hard disk equipped on the video sending device, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital). , SD) card, flash card (Flash Card), etc.
  • the embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes program instructions, and the processor executes the program instructions to implement the foregoing implementation Example provides the steps of the video receiving method.
  • the computer-readable storage medium may be the internal storage unit of the video receiving device described in any of the foregoing embodiments, such as the hard disk or memory of the video receiving device.
  • the computer-readable storage medium may also be an external storage device of the video receiving device, such as a plug-in hard disk equipped on the video receiving device, a Smart Media Card (SMC), and Secure Digital (Secure Digital). , SD) card, flash card (Flash Card), etc.

Abstract

Disclosed are a video transmission method and apparatus, and an aircraft, a playback device, and a storage medium. The method comprises: obtaining the current image frame, encoding the current image frame, and then sending the encoded current image frame to a receiving terminal (S110); if error feedback information sent by the receiving terminal is received, determining an error correction refreshing frame according to the current image frame (S120); and performing intra-frame encoding on a partial region of the error correction refreshing frame, and sending the encoded error correction refreshing frame to the receiving terminal (S130), so as to enable a transmission error to recover faster.

Description

视频传输方法、装置、飞行器、播放设备及存储介质Video transmission method, device, aircraft, playback equipment and storage medium 技术领域Technical field
本申请涉及视频传输技术领域,尤其涉及一种视频传输方法、装置、飞行器、播放设备及存储介质。This application relates to the field of video transmission technology, and in particular to a video transmission method, device, aircraft, playback device, and storage medium.
背景技术Background technique
目前,对实时性要求较高的视频传输通常通过将较多的视频帧进行帧间编码为预测帧(P帧),提高对信道的利用率,在相同信道条件下会有更清晰的画质。At present, video transmissions that require high real-time performance usually inter-encode more video frames into prediction frames (P frames) to improve channel utilization and have clearer picture quality under the same channel conditions. .
预测帧的编解码需要参考其他视频帧的信息,现有技术通常在接收端预测帧解码失败时,发送端重新编码出一个完整的关键帧(I帧)发送给接收端,接收端解码该关键帧得到新的参考信息,以使后续的预测帧解码正确;但是由于关键帧的压缩效率比较低,容易出现编码码率突发,发送和接收该关键帧需要占用较多的时间,影响后续视频帧的发送和接收,该关键帧附近常会出现延迟增加和卡顿的情况;因此该种方式对无线传输物理信道不是很友好,尤其是在信道状况不是很好、或信道变化较快的场景,图传延迟和卡顿感会比较明显。The coding and decoding of the predicted frame needs to refer to the information of other video frames. In the prior art, when the receiving end fails to decode the predicted frame, the sending end re-encodes a complete key frame (I frame) and sends it to the receiving end, and the receiving end decodes the key frame. Frame gets new reference information to make the subsequent prediction frame decode correctly; but because the compression efficiency of the key frame is relatively low, it is easy to have a burst of coding rate, sending and receiving the key frame takes more time, which affects the subsequent video For the transmission and reception of frames, there are often increased delays and freezes near the key frame; therefore, this method is not very friendly to the wireless transmission physical channel, especially in scenarios where the channel conditions are not very good or the channel changes quickly. The image transmission delay and the feeling of freezing will be more obvious.
虽然有技术通过周期性进行视频渐近刷新(Gradual decoder refresh,GDR)解码需要的参考信息,但是如果要及时更新参考信息以保证预测帧正确解码,就需要缩短刷新周期,从而编码的冗余信息增多,信道的利用率也会降低,同样码率下画质降低;而刷新周期增大时也会使得参考信息无法及时更新,预测帧解码出错后,错误恢复速度比较慢。Although there are technologies that periodically perform Gradual Decoder Refresh (GDR) decoding of the reference information needed, if the reference information needs to be updated in time to ensure that the predicted frame is decoded correctly, the refresh cycle needs to be shortened, thereby encoding redundant information Increased, channel utilization will also decrease, and image quality at the same bit rate will decrease; and when the refresh period increases, the reference information will not be updated in time, and the error recovery speed will be slower after the prediction frame decodes errors.
发明内容Summary of the invention
基于此,本申请提供了一种视频传输方法、装置、飞行器、播放设备及存储介质,旨在解决现有的视频传输过程中,在视频帧接收、解码错误时,容易出现编码码率突发,出现延迟增加和卡顿,而影响视频帧的传输等技术问题。Based on this, this application provides a video transmission method, device, aircraft, playback device, and storage medium, aiming to solve the problem of encoding rate bursts when video frame receiving and decoding errors occur in the existing video transmission process. , There are technical problems such as increased delay and freeze, which affect the transmission of video frames.
第一方面,本申请提供了一种视频发送方法,应用于发送端,包括:In the first aspect, this application provides a video sending method applied to the sending end, including:
获取当前图像帧,对所述当前图像帧进行编码,将编码后的当前图像帧向接收端发送;Acquiring a current image frame, encoding the current image frame, and sending the encoded current image frame to the receiving end;
若接收到所述接收端发送的错误反馈信息,根据所述当前图像帧确定纠错刷新帧;If error feedback information sent by the receiving end is received, determine an error correction refresh frame according to the current image frame;
对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送。Perform intra-frame coding on a part of the error correction refresh frame, and send the coded error correction refresh frame to the receiving end.
第二方面,本申请提供了一种视频接收方法,应用于接收端,包括:In the second aspect, this application provides a video receiving method applied to the receiving end, including:
从发送端接收编码后的当前图像帧,解码所述当前图像帧;Receiving the encoded current image frame from the sending end, and decoding the current image frame;
若接收所述当前图像帧出错或者解码所述当前图像帧出错,向所述发送端发送错误反馈信息,接收所述发送端响应于所述错误反馈信息发送的部分区域进行帧内编码的纠错刷新帧;If there is an error in receiving the current image frame or the decoding of the current image frame, error feedback information is sent to the sending end, and the receiving end performs error correction of intra-frame coding on the partial area sent by the sending end in response to the error feedback information Refresh frame
解码所述纠错刷新帧,根据解码结果刷新用于解码的参考数据。The error correction refresh frame is decoded, and the reference data used for decoding is refreshed according to the decoding result.
第三方面,本申请提供了一种视频传输方法,包括:In the third aspect, this application provides a video transmission method, including:
发送端对获取的当前图像帧进行编码,将编码后的当前图像帧向接收端发送;The sending end encodes the acquired current image frame, and sends the encoded current image frame to the receiving end;
所述接收端接收、解码所述当前图像帧,若接收所述当前图像帧出错或者解码所述当前图像帧出错,向所述发送端发送错误反馈信息;The receiving end receives and decodes the current image frame, and if there is an error in receiving the current image frame or decoding the current image frame, sending error feedback information to the sending end;
所述发送端根据所述错误反馈信息确定纠错刷新帧,对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送;The sending end determines an error correction refresh frame according to the error feedback information, performs intra-frame coding on a part of the error correction refresh frame, and sends the coded error correction refresh frame to the receiving end;
所述接收端解码所述纠错刷新帧,根据解码结果刷新用于解码的参考数据。The receiving end decodes the error correction refresh frame, and refreshes the reference data used for decoding according to the decoding result.
第四方面,本申请提供了一种视频发送装置,包括存储器和处理器;In a fourth aspect, the present application provides a video sending device, including a memory and a processor;
所述存储器用于存储计算机程序;The memory is used to store computer programs;
所述处理器,用于执行所述计算机程序并在执行所述计算机程序时,实现如下步骤:The processor is configured to execute the computer program, and when executing the computer program, implement the following steps:
获取当前图像帧,对所述当前图像帧进行编码,将编码后的当前图像帧向接收端发送;Acquiring a current image frame, encoding the current image frame, and sending the encoded current image frame to the receiving end;
若接收到所述接收端发送的错误反馈信息,根据所述当前图像帧确定纠错刷新帧;If error feedback information sent by the receiving end is received, determine an error correction refresh frame according to the current image frame;
对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所 述接收端发送。Perform intra-frame coding on a partial area of the error correction refresh frame, and send the coded error correction refresh frame to the receiving end.
第五方面,本申请提供了一种飞行器,包括:In the fifth aspect, this application provides an aircraft, including:
图像采集组件,用于采集图像;Image acquisition component, used to acquire images;
前述的视频发送装置,用于获取图像采集组件采集到的图像,编码后向接收端发送;The aforementioned video sending device is used to acquire the image collected by the image collection component, and send it to the receiving end after encoding;
飞行组件,用于飞行。Flight components, used for flight.
第六方面,本申请提供了一种视频接收装置,包括存储器和处理器;In a sixth aspect, the present application provides a video receiving device, including a memory and a processor;
所述存储器用于存储计算机程序;The memory is used to store computer programs;
所述处理器,用于执行所述计算机程序并在执行所述计算机程序时,实现如下步骤:The processor is configured to execute the computer program, and when executing the computer program, implement the following steps:
从发送端接收编码后的当前图像帧,解码所述当前图像帧;Receiving the encoded current image frame from the sending end, and decoding the current image frame;
若接收所述当前图像帧出错或者解码所述当前图像帧出错,向所述发送端发送错误反馈信息,接收所述发送端响应于所述错误反馈信息发送的部分区域进行帧内编码的纠错刷新帧;If there is an error in receiving the current image frame or the decoding of the current image frame, error feedback information is sent to the sending end, and the receiving end performs error correction of intra-frame coding on the partial area sent by the sending end in response to the error feedback information Refresh frame
解码所述纠错刷新帧,根据解码结果刷新用于解码的参考数据。The error correction refresh frame is decoded, and the reference data used for decoding is refreshed according to the decoding result.
第七方面,本申请提供了一种视频播放设备,包括:In a seventh aspect, this application provides a video playback device, including:
前述的视频接收装置,用于从发送端接收图像,并进行解码;The aforementioned video receiving device is used to receive images from the sending end and decode them;
显示组件,用于显示所述视频接收装置解码出的数据。The display component is used to display the data decoded by the video receiving device.
第八方面,本申请提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现前述的视频发送方法;或者In an eighth aspect, the present application provides a computer-readable storage medium that stores a computer program that, when executed by a processor, causes the processor to implement the aforementioned video sending method; or
实现前述的视频接收方法。Implement the aforementioned video receiving method.
本申请实施例提供了一种视频传输方法、装置、飞行器、播放设备及存储介质,通过在某图像帧传输出错时,对纠错刷新帧的部分区域进行帧内编码,既可以降低网络资源的资源占用,避免对完整的图像帧进行帧内编码导致码率突发而引起延迟和抖动增加,而且可以及时为接收端提供解码所需的参考数据,使得传输错误较快恢复。The embodiments of the application provide a video transmission method, device, aircraft, playback device, and storage medium. By performing intra-frame coding on part of the error correction refresh frame when a certain image frame is transmitted incorrectly, the network resources can be reduced. Resource occupancy, avoiding the burst of code rate caused by intra-encoding of the complete image frame and increasing delay and jitter, and can provide the receiving end with reference data required for decoding in time, so that transmission errors can be recovered quickly.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the application.
附图说明Description of the drawings
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following will briefly introduce the drawings needed in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. Ordinary technicians can obtain other drawings based on these drawings without creative work.
图1是本申请一实施例提供的一种视频发送方法的流程示意图;FIG. 1 is a schematic flowchart of a video sending method provided by an embodiment of the present application;
图2是发送端向接收端发送图像帧的场景示意图;Fig. 2 is a schematic diagram of a scene in which the sender sends image frames to the receiver;
图3至图5是本申请视频发送方法其他实施方式的流程示意图;3 to 5 are schematic flowcharts of other implementation manners of the video sending method of this application;
图6、图7是图1中对纠错刷新帧的部分区域进行帧内编码的流程示意图;Fig. 6 and Fig. 7 are schematic diagrams of the intra-frame coding process of part of the error correction refresh frame in Fig. 1;
图8、图9是本申请视频发送方法其他实施方式的流程示意图;8 and 9 are schematic flowcharts of other implementation manners of the video sending method of this application;
图10、图11是图1中对纠错刷新帧的部分区域进行帧内编码的流程示意图;Fig. 10 and Fig. 11 are schematic diagrams of the intra-frame coding process of part of the error correction refresh frame in Fig. 1;
图12是图1中对纠错刷新帧的部分区域进行帧内编码的流程示意图;FIG. 12 is a schematic flow chart of intra-encoding a part of the error correction refresh frame in FIG. 1;
图13是根据错误反馈信息中的区域索引信息确定帧内编码区域的示意图;FIG. 13 is a schematic diagram of determining an intra-frame coding region according to region index information in error feedback information;
图14、图15是图1中对纠错刷新帧的部分区域进行帧内编码的流程示意图;Fig. 14 and Fig. 15 are schematic diagrams of the intra-frame coding process of part of the error correction refresh frame in Fig. 1;
图16、图17是图1中对当前图像帧进行编码的流程示意图;16 and 17 are schematic diagrams of the flow of encoding the current image frame in FIG. 1;
图18是对刷新周期中的间隔刷新帧进行帧内编码的示意图;FIG. 18 is a schematic diagram of performing intra-frame coding on interval refresh frames in a refresh period;
图19是对刷新周期中的间隔刷新帧的部分区域进行帧内编码的示意图;Fig. 19 is a schematic diagram of performing intra-frame coding on a partial area of an interval refresh frame in a refresh period;
图20是本申请视频发送方法另一实施方式的流程示意图;20 is a schematic flowchart of another implementation manner of a video sending method according to the present application;
图21是图20中对一图像帧进行帧内编码,对之后的若干图像帧进行帧间编码的示意图;FIG. 21 is a schematic diagram of performing intra-frame encoding on one image frame in FIG. 20 and performing inter-frame encoding on subsequent image frames;
图22是本申请一实施例提供的一种视频接收方法的流程示意图;FIG. 22 is a schematic flowchart of a video receiving method provided by an embodiment of the present application;
图23、图24是图22中解码所述当前图像帧的流程示意图;Fig. 23 and Fig. 24 are schematic diagrams of the flow of decoding the current image frame in Fig. 22;
图25是图22中解码纠错刷新帧和刷新参考数据的流程示意图;25 is a schematic diagram of the flow of decoding error correction refresh frame and refreshing reference data in FIG. 22;
图26是本申请一实施例提供的一种视频传输方法的流程示意图;FIG. 26 is a schematic flowchart of a video transmission method provided by an embodiment of the present application;
图27是视频传输方法一实施方式的图像帧传输的示意图。FIG. 27 is a schematic diagram of image frame transmission in an embodiment of a video transmission method.
图28是本申请一实施例提供的一种视频发送装置的示意性框图;FIG. 28 is a schematic block diagram of a video sending device according to an embodiment of the present application;
图29是本申请一实施例提供的一种飞行器的示意性框图;FIG. 29 is a schematic block diagram of an aircraft according to an embodiment of the present application;
图30是本申请一实施例提供的一种视频接收装置的示意性框图;FIG. 30 is a schematic block diagram of a video receiving device according to an embodiment of the present application;
图31是本申请一实施例提供的一种视频播放设备的示意性框图。FIG. 31 is a schematic block diagram of a video playback device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组合或部分合并,因此实际执行的顺序有可能根据实际情况改变。The flowchart shown in the drawings is merely an illustration, and does not necessarily include all contents and operations/steps, nor does it have to be executed in the described order. For example, some operations/steps can also be decomposed, combined or partially combined, so the actual execution order may be changed according to actual conditions.
下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Hereinafter, some embodiments of the present application will be described in detail with reference to the accompanying drawings. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.
请参阅图1,图1是本申请一实施例提供的用于发送端的一种视频发送方法的流程示意图,所述视频发送方法可以应用在终端设备或者服务器中,用于向接收端发送视频等过程;其中终端设备可以为手机、平板电脑、笔记本电脑、台式电脑、个人数字助理、穿戴式设备或者无人机等,服务器可以为独立的服务器,也可以为服务器集群。进一步而言,无人机可以为旋翼型无人机,例如四旋翼无人机、六旋翼无人机、八旋翼无人机,也可以是固定翼无人机,且该无人机上带有摄像设备。Please refer to FIG. 1. FIG. 1 is a schematic flowchart of a video sending method for the sending end according to an embodiment of the present application. The video sending method can be applied to a terminal device or a server for sending video to the receiving end, etc. Process: The terminal device can be a mobile phone, tablet computer, notebook computer, desktop computer, personal digital assistant, wearable device or drone, etc. The server can be an independent server or a server cluster. Furthermore, the UAV can be a rotary-wing UAV, such as a quadrotor UAV, a hexarotor UAV, an eight-rotor UAV, or a fixed-wing UAV, and the UAV has Camera equipment.
如图1所示,本实施例视频发送方法包括步骤S110至步骤S130。As shown in FIG. 1, the video sending method of this embodiment includes steps S110 to S130.
S110、获取当前图像帧,对所述当前图像帧进行编码,将编码后的当前图像帧向接收端发送。S110. Obtain a current image frame, encode the current image frame, and send the encoded current image frame to the receiving end.
在本实施例中,发送端逐帧向接收端发送图像帧,如图2所示;示例性的,发送端上的摄像头实时获取图像帧,将获取的图像帧逐帧编码后向接收端发送。In this embodiment, the sending end sends image frames to the receiving end frame by frame, as shown in FIG. 2; exemplary, the camera on the sending end acquires image frames in real time, encodes the acquired image frames frame by frame, and sends them to the receiving end .
例如,当前图像帧为设于发送端上的摄像头实时获取的图像帧,表示当前时刻发送端获取和要发送的图像帧。For example, the current image frame is an image frame acquired in real time by a camera set on the sending end, which represents an image frame acquired and to be sent by the sending end at the current moment.
示例性的,发送端对所述当前图像帧进行帧间(Interframe)编码,得到预测编码图像帧(Predictive-codedPicture),即P帧;通过参考之前的图像 帧,采用运动预测的方式进行帧间预测编码。Exemplarily, the sending end performs interframe encoding on the current image frame to obtain a predictive-coded picture frame (Predictive-coded Picture), that is, a P frame; by referring to the previous image frame, the interframe is performed by motion prediction Predictive coding.
如图2所示,发送端依次将第2个图像帧至第n-1个图像帧作为当前图像帧,进行帧间编码得到P帧后向接收端发送。As shown in Figure 2, the sending end sequentially takes the second image frame to the n-1th image frame as the current image frame, performs inter-frame coding to obtain the P frame and then sends it to the receiving end.
例如,参考第1个图像帧,对第2个图像帧进行帧间编码;参考第1个图像帧或者第2个图像帧,对第3个图像帧进行帧间编码。For example, refer to the first image frame and perform inter-frame coding on the second image frame; refer to the first image frame or the second image frame and perform inter-frame coding on the third image frame.
S120、若接收到所述接收端发送的错误反馈信息,根据所述当前图像帧确定纠错刷新帧。S120: If error feedback information sent by the receiving end is received, determine an error correction refresh frame according to the current image frame.
在本实施例中,发送端将编码后的图像帧向接收端发送,如果接收端接收某一图像帧出错或者解码图像帧出错,则向发送端发送错误反馈信息。In this embodiment, the sending end sends the encoded image frame to the receiving end, and if the receiving end receives an error in an image frame or the decoded image frame has an error, it sends error feedback information to the sending end.
示例性的,接收端接收、解码出任一图像帧后向发送端发送成功反馈信息,以及解码该图像帧;发送端收到成功反馈信息后获取新的图像帧,进行编码后向接收端发送;如果接收端接收某一图像帧出错或者解码图像帧出错,则向发送端发送错误反馈信息。Exemplarily, after receiving and decoding any image frame, the receiving end sends success feedback information to the sending end, and decodes the image frame; the sending end obtains a new image frame after receiving the success feedback information, performs encoding and sends it to the receiving end; If the receiving end receives a certain image frame error or the decoded image frame has an error, it sends error feedback information to the transmitting end.
示例性的,接收端通过和发送端之间的上行信道将成功反馈信息、错误反馈信息向发送端发送。例如,上行信道还可以用于向发送端,如无人机传输飞控指令,以及各种控制指令,如拍照,录像,返航等指令。Exemplarily, the receiving end sends success feedback information and error feedback information to the sending end through an uplink channel between the receiving end and the sending end. For example, the uplink channel can also be used to transmit flight control instructions to the sending end, such as drones, and various control instructions, such as taking pictures, videos, and returning to home.
示例性的,错误反馈信息包括所述接收端响应于丢包事件的反馈信息,或者包括所述接收端响应于完整性校验错误的反馈信息。Exemplarily, the error feedback information includes the feedback information of the receiving end in response to the packet loss event, or includes the feedback information of the receiving end in response to an integrity check error.
发送端在向接收端发送某一图像帧时,接收到接收端发送的错误反馈信息,则表示该图像帧发送或解码失败,则根据错误反馈信息对应的图像帧确定纠错刷新帧。When sending an image frame to the receiving end, the sending end receives error feedback information sent by the receiving end, which indicates that the image frame has failed to be sent or decoded, and the error correction refresh frame is determined according to the image frame corresponding to the error feedback information.
S130、对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送。S130. Perform intra-frame coding on a partial area of the error correction refresh frame, and send the coded error correction refresh frame to the receiving end.
不同于现有技术中对整个图像帧进行帧内(Intraframe)编码,在本实施例中,对纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送。如图2所示,对第n个图像帧至第n+2个图像帧的部分区域进行帧内编码。Different from performing intraframe (Intraframe) encoding on the entire image frame in the prior art, in this embodiment, the partial area of the error correction refresh frame is intraframe encoded, and the encoded error correction refresh frame is sent to the receiving end send. As shown in FIG. 2, intra-frame coding is performed on a partial region from the nth image frame to the n+2th image frame.
进行帧内编码时,不需要参考其他图像帧,可以完整描述图像帧或图像帧部分区域的图像背景和运动主体的信息,帧内编码后数据的数据量比较大,向接收端传输时占用的网络资源比较多;接收端在解码经帧内编码的图像帧或图 像帧部分区域时,不需要参考其他图像帧就可解码出该部分数据,解码出的数据作为其他图像帧进行解码时所需的参考数据。When performing intra-frame coding, there is no need to refer to other image frames. It can completely describe the image background and moving subject information of the image frame or part of the image frame. The data volume after intra-frame coding is relatively large, which is occupied when transmitting to the receiving end. There are a lot of network resources; when the receiving end is decoding an intra-encoded image frame or part of an image frame, it can decode this part of the data without referring to other image frames, and the decoded data is required when decoding other image frames Reference data.
本实施例提供的视频发送方法通过在某图像帧传输出错时,对纠错刷新帧的部分区域进行帧内编码,既可以降低网络资源的资源占用,避免对完整的图像帧进行帧内编码导致码率突发而引起延迟和抖动增加,而且可以及时为接收端提供解码所需的参考数据,使得传输错误较快恢复。The video transmission method provided in this embodiment performs intra-frame coding on part of the error correction refresh frame when a certain image frame is transmitted incorrectly, which can reduce the resource occupation of network resources and avoid the intra-frame coding of the complete image frame. The burst of code rate causes delay and jitter to increase, and can provide the receiving end with reference data required for decoding in time, so that transmission errors can be recovered quickly.
在一些实施方式中,如图3所示,步骤S130中对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送,包括:In some embodiments, as shown in FIG. 3, performing intra-frame coding on a partial area of the error correction refresh frame in step S130, and sending the coded error correction refresh frame to the receiving end includes:
S1301、对所述纠错刷新帧的部分区域进行帧内编码,对所述纠错刷新帧的其余区域进行帧间编码,将编码后的纠错刷新帧向所述接收端发送。S1301: Perform intra-frame coding on a partial area of the error correction refresh frame, perform inter-frame coding on the remaining area of the error correction refresh frame, and send the coded error correction refresh frame to the receiving end.
帧间编码后数据的数据量比较小,向接收端传输时占用的网络资源比较少;因而可以实现编码后纠错刷新帧的数据量较小,而且包括帧内编码的区域,可用于接收端刷新参考数据。The data volume after inter-frame encoding is relatively small, and the network resources occupied when transmitting to the receiving end is relatively small; therefore, the data volume of the error correction refresh frame after encoding can be small, and it includes the area of intra-frame encoding, which can be used at the receiving end Refresh the reference data.
在一些实施方式中,如图4所示,步骤S120若接收到所述接收端发送的错误反馈信息,根据所述当前图像帧确定纠错刷新帧,包括:In some embodiments, as shown in FIG. 4, if error feedback information sent by the receiving end is received in step S120, determining an error correction refresh frame according to the current image frame includes:
S121、若接收到所述接收端发送的错误反馈信息,在所述当前图像帧和/或所述当前图像帧之后的图像帧中确定预设个数的纠错刷新帧。S121: If error feedback information sent by the receiving end is received, determine a preset number of error correction refresh frames in the current image frame and/or image frames subsequent to the current image frame.
若接收到所述接收端发送的错误反馈信息,在错误反馈信息对应的图像帧,即当前图像帧和/或该当前图像帧之后的图像帧中确定预设个数的纠错刷新帧。If the error feedback information sent by the receiving end is received, a preset number of error correction refresh frames are determined in the image frame corresponding to the error feedback information, that is, the current image frame and/or the image frames subsequent to the current image frame.
例如,发送端在S110获取第n个图像帧,对该图像帧进行编码后向接收端发送;但是在S120接收到接收端发送的错误反馈信息,则可以在第n个图像帧和/或第n个图像帧之后的图像帧中确定预设个数,如M个纠错刷新帧,n、M是不为0的自然数。如图2所示,M等于3。For example, the sending end obtains the nth image frame in S110, encodes the image frame, and sends it to the receiving end; but receiving error feedback information sent by the receiving end in S120, it can be used in the nth image frame and/or The preset number is determined in the image frames after n image frames, such as M error correction refresh frames, and n and M are natural numbers that are not 0. As shown in Figure 2, M is equal to 3.
示例性的,如图5所示,步骤S121在所述当前图像帧和/或所述当前图像帧之后的图像帧中确定预设个数的纠错刷新帧,包括:Exemplarily, as shown in FIG. 5, step S121 determining a preset number of error correction refresh frames in the current image frame and/or the image frames subsequent to the current image frame includes:
S1201、将以所述当前图像帧开始的预设个数的图像帧作为纠错刷新帧。S1201. Use a preset number of image frames starting from the current image frame as error correction refresh frames.
例如,如图2所示,将第n个图像帧开始的M个图像帧,即第n个图像帧至第n+M-1个图像帧确定为M个纠错刷新帧。以更迅速的响应接收端的错误反馈信息,向接收端发送纠错刷新帧。For example, as shown in FIG. 2, M image frames starting from the nth image frame, that is, the nth image frame to the n+M-1th image frame are determined as M error correction refresh frames. To respond more quickly to the error feedback information from the receiving end, send an error correction refresh frame to the receiving end.
在一些实施方式中,如图6所示,步骤S130对所述纠错刷新帧的部分区域 进行帧内编码,将编码后的纠错刷新帧向所述接收端发送,包括步骤S131至S134。In some embodiments, as shown in FIG. 6, step S130 performs intra-frame coding on a part of the error correction refresh frame, and sends the coded error correction refresh frame to the receiving end, including steps S131 to S134.
S131、将所述当前图像帧作为第一个纠错刷新帧,对所述第一个纠错刷新帧的部分区域进行帧内编码,将编码后的第一个纠错刷新帧向所述接收端发送。S131. Use the current image frame as the first error correction refresh frame, perform intra-frame encoding on a partial area of the first error correction refresh frame, and send the encoded first error correction refresh frame to the receiving Send at the end.
在本实施方式中,将以错误反馈信息对应的当前图像帧开始的预设个数的图像帧作为纠错刷新帧。In this embodiment, a preset number of image frames starting from the current image frame corresponding to the error feedback information are used as error correction refresh frames.
示例性的,接收端在接收、解码第n个图像帧时出现错误,向发送端发送错误反馈信息,发送端将第n个图像帧至第n+M-1个图像帧确定为M个纠错刷新帧;第一个纠错刷新帧为错误反馈信息对应的当前图像帧,即第n个图像帧。Exemplarily, the receiving end makes an error when receiving and decoding the nth image frame, and sends error feedback information to the sending end, and the sending end determines the nth image frame to the n+M-1th image frame as M errors. Error refresh frame; the first error correction refresh frame is the current image frame corresponding to the error feedback information, that is, the nth image frame.
示例性的,对第n个图像帧的部分区域进行帧内编码,其余区域进行帧间编码,之后将编码后的第n个图像帧向接收端发送。Exemplarily, intra-frame coding is performed on a partial area of the n-th image frame, and the remaining areas are subjected to inter-frame coding, and then the coded n-th image frame is sent to the receiving end.
S132、获取下一纠错刷新帧。S132. Obtain a next error correction refresh frame.
示例性的,无人机上的摄像头逐帧获取图像帧,在发送端对某一图像帧进行编码、传输的同时或者之后,发送端可以实时获取下一各图像帧。由于摄像头获取图像帧的速度大致恒定,因此发送端对图像帧进行传输的时长需要限定在一个较小的范围内,才不会使视频传输卡顿。在本实施例中,对纠错刷新帧的部分区域进行帧内编码,传输的码率较小,花费时间较短;可以实现至少在拍摄下一图像帧之前传输完毕纠错刷新帧,保证视频传输的实时性,减少延迟。Exemplarily, the camera on the drone acquires image frames frame by frame, and while or after a certain image frame is encoded and transmitted by the sending end, the sending end may obtain the next image frames in real time. Since the speed at which the camera acquires the image frame is approximately constant, the transmission time of the image frame by the sender needs to be limited to a small range so that the video transmission will not be stuck. In this embodiment, intra-encoding is performed on a part of the error correction refresh frame, the bit rate of the transmission is small, and the time is shorter; it can be realized that the error correction refresh frame is transmitted at least before the next image frame is taken to ensure the video Real-time transmission, reducing delay.
示例性的,获取摄像头新拍摄的图像帧,例如第n+s个图像帧作为所述下一纠错刷新帧,其中s小于M,且s是不为0的自然数。Exemplarily, an image frame newly captured by the camera is acquired, for example, the n+sth image frame is used as the next error correction refresh frame, where s is less than M, and s is a natural number that is not 0.
S133、对所述纠错刷新帧的部分区域进行帧内编码,将编码后的所述纠错刷新帧向所述接收端发送。S133: Perform intra-frame coding on a partial area of the error correction refresh frame, and send the coded error correction refresh frame to the receiving end.
示例性的,对第n+s个图像帧的部分区域进行帧内编码,其余区域进行帧间编码,之后将编码后的第n+s个图像帧向接收端发送。Exemplarily, intra-encoding is performed on a part of the n+sth image frame, and the remaining areas are inter-encoded, and then the encoded n+sth image frame is sent to the receiving end.
在一些实施方式中,同一错误反馈信息对应的不同纠错刷新帧进行帧内编码的区域不同。从而,接收端可以根据解码不同的纠错刷新帧更新参考数据的不同部分。In some embodiments, different error correction refresh frames corresponding to the same error feedback information perform intra-frame coding in different regions. Therefore, the receiving end can update different parts of the reference data according to the decoding of different error correction refresh frames.
S134、返回所述获取下一纠错刷新帧,以及对所述纠错刷新帧的部分区域进行帧内编码,将编码后的所述纠错刷新帧向所述接收端发送的步骤继续执行, 直至最后一个纠错刷新帧编码后向所述接收端发送。S134. Return to the acquisition of the next error correction refresh frame, and perform intra-frame coding on a partial area of the error correction refresh frame, and continue to execute the step of sending the encoded error correction refresh frame to the receiving end. Until the last error correction refresh frame is coded, it is sent to the receiving end.
示例性的,如图7所示,步骤S134返回所述获取下一纠错刷新帧,以及对所述纠错刷新帧的部分区域进行帧内编码,将编码后的所述纠错刷新帧向所述接收端发送的步骤继续执行,直至最后一个纠错刷新帧编码后向所述接收端发送,包括:Exemplarily, as shown in FIG. 7, step S134 returns to the acquisition of the next error correction refresh frame, and performs intra-frame encoding on a part of the error correction refresh frame, and transfers the encoded error correction refresh frame to The steps sent by the receiving end continue to be executed until the last error correction refresh frame is coded and sent to the receiving end, including:
S1341、判断最后一个纠错刷新帧是否已经编码后向所述接收端发送。S1341. Determine whether the last error correction refresh frame has been encoded and sent to the receiving end.
示例性的,若最后一个纠错刷新帧还未编码后向所述接收端发送,返回所述获取下一纠错刷新帧,以及对所述纠错刷新帧的部分区域进行帧内编码,将编码后的所述纠错刷新帧向所述接收端发送的步骤继续执行;若最后一个纠错刷新帧已经编码后向所述接收端发送,可以返回步骤S110继续执行。Exemplarily, if the last error correction refresh frame is sent to the receiving end after it has not been encoded, return to the acquisition of the next error correction refresh frame, and perform intra-frame encoding on a part of the error correction refresh frame, and The step of sending the encoded error correction refresh frame to the receiving end is continued; if the last error correction refresh frame has been encoded and sent to the receiving end, it can return to step S110 to continue execution.
示例性的,若s小于M-1,则返回步骤S132获取第n+s+1个图像帧,对该图像帧的部分区域进行帧内编码,将编码后的图像帧向接收端发送;若s等于M-1,则第n+M-1个图像帧,即最后一个纠错刷新帧已经进行部分帧内编码后向接收端发送了,不用返回获取新的纠错刷新帧。Exemplarily, if s is less than M-1, return to step S132 to obtain the n+s+1th image frame, perform intra-frame coding on a partial area of the image frame, and send the coded image frame to the receiving end; if s is equal to M-1, then the n+M-1 image frame, that is, the last error correction refresh frame has been partially intra-coded and sent to the receiving end, and there is no need to return to obtain a new error correction refresh frame.
示例性的,依次对步骤S121确定的预设个数的纠错刷新帧进行部分区域帧内编码,将编码后的所述纠错刷新帧向所述接收端发送。Exemplarily, the preset number of error correction refresh frames determined in step S121 are sequentially coded in partial regions, and the coded error correction refresh frames are sent to the receiving end.
在一些实施方式中,对于任一错误反馈信息,其对应的预设个数的纠错刷新帧进行帧内编码的区域的并集等于任一纠错刷新帧帧的范围。经过对预设个数的纠错刷新帧进行部分区域帧内编码,等效为一整个图像帧的所有区域均进行了帧内编码;因此,接收端通过解码所述预设个数的纠错刷新帧,可以将参考数据完整的刷新一遍,以提高接收端对后续的图像帧进行解码的准确性,防止接收的视频发生花屏的现象。In some embodiments, for any error feedback information, the union of the regions where the corresponding preset number of error correction refresh frames is intra-coded is equal to the range of any error correction refresh frame. After the preset number of error correction refresh frames are intra-encoded in some areas, it is equivalent to that all areas of an entire image frame are intra-encoded; therefore, the receiving end decodes the preset number of error corrections Refresh the frame, you can completely refresh the reference data to improve the accuracy of the receiver's decoding of subsequent image frames, and prevent the received video from blurring.
示例性的,步骤S130对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送之后,若接收到所述接收端发送的错误反馈信息,则表示接收端当前接收、解码的纠错刷新帧出现错误;发送端返回步骤S120、步骤S130继续执行,例如根据该纠错刷新帧,即当前图像帧确定纠错刷新帧,重新进行一轮纠错刷新帧的确定和部分区域帧内编码。Exemplarily, step S130 performs intra-frame coding on a partial area of the error correction refresh frame, and after sending the coded error correction refresh frame to the receiving end, if error feedback information sent by the receiving end is received, It means that there is an error in the error correction refresh frame currently received and decoded by the receiving end; the sending end returns to step S120 and step S130 to continue execution, for example, determines the error correction refresh frame according to the error correction refresh frame, that is, the current image frame, and performs another round of correction The determination of the wrong refresh frame and the intra-frame coding of some areas.
在一些实施方式中,如图8所示,步骤S130对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送之后,包括:In some embodiments, as shown in FIG. 8, step S130 performs intra-frame coding on a part of the error correction refresh frame, and after sending the coded error correction refresh frame to the receiving end, it includes:
S140、返回所述获取当前图像帧,对所述当前图像帧进行编码,将编码后 的当前图像帧向接收端发送的步骤继续执行,直至接收到所述接收端发送的错误反馈信息。S140. Return to the step of acquiring the current image frame, encoding the current image frame, and sending the encoded current image frame to the receiving end until the error feedback information sent by the receiving end is received.
示例性的,在将步骤S121确定的预设个数的纠错刷新帧进行部分区域帧内编码,向所述接收端发送之后,接收端的参考数据更新完成,可以进行正常的解码,如帧间解码。则发送端可以返回步骤S110获取例如摄像头新拍摄的图像帧,即当前图像帧,对所述当前图像帧进行编码,将编码后的当前图像帧向接收端发送。如果之后接收到接收端发送的错误反馈信息,则执行步骤S120至S140,以实现接收端对参考数据的更新。Exemplarily, after the preset number of error correction refresh frames determined in step S121 are subjected to partial area intra-coding and sent to the receiving end, the reference data of the receiving end is updated, and normal decoding can be performed, such as inter-frame decoding. Then the sending end may return to step S110 to obtain, for example, an image frame newly captured by the camera, that is, a current image frame, encode the current image frame, and send the encoded current image frame to the receiving end. If the error feedback information sent by the receiving end is received later, steps S120 to S140 are executed to implement the update of the reference data by the receiving end.
在另一些实施方式中,如图9所示,步骤S120若接收到所述接收端发送的错误反馈信息,根据所述当前图像帧确定纠错刷新帧,包括:In other embodiments, as shown in FIG. 9, if error feedback information sent by the receiving end is received in step S120, determining an error correction refresh frame according to the current image frame includes:
S122、若接收到所述接收端发送的错误反馈信息,根据所述当前图像帧确定纠错序列。S122: If error feedback information sent by the receiving end is received, determine an error correction sequence according to the current image frame.
具体的,所述纠错序列包括预设个数的纠错刷新帧和所述预设个数的纠错刷新帧之后的预测帧。Specifically, the error correction sequence includes a preset number of error correction refresh frames and a predicted frame after the preset number of error correction refresh frames.
示例性的,接收端接收到发送端进行部分帧内编码的纠错刷新帧,解码纠错刷新帧可以对参考数据进行更新;对于发送端,可以参考纠错刷新帧对纠错刷新帧之后的若干图像帧进行帧间编码;对于接收端,可以基于参考数据对纠错刷新帧之后的若干图像帧进行帧间解码。Exemplarily, the receiving end receives the error correction refresh frame in which the transmitting end performs partial intra-frame coding, and decoding the error correction refresh frame can update the reference data; for the sending end, you can refer to the error correction refresh frame to the error correction refresh frame after the error correction refresh frame. Several image frames are inter-encoded; for the receiving end, several image frames after the error correction refresh frame can be inter-decoded based on the reference data.
示例性的,接收端在接收、解码第n个图像帧时出现错误,向发送端发送错误反馈信息,发送端将第n个图像帧至第n+M-1个图像帧确定为M个纠错刷新帧,将第n+M个图像帧至第n+M+p-1个图像帧确定为p个预测帧;纠错刷新帧和纠错刷新帧之后的预测帧组成错误反馈信息对应的纠错序列。Exemplarily, the receiving end makes an error when receiving and decoding the nth image frame, and sends error feedback information to the sending end, and the sending end determines the nth image frame to the n+M-1th image frame as M errors. Error refresh frame, determine the n+M image frame to n+M+p-1 image frame as p prediction frames; the error correction refresh frame and the prediction frame after the error correction refresh frame constitute the error feedback information corresponding Error correction sequence.
在一些实施方式中,如图9所示,步骤S140返回所述获取当前图像帧,对所述当前图像帧进行编码,将编码后的当前图像帧向接收端发送的步骤继续执行,直至接收到所述接收端发送的错误反馈信息之前,包括:In some embodiments, as shown in FIG. 9, step S140 returns to the acquisition of the current image frame, encodes the current image frame, and continues the steps of sending the encoded current image frame to the receiving end until it is received Before the error feedback information sent by the receiving end, it includes:
S150、若接收到所述接收端在解码出所述纠错刷新帧时发送的正确反馈信息,对所述纠错序列中的预测帧进行帧间编码,将编码后的预测帧向所述接收端发送。S150. If the correct feedback information sent by the receiving end when the error correction refresh frame is decoded is received, perform inter-frame encoding on the predicted frame in the error correction sequence, and send the encoded predicted frame to the receiving Send at the end.
示例性的,步骤S150在步骤S130对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送之后执行。Exemplarily, step S150 is performed after performing intra-frame coding on a partial area of the error correction refresh frame in step S130, and the coded error correction refresh frame is sent to the receiving end.
示例性的,如果接收端接收各纠错刷新帧和解码各纠错刷新帧均正确,则参考数据进得到更新,可以向发送端发送正确反馈信息。发送端接收到正确反馈信息,则对纠错序列中的预测帧进行帧间编码,将编码后的预测帧向所述接收端发送。Exemplarily, if the receiving end receives each error correction refresh frame and decodes each error correction refresh frame, the reference data is updated, and correct feedback information can be sent to the sending end. After receiving the correct feedback information, the sending end performs inter-frame encoding on the predicted frame in the error correction sequence, and sends the encoded predicted frame to the receiving end.
示例性的,在对某一预测帧进行帧间编码时,可以参考该纠错序列中该预测帧之前的任一个预测帧。例如,在对第n+M个图像帧进行帧间编码时可以参考第n+M-1个图像帧;在对第n+M+p-1个图像帧进行帧间编码时可以参考第n个图像帧至第n+M+p-2个图像帧中的任一个。Exemplarily, when performing inter-frame coding on a certain prediction frame, any prediction frame before the prediction frame in the error correction sequence may be referred to. For example, when inter-coding the n+Mth image frame, you can refer to the n+M-1th image frame; when inter-coding the n+M+p-1th image frame, you can refer to the nth Image frames to any one of the n+M+p-2th image frames.
示例性的,步骤S130对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送之后,若接收到所述接收端发送的错误反馈信息,则表示接收端当前接收、解码的纠错刷新帧出现错误;发送端返回步骤S120、步骤S130继续执行,例如根据该纠错刷新帧,即当前图像帧确定纠错刷新帧,重新进行一次纠错刷新帧的确定和部分区域帧内编码。Exemplarily, step S130 performs intra-frame coding on a partial area of the error correction refresh frame, and after sending the coded error correction refresh frame to the receiving end, if error feedback information sent by the receiving end is received, It means that there is an error in the error correction refresh frame currently received and decoded by the receiving end; the sending end returns to step S120 and step S130 to continue execution, for example, the error correction refresh frame is determined according to the error correction refresh frame, that is, the current image frame, and the error correction is performed again Refresh frame determination and partial area intra-frame coding.
在一些实施方式中,如图10所示,步骤S131中对所述第一个纠错刷新帧的部分区域进行帧内编码,包括:In some embodiments, as shown in FIG. 10, performing intra-frame coding on a partial area of the first error correction refresh frame in step S131 includes:
S1311、对所述第一个纠错刷新帧的头部区域进行帧内编码。S1311: Perform intra-frame coding on the header area of the first error correction refresh frame.
如图2所示,发送端根据接收端发送的错误反馈信息将第n个图像帧至第n+M-1个图像帧确定为M个纠错刷新帧,其中第n个图像帧是第一个纠错刷新帧。将第一个纠错刷新帧的头部区域作为进行帧内编码的区域,其他区域可以进行帧间编码。As shown in Figure 2, the sending end determines the nth image frame to the n+M-1th image frame as M error correction refresh frames according to the error feedback information sent by the receiving end, where the nth image frame is the first An error correction refresh frame. The header area of the first error correction refresh frame is used as the area for intra-frame encoding, and other areas can be inter-frame encoding.
示例性的,对于某一图像帧,先获取的部分区域的图像为头部区域的图像,例如一图像帧的前面若干行像素。例如,发送端获取的各图像帧均为1920x1080的分辨率,在水平方向上,即每行有1920个像素点,在垂直方向上,即每列有1080个像素点;则前200行,共200×1920像素点所在的区域为该图像帧的头部区域。Exemplarily, for a certain image frame, the image of the partial area acquired first is the image of the head area, for example, several rows of pixels in front of an image frame. For example, each image frame acquired by the sending end has a resolution of 1920x1080, in the horizontal direction, that is, there are 1920 pixels in each row, and in the vertical direction, that is, there are 1080 pixels in each column; then the first 200 rows, a total of The area of 200×1920 pixels is the head area of the image frame.
在本实施方式中,步骤S133中的对所述纠错刷新帧的部分区域进行帧内编码,包括:In this embodiment, performing intra-frame coding on a partial area of the error correction refresh frame in step S133 includes:
S1331、将所述纠错刷新帧的前一纠错刷新帧进行帧内编码的区域后移,得到所述纠错刷新帧进行帧内编码的区域,对所述纠错刷新帧进行帧内编码的区域进行帧内编码。S1331: Move back the area where the previous error correction refresh frame of the error correction refresh frame is intra-encoded to obtain the area where the error correction refresh frame is intra-encoded, and perform intra-frame encoding on the error correction refresh frame The area is intra-coded.
示例性的,如图2所示,将第n个图像帧进行帧内编码的区域向远离头部区域的方向移动,即后移,得到第n+1个图像帧进行帧内编码的区域;将第n+1个图像帧进行帧内编码的区域向远离头部区域的方向移动,即后移,得到第n+2个图像帧进行帧内编码的区域。Exemplarily, as shown in FIG. 2, the region where the n-th image frame is intra-coded is moved away from the head region, that is, moved backward, to obtain the region where the n+1-th image frame is intra-coded; The region where the n+1th image frame is intra-coded is moved to a direction away from the head region, that is, moved backward, and the region where the n+2th image frame is intra-coded is obtained.
在图2中,同一纠错序列中各纠错刷新帧进行帧内编码的区域没有重合;例如,第n个图像帧进行帧内编码的区域为第0行至第200行的像素区域,第n+1个图像帧进行帧内编码的区域为第201行至第400行的像素区域,第n+2个图像帧进行帧内编码的区域为第401行至第800行的像素区域;各纠错刷新帧进行帧内编码的区域可以相等,也可以不相等。In Figure 2, in the same error correction sequence, the areas where the error correction refresh frames are intra-coded do not overlap; for example, the area where the nth image frame is intra-coded is the pixel area from row 0 to row 200. The area where n+1 image frames are intra-coded is the pixel area from line 201 to line 400, and the area where n+2 image frames are intra-coded is the pixel area from line 401 to line 800; each The area of the error correction refresh frame for intra-frame coding may be equal or unequal.
在另一可行的实施方式中,同一纠错序列中各纠错刷新帧进行帧内编码的区域可以由部分重合;例如,第n个图像帧进行帧内编码的区域为第0行至第300行的像素区域,第n+1个图像帧进行帧内编码的区域为第201行至第500行的像素区域,第n+2个图像帧进行帧内编码的区域为第401行至第700行的像素区域;各纠错刷新帧进行帧内编码的区域可以相等,也可以不相等。In another feasible implementation manner, the intra-encoded area of each error correction refresh frame in the same error correction sequence may be partially overlapped; for example, the area where the nth image frame is intra-encoded is the 0th to 300th line. The pixel area of the row, the area where the n+1 image frame is intra-coded is the pixel area from the 201st line to the 500th line, and the area where the n+2 image frame is intra-coded is the 401th to the 700th line The pixel area of the row; the area of each error correction refresh frame for intra-frame coding can be equal or unequal.
在本实施方式中,同一纠错序列中全部预设个数的纠错刷新帧进行帧内编码的区域的并集等于任一纠错刷新帧帧的范围。例如,同一纠错序列中的全部纠错刷新帧需要对第1行至第1080行的各像素范围进行帧内编码。如图2所示,第n个图像帧至第n+2个图像帧进行帧内编码的区域的并集等于一个完整图像帧的范围。因此,接收端通过解码所述预设个数的纠错刷新帧,可以将参考数据完整的刷新一遍,以提高接收端对后续的图像帧进行解码的准确性,防止接收的视频发生花屏的现象。In this embodiment, the union of regions where all preset number of error correction refresh frames in the same error correction sequence are intra-coded is equal to the range of any error correction refresh frame. For example, all the error correction refresh frames in the same error correction sequence need to perform intra-frame coding for each pixel range from the 1st line to the 1080th line. As shown in FIG. 2, the union of the regions where the intra-frame coding is performed from the nth image frame to the n+2th image frame is equal to the range of a complete image frame. Therefore, the receiving end can refresh the reference data completely by decoding the preset number of error correction refresh frames, so as to improve the accuracy of the receiving end to decode subsequent image frames and prevent the received video from being blurred. .
在一些实施方式中,如图11所示,步骤S121在所述当前图像帧和/或所述当前图像帧之后的图像帧中确定预设个数的纠错刷新帧,包括:In some embodiments, as shown in FIG. 11, step S121 determines a preset number of error correction refresh frames in the current image frame and/or image frames subsequent to the current image frame, including:
S1211、根据所述当前图像帧中条带的数量,在所述当前图像帧和/或所述当前图像帧之后的图像帧中确定相同数量的纠错刷新帧。S1211, according to the number of stripes in the current image frame, determine the same number of error correction refresh frames in the current image frame and/or image frames subsequent to the current image frame.
条带(Slice)包含一帧图像的部分或全部数据,换言之,一帧视频图像可以编码为一个或若干个条带。一个条带最少包含一个宏块(Macroblock),最多包含整帧图像的数据。在不同的编码实现中,同一帧图像中所构成的条带数目不一定相同。A slice contains part or all of the data of a frame of image. In other words, a frame of video image can be encoded into one or several slices. A strip contains at least one macroblock (Macroblock) and at most contains the data of the entire frame of image. In different coding implementations, the number of stripes formed in the same frame of image may not be the same.
在本实施例中,各图像帧包括至少两个条带;同一图像帧中的不同条带之 间的编码、解码是独立的;条带的解码过程所参考的数据,例如预测编码不能越过该条带的边界,可以防止误码的扩散。In this embodiment, each image frame includes at least two slices; the encoding and decoding between different slices in the same image frame are independent; the data referred to in the decoding process of slices, such as predictive coding, cannot exceed the The border of the strip can prevent the spread of errors.
示例性的,图像帧中条带的数量为3,则在所述当前图像帧和/或所述当前图像帧之后的图像帧中确定3个纠错刷新帧;如图2所示,确定第n个图像帧至第n+2个图像帧,为纠错刷新帧。Exemplarily, if the number of strips in the image frame is 3, then 3 error correction refresh frames are determined in the current image frame and/or the image frames after the current image frame; as shown in FIG. 2, the first image frame is determined The n image frames to the n+2th image frame are error correction refresh frames.
示例性的,步骤S1311对所述第一个纠错刷新帧的头部区域进行帧内编码,包括:Exemplarily, the step S1311 performing intra-frame encoding on the header area of the first error correction refresh frame includes:
S1311’、对所述第一个纠错刷新帧的第一个条带进行帧内编码。S1311'. Perform intra-frame coding on the first slice of the first error correction refresh frame.
示例性的,对第一个纠错刷新帧的第一个条带进行帧内编码,其他条带进行帧间编码。条带进行帧内编码,得到I条带,即I slice;条带进行帧间编码,得到P条带,即P slice。Exemplarily, intra-frame coding is performed on the first slice of the first error correction refresh frame, and inter-frame coding is performed on other slices. The slice is intra-coded to obtain I slice, namely I slice; the slice is inter-coded, and P slice is obtained, namely P slice.
示例性的,如图2所示,对第n个图像帧的第一个条带进行帧内编码。Exemplarily, as shown in FIG. 2, intra-frame coding is performed on the first slice of the n-th image frame.
示例性的,在I条带中只包含I类型宏块,即帧内预测宏块,不包含P宏块,即帧间预测宏块;在P条带中,除了相应的P宏块之外,还可以包含I宏块。Exemplarily, only type I macroblocks are included in the I slice, that is, intra-frame prediction macroblocks, and no P macroblocks, that is, inter-frame prediction macroblocks are not included; in the P slice, except for the corresponding P macroblocks , Can also contain I macroblocks.
条带进行帧内编码或帧间编码后,得到I条带或P条带;I条带包括的条带类型信息slice_type为I条带对应的代码,I条带还包括该条带包含的第一个宏块在整帧中位置的信息等;P条带包括的条带类型信息slice_type为P条带对应的代码,P条带还包括该条带包含的第一个宏块在整帧中位置的信息等。After the slice is coded intra-frame or inter-frame, an I slice or P slice is obtained; the slice type information slice_type included in the I slice is the code corresponding to the I slice, and the I slice also includes the first slice contained in the slice. Information about the position of a macroblock in the entire frame, etc.; the slice type information slice_type included in the P slice is the code corresponding to the P slice, and the P slice also includes the first macroblock contained in the slice in the whole frame Location information, etc.
接收端从发送端接收到编码后的条带之后,根据条带类型信息slice_type判断进行帧内解码还是帧间解码;若条带类型信息slice_type为I条带对应的代码,则进行帧内解码,若条带类型信息slice_type为P条带对应的代码,则进行帧间解码;解码后根据各条带包含的第一个宏块在整帧中位置的信息将解码出的数据拼接为图像帧的数据。After receiving the encoded slice from the sending end, the receiving end judges whether to perform intra-frame decoding or inter-frame decoding according to the slice type information slice_type; if the slice type information slice_type is the code corresponding to the I slice, the intra-frame decoding is performed, If the slice type information slice_type is the code corresponding to the P slice, then inter-frame decoding is performed; after decoding, the decoded data is spliced into the image frame according to the position information of the first macroblock contained in each slice in the whole frame data.
示例性的,步骤S1331所述将所述纠错刷新帧的前一纠错刷新帧进行帧内编码的区域后移,得到所述纠错刷新帧进行帧内编码的区域,对所述纠错刷新帧进行帧内编码的区域进行帧内编码,包括:Exemplarily, in step S1331, the area where the previous error correction refresh frame of the error correction refresh frame is intra-encoded is moved back to obtain the area where the error correction refresh frame is intra-coded, and the error correction is performed Refresh the frame for intra-frame coding in the area where intra-frame coding is performed, including:
S1331’、将所述纠错刷新帧的前一纠错刷新帧进行帧内编码的条带序号加一,得到所述纠错刷新帧进行帧内编码的条带序号,对所述纠错刷新帧中对应于所述条带序号的条带进行帧内编码。S1331', adding one to the stripe sequence number of the previous error correction refresh frame of the error correction refresh frame subjected to intra-frame coding to obtain the strip sequence number of the error correction refresh frame subjected to intra-frame coding, and refresh the error correction The slice in the frame corresponding to the slice number is intra-coded.
示例性的,如图2所示,将第n个图像帧进行帧内编码的条带序号加一,得到第n+1个图像帧进行帧内编码的条带序号为二;然后对第n+1个图像帧的第二个条带进行帧内编码,对第n+1个图像帧的第一个条带和第三个条带进行帧间编码;之后获取第n+2个图像帧,将第n+1个图像帧进行帧内编码的条带序号加一,得到第n+2个图像帧进行帧内编码的条带序号为三;然后对第n+2个图像帧的第三个条带进行帧内编码,对第n+2个图像帧的其他两个条带进行帧间编码。Exemplarily, as shown in FIG. 2, the slice number of the n-th image frame subjected to intra-coding is increased by one, and the slice number of the n+1-th image frame subjected to intra-coding is obtained as two; Perform intra-frame coding on the second slice of +1 image frame, and perform inter-frame coding on the first and third slices of the n+1th image frame; then obtain the n+2th image frame , Add one to the strip number of the n+1th image frame for intra-encoding, and get the strip number of the n+2th image frame for intra-encoding as three; then add one to the strip number of the n+2th image frame. Three slices are subjected to intra-frame coding, and the other two slices of the n+2th image frame are subjected to inter-frame coding.
同一纠错序列中各纠错刷新帧分别对一个条带进行帧内编码,全部预设个数的纠错刷新帧进行帧内编码的区域的并集等于任一纠错刷新帧帧的范围。接收端解码完一个纠错刷新帧后,更新图像帧中一个条带的参考信息;解码同一纠错序列中全部预设个数的纠错刷新帧后,图像帧中各条带的参考信息均得到更新;将纠错刷新帧中进行帧内编码的区域的划分结合至编码的单位,即条带中,可以降低计算量,提高准确率。Each error correction refresh frame in the same error correction sequence performs intra-coding on a stripe respectively, and the union of the regions where all the preset number of error correction refresh frames are intra-coded is equal to the range of any error correction refresh frame. After the receiving end decodes an error correction refresh frame, it updates the reference information of a strip in the image frame; after decoding all the preset number of error correction refresh frames in the same error correction sequence, the reference information of each strip in the image frame is all Get updated; combining the division of the area for intra-frame coding in the error correction refresh frame into the coding unit, that is, the strip, which can reduce the amount of calculation and improve the accuracy.
在另一些实施方式中,发送端从接收端接收的错误反馈信息包括区域索引信息。In other embodiments, the error feedback information received by the transmitting end from the receiving end includes area index information.
示例性的,接收端在接收、解码当前图像帧中某区域的数据时出现错误,则根据将该区域的区域索引信息生成错误反馈信息,向发送端发送。Exemplarily, if an error occurs when the receiving end receives and decodes data of a certain area in the current image frame, it generates error feedback information according to the area index information of the area and sends it to the sending end.
示例性的,发送端将编码后的当前图像帧向接收端发送时,接收到接收端发送的错误反馈信息,错误反馈信息包括对应于图像帧第201行至第400行的像素区域的区域索引信息。Exemplarily, when the sending end sends the encoded current image frame to the receiving end, the error feedback information sent by the receiving end is received, and the error feedback information includes the area index corresponding to the pixel area from line 201 to line 400 of the image frame information.
如图12所示,步骤S131中对所述第一个纠错刷新帧的部分区域进行帧内编码,包括:As shown in FIG. 12, performing intra-frame coding on a partial area of the first error correction refresh frame in step S131 includes:
S1312、根据所获取错误反馈信息中的区域索引信息确定所述第一个纠错刷新帧进行帧内编码的区域,对所述第一个纠错刷新帧进行帧内编码的区域进行帧内编码。S1312. Determine the region where the first error correction refresh frame is intra-coded according to the region index information in the acquired error feedback information, and perform intra-frame coding on the region where the first error correction refresh frame is intra-coded .
示例性的,根据错误反馈信息中的区域索引信息确定所述第一个纠错刷新帧进行帧内编码的区域为第一个纠错刷新帧第201行至第400行的像素区域。Exemplarily, it is determined according to the area index information in the error feedback information that the area where the first error correction refresh frame is intra-coded is the pixel area from the 201st line to the 400th line of the first error correction refresh frame.
示例性的,对所述第一个纠错刷新帧进行帧内编码的区域进行帧内编码,其他区域进行帧间编码。例如,对第n个图像帧第201行至第400行的像素区域进行帧内编码,其他区域进行帧间编码;然后将编码后的第n个图像帧向接 收端发送。Exemplarily, intra-frame coding is performed on the region where the first error correction refresh frame is intra-coded, and other regions are inter-frame coding. For example, the pixel area from line 201 to line 400 of the nth image frame is intra-encoded, and other areas are inter-encoded; then the encoded nth image frame is sent to the receiving end.
接收端解码第n个图像帧,特别是对第n个图像帧进行帧内编码的区域进行帧内解码后,可以更新该区域的参考数据;因此可以更快速的更新接收、解码出错区域的参考数据,利于错误状态的快速恢复,降低发生花屏现象的几率。The receiving end decodes the n-th image frame, especially after intra-frame decoding is performed on the area where the n-th image frame is intra-encoded, the reference data of the area can be updated; therefore, the reference data of the receiving and decoding error area can be updated more quickly The data is conducive to the rapid recovery of the error state and reduces the probability of the phenomenon of blurring.
示例性的,如图13所示,根据错误反馈信息中的区域索引信息确定第n个图像帧进行帧内编码的区域为中部区域,然后对第n个图像帧的中部区域进行帧内编码,对第n个图像帧的头部区域和尾部区域进行帧间编码。Exemplarily, as shown in FIG. 13, according to the region index information in the error feedback information, it is determined that the region where the n-th image frame is intra-coded is the middle region, and then the middle region of the n-th image frame is intra-coded. Perform inter-frame coding on the head area and the tail area of the nth image frame.
在本实施方式中,步骤S133中的对所述纠错刷新帧的部分区域进行帧内编码,包括:In this embodiment, performing intra-frame coding on a partial area of the error correction refresh frame in step S133 includes:
S1332、将所述纠错刷新帧的前一纠错刷新帧进行帧内编码的区域后移,得到所述纠错刷新帧进行帧内编码的区域,对所述纠错刷新帧进行帧内编码的区域进行帧内编码。S1332: Move back the area where the previous error correction refresh frame of the error correction refresh frame is intra-coded to obtain the area where the error correction refresh frame is intra-coded, and perform intra-coding on the error correction refresh frame The area is intra-coded.
示例性的,将第n个图像帧进行帧内编码的区域后移,得到第n+1个图像帧进行帧内编码的区域为尾部;然后对第n+1个图像帧的尾部区域进行帧内编码,对第n+1个图像帧的头部区域和中部区域进行帧间编码。Exemplarily, the region where the nth image frame is intra-coded is moved backward, and the region where the n+1th image frame is intra-coded is the tail; then the tail region of the n+1th image frame is framed Intra coding, inter-coding the header area and middle area of the n+1th image frame.
在一些实例中,第一个纠错刷新帧进行帧内编码的区域不在头部,因此当某一纠错刷新帧进行帧内编码的区域后移到尾部后,图像帧的头部区域可能还未进行帧内编码,需要后续的纠错刷新帧对该部分区域进行帧内编码。In some instances, the area where the first error correction refresh frame is intra-encoded is not at the head. Therefore, when the area where an error correction refresh frame is intra-coded is moved to the end, the head area of the image frame may still be No intra-frame coding is performed, and a subsequent error correction refresh frame is required to perform intra-frame coding on this part of the area.
示例性的,如图14所示,步骤S1332中的将所述纠错刷新帧的前一纠错刷新帧进行帧内编码的区域后移,得到所述纠错刷新帧进行帧内编码的区域,包括:Exemplarily, as shown in FIG. 14, the region where the previous error correction refresh frame of the error correction refresh frame is intra-coded in step S1332 is moved backward to obtain the region where the error correction refresh frame is intra-coded ,include:
S320、判断所述纠错刷新帧的前一纠错刷新帧进行帧内编码的区域是否在所述前一纠错刷新帧的尾部。S320: Determine whether the intra-frame coding area of the previous error correction refresh frame of the error correction refresh frame is at the end of the previous error correction refresh frame.
若所述前一纠错刷新帧进行帧内编码的区域不在所述前一纠错刷新帧的尾部,执行:If the region where the previous error correction refresh frame is intra-coded is not at the end of the previous error correction refresh frame, execute:
S321、将所述前一纠错刷新帧进行帧内编码的区域后移,得到所述纠错刷新帧进行帧内编码的区域。S321: Move back the region where the previous error correction refresh frame is intra-coded to obtain the region where the error correction refresh frame is intra-coded.
示例性的,如图13所示,第n个图像帧进行帧内编码的区域为中部区域,不在第n个图像帧的尾部,则将第n个图像帧进行帧内编码的区域后移,得到第n+1个图像帧进行帧内编码的区域为尾部。Exemplarily, as shown in FIG. 13, the region where the n-th image frame is intra-encoded is the middle region. If it is not at the end of the n-th image frame, the region where the n-th image frame is intra-encoded is moved backward. The region where the n+1th image frame is intra-encoded is the tail.
若所述前一纠错刷新帧进行帧内编码的区域在所述前一纠错刷新帧的尾部,执行:If the region where the previous error correction refresh frame is intra-encoded is at the end of the previous error correction refresh frame, execute:
S322、将所述纠错刷新帧的头部区域确定为所述纠错刷新帧进行帧内编码的区域。S322. Determine the header area of the error correction refresh frame as an area where the error correction refresh frame performs intra-frame coding.
示例性的,如图13所示,第n+1个图像帧进行帧内编码的区域为尾部,则将第n+2个图像帧进行帧内编码的区域为头部;然后对第n+2个图像帧的头部区域进行帧内编码,对第n+2个图像帧的中部区域和尾部区域进行帧间编码。Exemplarily, as shown in FIG. 13, the area where the n+1th image frame is intra-coded is the tail, and the area where the n+2th image frame is intra-coded is the head; The header area of the two image frames is intra-encoded, and the middle area and the tail area of the n+2th image frame are inter-encoded.
步骤S1332将所述纠错刷新帧的前一纠错刷新帧进行帧内编码的区域后移,得到所述纠错刷新帧进行帧内编码的区域,对所述纠错刷新帧进行部分区域帧内编码之后,若所述纠错刷新帧不是错误反馈信息对应的预设个数的纠错刷新帧中的最后一个,则返回步骤S132获取下一纠错刷新帧;若所述纠错刷新帧是错误反馈信息对应的预设个数的纠错刷新帧中的最后一个,则发送端可以返回步骤S110获取例如摄像头新拍摄的图像帧,即当前图像帧,对所述当前图像帧进行编码,将编码后的当前图像帧向接收端发送。In step S1332, the area where the previous error correction refresh frame of the error correction refresh frame is intra-encoded is moved back to obtain the area where the error correction refresh frame is intra-encoded, and a partial area frame is performed on the error correction refresh frame After the internal coding, if the error correction refresh frame is not the last one of the preset number of error correction refresh frames corresponding to the error feedback information, return to step S132 to obtain the next error correction refresh frame; if the error correction refresh frame Is the last one of the preset number of error correction refresh frames corresponding to the error feedback information, the sending end may return to step S110 to obtain, for example, the image frame newly shot by the camera, that is, the current image frame, and encode the current image frame, Send the encoded current image frame to the receiving end.
通过错误反馈信息对应的纠错序列中各纠错刷新帧进行帧内编码区域的后移,以及进行帧内编码区域到达尾部后返回头部进行帧内编码;实现当纠错序列中全部的纠错刷新帧的部分区域进行帧内编码后,对图像帧中的全部区域进行了帧内编码;向接收端发送后,接收端可以完整的刷新整个图像帧对应的参考数据。After each error correction refresh frame in the error correction sequence corresponding to the error feedback information, the intra-frame coding area is moved back, and the intra-frame coding area reaches the tail and returns to the head for intra-frame coding; realizes all errors in the error correction sequence After intra-encoding is performed on some areas of the wrong refresh frame, all areas in the image frame are intra-encoded; after sending to the receiving end, the receiving end can completely refresh the reference data corresponding to the entire image frame.
在一些实施方式中,如图15所示,步骤S121在所述当前图像帧和/或所述当前图像帧之后的图像帧中确定预设个数的纠错刷新帧,包括:In some embodiments, as shown in FIG. 15, step S121 determining a preset number of error correction refresh frames in the current image frame and/or image frames subsequent to the current image frame includes:
S1212、根据所述当前图像帧中条带的数量,在所述当前图像帧和/或所述当前图像帧之后的图像帧中确定相同数量的纠错刷新帧。S1212: Determine the same number of error correction refresh frames in the current image frame and/or image frames subsequent to the current image frame according to the number of stripes in the current image frame.
在本实施例中,各图像帧包括至少两个条带;同一图像帧中的不同条带之间的编码、解码是独立的;条带的解码过程所参考的数据,例如预测编码不能越过该条带的边界,可以防止误码的扩散。In this embodiment, each image frame includes at least two slices; the encoding and decoding between different slices in the same image frame are independent; the data referred to in the decoding process of slices, such as predictive coding, cannot exceed the The border of the strip can prevent the spread of errors.
示例性的,图像帧中条带的数量为3,则在所述当前图像帧和/或所述当前图像帧之后的图像帧中确定3个纠错刷新帧;如图13所示,确定第n个图像帧至第n+2个图像帧,为纠错刷新帧。Exemplarily, if the number of strips in the image frame is 3, then 3 error correction refresh frames are determined in the current image frame and/or the image frames after the current image frame; as shown in FIG. 13, the first The n image frames to the n+2th image frame are error correction refresh frames.
示例性的,步骤S1312中的根据所获取错误反馈信息中的区域索引信息确定所述第一个纠错刷新帧进行帧内编码的区域,包括:Exemplarily, determining the region where the first error correction refresh frame performs intra-frame coding according to the region index information in the acquired error feedback information in step S1312 includes:
S1312’、确定所述第一个纠错刷新帧中对应于所述错误反馈信息中条带序号的条带为进行帧内编码的区域。S1312'. Determine that the strip corresponding to the strip number in the error feedback information in the first error correction refresh frame is an area for intra-frame coding.
示例性的,发送端对图像帧中各条带进行编码后发送给接收端,若接收端接收、解码某条带时出错,则根据该条带的条带序号生成错误反馈信息,将错误反馈信息发送给发送端。Exemplarily, the sending end encodes each strip in the image frame and sends it to the receiving end. If an error occurs when the receiving end receives and decodes a certain strip, the error feedback information is generated according to the strip sequence number of the strip, and the error is fed back The information is sent to the sender.
例如,接收端接收、解码当前图像帧的第二个条带时出错,则向发送端发送的错误反馈信息包括第二个条带的条带序号。For example, if an error occurs when the receiving end receives and decodes the second slice of the current image frame, the error feedback information sent to the sending end includes the strip sequence number of the second slice.
发送端根据错误反馈信息中的条带序号确定所述第一个纠错刷新帧进行帧内编码的区域为第二个条带。The sending end determines, according to the strip sequence number in the error feedback information, that the region where the first error correction refresh frame is intra-coded is the second strip.
示例性的,对第一个纠错刷新帧的第二个条带进行帧内编码,第一个条带和第三个条带进行帧间编码。Exemplarily, intra-frame coding is performed on the second slice of the first error correction refresh frame, and the first slice and the third slice are subjected to inter-frame coding.
示例性的,步骤S321中的将所述前一纠错刷新帧进行帧内编码的区域后移,得到所述纠错刷新帧进行帧内编码的区域,包括:Exemplarily, shifting the region where the previous error correction refresh frame is intra-coded in step S321 to obtain the region where the error correction refresh frame is intra-coded includes:
S321’、将所述前一纠错刷新帧进行帧内编码的条带序号加一,得到所述纠错刷新帧进行帧内编码的条带序号。S321', adding one to the stripe sequence number of the previous error correction refresh frame that is intra-coded to obtain the stripe number of the error correction refresh frame that is intra-coded.
例如,将第n个图像帧进行帧内编码的条带序号加一,得到第n+1个图像帧进行帧内编码的条带序号为三;然后对第n+1个图像帧的第三个条带进行帧内编码,对第n+1个图像帧的第一个条带和第二个条带进行帧间编码。For example, add one to the stripe number of the n-th image frame for intra-coding, and get the stripe number of the n+1-th image frame for intra-coding to be three; then add one to the third image frame of the n+1th image frame. Intra-coding is performed on one slice, and inter-coding is performed on the first slice and the second slice of the n+1th image frame.
示例性的,步骤S322中的将所述纠错刷新帧的头部区域确定为所述纠错刷新帧进行帧内编码的区域,包括:Exemplarily, the determining the header area of the error correction refresh frame as the area where the error correction refresh frame performs intra-frame coding in step S322 includes:
S322’、将所述纠错刷新帧的第一个条带确定为所述纠错刷新帧进行帧内编码的条带。S322'. Determine the first slice of the error correction refresh frame as the slice of the error correction refresh frame for intra-frame coding.
例如,由于第n+1个图像帧进行帧内编码的条带序号为对应于图像帧尾部的条带序号,即三,则获取第n+2个图像帧,将第n+1个图像帧进行帧内编码的条带序号确定为一,然后对第n+2个图像帧的第一个条带进行帧内编码,对第n+2个图像帧的其他两个条带进行帧间编码。For example, since the strip number of the n+1th image frame for intra-encoding is the strip number corresponding to the end of the image frame, that is, three, then the n+2th image frame is obtained, and the n+1th image frame The sequence number of the slice for intra-coding is determined to be one, then the first slice of the n+2th image frame is intra-coded, and the other two slices of the n+2th image frame are inter-coded .
同一纠错序列中各纠错刷新帧分别对一个条带进行帧内编码,全部预设个数的纠错刷新帧进行帧内编码的区域的并集等于任一纠错刷新帧帧的范围。第 一个纠错刷新帧先对接收、解码出错的区域进行帧内编码,接收端解码后可以先更新出错的参考信息,可以更快的恢复传输错误。Each error correction refresh frame in the same error correction sequence performs intra-coding on a stripe respectively, and the union of the regions where all the preset number of error correction refresh frames are intra-coded is equal to the range of any error correction refresh frame. The first error correction refresh frame first performs intra-frame coding on the receiving and decoding error areas. After decoding, the receiving end can update the error reference information first, which can recover transmission errors more quickly.
在一些实施方式中,如图16和图17所示,步骤S110中对所述当前图像帧进行编码,至少包括步骤S111至步骤S112。In some embodiments, as shown in FIG. 16 and FIG. 17, encoding the current image frame in step S110 includes at least step S111 to step S112.
S111、根据间隔刷新条件判断所述当前图像帧是否为间隔刷新帧。S111: Determine whether the current image frame is an interval refresh frame according to an interval refresh condition.
在本实施方式中,步骤S110中对获取的当前图像帧进行编码时,除了对一些图像帧进行帧间编码,得到帧间编码帧,即P帧;还可间隔性的对一些图像帧进行帧内编码或者部分区域的帧内编码,以便接收端及时更新参考数据。In this embodiment, when encoding the acquired current image frame in step S110, in addition to inter-encoding some image frames, an inter-encoded frame, namely P frame, is obtained; some image frames can also be framed at intervals. Intra-coding or intra-frame coding of a part of the area so that the receiving end can update the reference data in time.
示例性的,在未接收到接收端发送的错误反馈信息时,按照刷新周期对获取的图像帧进行编码。Exemplarily, when the error feedback information sent by the receiving end is not received, the acquired image frame is encoded according to the refresh cycle.
具体的,所述刷新周期包括相邻的刷新范围和预测范围。Specifically, the refresh period includes adjacent refresh ranges and prediction ranges.
具体的,同一刷新周期中预测范围内的图像帧均位于刷新范围内全部的图像帧之后。Specifically, the image frames within the prediction range in the same refresh period are all located behind all the image frames within the refresh range.
在一个刷新周期中,发送端先对刷新范围内的图像帧进行帧内编码,接收端解码后可以更新图像帧的参考数据;然后发送端参考该刷新周期内刷新范围内的图像帧或者预测范围内之前的图像帧对新获取的图像帧进行帧间编码;接收端可以根据参考数据对帧间编码的图像进行解码。In a refresh cycle, the sender first performs intra-frame encoding on the image frame within the refresh range, and the receiver can update the reference data of the image frame after decoding; then the sender refers to the image frame or prediction range within the refresh range within the refresh period The previous image frame within the frame performs inter-frame coding on the newly acquired image frame; the receiving end can decode the inter-coded image according to the reference data.
示例性的,步骤S111根据间隔刷新条件判断所述当前图像帧是否为间隔刷新帧,包括:若所述当前图像帧的编号位于任一刷新周期的刷新范围,判定所述当前图像帧是间隔刷新帧;若所述当前图像帧的编号位于任一刷新周期的预测范围,判定所述当前图像帧不是间隔刷新帧。Exemplarily, step S111 determines whether the current image frame is an interval refresh frame according to an interval refresh condition, including: if the number of the current image frame is within the refresh range of any refresh period, determining that the current image frame is an interval refresh Frame; if the number of the current image frame is within the prediction range of any refresh period, it is determined that the current image frame is not an interval refresh frame.
示例性的,在未接收到接收端发送的错误反馈信息时,按照图像序列(group of pictures,GOP)划分的规则判断当前图像帧是否为间隔刷新帧。Exemplarily, when the error feedback information sent by the receiving end is not received, it is determined whether the current image frame is an interval refresh frame according to the rules of the group of pictures (GOP) division.
图像序列,也即图像组,是一个编码视频流中的一组连续的画面。每一个编码的视频流都由连续的图像序列组成。An image sequence, that is, an image group, is a group of consecutive pictures in an encoded video stream. Each coded video stream consists of a continuous sequence of images.
示例性的,同一图像序列中的各图像帧之间的数据变化较小;例如可以将相邻两个数据变化较大的图像帧中的前一个作为前一个图像序列中的最后一帧,将将相邻两个数据变化较大的图像帧中的后一个作为后一个图像序列中的第一帧。Exemplarily, the data change between each image frame in the same image sequence is small; for example, the previous one of two adjacent image frames with large data changes can be used as the last frame in the previous image sequence, and The latter of two adjacent image frames with large data changes is taken as the first frame in the subsequent image sequence.
示例性的,所述图像序列包括相邻的刷新子序列和预测子序列,所述刷新 子序列包括所述图像序列开始时的至少一个图像帧。Exemplarily, the image sequence includes adjacent refresh subsequences and predictive subsequences, and the refresh subsequence includes at least one image frame at the beginning of the image sequence.
具体的,同一图像序列中的预测子序列位于刷新子序列之后。Specifically, the predictor subsequence in the same image sequence is located after the refresh subsequence.
在对一个图像序列中的图像帧进行编码时,发送端先对刷新子序列内的图像帧进行帧内编码,接收端解码后可以更新图像帧的参考数据;然后发送端参考该刷新子序列内的图像帧或者预测子序列内之前的图像帧对新获取的图像帧进行帧间编码;接收端可以根据参考数据对帧间编码的图像进行解码。When encoding image frames in an image sequence, the sender first performs intra-frame encoding on the image frames in the refresh subsequence, and the receiver can update the reference data of the image frame after decoding; then the sender refers to the refresh subsequence The newly acquired image frame is inter-encoded on the image frame or the previous image frame in the predicted sub-sequence; the receiving end can decode the inter-encoded image according to the reference data.
示例性的,步骤S111根据间隔刷新条件判断所述当前图像帧是否为间隔刷新帧,包括:若所述当前图像帧的编号位于任一图像序列的刷新子序列中,判定所述当前图像帧是间隔刷新帧;若所述当前图像帧的编号位于任一图像序列的预测子序列中,判定所述当前图像帧不是间隔刷新帧。Exemplarily, step S111 judging whether the current image frame is an interval refresh frame according to the interval refresh condition includes: if the number of the current image frame is in the refresh subsequence of any image sequence, determining that the current image frame is Interval refresh frame; if the number of the current image frame is in the predicted subsequence of any image sequence, it is determined that the current image frame is not an interval refresh frame.
S112、若所述当前图像帧不是间隔刷新帧,对所述当前图像帧进行帧间编码。S112: If the current image frame is not an interval refresh frame, perform inter-frame encoding on the current image frame.
示例性的,如图18所示,每8个图像帧为一个刷新周期,其中每个刷新周期中的第1个图像帧是间隔刷新帧,第2个至第8个图像帧不是间隔刷新帧;则分别对获取的第2个至第8个图像帧进行帧间编码,得到各自对应的帧间编码帧,即P帧。例如,参考第1个图像帧对第2个至第8个图像帧进行帧间编码;或者参考第1个至第7个图像帧中的任一个对第8个图像帧进行帧间编码。Exemplarily, as shown in FIG. 18, every 8 image frames is a refresh period, wherein the first image frame in each refresh period is an interval refresh frame, and the second to eighth image frames are not interval refresh frames ; Then respectively perform inter-frame encoding on the acquired second to eighth image frames to obtain respective corresponding inter-frame encoded frames, namely P frames. For example, refer to the first image frame to perform inter-coding on the second to eighth image frames; or refer to any one of the first to seventh image frames to perform inter-frame coding on the eighth image frame.
示例性的,如图19所示,每8个图像帧为一个刷新周期,其中每个刷新周期中的第1个至第3个图像帧是间隔刷新帧,第4个至第8个图像帧不是间隔刷新帧;则分别对获取的第4个至第8个图像帧进行帧间编码,得到各自对应的帧间编码帧,即P帧。例如,参考第1个图像帧对第4个至第8个图像帧进行帧间编码;或者参考第1个至第7个图像帧中的任一个对第8个图像帧进行帧间编码。Exemplarily, as shown in FIG. 19, every 8 image frames is a refresh period, wherein the first to third image frames in each refresh period are interval refresh frames, and the fourth to eighth image frames It is not an interval refresh frame; then the acquired 4th to 8th image frames are inter-encoded respectively to obtain respective corresponding inter-encoded frames, namely P frames. For example, refer to the first image frame to perform inter-frame coding on the fourth to eighth image frames; or refer to any one of the first to seventh image frames to perform inter-frame coding on the eighth image frame.
在一些实施方式中,如图16所示,步骤S111根据间隔刷新条件判断所述当前图像帧是否为间隔刷新帧之后,包括:In some embodiments, as shown in FIG. 16, after step S111 determines whether the current image frame is an interval refresh frame according to the interval refresh condition, the method includes:
S113、若所述当前图像帧是间隔刷新帧,对所述当前图像帧进行帧内编码。S113: If the current image frame is an interval refresh frame, perform intra-frame coding on the current image frame.
示例性的,如图18所示,每个刷新周期中的第1个图像帧是间隔刷新帧;则对该图像帧整帧进行帧内编码,得到帧内编码帧,即I帧。Exemplarily, as shown in FIG. 18, the first image frame in each refresh cycle is an interval refresh frame; then the entire frame of the image frame is intra-coded to obtain an intra-coded frame, that is, an I frame.
通过对一个刷新周期或一个图像序列中的间隔刷新帧进行帧内编码,接收端接收、解码各间隔刷新帧后,可以将参考数据完整的更新一遍,以提高该刷 新周期或图像序列中各非间隔刷新帧解码的准确性,防止花屏。By intra-coding a refresh cycle or interval refresh frame in an image sequence, after receiving and decoding each interval refresh frame, the receiving end can update the reference data completely to improve the refresh cycle or each non-refresh frame in the image sequence. Refresh the accuracy of frame decoding at intervals to prevent blurring.
在一些实施方式中,如图17所示,步骤S111根据间隔刷新条件判断所述当前图像帧是否为间隔刷新帧之后,包括:In some embodiments, as shown in FIG. 17, step S111 after determining whether the current image frame is an interval refresh frame according to the interval refresh condition includes:
S114、若所述当前图像帧是间隔刷新帧,对所述当前图像帧的部分区域进行帧内编码。S114: If the current image frame is an interval refresh frame, perform intra-frame coding on a partial area of the current image frame.
示例性的,如图19所示,每8个图像帧为一个刷新周期,其中每个刷新周期中的第1个至第3个图像帧是间隔刷新帧;对各间隔刷新帧的部分区域进行帧内编码。Exemplarily, as shown in FIG. 19, every 8 image frames is a refresh period, and the first to third image frames in each refresh period are interval refresh frames; part of each interval refresh frame is performed Intra coding.
示例性的,同一刷新周期或图像序列中各间隔刷新帧进行帧内编码的区域不同,且同一刷新周期或图像序列中所有间隔刷新帧进行帧内编码的区域的并集等于各图像帧的图像范围。Exemplarily, the region where each interval refresh frame in the same refresh period or image sequence undergoes intra-coding is different, and the union of the regions where all interval refresh frames in the same refresh period or image sequence undergo intra-frame encoding is equal to the image of each image frame range.
示例性的,同一刷新周期或图像序列中不同间隔刷新帧进行帧内编码的区域可以部分重合,或者互相之间不重合。Exemplarily, in the same refresh period or image sequence, regions where intra-frame coding is performed on refresh frames at different intervals may partially overlap, or may not overlap with each other.
通过对一个刷新周期或一个图像序列中各间隔刷新帧进行部分区域的帧内编码,接收端接收、解码各间隔刷新帧后,可以将参考数据完整的更新一遍,以提高该刷新周期或图像序列中各非间隔刷新帧解码的准确性,防止花屏。By performing intra-frame coding on a partial area of each interval refresh frame in a refresh period or an image sequence, after receiving and decoding each interval refresh frame, the receiving end can update the reference data completely to improve the refresh period or image sequence The accuracy of the decoding of the non-interval refresh frames in the middle, to prevent the screen blur.
示例性的,步骤S114若所述当前图像帧是间隔刷新帧,对所述当前图像帧的部分区域进行帧内编码,包括:若所述当前图像帧是间隔刷新帧,对所述当前图像帧的部分区域进行帧内编码,其余区域进行帧间编码。Exemplarily, in step S114, if the current image frame is an interval refresh frame, performing intra-frame encoding on a partial area of the current image frame includes: if the current image frame is an interval refresh frame, performing intra-frame encoding on the current image frame Part of the area is intra-coded, and the remaining area is inter-coded.
对间隔刷新帧的部分区域进行帧内编码,既可以降低网络资源的资源占用,避免对完整的图像帧进行帧内编码导致码率突发而引起延迟和抖动增加,而且可以间隔性的为接收端提供解码所需的参考数据。Performing intra-frame coding on part of the interval refresh frame can not only reduce the resource occupation of network resources, avoid the intra-frame coding of the complete image frame, which will cause the burst rate and increase the delay and jitter, and it can be received at intervals. The terminal provides the reference data needed for decoding.
在一些实施方式中,如图20所示,步骤S110获取当前图像帧,对所述当前图像帧进行编码,将编码后的当前图像帧向接收端发送之前,包括:In some embodiments, as shown in FIG. 20, step S110 acquires a current image frame, encodes the current image frame, and before sending the encoded current image frame to the receiving end, the method includes:
S101、对一图像帧进行帧内编码,将编码后的所述图像帧向接收端发送。S101. Perform intra-frame encoding on an image frame, and send the encoded image frame to the receiving end.
示例性的,如图21所示,图像帧a为某一时刻发送端向接收端发送的第一个图像帧。发送端对该图像帧进行帧内编码,得到I帧,将编码后的所述图像帧向接收端发送;以使接收端解码后快速得到完整的参考数据。Exemplarily, as shown in FIG. 21, the image frame a is the first image frame sent by the sending end to the receiving end at a certain moment. The transmitting end performs intra-frame encoding on the image frame to obtain an I frame, and sends the encoded image frame to the receiving end; so that the receiving end can quickly obtain complete reference data after decoding.
示例性的,发送端通过摄像头在某次开机后采集的第一个图像帧为初始图像帧,发送端将该图像帧进行帧内编码。Exemplarily, the first image frame collected by the sending end after the camera is turned on for a certain time is the initial image frame, and the sending end performs intra-frame coding on the image frame.
示例性的,步骤S101对一图像帧进行帧内编码,将编码后的所述图像帧向接收端发送之后,还包括:Exemplarily, step S101 performs intra-frame encoding on an image frame, and after sending the encoded image frame to the receiving end, the method further includes:
S102、根据帧内编码的图像帧对所述图像帧之后的若干图像帧进行帧间编码,将编码后的图像帧向接收端发送。S102: Perform inter-frame encoding on several image frames following the image frame according to the intra-encoded image frame, and send the encoded image frame to the receiving end.
在将图像帧a进行帧内编码、向接收端发送之后,接收端可以获取完整的参考数据;发送端可以参考图像帧a对获取的图像帧b进行帧间编码,得到P帧向接收端发送,接收端根据参考数据解码图像帧b。发送端可以参考图像帧a或者图像帧b对获取的图像帧c进行帧间编码,得到P帧向接收端发送,接收端根据参考数据解码图像帧c。After the image frame a is intra-encoded and sent to the receiving end, the receiving end can obtain the complete reference data; the sending end can refer to the image frame a to perform inter-frame encoding on the obtained image frame b, and obtain the P frame and send it to the receiving end , The receiving end decodes the image frame b according to the reference data. The sending end may refer to the image frame a or the image frame b to perform inter-frame encoding on the acquired image frame c, and obtain the P frame to send to the receiving end, and the receiving end decodes the image frame c according to the reference data.
示例性的,步骤S102中进行帧间编码的图像帧的个数等于一个刷新周期中图像帧的个数减1。便于发送端规划刷新周期中的间隔刷新帧和非间隔刷新帧。Exemplarily, the number of image frames to be inter-encoded in step S102 is equal to the number of image frames in one refresh cycle minus one. It is convenient for the sender to plan the interval refresh frame and the non-interval refresh frame in the refresh cycle.
示例性的,对纠错刷新帧或者间隔刷新帧的部分区域进行帧内编码,其余区域进行帧间编码时,进行帧间编码的区域可以参考该纠错刷新帧或者间隔刷新帧之前图像帧的相应区域。Exemplarily, when part of the error correction refresh frame or interval refresh frame is intra-encoded, when the remaining areas are inter-encoded, the inter-encoded area may refer to the image frame before the error correction refresh frame or the interval refresh frame. Corresponding area.
如图13所示,对第n+2个图像帧的第一个条带进行帧内编码,对第n+2个图像帧的其他两个条带进行帧间编码时,可以参考第n+1个图像帧中的第二个条带和第三个条带进行帧间编码,而已可以参考第n个图像帧中的第二个条带和第三个条带进行帧间编码。As shown in Figure 13, when performing intra-frame coding on the first slice of the n+2th image frame and performing inter-frame coding on the other two slices of the n+2th image frame, you can refer to the n+th The second slice and the third slice in one image frame are inter-coding, but the second slice and the third slice in the n-th image frame can be referenced for inter-coding.
通过上述方式,本申请实施例通过在某图像帧传输出错时,对纠错刷新帧的部分区域进行帧内编码,既可以降低网络资源的资源占用,避免对完整的图像帧进行帧内编码导致码率突发而引起延迟和抖动增加,而且可以及时为接收端提供解码所需的参考数据,使得传输错误较快恢复。Through the above method, the embodiment of the present application performs intra-frame coding on part of the error correction refresh frame when an image frame is transmitted incorrectly, which can reduce the resource occupation of network resources and avoid the intra-frame coding of the complete image frame. The burst of code rate causes delay and jitter to increase, and can provide the receiving end with reference data required for decoding in time, so that transmission errors can be recovered quickly.
请参阅图22,图22是本申请一实施例提供的用于接收端的一种视频接收方法的流程示意图,所述视频接收方法可以应用在终端设备或者服务器中,用于从接收端接收视频等过程;其中终端设备可以为手机、平板电脑、笔记本电脑、台式电脑、个人数字助理、穿戴式设备、投影仪或者显示器等,服务器可以为独立的服务器,也可以为服务器集群,例如提供视频直播服务的服务器。进一步而言,终端设备可以为用于从无人机获取视频数据的虚拟现实头戴式显示设备,如VR眼镜,或者用于从无人机获取视频数据的地面站等设备。Please refer to FIG. 22. FIG. 22 is a schematic flowchart of a video receiving method for the receiving end according to an embodiment of the present application. The video receiving method can be applied to a terminal device or a server for receiving video from the receiving end, etc. Process; the terminal device can be a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, a wearable device, a projector or a display, etc. The server can be an independent server or a server cluster, such as providing live video services Server. Further, the terminal device may be a virtual reality head-mounted display device used to obtain video data from a drone, such as VR glasses, or a ground station used to obtain video data from a drone.
如图22所示,本实施例视频发送方法包括步骤S210至步骤S230。As shown in FIG. 22, the video sending method of this embodiment includes step S210 to step S230.
S210、从发送端接收编码后的当前图像帧,解码所述当前图像帧。S210. Receive an encoded current image frame from the sending end, and decode the current image frame.
示例性的,发送端获取当前图像帧,对所述当前图像帧进行编码,将编码后的当前图像帧向接收端发送。例如,当前图像帧为设于发送端上的摄像头实时获取的图像帧,表示当前时刻发送端获取和要发送的图像帧。Exemplarily, the sending end acquires the current image frame, encodes the current image frame, and sends the encoded current image frame to the receiving end. For example, the current image frame is an image frame acquired in real time by a camera set on the sending end, which represents an image frame acquired and to be sent by the sending end at the current moment.
示例性的,接收端实时从发送端接收编码后的各图像帧,对接收到的图像帧进行解码;然后将解码出的视频数据进行存储和/或播放。Exemplarily, the receiving end receives the encoded image frames from the sending end in real time, decodes the received image frames; and then stores and/or plays the decoded video data.
S220、若接收所述当前图像帧出错或者解码所述当前图像帧出错,向所述发送端发送错误反馈信息,接收所述发送端响应于所述错误反馈信息发送的部分区域进行帧内编码的纠错刷新帧。S220. If an error occurs in receiving the current image frame or decoding the current image frame, send error feedback information to the sending end, and receive the intra-frame encoding of the partial area sent by the sending end in response to the error feedback information Error correction refresh frame.
在本实施例中,如果接收端接收某一图像帧出错或者解码图像帧出错,则向发送端发送错误反馈信息。In this embodiment, if the receiving end receives an error in an image frame or decodes an image frame, it sends error feedback information to the transmitting end.
示例性的,接收端接收、解码出任一图像帧后向发送端发送成功反馈信息,以及解码该图像帧;发送端收到成功反馈信息后获取新的图像帧,进行编码后向接收端发送;如果接收端接收某一图像帧出错或者解码图像帧出错,则向发送端发送错误反馈信息。Exemplarily, after receiving and decoding any image frame, the receiving end sends success feedback information to the sending end, and decodes the image frame; the sending end obtains a new image frame after receiving the success feedback information, performs encoding and sends it to the receiving end; If the receiving end receives a certain image frame error or the decoded image frame has an error, it sends error feedback information to the transmitting end.
示例性的,接收端通过和发送端之间的上行信道将成功反馈信息、错误反馈信息向发送端发送。例如,上行信道还可以用于向发送端,如无人机传输飞控指令,以及各种控制指令,如拍照,录像,返航等指令。Exemplarily, the receiving end sends success feedback information and error feedback information to the sending end through an uplink channel between the receiving end and the sending end. For example, the uplink channel can also be used to transmit flight control instructions to the sending end, such as drones, and various control instructions, such as taking pictures, videos, and returning to home.
示例性的,错误反馈信息包括所述接收端在丢包事件时的反馈信息,或者包括所述接收端在完整性校验错误时的反馈信息。Exemplarily, the error feedback information includes feedback information of the receiving end when a packet loss event occurs, or includes feedback information of the receiving end when an integrity check error occurs.
发送端在向接收端发送某一图像帧时,接收到接收端发送的错误反馈信息,则表示该图像帧发送或解码失败,则根据错误反馈信息对应的图像帧确定纠错刷新帧。When sending an image frame to the receiving end, the sending end receives error feedback information sent by the receiving end, which indicates that the image frame has failed to be sent or decoded, and the error correction refresh frame is determined according to the image frame corresponding to the error feedback information.
不同于现有技术中对整个图像帧进行帧内(Intraframe)编码,在本实施例中,发送端对纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送;接收端接收发送端响应于错误反馈信息发送的部分区域进行帧内编码的纠错刷新帧。Different from performing intraframe (Intraframe) coding on the entire image frame in the prior art, in this embodiment, the sending end performs intraframe coding on a partial area of the error correction refresh frame, and sends the coded error correction refresh frame to the The receiving end sends; the receiving end receives the error correction refresh frame that the sender sends in response to the part of the error feedback information to perform intra-frame coding.
如图2所示,发送端对第n个图像帧至第n+2个图像帧的部分区域进行帧内编码。As shown in Fig. 2, the sending end performs intra-frame coding on a partial area from the nth image frame to the n+2th image frame.
S230、解码所述纠错刷新帧,根据解码结果刷新用于解码的参考数据。S230. Decode the error correction refresh frame, and refresh the reference data used for decoding according to the decoding result.
接收端解码纠错刷新帧进行帧内编码的区域时,不需要参考其他图像帧就可解码出该部分数据,解码出的数据可以作为其他图像帧进行解码时所需的参考数据,实现对用于解码的参考数据的更新。When the receiving end decodes the area of the error correction refresh frame for intra-frame coding, it can decode this part of the data without referring to other image frames. The decoded data can be used as the reference data required when decoding other image frames, realizing interoperability. Update of reference data for decoding.
本实施例提供的视频接收方法,通过在某图像帧传输出错时,接收发送端对部分区域进行帧内编码的纠错刷新帧;既可以降低网络资源的资源占用,避免接收整帧进行帧内编码的图像帧导致码率突发而引起延迟和抖动增加,而且接收端可以及时更新解码所需的参考数据,使得传输错误较快恢复。In the video receiving method provided in this embodiment, when an image frame transmission error occurs, the sending end performs intra-frame coding error correction refresh frames for some areas; it can reduce the resource occupation of network resources and avoid receiving the entire frame for intra-frame The encoded image frame causes a burst of code rate and causes delay and jitter to increase, and the receiving end can update the reference data required for decoding in time, so that transmission errors can be recovered quickly.
示例性的,如图23和图24所示,步骤S210中的解码所述当前图像帧,包括步骤S2101、步骤S211。Exemplarily, as shown in FIG. 23 and FIG. 24, the decoding of the current image frame in step S210 includes step S2101 and step S211.
S2101、解析所述当前图像帧对应的编码格式。S2101: Parse the encoding format corresponding to the current image frame.
示例性的,发送端向接收端发送编码后的图像帧时,发送的数据包括图像帧对应的编码格式;接收端通过解析接收的数据可以得到当前图像帧对应的编码格式。Exemplarily, when the sending end sends the encoded image frame to the receiving end, the sent data includes the encoding format corresponding to the image frame; the receiving end can obtain the encoding format corresponding to the current image frame by analyzing the received data.
S211、若所述当前图像帧对应的编码格式为帧间编码,根据用于解码的参考数据对所述当前图像帧进行解码。S211: If the encoding format corresponding to the current image frame is inter-frame encoding, decode the current image frame according to the reference data used for decoding.
在一些实施方式中,发送端对当前图像帧进行帧间(Interframe)编码,得到预测编码图像帧(Predictive-coded Picture),即P帧;接收端可以根据参考数据对帧间编码的图像帧进行解码。In some embodiments, the transmitting end performs interframe encoding on the current image frame to obtain a predictive-coded picture (P frame); the receiving end can perform interframe encoding on the image frame based on the reference data. decoding.
在一些实施方式中,如图23所示,步骤S210中的解码所述当前图像帧,包括步骤S2121至步骤S2122。In some embodiments, as shown in FIG. 23, the decoding of the current image frame in step S210 includes step S2121 to step S2122.
S2121、若所述当前图像帧对应的编码格式为帧内编码,对所述当前图像帧进行帧内解码。S2121, if the encoding format corresponding to the current image frame is intra-frame encoding, perform intra-frame decoding on the current image frame.
示例性的,如图18所示,每个刷新周期中的第1个图像帧是间隔刷新帧;发送端对该图像帧整帧进行帧内编码,得到帧内编码帧,即I帧。接收端接收到该图像帧后对该图像帧进行帧内解码。Exemplarily, as shown in FIG. 18, the first image frame in each refresh cycle is an interval refresh frame; the sending end performs intra-frame encoding on the entire image frame to obtain an intra-frame coded frame, that is, an I frame. After receiving the image frame, the receiving end performs intra-frame decoding on the image frame.
S2122、根据帧内解码的结果刷新所述参考数据。S2122, refresh the reference data according to the result of intra-frame decoding.
示例性的,接收端接收、解码间隔刷新周期或图像序列中的间隔刷新帧,如帧内编码帧后,可以将参考数据完整的更新一遍,以提高该刷新周期或图像序列中各非间隔刷新帧解码的准确性,防止花屏。Exemplarily, the receiving end receives and decodes the interval refresh period or the interval refresh frame in the image sequence, such as an intra-frame encoding frame, the reference data can be completely updated once to improve the refresh period or each non-interval refresh in the image sequence The accuracy of frame decoding prevents screen flickering.
示例性的,如图23所示,步骤S2122根据帧内解码的结果刷新所述参考数 据之后,包括:Exemplarily, as shown in FIG. 23, after the step S2122 refreshes the reference data according to the result of intra-frame decoding, the method includes:
S2123、向所述发送端发送正确反馈信息。S2123: Send correct feedback information to the sending end.
例如,如图18所示,接收端接收、解码刷新周期中的间隔刷新帧后,正确更新参考数据,则向发送端发送正确反馈信息。发送端接收到正确反馈信息后,对获取的刷新周期中的第2个至第8个图像帧进行帧间编码,得到各自对应的帧间编码帧,即P帧后向接收端发送。For example, as shown in FIG. 18, after receiving and decoding the interval refresh frame in the refresh cycle, the receiving end correctly updates the reference data, and then sends correct feedback information to the transmitting end. After receiving the correct feedback information, the sending end performs inter-frame coding on the second to eighth image frames in the acquired refresh cycle to obtain respective inter-coded frames, that is, P frames and send them to the receiving end.
在另一些实施方式中,如图24所示,步骤S210中的解码所述当前图像帧,包括步骤S2131至步骤S2132。In other embodiments, as shown in FIG. 24, the decoding of the current image frame in step S210 includes step S2131 to step S2132.
S2131、若所述当前图像帧对应的编码格式为部分区域的帧内编码,对所述当前图像帧帧内编码的区域进行帧内解码,得到所述当前图像帧对应的刷新片段数据。S2131. If the encoding format corresponding to the current image frame is intra-encoding of a partial area, perform intra-frame decoding on the intra-encoded area of the current image frame to obtain refresh segment data corresponding to the current image frame.
示例性的,如图19所示,每8个图像帧为一个刷新周期,其中每个刷新周期中的第1个至第3个图像帧是间隔刷新帧;发送端对各间隔刷新帧的部分区域进行帧内编码后发送给接收端,接收端接收到部分区域帧内编码的间隔刷新帧后,对间隔刷新帧帧内编码的区域进行帧内解码。Exemplarily, as shown in FIG. 19, every 8 image frames is a refresh period, and the first to third image frames in each refresh period are interval refresh frames; the sending end refreshes the part of each interval The region is intra-coded and sent to the receiving end. After receiving the interval refresh frame coded in the partial region, the receiving end performs intra-frame decoding on the intra-coded area of the interval refresh frame.
示例性的,同一刷新周期或图像序列中各间隔刷新帧进行帧内编码的区域不同,且同一刷新周期或图像序列中所有间隔刷新帧进行帧内编码的区域的并集等于各图像帧的图像范围。Exemplarily, the region where each interval refresh frame in the same refresh period or image sequence undergoes intra-coding is different, and the union of the regions where all interval refresh frames in the same refresh period or image sequence undergo intra-frame encoding is equal to the image of each image frame range.
示例性的,同一刷新周期或图像序列中不同间隔刷新帧进行帧内编码的区域可以部分重合,或者互相之间不重合。Exemplarily, in the same refresh period or image sequence, regions where intra-frame coding is performed on refresh frames at different intervals may partially overlap, or may not overlap with each other.
S2132、将所述参考数据中对应于所述帧内编码的区域的部分数据更新为所述刷新片段数据。S2132: Update part of the data in the reference data corresponding to the region encoded in the frame to the refresh segment data.
示例性的,接收端解码所述当前图像帧帧内编码的区域时,不需要参考其他图像帧就可解码出该部分数据,解码出的数据可以作为其他图像帧进行解码时所需的参考数据,实现对用于解码的参考数据的周期性更新。Exemplarily, when the receiving end decodes the intra-coded region of the current image frame, it can decode the part of the data without referring to other image frames, and the decoded data can be used as reference data for decoding other image frames , To realize the periodic update of the reference data used for decoding.
通过对一个刷新周期或一个图像序列中各间隔刷新帧进行部分区域的帧内编码,接收端接收、解码各间隔刷新帧后,可以将参考数据完整的更新一遍,以提高该刷新周期或图像序列中各非间隔刷新帧解码的准确性,防止花屏。By performing intra-frame coding on a partial area of each interval refresh frame in a refresh period or an image sequence, after receiving and decoding each interval refresh frame, the receiving end can update the reference data completely to improve the refresh period or image sequence The accuracy of the decoding of the non-interval refresh frames in the middle, to prevent the screen blur.
示例性的,如图24所示,步骤S210中的解码所述当前图像帧,还包括:Exemplarily, as shown in FIG. 24, the decoding of the current image frame in step S210 further includes:
S2133、若所述当前图像帧对应的编码格式为部分区域的帧内编码,根据所 述参考数据对所述当前图像帧的其余区域进行帧间解码。S2133: If the encoding format corresponding to the current image frame is intra-frame encoding of a partial area, perform inter-frame decoding on the remaining area of the current image frame according to the reference data.
示例性的,发送端对间隔刷新帧的部分区域进行帧内编码,其余区域进行帧间编码;既可以降低网络资源的资源占用,避免对完整的图像帧进行帧内编码导致码率突发而引起延迟和抖动增加,而且可以间隔性的为接收端提供解码所需的参考数据。Exemplarily, the sender performs intra-frame coding on some areas of the interval refresh frame, and performs inter-frame coding on the remaining areas; this can reduce the resource occupation of network resources and avoid the intra-frame coding of the complete image frame, which may cause a burst of bit rate. It causes delay and jitter to increase, and can provide the receiver with the reference data needed for decoding at intervals.
示例性的,如图24所示,步骤S2132将所述参考数据中对应于所述帧内编码的区域的部分数据更新为所述刷新片段数据之后,包括:Exemplarily, as shown in FIG. 24, after the step S2132 updates part of the data in the reference data corresponding to the intra-coded region to the refresh segment data, the step S2132 includes:
S2134、若所述参考数据中全部的数据均更新一遍,向所述发送端发送正确反馈信息。S2134: If all data in the reference data are updated once, send correct feedback information to the sending end.
示例性的,同一刷新周期或图像序列中所有间隔刷新帧进行帧内编码的区域的并集等于各图像帧的图像范围;如图19所示,接收端接收、解码一个刷新周期中的三个间隔刷新帧后,可以将参考数据完整的更新一遍,则向所述发送端发送正确反馈信息。Exemplarily, the union of regions where all interval refresh frames in the same refresh period or image sequence undergo intra-frame coding is equal to the image range of each image frame; as shown in Figure 19, the receiving end receives and decodes three After refreshing the frame at intervals, the reference data can be completely updated once, and then correct feedback information is sent to the sending end.
发送端接收到正确反馈信息后,可以对获取的刷新周期中的第4个至第8个图像帧进行帧间编码,得到各自对应的帧间编码帧,即P帧后向接收端发送。After receiving the correct feedback information, the sending end can perform inter-frame coding on the 4th to 8th image frames in the acquired refresh period to obtain respective inter-frame coded frames, that is, P frames and send them to the receiving end.
示例性的,接收端在接收、解码编码格式为帧间编码、帧内编码或者部分区域的帧内编码的图像帧时,若接收出错、或者解码出错,均向发送端发送出错图像帧对应的错误反馈信息。发送端接收到与任一图像帧对应的错误反馈信息时,根据该图像帧确定纠错刷新帧,以及对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送。因此,发送端响应于接收端的错误反馈信息,确定错误反馈信息对应的纠错刷新帧,对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送;接收端接收、解码所述纠错刷新帧,根据解码结果刷新用于解码的参考数据。Exemplarily, when the receiving end receives and decodes an image frame whose encoding format is inter-frame encoding, intra-frame encoding, or intra-encoded in a partial area, if there is an error in receiving or decoding, it will send the corresponding image frame to the transmitting end. Error feedback information. When the sending end receives the error feedback information corresponding to any image frame, it determines the error correction refresh frame according to the image frame, and performs intra-frame encoding on a part of the error correction refresh frame, and the encoded error correction refresh frame Send to the receiving end. Therefore, the sending end determines the error correction refresh frame corresponding to the error feedback information in response to the error feedback information of the receiving end, performs intra-frame coding on a part of the error correction refresh frame, and sends the coded error correction refresh frame to the receiver The receiving end receives and decodes the error correction refresh frame, and refreshes the reference data used for decoding according to the decoding result.
在一些实施例中,接收端从发送端接收编码后的当前图像帧,解码所述当前图像帧,具体为:接收端从发送端接收对所述当前图像帧各个区域编码后的图像区域数据,解码所述当前图像帧的各图像区域数据。In some embodiments, the receiving end receives the encoded current image frame from the sending end, and decoding the current image frame is specifically: the receiving end receives from the sending end the image area data encoded for each area of the current image frame, Decoding each image area data of the current image frame.
示例性的,发送端对图像帧进行编码时,将图像帧分为多个区域分别进行编码得到图像区域数据,分别将各图像区域数据向接收端发送;接收端逐一接收、解码各图像区域数据。Exemplarily, when the sending end encodes an image frame, it divides the image frame into multiple areas and encodes the image area data respectively, and sends each image area data to the receiving end; the receiving end receives and decodes each image area data one by one .
例如,发送端将图像帧分为多个条带(Slice),同一图像帧中的不同条带 之间的编码、解码是独立的。发送端将各条带进行编码得到的图像区域数据向接收端发送;接收端逐一接收、解码各图像区域数据。For example, the sending end divides the image frame into multiple slices, and the encoding and decoding of different slices in the same image frame are independent. The sending end sends the image area data obtained by encoding each strip to the receiving end; the receiving end receives and decodes each image area data one by one.
示例性的,所述图像区域数据包括编码格式信息,可以根据所述编码格式信息对应的解码方式解码所述图像区域数据。Exemplarily, the image area data includes encoding format information, and the image area data can be decoded according to a decoding manner corresponding to the encoding format information.
例如,发送端对条带进行帧内编码、帧间编码可以分别得到编码格式信息为帧内编码、帧间编码的图像区域数据,即I条带、P条带。For example, the transmitting end performs intra-frame coding and inter-frame coding on the slices to obtain image area data whose coding format information is intra-frame coding and inter-frame coding, namely, I-strip and P-strip.
I条带包括的编码格式信息,如条带类型信息slice_type为I条带对应的代码;P条带包括的编码格式信息,如条带类型信息slice_type为P条带对应的代码;示例性的,I条带还包括该条带包含的第一个宏块在整帧中位置的信息(first_mb_in_slice)等,P条带还包括该条带包含的第一个宏块在整帧中位置的信息(first_mb_in_slice)等。The coding format information included in the I slice, such as slice type information slice_type is the code corresponding to the I slice; the coding format information included in the P slice, such as the slice type information slice_type is the code corresponding to the P slice; exemplary, The I slice also includes the information (first_mb_in_slice) of the position of the first macroblock contained in the slice in the whole frame, etc., and the P slice also includes the information of the position of the first macroblock contained in the slice in the whole frame ( first_mb_in_slice) and so on.
示例性的,编码格式为帧内编码的当前图像帧,编码后的各图像区域数据的编码格式信息均为帧内编码;编码格式为部分区域的帧内编码的当前图像帧,对应于进行帧内编码区域的图像区域数据的编码格式信息为帧内编码,其他区域对应的图像区域数据的编码格式信息为帧间编码。Exemplarily, the encoding format is the current image frame of intra-encoded, and the encoding format information of each image area data after encoding is intra-encoded; the encoding format is the current image frame of intra-encoded partial area, corresponding to the frame The coding format information of the image area data in the inner coding area is intra-frame coding, and the coding format information of the image area data corresponding to other areas is inter-frame coding.
例如,接收端接收到图像区域数据后,根据图像区域数据中的编码格式信息判断图像区域数据是I条带或P条带;若是I条带,则对该图像区域数据进行帧内解码;若是P条带,则对该图像区域数据进行帧间解码。For example, after receiving the image area data, the receiving end judges whether the image area data is an I stripe or a P stripe according to the encoding format information in the image area data; if it is an I stripe, it performs intra-frame decoding on the image area data; if so, P strips, then perform inter-frame decoding on the image area data.
在一些实施方式中,步骤S220中的若接收所述当前图像帧出错或者解码所述当前图像帧出错,向所述发送端发送错误反馈信息,包括:若接收编码后的当前图像帧时发生丢包事件,向所述发送端发送错误反馈信息。In some embodiments, in step S220, if there is an error in receiving the current image frame or if there is an error in decoding the current image frame, sending error feedback information to the sending end includes: if the current image frame is lost when receiving the encoded current image frame. Packet events, send error feedback information to the sender.
示例性的,接收端从发送端接收编码后的图像帧,进行协议头解析和容错处理,如果确认正确则进行解码;如果帧头协议中编码帧序号不连续,则表示有丢包,即发生丢包事件。Exemplarily, the receiving end receives the encoded image frame from the sending end, performs protocol header parsing and error-tolerant processing, and decodes it if it is confirmed to be correct; if the sequence number of the encoded frame in the frame header protocol is not continuous, it means there is packet loss, that is Packet loss event.
例如,发送端有一个全局的编码帧计数器(frame_idx),记录一帧一帧编码的帧序号。该帧序号会随着协议头发送,如果接收端收到的相邻帧的帧号不连续,说明传输过程有丢帧,则向发送端发送错误反馈信息。For example, the sender has a global coded frame counter (frame_idx), which records the frame number of the coded frame by frame. The frame sequence number will be sent along with the protocol header. If the frame numbers of adjacent frames received by the receiving end are not continuous, indicating that there is frame loss during the transmission process, error feedback information is sent to the sending end.
在一些实施方式中,若未从所述发送端正确接收编码后的图像区域数据,根据所述图像区域数据生成错误反馈信息,向所述发送端发送所述错误反馈信息。In some embodiments, if the encoded image area data is not correctly received from the sending end, error feedback information is generated based on the image area data, and the error feedback information is sent to the sending end.
示例性的,接收端逐一从发送端接收图像帧各个区域编码后的图像区域数据,若某次接收的图像区域数据对应的区域与前一次接收的图像区域数据对应的区域不连续,则表示中间有图像区域数据丢失未接收到,则向发送端发送错误反馈信息。Exemplarily, the receiving end receives the encoded image area data of each area of the image frame from the sending end one by one. If the area corresponding to the image area data received in a certain time is not continuous with the area corresponding to the image area data received in the previous time, it means the middle If the data in the image area is lost and not received, an error feedback message is sent to the sender.
示例性的,接收端逐一从发送端接收图像帧各条带编码后的图像区域数据;发送端严格按照单个条带的图像区域数据为一个数据业务包进行发送,接收端可以根据物理层的业务包号索引对应得到图像区域数据的条带索引;若接收端某次接收的图像区域数据的条带索引与前一次接收的图像区域数据的条带索引不连续,则表示有条带对应的图像区域数据丢失未接收到,则向发送端发送错误反馈信息。示例性的,传输协议头中可以不包含当前发送码流对应的条带索引。Exemplarily, the receiving end receives the image area data encoded by each stripe of the image frame from the sending end one by one; the sending end strictly sends the image area data of a single strip as a data service packet, and the receiving end can be based on the physical layer business The packet number index corresponds to the stripe index of the image area data; if the stripe index of the image area data received by the receiving end is not continuous with the stripe index of the image area data received the previous time, it means that there is an image corresponding to the stripe If the area data is lost and not received, an error feedback message is sent to the sender. Exemplarily, the transmission protocol header may not include the slice index corresponding to the current transmission code stream.
示例性的,接收端从发送端接收的,发送端当前图像帧各个区域编码后的图像区域数据包括数据包序号。Exemplarily, when the receiving end receives from the sending end, the image area data encoded in each area of the current image frame at the sending end includes a data packet sequence number.
在一些实施方式中,若所述图像区域数据的包序号与前一图像区域数据的包序号不连续,根据所述前一图像区域数据的包序号和所述当前图像帧对应的第一个图像区域数据的数据包序号计算所述图像区域数据对应的区域索引信息;生成包括所述区域索引信息的错误反馈信息。In some embodiments, if the packet sequence number of the image area data is not continuous with the packet sequence number of the previous image area data, according to the packet sequence number of the previous image area data and the first image corresponding to the current image frame The data packet sequence number of the area data calculates the area index information corresponding to the image area data; and generates error feedback information including the area index information.
区域索引信息可以表示图像帧中与出错图像区域数据对应的区域位置。例如,某一时刻接收端接收的图像区域数据的包序号为17,但前一个接收到的图像区域数据的包序号为14,则说明未接收到包序号为15、16的图像区域数据;若当前图像帧对应的第一个图像区域数据的数据包序号为12,则可以将前一图像区域数据的包序号14减去当前图像帧对应的第一个图像区域数据的数据包序号12,然后加一得到所述图像区域数据对应的区域索引信息为3;或者将第一个未接收到的图像区域数据的包序号15减去当前图像帧对应的第一个图像区域数据的数据包序号12,得到所述图像区域数据对应的区域索引信息为3;表示第一个未接收到的图像区域数据为当前图像帧中的第三个条带之后的条带对应的图像区域数据,即第四个条带对应的图像区域数据。The area index information may indicate the position of the area in the image frame corresponding to the error image area data. For example, if the packet sequence number of the image area data received by the receiving end at a certain time is 17, but the packet sequence number of the image area data received before is 14, it means that the image area data with packet numbers 15 and 16 has not been received; if The data packet sequence number of the first image area data corresponding to the current image frame is 12, then the packet sequence number 14 of the previous image area data can be subtracted from the data packet sequence number 12 of the first image area data corresponding to the current image frame, and then Add one to obtain the area index information corresponding to the image area data as 3; or subtract the packet sequence number of the first image area data corresponding to the current image frame from 15 from the packet sequence number 15 of the first unreceived image area data , The area index information corresponding to the image area data is 3; it means that the first unreceived image area data is the image area data corresponding to the strip after the third strip in the current image frame, that is, the fourth Image area data corresponding to each band.
示例性的,发送端向接收端发送的各图像区域数据包括所编码条带对应的条带索引。例如发送端向接收端发送的每个发送数据包均包括一个条带索引的传输协议头信息。Exemplarily, each image area data sent by the sending end to the receiving end includes a slice index corresponding to the coded slice. For example, each data packet sent from the sender to the receiver includes a transmission protocol header with a strip index.
例如,若所述图像区域数据的条带索引与前一图像区域数据的条带索引不连续,根据所述前一图像区域数据的条带索引和所述当前图像帧对应的第一个图像区域数据的条带索引计算所述图像区域数据对应的区域索引信息;生成包括所述区域索引信息的错误反馈信息。For example, if the strip index of the image area data is not continuous with the strip index of the previous image area data, according to the strip index of the previous image area data and the first image area corresponding to the current image frame The strip index of the data calculates the area index information corresponding to the image area data; and generates error feedback information including the area index information.
例如,某一时刻接收端接收的图像区域数据的条带索引为6,但前一个接收到的图像区域数据的条带索引为3,则说明未接收到条带索引为4、5的图像区域数据;当前图像帧对应的第一个图像区域数据的数据条带索引为1,则可以将前一图像区域数据的条带索引3减去当前图像帧对应的第一个图像区域数据的数据条带索引1,然后加一得到所述图像区域数据对应的区域索引信息为3;或者将第一个未接收到的图像区域数据的条带索引4减去当前图像帧对应的第一个图像区域数据的数据条带索引1,得到所述图像区域数据对应的区域索引信息为3;表示第一个未接收到的图像区域数据为当前图像帧中的第三个条带之后的条带对应的图像区域数据,即第四个条带对应的图像区域数据。For example, if the stripe index of the image area data received by the receiving end at a certain time is 6, but the stripe index of the previous image area data is 3, it means that the image area with the stripe index of 4 and 5 has not been received. Data; the data stripe index of the first image area data corresponding to the current image frame is 1, then the stripe index 3 of the previous image area data can be subtracted from the data stripe of the first image area data corresponding to the current image frame With index 1, then add one to get the area index information corresponding to the image area data as 3; or subtract the first image area corresponding to the current image frame from the strip index 4 of the first unreceived image area data The data stripe index of the data is 1, and the area index information corresponding to the image area data is 3; it means that the first unreceived image area data corresponds to the stripe after the third stripe in the current image frame Image area data, that is, the image area data corresponding to the fourth band.
示例性的,计算所述图像区域数据对应的区域索引信息,生成包括所述区域索引信息的错误反馈信息;发送端从接收端接收的错误反馈信息包括区域索引信息。从而发送端可以根据所获取错误反馈信息中的区域索引信息确定所述第一个纠错刷新帧进行帧内编码的区域,对所述第一个纠错刷新帧进行帧内编码的区域进行帧内编码;例如对第一个纠错刷新帧中的第四个条带进行帧内编码。Exemplarily, the area index information corresponding to the image area data is calculated, and error feedback information including the area index information is generated; the error feedback information received by the sending end from the receiving end includes area index information. Therefore, the sending end can determine the region where the first error correction refresh frame is intra-coded according to the region index information in the acquired error feedback information, and frame the region where the first error correction refresh frame is intra-coded. Intra coding; for example, intra coding is performed on the fourth slice in the first error correction refresh frame.
示例性的,接收端解码第一个纠错刷新帧,特别是对第一个纠错刷新帧进行帧内编码的区域进行帧内解码后,可以更新该区域的参考数据;因此可以更快速的更新接收、解码出错区域的参考数据,利于错误状态的快速恢复,降低发生花屏现象的几率。Exemplarily, the receiving end decodes the first error correction refresh frame, especially after intra-frame decoding is performed on the region where the first error correction refresh frame is intra-coded, the reference data of the region can be updated; therefore, it can be faster Update the reference data of the receiving and decoding error area, which is conducive to the rapid recovery of the error state and reduces the probability of the screen blur phenomenon.
示例性的,如图13所示,发送端根据错误反馈信息中的区域索引信息确定第n个图像帧进行帧内编码的区域为中部区域,然后对第n个图像帧的中部区域进行帧内编码,对第n个图像帧的头部区域和尾部区域进行帧间编码。接收端接收该图像帧后,对第n个图像帧的中部区域进行帧内解码,更新参考数据中中部区域对应的数据。Exemplarily, as shown in FIG. 13, the sender determines the region where the n-th image frame is intra-encoded as the middle region according to the region index information in the error feedback information, and then performs intra-frame coding on the middle region of the n-th image frame. Encoding, inter-coding the header area and tail area of the nth image frame. After receiving the image frame, the receiving end performs intra-frame decoding on the middle region of the nth image frame, and updates the data corresponding to the middle region in the reference data.
在另一些实施方式中,接收端从发送端接收的,发送端当前图像帧各个区域编码后的图像区域数据包括区域索引信息。In other embodiments, the image area data of each area of the current image frame at the transmitting end received by the receiving end from the transmitting end includes area index information.
示例性的,接收端从发送端接收的某图像区域数据包括区域索引信息,如条带索引3。Exemplarily, the certain image area data received by the receiving end from the sending end includes area index information, such as stripe index 3.
若未从所述发送端正确接收编码后的图像区域数据,生成包括所述区域索引信息的错误反馈信息,向所述发送端发送所述错误反馈信息。If the encoded image area data is not correctly received from the sending end, error feedback information including the area index information is generated, and the error feedback information is sent to the sending end.
示例性的,若接收端接收条带索引3这一区域索引信息对应的图像区域数据时出错,例如虽然通过协议头解析得到了区域索引信息,但是图像数据不完整或者误码率过高,则生成包括条带索引3这一区域索引信息的错误反馈信息,向所述发送端发送所述错误反馈信息。发送端可以根据所获取错误反馈信息中的区域索引信息对第一个纠错刷新帧中的第三个条带进行帧内编码。Exemplarily, if the receiving end makes an error when receiving the image area data corresponding to the area index information of strip index 3, for example, although the area index information is obtained through protocol header analysis, the image data is incomplete or the bit error rate is too high, then Generate error feedback information including region index information of stripe index 3, and send the error feedback information to the sending end. The sending end may perform intra-frame coding on the third slice in the first error correction refresh frame according to the area index information in the obtained error feedback information.
在一些实施方式中,步骤S220中的若接收所述当前图像帧出错或者解码所述当前图像帧出错,向所述发送端发送错误反馈信息,包括:若接收到的当前图像帧未通过完整性校验,向所述发送端发送错误反馈信息,所述错误反馈信息包括所述当前图像帧头部区域对应的区域索引信息。In some embodiments, in step S220, if there is an error in receiving the current image frame or decoding the current image frame, sending error feedback information to the sending end includes: if the received current image frame fails the integrity Checking, sending error feedback information to the sending end, where the error feedback information includes area index information corresponding to the header area of the current image frame.
示例性的,在接收完当前图像帧后,如果解析出的帧尾协议中的编码帧长度和校验和(checksum)校验不通过,则判定未通过完整性校验;向所述发送端发送错误反馈信息。Exemplarily, after receiving the current image frame, if the length of the encoded frame in the parsed end-of-frame protocol and the checksum (checksum) check are not passed, it is determined that the integrity check is not passed; to the sending end Send error feedback information.
示例性的,若接收到的当前图像帧未通过完整性校验,表示当前图像帧接收出错,可以向发送端发送的错误反馈信息包括当前图像帧头部区域对应的区域索引信息,如条带索引1;发送端根据条带索引为1的错误反馈信息后,对第一个纠错刷新帧中的第一个条带进行帧内编码。Exemplarily, if the received current image frame fails the integrity check, it indicates that the current image frame received an error, and the error feedback information that can be sent to the sender includes the area index information corresponding to the header area of the current image frame, such as a stripe Index 1: The sender performs intra-frame coding on the first slice in the first error correction refresh frame after the error feedback information of the slice index is 1.
示例性的,当前图像帧头部区域对应的条带索引为0,发送端根据条带索引为0的错误反馈信息后,对第一个纠错刷新帧中的第一个条带进行帧内编码。Exemplarily, the stripe index corresponding to the header area of the current image frame is 0, and the sending end performs intra-frame on the first stripe in the first error correction refresh frame according to the error feedback information with the stripe index of 0 coding.
在一些实施方式中,步骤S220中的若接收所述当前图像帧出错或者解码所述当前图像帧出错,向所述发送端发送错误反馈信息,包括:若解码所述当前图像帧失败,向所述发送端发送错误反馈信息。In some embodiments, in step S220, if there is an error in receiving the current image frame or decoding the current image frame, sending error feedback information to the sending end includes: if decoding the current image frame fails, sending error feedback to the The sending end sends error feedback information.
示例性的,若解码当前图像帧或者当前图像帧的图像区域数据时,遇到了码表中不存在的码字,或者根据语法(syntax)规定的参数(parameter)的取值范围判定解码出来的值不合理,则判定解码所述当前图像帧失败,向所述发送端发送错误反馈信息。Exemplarily, when decoding the current image frame or the image area data of the current image frame, a code word that does not exist in the code table is encountered, or the decoded code is determined according to the value range of the parameter specified by the syntax (syntax) If the value is unreasonable, it is determined that the decoding of the current image frame fails, and error feedback information is sent to the sending end.
例如,解码当前图像帧的某图像区域数据时失败,则向发送端发送包含该 图像区域数据区域索引信息的错误反馈信息。For example, if the decoding of a certain image area data of the current image frame fails, an error feedback message containing the index information of the image area data area is sent to the sending end.
在一些实施方式中,步骤S220中的接收所述发送端响应于所述错误反馈信息发送的部分区域进行帧内编码的纠错刷新帧,包括:从所述发送端接收预设个数的编码后的纠错刷新帧,所述纠错刷新帧为所述发送端对根据所述错误反馈信息确定的纠错刷新帧的部分区域进行帧内编码得到的。In some embodiments, the receiving of the error correction refresh frame for intra-frame coding of the partial area sent by the sending end in response to the error feedback information in step S220 includes: receiving a preset number of codes from the sending end After the error correction refresh frame, the error correction refresh frame is obtained by the transmitting end performing intra-frame encoding on a partial area of the error correction refresh frame determined according to the error feedback information.
在本实施方式中,若发送端接收到所述接收端发送的错误反馈信息,在错误反馈信息对应的图像帧,即当前图像帧和/或该当前图像帧之后的图像帧中确定预设个数的纠错刷新帧。In this embodiment, if the sending end receives the error feedback information sent by the receiving end, a preset one is determined in the image frame corresponding to the error feedback information, that is, the current image frame and/or the image frames subsequent to the current image frame. Number of error correction refresh frames.
例如,发送端接收到接收端发送的错误反馈信息后,将以所述错误反馈信息对应的图像帧开始的预设个数的图像帧作为纠错刷新帧。For example, after receiving the error feedback information sent by the receiving end, the sending end uses a preset number of image frames starting from the image frame corresponding to the error feedback information as the error correction refresh frame.
例如,如图2所示,发送端将第n个图像帧开始的M个图像帧,即第n个图像帧至第n+M-1个图像帧确定为M个纠错刷新帧。以更迅速的响应接收端的错误反馈信息,向接收端发送纠错刷新帧。For example, as shown in FIG. 2, the sending end determines the M image frames starting from the nth image frame, that is, the nth image frame to the n+M-1th image frame as M error correction refresh frames. To respond more quickly to the error feedback information from the receiving end, send an error correction refresh frame to the receiving end.
发送端对根据所述错误反馈信息确定的纠错刷新帧的部分区域进行帧内编码的步骤已经在上述应用于发送端的视频发送方法中说明,在此不做赘述。The steps for the sending end to perform intra-frame encoding on the partial area of the error correction refresh frame determined according to the error feedback information have been described in the video sending method applied to the sending end, and will not be repeated here.
示例性的,接收端从发送端接收的第一个纠错刷新帧进行帧内编码的区域可以为头部区域,如第一个条带。Exemplarily, the region where the receiving end receives the first error correction refresh frame from the sending end for intra-frame coding may be the header area, such as the first stripe.
示例性的,接收端从发送端接收的第一个纠错刷新帧进行帧内编码的区域也可以是根据错误反馈信息中的区域索引信息确定的区域,如中部区域或第四个条带。Exemplarily, the region where the receiving end receives the first error correction refresh frame from the sending end for intra-frame coding may also be an area determined according to the area index information in the error feedback information, such as the middle area or the fourth stripe.
在一些实施方式中,如图25所示,步骤S230中接收端解码所述纠错刷新帧,根据解码结果刷新用于解码的参考数据,包括步骤S231至步骤S232。In some embodiments, as shown in FIG. 25, in step S230, the receiving end decodes the error correction refresh frame and refreshes the reference data for decoding according to the decoding result, including steps S231 to S232.
S231、对所述纠错刷新帧帧内编码的区域进行帧内解码,得到所述纠错刷新帧对应的刷新片段数据。S231. Perform intra-frame decoding on the region coded in the error correction refresh frame to obtain refresh segment data corresponding to the error correction refresh frame.
接收端从发送端接收到纠错刷新帧之后,对帧内编码的区域进行帧内解码,得到该区域对应的刷新片段数据。After receiving the error correction refresh frame from the sending end, the receiving end performs intra-frame decoding on the intra-encoded area to obtain the refresh segment data corresponding to the area.
示例性的,接收端接收所述发送端响应于所述错误反馈信息发送的部分区域进行帧内编码的纠错刷新帧时,从所述发送端接收编码后的图像区域数据,所述图像区域数据包括所述发送端对所述纠错刷新帧的部分区域编码后的数据,以及编码格式信息。Exemplarily, when the receiving end receives the error correction refresh frame in which the partial area sent by the transmitting end in response to the error feedback information performs intra-frame coding, the coded image area data is received from the transmitting end, and the image area The data includes data encoded by the sending end on a partial area of the error correction refresh frame, and encoding format information.
在本实施方式中,纠错刷新帧中的部分区域进行帧内编码得到的图像区域数据的编码格式信息为帧内编码,其余区域进行帧间编码后得到的若干图像区域数据的编码格式信息为帧间编码。In this embodiment, the encoding format information of the image area data obtained by intra-encoding some areas in the error correction refresh frame is intra-frame encoding, and the encoding format information of several image area data obtained after inter-encoding the remaining areas is Inter-frame coding.
示例性的,若接收端某时刻接收到的图像区域数据中的编码格式信息为帧内编码,则对图像区域数据中所述部分区域编码后的数据进行帧内解码,得到所述图像区域数据对应的刷新片段数据。Exemplarily, if the encoding format information in the image area data received at a certain time by the receiving end is intra-frame encoding, then intra-frame decoding is performed on the partial area-encoded data in the image area data to obtain the image area data The corresponding refresh fragment data.
在一些实施方式中,所述图像区域数据还包括所述部分区域的区域索引信息。示例性的,接收端对所述部分区域编码后的数据进行帧内解码,得到所述区域索引信息对应的刷新片段数据。In some embodiments, the image area data further includes area index information of the partial area. Exemplarily, the receiving end performs intra-frame decoding on the encoded data of the partial region to obtain refresh segment data corresponding to the region index information.
示例性的,发送端对某纠错刷新帧的第三个条带进行帧内编码,对第一、第二个条带进行帧间编码,得到三个图像区域数据,其中第三个条带对应的图像区域数据的编码格式信息为帧内编码;则接收端接收到第三个条带对应的图像区域数据后,对该图像区域数据进行帧内解码,得到第三个条带对应的刷新片段数据。Exemplarily, the sending end performs intra-frame encoding on the third stripe of a certain error correction refresh frame, and performs inter-frame encoding on the first and second stripe to obtain three image area data, of which the third stripe The encoding format information of the corresponding image area data is intra-frame encoding; after receiving the image area data corresponding to the third stripe, the receiving end performs intra-frame decoding on the image area data to obtain the refresh corresponding to the third stripe Fragment data.
示例性的,对所述纠错刷新帧帧内编码的区域进行帧内解码,根据用于解码的参考数据对其余区域进行帧间解码。例如,接收端接收第一、第二个条带对应的图像区域数据后,根据参考数据中对应于第一、第二个条带的数据进行帧间解码。Exemplarily, intra-frame decoding is performed on the area coded in the error correction refresh frame, and the remaining areas are inter-decoded according to the reference data used for decoding. For example, after receiving the image area data corresponding to the first and second slices, the receiving end performs inter-frame decoding according to the data corresponding to the first and second slices in the reference data.
S232、根据所述纠错刷新帧对应的刷新片段数据刷新所述参考数据。S232. Refresh the reference data according to the refresh segment data corresponding to the error correction refresh frame.
由于每个刷新帧只有部分区域进行帧内编码,接收端对帧内编码的部分区域进行解码得到对应于相应区域的部分参考数据,即刷新片段数据,则根据该刷新片段数据更新参考数据中与该区域对应的部分数据。Since only part of the area of each refresh frame is intra-encoded, the receiving end decodes the part of the intra-encoded area to obtain part of the reference data corresponding to the corresponding area, that is, refresh segment data, and then update the reference data according to the refresh segment data. Part of the data corresponding to this area.
示例性的,将所述参考数据中对应于所述部分区域的部分数据更新为所述刷新片段数据。Exemplarily, part of the data corresponding to the partial area in the reference data is updated to the refresh segment data.
在一些实施方式中,所述图像区域数据还包括所述部分区域的区域索引信息。示例性的,接收端将所述参考数据中对应于所述区域索引信息的部分数据更新为所述刷新片段数据。In some embodiments, the image area data further includes area index information of the partial area. Exemplarily, the receiving end updates part of the data corresponding to the area index information in the reference data to the refresh segment data.
示例性的,接收端接收到第三个条带对应的图像区域数据后,对该图像区域数据进行帧内解码,得到第三个条带对应的刷新片段数据;将参考数据中对应于第三个条带的部分数据更新为所述刷新片段数据。Exemplarily, after receiving the image area data corresponding to the third stripe, the receiving end performs intra-frame decoding on the image area data to obtain the refresh segment data corresponding to the third stripe; the reference data corresponds to the third stripe. Part of the data of each stripe is updated to the refresh segment data.
在一些实施方式中,根据所述预设个数的纠错刷新帧对应的刷新片段数据刷新所述参考数据之后,向所述发送端发送正确反馈信息。In some embodiments, after refreshing the reference data according to the refresh segment data corresponding to the preset number of error correction refresh frames, correct feedback information is sent to the sending end.
示例性的,同一错误反馈信息对应的预设个数的纠错刷新帧进行帧内编码的区域的并集等于各图像帧的图像范围;如图2所示,接收端接收、解码三个纠错刷新帧后,可以将参考数据完整的更新一遍,则向所述发送端发送正确反馈信息。发送端接收到正确反馈信息后,可以继续对后续的图像帧进行编码。Exemplarily, the union of the regions where the preset number of error correction refresh frames corresponding to the same error feedback information is intra-encoded is equal to the image range of each image frame; as shown in Figure 2, the receiving end receives and decodes three errors After the wrong refresh frame, the reference data can be completely updated, and then correct feedback information is sent to the sending end. After receiving the correct feedback information, the sending end can continue to encode subsequent image frames.
示例性的,发送端根据接收端发送的错误反馈信息,根据错误反馈信息确定一纠错序列,该纠错序列包括预设个数的纠错刷新帧和若干非纠错刷新帧,如预测帧。接收端根据所述预设个数的纠错刷新帧对应的刷新片段数据刷新所述参考数据之后,向所述发送端发送正确反馈信息;发送端接收到正确反馈信息后,对纠错序列中的预测帧进行帧间编码,将编码后的预测帧向所述接收端发送。Exemplarily, the sending end determines an error correction sequence according to the error feedback information sent by the receiving end, and the error correction sequence includes a preset number of error correction refresh frames and several non-error correction refresh frames, such as predicted frames . After refreshing the reference data according to the refresh segment data corresponding to the preset number of error correction refresh frames, the receiving end sends correct feedback information to the sending end; after receiving the correct feedback information, the sending end corrects the error correction sequence The predicted frame of is subjected to inter-frame encoding, and the encoded predicted frame is sent to the receiving end.
示例性的,若接收端当前接收、解码的纠错刷新帧出现错误,则向发送端发送错误反馈信息;发送端根据该纠错刷新帧,确定预设个数的纠错刷新帧,重新进行一次纠错刷新帧的确定和部分区域帧内编码。Exemplarily, if there is an error in the error correction refresh frame currently received and decoded by the receiving end, the error feedback information is sent to the transmitting end; the transmitting end determines the preset number of error correction refresh frames according to the error correction refresh frame, and repeats One-time error correction refresh frame determination and partial area intra-frame coding.
在一些实施方式中,接收端根据所述预设个数的纠错刷新帧对应的刷新片段数据刷新所述参考数据之后,返回步骤S210继续执行;即继续从发送端接收编码后的当前图像帧,解码所述当前图像帧的步骤继续执行,直至接收所述当前图像帧出错或者解码所述当前图像帧出错。In some embodiments, the receiving end refreshes the reference data according to the refresh segment data corresponding to the preset number of error correction refresh frames, then returns to step S210 to continue execution; that is, continues to receive the encoded current image frame from the sender , The step of decoding the current image frame continues to be executed until receiving the current image frame error or decoding the current image frame error.
示例性的,接收端根据所述预设个数的纠错刷新帧对应的刷新片段数据刷新所述参考数据之后,向所述发送端发送正确反馈信息;发送端接收到该正确反馈信息之后,获取例如摄像头新拍摄的图像帧,即当前图像帧,对所述当前图像帧进行编码,将编码后的当前图像帧向接收端发送;接收端从发送端接收编码后的当前图像帧,解码所述当前图像帧。Exemplarily, after refreshing the reference data according to the refresh segment data corresponding to the preset number of error correction refresh frames, the receiving end sends correct feedback information to the sending end; after the sending end receives the correct feedback information, Obtain, for example, the image frame newly shot by the camera, that is, the current image frame, encode the current image frame, and send the encoded current image frame to the receiving end; the receiving end receives the encoded current image frame from the sending end, and decodes the current image frame. Describe the current image frame.
请参阅图26,图26是本申请一实施例提供的一种视频传输方法的流程示意图,用于前述的发送端向前述的接收端传输视频。Please refer to FIG. 26. FIG. 26 is a schematic flowchart of a video transmission method provided by an embodiment of the present application, which is used for the aforementioned sending end to transmit video to the aforementioned receiving end.
如图26所示,本实施例视频传输方法包括步骤S510至步骤S540。As shown in FIG. 26, the video transmission method of this embodiment includes steps S510 to S540.
S510、发送端对获取的当前图像帧进行编码,将编码后的当前图像帧向接收端发送。S510: The sending end encodes the acquired current image frame, and sends the encoded current image frame to the receiving end.
在本实施例中,发送端逐帧向接收端发送图像帧,如图2所示;示例性的, 发送端上的摄像头实时获取图像帧,将获取的图像帧逐帧编码后向接收端发送。In this embodiment, the sending end sends image frames to the receiving end frame by frame, as shown in Figure 2; exemplary, the camera on the sending end acquires the image frames in real time, encodes the acquired image frames frame by frame, and sends them to the receiving end. .
示例性的,所述发送端根据间隔刷新条件判断所述当前图像帧是否为间隔刷新帧;若所述当前图像帧不是间隔刷新帧,所述发送端对所述当前图像帧进行帧间编码。Exemplarily, the sending end determines whether the current image frame is an interval refresh frame according to an interval refresh condition; if the current image frame is not an interval refresh frame, the sending end performs inter-frame encoding on the current image frame.
示例性的,若所述当前图像帧的编号位于任一刷新周期的刷新范围,所述发送端判定所述当前图像帧是间隔刷新帧,所述刷新周期包括相邻的刷新范围和预测范围;若所述当前图像帧的编号位于任一刷新周期的预测范围,所述发送端判定所述当前图像帧不是间隔刷新帧。Exemplarily, if the number of the current image frame is within the refresh range of any refresh period, the sending end determines that the current image frame is an interval refresh frame, and the refresh period includes adjacent refresh ranges and prediction ranges; If the number of the current image frame is within the prediction range of any refresh period, the sending end determines that the current image frame is not an interval refresh frame.
示例性的,若所述当前图像帧的编号位于任一图像序列的刷新子序列中,所述发送端判定所述当前图像帧是间隔刷新帧,所述图像序列包括相邻的刷新子序列和预测子序列,所述刷新子序列包括所述图像序列开始时的至少一个图像帧;若所述当前图像帧的编号位于任一图像序列的预测子序列中,所述发送端判定所述当前图像帧不是间隔刷新帧。Exemplarily, if the number of the current image frame is in the refresh subsequence of any image sequence, the sending end determines that the current image frame is an interval refresh frame, and the image sequence includes adjacent refresh subsequences and A predictive subsequence, where the refresh subsequence includes at least one image frame at the beginning of the image sequence; if the number of the current image frame is in the predictor subsequence of any image sequence, the sending end determines the current image The frame is not an interval refresh frame.
在一些实施方式中,若所述当前图像帧是间隔刷新帧,所述发送端对所述当前图像帧进行帧内编码。In some embodiments, if the current image frame is an interval refresh frame, the sending end performs intra-frame encoding on the current image frame.
示例性的,如图18所示,每8个图像帧为一个刷新周期,其中每个刷新周期中的第1个图像帧是间隔刷新帧,第2个至第8个图像帧不是间隔刷新帧;则分别对获取的第2个至第8个图像帧进行帧间编码,得到各自对应的帧间编码帧,即P帧。通过对一个刷新周期或一个图像序列中的间隔刷新帧进行帧内编码,接收端接收、解码各间隔刷新帧后,可以将参考数据完整的更新一遍,以提高该刷新周期或图像序列中各非间隔刷新帧解码的准确性,防止花屏。Exemplarily, as shown in FIG. 18, every 8 image frames is a refresh period, wherein the first image frame in each refresh period is an interval refresh frame, and the second to eighth image frames are not interval refresh frames ; Then respectively perform inter-frame encoding on the acquired second to eighth image frames to obtain respective corresponding inter-frame encoded frames, namely P frames. By intra-coding a refresh cycle or interval refresh frame in an image sequence, after receiving and decoding each interval refresh frame, the receiving end can update the reference data completely to improve the refresh cycle or each non-refresh frame in the image sequence. Refresh the accuracy of frame decoding at intervals to prevent blurring.
在另一些实施方式中,若所述当前图像帧是间隔刷新帧,所述发送端对所述当前图像帧的部分区域进行帧内编码。In some other implementation manners, if the current image frame is an interval refresh frame, the sending end performs intra-frame coding on a partial area of the current image frame.
示例性的,若所述当前图像帧是间隔刷新帧,所述发送端对所述当前图像帧的部分区域进行帧内编码,其余区域进行帧间编码。Exemplarily, if the current image frame is an interval refresh frame, the sending end performs intra-frame coding on a partial area of the current image frame, and performs inter-frame coding on the remaining areas.
示例性的,如图19所示,每8个图像帧为一个刷新周期,其中每个刷新周期中的第1个至第3个图像帧是间隔刷新帧,第4个至第8个图像帧不是间隔刷新帧;则分别对获取的第4个至第8个图像帧进行帧间编码,得到各自对应的帧间编码帧,即P帧。Exemplarily, as shown in FIG. 19, every 8 image frames is a refresh period, wherein the first to third image frames in each refresh period are interval refresh frames, and the fourth to eighth image frames It is not an interval refresh frame; then the acquired 4th to 8th image frames are inter-encoded respectively to obtain respective corresponding inter-encoded frames, namely P frames.
示例性的,同一刷新周期或图像序列中各间隔刷新帧进行帧内编码的区域 不同,且同一刷新周期或图像序列中所有间隔刷新帧进行帧内编码的区域的并集等于各图像帧的图像范围。Exemplarily, the region where each interval refresh frame in the same refresh period or image sequence undergoes intra-coding is different, and the union of the regions where all interval refresh frames in the same refresh period or image sequence undergo intra-frame encoding is equal to the image of each image frame range.
示例性的,同一刷新周期或图像序列中不同间隔刷新帧进行帧内编码的区域可以部分重合,或者互相之间不重合。Exemplarily, in the same refresh period or image sequence, regions where intra-frame coding is performed on refresh frames at different intervals may partially overlap, or may not overlap with each other.
通过对一个刷新周期或一个图像序列中各间隔刷新帧进行部分区域的帧内编码,接收端接收、解码各间隔刷新帧后,可以将参考数据完整的更新一遍,以提高该刷新周期或图像序列中各非间隔刷新帧解码的准确性,防止花屏。By performing intra-frame coding on a partial area of each interval refresh frame in a refresh period or an image sequence, after receiving and decoding each interval refresh frame, the receiving end can update the reference data completely to improve the refresh period or image sequence The accuracy of the decoding of the non-interval refresh frames in the middle, to prevent the screen blur.
在一些实施方式中,在步骤S510发送端对获取的当前图像帧进行编码,将编码后的当前图像帧向接收端发送之前,所述发送端对一图像帧进行帧内编码,将编码后的所述图像帧向接收端发送;所述发送端根据帧内编码的图像帧对所述图像帧之后的若干图像帧进行帧间编码,将编码后的图像帧向接收端发送。In some embodiments, in step S510, the sending end encodes the acquired current image frame, and before sending the encoded current image frame to the receiving end, the sending end performs intra-frame encoding on an image frame, and the encoded The image frame is sent to the receiving end; the sending end performs inter-frame encoding on several image frames following the image frame according to the intra-encoded image frame, and sends the encoded image frame to the receiving end.
示例性的,如图21所示,图像帧a为某一时刻发送端向接收端发送的第一个图像帧。发送端对该图像帧进行帧内编码,得到I帧,将编码后的所述图像帧向接收端发送;以使接收端解码后快速得到完整的参考数据。在将图像帧a进行帧内编码、向接收端发送之后,接收端可以获取完整的参考数据;发送端可以参考图像帧a对获取的图像帧b进行帧间编码,得到P帧向接收端发送,接收端根据参考数据解码图像帧b。发送端可以参考图像帧a或者图像帧b对获取的图像帧c进行帧间编码,得到P帧向接收端发送,接收端根据参考数据解码图像帧c。Exemplarily, as shown in FIG. 21, the image frame a is the first image frame sent by the sending end to the receiving end at a certain moment. The transmitting end performs intra-frame encoding on the image frame to obtain an I frame, and sends the encoded image frame to the receiving end; so that the receiving end can quickly obtain complete reference data after decoding. After the image frame a is intra-encoded and sent to the receiving end, the receiving end can obtain the complete reference data; the sending end can refer to the image frame a to perform inter-frame encoding on the obtained image frame b, and obtain the P frame and send it to the receiving end , The receiving end decodes the image frame b according to the reference data. The sending end may refer to the image frame a or the image frame b to perform inter-frame encoding on the acquired image frame c, and obtain the P frame to send to the receiving end, and the receiving end decodes the image frame c according to the reference data.
S520、所述接收端接收、解码所述当前图像帧,若接收所述当前图像帧出错或者解码所述当前图像帧出错,向所述发送端发送错误反馈信息。S520: The receiving end receives and decodes the current image frame, and if there is an error in receiving the current image frame or decoding the current image frame, it sends error feedback information to the sending end.
接收端接收、解码发送端发送的当前图像帧。示例性的,若所述当前图像帧对应的编码格式为帧间编码,所述接收端根据用于解码的参考数据对所述当前图像帧进行解码。The receiving end receives and decodes the current image frame sent by the sending end. Exemplarily, if the encoding format corresponding to the current image frame is inter-frame encoding, the receiving end decodes the current image frame according to the reference data used for decoding.
在一些实施方式中,若所述当前图像帧对应的编码格式为帧内编码,所述接收端对所述当前图像帧进行帧内解码;所述接收端根据帧内解码的结果刷新所述参考数据。In some implementations, if the encoding format corresponding to the current image frame is intra-frame encoding, the receiving end performs intra-frame decoding on the current image frame; the receiving end refreshes the reference according to the result of the intra-frame decoding data.
示例性的,接收端接收、解码刷新周期或图像序列中的间隔刷新帧,如帧内编码帧后,可以将参考数据完整的更新一遍,以提高该刷新周期或图像序列中各非间隔刷新帧解码的准确性,防止花屏。Exemplarily, the receiving end receives and decodes the refresh period or interval refresh frame in the image sequence, such as an intra-frame encoding frame, can update the reference data completely to improve the refresh period or each non-interval refresh frame in the image sequence The accuracy of decoding prevents screen flickering.
示例性的,所述接收端根据帧内解码的结果刷新所述参考数据之后,向所述发送端发送正确反馈信息。Exemplarily, after refreshing the reference data according to the result of intra-frame decoding, the receiving end sends correct feedback information to the sending end.
在另一些实施方式中,若所述当前图像帧对应的编码格式为部分区域的帧内编码,所述接收端对所述当前图像帧帧内编码的区域进行帧内解码,得到所述当前图像帧对应的刷新片段数据;所述接收端将所述参考数据中对应于所述帧内编码的区域的部分数据更新为所述刷新片段数据。In other implementation manners, if the encoding format corresponding to the current image frame is intra-encoding of a partial area, the receiving end performs intra-frame decoding on the intra-encoded area of the current image frame to obtain the current image Refresh segment data corresponding to the frame; the receiving end updates part of the data in the reference data corresponding to the region encoded in the frame to the refresh segment data.
示例性的,若所述当前图像帧对应的编码格式为部分区域的帧内编码,所述接收端根据所述参考数据对所述当前图像帧的其余区域进行帧间解码。Exemplarily, if the encoding format corresponding to the current image frame is intra-frame encoding of a partial area, the receiving end performs inter-frame decoding on the remaining areas of the current image frame according to the reference data.
示例性的,接收端解码所述当前图像帧帧内编码的区域时,不需要参考其他图像帧就可解码出该部分数据,解码出的数据可以作为其他图像帧进行解码时所需的参考数据,实现对用于解码的参考数据的周期性更新。Exemplarily, when the receiving end decodes the intra-coded region of the current image frame, it can decode the part of the data without referring to other image frames, and the decoded data can be used as reference data for decoding other image frames , To realize the periodic update of the reference data used for decoding.
示例性的,若所述参考数据中全部的数据均更新一遍,所述接收端向所述发送端发送正确反馈信息。Exemplarily, if all data in the reference data are updated once, the receiving end sends correct feedback information to the sending end.
如图19所示,接收端接收、解码一个刷新周期中的三个间隔刷新帧后,可以将参考数据完整的更新一遍,则向所述发送端发送正确反馈信息。As shown in FIG. 19, after receiving and decoding three interval refresh frames in one refresh cycle, the receiving end can update the reference data completely, and then send correct feedback information to the sending end.
发送端对间隔刷新帧的部分区域进行帧内编码,其余区域进行帧间编码;既可以降低网络资源的资源占用,避免对完整的图像帧进行帧内编码导致码率突发而引起延迟和抖动增加,而且可以间隔性的为接收端提供解码所需的参考数据。The sender performs intra-frame coding on some areas of the interval refresh frame, and inter-frame coding for the remaining areas; it can reduce the resource occupation of network resources and avoid the complete image frame intra-frame coding that causes a burst of code rate and causes delay and jitter Increase, and can provide the receiving end with reference data needed for decoding at intervals.
在一些实施方式中,若接收端在接收图像帧时判定发生丢包事件,或者完整性校验错误,则向发送端发送错误反馈信息;所述错误反馈信息包括所述接收端响应于丢包事件的反馈信息,或者包括所述接收端响应于完整性校验错误的反馈信息。In some embodiments, if the receiving end determines that a packet loss event or an integrity check error occurs when receiving an image frame, it sends error feedback information to the transmitting end; the error feedback information includes the receiving end's response to the packet loss The feedback information of the event or the feedback information of the receiving end in response to the integrity check error.
示例性的,接收端通过和发送端之间的上行信道将成功反馈信息、错误反馈信息向发送端发送。Exemplarily, the receiving end sends success feedback information and error feedback information to the sending end through an uplink channel between the receiving end and the sending end.
在一些实施方式中,若所述接收端接收编码后的当前图像帧时发生丢包事件,向所述发送端发送错误反馈信息。In some embodiments, if a packet loss event occurs when the receiving end receives the encoded current image frame, error feedback information is sent to the sending end.
示例性的,接收端从发送端接收编码后的图像帧,进行协议头解析和容错处理,如果确认正确则进行解码;如果帧头协议中编码帧序号不连续,则表示有丢包,即发生丢包事件。Exemplarily, the receiving end receives the encoded image frame from the sending end, performs protocol header parsing and error-tolerant processing, and decodes it if it is confirmed to be correct; if the sequence number of the encoded frame in the frame header protocol is not continuous, it means there is packet loss, that is Packet loss event.
示例性的,所述接收端从发送端接收对所述当前图像帧各个区域编码后的图像区域数据,解码所述当前图像帧的各图像区域数据。Exemplarily, the receiving end receives from the sending end the image area data that has been encoded for each area of the current image frame, and decodes each image area data of the current image frame.
具体的,所述图像区域数据包括编码格式信息。所述接收端根据所述编码格式信息对应的解码方式解码所述图像区域数据。Specifically, the image area data includes encoding format information. The receiving end decodes the image region data according to a decoding manner corresponding to the encoding format information.
示例性的,若所述接收端未从所述发送端正确接收编码后的图像区域数据,根据所述图像区域数据生成错误反馈信息,向所述发送端发送所述错误反馈信息。Exemplarily, if the receiving end does not correctly receive the encoded image area data from the transmitting end, error feedback information is generated according to the image area data, and the error feedback information is sent to the transmitting end.
示例性的,接收端逐一从发送端接收图像帧各个区域编码后的图像区域数据,若某次接收的图像区域数据对应的区域与前一次接收的图像区域数据对应的区域不连续,则表示中间有图像区域数据丢失未接收到,则向发送端发送错误反馈信息。Exemplarily, the receiving end receives the encoded image area data of each area of the image frame from the sending end one by one. If the area corresponding to the image area data received in a certain time is not continuous with the area corresponding to the image area data received in the previous time, it means the middle If the data in the image area is lost and not received, an error feedback message is sent to the sender.
示例性的,所述图像区域数据包括数据包序号。Exemplarily, the image area data includes a data packet sequence number.
具体的,若所述图像区域数据的包序号与前一图像区域数据的包序号不连续,所述接收端根据所述前一图像区域数据的包序号和所述当前图像帧对应的第一个图像区域数据的数据包序号计算所述图像区域数据对应的区域索引信息;所述接收端生成包括所述区域索引信息的错误反馈信息。Specifically, if the packet sequence number of the image area data is not continuous with the packet sequence number of the previous image area data, the receiving end uses the packet sequence number of the previous image area data and the first one corresponding to the current image frame. The data packet sequence number of the image area data calculates the area index information corresponding to the image area data; the receiving end generates error feedback information including the area index information.
示例性的,所述图像区域数据包括区域索引信息。Exemplarily, the image area data includes area index information.
具体的,若所述接收端未从所述发送端正确接收编码后的图像区域数据,生成包括所述区域索引信息的错误反馈信息。Specifically, if the receiving end does not correctly receive the encoded image area data from the transmitting end, error feedback information including the area index information is generated.
在另一些实施方式中,若所述接收端接收到的当前图像帧未通过完整性校验,所述接收端向所述发送端发送错误反馈信息,所述错误反馈信息包括所述当前图像帧头部区域对应的区域索引信息。In other implementations, if the current image frame received by the receiving end fails the integrity check, the receiving end sends error feedback information to the sending end, and the error feedback information includes the current image frame Area index information corresponding to the header area.
示例性的,当前图像帧头部区域对应的条带索引为0,发送端根据条带索引为0的错误反馈信息后,对第一个纠错刷新帧中的第一个条带进行帧内编码。Exemplarily, the stripe index corresponding to the header area of the current image frame is 0, and the sending end performs intra-frame on the first stripe in the first error correction refresh frame according to the error feedback information with the stripe index of 0 coding.
在又一实施方式中,若所述接收端解码所述当前图像帧失败,所述接收端向所述发送端发送错误反馈信息。In another embodiment, if the receiving end fails to decode the current image frame, the receiving end sends error feedback information to the sending end.
例如,解码当前图像帧的某图像区域数据时失败,则向发送端发送包含该图像区域数据区域索引信息的错误反馈信息。For example, if a certain image area data of the current image frame fails to be decoded, error feedback information including the index information of the image area data area is sent to the sending end.
S530、所述发送端根据所述错误反馈信息确定纠错刷新帧,对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送。S530. The sending end determines an error correction refresh frame according to the error feedback information, performs intra-frame coding on a part of the error correction refresh frame, and sends the coded error correction refresh frame to the receiving end.
示例性的,所述发送端对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送之后,返回步骤S510所述对获取的当前图像帧进行编码,将编码后的当前图像帧向接收端发送的步骤继续执行,直至接收到所述接收端发送的错误反馈信息。Exemplarily, the sending end performs intra-frame coding on a partial area of the error correction refresh frame, and after sending the coded error correction refresh frame to the receiving end, it returns to the current image frame obtained in step S510 Encoding is performed, and the step of sending the encoded current image frame to the receiving end is continued until the error feedback information sent by the receiving end is received.
在一些实施方式中,所述发送端在所述当前图像帧和/或所述当前图像帧之后的图像帧中确定预设个数的纠错刷新帧,对各所述纠错刷新帧的部分区域进行帧内编码。例如,所述发送端将以所述当前图像帧开始的预设个数的图像帧作为纠错刷新帧。In some embodiments, the sending end determines a preset number of error correction refresh frames in the current image frame and/or image frames subsequent to the current image frame, and performs part of each of the error correction refresh frames The region is intra-coded. For example, the sending end uses a preset number of image frames starting from the current image frame as error correction refresh frames.
如图2所示,将第n个图像帧开始的M个图像帧,即第n个图像帧至第n+M-1个图像帧确定为M个纠错刷新帧。以更迅速的响应接收端的错误反馈信息,向接收端发送纠错刷新帧。As shown in FIG. 2, the M image frames starting from the nth image frame, that is, the nth image frame to the n+M-1th image frame, are determined as M error correction refresh frames. To respond more quickly to the error feedback information from the receiving end, send an error correction refresh frame to the receiving end.
示例性的,所述发送端对所述纠错刷新帧的部分区域进行帧内编码,其余区域进行帧间编码。Exemplarily, the sending end performs intra-frame coding on a part of the error correction refresh frame, and performs inter-frame coding on the remaining areas.
示例性的,所述预设个数的纠错刷新帧进行帧内编码的区域的并集等于任一纠错刷新帧帧的范围。Exemplarily, the union of the regions where the preset number of error correction refresh frames is intra-coded is equal to the range of any error correction refresh frame.
在一些实施方式中,所述发送端将所述当前图像帧作为第一个纠错刷新帧,对所述第一个纠错刷新帧的部分区域进行帧内编码,将编码后的第一个纠错刷新帧向所述接收端发送;然后所述发送端获取下一纠错刷新帧;之后所述发送端对所述纠错刷新帧的部分区域进行帧内编码,将编码后的所述纠错刷新帧向所述接收端发送;然后返回所述发送端获取下一纠错刷新帧,以及所述发送端对所述纠错刷新帧的部分区域进行帧内编码,将编码后的所述纠错刷新帧向所述接收端发送的步骤继续执行,直至最后一个纠错刷新帧编码后向所述接收端发送。In some implementation manners, the sending end uses the current image frame as the first error correction refresh frame, performs intra-frame encoding on a partial area of the first error correction refresh frame, and encodes the first The error correction refresh frame is sent to the receiving end; then the sending end obtains the next error correction refresh frame; then the sending end performs intra-frame encoding on a part of the error correction refresh frame, and the encoded The error correction refresh frame is sent to the receiving end; then it returns to the sending end to obtain the next error correction refresh frame, and the sending end performs intra-frame coding on a part of the error correction refresh frame, and the encoded all The step of sending the error correction refresh frame to the receiving end is continued until the last error correction refresh frame is encoded and sent to the receiving end.
在一些实施方式中,所述发送端对所述第一个纠错刷新帧的头部区域进行帧内编码;所述发送端将所述纠错刷新帧的前一纠错刷新帧进行帧内编码的区域后移,得到所述纠错刷新帧进行帧内编码的区域,对所述纠错刷新帧进行帧内编码的区域进行帧内编码。In some embodiments, the sending end performs intra-frame coding on the header area of the first error correction refresh frame; the sending end performs intra-frame coding on the previous error correction refresh frame of the error correction refresh frame The coded area is moved backward to obtain the area where the error correction refresh frame is intra-coded, and the area where the error correction refresh frame is intra-coded is intra-coded.
示例性的,所述发送端根据所述当前图像帧中条带的数量,在所述当前图像帧和/或所述当前图像帧之后的图像帧中确定相同数量的纠错刷新帧;所述发送端对所述第一个纠错刷新帧的第一个条带进行帧内编码;所述发送端将所述 纠错刷新帧的前一纠错刷新帧进行帧内编码的条带序号加一,得到所述纠错刷新帧进行帧内编码的条带序号,对所述纠错刷新帧中对应于所述条带序号的条带进行帧内编码。Exemplarily, the sending end determines the same number of error correction refresh frames in the current image frame and/or image frames subsequent to the current image frame according to the number of stripes in the current image frame; The sending end performs intra-frame coding on the first slice of the first error correction refresh frame; the sending end adds the sequence number of the intra-coded slice of the previous error correction refresh frame of the error correction refresh frame 1. Obtain the stripe sequence number for intra-coding of the error correction refresh frame, and perform intra-frame coding on the stripe corresponding to the stripe sequence number in the error correction refresh frame.
经过对预设个数的纠错刷新帧进行部分区域帧内编码,等效为一整个图像帧的所有区域均进行了帧内编码;因此,接收端通过解码所述预设个数的纠错刷新帧,可以将参考数据完整的刷新一遍,以提高接收端对后续的图像帧进行解码的准确性,防止接收的视频发生花屏的现象。After the preset number of error correction refresh frames are intra-encoded in some areas, it is equivalent to that all areas of an entire image frame are intra-encoded; therefore, the receiving end decodes the preset number of error corrections Refresh the frame, you can completely refresh the reference data to improve the accuracy of the receiver's decoding of subsequent image frames, and prevent the received video from blurring.
在另一些实施方式中,所述错误反馈信息包括区域索引信息。In some other embodiments, the error feedback information includes area index information.
示例性的,接收端在接收、解码当前图像帧中某区域的数据时出现错误,则根据将该区域的区域索引信息生成错误反馈信息,向发送端发送。Exemplarily, if an error occurs when the receiving end receives and decodes data of a certain area in the current image frame, it generates error feedback information according to the area index information of the area and sends it to the sending end.
所述发送端根据所获取错误反馈信息中的区域索引信息确定所述第一个纠错刷新帧进行帧内编码的区域,对所述第一个纠错刷新帧进行帧内编码的区域进行帧内编码;所述发送端将所述纠错刷新帧的前一纠错刷新帧进行帧内编码的区域后移,得到所述纠错刷新帧进行帧内编码的区域,对所述纠错刷新帧进行帧内编码的区域进行帧内编码。The sending end determines the intra-encoded area of the first error correction refresh frame according to the area index information in the obtained error feedback information, and performs intra-frame encoding on the area of the first error correction refresh frame Intra coding; the sending end shifts the area where the previous error correction refresh frame of the error correction refresh frame is intra-encoded to obtain the area where the error correction refresh frame is intra-coded, and refresh the error correction The area where the frame is intra-encoded is intra-encoded.
具体的,若所述前一纠错刷新帧进行帧内编码的区域不在所述前一纠错刷新帧的尾部,所述发送端将所述前一纠错刷新帧进行帧内编码的区域后移,得到所述纠错刷新帧进行帧内编码的区域;若所述前一纠错刷新帧进行帧内编码的区域在所述前一纠错刷新帧的尾部,所述发送端将所述纠错刷新帧的头部区域确定为所述纠错刷新帧进行帧内编码的区域。Specifically, if the region where the previous error correction refresh frame is intra-coded is not at the end of the previous error correction refresh frame, the transmitting end will be after the region where the previous error correction refresh frame is intra-coded To obtain the intra-frame coding area of the error correction refresh frame; if the intra-frame coding area of the previous error correction refresh frame is at the end of the previous error correction refresh frame, the sending end will The header area of the error correction refresh frame is determined as the area where the error correction refresh frame performs intra-frame coding.
示例性的,所述发送端根据所述当前图像帧中条带的数量,在所述当前图像帧和/或所述当前图像帧之后的图像帧中确定相同数量的纠错刷新帧;所述发送端确定所述第一个纠错刷新帧中对应于所述错误反馈信息中条带序号的条带为进行帧内编码的区域;若所述前一纠错刷新帧进行帧内编码的区域不在所述前一纠错刷新帧的尾部,所述发送端将所述前一纠错刷新帧进行帧内编码的条带序号加一,得到所述纠错刷新帧进行帧内编码的条带序号;若所述前一纠错刷新帧进行帧内编码的区域在所述前一纠错刷新帧的尾部,所述发送端将所述纠错刷新帧的第一个条带确定为所述纠错刷新帧进行帧内编码的条带。Exemplarily, the sending end determines the same number of error correction refresh frames in the current image frame and/or image frames subsequent to the current image frame according to the number of stripes in the current image frame; The sending end determines that the strip corresponding to the strip number in the error feedback information in the first error correction refresh frame is the area for intra-coding; if the previous error correction refresh frame is the area for intra-coding Not at the end of the previous error correction refresh frame, the sending end adds one to the stripe sequence number of the previous error correction refresh frame that is intra-coded to obtain the stripe of the error correction refresh frame that is intra-coded Serial number; if the area where the previous error correction refresh frame is intra-encoded is at the end of the previous error correction refresh frame, the sending end determines the first stripe of the error correction refresh frame as the Error correction refreshes the frame for intra-encoded stripes.
示例性的,根据错误反馈信息中的区域索引信息确定所述第一个纠错刷新帧进行帧内编码的区域为第一个纠错刷新帧第201行至第400行的像素区域。Exemplarily, it is determined according to the area index information in the error feedback information that the area where the first error correction refresh frame is intra-coded is the pixel area from the 201st line to the 400th line of the first error correction refresh frame.
例如,对第n个图像帧第201行至第400行的像素区域进行帧内编码,其他区域进行帧间编码;然后将编码后的第n个图像帧向接收端发送。For example, the pixel area from line 201 to line 400 of the n-th image frame is intra-encoded, and other areas are inter-encoded; then the encoded n-th image frame is sent to the receiving end.
接收端解码第n个图像帧,特别是对第n个图像帧进行帧内编码的区域进行帧内解码后,可以更新该区域的参考数据;因此可以更快速的更新接收、解码出错区域的参考数据,利于错误状态的快速恢复,降低发生花屏现象的几率。The receiving end decodes the n-th image frame, especially after intra-frame decoding is performed on the area where the n-th image frame is intra-encoded, the reference data of the area can be updated; therefore, the reference data of the receiving and decoding error area can be updated more quickly The data is conducive to the rapid recovery of the error state and reduces the probability of the phenomenon of blurring.
S540、所述接收端解码所述纠错刷新帧,根据解码结果刷新用于解码的参考数据。S540. The receiving end decodes the error correction refresh frame, and refreshes reference data used for decoding according to the decoding result.
在一些实施方式中,所述接收端从所述发送端接收预设个数的编码后的纠错刷新帧。In some embodiments, the receiving end receives a preset number of coded error correction refresh frames from the sending end.
示例性的,所述接收端对所述纠错刷新帧帧内编码的区域进行帧内解码,根据用于解码的参考数据对其余区域进行帧间解码。Exemplarily, the receiving end performs intra-frame decoding on the region coded in the error correction refresh frame, and performs inter-frame decoding on the remaining regions according to the reference data used for decoding.
示例性的,所述接收端对所述纠错刷新帧帧内编码的区域进行帧内解码,得到所述纠错刷新帧对应的刷新片段数据;所述接收端根据所述纠错刷新帧对应的刷新片段数据刷新所述参考数据。Exemplarily, the receiving end performs intra-frame decoding on the area coded in the error correction refresh frame to obtain refresh segment data corresponding to the error correction refresh frame; the receiving end corresponds to the error correction refresh frame The refresh segment data refreshes the reference data.
示例性的,接收端解码纠错刷新帧进行帧内编码的区域时,不需要参考其他图像帧就可解码出该部分数据,解码出的数据可以作为其他图像帧进行解码时所需的参考数据,实现对用于解码的参考数据的更新。Exemplarily, when the receiving end decodes the area of the error correction refresh frame for intra-frame encoding, it can decode this part of the data without referring to other image frames, and the decoded data can be used as the reference data required for decoding other image frames , To achieve the update of the reference data used for decoding.
在一些实施方式中,所述接收端从所述发送端接收预设个数的编码后的纠错刷新帧时,所述接收端从所述发送端接收编码后的图像区域数据,所述图像区域数据包括所述发送端对所述纠错刷新帧的部分区域编码后的数据,以及编码格式信息。In some embodiments, when the receiving end receives a preset number of coded error correction refresh frames from the sending end, the receiving end receives the coded image area data from the sending end, and the image The area data includes data after the sending end encodes a partial area of the error correction refresh frame, and encoding format information.
示例性的,若所述图像区域数据中的编码格式信息为帧内编码,所述接收端对所述部分区域编码后的数据进行帧内解码,得到所述图像区域数据对应的刷新片段数据;所述接收端将所述参考数据中对应于所述部分区域的部分数据更新为所述刷新片段数据。Exemplarily, if the encoding format information in the image area data is intra-frame encoding, the receiving end performs intra-frame decoding on the partial area-encoded data to obtain refresh segment data corresponding to the image area data; The receiving end updates partial data corresponding to the partial area in the reference data to the refresh fragment data.
示例性的,所述图像区域数据还包括所述部分区域的区域索引信息。Exemplarily, the image area data further includes area index information of the partial area.
具体的,所述接收端对所述部分区域编码后的数据进行帧内解码,得到所述区域索引信息对应的刷新片段数据;然后所述接收端将所述参考数据中对应于所述区域索引信息的部分数据更新为所述刷新片段数据。Specifically, the receiving end performs intra-frame decoding on the partial area coded data to obtain refresh segment data corresponding to the area index information; then the receiving end converts the reference data corresponding to the area index Part of the data of the information is updated to the refresh segment data.
在一些实施方式中,所述接收端根据所述预设个数的纠错刷新帧对应的刷 新片段数据刷新所述参考数据之后,向所述发送端发送正确反馈信息。In some embodiments, after refreshing the reference data according to the refresh segment data corresponding to the preset number of error correction refresh frames, the receiving end sends correct feedback information to the sending end.
示例性的,同一错误反馈信息对应的预设个数的纠错刷新帧进行帧内编码的区域的并集等于各图像帧的图像范围;如图2所示,接收端接收、解码三个纠错刷新帧后,可以将参考数据完整的更新一遍,则向所述发送端发送正确反馈信息。发送端接收到正确反馈信息后,可以继续对后续的图像帧进行编码。Exemplarily, the union of the regions where the preset number of error correction refresh frames corresponding to the same error feedback information is intra-encoded is equal to the image range of each image frame; as shown in Figure 2, the receiving end receives and decodes three errors After the wrong refresh frame, the reference data can be completely updated, and then correct feedback information is sent to the sending end. After receiving the correct feedback information, the sending end can continue to encode subsequent image frames.
在一些实施方式中,若所述发送端接收到所述接收端发送的错误反馈信息,所述发送端根据所述当前图像帧确定纠错序列,所述纠错序列包括预设个数的纠错刷新帧和所述预设个数的纠错刷新帧之后的预测帧。In some embodiments, if the sending end receives the error feedback information sent by the receiving end, the sending end determines an error correction sequence according to the current image frame, and the error correction sequence includes a preset number of errors. The error refresh frame and the predicted frame after the preset number of error correction refresh frames.
示例性的,接收端根据所述预设个数的纠错刷新帧对应的刷新片段数据刷新所述参考数据之后,向所述发送端发送正确反馈信息。Exemplarily, after refreshing the reference data according to the refresh segment data corresponding to the preset number of error correction refresh frames, the receiving end sends correct feedback information to the sending end.
所述发送端对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送之后,若接收到所述接收端在解码出所述纠错刷新帧时发送的正确反馈信息,对所述纠错序列中的预测帧进行帧间编码,将编码后的预测帧向所述接收端发送。The sending end performs intra-frame encoding on a partial area of the error correction refresh frame, and after sending the encoded error correction refresh frame to the receiving end, if the receiving end decodes the error correction refresh The correct feedback information sent at the time of the frame, the prediction frame in the error correction sequence is inter-frame coded, and the coded prediction frame is sent to the receiving end.
示例性的,若接收端当前接收、解码的纠错刷新帧出现错误,则向发送端发送错误反馈信息;发送端根据该纠错刷新帧,确定预设个数的纠错刷新帧,重新进行一次纠错刷新帧的确定和部分区域帧内编码。Exemplarily, if there is an error in the error correction refresh frame currently received and decoded by the receiving end, the error feedback information is sent to the transmitting end; the transmitting end determines the preset number of error correction refresh frames according to the error correction refresh frame, and repeats One-time error correction refresh frame determination and partial area intra-frame coding.
在一些实施方式中,所述发送端对所述纠错序列中的预测帧进行帧间编码,将编码后的预测帧向所述接收端发送之后,返回所述发送端对获取的当前图像帧进行编码,将编码后的当前图像帧向接收端发送,所述接收端接收、解码所述当前图像帧的步骤继续执行,直至所述接收端接收所述当前图像帧出错或者解码所述当前图像帧出错,向所述发送端发送错误反馈信息。In some implementation manners, the sending end performs inter-frame encoding on the predicted frame in the error correction sequence, and after sending the encoded predicted frame to the receiving end, returns the current image frame obtained by the sending end to Perform encoding, send the encoded current image frame to the receiving end, and the steps of receiving and decoding the current image frame by the receiving end continue until the receiving end receives the current image frame in error or decodes the current image If a frame error occurs, error feedback information is sent to the sending end.
示例性的,视频传输方法中的各刷新周期包括N个图像帧,其中间隔刷新帧包括连续的M帧,同时将各图像帧划分为M个条带进行编码,其中N大于M。接收端通过上行信道向发送端发送反馈信息。例如,反馈信息包括错误状态,错误状态为第一数值,如1时,表示该反馈信息为错误反馈信息,错误状态为第二数值,如0时,表示该反馈信息为正确反馈信息;错误反馈信息还可以包括接收、解码出错条带的条带索引slice_idx。Exemplarily, each refresh period in the video transmission method includes N image frames, where the interval refresh frame includes consecutive M frames, and each image frame is divided into M strips for encoding, where N is greater than M. The receiving end sends feedback information to the sending end through the uplink channel. For example, the feedback information includes error status, the error status is a first value, such as 1, it means that the feedback information is wrong feedback information, and the error status is a second value, such as 0, it means that the feedback information is correct feedback information; wrong feedback The information may also include the slice_idx of the slice_idx of the slice with errors received and decoded.
如图27所示为图像帧传输的一种示意图。Figure 27 shows a schematic diagram of image frame transmission.
在该示例中,发送端的处理逻辑如下:In this example, the processing logic of the sender is as follows:
1、对第一帧进行帧内编码,将得到的I帧向接收端发送;1. Perform intra-frame coding on the first frame, and send the resulting I frame to the receiving end;
2、对第二帧至第N帧进行帧间编码,将得到的P帧向接收端发送;2. Perform inter-frame encoding on the second frame to the Nth frame, and send the obtained P frame to the receiving end;
3、进行周期性刷新,对刷新周期中的第1帧至第M帧进行部分区域的帧内编码,将得到的间隔刷新帧向接收端发送,这M个帧进行帧内编码的区域的并集等于一帧的范围,即刷新区域叠加起来为一整帧;3. Perform periodic refresh, perform intra-frame coding of a part of the area from the first frame to the M-th frame in the refresh cycle, and send the obtained interval refresh frame to the receiving end. These M frames are combined with the intra-coded area The set is equal to the range of one frame, that is, the refresh area is superimposed into a whole frame;
4、对刷新周期中的第M+1帧至第N帧进行帧间编码,将得到的P帧向接收端发送;4. Perform inter-frame encoding on the M+1th frame to the Nth frame in the refresh cycle, and send the obtained P frame to the receiving end;
5、返回3、4继续执行;5. Return to 3 and 4 to continue execution;
6、如果在任意时刻发送端接收到接收端发送的反馈信息中错误状态为第一数值,立即根据该反馈信息对应的帧确定M个纠错刷新帧,对各纠错刷新帧进行部分区域的帧内编码,将得到的纠错刷新帧向接收端发送,这M个帧进行帧内编码的区域的并集等于一帧的范围,即刷新区域叠加起来为一整帧;其中,根据该反馈信息的条带索引slice_idx确定第1个纠错刷新帧进行帧内编码的区域;6. If the sending end receives the first value in the feedback information sent by the receiving end at any time, it immediately determines M error correction refresh frames according to the frame corresponding to the feedback information, and performs partial area detection on each error correction refresh frame. Intra-frame coding, the obtained error correction refresh frame is sent to the receiving end. The union of the regions where these M frames are intra-coded is equal to the range of one frame, that is, the refresh regions are superimposed into a whole frame; among them, according to the feedback The slice index slice_idx of the information determines the region where the first error correction refresh frame performs intra-frame coding;
7、对M个纠错刷新帧进行编码和发送后,对后续的N-M个帧进行帧间编码,将得到的P帧向接收端发送;7. After encoding and sending M error correction refresh frames, perform inter-frame encoding on the subsequent N-M frames, and send the obtained P frames to the receiving end;
8、返回3、4继续执行;其中,若接收端发送的反馈信息中错误状态仍为第一数值,则根据该反馈信息的条带索引slice_idx确定刷新周期中的第1帧进行帧内编码的区域;若接收端发送的反馈信息中错误状态为第二数值,则确定刷新周期中的第1帧进行帧内编码的区域为第一个条带;8. Return to 3 and 4 to continue execution; among them, if the error status in the feedback information sent by the receiving end is still the first value, the slice_idx of the feedback information is used to determine the first frame in the refresh cycle for intra-frame encoding Area; if the error status in the feedback information sent by the receiving end is the second value, it is determined that the area where the first frame in the refresh cycle is intra-encoded is the first stripe;
在该示例中,接收端的处理逻辑如下:In this example, the processing logic of the receiving end is as follows:
1、初始化反馈信息中错误状态为第二数值,条带索引slice_idx为0;1. The error status in the initial feedback information is the second value, and the slice_idx of the slice index is 0;
2、从发送端接收编码后的帧,进行协议头解析和容错处理,再解码;2. Receive the encoded frame from the sender, perform protocol header analysis and fault tolerance processing, and then decode it;
3、当接收到一个I帧,或者一组完整的M个间隔刷新帧,或者一组完整的M个纠错刷新帧,并正确接收和解码后,将错误状态置为第二数值,将条带索引slice_idx置为0;3. When an I frame, or a complete set of M interval refresh frames, or a complete set of M error correction refresh frames is received, and after correctly received and decoded, the error status is set to the second value, and the bar Set slice_idx with index to 0;
4、返回2、3继续执行;4. Return to 2, 3 to continue execution;
其中,进行协议头解析时,如果物理层包序号或者帧头协议中编码帧序号不连续,表示有丢包,则把第一个丢的包序号和该帧第一个包序号之差记作slice_idx,同时将错误状态置为第一数值,将反馈信息向发送端发送。如果帧 尾协议中的编码帧长度和checksum校验不通过,也将错误状态置为第一数值,slice_idx记作0,将反馈信息向发送端发送。Among them, when the protocol header is analyzed, if the physical layer packet sequence number or the encoded frame sequence number in the frame header protocol is not continuous, it means that there is packet loss, then the difference between the first packet sequence number and the first packet sequence number of the frame is recorded as slice_idx, at the same time the error status is set to the first value, and the feedback information is sent to the sender. If the coded frame length and checksum in the end-of-frame protocol fail, the error status is also set to the first value, slice_idx is recorded as 0, and the feedback information is sent to the sender.
通过上述方式,本申请实施例提供的视频传输方法,通过在某图像帧传输出错时,发送端对纠错刷新帧的部分区域进行帧内编码,接收端可以及时更新解码所需的参考数据,使得传输错误较快恢复;而且可以降低网络资源的资源占用,避免对完整的图像帧进行帧内编码导致码率突发而引起延迟和抖动增加。In the above manner, in the video transmission method provided by the embodiments of the present application, when a transmission error occurs in a certain image frame, the transmitting end performs intra-frame coding on part of the error correction refresh frame, and the receiving end can update the reference data required for decoding in time. This enables faster recovery of transmission errors; and can reduce the resource occupation of network resources, avoiding the burst of code rate caused by the intra-frame encoding of the complete image frame and the increase of delay and jitter.
示例性的,将间隔刷新帧、纠错刷新帧按照图像帧的条带划分进行分割,每组刷新帧的个数与图像帧的条带数目相同,每个条带对应一个刷新帧的帧内编码区域。Exemplarily, the interval refresh frame and the error correction refresh frame are divided according to the stripe of the image frame, the number of each group of refresh frames is the same as the number of strips of the image frame, and each strip corresponds to a frame within a refresh frame Coding area.
示例性的,接收端通过上行信道向发送单发送反馈信息,发送端可以根据反馈信息调整刷新周期与刷新方式;如在接收到错误反馈信息后打破原有的刷新周期,及时编码M个纠错刷新帧以便接收端更新参考数据。Exemplarily, the receiving end sends feedback information to the sending order through the uplink channel, and the sending end can adjust the refresh period and the refresh mode according to the feedback information; for example, after receiving the error feedback information, break the original refresh period and encode M error corrections in time Refresh the frame so that the receiver can update the reference data.
示例性的,传输协议保证发送的码流数据业务包含条带索引信息,接收端可以进行两者对应,从而能够判断出错位置的条带索引。可以有但不局限于以下两种实现方式:一个是每个发送数据包增加一个条带索引的传输协议头信息,另一个是传输协议头中不包含当前发送码流对应的条带索引,发送端严格按照单个条带为一个数据业务包进行发送,接收端可以根据物理层的业务包号索引对应得到条带索引。Exemplarily, the transmission protocol guarantees that the transmitted code stream data service contains strip index information, and the receiving end can correspond to the two, so as to determine the strip index of the error location. There are, but not limited to, the following two implementation methods: one is to add a transmission protocol header with a stripe index to each sent data packet, and the other is that the transmission protocol header does not contain the stripe index corresponding to the current transmission code stream. The end sends a data service packet strictly according to a single strip, and the receiving end can obtain the strip index corresponding to the service packet number index of the physical layer.
示例性的,发送端接收到错误反馈信息时,重新调整刷新周期和刷新格式,不局限于以下实现方式:如果错误发生,以错误反馈信息的条带索引对应的刷新区域开始进行帧内编码和发送,经过M帧之后完成一整帧的区域刷新;刷新完成之后经过若干P帧之后开始新一刷新周期。Exemplarily, when the sender receives the error feedback information, it readjusts the refresh cycle and refresh format, which is not limited to the following implementation: if an error occurs, the refresh area corresponding to the strip index of the error feedback information starts to perform intra-frame encoding and Send, complete a full frame area refresh after M frames; after refresh complete, start a new refresh cycle after several P frames.
示例性的,将接收到一个I帧,或者一组完整的M个间隔刷新帧,或者一组完整的M个纠错刷新帧,并正确接收和解码作为错误恢复的判断依据。Exemplarily, one I frame, or a complete set of M interval refresh frames, or a complete set of M error correction refresh frames will be received, and the correct reception and decoding will be used as a judgment basis for error recovery.
示例性的,本申请实施例提供的视频发送方法,在上行错包比较高或者上行反馈不及时的情况下,依然可以进行解码显示,且发送端依然会保持周期性的刷新;在错误发生时,发送端会打破原有的刷新周期,第一时间发送出纠错刷新帧,且刷新区域为出错的条带索引对应区域,保证最快最大程度进行错误恢复;可以兼顾图传延迟卡顿以及错误恢复速度两个最为重要的图传指标。该视频发送方法例如特别适用于对图传延迟卡顿以及错误恢复速度有极高要求的 应用场景,如穿越机。Exemplarily, the video sending method provided in the embodiments of the present application can still perform decoding and display when the upstream error packet is relatively high or the upstream feedback is not timely, and the sending end will still maintain periodic refresh; when an error occurs , The sender will break the original refresh cycle, send out the error correction refresh frame as soon as possible, and the refresh area is the area corresponding to the stripe index of the error, ensuring the fastest and maximum error recovery; it can take into account the delay of image transmission and the delay Error recovery speed is the two most important image transmission indicators. The video sending method is particularly suitable for application scenarios that have extremely high requirements for image transmission delay and error recovery speed, such as traversing machines.
请参阅图28,图28是本申请一实施例提供的视频发送装置600的示意性框图。该视频发送装置600包括处理器601和存储器602,处理器601和存储器602通过总线603连接,该总线603比如为I2C(Inter-integrated Circuit)总线。Please refer to FIG. 28. FIG. 28 is a schematic block diagram of a video sending device 600 according to an embodiment of the present application. The video sending device 600 includes a processor 601 and a memory 602. The processor 601 and the memory 602 are connected by a bus 603, which is, for example, an I2C (Inter-integrated Circuit) bus.
具体地,处理器601可以是微控制单元(Micro-controller Unit,MCU)、中央处理单元(Central Processing Unit,CPU)或数字信号处理器(Digital Signal Processor,DSP)等。Specifically, the processor 601 may be a micro-controller unit (MCU), a central processing unit (Central Processing Unit, CPU), a digital signal processor (Digital Signal Processor, DSP), or the like.
具体地,存储器602可以是Flash芯片、只读存储器(ROM,Read-Only Memory)磁盘、光盘、U盘或移动硬盘等。Specifically, the memory 602 may be a Flash chip, a read-only memory (ROM, Read-Only Memory) disk, an optical disk, a U disk, or a mobile hard disk.
其中,所述处理器601用于运行存储在存储器602中的计算机程序,并在执行所述计算机程序时实现前述的视频发送方法。Wherein, the processor 601 is configured to run a computer program stored in the memory 602, and implement the aforementioned video sending method when the computer program is executed.
示例性的,所述处理器601用于运行存储在存储器602中的计算机程序,并在执行所述计算机程序时实现如下步骤:Exemplarily, the processor 601 is configured to run a computer program stored in the memory 602, and implement the following steps when executing the computer program:
获取当前图像帧,对所述当前图像帧进行编码,将编码后的当前图像帧向接收端发送;Acquiring a current image frame, encoding the current image frame, and sending the encoded current image frame to the receiving end;
若接收到所述接收端发送的错误反馈信息,根据所述当前图像帧确定纠错刷新帧;If error feedback information sent by the receiving end is received, determine an error correction refresh frame according to the current image frame;
对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送。Perform intra-frame coding on a part of the error correction refresh frame, and send the coded error correction refresh frame to the receiving end.
请参阅图29,图29是本申请一实施例提供的飞行器10的示意性框图。Please refer to FIG. 29, which is a schematic block diagram of an aircraft 10 according to an embodiment of the present application.
如图29所示,飞行器10包括:As shown in FIG. 29, the aircraft 10 includes:
图像采集组件11,用于采集图像;The image acquisition component 11 is used to acquire images;
上述的视频发送装置600,用于获取图像采集组件采集到的图像,编码后向接收端发送;The above-mentioned video sending device 600 is used to obtain the image collected by the image collecting component, and send it to the receiving end after encoding;
飞行组件12,用于飞行。The flight component 12 is used for flight.
请参阅图30,图30是本申请一实施例提供的视频接收装置700的示意性框图。视频接收装置700包括处理器701和存储器702,处理器701和存储器502通过总线703连接,该总线703比如为I2C(Inter-integrated Circuit)总线。Please refer to FIG. 30, which is a schematic block diagram of a video receiving apparatus 700 according to an embodiment of the present application. The video receiving device 700 includes a processor 701 and a memory 702, and the processor 701 and the memory 502 are connected by a bus 703, which is, for example, an I2C (Inter-integrated Circuit) bus.
具体地,处理器701可以是微控制单元(Micro-controller Unit,MCU)、中央处理单元(Central Processing Unit,CPU)或数字信号处理器(Digital Signal Processor,DSP)等。Specifically, the processor 701 may be a micro-controller unit (MCU), a central processing unit (Central Processing Unit, CPU), a digital signal processor (Digital Signal Processor, DSP), or the like.
具体地,存储器702可以是Flash芯片、只读存储器(ROM,Read-Only Memory)磁盘、光盘、U盘或移动硬盘等。Specifically, the memory 702 may be a Flash chip, a read-only memory (ROM, Read-Only Memory) disk, an optical disk, a U disk, or a mobile hard disk.
其中,所述处理器701用于运行存储在存储器702中的计算机程序,并在执行所述计算机程序时实现前述的视频接收方法。Wherein, the processor 701 is configured to run a computer program stored in the memory 702, and implement the aforementioned video receiving method when the computer program is executed.
示例性的,所述处理器701用于运行存储在存储器702中的计算机程序,并在执行所述计算机程序时实现如下步骤:Exemplarily, the processor 701 is configured to run a computer program stored in the memory 702, and implement the following steps when executing the computer program:
从发送端接收编码后的当前图像帧,解码所述当前图像帧;Receiving the encoded current image frame from the sending end, and decoding the current image frame;
若接收所述当前图像帧出错或者解码所述当前图像帧出错,向所述发送端发送错误反馈信息,接收所述发送端响应于所述错误反馈信息发送的部分区域进行帧内编码的纠错刷新帧;If there is an error in receiving the current image frame or the decoding of the current image frame, error feedback information is sent to the sending end, and the receiving end performs error correction of intra-frame coding on the partial area sent by the sending end in response to the error feedback information Refresh frame
解码所述纠错刷新帧,根据解码结果刷新用于解码的参考数据。The error correction refresh frame is decoded, and the reference data used for decoding is refreshed according to the decoding result.
请参阅图31,图31是本申请一实施例提供的视频播放设备20的示意性框图。Please refer to FIG. 31, which is a schematic block diagram of a video playback device 20 according to an embodiment of the present application.
如图31所示,视频播放设备包括:As shown in Figure 31, video playback equipment includes:
上述的视频接收装置700,用于从发送端接收图像,并进行解码;The above-mentioned video receiving device 700 is used for receiving and decoding an image from a sending end;
显示组件21,用于显示所述视频接收装置解码出的数据。The display component 21 is used to display the data decoded by the video receiving device.
本申请上述实施例提供的视频发送装置、飞行器、视频接收装置、视频播放设备,通过在某图像帧传输出错时,发送端对纠错刷新帧的部分区域进行帧内编码,接收端可以及时更新解码所需的参考数据,使得传输错误较快恢复;而且可以降低网络资源的资源占用,避免对完整的图像帧进行帧内编码导致码率突发而引起延迟和抖动增加。In the video sending device, aircraft, video receiving device, and video playback device provided by the above embodiments of the application, the sending end performs intra-frame coding on part of the error correction refresh frame when an image frame transmission error occurs, and the receiving end can update in time The reference data required for decoding enables faster recovery of transmission errors; and can reduce the resource occupation of network resources, avoiding the burst of code rate caused by the intra-frame encoding of the complete image frame and the increase of delay and jitter.
本申请的实施例中还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序中包括程序指令,所述处理器执行所述程序指令,实现上述实施例提供的视频发送方法的步骤。The embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes program instructions, and the processor executes the program instructions to implement the foregoing implementation Example provides the steps of the video sending method.
其中,所述计算机可读存储介质可以是前述任一实施例所述的视频发送装置的内部存储单元,例如所述视频发送装置的硬盘或内存。所述计算机可读存储介质也可以是所述视频发送装置的外部存储设备,例如所述视频发送装置上 配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。The computer-readable storage medium may be the internal storage unit of the video sending device described in any of the foregoing embodiments, such as the hard disk or memory of the video sending device. The computer-readable storage medium may also be an external storage device of the video sending device, for example, a plug-in hard disk equipped on the video sending device, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital). , SD) card, flash card (Flash Card), etc.
本申请的实施例中还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序中包括程序指令,所述处理器执行所述程序指令,实现上述实施例提供的视频接收方法的步骤。The embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes program instructions, and the processor executes the program instructions to implement the foregoing implementation Example provides the steps of the video receiving method.
其中,所述计算机可读存储介质可以是前述任一实施例所述的视频接收装置的内部存储单元,例如所述视频接收装置的硬盘或内存。所述计算机可读存储介质也可以是所述视频接收装置的外部存储设备,例如所述视频接收装置上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。The computer-readable storage medium may be the internal storage unit of the video receiving device described in any of the foregoing embodiments, such as the hard disk or memory of the video receiving device. The computer-readable storage medium may also be an external storage device of the video receiving device, such as a plug-in hard disk equipped on the video receiving device, a Smart Media Card (SMC), and Secure Digital (Secure Digital). , SD) card, flash card (Flash Card), etc.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Anyone familiar with the technical field can easily think of various equivalents within the technical scope disclosed in this application. Modifications or replacements, these modifications or replacements shall be covered within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Claims (98)

  1. 一种视频发送方法,应用于发送端,其特征在于,包括:A video sending method applied to the sending end, characterized in that it includes:
    获取当前图像帧,对所述当前图像帧进行编码,将编码后的当前图像帧向接收端发送;Acquiring a current image frame, encoding the current image frame, and sending the encoded current image frame to the receiving end;
    若接收到所述接收端发送的错误反馈信息,根据所述当前图像帧确定纠错刷新帧;If error feedback information sent by the receiving end is received, determine an error correction refresh frame according to the current image frame;
    对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送。Perform intra-frame coding on a part of the error correction refresh frame, and send the coded error correction refresh frame to the receiving end.
  2. 根据权利要求1所述的视频发送方法,其特征在于,所述对所述当前图像帧进行编码,包括:The video sending method according to claim 1, wherein the encoding the current image frame comprises:
    根据间隔刷新条件判断所述当前图像帧是否为间隔刷新帧;Judging whether the current image frame is an interval refreshing frame according to the interval refresh condition;
    若所述当前图像帧不是间隔刷新帧,对所述当前图像帧进行帧间编码。If the current image frame is not an interval refresh frame, perform inter-frame coding on the current image frame.
  3. 根据权利要求2所述的视频发送方法,其特征在于,所述根据间隔刷新条件判断所述当前图像帧是否为间隔刷新帧之后,包括:The video sending method according to claim 2, wherein after the judging whether the current image frame is an interval refresh frame according to an interval refresh condition, the method comprises:
    若所述当前图像帧是间隔刷新帧,对所述当前图像帧进行帧内编码。If the current image frame is an interval refresh frame, perform intra-frame coding on the current image frame.
  4. 根据权利要求2所述的视频发送方法,其特征在于,所述根据间隔刷新条件判断所述当前图像帧是否为间隔刷新帧之后,包括:The video sending method according to claim 2, wherein after the judging whether the current image frame is an interval refresh frame according to an interval refresh condition, the method comprises:
    若所述当前图像帧是间隔刷新帧,对所述当前图像帧的部分区域进行帧内编码。If the current image frame is an interval refresh frame, perform intra-frame coding on a partial area of the current image frame.
  5. 根据权利要求4所述的视频发送方法,其特征在于,所述若所述当前图像帧是间隔刷新帧,对所述当前图像帧的部分区域进行帧内编码,包括:The video sending method according to claim 4, wherein, if the current image frame is an interval refresh frame, performing intra-frame coding on a partial area of the current image frame comprises:
    若所述当前图像帧是间隔刷新帧,对所述当前图像帧的部分区域进行帧内编码,其余区域进行帧间编码。If the current image frame is an interval refresh frame, intra-frame coding is performed on a part of the current image frame, and inter-frame coding is performed on the remaining regions.
  6. 根据权利要求2-5中任一项所述的视频发送方法,其特征在于,所述根据间隔刷新条件判断所述当前图像帧是否为间隔刷新帧,包括:The video sending method according to any one of claims 2-5, wherein the judging whether the current image frame is an interval refresh frame according to an interval refresh condition comprises:
    若所述当前图像帧的编号位于任一刷新周期的刷新范围,判定所述当前图像帧是间隔刷新帧,所述刷新周期包括相邻的刷新范围和预测范围;If the number of the current image frame is within the refresh range of any refresh period, determining that the current image frame is an interval refresh frame, and the refresh period includes adjacent refresh ranges and prediction ranges;
    若所述当前图像帧的编号位于任一刷新周期的预测范围,判定所述当前图 像帧不是间隔刷新帧。If the number of the current image frame is within the prediction range of any refresh period, it is determined that the current image frame is not an interval refresh frame.
  7. 根据权利要求2-5中任一项所述的视频发送方法,其特征在于,所述根据间隔刷新条件判断所述当前图像帧是否为间隔刷新帧,包括:The video sending method according to any one of claims 2-5, wherein the judging whether the current image frame is an interval refresh frame according to an interval refresh condition comprises:
    若所述当前图像帧的编号位于任一图像序列的刷新子序列中,判定所述当前图像帧是间隔刷新帧,所述图像序列包括相邻的刷新子序列和预测子序列,所述刷新子序列包括所述图像序列开始时的至少一个图像帧;If the number of the current image frame is in the refresh subsequence of any image sequence, it is determined that the current image frame is an interval refresh frame, and the image sequence includes adjacent refresh subsequences and prediction subsequences, and the refresh subsequence The sequence includes at least one image frame at the beginning of the image sequence;
    若所述当前图像帧的编号位于任一图像序列的预测子序列中,判定所述当前图像帧不是间隔刷新帧。If the number of the current image frame is in the predicted subsequence of any image sequence, it is determined that the current image frame is not an interval refresh frame.
  8. 根据权利要求1-5中任一项所述的视频发送方法,其特征在于,对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送之后,包括:The video sending method according to any one of claims 1 to 5, wherein a part of the error correction refresh frame is intra-encoded, and the encoded error correction refresh frame is sent to the receiving end After that, include:
    返回所述获取当前图像帧,对所述当前图像帧进行编码,将编码后的当前图像帧向接收端发送的步骤继续执行,直至接收到所述接收端发送的错误反馈信息。Return to the obtaining of the current image frame, encode the current image frame, and continue the steps of sending the encoded current image frame to the receiving end until the error feedback information sent by the receiving end is received.
  9. 根据权利要求1-5中任一项所述的视频发送方法,其特征在于,所述获取当前图像帧,对所述当前图像帧进行编码,将编码后的当前图像帧向接收端发送之前,包括:The video sending method according to any one of claims 1 to 5, wherein before the acquiring the current image frame, encoding the current image frame, and sending the encoded current image frame to the receiving end, include:
    对一图像帧进行帧内编码,将编码后的所述图像帧向接收端发送;Intra-encoding an image frame, and sending the encoded image frame to the receiving end;
    根据帧内编码的图像帧对所述图像帧之后的若干图像帧进行帧间编码,将编码后的图像帧向接收端发送。Perform inter-frame encoding on several image frames following the image frame according to the intra-encoded image frame, and send the encoded image frame to the receiving end.
  10. 根据权利要求1-5中任一项所述的视频发送方法,其特征在于,所述根据所述当前图像帧确定纠错刷新帧,包括:The video sending method according to any one of claims 1-5, wherein the determining an error correction refresh frame according to the current image frame comprises:
    在所述当前图像帧和/或所述当前图像帧之后的图像帧中确定预设个数的纠错刷新帧。Determine a preset number of error correction refresh frames in the current image frame and/or image frames subsequent to the current image frame.
  11. 根据权利要求10所述的视频发送方法,其特征在于,所述在所述当前图像帧和/或所述当前图像帧之后的图像帧中确定预设个数的纠错刷新帧,包括:The video sending method according to claim 10, wherein the determining a preset number of error correction refresh frames in the current image frame and/or image frames subsequent to the current image frame comprises:
    将以所述当前图像帧开始的预设个数的图像帧作为纠错刷新帧。A preset number of image frames starting from the current image frame are used as error correction refresh frames.
  12. 根据权利要求11所述的视频发送方法,其特征在于,所述对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送, 包括:The video sending method according to claim 11, wherein the performing intra-frame encoding on a partial area of the error correction refresh frame and sending the encoded error correction refresh frame to the receiving end comprises:
    将所述当前图像帧作为第一个纠错刷新帧,对所述第一个纠错刷新帧的部分区域进行帧内编码,将编码后的第一个纠错刷新帧向所述接收端发送;Use the current image frame as the first error correction refresh frame, perform intra-frame encoding on a partial area of the first error correction refresh frame, and send the encoded first error correction refresh frame to the receiving end ;
    获取下一纠错刷新帧;Obtain the next error correction refresh frame;
    对所述纠错刷新帧的部分区域进行帧内编码,将编码后的所述纠错刷新帧向所述接收端发送;Performing intra-frame coding on a part of the error correction refresh frame, and sending the coded error correction refresh frame to the receiving end;
    返回所述获取下一纠错刷新帧,以及对所述纠错刷新帧的部分区域进行帧内编码,将编码后的所述纠错刷新帧向所述接收端发送的步骤继续执行,直至最后一个纠错刷新帧编码后向所述接收端发送。Return to the obtaining of the next error correction refresh frame, and perform intra-frame coding on a part of the error correction refresh frame, and continue the step of sending the encoded error correction refresh frame to the receiving end until the end An error correction refresh frame is encoded and sent to the receiving end.
  13. 根据权利要求12所述的视频发送方法,其特征在于,预设个数的纠错刷新帧进行帧内编码的区域的并集等于任一纠错刷新帧帧的范围。The video sending method according to claim 12, wherein the union of the regions where the preset number of error correction refresh frames are intra-coded is equal to the range of any error correction refresh frame.
  14. 根据权利要求13所述的视频发送方法,其特征在于,所述对所述纠错刷新帧的部分区域进行帧内编码,包括:The video sending method according to claim 13, wherein the performing intra-frame coding on a partial area of the error correction refresh frame comprises:
    对所述纠错刷新帧的部分区域进行帧内编码,其余区域进行帧间编码。Intra-frame coding is performed on a part of the error correction refresh frame, and inter-frame coding is performed on the remaining regions.
  15. 根据权利要求14所述的视频发送方法,其特征在于,所述对所述第一个纠错刷新帧的部分区域进行帧内编码,包括:The video sending method according to claim 14, wherein the performing intra-frame coding on a partial area of the first error correction refresh frame comprises:
    对所述第一个纠错刷新帧的头部区域进行帧内编码。Perform intra-frame coding on the header area of the first error correction refresh frame.
  16. 根据权利要求15所述的视频发送方法,其特征在于,所述对所述纠错刷新帧的部分区域进行帧内编码,将编码后的所述纠错刷新帧向所述接收端发送,包括:The video sending method according to claim 15, wherein said performing intra-frame coding on a partial area of said error correction refresh frame, and sending the coded error correction refresh frame to said receiving end comprises :
    将所述纠错刷新帧的前一纠错刷新帧进行帧内编码的区域后移,得到所述纠错刷新帧进行帧内编码的区域,对所述纠错刷新帧进行帧内编码的区域进行帧内编码。Move back the area where the previous error correction refresh frame of the error correction refresh frame is intra-coded to obtain the area where the error correction refresh frame is intra-coded, and the area where the error correction refresh frame is intra-coded Perform intra-frame coding.
  17. 根据权利要求16所述的视频发送方法,其特征在于,所述在所述当前图像帧和/或所述当前图像帧之后的图像帧中确定预设个数的纠错刷新帧,包括:The video sending method according to claim 16, wherein the determining a preset number of error correction refresh frames in the current image frame and/or image frames subsequent to the current image frame comprises:
    根据所述当前图像帧中条带的数量,在所述当前图像帧和/或所述当前图像帧之后的图像帧中确定相同数量的纠错刷新帧。According to the number of strips in the current image frame, the same number of error correction refresh frames are determined in the current image frame and/or image frames subsequent to the current image frame.
  18. 根据权利要求17所述的视频发送方法,其特征在于,所述对所述第一个纠错刷新帧的头部区域进行帧内编码,包括:The video sending method according to claim 17, wherein the performing intra-frame coding on the header area of the first error correction refresh frame comprises:
    对所述第一个纠错刷新帧的第一个条带进行帧内编码。Perform intra-frame coding on the first slice of the first error correction refresh frame.
  19. 根据权利要求18所述的视频发送方法,其特征在于,所述将所述纠错刷新帧的前一纠错刷新帧进行帧内编码的区域后移,得到所述纠错刷新帧进行帧内编码的区域,对所述纠错刷新帧进行帧内编码的区域进行帧内编码,包括:The video transmission method according to claim 18, wherein the area where the previous error correction refresh frame of the error correction refresh frame is intra-encoded is shifted backward to obtain the error correction refresh frame for intra-frame The coded area, performing intra-frame coding on the area where the error correction refresh frame is intra-coded, includes:
    将所述纠错刷新帧的前一纠错刷新帧进行帧内编码的条带序号加一,得到所述纠错刷新帧进行帧内编码的条带序号,对所述纠错刷新帧中对应于所述条带序号的条带进行帧内编码。Add one to the stripe sequence number of the previous error correction refresh frame that is intra-coded in the error correction refresh frame to obtain the stripe sequence number of the error correction refresh frame that is intra-coded. Perform intra-frame coding on the slice of the slice number.
  20. 根据权利要求14所述的视频发送方法,其特征在于,所述错误反馈信息包括区域索引信息;The video sending method according to claim 14, wherein the error feedback information includes area index information;
    所述对所述第一个纠错刷新帧的部分区域进行帧内编码,包括:The performing intra-frame coding on a partial area of the first error correction refresh frame includes:
    根据所获取错误反馈信息中的区域索引信息确定所述第一个纠错刷新帧进行帧内编码的区域,对所述第一个纠错刷新帧进行帧内编码的区域进行帧内编码。Determine the region where the first error correction refresh frame is intra-coded according to the region index information in the acquired error feedback information, and perform intra-frame coding on the region where the first error correction refresh frame is intra-coded.
  21. 根据权利要求20所述的视频发送方法,其特征在于,所述对所述纠错刷新帧的部分区域进行帧内编码,包括:The video sending method according to claim 20, wherein the performing intra-frame coding on a partial area of the error correction refresh frame comprises:
    将所述纠错刷新帧的前一纠错刷新帧进行帧内编码的区域后移,得到所述纠错刷新帧进行帧内编码的区域,对所述纠错刷新帧进行帧内编码的区域进行帧内编码。Move back the area where the previous error correction refresh frame of the error correction refresh frame is intra-coded to obtain the area where the error correction refresh frame is intra-coded, and the area where the error correction refresh frame is intra-coded Perform intra-frame coding.
  22. 根据权利要求21所述的视频发送方法,其特征在于,所述将所述纠错刷新帧的前一纠错刷新帧进行帧内编码的区域后移,得到所述纠错刷新帧进行帧内编码的区域,包括:22. The video sending method according to claim 21, wherein the area where the previous error correction refresh frame of the error correction refresh frame is intra-encoded is moved backward to obtain the error correction refresh frame for intra-frame The coded area includes:
    若所述前一纠错刷新帧进行帧内编码的区域不在所述前一纠错刷新帧的尾部,将所述前一纠错刷新帧进行帧内编码的区域后移,得到所述纠错刷新帧进行帧内编码的区域;If the region where the previous error correction refresh frame is intra-coded is not at the end of the previous error correction refresh frame, the region where the previous error correction refresh frame is intra-coded is moved backward to obtain the error correction Refresh the area of the frame for intra-frame coding;
    若所述前一纠错刷新帧进行帧内编码的区域在所述前一纠错刷新帧的尾部,将所述纠错刷新帧的头部区域确定为所述纠错刷新帧进行帧内编码的区域。If the area where the previous error correction refresh frame is intra-coded is at the end of the previous error correction refresh frame, the head area of the error correction refresh frame is determined as the error correction refresh frame for intra-frame encoding Area.
  23. 根据权利要求22所述的视频发送方法,其特征在于,所述在所述当前图像帧和/或所述当前图像帧之后的图像帧中确定预设个数的纠错刷新帧,包括:The video sending method according to claim 22, wherein the determining a preset number of error correction refresh frames in the current image frame and/or image frames subsequent to the current image frame comprises:
    根据所述当前图像帧中条带的数量,在所述当前图像帧和/或所述当前图像帧之后的图像帧中确定相同数量的纠错刷新帧。According to the number of strips in the current image frame, the same number of error correction refresh frames are determined in the current image frame and/or image frames subsequent to the current image frame.
  24. 根据权利要求23所述的视频发送方法,其特征在于,所述根据所获取 错误反馈信息中的区域索引信息确定所述第一个纠错刷新帧进行帧内编码的区域,包括:The video sending method according to claim 23, wherein the determining the area of the first error correction refresh frame for intra-coding according to the area index information in the obtained error feedback information comprises:
    确定所述第一个纠错刷新帧中对应于所述错误反馈信息中条带序号的条带为进行帧内编码的区域。It is determined that the strip corresponding to the strip number in the error feedback information in the first error correction refresh frame is an area for intra-frame coding.
  25. 根据权利要求24所述的视频发送方法,其特征在于,所述将所述前一纠错刷新帧进行帧内编码的区域后移,得到所述纠错刷新帧进行帧内编码的区域,包括:24. The video sending method according to claim 24, wherein said shifting the region where the previous error correction refresh frame is intra-coded to obtain the region where the error correction refresh frame is intra-coded comprises :
    将所述前一纠错刷新帧进行帧内编码的条带序号加一,得到所述纠错刷新帧进行帧内编码的条带序号。The stripe sequence number of the previous error correction refresh frame subjected to intra-frame coding is increased by one to obtain the stripe sequence number of the error correction refresh frame subjected to intra-frame coding.
  26. 根据权利要求25所述的视频发送方法,其特征在于,所述将所述纠错刷新帧的头部区域确定为所述纠错刷新帧进行帧内编码的区域,包括:The video sending method according to claim 25, wherein the determining the header area of the error correction refresh frame as the area where the error correction refresh frame is intra-encoded comprises:
    将所述纠错刷新帧的第一个条带确定为所述纠错刷新帧进行帧内编码的条带。The first slice of the error correction refresh frame is determined as the slice of the error correction refresh frame that is intra-coded.
  27. 根据权利要求11所述的视频发送方法,其特征在于,所述若接收到所述接收端发送的错误反馈信息,根据所述当前图像帧确定纠错刷新帧,包括:The video sending method according to claim 11, wherein, if error feedback information sent by the receiving end is received, determining an error correction refresh frame according to the current image frame comprises:
    若接收到所述接收端发送的错误反馈信息,根据所述当前图像帧确定纠错序列,所述纠错序列包括预设个数的纠错刷新帧和所述预设个数的纠错刷新帧之后的预测帧。If error feedback information sent by the receiving end is received, an error correction sequence is determined according to the current image frame, and the error correction sequence includes a preset number of error correction refresh frames and the preset number of error correction refreshes The predicted frame after the frame.
  28. 根据权利要求27所述的视频发送方法,其特征在于,所述对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送之后,包括:The video sending method according to claim 27, wherein the performing intra-frame coding on a partial area of the error correction refresh frame and sending the coded error correction refresh frame to the receiving end comprises:
    若接收到所述接收端在解码出所述纠错刷新帧时发送的正确反馈信息,对所述纠错序列中的预测帧进行帧间编码,将编码后的预测帧向所述接收端发送。If receiving the correct feedback information sent by the receiving end when the error correction refresh frame is decoded, perform inter-frame encoding on the predicted frame in the error correction sequence, and send the encoded predicted frame to the receiving end .
  29. 根据权利要求28所述的视频发送方法,其特征在于,所述对所述纠错序列中的预测帧进行帧间编码,将编码后的预测帧向所述接收端发送之后,包括:The video sending method according to claim 28, wherein the performing inter-frame coding on the predicted frame in the error correction sequence and sending the coded predicted frame to the receiving end comprises:
    返回所述获取当前图像帧,对所述当前图像帧进行编码,将编码后的当前图像帧向接收端发送的步骤继续执行,直至接收到所述接收端发送的错误反馈信息。Return to the obtaining of the current image frame, encode the current image frame, and continue the steps of sending the encoded current image frame to the receiving end until the error feedback information sent by the receiving end is received.
  30. 根据权利要求1-5中任一项所述的视频发送方法,其特征在于,所述错 误反馈信息包括所述接收端响应于丢包事件的反馈信息,或者包括所述接收端响应于完整性校验错误的反馈信息。The video sending method according to any one of claims 1-5, wherein the error feedback information includes feedback information of the receiving end in response to a packet loss event, or includes the receiving end in response to completeness Check the error feedback information.
  31. 根据权利要求1-5中任一项所述的视频发送方法,其特征在于,所述当前图像帧为设于所述发送端上的摄像头实时获取的图像帧。The video sending method according to any one of claims 1 to 5, wherein the current image frame is an image frame obtained in real time by a camera provided on the sending end.
  32. 一种视频接收方法,应用于接收端,其特征在于,包括:A video receiving method applied to the receiving end, characterized in that it includes:
    从发送端接收编码后的当前图像帧,解码所述当前图像帧;Receiving the encoded current image frame from the sending end, and decoding the current image frame;
    若接收所述当前图像帧出错或者解码所述当前图像帧出错,向所述发送端发送错误反馈信息,接收所述发送端响应于所述错误反馈信息发送的部分区域进行帧内编码的纠错刷新帧;If there is an error in receiving the current image frame or the decoding of the current image frame, error feedback information is sent to the sending end, and the receiving end performs error correction of intra-frame coding on the partial area sent by the sending end in response to the error feedback information Refresh frame
    解码所述纠错刷新帧,根据解码结果刷新用于解码的参考数据。The error correction refresh frame is decoded, and the reference data used for decoding is refreshed according to the decoding result.
  33. 根据权利要求32所述的视频接收方法,其特征在于,所述解码所述当前图像帧,包括:The video receiving method according to claim 32, wherein said decoding said current image frame comprises:
    若所述当前图像帧对应的编码格式为帧间编码,根据用于解码的参考数据对所述当前图像帧进行解码。If the encoding format corresponding to the current image frame is inter-frame encoding, the current image frame is decoded according to the reference data used for decoding.
  34. 根据权利要求33所述的视频接收方法,其特征在于,所述解码所述当前图像帧,包括:The video receiving method according to claim 33, wherein said decoding said current image frame comprises:
    若所述当前图像帧对应的编码格式为帧内编码,对所述当前图像帧进行帧内解码;If the encoding format corresponding to the current image frame is intra-frame encoding, perform intra-frame decoding on the current image frame;
    根据帧内解码的结果刷新所述参考数据。The reference data is refreshed according to the result of intra-frame decoding.
  35. 根据权利要求34所述的视频接收方法,其特征在于,所述根据帧内解码的结果刷新所述参考数据之后,包括:The video receiving method according to claim 34, wherein after the refreshing the reference data according to the result of intra-frame decoding, the method comprises:
    向所述发送端发送正确反馈信息。Send correct feedback information to the sending end.
  36. 根据权利要求33所述的视频接收方法,其特征在于,所述解码所述当前图像帧,包括:The video receiving method according to claim 33, wherein said decoding said current image frame comprises:
    若所述当前图像帧对应的编码格式为部分区域的帧内编码,对所述当前图像帧帧内编码的区域进行帧内解码,得到所述当前图像帧对应的刷新片段数据;If the encoding format corresponding to the current image frame is intra-encoding of a partial area, perform intra-frame decoding on the intra-encoded area of the current image frame to obtain refresh segment data corresponding to the current image frame;
    将所述参考数据中对应于所述帧内编码的区域的部分数据更新为所述刷新片段数据。Part of the data in the reference data corresponding to the region encoded in the frame is updated to the refresh segment data.
  37. 根据权利要求36所述的视频接收方法,其特征在于,所述解码所述当前图像帧,还包括:The video receiving method according to claim 36, wherein said decoding said current image frame further comprises:
    若所述当前图像帧对应的编码格式为部分区域的帧内编码,根据所述参考数据对所述当前图像帧的其余区域进行帧间解码。If the encoding format corresponding to the current image frame is intra-frame encoding of a partial area, perform inter-frame decoding on the remaining areas of the current image frame according to the reference data.
  38. 根据权利要求36所述的视频接收方法,其特征在于,所述将所述参考数据中对应于所述帧内编码的区域的部分数据更新为所述刷新片段数据之后,包括:The video receiving method according to claim 36, wherein, after updating part of the data in the reference data corresponding to the intra-coded region to the refresh segment data, the method comprises:
    若所述参考数据中全部的数据均更新一遍,向所述发送端发送正确反馈信息。If all data in the reference data is updated once, correct feedback information is sent to the sending end.
  39. 根据权利要求32-38中任一项所述的视频接收方法,其特征在于,所述若接收所述当前图像帧出错或者解码所述当前图像帧出错,向所述发送端发送错误反馈信息,包括:The video receiving method according to any one of claims 32-38, wherein if an error occurs in receiving the current image frame or decoding the current image frame, sending error feedback information to the sending end, include:
    若接收编码后的当前图像帧时发生丢包事件,向所述发送端发送错误反馈信息。If a packet loss event occurs when receiving the encoded current image frame, send error feedback information to the sending end.
  40. 根据权利要求39所述的视频接收方法,其特征在于,所述从发送端接收编码后的当前图像帧,解码所述当前图像帧,包括:The video receiving method according to claim 39, wherein the receiving the encoded current image frame from the sending end and decoding the current image frame comprises:
    从发送端接收对所述当前图像帧各个区域编码后的图像区域数据;Receiving, from the sending end, image region data encoded for each region of the current image frame;
    解码所述当前图像帧的各图像区域数据。Decoding each image area data of the current image frame.
  41. 根据权利要求40所述的视频接收方法,其特征在于,所述若接收编码后的当前图像帧时发生丢包事件,向所述发送端发送错误反馈信息,包括:The video receiving method according to claim 40, wherein if a packet loss event occurs when receiving the encoded current image frame, sending error feedback information to the sending end comprises:
    若未从所述发送端正确接收编码后的图像区域数据,根据所述图像区域数据生成错误反馈信息,向所述发送端发送所述错误反馈信息。If the encoded image area data is not correctly received from the sending end, error feedback information is generated according to the image area data, and the error feedback information is sent to the sending end.
  42. 根据权利要求41所述的视频接收方法,其特征在于,所述图像区域数据包括数据包序号;The video receiving method according to claim 41, wherein the image area data includes a data packet sequence number;
    所述若未从所述发送端正确接收编码后的图像区域数据,根据所述图像区域数据生成错误反馈信息,包括:If the encoded image area data is not correctly received from the sending end, generating error feedback information according to the image area data includes:
    若所述图像区域数据的包序号与前一图像区域数据的包序号不连续,根据所述前一图像区域数据的包序号和所述当前图像帧对应的第一个图像区域数据的数据包序号计算所述图像区域数据对应的区域索引信息;If the packet sequence number of the image area data is not continuous with the packet sequence number of the previous image area data, according to the packet sequence number of the previous image area data and the data packet sequence number of the first image area data corresponding to the current image frame Calculating area index information corresponding to the image area data;
    生成包括所述区域索引信息的错误反馈信息。Generate error feedback information including the area index information.
  43. 根据权利要求41所述的视频接收方法,其特征在于,所述图像区域数据包括区域索引信息;The video receiving method according to claim 41, wherein the image area data includes area index information;
    所述根据所述图像区域数据生成错误反馈信息,包括:The generating error feedback information according to the image area data includes:
    生成包括所述区域索引信息的错误反馈信息。Generate error feedback information including the area index information.
  44. 根据权利要求40所述的视频接收方法,其特征在于,所述图像区域数据包括编码格式信息;The video receiving method according to claim 40, wherein the image area data includes encoding format information;
    所述解码所述当前图像帧的各图像区域数据,包括:The decoding each image region data of the current image frame includes:
    根据所述编码格式信息对应的解码方式解码所述图像区域数据。Decoding the image area data according to a decoding manner corresponding to the encoding format information.
  45. 根据权利要求32-38中任一项所述的视频接收方法,其特征在于,所述若接收所述当前图像帧出错或者解码所述当前图像帧出错,向所述发送端发送错误反馈信息,包括:The video receiving method according to any one of claims 32-38, wherein if an error occurs in receiving the current image frame or decoding the current image frame, sending error feedback information to the sending end, include:
    若接收到的当前图像帧未通过完整性校验,向所述发送端发送错误反馈信息,所述错误反馈信息包括所述当前图像帧头部区域对应的区域索引信息。If the received current image frame fails the integrity check, error feedback information is sent to the sending end, where the error feedback information includes area index information corresponding to the header area of the current image frame.
  46. 根据权利要求32-38中任一项所述的视频接收方法,其特征在于,所述若接收所述当前图像帧出错或者解码所述当前图像帧出错,向所述发送端发送错误反馈信息,包括:The video receiving method according to any one of claims 32-38, wherein if an error occurs in receiving the current image frame or decoding the current image frame, sending error feedback information to the sending end, include:
    若解码所述当前图像帧失败,向所述发送端发送错误反馈信息。If the decoding of the current image frame fails, error feedback information is sent to the sending end.
  47. 根据权利要求32-38中任一项所述的视频接收方法,其特征在于,所述接收所述发送端响应于所述错误反馈信息发送的部分区域进行帧内编码的纠错刷新帧,包括:The video receiving method according to any one of claims 32-38, wherein the receiving the error correction refresh frame of the intra-encoded part of the area sent by the sending end in response to the error feedback information comprises :
    从所述发送端接收预设个数的编码后的纠错刷新帧,所述纠错刷新帧为所述发送端对根据所述错误反馈信息确定的纠错刷新帧的部分区域进行帧内编码得到的。A preset number of coded error correction refresh frames are received from the sending end, where the error correction refresh frame is that the sending end performs intra-frame coding on a partial area of the error correction refresh frame determined according to the error feedback information owned.
  48. 根据权利要求47所述的视频接收方法,其特征在于,所述解码所述纠错刷新帧,根据解码结果刷新用于解码的参考数据,包括:The video receiving method according to claim 47, wherein the decoding the error correction refresh frame and refreshing the reference data used for decoding according to the decoding result comprises:
    对所述纠错刷新帧帧内编码的区域进行帧内解码,得到所述纠错刷新帧对应的刷新片段数据;Performing intra-frame decoding on the region coded in the error correction refresh frame to obtain refresh segment data corresponding to the error correction refresh frame;
    根据所述纠错刷新帧对应的刷新片段数据刷新所述参考数据。The reference data is refreshed according to the refresh segment data corresponding to the error correction refresh frame.
  49. 根据权利要求48所述的视频接收方法,其特征在于,所述对所述纠错刷新帧帧内编码的区域进行帧内解码,包括:The video receiving method according to claim 48, wherein the performing intra-frame decoding on the intra-frame coded area of the error correction refresh frame comprises:
    对所述纠错刷新帧帧内编码的区域进行帧内解码,根据用于解码的参考数据对其余区域进行帧间解码。Perform intra-frame decoding on the area coded in the error correction refresh frame, and perform inter-frame decoding on the remaining areas according to the reference data used for decoding.
  50. 根据权利要求49所述的视频接收方法,其特征在于,所述接收所述发送端响应于所述错误反馈信息发送的部分区域进行帧内编码的纠错刷新帧,包括:The video receiving method according to claim 49, wherein the receiving the error correction refresh frame for intra-encoding a partial area sent by the sending end in response to the error feedback information comprises:
    从所述发送端接收编码后的图像区域数据,所述图像区域数据包括所述发送端对所述纠错刷新帧的部分区域编码后的数据,以及编码格式信息。The encoded image area data is received from the sending end, where the image area data includes data after the sending end encodes a part of the error correction refresh frame, and encoding format information.
  51. 根据权利要求50所述的视频接收方法,其特征在于,所述对所述纠错刷新帧帧内编码的区域进行帧内解码,得到所述纠错刷新帧对应的刷新片段数据,包括:The video receiving method according to claim 50, wherein said performing intra-frame decoding on the intra-coded region of said error correction refresh frame to obtain refresh segment data corresponding to said error correction refresh frame comprises:
    若所述图像区域数据中的编码格式信息为帧内编码,对所述部分区域编码后的数据进行帧内解码,得到所述图像区域数据对应的刷新片段数据。If the encoding format information in the image area data is intra-frame encoding, intra-frame decoding is performed on the data after the partial area encoding to obtain refresh segment data corresponding to the image area data.
  52. 根据权利要求51所述的视频接收方法,其特征在于,所述根据所述纠错刷新帧对应的刷新片段数据刷新所述参考数据,包括:The video receiving method of claim 51, wherein the refreshing the reference data according to the refresh segment data corresponding to the error correction refresh frame comprises:
    将所述参考数据中对应于所述部分区域的部分数据更新为所述刷新片段数据。Part of the data corresponding to the partial area in the reference data is updated to the refresh segment data.
  53. 根据权利要求52所述的视频接收方法,其特征在于,所述图像区域数据还包括所述部分区域的区域索引信息;The video receiving method according to claim 52, wherein the image area data further includes area index information of the partial area;
    所述对所述部分区域编码后的数据进行帧内解码,得到所述部分区域对应的刷新片段数据,包括:The performing intra-frame decoding on the encoded data of the partial area to obtain refresh segment data corresponding to the partial area includes:
    对所述部分区域编码后的数据进行帧内解码,得到所述区域索引信息对应的刷新片段数据。Perform intra-frame decoding on the encoded data of the partial region to obtain refresh segment data corresponding to the region index information.
  54. 根据权利要求53所述的视频接收方法,其特征在于,所述将所述参考数据中对应于所述部分区域的部分数据更新为所述刷新片段数据,包括:The video receiving method according to claim 53, wherein the updating part of the data corresponding to the partial area in the reference data to the refresh segment data comprises:
    将所述参考数据中对应于所述区域索引信息的部分数据更新为所述刷新片段数据。Part of the data corresponding to the area index information in the reference data is updated to the refresh segment data.
  55. 根据权利要求48所述的视频接收方法,其特征在于,根据所述预设个数的纠错刷新帧对应的刷新片段数据刷新所述参考数据之后,向所述发送端发送正确反馈信息。The video receiving method according to claim 48, wherein after refreshing the reference data according to the refresh segment data corresponding to the preset number of error correction refresh frames, correct feedback information is sent to the sending end.
  56. 根据权利要求48所述的视频接收方法,其特征在于,根据所述预设个数的纠错刷新帧对应的刷新片段数据刷新所述参考数据之后,返回所述从发送端接收编码后的当前图像帧,解码所述当前图像帧的步骤继续执行,直至接收 所述当前图像帧出错或者解码所述当前图像帧出错。The video receiving method according to claim 48, characterized in that, after refreshing the reference data according to the refresh segment data corresponding to the preset number of error correction refresh frames, the current coded data received from the sending end is returned For image frames, the step of decoding the current image frame continues to be executed until receiving the current image frame error or decoding the current image frame error.
  57. 一种视频传输方法,其特征在于,包括:A video transmission method, characterized by comprising:
    发送端对获取的当前图像帧进行编码,将编码后的当前图像帧向接收端发送;The sending end encodes the acquired current image frame, and sends the encoded current image frame to the receiving end;
    所述接收端接收、解码所述当前图像帧,若接收所述当前图像帧出错或者解码所述当前图像帧出错,向所述发送端发送错误反馈信息;The receiving end receives and decodes the current image frame, and if there is an error in receiving the current image frame or decoding the current image frame, sending error feedback information to the sending end;
    所述发送端根据所述错误反馈信息确定纠错刷新帧,对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送;The sending end determines an error correction refresh frame according to the error feedback information, performs intra-frame coding on a part of the error correction refresh frame, and sends the coded error correction refresh frame to the receiving end;
    所述接收端解码所述纠错刷新帧,根据解码结果刷新用于解码的参考数据。The receiving end decodes the error correction refresh frame, and refreshes the reference data used for decoding according to the decoding result.
  58. 根据权利要求57所述的视频传输方法,其特征在于,所述发送端根据间隔刷新条件判断所述当前图像帧是否为间隔刷新帧;The video transmission method according to claim 57, wherein the sending end determines whether the current image frame is an interval refresh frame according to an interval refresh condition;
    若所述当前图像帧不是间隔刷新帧,所述发送端对所述当前图像帧进行帧间编码;If the current image frame is not an interval refresh frame, the sending end performs inter-frame encoding on the current image frame;
    若所述当前图像帧对应的编码格式为帧间编码,所述接收端根据用于解码的参考数据对所述当前图像帧进行解码。If the encoding format corresponding to the current image frame is inter-frame encoding, the receiving end decodes the current image frame according to the reference data used for decoding.
  59. 根据权利要求58所述的视频传输方法,其特征在于,若所述当前图像帧是间隔刷新帧,所述发送端对所述当前图像帧进行帧内编码;The video transmission method according to claim 58, wherein if the current image frame is an interval refresh frame, the sending end performs intra-frame coding on the current image frame;
    若所述当前图像帧对应的编码格式为帧内编码,所述接收端对所述当前图像帧进行帧内解码;If the encoding format corresponding to the current image frame is intra-frame encoding, the receiving end performs intra-frame decoding on the current image frame;
    所述接收端根据帧内解码的结果刷新所述参考数据。The receiving end refreshes the reference data according to the result of intra-frame decoding.
  60. 根据权利要求59所述的视频传输方法,其特征在于,所述接收端根据帧内解码的结果刷新所述参考数据之后,向所述发送端发送正确反馈信息。The video transmission method according to claim 59, wherein the receiving end sends correct feedback information to the sending end after refreshing the reference data according to the result of intra-frame decoding.
  61. 根据权利要求58所述的视频传输方法,其特征在于,若所述当前图像帧是间隔刷新帧,所述发送端对所述当前图像帧的部分区域进行帧内编码;The video transmission method according to claim 58, wherein if the current image frame is an interval refresh frame, the sending end performs intra-frame coding on a partial area of the current image frame;
    若所述当前图像帧对应的编码格式为部分区域的帧内编码,所述接收端对所述当前图像帧帧内编码的区域进行帧内解码,得到所述当前图像帧对应的刷新片段数据;If the encoding format corresponding to the current image frame is intra-encoding of a partial area, the receiving end performs intra-frame decoding on the intra-encoded area of the current image frame to obtain refresh segment data corresponding to the current image frame;
    所述接收端将所述参考数据中对应于所述帧内编码的区域的部分数据更新为所述刷新片段数据。The receiving end updates part of the data in the reference data corresponding to the region encoded in the frame to the refresh segment data.
  62. 根据权利要求61所述的视频传输方法,其特征在于,若所述当前图像 帧是间隔刷新帧,所述发送端对所述当前图像帧的部分区域进行帧内编码,其余区域进行帧间编码;The video transmission method according to claim 61, wherein if the current image frame is an interval refresh frame, the sending end performs intra-frame coding on part of the current image frame, and inter-frame coding on the remaining areas ;
    若所述当前图像帧对应的编码格式为部分区域的帧内编码,所述接收端根据所述参考数据对所述当前图像帧的其余区域进行帧间解码。If the encoding format corresponding to the current image frame is intra-frame encoding of a partial area, the receiving end performs inter-frame decoding on the remaining area of the current image frame according to the reference data.
  63. 根据权利要求62所述的视频传输方法,其特征在于,若所述参考数据中全部的数据均更新一遍,所述接收端向所述发送端发送正确反馈信息。The video transmission method according to claim 62, wherein if all data in the reference data is updated once, the receiving end sends correct feedback information to the sending end.
  64. 根据权利要求58-63中任一项所述的视频传输方法,其特征在于,若所述当前图像帧的编号位于任一刷新周期的刷新范围,所述发送端判定所述当前图像帧是间隔刷新帧,所述刷新周期包括相邻的刷新范围和预测范围;The video transmission method according to any one of claims 58-63, wherein if the number of the current image frame is within the refresh range of any refresh period, the sending end determines that the current image frame is an interval A refresh frame, where the refresh period includes adjacent refresh ranges and prediction ranges;
    若所述当前图像帧的编号位于任一刷新周期的预测范围,所述发送端判定所述当前图像帧不是间隔刷新帧。If the number of the current image frame is within the prediction range of any refresh period, the sending end determines that the current image frame is not an interval refresh frame.
  65. 根据权利要求58-63中任一项所述的视频传输方法,其特征在于,若所述当前图像帧的编号位于任一图像序列的刷新子序列中,所述发送端判定所述当前图像帧是间隔刷新帧,所述图像序列包括相邻的刷新子序列和预测子序列,所述刷新子序列包括所述图像序列开始时的至少一个图像帧;The video transmission method according to any one of claims 58-63, wherein if the number of the current image frame is in the refresh subsequence of any image sequence, the sending end determines that the current image frame Is an interval refresh frame, the image sequence includes adjacent refresh subsequences and prediction subsequences, and the refresh subsequence includes at least one image frame at the beginning of the image sequence;
    若所述当前图像帧的编号位于任一图像序列的预测子序列中,所述发送端判定所述当前图像帧不是间隔刷新帧。If the number of the current image frame is in the predicted subsequence of any image sequence, the sending end determines that the current image frame is not an interval refresh frame.
  66. 根据权利要求57-63中任一项所述的视频传输方法,其特征在于,所述发送端对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送之后,返回所述对获取的当前图像帧进行编码,将编码后的当前图像帧向接收端发送的步骤继续执行,直至接收到所述接收端发送的错误反馈信息。The video transmission method according to any one of claims 57-63, wherein the sending end performs intra-frame coding on a part of the error correction refresh frame, and transmits the coded error correction refresh frame to the After the receiving end sends, the steps of encoding the acquired current image frame and sending the encoded current image frame to the receiving end are continued until the error feedback information sent by the receiving end is received.
  67. 根据权利要求57-63中任一项所述的视频传输方法,其特征在于,所述发送端对获取的当前图像帧进行编码,将编码后的当前图像帧向接收端发送之前,包括:The video transmission method according to any one of claims 57-63, wherein the sending end encodes the acquired current image frame, and before sending the encoded current image frame to the receiving end, the method comprises:
    所述发送端对一图像帧进行帧内编码,将编码后的所述图像帧向接收端发送;The sending end performs intra-frame encoding on an image frame, and sends the encoded image frame to the receiving end;
    所述发送端根据帧内编码的图像帧对所述图像帧之后的若干图像帧进行帧间编码,将编码后的图像帧向接收端发送。The sending end performs inter-frame encoding on several image frames following the image frame according to the intra-encoded image frame, and sends the encoded image frame to the receiving end.
  68. 根据权利要求57-63中任一项所述的视频传输方法,其特征在于,所述 错误反馈信息包括所述接收端响应于丢包事件的反馈信息,或者包括所述接收端响应于完整性校验错误的反馈信息。The video transmission method according to any one of claims 57-63, wherein the error feedback information includes feedback information of the receiving end in response to a packet loss event, or includes the receiving end in response to integrity Check the error feedback information.
  69. 根据权利要求68所述的视频传输方法,其特征在于,所述发送端在所述当前图像帧和/或所述当前图像帧之后的图像帧中确定预设个数的纠错刷新帧,对各所述纠错刷新帧的部分区域进行帧内编码;The video transmission method according to claim 68, wherein the sending end determines a preset number of error correction refresh frames in the current image frame and/or image frames subsequent to the current image frame, and Intra-frame coding is performed on a partial area of each of the error correction refresh frames;
    所述接收端从所述发送端接收预设个数的编码后的纠错刷新帧。The receiving end receives a preset number of coded error correction refresh frames from the sending end.
  70. 根据权利要求69所述的视频传输方法,其特征在于,所述发送端对所述纠错刷新帧的部分区域进行帧内编码,其余区域进行帧间编码;The video transmission method according to claim 69, wherein the sending end performs intra-frame coding on part of the error correction refresh frame, and performs inter-frame coding on the remaining areas;
    所述接收端对所述纠错刷新帧帧内编码的区域进行帧内解码,根据用于解码的参考数据对其余区域进行帧间解码。The receiving end performs intra-frame decoding on the area coded in the error correction refresh frame, and performs inter-frame decoding on the remaining areas according to the reference data used for decoding.
  71. 根据权利要求70所述的视频传输方法,其特征在于,所述预设个数的纠错刷新帧进行帧内编码的区域的并集等于任一纠错刷新帧帧的范围。The video transmission method according to claim 70, wherein the union of the regions where the preset number of error correction refresh frames are intra-coded is equal to the range of any error correction refresh frame.
  72. 根据权利要求70所述的视频传输方法,其特征在于,所述接收端对所述纠错刷新帧帧内编码的区域进行帧内解码,得到所述纠错刷新帧对应的刷新片段数据;The video transmission method according to claim 70, wherein the receiving end performs intra-frame decoding on the region coded in the error correction refresh frame to obtain refresh segment data corresponding to the error correction refresh frame;
    所述接收端根据所述纠错刷新帧对应的刷新片段数据刷新所述参考数据。The receiving end refreshes the reference data according to refresh segment data corresponding to the error correction refresh frame.
  73. 根据权利要求69所述的视频传输方法,其特征在于,所述发送端将以所述当前图像帧开始的预设个数的图像帧作为纠错刷新帧。The video transmission method according to claim 69, wherein the sending end uses a preset number of image frames starting from the current image frame as error correction refresh frames.
  74. 根据权利要求69所述的视频传输方法,其特征在于,所述发送端根据所述错误反馈信息确定纠错刷新帧,对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送,包括:The video transmission method according to claim 69, wherein the sending end determines an error correction refresh frame according to the error feedback information, performs intra-frame coding on a part of the error correction refresh frame, and encodes the coded Sending the error correction refresh frame to the receiving end includes:
    所述发送端将所述当前图像帧作为第一个纠错刷新帧,对所述第一个纠错刷新帧的部分区域进行帧内编码,将编码后的第一个纠错刷新帧向所述接收端发送;The sending end uses the current image frame as the first error correction refresh frame, performs intra-frame encoding on a partial area of the first error correction refresh frame, and sends the encoded first error correction refresh frame to all The receiving end sends;
    所述发送端获取下一纠错刷新帧;Acquiring the next error correction refresh frame by the sending end;
    所述发送端对所述纠错刷新帧的部分区域进行帧内编码,将编码后的所述纠错刷新帧向所述接收端发送;The sending end performs intra-frame coding on a partial area of the error correction refresh frame, and sends the coded error correction refresh frame to the receiving end;
    返回所述发送端获取下一纠错刷新帧,以及所述发送端对所述纠错刷新帧的部分区域进行帧内编码,将编码后的所述纠错刷新帧向所述接收端发送的步骤继续执行,直至最后一个纠错刷新帧编码后向所述接收端发送。Return to the sending end to obtain the next error correction refresh frame, and the sending end performs intra-frame encoding on a partial area of the error correction refresh frame, and sends the encoded error correction refresh frame to the receiving end The steps continue to be executed until the last error correction refresh frame is encoded and sent to the receiving end.
  75. [根据细则91更正 11.06.2019]
    根据权利要求74所述的视频传输方法,其特征在于,所述发送端对所述第一个纠错刷新帧的头部区域进行帧内编码;
    所述发送端将所述纠错刷新帧的前一纠错刷新帧进行帧内编码的区域后移,得到所述纠错刷新帧进行帧内编码的区域,对所述纠错刷新帧进行帧内编码的区域进行帧内编码。
    [Correct 11.06.2019 in accordance with Rule 91]
    The video transmission method according to claim 74, wherein the sending end performs intra-frame coding on the header area of the first error correction refresh frame;
    The sending end moves back the area where the previous error correction refresh frame of the error correction refresh frame is intra-coded to obtain the area where the error correction refresh frame is intra-coded, and frame the error correction refresh frame The intra-coded area is intra-coded.
  76. [根据细则91更正 11.06.2019]
    根据权利要求75所述的视频传输方法,其特征在于,所述发送端根据所述当前图像帧中条带的数量,在所述当前图像帧和/或所述当前图像帧之后的图像帧中确定相同数量的纠错刷新帧;
    所述发送端对所述第一个纠错刷新帧的第一个条带进行帧内编码;
    所述发送端将所述纠错刷新帧的前一纠错刷新帧进行帧内编码的条带序号加一,得到所述纠错刷新帧进行帧内编码的条带序号,对所述纠错刷新帧中对应于所述条带序号的条带进行帧内编码。
    [Correct 11.06.2019 in accordance with Rule 91]
    The video transmission method according to claim 75, wherein the sending end determines the number of strips in the current image frame and/or the image frame after the current image frame according to the number of stripes in the current image frame. Determine the same number of error correction refresh frames;
    The transmitting end performs intra-frame coding on the first slice of the first error correction refresh frame;
    The sending end adds one to the strip sequence number of the previous error correction refresh frame of the error correction refresh frame that is intra-coded to obtain the strip sequence number of the error correction refresh frame that is intra-coded, and corrects the error The slice corresponding to the sequence number of the slice in the refresh frame is intra-coded.
  77. [根据细则91更正 11.06.2019]
    根据权利要求74所述的视频传输方法,其特征在于,所述错误反馈信息包括区域索引信息;
    所述发送端根据所获取错误反馈信息中的区域索引信息确定所述第一个纠错刷新帧进行帧内编码的区域,对所述第一个纠错刷新帧进行帧内编码的区域进行帧内编码;
    所述发送端将所述纠错刷新帧的前一纠错刷新帧进行帧内编码的区域后移,得到所述纠错刷新帧进行帧内编码的区域,对所述纠错刷新帧进行帧内编码的区域进行帧内编码。
    [Correct 11.06.2019 in accordance with Rule 91]
    The video transmission method according to claim 74, wherein the error feedback information includes area index information;
    The sending end determines the intra-encoded area of the first error correction refresh frame according to the area index information in the obtained error feedback information, and performs intra-frame encoding on the area of the first error correction refresh frame Internal coding
    The sending end moves back the area where the previous error correction refresh frame of the error correction refresh frame is intra-coded to obtain the area where the error correction refresh frame is intra-coded, and frame the error correction refresh frame The intra-coded area is intra-coded.
  78. [根据细则91更正 11.06.2019]
    根据权利要求77所述的视频传输方法,其特征在于,若所述前一纠错刷新帧进行帧内编码的区域不在所述前一纠错刷新帧的尾部,所述发送端将所述前一纠错刷新帧进行帧内编码的区域后移,得到所述纠错刷新帧进行帧内编码的区域;
    若所述前一纠错刷新帧进行帧内编码的区域在所述前一纠错刷新帧的尾部,所述发送端将所述纠错刷新帧的头部区域确定为所述纠错刷新帧进行帧内编码的区域。
    [Correct 11.06.2019 in accordance with Rule 91]
    The video transmission method according to claim 77, wherein if the region where the previous error correction refresh frame is intra-coded is not at the end of the previous error correction refresh frame, the sending end will An area where an error correction refresh frame performs intra-frame coding is moved backward, and an area where the error correction refresh frame performs intra-frame coding is obtained;
    If the area where the previous error correction refresh frame is intra-encoded is at the end of the previous error correction refresh frame, the sending end determines the head area of the error correction refresh frame as the error correction refresh frame The area for intra-coding.
  79. [根据细则91更正 11.06.2019]
    根据权利要求77所述的视频传输方法,其特征在于,所述发送端根据所述当前图像帧中条带的数量,在所述当前图像帧和/或所述当前图像帧之后的图像帧中确定相同数量的纠错刷新帧;
    所述发送端确定所述第一个纠错刷新帧中对应于所述错误反馈信息中条带序号的条带为进行帧内编码的区域;
    若所述前一纠错刷新帧进行帧内编码的区域不在所述前一纠错刷新帧的尾部,所述发送端将所述前一纠错刷新帧进行帧内编码的条带序号加一,得到所述纠错刷新帧进行帧内编码的条带序号;
    若所述前一纠错刷新帧进行帧内编码的区域在所述前一纠错刷新帧的尾部,所述发送端将所述纠错刷新帧的第一个条带确定为所述纠错刷新帧进行帧内编码的条带。
    [Correct 11.06.2019 in accordance with Rule 91]
    The video transmission method according to claim 77, wherein the sending end uses the number of strips in the current image frame in the current image frame and/or the image frame after the current image frame. Determine the same number of error correction refresh frames;
    Determining, by the sending end, the strip corresponding to the strip number in the error feedback information in the first error correction refresh frame as an area for intra-coding;
    If the region where the previous error correction refresh frame is intra-encoded is not at the end of the previous error correction refresh frame, the sending end adds one to the strip sequence number of the previous error correction refresh frame that is intra-encoded , Obtain the strip sequence number of the error correction refresh frame for intra-encoding;
    If the area where the previous error correction refresh frame is intra-encoded is at the end of the previous error correction refresh frame, the sending end determines the first stripe of the error correction refresh frame as the error correction Refresh the frame for intra-encoded slices.
  80. 根据权利要求57-63中任一项所述的视频传输方法,其特征在于,若所述接收端接收编码后的当前图像帧时发生丢包事件,向所述发送端发送错误反馈信息。The video transmission method according to any one of claims 57-63, wherein if a packet loss event occurs when the receiving end receives the encoded current image frame, error feedback information is sent to the sending end.
  81. [根据细则91更正 11.06.2019] 
    根据权利要求80所述的视频传输方法,其特征在于,所述接收端从发送端接收对所述当前图像帧各个区域编码后的图像区域数据,解码所述当前图像帧的各图像区域数据。
    [Correct 11.06.2019 in accordance with Rule 91]
    The video transmission method according to claim 80, wherein the receiving end receives the image area data of each area of the current image frame encoded from the transmitting end, and decodes the image area data of the current image frame.
  82. [根据细则91更正 11.06.2019] 
    根据权利要求81所述的视频传输方法,其特征在于,若所述接收端未从所述发送端正确接收编码后的图像区域数据,根据所述图像区域数据生成错误反馈信息,向所述发送端发送所述错误反馈信息。
    [Correct 11.06.2019 in accordance with Rule 91]
    The video transmission method according to claim 81, wherein if the receiving end does not correctly receive the encoded image area data from the transmitting end, error feedback information is generated based on the image area data and sent to the transmitting end The terminal sends the error feedback information.
  83. [根据细则91更正 11.06.2019]
    根据权利要求82所述的视频传输方法,其特征在于,所述图像区域数据包括数据包序号;
    若所述图像区域数据的包序号与前一图像区域数据的包序号不连续,所述接收端根据所述前一图像区域数据的包序号和所述当前图像帧对应的第一个图像区域数据的数据包序号计算所述图像区域数据对应的区域索引信息;
    所述接收端生成包括所述区域索引信息的错误反馈信息。
    [Correct 11.06.2019 in accordance with Rule 91]
    The video transmission method according to claim 82, wherein the image area data includes a data packet sequence number;
    If the packet sequence number of the image area data is not continuous with the packet sequence number of the previous image area data, the receiving end uses the packet sequence number of the previous image area data and the first image area data corresponding to the current image frame Calculate the area index information corresponding to the image area data according to the data packet sequence number;
    The receiving end generates error feedback information including the area index information.
  84. [根据细则91更正 11.06.2019]
    根据权利要求82所述的视频传输方法,其特征在于,所述图像区域数据包括区域索引信息;
    若所述接收端未从所述发送端正确接收编码后的图像区域数据,生成包括所述区域索引信息的错误反馈信息。
    [Correct 11.06.2019 in accordance with Rule 91]
    The video transmission method according to claim 82, wherein the image area data includes area index information;
    If the receiving end does not correctly receive the encoded image area data from the transmitting end, generate error feedback information including the area index information.
  85. [根据细则91更正 11.06.2019]
    根据权利要求80所述的视频传输方法,其特征在于,所述图像区域数据包括编码格式信息;
    所述接收端根据所述编码格式信息对应的解码方式解码所述图像区域数据。
    [Correct 11.06.2019 in accordance with Rule 91]
    The video transmission method according to claim 80, wherein the image area data includes encoding format information;
    The receiving end decodes the image region data according to a decoding manner corresponding to the encoding format information.
  86. 根据权利要求57-63中任一项所述的视频传输方法,其特征在于,若所述接收端接收到的当前图像帧未通过完整性校验,所述接收端向所述发送端发送错误反馈信息,所述错误反馈信息包括所述当前图像帧头部区域对应的区域索引信息。The video transmission method according to any one of claims 57-63, wherein if the current image frame received by the receiving end fails the integrity check, the receiving end sends an error to the sending end Feedback information, where the error feedback information includes area index information corresponding to the header area of the current image frame.
  87. 根据权利要求57-63中任一项所述的视频传输方法,其特征在于,若所述接收端解码所述当前图像帧失败,所述接收端向所述发送端发送错误反馈信息。The video transmission method according to any one of claims 57-63, wherein if the receiving end fails to decode the current image frame, the receiving end sends error feedback information to the sending end.
  88. 根据权利要求69所述的视频传输方法,其特征在于,所述接收端从所述发送端接收预设个数的编码后的纠错刷新帧,包括:The video transmission method according to claim 69, wherein the receiving end receives a preset number of coded error correction refresh frames from the sending end, comprising:
    所述接收端从所述发送端接收编码后的图像区域数据,所述图像区域数据包括所述发送端对所述纠错刷新帧的部分区域编码后的数据,以及编码格式信息。The receiving end receives encoded image area data from the transmitting end, where the image area data includes data encoded by the transmitting end on a partial area of the error correction refresh frame, and encoding format information.
  89. [根据细则91更正 11.06.2019]
    根据权利要求88所述的视频传输方法,其特征在于:若所述图像区域数据中的编码格式信息为帧内编码,所述接收端对所述部分区域编码后的数据进行帧内解码,得到所述图像区域数据对应的刷新片段数据;
    所述接收端将所述参考数据中对应于所述部分区域的部分数据更新为所述刷新片段数据。
    [Correct 11.06.2019 in accordance with Rule 91]
    The video transmission method according to claim 88, wherein if the encoding format information in the image area data is intra-frame encoding, the receiving end performs intra-frame decoding on the partial area-encoded data to obtain Refresh segment data corresponding to the image area data;
    The receiving end updates partial data corresponding to the partial area in the reference data to the refresh fragment data.
  90. [根据细则91更正 11.06.2019]
    根据权利要求89所述的视频传输方法,其特征在于:所述图像区域数据还包括所述部分区域的区域索引信息;
    所述接收端对所述部分区域编码后的数据进行帧内解码,得到所述区域索引信息对应的刷新片段数据;
    所述接收端将所述参考数据中对应于所述区域索引信息的部分数据更新为所述刷新片段数据。
    [Correct 11.06.2019 in accordance with Rule 91]
    The video transmission method according to claim 89, wherein the image area data further includes area index information of the partial area;
    The receiving end performs intra-frame decoding on the data after the partial region encoding to obtain refresh segment data corresponding to the region index information;
    The receiving end updates part of the data corresponding to the area index information in the reference data to the refresh segment data.
  91. [根据细则91更正 11.06.2019] 
    根据权利要求89所述的视频传输方法,其特征在于,所述接收端根据所述预设个数的纠错刷新帧对应的刷新片段数据刷新所述参考数据之后,向所述发送端发送正确反馈信息。
    [Correct 11.06.2019 in accordance with Rule 91]
    The video transmission method according to claim 89, wherein the receiving end refreshes the reference data according to the refresh segment data corresponding to the preset number of error correction refresh frames, and sends the correct data to the sending end. Feedback.
  92. [根据细则91更正 11.06.2019]
    根据权利要求91所述的视频传输方法,其特征在于:若所述发送端接收到所述接收端发送的错误反馈信息,所述发送端根据所述当前图像帧确定纠错序列,所述纠错序列包括预设个数的纠错刷新帧和所述预设个数的纠错刷新帧之后的预测帧;
    所述发送端对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送之后,若接收到所述接收端在解码出所述纠错刷新帧时发送的正确反馈信息,对所述纠错序列中的预测帧进行帧间编码,将编码后的预测帧向所述接收端发送。
    [Correct 11.06.2019 in accordance with Rule 91]
    The video transmission method according to claim 91, wherein if the sending end receives error feedback information sent by the receiving end, the sending end determines an error correction sequence according to the current image frame, and the error correction sequence is The error sequence includes a preset number of error correction refresh frames and prediction frames after the preset number of error correction refresh frames;
    The sending end performs intra-frame encoding on a partial area of the error correction refresh frame, and after sending the encoded error correction refresh frame to the receiving end, if the receiving end decodes the error correction refresh The correct feedback information sent at the time of the frame, the prediction frame in the error correction sequence is inter-frame coded, and the coded prediction frame is sent to the receiving end.
  93. [根据细则91更正 11.06.2019] 
    根据权利要求92所述的视频传输方法,其特征在于:所述发送端对所述纠错序列中的预测帧进行帧间编码,将编码后的预测帧向所述接收端发送之后,返回所述发送端对获取的当前图像帧进行编码,将编码后的当前图像帧向接收端发送,所述接收端接收、解码所述当前图像帧的步骤继续执行,直至所述接收端接收所述当前图像帧出错或者解码所述当前图像帧出错,向所述发送端发送错误反馈信息。
    [Correct 11.06.2019 in accordance with Rule 91]
    The video transmission method according to claim 92, wherein the sending end performs inter-frame coding on the predicted frame in the error correction sequence, and after sending the coded predicted frame to the receiving end, it returns to the The sending end encodes the acquired current image frame, and sends the encoded current image frame to the receiving end. The steps of receiving and decoding the current image frame by the receiving end are continued until the receiving end receives the current image frame. If there is an error in the image frame or decoding the current image frame, error feedback information is sent to the sending end.
  94. 一种视频发送装置,其特征在于,所述视频发送装置包括存储器和处理器;A video sending device, characterized in that the video sending device includes a memory and a processor;
    所述存储器用于存储计算机程序;The memory is used to store computer programs;
    所述处理器,用于执行所述计算机程序并在执行所述计算机程序时,实现如下步骤:The processor is configured to execute the computer program, and when executing the computer program, implement the following steps:
    获取当前图像帧,对所述当前图像帧进行编码,将编码后的当前图像帧向接收端发送;Acquiring a current image frame, encoding the current image frame, and sending the encoded current image frame to the receiving end;
    若接收到所述接收端发送的错误反馈信息,根据所述当前图像帧确定纠错刷新帧;If error feedback information sent by the receiving end is received, determine an error correction refresh frame according to the current image frame;
    对所述纠错刷新帧的部分区域进行帧内编码,将编码后的纠错刷新帧向所述接收端发送。Perform intra-frame coding on a part of the error correction refresh frame, and send the coded error correction refresh frame to the receiving end.
  95. [根据细则91更正 11.06.2019]
    一种飞行器,其特征在于,包括:
    图像采集组件,用于采集图像;
    如权利要求94所述的视频发送装置,用于获取图像采集组件采集到的图像,编码后向接收端发送;
    飞行组件,用于飞行。
    [Correct 11.06.2019 in accordance with Rule 91]
    An aircraft, characterized in that it comprises:
    Image acquisition component, used to acquire images;
    The video sending device according to claim 94, which is used to obtain the image collected by the image collecting component, and send it to the receiving end after encoding;
    Flight components, used for flight.
  96. 一种视频接收装置,其特征在于,所述视频发送装置包括存储器和处理器;A video receiving device, characterized in that the video sending device includes a memory and a processor;
    所述存储器用于存储计算机程序;The memory is used to store computer programs;
    所述处理器,用于执行所述计算机程序并在执行所述计算机程序时,实现 如下步骤:The processor is configured to execute the computer program and, when executing the computer program, implement the following steps:
    从发送端接收编码后的当前图像帧,解码所述当前图像帧;Receiving the encoded current image frame from the sending end, and decoding the current image frame;
    若接收所述当前图像帧出错或者解码所述当前图像帧出错,向所述发送端发送错误反馈信息,接收所述发送端响应于所述错误反馈信息发送的部分区域进行帧内编码的纠错刷新帧;If there is an error in receiving the current image frame or the decoding of the current image frame, error feedback information is sent to the sending end, and the receiving end performs error correction of intra-frame coding on the partial area sent by the sending end in response to the error feedback information Refresh frame
    解码所述纠错刷新帧,根据解码结果刷新用于解码的参考数据。The error correction refresh frame is decoded, and the reference data used for decoding is refreshed according to the decoding result.
  97. [根据细则91更正 11.06.2019]
    一种视频播放设备,其特征在于,包括:
    如权利要求96所述的视频接收装置,用于从发送端接收图像,并进行解码;
    显示组件,用于显示所述视频接收装置解码出的数据。
    [Correct 11.06.2019 in accordance with Rule 91]
    A video playback device, characterized by comprising:
    The video receiving device according to claim 96, configured to receive an image from a sending end and decode it;
    The display component is used to display the data decoded by the video receiving device.
  98. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如权利要求1-31中任一项所述的视频发送方法;或者A computer-readable storage medium, characterized in that, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor realizes the method described in any one of claims 1-31. The video sending method described; or
    实现如权利要求32-56中任一项所述的视频接收方法。Implement the video receiving method according to any one of claims 32-56.
PCT/CN2019/088596 2019-05-27 2019-05-27 Video transmission method and apparatus, and aircraft, playback device, and storage medium WO2020237466A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/088596 WO2020237466A1 (en) 2019-05-27 2019-05-27 Video transmission method and apparatus, and aircraft, playback device, and storage medium
CN201980012282.8A CN111758262A (en) 2019-05-27 2019-05-27 Video transmission method and device, aircraft, playing equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/088596 WO2020237466A1 (en) 2019-05-27 2019-05-27 Video transmission method and apparatus, and aircraft, playback device, and storage medium

Publications (1)

Publication Number Publication Date
WO2020237466A1 true WO2020237466A1 (en) 2020-12-03

Family

ID=72672729

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/088596 WO2020237466A1 (en) 2019-05-27 2019-05-27 Video transmission method and apparatus, and aircraft, playback device, and storage medium

Country Status (2)

Country Link
CN (1) CN111758262A (en)
WO (1) WO2020237466A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022141121A1 (en) * 2020-12-29 2022-07-07 深圳市大疆创新科技有限公司 Image transmission method, mobile platform, remote control device, system, and storage medium
WO2022266974A1 (en) * 2021-06-24 2022-12-29 深圳市大疆创新科技有限公司 Image processing method and device, service server, and storage medium
CN114051164B (en) * 2021-11-16 2022-10-25 重庆紫光华山智安科技有限公司 Decoding abnormal code stream generation method and device, electronic equipment and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621685A (en) * 2008-07-04 2010-01-06 株式会社日立制作所 Coder and coding method
CN101983509A (en) * 2008-04-07 2011-03-02 高通股份有限公司 Video refresh adaptation algorithms responsive to error feedback
CN102209239A (en) * 2010-03-31 2011-10-05 日立民用电子株式会社 Image coding apparatus
CN104125457A (en) * 2011-01-14 2014-10-29 华为技术有限公司 Image coding and decoding method and device and image data processing method and device
US20160100181A1 (en) * 2014-10-07 2016-04-07 Socionext Inc. Image encoding apparatus, image encoding method, and image encoding program
CN106559397A (en) * 2015-09-30 2017-04-05 联芯科技有限公司 The image error restoration methods of VOLTE visual telephones, device and video engine
CN107872675A (en) * 2016-09-26 2018-04-03 联芯科技有限公司 The restorative procedure of video data based on H264 and the data terminal of transmission

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10191356A (en) * 1996-12-27 1998-07-21 Oki Electric Ind Co Ltd Image encoder
WO2018120218A1 (en) * 2016-12-30 2018-07-05 深圳市大疆创新科技有限公司 Image processing method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101983509A (en) * 2008-04-07 2011-03-02 高通股份有限公司 Video refresh adaptation algorithms responsive to error feedback
CN101621685A (en) * 2008-07-04 2010-01-06 株式会社日立制作所 Coder and coding method
CN102209239A (en) * 2010-03-31 2011-10-05 日立民用电子株式会社 Image coding apparatus
CN104125457A (en) * 2011-01-14 2014-10-29 华为技术有限公司 Image coding and decoding method and device and image data processing method and device
US20160100181A1 (en) * 2014-10-07 2016-04-07 Socionext Inc. Image encoding apparatus, image encoding method, and image encoding program
CN106559397A (en) * 2015-09-30 2017-04-05 联芯科技有限公司 The image error restoration methods of VOLTE visual telephones, device and video engine
CN107872675A (en) * 2016-09-26 2018-04-03 联芯科技有限公司 The restorative procedure of video data based on H264 and the data terminal of transmission

Also Published As

Publication number Publication date
CN111758262A (en) 2020-10-09

Similar Documents

Publication Publication Date Title
CN108141581B (en) Video coding
WO2020237466A1 (en) Video transmission method and apparatus, and aircraft, playback device, and storage medium
US10595025B2 (en) Video coding
US9681155B2 (en) Recovery from packet loss during transmission of compressed video streams
CN110784740A (en) Video processing method, device, server and readable storage medium
US8189492B2 (en) Error recovery in an audio-video multipoint control component
WO2010009637A1 (en) Method, system and equipment for evaluating video quality
CN107770538B (en) Method, device and system for detecting scene switching frame
CN110392284B (en) Video encoding method, video data processing method, video encoding apparatus, video data processing apparatus, computer device, and storage medium
US9661351B2 (en) Client side frame prediction for video streams with skipped frames
CN110430445B (en) Video synchronous playing method, device, equipment and medium
US10142644B2 (en) Decoding frames
CN110519640B (en) Video processing method, encoder, CDN server, decoder, device, and medium
CN110113610B (en) Data transmission method and device
US20120106632A1 (en) Method and apparatus for error resilient long term referencing block refresh
US20130058409A1 (en) Moving picture coding apparatus and moving picture decoding apparatus
US9467639B2 (en) Video transmission apparatus and control method for video transmission apparatus
CN108769600B (en) Desktop sharing system based on video stream frame rate adjustment and desktop sharing method thereof
JP5784823B2 (en) On-demand intra-refresh for end-to-end coded video transmission systems
CN110351576B (en) Method and system for rapidly displaying real-time video stream in industrial scene
CN114465993A (en) Video encoding method, video decoding method and apparatus, medium, and computing device
CN112929667A (en) Encoding and decoding method, device and equipment and readable storage medium
WO2021012180A1 (en) Transmission control method and device for code streams, and computer readable storage medium
JP2004254195A (en) Moving image encoding apparatus and moving image encoding method, and moving image transmission system and moving image encoding program
CN112738508A (en) Video coding method, video determining method, video processing method, server and VR terminal

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

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

Country of ref document: EP

Kind code of ref document: A1