Image processing method, apparatus, device, storage medium and program product

By determining the type of image fragments and the missing reference frames, and by adopting appropriate decoding methods, the problems of playback discontinuity and stuttering caused by image frame loss during video transmission were solved, thus improving the reliability of image decoding.

CN115842920BActive Publication Date: 2026-04-17SPREADTRUM COMMUNICATION (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SPREADTRUM COMMUNICATION (SHANGHAI) CO LTD
Filing Date
2022-11-22
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

During video transmission, the loss of the reference frame for an image frame can cause discontinuous or stuttering video playback. Existing technologies have low reliability in image decoding.

Method used

By determining the type of image patch and the absence of reference frames, different decoding methods are employed, such as utilizing already decoded image frames in the buffer or decoding image prediction units separately, to ensure successful decoding of the image patch.

Benefits of technology

It improves the success rate of image decoding, enhances the reliability of image decoding, and avoids problems such as discontinuity and stuttering in video playback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115842920B_ABST
    Figure CN115842920B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an image processing method, device, equipment, storage medium and program product. The method comprises: obtaining a first image slice to be decoded, the first image slice being an image slice in a first image frame in a video to be decoded, the first image slice comprising at least one image prediction unit; determining a slice type of the first image slice, the slice type comprising an I type, a P type and a B type; when the first image slice is of the P type or the B type, if a reference frame of the first image slice is missing, determining a missing type of the reference frame of the first image slice, the missing type being partial missing or complete missing; and decoding the first image slice according to the missing type of the reference frame of the first image slice. The reliability of decoding the image slice is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to an image processing method, apparatus, device, storage medium, and program product. Background Technology

[0002] At the video transmitting end, video compression can be performed using intra-frame compression and inter-frame compression methods. At the video receiving end, video decompression can be performed using intra-frame prediction and inter-frame prediction methods.

[0003] In inter-frame prediction methods, the current frame needs to be decoded (decompressed) based on reference frames preceding it. During video transmission, some image frames may be lost, resulting in the loss of reference frames for some of these frames. In related technologies, when a reference frame for an image frame is lost, the decoding process for that image frame is typically skipped. However, when a large number of image frames are lost, the above method may cause discontinuous or stuttering video playback. Therefore, it is evident that the reliability of image decoding in related technologies is relatively low. Summary of the Invention

[0004] This application provides an image processing method, apparatus, device, storage medium, and program product to solve the problem of low reliability in image decoding.

[0005] In a first aspect, embodiments of this application provide an image processing method, including:

[0006] Obtain a first image slice to be decoded, wherein the first image slice is an image slice in the first image frame of the video to be decoded, and the first image slice includes at least one image prediction unit;

[0007] The slice type of the first image slice is determined, and the slice type includes I type, P type and B type;

[0008] When the first image piece is of type P or type B, if the first image piece is missing a reference frame, the missing type of the reference frame of the first image piece is determined, and the missing type is partial missing or complete missing.

[0009] The first image piece is decoded based on the missing type of the reference frame of the first image piece.

[0010] In one possible implementation, the first image patch is decoded according to the missing type of the reference frame of the first image patch, including:

[0011] If the missing type of the reference frame of the first image piece is all missing, then the decoded target image frame is determined in the buffer, and the first image piece is decoded according to the target image frame.

[0012] If the missing type of the reference frame of the first image patch is partial missing, then each image prediction unit in the first image patch is decoded to achieve decoding of the first image patch.

[0013] In one possible implementation, determining the decoded target image frame in the buffer includes:

[0014] The first image sequence number (POC) of the first image frame to which the first image piece belongs is determined;

[0015] Obtain the Proof of Concept (POC) for each image frame in the cache;

[0016] Obtain the absolute value of the difference between the POC of each image frame in the cache and the first POC;

[0017] The image frame with the smallest absolute difference between the cached image and the first POC is determined as the target image frame.

[0018] In one possible implementation, decoding the first image patch based on the target image frame includes:

[0019] Determine the first position of the first image piece in the first image frame;

[0020] Based on the first position, a target image patch is determined in the target image frame;

[0021] The content in the target image piece is determined as the decoding result corresponding to the first image piece.

[0022] In one possible implementation, for any one of the first image prediction units in the first image patch, decoding processing is performed on the first image prediction unit, including:

[0023] Obtain the unit type of the first image prediction unit, wherein the unit type includes intra-frame prediction type, one-way inter-frame prediction type, and two-way inter-frame prediction type;

[0024] The first image prediction unit is decoded according to the unit type.

[0025] In one possible implementation, the unit type is the intra-frame prediction type; according to the unit type, the first image prediction unit is decoded, including:

[0026] Determine the reference image prediction unit corresponding to the first image prediction unit;

[0027] If the reference image prediction unit has a correct decoding result, then the first image prediction unit is decoded according to the correct decoding result;

[0028] If the reference image prediction unit does not have a correct decoding result, then the decoding result of the first image prediction unit is determined to be a preset decoding result, in which each pixel value is a preset value.

[0029] In one possible implementation, the unit type is the unidirectional inter-frame prediction type; according to the unit type, the first image prediction unit is subjected to decoding processing, including:

[0030] If the first image prediction unit is missing a reference frame, then the decoding result of the first image prediction unit is determined to be a preset decoding result, wherein each pixel value in the preset decoding result is a preset value;

[0031] If the first image prediction unit does not lack a reference frame, then the first image prediction result is decoded based on the reference frame.

[0032] In one possible implementation, the unit type is the bidirectional inter-frame prediction type; according to the unit type, the first image prediction unit is decoded, including:

[0033] If the first image prediction unit does not lack two reference frames, then the first image prediction unit is decoded based on the two reference frames;

[0034] If the first image prediction unit is missing a first reference frame but not missing a second reference frame, then the weight of the second reference frame is set to 1, and the first image prediction unit is decoded according to the second reference frame.

[0035] If the first image prediction unit is missing two reference frames, the decoding result of the first image prediction unit is determined to be a preset decoding result, in which each pixel value is a preset value.

[0036] In one possible implementation, the first image patch belongs to a first image frame; after decoding the first image patch according to the missing type of the reference frame of the first image patch, the process further includes:

[0037] After obtaining the decoding results of each image piece in the first image frame, the decoding results of each image piece are spliced ​​together according to the position of each image piece in the first image frame to obtain the decoded first image frame.

[0038] A second image prediction unit is determined in the first image frame, and the decoding result of the second image prediction unit is a preset decoding result;

[0039] In the first image frame, a third image prediction unit is determined that is adjacent to the second image prediction unit, and the decoding result of the third image prediction unit is not the preset decoding result;

[0040] The second image prediction unit is subjected to pixel filling processing according to the third image prediction unit to obtain the updated first image frame.

[0041] In one possible implementation, after concatenating the decoding results of each image patch according to its position in the first image frame to obtain the decoded first image frame, the process further includes:

[0042] The first image frame is marked as an error image frame, and the error image frame is not used as a reference image frame for other image frames.

[0043] Secondly, embodiments of this application provide an image processing apparatus, the apparatus comprising: an acquisition module, a first determination module, a second determination module, and a decoding processing module, wherein...

[0044] The acquisition module is used to acquire a first image slice to be decoded, wherein the first image slice is an image slice in the first image frame of the video to be decoded, and the first image slice includes at least one image prediction unit;

[0045] The first determining module is used to determine the slice type of the first image slice, wherein the slice type includes type I, type P and type B;

[0046] The second determining module is used to determine the missing type of the reference frame of the first image piece when the first image piece is of type P or type B, if the first image piece is missing a reference frame, wherein the missing type is partial missing or complete missing.

[0047] The decoding processing module is used to decode the first image piece according to the missing type of the reference frame of the first image piece.

[0048] In one possible implementation, the decoding processing module is specifically used for:

[0049] If the missing type of the reference frame of the first image piece is all missing, then the decoded target image frame is determined in the buffer, and the first image piece is decoded according to the target image frame.

[0050] If the missing type of the reference frame of the first image patch is partial missing, then each image prediction unit in the first image patch is decoded to achieve decoding of the first image patch.

[0051] In one possible implementation, the decoding processing module is specifically used for:

[0052] The first image sequence number (POC) of the first image frame to which the first image piece belongs is determined;

[0053] Obtain the Proof of Concept (POC) for each image frame in the cache;

[0054] Obtain the absolute value of the difference between the POC of each image frame in the cache and the first POC;

[0055] The image frame with the smallest absolute difference between the cached image and the first POC is determined as the target image frame.

[0056] In one possible implementation, the decoding processing module is specifically used for:

[0057] Determine the first position of the first image piece in the first image frame;

[0058] Based on the first position, a target image patch is determined in the target image frame;

[0059] The content in the target image piece is determined as the decoding result corresponding to the first image piece.

[0060] In one possible implementation, for any one of the first image prediction units in the first image patch; the decoding processing module is specifically used for:

[0061] Obtain the unit type of the first image prediction unit, wherein the unit type includes intra-frame prediction type, one-way inter-frame prediction type, and two-way inter-frame prediction type;

[0062] The first image prediction unit is decoded according to the unit type.

[0063] In one possible implementation, the unit type is the intra-frame prediction type; the decoding processing module is specifically used for:

[0064] Determine the reference image prediction unit corresponding to the first image prediction unit;

[0065] If the reference image prediction unit has a correct decoding result, then the first image prediction unit is decoded according to the correct decoding result;

[0066] If the reference image prediction unit does not have a correct decoding result, then the decoding result of the first image prediction unit is determined to be a preset decoding result, in which each pixel value is a preset value.

[0067] In one possible implementation, the unit type is the one-way inter-frame prediction type; the decoding processing module is specifically used for:

[0068] If the first image prediction unit is missing a reference frame, then the decoding result of the first image prediction unit is determined to be a preset decoding result, wherein each pixel value in the preset decoding result is a preset value;

[0069] If the first image prediction unit does not lack a reference frame, then the first image prediction result is decoded based on the reference frame.

[0070] In one possible implementation, the unit type is the bidirectional inter-frame prediction type; the decoding processing module is specifically used for:

[0071] If the first image prediction unit does not lack two reference frames, then the first image prediction unit is decoded based on the two reference frames;

[0072] If the first image prediction unit is missing a first reference frame but not missing a second reference frame, then the weight of the second reference frame is set to 1, and the first image prediction unit is decoded according to the second reference frame.

[0073] If the first image prediction unit is missing two reference frames, the decoding result of the first image prediction unit is determined to be a preset decoding result, in which each pixel value is a preset value.

[0074] In one possible implementation, the device further includes a splicing module, a third determining module, a fourth determining module, and a filling processing module, wherein,

[0075] The stitching module is used to stitch together the decoding results of each image piece in the first image frame according to the position of each image piece in the first image frame after obtaining the decoding results of each image piece in the first image frame, so as to obtain the decoded first image frame.

[0076] The third determining module is used to determine a second image prediction unit in the first image frame, wherein the decoding result of the second image prediction unit is a preset decoding result;

[0077] The fourth determining module is used to determine a third image prediction unit adjacent to the second image prediction unit in the first image frame, wherein the decoding result of the third image prediction unit is not the preset decoding result;

[0078] The filling processing module is used to perform pixel filling processing on the second image prediction unit according to the third image prediction unit to obtain the updated first image frame.

[0079] In one possible implementation, the device further includes a fifth determining module, wherein:

[0080] The fifth determining module is used to mark the first image frame as an erroneous image frame, and the erroneous image frame is not used as a reference image frame for other image frames.

[0081] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0082] The memory stores computer-executed instructions;

