blob: 6433f5628d044f9e88a015c252588b2673044e09 [file] [log] [blame]
Henrik Kjellander2557b862015-11-18 22:00:21 +01001/*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#ifndef WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_H_
12#define WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_H_
13
14#if defined(WEBRTC_WIN)
15// This is a workaround on Windows due to the fact that some Windows
16// headers define CreateEvent as a macro to either CreateEventW or CreateEventA.
17// This can cause problems since we use that name as well and could
18// declare them as one thing here whereas in another place a windows header
19// may have been included and then implementing CreateEvent() causes compilation
20// errors. So for consistency, we include the main windows header here.
21#include <windows.h>
22#endif
23
24#include "webrtc/modules/include/module.h"
25#include "webrtc/modules/include/module_common_types.h"
26#include "webrtc/modules/video_coding/include/video_coding_defines.h"
27#include "webrtc/system_wrappers/include/event_wrapper.h"
28#include "webrtc/video_frame.h"
29
philipel9d3ab612015-12-21 04:12:39 -080030namespace webrtc {
Henrik Kjellander2557b862015-11-18 22:00:21 +010031
32class Clock;
33class EncodedImageCallback;
34class VideoEncoder;
35class VideoDecoder;
36struct CodecSpecificInfo;
37
38class EventFactory {
39 public:
40 virtual ~EventFactory() {}
41
42 virtual EventWrapper* CreateEvent() = 0;
43};
44
45class EventFactoryImpl : public EventFactory {
46 public:
47 virtual ~EventFactoryImpl() {}
48
philipel9d3ab612015-12-21 04:12:39 -080049 virtual EventWrapper* CreateEvent() { return EventWrapper::Create(); }
Henrik Kjellander2557b862015-11-18 22:00:21 +010050};
51
52// Used to indicate which decode with errors mode should be used.
53enum VCMDecodeErrorMode {
philipel9d3ab612015-12-21 04:12:39 -080054 kNoErrors, // Never decode with errors. Video will freeze
55 // if nack is disabled.
56 kSelectiveErrors, // Frames that are determined decodable in
57 // VCMSessionInfo may be decoded with missing
58 // packets. As not all incomplete frames will be
59 // decodable, video will freeze if nack is disabled.
60 kWithErrors // Release frames as needed. Errors may be
61 // introduced as some encoded frames may not be
62 // complete.
Henrik Kjellander2557b862015-11-18 22:00:21 +010063};
64
philipel9d3ab612015-12-21 04:12:39 -080065class VideoCodingModule : public Module {
66 public:
67 enum SenderNackMode { kNackNone, kNackAll, kNackSelective };
Henrik Kjellander2557b862015-11-18 22:00:21 +010068
philipel9d3ab612015-12-21 04:12:39 -080069 enum ReceiverRobustness { kNone, kHardNack, kSoftNack, kReferenceSelection };
Henrik Kjellander2557b862015-11-18 22:00:21 +010070
philipel9d3ab612015-12-21 04:12:39 -080071 static VideoCodingModule* Create(
72 Clock* clock,
73 VideoEncoderRateObserver* encoder_rate_observer,
74 VCMQMSettingsCallback* qm_settings_callback);
Henrik Kjellander2557b862015-11-18 22:00:21 +010075
philipel9d3ab612015-12-21 04:12:39 -080076 static VideoCodingModule* Create(Clock* clock, EventFactory* event_factory);
Henrik Kjellander2557b862015-11-18 22:00:21 +010077
philipel9d3ab612015-12-21 04:12:39 -080078 // Get supported codec settings using codec type
79 //
80 // Input:
81 // - codecType : The codec type to get settings for
82 // - codec : Memory where the codec settings will be stored
83 //
84 // Return value : VCM_OK, on success
85 // VCM_PARAMETER_ERROR if codec not supported
Peter Boström7776e782016-01-07 15:42:47 +010086 static void Codec(VideoCodecType codecType, VideoCodec* codec);
Henrik Kjellander2557b862015-11-18 22:00:21 +010087
philipel9d3ab612015-12-21 04:12:39 -080088 /*
89 * Sender
90 */
Henrik Kjellander2557b862015-11-18 22:00:21 +010091
philipel9d3ab612015-12-21 04:12:39 -080092 // Registers a codec to be used for encoding. Calling this
93 // API multiple times overwrites any previously registered codecs.
94 //
95 // NOTE: Must be called on the thread that constructed the VCM instance.
96 //
97 // Input:
98 // - sendCodec : Settings for the codec to be registered.
99 // - numberOfCores : The number of cores the codec is allowed
100 // to use.
101 // - maxPayloadSize : The maximum size each payload is allowed
102 // to have. Usually MTU - overhead.
103 //
104 // Return value : VCM_OK, on success.
105 // < 0, on error.
106 virtual int32_t RegisterSendCodec(const VideoCodec* sendCodec,
107 uint32_t numberOfCores,
108 uint32_t maxPayloadSize) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100109
philipel9d3ab612015-12-21 04:12:39 -0800110 // Register an external encoder object. This can not be used together with
111 // external decoder callbacks.
112 //
113 // Input:
114 // - externalEncoder : Encoder object to be used for encoding frames
115 // inserted
116 // with the AddVideoFrame API.
117 // - payloadType : The payload type bound which this encoder is bound
118 // to.
119 //
120 // Return value : VCM_OK, on success.
121 // < 0, on error.
122 // TODO(pbos): Remove return type when unused elsewhere.
123 virtual int32_t RegisterExternalEncoder(VideoEncoder* externalEncoder,
124 uint8_t payloadType,
125 bool internalSource = false) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100126
philipel9d3ab612015-12-21 04:12:39 -0800127 // API to get currently configured encoder target bitrate in bits/s.
128 //
129 // Return value : 0, on success.
130 // < 0, on error.
131 virtual int Bitrate(unsigned int* bitrate) const = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100132
philipel9d3ab612015-12-21 04:12:39 -0800133 // API to get currently configured encoder target frame rate.
134 //
135 // Return value : 0, on success.
136 // < 0, on error.
137 virtual int FrameRate(unsigned int* framerate) const = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100138
philipel9d3ab612015-12-21 04:12:39 -0800139 // Sets the parameters describing the send channel. These parameters are
140 // inputs to the
141 // Media Optimization inside the VCM and also specifies the target bit rate
142 // for the
143 // encoder. Bit rate used by NACK should already be compensated for by the
144 // user.
145 //
146 // Input:
147 // - target_bitrate : The target bitrate for VCM in bits/s.
148 // - lossRate : Fractions of lost packets the past second.
149 // (loss rate in percent = 100 * packetLoss /
150 // 255)
151 // - rtt : Current round-trip time in ms.
152 //
153 // Return value : VCM_OK, on success.
154 // < 0, on error.
155 virtual int32_t SetChannelParameters(uint32_t target_bitrate,
156 uint8_t lossRate,
157 int64_t rtt) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100158
philipel9d3ab612015-12-21 04:12:39 -0800159 // Sets the parameters describing the receive channel. These parameters are
160 // inputs to the
161 // Media Optimization inside the VCM.
162 //
163 // Input:
164 // - rtt : Current round-trip time in ms.
165 // with the most amount available bandwidth in
166 // a conference
167 // scenario
168 //
169 // Return value : VCM_OK, on success.
170 // < 0, on error.
171 virtual int32_t SetReceiveChannelParameters(int64_t rtt) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100172
philipel9d3ab612015-12-21 04:12:39 -0800173 // Register a transport callback which will be called to deliver the encoded
174 // data and
175 // side information.
176 //
177 // Input:
178 // - transport : The callback object to register.
179 //
180 // Return value : VCM_OK, on success.
181 // < 0, on error.
182 virtual int32_t RegisterTransportCallback(
183 VCMPacketizationCallback* transport) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100184
philipel9d3ab612015-12-21 04:12:39 -0800185 // Register video output information callback which will be called to deliver
186 // information
187 // about the video stream produced by the encoder, for instance the average
188 // frame rate and
189 // bit rate.
190 //
191 // Input:
192 // - outputInformation : The callback object to register.
193 //
194 // Return value : VCM_OK, on success.
195 // < 0, on error.
196 virtual int32_t RegisterSendStatisticsCallback(
197 VCMSendStatisticsCallback* sendStats) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100198
philipel9d3ab612015-12-21 04:12:39 -0800199 // Register a video protection callback which will be called to deliver
200 // the requested FEC rate and NACK status (on/off).
201 //
202 // Input:
203 // - protection : The callback object to register.
204 //
205 // Return value : VCM_OK, on success.
206 // < 0, on error.
207 virtual int32_t RegisterProtectionCallback(
208 VCMProtectionCallback* protection) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100209
philipel9d3ab612015-12-21 04:12:39 -0800210 // Enable or disable a video protection method.
211 //
212 // Input:
213 // - videoProtection : The method to enable or disable.
214 // - enable : True if the method should be enabled, false if
215 // it should be disabled.
216 //
217 // Return value : VCM_OK, on success.
218 // < 0, on error.
219 virtual int32_t SetVideoProtection(VCMVideoProtection videoProtection,
220 bool enable) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100221
philipel9d3ab612015-12-21 04:12:39 -0800222 // Add one raw video frame to the encoder. This function does all the
223 // necessary
224 // processing, then decides what frame type to encode, or if the frame should
225 // be
226 // dropped. If the frame should be encoded it passes the frame to the encoder
227 // before it returns.
228 //
229 // Input:
230 // - videoFrame : Video frame to encode.
231 // - codecSpecificInfo : Extra codec information, e.g., pre-parsed
232 // in-band signaling.
233 //
234 // Return value : VCM_OK, on success.
235 // < 0, on error.
236 virtual int32_t AddVideoFrame(
237 const VideoFrame& videoFrame,
238 const VideoContentMetrics* contentMetrics = NULL,
239 const CodecSpecificInfo* codecSpecificInfo = NULL) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100240
philipel9d3ab612015-12-21 04:12:39 -0800241 // Next frame encoded should be an intra frame (keyframe).
242 //
243 // Return value : VCM_OK, on success.
244 // < 0, on error.
245 virtual int32_t IntraFrameRequest(int stream_index) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100246
philipel9d3ab612015-12-21 04:12:39 -0800247 // Frame Dropper enable. Can be used to disable the frame dropping when the
248 // encoder
249 // over-uses its bit rate. This API is designed to be used when the encoded
250 // frames
251 // are supposed to be stored to an AVI file, or when the I420 codec is used
252 // and the
253 // target bit rate shouldn't affect the frame rate.
254 //
255 // Input:
256 // - enable : True to enable the setting, false to disable it.
257 //
258 // Return value : VCM_OK, on success.
259 // < 0, on error.
260 virtual int32_t EnableFrameDropper(bool enable) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100261
philipel9d3ab612015-12-21 04:12:39 -0800262 /*
263 * Receiver
264 */
Henrik Kjellander2557b862015-11-18 22:00:21 +0100265
philipel9d3ab612015-12-21 04:12:39 -0800266 // Register possible receive codecs, can be called multiple times for
267 // different codecs.
268 // The module will automatically switch between registered codecs depending on
269 // the
270 // payload type of incoming frames. The actual decoder will be created when
271 // needed.
272 //
273 // Input:
274 // - receiveCodec : Settings for the codec to be registered.
275 // - numberOfCores : Number of CPU cores that the decoder is allowed
276 // to use.
277 // - requireKeyFrame : Set this to true if you don't want any delta
278 // frames
279 // to be decoded until the first key frame has been
280 // decoded.
281 //
282 // Return value : VCM_OK, on success.
283 // < 0, on error.
284 virtual int32_t RegisterReceiveCodec(const VideoCodec* receiveCodec,
285 int32_t numberOfCores,
286 bool requireKeyFrame = false) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100287
philipel9d3ab612015-12-21 04:12:39 -0800288 // Register an externally defined decoder/renderer object. Can be a decoder
289 // only or a
290 // decoder coupled with a renderer. Note that RegisterReceiveCodec must be
291 // called to
292 // be used for decoding incoming streams.
293 //
294 // Input:
295 // - externalDecoder : The external decoder/renderer object.
296 // - payloadType : The payload type which this decoder should
297 // be
298 // registered to.
299 //
300 virtual void RegisterExternalDecoder(VideoDecoder* externalDecoder,
301 uint8_t payloadType) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100302
philipel9d3ab612015-12-21 04:12:39 -0800303 // Register a receive callback. Will be called whenever there is a new frame
304 // ready
305 // for rendering.
306 //
307 // Input:
308 // - receiveCallback : The callback object to be used by the
309 // module when a
310 // frame is ready for rendering.
311 // De-register with a NULL pointer.
312 //
313 // Return value : VCM_OK, on success.
314 // < 0, on error.
315 virtual int32_t RegisterReceiveCallback(
316 VCMReceiveCallback* receiveCallback) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100317
philipel9d3ab612015-12-21 04:12:39 -0800318 // Register a receive statistics callback which will be called to deliver
319 // information
320 // about the video stream received by the receiving side of the VCM, for
321 // instance the
322 // average frame rate and bit rate.
323 //
324 // Input:
325 // - receiveStats : The callback object to register.
326 //
327 // Return value : VCM_OK, on success.
328 // < 0, on error.
329 virtual int32_t RegisterReceiveStatisticsCallback(
330 VCMReceiveStatisticsCallback* receiveStats) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100331
philipel9d3ab612015-12-21 04:12:39 -0800332 // Register a decoder timing callback which will be called to deliver
333 // information about the timing of the decoder in the receiving side of the
334 // VCM, for instance the current and maximum frame decode latency.
335 //
336 // Input:
337 // - decoderTiming : The callback object to register.
338 //
339 // Return value : VCM_OK, on success.
340 // < 0, on error.
341 virtual int32_t RegisterDecoderTimingCallback(
342 VCMDecoderTimingCallback* decoderTiming) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100343
philipel9d3ab612015-12-21 04:12:39 -0800344 // Register a frame type request callback. This callback will be called when
345 // the
346 // module needs to request specific frame types from the send side.
347 //
348 // Input:
349 // - frameTypeCallback : The callback object to be used by the
350 // module when
351 // requesting a specific type of frame from
352 // the send side.
353 // De-register with a NULL pointer.
354 //
355 // Return value : VCM_OK, on success.
356 // < 0, on error.
357 virtual int32_t RegisterFrameTypeCallback(
358 VCMFrameTypeCallback* frameTypeCallback) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100359
philipel9d3ab612015-12-21 04:12:39 -0800360 // Registers a callback which is called whenever the receive side of the VCM
361 // encounters holes in the packet sequence and needs packets to be
362 // retransmitted.
363 //
364 // Input:
365 // - callback : The callback to be registered in the VCM.
366 //
367 // Return value : VCM_OK, on success.
368 // <0, on error.
369 virtual int32_t RegisterPacketRequestCallback(
370 VCMPacketRequestCallback* callback) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100371
philipel9d3ab612015-12-21 04:12:39 -0800372 // Waits for the next frame in the jitter buffer to become complete
373 // (waits no longer than maxWaitTimeMs), then passes it to the decoder for
374 // decoding.
375 // Should be called as often as possible to get the most out of the decoder.
376 //
377 // Return value : VCM_OK, on success.
378 // < 0, on error.
379 virtual int32_t Decode(uint16_t maxWaitTimeMs = 200) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100380
philipel9d3ab612015-12-21 04:12:39 -0800381 // Registers a callback which conveys the size of the render buffer.
382 virtual int RegisterRenderBufferSizeCallback(
383 VCMRenderBufferSizeCallback* callback) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100384
philipel9d3ab612015-12-21 04:12:39 -0800385 // API to get the codec which is currently used for decoding by the module.
386 //
387 // Input:
388 // - currentReceiveCodec : Settings for the codec to be registered.
389 //
390 // Return value : VCM_OK, on success.
391 // < 0, on error.
392 virtual int32_t ReceiveCodec(VideoCodec* currentReceiveCodec) const = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100393
philipel9d3ab612015-12-21 04:12:39 -0800394 // API to get the codec type currently used for decoding by the module.
395 //
396 // Return value : codecy type, on success.
397 // kVideoCodecUnknown, on error or if no receive codec is
398 // registered
399 virtual VideoCodecType ReceiveCodec() const = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100400
philipel9d3ab612015-12-21 04:12:39 -0800401 // Insert a parsed packet into the receiver side of the module. Will be placed
402 // in the
403 // jitter buffer waiting for the frame to become complete. Returns as soon as
404 // the packet
405 // has been placed in the jitter buffer.
406 //
407 // Input:
408 // - incomingPayload : Payload of the packet.
409 // - payloadLength : Length of the payload.
410 // - rtpInfo : The parsed header.
411 //
412 // Return value : VCM_OK, on success.
413 // < 0, on error.
414 virtual int32_t IncomingPacket(const uint8_t* incomingPayload,
415 size_t payloadLength,
416 const WebRtcRTPHeader& rtpInfo) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100417
philipel9d3ab612015-12-21 04:12:39 -0800418 // Minimum playout delay (Used for lip-sync). This is the minimum delay
419 // required
420 // to sync with audio. Not included in VideoCodingModule::Delay()
421 // Defaults to 0 ms.
422 //
423 // Input:
424 // - minPlayoutDelayMs : Additional delay in ms.
425 //
426 // Return value : VCM_OK, on success.
427 // < 0, on error.
428 virtual int32_t SetMinimumPlayoutDelay(uint32_t minPlayoutDelayMs) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100429
philipel9d3ab612015-12-21 04:12:39 -0800430 // Set the time required by the renderer to render a frame.
431 //
432 // Input:
433 // - timeMS : The time in ms required by the renderer to render a
434 // frame.
435 //
436 // Return value : VCM_OK, on success.
437 // < 0, on error.
438 virtual int32_t SetRenderDelay(uint32_t timeMS) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100439
philipel9d3ab612015-12-21 04:12:39 -0800440 // The total delay desired by the VCM. Can be less than the minimum
441 // delay set with SetMinimumPlayoutDelay.
442 //
443 // Return value : Total delay in ms, on success.
444 // < 0, on error.
445 virtual int32_t Delay() const = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100446
philipel9d3ab612015-12-21 04:12:39 -0800447 // Returns the number of packets discarded by the jitter buffer due to being
448 // too late. This can include duplicated packets which arrived after the
449 // frame was sent to the decoder. Therefore packets which were prematurely
450 // NACKed will be counted.
451 virtual uint32_t DiscardedPackets() const = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100452
philipel9d3ab612015-12-21 04:12:39 -0800453 // Robustness APIs
Henrik Kjellander2557b862015-11-18 22:00:21 +0100454
philipel9d3ab612015-12-21 04:12:39 -0800455 // Set the receiver robustness mode. The mode decides how the receiver
456 // responds to losses in the stream. The type of counter-measure (soft or
457 // hard NACK, dual decoder, RPS, etc.) is selected through the
458 // robustnessMode parameter. The errorMode parameter decides if it is
459 // allowed to display frames corrupted by losses. Note that not all
460 // combinations of the two parameters are feasible. An error will be
461 // returned for invalid combinations.
462 // Input:
463 // - robustnessMode : selected robustness mode.
464 // - errorMode : selected error mode.
465 //
466 // Return value : VCM_OK, on success;
467 // < 0, on error.
468 virtual int SetReceiverRobustnessMode(ReceiverRobustness robustnessMode,
469 VCMDecodeErrorMode errorMode) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100470
philipel9d3ab612015-12-21 04:12:39 -0800471 // Set the decode error mode. The mode decides which errors (if any) are
472 // allowed in decodable frames. Note that setting decode_error_mode to
473 // anything other than kWithErrors without enabling nack will cause
474 // long-term freezes (resulting from frequent key frame requests) if
475 // packet loss occurs.
476 virtual void SetDecodeErrorMode(VCMDecodeErrorMode decode_error_mode) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100477
philipel9d3ab612015-12-21 04:12:39 -0800478 // Sets the maximum number of sequence numbers that we are allowed to NACK
479 // and the oldest sequence number that we will consider to NACK. If a
480 // sequence number older than |max_packet_age_to_nack| is missing
481 // a key frame will be requested. A key frame will also be requested if the
482 // time of incomplete or non-continuous frames in the jitter buffer is above
483 // |max_incomplete_time_ms|.
484 virtual void SetNackSettings(size_t max_nack_list_size,
485 int max_packet_age_to_nack,
486 int max_incomplete_time_ms) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100487
philipel9d3ab612015-12-21 04:12:39 -0800488 // Setting a desired delay to the VCM receiver. Video rendering will be
489 // delayed by at least desired_delay_ms.
490 virtual int SetMinReceiverDelay(int desired_delay_ms) = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100491
philipel9d3ab612015-12-21 04:12:39 -0800492 // Lets the sender suspend video when the rate drops below
493 // |threshold_bps|, and turns back on when the rate goes back up above
494 // |threshold_bps| + |window_bps|.
495 virtual void SuspendBelowMinBitrate() = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100496
philipel9d3ab612015-12-21 04:12:39 -0800497 // Returns true if SuspendBelowMinBitrate is engaged and the video has been
498 // suspended due to bandwidth limitations; otherwise false.
499 virtual bool VideoSuspended() const = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100500
philipel9d3ab612015-12-21 04:12:39 -0800501 virtual void RegisterPreDecodeImageCallback(
502 EncodedImageCallback* observer) = 0;
503 virtual void RegisterPostEncodeImageCallback(
504 EncodedImageCallback* post_encode_callback) = 0;
505 // Releases pending decode calls, permitting faster thread shutdown.
506 virtual void TriggerDecoderShutdown() = 0;
Henrik Kjellander2557b862015-11-18 22:00:21 +0100507};
508
509} // namespace webrtc
510
philipel9d3ab612015-12-21 04:12:39 -0800511#endif // WEBRTC_MODULES_VIDEO_CODING_INCLUDE_VIDEO_CODING_H_