文档库 最新最全的文档下载
当前位置:文档库 › Optimizing HEVC CABAC Decoding with a Context Model Cache and Application-Specific Prefetching

Optimizing HEVC CABAC Decoding with a Context Model Cache and Application-Specific Prefetching

Optimizing HEVC CABAC Decoding with a Context Model Cache and Application-Specific Prefetching
Optimizing HEVC CABAC Decoding with a Context Model Cache and Application-Specific Prefetching

Optimizing HEVC CABAC Decoding with a Context Model Cache and Application-speci?c Prefetching

Philipp Habermann,Chi Ching Chi,Mauricio Alvarez-Mesa and Ben Juurlink

Embedded Systems Architecture Group

Technische Universit¨a t Berlin

Berlin,Germany

Email:{p.habermann,chi.c.chi,mauricio.alvarezmesa,b.juurlink}@tu-berlin.de

Abstract—Context-based Adaptive Binary Arithmetic Cod-ing is the entropy coding module in the most recent JCT-VC video coding standard HEVC/H.265.As in the predecessor H.264/A VC,CABAC is a well-known throughput bottleneck due to its strong data dependencies.Beside other optimizations, the replacement of the context model memory by a smaller cache has been proposed,resulting in an improved clock frequency.However,the effect of potential cache misses has not been properly evaluated.Our work?lls this gap and performs an extensive evaluation of different cache con?gura-tions.Furthermore,it is demonstrated that application-speci?c context model prefetching can effectively reduce the miss rate and make it negligible.Best overall performance results were achieved with caches of two and four lines,where each cache line consists of four context models.Four cache lines allow a speed-up of10%to12%for all video con?gurations while two cache lines improve the throughput by9%to15%for high bitrate videos and by1%to4%for low bitrate videos. Keywords-HEVC,H.265,CABAC,Cache,Prefetching

I.I NTRODUCTION

High Ef?ciency Video Coding(HEVC/H.265,[1])is the most recent video coding standard developed by the Joint Collaborative Team on Video Coding(JCT-VC).It allows the compression of videos with the same perceptive quality as its predecessor H.264/A VC([2])while requiring only half the bitrate.Context-based Adaptive Binary Arithmetic Coding(CABAC,[3],[4])has been a throughput bottleneck in A VC due to its sequential nature,and it still is in HEVC. CABAC operates on the bitstream and decodes binary sym-bols(bins)which are connected to form syntax elements that are used to control the remaining decoding steps.If possible, context models are used to estimate the probabilities that bins have a speci?c value.Context-coded bins are associated with context models to exploit statistical properties and thereby increase the compression rate.However,sometimes the probabilities cannot be accurately predicted.Because of that,the decoding of these so called bypass-coded bins goes without context models.

Strong bin-to-bin dependencies make low-level paral-lelization of CABAC decoding very challenging.Although high-level parallelization is possible in HEVC,it has to be enabled in the encoder which is not mandatory.Beside many other optimizations,the replacement of the context model memory in the data path by a smaller cache has been proposed[5],[6].This aims to shorten the critical path and increase the clock frequency and throughput.Unfortunately, the effect of potential cache misses has not been properly evaluated.Cache misses result in a performance degradation that might nullify a lot of the throughput improvements reached by the introduction of the cache.Prefetching has been proposed to address this issue[7],but a quantitative evaluation is also missing.In this paper we evaluate both, cache miss rate without and with prefetching,to justify if these are gainful optimizations.

Our work makes the following contributions:

?an optimized cache architecture(as a result of an extensive evaluation of different con?gurations)?an ef?cient context model memory layout regarding spatial locality and prefetching ef?ciency,as well as the corresponding prefetching algorithm

?an evaluation of prefetching ef?ciency for different cache con?gurations

The remaining paper is structured as follows.An overview of related work is provided in Section II.The proposed decoder architecture with a context model cache and a prefetching module is described in Section III.Afterwards, Section IV quantitatively evaluates the cache miss rate and prefetching ef?ciency for different cache con?gurations. Finally,our work is concluded in Section V.

II.R ELATED W ORK

Many implementations of CABAC hardware decoders have been proposed.Although most of them cover A VC,the general ideas are also applicable for HEVC.Additionally, HEVC CABAC is designed to allow higher throughput by various optimizations in the standard,such as a reduced fraction of context-coded bins,grouping of bypass-coded bins,a reduction of the total number of bins as well as more relaxed parsing and context selection dependencies[4]. Two architectural optimizations have proven themselves to be effective and at least one of them can be found in almost every proposed CABAC hardware decoder.The?rst one is the parallel decoding of multiple bins per clock cycle

2015 IEEE International Symposium on Multimedia

Figure1:Two-stage pipeline of the proposed decoder architecture.

[8],[9],[10].It is well-suited for bypass-coded bins because their decoding process is simple and does not require con-text models.The second optimization is pipelining which is used to overlap the decoding of consecutive bins and thereby increase the throughput.Most proposals agree on a conceptual four-stage pipeline for CABAC decoding:context selection(CS)→context load(CL)→arithmetic decoding (AD)→de-binarization(DB).However,often neighboring stages are merged because the ef?cient implementation of deep pipelining is very complex for CABAC due to strong bin-to-bin dependencies.For example,CS depends on the results of AD and DB,which might lead to a?ush of the complete pipeline.Decoders with three pipeline stages include[5]and[9].Yu-Hsin Chen et al.[8]propose a very deep pipeline.A?fth pipeline stage is added at the beginning to compute a binary decision tree that is used for state prefetching in the remaining stages and thereby reduces pipeline stalls.Additionally,their implementation decodes up to two bypass-coded bins per cycle,resulting in a throughput of up to2Gbin/s which represents the state-of-the-art.

The CL stage can be shortened when the context model memory is replaced by a small cache.The stage might be even removed when the cache?ts into an adjacent stage. The shorter pipeline might result in less pipeline stalls. Cached designs have been proposed[5],[6],[7],however the potential performance degradation due to cache misses has not been evaluated.Prefetching was used to reduce the cache miss rate[7],but results for this optimization were also not provided.Our work evaluates both,the cache miss rate and the effectiveness of prefetching.

III.A RCHITECTURE

