| vdpau.h | | vdpau.h | |
| /* | | /* | |
| * This source file is documented using Doxygen markup. | | * This source file is documented using Doxygen markup. | |
| * See http://www.stack.nl/~dimitri/doxygen/ | | * See http://www.stack.nl/~dimitri/doxygen/ | |
| */ | | */ | |
| | | | |
| /* | | /* | |
| * This copyright notice applies to this header file: | | * This copyright notice applies to this header file: | |
| * | | * | |
|
| * Copyright (c) 2008-2009 NVIDIA Corporation | | * Copyright (c) 2008-2010 NVIDIA Corporation | |
| * | | * | |
| * Permission is hereby granted, free of charge, to any person | | * Permission is hereby granted, free of charge, to any person | |
| * obtaining a copy of this software and associated documentation | | * obtaining a copy of this software and associated documentation | |
| * files (the "Software"), to deal in the Software without | | * files (the "Software"), to deal in the Software without | |
| * restriction, including without limitation the rights to use, | | * restriction, including without limitation the rights to use, | |
| * copy, modify, merge, publish, distribute, sublicense, and/or sell | | * copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the | | * copies of the Software, and to permit persons to whom the | |
| * Software is furnished to do so, subject to the following | | * Software is furnished to do so, subject to the following | |
| * conditions: | | * conditions: | |
| * | | * | |
| | | | |
| skipping to change at line 375 | | skipping to change at line 375 | |
| * of the bitstream passed to VDPAU. VDPAU implementations must operate | | * of the bitstream passed to VDPAU. VDPAU implementations must operate | |
| * correctly if non-slice data is included, at least for formats employing | | * correctly if non-slice data is included, at least for formats employing | |
| * start codes to delimit slice data. However, any extra data may need | | * start codes to delimit slice data. However, any extra data may need | |
| * to be uploaded to hardware for parsing thus lowering performance, and/or
, | | * to be uploaded to hardware for parsing thus lowering performance, and/or
, | |
| * in the worst case, may even overflow internal buffers that are sized sol
ely | | * in the worst case, may even overflow internal buffers that are sized sol
ely | |
| * for slice data. | | * for slice data. | |
| * | | * | |
| * The exact data that should be passed to VDPAU is detailed below for each | | * The exact data that should be passed to VDPAU is detailed below for each | |
| * supported format: | | * supported format: | |
| * | | * | |
|
| * \subsection MPEG-1 and MPEG-2 | | * \subsection bitstream_mpeg1_mpeg2 MPEG-1 and MPEG-2 | |
| * | | * | |
| * Include all slices beginning with start codes 0x00000101 through | | * Include all slices beginning with start codes 0x00000101 through | |
| * 0x000001AF. The slice start code must be included for all slices. | | * 0x000001AF. The slice start code must be included for all slices. | |
| * | | * | |
|
| * \subsection H.264 | | * \subsection bitstream_h264 H.264 | |
| * | | * | |
| * Include all NALs with nal_unit_type of 1 or 5 (coded slice of non-IDR/ID
R | | * Include all NALs with nal_unit_type of 1 or 5 (coded slice of non-IDR/ID
R | |
| * picture respectively). The complete slice start code (including 0x000001 | | * picture respectively). The complete slice start code (including 0x000001 | |
| * prefix) must be included for all slices, even when the prefix is not | | * prefix) must be included for all slices, even when the prefix is not | |
| * included in the bitstream. | | * included in the bitstream. | |
| * | | * | |
| * Note that if desired: | | * Note that if desired: | |
| * | | * | |
| * - The slice start code prefix may be included in a separate bitstream | | * - The slice start code prefix may be included in a separate bitstream | |
| * buffer array entry to the actual slice data extracted from the bitstre
am. | | * buffer array entry to the actual slice data extracted from the bitstre
am. | |
| * - Multiple bitstream buffer array entries (e.g. one per slice) may point
at | | * - Multiple bitstream buffer array entries (e.g. one per slice) may point
at | |
| * the same physical data storage for the slice start code prefix. | | * the same physical data storage for the slice start code prefix. | |
| * | | * | |
|
| * \subsection VC-1 Simple and Main Profile | | * \subsection bitstream_vc1_sp_mp VC-1 Simple and Main Profile | |
| * | | * | |
| * VC-1 simple/main profile bitstreams always consist of a single slice per | | * VC-1 simple/main profile bitstreams always consist of a single slice per | |
| * picture, and do not use start codes to delimit pictures. Instead, the | | * picture, and do not use start codes to delimit pictures. Instead, the | |
| * container format must indicate where each picture begins/ends. | | * container format must indicate where each picture begins/ends. | |
| * | | * | |
| * As such, no slice start codes should be included in the data passed to | | * As such, no slice start codes should be included in the data passed to | |
| * VDPAU; simply pass in the exact data from the bitstream. | | * VDPAU; simply pass in the exact data from the bitstream. | |
| * | | * | |
| * Header information contained in the bitstream should be parsed by the | | * Header information contained in the bitstream should be parsed by the | |
| * application and passed to VDPAU using the "picture info" data structure; | | * application and passed to VDPAU using the "picture info" data structure; | |
| * this header information explicitly must not be included in the bitstream | | * this header information explicitly must not be included in the bitstream | |
| * data passed to VDPAU for this encoding format. | | * data passed to VDPAU for this encoding format. | |
| * | | * | |
|
| * \subsection VC-1 Advanced Profile | | * \subsection bitstream_vc1_ap VC-1 Advanced Profile | |
| * | | * | |
| * Include all slices beginning with start codes 0x0000010D (frame), | | * Include all slices beginning with start codes 0x0000010D (frame), | |
| * 0x0000010C (field) or 0x0000010B (slice). The slice start code should be | | * 0x0000010C (field) or 0x0000010B (slice). The slice start code should be | |
| * included in all cases. | | * included in all cases. | |
| * | | * | |
| * Some VC-1 advanced profile streams do not contain slice start codes; aga
in, | | * Some VC-1 advanced profile streams do not contain slice start codes; aga
in, | |
| * the container format must indicate where picture data begins and ends. I
n | | * the container format must indicate where picture data begins and ends. I
n | |
| * this case, pictures are assumed to be progressive and to contain a singl
e | | * this case, pictures are assumed to be progressive and to contain a singl
e | |
| * slice. It is highly recommended that applications detect this condition, | | * slice. It is highly recommended that applications detect this condition, | |
| * and add the missing start codes to the bitstream passed to VDPAU. Howeve
r, | | * and add the missing start codes to the bitstream passed to VDPAU. Howeve
r, | |
| | | | |
| skipping to change at line 430 | | skipping to change at line 430 | |
| * act as if a 0x0000010D (frame) start code had been present. | | * act as if a 0x0000010D (frame) start code had been present. | |
| * | | * | |
| * Note that pictures containing multiple slices, or interlace streams, mus
t | | * Note that pictures containing multiple slices, or interlace streams, mus
t | |
| * contain a complete set of slice start codes in the original bitstream; | | * contain a complete set of slice start codes in the original bitstream; | |
| * without them, it is not possible to correctly parse and decode the strea
m. | | * without them, it is not possible to correctly parse and decode the strea
m. | |
| * | | * | |
| * The bitstream passed to VDPAU should contain all original emulation | | * The bitstream passed to VDPAU should contain all original emulation | |
| * prevention bytes present in the original bitstream; do not remove these | | * prevention bytes present in the original bitstream; do not remove these | |
| * from the bitstream. | | * from the bitstream. | |
| * | | * | |
|
| | | * \subsection bitstream_mpeg4part2 MPEG-4 Part 2 and DivX | |
| | | * | |
| | | * Include all slices beginning with start codes 0x000001B6. The slice star | |
| | | t | |
| | | * code must be included for all slices. | |
| | | * | |
| * \section video_mixer_usage Video Mixer Usage | | * \section video_mixer_usage Video Mixer Usage | |
| * | | * | |
| * \subsection video_surface_content VdpVideoSurface Content | | * \subsection video_surface_content VdpVideoSurface Content | |
| * | | * | |
| * Each \ref VdpVideoSurface "VdpVideoSurface" is expected to contain an | | * Each \ref VdpVideoSurface "VdpVideoSurface" is expected to contain an | |
| * entire frame's-worth of data, irrespective of whether an interlaced of | | * entire frame's-worth of data, irrespective of whether an interlaced of | |
| * progressive sequence is being decoded. | | * progressive sequence is being decoded. | |
| * | | * | |
| * Depending on the exact encoding structure of the compressed video stream
, | | * Depending on the exact encoding structure of the compressed video stream
, | |
| * the application may need to call \ref VdpDecoderRender twice to fill a | | * the application may need to call \ref VdpDecoderRender twice to fill a | |
| | | | |
| skipping to change at line 472 | | skipping to change at line 477 | |
| * be provided as the \b video_surface_current parameter. | | * be provided as the \b video_surface_current parameter. | |
| * | | * | |
| * To enable operation of advanced de-interlacing algorithms and/or | | * To enable operation of advanced de-interlacing algorithms and/or | |
| * post-processing algorithms, some past and/or future surfaces should be | | * post-processing algorithms, some past and/or future surfaces should be | |
| * provided as context. These are provided in the \b video_surface_past and | | * provided as context. These are provided in the \b video_surface_past and | |
| * \b video_surface_future lists. In general, these lists may contain any | | * \b video_surface_future lists. In general, these lists may contain any | |
| * number of surfaces. Specific implementations may have specific requireme
nts | | * number of surfaces. Specific implementations may have specific requireme
nts | |
| * determining the minimum required number of surfaces for optimal operatio
n, | | * determining the minimum required number of surfaces for optimal operatio
n, | |
| * and the maximum number of useful surfaces, beyond which surfaces are not | | * and the maximum number of useful surfaces, beyond which surfaces are not | |
| * used. It is recommended that in all cases other than plain bob/weave, at | | * used. It is recommended that in all cases other than plain bob/weave, at | |
|
| * least 2 past and 1 future frame be provided. | | * least 2 past and 1 future field be provided. | |
| * | | * | |
| * Note that it is entirely possible, in general, for any of the | | * Note that it is entirely possible, in general, for any of the | |
| * \ref VdpVideoMixer "VdpVideoMixer" post-processing steps other than | | * \ref VdpVideoMixer "VdpVideoMixer" post-processing steps other than | |
| * de-interlacing to require access to multiple input fields/frames. For | | * de-interlacing to require access to multiple input fields/frames. For | |
| * example, an motion-sensitive noise-reduction algorithm. | | * example, an motion-sensitive noise-reduction algorithm. | |
| * | | * | |
| * For example, when processing field t4, the \ref VdpVideoMixerRender | | * For example, when processing field t4, the \ref VdpVideoMixerRender | |
| * parameters may contain the following values, if the application chose to | | * parameters may contain the following values, if the application chose to | |
| * provide 3 fields of context for both the past and future: | | * provide 3 fields of context for both the past and future: | |
| * | | * | |
| | | | |
| skipping to change at line 618 | | skipping to change at line 623 | |
| * If \ref VdpVideoMixerRender is called for every decoded field, the | | * If \ref VdpVideoMixerRender is called for every decoded field, the | |
| * generated post-processed frame rate is equal to the decoded field rate. | | * generated post-processed frame rate is equal to the decoded field rate. | |
| * Put another way, the generated post-processed nominal field rate is equa
l | | * Put another way, the generated post-processed nominal field rate is equa
l | |
| * to 2x the decoded field rate. This is standard practice. | | * to 2x the decoded field rate. This is standard practice. | |
| * | | * | |
| * If \ref VdpVideoMixerRender is called for every second decoded field (sa
y | | * If \ref VdpVideoMixerRender is called for every second decoded field (sa
y | |
| * every top field), the generated post-processed frame rate is half to the | | * every top field), the generated post-processed frame rate is half to the | |
| * decoded field rate. This mode of operation is thus referred to as | | * decoded field rate. This mode of operation is thus referred to as | |
| * "half-rate". | | * "half-rate". | |
| * | | * | |
|
| * Implementations may choose whether to support half-rate de-interlacing m | | * Implementations may choose whether to support half-rate de-interlacing | |
| ode | | * or not. Regular full-rate de-interlacing should be supported by any | |
| * or not. Regular de-interlacing mode should be supported to any supported | | * supported advanced de-interlacing algorithm. | |
| * advanced de-interlacing algorithm. | | | |
| * | | * | |
| * The descriptions of de-interlacing algorithms above assume that regular | | * The descriptions of de-interlacing algorithms above assume that regular | |
| * (not half-rate) operation is being performed, when detailing the number
of | | * (not half-rate) operation is being performed, when detailing the number
of | |
|
| "half-rate" de-interlacing is used.deoMixerRender calls. | | * VdpVideoMixerRender calls. | |
| * | | * | |
| * Recall that the concatenation of past/current/future surface lists simpl
y | | * Recall that the concatenation of past/current/future surface lists simpl
y | |
| * forms a window into the stream of decoded fields. To achieve standard | | * forms a window into the stream of decoded fields. To achieve standard | |
| * de-interlacing, the window is slid through the list of decoded fields on
e | | * de-interlacing, the window is slid through the list of decoded fields on
e | |
| * field at a time, and a call is made to \ref VdpVideoMixerRender for each | | * field at a time, and a call is made to \ref VdpVideoMixerRender for each | |
| * movement of the window. To achieve half-rate de-interlacing, the window
is | | * movement of the window. To achieve half-rate de-interlacing, the window
is | |
| * slid through the* list of decoded fields two fields at a time, and a | | * slid through the* list of decoded fields two fields at a time, and a | |
| * call is made to \ref VdpVideoMixerRender for each movement of the window
. | | * call is made to \ref VdpVideoMixerRender for each movement of the window
. | |
| * | | * | |
| * \subsection invtc Inverse Telecine | | * \subsection invtc Inverse Telecine | |
| | | | |
End of changes. 9 change blocks. |
| 11 lines changed or deleted | | 16 lines changed or added | |
|