[0083] The processor executes computer execution instructions stored in the memory, causing the processor to perform the image processing method according to any one of the first aspects.

[0084] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the image processing method described in any of the first aspects.

[0085] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the image processing method shown in any of the first aspects.

[0086] Sixthly, embodiments of this application provide a chip on which a computer program is stored. When the computer program is executed by the chip, it implements the method as described in the first aspect.

[0087] In one possible implementation, the chip is a chip in a chip module.

[0088] This application provides an image processing method, apparatus, device, storage medium, and program product. After acquiring a first image piece to be decoded, the image piece type can be determined, including I type, P type, and B type. If the first image piece is of type P or B and a reference frame is missing, the missing type of the reference frame is determined, which can be partial or complete. The first image piece is then decoded based on the missing type of the reference frame. By decoding the first image piece according to its image piece type and the missing reference frame, the success rate of image piece decoding is high, improving the reliability of image piece decoding. Attached Figure Description

[0089] Figure 1 A schematic diagram illustrating the application scenarios provided in the embodiments of this application;

[0090] Figure 2This is a schematic diagram of the structure of an image frame provided in an embodiment of this application;

[0091] Figure 3 A schematic flowchart illustrating the image processing method provided in an embodiment of this application;

[0092] Figure 4 A schematic flowchart illustrating another image processing method provided in an embodiment of this application;