The proposed decoder architecture is implemented with a two-stage pipeline(see Figure1).The Context Selection Stage computes the next state of the decoder control state machine,calculates the index of the required context model (CS)and accesses the context model cache.The cache is clocked with a phase-shifted clock signal to allow the access in the end of the pipeline stage.In the Binary Arithmetic Decoding stage one context-coded bin or up to two bypass-coded bins are decoded by the arithmetic decoder(AD).The decoded bins are fed back to the?rst stage and the context model is updated and written back to the Cache.Finally, de-binarization(DB)is performed to build syntax elements from the decoded bins.

A.Context Model Cache

A non-cached version of the decoder has been imple-mented as a reference where the context model memory is directly accessed.The memory contains sixteen memory sets of context models and is capable of fast in-memory copies. This allows the maintenance of multiple context model memory sets and thus supports ef?cient CABAC decoding when high-level parallelization tools(wavefront processing, tiles)are used.A cache can be used to replace the context model memory in the critical path and thereby allow a higher clock frequency.The cache fetches context model sets(CMS’s)from the memory and writes them back when they have to be replaced.In our implementation a cache miss results in a miss penalty of two clock cycles while the missing CMS is loaded from memory.CMS replacement is handled by a least recently used(LRU)policy.The cache is fully-associative and contains a generic number of cache lines(1to64)each storing one CMS.

Table I shows the optimized context model memory layout.Mostly,context models for the same type of syn-tax element are grouped to exploit spatial locality, e.g. last sig x/y prefix(ll.0-9),sig flags(ll.16-27)and absG1flags(ll.32-37).However,in some cases context models that are not logically connected are put in the same CMS(e.g.ll.10,11,29).The purpose is to have the required context model for sure if the decoder state machine can go to different states.A CMS contains four context models (4×7bit)because in most cases not more than four different context models are needed to decode a syntax element or a group of consecutive syntax elements of the same type.There are only?ve cases where more than four context models are needed(last sig x prefix Y32x32, last sig y prefix Y32x32,inter pred idc,sig Y4x4,

sig Cb/Cr4x4).In all other cases the required context models?t in a CMS.With a smaller CMS size,the re-quired context models for4×4transform sub-blocks do not?t because at least three sig coeff flags and four coeff abs level greater1flags are potentially needed. This is a critical issue as transform block decoding contains a high fraction of the decoded bins.Bigger CMS sizes require that context models for different types of syntax elements are merged to keep the memory overhead small.Unfortu-nately,the context models that are used for the decoding of consecutive groups of equal syntax elements often depend on different parameters.For example,sig coeff flags depend on the transform block size and scan pattern while coeff abs level greater1flags depend on the decoded bins in the previous4×4sub-block.B.Context Model Prefetching

Application-speci?c context model prefetching can signif-icantly reduce the miss rate in HEVC CABAC.Admittedly, the required context model often depends on the results of the previously decoded bin and cannot be prefetched early enough.However,most of the time one can be sure that the required context model is contained in a speci?c set of context models.If this set is available in the cache,it is not necessary to know the exact context model,but a hit is still guaranteed.

The prefetching module reads the current state of the control state machine,the decoder settings,some decoded syntax elements and the currently decoded bin.Based on this information,it selects up to two CMS candidates that are likely to be needed soon.As the module keeps track

of the CMS’s in the cache,it can see if they are already present.If one is not,a read request is sent to the context model memory.The?rst candidate has a higher priority than the second,so the second is only fetched when the?rst is already available.Unfortunately this can lead to a behavior where the?rst line is available and will be replaced by the second because it is the next to be replaced according to LRU.A refresh mechanism is implemented to avoid this

behavior.This is done by resetting the LRU index of the?rst context model set candidate if it is already in the cache.As a result,it will not be replaced next.The prefetching strategy depends on the number of available cache lines(CLs).The strategy for at least four CLs fetches CMS’s that are likely to be used soon,while for smaller caches only the CMS’s are fetched that will be used for sure.Prefetching with one CL can only be used when no CMS is currently in use or if it is known when it will not be needed anymore.Also the second candidate is not used by the strategy for one CL.

IV.E VALUATION

A hybrid HEVC decoder has been realized as hardware-software co-design on the Xilinx Zynq-7045SoC to validate the functionality of the proposed CABAC hardware decoder. The CABAC decoder is implemented in the FPGA while the remaining parts are executed on the ARM CPU.The highly optimized HEVC software decoder developed by the Embedded Systems Architecture Group at TU Berlin is used [11].Five test sequences from the JCT-VC class

B test set(1080p)serve for evaluation.They are encoded in all-intra(AI)and random-access(RA)mode with quantization parameters(QP)of14,22,30and38.Wavefront Parallel Processing is enabled so that the same context models are used for a row of thirty CTUs.In the remaining paper the arithmetic mean of the results for the test sequences is shown.

The remaining evaluation section is structured as follows. First,the impact of different cache sizes on the clock frequency is shown to provide an upper boundary for the overall speed-up.Afterwards,the cache miss rate without prefetching is presented to illustrate that a cache does not improve the overall throughput without further measures. Finally,it is demonstrated that the miss rate can be sig-ni?cantly reduced when application-speci?c context model prefetching is used,resulting in different overall speed-ups depending on the cache size.

A.Clock Frequency

The purpose of replacing the context model memory in the data path by a smaller cache is to shorten the critical path and thereby increase the achievable clock frequency and throughput.The proposed design has been synthesized with Xilinx Synthesis Technology14.6(optimization goal: speed).Both,the memory and the cache,are forced to be synthesized with the same FPGA resources to get a fair

1CL2CL4CL8CL16CL32CL64CL 0

20

40

60

80

100

Figure2:Decoder clock frequency for a different number of cache lines.The horizontal line shows the clock frequency for the non-cached design.

comparison that is not only valid for FPGAs.The in?uence of the cache size on the maximum clock frequency of the decoder can be seen in Figure2.It is increased by20.1% for a single CL,by17.3%for two CLs and by12.3% for four CLs.While there is no signi?cant improvement for eight CLs(2.8%),the clock frequency is reduced for bigger caches.The rapid clock frequency reduction comes from the LRU implementation and CL selection which are not well suited for bigger caches with full associativity.It should also be noted that these results can vary for different implementations,e.g.shorter pipeline stages can lead to greater relative improvement.

