WO2020107268A1 - Gdr码流编码方法、终端设备、机器可读存储介质 - Google Patents

Gdr码流编码方法、终端设备、机器可读存储介质 Download PDF

Info

Publication number
WO2020107268A1
WO2020107268A1 PCT/CN2018/117971 CN2018117971W WO2020107268A1 WO 2020107268 A1 WO2020107268 A1 WO 2020107268A1 CN 2018117971 W CN2018117971 W CN 2018117971W WO 2020107268 A1 WO2020107268 A1 WO 2020107268A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame
code stream
gdr
group
image
Prior art date
Application number
PCT/CN2018/117971
Other languages
English (en)
French (fr)
Inventor
李菊梅
Original Assignee
深圳市大疆创新科技有限公司
大疆互娱科技(北京)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司, 大疆互娱科技(北京)有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2018/117971 priority Critical patent/WO2020107268A1/zh
Priority to CN201880068425.2A priority patent/CN111279694A/zh
Publication of WO2020107268A1 publication Critical patent/WO2020107268A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/115Selection of the code volume for a coding unit prior to coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • Embodiments of the present invention relate to the field of control technology, and in particular, to a GDR code stream encoding method, terminal device, and machine-readable storage medium.
  • the terminal device decodes the GDR stream to realize local playback.
  • the terminal device also needs to save the GDR code stream to the local memory, which requires re-encoding the decoded image frame and save the encoded code stream locally, that is, the process of encoding the GDR code stream by the terminal device includes Frame-by-frame decoding -> coding, but the efficiency of frame-by-frame coding is low.
  • Embodiments of the present invention provide a GDR code stream encoding method, terminal device, and machine-readable storage medium.
  • an embodiment of the present invention provides a GDR code stream encoding method, including:
  • the preset number is 44, and the preset number of frames of each coding group includes 4 P frames containing I slices and 40 ordinary P frames in the GDR code stream.
  • encoding into a coding group using the GDR code stream includes:
  • the frame between the last normal P frame in the image code stream group and the last normal P frame in the subsequent image code stream group is used as a subsequent frame of the first frame of the coding group, and copied to the coding group.
  • dividing an image code stream group includes: taking the first P frame containing the I slice of the GDR code stream as the first frame, and then three P frames containing the I slice and 41 ordinary P frames as The subsequent frames of the first frame form an image code stream group.
  • it also includes:
  • the GDR stream before the first frame after encoding is discarded.
  • obtaining the last ordinary P frame in the image code stream group includes:
  • encoding the last ordinary P frame into an I frame includes:
  • the last ordinary P frame is encoded as an I frame.
  • the designated location is a buffer of the terminal device
  • the reference image frame is an image frame formed by the terminal device decoding the GDR code stream before the last ordinary P frame.
  • it also includes:
  • the first frame is repaired using P frames including the I slice after the first frame.
  • an embodiment of the present invention provides a terminal device, including a processor and a memory storing processor-executable instructions.
  • the processor may read the executable instructions from the memory to implement:
  • the preset number is 44, and the preset number of frames of each coding group includes 4 P frames containing I slices and 40 ordinary P frames in the GDR code stream.
  • the processor is used to encode a GDR code stream into a coding group, including:
  • the frame between the last normal P frame in the image code stream group and the last normal P frame in the subsequent image code stream group is used as a subsequent frame of the first frame of the coding group, and copied to the coding group.
  • the processor is used to divide into an image code stream group including:
  • the processor is also used to:
  • the processor is used to obtain the last ordinary P frame in the image stream group includes:
  • the processor is configured to encode the last ordinary P frame into an I frame including:
  • the last ordinary P frame is encoded as an I frame.
  • the designated location is a buffer of the terminal device
  • the reference image frame is an image frame formed by the terminal device decoding the GDR code stream before the last ordinary P frame.
  • the processor is also used to:
  • the first frame is repaired using P frames including the I slice after the first frame.
  • an embodiment of the present invention provides a machine-readable storage medium that stores a number of computer instructions, and when the computer instructions are executed, the steps of the method of the first aspect are implemented.
  • the received GDR code stream is encoded into an encoded code stream containing multiple encoding groups; the first frame of each encoding group is a complete I frame containing all image information, the first The preset number of frames after the frame is a frame copied from the GDR code stream. It can be seen that, in this embodiment, except for the first frame in the encoding group that needs to be encoded, the remaining frames only need to be copied, which can reduce the amount of encoding calculation and the time required for encoding, and improve the encoding efficiency.
  • FIG. 1 is an application scenario diagram provided by an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a GDR code stream encoding method according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a GDR code stream format provided by an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of encoding a coding group according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of encoding an ordinary P frame as an I frame according to an embodiment of the present invention
  • 6(a) and 6(b) are schematic diagrams of a GDR code stream and an encoded code stream GDR' provided by an embodiment of the present invention
  • FIG. 7 is a block diagram of a terminal device according to an embodiment of the present invention.
  • the terminal device decodes the GDR code stream and implements local playback.
  • the terminal device also needs to save the GDR code stream to the local memory, which requires encoding the decoded image frame, and then save the encoded code stream locally, that is, the process of encoding the GDR code stream by the terminal device Including frame-by-frame decoding -> frame-by-frame coding, but the efficiency of frame-by-frame coding is low.
  • FIG. 1 is an application scenario diagram provided by an embodiment of the present invention.
  • the image collection device 20 collects video, and then encodes, compresses, and processes the video to generate a GDR code stream, uploads it to the streaming media server 30, and then forwards the streaming media server 30 to the terminal device 10.
  • the image acquisition device 20 acquires the video, and then encodes, compresses, etc. the video to generate a GDR code stream, and directly sends the GDR code stream to the terminal device 10.
  • the transmission method of the GDR code stream can be set according to specific scenarios.
  • the terminal device 10 decodes the GDR code stream to play a video while using a GDR code stream encoding method to encode the GDR code stream and store it in a local memory, cache, or cloud (not shown in the figure).
  • a GDR code stream coding method the inventive concept is:
  • the terminal device When the terminal device receives a certain frame, combined with the decoded image frame when playing the video, you can get the image frame corresponding to a certain frame.
  • the image frame is a complete I frame of all image information, and then a certain After the preset number of frames after one frame are copied to the complete I frame, this can get a coding group. Multiple coding groups can be repeated by the above steps, so that the GDR code stream is encoded into the coded code stream.
  • the terminal device encodes only one frame, and the remaining frames do not need to be processed, which can greatly reduce the amount of encoded data and help improve encoding efficiency.
  • FIG. 2 is a schematic flowchart of a GDR code stream encoding method according to an embodiment of the present invention.
  • a GDR code stream encoding method includes steps 201 and 202, where:
  • the processor in the terminal device 10 can obtain the GDR code stream sent by the image acquisition device 20.
  • the processor can read the GDR code stream from local storage, cache, or the cloud.
  • the GDR code stream acquired by the processor may include several image code stream groups, where a dotted frame in FIG. 3 shows one image code stream group.
  • Each image stream group includes multiple P frames containing I slices and multiple ordinary P frames.
  • the image stream group including P frames of I slice and P frames not containing I slice can be set according to specific scenarios , Not limited here.
  • each picture code stream group includes 4 P frames containing I slices and 41 ordinary P frames, that is, each picture code stream group includes 45 P frames.
  • the composition of four P frames containing I slices are: the composition of the first frame is I slice, P slice, P slice and P slice; the composition of the second frame is P slice, I slice, P slice And P; the third frame is composed of P slice, P slice, I slice and P slice; the fourth frame is composed of P slice, P slice, P slice and I slice.
  • the processor can recover a correct image frame, that is, a video drawing, through these four P frames containing I slices.
  • the GDR code stream into an encoded code stream including multiple coding groups; the first frame of each coding group is a complete I frame containing all image information, and the preset number of frames after the first frame is Copy the frames in the GDR code stream.
  • the processor in the terminal device 10 encodes the GDR code stream into a coded code stream including multiple coding groups. Referring to FIG. 4, it includes:
  • the processor acquires an image code stream group in the GDR code stream (corresponding to step 401). Take dividing an image code stream group as an example, obtain the first P frame containing I slice in the GDR code stream, take the first P frame containing I slice as the first frame of the image code stream group, and then 3 A P-frame containing I slices and 41 ordinary P-frames are used as subsequent frames of the first frame to obtain an image code stream group.
  • the processor may divide the GDR code stream into multiple image code stream groups, and then perform subsequent steps on the multiple image code stream groups in parallel.
  • the processor may only divide one image code stream group at a time, and perform subsequent steps for the image code stream group.
  • the processor acquires the last ordinary P frame of each image code stream group (corresponding to step 402).
  • the last ordinary P frame of the image code stream group is shown by an arrow.
  • the processor encodes the last ordinary P frame into a complete I frame containing all image information, and uses the complete I frame as the first frame of the encoding group (corresponding to step 403). Since the terminal device 10 also needs to play video, there is a decoding process of the GDR code stream, and the decoding method can refer to the related technical solution, which is not limited herein.
  • a complete image frame for display can be obtained.
  • the processor can read the complete image frame (that is, the reference image frame) at a specified position and obtain the YUV data of the last ordinary P frame (corresponding Step 501), combining the reference image frame and the YUV data to encode the last ordinary P frame into a complete I frame containing all image information (corresponding to step 502).
  • the encoding method reference may be made to related technical solutions, such as the H264 encoding method. Not limited.
  • the specified location can be the cache of the terminal device.
  • the processor copies the frame between the last ordinary P frame in the image code stream group and the last ordinary P frame in the subsequent image code stream group as the subsequent frame of the first frame of the encoding group, and copies it to the encoding group (corresponding to step 404) ).
  • the processor obtains the first P frame containing I slice, which is the first P frame in the second dotted frame from the left in FIG. 6(a), and then the processor A P-frame containing an I slice before the last ordinary P-frame in an image code stream group, encodes the last ordinary P-frame into a complete I-frame, and serves as the first frame of an encoding group in the encoded code stream.
  • the processor copies the second, third, and fourth P-frames containing the slice, and all ordinary P-frames before the last ordinary P-frame in the second dashed frame as the first frame of the coding group.
  • a coding group of the coded code stream GDR' shown in FIG. 6(b) is obtained (indicated by a dotted frame). Repeat the above steps to get the coded stream GDR'.
  • the processor when the processor stores the coded stream GDR′, since the GDR stream before the first complete I frame cannot form a coding group, the processor will divide the code stream before the first complete I frame The GDR code stream is discarded, thereby saving storage space.
  • the processor may use the P frame containing the I slice after the complete I frame (that is, the first frame in the coding group) to repair the complete I frame , So as to control the screen difference within the lowest range.
  • FIG. 7 is a block diagram of a terminal device according to an embodiment of the present invention.
  • a terminal device 700 includes a processor 701 and a memory 702 storing executable instructions of the processor 701.
  • the processor 701 is connected to the memory 702 through a communication bus 703.
  • the processor 701 can read the executable instructions from the memory 702 , To achieve:
  • the preset number is 44, and the preset number of frames of each coding group includes 4 P frames containing I slices and 40 ordinary P frames in the GDR code stream.
  • the processor 701 is used to encode a GDR code stream into an encoding group, including:
  • the frame between the last normal P frame in the image code stream group and the last normal P frame in the subsequent image code stream group is used as a subsequent frame of the first frame of the coding group, and copied to the coding group.
  • the processor 701 is used to divide into an image code stream group including:
  • the processor 701 is further used to:
  • the processor 701 is configured to obtain the last ordinary P frame in the image stream group includes:
  • the processor 701 is configured to encode the last ordinary P frame into an I frame includes:
  • the last ordinary P frame is encoded as an I frame.
  • the designated location is a cache of the terminal device
  • the reference image frame is an image frame formed by the terminal device decoding the GDR code stream before the last ordinary P frame.
  • the processor 701 is further used to:
  • the first frame is repaired using P frames including the I slice after the first frame.
  • Embodiments of the present invention also provide a machine-readable storage medium, which stores a number of computer instructions, and when the computer instructions are executed, the steps of the method shown in FIGS. 1 to 5 are implemented.

