CN104469368B - A kind of pervasive cell phone platform VPU coding and decoding video method for testing performance - Google Patents

A kind of pervasive cell phone platform VPU coding and decoding video method for testing performance Download PDF

Info

Publication number
CN104469368B
CN104469368B CN201410742098.8A CN201410742098A CN104469368B CN 104469368 B CN104469368 B CN 104469368B CN 201410742098 A CN201410742098 A CN 201410742098A CN 104469368 B CN104469368 B CN 104469368B
Authority
CN
China
Prior art keywords
decoding
data
coding
test
video sequence
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.)
Active
Application number
CN201410742098.8A
Other languages
Chinese (zh)
Other versions
CN104469368A (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.)
Suzhou Institute, Southeast University
Original Assignee
Southeast 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 Southeast University filed Critical Southeast University
Priority to CN201410742098.8A priority Critical patent/CN104469368B/en
Publication of CN104469368A publication Critical patent/CN104469368A/en
Application granted granted Critical
Publication of CN104469368B publication Critical patent/CN104469368B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of H.264 coding and decoding video method for testing performance of the video processing unit (VPU) of pervasive cell phone platform, including:Cell phone platform using VPU carries out the H.264 system building of coding and decoding video, yuv video sequence, and H.264 H.264 H.264 the test of coding power consumption, yuv video sequence encode test, the H.264 test of decoding video stream speed and the H.264 test of decoding video stream power consumption of PSNR for the test of code rate, yuv video sequence.The present invention is a kind of to can adapt to various mobile phone models and the scheme that detects the above-mentioned VPU H.264 limiting performance of encoding and decoding is realized on cell phone platform, the invention avoids tradition can only adapt to certain model mobile phone carry out VPU H.264 encoding and decoding the drawbacks of, and its encoding and decoding performance efficiency can accurately be tested.

Description