[0093] Figure 5 A schematic flowchart of another image processing method provided for an exemplary embodiment of this application;

[0094] Figure 6 A schematic flowchart of another image processing method provided for an exemplary embodiment of this application;

[0095] Figure 7 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this application;

[0096] Figure 8 This is a schematic diagram of another image processing apparatus provided in the embodiments of this application;

[0097] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0098] Figure 1 This is a schematic diagram illustrating an application scenario provided in an embodiment of this application. Please refer to [link / reference]. Figure 1 It includes a video transmitter 101 and a video receiver 102.

[0099] Before sending video to video receiver 102, video transmitter 101 compresses the video. Video transmitter 101 can compress the video using intra-frame compression or inter-frame compression to obtain the compressed video, which is then sent to video receiver 102. When compressing a specific image frame in a video using intra-frame compression, video transmitter 101 compresses the image based on the content of that image frame. When compressing a specific image frame in a video using inter-frame compression, video transmitter 101 compresses the image frame based on the content of a preceding reference image frame.

[0100] After receiving the compressed video, the video receiver 102 decompresses (decodes) each image frame in the compressed video. For any given image frame, the video receiver 102 determines the corresponding decompression (decoding) method based on the compression (encoding) method of that image frame, and then decodes the image frame according to the corresponding decoding method. For example, if the video transmitter 101 performs intra-frame compression on image frame 1, then after receiving the encoded image frame 1, the video receiver 102 uses an intra-frame prediction method to decode the encoded image frame 1.

[0101] To facilitate understanding, the following will be combined with... Figure 2 The structure of image frames in the video is explained.

[0102] Figure 2 This is a schematic diagram of the structure of an image frame provided in an embodiment of this application. Please refer to... Figure 2 An image frame comprises multiple slices, each slice comprises multiple macroblocks, and each macroblock comprises at least one pixel (not shown in the figure). When encoding an image frame in a video at the video transmitting end, each slice within the image frame is encoded separately. Similarly, when decoding an image frame at the video receiving end, each slice within the image frame needs to be decoded separately. The decoding process for each slice at the video receiving end is similar; in this embodiment, the decoding process for any single slice is used as an example for explanation.

[0103] In related technologies, when the reference frame of an image frame is lost, the decoding process for that image frame is typically skipped. However, when a large number of image frames are lost, this method may cause discontinuous or stuttering video playback. Therefore, it is clear that the reliability of image decoding in these related technologies is relatively low.

[0104] In this embodiment, after acquiring the image slice to be decoded, the slice type can be determined. Slice types include I type, P type, and B type. The image slice can be decoded based on the slice type and the missing reference frame of the image slice. In the above process, the decoding of the image slice takes into account the slice type of the image slice and the missing reference frame of the image slice, resulting in a higher success rate for decoding the image slice and improving the reliability of decoding the image slice.

[0105] The method described in this application will now be illustrated through specific embodiments. It should be noted that the following embodiments may exist independently or in combination with each other; identical or similar content will not be repeated in different embodiments.

[0106] Figure 3This is a schematic flowchart illustrating the image processing method provided in an embodiment of this application. Please refer to [link / reference]. Figure 3 The method may include:

[0107] S301. Obtain the first image slice to be decoded.

[0108] The execution subject of this application embodiment can be an electronic device or an image processing device disposed in an electronic device. The image processing device can be implemented by software or by a combination of software and hardware.

[0109] The first image slice is an image slice from the first image frame of the video to be decoded. The video to be decoded is the video to be played by the electronic device. The first image frame is the image frame to be decoded.

[0110] The video to be decoded may include multiple image frames. For example, a 1-second video may have 30 image frames.

[0111] An image frame may include at least one image slice.

[0112] The first image patch may include at least one image prediction unit. For example, the image prediction unit may be a macroblock.

[0113] An image prediction unit is a basic unit for decoding an image patch. For example, if the first image patch consists of 100*100 pixels, the image prediction unit may consist of 16*16 pixels or 8*8 pixels.

[0114] S302. Determine the type of the first image slice.

[0115] Slice types can include I type, P type and B type.

[0116] If all image prediction units in an image patch use intra-frame coding, then the patch type of that image patch is type I.

[0117] For example, assuming that the first image slice includes image prediction unit 1, image prediction unit 2 and image prediction unit 3, and image prediction units 1-3 are all intra-frame coding methods, then the slice type of the first image slice is type I.

[0118] If all image prediction units in an image patch use one-way inter-frame coding, or if some image prediction units in an image patch use one-way inter-frame coding while others use intra-frame coding, then the image patch type is P.

[0119] For example, suppose the first image slice includes image prediction unit 1, image prediction unit 2 and image prediction unit 3, image prediction unit 1 is an intra-frame coding method, and image prediction unit 2 and image prediction unit 3 are unidirectional inter-frame coding methods, then the slice type of the first image slice is P type.

[0120] If all image prediction units in an image patch use bidirectional inter-frame coding, or if some image prediction units in an image patch use bidirectional inter-frame coding while others use intra-frame coding and / or unidirectional inter-frame coding, then the image patch type is B.

[0121] For example, suppose the first image patch includes image prediction unit 1, image prediction unit 2 and image prediction unit 3, image prediction unit 1 is an intra-frame coding method, image prediction unit 2 is a bidirectional inter-frame coding method, and image prediction unit 3 is a unidirectional inter-frame coding method, then the patch type of the first image patch is type B.

[0122] S303. When the first image piece is of type P or type B, if the first image piece is missing a reference frame, then determine the missing type of the reference frame of the first image piece.