While the improved clock frequency accelerates the de-coding of all bins,only context-coded bins can result in cache misses.The fraction of context-coded bins in the test sequences varies from64%to77%.However,as up to two bypass-coded bins can be decoded in parallel,the decoding time fraction for context-coded bins is slightly increased (74%to83%).

B.Performance without Prefetching

Unfortunately the improved clock frequency comes at the cost of potential cache misses.They lead to stalls in the decoder pipeline and thereby reduce the overall throughput. Figure3(top)presents the cache miss rate for different cache sizes and video modes.In general,the miss rate grows with higher QPs.This is due to the fact that smaller QPs result in more bins because of less quantization.As bins of the same syntax elements are grouped,temporal and spatial locality can be better exploited when accessing the required context models in the cache.A signi?cant miss rate reduction can be observed for all video modes when the number of CLs is increasing.However,there is no noticeable improvement with64CLs where all required context models for the decoding of a speci?c CTU?t in the cache.This means that all resulting cache misses are cold misses during the ?rst access.Often not all context models are used during the decoding of a CTU,especially if only few bins are decoded as in the RA QP38con?guration.In this case32CLs are also suf?cient and lead to the same results as64CLs.

AI QP14AI QP22AI QP30AI QP38RA QP14RA QP22RA QP30RA QP38

0%10%20%30%40%50%m i s s r a t e

AI QP14AI QP22AI QP30AI QP38RA QP14RA QP22RA QP30RA QP38

0%

10%20%30%m i s s r a t e

Figure 3:Cache miss rate without prefetching (top)and with prefetching (bottom).

As there are high miss rates for few CLs and reduced

clock frequencies for more than eight CLs,an overall perfor-mance improvement cannot be reached without prefetching.For example with an AI QP14video and two CLs (74%context-coded bin cycle fraction,17.3%higher clock fre-quency,22.6%miss rate)the overall performance is only 88%of a non-cached decoder.C.Performance with Prefetching

Our prefetching algorithm signi?cantly reduces the cache miss rate (see Figure 3(bottom)).The miss rate with only one CL is still not acceptable as it is greater than 20%for all con?gurations because of the restricted prefetching opportu-nities.Two CLs already result in signi?cant improvements that depend on the video mode.For all AI modes and for the low QP RA modes the miss rate is less than 5%,but it almost reaches 10%for the high QP RA modes.With four and more CLs the miss rate is less than 1.5%for all modes.As a result the decoder performance is not noticeably affected by the cache miss rate anymore (less than 2.5%performance reduction)and almost the full gain of the clock frequency improvement remains.

Figure 4shows the speed-up over the non-cached design,but only for the cache sizes where an improvement was achieved.The miss rate for a single CL is too high to result in an overall speed-up (10%to 23%reduction depending on the video mode)while more than eight CLs cannot improve the throughput due to the reduced clock frequency.16,32and 64CLs result in a throughput reduction of 8%,17%and 21%.The cache with eight CLs combines a miss rate of at most 1%and a small clock frequency improvement of 2.8%,leading to a 1.0%to 2.5%throughput improvement.

A I Q P 1

A I Q P 2A I Q P 3A I Q P 3R A Q P 1R A Q P 2R A Q P 3R A

Q P 30%

5%10%15%s p e e d -u p

Figure 4:Speed-up with prefetching (compared to non-cached decoder).

AI RA

QP 14223038142230382CL 105.0100.393.788.497.490.784.378.44CL

101.7

98.192.9

87.7

95.5

91.7

88.3

83.8

Table II:Decoder throughput in Mbins/s.

Four CLs allow a consistent speed-up of 9.7%to 11.7%as the miss rate is only negligibly higher than with eight CLs but the clock frequency allows up to 12.3%speed-up.Two CLs allow even higher throughput,but only for AI modes (10.3%to 15.3%)and RA QP14mode (13.4%).For the other RA modes the miss rate is too high and leads to an overall improvement of 1.2%to 8.9%.However,CABAC throughput is not critical for the decoding of high QP videos as only few bins are processed.That is why the con?guration with two CLs can still be the preferred option for a general hardware decoder.Table II presents the absolute throughput for the designs with two and four CLs.It can be seen that the designs are capable of decoding 90to 105Mbins/s for high bitrate bitstreams.

Design Registers LUTs BRAMs DSPs

non-cached (area opt)

3,055

0.23%

7,542

1.15%

15

2.75%

1

0.11%

cached2cl (area opt)

3,240

0.25%

8,070

1.23%

15

2.75%

1

0.11%

cached4cl (area opt)

3,391

0.26%

8,280

1.26%

15

2.75%

1

0.11%

cached2cl (speed opt)

3,234

0.25%

8,819

1.34%

15

2.75%

1

0.11%

cached4cl (speed opt)

3,398

0.26%

8,811

1.34%

15

2.75%

1

0.11%

available1,311,600655,800545900 Table III:Resource utilization on the Xilinx Zynq-7045SoC.

D.Resource Utilization

Table III compares the resource utilization of the non-cached CABAC decoder with the cached designs with two and four CLs.Synthesis has been performed with area optimization to get meaningful results for a comparison be-tween the different designs.Results with speed optimization are also provided to allow a fair comparison with other implementations.Two main conclusions can be drawn from the results.First,the cached designs(2CL and4CL)require only6%and11%more Registers,as well as7%and10% more LUTs compared to the non-cached design.Second,less than3%of the FPGA resources are needed to implement the CABAC decoder including the processor interface.

V.C ONCLUSIONS

A quantitative performance analysis of an HEVC CABAC decoder has been conducted in this paper.We focused on the evaluation of the miss rate when the context model memory is replaced by a smaller cache.While this replacement results in signi?cant clock frequency improvements for small cache sizes,the emerging cache misses nullify the effect. However,the cache miss rate can be effectively reduced with a well-designed context model memory layout and the corresponding prefetching strategy.

The con?gurations with two and four CLs are most promising.Four CLs result in a speed-up of10%to12% due to effective prefetching and a solid clock frequency improvement.Two CLs allow even higher clock frequencies but the miss rate is also higher,especially for high QP RA videos.As a result the design with two CLs outperforms the design with four CLs for high bitrate videos(9%to15% speed-up)but not for low bitrates(1%to4%speed-up). However,as CABAC throughput is not critical for the latter, the design with two CLs can still be the preferred option. Despite the direct throughput improvement due to the enhanced clock frequency,other designs might remove the pipeline stage that performs the context model memory access when the cache can be shifted to an adjacent stage. The shortened pipeline might also signi?cantly improve the throughput as the strong dependencies in CABAC decoding make deep pipelining inef?cient.