A kind of pervasive cell phone platform VPU coding and decoding video method for testing performance
Technical field
The present invention relates to multimedia signal processing detection technique field, and in particular to a kind of pervasive cell phone platform VPU is regarded Frequency encoding and decoding method for testing performance.
Background technology
At present, 4G network technologies have been achieved with the achievement of stage, and intelligent terminal platform ripe can be passed using 4G Network transmission of the transferring technology as a new generation.By the data transmission performance of its protrusion, the function of 4G intelligent terminals gradually conforms to the principle of simplicity Single network communication turns to colourful multi-media communication amusement.The performance of intelligent mobile terminal real-time multimedia stream process is just Seem particularly important.At present, VPU is the main processing units of intelligent mobile terminal processing multimedia messages, and developer can be by VPU, which is obtained, makes multi-media communication entertainment software have more preferable user experience.But the performance of VPU encoding and decoding is only fully understood by, is opened Originator ability effective exploitation utilizes VPU.Accordingly, it is capable to the performance for accurately understanding various cell phone platform VPU is just particularly important.
SoC manufacturers of the mainstream and detail parameters information and handbook of underground VPU, developer can not pass through inspection information Mode learns the performance of current platform VPU, can only pass through the approach of test.But the performance of existing VPU H.264 encoding and decoding Test uses the test method for only coordinating single cell phone platform because without possessing universality.Different cell phone platform, it has to each From developing corresponding VPU H.264 encoding and decoding test method.So far without perfect detection VPU code rates, coding power consumption, volume Code PSNR, solution bit rate and the scheme for decoding power consumption.
The content of the invention
Goal of the invention:In order to solve the deficiencies in the prior art,
Technical solution:A kind of pervasive cell phone platform VPU coding and decoding video method for testing performance, it is characterised in that the party Method comprises the following steps:
The standard input tested using yuv video sequence as H.264 coding efficiency, is directly driven bottom VPU and carried out H.264 Video coding section and decoded portion;By the test to yuv video sequence H.264 coding efficiency, and to H.264 video flowing The test of decoding performance, obtains comprehensive code detection result or decodes testing result;The synthesis code detection result or decoding inspection Survey result to input with standard YUV, obtain encoding and decoding performance power consumption data;
Test to yuv video sequence H.264 coding efficiency, includes making, the survey of code rate of yuv video sequence Calculation, the measuring and calculating of coding power consumption and the measuring and calculating for encoding Y-PSNR;
Test to H.264 decoding video stream performance, including the H.264 making of video flowing, the measuring and calculating for solving bit rate, decoding The measuring and calculating of power consumption.Inputted by comprehensive code detection result or decoding testing result with standard YUV, obtain encoding and decoding performance power consumption Data;Camera in conventional test methodologies is avoided, or I/O operation introduces test result with online color space conversion Error.Directly drive bottom VPU and carry out video coding section H.264 and decoded portion.Avoid using high-rise encoding and decoding side Method introduces Camera, and then the error that the H.264 encoding and decoding performance power consumption test result to VPU is brought.
Further, to the test of yuv video sequence H.264 coding efficiency, following steps are specifically included:
Make scheme of the yuv video sequence of different colours form as input data:In the number of each frame image data The corresponding positions of YUV are exchanged in group;
Initialize MediaFormat, including initialization color format, transmission frame number, bit per second and I interframe per second Every;
The encoder object of MediaCodec is created, is followed after obtaining the corresponding inputoutput buffer of encoder into coding Ring, first reads a frame data and inserts in input buffer every time, the state of output buffer is then investigated, if in output buffer There are the data for having completed coding, then take out data;If the state of output buffer is Try Again Later, return after Continuous circulation, untill coding is completed, then no data then jumps out circulation.
Further, yuv video sequence H.264 in the test of coding efficiency yuv video sequence making, be conduct H.264 the video sequence ratio produced when the input data of encoder section and Y-PSNR are calculated in coding/decoding system with decoding Compared with original video sequence.
Beneficial effect:
1) the H.264 coding/decoding system in the present invention is different from traditional H.264 coding/decoding system, there is provided directly drives Bottom VPU carries out the mode of H.264 encoding and decoding, avoids using high-rise decoding method, it has to Camera is introduced, so that it is right The error that the H.264 encoding and decoding performance power consumption test result of VPU is brought, and solve and be difficult to extraction inspection in high-rise coding method The problem of surveying VPU performance parameters;
2) the H.264 coding/decoding system difference in the present invention and traditional H.264 coding/decoding system, are examined by comprehensive coding Survey result or decoding testing result to input with standard YUV, obtain encoding and decoding performance power consumption data, avoid what measuring and calculating performance took I/O operation and online color space conversion, make testing result more accurate;
3) the H.264 coding/decoding system in the present invention is adapted to different mobile phone models, can be according to different mobile phone VPU The color space adjust automatically of support configures the coding/decoding system.
4) a whole set of complete pervasive detection method for the H.264 performance of coding/decoding system is provided so that more The developer of media communication entertainment software can more easily test the indices of VPU.
Brief description of the drawings
Fig. 1 is that the present invention carries out video coding section flow chart H.264 in android system with VPU;
Fig. 2 is that the present invention carries out video decoding part flow chart H.264 in android system with VPU;
Fig. 3 is YUVPlanar forms.
Fig. 4 is YUVSemiPlanar forms
Fig. 5 is YUVPackedPlanar forms
Fig. 6 is the form of YV12
Embodiment
Further explanation is done to the present invention below in conjunction with the accompanying drawings.
H.264 the system of encoding and decoding, including driving VPU carry out video coding section H.264 and decoded portion, its work Flow distinguishes corresponding diagram 1 and Fig. 2.
(1) performance detection of the progress video coding section of VPU progress H.264 is driven.
Firstly the need of initialization MediaFormat, including color format, transmission frame number per second, bit per second, I frames Interval.The color format that wherein difference cell phone platform VPU is supported is different, pervasive in order to achieve the purpose that, can be according to lower section Method obtains the color format that current phone platform is supported:GetCapabilitiesForType methods are first used to obtain current The CodecCapabilities that mobile phone is supported, and read the colorFormats in CodecCapabilities and obtain mobile phone institute The color format of support, the common color format of Android phone mainly include following several:
COLOR_FormatYUV420Planar、COLOR_FormatYUV420SemiPlanar、COLOR_ FormatYUV420PackedPlanar etc., mutual difference is as shown in Fig. 3,4,5,6.Fig. 3-6 is in identical physics Under pixel format, the signal of above-mentioned color format.
Since the color format that each cell phone platform VPU is supported is different, the standard yuv video sequence that can be downloaded on network Color format be YV12, the color format supported with more than differs.The present invention is with conventional method in H.264 encoding and decoding Internal system do online color space conversion it is different, since the conversion for doing color space online is very time-consuming, influence survey Test result, therefore the present invention proposes to make scheme of the yuv video sequence of different colours form as input data in advance, makes Method is as follows:The corresponding positions of YUV are exchanged in the array of each frame image data, with YV12 to COLOR_ , only need to be by the data interchange of the data of Y location and U positions then for every frame data exemplified by FormatYUV420Planar conversions The effect of color space conversion is reached.
Then the encoder Encoder objects of MediaCodec are created, wherein MediaCodec is that android system provides Driving VPU api interface, the length and width of video sequence can be set according to demand handled by Encoder.Then Encoder is obtained Enter coding cycle after corresponding inputoutput buffer Buffer, first read a frame data every time and insert input buffer In InputBuffer, the state of output buffer OutputBuffer is then investigated, has been completed if having in OutputBuffer The data of coding, then take out data, if the state of OutputBuffer is Try Again Later, returns, continues cycling through, Until circulation is then jumped out in coding completion, then no data.When measuring code rate, System.currentTimeMillis is used Between at the beginning of each circulation of () mark and end time, the time for calculating to perform every time are ti, perform n times, total coding frame number For frame_cnt, then code rate velocity is:
Influence of the I/O operation taken in conventional test methodologies to rate test result, specific method are avoided in the present invention It is:Pre-read yuv video sequence is segmented in advance into memory, in coding cycle each time, in it can quickly read Deposit and data are inserted into InputBuffer, save a large amount of read access times.
In addition, heap file is not saved by the output data write-in file of OutputBuffer in actual test Generated time, the efficiently and accurately of rate test result is reached with this.When measuring coding power consumption, use System.currentTimeMillis () mark every time circulation at the beginning of between and the end time, calculate to perform every time when Between be ti, perform n times, it is V that circulation, which measures real-time voltage value, every timei, current value Ii, total coding frame number is frame_cnt, can Measure the power consumption P of encoding and decoding needed for every frameavgFor:
Wherein, real-time voltage value and current value can be by reading voltage_now and current_now in cell phone system File obtains, and the position of the mobile phone both of these documents storage of different production firm's productions is different, to reach universality, can pass through The production firm of mobile phone is obtained, with swich-case sentences by judging that different production firms reaches positioning both of these documents Purpose.When measuring PSNR, it need to be carried out since calculation amount is huge on PC, concrete operations are reading original video sequence kth frame The image I of size m × n, and the obtained kth frame image K after encoded decoding, can calculate as follows kth frame peak It is worth signal-to-noise ratio:
Wherein, MAXIFor the obtainable maximum value of each pixel, 256 are taken in this example;Wherein mean square error MSEkFor:
Each frame of comprehensive video, then can calculate whole video sequence average peak signal to noise ratio PSNRavgFor:
(2) VPU is driven to carry out the performance detection of H.264 video decoding part.
H.264 the workflow of video decoding system is as shown in Fig. 2, similar with H.264 video coding system.Wherein Inputted in InputBuffer for H.264 video flowing, for convenience of detection H.264 decoding performance, encoded in this example using the first step Data in the output of generation, i.e. Encoder OutputBuffer, the input as decoding process.Through Fig. 2, similar to coding Flow can by the input after decoding output Decoder OutputBuffer.In test rate and power consumption with encoding Test in system should be noted local identical, in order to avoid time-consuming I/O operation, H.264 video flowing will need to be previously segmented into reading Get in memory, the data of InputBuffer will directly be derived from memory, in addition, also selecting the output of OutputBuffer not In data write-in file.Solve what the method for bit rate measuring and calculating, the method for decoding power consumption measuring and calculating and real-time voltage electric current stream were read Method is similar with coded portion.Before PSNR calculating is carried out, first H.264 video decoding system slightly need to be rewritten, will The output data write-in file of OutputBuffer, meter is further processed for PSNR as the video sequence after the completion of decoding Calculate.
The above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications also should It is considered as protection scope of the present invention.

