History log of /external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6955870806624479723addfae6dcf5d13968796c 13-Jan-2016 Peter Kasting <pkasting@google.com> Convert channel counts to size_t.

IIRC, this was originally requested by ajm during review of the other size_t conversions I did over the past year, and I agreed it made sense, but wanted to do it separately since those changes were already gargantuan.

BUG=chromium:81439
TEST=none
R=henrik.lundin@webrtc.org, henrika@webrtc.org, kjellander@webrtc.org, minyue@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org

Review URL: https://codereview.webrtc.org/1316523002 .

Cr-Commit-Position: refs/heads/master@{#11229}
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
df3efa8c079294857a8b8e0a02634d06a6d6b6d6 28-Nov-2015 peah <peah@webrtc.org> Introduced the new locking scheme

BUG=webrtc:5099

Review URL: https://codereview.webrtc.org/1424663003

Cr-Commit-Position: refs/heads/master@{#10836}
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
81b9bfe6856bb4f9fd0ba79899f72b8385c58979 27-Nov-2015 peah <peah@webrtc.org> Added a threadchecking scheme to APM that checks that the APM API calls are called from the correct threads. The actual threadcheckers were, however, removed and will be reintroduced in another upcoming CL.

BUG=webrtc:5099

Review URL: https://codereview.webrtc.org/1422013002

Cr-Commit-Position: refs/heads/master@{#10817}
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
2446e5a2de9d5d78117a02ff2b206194bb8f4e8e 18-Nov-2015 peah <peah@webrtc.org> Fixed the render queue item size preallocation and verification, moved constant declarations, removed redundant queue allocation

BUG=

Review URL: https://codereview.webrtc.org/1454683002

Cr-Commit-Position: refs/heads/master@{#10689}
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
fa6228e221d818af55e3d8343c792f2c1ecc7252 17-Nov-2015 peah <peah@webrtc.org> Introduced the render sample queue for the aec and aecm.

BUG=webrtc:5099

Review URL: https://codereview.webrtc.org/1410833002

Cr-Commit-Position: refs/heads/master@{#10662}
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
13b96ba90f72164134019cbfc07d4a47cf1fd091 03-Oct-2015 Minyue <minyue@webrtc.org> Adding APM configuration in AEC dump.

The AEC dump was not self-contented enough in the sense that APM configuration is missing, and therefore, given an AEC dump, it is sometimes not clear how to reproduce problems.

This CL tries to address the problem.

Note that this cannot guarantee a perfect reproduction in all cases. Dumping from the middle of a call makes the initial states unknown and thus may make the result non-reproducible.

BUG=
TEST= 1. new dump in Chromium and unpack
2. unpack old dump

R=andrew@webrtc.org, peah@webrtc.org

Review URL: https://codereview.webrtc.org/1348903004 .

Cr-Commit-Position: refs/heads/master@{#10155}
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
0f133b99c655cbdb347b4a71ac872c071532189f 02-Jul-2015 henrik.lundin <henrik.lundin@webrtc.org> Rename APM Config ReportedDelay to DelayAgnostic

We use this Config struct for enabling/disabling the delay agnostic
AEC. This change renames it to DelayAgnostic for readability reasons.

NOTE: The logic is reversed in this CL. The old ReportedDelay config
turned DA-AEC off, while the new DelayAgnostic turns it on.

The old Config is kept in parallel with the new during a transition
period. This is to avoid problems with API breakages. During this
period, ReportedDelay is disabled or DelayAgnostic is enabled, DA-AEC
is engaged in APM.

BUG=webrtc:4651
R=bjornv@webrtc.org, tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1211053006

Cr-Commit-Position: refs/heads/master@{#9531}
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
441f6347311bcf2079435c3888d67e1fb321f9f8 09-Jun-2015 Henrik Lundin <henrik.lundin@webrtc.org> Re-land r9378 "Rename APM Config DelayCorrection to ExtendedFilter"

(This reverts commit 3fbf3f8841b5460503fb646eaedcb063620434a8.)

The original submission was reverted because it broke the Chrome build. This is fixed in patch set 2 of this change by keeping the old MediaConstraintsInterface string kExperimentalEchoCancellation. It will be removed once the Chrome code has been updated.

Original description:
"We use this Config struct for enabling/disabling Extended filter mode in AEC. This change renames it to ExtendedFilter for readability reasons. The corresponding media constraint is also renamed to kExtendedFilterEchoCancellation.

The old Config is kept in parallel with the new during a transition period. This is to avoid problems with API breakages. During this period, if any of the two Configs are enabled, the extended filter mode is engaged in APM. That is, the two Configs are combined with an "OR" operation.

This change also renames experimental_aec in AudioOptions to extended_filter_aec."

BUG=webrtc:4696
R=bjornv@webrtc.org, tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1151573021.

Cr-Commit-Position: refs/heads/master@{#9401}
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
3fbf3f8841b5460503fb646eaedcb063620434a8 05-Jun-2015 Henrik Lundin <henrik.lundin@webrtc.org> Revert r9378 "Rename APM Config DelayCorrection to ExtendedFilter"

This reverts commit 5f4b7e2873864c61e2ad6d88679dcd5d321bfd16, since it
broke some of the build bots.

BUG=4696
TBR=bjornv@webrtc.org

Review URL: https://codereview.webrtc.org/1166463006

Cr-Commit-Position: refs/heads/master@{#9380}
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
5f4b7e2873864c61e2ad6d88679dcd5d321bfd16 05-Jun-2015 Henrik Lundin <henrik.lundin@webrtc.org> Rename APM Config DelayCorrection to ExtendedFilter

We use this Config struct for enabling/disabling Extended filter mode
in AEC. This change renames it to ExtendedFilter for readability
reasons. The corresponding media constraint is also renamed to
kExtendedFilterEchoCancellation.

The old Config is kept in parallel with the new during a transition
period. This is to avoid problems with API breakages. During this
period, if any of the two Configs are enabled, the extended filter
mode is engaged in APM. That is, the two Configs are combined with an
"OR" operation.

This change also renames experimental_aec in AudioOptions to extended_filter_aec.

BUG=4696
R=bjornv@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/54659004

Cr-Commit-Position: refs/heads/master@{#9378}
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
14665ff7d4024d07e58622f498b23fd980001871 04-Mar-2015 kjellander@webrtc.org <kjellander@webrtc.org> Roll chromium_revision e144d30..6fdb142 (318658:318841) + remove OVERRIDE macro

Clang version changed 223108:230914
Details: https://chromium.googlesource.com/chromium/src/+/e144d30..6fdb142/tools/clang/scripts/update.sh

Removes the OVERRIDE macro defined in:
* webrtc/base/common.h
* webrtc/typedefs.h

The majority of the source changes were done by running this in src/:
perl -0pi -e "s/virtual\s([^({;]*(\([^({;]*\)[^({;]*))(OVERRIDE|override)/\1override/sg" `find {talk,webrtc} -name "*.h" -o -name "*.cc*" -o -name "*.mm*"`

which converted all:
virtual Foo() OVERRIDE
functions to:
Foo() override

Then I manually edited:
* talk/media/webrtc/fakewebrtccommon.h
* webrtc/test/fake_common.h

Remaining uses of OVERRIDE was fixed by search+replace.

Manual edits were done to fix virtual destructors that were
overriding inherited ones.

Finally a build error related to the pure virtual definitions of
Read, Write and Rewind in common_types.h required a bit of
refactoring in:
* webrtc/common_types.cc
* webrtc/common_types.h
* webrtc/system_wrappers/interface/file_wrapper.h
* webrtc/system_wrappers/source/file_impl.cc

This roll should make it possible for us to finally re-enable deadlock
detection for TSan on the buildbots.

BUG=4106
R=pbos@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/41069004

Cr-Commit-Position: refs/heads/master@{#8596}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8596 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
b1786dbab00dd66a9e59a68414e85b2b2615a24f 03-Feb-2015 bjornv@webrtc.org <bjornv@webrtc.org> audio_processing: Added a new AEC delay metric value that gives the amount of poor delays

To more easily determine if for example the AEC is not working properly one could monitor how often the estimated delay is out of bounds. With out of bounds we mean either being negative or too large, where both cases will break the AEC.

A new delay metric is added telling the user how often poor delay values were estimated. This is measured in percentage since last time the metrics were calculated.

All APIs have been updated with a third parameter with EchoCancellation::GetDelayMetrics() giving the option to exclude the new metric not to break existing code.

The new metric has been added to audio_processing_unittests with an additional protobuf member, and reference files accordingly updated.
voe_auto_test has not been updated to display the new metric.

BUG=4246
TESTED=audioproc on files
R=aluebs@webrtc.org, andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/39739004

Cr-Commit-Position: refs/heads/master@{#8230}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8230 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
e9d3760d5cd0f4bb1821897dc995dcbe3cfdccaa 23-Apr-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> AEC: Adds a reported_delay_enabled_ flag

Adds a feature to completely turn on or off buffer handling based on reported delay values. During startup, reported delays are controlled differently through, e.g., WEBRTC_UNTRUSTED_DELAY. By default, the feature is enabled giving the same output as before this change.

TESTED=trybots, modules_unittest
R=aluebs@webrtc.org, andrew@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/12349005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5965 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
ddbb8a2c243f9d54cb0ce0092e341dfc6e126bb3 22-Apr-2014 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Support arbitrary input/output rates and downmixing in AudioProcessing.

Select "processing" rates based on the input and output sampling rates.
Resample the input streams to those rates, and if necessary to the
output rate.

- Remove deprecated stream format APIs.
- Remove deprecated device sample rate APIs.
- Add a ChannelBuffer class to help manage deinterleaved channels.
- Clean up the splitting filter state.
- Add a unit test which verifies the output against known-working
native format output.

BUG=2894
R=aluebs@webrtc.org, bjornv@webrtc.org, xians@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/9919004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5959 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
5964fe0f86a4f33831d1f4994dbde1b42c93bd81 22-Apr-2014 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> audio_processing: DestroyHandle() now returns void

The return value was not used anyhow and there is no proper action to be taken if we would have received an error. Hence, in line with issue441 we should return void upon free.

BUG=441
TESTED=trybots,modules_unittest
R=andrew@webrtc.org, aluebs@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/12269004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5949 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
56e4a05053d6addc7dbbe2b4d07271305fdbea75 27-Feb-2014 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Remove ProcessingComponent's dependence on AudioProcessingImpl.

- Move needed accessors to AudioProcessing.
- Inject the crit directly as a dependency.
- Remove the now unneeded EchoCancellationImplWrapper.

BUG=2894
R=aluebs@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/9199004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5620 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
6b1e21924aafee5708a9566ca30372f57b0dd6a4 26-Sep-2013 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Move the Config DelayCorrection struct to audio_processing.h.

TBR=bjornv

Review URL: https://webrtc-codereview.appspot.com/2304005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4849 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
1760a17b8e176f38bcc203bd0afbc9c59df9b502 26-Sep-2013 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Add an extended filter mode to AEC.

Re-land: http://review.webrtc.org/2151007/
TBR=bjornv@webrtc.org

Original change description:
This mode extends the filter length from the current 48 ms to 128 ms.
It is runtime selectable which allows it to be enabled through
experiment. We reuse the DelayCorrection infrastructure to avoid having
to replumb everything up to libjingle.

Increases AEC complexity by ~50% on modern x86 CPUs.
Measurements (in percent of usage on one core):

Machine/CPU Normal Extended
MacBook Retina (Early 2013),
Core i7 Ivy Bridge (2.7 GHz, hyperthreaded) 0.6% 0.9%

MacBook Air (Late 2010), Core 2 Duo (2.13 GHz) 1.4% 2.7%

Chromebook Pixel, Core i5 Ivy Bridge (1.8 GHz) 0.6% 1.0%

Samsung ARM Chromebook,
Samsung Exynos 5 Dual (1.7 GHz) 3.2% 5.6%

The relative value is large of course but the absolute should be
acceptable in order to have a working AEC on some platforms.

Detailed changes to the algorithm:
- The filter length is changed from 48 to 128 ms. This comes with tuning
of several parameters: i) filter adaptation stepsize and error
threshold; ii) non-linear processing smoothing and overdrive.
- Option to ignore the reported delays on platforms which we deem
sufficiently unreliable. Currently this will be enabled in Chromium for
Mac.
- Faster startup times by removing the excessive "startup phase"
processing of reported delays.
- Much more conservative adjustments to the far-end read pointer. We
smooth the delay difference more heavily, and back off from the
difference more. Adjustments force a readaptation of the filter, so they
should be avoided except when really necessary.

Corresponds to these changes:
https://chromereviews.googleplex.com/9412014
https://chromereviews.googleplex.com/9514013
https://chromereviews.googleplex.com/9960013

BUG=454,827,1261

Review URL: https://webrtc-codereview.appspot.com/2295006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4848 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
ce014d97cd9bcc893ce60897227e8a5147d8741c 25-Sep-2013 asapersson@webrtc.org <asapersson@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Revert 4837 "Add an extended filter mode to AEC."

> Add an extended filter mode to AEC.
>
> This mode extends the filter length from the current 48 ms to 128 ms.
> It is runtime selectable which allows it to be enabled through
> experiment. We reuse the DelayCorrection infrastructure to avoid having
> to replumb everything up to libjingle.
>
> Increases AEC complexity by ~50% on modern x86 CPUs.
> Measurements (in percent of usage on one core):
>
> Machine/CPU Normal Extended
> MacBook Retina (Early 2013),
> Core i7 Ivy Bridge (2.7 GHz, hyperthreaded) 0.6% 0.9%
>
> MacBook Air (Late 2010), Core 2 Duo (2.13 GHz) 1.4% 2.7%
>
> Chromebook Pixel, Core i5 Ivy Bridge (1.8 GHz) 0.6% 1.0%
>
> Samsung ARM Chromebook,
> Samsung Exynos 5 Dual (1.7 GHz) 3.2% 5.6%
>
> The relative value is large of course but the absolute should be
> acceptable in order to have a working AEC on some platforms.
>
> Detailed changes to the algorithm:
> - The filter length is changed from 48 to 128 ms. This comes with tuning
> of several parameters: i) filter adaptation stepsize and error
> threshold; ii) non-linear processing smoothing and overdrive.
> - Option to ignore the reported delays on platforms which we deem
> sufficiently unreliable. Currently this will be enabled in Chromium for
> Mac.
> - Faster startup times by removing the excessive "startup phase"
> processing of reported delays.
> - Much more conservative adjustments to the far-end read pointer. We
> smooth the delay difference more heavily, and back off from the
> difference more. Adjustments force a readaptation of the filter, so they
> should be avoided except when really necessary.
>
> Corresponds to these changes:
> https://chromereviews.googleplex.com/9412014
> https://chromereviews.googleplex.com/9514013
> https://chromereviews.googleplex.com/9960013
>
> BUG=454,827,1261
> R=bjornv@webrtc.org
>
> Review URL: https://webrtc-codereview.appspot.com/2151007

TBR=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2296005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4839 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
26e02f0ee44735697d575e35d2e5f3cd43dde512 25-Sep-2013 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Add an extended filter mode to AEC.

This mode extends the filter length from the current 48 ms to 128 ms.
It is runtime selectable which allows it to be enabled through
experiment. We reuse the DelayCorrection infrastructure to avoid having
to replumb everything up to libjingle.

Increases AEC complexity by ~50% on modern x86 CPUs.
Measurements (in percent of usage on one core):

Machine/CPU Normal Extended
MacBook Retina (Early 2013),
Core i7 Ivy Bridge (2.7 GHz, hyperthreaded) 0.6% 0.9%

MacBook Air (Late 2010), Core 2 Duo (2.13 GHz) 1.4% 2.7%

Chromebook Pixel, Core i5 Ivy Bridge (1.8 GHz) 0.6% 1.0%

Samsung ARM Chromebook,
Samsung Exynos 5 Dual (1.7 GHz) 3.2% 5.6%

The relative value is large of course but the absolute should be
acceptable in order to have a working AEC on some platforms.

Detailed changes to the algorithm:
- The filter length is changed from 48 to 128 ms. This comes with tuning
of several parameters: i) filter adaptation stepsize and error
threshold; ii) non-linear processing smoothing and overdrive.
- Option to ignore the reported delays on platforms which we deem
sufficiently unreliable. Currently this will be enabled in Chromium for
Mac.
- Faster startup times by removing the excessive "startup phase"
processing of reported delays.
- Much more conservative adjustments to the far-end read pointer. We
smooth the delay difference more heavily, and back off from the
difference more. Adjustments force a readaptation of the filter, so they
should be avoided except when really necessary.

Corresponds to these changes:
https://chromereviews.googleplex.com/9412014
https://chromereviews.googleplex.com/9514013
https://chromereviews.googleplex.com/9960013

BUG=454,827,1261
R=bjornv@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2151007

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4837 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
9162080527af5a58df6c06c4aac2209ec1989999 02-Aug-2013 pbos@webrtc.org <pbos@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Fix some chromium-style warnings in webrtc/modules/audio_processing/

BUG=163
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1902004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4472 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
61e596fc49443971219aa3989b200407d919f6c5 25-Jul-2013 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Add a Config class interface to AudioProcessing for passing options.

Pass the Config down to all AudioProcessing components.

Also add an EchoCancellationImplWrapper to optionally create different
EchoCancellationImpls.

BUG=2117
TBR=turaj@webrtc.org
TESTED=git try

Review URL: https://webrtc-codereview.appspot.com/1843004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4400 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
91d11b3cdd3ab20600aadb92929e4d48ff4f7422 05-Mar-2013 bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Adds new AEC API to audio_processing.

One unit test added.
Tested with audioproc_unittest and trybots

TEST=none
BUG=none

Review URL: https://webrtc-codereview.appspot.com/1154004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3613 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
6be1e934ad48ccdac734b5cbd50528235ec93816 01-Mar-2013 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Properly error check calls to AudioProcessing.

Checks must be made with "!= 0", not "== -1". Additionally:
* Clean up the function calling into AudioProcessing.
* Remove the unused _noiseWarning.
* Make the other warnings bool.

BUG=chromium:178040

Review URL: https://webrtc-codereview.appspot.com/1147004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3590 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h
14b43beb7ce4440b30dcea31196de5b4a529cb6b 22-Oct-2012 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Move src/ -> webrtc/

TBR=niklas.enbom@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/915006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2963 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_processing/echo_cancellation_impl.h