A CKNOWLEDGEMENTS

This work has received funding from the European Union’s Horizon2020Research and Innovation Programme under grant agreement No.645500(Film265).

R EFERENCES

[1]G.J.Sullivan,J.Ohm,W.-J.Han and T.Wiegand,”Overview

of the High Ef?ciency Video Coding(HEVC)Standard”,IEEE Transactions on Circuits and Systems for Video Technology, V olume22,Issue12,pp.1649-1668,September2012

[2]T.Wiegand,G.J.Sullivan,G.Bjontegaard and A.Luthra,

”Overview of the H.264/AVC Video Coding Standard”,IEEE Transactions on Circuits and Systems for Video Technology, V olume13,Issue7,pp.560-576,July2003

[3] D.Marpe,H.Schwarz and T.Wiegand,”Context-Based

Adaptive Binary Arithmetic Coding in the H.264/AVC Video Compression Standard”,IEEE Transactions on Circuits and Systems for Video Technology,V olume13,Issue7,pp.620-636,July2003

[4]V.Sze and M.Budagavi,”High Throughput CABAC Entropy

Coding in HEVC”,IEEE Transactions on Circuits and Systems for Video Technology,V olume22,Issue12,pp.1778-1791, October2012

[5]Y.Yi and I.-C.Park,”High-Speed H.264/AVC CABAC Decod-

ing”,IEEE Transactions on Circuits and Systems for Video Technology,V olume17,Issue4,pp.490-494,April2007 [6]Y.-C.Yang and J.-I.Guo,”High-Throughput H.264/AVC High-

Pro?le CABAC Decoder for HDTV Applications”,IEEE Trans-actions on Circuits and Systems for Video Technology,V ol-ume19,Issue9,pp.1395-1399,September2009

[7]Y.Hong,P.Liu,Z.Hang,Z.You,D.Zhou and S.Goto,

”A360Mbin/s CABAC Decoder for H.264/AVC Level5.1 Applications”,2009IEEE International SoC Design Confer-ence(ISOCC2009),pp.71-74,Busan,South Korea,Novem-ber2009

[8]Y.-H.Chen and V.Sze,”A Deeply Pipelined CABAC Decoder

for HEVC Supporting Level6.2High-tier Applications”,IEEE Transactions on Circuits and Systems for Video Technology, V olume25,Issue5,p.856-868,May2015

[9] C.-H.Kim and I.-C.Park,”High Speed Decoding of Context-

based Adaptive Binary Arithmetic Codes using Most Probable Symbol Prediction”,IEEE International Symposium on Cir-cuits and Systems(ISCAS2006),pp.1707-1710,Island of Kos,Greece,May2006

[10]P.-C.Lin,T.-D.Chuang and L.-G.Chen,”A Branch Selection

Multi-symbol High Throughput CABAC Decoder Architecture for H.264/AVC”,IEEE International Symposium on Circuits and Systems(ISCAS2009),pp.365-368,Taipei,Taiwan, May2009

[11] C.C.Chi,M.Alvarez-Mesa,B.Bross,B.Juurlink,T.Schierl,

”SIMD Acceleration for HEVC Decoding”,IEEE Transactions on Circuits and Systems for Video Technology,V olume25, Issue5,p.841-855,May2015

With的用法全解

With的用法全解 with结构是许多英语复合结构中最常用的一种。学好它对学好复合宾语结构、不定式复合结构、动名词复合结构和独立主格结构均能起很重要的作用。本文就此的构成、特点及用法等作一较全面阐述,以帮助同学们掌握这一重要的语法知识。 一、 with结构的构成 它是由介词with或without+复合结构构成,复合结构作介词with或without的复合宾语,复合宾语中第一部分宾语由名词或代词充当,第二部分补足语由形容词、副词、介词短语、动词不定式或分词充当,分词可以是现在分词,也可以是过去分词。With结构构成方式如下: 1. with或without-名词/代词+形容词; 2. with或without-名词/代词+副词; 3. with或without-名词/代词+介词短语; 4. with或without-名词/代词 +动词不定式; 5. with或without-名词/代词 +分词。 下面分别举例: 1、 She came into the room,with her nose red because of cold.(with+名词+形容词,作伴随状语)

2、 With the meal over , we all went home.(with+名词+副词,作时间状语) 3、The master was walking up and down with the ruler under his arm。(with+名词+介词短语,作伴随状语。) The teacher entered the classroom with a book in his hand. 4、He lay in the dark empty house,with not a man ,woman or child to say he was kind to me.(with+名词+不定式,作伴随状语)He could not finish it without me to help him.(without+代词 +不定式,作条件状语) 5、She fell asleep with the light burning.(with+名词+现在分词,作伴随状语) Without anything left in the with结构是许多英 语复合结构中最常用的一种。学好它对学好复合宾语结构、不定式复合结构、动名词复合结构和独立主格结构均能起很重要的作用。本文就此的构成、特点及用法等作一较全面阐述,以帮助同学们掌握这一重要的语法知识。 二、with结构的用法 with是介词,其意义颇多,一时难掌握。为帮助大家理清头绪,以教材中的句子为例,进行分类,并配以简单的解释。在句子中with结构多数充当状语,表示行为方式,伴随情况、时间、原因或条件(详见上述例句)。 1.带着,牵着…… (表动作特征)。如: Run with the kite like this.

with用法归纳