Landscapes

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

Abstract

一种GDR码流编码方法、终端设备、机器可读存储介质。一种,包括:获取GDR码流;将所述GDR码流编码为包含多个编码组的编码码流;每个编码组的第一帧为包含全部图像信息的完整I帧,所述第一帧之后的预设数量帧为复制所述GDR码流中的帧。本实施例中除了编码组中第一帧需要编码外,其余帧仅需要复制操作,从而可以减少编码计算量以及编码所需要时间,提升编码效率。

Description

GDR码流编码方法、终端设备、机器可读存储介质 技术领域
本发明实施例涉及控制技术领域,尤其涉及一种GDR码流编码方法、终端设备、机器可读存储介质。
背景技术
目前,在接收到图传的GDR(Gradual Decoder Refresh,视频渐近刷新)码流后,终端设备对该GDR码流解码后实现本地播放。并且,终端设备还需要将GDR码流保存到本地存储器,这就需要对解码后的图像帧再进行编码,将编码后的编码码流保存在本地,即终端设备对GDR码流编码的过程包括逐帧解码->编码,但是逐帧编码的效率较低。
发明内容
本发明实施例提供一种GDR码流编码方法、终端设备、机器可读存储介质。
第一方面,本发明实施例提供一种GDR码流编码方法,包括:
获取GDR码流;
将所述GDR码流编码为包含多个编码组的编码码流;每个编码组的第一帧为包含全部图像信息的完整I帧,所述第一帧之后的预设数量帧为复制所述GDR码流中的帧。
可选地,所述预设数量为44,每个编码组的预设数量帧包括GDR码流中的4个包含I片的P帧和40个普通P帧。
可选地,利用GDR码流编码为一个编码组,包括:
获取GDR码流中的一个图像码流组;
获取所述图像码流组中最后一个普通P帧;
将所述最后一个普通P帧编码为包含全部图像信息的完整I帧,所述 完整I帧作为编码组的第一帧;
将所述图像码流组中最后一个普通P帧和后续一个图像码流组中最后一个普通P帧之间的帧作为所述编码组第一帧的后续帧,复制到编码组。
可选地,划分一个图像码流组包括:以所述GDR码流的第一个包含I片的P帧为第一帧,之后3个包含I片的P帧和41个普通P帧作为所述第一帧的后续帧,形成一个图像码流组。
可选地,还包括:
存储时,丢弃编码后第一帧之前的GDR码流。
可选地,获取所述图像码流组中最后一个普通P帧包括:
获取所接收图传码流中第一个I帧,将所述第一个I帧之前的普通P帧作为前一个图像码流组的最后一个普通P帧。
可选地,将所述最后一个普通P帧编码为I帧包括:
从指定位置获取参考图像帧,以及获取所述最后一个普通P帧的YUV数据;
基于所述参考图像帧和YUV数据,将所述最后一个普通P帧编码为I帧。
可选地,所述指定位置为终端设备的缓存,所述参考图像帧为终端设备解码所述最后一个普通P帧之前的GDR码流形成的图像帧。
可选地,还包括:
若解码所述编码码流,则利用所述第一帧之后的包含I片的P帧修复所述第一帧。
第二方面,本发明实施例提供一种终端设备,包括处理器和存储处理器可执行指令的存储器,所述处理器可以从所述存储器内读取可执行指令,用于实现:
获取GDR码流;
将所述GDR码流编码为包含多个编码组的编码码流;每个编码组的第一帧为包含全部图像信息的完整I帧,所述第一帧之后的预设数量帧为 复制所述GDR码流中的帧。
可选地,所述预设数量为44,每个编码组的预设数量帧包括GDR码流中的4个包含I片的P帧和40个普通P帧。
可选地,所述处理器用于利用GDR码流编码为一个编码组,包括:
获取GDR码流中的一个图像码流组;
获取所述图像码流组中最后一个普通P帧;
将所述最后一个普通P帧编码为包含全部图像信息的完整I帧,所述完整I帧作为编码组的第一帧;
将所述图像码流组中最后一个普通P帧和后续一个图像码流组中最后一个普通P帧之间的帧作为所述编码组第一帧的后续帧,复制到编码组。
可选地,所述处理器用于划分为一个图像码流组包括:
以所述GDR码流的第一个包含I片的P帧为第一帧,
之后3个包含I片的P帧和41个普通P帧作为所述第一帧的后续帧,形成一个图像码流组。
可选地,所述处理器还用于:
存储时,丢弃编码后第一帧接收到第一个I帧之前的GDR码流。
可选地,所述处理器用于获取所述图像码流组中最后一个普通P帧包括:
获取所接收图传码流中第一个I帧,将所述第一个I帧之前的普通P帧作为前一个图像码流组的最后一个普通P帧。
可选地,所述处理器用于将所述最后一个普通P帧编码为I帧包括:
从指定位置获取参考图像帧,以及获取所述最后一个普通P帧的YUV数据;
基于所述参考图像帧和YUV数据,将所述最后一个普通P帧编码为I帧。
可选地,所述指定位置为终端设备的缓存,所述参考图像帧为终端设备解码所述最后一个普通P帧之前的GDR码流形成的图像帧。
可选地,所述处理器还用于:
若解码所述编码码流,则利用所述第一帧之后的包含I片的P帧修复所述第一帧。
第三方面,本发明实施例提供一种机器可读存储介质,所述机器可读存储介质上存储有若干计算机指令,所述计算机指令被执行时实现第一方面所述方法的步骤。
由上述的技术方案可见,本实施例中通过将接收的GDR码流编码为包含多个编码组的编码码流;每个编码组的第一帧为包含全部图像信息的完整I帧,第一帧之后的预设数量帧为复制所述GDR码流中的帧。可见,本实施例中除了编码组中第一帧需要编码外,其余帧仅需要复制操作,从而可以减少编码计算量以及编码所需要时间,提升编码效率。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例提供的一种应用场景图;
图2是本发明实施例提供的一种GDR码流编码方法的流程示意图;
图3是本发明实施例提供的一种GDR码流格式的示意图;
图4是本发明实施例提供的编码一个编码组的流程示意图;
图5是本发明实施例提供的编码普通P帧为I帧的流程示意图;
图6(a)和图6(b)是本发明实施例提供的GDR码流和编码码流GDR’的示意图;
图7是本发明实施例提供的一种终端设备的框图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
目前,在接收到图传的GDR码流后,终端设备对该GDR码流解码后实现本地播放。并且,终端设备还需要将GDR码流保存到本地存储器,这就需要对解码后的图像帧再进行编码,然后将编码后的编码码流保存在本地,即终端设备对GDR码流编码的过程包括逐帧解码->逐帧编码,但是逐帧编码的效率较低。
为此,本发明实施例提供了一种GDR码流编码方法,图1是本发明实施例提供的一种应用场景图。参见图1,图像采集设备20采集视频,然后将视频进行编码、压缩等处理后生成GDR码流,上传给流媒体服务器30,然后由流媒体服务器30转发给终端设备10。或者,图像采集设备20采集视频,然后将视频进行编码、压缩等处理后生成GDR码流,直接将GDR码流发送给终端设备10。GDR码流的传输方式可以根据具体场景进行设置。
终端设备10在将GDR码流解码进行播放视频的同时,利用一种GDR码流编码方法,将GDR码流编码后存储在本地存储器、缓存或者云端(图中未示出)。一种GDR码流编码方法,其发明构思在于:
终端设备在接收到某一帧时,结合播放视频时所解码出图像帧,可以得到与某一帧对应的图像帧,该图像帧为全部图像信息的完整I帧,然后将GDR码流中某一帧之后的预设数量帧复制到完整I帧之后,这样可以得到一个编码组。重复上述步骤即可多个编码组,从而将GDR码流编码为编码码流。
这样,终端设备在对GDR码流编码的过程中,仅对一个帧进行编码操作,剩余帧无需处理,可以极大降低编码的数据量,有利于提高编码效率。
图2是本发明实施例提供的一种GDR码流编码方法的流程示意图,参见图2,一种GDR码流编码方法,包括步骤201和步骤202,其中:
201,获取GDR码流。
本实施例中,终端设备10中处理器可以获取图像采集设备20发送的GDR码流。例如处理器可以从本地存储器、缓存或云端读取GDR码流。
本实施例中处理器获取的GDR码流可以包括若干个图像码流组,其中图3中虚线框示出了一个图像码流组。每个图像码流组包括多个包含I片(slice)的P帧和多个普通P帧,图像码流组中包含I slice的P帧和不包含I slice的P帧可以根据具体场景进行设置,在此不作限定。参见图3,本实施例中每个图像码流组包括4个包含I片(slice)的P帧和41个普通P帧,即每个图像码流组包括45个P帧。其中,4个包含I片(slice)的P帧的组成分别为:第一帧的组成是I slice、P slice、P slice和P slice;第二帧的组成是P slice、I slice、P slice和P slice;第三帧的组成是P slice、P slice、I slice和P slice;第四帧的组成是P slice、P slice、P slice和I slice。并且,本实施例中处理器通过这4个包含I slice的P帧可以恢复出来一帧正确的图像帧,即视频画画。
202,将所述GDR码流编码为包含多个编码组的编码码流;每个编码组的第一帧为包含全部图像信息的完整I帧,所述第一帧之后的预设数量帧为复制所述GDR码流中的帧。
本实施例中,终端设备10中处理器将GDR码流编码为包含多个编码组的编码码流,参见图4,包括:
首先,处理器获取GDR码流中的一个图像码流组(对应步骤401)。以划分一个图像码流组为例,获取GDR码流中的第一个包含I slice的P帧,以该第一个包含I slice的P帧作为图像码流组的第一帧,以之后3个 包含I slice的P帧和41个普通P帧作为第一帧的后续帧,得到一个图像码流组。
需要说明的是,处理器可以将GDR码流划分为多个图像码流组,然后对多个图像码流组并行执行后续步骤。当然,处理器也可以每次只划分出一个图像码流组,针对该图像码流组执行后续步骤。
然后,处理器获取每个图像码流组的最后一个普通P帧(对应步骤402)。继续参见图3,图像码流组的最后一个普通P帧采用箭头示出。
之后,处理器将最后一个普通P帧编码为包含全部图像信息的完整I帧,并将该完整I帧作为编码组的第一帧(对应步骤403)。由于终端设备10还需要播放视频,因此存在GDR码流的解码过程,解码方式可以参考相关技术的方案,在此不作限定。
在解码过程中,可以得到一个用于显示的完整图像帧,参见图5,处理器可以指定位置读取到该完整图像帧(即参考图像帧)以及获取最后一个普通P帧的YUV数据(对应步骤501),结合该参考图像帧和YUV数据将最后一个普通P帧编码为包含全部图像信息的完整I帧(对应步骤502),编码方式可以参考相关技术的方案,例如H264编码方法,在此不作限定。其中指定位置可以为终端设备的缓存。
最后,处理器将图像码流组中最后一个普通P帧和后续一个图像码流组中最后一个普通P帧之间的帧作为编码组第一帧的后续帧,复制到编码组(对应步骤404)。
参见图6(a),处理器获取到第一个包含I slice的P帧,即图6(a)中左数第二个虚线框内的第一个P帧,然后处理器将该第一个包含I slice的P帧之前一个图像码流组中最后一个普通P帧,将该最后一个普通P帧编码为完整I帧,作为编码码流中一个编码组的第一帧。之后,处理器复制第二个、第三个、第四个包含I slice的P帧,以及第二个虚线框内最后一个普通P帧之前的全部普通P帧,作为该编码组第一帧之后的后续帧,得到图6(b)所示的编码码流GDR’的一个编码组(虚线框表示)。重 复上述步骤即可得到编码码流GDR’。
继续参见图6(b),处理器在存储编码码流GDR’时,由于第一个完整I帧之前的GDR码流无法构成一个编码组,因此处理器会将第一个完整I帧之前的GDR码流丢弃,从而节省存储空间。
需要说明的是,本实施例中,当再次解码编码码流GDR’时,处理器可以利用完整I帧(即编码组中第一帧)之后的包含I slice的P帧来修复该完整I帧,从而将画面差异控制在最低范围内。
至此,本实施例中除了编码组中第一帧需要编码外,其余帧仅需要复制操作,从而可以减少44/45的编码计算量,有利于减少编码所需要时间以及提升编码效率。
本发明实施例还提供了一种终端设备,图7是本发明实施例提供的一种终端设备的框图。参见图7,一种终端设备700包括处理器701和存储处理器701可执行指令的存储器702,处理器701通过通信总线703与存储器702连接,处理器701可以从存储器702内读取可执行指令,用于实现:
获取GDR码流;
将所述GDR码流编码为包含多个编码组的编码码流;每个编码组的第一帧为包含全部图像信息的完整I帧,所述第一帧之后的预设数量帧为复制所述GDR码流中的帧。
在一些实施例中,所述预设数量为44,每个编码组的预设数量帧包括GDR码流中的4个包含I片的P帧和40个普通P帧。
在一些实施例中,所述处理器701用于利用GDR码流编码为一个编码组,包括:
获取GDR码流中的一个图像码流组;
获取所述图像码流组中最后一个普通P帧;
将所述最后一个普通P帧编码为包含全部图像信息的完整I帧,所述完整I帧作为编码组的第一帧;
将所述图像码流组中最后一个普通P帧和后续一个图像码流组中最后一个普通P帧之间的帧作为所述编码组第一帧的后续帧,复制到编码组。
在一些实施例中,所述处理器701用于划分为一个图像码流组包括:
以所述GDR码流的第一个包含I片的P帧为第一帧,
之后3个包含I片的P帧和41个普通P帧作为所述第一帧的后续帧,形成一个图像码流组。
在一些实施例中,所述处理器701还用于:
存储时,丢弃编码后第一帧接收到第一个I帧之前的GDR码流。
在一些实施例中,所述处理器701用于获取所述图像码流组中最后一个普通P帧包括:
获取所接收图传码流中第一个I帧,将所述第一个I帧之前的普通P帧作为前一个图像码流组的最后一个普通P帧。
在一些实施例中,所述处理器701用于将所述最后一个普通P帧编码为I帧包括:
从指定位置获取参考图像帧,以及获取所述最后一个普通P帧的YUV数据;
基于所述参考图像帧和YUV数据,将所述最后一个普通P帧编码为I帧。
在一些实施例中,所述指定位置为终端设备的缓存,所述参考图像帧为终端设备解码所述最后一个普通P帧之前的GDR码流形成的图像帧。
在一些实施例中,所述处理器701还用于:
若解码所述编码码流,则利用所述第一帧之后的包含I片的P帧修复所述第一帧。
本发明实施例还提供了一种机器可读存储介质,所述机器可读存储介质上存储有若干计算机指令,所述计算机指令被执行时实现图1~图5所述方法的步骤。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用 来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上对本发明实施例所提供的检测装置和方法进行了详细介绍,本发明中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。

