Hamsalekha S | 8d3d303 | 2015-03-13 21:24:58 +0530 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * |
| 3 | * Copyright (C) 2015 The Android Open Source Project |
| 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at: |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | * |
| 17 | ***************************************************************************** |
| 18 | * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore |
| 19 | */ |
| 20 | /*****************************************************************************/ |
| 21 | /* */ |
| 22 | /* File Name : ih264e.h */ |
| 23 | /* */ |
| 24 | /* Description : This file contains all the necessary structure and */ |
| 25 | /* enumeration definitions needed for the Application */ |
| 26 | /* Program Interface(API) of the Ittiam MPEG4 */ |
| 27 | /* Encoder on Cortex A8 - Neon platform */ |
| 28 | /* */ |
| 29 | /* List of Functions : ih264e_api_function */ |
| 30 | /* */ |
| 31 | /* Issues / Problems : None */ |
| 32 | /* */ |
| 33 | /* Revision History : */ |
| 34 | /* */ |
| 35 | /* DD MM YYYY Author(s) Changes (Describe the changes made) */ |
| 36 | /* 26 08 2010 100239(RCY) Draft */ |
| 37 | /* */ |
| 38 | /*****************************************************************************/ |
| 39 | |
| 40 | #ifndef _IH264E_H_ |
| 41 | #define _IH264E_H_ |
| 42 | |
| 43 | #ifdef __cplusplus |
| 44 | extern "C" { |
| 45 | #endif |
| 46 | |
| 47 | #include "iv2.h" |
| 48 | #include "ive2.h" |
| 49 | /*****************************************************************************/ |
Hamsalekha S | 8d3d303 | 2015-03-13 21:24:58 +0530 | [diff] [blame] | 50 | /* API Function Prototype */ |
| 51 | /*****************************************************************************/ |
| 52 | IV_STATUS_T ih264e_api_function(iv_obj_t *ps_handle, void *pv_api_ip,void *pv_api_op); |
| 53 | |
| 54 | /*****************************************************************************/ |
| 55 | /* Enums */ |
| 56 | /*****************************************************************************/ |
| 57 | typedef enum |
| 58 | { |
| 59 | IH264E_CMD_CTL_SET_ME_INFO_ENABLE, |
| 60 | }IH264E_CMD_CTL_SUB_CMDS; |
| 61 | |
| 62 | |
| 63 | /*****************************************************************************/ |
| 64 | /* Extended Structures */ |
| 65 | /*****************************************************************************/ |
| 66 | |
| 67 | /*****************************************************************************/ |
| 68 | /* Get Number of Memory Records */ |
| 69 | /*****************************************************************************/ |
| 70 | |
| 71 | |
| 72 | typedef struct |
| 73 | { |
| 74 | iv_num_mem_rec_ip_t s_ive_ip; |
| 75 | }ih264e_num_mem_rec_ip_t; |
| 76 | |
| 77 | |
| 78 | typedef struct |
| 79 | { |
| 80 | iv_num_mem_rec_op_t s_ive_op; |
| 81 | }ih264e_num_mem_rec_op_t; |
| 82 | |
| 83 | |
| 84 | /*****************************************************************************/ |
| 85 | /* Fill Memory Records */ |
| 86 | /*****************************************************************************/ |
| 87 | |
| 88 | |
| 89 | typedef struct |
| 90 | { |
| 91 | iv_fill_mem_rec_ip_t s_ive_ip; |
| 92 | }ih264e_fill_mem_rec_ip_t; |
| 93 | |
| 94 | |
| 95 | typedef struct |
| 96 | { |
| 97 | iv_fill_mem_rec_op_t s_ive_op; |
| 98 | }ih264e_fill_mem_rec_op_t; |
| 99 | |
| 100 | /*****************************************************************************/ |
| 101 | /* Retrieve Memory Records */ |
| 102 | /*****************************************************************************/ |
| 103 | |
| 104 | |
| 105 | typedef struct |
| 106 | { |
| 107 | iv_retrieve_mem_rec_ip_t s_ive_ip; |
| 108 | }ih264e_retrieve_mem_rec_ip_t; |
| 109 | |
| 110 | |
| 111 | typedef struct |
| 112 | { |
| 113 | iv_retrieve_mem_rec_op_t s_ive_op; |
| 114 | }ih264e_retrieve_mem_rec_op_t; |
| 115 | |
| 116 | |
| 117 | /*****************************************************************************/ |
| 118 | /* Initialize encoder */ |
| 119 | /*****************************************************************************/ |
| 120 | |
| 121 | typedef struct |
| 122 | { |
| 123 | ive_init_ip_t s_ive_ip; |
| 124 | }ih264e_init_ip_t; |
| 125 | |
| 126 | |
| 127 | typedef struct |
| 128 | { |
| 129 | ive_init_op_t s_ive_op; |
| 130 | }ih264e_init_op_t; |
| 131 | |
| 132 | |
| 133 | /*****************************************************************************/ |
| 134 | /* Queue Input raw buffer - Send the YUV buffer to be encoded */ |
| 135 | /*****************************************************************************/ |
| 136 | typedef struct |
| 137 | { |
| 138 | ive_queue_inp_ip_t s_ive_ip; |
| 139 | }ih264e_queue_inp_ip_t; |
| 140 | |
| 141 | typedef struct |
| 142 | { |
| 143 | ive_queue_inp_op_t s_ive_op; |
| 144 | }ih264e_queue_inp_op_t; |
| 145 | |
| 146 | /*****************************************************************************/ |
| 147 | /* Dequeue Input raw buffer - Get free YUV buffer from the encoder */ |
| 148 | /*****************************************************************************/ |
| 149 | typedef struct |
| 150 | { |
| 151 | ive_dequeue_inp_ip_t s_ive_ip; |
| 152 | }ih264e_dequeue_inp_ip_t; |
| 153 | |
| 154 | typedef struct |
| 155 | { |
| 156 | ive_dequeue_inp_op_t s_ive_op; |
| 157 | }ih264e_dequeue_inp_op_t; |
| 158 | |
| 159 | |
| 160 | /*****************************************************************************/ |
| 161 | /* Queue Output bitstream buffer - Send the bistream buffer to be filled */ |
| 162 | /*****************************************************************************/ |
| 163 | typedef struct |
| 164 | { |
| 165 | ive_queue_out_ip_t s_ive_ip; |
| 166 | }ih264e_queue_out_ip_t; |
| 167 | |
| 168 | typedef struct |
| 169 | { |
| 170 | ive_queue_out_op_t s_ive_op; |
| 171 | }ih264e_queue_out_op_t; |
| 172 | |
| 173 | /*****************************************************************************/ |
| 174 | /* Dequeue Output bitstream buffer - Get the bistream buffer filled */ |
| 175 | /*****************************************************************************/ |
| 176 | typedef struct |
| 177 | { |
| 178 | ive_dequeue_out_ip_t s_ive_ip; |
| 179 | }ih264e_dequeue_out_ip_t; |
| 180 | |
| 181 | typedef struct |
| 182 | { |
| 183 | ive_dequeue_out_op_t s_ive_op; |
| 184 | }ih264e_dequeue_out_op_t; |
| 185 | |
| 186 | |
| 187 | /*****************************************************************************/ |
| 188 | /* Get Recon data - Get the reconstructed data from encoder */ |
| 189 | /*****************************************************************************/ |
| 190 | typedef struct |
| 191 | { |
| 192 | ive_get_recon_ip_t s_ive_ip; |
| 193 | }ih264e_get_recon_ip_t; |
| 194 | |
| 195 | typedef struct |
| 196 | { |
| 197 | ive_get_recon_op_t s_ive_op; |
| 198 | }ih264e_get_recon_op_t; |
| 199 | /*****************************************************************************/ |
| 200 | /* Video control Flush */ |
| 201 | /*****************************************************************************/ |
| 202 | |
| 203 | |
| 204 | typedef struct |
| 205 | { |
| 206 | ive_ctl_flush_ip_t s_ive_ip; |
| 207 | }ih264e_ctl_flush_ip_t; |
| 208 | |
| 209 | |
| 210 | typedef struct |
| 211 | { |
| 212 | ive_ctl_flush_op_t s_ive_op; |
| 213 | }ih264e_ctl_flush_op_t; |
| 214 | |
| 215 | /*****************************************************************************/ |
| 216 | /* Video control reset */ |
| 217 | /*****************************************************************************/ |
| 218 | |
| 219 | |
| 220 | typedef struct |
| 221 | { |
| 222 | ive_ctl_reset_ip_t s_ive_ip; |
| 223 | }ih264e_ctl_reset_ip_t; |
| 224 | |
| 225 | |
| 226 | typedef struct |
| 227 | { |
| 228 | ive_ctl_reset_op_t s_ive_op; |
| 229 | }ih264e_ctl_reset_op_t; |
| 230 | |
| 231 | |
| 232 | /*****************************************************************************/ |
| 233 | /* Video control:Get Buf Info */ |
| 234 | /*****************************************************************************/ |
| 235 | |
| 236 | |
| 237 | typedef struct |
| 238 | { |
| 239 | ive_ctl_getbufinfo_ip_t s_ive_ip; |
| 240 | }ih264e_ctl_getbufinfo_ip_t; |
| 241 | |
| 242 | |
| 243 | |
| 244 | typedef struct |
| 245 | { |
| 246 | ive_ctl_getbufinfo_op_t s_ive_op; |
| 247 | }ih264e_ctl_getbufinfo_op_t; |
| 248 | |
| 249 | |
| 250 | |
| 251 | /*****************************************************************************/ |
| 252 | /* Video control:Get Version Info */ |
| 253 | /*****************************************************************************/ |
| 254 | |
| 255 | |
| 256 | typedef struct |
| 257 | { |
| 258 | ive_ctl_getversioninfo_ip_t s_ive_ip; |
| 259 | }ih264e_ctl_getversioninfo_ip_t; |
| 260 | |
| 261 | |
| 262 | |
| 263 | typedef struct |
| 264 | { |
| 265 | ive_ctl_getversioninfo_op_t s_ive_op; |
| 266 | }ih264e_ctl_getversioninfo_op_t; |
| 267 | |
| 268 | /*****************************************************************************/ |
| 269 | /* Video control:Set default params */ |
| 270 | /*****************************************************************************/ |
| 271 | |
| 272 | |
| 273 | typedef struct |
| 274 | { |
| 275 | ive_ctl_setdefault_ip_t s_ive_ip; |
| 276 | }ih264e_ctl_setdefault_ip_t; |
| 277 | |
| 278 | |
| 279 | |
| 280 | typedef struct |
| 281 | { |
| 282 | ive_ctl_setdefault_op_t s_ive_op; |
| 283 | }ih264e_ctl_setdefault_op_t; |
| 284 | |
| 285 | /*****************************************************************************/ |
| 286 | /* Video control Set IPE params */ |
| 287 | /*****************************************************************************/ |
| 288 | typedef struct |
| 289 | { |
| 290 | ive_ctl_set_ipe_params_ip_t s_ive_ip; |
| 291 | }ih264e_ctl_set_ipe_params_ip_t; |
| 292 | |
| 293 | typedef struct |
| 294 | { |
| 295 | ive_ctl_set_ipe_params_op_t s_ive_op; |
| 296 | }ih264e_ctl_set_ipe_params_op_t; |
| 297 | |
| 298 | /*****************************************************************************/ |
| 299 | /* Video control Set Frame dimensions */ |
| 300 | /*****************************************************************************/ |
| 301 | typedef struct |
| 302 | { |
| 303 | ive_ctl_set_dimensions_ip_t s_ive_ip; |
| 304 | }ih264e_ctl_set_dimensions_ip_t; |
| 305 | |
| 306 | typedef struct |
| 307 | { |
| 308 | ive_ctl_set_dimensions_op_t s_ive_op; |
| 309 | }ih264e_ctl_set_dimensions_op_t; |
| 310 | |
| 311 | /*****************************************************************************/ |
| 312 | /* Video control Set Frame rates */ |
| 313 | /*****************************************************************************/ |
| 314 | typedef struct |
| 315 | { |
| 316 | ive_ctl_set_frame_rate_ip_t s_ive_ip; |
| 317 | }ih264e_ctl_set_frame_rate_ip_t; |
| 318 | typedef struct |
| 319 | { |
| 320 | ive_ctl_set_frame_rate_op_t s_ive_op; |
| 321 | }ih264e_ctl_set_frame_rate_op_t; |
| 322 | |
| 323 | |
| 324 | /*****************************************************************************/ |
| 325 | /* Video control Set Bitrate */ |
| 326 | /*****************************************************************************/ |
| 327 | typedef struct |
| 328 | { |
| 329 | ive_ctl_set_bitrate_ip_t s_ive_ip; |
| 330 | }ih264e_ctl_set_bitrate_ip_t; |
| 331 | |
| 332 | typedef struct |
| 333 | { |
| 334 | ive_ctl_set_bitrate_op_t s_ive_op; |
| 335 | }ih264e_ctl_set_bitrate_op_t; |
| 336 | |
| 337 | |
| 338 | /*****************************************************************************/ |
| 339 | /* Video control Set Frame type */ |
| 340 | /*****************************************************************************/ |
| 341 | typedef struct |
| 342 | { |
| 343 | ive_ctl_set_frame_type_ip_t s_ive_ip; |
| 344 | }ih264e_ctl_set_frame_type_ip_t; |
| 345 | |
| 346 | typedef struct |
| 347 | { |
| 348 | ive_ctl_set_frame_type_op_t s_ive_op; |
| 349 | }ih264e_ctl_set_frame_type_op_t; |
| 350 | |
| 351 | /*****************************************************************************/ |
| 352 | /* Video control Set Encode mode */ |
| 353 | /*****************************************************************************/ |
| 354 | typedef struct |
| 355 | { |
| 356 | ive_ctl_set_enc_mode_ip_t s_ive_ip; |
| 357 | }ih264e_ctl_set_enc_mode_ip_t; |
| 358 | |
| 359 | typedef struct |
| 360 | { |
| 361 | ive_ctl_set_enc_mode_op_t s_ive_op; |
| 362 | }ih264e_ctl_set_enc_mode_op_t; |
| 363 | |
| 364 | /*****************************************************************************/ |
| 365 | /* Video control Set QP */ |
| 366 | /*****************************************************************************/ |
| 367 | typedef struct |
| 368 | { |
| 369 | ive_ctl_set_qp_ip_t s_ive_ip; |
| 370 | }ih264e_ctl_set_qp_ip_t; |
| 371 | |
| 372 | typedef struct |
| 373 | { |
| 374 | ive_ctl_set_qp_op_t s_ive_op; |
| 375 | }ih264e_ctl_set_qp_op_t; |
| 376 | |
| 377 | /*****************************************************************************/ |
| 378 | /* Video control Set AIR params */ |
| 379 | /*****************************************************************************/ |
| 380 | typedef struct |
| 381 | { |
| 382 | ive_ctl_set_air_params_ip_t s_ive_ip; |
| 383 | }ih264e_ctl_set_air_params_ip_t; |
| 384 | |
| 385 | typedef struct |
| 386 | { |
| 387 | ive_ctl_set_air_params_op_t s_ive_op; |
| 388 | }ih264e_ctl_set_air_params_op_t; |
| 389 | |
| 390 | /*****************************************************************************/ |
| 391 | /* Video control Set VBV params */ |
| 392 | /*****************************************************************************/ |
| 393 | typedef struct |
| 394 | { |
| 395 | ive_ctl_set_vbv_params_ip_t s_ive_ip; |
| 396 | }ih264e_ctl_set_vbv_params_ip_t; |
| 397 | |
| 398 | typedef struct |
| 399 | { |
| 400 | ive_ctl_set_vbv_params_op_t s_ive_op; |
| 401 | }ih264e_ctl_set_vbv_params_op_t; |
| 402 | |
| 403 | /*****************************************************************************/ |
| 404 | /* Video control Set Processor Details */ |
| 405 | /*****************************************************************************/ |
| 406 | typedef struct |
| 407 | { |
| 408 | ive_ctl_set_num_cores_ip_t s_ive_ip; |
| 409 | }ih264e_ctl_set_num_cores_ip_t; |
| 410 | |
| 411 | typedef struct |
| 412 | { |
| 413 | ive_ctl_set_num_cores_op_t s_ive_op; |
| 414 | }ih264e_ctl_set_num_cores_op_t; |
| 415 | |
| 416 | /*****************************************************************************/ |
| 417 | /* Video control Set Motion estimation params */ |
| 418 | /*****************************************************************************/ |
| 419 | typedef struct |
| 420 | { |
| 421 | ive_ctl_set_me_params_ip_t s_ive_ip; |
| 422 | }ih264e_ctl_set_me_params_ip_t; |
| 423 | |
| 424 | typedef struct |
| 425 | { |
| 426 | ive_ctl_set_me_params_op_t s_ive_op; |
| 427 | }ih264e_ctl_set_me_params_op_t; |
| 428 | |
| 429 | /*****************************************************************************/ |
| 430 | /* Video control Set GOP params */ |
| 431 | /*****************************************************************************/ |
| 432 | typedef struct |
| 433 | { |
| 434 | ive_ctl_set_gop_params_ip_t s_ive_ip; |
| 435 | }ih264e_ctl_set_gop_params_ip_t; |
| 436 | |
| 437 | typedef struct |
| 438 | { |
| 439 | ive_ctl_set_gop_params_op_t s_ive_op; |
| 440 | }ih264e_ctl_set_gop_params_op_t; |
| 441 | |
| 442 | /*****************************************************************************/ |
| 443 | /* Video control Set Deblock params */ |
| 444 | /*****************************************************************************/ |
| 445 | typedef struct |
| 446 | { |
| 447 | ive_ctl_set_deblock_params_ip_t s_ive_ip; |
| 448 | }ih264e_ctl_set_deblock_params_ip_t; |
| 449 | |
| 450 | typedef struct |
| 451 | { |
| 452 | ive_ctl_set_deblock_params_op_t s_ive_op; |
| 453 | }ih264e_ctl_set_deblock_params_op_t; |
| 454 | |
| 455 | /*****************************************************************************/ |
| 456 | /* Video control Set Profile params */ |
| 457 | /*****************************************************************************/ |
| 458 | typedef struct |
| 459 | { |
| 460 | ive_ctl_set_profile_params_ip_t s_ive_ip; |
| 461 | }ih264e_ctl_set_profile_params_ip_t; |
| 462 | |
| 463 | typedef struct |
| 464 | { |
| 465 | ive_ctl_set_profile_params_op_t s_ive_op; |
| 466 | }ih264e_ctl_set_profile_params_op_t; |
| 467 | |
| 468 | /*****************************************************************************/ |
| 469 | /* Synchronous video encode call */ |
| 470 | /*****************************************************************************/ |
| 471 | typedef struct |
| 472 | { |
| 473 | ive_video_encode_ip_t s_ive_ip; |
| 474 | }ih264e_video_encode_ip_t; |
| 475 | |
| 476 | typedef struct |
| 477 | { |
| 478 | ive_video_encode_op_t s_ive_op; |
| 479 | }ih264e_video_encode_op_t; |
| 480 | |
| 481 | |
Doney Alex | 983e1ae | 2016-03-30 17:31:26 +0530 | [diff] [blame] | 482 | /*****************************************************************************/ |
| 483 | /* Video usability information */ |
| 484 | /*****************************************************************************/ |
| 485 | typedef struct |
| 486 | { |
| 487 | /** size of the structure */ |
| 488 | UWORD32 u4_size; |
| 489 | |
| 490 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 491 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 492 | |
| 493 | /** Sub command type : IVE_CMD_CTL_SET_GOP_PARAMS */ |
| 494 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 495 | |
| 496 | /** indicates the presence of aspect_ratio */ |
| 497 | UWORD8 u1_aspect_ratio_info_present_flag; |
| 498 | |
| 499 | /** specifies the aspect ratio of the luma samples */ |
| 500 | UWORD8 u1_aspect_ratio_idc; |
| 501 | |
| 502 | /** width of the luma samples. user dependent */ |
| 503 | UWORD16 u2_sar_width; |
| 504 | |
| 505 | /** Height of the luma samples. user dependent */ |
| 506 | UWORD16 u2_sar_height; |
| 507 | |
| 508 | /** if 1, specifies that the overscan_appropriate_flag is present |
| 509 | * if 0, the preferred display method for the video signal is unspecified */ |
| 510 | UWORD8 u1_overscan_info_present_flag; |
| 511 | |
| 512 | /** if 1,indicates that the cropped decoded pictures output |
| 513 | * are suitable for display using overscan */ |
| 514 | UWORD8 u1_overscan_appropriate_flag; |
| 515 | |
| 516 | /** if 1 specifies that video_format, video_full_range_flag and |
| 517 | * colour_description_present_flag are present */ |
| 518 | UWORD8 u1_video_signal_type_present_flag; |
| 519 | |
| 520 | /** pal, secam, ntsc, ... */ |
| 521 | UWORD8 u1_video_format; |
| 522 | |
| 523 | /** indicates the black level and range of the luma and chroma signals */ |
| 524 | UWORD8 u1_video_full_range_flag; |
| 525 | |
| 526 | /** if 1,specifies that colour_primaries, transfer_characteristics |
| 527 | * and matrix_coefficients are present */ |
| 528 | UWORD8 u1_colour_description_present_flag; |
| 529 | |
| 530 | /** indicates the chromaticity coordinates of the source primaries */ |
| 531 | UWORD8 u1_colour_primaries; |
| 532 | |
| 533 | /** indicates the opto-electronic transfer characteristic of the source picture */ |
| 534 | UWORD8 u1_transfer_characteristics; |
| 535 | |
| 536 | /** the matrix coefficients used in deriving luma and chroma signals |
| 537 | * from the green, blue, and red primaries */ |
| 538 | UWORD8 u1_matrix_coefficients; |
| 539 | |
| 540 | /** if 1, specifies that chroma_sample_loc_type_top_field and |
| 541 | * chroma_sample_loc_type_bottom_field are present */ |
| 542 | UWORD8 u1_chroma_loc_info_present_flag; |
| 543 | |
| 544 | /** location of chroma samples */ |
| 545 | UWORD8 u1_chroma_sample_loc_type_top_field; |
| 546 | UWORD8 u1_chroma_sample_loc_type_bottom_field; |
| 547 | |
| 548 | /** Indicates the presence of the num_units_in_ticks, time_scale flag */ |
| 549 | UWORD8 u1_vui_timing_info_present_flag; |
| 550 | |
| 551 | /** Number of units that correspond to one increment of the |
| 552 | * clock. Indicates the resolution */ |
| 553 | UWORD32 u4_vui_num_units_in_tick; |
| 554 | |
| 555 | /** The number of time units that pass in one second */ |
| 556 | UWORD32 u4_vui_time_scale; |
| 557 | |
| 558 | /** Flag indicating that time difference between two frames is a constant */ |
| 559 | UWORD8 u1_fixed_frame_rate_flag; |
| 560 | |
| 561 | /** Indicates the presence of NAL HRD parameters */ |
| 562 | UWORD8 u1_nal_hrd_parameters_present_flag; |
| 563 | |
| 564 | /** Indicates the presence of VCL HRD parameters */ |
| 565 | UWORD8 u1_vcl_hrd_parameters_present_flag; |
| 566 | |
| 567 | /** Specifies the HRD operational mode */ |
| 568 | UWORD8 u1_low_delay_hrd_flag; |
| 569 | |
| 570 | /** Indicates presence of SEI messages which include pic_struct syntax element */ |
| 571 | UWORD8 u1_pic_struct_present_flag; |
| 572 | |
| 573 | /** 1, specifies that the following cvs bitstream restriction parameters are present */ |
| 574 | UWORD8 u1_bitstream_restriction_flag; |
| 575 | |
| 576 | /** if 0, indicates that no pel outside the pic boundaries and |
| 577 | * no sub-pels derived using pels outside the pic boundaries is used for inter prediction */ |
| 578 | UWORD8 u1_motion_vectors_over_pic_boundaries_flag; |
| 579 | |
| 580 | /** Indicates a number of bytes not exceeded by the sum of the sizes of the VCL NAL units |
| 581 | * associated with any coded picture */ |
| 582 | UWORD8 u1_max_bytes_per_pic_denom; |
| 583 | |
| 584 | /** Indicates an upper bound for the number of bits of coding_unit() data */ |
| 585 | UWORD8 u1_max_bits_per_mb_denom; |
| 586 | |
| 587 | /** Indicate the maximum absolute value of a decoded horizontal MV component |
| 588 | * in quarter-pel luma units */ |
| 589 | UWORD8 u1_log2_max_mv_length_horizontal; |
| 590 | |
| 591 | /** Indicate the maximum absolute value of a decoded vertical MV component |
| 592 | * in quarter-pel luma units */ |
| 593 | UWORD8 u1_log2_max_mv_length_vertical; |
| 594 | |
| 595 | /** Max number of frames that are not synchronized in display and decode order */ |
| 596 | UWORD8 u1_num_reorder_frames; |
| 597 | |
| 598 | /** specifies required size of the HRD DPB in units of frame buffers */ |
| 599 | UWORD8 u1_max_dec_frame_buffering; |
| 600 | |
| 601 | }ih264e_vui_ip_t; |
| 602 | |
| 603 | typedef struct |
| 604 | { |
| 605 | /** size of the structure */ |
| 606 | UWORD32 u4_size; |
| 607 | |
| 608 | /** Return error code */ |
| 609 | UWORD32 u4_error_code; |
| 610 | }ih264e_vui_op_t; |
| 611 | |
Chamarthi Kishore | ad2eaf8 | 2019-10-01 11:59:43 +0530 | [diff] [blame^] | 612 | /*****************************************************************************/ |
| 613 | /* Video control Set SEI MDCV params */ |
| 614 | /*****************************************************************************/ |
| 615 | typedef struct |
| 616 | { |
| 617 | /** size of the structure */ |
| 618 | UWORD32 u4_size; |
| 619 | |
| 620 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 621 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 622 | |
| 623 | /** Sub command type : IVE_CMD_CTL_SET_SEI_MDCV_PARAMS */ |
| 624 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 625 | |
| 626 | /** mastering display color volume info present flag */ |
| 627 | UWORD8 u1_sei_mdcv_params_present_flag; |
| 628 | |
| 629 | /** Array to store the display_primaries_x values */ |
| 630 | UWORD16 au2_display_primaries_x[3]; |
| 631 | |
| 632 | /** Array to store the display_primaries_y values */ |
| 633 | UWORD16 au2_display_primaries_y[3]; |
| 634 | |
| 635 | /** Variable to store the white point x value */ |
| 636 | UWORD16 u2_white_point_x; |
| 637 | |
| 638 | /** Variable to store the white point y value */ |
| 639 | UWORD16 u2_white_point_y; |
| 640 | |
| 641 | /** Variable to store the max display mastering luminance value */ |
| 642 | UWORD32 u4_max_display_mastering_luminance; |
| 643 | |
| 644 | /** Variable to store the min display mastering luminance value */ |
| 645 | UWORD32 u4_min_display_mastering_luminance; |
| 646 | |
| 647 | /** Lower 32bits of time stamp corresponding to input buffer, |
| 648 | * from which this command takes effect */ |
| 649 | UWORD32 u4_timestamp_low; |
| 650 | |
| 651 | /** Upper 32bits of time stamp corresponding to input buffer, |
| 652 | * from which this command takes effect */ |
| 653 | UWORD32 u4_timestamp_high; |
| 654 | |
| 655 | }ih264e_ctl_set_sei_mdcv_params_ip_t; |
| 656 | |
| 657 | typedef struct |
| 658 | { |
| 659 | /** size of the structure */ |
| 660 | UWORD32 u4_size; |
| 661 | |
| 662 | /** Return error code */ |
| 663 | UWORD32 u4_error_code; |
| 664 | |
| 665 | }ih264e_ctl_set_sei_mdcv_params_op_t; |
| 666 | |
| 667 | /*****************************************************************************/ |
| 668 | /* Video control Set SEI CLL params */ |
| 669 | /*****************************************************************************/ |
| 670 | typedef struct |
| 671 | { |
| 672 | /** size of the structure */ |
| 673 | UWORD32 u4_size; |
| 674 | |
| 675 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 676 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 677 | |
| 678 | /** Sub command type : IVE_CMD_CTL_SET_SEI_CLL_PARAMS */ |
| 679 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 680 | |
| 681 | /** content light level info present flag */ |
| 682 | UWORD8 u1_sei_cll_params_present_flag; |
| 683 | |
| 684 | /** The maximum pixel intensity of all samples */ |
| 685 | UWORD16 u2_max_content_light_level; |
| 686 | |
| 687 | /** The average pixel intensity of all samples */ |
| 688 | UWORD16 u2_max_pic_average_light_level; |
| 689 | |
| 690 | /** Lower 32bits of time stamp corresponding to input buffer, |
| 691 | * from which this command takes effect */ |
| 692 | UWORD32 u4_timestamp_low; |
| 693 | |
| 694 | /** Upper 32bits of time stamp corresponding to input buffer, |
| 695 | * from which this command takes effect */ |
| 696 | UWORD32 u4_timestamp_high; |
| 697 | |
| 698 | }ih264e_ctl_set_sei_cll_params_ip_t; |
| 699 | |
| 700 | typedef struct |
| 701 | { |
| 702 | /** size of the structure */ |
| 703 | UWORD32 u4_size; |
| 704 | |
| 705 | /** Return error code */ |
| 706 | UWORD32 u4_error_code; |
| 707 | |
| 708 | }ih264e_ctl_set_sei_cll_params_op_t; |
| 709 | |
| 710 | /*****************************************************************************/ |
| 711 | /* Video control Set SEI AVE params */ |
| 712 | /*****************************************************************************/ |
| 713 | typedef struct |
| 714 | { |
| 715 | /** size of the structure */ |
| 716 | UWORD32 u4_size; |
| 717 | |
| 718 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 719 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 720 | |
| 721 | /** Sub command type : IVE_CMD_CTL_SET_SEI_AVE_PARAMS */ |
| 722 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 723 | |
| 724 | /** ambient viewing environment info present flag */ |
| 725 | UWORD8 u1_sei_ave_params_present_flag; |
| 726 | |
| 727 | /** specifies the environmental illluminance of the ambient viewing |
| 728 | * environment */ |
| 729 | UWORD32 u4_ambient_illuminance; |
| 730 | |
| 731 | /** specify the normalized x chromaticity coordinates of the |
| 732 | * environmental ambient light in the nominal viewing environment */ |
| 733 | UWORD16 u2_ambient_light_x; |
| 734 | |
| 735 | /** specify the normalized y chromaticity coordinates of the |
| 736 | * environmental ambient light in the nominal viewing environment */ |
| 737 | UWORD16 u2_ambient_light_y; |
| 738 | |
| 739 | /** Lower 32bits of time stamp corresponding to input buffer, |
| 740 | * from which this command takes effect */ |
| 741 | UWORD32 u4_timestamp_low; |
| 742 | |
| 743 | /** Upper 32bits of time stamp corresponding to input buffer, |
| 744 | * from which this command takes effect */ |
| 745 | UWORD32 u4_timestamp_high; |
| 746 | |
| 747 | }ih264e_ctl_set_sei_ave_params_ip_t; |
| 748 | |
| 749 | typedef struct |
| 750 | { |
| 751 | /** size of the structure */ |
| 752 | UWORD32 u4_size; |
| 753 | |
| 754 | /** Return error code */ |
| 755 | UWORD32 u4_error_code; |
| 756 | |
| 757 | }ih264e_ctl_set_sei_ave_params_op_t; |
| 758 | |
| 759 | /*****************************************************************************/ |
| 760 | /* Video control Set SEI CCV params */ |
| 761 | /*****************************************************************************/ |
| 762 | typedef struct |
| 763 | { |
| 764 | /** size of the structure */ |
| 765 | UWORD32 u4_size; |
| 766 | |
| 767 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 768 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 769 | |
| 770 | /** Sub command type : IVE_CMD_CTL_SET_SEI_CCV_PARAMS */ |
| 771 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 772 | |
| 773 | /** content color volume info present flag */ |
| 774 | UWORD8 u1_sei_ccv_params_present_flag; |
| 775 | |
| 776 | /** Flag used to control persistence of CCV SEI messages */ |
| 777 | UWORD8 u1_ccv_cancel_flag; |
| 778 | |
| 779 | /** specifies the persistence of the CCV SEI message for the |
| 780 | * current layer */ |
| 781 | UWORD8 u1_ccv_persistence_flag; |
| 782 | |
| 783 | /** specifies the presence of syntax elements ccv_primaries_x |
| 784 | * and ccv_primaries_y */ |
| 785 | UWORD8 u1_ccv_primaries_present_flag; |
| 786 | |
| 787 | /** specifies that the syntax element ccv_min_luminance_value |
| 788 | * is present */ |
| 789 | UWORD8 u1_ccv_min_luminance_value_present_flag; |
| 790 | |
| 791 | /** specifies that the syntax element ccv_max_luminance_value |
| 792 | * is present */ |
| 793 | UWORD8 u1_ccv_max_luminance_value_present_flag; |
| 794 | |
| 795 | /** specifies that the syntax element ccv_avg_luminance_value |
| 796 | * is present */ |
| 797 | UWORD8 u1_ccv_avg_luminance_value_present_flag; |
| 798 | |
| 799 | /** shall be equal to 0 in bitstreams conforming to this version. |
| 800 | * Other values for reserved_zero_2bits are reserved for future use */ |
| 801 | UWORD8 u1_ccv_reserved_zero_2bits; |
| 802 | |
| 803 | /** specify the normalized x chromaticity coordinates of the colour |
| 804 | * primary component c of the nominal content colour volume */ |
| 805 | WORD32 ai4_ccv_primaries_x[3]; |
| 806 | |
| 807 | /** specify the normalized y chromaticity coordinates of the colour |
| 808 | * primary component c of the nominal content colour volume */ |
| 809 | WORD32 ai4_ccv_primaries_y[3]; |
| 810 | |
| 811 | /** specifies the normalized minimum luminance value */ |
| 812 | UWORD32 u4_ccv_min_luminance_value; |
| 813 | |
| 814 | /** specifies the normalized maximum luminance value */ |
| 815 | UWORD32 u4_ccv_max_luminance_value; |
| 816 | |
| 817 | /** specifies the normalized average luminance value */ |
| 818 | UWORD32 u4_ccv_avg_luminance_value; |
| 819 | |
| 820 | /** Lower 32bits of time stamp corresponding to input buffer, |
| 821 | * from which this command takes effect */ |
| 822 | UWORD32 u4_timestamp_low; |
| 823 | |
| 824 | /** Upper 32bits of time stamp corresponding to input buffer, |
| 825 | * from which this command takes effect */ |
| 826 | UWORD32 u4_timestamp_high; |
| 827 | |
| 828 | }ih264e_ctl_set_sei_ccv_params_ip_t; |
| 829 | |
| 830 | typedef struct |
| 831 | { |
| 832 | /** size of the structure */ |
| 833 | UWORD32 u4_size; |
| 834 | |
| 835 | /** Return error code */ |
| 836 | UWORD32 u4_error_code; |
| 837 | |
| 838 | }ih264e_ctl_set_sei_ccv_params_op_t; |
| 839 | |
Doney Alex | 983e1ae | 2016-03-30 17:31:26 +0530 | [diff] [blame] | 840 | |
Hamsalekha S | 8d3d303 | 2015-03-13 21:24:58 +0530 | [diff] [blame] | 841 | /* The enum values should not have greater than 8 bits as this is assigned to WORD8 */ |
| 842 | typedef enum |
| 843 | { |
| 844 | INTRA16x16 = 0, |
| 845 | INTRA4x4, |
| 846 | INTER16x16 |
| 847 | }IV_MB_TYPE_T; |
| 848 | |
| 849 | /*****************************************************************************/ |
| 850 | /* Pic info structures */ |
| 851 | /*****************************************************************************/ |
| 852 | typedef struct |
| 853 | { |
| 854 | /** Qp */ |
| 855 | UWORD32 u4_qp; |
| 856 | |
| 857 | /** Pic Type */ |
| 858 | IV_PICTURE_CODING_TYPE_T e_frame_type; |
| 859 | |
| 860 | }ih264e_pic_info1_t; |
| 861 | |
| 862 | typedef struct |
| 863 | { |
| 864 | /** Qp */ |
| 865 | UWORD32 u4_qp; |
| 866 | |
| 867 | /** Pic Type */ |
| 868 | IV_PICTURE_CODING_TYPE_T e_frame_type; |
| 869 | |
| 870 | /** Disable deblock level (0: Enable completely, 3: Disable completely */ |
| 871 | UWORD32 u4_disable_deblock_level; |
| 872 | |
| 873 | }ih264e_pic_info2_t; |
| 874 | |
| 875 | |
| 876 | /*****************************************************************************/ |
| 877 | /* MB info structures */ |
| 878 | /*****************************************************************************/ |
| 879 | typedef struct |
| 880 | { |
| 881 | /** MV X */ |
| 882 | WORD16 i2_mv_x; |
| 883 | |
| 884 | /** MV Y */ |
| 885 | WORD16 i2_mv_y; |
| 886 | }ih264e_mv_t; |
| 887 | |
| 888 | typedef struct |
| 889 | { |
| 890 | /** Intra / Inter */ |
| 891 | WORD8 i1_mb_type; |
| 892 | union |
| 893 | { |
| 894 | ih264e_mv_t as_mv[1]; |
| 895 | |
| 896 | /** Intra mode */ |
| 897 | WORD8 ai1_intra_mode[1]; |
| 898 | }; |
| 899 | }ih264e_mb_info1_t; |
| 900 | |
| 901 | typedef struct |
| 902 | { |
| 903 | /** Intra / Inter */ |
| 904 | WORD8 i1_mb_type; |
| 905 | |
| 906 | |
| 907 | /** SAD */ |
| 908 | UWORD16 u2_sad; |
| 909 | |
| 910 | union |
| 911 | { |
| 912 | ih264e_mv_t as_mv[1]; |
| 913 | |
| 914 | /** Intra mode */ |
| 915 | WORD8 ai1_intra_mode[1]; |
| 916 | }; |
| 917 | |
| 918 | |
| 919 | }ih264e_mb_info2_t; |
| 920 | |
| 921 | typedef struct |
| 922 | { |
| 923 | /** Intra / Inter */ |
| 924 | WORD8 i1_mb_type; |
| 925 | |
| 926 | union |
| 927 | { |
| 928 | ih264e_mv_t as_mv[4]; |
| 929 | |
| 930 | /** Intra mode */ |
| 931 | WORD8 ai1_intra_mode[16]; |
| 932 | }; |
| 933 | |
| 934 | }ih264e_mb_info3_t; |
| 935 | |
| 936 | typedef struct |
| 937 | { |
| 938 | /** Intra / Inter */ |
| 939 | WORD8 i1_mb_type; |
| 940 | |
| 941 | /** Intra Mode */ |
| 942 | WORD8 i1_intra_mode; |
| 943 | |
| 944 | /** SAD */ |
| 945 | UWORD16 u2_sad; |
| 946 | |
| 947 | union |
| 948 | { |
| 949 | ih264e_mv_t as_mv[16]; |
| 950 | |
| 951 | /** Intra mode */ |
| 952 | WORD8 ai1_intra_mode[16]; |
| 953 | }; |
| 954 | |
| 955 | |
| 956 | |
| 957 | }ih264e_mb_info4_t; |
| 958 | |
| 959 | /* Add any new structures to the following union. It is used to calculate the max size needed for allocation of memory */ |
| 960 | typedef struct |
| 961 | { |
| 962 | union |
| 963 | { |
| 964 | ih264e_mb_info1_t s_mb_info1; |
| 965 | ih264e_mb_info2_t s_mb_info2; |
| 966 | ih264e_mb_info3_t s_mb_info3; |
| 967 | ih264e_mb_info4_t s_mb_info4; |
| 968 | }; |
| 969 | }ih264e_mb_info_t; |
| 970 | |
| 971 | #ifdef __cplusplus |
| 972 | } /* closing brace for extern "C" */ |
| 973 | #endif |
| 974 | #endif /* _IH264E_H_ */ |