with用法归纳 (1)“用……”表示使用工具,手段等。例如: ①We can walk with our legs and feet. 我们用腿脚行走。 ②He writes with a pencil. 他用铅笔写。 (2)“和……在一起”,表示伴随。例如: ①Can you go to a movie with me? 你能和我一起去看电影'>电影吗? ②He often goes to the library with Jenny. 他常和詹妮一起去图书馆。 (3)“与……”。例如: I’d like to have a talk with you. 我很想和你说句话。 (4)“关于,对于”,表示一种关系或适应范围。例如: What’s wrong with your watch? 你的手表怎么了? (5)“带有,具有”。例如: ①He’s a tall kid with short hair. 他是个长着一头短发的高个子小孩。 ②They have no money with them. 他们没带钱。 (6)“在……方面”。例如: Kate helps me with my English. 凯特帮我学英语。 (7)“随着,与……同时”。例如: With these words, he left the room. 说完这些话,他离开了房间。 [解题过程] with结构也称为with复合结构。是由with+复合宾语组成。常在句中做状语,表示谓语动作发生的伴随情况、时间、原因、方式等。其构成有下列几种情形: 1.with+名词(或代词)+现在分词 此时,现在分词和前面的名词或代词是逻辑上的主谓关系。 例如:1)With prices going up so fast, we can't afford luxuries. 由于物价上涨很快,我们买不起高档商品。(原因状语) 2)With the crowds cheering, they drove to the palace. 在人群的欢呼声中,他们驱车来到皇宫。(伴随情况) 2.with+名词(或代词)+过去分词 此时,过去分词和前面的名词或代词是逻辑上的动宾关系。

独立主格with用法小全

独立主格篇 独立主格,首先它是一个“格”,而不是一个“句子”。在英语中任何一个句子都要有主谓结构,而在这个结构中,没有真正的主语和谓语动词,但又在逻辑上构成主谓或主表关系。独立主格结构主要用于描绘性文字中,其作用相当于一个状语从句,常用来表示时间、原因、条件、行为方式或伴随情况等。除名词/代词+名词、形容词、副词、非谓语动词及介词短语外,另有with或without短语可做独立主格,其中with可省略而without不可以。*注:独立主格结构一般放在句首,表示原因时还可放在句末;表伴随状况或补充说明时,相当于一个并列句,通常放于句末。 一、独立主格结构: 1. 名词/代词+形容词 He sat in the front row, his mouth half open. Close to the bank I saw deep pools, the water blue like the sky. 靠近岸时,我看见几汪深池塘,池水碧似蓝天。 2. 名词/代词+现在分词 Winter coming, it gets colder and colder. The rain having stopped, he went out for a walk.

The question having been settled, we wound up the meeting. 也可以The question settled, we wound up the meeting. 但含义稍有差异。前者强调了动作的先后。 We redoubled our efforts, each man working like two. 我们加倍努力,一个人干两个人的活。 3. 名词/代词+过去分词 The job finished, we went home. More time given, we should have done the job much better. *当表人体部位的词做逻辑主语时,不及物动词用现在分词,及物动词用过去分词。 He lay there, his teeth set, his hands clenched, his eyes looking straight up. 他躺在那儿,牙关紧闭,双拳紧握,两眼直视上方。 4. 名词/代词+不定式 We shall assemble at ten forty-five, the procession to start moving at precisely eleven. We divided the work, he to clean the windows and I to sweep the floor.

with用法小结

with用法小结 一、with表拥有某物 Mary married a man with a lot of money . 马莉嫁给了一个有着很多钱的男人。 I often dream of a big house with a nice garden . 我经常梦想有一个带花园的大房子。 The old man lived with a little dog on the lonely island . 这个老人和一条小狗住在荒岛上。 二、with表用某种工具或手段 I cut the apple with a sharp knife . 我用一把锋利的刀削平果。 Tom drew the picture with a pencil . 汤母用铅笔画画。 三、with表人与人之间的协同关系 make friends with sb talk with sb quarrel with sb struggle with sb fight with sb play with sb work with sb cooperate with sb I have been friends with Tom for ten years since we worked with each other, and I have never quarreled with him . 自从我们一起工作以来,我和汤姆已经是十年的朋友了,我们从没有吵过架。 四、with 表原因或理由 John was in bed with high fever . 约翰因发烧卧床。 He jumped up with joy . 他因高兴跳起来。 Father is often excited with wine . 父亲常因白酒变的兴奋。 五、with 表“带来”,或“带有,具有”,在…身上,在…身边之意

with的用法

