1 /* 2 * GPAC - Multimedia Framework C SDK 3 * 4 * Authors: Jean Le Feuvre 5 * Copyright (c) Telecom ParisTech 2000-2012 6 * All rights reserved 7 * 8 * This file is part of GPAC / BIFS codec sub-project 9 * 10 * GPAC is free software; you can redistribute it and/or modify 11 * it under the terms of the GNU Lesser General Public License as published by 12 * the Free Software Foundation; either version 2, or (at your option) 13 * any later version. 14 * 15 * GPAC is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License for more details. 19 * 20 * You should have received a copy of the GNU Lesser General Public 21 * License along with this library; see the file COPYING. If not, write to 22 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 23 * 24 */ 25 26 27 /* 28 DO NOT MOFIFY - File generated on GMT Tue Nov 08 09:10:57 2011 29 30 BY MPEG4Gen for GPAC Version 0.5.0 31 */ 32 33 #ifndef _NDT_H 34 #define _NDT_H 35 36 #include <gpac/nodes_mpeg4.h> 37 38 39 40 #ifndef GPAC_DISABLE_BIFS 41 42 43 u32 ALL_GetNodeType(const u32 *table, const u32 count, u32 NodeTag, u32 Version); 44 45 46 47 /* NDT BIFS Version 1 */ 48 49 #define SFWorldNode_V1_NUMBITS 7 50 #define SFWorldNode_V1_Count 100 51 52 static const u32 SFWorldNode_V1_TypeToTag[100] = { 53 TAG_MPEG4_Anchor, TAG_MPEG4_AnimationStream, TAG_MPEG4_Appearance, TAG_MPEG4_AudioBuffer, TAG_MPEG4_AudioClip, TAG_MPEG4_AudioDelay, TAG_MPEG4_AudioFX, TAG_MPEG4_AudioMix, TAG_MPEG4_AudioSource, TAG_MPEG4_AudioSwitch, TAG_MPEG4_Background, TAG_MPEG4_Background2D, TAG_MPEG4_Billboard, TAG_MPEG4_Bitmap, TAG_MPEG4_Box, TAG_MPEG4_Circle, TAG_MPEG4_Collision, TAG_MPEG4_Color, TAG_MPEG4_ColorInterpolator, TAG_MPEG4_CompositeTexture2D, TAG_MPEG4_CompositeTexture3D, TAG_MPEG4_Conditional, TAG_MPEG4_Cone, TAG_MPEG4_Coordinate, TAG_MPEG4_Coordinate2D, TAG_MPEG4_CoordinateInterpolator, TAG_MPEG4_CoordinateInterpolator2D, TAG_MPEG4_Curve2D, TAG_MPEG4_Cylinder, TAG_MPEG4_CylinderSensor, TAG_MPEG4_DirectionalLight, TAG_MPEG4_DiscSensor, TAG_MPEG4_ElevationGrid, TAG_MPEG4_Expression, TAG_MPEG4_Extrusion, TAG_MPEG4_Face, TAG_MPEG4_FaceDefMesh, TAG_MPEG4_FaceDefTables, TAG_MPEG4_FaceDefTransform, TAG_MPEG4_FAP, TAG_MPEG4_FDP, TAG_MPEG4_FIT, TAG_MPEG4_Fog, TAG_MPEG4_FontStyle, TAG_MPEG4_Form, TAG_MPEG4_Group, TAG_MPEG4_ImageTexture, TAG_MPEG4_IndexedFaceSet, TAG_MPEG4_IndexedFaceSet2D, TAG_MPEG4_IndexedLineSet, TAG_MPEG4_IndexedLineSet2D, TAG_MPEG4_Inline, TAG_MPEG4_LOD, TAG_MPEG4_Layer2D, TAG_MPEG4_Layer3D, TAG_MPEG4_Layout, TAG_MPEG4_LineProperties, TAG_MPEG4_ListeningPoint, TAG_MPEG4_Material, TAG_MPEG4_Material2D, TAG_MPEG4_MovieTexture, TAG_MPEG4_NavigationInfo, TAG_MPEG4_Normal, TAG_MPEG4_NormalInterpolator, TAG_MPEG4_OrderedGroup, TAG_MPEG4_OrientationInterpolator, TAG_MPEG4_PixelTexture, TAG_MPEG4_PlaneSensor, TAG_MPEG4_PlaneSensor2D, TAG_MPEG4_PointLight, TAG_MPEG4_PointSet, TAG_MPEG4_PointSet2D, TAG_MPEG4_PositionInterpolator, TAG_MPEG4_PositionInterpolator2D, TAG_MPEG4_ProximitySensor2D, TAG_MPEG4_ProximitySensor, TAG_MPEG4_QuantizationParameter, TAG_MPEG4_Rectangle, TAG_MPEG4_ScalarInterpolator, TAG_MPEG4_Script, TAG_MPEG4_Shape, TAG_MPEG4_Sound, TAG_MPEG4_Sound2D, TAG_MPEG4_Sphere, TAG_MPEG4_SphereSensor, TAG_MPEG4_SpotLight, TAG_MPEG4_Switch, TAG_MPEG4_TermCap, TAG_MPEG4_Text, TAG_MPEG4_TextureCoordinate, TAG_MPEG4_TextureTransform, TAG_MPEG4_TimeSensor, TAG_MPEG4_TouchSensor, TAG_MPEG4_Transform, TAG_MPEG4_Transform2D, TAG_MPEG4_Valuator, TAG_MPEG4_Viewpoint, TAG_MPEG4_VisibilitySensor, TAG_MPEG4_Viseme, TAG_MPEG4_WorldInfo 54 }; 55 56 #define SF3DNode_V1_NUMBITS 6 57 #define SF3DNode_V1_Count 52 58 59 static const u32 SF3DNode_V1_TypeToTag[52] = { 60 TAG_MPEG4_Anchor, TAG_MPEG4_AnimationStream, TAG_MPEG4_Background, TAG_MPEG4_Background2D, TAG_MPEG4_Billboard, TAG_MPEG4_Collision, TAG_MPEG4_ColorInterpolator, TAG_MPEG4_Conditional, TAG_MPEG4_CoordinateInterpolator, TAG_MPEG4_CoordinateInterpolator2D, TAG_MPEG4_CylinderSensor, TAG_MPEG4_DirectionalLight, TAG_MPEG4_DiscSensor, TAG_MPEG4_Face, TAG_MPEG4_Fog, TAG_MPEG4_Form, TAG_MPEG4_Group, TAG_MPEG4_Inline, TAG_MPEG4_LOD, TAG_MPEG4_Layer2D, TAG_MPEG4_Layer3D, TAG_MPEG4_Layout, TAG_MPEG4_ListeningPoint, TAG_MPEG4_NavigationInfo, TAG_MPEG4_NormalInterpolator, TAG_MPEG4_OrderedGroup, TAG_MPEG4_OrientationInterpolator, TAG_MPEG4_PlaneSensor, TAG_MPEG4_PlaneSensor2D, TAG_MPEG4_PointLight, TAG_MPEG4_PositionInterpolator, TAG_MPEG4_PositionInterpolator2D, TAG_MPEG4_ProximitySensor2D, TAG_MPEG4_ProximitySensor, TAG_MPEG4_QuantizationParameter, TAG_MPEG4_ScalarInterpolator, TAG_MPEG4_Script, TAG_MPEG4_Shape, TAG_MPEG4_Sound, TAG_MPEG4_Sound2D, TAG_MPEG4_SphereSensor, TAG_MPEG4_SpotLight, TAG_MPEG4_Switch, TAG_MPEG4_TermCap, TAG_MPEG4_TimeSensor, TAG_MPEG4_TouchSensor, TAG_MPEG4_Transform, TAG_MPEG4_Transform2D, TAG_MPEG4_Valuator, TAG_MPEG4_Viewpoint, TAG_MPEG4_VisibilitySensor, TAG_MPEG4_WorldInfo 61 }; 62 63 #define SF2DNode_V1_NUMBITS 5 64 #define SF2DNode_V1_Count 31 65 66 static const u32 SF2DNode_V1_TypeToTag[31] = { 67 TAG_MPEG4_Anchor, TAG_MPEG4_AnimationStream, TAG_MPEG4_Background2D, TAG_MPEG4_ColorInterpolator, TAG_MPEG4_Conditional, TAG_MPEG4_CoordinateInterpolator2D, TAG_MPEG4_DiscSensor, TAG_MPEG4_Face, TAG_MPEG4_Form, TAG_MPEG4_Group, TAG_MPEG4_Inline, TAG_MPEG4_LOD, TAG_MPEG4_Layer2D, TAG_MPEG4_Layer3D, TAG_MPEG4_Layout, TAG_MPEG4_OrderedGroup, TAG_MPEG4_PlaneSensor2D, TAG_MPEG4_PositionInterpolator2D, TAG_MPEG4_ProximitySensor2D, TAG_MPEG4_QuantizationParameter, TAG_MPEG4_ScalarInterpolator, TAG_MPEG4_Script, TAG_MPEG4_Shape, TAG_MPEG4_Sound2D, TAG_MPEG4_Switch, TAG_MPEG4_TermCap, TAG_MPEG4_TimeSensor, TAG_MPEG4_TouchSensor, TAG_MPEG4_Transform2D, TAG_MPEG4_Valuator, TAG_MPEG4_WorldInfo 68 }; 69 70 #define SFStreamingNode_V1_NUMBITS 3 71 #define SFStreamingNode_V1_Count 5 72 73 static const u32 SFStreamingNode_V1_TypeToTag[5] = { 74 TAG_MPEG4_AnimationStream, TAG_MPEG4_AudioClip, TAG_MPEG4_AudioSource, TAG_MPEG4_Inline, TAG_MPEG4_MovieTexture 75 }; 76 77 #define SFAppearanceNode_V1_NUMBITS 1 78 #define SFAppearanceNode_V1_Count 1 79 80 static const u32 SFAppearanceNode_V1_TypeToTag[1] = { 81 TAG_MPEG4_Appearance 82 }; 83 84 #define SFAudioNode_V1_NUMBITS 3 85 #define SFAudioNode_V1_Count 7 86 87 static const u32 SFAudioNode_V1_TypeToTag[7] = { 88 TAG_MPEG4_AudioBuffer, TAG_MPEG4_AudioClip, TAG_MPEG4_AudioDelay, TAG_MPEG4_AudioFX, TAG_MPEG4_AudioMix, TAG_MPEG4_AudioSource, TAG_MPEG4_AudioSwitch 89 }; 90 91 #define SFBackground3DNode_V1_NUMBITS 1 92 #define SFBackground3DNode_V1_Count 1 93 94 static const u32 SFBackground3DNode_V1_TypeToTag[1] = { 95 TAG_MPEG4_Background 96 }; 97 98 #define SFBackground2DNode_V1_NUMBITS 1 99 #define SFBackground2DNode_V1_Count 1 100 101 static const u32 SFBackground2DNode_V1_TypeToTag[1] = { 102 TAG_MPEG4_Background2D 103 }; 104 105 #define SFGeometryNode_V1_NUMBITS 5 106 #define SFGeometryNode_V1_Count 17 107 108 static const u32 SFGeometryNode_V1_TypeToTag[17] = { 109 TAG_MPEG4_Bitmap, TAG_MPEG4_Box, TAG_MPEG4_Circle, TAG_MPEG4_Cone, TAG_MPEG4_Curve2D, TAG_MPEG4_Cylinder, TAG_MPEG4_ElevationGrid, TAG_MPEG4_Extrusion, TAG_MPEG4_IndexedFaceSet, TAG_MPEG4_IndexedFaceSet2D, TAG_MPEG4_IndexedLineSet, TAG_MPEG4_IndexedLineSet2D, TAG_MPEG4_PointSet, TAG_MPEG4_PointSet2D, TAG_MPEG4_Rectangle, TAG_MPEG4_Sphere, TAG_MPEG4_Text 110 }; 111 112 #define SFColorNode_V1_NUMBITS 1 113 #define SFColorNode_V1_Count 1 114 115 static const u32 SFColorNode_V1_TypeToTag[1] = { 116 TAG_MPEG4_Color 117 }; 118 119 #define SFTextureNode_V1_NUMBITS 3 120 #define SFTextureNode_V1_Count 5 121 122 static const u32 SFTextureNode_V1_TypeToTag[5] = { 123 TAG_MPEG4_CompositeTexture2D, TAG_MPEG4_CompositeTexture3D, TAG_MPEG4_ImageTexture, TAG_MPEG4_MovieTexture, TAG_MPEG4_PixelTexture 124 }; 125 126 #define SFCoordinateNode_V1_NUMBITS 1 127 #define SFCoordinateNode_V1_Count 1 128 129 static const u32 SFCoordinateNode_V1_TypeToTag[1] = { 130 TAG_MPEG4_Coordinate 131 }; 132 133 #define SFCoordinate2DNode_V1_NUMBITS 1 134 #define SFCoordinate2DNode_V1_Count 1 135 136 static const u32 SFCoordinate2DNode_V1_TypeToTag[1] = { 137 TAG_MPEG4_Coordinate2D 138 }; 139 140 #define SFExpressionNode_V1_NUMBITS 1 141 #define SFExpressionNode_V1_Count 1 142 143 static const u32 SFExpressionNode_V1_TypeToTag[1] = { 144 TAG_MPEG4_Expression 145 }; 146 147 #define SFFaceDefMeshNode_V1_NUMBITS 1 148 #define SFFaceDefMeshNode_V1_Count 1 149 150 static const u32 SFFaceDefMeshNode_V1_TypeToTag[1] = { 151 TAG_MPEG4_FaceDefMesh 152 }; 153 154 #define SFFaceDefTablesNode_V1_NUMBITS 1 155 #define SFFaceDefTablesNode_V1_Count 1 156 157 static const u32 SFFaceDefTablesNode_V1_TypeToTag[1] = { 158 TAG_MPEG4_FaceDefTables 159 }; 160 161 #define SFFaceDefTransformNode_V1_NUMBITS 1 162 #define SFFaceDefTransformNode_V1_Count 1 163 164 static const u32 SFFaceDefTransformNode_V1_TypeToTag[1] = { 165 TAG_MPEG4_FaceDefTransform 166 }; 167 168 #define SFFAPNode_V1_NUMBITS 1 169 #define SFFAPNode_V1_Count 1 170 171 static const u32 SFFAPNode_V1_TypeToTag[1] = { 172 TAG_MPEG4_FAP 173 }; 174 175 #define SFFDPNode_V1_NUMBITS 1 176 #define SFFDPNode_V1_Count 1 177 178 static const u32 SFFDPNode_V1_TypeToTag[1] = { 179 TAG_MPEG4_FDP 180 }; 181 182 #define SFFITNode_V1_NUMBITS 1 183 #define SFFITNode_V1_Count 1 184 185 static const u32 SFFITNode_V1_TypeToTag[1] = { 186 TAG_MPEG4_FIT 187 }; 188 189 #define SFFogNode_V1_NUMBITS 1 190 #define SFFogNode_V1_Count 1 191 192 static const u32 SFFogNode_V1_TypeToTag[1] = { 193 TAG_MPEG4_Fog 194 }; 195 196 #define SFFontStyleNode_V1_NUMBITS 1 197 #define SFFontStyleNode_V1_Count 1 198 199 static const u32 SFFontStyleNode_V1_TypeToTag[1] = { 200 TAG_MPEG4_FontStyle 201 }; 202 203 #define SFTopNode_V1_NUMBITS 3 204 #define SFTopNode_V1_Count 4 205 206 static const u32 SFTopNode_V1_TypeToTag[4] = { 207 TAG_MPEG4_Group, TAG_MPEG4_Layer2D, TAG_MPEG4_Layer3D, TAG_MPEG4_OrderedGroup 208 }; 209 210 #define SFLinePropertiesNode_V1_NUMBITS 1 211 #define SFLinePropertiesNode_V1_Count 1 212 213 static const u32 SFLinePropertiesNode_V1_TypeToTag[1] = { 214 TAG_MPEG4_LineProperties 215 }; 216 217 #define SFMaterialNode_V1_NUMBITS 2 218 #define SFMaterialNode_V1_Count 2 219 220 static const u32 SFMaterialNode_V1_TypeToTag[2] = { 221 TAG_MPEG4_Material, TAG_MPEG4_Material2D 222 }; 223 224 #define SFNavigationInfoNode_V1_NUMBITS 1 225 #define SFNavigationInfoNode_V1_Count 1 226 227 static const u32 SFNavigationInfoNode_V1_TypeToTag[1] = { 228 TAG_MPEG4_NavigationInfo 229 }; 230 231 #define SFNormalNode_V1_NUMBITS 1 232 #define SFNormalNode_V1_Count 1 233 234 static const u32 SFNormalNode_V1_TypeToTag[1] = { 235 TAG_MPEG4_Normal 236 }; 237 238 #define SFTextureCoordinateNode_V1_NUMBITS 1 239 #define SFTextureCoordinateNode_V1_Count 1 240 241 static const u32 SFTextureCoordinateNode_V1_TypeToTag[1] = { 242 TAG_MPEG4_TextureCoordinate 243 }; 244 245 #define SFTextureTransformNode_V1_NUMBITS 1 246 #define SFTextureTransformNode_V1_Count 1 247 248 static const u32 SFTextureTransformNode_V1_TypeToTag[1] = { 249 TAG_MPEG4_TextureTransform 250 }; 251 252 #define SFViewpointNode_V1_NUMBITS 1 253 #define SFViewpointNode_V1_Count 1 254 255 static const u32 SFViewpointNode_V1_TypeToTag[1] = { 256 TAG_MPEG4_Viewpoint 257 }; 258 259 #define SFVisemeNode_V1_NUMBITS 1 260 #define SFVisemeNode_V1_Count 1 261 262 static const u32 SFVisemeNode_V1_TypeToTag[1] = { 263 TAG_MPEG4_Viseme 264 }; 265 266 267 u32 NDT_V1_GetNumBits(u32 NDT_Tag); 268 u32 NDT_V1_GetNodeTag(u32 Context_NDT_Tag, u32 NodeType); 269 u32 NDT_V1_GetNodeType(u32 NDT_Tag, u32 NodeTag); 270 271 272 273 274 /* NDT BIFS Version 2 */ 275 276 #define SFWorldNode_V2_NUMBITS 4 277 #define SFWorldNode_V2_Count 12 278 279 static const u32 SFWorldNode_V2_TypeToTag[12] = { 280 TAG_MPEG4_AcousticMaterial, TAG_MPEG4_AcousticScene, TAG_MPEG4_ApplicationWindow, TAG_MPEG4_BAP, TAG_MPEG4_BDP, TAG_MPEG4_Body, TAG_MPEG4_BodyDefTable, TAG_MPEG4_BodySegmentConnectionHint, TAG_MPEG4_DirectiveSound, TAG_MPEG4_Hierarchical3DMesh, TAG_MPEG4_MaterialKey, TAG_MPEG4_PerceptualParameters 281 }; 282 283 #define SF3DNode_V2_NUMBITS 3 284 #define SF3DNode_V2_Count 3 285 286 static const u32 SF3DNode_V2_TypeToTag[3] = { 287 TAG_MPEG4_AcousticScene, TAG_MPEG4_Body, TAG_MPEG4_DirectiveSound 288 }; 289 290 #define SF2DNode_V2_NUMBITS 2 291 #define SF2DNode_V2_Count 2 292 293 static const u32 SF2DNode_V2_TypeToTag[2] = { 294 TAG_MPEG4_ApplicationWindow, TAG_MPEG4_Body 295 }; 296 297 #define SFGeometryNode_V2_NUMBITS 2 298 #define SFGeometryNode_V2_Count 1 299 300 static const u32 SFGeometryNode_V2_TypeToTag[1] = { 301 TAG_MPEG4_Hierarchical3DMesh 302 }; 303 304 #define SFMaterialNode_V2_NUMBITS 2 305 #define SFMaterialNode_V2_Count 2 306 307 static const u32 SFMaterialNode_V2_TypeToTag[2] = { 308 TAG_MPEG4_AcousticMaterial, TAG_MPEG4_MaterialKey 309 }; 310 311 #define SFBAPNode_V2_NUMBITS 2 312 #define SFBAPNode_V2_Count 1 313 314 static const u32 SFBAPNode_V2_TypeToTag[1] = { 315 TAG_MPEG4_BAP 316 }; 317 318 #define SFBDPNode_V2_NUMBITS 2 319 #define SFBDPNode_V2_Count 1 320 321 static const u32 SFBDPNode_V2_TypeToTag[1] = { 322 TAG_MPEG4_BDP 323 }; 324 325 #define SFBodyDefTableNode_V2_NUMBITS 2 326 #define SFBodyDefTableNode_V2_Count 1 327 328 static const u32 SFBodyDefTableNode_V2_TypeToTag[1] = { 329 TAG_MPEG4_BodyDefTable 330 }; 331 332 #define SFBodySegmentConnectionHintNode_V2_NUMBITS 2 333 #define SFBodySegmentConnectionHintNode_V2_Count 1 334 335 static const u32 SFBodySegmentConnectionHintNode_V2_TypeToTag[1] = { 336 TAG_MPEG4_BodySegmentConnectionHint 337 }; 338 339 #define SFPerceptualParameterNode_V2_NUMBITS 2 340 #define SFPerceptualParameterNode_V2_Count 1 341 342 static const u32 SFPerceptualParameterNode_V2_TypeToTag[1] = { 343 TAG_MPEG4_PerceptualParameters 344 }; 345 346 347 u32 NDT_V2_GetNumBits(u32 NDT_Tag); 348 u32 NDT_V2_GetNodeTag(u32 Context_NDT_Tag, u32 NodeType); 349 u32 NDT_V2_GetNodeType(u32 NDT_Tag, u32 NodeTag); 350 351 352 353 354 /* NDT BIFS Version 3 */ 355 356 #define SFWorldNode_V3_NUMBITS 2 357 #define SFWorldNode_V3_Count 3 358 359 static const u32 SFWorldNode_V3_TypeToTag[3] = { 360 TAG_MPEG4_TemporalTransform, TAG_MPEG4_TemporalGroup, TAG_MPEG4_ServerCommand 361 }; 362 363 #define SF3DNode_V3_NUMBITS 2 364 #define SF3DNode_V3_Count 3 365 366 static const u32 SF3DNode_V3_TypeToTag[3] = { 367 TAG_MPEG4_TemporalTransform, TAG_MPEG4_TemporalGroup, TAG_MPEG4_ServerCommand 368 }; 369 370 #define SF2DNode_V3_NUMBITS 2 371 #define SF2DNode_V3_Count 3 372 373 static const u32 SF2DNode_V3_TypeToTag[3] = { 374 TAG_MPEG4_TemporalTransform, TAG_MPEG4_TemporalGroup, TAG_MPEG4_ServerCommand 375 }; 376 377 #define SFTemporalNode_V3_NUMBITS 2 378 #define SFTemporalNode_V3_Count 2 379 380 static const u32 SFTemporalNode_V3_TypeToTag[2] = { 381 TAG_MPEG4_TemporalTransform, TAG_MPEG4_TemporalGroup 382 }; 383 384 385 u32 NDT_V3_GetNumBits(u32 NDT_Tag); 386 u32 NDT_V3_GetNodeTag(u32 Context_NDT_Tag, u32 NodeType); 387 u32 NDT_V3_GetNodeType(u32 NDT_Tag, u32 NodeTag); 388 389 390 391 392 /* NDT BIFS Version 4 */ 393 394 #define SFWorldNode_V4_NUMBITS 3 395 #define SFWorldNode_V4_Count 5 396 397 static const u32 SFWorldNode_V4_TypeToTag[5] = { 398 TAG_MPEG4_InputSensor, TAG_MPEG4_MatteTexture, TAG_MPEG4_MediaBuffer, TAG_MPEG4_MediaControl, TAG_MPEG4_MediaSensor 399 }; 400 401 #define SF3DNode_V4_NUMBITS 3 402 #define SF3DNode_V4_Count 5 403 404 static const u32 SF3DNode_V4_TypeToTag[5] = { 405 TAG_MPEG4_InputSensor, TAG_MPEG4_MatteTexture, TAG_MPEG4_MediaBuffer, TAG_MPEG4_MediaControl, TAG_MPEG4_MediaSensor 406 }; 407 408 #define SF2DNode_V4_NUMBITS 3 409 #define SF2DNode_V4_Count 5 410 411 static const u32 SF2DNode_V4_TypeToTag[5] = { 412 TAG_MPEG4_InputSensor, TAG_MPEG4_MatteTexture, TAG_MPEG4_MediaBuffer, TAG_MPEG4_MediaControl, TAG_MPEG4_MediaSensor 413 }; 414 415 #define SFTextureNode_V4_NUMBITS 1 416 #define SFTextureNode_V4_Count 1 417 418 static const u32 SFTextureNode_V4_TypeToTag[1] = { 419 TAG_MPEG4_MatteTexture 420 }; 421 422 423 u32 NDT_V4_GetNumBits(u32 NDT_Tag); 424 u32 NDT_V4_GetNodeTag(u32 Context_NDT_Tag, u32 NodeType); 425 u32 NDT_V4_GetNodeType(u32 NDT_Tag, u32 NodeTag); 426 427 428 429 430 /* NDT BIFS Version 5 */ 431 432 #define SFWorldNode_V5_NUMBITS 6 433 #define SFWorldNode_V5_Count 39 434 435 static const u32 SFWorldNode_V5_TypeToTag[39] = { 436 TAG_MPEG4_BitWrapper, TAG_MPEG4_CoordinateInterpolator4D, TAG_MPEG4_DepthImage, TAG_MPEG4_FFD, TAG_MPEG4_Implicit, TAG_MPEG4_XXLFM_Appearance, TAG_MPEG4_XXLFM_BlendList, TAG_MPEG4_XXLFM_FrameList, TAG_MPEG4_XXLFM_LightMap, TAG_MPEG4_XXLFM_SurfaceMapList, TAG_MPEG4_XXLFM_ViewMapList, TAG_MPEG4_MeshGrid, TAG_MPEG4_NonLinearDeformer, TAG_MPEG4_NurbsCurve, TAG_MPEG4_NurbsCurve2D, TAG_MPEG4_NurbsSurface, TAG_MPEG4_OctreeImage, TAG_MPEG4_XXParticles, TAG_MPEG4_XXParticleInitBox, TAG_MPEG4_XXPlanarObstacle, TAG_MPEG4_XXPointAttractor, TAG_MPEG4_PointTexture, TAG_MPEG4_PositionAnimator, TAG_MPEG4_PositionAnimator2D, TAG_MPEG4_PositionInterpolator4D, TAG_MPEG4_ProceduralTexture, TAG_MPEG4_Quadric, TAG_MPEG4_SBBone, TAG_MPEG4_SBMuscle, TAG_MPEG4_SBSegment, TAG_MPEG4_SBSite, TAG_MPEG4_SBSkinnedModel, TAG_MPEG4_SBVCAnimation, TAG_MPEG4_ScalarAnimator, TAG_MPEG4_SimpleTexture, TAG_MPEG4_SolidRep, TAG_MPEG4_SubdivisionSurface, TAG_MPEG4_SubdivSurfaceSector, TAG_MPEG4_WaveletSubdivisionSurface 437 }; 438 439 #define SF3DNode_V5_NUMBITS 5 440 #define SF3DNode_V5_Count 17 441 442 static const u32 SF3DNode_V5_TypeToTag[17] = { 443 TAG_MPEG4_BitWrapper, TAG_MPEG4_CoordinateInterpolator4D, TAG_MPEG4_DepthImage, TAG_MPEG4_FFD, TAG_MPEG4_OctreeImage, TAG_MPEG4_XXParticles, TAG_MPEG4_PositionAnimator, TAG_MPEG4_PositionAnimator2D, TAG_MPEG4_PositionInterpolator4D, TAG_MPEG4_SBBone, TAG_MPEG4_SBMuscle, TAG_MPEG4_SBSegment, TAG_MPEG4_SBSite, TAG_MPEG4_SBSkinnedModel, TAG_MPEG4_SBVCAnimation, TAG_MPEG4_ScalarAnimator, TAG_MPEG4_WaveletSubdivisionSurface 444 }; 445 446 #define SF2DNode_V5_NUMBITS 4 447 #define SF2DNode_V5_Count 9 448 449 static const u32 SF2DNode_V5_TypeToTag[9] = { 450 TAG_MPEG4_BitWrapper, TAG_MPEG4_PositionAnimator2D, TAG_MPEG4_SBBone, TAG_MPEG4_SBMuscle, TAG_MPEG4_SBSegment, TAG_MPEG4_SBSite, TAG_MPEG4_SBSkinnedModel, TAG_MPEG4_SBVCAnimation, TAG_MPEG4_ScalarAnimator 451 }; 452 453 #define SFAppearanceNode_V5_NUMBITS 1 454 #define SFAppearanceNode_V5_Count 1 455 456 static const u32 SFAppearanceNode_V5_TypeToTag[1] = { 457 TAG_MPEG4_XXLFM_Appearance 458 }; 459 460 #define SFGeometryNode_V5_NUMBITS 4 461 #define SFGeometryNode_V5_Count 10 462 463 static const u32 SFGeometryNode_V5_TypeToTag[10] = { 464 TAG_MPEG4_BitWrapper, TAG_MPEG4_Implicit, TAG_MPEG4_MeshGrid, TAG_MPEG4_NonLinearDeformer, TAG_MPEG4_NurbsCurve, TAG_MPEG4_NurbsCurve2D, TAG_MPEG4_NurbsSurface, TAG_MPEG4_Quadric, TAG_MPEG4_SolidRep, TAG_MPEG4_SubdivisionSurface 465 }; 466 467 #define SFTextureNode_V5_NUMBITS 1 468 #define SFTextureNode_V5_Count 1 469 470 static const u32 SFTextureNode_V5_TypeToTag[1] = { 471 TAG_MPEG4_ProceduralTexture 472 }; 473 474 #define SFDepthImageNode_V5_NUMBITS 1 475 #define SFDepthImageNode_V5_Count 1 476 477 static const u32 SFDepthImageNode_V5_TypeToTag[1] = { 478 TAG_MPEG4_DepthImage 479 }; 480 481 #define SFBlendListNode_V5_NUMBITS 1 482 #define SFBlendListNode_V5_Count 1 483 484 static const u32 SFBlendListNode_V5_TypeToTag[1] = { 485 TAG_MPEG4_XXLFM_BlendList 486 }; 487 488 #define SFFrameListNode_V5_NUMBITS 1 489 #define SFFrameListNode_V5_Count 1 490 491 static const u32 SFFrameListNode_V5_TypeToTag[1] = { 492 TAG_MPEG4_XXLFM_FrameList 493 }; 494 495 #define SFLightMapNode_V5_NUMBITS 1 496 #define SFLightMapNode_V5_Count 1 497 498 static const u32 SFLightMapNode_V5_TypeToTag[1] = { 499 TAG_MPEG4_XXLFM_LightMap 500 }; 501 502 #define SFSurfaceMapNode_V5_NUMBITS 1 503 #define SFSurfaceMapNode_V5_Count 1 504 505 static const u32 SFSurfaceMapNode_V5_TypeToTag[1] = { 506 TAG_MPEG4_XXLFM_SurfaceMapList 507 }; 508 509 #define SFViewMapNode_V5_NUMBITS 1 510 #define SFViewMapNode_V5_Count 1 511 512 static const u32 SFViewMapNode_V5_TypeToTag[1] = { 513 TAG_MPEG4_XXLFM_ViewMapList 514 }; 515 516 #define SFParticleInitializerNode_V5_NUMBITS 1 517 #define SFParticleInitializerNode_V5_Count 1 518 519 static const u32 SFParticleInitializerNode_V5_TypeToTag[1] = { 520 TAG_MPEG4_XXParticleInitBox 521 }; 522 523 #define SFInfluenceNode_V5_NUMBITS 2 524 #define SFInfluenceNode_V5_Count 2 525 526 static const u32 SFInfluenceNode_V5_TypeToTag[2] = { 527 TAG_MPEG4_XXPlanarObstacle, TAG_MPEG4_XXPointAttractor 528 }; 529 530 #define SFDepthTextureNode_V5_NUMBITS 2 531 #define SFDepthTextureNode_V5_Count 2 532 533 static const u32 SFDepthTextureNode_V5_TypeToTag[2] = { 534 TAG_MPEG4_PointTexture, TAG_MPEG4_SimpleTexture 535 }; 536 537 #define SFSBBoneNode_V5_NUMBITS 1 538 #define SFSBBoneNode_V5_Count 1 539 540 static const u32 SFSBBoneNode_V5_TypeToTag[1] = { 541 TAG_MPEG4_SBBone 542 }; 543 544 #define SFSBMuscleNode_V5_NUMBITS 1 545 #define SFSBMuscleNode_V5_Count 1 546 547 static const u32 SFSBMuscleNode_V5_TypeToTag[1] = { 548 TAG_MPEG4_SBMuscle 549 }; 550 551 #define SFSBSegmentNode_V5_NUMBITS 1 552 #define SFSBSegmentNode_V5_Count 1 553 554 static const u32 SFSBSegmentNode_V5_TypeToTag[1] = { 555 TAG_MPEG4_SBSegment 556 }; 557 558 #define SFSBSiteNode_V5_NUMBITS 1 559 #define SFSBSiteNode_V5_Count 1 560 561 static const u32 SFSBSiteNode_V5_TypeToTag[1] = { 562 TAG_MPEG4_SBSite 563 }; 564 565 #define SFBaseMeshNode_V5_NUMBITS 1 566 #define SFBaseMeshNode_V5_Count 1 567 568 static const u32 SFBaseMeshNode_V5_TypeToTag[1] = { 569 TAG_MPEG4_SubdivisionSurface 570 }; 571 572 #define SFSubdivSurfaceSectorNode_V5_NUMBITS 1 573 #define SFSubdivSurfaceSectorNode_V5_Count 1 574 575 static const u32 SFSubdivSurfaceSectorNode_V5_TypeToTag[1] = { 576 TAG_MPEG4_SubdivSurfaceSector 577 }; 578 579 580 u32 NDT_V5_GetNumBits(u32 NDT_Tag); 581 u32 NDT_V5_GetNodeTag(u32 Context_NDT_Tag, u32 NodeType); 582 u32 NDT_V5_GetNodeType(u32 NDT_Tag, u32 NodeTag); 583 584 585 586 587 /* NDT BIFS Version 6 */ 588 589 #define SFWorldNode_V6_NUMBITS 4 590 #define SFWorldNode_V6_Count 12 591 592 static const u32 SFWorldNode_V6_TypeToTag[12] = { 593 TAG_MPEG4_Clipper2D, TAG_MPEG4_ColorTransform, TAG_MPEG4_Ellipse, TAG_MPEG4_LinearGradient, TAG_MPEG4_PathLayout, TAG_MPEG4_RadialGradient, TAG_MPEG4_SynthesizedTexture, TAG_MPEG4_TransformMatrix2D, TAG_MPEG4_Viewport, TAG_MPEG4_XCurve2D, TAG_MPEG4_XFontStyle, TAG_MPEG4_XLineProperties 594 }; 595 596 #define SF3DNode_V6_NUMBITS 3 597 #define SF3DNode_V6_Count 5 598 599 static const u32 SF3DNode_V6_TypeToTag[5] = { 600 TAG_MPEG4_Clipper2D, TAG_MPEG4_ColorTransform, TAG_MPEG4_PathLayout, TAG_MPEG4_TransformMatrix2D, TAG_MPEG4_Viewport 601 }; 602 603 #define SF2DNode_V6_NUMBITS 3 604 #define SF2DNode_V6_Count 5 605 606 static const u32 SF2DNode_V6_TypeToTag[5] = { 607 TAG_MPEG4_Clipper2D, TAG_MPEG4_ColorTransform, TAG_MPEG4_PathLayout, TAG_MPEG4_TransformMatrix2D, TAG_MPEG4_Viewport 608 }; 609 610 #define SFGeometryNode_V6_NUMBITS 2 611 #define SFGeometryNode_V6_Count 2 612 613 static const u32 SFGeometryNode_V6_TypeToTag[2] = { 614 TAG_MPEG4_Ellipse, TAG_MPEG4_XCurve2D 615 }; 616 617 #define SFTextureNode_V6_NUMBITS 2 618 #define SFTextureNode_V6_Count 3 619 620 static const u32 SFTextureNode_V6_TypeToTag[3] = { 621 TAG_MPEG4_LinearGradient, TAG_MPEG4_RadialGradient, TAG_MPEG4_SynthesizedTexture 622 }; 623 624 #define SFFontStyleNode_V6_NUMBITS 1 625 #define SFFontStyleNode_V6_Count 1 626 627 static const u32 SFFontStyleNode_V6_TypeToTag[1] = { 628 TAG_MPEG4_XFontStyle 629 }; 630 631 #define SFLinePropertiesNode_V6_NUMBITS 1 632 #define SFLinePropertiesNode_V6_Count 1 633 634 static const u32 SFLinePropertiesNode_V6_TypeToTag[1] = { 635 TAG_MPEG4_XLineProperties 636 }; 637 638 #define SFTextureTransformNode_V6_NUMBITS 1 639 #define SFTextureTransformNode_V6_Count 1 640 641 static const u32 SFTextureTransformNode_V6_TypeToTag[1] = { 642 TAG_MPEG4_TransformMatrix2D 643 }; 644 645 #define SFViewportNode_V6_NUMBITS 1 646 #define SFViewportNode_V6_Count 1 647 648 static const u32 SFViewportNode_V6_TypeToTag[1] = { 649 TAG_MPEG4_Viewport 650 }; 651 652 653 u32 NDT_V6_GetNumBits(u32 NDT_Tag); 654 u32 NDT_V6_GetNodeTag(u32 Context_NDT_Tag, u32 NodeType); 655 u32 NDT_V6_GetNodeType(u32 NDT_Tag, u32 NodeTag); 656 657 658 659 660 /* NDT BIFS Version 7 */ 661 662 #define SFWorldNode_V7_NUMBITS 4 663 #define SFWorldNode_V7_Count 11 664 665 static const u32 SFWorldNode_V7_TypeToTag[11] = { 666 TAG_MPEG4_AdvancedAudioBuffer, TAG_MPEG4_AudioChannelConfig, TAG_MPEG4_DepthImageV2, TAG_MPEG4_MorphShape, TAG_MPEG4_MultiTexture, TAG_MPEG4_PointTextureV2, TAG_MPEG4_SBVCAnimationV2, TAG_MPEG4_SimpleTextureV2, TAG_MPEG4_SurroundingSound, TAG_MPEG4_Transform3DAudio, TAG_MPEG4_WideSound 667 }; 668 669 #define SF3DNode_V7_NUMBITS 3 670 #define SF3DNode_V7_Count 6 671 672 static const u32 SF3DNode_V7_TypeToTag[6] = { 673 TAG_MPEG4_DepthImageV2, TAG_MPEG4_MorphShape, TAG_MPEG4_SBVCAnimationV2, TAG_MPEG4_SurroundingSound, TAG_MPEG4_Transform3DAudio, TAG_MPEG4_WideSound 674 }; 675 676 #define SF2DNode_V7_NUMBITS 2 677 #define SF2DNode_V7_Count 3 678 679 static const u32 SF2DNode_V7_TypeToTag[3] = { 680 TAG_MPEG4_MorphShape, TAG_MPEG4_SBVCAnimationV2, TAG_MPEG4_Transform3DAudio 681 }; 682 683 #define SFAudioNode_V7_NUMBITS 2 684 #define SFAudioNode_V7_Count 2 685 686 static const u32 SFAudioNode_V7_TypeToTag[2] = { 687 TAG_MPEG4_AdvancedAudioBuffer, TAG_MPEG4_AudioChannelConfig 688 }; 689 690 #define SFTextureNode_V7_NUMBITS 1 691 #define SFTextureNode_V7_Count 1 692 693 static const u32 SFTextureNode_V7_TypeToTag[1] = { 694 TAG_MPEG4_MultiTexture 695 }; 696 697 #define SFDepthImageNode_V7_NUMBITS 1 698 #define SFDepthImageNode_V7_Count 1 699 700 static const u32 SFDepthImageNode_V7_TypeToTag[1] = { 701 TAG_MPEG4_DepthImageV2 702 }; 703 704 #define SFDepthTextureNode_V7_NUMBITS 2 705 #define SFDepthTextureNode_V7_Count 2 706 707 static const u32 SFDepthTextureNode_V7_TypeToTag[2] = { 708 TAG_MPEG4_PointTextureV2, TAG_MPEG4_SimpleTextureV2 709 }; 710 711 712 u32 NDT_V7_GetNumBits(u32 NDT_Tag); 713 u32 NDT_V7_GetNodeTag(u32 Context_NDT_Tag, u32 NodeType); 714 u32 NDT_V7_GetNodeType(u32 NDT_Tag, u32 NodeTag); 715 716 717 718 719 /* NDT BIFS Version 8 */ 720 721 #define SFWorldNode_V8_NUMBITS 2 722 #define SFWorldNode_V8_Count 2 723 724 static const u32 SFWorldNode_V8_TypeToTag[2] = { 725 TAG_MPEG4_ScoreShape, TAG_MPEG4_MusicScore 726 }; 727 728 #define SF3DNode_V8_NUMBITS 1 729 #define SF3DNode_V8_Count 1 730 731 static const u32 SF3DNode_V8_TypeToTag[1] = { 732 TAG_MPEG4_ScoreShape 733 }; 734 735 #define SF2DNode_V8_NUMBITS 1 736 #define SF2DNode_V8_Count 1 737 738 static const u32 SF2DNode_V8_TypeToTag[1] = { 739 TAG_MPEG4_ScoreShape 740 }; 741 742 #define SFMusicScoreNode_V8_NUMBITS 1 743 #define SFMusicScoreNode_V8_Count 1 744 745 static const u32 SFMusicScoreNode_V8_TypeToTag[1] = { 746 TAG_MPEG4_MusicScore 747 }; 748 749 750 u32 NDT_V8_GetNumBits(u32 NDT_Tag); 751 u32 NDT_V8_GetNodeTag(u32 Context_NDT_Tag, u32 NodeType); 752 u32 NDT_V8_GetNodeType(u32 NDT_Tag, u32 NodeTag); 753 754 755 756 757 /* NDT BIFS Version 9 */ 758 759 #define SFWorldNode_V9_NUMBITS 3 760 #define SFWorldNode_V9_Count 6 761 762 static const u32 SFWorldNode_V9_TypeToTag[6] = { 763 TAG_MPEG4_FootPrintSetNode, TAG_MPEG4_FootPrintNode, TAG_MPEG4_BuildingPartNode, TAG_MPEG4_RoofNode, TAG_MPEG4_FacadeNode, TAG_MPEG4_Shadow 764 }; 765 766 #define SF3DNode_V9_NUMBITS 3 767 #define SF3DNode_V9_Count 6 768 769 static const u32 SF3DNode_V9_TypeToTag[6] = { 770 TAG_MPEG4_FootPrintSetNode, TAG_MPEG4_FootPrintNode, TAG_MPEG4_BuildingPartNode, TAG_MPEG4_RoofNode, TAG_MPEG4_FacadeNode, TAG_MPEG4_Shadow 771 }; 772 773 #define SFGeometryNode_V9_NUMBITS 3 774 #define SFGeometryNode_V9_Count 6 775 776 static const u32 SFGeometryNode_V9_TypeToTag[6] = { 777 TAG_MPEG4_FootPrintSetNode, TAG_MPEG4_FootPrintNode, TAG_MPEG4_BuildingPartNode, TAG_MPEG4_RoofNode, TAG_MPEG4_FacadeNode, TAG_MPEG4_Shadow 778 }; 779 780 781 u32 NDT_V9_GetNumBits(u32 NDT_Tag); 782 u32 NDT_V9_GetNodeTag(u32 Context_NDT_Tag, u32 NodeType); 783 u32 NDT_V9_GetNodeType(u32 NDT_Tag, u32 NodeTag); 784 785 786 787 788 /* NDT BIFS Version 10 */ 789 790 #define SFWorldNode_V10_NUMBITS 3 791 #define SFWorldNode_V10_Count 5 792 793 static const u32 SFWorldNode_V10_TypeToTag[5] = { 794 TAG_MPEG4_CacheTexture, TAG_MPEG4_EnvironmentTest, TAG_MPEG4_KeyNavigator, TAG_MPEG4_SpacePartition, TAG_MPEG4_Storage 795 }; 796 797 #define SF3DNode_V10_NUMBITS 3 798 #define SF3DNode_V10_Count 5 799 800 static const u32 SF3DNode_V10_TypeToTag[5] = { 801 TAG_MPEG4_CacheTexture, TAG_MPEG4_EnvironmentTest, TAG_MPEG4_KeyNavigator, TAG_MPEG4_SpacePartition, TAG_MPEG4_Storage 802 }; 803 804 #define SF2DNode_V10_NUMBITS 3 805 #define SF2DNode_V10_Count 4 806 807 static const u32 SF2DNode_V10_TypeToTag[4] = { 808 TAG_MPEG4_CacheTexture, TAG_MPEG4_EnvironmentTest, TAG_MPEG4_KeyNavigator, TAG_MPEG4_Storage 809 }; 810 811 #define SFTextureNode_V10_NUMBITS 1 812 #define SFTextureNode_V10_Count 1 813 814 static const u32 SFTextureNode_V10_TypeToTag[1] = { 815 TAG_MPEG4_CacheTexture 816 }; 817 818 819 u32 NDT_V10_GetNumBits(u32 NDT_Tag); 820 u32 NDT_V10_GetNodeTag(u32 Context_NDT_Tag, u32 NodeType); 821 u32 NDT_V10_GetNodeType(u32 NDT_Tag, u32 NodeTag); 822 823 824 825 u32 NDT_GetChildTable(u32 NodeTag); 826 827 828 829 830 #endif /*GPAC_DISABLE_BIFS*/ 831 832 833 834 #endif /*_NDT_H*/ 835 836