Claims (2)

1. a kind of pervasive cell phone platform VPU coding and decoding video method for testing performance, it is characterised in that this method includes following step Suddenly:
The standard input tested using yuv video sequence as H.264 coding efficiency, is directly driven bottom VPU and carries out regarding H.264 Frequency coded portion and decoded portion;By the test to yuv video sequence H.264 coding efficiency, and to H.264 decoding video stream The test of performance, obtains comprehensive code detection result or decodes testing result;Comprehensive code detection result or decoding testing result Inputted with standard YUV, obtain encoding and decoding performance power consumption data;
Test to yuv video sequence H.264 coding efficiency, including the making of yuv video sequence, the measuring and calculating of code rate, compile The measuring and calculating of code power consumption and the measuring and calculating for encoding Y-PSNR;
Test to H.264 decoding video stream performance, including the H.264 making of video flowing, the measuring and calculating of solution bit rate and decoding work( The measuring and calculating of consumption;Specifically, inputted in InputBuffer for H.264 video flowing, the number in Encoder OutputBuffer According to the input as decoding process;The input can be exported Decoder OutputBuffer after decoding;Will H.264 Video flowing is previously segmented into reading in memory, and the data of InputBuffer will directly be derived from memory;
The CodecCapabilities of current phone support is obtained using getCapabilitiesForType methods, and is read ColorFormats in CodecCapabilities obtains the color format that mobile phone is supported, makes different colours lattice accordingly The yuv video sequence of formula is as input data;It is different by judging with swich-case sentences when measuring encoding and decoding power consumption Coltage_now and current_now files in production firm's locating cellphone system, read real-time voltage value and current value;
The test to yuv video sequence H.264 coding efficiency, specifically includes following steps:
Make scheme of the yuv video sequence of different colours form as input data:In the array of each frame image data The corresponding position of the data of the data of Y location, the data of U positions and V positions is exchanged;
Initialize MediaFormat, including initialization color format, transmission frame number, bit per second and I frame periods per second;
The encoder object of MediaCodec is created, enters coding cycle after obtaining the corresponding inputoutput buffer of encoder, First read a frame data every time to insert in input buffer, the state of output buffer is then investigated, if having in output buffer The data of coding have been completed, then have taken out data;If the state of output buffer is Try Again Later, returns and continue Circulation, untill coding is completed, then no data then jumps out circulation;
Specifically, pre-read yuv video sequence is segmented into memory, in coding cycle each time, by can quickly read Memory data are inserted into InputBuffer, not by the output data of OutputBuffer write-in file.
2. a kind of pervasive cell phone platform VPU coding and decoding video method for testing performance as claimed in claim 1, its feature exist The making of yuv video sequence, is both used as H.264 encoding and decoding in, the yuv video the sequence H.264 test of coding efficiency The input data of encoder section in system, and also serve as what the video sequence that decoding produces compared during Y-PSNR measuring and calculating Original video sequence.
CN201410742098.8A 2014-12-08 2014-12-08 A kind of pervasive cell phone platform VPU coding and decoding video method for testing performance Active CN104469368B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410742098.8A CN104469368B (en) 2014-12-08 2014-12-08 A kind of pervasive cell phone platform VPU coding and decoding video method for testing performance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410742098.8A CN104469368B (en) 2014-12-08 2014-12-08 A kind of pervasive cell phone platform VPU coding and decoding video method for testing performance

Publications (2)

Publication Number Publication Date
CN104469368A CN104469368A (en) 2015-03-25
CN104469368B true CN104469368B (en) 2018-05-15

Family

ID=52914637

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410742098.8A Active CN104469368B (en) 2014-12-08 2014-12-08 A kind of pervasive cell phone platform VPU coding and decoding video method for testing performance

Country Status (1)

Country Link
CN (1) CN104469368B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105376565A (en) * 2015-12-11 2016-03-02 中国航空工业集团公司西安航空计算技术研究所 Audio and video coding chip test platform and method
CN105744278A (en) * 2016-02-16 2016-07-06 福建星网智慧科技股份有限公司 Android system based H264 coding and decoding method
CN108540735B (en) * 2018-06-12 2023-12-29 福州大学 FPGA-based video decoder IP soft verification system and verification method
CN112911278A (en) * 2021-01-28 2021-06-04 北京安兔兔科技有限公司 Image decoding performance test method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104159113A (en) * 2014-06-30 2014-11-19 北京奇艺世纪科技有限公司 Method and device for selecting video coding mode for Android system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7457461B2 (en) * 2004-06-25 2008-11-25 Avocent Corporation Video compression noise immunity

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104159113A (en) * 2014-06-30 2014-11-19 北京奇艺世纪科技有限公司 Method and device for selecting video coding mode for Android system

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
H.265/HEVC、VP9、H.264 编码算法比较及性能测试分析;何海东;《 广播与电视技术》;20141031;第41卷(第10期);全文 *
主流视频编解码软件的硬件性能分析与设计;汤旭龙;《计算机工程》;20140630;第40卷(第6期);全文 *
基于CUDA的H.264并行编码器研究与实现;苏华友;《中国优秀硕士学位论文全文数据库信息科技辑》;20120215;全文 *
基于GPU的H.264视频并行编解码器;江辉;《中国优秀硕士学位论文全文数据库信息科技辑》;20100715;全文 *
基于IMX53的视频编码的研究与应用;丁建桥;《无线电通信技术》;20140430;第40卷(第2期);正文第1-4页,附图3,表4,5 *

Also Published As

Publication number Publication date
CN104469368A (en) 2015-03-25

Similar Documents

Publication Publication Date Title
CN104469368B (en) A kind of pervasive cell phone platform VPU coding and decoding video method for testing performance
CN103227917B (en) Coding/decoding method and device
CN104094602B (en) Code and decode the method, apparatus and system of the validity mapping of the residual error coefficient of change of scale
CN105187117B (en) A kind of satellite telemetry solution code system
CN102306103B (en) Software development kit (SDK) module for Android real time streaming protocol (RTSP) player
RU2011117582A (en) VIDEO ENCODING WITH LARGE MACRO BLOCKS
CN102227132B (en) Motion vector prediction coding and decoding method, apparatus thereof and coding and decoding system
JP2007336573A5 (en)
CN107888953A (en) A kind of implementation method of new live broadcast system
CN105357570B (en) A kind of video flowing analysis method and system based on frame analysis
CN103533325B (en) A kind of depth image frame in decoding method, device and codec
US11064204B2 (en) Automatic video comparison of the output of a video decoder
CN105228000B (en) A kind of method and system of the complete hardware transcoding based on GPU
CN102668560A (en) Embedded graphics coding: reordered bitstream for parallel decoding
Herglotz et al. Power modeling for video streaming applications on mobile devices
CN105704489B (en) A kind of adaptive video motion vector steganography method based on macro block complexity
CN105556850B (en) Encoder, decoder and its operation method
CN105374359B (en) The coding method and system of voice data
WO2004090864A3 (en) Method and apparatus for the encoding and decoding of speech
CN103984555B (en) A kind of tree table is combined and drives Windows/Linux platform communications protocol source profiles methods
JP2006135792A5 (en)
CN110493604A (en) A method of 8K HEVC real-time coding is realized based on GPU cluster
CN102957966A (en) Player and method for embedding time in video frames of player
CN105208396B (en) A kind of encoding and decoding method and apparatus of video frame
CN103929650B (en) Depth coding unit coding method and decoding method, encoder and decoder

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20190422

Address after: 215123 Linquan Street 399, Dushu Lake Higher Education District, Suzhou Industrial Park, Jiangsu Province

Patentee after: Suzhou Institute, Southeast University

Address before: No. 2, four archway in Xuanwu District, Nanjing, Jiangsu

Patentee before: Southeast University