with[wIT] prep.1.与…(在)一起,带着:Come with me. 跟我一起来吧。/ I went on holiday with my friend. 我跟我朋友一起去度假。/ Do you want to walk home with me? 你愿意和我一道走回家吗 2.(表带有或拥有)有…的,持有,随身带着:I have no money with me. 我没有带钱。/ He is a man with a hot temper. 他是一个脾气暴躁的人。/ We bought a house with a garden. 我们买了一座带花园的房子。/ China is a very large country with a long history. 中国是一个具有历史悠久的大国。3.(表方式、手段或工具)以,用:He caught the ball with his left hand. 他用左手接球。/ She wrote the letter with a pencil. 她用铅笔写那封信。4.(表材料或内容)以,用:Fill the glass with wine. 把杯子装满酒。/ The road is paved with stones. 这条路用石头铺砌。5.(表状态)在…的情况下,…地:He can read French with ease. 他能轻易地读法文。/ I finished my homework though with difficulty. 虽然有困难,我还是做完了功课。6.(表让步)尽管,虽然:With all his money, he is unhappy. 尽管他有钱,他并不快乐。/ With all his efforts, he lost the match. 虽然尽了全力,他还是输了那场比赛。7.(表条件)若是,如果:With your permission, I’ll go. 如蒙你同意我就去。8.(表原因或理由)因为,由于:He is tired with work. 他工作做累了。/ At the news we all jumped with joy. 听到这消息我们都高兴得跳了起来。9.(表时间)当…的时候,在…之后:With that remark, he left. 他说了那话就离开了。/ With daylight I hurried there to see what had happened. 天一亮我就去那儿看发生了什么事。10. (表同时或随同)与…一起,随着:The girl seemed to be growing prettier with each day. 那女孩好像长得一天比一天漂亮。11.(表伴随或附带情况)同时:I slept with the window open. 我开着窗户睡觉。/ Don’t speak with your mouth full. 不要满嘴巴食物说话。12.赞成,同意:I am with you there. 在那点上我同你意见一致。13.由…照看,交…管理,把…放在某处:I left a message for you with your secretary. 我给你留了个信儿交给你的秘书了。/ The keys are with reception. 钥匙放在接待处。14 (表连同或包含)连用,包含:The meal with wine came to £8 each. 那顿饭连酒每人8英镑。/ With preparation and marking a teacher works 12 hours a day. 一位老师连备课带批改作业每天工作12小时。15. (表对象或关系)对,关于,就…而言,对…来说:He is pleased with his new house. 他对他的新房子很满意。/ The teacher was very angry with him. 老师对他很生气。/ It’s the same with us students. 我们学生也是这样。16.(表对立或敌对)跟,以…为对手:The dog was fighting with the cat. 狗在同猫打架。/ He’s always arguing with his brother. 他老是跟他弟弟争论。17.(在祈使句中与副词连用):Away with him! 带他走!/ Off with your clothes! 脱掉衣服!/ Down with your money! 交出钱来! 【用法】1.表示方式、手段或工具等时(=以,用),注意不要受汉语意思的影响而用错搭配,如“用英语”习惯上用in English,而不是with English。2.与某些抽象名词连用时,其作用相当于一个副词:with care=carefully 认真地/ with kindness=kindly 亲切地/ with joy=joyfully 高兴地/ with anger=angrily 生气地/ with sorrow=sorrowfully 悲伤地/ with ease=easily 容易地/ with delight=delightedly 高兴地/ with great fluency =very fluently 很流利地3.表示条件时,根据情况可与虚拟语气连用:With more money I would be able to buy it. 要是钱多一点,我就买得起了。/ With better equipment, we could have finished the job even sooner. 要是设备好些,我们完成这项工作还要快些。4.比较with 和as:两者均可表示“随着”,但前者是介词,后者是连词:He will improve as he grows older. 随着年龄的增长,他会进步的。/ People’s ideas change with the change of the times. 时代变了,人们的观念也会变化。5.介词with和to 均可表示“对”,但各自的搭配不同,注意不要受汉语意思的影响而用错,如在kind, polite, rude, good, married等形容词后通常不接介词with而接to。6.复合结构“with+宾语+宾语补足语”是一个很有用的结构,它在句中主要用作状语,表示伴随、原因、时间、条件、方式等;其中的宾语补足语可以是名词、形容词、副词、现在分词、过去分词、不定式、介词短语等:I went out with the windows open. 我外出时没有关窗户。/ He stood before his teacher with his head down. 他低着头站在老师面前。/ He was lying on the bed with all his clothes on. 他和衣躺在床上。/ He died with his daughter yet a schoolgirl. 他去世时,女儿还是个小学生。/ The old man sat there with a basket beside her. 老人坐在那儿,身边放着一个篮子。/ He fell asleep with the lamp burning. 他没熄灯就睡着了。/ He sat there with his eyes closed. 他闭目坐在那儿。/ I can’t go out with all these clothes to wash. 要洗这些衣服,我无法出去了。这类结构也常用于名词后作定语:The boy with nothing on is her son. 没穿衣服的这个男孩子是她儿子。 (摘自《英语常用词多用途词典》金盾出版社) - 1 -

(完整版)with的复合结构用法及练习

with复合结构 一. with复合结构的常见形式 1.“with+名词/代词+介词短语”。 The man was walking on the street, with a book under his arm. 那人在街上走着,腋下夹着一本书。 2. “with+名词/代词+形容词”。 With the weather so close and stuffy, ten to one it’ll rain presently. 天气这么闷热,十之八九要下雨。 3. “with+名词/代词+副词”。 The square looks more beautiful than even with all the light on. 所有的灯亮起来,广场看起来更美。 4. “with+名词/代词+名词”。 He left home, with his wife a hopeless soul. 他走了,妻子十分伤心。 5. “with+名词/代词+done”。此结构过去分词和宾语是被动关系,表示动作已经完成。 With this problem solved, neomycin 1 is now in regular production. 随着这个问题的解决,新霉素一号现在已经正式产生。 6. “with+名词/代词+-ing分词”。此结构强调名词是-ing分词的动作的发出者或某动作、状态正在进行。 He felt more uneasy with the whole class staring at him. 全班同学看着他,他感到更不自然了。 7. “with+宾语+to do”。此结构中,不定式和宾语是被动关系,表示尚未发生的动作。 So in the afternoon, with nothing to do, I went on a round of the bookshops. 由于下午无事可做,我就去书店转了转。 二. with复合结构的句法功能 1. with 复合结构,在句中表状态或说明背景情况,常做伴随、方式、原因、条件等状语。With machinery to do all the work, they will soon have got in the crops. 由于所有的工作都是由机器进行,他们将很快收完庄稼。(原因状语) The boy always sleeps with his head on the arm. 这个孩子总是头枕着胳膊睡觉。(伴随状语)The soldier had him stand with his back to his father. 士兵要他背对着他父亲站着。(方式状语)With spring coming on, trees turn green. 春天到了,树变绿了。(时间状语) 2. with 复合结构可以作定语 Anyone with its eyes in his head can see it’s exactly like a rope. 任何一个头上长着眼睛的人都能看出它完全像一条绳子。 【高考链接】 1. ___two exams to worry about, I have to work really hard this weekend.(04北京) A. With B. Besides C. As for D. Because of 【解析】A。“with+宾语+不定式”作状语,表示原因。 2. It was a pity that the great writer died, ______his works unfinished. (04福建) A. for B. with C. from D.of 【解析】B。“with+宾语+过去分词”在句中作状语,表示状态。 3._____production up by 60%, the company has had another excellent year. (NMET) A. As B.For C. With D.Through 【解析】C。“with+宾语+副词”在句中作状语,表示程度。

with用法

with结构是许多英语复合结构中最常用的一种。学好它对学好复合宾语结构、不定式复合结构、动名词复合结构和独立主格结构均能起很重要的作用。本文就此的构成、特点及用法等作一较全面阐述,以帮助同学们掌握这一重要的语法知识。 一、with结构的构成 它是由介词with或without+复合结构构成,复合结构作介词with或without的复合宾语,复合宾语中第一部分宾语由名词或代词充当,第二部分补足语由形容词、副词、介词短语、动词不定式或分词充当,分词可以是现在分词,也可以是过去分词。With结构构成方式如下: 1. with或without-名词/代词+形容词; 2. with或without-名词/代词+副词; 3. with或without-名词/代词+介词短语; 4. with或without-名词/代词+动词不定式; 5. with或without-名词/代词+分词。 下面分别举例: 1、She came into the room,with her nose red because of cold.(with+名词+形容词,作伴随状语) 2、With the meal over ,we all went home.(with+名词+副词,作时间状语) 3、The master was walking up and down with the ruler under his arm。(with+名词+介词短语,作伴随状语。)The teacher entered the classroom with a book in his hand. 4、He lay in the dark empty house,with not a man ,woman or child to say he was kind to me.(with+名词+不定式,作伴随状语)He could not finish it without me to help him.(without+代词+不定式,作条件状语) 5、She fell asleep with the light burning.(with+名词+现在分词,作伴随状语) 6、Without anything left in the cupboard,she went out to get something to eat.(without+代词+过去分词,作为原因状语) 二、with结构的用法 在句子中with结构多数充当状语,表示行为方式,伴随情况、时间、原因或条件(详见上述例句)。