[0123] The missing type can be a partially missing type or a completely missing type.

[0124] If some image prediction units of the first image patch have reference frames, and some image prediction units lack reference frames, then the missing reference frame type of the first image patch is the partial missing type.

[0125] For example, suppose the first image slice 1 is of type P and has three image prediction units: image prediction unit 1, image prediction unit 2 and image prediction unit 3. Image prediction unit 1 is an intra-frame prediction, while image prediction unit 2 and image prediction unit 3 are unidirectional intra-inter-frame predictions. Image prediction unit 2 is missing a reference frame, while image prediction unit 3 is missing a reference frame. Therefore, the missing reference frame type of the first image slice 1 is a partial missing type.

[0126] If all image prediction units of the first image patch are missing reference frames, then the missing type of the reference frames of the first image patch is the "all missing" type.

[0127] For example, suppose the first image patch 2 is of type P and has three image prediction units: image prediction unit 1, image prediction unit 2 and image prediction unit 3. Image prediction unit 1 is an intra-frame prediction, and image prediction unit 2 and image prediction unit 3 are unidirectional inter-frame predictions. The reference frames corresponding to image prediction unit 2 and image prediction unit 3 are missing. Then the missing type of the reference frames of the first image patch 2 is the complete missing type.

[0128] S304. Decode the first image slice according to the missing type of the reference frame of the first image slice.

[0129] The first image slice can be decoded in the following way: if the missing type of the reference frame of the first image slice is complete missing, then the decoded target image frame is determined in the buffer, and the first image slice is decoded according to the target image frame; if the missing type of the reference frame of the first image slice is partial missing, then each image prediction unit in the first image slice is decoded respectively, so as to realize the decoding of the first image slice.

[0130] For example, assuming that the missing type of the reference frame of the first image piece is all missing, the target image frame 1 that has been decoded can be determined, and the first image piece 1 can be decoded based on the target image frame 1.

[0131] For example, assuming that the missing type of the reference frame of the first image slice 2 is a partial missing type, the first image slice 2 has a total of 3 image prediction units, namely image prediction unit 1, image prediction unit 2 and image prediction unit 3. Image prediction unit 1 is missing a reference frame, while the reference frames of image prediction unit 2 and image prediction unit 3 exist. Then, the 3 image prediction units can be decoded separately.

[0132] The image processing method provided in this application, after acquiring a first image piece to be decoded, can determine the piece type of the first image piece, which includes type I, type P, and type B. When the first image piece is type P or type B, if the first image piece is missing a reference frame, the missing type of the reference frame is determined, which can be partial or complete. Based on the missing type of the reference frame, the first image piece is decoded. In the above process, decoding is performed on the first image piece based on its piece type and the missing status of its reference frame, resulting in a higher success rate for image piece decoding and improving the reliability of image piece decoding.

[0133] Based on any of the above embodiments, the following, in conjunction with Figure 4 The image processing method shown in the embodiments of this application will be further described in detail.

[0134] Figure 4 This is a schematic flowchart illustrating the image processing method provided in an embodiment of this application. Please refer to [link / reference]. Figure 4 The method may include:

[0135] S401. Obtain the first image slice to be decoded.

[0136] S402. Determine the type of the first image slice.

[0137] S403. When the first image piece is of type P or type B, if the first image piece is missing a reference frame, then determine the missing type of the reference frame of the first image piece.

[0138] The execution process of S401-S403 can be found in the execution process of S301-S303, and will not be repeated here.

[0139] S404. If the missing type of the reference frame of the first image slice is all missing, then the decoded target image frame is determined in the buffer, and the first image slice is decoded according to the target image frame.

[0140] For example, assuming that the missing type of the reference frame of the first image piece 1 is all missing, and the decoded image frames include image frame 1, image frame 2 and image frame 3, and assuming that image frame 3 is the target image frame, the first image piece 1 can be decoded based on image frame 3.

[0141] S405. If the missing type of the reference frame of the first image slice is partial missing, then each image prediction unit in the first image slice is decoded to realize the decoding process of the first image slice.

[0142] For example, assuming that the missing type of the reference frame of the first image slice 2 is partial missing, the first image slice 2 has a total of 3 image prediction units, namely image prediction unit 1, image prediction unit 2 and image prediction unit 3. Image prediction unit 1 is an inter-frame coding method and does not lack a reference frame. Image prediction unit 2 and image prediction unit 3 are inter-frame coding methods and lack a reference frame. Then, image prediction unit 1, image prediction unit 2 and image prediction unit 3 are decoded respectively.

[0143] S406. If the first image piece belongs to the first image frame, obtain the decoding results of each image piece in the first image frame.

[0144] By repeating the process from S401 to S405, the decoding results of each image piece in the first image frame can be obtained.

[0145] For example, assuming the first image frame includes two image slices, namely image slice 1 and image slice 2, image slice 1 can be decoded according to the process of S401-S405 to obtain decoding result 1, and image slice 2 can be decoded according to the process of S401-S405 to obtain decoding result 2.

[0146] S407. Based on the position of each image piece in the first image frame, the decoding results of each image piece are spliced ​​together to obtain the decoded first image frame.

[0147] For example, suppose the first image frame includes two image pieces, namely image piece 1 and image piece 2. The decoding result of image piece 1 is decoding result 1, and the decoding result of image piece 2 is decoding result 2. The position of image piece 1 is position 1, and the position of image piece 2 is position 2. Then, the decoding results of image piece 1 and image piece 2 can be spliced ​​together according to position 1 and position 2 to obtain the decoded first image frame.

[0148] S408. Determine the second image prediction unit in the first image frame.

[0149] The decoding result of the second image prediction unit is a preset decoding result.

[0150] For example, suppose the first image frame includes two image slices, namely image slice 1 and image slice 2. Suppose that the decoding result of image prediction unit 1 in image slice 1 is a preset decoding result, then image prediction unit 1 is determined to be the second image prediction unit.

[0151] S409. Determine a third image prediction unit adjacent to the second image prediction unit in the first image frame.

[0152] The decoding result of the third image prediction unit is not the preset decoding result.

