tdav_codec_h264_common.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  1. /*
  2. * Copyright (C) 2011 Doubango Telecom <http://www.doubango.org>.
  3. *
  4. * Contact: Mamadou Diop <diopmamadou(at)doubango(DOT)org>
  5. *
  6. * This file is part of Open Source Doubango Framework.
  7. *
  8. * DOUBANGO is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * DOUBANGO is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with DOUBANGO.
  20. *
  21. */
  22. #ifndef TINYDAV_CODEC_H264_COMMON_H
  23. #define TINYDAV_CODEC_H264_COMMON_H
  24. #include "tinydav_config.h"
  25. #include "tinydav/codecs/h264/tdav_codec_h264_rtp.h"
  26. #include "tinymedia/tmedia_codec.h"
  27. #include "tinymedia/tmedia_defaults.h"
  28. #include "tsk_memory.h"
  29. #include "tsk_string.h"
  30. #include "tsk_params.h"
  31. #include "tsk_debug.h"
  32. #include <string.h>
  33. TDAV_BEGIN_DECLS
  34. #if !defined(H264_MAX_BR)
  35. # define H264_MAX_BR 452
  36. #endif
  37. #if !defined(H264_MAX_MBPS)
  38. # define H264_MAX_MBPS 11880
  39. #endif
  40. #if !defined(H264_PACKETIZATION_MODE)
  41. # if METROPOLIS || 1
  42. # define H264_PACKETIZATION_MODE Single_NAL_Unit_Mode
  43. # else
  44. # define H264_PACKETIZATION_MODE Non_Interleaved_Mode
  45. #endif
  46. #endif
  47. #if !defined(H264_FS_MAX_COUNT)
  48. # define H264_FS_MAX_COUNT 16 // max number of DPBFS in the list
  49. #endif
  50. #if !defined(H264_LEVEL_MAX_COUNT)
  51. # define H264_LEVEL_MAX_COUNT 16 // Table A-1 – Level limits: "1", "1b"... "5.1"
  52. #endif
  53. // Table A-1 – Level limits
  54. static const int32_t MaxMBPS[H264_LEVEL_MAX_COUNT] = { 1485, 1485, 3000, 6000, 11880, 11880, 19800, 20250, 40500, 108000, 216000, 245760, 245760, 522240, 589824, 983040 };
  55. static const int32_t MaxFS[H264_LEVEL_MAX_COUNT] = { 99, 99, 396, 396, 396, 396, 792, 1620, 1620, 3600, 5120, 8192, 8192, 8704, 22080, 36864 };
  56. static const int32_t MaxDpbMbs[H264_LEVEL_MAX_COUNT] = { 396, 396, 900, 2376, 2376, 2376, 4752, 8100, 8100, 18000, 20480, 32768, 32768, 34816, 110400, 184320 };
  57. static const int32_t MaxBR[H264_LEVEL_MAX_COUNT] = { 64, 128, 192, 384, 768, 2000, 4000, 4000, 10000, 14000, 20000, 20000, 50000, 50000, 135000, 240000 };
  58. static const int32_t MaxCPB[H264_LEVEL_MAX_COUNT] = { 175, 350, 500, 1000, 2000, 2000, 4000, 4000, 10000, 14000, 20000, 25000, 62500, 62500, 135000, 240000 };
  59. // From "enum level_idc_e" to zero-based index
  60. // level_idc = (level.prefix * 10) + level.suffix. For example: 3.1 = 31. Exception for 1b = 9.
  61. // usage: int32_t maxDpbMbs = MaxDpbMbs[HL_CODEC_264_LEVEL_TO_ZERO_BASED_INDEX[level_idc]];
  62. static const int32_t H264_LEVEL_TO_ZERO_BASED_INDEX[255] = {
  63. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 3, 4, 4, 4, 4, 4,
  64. 4, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 9, 10, 10, 10, 10, 10,
  65. 10, 10, 10, 11, 12, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 15,
  66. 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16,
  67. 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
  68. 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
  69. 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
  70. 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
  71. 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
  72. 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
  73. 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
  74. 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
  75. 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
  76. 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
  77. 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
  78. 16, 16, 16, 16, 16, 16, 16, 16, 16
  79. };
  80. // Because of FD, declare it here
  81. typedef enum packetization_mode_e {
  82. Unknown_Mode = -1,
  83. Single_NAL_Unit_Mode = 0, /* Single NAL mode (Only nals from 1-23 are allowed) */
  84. Non_Interleaved_Mode = 1, /* Non-interleaved Mode: 1-23, 24 (STAP-A), 28 (FU-A) are allowed */
  85. Interleaved_Mode = 2 /* 25 (STAP-B), 26 (MTAP16), 27 (MTAP24), 28 (FU-A), and 29 (FU-B) are allowed.*/
  86. }
  87. packetization_mode_t;
  88. typedef struct tdav_codec_h264_common_s {
  89. TMEDIA_DECLARE_CODEC_VIDEO;
  90. profile_idc_t profile;
  91. uint8_t profile_iop;
  92. level_idc_t level;
  93. unsigned maxFS;
  94. packetization_mode_t pack_mode_remote; // remote packetization mode
  95. packetization_mode_t pack_mode_local; // local packetization mode
  96. struct {
  97. uint8_t* ptr;
  98. tsk_size_t size;
  99. } rtp;
  100. }
  101. tdav_codec_h264_common_t;
  102. #define TDAV_CODEC_H264_COMMON(self) ((tdav_codec_h264_common_t*)(self))
  103. #define TDAV_DECLARE_CODEC_H264_COMMON tdav_codec_h264_common_t __video__
  104. typedef struct tdav_codec_h264_common_level_size_xs {
  105. level_idc_t level;
  106. unsigned width;
  107. unsigned height;
  108. unsigned maxFS; // From "Table A-1 – Level limits"
  109. }
  110. tdav_codec_h264_common_level_size_xt;
  111. static const tdav_codec_h264_common_level_size_xt tdav_codec_h264_common_level_sizes [] = {
  112. {level_idc_1_0, 128, 96, 99},
  113. #if 0
  114. {level_idc_1_b, 128, 96, 99},
  115. #endif
  116. {level_idc_1_1, 176, 144, 396},
  117. {level_idc_1_2, 320, 240, 396},
  118. {level_idc_1_3, 352, 288, 396},
  119. {level_idc_2_0, 352, 288, 396},
  120. {level_idc_2_1, 480, 352, 792}, // Swap(352x480)
  121. {level_idc_2_2, 720, 480, 1620},
  122. {level_idc_3_0, 720, 576, 1620},
  123. {level_idc_3_1, 1280, 720, 3600},
  124. {level_idc_3_2, 1280, 720, 5120},
  125. {level_idc_4_0, 2048, 1024, 8192},
  126. {level_idc_4_1, 2048, 1024, 8192},
  127. {level_idc_4_2, 2048, 1080, 8704},
  128. {level_idc_5_0, 2560, 1920, 22080},
  129. {level_idc_5_1, 3840, 2160, 32400},
  130. {level_idc_5_2, 4096, 2048, 32768}
  131. };
  132. static int tdav_codec_h264_common_size_from_level(level_idc_t level, unsigned *width, unsigned *height)
  133. {
  134. tsk_size_t i;
  135. for(i = 0; i < sizeof(tdav_codec_h264_common_level_sizes)/sizeof(tdav_codec_h264_common_level_sizes[0]); ++i) {
  136. if(tdav_codec_h264_common_level_sizes[i].level == level) {
  137. *width = tdav_codec_h264_common_level_sizes[i].width;
  138. *height = tdav_codec_h264_common_level_sizes[i].height;
  139. return 0;
  140. }
  141. }
  142. return -1;
  143. }
  144. static int tdav_codec_h264_common_size_from_fs(unsigned maxFS, unsigned *width, unsigned *height)
  145. {
  146. tsk_size_t i;
  147. int ret = -1;
  148. for (i = 0; i < sizeof(tdav_codec_h264_common_level_sizes)/sizeof(tdav_codec_h264_common_level_sizes[0]); ++i) {
  149. if (tdav_codec_h264_common_level_sizes[i].maxFS <= maxFS) {
  150. *width = tdav_codec_h264_common_level_sizes[i].width;
  151. *height = tdav_codec_h264_common_level_sizes[i].height;
  152. ret = 0;
  153. }
  154. else {
  155. break;
  156. }
  157. }
  158. return ret;
  159. }
  160. static int tdav_codec_h264_common_level_from_size(unsigned width, unsigned height, level_idc_t *level)
  161. {
  162. tsk_size_t i;
  163. unsigned maxFS = (((width + 15) >> 4) * ((height + 15) >> 4));
  164. static const tsk_size_t __tdav_codec_h264_common_level_sizes_count = sizeof(tdav_codec_h264_common_level_sizes)/sizeof(tdav_codec_h264_common_level_sizes[0]);
  165. for (i = 0; i < __tdav_codec_h264_common_level_sizes_count; ++i) {
  166. if (/*tdav_codec_h264_common_level_sizes[i].maxFS*/ ((tdav_codec_h264_common_level_sizes[i].width * tdav_codec_h264_common_level_sizes[i].height) >> 8) >= maxFS) {
  167. *level = tdav_codec_h264_common_level_sizes[i].level;
  168. return 0;
  169. }
  170. }
  171. TSK_DEBUG_WARN("Failed to find default level for size=(%ux%u)", width, height);
  172. *level = tdav_codec_h264_common_level_sizes[__tdav_codec_h264_common_level_sizes_count - 1].level;
  173. return 0;
  174. }
  175. static int tdav_codec_h264_common_init(tdav_codec_h264_common_t * h264)
  176. {
  177. if (h264) {
  178. level_idc_t level;
  179. // because at this step 'tmedia_codec_init()' is not called yet and we need default size to compute the H.264 level
  180. if (TMEDIA_CODEC_VIDEO(h264)->out.width == 0 || TMEDIA_CODEC_VIDEO(h264)->in.width == 0) {
  181. unsigned width, height;
  182. tmedia_pref_video_size_t pref_size = tmedia_defaults_get_pref_video_size();
  183. if (tmedia_video_get_size(pref_size, &width, &height) == 0) {
  184. TMEDIA_CODEC_VIDEO(h264)->out.width = TMEDIA_CODEC_VIDEO(h264)->in.width = width;
  185. TMEDIA_CODEC_VIDEO(h264)->out.height = TMEDIA_CODEC_VIDEO(h264)->in.height = height;
  186. }
  187. }
  188. h264->maxFS = (((TMEDIA_CODEC_VIDEO(h264)->out.width + 15) >> 4) * ((TMEDIA_CODEC_VIDEO(h264)->out.height + 15) >> 4));
  189. if ((tdav_codec_h264_common_level_from_size(TMEDIA_CODEC_VIDEO(h264)->out.width, TMEDIA_CODEC_VIDEO(h264)->out.height, &level)) == 0) {
  190. h264->maxFS = TSK_MIN((int32_t)h264->maxFS, MaxFS[H264_LEVEL_TO_ZERO_BASED_INDEX[level]]);
  191. h264->level = level;
  192. }
  193. h264->profile_iop = 0x80;
  194. h264->pack_mode_local = H264_PACKETIZATION_MODE;
  195. h264->pack_mode_remote = Unknown_Mode;
  196. }
  197. return 0;
  198. }
  199. static int tdav_codec_h264_common_deinit(tdav_codec_h264_common_t * h264)
  200. {
  201. TSK_DEBUG_INFO("tdav_codec_h264_common_deinit");
  202. if(h264) {
  203. tmedia_codec_video_deinit(TMEDIA_CODEC_VIDEO(h264));
  204. TSK_FREE(h264->rtp.ptr);
  205. h264->rtp.size = 0;
  206. }
  207. return 0;
  208. }
  209. static int tdav_codec_h264_common_get_profile_and_level(const char* fmtp, profile_idc_t *profile, level_idc_t *level)
  210. {
  211. tsk_size_t size = tsk_strlen(fmtp);
  212. int start, end;
  213. int ret = -1;
  214. *profile = profile_idc_none;
  215. *level = level_idc_none;
  216. if((start = tsk_strindexOf(fmtp, size, "profile-level-id")) !=-1) {
  217. tsk_param_t* param;
  218. if((end = (int)tsk_strindexOf((fmtp+start), (tsk_size_t)(size-start), ";")) == -1) {
  219. end = (int)size;
  220. }
  221. if((param = tsk_params_parse_param((fmtp+start), (end-start)))) {
  222. profile_idc_t p_idc;
  223. level_idc_t l_idc;
  224. if(param->value) {
  225. tsk_strtrim_both(&param->value);
  226. }
  227. tdav_codec_h264_parse_profile(param->value, &p_idc, tsk_null, &l_idc);
  228. switch(p_idc) {
  229. case profile_idc_baseline:
  230. case profile_idc_main:
  231. *profile = p_idc;
  232. *level = l_idc;
  233. ret = 0;
  234. break;
  235. case profile_idc_extended:
  236. case profile_idc_high:
  237. default:
  238. /* Not supported */
  239. break;
  240. }
  241. TSK_OBJECT_SAFE_FREE(param);
  242. }
  243. }
  244. return ret;
  245. }
  246. static tsk_bool_t tdav_codec_h264_common_sdp_att_match(tdav_codec_h264_common_t* h264, const char* att_name, const char* att_value)
  247. {
  248. tsk_bool_t ret = tsk_true;
  249. tsk_bool_t outsize_changed = tsk_false;
  250. if(!h264) {
  251. TSK_DEBUG_ERROR("Invalid parameter");
  252. return tsk_false;
  253. }
  254. TSK_DEBUG_INFO("[H.264] Trying to match [%s:%s]", att_name, att_value);
  255. if (tsk_striequals(att_name, "fmtp")) {
  256. int val_int;
  257. profile_idc_t profile;
  258. level_idc_t level;
  259. tsk_params_L_t* params;
  260. /* Check whether the profile match (If the profile is missing, then we consider that it's ok) */
  261. if (tdav_codec_h264_common_get_profile_and_level(att_value, &profile, &level) != 0) {
  262. TSK_DEBUG_ERROR("Not valid profile-level: %s", att_value);
  263. return tsk_false;
  264. }
  265. if (h264->profile != profile) {
  266. return tsk_false;
  267. }
  268. else {
  269. if (h264->level != level) {
  270. // change the output size only when the remote party request lower level. If it request higher (or same) level then, we send our preferred size.
  271. if (h264->level > level) {
  272. unsigned width, height;
  273. h264->level = TSK_MIN(h264->level, level);
  274. if (tdav_codec_h264_common_size_from_level(h264->level, &width, &height) != 0) {
  275. return tsk_false;
  276. }
  277. // Do not change our size if it match the requested level
  278. if (width < TMEDIA_CODEC_VIDEO(h264)->out.width || height < TMEDIA_CODEC_VIDEO(h264)->out.height) {
  279. // Set "out" size. We must not send more than "MaxFS".
  280. // Default "out" is equal to the preferred sized and initialized in init().
  281. // "TANDBERG/4120 (X7.2.2)" will terminate the call if frame size > maxFS
  282. TMEDIA_CODEC_VIDEO(h264)->out.width = TSK_MIN(TMEDIA_CODEC_VIDEO(h264)->out.width, width);
  283. TMEDIA_CODEC_VIDEO(h264)->out.height = TSK_MIN(TMEDIA_CODEC_VIDEO(h264)->out.height, height);
  284. outsize_changed = tsk_true;
  285. }
  286. // Set default "in". Will be updated after receiving the first frame.
  287. TMEDIA_CODEC_VIDEO(h264)->in.width = width;
  288. TMEDIA_CODEC_VIDEO(h264)->in.height = height;
  289. }
  290. }
  291. }
  292. /* e.g. profile-level-id=42e00a; packetization-mode=1; max-br=452; max-mbps=11880 */
  293. if ((params = tsk_params_fromstring(att_value, ";", tsk_true))) {
  294. /* === max-br ===*/
  295. if ((val_int = tsk_params_get_param_value_as_int(params, "max-br")) != -1) {
  296. // should compare "max-br"?
  297. TMEDIA_CODEC_VIDEO(h264)->out.max_br = val_int*1000;
  298. }
  299. /* === max-fs ===*/
  300. if ((val_int = tsk_params_get_param_value_as_int(params, "max-fs")) != -1) {
  301. unsigned width_max, height_max, maxFS, currFS;
  302. currFS = (TMEDIA_CODEC_VIDEO(h264)->out.width * TMEDIA_CODEC_VIDEO(h264)->out.height) >> 8;
  303. maxFS = TSK_MIN(h264->maxFS/*preferred*/, (unsigned)val_int/*proposed*/); // make sure we'll never send more than we advertised
  304. if (currFS > maxFS) { // do not use default sizes when we already respect the MaxFS
  305. if (tdav_codec_h264_common_size_from_fs(maxFS, &width_max, &height_max) == 0) {
  306. TMEDIA_CODEC_VIDEO(h264)->out.width = TMEDIA_CODEC_VIDEO(h264)->in.width = width_max;
  307. TMEDIA_CODEC_VIDEO(h264)->out.height = TMEDIA_CODEC_VIDEO(h264)->in.height = height_max;
  308. outsize_changed = tsk_true;
  309. }
  310. }
  311. }
  312. /* === max-mbps ===*/
  313. if ((val_int = tsk_params_get_param_value_as_int(params, "max-mbps")) != -1) {
  314. // should compare "max-mbps"?
  315. TMEDIA_CODEC_VIDEO(h264)->out.max_mbps = val_int*1000;
  316. }
  317. /* === packetization-mode ===*/
  318. if ((val_int = tsk_params_get_param_value_as_int(params, "packetization-mode")) != -1) {
  319. if ((packetization_mode_t)val_int == Single_NAL_Unit_Mode || (packetization_mode_t)val_int == Non_Interleaved_Mode) {
  320. TDAV_CODEC_H264_COMMON(h264)->pack_mode_remote = (packetization_mode_t)val_int;
  321. TDAV_CODEC_H264_COMMON(h264)->pack_mode_local = TSK_MAX(TDAV_CODEC_H264_COMMON(h264)->pack_mode_local, TDAV_CODEC_H264_COMMON(h264)->pack_mode_remote);
  322. }
  323. else {
  324. TSK_DEBUG_INFO("packetization-mode not matching");
  325. ret = tsk_false;
  326. goto bail;
  327. }
  328. }
  329. }
  330. bail:
  331. TSK_OBJECT_SAFE_FREE(params);
  332. }
  333. else if(tsk_striequals(att_name, "imageattr")) {
  334. unsigned in_width, in_height, out_width, out_height;
  335. unsigned width, height;
  336. tsk_size_t s;
  337. if(tmedia_parse_video_imageattr(att_value, TMEDIA_CODEC_VIDEO(h264)->pref_size, &in_width, &in_height, &out_width, &out_height) != 0) {
  338. return tsk_false;
  339. }
  340. // check that 'imageattr' is comform to H.264 'profile-level'
  341. if(tdav_codec_h264_common_size_from_level(h264->level, &width, &height) != 0) {
  342. return tsk_false;
  343. }
  344. if((s = ((width * height * 3) >> 1)) < ((in_width * in_height * 3) >> 1) || s < ((out_width * out_height * 3) >> 1)) {
  345. return tsk_false;
  346. }
  347. TMEDIA_CODEC_VIDEO(h264)->in.width = in_width;
  348. TMEDIA_CODEC_VIDEO(h264)->in.height = in_height;
  349. TMEDIA_CODEC_VIDEO(h264)->out.width = out_width;
  350. TMEDIA_CODEC_VIDEO(h264)->out.height = out_height;
  351. outsize_changed = tsk_true;
  352. }
  353. // clamp the output size to the defined max range
  354. if (outsize_changed && tmedia_defaults_get_adapt_video_size_range_enabled()) {
  355. if (tmedia_codec_video_clamp_out_size_to_range_max(TMEDIA_CODEC_VIDEO(h264)) != 0) {
  356. ret = tsk_false;
  357. }
  358. }
  359. return ret;
  360. }
  361. static char* tdav_codec_h264_common_sdp_att_get(const tdav_codec_h264_common_t* h264, const char* att_name)
  362. {
  363. if(!h264 || !att_name) {
  364. TSK_DEBUG_ERROR("Invalid parameter");
  365. return tsk_null;
  366. }
  367. if (tsk_striequals(att_name, "fmtp")) {
  368. char* fmtp = tsk_null;
  369. #if 1
  370. // Required by "TANDBERG/4120 (X7.2.2)" and CISCO TelePresence
  371. tsk_sprintf(&fmtp, "profile-level-id=%x;max-mbps=%d;max-fs=%d",
  372. ((h264->profile << 16) | (h264->profile_iop << 8) | (h264->level & 0xff)),
  373. MaxMBPS[H264_LEVEL_TO_ZERO_BASED_INDEX[h264->level]],
  374. h264->maxFS
  375. );
  376. // Do not restrict packetisation-mode until we knwon what the remote party supports
  377. if (h264->pack_mode_remote != Unknown_Mode) {
  378. tsk_strcat_2(&fmtp, ";packetization-mode=%d", h264->pack_mode_local);
  379. }
  380. #else
  381. tsk_sprintf(&fmtp, "profile-level-id=%x; packetization-mode=%d", ((h264->profile << 16) | (h264->profile_iop << 8) | (h264->level & 0xff)), h264->pack_mode);
  382. #endif
  383. return fmtp;
  384. }
  385. else if(tsk_striequals(att_name, "imageattr")) {
  386. return tmedia_get_video_imageattr(TMEDIA_CODEC_VIDEO(h264)->pref_size,
  387. TMEDIA_CODEC_VIDEO(h264)->in.width, TMEDIA_CODEC_VIDEO(h264)->in.height, TMEDIA_CODEC_VIDEO(h264)->out.width, TMEDIA_CODEC_VIDEO(h264)->out.height);
  388. }
  389. return tsk_null;
  390. }
  391. TDAV_END_DECLS
  392. #endif /* TINYDAV_CODEC_H264_COMMON_H */