【初中英语】with的用法

【With的基本用法与独立主格】 with结构是许多英语复合结构中最常用的一种。学好它对学好复合宾语结构、不定式复合结构、动名词复合结构和独立主格结构均能起很重要的作用。 一、with结构的构成 它是由介词with或without+复合结构构成,复合结构作介词with或without的复合宾语,复合宾语中第一部分宾语由名词或代词充当,第二部分补足语由形容词、副词、介词短语、动词不定式或分词充当,分词可以是现在分词,也可以是过去分词。With结构构成方式如下: 1. with或without-名词/代词+形容词; 2. with或without-名词/代词+副词; 3. with或without-名词/代词+介词短语; 4. with或without-名词/代词+动词不定式; 5. with或without-名词/代词+分词。 下面分别举例: 1、She came into the room,with her nose red because of cold.(with+名词+形容词,作伴随状语) 2、With the meal over, we all went home.(with+名词+副词,作时间状语) 3、The master was walking up and down with the ruler under his arm。(with+名词+介词短语,作伴随状语。) 4、He could not finish it without me to help him.(without+代词+不定式,作条件状语) 5、She fell asleep with the light on.(with+名词+现在分词,作伴随状语) 二、with结构的用法 with是介词,其意义颇多,一时难掌握。为帮助大家理清头绪,以教材中的句子为例,进行分类,并配以简单的解释。在句子中with结构多数充当状语,表示行为方式,伴随情况、时间、原因或条件(详见上述例句)。 1. 带着,牵着……(表动作特征)。如: Run with the kite like this. 2. 附加、附带着……(表事物特征)。如: A glass of apple juice, two glasses of coke, two hamburgers with potato chips, rice and fish. 3. 和……(某人)一起。 a. 跟某人一起(居住、吃、喝、玩、交谈……) 。如: Now I am in China with my parents. Sometimes we go out to eat with our friends. He / She's talking with a friend. b. 跟go, come 连用,有"加入"到某方的意思。如: Do you want to come with me? 4. 和play一起构成短语动词play with 意为"玩耍……,玩弄……" 如: Two boys are playing with their yo-yos. 5. 与help 一起构成help...with...句式,意为"帮助(某人) 做(某事)"。如: On Monday and Wednesday, he helps his friends with their English. 6. 表示面部神情,有“含着……,带着……”如: "I'm late for school," said Sun Y ang, with tears in his eyes. 7. 表示"用……" 如:

介词with的用法

介词with的用法 1.表示人与人的协同关系,意为“一起”“和” go with 与..一起去 play with 与...一起玩 live with 与...一起住/生活 work with 与...一起工作 make friends with 与....交朋友 talk with sb = talk to sb fight with 与...打架/战斗 cooperate with 与...一起合作 2.表示“带有”“拥有” tea with honey 加蜂蜜的茶 a man with a lot of money 一个有很多钱的人 a house with a big garden 一个带有大花园的房子 a chair with three legs 一张三条腿的椅子 a girl with golden hair 金发的女孩 3.表示“用”某种工具或手段 write with a pencil 用铅笔写字 cut the apple with a knife 用刀切苹果 4.表示“在...身边”“在...身上” I don’t have any money with me. 我身上没带钱。 Take an umbrella with you in case it rains 带把伞以防下雨。 5.表示“在...之下” With the help of sb = with one’s help 在某人的帮助下 6.表示“随着” with the development of ... 随着...的发展 float with the wind 随风飘动

7.常见带有with的动词短语 agree with sb/sth 同意某人或某事deal with sth = do with sth 处理某事 help sb with sth 在...上帮助某人 fall in love with sb/sth 爱上某人/某物 get on with sb 与某人相处 get on well with sb 与某人相处得好 have nothing to do with sb 与某人无关compare A with B 将A和B作比较communicate with sb 与某人交流 argue with sb = quarrel with sb 与某人吵架Have fun with sth 玩的开心 Get away with sth 做坏事不受惩罚 Chat with sb 跟某人闲谈 Charge sb with sth 指控某人。。。 Put up with sth 忍受 8.常见带with的形容词固定搭配 be satisfied with 对...满意 be content with sth 对...满足 be angry with sb 生某人的气 be strict with sb 对某人严格 be patient with sb 对某人有耐心 be popular with sb 受某人欢迎 be filled with sth 装满... 充满..... = be full of sth What’s wrong/the matter with sb/sth be familiar with sb/sth 熟悉某人或某物 be connected with sb/sth 与....有关 Be decorated with 被。。。装饰 Be impressed with/by

with用法归纳

with用法归纳 (1)“用……”表示使用工具,手段等。例如: ①We canwalkwith ourlegsandfeet. 我们用腿脚行走。 ②Hewrites withapencil。她用铅笔写。 (2)“与……在一起”,表示伴随。例如: ①Can you gotoamovie with me?您能与我一起去瞧电影’>电影不? ②He often goes to thelibrarywithJenny、她常与詹妮一起去图书馆。 (3)“与……"。例如: I'd like to have a talk with you、我很想与您说句话、 (4)“关于,对于”,表示一种关系或适应范围。例如: What’s wrong with yourwatch?您得手表怎么了? (5)“带有,具有"。例如: ①He's a tallkid withshort hair. 她就是个长着一头短发得高个子小孩。 ②Theyhaveno money with them、她们没带钱。 (6)“在……方面”。例如: Kate helpsme with myEnglish. 凯特帮我学英语。 (7)“随着,与……同时”、例如: With thesewords, he lefttheroom、说完这些话,她离开了房间。[解题过程] with结构也称为with复合结构。就是由with+复合宾语组成。常在句中做状语,表示谓语动作发生得伴随情况、时间、原因、方式等。其构成有下列几种情形: 1。with+名词(或代词)+现在分词 此时,现在分词与前面得名词或代词就是逻辑上得主谓关系。 例如:1)Withprices going up so fast, we can’t afford luxuries、由于物价上涨很快,我们买不起高档商品。(原因状语) 2)Withthe crowds cheering, they drove to thepalace。 在人群得欢呼声中,她们驱车来到皇宫、(伴随情况) 2、with+名词(或代词)+过去分词