[0153] S410. According to the third image prediction unit, the second image prediction unit is subjected to pixel filling processing to obtain the updated first image frame.

[0154] The second image prediction unit can be pixel-filled in the following way: determine the mask of the first image frame based on the third image prediction unit and the second image prediction unit; and perform pixel-filling on the second image prediction unit based on the mask and the third image prediction unit.

[0155] The mask has the same number of pixels as the image frame. The positions in the image frame with the preset decoding result can be determined, and the pixel values ​​at the corresponding positions in the mask are set to 1, while the pixel values ​​at the remaining positions in the mask are set to 0.

[0156] For example, suppose the image frame is 32*32 pixels, including four 16*16 pixel image prediction units, namely image prediction unit 1, image prediction unit 2, image prediction unit 3, and image prediction unit 4. The position of image prediction unit 1 is position 1, the position of image prediction unit 2 is position 2, the position of image prediction unit 3 is position 3, and the position of image prediction unit 4 is position 4. Assuming that image prediction unit 1 is the preset decoding result, and image prediction units 2-4 are non-preset decoding results, then the mask can be determined to be 32*32 pixels, the pixel value of position 1 is 1, and the pixel values ​​of positions 2-4 are 0.

[0157] The second image prediction unit can be filled using an image filling algorithm. Image filling algorithms can include traditional methods and deep learning methods.

[0158] The image filling algorithm can determine the filling pixel information of the second image prediction unit based on the third image prediction unit. After determining the filling information, the image filling algorithm can perform filling processing on the second image prediction unit according to the mask to obtain the updated first image frame.

[0159] S411. Mark the first image frame as an error image frame. The error image frame shall not be used as a reference image frame for other image frames.

[0160] Optionally, if the first image frame is marked as an erroneous image frame, then the first image frame cannot be used as a reference frame for other image frames.

[0161] For example, suppose image frame 1 is marked as an error image frame, and during the encoding process, image frame 1 is the reference frame for image frame 2. Then, when decoding image frame 2, since image frame 1 is marked as an error image frame, it cannot be used as the parameter frame for image frame 2.

[0162] exist Figure 4 In the illustrated embodiment, image patches can be decoded based on their patch type and the type of missing reference frames, and erroneous image frames can be marked. This results in a higher success rate for image patch decoding and improves the reliability of image patch decoding. Furthermore, erroneous image frames can be marked to prevent them from being used as reference frames for other image frames, thus avoiding the accumulation of errors.

[0163] exist Figure 4 Based on the illustrated embodiment, the following, in conjunction with Figure 5 The above 404 steps will be explained in further detail.

[0164] Figure 5 A schematic flowchart illustrating another image processing method provided for an exemplary embodiment of this application. Please refer to... Figure 5 The method may include:

[0165] S501. Determine the first POC of the first image frame to which the first image piece belongs.

[0166] The Picture Order Count (POC) is a number used to sequence image frames. For example, during video playback, the POC of an image frame can be used to guide the playback.

[0167] S502, Obtain the POC of each image frame in the cache.

[0168] The image frames in the buffer are those that have already been decoded.

[0169] For example, assuming there are three decoded image frames in the buffer, namely image frame 1, image frame 2 and image frame 3, then the POC1 corresponding to image frame 1, the POC2 corresponding to image frame 2 and the POC3 corresponding to image frame 3 can be obtained.

[0170] For example, the POC for each image frame in the cache can be obtained as shown in Table 1.

[0171] Table 1

[0172] Image Frame 1 POC1 Image frame 2 POC2 Image frame 3 POC3 …… ……

[0173] S503. Obtain the absolute value of the difference between the POC of each image frame in the buffer and the first POC.

[0174] For example, assuming that the buffer contains POC1 of image frame 1 is 4, POC2 of image frame 2 is 3, POC3 of image frame 3 is 2, and the first POC is 5, then the absolute value of the difference between image frame 1 and the first POC is 1, the absolute value of the difference between image frame 2 and the first POC is 2, and the absolute value of the difference between image frame 3 and the first POC is 3.

[0175] For example, the absolute value of the difference between the POC of each image frame and the first POC can be shown in Table 2.

[0176] Table 2

[0177] Image Frame POC First image frame absolute value of the difference Image Frame 1 POC1 First POC X1 Image frame 2 POC2 First POC X2 Image frame 3 POC3 First POC X3 …… …… …… ……

[0178] S504. The image frame with the smallest absolute value of the difference between the buffer and the first POC is determined as the target image frame.

[0179] For example, assuming the absolute value of the difference between image frame 1 and the first POC is 2, the absolute value of the difference between image frame 2 and the first POC is 3, and the absolute value of the difference between image frame 3 and the first POC is 3, then image frame 1 is determined as the target image frame.

[0180] S505. Determine the first position of the first image piece in the first image frame.

[0181] For example, suppose the first image frame includes three image pieces: image piece 1, image piece 2, and image piece 3. Image piece 1 is located at position 1, image piece 2 at position 2, and image piece 3 at position 3. If the first image piece is image piece 2, then the first position of the first image piece can be determined to be position 2.

[0182] S506. Determine the target image piece in the target image frame according to the first position.

[0183] For example, assuming the first image patch contains 8*8 pixels and the first position is position 1, then the 8*8 pixels at position 1 in the target image frame are determined as the target image patch.

[0184] S507. The content in the target image slice is determined as the decoding result corresponding to the first image slice.

[0185] exist Figure 5 In the illustrated embodiment, if the missing type of the reference frame for the first image patch is "completely missing," the first Proof of Concept (POC) of the first image frame to which the first image patch belongs is determined. The POCs of each image frame in the cache are obtained, and the image frame with the smallest absolute difference between its cached POC and the first POC is determined as the target image frame. The first position of the first image patch within the first image frame is determined. Based on the first position, the target image patch is located within the target image frame, and the content of the target image patch is determined as the decoding result corresponding to the first image patch. In the above process, after determining the target image frame based on the first POC of the first image frame, the decoding result of the first image patch is determined within the target image frame based on its first position within the first image frame. This results in a higher success rate for decoding the image patch and improves the reliability of decoding the image patch.

[0186] exist Figure 4 Based on the illustrated embodiment, the following, in conjunction with Figure 6 The above 405 steps will be explained in further detail.

