[go: up one dir, main page]

CN102790905B - The code-transferring method H.264/SVC arrived H.264/AVC based on P2PVoD video on-demand system - Google Patents

The code-transferring method H.264/SVC arrived H.264/AVC based on P2PVoD video on-demand system Download PDF

Info

Publication number
CN102790905B
CN102790905B CN201210275670.5A CN201210275670A CN102790905B CN 102790905 B CN102790905 B CN 102790905B CN 201210275670 A CN201210275670 A CN 201210275670A CN 102790905 B CN102790905 B CN 102790905B
Authority
CN
China
Prior art keywords
svc
transcoding
video
layer
gop
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201210275670.5A
Other languages
Chinese (zh)
Other versions
CN102790905A (en
Inventor
唐朝伟
罗秀红
袁杨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing University
Original Assignee
Chongqing University
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 Chongqing University filed Critical Chongqing University
Priority to CN201210275670.5A priority Critical patent/CN102790905B/en
Publication of CN102790905A publication Critical patent/CN102790905A/en
Application granted granted Critical
Publication of CN102790905B publication Critical patent/CN102790905B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本发明提出了一种基于P2PVoD视频点播系统的H.264/SVC到H.264/AVC的转码方法,属于视频转码领域。本发明采用SVC自适应转码,使用分离器将SVC文件按层分割成独立的多层文件,在转码前,根据终端能力进行空间层和质量层的自适应过程,丢弃不需要的层,使这个转码过程不仅有效地减少了不必要的时间开销,并为客户端提供了与之能力相匹配的视频质量;采用像素域和变换域结合的方式,既降低了时间复杂度又有效地控制了误差漂移;采用基于Lagrangian的编码控制优化算法,在求解平均失真函数时,采用绝对误差函数SAD代替绝对值均方函数SSD,简化了计算复杂度;采用基于GOP并行的线程处理机制,利用线程并行处理单独编码的GOP,大大减少了转码时间。

The invention proposes a transcoding method from H.264/SVC to H.264/AVC based on a P2PVoD video-on-demand system, belonging to the field of video transcoding. The present invention adopts SVC self-adaptive transcoding, and uses a splitter to divide SVC files into independent multi-layer files according to layers. Before transcoding, the self-adaptive process of space layer and quality layer is performed according to terminal capabilities, and unnecessary layers are discarded. This transcoding process not only effectively reduces unnecessary time overhead, but also provides the client with video quality that matches its capabilities; the combination of pixel domain and transform domain not only reduces time complexity but also effectively The error drift is controlled; the coding control optimization algorithm based on Lagrangian is adopted. When solving the average distortion function, the absolute error function SAD is used instead of the absolute value mean square function SSD, which simplifies the computational complexity; the GOP-based parallel thread processing mechanism is used. Threads process individually encoded GOPs in parallel, greatly reducing transcoding time.

Description

基于P2PVoD视频点播系统的H.264/SVC到H.264/AVC的转码方法Transcoding method from H.264/SVC to H.264/AVC based on P2PVoD video-on-demand system

技术领域 technical field

本发明涉及互联网流媒体技术,尤其涉及一种基于P2PVoD视频点播系统的H.264/SVC到H.264/AVC的转码方法。The invention relates to Internet streaming media technology, in particular to a transcoding method from H.264/SVC to H.264/AVC based on a P2PVoD video-on-demand system.

背景技术 Background technique

随着计算机网络技术和多媒体技术的迅猛发展,人们对视频服务的需求日趋多样化,视频技术的研究已成为信息技术的热门研究领域之一。2003年3月,ITU/ISO的联合项目组JVT发布了视频编码标准H.264/AVC(Advanced VideoCoding),由于其优越的压缩,较高的编码效率和很好的网络适应性,获得了广泛的使用。With the rapid development of computer network technology and multimedia technology, people's demand for video services is becoming more and more diverse. The research of video technology has become one of the hot research fields of information technology. In March 2003, JVT, a joint project team of ITU/ISO, released the video coding standard H.264/AVC (Advanced Video Coding). Due to its superior compression, high coding efficiency and good network adaptability, it has been widely used usage of.

为了解决多媒体应用的扩展出现的越来越多的异构网络、多媒体终端、用户需求对相同内容多媒体信息的访问要求,在AVC基础上提出了H.264/SVC(Scalable Video Coding)可扩展编码标准。目前,SVC已成为近年来视频技术领域研究的热点之一,它不但继承了AVC良好的编码效率和网络适应性,其在时域、空域、质量的可扩展性能更好地满足了互联网视频、移动无线视频、视频监控、电视电话以及实时转播等不同视频服务的多样化需求。In order to solve the requirement of accessing multimedia information with the same content from more and more heterogeneous networks, multimedia terminals, and user needs in the expansion of multimedia applications, H.264/SVC (Scalable Video Coding) is proposed on the basis of AVC. standard. At present, SVC has become one of the research hotspots in the field of video technology in recent years. It not only inherits the good coding efficiency and network adaptability of AVC, but also its scalable performance in the time domain, space domain, and quality better meets the needs of Internet video, Diverse demands for different video services such as mobile wireless video, video surveillance, video telephony, and real-time broadcasting.

SVC在业内的使用程度和认可程度远不及在网络和工业界已经早已被广泛认可和使用的H.264/AVC。由此可知,现有的很多终端,大多数为AVC的终端设备,只支持AVC的实时解码和SVC基本层的解码,无法做到SVC的实时解码。虽然AVC解码设备能支持SVC基本层的解码,能达到基本的播放,但终端都希望得到与其能力相匹配的视频效果。若重新在解码终端增加SVC的解码功能,必然造成很多现有终端的额外开销。此外,在无线网络中,许多无线设备不具备SVC实时解码的处理能力。这就需要在视频到达终端之前的内容服务器端作一些必要的处理措施。一种情况是在服务器端生成若干个相互独立、具有不同分辨率的码流来满足终端用户的需求,但这势必会增加编码端负担、导致带宽的严重浪费。另一种方法是在服务器端进行转码,将SVC码流转化为AVC码流,在不造成其他额外开销的情况下,达到终端的要求。显然,第二种方法既能体现SVC优良的网络适应性能为视频传输提供一个很好的自适应能力,又能适应现有终端的处理能力,为不同的终端提供与其能力最匹配的视频质量服务。The degree of use and recognition of SVC in the industry is far less than that of H.264/AVC, which has long been widely recognized and used in the network and industry. It can be seen that many existing terminals, most of which are AVC terminal devices, only support real-time decoding of AVC and decoding of the basic layer of SVC, and cannot realize real-time decoding of SVC. Although the AVC decoding device can support the decoding of the SVC basic layer and achieve basic playback, all terminals hope to obtain video effects that match their capabilities. If the decoding function of the SVC is added to the decoding terminal again, it will inevitably cause a lot of extra overhead on the existing terminal. In addition, in a wireless network, many wireless devices do not have the processing capability of SVC real-time decoding. This requires some necessary processing measures on the content server side before the video reaches the terminal. One situation is to generate several independent code streams with different resolutions on the server side to meet the needs of end users, but this will inevitably increase the burden on the encoding side and lead to a serious waste of bandwidth. Another method is to perform transcoding on the server side to convert the SVC code stream into an AVC code stream to meet the requirements of the terminal without causing other additional overhead. Obviously, the second method can not only reflect the excellent network adaptability of SVC to provide a good adaptive capability for video transmission, but also adapt to the processing capabilities of existing terminals, and provide different terminals with video quality services that best match their capabilities. .

目前的从SVC到H.264/AVC的视频转码技术中,有蛮力转码和码流重写机制。In the current video transcoding technology from SVC to H.264/AVC, there are brute force transcoding and stream rewriting mechanisms.

在转码技术中,最直观的转码方式就是蛮力转码(全解全编):对现有码流进行完全解码再按照接收端要求重新编码,此种方法能得到最佳的率失真效果,但其计算复杂、耗时多、成本代价大,不适合通信设备的实时性转码要求。In transcoding technology, the most intuitive transcoding method is brute force transcoding (full decoding and full encoding): completely decode the existing code stream and then re-encode according to the requirements of the receiving end. This method can obtain the best rate-distortion effect, but its calculation is complicated, time-consuming, and costly, and it is not suitable for the real-time transcoding requirements of communication equipment.

从SVC到H.264/AVC的快速转码,目前现有的方法都是基于码流的重写机制。比较具有代表性的是Segall提出的SVC到H.264/AVC的码流重写(AVCRewrting)机制和Hannukesela提出的基于特定结构的码流重写机制。目前效果最好的是,Segll在2007年提出的基于CGS(Coarse Grain Scalability,粗等粒度颗粒)的SVC到AVC的码流机制,现已有JVT-T061和JVT-V035两个版本标准提案。该方法对SVC的语法和语义进行了更改,在SVC编码端使用了自定义的语法,针对CGS质量可伸缩层进行码流重写。对具有多个CGS质量层和最基本的MGS(Medium Grain Scalabilty,中等粒度颗粒)层的SVC码流进行无损的转码并得到与目标质量层相匹配的视频内容。在增加基本层较少码率的同时具有较低的转码复杂度。该方法虽然具有无损、低复杂度等有优点,但目前只能对SVC的质量层进行转码,无法实现空间分辨率的转码。另外,该方法在编码端对SVC的语法和语义进行了修改,不仅在SVC编码端造成了编码效率的影响,而且对于未考虑SVC码流重写的编码得到的码流无法进行转换。For fast transcoding from SVC to H.264/AVC, the current existing methods are all based on the code stream rewriting mechanism. More representative ones are the code stream rewriting (AVC Rewriting) mechanism from SVC to H.264/AVC proposed by Segall and the code stream rewriting mechanism based on a specific structure proposed by Hannukesela. At present, the best effect is the SVC-to-AVC code stream mechanism based on CGS (Coarse Grain Scalability, coarse grain size) proposed by Segll in 2007. Now there are two standard proposals of JVT-T061 and JVT-V035. This method changes the syntax and semantics of SVC, uses a custom syntax on the SVC encoding side, and rewrites the code stream for the CGS quality scalable layer. Perform lossless transcoding on the SVC code stream with multiple CGS quality layers and the most basic MGS (Medium Grain Scalabilty, medium granularity) layer to obtain video content matching the target quality layer. It has lower transcoding complexity while increasing the base layer with less code rate. Although this method has the advantages of lossless and low complexity, it can only transcode the quality layer of SVC at present, and cannot realize the transcoding of spatial resolution. In addition, this method modifies the syntax and semantics of SVC at the encoding end, which not only affects the encoding efficiency at the SVC encoding end, but also cannot convert the encoded code stream without considering the rewriting of the SVC code stream.

另一种从SVC到H.264/AVC码流重写方法是由Hannukesela提出的基于特定结构的码流重写机制。该方法提出了两种不同结构的码流重写机制。第一种是增强层只包含双向预测图像和可跳过的图像,增强层中的双向预测图像做些简单的处理即可加入基本层构成单一的AVC码流。另一种是SVC编码结构类似与同播,SVC各层之间采用独立编码,层与层之间不存在参考和预测。在转码端,对SVC码流各层通过简单的判断决定丢弃与否,再对数据头信息进行简单的修改即可生成AVC码流。该方法虽然转码操作简单,但其需要在编码端进行严格的控制,只能针对以上两种特定的SVC码流结构进行转码,局限性太大。Another code stream rewriting method from SVC to H.264/AVC is a code stream rewriting mechanism based on a specific structure proposed by Hannukesela. This method proposes two code stream rewriting mechanisms with different structures. The first is that the enhancement layer only includes bidirectional predictive images and skippable images, and the bidirectional predictive images in the enhancement layer can be added to the basic layer to form a single AVC code stream after some simple processing. The other is that the SVC coding structure is similar to simulcasting. Each layer of SVC uses independent coding, and there is no reference and prediction between layers. At the transcoding end, simple judgment is made on each layer of the SVC code stream to decide whether to discard it, and then the AVC code stream can be generated by simply modifying the data header information. Although the transcoding operation of this method is simple, it requires strict control at the encoding end, and can only transcode for the above two specific SVC code stream structures, which has too many limitations.

发明内容 Contents of the invention

本发明旨在解决现有技术中存在的技术问题,特别创新地提出了一种基于P2PVoD视频点播系统的H.264/SVC到H.264/AVC的转码方法,将SVC文件按层分割成独立的多层文件,在转码前,根据终端能力进行空间层和质量层的自适应过程,丢弃不需要的层,使这个转码过程不仅有效地减少了不必要的时间开销,并为客户端提供了与之能力相匹配的视频质量。The present invention aims to solve the technical problems existing in the prior art, and particularly innovatively proposes a transcoding method from H.264/SVC to H.264/AVC based on the P2PVoD video-on-demand system, and divides the SVC file into For independent multi-layer files, before transcoding, the adaptive process of spatial layer and quality layer is performed according to the terminal capability, and unnecessary layers are discarded, so that this transcoding process not only effectively reduces unnecessary time overhead, but also provides customers with The end provides video quality that matches its capabilities.

为了实现本发明的上述目的,本发明提供了一种基于P2PVoD视频点播系统的H.264/SVC到H.264/AVC的转码方法,其特征在于包括以下步骤:In order to realize the above-mentioned purpose of the present invention, the present invention provides a kind of transcoding method based on the H.264/SVC of P2PVoD video-on-demand system to H.264/AVC, it is characterized in that comprising the following steps:

S1、服务器端将SVC视频流分割为多个分层文件,其中该SVC视频流的空间层和质量层存放至对应的分层文件中,该分层文件的文件名为DQid=1+16×Did+Qid,Did表示空间层数,Qid表示质量层数,且该空间层由空间基础层和空间增强层组成,该质量层由质量基础层和质量增强层组成;S1. The server side divides the SVC video stream into multiple layered files, wherein the spatial layer and quality layer of the SVC video stream are stored in the corresponding layered file, and the file name of the layered file is DQ id =1+16 ×D id +Q id , D id represents the number of spatial layers, Q id represents the number of quality layers, and the spatial layer is composed of a spatial base layer and a spatial enhancement layer, and the quality layer is composed of a quality base layer and a quality enhancement layer;

S2、服务器端将该SVC视频流分层文件的相关信息封装至Torrent文件中;S2. The server side encapsulates the relevant information of the SVC video stream layered file into the Torrent file;

S3、客户端向服务器端请求下载SVC视频流并将客户端的处理能力信息发送给服务器端,其中该处理能力信息包括客户端的空间层最大处理量和质量层最大处理量;S3. The client requests the server to download the SVC video stream and sends the client's processing capability information to the server, wherein the processing capability information includes the client's maximum spatial layer processing capacity and quality layer maximum processing capacity;

S4、服务器端根据客户端反馈回的空间层最大处理量和质量层最大处理量,丢弃SVC视频流中超出该空间层最大处理量和质量层最大处理量的空间层和质量层对应的分层文件,从而实现空间和质量的自适应调节,获得SVC有效分层文件;S4. According to the maximum processing capacity of the spatial layer and the maximum processing capacity of the quality layer fed back by the client, the server side discards the layers corresponding to the spatial layer and the quality layer that exceed the maximum processing capacity of the spatial layer and the maximum processing capacity of the quality layer in the SVC video stream files, so as to realize the adaptive adjustment of space and quality, and obtain SVC effective layered files;

S5、对该SVC有效分层文件进行转码解码,从而获得重用信息;S5. Perform transcoding and decoding on the SVC effective layered file, so as to obtain reuse information;

S6、对该重用信息进行转码编码,从而获得AVC单层视频流。S6. Perform transcoding encoding on the reused information, so as to obtain an AVC single-layer video stream.

采用SVC自适应转码,使用分离器将SVC文件按层分割成独立的多层文件,在转码前,根据终端能力进行空间层和质量层的自适应过程,丢弃不需要的层。使这个转码过程不仅有效地减少了不必要的时间开销,并为客户端提供了与之能力相匹配的视频质量。SVC adaptive transcoding is adopted, and the SVC file is divided into independent multi-layer files by layer using a separator. Before transcoding, the adaptive process of the spatial layer and the quality layer is performed according to the terminal capability, and unnecessary layers are discarded. This transcoding process not only effectively reduces unnecessary time overhead, but also provides the client with video quality that matches its capabilities.

在所述步骤S2中Torrent文件记录了分层文件的层数、各分层文件所属的空间层Did和质量层Qid以及每个GOP的相对偏移位置。In the step S2, the torrent file records the number of layers of the layered files, the spatial layer D id and the quality layer Q id to which each layered file belongs, and the relative offset position of each GOP.

在所述步骤S3之前,如果该客户端不存在Torrent文件,还需要向服务器端请求下载该Torrent文件。Before the step S3, if the client does not have a torrent file, it needs to request the server to download the torrent file.

在所述步骤S5中采用像素域和变换域相结合的转码方式对该SVC有效分层文件进行转码:针对SVC质量基础层的残差数据以及质量增强层未采用层间残差预测的码流,实行变换域转码;In the step S5, the transcoding method combining the pixel domain and the transform domain is used to transcode the SVC effective layered file: for the residual data of the SVC quality base layer and the quality enhancement layer that does not use inter-layer residual prediction Code stream, implement transform domain transcoding;

针对SVC所有空间层以及质量增强层采用了层间残差预测的码流,实行像素域转码。采用像素域和变换域结合的方式,既降低了时间复杂度又有效地控制了误差漂移。For all spatial layers and quality enhancement layers of SVC, the code stream using inter-layer residual prediction is implemented to perform pixel domain transcoding. The combination of pixel domain and transform domain not only reduces the time complexity but also effectively controls the error drift.

在所述步骤S6中采用基于Lagrangian的编码优化控制算法,选用帧内模式和帧间模式两种编码模式对上述重用信息进行转码编码,从而获得AVC单层视频流。In the step S6, a coding optimization control algorithm based on Lagrangian is adopted, and two coding modes, intra mode and inter mode, are selected to perform transcoding coding on the above reused information, thereby obtaining an AVC single-layer video stream.

在帧内模式下,在求取平均失真函数时选用绝对误差函数SAD来计算。在求解平均失真函数时,采用绝对误差函数SAD代替绝对值均方函数SSD,简化了计算复杂度。In the intra-frame mode, the absolute error function SAD is used to calculate the average distortion function. When solving the average distortion function, the absolute error function SAD is used instead of the absolute value mean square function SSD, which simplifies the computational complexity.

在SVC视频流输入至服务器端之前,SVC编码器通过参数设定GOP特性,将各个GOP独立编码,即每个GOP中包含一个IDR帧,并以IDR帧作为首帧,IDR帧不但能独立重构完整图像,并能禁止其后的帧向自己前面帧做参考,这样有效地截断了不同GOP的参考关系,让每个GOP都能在转码过程中进行独立的解码。Before the SVC video stream is input to the server, the SVC encoder sets the GOP characteristics through parameters, and encodes each GOP independently, that is, each GOP contains an IDR frame, and takes the IDR frame as the first frame. It can construct a complete image, and can prohibit subsequent frames from making reference to its previous frame, which effectively cuts off the reference relationship of different GOPs, so that each GOP can be independently decoded during the transcoding process.

在转码解码过程中,采用以GOP图组为单位,启动不同的转码线程,对GOP进行并行线程转码,处理之后再进行解码图像的重排序,得到最后的AVC单层视频流。采用基于GOP并行的线程处理机制,利用线程并行处理单独编码的GOP,大大减少了转码时间,且编程实现容易,程序理解性强,为实时转码提供了强有力的保障。In the process of transcoding and decoding, different transcoding threads are started based on the GOP picture group, parallel thread transcoding is performed on the GOP, and after processing, the decoded images are reordered to obtain the final AVC single-layer video stream. Adopting GOP-based parallel thread processing mechanism, using threads to process separately encoded GOPs in parallel, greatly reduces the transcoding time, and the programming is easy to implement, and the program is easy to understand, providing a strong guarantee for real-time transcoding.

每个线程至少有一个GOP的缓存区,用于预缓存待该线程处理的GOP,每个线程等到有整个GOP准备好之后才进行线程转码,其中该GOP的预缓存时间为Delay=N*M/f,N代表总线程数,M代表每个GOP的size大小,f代表待转码视频的帧率。Each thread has at least one GOP buffer area, which is used to pre-cache the GOP to be processed by the thread. Each thread waits until the entire GOP is ready before performing thread transcoding, wherein the pre-caching time of the GOP is Delay=N* M/f, N represents the total number of threads, M represents the size of each GOP, and f represents the frame rate of the video to be transcoded.

线程数越少,预缓存时间越短,而转码时间处理越长,在实际的转码过程中应根据实际视频的大小以及服务器自身的CPU和内存的处理能力,开启适当的线程数。The fewer the number of threads, the shorter the pre-caching time, and the longer the transcoding time. In the actual transcoding process, an appropriate number of threads should be enabled according to the actual video size and the server's own CPU and memory processing capabilities.

综上所述,由于采用了上述技术方案,本发明的有益效果是:In summary, owing to adopting above-mentioned technical scheme, the beneficial effect of the present invention is:

1、采用SVC自适应转码,使用分离器将SVC文件按层分割成独立的多层文件,在转码前,根据终端能力进行空间层和质量层的自适应过程,丢弃不需要的层。使这个转码过程不仅有效地减少了不必要的时间开销,并为客户端提供了与之能力相匹配的视频质量;1. SVC adaptive transcoding is adopted, and the SVC file is divided into independent multi-layer files by layer using a separator. Before transcoding, the adaptive process of the spatial layer and the quality layer is performed according to the terminal capability, and unnecessary layers are discarded. This transcoding process not only effectively reduces unnecessary time overhead, but also provides the client with video quality that matches its capabilities;

2、采用像素域和变换域结合的方式,既降低了时间复杂度又有效地控制了误差漂移;2. The combination of pixel domain and transform domain is adopted, which not only reduces the time complexity but also effectively controls the error drift;

3、采用基于Lagrangian的编码控制优化算法,在求解平均失真函数时,采用绝对误差函数SAD代替绝对值均方函数SSD,简化了计算复杂度;3. Using the Lagrangian-based encoding control optimization algorithm, when solving the average distortion function, the absolute error function SAD is used instead of the absolute value mean square function SSD, which simplifies the computational complexity;

4、采用基于GOP并行的线程处理机制,利用线程并行处理单独编码的GOP,大大减少了转码时间,且编程实现容易,程序理解性强,为实时转码提供了强有力的保障。4. Adopt GOP-based parallel thread processing mechanism, use threads to process GOP encoded separately, greatly reduce transcoding time, and programming is easy to implement, program comprehension is strong, providing a strong guarantee for real-time transcoding.

本发明的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.

附图说明 Description of drawings

本发明的上述和/或附加的方面和优点从结合下面附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and comprehensible from the description of the embodiments in conjunction with the following drawings, wherein:

图1是本发明的流程框图;Fig. 1 is a block flow diagram of the present invention;

图2是本发明的具体流程图;Fig. 2 is the concrete flowchart of the present invention;

图3是GOP并行线程转码示意图;Fig. 3 is a schematic diagram of GOP parallel thread transcoding;

图4是GOP并行处理的线程流程图。Fig. 4 is a thread flowchart of GOP parallel processing.

具体实施方式 detailed description

下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present invention and should not be construed as limiting the present invention.

在本发明的描述中,除非另有规定和限定,需要说明的是,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是机械连接或电连接,也可以是两个元件内部的连通,可以是直接相连,也可以通过中间媒介间接相连,对于本领域的普通技术人员而言,可以根据具体情况理解上述术语的具体含义。In the description of the present invention, unless otherwise specified and limited, it should be noted that the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it can be mechanical connection or electrical connection, or two The internal communication of each element may be directly connected or indirectly connected through an intermediary, and those of ordinary skill in the art may understand the specific meanings of the above terms according to specific situations.

该基于P2PVoD视频点播系统的H.264/SVC到H.264/AVC的转码方法包括转码预处理过程、转码解码过程和转码编码过程,如图1所示。转码方案的输入是经SVC分离器处理后的层与层单独的SVC分片文件,输出为H.264/AVC单层码流。在转码预处理部分,主要根据客户端的处理能力,进行SVC空间和质量的自适应过程。在转码解码部分,主要完成转码重用信息的提取。在转码的编码部分进行AVC的重编码。The transcoding method from H.264/SVC to H.264/AVC based on the P2PVoD video-on-demand system includes a transcoding preprocessing process, a transcoding decoding process and a transcoding encoding process, as shown in FIG. 1 . The input of the transcoding scheme is the layer-by-layer SVC slice file processed by the SVC splitter, and the output is the H.264/AVC single-layer code stream. In the transcoding preprocessing part, the adaptive process of SVC space and quality is carried out mainly according to the processing capability of the client. In the transcoding and decoding part, the extraction of transcoding reuse information is mainly completed. AVC re-encoding is performed in the encoding part of the transcoding.

SVC到AVC的综合转码方案,如图2所示,具体步骤如下:The comprehensive transcoding scheme from SVC to AVC is shown in Figure 2, and the specific steps are as follows:

在转码预处理部分,对经过分离器处理之后的SVC按层分片文件进行空间分辨率或者是质量的自适应处理,根据客户端的处理能力、分辨率及质量的需求进行有针对性的层丢弃,选择适合用户H.264/AVC解码器设备的分辨率及质量层及该层以下的所有层作为转码输入。In the transcoding preprocessing part, the spatial resolution or quality adaptive processing is performed on the SVC layer-by-layer fragmented files processed by the separator, and targeted layers are performed according to the client's processing capability, resolution and quality requirements. Discard, select the resolution and quality layer suitable for the user's H.264/AVC decoder device and all layers below this layer as transcoding input.

在转码解码部分,进行熵解码,再经过反量化,反变换,层间帧内预测和层间运动补偿等过程,得到转码编码重建图像所需要的视频图像信息进行保存。此外,由熵解码得到的所有参考图像信息,包括所有宏块的模式信息和运动矢量信息,将直接为转码编码所用。In the transcoding decoding part, entropy decoding is performed, and then through the process of inverse quantization, inverse transformation, inter-layer intra prediction and inter-layer motion compensation, the video image information required for transcoding and reconstructing images is obtained and stored. In addition, all reference image information obtained by entropy decoding, including mode information and motion vector information of all macroblocks, will be directly used for transcoding.

在视频的转码编码部分,即AVC的重构模块,延续AVC编码器的作法,采用变换和预测的混合编码方法。在转码编码的模式选择中,充分利用转码解码端的模式选择和运动信息,尽量在保证质量的情况下,利用有效的模式选择,降低计算的复杂度。In the transcoding part of the video, that is, the reconstruction module of AVC, the method of AVC encoder is continued, and the mixed coding method of transformation and prediction is adopted. In the mode selection of the transcoding encoding, the mode selection and motion information of the transcoding decoding end are fully utilized, and the effective mode selection is used to reduce the complexity of calculation while ensuring the quality as much as possible.

H.264/AVC的编码经过余弦变换、量化后产生一组量化后的变换系数再经过熵编码,与前面转码解码后经过处理的一些解码所需的头信息(如预测模式量化参数、运动矢量等)一起组成一个单层的AVC码流,经过NAL供传输和存储,供客户端解码播放。The encoding of H.264/AVC undergoes cosine transform and quantization to produce a set of quantized transform coefficients, which are then entropy encoded, and some header information required for decoding (such as prediction mode quantization parameters, motion Vector, etc.) together form a single-layer AVC stream, which is transmitted and stored through NAL, and decoded and played by the client.

该转码预处理过程由以下步骤组成:The transcoding preprocessing process consists of the following steps:

A1、在服务器端,SVC视频流经SVC分离器处理后,分割成多个单独的分层文件,其中该SVC视频流的空间层和质量层存放至对应的分层文件中,该分层文件的文件名为DQid=1+16×Did+Qid,Did表示空间层数,Qid表示质量层数。采用分层文件并采用DQid对分层文件命名,便于在分发过程中快速定位目标SVC视频流。A1. On the server side, after the SVC video stream is processed by the SVC splitter, it is divided into multiple separate layered files, wherein the spatial layer and quality layer of the SVC video stream are stored in the corresponding layered file, and the layered file The file name of DQ id =1+16×D id +Q id , where D id represents the number of spatial layers, and Q id represents the number of quality layers. Use layered files and use DQ id to name the layered files, which is convenient for quickly locating the target SVC video stream during the distribution process.

在本发明的实施例中针对SVC视频基础分层文件,Did=0且Qid=0,其文件名为DQid=1+16×Did+Qid=1;In an embodiment of the present invention, for SVC video basic layered files, D id =0 and Q id =0, its file name is DQ id =1+16×D id +Q id =1;

针对SVC视频第一增强分层文件,Did=0且Qid=1,其文件名为DQid=1+16×0+1=2;For the first enhanced layered file of SVC video, D id =0 and Q id =1, its file name is DQ id =1+16×0+1=2;

针对SVC视频第二增强分层文件,Did=1且Qid=0,其文件名为DQid=1+16×1+0=17;For the second enhanced layered file of SVC video, D id =1 and Q id =0, its file name is DQ id =1+16×1+0=17;

针对SVC视频第三增强分层文件,Did=1且Qid=1,其文件名为DQid=1+16×1+1=18。For the third enhanced layered file of SVC video, D id =1 and Q id =1, and its file name is DQ id =1+16×1+1=18.

A2、在服务器端,将该SVC视频流分层文件的相关信息封装至Torrent文件中,其中该Torrent文件记录了分层文件的层数、各分层文件所属的空间层Did和质量层Qid以及每个GOP(Group of Picture,图组)的相对偏移位置,便于在分发过程中对需要下载的数据进行快速定位。A2, on the server side, encapsulate the relevant information of the layered file of the SVC video stream into the Torrent file, wherein the Torrent file records the number of layers of the layered file, the spatial layer D id and the quality layer Q to which each layered file belongs id and the relative offset position of each GOP (Group of Picture, group of pictures), which is convenient for quickly locating the data to be downloaded during the distribution process.

A3、客户端向服务器端请求下载Torrent文件。当然,如果客户端已经存在Torrent文件则不必下载该Torrent文件。A3. The client requests the server to download the Torrent file. Of course, if the torrent file already exists on the client, it is not necessary to download the torrent file.

A4、客户端向服务器端请求下载SVC视频流并将客户端的处理能力信息发送给服务器端,其中该处理能力信息包括客户端的空间层最大处理量和质量层最大处理量。A4. The client requests the server to download the SVC video stream and sends the client's processing capability information to the server, wherein the processing capability information includes the client's maximum spatial layer processing capacity and quality layer maximum processing capacity.

A5、服务器端根据客户端反馈回的空间层最大处理量和质量层最大处理量,丢弃SVC视频流中超出该空间层最大处理量和质量层最大处理量的空间层和质量层对应的分层文件,从而实现空间和质量的自适应调节,获得SVC有效分层文件。空间和质量的自适应调节过程类似于为了减少转码复杂度,在SVC视频流转码之前进行的SVC视频流自适应抽取过程,不同的是本发明首先将SVC视频流分割成多个分层文件,在SVC视频流转码之前只需直接丢弃不需要的分层文件,而不必在SVC视频流转码之前自适应抽取SVC视频流,由此不仅减少了转码复杂度,而且缩短了转码时间,提高了转码效率。A5. According to the maximum processing capacity of the spatial layer and the maximum processing capacity of the quality layer fed back by the client, the server discards the layers corresponding to the spatial layer and the quality layer that exceed the maximum processing capacity of the spatial layer and the maximum processing capacity of the quality layer in the SVC video stream files, so as to realize the adaptive adjustment of space and quality, and obtain SVC effectively layered files. The adaptive adjustment process of space and quality is similar to the SVC video stream adaptive extraction process carried out before SVC video stream transcoding in order to reduce the complexity of transcoding, the difference is that the present invention first divides the SVC video stream into multiple layered files , just discard the unnecessary layered files directly before transcoding the SVC video stream, instead of adaptively extracting the SVC video stream before transcoding the SVC video stream, thus not only reducing the transcoding complexity, but also shortening the transcoding time, Improved transcoding efficiency.

在本发明的实施例中服务器端的SVC视频流包括3个不同大小分辨率的空间层以及5个不同质量大小的质量层,而客户端的H.264/AVC的解码器最大能支持处理2个空间层和3个质量层(也即是说客户端的空间层最大处理量为2个,质量层最大处理量为3个),此时服务器端直接将SVC视频流中第三空间层对应的分层文件以及第四和第五质量层对应的分层文件丢弃。In the embodiment of the present invention, the SVC video stream on the server side includes 3 spatial layers of different sizes and resolutions and 5 quality layers of different quality sizes, while the client's H.264/AVC decoder can support processing 2 spatial layers at most layer and 3 quality layers (that is to say, the maximum processing capacity of the spatial layer of the client is 2, and the maximum processing capacity of the quality layer is 3), at this time, the server directly converts the layer corresponding to the third spatial layer in the SVC video stream Files and layered files corresponding to the fourth and fifth quality layers are discarded.

该转码解码过程由以下步骤组成:The transcoding decoding process consists of the following steps:

B1、对上述SVC有效分层文件进行转码解码,从而获得重用信息。B1. Perform transcoding and decoding on the above SVC effective layered file, so as to obtain reuse information.

目前,常见的转码方式有像素域转码(Spatial Domain TranscodingArchitecture,SDTA)和变换域转码(Frequency-Domain Transcoding Architecture,FDTA)。SDTA需要将码流解码到像素域再进行重写编码,计算复杂度高于FDTA,但不存在误差漂移,率失真性能较好;而FDTA只需将码流解码到变换域,降低了转码的复杂度,但H.264/SVC引入的非线性预算会导致误差漂移,率失真性能不如SDTA。Currently, common transcoding methods include pixel domain transcoding (Spatial Domain Transcoding Architecture, SDTA) and transform domain transcoding (Frequency-Domain Transcoding Architecture, FDTA). SDTA needs to decode the code stream into the pixel domain and then rewrite the code. The computational complexity is higher than that of FDTA, but there is no error drift, and the rate-distortion performance is better; while FDTA only needs to decode the code stream into the transform domain, which reduces the transcoding. The complexity, but the nonlinear budget introduced by H.264/SVC will cause error drift, and the rate-distortion performance is not as good as SDTA.

因此,在本发明中既要考虑整数余弦变换(Integer Digital ConsineTransform,IDCT)去块效应滤波器(Deblocking Filter,DF)的等非线性操作引起的错误漂移导致的视频质量下降问题,对误差漂移进行有效的控制,又要考虑在转码时间复杂度上的考虑,尽可能的节约编码时间。Therefore, in the present invention, the problem of video quality degradation caused by error drift caused by non-linear operations such as integer cosine transform (Integer Digital Consine Transform, IDCT) deblocking filter (Deblocking Filter, DF) will be considered, and the error drift is carried out. For effective control, it is also necessary to consider the complexity of transcoding time to save encoding time as much as possible.

为了在率失真性能和复杂度之间进行了更好的折衷,本发明采用像素域和变换域相结合的转码方案:针对SVC质量基础层的残差数据以及质量增强层未采用层间残差预测的码流,实行变换域转码,包括熵解码、反量化,其不必在转码解码端的反量化之后进行反变换过程,同样,在转码编码端也不需进行变换过程,有效的降低了编码的时间,并且由于这部分码流不存在增强层间的预测,也有效控制了层间的错误漂移。In order to achieve a better compromise between rate-distortion performance and complexity, the present invention adopts a transcoding scheme combining the pixel domain and the transform domain: for the residual data of the SVC quality base layer and the quality enhancement layer, no inter-layer residual data is used. The difference-predicted code stream implements transform domain transcoding, including entropy decoding and inverse quantization. It does not need to perform inverse transformation process after inverse quantization at the transcoding decoding end. Similarly, it does not need to perform transformation process at the transcoding encoding end. Effective The encoding time is reduced, and since there is no enhanced inter-layer prediction in this part of the code stream, the error drift between layers is also effectively controlled.

针对SVC所有空间层(包括空间基础层和空间增强层)以及质量增强层采用了层间残差预测的码流,实行像素域转码,这样有效地控制了错误偏移,增强了转码的率失真性能。For all the spatial layers of SVC (including the spatial base layer and the spatial enhancement layer) and the quality enhancement layer, the inter-layer residual prediction code stream is used, and the pixel domain transcoding is implemented, which effectively controls the error offset and enhances the transcoding performance. rate-distortion performance.

转码编码的过程由以下步骤组成:The process of transcoding encoding consists of the following steps:

C1、基于Lagrangian的编码优化控制算法对上述重用信息进行转码编码控制,再经过变换、量化、重排序、熵解码等AVC编码正常流程从而获得AVC单层视频流。由于H.264采用了混合编码方式,因此上述重用信息选择帧内模式和帧间模式两种编码模式。编码器通过最小化Lagrangian代价函数实现对每一个宏块的编码模式的选定。宏块的Lagrangian代价函数为JMODE(Sk,Ik,|Q,λMODE)=DREC(Sk,Ik,|Q)-λMODE×RREC(Sk,Ik,|Q)C1. The Lagrangian-based coding optimization control algorithm performs transcoding coding control on the above reused information, and then obtains an AVC single-layer video stream through normal AVC coding processes such as transformation, quantization, reordering, and entropy decoding. Since H.264 adopts a hybrid coding mode, the above reuse information selects two coding modes, the intra mode and the inter mode. The encoder selects the encoding mode for each macroblock by minimizing the Lagrangian cost function. The Lagrangian cost function of a macroblock is J MODE (S k , I k , |Q, λ MODE )=D REC (S k , I k , |Q)-λ MODE ×R REC (S k , I k , |Q )

其中S表示图像序列,该图像序列S被分割成K个不同的图像块Ak,图像块Ak对应的像素值表示为Sk,图像块Ak对应的编码模式表示为Ik,且像素值Sk对应的编码模式为Qk。,λMODE表示与量化参数有关的Lagrangian算子,其计算公式为where S represents an image sequence, and the image sequence S is divided into K different image blocks A k , the pixel value corresponding to the image block A k is denoted as S k , the coding mode corresponding to the image block A k is denoted as I k , and the pixel The encoding mode corresponding to the value S k is Q k . , λ MODE represents the Lagrangian operator related to the quantization parameter, and its calculation formula is

λMODE=0.85×2(Q-12)/3 λ MODE = 0.85×2 (Q-12)/3

在数字视频压缩编码中,常用的平均失真函数DREC(Sk,Ik,|Q)为由宏块的原始像素和重建像素决定。一般由其差值的绝对误差和函数SAD、绝对值平方和函数SSD以及均方误差函数MSE三种计算方法。本发明中,为了简化模式选择中的算法,采用SAD算法来代替传统编码中采用的SSD算法。In digital video compression coding, the commonly used average distortion function D REC (S k , I k , |Q) is determined by the original pixels and reconstructed pixels of the macroblock. Generally, there are three calculation methods: the absolute error sum function SAD of the difference, the absolute value square sum function SSD and the mean square error function MSE. In the present invention, in order to simplify the algorithm in mode selection, the SAD algorithm is used to replace the SSD algorithm used in traditional coding.

在帧内模式下,SAD公式如下:In intra mode, the SAD formula is as follows:

SADSAD == ΣΣ (( xx ,, ythe y )) ∈∈ AA || sthe s [[ xx ,, ythe y ,, tt ]] -- cc [[ xx ,, ythe y ,, tt ]] ||

其中s[x,y,t]为当前视频编码图像,c[x,y,t]为参考帧数据。Where s[x, y, t] is the current video coded image, and c[x, y, t] is the reference frame data.

在帧间模式下,由于采用了基于块的运动估计,Lagrangian代价函数要比帧内模式复杂。本方案通过Lagrangian代价函数(块匹配误差函数)计算待编码图像块与参考图像块之间的最小匹配误差,挑选出具有最小匹配误差的参考块,取这两个块之间的位移作为运动估计的运动矢量块。对于帧间编码模式的块s(x,y,t),其运动矢量为mv,在给定Lagrangian参数λmotion和参考图像c的情况下,其代价函数最小化模型为:In Inter mode, the Lagrangian cost function is more complex than Intra mode due to block-based motion estimation. This scheme calculates the minimum matching error between the image block to be encoded and the reference image block through the Lagrangian cost function (block matching error function), selects the reference block with the minimum matching error, and takes the displacement between the two blocks as the motion estimation motion vector blocks. For a block s(x, y, t) in inter-frame coding mode, its motion vector is mv, given the Lagrangian parameter λ motion and the reference image c, its cost function minimization model is:

Jmotion(s,λmotion)=Dmotion(s,c)-λmotion×Rmotion(s,c)J motion (s, λ motion ) = D motion (s, c) - λ motion × R motion (s, c)

其中λmotion为Lagrangian参数,其值为 Rmotion(s,c)为该运动矢量的比特数。其失真度Dmotion(Sk,Ik,|Q)也采用绝对值误差SSD公式来求解,具体公式如下:Among them, λ motion is a Lagrangian parameter whose value is R motion (s, c) is the number of bits of the motion vector. The distortion degree D motion (S k , I k , |Q) is also solved by the absolute value error SSD formula, and the specific formula is as follows:

SADSAD == ΣΣ (( xx ,, ythe y )) ∈∈ AA || sthe s [[ xx ,, ythe y ,, tt ]] -- cc [[ xx -- mvmv xx ,, ythe y -- mvmv ythe y ,, tt -- mvmv tt ]] ||

其中s[x,y,t]表示当前视频编码图像,c表示参考帧数据,mv表示这两块直接的运动矢量。Among them, s[x, y, t] represents the current video coded image, c represents the reference frame data, and mv represents the direct motion vector of these two blocks.

本发明为了满足P2PVoD视频点播系统中实时性较高的要求,采用GOP级图组并行转码的处理方案,如图3所示,在生成SVC编码文件时,SVC编码器通过参数设定GOP特性,将各个GOP独立编码,即每个GOP中包含一个IDR帧,并以IDR帧作为首帧,IDR帧不但能独立重构完整图像,并能禁止其后的帧向自己前面帧做参考,这样有效地截断了不同GOP的参考关系,让每个GOP都能在转码过程中进行独立的解码。In order to meet the higher real-time requirements in the P2PVoD video-on-demand system, the present invention adopts a GOP-level graphic group parallel transcoding processing scheme, as shown in Figure 3, when generating an SVC encoded file, the SVC encoder sets the GOP characteristics through parameters , each GOP is encoded independently, that is, each GOP contains an IDR frame, and the IDR frame is used as the first frame. The IDR frame can not only independently reconstruct the complete image, but also prohibit the subsequent frames from making reference to the previous frame. In this way It effectively truncates the reference relationship of different GOPs, so that each GOP can be independently decoded during the transcoding process.

GOP并行转码处理机制流程如图4所示,在服务器对SVC分层文件进行空间/质量自适应后,定位到需要转码的视频序列。由于每个GOP图组为单独编码,所以在转码解码的过程中,GOP也能进行单独的内部转码。因此解码可以采用以GOP图组为单位,启动不同的转码线程,对GOP进行并行转码处理,处理之后再进行解码图像的重排序,得到最后的AVC视频数据码流。从图中可以看出,每个线程必须在等到有整个GOP准备好之后,才能进行线程转码。这要求每个线程至少有一个GOP的缓存区,存放待该线程处理的GOP,并且从整个并行方案看,这个预缓存也需要时间,这就造成了一定的时延。具体的时延时间,可参照以下公式:The process flow of the GOP parallel transcoding processing mechanism is shown in Figure 4. After the server performs space/quality adaptation on the SVC layered file, it locates the video sequence that needs to be transcoded. Since each GOP picture group is coded separately, in the process of transcoding and decoding, GOP can also perform separate internal transcoding. Therefore, decoding can use GOP as a unit to start different transcoding threads, perform parallel transcoding processing on GOP, and then reorder the decoded images after processing to obtain the final AVC video data stream. It can be seen from the figure that each thread must wait until the entire GOP is ready before performing thread transcoding. This requires each thread to have at least one GOP buffer area to store the GOPs to be processed by the thread, and from the perspective of the entire parallel solution, this pre-caching also takes time, which causes a certain delay. For the specific delay time, refer to the following formula:

Delay=N*M/fDelay=N*M/f

其中Delay表示整个GOP并行方案需要的预缓存时间;N代表总线程数;M代表每个GOP的size大小;f代表待转码视频的帧率。例如,程序共开启了两个线程,GOP的size为8,视频帧率为30fps,则预缓存时间Delay=2*8/30=0.5333秒。由此,可以看出,线程数目越少,预缓存时间越短,但线程越少,转码时间处理越长。所以在实际操作中,可根据实际视频的大小,来进行适应性调整,开启合适的线程数,把预缓存时间和转码处理时间达到最好的折衷,使整个并行转码过程达到最优的时间性能。另外,也要考虑服务器自身的CPU和内存的处理能力,如果开启的线程数过多,会造成服务器负荷过大,让转码效率反而下降。Among them, Delay represents the pre-caching time required by the entire GOP parallel scheme; N represents the total number of threads; M represents the size of each GOP; f represents the frame rate of the video to be transcoded. For example, the program starts two threads, the GOP size is 8, and the video frame rate is 30fps, then the pre-cache time Delay=2*8/30=0.5333 seconds. From this, it can be seen that the smaller the number of threads, the shorter the pre-caching time, but the fewer threads, the longer the transcoding time. Therefore, in actual operation, adaptive adjustments can be made according to the size of the actual video, and an appropriate number of threads can be enabled to achieve the best compromise between the pre-caching time and the transcoding processing time, so that the entire parallel transcoding process can reach the optimum time performance. In addition, the processing power of the server's own CPU and memory must also be considered. If too many threads are opened, the server will be overloaded and the transcoding efficiency will decrease instead.

在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" mean that specific features described in connection with the embodiment or example , structure, material or characteristic is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

尽管已经示出和描述了本发明的实施例,本领域的普通技术人员可以理解:在不脱离本发明的原理和宗旨的情况下可以对这些实施例进行多种变化、修改、替换和变型,本发明的范围由权利要求及其等同物限定。Although the embodiments of the present invention have been shown and described, those skilled in the art can understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principle and spirit of the present invention. The scope of the invention is defined by the claims and their equivalents.

Claims (5)

1. one kind based on P2PVoD video on-demand system H.264/SVC arrive H.264/AVC turn Code method, it is characterised in that comprise the following steps:
SVC video flowing is divided into multiple hierarchical file, wherein this SVC video by S1, server end The space layer of stream and quality layers are deposited to corresponding hierarchical file, the file of this hierarchical file Entitled DQid=1+16 × Did+Qid, DidThe representation space number of plies, QidRepresent the quality number of plies, and This space layer is made up of spatial base layer and spatial enhancement layer, this quality layers by quality base layer and Quality enhancement layer forms;
The relevant information of this SVC video flowing hierarchical file is encapsulated to Torrent literary composition by S2, server end In part;
The request of S3, client downloads SVC video flowing and by the disposal ability of client Information is sent to server end, and wherein this disposal ability information includes that the space layer of client is maximum Treating capacity and quality layers maximum throughput, before SVC video is streamed to server end, SVC encoder sets GOP characteristic by parameter, by each GOP absolute coding, the most often Individual GOP comprises an every IDR frame, and using every IDR frame as first frame, every IDR frame not only can Independent reconstruct complete image, and can forbid that frame thereafter makes reference to oneself previous frame, so have Block to effect the referring-to relation of different GOP, each GOP can be entered in transcoding process The decoding that row is independent;
Space layer maximum throughput that S4, server end return according to client feedback and quality layers maximum Reason amount, abandons in SVC video flowing beyond this space layer maximum throughput and quality layers maximum The hierarchical file that the space layer of reason amount is corresponding with quality layers, thus realize the adaptive of space and quality Should regulate, it is thus achieved that the effective hierarchical file of SVC;
S5, hierarchical file effective to this SVC carry out transcoding decoding, thus obtain reuse information, adopt The transcoding mode hierarchical file effective to this SVC combined with pixel domain and transform domain carries out turning Code: residual error data and quality enhancement layer for SVC quality base layer are provided without inter-layer residue The code stream of prediction, carries out transform domain transcoding;Strengthen for all space layer of SVC and quality Layer have employed the code stream of inter-layer residue prediction, carries out pixel domain code conversion;
S6, this reuse information is carried out converting coding, thus obtain AVC single layer video stream;
Wherein, during transcoding decodes, use in units of GOP figure group, start different turning Code thread, carries out parallel thread transcoding to GOP, is decoded the weight of image after process again Sequence, obtains last AVC single layer video stream;
The buffer area of each thread at least GOP, treats this thread process for pre-cache GOP, each thread has waited until that whole GOP just carries out thread transcoding after being ready to, wherein The pre-cache time of this GOP is Delay=N M/f, and N represents total Thread Count, and M represents The size size of each GOP, f represents the frame per second treating transcoded video;
Thread Count is the fewest, and the pre-cache time is the shortest, and transcoding time-triggered protocol is the longest, at actual transcoding During should be according to the size of actual video and the CPU of server self and the process of internal memory Ability, opens suitable Thread Count.
The most according to claim 1 based on P2PVoD video on-demand system H.264/SVC To code-transferring method H.264/AVC, it is characterised in that: Torrent literary composition in described step S2 Part have recorded space layer D belonging to the number of plies of hierarchical file, each hierarchical fileidWith quality layers Qid And the relative deviation post of each GOP.
The most according to claim 1 based on P2PVoD video on-demand system H.264/SVC To code-transferring method H.264/AVC, it is characterised in that: before described step S3, if There is not Torrent file in this client, in addition it is also necessary to downloads this Torrent to server end request File.
The most according to claim 1 based on P2PVoD video on-demand system H.264/SVC To code-transferring method H.264/AVC, it is characterised in that: use in described step S6 based on The code optimization control algolithm of Lagrangian, selects frame mode and inter-frame mode two kinds coding Pattern carries out converting coding to above-mentioned reuse information, thus obtains AVC single layer video stream.
The most according to claim 4 based on P2PVoD video on-demand system H.264/SVC To code-transferring method H.264/AVC, it is characterised in that: in intra mode, put down asking for Absolute error function SAD is all selected to calculate during distortion function.
CN201210275670.5A 2012-08-03 2012-08-03 The code-transferring method H.264/SVC arrived H.264/AVC based on P2PVoD video on-demand system Expired - Fee Related CN102790905B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210275670.5A CN102790905B (en) 2012-08-03 2012-08-03 The code-transferring method H.264/SVC arrived H.264/AVC based on P2PVoD video on-demand system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210275670.5A CN102790905B (en) 2012-08-03 2012-08-03 The code-transferring method H.264/SVC arrived H.264/AVC based on P2PVoD video on-demand system

Publications (2)

Publication Number Publication Date
CN102790905A CN102790905A (en) 2012-11-21
CN102790905B true CN102790905B (en) 2016-08-17

Family

ID=47156189

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210275670.5A Expired - Fee Related CN102790905B (en) 2012-08-03 2012-08-03 The code-transferring method H.264/SVC arrived H.264/AVC based on P2PVoD video on-demand system

Country Status (1)

Country Link
CN (1) CN102790905B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9674522B2 (en) * 2013-04-08 2017-06-06 Qualcomm Incorporated Device and method for scalable coding of video information
US8955027B1 (en) 2013-11-21 2015-02-10 Google Inc. Transcoding media streams using subchunking
CN103731678B (en) * 2013-12-30 2017-02-08 世纪龙信息网络有限责任公司 Video file parallel transcoding method and system
CN105992018B (en) * 2015-02-11 2019-03-26 阿里巴巴集团控股有限公司 Streaming media transcoding method and apparatus
CN105992005A (en) * 2015-03-04 2016-10-05 广州市动景计算机科技有限公司 Video decoding method and device and terminal device
CN106412620A (en) * 2015-07-31 2017-02-15 华为技术有限公司 Code stream transmission method and device
CN105898319A (en) * 2015-12-22 2016-08-24 乐视云计算有限公司 Video transcoding method and device
CN105898621A (en) * 2016-05-30 2016-08-24 中国科学院深圳先进技术研究院 Scalable video transmission method, device and system
CN110546960B (en) * 2017-05-01 2022-09-06 真实网络公司 Multi-layer video streaming system and method
CN107087212B (en) * 2017-05-09 2019-10-29 杭州码全信息科技有限公司 Interactive panoramic video transcoding and playback method and system based on spatial scalable coding
CN109471715B (en) * 2018-09-17 2021-10-29 咪咕视讯科技有限公司 Transcoding task scheduling method, device and storage medium
CN111246215A (en) * 2018-11-28 2020-06-05 深圳市炜博科技有限公司 Video format conversion method and terminal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101507282A (en) * 2006-07-10 2009-08-12 夏普株式会社 Methods and systems for combining layers in a multi-layer bitstream
CN102123299A (en) * 2011-01-11 2011-07-13 中国联合网络通信集团有限公司 Playing method and device of telescopic video
CN102265535A (en) * 2008-12-22 2011-11-30 通用仪表公司 Method and apparatus for streaming multiple scalable coded video content to client devices at different encoding rates

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101507282A (en) * 2006-07-10 2009-08-12 夏普株式会社 Methods and systems for combining layers in a multi-layer bitstream
CN102265535A (en) * 2008-12-22 2011-11-30 通用仪表公司 Method and apparatus for streaming multiple scalable coded video content to client devices at different encoding rates
CN102123299A (en) * 2011-01-11 2011-07-13 中国联合网络通信集团有限公司 Playing method and device of telescopic video

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于H.264/SVC的P2P内容分发系统设计与实现;胡庆宝等;《电子技术应用》;20120731;第38卷(第7期);121-122 *

Also Published As

Publication number Publication date
CN102790905A (en) 2012-11-21

Similar Documents

Publication Publication Date Title
CN102790905B (en) The code-transferring method H.264/SVC arrived H.264/AVC based on P2PVoD video on-demand system
JP5384694B2 (en) Rate control for multi-layer video design
JP4109113B2 (en) Switching between bitstreams in video transmission
US8320450B2 (en) System and method for transcoding between scalable and non-scalable video codecs
JP4833296B2 (en) Multi-layered scalable video coding method and apparatus
JP5504336B2 (en) Scalable video encoding method, encoder and computer program
RU2452128C2 (en) Adaptive coding of video block header information
US8218619B2 (en) Transcoding apparatus and method between two codecs each including a deblocking filter
CN102318202B (en) System and method for transcoding between scalable and non-scalable video codecs
CN1234943A (en) decoder
JP2010539750A (en) Rate distortion optimization of inter-mode generation for error-resistant video coding
EP2942964B1 (en) Image encoding/decoding method and device and non-transitory computer-readable recording medium
CN105103563A (en) Method and apparatus for quantization matrix signaling and representation in scalable video coding
TWI538478B (en) Video coding sub-block sizing based on infrastructure capabilities and current conditions
AU2007234543A1 (en) System and method for transcoding between scalable and non-scalable video codecs
Sachdeva et al. Adding SVC spatial scalability to existing H. 264/AVC video
Alfonso et al. Performance analysis of the scalable video coding standard
Shen et al. Transcoding to FGS streams from H. 264/AVC hierarchical B-pictures
AU2012201234B2 (en) System and method for transcoding between scalable and non-scalable video codecs
Yusuf Impact analysis of bit error transmission on quality of H. 264/AVC video codec
Li et al. Hybrid bit-stream rewriting from scalable video coding to H. 264/AVC
Al-Muscati Scalable Transcoding of H. 264 Video
Inamdar Performance Evaluation Of Greedy Heuristic For SIP Analyzer In H. 264/SVC

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160817

Termination date: 20190803

CF01 Termination of patent right due to non-payment of annual fee