with结构及用法

with 结构 一:with结构的形式 它是由介词with或without+复合结构构成,复合结构作介词with或without的复合宾语,复合宾语中第一部分宾语由名词或代词充当,第二部分补足语由形容词、副词、介词短语、动词不定式或分词充当,分词可以是现在分词,也可以是过去分词。With结构构成方式如下: 1. with或without 名词/代词 例句:Yesterday I saw Mary with a gun. 2. with或without 名词/代词+ 形容词 例句:He is used to sleeping with the windows open. 3. with或without 名词/代词+ 副词 例句:She left the room with all the lights on. 4. with或without 名词/代词+ 介词短语 例句:He walked into the dark street with a stick in his hand. 5. with或without 名词/代词+ 动词不定式 例句:With so much work to do, I have no time for a holiday. 6. with或without 名词/代词+ Ving 例句:We found the house easily with the little boy leading the way.(现在分词表示主动动作,即分词所表示的动作是由with后的宾语发出来的) 7. with或without 名词/代词+ Ved With all the things bought, she went home happily.(过去分词表示被动,with后面的宾语与过去分词之间是被动关系) 8. with或without 名词/代词+ 补语 例句:Possibly this person died without anyone knowing where the coins were hidden. He wondered if he could slide out of the lecture hall without anyone noticing (him). 9. with或without 名词/代词+ 动词不定式和+ Ving/Ved的区别 加不定式是指将要进行的动作,加分词是指主动或被动动作. 10. with+名词/代词+名词 例句:He died with his daughter a schoolgirl. 他在他女儿是个小学生的时候死了 二:with复合结构的句法功能 1. with 复合结构,在句中表状态或说明背景情况该结构常做伴随、方式、原因、条件等状语。 例句:With machinery to do all the work, they will soon have got in the crops. 由于所有的工作都是由机器进行,他们将很快收完庄稼。(原因状语) The boy always sleeps with his head on the arm. 这个孩子总是头枕着胳膊睡觉。(伴随状语) The soldier had him stand with his back to his father. 士兵要他背对着他父亲站着。(方式状语)With spring coming on, trees turn green. 春天到了,树变绿了。(时间状语) 2. with复合结构可以作定语 Anyone with its eyes in his head can see it’s exactly like a rope. 任何一个头上长着眼睛的人都能看出它完全像一条绳子。

with的用法大全

with的用法大全 with结构是许多英语复合结构中最常用的一种。学好它对学好复合宾语结构、不定式复合结构、动名词复合结构和独立主格结构均能起很重要的作用。本文就此的构成、特点及用法等作一较全面阐述,以帮助同学们掌握这一重要的语法知识。 一、with结构的构成 它是由介词with或without+复合结构构成,复合结构作介词with或without的复合宾语,复合宾语中第一部分宾语由名词或代词充当,第二部分补足语由形容词、副词、介词短语、动词不定式或分词充当,分词可以是现在分词,也可以是过去分词。With结构构成方式如下: 1. with或without-名词/代词+形容词; 2. with或without-名词/代词+副词; 3. with或without-名词/代词+介词短语; 4. with或without-名词/代词+动词不定式; 5. with或without-名词/代词+分词。 下面分别举例: 1、She came into the room,with her nose red because of cold.(with+名词+形容词,作伴随状语) 2、With the meal over ,we all went home.(with+名词+副词,作时间状语)

3、The master was walking up and down with the ruler under his arm。(with+名词+介词短语,作伴随状语。) The teacher entered the classroom with a book in his hand. 4、He lay in the dark empty house,with not a man ,woman or child to say he was kind to me.(with+名词+不定式,作伴随状语) He could not finish it without me to help him.(without+代词+不定式,作条件状语) 5、She fell asleep with the light burning.(with+名词+现在分词,作伴随状语) 6、Without anything left in the cupboard,she went out to get something to eat.(without+代词+过去分词,作为原因状语) 二、with结构的用法 在句子中with结构多数充当状语,表示行为方式,伴随情况、时间、原因或条件(详见上述例句)。 With结构在句中也可以作定语。例如: 1.I like eating the mooncakes with eggs. 2.From space the earth looks like a huge water-covered globe with a few patches of land sticking out above the water. 3.A little boy with two of his front teeth missing ran into the house. 三、with结构的特点 1. with结构由介词with或without+复合结构构成。复合结构中第一部分与第二部分语法上是宾语和宾语补足语关系,而在逻辑上,却具有主谓关系,也就是说,可以用第一部分

With 的用法

With得用法 1.With sb/sthdoing 表主动且进行 2.Withsth being done表被动且进行 3.withsth done表被动且完成 4.with sth todo表示将来 1.从语法角度瞧: with 就是介词,所以后面跟得就是宾语;宾语后面得可以被称为就是宾补。 1.Withoutanyone noticing, Istol e into the room、 With so many children talking and laughing, Icouldn’tsettle down to my work、 2.With so much work beingdone, I can’t spare any minute。 3.With so muchworkdone, Ihad a niceday。 4.With a lot of problems to settle, the newly elected president is having a hardtime。 Lie 说谎-lied-lied—lying Lie躺;存在;位于-lay-lain—lying

Lay 放置;产卵下蛋-laid—laid-laying He lied说谎to me that he hadn't seen the bag that I had laid 放置on the counter、Infact itwaslying存在beside him on the ground。 Hissuggestion aiming(aim) to remov eyourbadhabit is acceptable。 His suggestion aimed(aim) atremoving your bad habit isacceptable. 迎合cater for 做出调整make adjustments 在这之前previous to this 协商negotiate 为…而准备bemeant for/be intendedfor 明年将被开展得建造工程不就是很容易被及时完成、The buildingproject to be carriedoutnext year is not easyto complete. Require doing=need doing = want d oing以主动表被动 All cars requiretesting/to be tested。 Pull through康复;完成十分困难得事情

相关文档