[0187] Figure 6 A schematic flowchart illustrating another image processing method provided for an exemplary embodiment of this application. Please refer to... Figure 6 The method may include:

[0188] S601. For any first image prediction unit in the first image slice, obtain the unit type of the first image prediction unit.

[0189] The unit types of image prediction units can include intra-frame prediction type, one-way inter-frame prediction type, and two-way inter-frame prediction type.

[0190] S602. If the unit type is intra-frame prediction type, determine the reference image prediction unit corresponding to the first image prediction unit.

[0191] The reference image prediction unit can be determined in the image frame to be decoded where the first image prediction unit is located.

[0192] For example, suppose image frame 1 includes three image prediction units: image prediction unit 1, image prediction unit 2, and image prediction unit 3. Assuming that image prediction unit 1 is an intra-frame prediction type, then the reference image prediction unit for image prediction unit 1 can be determined in image prediction unit 2 and image prediction unit 3.

[0193] S603. If the reference image prediction unit has a correct decoding result, then the first image prediction unit is decoded according to the correct decoding result.

[0194] The reference image prediction unit is an image prediction unit that has already been decoded, and the decoding result of the reference image prediction unit is either a correct decoding result or an incorrect decoding result.

[0195] For example, suppose the reference image prediction unit is an inter-frame prediction and the reference frame of the reference image prediction unit is not missing. In this case, the reference image prediction unit is decoded based on its reference frame. Therefore, it can be determined that the decoding result of the reference image prediction unit is a correct decoding result, that is, the reference image prediction unit has a correct decoding result.

[0196] For example, suppose the reference image prediction unit is an inter-frame prediction and the reference frame of the reference image prediction unit is missing. In this case, since the reference image prediction unit is encoded based on its reference frame during the encoding stage, but cannot be decoded based on its reference frame during the decoding stage, the decoding result of the reference image prediction unit is an incorrect decoding result, that is, the reference image prediction unit does not have a correct decoding result.

[0197] S604. If the reference image prediction unit does not have a correct decoding result, then the decoding result of the first image prediction unit is determined to be the preset decoding result.

[0198] The number of pixels included in the preset decoding result is the same as the number of pixels included in the first image prediction unit, and the pixel values ​​in the preset decoding result can be preset values. For example, assuming the preset value is 0, and the first image prediction unit includes 8*8 pixels, then the preset decoding result includes 8*8 pixels, and the value of each pixel is 0.

[0199] S605. If the unit type is unidirectional inter-frame prediction type, and if the first image prediction unit is missing a reference frame, then the decoding result of the first image prediction unit is determined to be the preset decoding result.

[0200] The preset decoding result in S605 is similar to the preset decoding result in S604, and will not be described again here.

[0201] S606. If the first image prediction unit does not lack a reference frame, then the first image prediction unit is decoded according to the reference frame.

[0202] For example, assuming that the first image prediction unit does not lack a reference frame, the first image prediction unit 1 can obtain the decoding result of the first image prediction unit by using unidirectional inter-frame prediction based on the reference frame.

[0203] S607. If the unit type is bidirectional inter-frame prediction type, and if the first image prediction unit is not missing two reference frames, then the first image prediction unit is decoded based on the two reference frames.

[0204] The first image prediction unit can be decoded as follows: determine the weights of the two reference frames; and determine the decoding result of the first image prediction unit based on the weights of the two reference frames and the pixel values ​​at the corresponding positions of the reference frames.

[0205] For example, assuming the unit type of the first image prediction unit is bidirectional inter-frame prediction, the two reference frames of the first image prediction unit are reference frame 1 and reference frame 2, the first image prediction unit includes 8*8 pixels, the position of the first image prediction unit in the first image frame is position 1, and the weights of reference frame 1 and reference frame 2 are both 0.5, then the decoding result of the first image prediction unit can be determined based on the 8*8 pixels at position 1 in reference frame 1 and the 8*8 pixels at position 1 in reference frame 2.

[0206] S608. If the first image prediction unit is missing a first reference frame but not missing a second reference frame, then the weight of the second reference frame is set to 1, and the first image prediction unit is decoded according to the second reference frame.

[0207] For example, assuming that the unit type of the first image prediction unit 2 is bidirectional inter-frame prediction, and the two reference frames of the first image prediction unit are reference frame 1 and reference frame 2, wherein reference frame 1 is not missing and reference frame 2 is missing, the first image prediction unit 2 includes 8*8 pixels, and the position of the first image prediction unit in the first image frame is position 2, then the weight of reference frame 1 can be set to 1, the weight of reference frame 2 can be set to 0, and the decoding result of the first image prediction unit can be determined based on the 8*8 pixels at position 1 in reference frame 2.

[0208] S609. If the first image prediction unit is missing two reference frames, the decoding result of the first image prediction unit is determined to be the preset decoding result.

[0209] The preset decoding result in S609 is similar to the preset decoding result in S604, and will not be described again here.

[0210] The image processing method provided in this application embodiment, if the missing type of the reference frame of the first image patch is partial missing, obtains the unit type of any first image prediction unit in the first image patch. If the unit type is intra-frame prediction, the reference image prediction unit corresponding to the first image prediction unit is determined, and the first image prediction unit is decoded according to the decoding status of the reference image prediction unit. If the unit type is unidirectional inter-frame prediction, the decoding result of the first image prediction unit is determined according to the missing reference frame of the first image prediction unit. If the unit type is bidirectional inter-frame prediction, the decoding result of the first image prediction unit is determined according to the missing reference frame of the first image prediction unit. In the above process, the image patch can be decoded according to the unit type of the image prediction unit, resulting in a higher success rate for decoding the image patch and improving the reliability of decoding the image patch.

[0211] Figure 7 This is a schematic diagram of the structure of an image processing apparatus 10 provided in an embodiment of this disclosure. Please refer to... Figure 7 The image processing device may include an acquisition module 11, a first determination module 12, a second determination module 13, and a decoding processing module 14, wherein...

[0212] The acquisition module 11 is used to acquire a first image slice to be decoded, wherein the first image slice is an image slice in the first image frame of the video to be decoded, and the first image slice includes at least one image prediction unit;