Claims (19)

  1. 一种GDR码流编码方法,其特征在于,包括:
    获取GDR码流;
    将所述GDR码流编码为包含多个编码组的编码码流;每个编码组的第一帧为包含全部图像信息的完整I帧,所述第一帧之后的预设数量帧为复制所述GDR码流中的帧。
  2. 根据权利要求1所述的方法,其特征在于,所述预设数量为44,每个编码组的预设数量帧包括GDR码流中的4个包含I片的P帧和40个普通P帧。
  3. 根据权利要求1所述的方法,其特征在于,利用GDR码流编码为一个编码组,包括:
    获取GDR码流中的一个图像码流组;
    获取所述图像码流组中最后一个普通P帧;
    将所述最后一个普通P帧编码为包含全部图像信息的完整I帧,所述完整I帧作为编码组的第一帧;
    将所述图像码流组中最后一个普通P帧和后续一个图像码流组中最后一个普通P帧之间的帧作为所述编码组第一帧的后续帧,复制到编码组。
  4. 根据权利要求3所述的方法,其特征在于,划分一个图像码流组包括:以所述GDR码流的第一个包含I片的P帧为第一帧,之后3个包含I片的P帧和41个普通P帧作为所述第一帧的后续帧,形成一个图像码流组。
  5. 根据权利要求4所述的方法,其特征在于,还包括:
    存储时,丢弃编码后第一帧之前的GDR码流。
  6. 根据权利要求3所述的方法,其特征在于,获取所述图像码流组中最后一个普通P帧包括:
    获取所接收图传码流中第一个I帧,将所述第一个I帧之前的普通P 帧作为前一个图像码流组的最后一个普通P帧。
  7. 根据权利要求3所述的方法,其特征在于,将所述最后一个普通P帧编码为I帧包括:
    从指定位置获取参考图像帧,以及获取所述最后一个普通P帧的YUV数据;
    基于所述参考图像帧和YUV数据,将所述最后一个普通P帧编码为I帧。
  8. 根据权利要求7所述的方法,其特征在于,所述指定位置为终端设备的缓存,所述参考图像帧为终端设备解码所述最后一个普通P帧之前的GDR码流形成的图像帧。
  9. 根据权利要求3所述的方法,其特征在于,还包括:
    若解码所述编码码流,则利用所述第一帧之后的包含I片的P帧修复所述第一帧。
  10. 一种终端设备,其特征在于,包括处理器和存储处理器可执行指令的存储器,所述处理器可以从所述存储器内读取可执行指令,用于实现:
    获取GDR码流;
    将所述GDR码流编码为包含多个编码组的编码码流;每个编码组的第一帧为包含全部图像信息的完整I帧,所述第一帧之后的预设数量帧为复制所述GDR码流中的帧。
  11. 根据权利要求10所述的终端设备,其特征在于,所述预设数量为44,每个编码组的预设数量帧包括GDR码流中的4个包含I片的P帧和40个普通P帧。
  12. 根据权利要求10所述的终端设备,其特征在于,所述处理器用于利用GDR码流编码为一个编码组,包括:
    获取GDR码流中的一个图像码流组;
    获取所述图像码流组中最后一个普通P帧;
    将所述最后一个普通P帧编码为包含全部图像信息的完整I帧,所述 完整I帧作为编码组的第一帧;
    将所述图像码流组中最后一个普通P帧和后续一个图像码流组中最后一个普通P帧之间的帧作为所述编码组第一帧的后续帧,复制到编码组。
  13. 根据权利要求12所述的终端设备,其特征在于,所述处理器用于划分为一个图像码流组包括:
    以所述GDR码流的第一个包含I片的P帧为第一帧,
    之后3个包含I片的P帧和41个普通P帧作为所述第一帧的后续帧,形成一个图像码流组。
  14. 根据权利要求13所述的终端设备,其特征在于,所述处理器还用于:
    存储时,丢弃编码后第一帧接收到第一个I帧之前的GDR码流。
  15. 根据权利要求12所述的终端设备,其特征在于,所述处理器用于获取所述图像码流组中最后一个普通P帧包括:
    获取所接收图传码流中第一个I帧,将所述第一个I帧之前的普通P帧作为前一个图像码流组的最后一个普通P帧。
  16. 根据权利要求12所述的终端设备,其特征在于,所述处理器用于将所述最后一个普通P帧编码为I帧包括:
    从指定位置获取参考图像帧,以及获取所述最后一个普通P帧的YUV数据;
    基于所述参考图像帧和YUV数据,将所述最后一个普通P帧编码为I帧。
  17. 根据权利要求16所述的终端设备,其特征在于,所述指定位置为终端设备的缓存,所述参考图像帧为终端设备解码所述最后一个普通P帧之前的GDR码流形成的图像帧。
  18. 根据权利要求12所述的终端设备,其特征在于,所述处理器还用于:
    若解码所述编码码流,则利用所述第一帧之后的包含I片的P帧修复 所述第一帧。
  19. 一种机器可读存储介质,其特征在于,所述机器可读存储介质上存储有若干计算机指令,所述计算机指令被执行时实现权利要求1~9任一项所述方法的步骤。
