aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/crystalhd
diff options
context:
space:
mode:
authorJorgyano Vieira <jorgyano@gmail.com>2011-12-16 05:32:30 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-16 13:54:15 -0500
commitd5396716f68d34ce8cb60528c6bc144c6bdabecf (patch)
treec511772b5c2a29befaa9872d2ee562a8d8d155ad /drivers/staging/crystalhd
parent277cdd01d6e831e2168cb3f2c082eecd7fcaac06 (diff)
staging: crystalhd: bc_dts_defs.h: Fix up coding style
Fix comments style on structs and enums Break long lines. Signed-off-by: Jorgyano Vieira <jorgyano@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/crystalhd')
-rw-r--r--drivers/staging/crystalhd/bc_dts_defs.h262
1 files changed, 172 insertions, 90 deletions
diff --git a/drivers/staging/crystalhd/bc_dts_defs.h b/drivers/staging/crystalhd/bc_dts_defs.h
index fde5b0627f6..8cd51a7aad8 100644
--- a/drivers/staging/crystalhd/bc_dts_defs.h
+++ b/drivers/staging/crystalhd/bc_dts_defs.h
@@ -296,43 +296,79 @@ enum {
296 vdecColourPrimariesSMPTE240M, 296 vdecColourPrimariesSMPTE240M,
297 vdecColourPrimariesGenericFilm, 297 vdecColourPrimariesGenericFilm,
298}; 298};
299 299/**
300 * @vdecRESOLUTION_CUSTOM: custom
301 * @vdecRESOLUTION_480i: 480i
302 * @vdecRESOLUTION_1080i: 1080i (1920x1080, 60i)
303 * @vdecRESOLUTION_NTSC: NTSC (720x483, 60i)
304 * @vdecRESOLUTION_480p: 480p (720x480, 60p)
305 * @vdecRESOLUTION_720p: 720p (1280x720, 60p)
306 * @vdecRESOLUTION_PAL1: PAL_1 (720x576, 50i)
307 * @vdecRESOLUTION_1080i25: 1080i25 (1920x1080, 50i)
308 * @vdecRESOLUTION_720p50: 720p50 (1280x720, 50p)
309 * @vdecRESOLUTION_576p: 576p (720x576, 50p)
310 * @vdecRESOLUTION_1080i29_97: 1080i (1920x1080, 59.94i)
311 * @vdecRESOLUTION_720p59_94: 720p (1280x720, 59.94p)
312 * @vdecRESOLUTION_SD_DVD: SD DVD (720x483, 60i)
313 * @vdecRESOLUTION_480p656: 480p (720x480, 60p),
314 * output bus width 8 bit, clock 74.25MHz
315 * @vdecRESOLUTION_1080p23_976: 1080p23_976 (1920x1080, 23.976p)
316 * @vdecRESOLUTION_720p23_976: 720p23_976 (1280x720p, 23.976p)
317 * @vdecRESOLUTION_240p29_97: 240p (1440x240, 29.97p )
318 * @vdecRESOLUTION_240p30: 240p (1440x240, 30p)
319 * @vdecRESOLUTION_288p25: 288p (1440x288p, 25p)
320 * @vdecRESOLUTION_1080p29_97: 1080p29_97 (1920x1080, 29.97p)
321 * @vdecRESOLUTION_1080p30: 1080p30 (1920x1080, 30p)
322 * @vdecRESOLUTION_1080p24: 1080p24 (1920x1080, 24p)
323 * @vdecRESOLUTION_1080p25: 1080p25 (1920x1080, 25p)
324 * @vdecRESOLUTION_720p24: 720p24 (1280x720, 25p)
325 * @vdecRESOLUTION_720p29_97: 720p29.97 (1280x720, 29.97p)
326 * @vdecRESOLUTION_480p23_976: 480p23.976 (720*480, 23.976)
327 * @vdecRESOLUTION_480p29_97: 480p29.976 (720*480, 29.97p)
328 * @vdecRESOLUTION_576p25: 576p25 (720*576, 25p)
329 * @vdecRESOLUTION_480p0: 480p (720x480, 0p)
330 * @vdecRESOLUTION_480i0: 480i (720x480, 0i)
331 * @vdecRESOLUTION_576p0: 576p (720x576, 0p)
332 * @vdecRESOLUTION_720p0: 720p (1280x720, 0p)
333 * @vdecRESOLUTION_1080p0: 1080p (1920x1080, 0p)
334 * @vdecRESOLUTION_1080i0: 1080i (1920x1080, 0i)
335 */
300enum { 336enum {
301 vdecRESOLUTION_CUSTOM = 0x00000000, /* custom */ 337 vdecRESOLUTION_CUSTOM = 0x00000000,
302 vdecRESOLUTION_480i = 0x00000001, /* 480i */ 338 vdecRESOLUTION_480i = 0x00000001,
303 vdecRESOLUTION_1080i = 0x00000002, /* 1080i (1920x1080, 60i) */ 339 vdecRESOLUTION_1080i = 0x00000002,
304 vdecRESOLUTION_NTSC = 0x00000003, /* NTSC (720x483, 60i) */ 340 vdecRESOLUTION_NTSC = 0x00000003,
305 vdecRESOLUTION_480p = 0x00000004, /* 480p (720x480, 60p) */ 341 vdecRESOLUTION_480p = 0x00000004,
306 vdecRESOLUTION_720p = 0x00000005, /* 720p (1280x720, 60p) */ 342 vdecRESOLUTION_720p = 0x00000005,
307 vdecRESOLUTION_PAL1 = 0x00000006, /* PAL_1 (720x576, 50i) */ 343 vdecRESOLUTION_PAL1 = 0x00000006,
308 vdecRESOLUTION_1080i25 = 0x00000007, /* 1080i25 (1920x1080, 50i) */ 344 vdecRESOLUTION_1080i25 = 0x00000007,
309 vdecRESOLUTION_720p50 = 0x00000008, /* 720p50 (1280x720, 50p) */ 345 vdecRESOLUTION_720p50 = 0x00000008,
310 vdecRESOLUTION_576p = 0x00000009, /* 576p (720x576, 50p) */ 346 vdecRESOLUTION_576p = 0x00000009,
311 vdecRESOLUTION_1080i29_97 = 0x0000000A, /* 1080i (1920x1080, 59.94i) */ 347 vdecRESOLUTION_1080i29_97 = 0x0000000A,
312 vdecRESOLUTION_720p59_94 = 0x0000000B, /* 720p (1280x720, 59.94p) */ 348 vdecRESOLUTION_720p59_94 = 0x0000000B,
313 vdecRESOLUTION_SD_DVD = 0x0000000C, /* SD DVD (720x483, 60i) */ 349 vdecRESOLUTION_SD_DVD = 0x0000000C,
314 vdecRESOLUTION_480p656 = 0x0000000D, /* 480p (720x480, 60p), output bus width 8 bit, clock 74.25MHz */ 350 vdecRESOLUTION_480p656 = 0x0000000D,
315 vdecRESOLUTION_1080p23_976 = 0x0000000E, /* 1080p23_976 (1920x1080, 23.976p) */ 351 vdecRESOLUTION_1080p23_976 = 0x0000000E,
316 vdecRESOLUTION_720p23_976 = 0x0000000F, /* 720p23_976 (1280x720p, 23.976p) */ 352 vdecRESOLUTION_720p23_976 = 0x0000000F,
317 vdecRESOLUTION_240p29_97 = 0x00000010, /* 240p (1440x240, 29.97p ) */ 353 vdecRESOLUTION_240p29_97 = 0x00000010,
318 vdecRESOLUTION_240p30 = 0x00000011, /* 240p (1440x240, 30p) */ 354 vdecRESOLUTION_240p30 = 0x00000011,
319 vdecRESOLUTION_288p25 = 0x00000012, /* 288p (1440x288p, 25p) */ 355 vdecRESOLUTION_288p25 = 0x00000012,
320 vdecRESOLUTION_1080p29_97 = 0x00000013, /* 1080p29_97 (1920x1080, 29.97p) */ 356 vdecRESOLUTION_1080p29_97 = 0x00000013,
321 vdecRESOLUTION_1080p30 = 0x00000014, /* 1080p30 (1920x1080, 30p) */ 357 vdecRESOLUTION_1080p30 = 0x00000014,
322 vdecRESOLUTION_1080p24 = 0x00000015, /* 1080p24 (1920x1080, 24p) */ 358 vdecRESOLUTION_1080p24 = 0x00000015,
323 vdecRESOLUTION_1080p25 = 0x00000016, /* 1080p25 (1920x1080, 25p) */ 359 vdecRESOLUTION_1080p25 = 0x00000016,
324 vdecRESOLUTION_720p24 = 0x00000017, /* 720p24 (1280x720, 25p) */ 360 vdecRESOLUTION_720p24 = 0x00000017,
325 vdecRESOLUTION_720p29_97 = 0x00000018, /* 720p29.97 (1280x720, 29.97p) */ 361 vdecRESOLUTION_720p29_97 = 0x00000018,
326 vdecRESOLUTION_480p23_976 = 0x00000019, /* 480p23.976 (720*480, 23.976) */ 362 vdecRESOLUTION_480p23_976 = 0x00000019,
327 vdecRESOLUTION_480p29_97 = 0x0000001A, /* 480p29.976 (720*480, 29.97p) */ 363 vdecRESOLUTION_480p29_97 = 0x0000001A,
328 vdecRESOLUTION_576p25 = 0x0000001B, /* 576p25 (720*576, 25p) */ 364 vdecRESOLUTION_576p25 = 0x0000001B,
329 /* For Zero Frame Rate */ 365 /* For Zero Frame Rate */
330 vdecRESOLUTION_480p0 = 0x0000001C, /* 480p (720x480, 0p) */ 366 vdecRESOLUTION_480p0 = 0x0000001C,
331 vdecRESOLUTION_480i0 = 0x0000001D, /* 480i (720x480, 0i) */ 367 vdecRESOLUTION_480i0 = 0x0000001D,
332 vdecRESOLUTION_576p0 = 0x0000001E, /* 576p (720x576, 0p) */ 368 vdecRESOLUTION_576p0 = 0x0000001E,
333 vdecRESOLUTION_720p0 = 0x0000001F, /* 720p (1280x720, 0p) */ 369 vdecRESOLUTION_720p0 = 0x0000001F,
334 vdecRESOLUTION_1080p0 = 0x00000020, /* 1080p (1920x1080, 0p) */ 370 vdecRESOLUTION_1080p0 = 0x00000020,
335 vdecRESOLUTION_1080i0 = 0x00000021, /* 1080i (1920x1080, 0i) */ 371 vdecRESOLUTION_1080i0 = 0x00000021,
336}; 372};
337 373
338/* Bit definitions for 'flags' field */ 374/* Bit definitions for 'flags' field */
@@ -359,14 +395,23 @@ enum _BC_OUTPUT_FORMAT {
359 MODE422_YUY2 = 0x1, 395 MODE422_YUY2 = 0x1,
360 MODE422_UYVY = 0x2, 396 MODE422_UYVY = 0x2,
361}; 397};
362 398/**
399 * struct BC_PIC_INFO_BLOCK
400 * @timeStam;: Timestamp
401 * @picture_number: Ordinal display number
402 * @width: pixels
403 * @height: pixels
404 * @chroma_format: 0x420, 0x422 or 0x444
405 * @n_drop;: number of non-reference frames
406 * remaining to be dropped
407 */
363struct BC_PIC_INFO_BLOCK { 408struct BC_PIC_INFO_BLOCK {
364 /* Common fields. */ 409 /* Common fields. */
365 uint64_t timeStamp; /* Timestamp */ 410 uint64_t timeStamp;
366 uint32_t picture_number; /* Ordinal display number */ 411 uint32_t picture_number;
367 uint32_t width; /* pixels */ 412 uint32_t width;
368 uint32_t height; /* pixels */ 413 uint32_t height;
369 uint32_t chroma_format; /* 0x420, 0x422 or 0x444 */ 414 uint32_t chroma_format;
370 uint32_t pulldown; 415 uint32_t pulldown;
371 uint32_t flags; 416 uint32_t flags;
372 uint32_t frame_rate; 417 uint32_t frame_rate;
@@ -376,7 +421,8 @@ struct BC_PIC_INFO_BLOCK {
376 uint32_t sess_num; 421 uint32_t sess_num;
377 uint32_t ycom; 422 uint32_t ycom;
378 uint32_t custom_aspect_ratio_width_height; 423 uint32_t custom_aspect_ratio_width_height;
379 uint32_t n_drop; /* number of non-reference frames remaining to be dropped */ 424 uint32_t n_drop; /* number of non-reference frames
425 remaining to be dropped */
380 426
381 /* Protocol-specific extensions. */ 427 /* Protocol-specific extensions. */
382 union { 428 union {
@@ -390,43 +436,71 @@ struct BC_PIC_INFO_BLOCK {
390/*------------------------------------------------------* 436/*------------------------------------------------------*
391 * ProcOut Info * 437 * ProcOut Info *
392 *------------------------------------------------------*/ 438 *------------------------------------------------------*/
393/* Optional flags for ProcOut Interface.*/ 439
440/**
441 * enum POUT_OPTIONAL_IN_FLAGS - Optional flags for ProcOut Interface.
442 * @BC_POUT_FLAGS_YV12: Copy Data in YV12 format
443 * @BC_POUT_FLAGS_STRIDE: Stride size is valid.
444 * @BC_POUT_FLAGS_SIZE: Take size information from Application
445 * @BC_POUT_FLAGS_INTERLACED: copy only half the bytes
446 * @BC_POUT_FLAGS_INTERLEAVED: interleaved frame
447 * @: * @BC_POUT_FLAGS_FMT_CHANGE: Data is not VALID when this flag is set
448 * @BC_POUT_FLAGS_PIB_VALID: PIB Information valid
449 * @BC_POUT_FLAGS_ENCRYPTED: Data is encrypted.
450 * @BC_POUT_FLAGS_FLD_BOT: Bottom Field data
451 */
394enum POUT_OPTIONAL_IN_FLAGS_ { 452enum POUT_OPTIONAL_IN_FLAGS_ {
395 /* Flags from App to Device */ 453 /* Flags from App to Device */
396 BC_POUT_FLAGS_YV12 = 0x01, /* Copy Data in YV12 format */ 454 BC_POUT_FLAGS_YV12 = 0x01,
397 BC_POUT_FLAGS_STRIDE = 0x02, /* Stride size is valid. */ 455 BC_POUT_FLAGS_STRIDE = 0x02,
398 BC_POUT_FLAGS_SIZE = 0x04, /* Take size information from Application */ 456 BC_POUT_FLAGS_SIZE = 0x04,
399 BC_POUT_FLAGS_INTERLACED = 0x08, /* copy only half the bytes */ 457 BC_POUT_FLAGS_INTERLACED = 0x08,
400 BC_POUT_FLAGS_INTERLEAVED = 0x10, /* interleaved frame */ 458 BC_POUT_FLAGS_INTERLEAVED = 0x10,
401 459
402 /* Flags from Device to APP */ 460 /* Flags from Device to APP */
403 BC_POUT_FLAGS_FMT_CHANGE = 0x10000, /* Data is not VALID when this flag is set */ 461 BC_POUT_FLAGS_FMT_CHANGE = 0x10000,
404 BC_POUT_FLAGS_PIB_VALID = 0x20000, /* PIB Information valid */ 462 BC_POUT_FLAGS_PIB_VALID = 0x20000,
405 BC_POUT_FLAGS_ENCRYPTED = 0x40000, /* Data is encrypted. */ 463 BC_POUT_FLAGS_ENCRYPTED = 0x40000,
406 BC_POUT_FLAGS_FLD_BOT = 0x80000, /* Bottom Field data */ 464 BC_POUT_FLAGS_FLD_BOT = 0x80000,
407}; 465};
408 466
409typedef enum BC_STATUS(*dts_pout_callback)(void *shnd, uint32_t width, uint32_t height, uint32_t stride, void *pOut); 467typedef enum BC_STATUS(*dts_pout_callback)(void *shnd, uint32_t width,
468 uint32_t height, uint32_t stride, void *pOut);
410 469
411/* Line 21 Closed Caption */ 470/* Line 21 Closed Caption */
412/* User Data */ 471/* User Data */
413#define MAX_UD_SIZE 1792 /* 1920 - 128 */ 472#define MAX_UD_SIZE 1792 /* 1920 - 128 */
414 473
474/**
475 * struct BC_DTS_PROC_OUT
476 * @Ybuff: Caller Supplied buffer for Y data
477 * @YbuffSz: Caller Supplied Y buffer size
478 * @YBuffDoneSz: Transferred Y datasize
479 * @*UVbuff: Caller Supplied buffer for UV data
480 * @UVbuffSz: Caller Supplied UV buffer size
481 * @UVBuffDoneSz: Transferred UV data size
482 * @StrideSz: Caller supplied Stride Size
483 * @PoutFlags: Call IN Flags
484 * @discCnt: Picture discontinuity count
485 * @PicInfo: Picture Information Block Data
486 * @b422Mode: Picture output Mode
487 * @bPibEnc: PIB encrypted
488 */
415struct BC_DTS_PROC_OUT { 489struct BC_DTS_PROC_OUT {
416 uint8_t *Ybuff; /* Caller Supplied buffer for Y data */ 490 uint8_t *Ybuff;
417 uint32_t YbuffSz; /* Caller Supplied Y buffer size */ 491 uint32_t YbuffSz;
418 uint32_t YBuffDoneSz; /* Transferred Y datasize */ 492 uint32_t YBuffDoneSz;
419 493
420 uint8_t *UVbuff; /* Caller Supplied buffer for UV data */ 494 uint8_t *UVbuff;
421 uint32_t UVbuffSz; /* Caller Supplied UV buffer size */ 495 uint32_t UVbuffSz;
422 uint32_t UVBuffDoneSz; /* Transferred UV data size */ 496 uint32_t UVBuffDoneSz;
423 497
424 uint32_t StrideSz; /* Caller supplied Stride Size */ 498 uint32_t StrideSz;
425 uint32_t PoutFlags; /* Call IN Flags */ 499 uint32_t PoutFlags;
426 500
427 uint32_t discCnt; /* Picture discontinuity count */ 501 uint32_t discCnt;
428 502
429 struct BC_PIC_INFO_BLOCK PicInfo; /* Picture Information Block Data */ 503 struct BC_PIC_INFO_BLOCK PicInfo;
430 504
431 /* Line 21 Closed Caption */ 505 /* Line 21 Closed Caption */
432 /* User Data */ 506 /* User Data */
@@ -436,39 +510,47 @@ struct BC_DTS_PROC_OUT {
436 void *hnd; 510 void *hnd;
437 dts_pout_callback AppCallBack; 511 dts_pout_callback AppCallBack;
438 uint8_t DropFrames; 512 uint8_t DropFrames;
439 uint8_t b422Mode; /* Picture output Mode */ 513 uint8_t b422Mode;
440 uint8_t bPibEnc; /* PIB encrypted */ 514 uint8_t bPibEnc;
441 uint8_t bRevertScramble; 515 uint8_t bRevertScramble;
442 516
443}; 517};
444 518/**
519 * struct BC_DTS_STATUS
520 * @ReadyListCount: Number of frames in ready list (reported by driver)
521 * @PowerStateChange: Number of active state power
522 * transitions (reported by driver)
523 * @FramesDropped: Number of frames dropped. (reported by DIL)
524 * @FramesCaptured: Number of frames captured. (reported by DIL)
525 * @FramesRepeated: Number of frames repeated. (reported by DIL)
526 * @InputCount: Times compressed video has been sent to the HW.
527 * i.e. Successful DtsProcInput() calls (reported by DIL)
528 * @InputTotalSize: Amount of compressed video that has been sent to the HW.
529 * (reported by DIL)
530 * @InputBusyCount: Times compressed video has attempted to be sent to the HW
531 * but the input FIFO was full. (reported by DIL)
532 * @PIBMissCount: Amount of times a PIB is invalid. (reported by DIL)
533 * @cpbEmptySize: supported only for H.264, specifically changed for
534 * Adobe. Report size of CPB buffer available. (reported by DIL)
535 * @NextTimeStamp: TimeStamp of the next picture that will be returned
536 * by a call to ProcOutput. Added for Adobe. Reported
537 * back from the driver
538 */
445struct BC_DTS_STATUS { 539struct BC_DTS_STATUS {
446 uint8_t ReadyListCount; /* Number of frames in ready list (reported by driver) */ 540 uint8_t ReadyListCount;
447 uint8_t FreeListCount; /* Number of frame buffers free. (reported by driver) */ 541 uint8_t FreeListCount;
448 uint8_t PowerStateChange; /* Number of active state power transitions (reported by driver) */ 542 uint8_t PowerStateChange;
449 uint8_t reserved_[1]; 543 uint8_t reserved_[1];
450 544 uint32_t FramesDropped;
451 uint32_t FramesDropped; /* Number of frames dropped. (reported by DIL) */ 545 uint32_t FramesCaptured;
452 uint32_t FramesCaptured; /* Number of frames captured. (reported by DIL) */ 546 uint32_t FramesRepeated;
453 uint32_t FramesRepeated; /* Number of frames repeated. (reported by DIL) */ 547 uint32_t InputCount;
454 548 uint64_t InputTotalSize;
455 uint32_t InputCount; /* Times compressed video has been sent to the HW. 549 uint32_t InputBusyCount;
456 * i.e. Successful DtsProcInput() calls (reported by DIL) */ 550 uint32_t PIBMissCount;
457 uint64_t InputTotalSize; /* Amount of compressed video that has been sent to the HW. 551 uint32_t cpbEmptySize;
458 * (reported by DIL) */ 552 uint64_t NextTimeStamp;
459 uint32_t InputBusyCount; /* Times compressed video has attempted to be sent to the HW
460 * but the input FIFO was full. (reported by DIL) */
461
462 uint32_t PIBMissCount; /* Amount of times a PIB is invalid. (reported by DIL) */
463
464 uint32_t cpbEmptySize; /* supported only for H.264, specifically changed for
465 * Adobe. Report size of CPB buffer available.
466 * Reported by DIL */
467 uint64_t NextTimeStamp; /* TimeStamp of the next picture that will be returned
468 * by a call to ProcOutput. Added for Adobe. Reported
469 * back from the driver */
470 uint8_t reserved__[16]; 553 uint8_t reserved__[16];
471
472}; 554};
473 555
474#define BC_SWAP32(_v) \ 556#define BC_SWAP32(_v) \