[0213] The first determining module 12 is used to determine the slice type of the first image slice, which includes I type, P type and B type;

[0214] The second determining module 13 is used to determine the missing type of the reference frame of the first image piece when the first image piece is of type P or type B, if the first image piece is missing a reference frame, and the missing type is partial missing or complete missing.

[0215] The decoding processing module 14 is used to perform decoding processing on the first image slice according to the missing type of the reference frame of the first image slice.

[0216] The image processing apparatus provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0217] In one possible implementation, the decoding processing module 14 is specifically used for:

[0218] If the missing type of the reference frame of the first image piece is all missing, then the decoded target image frame is determined in the buffer, and the first image piece is decoded according to the target image frame.

[0219] If the missing type of the reference frame of the first image slice is partial missing, then each image prediction unit in the first image slice is decoded to achieve decoding of the first image slice.

[0220] In one possible implementation, the decoding processing module 14 is specifically used for:

[0221] Determine the first image sequence number (POC) of the first image frame to which the first image piece belongs;

[0222] Retrieve the Proof of Concept (POC) for each image frame in the cache;

[0223] Get the absolute value of the difference between the POC of each image frame in the cache and the first POC;

[0224] The image frame with the smallest absolute difference from the first POC in the cache is determined as the target image frame.

[0225] In one possible implementation, the decoding processing module 14 is specifically used for:

[0226] Determine the first position of the first image piece in the first image frame;

[0227] Based on the first position, determine the target image patch in the target image frame;

[0228] The content in the target image slice is determined as the decoding result corresponding to the first image slice.

[0229] In one possible implementation, for any one of the first image prediction units in the first image patch; the decoding processing module 14 is specifically used for:

[0230] Obtain the unit type of the first image prediction unit, which includes intra-frame prediction type, one-way inter-frame prediction type, and two-way inter-frame prediction type;

[0231] The first image prediction unit is decoded according to its unit type.

[0232] In one possible implementation, the unit type is intra-prediction type; the decoding processing module 14 is specifically used for:

[0233] Determine the reference image prediction unit corresponding to the first image prediction unit;

[0234] If the reference image prediction unit has a correct decoding result, then the first image prediction unit is decoded according to the correct decoding result;

[0235] If the reference image prediction unit does not have a correct decoding result, the decoding result of the first image prediction unit is determined to be the preset decoding result, and the pixel values ​​in the preset decoding result are preset values.

[0236] In one possible implementation, the unit type is a one-way inter-frame prediction type; the decoding processing module 14 is specifically used for:

[0237] If the first image prediction unit is missing a reference frame, the decoding result of the first image prediction unit is determined to be a preset decoding result, and the pixel values ​​in the preset decoding result are preset values.

[0238] If the first image prediction unit does not lack a reference frame, the first image prediction result is decoded based on the reference frame.

[0239] In one possible implementation, the unit type is a bidirectional inter-frame prediction type; the decoding processing module 14 is specifically used for:

[0240] If the first image prediction unit does not lack two reference frames, then the first image prediction unit is decoded based on the two reference frames;

[0241] If the first image prediction unit is missing the first reference frame but not the second reference frame, then the weight of the second reference frame is set to 1, and the first image prediction unit is decoded according to the second reference frame.

[0242] If the first image prediction unit is missing two reference frames, the decoding result of the first image prediction unit is determined to be the preset decoding result, and the pixel values ​​in the preset decoding result are preset values.

[0243] Figure 8 This is a schematic diagram of another image processing apparatus provided in an embodiment of this disclosure. Figure 7 Based on the illustrated embodiments, please refer to Figure 7 The image processing device 10 also includes a stitching module 15, a third determining module 16, a fourth determining module 17, and a filling processing module 18, wherein...

[0244] The splicing module 15 is specifically used to, after obtaining the decoding results of each image piece in the first image frame, splice the decoding results of each image piece according to the position of each image piece in the first image frame to obtain the decoded first image frame.

[0245] The third determining module 16 is specifically used to determine the second image prediction unit in the first image frame, wherein the decoding result of the second image prediction unit is a preset decoding result;

[0246] The fourth determining module 17 is specifically used to determine the third image prediction unit adjacent to the second image prediction unit in the first image frame, wherein the decoding result of the third image prediction unit is not the preset decoding result.

[0247] The filling processing module 18 is specifically used to perform pixel filling processing on the second image prediction unit according to the third image prediction unit to obtain the updated first image frame.

[0248] In one possible implementation, the device further includes a fifth determining module 19, wherein:

[0249] The fifth determining module 19 is specifically used to mark the first image frame as an erroneous image frame, and the erroneous image frame is not used as a reference image frame for other image frames.

[0250] The image processing apparatus provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0251] This application provides a schematic diagram of the structure of an electronic device. Please refer to [link / reference]. Figure 9 The electronic device 20 may include a processor 21 and a memory 22. Exemplarily, the processor 21 and the memory 22 are interconnected via a bus 23.

[0252] Memory 22 stores instructions executed by the computer;

[0253] The processor 21 executes computer execution instructions stored in the memory 22, causing the processor 21 to perform the image processing method as shown in the above method embodiment.

[0254] Electronic devices can include chips, modules, integrated development environments (IDEs), etc.

[0255] Figure 9 The electronic device 20 shown in the embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0256] Accordingly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the image processing method of the above-described method embodiments.

[0257] Accordingly, embodiments of this application may also provide a computer program product, including a computer program, which, when executed by a processor, can implement the image processing method shown in the above method embodiments.