PCT/CN2018/117971 2018-11-28 2018-11-28 Gdr码流编码方法、终端设备、机器可读存储介质 WO2020107268A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/117971 WO2020107268A1 (zh) 2018-11-28 2018-11-28 Gdr码流编码方法、终端设备、机器可读存储介质
CN201880068425.2A CN111279694A (zh) 2018-11-28 2018-11-28 Gdr码流编码方法、终端设备、机器可读存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/117971 WO2020107268A1 (zh) 2018-11-28 2018-11-28 Gdr码流编码方法、终端设备、机器可读存储介质

Publications (1)

Publication Number Publication Date
WO2020107268A1 true WO2020107268A1 (zh) 2020-06-04

Family

ID=70854204

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/117971 WO2020107268A1 (zh) 2018-11-28 2018-11-28 Gdr码流编码方法、终端设备、机器可读存储介质

Country Status (2)

Country Link
CN (1) CN111279694A (zh)
WO (1) WO2020107268A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111770390B (zh) * 2020-07-09 2024-02-09 腾讯科技(深圳)有限公司 数据处理方法、装置、服务器及存储介质
WO2022174431A1 (zh) * 2021-02-20 2022-08-25 深圳市大疆创新科技有限公司 图像传输方法、可移动平台、设备及计算机可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1964492A (zh) * 2006-11-28 2007-05-16 北京中星微电子有限公司 视频编码方法和视频编码系统
CN101383964A (zh) * 2007-09-07 2009-03-11 华为技术有限公司 一种对压缩视频流进行编辑、解码的方法、装置和系统
WO2012094916A1 (zh) * 2011-01-11 2012-07-19 中兴通讯股份有限公司 一种流媒体数据包的封装、传输方法及流媒体处理装置
CN104904216A (zh) * 2013-01-07 2015-09-09 高通股份有限公司 在视频译码中具有时间可扩缩性支持的逐渐解码刷新
CN108702510A (zh) * 2017-10-31 2018-10-23 深圳市大疆创新科技有限公司 一种编码方法及装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7046910B2 (en) * 1998-11-20 2006-05-16 General Instrument Corporation Methods and apparatus for transcoding progressive I-slice refreshed MPEG data streams to enable trick play mode features on a television appliance
GB2378601B (en) * 2001-08-08 2004-03-31 Motorola Inc Video transmission system,video transmission unit and method of communicating video data
JP3923898B2 (ja) * 2002-01-18 2007-06-06 株式会社東芝 画像符号化方法及び装置
CN101064849A (zh) * 2006-04-29 2007-10-31 鲁海宁 动态图像编码方法、装置和计算机可读记录介质
CN102075756B (zh) * 2011-01-27 2012-10-24 北京视博云科技有限公司 视频多帧预测编解码方法和装置
CN106231319A (zh) * 2016-07-14 2016-12-14 观止云(北京)信息技术有限公司 一种基于软硬件结合的逐帧对齐的方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1964492A (zh) * 2006-11-28 2007-05-16 北京中星微电子有限公司 视频编码方法和视频编码系统
CN101383964A (zh) * 2007-09-07 2009-03-11 华为技术有限公司 一种对压缩视频流进行编辑、解码的方法、装置和系统
WO2012094916A1 (zh) * 2011-01-11 2012-07-19 中兴通讯股份有限公司 一种流媒体数据包的封装、传输方法及流媒体处理装置
CN104904216A (zh) * 2013-01-07 2015-09-09 高通股份有限公司 在视频译码中具有时间可扩缩性支持的逐渐解码刷新
CN108702510A (zh) * 2017-10-31 2018-10-23 深圳市大疆创新科技有限公司 一种编码方法及装置

Also Published As

Publication number Publication date
CN111279694A (zh) 2020-06-12

Similar Documents

Publication Publication Date Title
US11140401B2 (en) Coded-block-flag coding and derivation
WO2016131223A1 (zh) 一种视频帧丢帧方法及视频发送装置
US10623735B2 (en) Method and system for layer based view optimization encoding of 360-degree video
US10298931B2 (en) Coupling sample metadata with media samples
JP6686541B2 (ja) 情報処理システム
JP6708374B2 (ja) 画像群内で修正可能要素のセットを決定するための方法、デバイス、プログラム、及び可読媒体
US8401077B2 (en) Video processing apparatus and method
US10070174B2 (en) Movie package file format to persist HLS onto disk
WO2020107268A1 (zh) Gdr码流编码方法、终端设备、机器可读存储介质
WO2016161678A1 (zh) 一种视频编码和解码的方法、装置和处理系统
US11095901B2 (en) Object manipulation video conference compression
JP2016525297A (ja) グラフィクスプロセッサを使用するビデオ復号化のためのピクチャ参照コントロール
CN104980763B (zh) 一种视频码流、视频编解码方法及装置
WO2022110870A1 (zh) 图像编码和解码方法、编码和解码装置、编码器及解码器
WO2017124305A1 (zh) 基于多方式边界填充的全景视频编码、解码方法和装置
TWI735297B (zh) 具有初始化片段之視訊及音訊之寫碼
TWI439137B (zh) 重建一圖像群以在該圖像群中隨機存取之方法及裝置
TW200418330A (en) Intelligent video stream processing method and system thereof
JP2020530229A (ja) 動き補償参照フレーム圧縮
CN114615549B (zh) 流媒体seek方法、客户端、存储介质和移动设备
US11736730B2 (en) Systems, methods, and apparatuses for video processing
TWI228919B (en) Circuit and method for decompressing image
US20230067994A1 (en) Encoding and decoding video data
CN114025162B (zh) 熵解码方法、介质、程序产品和电子设备
US10341665B2 (en) Method of providing random access for video data based on random accessible P-frame

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

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

Country of ref document: EP

Kind code of ref document: A1