[0258] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0259] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0260] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0261] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0262] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0263] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0264] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0265] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0266] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. An image processing method, characterized by, include: A first image slice to be decoded is obtained, wherein the first image slice is an image slice in the first image frame of the video to be decoded, and the first image slice includes at least one image prediction unit; wherein, the image slice is a sub-unit that can be independently decoded within the image frame; The slice type of the first image slice is determined, and the slice type includes type I, type P, and type B; wherein, each image prediction unit of the type I image slice adopts an intra-frame coding method, each image prediction unit of the type P image slice adopts a one-way inter-frame coding method, or some image prediction units adopt a one-way inter-frame coding method and others adopt an intra-frame coding method, each image prediction unit of the type B image slice adopts a two-way inter-frame coding method, or some image prediction units in the image slice adopt a two-way inter-frame coding method and others adopt an intra-frame coding method and / or a one-way inter-frame coding method; When the first image piece is of type P or type B, if the first image piece is missing a reference frame, the missing type of the reference frame of the first image piece is determined, and the missing type is partial missing or complete missing. The first image piece is decoded according to the missing type of the reference frame of the first image piece; The first image patch is decoded according to the missing type of the reference frame of the first image patch, including: if the missing type of the reference frame of the first image patch is completely missing, then the decoded target image frame is determined in the buffer, and the first image patch is decoded according to the target image frame; if the missing type of the reference frame of the first image patch is partially missing, then each image prediction unit in the first image patch is decoded respectively, so as to realize the decoding of the first image patch.

2. The method of claim 1, wherein, Determine the decoded target image frame in the buffer, including: The first image sequence number (POC) of the first image frame to which the first image piece belongs is determined; Obtain the Proof of Concept (POC) for each image frame in the cache; Obtain the absolute value of the difference between the POC of each image frame in the cache and the first POC; The image frame with the smallest absolute difference between the cached image and the first POC is determined as the target image frame.

3. The method of claim 1, wherein, Decoding the first image patch based on the target image frame includes: Determine the first position of the first image piece in the first image frame; Based on the first position, a target image patch is determined in the target image frame; The content in the target image piece is determined as the decoding result corresponding to the first image piece.

4. The method of claim 1, wherein, For any one of the first image prediction units in the first image patch; perform decoding processing on the first image prediction unit, including: Obtain the unit type of the first image prediction unit, wherein the unit type includes intra-frame prediction type, one-way inter-frame prediction type, and two-way inter-frame prediction type; The first image prediction unit is decoded according to the unit type.

5. The method of claim 4, wherein, The unit type is the intra-frame prediction type; according to the unit type, the first image prediction unit is decoded, including: Determine the reference image prediction unit corresponding to the first image prediction unit; If the reference image prediction unit has a correct decoding result, then the first image prediction unit is decoded according to the correct decoding result; If the reference image prediction unit does not have a correct decoding result, then the decoding result of the first image prediction unit is determined to be a preset decoding result, in which each pixel value is a preset value.

6. The method of claim 4, wherein, The unit type is the one-way inter-frame prediction type; according to the unit type, the first image prediction unit is decoded, including: If the first image prediction unit is missing a reference frame, then the decoding result of the first image prediction unit is determined to be a preset decoding result, wherein each pixel value in the preset decoding result is a preset value; If the first image prediction unit does not lack a reference frame, then the first image prediction result is decoded based on the reference frame.

7. The method of claim 4, wherein, The unit type is the bidirectional inter-frame prediction type; according to the unit type, the first image prediction unit is decoded, including: If the first image prediction unit does not lack two reference frames, then the first image prediction unit is decoded based on the two reference frames; If the first image prediction unit is missing a first reference frame but not missing a second reference frame, then the weight of the second reference frame is set to 1, and the first image prediction unit is decoded according to the second reference frame. If the first image prediction unit is missing two reference frames, the decoding result of the first image prediction unit is determined to be a preset decoding result, in which each pixel value is a preset value.

8. The method according to any one of claims 1 to 7, characterized in that, The first image patch belongs to the first image frame; after decoding the first image patch according to the missing type of the reference frame of the first image patch, the process further includes: After obtaining the decoding results of each image piece in the first image frame, the decoding results of each image piece are spliced ​​together according to the position of each image piece in the first image frame to obtain the decoded first image frame. A second image prediction unit is determined in the first image frame, and the decoding result of the second image prediction unit is a preset decoding result; In the first image frame, a third image prediction unit is determined that is adjacent to the second image prediction unit, and the decoding result of the third image prediction unit is not the preset decoding result; The second image prediction unit is subjected to pixel filling processing according to the third image prediction unit to obtain the updated first image frame.

9. The method of claim 8, wherein, Based on the position of each image piece in the first image frame, the decoding results of each image piece are concatenated to obtain the decoded first image frame. The process further includes: The first image frame is marked as an error image frame, and the error image frame is not used as a reference image frame for other image frames.

10. An image processing apparatus characterized by comprising: The device includes: an acquisition module, a first determination module, a second determination module, and a decoding processing module, wherein, The acquisition module is used to acquire a first image slice to be decoded, wherein the first image slice is an image slice in a first image frame in the video to be decoded, and the first image slice includes at least one image prediction unit; wherein the image slice is a sub-unit that can be independently decoded within the image frame; The first determining module is used to determine the slice type of the first image slice, wherein the slice type includes type I, type P, and type B; wherein, each image prediction unit of the type I image slice adopts an intra-frame coding method, each image prediction unit of the type P image slice adopts a one-way inter-frame coding method, or some image prediction units adopt a one-way inter-frame coding method and other image prediction units adopt an intra-frame coding method, each image prediction unit of the type B image slice adopts a two-way inter-frame coding method, or, some image prediction units in the image slice adopt a two-way inter-frame coding method and other image prediction units adopt an intra-frame coding method and / or a one-way inter-frame coding method; The second determining module is used to determine the missing type of the reference frame of the first image piece when the first image piece is of type P or type B, if the first image piece is missing a reference frame, wherein the missing type is partial missing or complete missing. The decoding processing module is used to decode the first image piece according to the missing type of the reference frame of the first image piece; The decoding processing module is specifically used for: if the missing type of the reference frame of the first image piece is completely missing, then determining the decoded target image frame in the cache, and performing decoding processing on the first image piece according to the target image frame; if the missing type of the reference frame of the first image piece is partially missing, then performing decoding processing on each image prediction unit in the first image piece respectively, so as to realize the decoding processing of the first image piece.

11. An electronic device, comprising: include: Memory and processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the image processing method as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the image processing method according to any one of claims 1 to 9.

13. A computer program product comprising a computer program that, when executed by a processor, implements the image processing method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • method and device for video sequence decoding with error concealment

    US20100303154A1

  • Efficient initialization of a reference frame of a bi-predicted / predicted video frame during decoding thereof

    US20140328402A1