|
E-mail us with your comments and feedback about this article. |
Describes the advanced settings of the Windows Media Video 9 Advanced Profile codec.
|
|
Jay Loomis Microsoft Corporation April 2006
Applies to: Microsoft® Windows Media® Encoder 9 Series Microsoft Windows Media Format SDK
Contents
IntroductionThe Windows Media Video 9 Advanced Profile codec was introduced in the Windows Media Format 9.5 SDK and Windows Media Player 10. It supports a number of advanced settings that can be used to fine tune video encoding. This article describes the advanced settings and provides some background information about the codec.
For more information about the features of the Windows Media Video 9 Advanced Profile codec, refer to the Windows Media Format SDK documentation.
The advanced settings of the Windows Media Video 9 Advanced Profile codec are enabled through registry settings. This is because the codec must work with Windows Media Encoder, which has not been updated since Windows Media 9 Series and therefore does not have any user interface elements for the new codec.
Back to Top
Codec VersionsSince its introduction, the Windows Media Video 9 Advanced Profile codec has been released in two additional versions. Not all of the settings described in this article apply to all versions of the codec. This section describes the three versions of the codec and provides information about the settings that are supported by each of them.
The original version of the codec uses the FOURCC code, "WMVA". This version was designed for use on 32-bit operating systems. In this article, this version is called the 32-bit WMVA codec. We recommended that you do not use the original version of the codec to encode new content, because the encoded bit stream is not fully compliant with the published VC-1 standard.
When Microsoft Windows XP Professional x64 Edition was released, a version of the Windows Media Video 9 Advanced Profile codec was created to take advantage of the performance benefits offered by the 64-bit operating system. Like the original version, it uses the FOURCC code, "WVC1". In this article, this version is called the 64-bit WVC1 codec.
There is now a third version of the Windows Media Video 9 Advanced Profile codec, that is 32-bit and uses the new FOURCC code, "WVC1". In this article, this version is called the 32-bit WVC1 codec. You can get this new codec in one of the following ways:
It is included in the Windows Media Format 11 SDK.
It can be downloaded from the Windows Download Web site. This option enables you to get the new version of the codec if you are encoding content on Windows Server 2003, as the other two options are not supported on any edition of that operating system.
Because the new version of the Windows Media Video 9 Advanced Profile codec creates an encoded bit stream that is compliant with the published VC-1 standard, we recommended that you use it for all new encoded content.
Back to Top
Registry SettingsThe registry settings in this section control the advanced settings of the Windows Media Video 9 Advanced Profile codec. These registry settings are not created by default when the codec is installed. You must add the settings that you want to use.
Most of the registry settings involve a tradeoff between image quality and the size of encoded samples. After these settings are added to the registry, all programs that use the Windows Media Video 9 Advanced Profile codec will use them. In some cases, adding a registry setting will override logic that is built into the codec for controlling advanced features based on content analysis. The results of such an override may not be satisfactory, and you can only reactivate the logic by deleting the registry setting.
All settings should be added under the following registry key:
\\HKEY_CURRENT_USER\Software\Microsoft\Scrunch\WMVideo
Note If the \\HKEY_CURRENT_USER\Software\Microsoft\Scrunch registry key does not exist on your computer, you can create it manually. The advanced settings are:
Compression Optimization TypeThe Compression Optimization Type registry setting specifies the type of optimization to use. This value is a preset selection of values for the other registry settings. If you explicitly set one of the affected settings, that set value will override the preset specified by this setting.
Data Type
REG_DWORD
Valid Values
This registry setting must be set to one of the following values.
| Value | Description |
|---|
0
| The codec will not force optimization and will use whatever features are specified in other registry settings. In many cases, the codec will use internal logic to determine settings if they are not specified in the registry. This is the default value.
| 1
| Enables the features that will produce the best visual quality.
Using this value configures the codec as if you had set the following registry settings:If any of the settings in the previous list are set in the registry, the value in the registry overrides the values associated with this setting.
|
Supported Codec Versions
32-bit WVC1 only
DenoiseOptionThe DenoiseOption registry setting specifies whether the codec will use the noise filter when encoding. The noise filter attempts to detect and remove noise from the video frames.
Some types of noise are easier than others for the codec to detect. Using this feature may result in lower video quality.
Data Type
REG_DWORD
Valid Values
This registry setting must be set to 0 or 1. 0 indicates that the codec will not use the noise filter; 1 indicates that it will.
Supported Codec Versions
All
Dquant OptionThe Dquant Option registry setting specifies when to use dquant perceptual optimization. Dquant is the difference in the quantizer between the previous macroblock and current macroblock. Using this optimization can produce better quality in smooth areas of the video picture, but increases the computation required to encode each frame.
If this optimization is activated, the strength of optimization is controlled by the Dquant Strength value.
Data Type
REG_DWORD
Valid Values
This registry setting must be set to one of the following values.
| Value | Description |
|---|
0
| Dquant perceptual optimization will not be used.
| 1
| Only I frames will be optimized.
| 2
| I and P frames will be optimized, but B frames will not.
| 3
| I, P, and B frames will be optimized.
|
Supported Codec Versions
32-bit WVC1 only
Dquant StrengthThe Dquant Strength registry setting specifies the strength of the Dquant perceptual optimization that will be used. The stronger the optimization, the more CPU-intensive the encoding will be.
This value is used only if the Dquant Option value is set to 1, 2, or 3. The value of Dquant Option specifies the types of frames that will be optimized.
Data Type
REG_DWORD
Valid Values
This registry setting must be set to one of the following values.
| Value | Description |
|---|
0
| The codec will determine the strength of optimization.
| 1
| Weak optimization.
| 2
| Medium optimization.
| 3
| Strong optimization.
|
Supported Codec Versions
32-bit WVC1 only
Force B Frame Delta QPThe Force B Frame Delta QP registry setting specifies the delta increase between the picture quantizer of the anchor frame and the picture quantizer of the B frame.
Data Type
REG_DWORD
Valid Values
This registry setting must be set to a value from 0 to 31.
Supported Codec Versions
32-bit WVC1 only
Force Encoding Height and Force Encoding WidthThe Windows Media Format SDK and Windows Media Encoder enable you to specify an output frame size for a video stream. The output size is the frame size that is normally used in the encoded stream. You can use the Force Encoding Height and Force Encoding Width registry settings to specify a different frame size for the encoded bit stream. By using these settings, you can reduce the size of the encoded video stream. However, as with all resizing, the quality of the output image may be affected.
If the Force Encoding Height and Force Encoding Width registry settings are set, the codec will compress the video at the resolution they describe. When the video stream is decoded, the default output frame size is the size that was specified in the profile used during encoding. The codec will resize the frames from their intermediate size as needed.
Data Type
REG_DWORD
Valid Values
Both Force Encoding Height and Force Encoding Width take a value specifying the dimension of the video frame in pixels. The value specified must be less than the corresponding dimension of the input video frame. The minimum size is 32 and the maximum size is 8192. If you set either value to 0, the codec will ignore that value and use the corresponding source size.
The width must be a multiple of 32. Otherwise, the value will be rounded up to the nearest multiple of 32.
Supported Codec Versions
All
Force LoopFilterThe Force LoopFilter registry setting specifies whether the codec should use the in-loop deblocking filter during encoding.
When the codec uses the in-loop deblocking filter, the edges of the macroblocks in the output video frames will not be as noticeable. However, the filter makes the image softer in appearance.
Data Type
REG_DWORD
Valid Values
This registry setting must be set to 0 or 1. 0 indicates that the codec will not use the loop filter; 1 indicates that it will.
Supported Codec Versions
All
Force MedianThe Force Median registry setting specifies whether the codec should use median filtering during encoding. Median filtering can reduce the encoded size of the video stream, but can introduce compression artifacts. The artifacts associated with this filter can include motion trails behind moving objects in the image.
By default, the codec uses internal logic to determine whether median filtering should be used. If you add this setting to the registry, that logic will be overridden and the codec will always abide by the value in the registry setting.
Data Type
REG_DWORD
Valid Values
This registry setting must be set to 0 or 1. 0 indicates that the codec will not use median filtering; 1 indicates that it will.
Supported Codec Versions
All
Force NoiseEdgeRemovalThe Force NoiseEdgeRemoval registry setting specifies whether the codec should attempt to detect noisy frame edges and remove them.
A noisy frame edge is usually the vertical blanking interval (VBI) data from a frame of broadcast television. The VBI is the first 21 scan lines of the television frame. These scan lines do not contain video data—they contain data about the broadcast. When a television signal is recorded by a capture card, the VBI is usually removed from the frame. The noisy edge detection and correction performed by the codec can only correct an edge that has three or fewer lines of noise. If captured video contains more than three noisy lines, there is a problem with the hardware used to capture the video.
If the codec is set to remove noisy edges, it duplicates lines adjacent to the noisy edge to fill in the frame.
Data Type
REG_DWORD
Valid Values
This registry setting must be set to 0 or 1. 0 indicates that the codec will not remove edge noise; 1 indicates that it will.
Supported Codec Versions
All
Force NumThreadsThe Force NumThreads registry setting specifies the number of threads that the codec will use for encoding. This value is intended to divide encoding into multiple threads to take advantage of computers with multiple processors.
Splitting encoding tasks into multiple threads can cause a slight decrease in quality as compared to a single thread.
Data Type
REG_DWORD
Valid Values
This registry setting should be set to 1, 2, or 4. Other values will be rounded down.
Supported Codec Versions
All
Force Range ReductionThe Force Range Reduction registry setting specifies the degree to which the codec should reduce the effective color range of the video. Reducing the color range reduces the encoded size of video frames but can introduce blurriness in the decoded frames.
Without this value set in the registry, the codec determines whether to use range reduction at encoding time. Typically this option is selected by the codec only at low bit rates.
Data Type
REG_DWORD
Valid Values
This registry setting is a combination of four values, separated by zeros, formatted as 0x0M0m0N0n, where:M is the encoding range reduction factor for the Y component. m is the decoding range expansion factor for the Y component (usually the same as M). N is the encoding range reduction factor for the UV component. n is the decoding range expansion factor for the UV component (usually the same as N).
Each factor is a digit from 0 to 8, where 0 is no reduction or expansion and 8 is the maximum reduction or expansion.
If you set the value to 0x00000000, range reduction is completely disabled.
If you set the value to 0xFFFFFFFF, the codec ignores the registry setting and uses its internal logic to determine whether range reduction should be used.
Supported Codec Versions
All
Force OverlapThe Force Overlap registry setting specifies whether the codec will use overlap smoothing when encoding.
Data Type
REG_DWORD
Valid Values
This registry setting must be set to 0 or 1. 0 indicates that overlap smoothing will not be used, 1 indicates that it will.
Supported Codec Versions
32-bit WVC1 only
Force Video ScalingThe Force Video Scaling registry setting specifies whether the codec will use video scaling optimization. Video scaling is a type of perceptual optimization that can improve the visual quality of video encoded at low bit rates.
Data Type
REG_DWORD
Valid Values
This registry setting must be set to one of the following values.
| Value | Description |
|---|
0
| Video scaling will not be used.
| 1
| The encoder will use conservative video scaling optimization.
| 2
| The encoder will use aggressive video scaling optimization.
|
Supported Codec Versions
32-bit WVC1 only
LookaheadThe Lookahead registry setting specifies the number of frames after the current frame that the codec will evaluate before encoding the current frame. When the codec uses lookahead, it can encode the video more efficiently.
The writer object of the Windows Media Format SDK expects the codec to encode each sample immediately. As a result, this feature does not work properly in software that uses the writer object (including Windows Media Encoder and Windows Media Player). Any data unit extensions associated with video frames will be attached to the wrong output frame. The number of frames by which the data unit extensions are misplaced is equal to the number of frames of lookahead that are used.
Data Type
REG_DWORD
Valid Values
This registry setting value is the number of frames of lookahead to use. It can be set to 0 to disable lookahead, or to any integer from 1 to 16 to enable that many frames of lookahead.
Supported Codec Versions
All
Macroblock Mode Cost MethodThe Macroblock Mode Cost Method registry setting specifies the cost method used by the codec to determe which macroblock mode to use.
Data Type
REG_DWORD
Valid Values
This registry setting must be set to one of the following values.
| Value | Method used |
|---|
0
| SAD/Hadamard. This option configures the codec to use only distortion when computing cost.
| 1
| RD cost. This option configures the codec to account for both rate and distortion when computing cost.
|
Supported Codec Versions
32-bit WVC1 only
Motion Match MethodThe Motion Match Method registry setting specifies the method to use for motion matching.
Data Type
REG_DWORD
Valid Values
This registry setting must be set to one of the following values.
| Value | Method used |
|---|
0
| SAD
| 1
| Hadamard
| -1
| Macroblock-adaptive. This option configures the codec to make decisions about which method to use on each macroblock. This can potentially reduce overall computation required for encoding by performing the computationally-intensive Hadamard transform only when appropriate.
|
Supported Codec Versions
32-bit WVC1 only
Motion Search LevelThe Motion Search Level registry setting specifies the types of video information that are used in motion search operations.
Data Type
REG_DWORD
Valid Values
This registry setting must be set to one of the following values.
| Value | Video information used |
|---|
0
| Luma only.
| 1
| Luma with nearest-integer chroma.
| 2
| Luma with true chroma.
| -1
| Macroblock-adaptive with true chroma.
| -2
| Macroblock-adaptive with nearest-integer chroma.
|
Supported Codec Versions
32-bit WVC1 only
Motion Search RangeThe Motion Search Range registry setting specifies the range used in motion searches.
Data Type
REG_DWORD
Valid Values
This registry setting must be set to one of the following values. H denotes horizontal range and V denotes vertical range. All ranges are given in pixels.
| Value | Range |
|---|
0
| +63.75/-64.0 H, +31.75/-32.0 V
| 1
| +127.75/-128.0 H, +63.75/-64.0 V
| 2
| +511.75/-512.0 H, +127.75/-128.0 V
| 3
| +1023.75/-1024.0 H, +255.75/-256.0 V
| -1
| Macroblock-adaptive
|
Supported Codec Versions
32-bit WVC1 only
Motion Vector Coding MethodThe Motion Vector Coding Method registry setting specifies the method used to code the motion vector information in field pictures.
Data Type
REG_DWORD
Valid Values
This registry setting must be set to one of the following values.
| Value | Description |
|---|
0
| Use encoder defaults.
| 1
| Improves coding efficiency for highly spread-out horizontal delta motion vector distributions.
| 2
| Improves coding efficiency for highly spread-out vertical delta motion vector distributions.
| 3
| Improves coding efficiency for highly spread-out horizontal and vertical delta motion vector distributions.
|
Supported Codec Versions
32-bit WVC1 only
Motion Vector Cost MethodThe Motion Vector Cost Method registry setting specifies the method used to estimate the cost of motion vector coding. The cost is a measure of the amount of processing needed to encode the content. The codec uses the cost to determine which features will be used in encoding.
Data Type
REG_DWORD
Valid Values
This registry setting must be set to one of the following values.
| Value | Description |
|---|
0
| The encoder will use a static motion vector cost. All blocks and macroblocks use the same motion vector cost estimate.
| 1
| The encoder will use a dynamic motion vector cost. The motion vector cost is varied between blocks to achieve optimal visual quality.
|
Supported Codec Versions
32-bit WVC1 only
NumBFramesThe NumBFrames registry setting specifies the number of bidirectional predictive frames (B-frames) that the codec will use between other types of frames. As a default, the codec does not use B-frames. It uses only intraframes (I-frames), which are fully encoded frames, and predictive frames (P-frames), which are encoded as the differences from the previous frame. B-frames, like P-frames, are predictive and store the changes from other frames. B-frames are different from P-frames because they store both the differences from the previous frame and the differences from the following frame.
The primary advantage of using B-frames is that an error in a B-frame will not propagate to subsequent frames as an error in a P-frame will.
When you configure the codec to use B-frames, it will use the specified number of B-frames between each pair of frames of either of the other types. For example, if a sequence of frames without B-frames is IPPPPPPPPPPI, the same sequence using two B-frames might be IBBPBBPBBI. Note that the presence of B-frames can alter the number of delta frames (P-frames or B-frames) between I-frames. In the right circumstances, this could cause the configured key-frame distance to be exceeded by a few frames.
The writer object of the Windows Media® Format SDK expects the codec to encode each sample immediately. As a result, this feature does not work properly in software that uses the writer object (including Windows Media Encoder and Windows Media Player). Any data unit extensions associated with video frames will be attached to the wrong output frame. The number of frames by which the data unit extensions are misplaced is equal to the number of B-frames that are used.
Data Type
REG_DWORD
Valid Values
This value is the number of B-frames to use between other types of frames. It can range from 0 to 7, with 0 indicating that B-frames will not be used.
Supported Codec Versions
All
Perceptual OptionThe Perceptual Option registry setting specifies whether the codec should use conservative perceptual optimization when encoding. Conservative perceptual optimization is a process by which the codec attempts to identify "important" and "unimportant" regions in the video frame. After identifying the regions of the frame, the codec will give a higher priority to the quality of important regions, at the expense of the quality of unimportant regions.
The results of this feature will vary considerably depending on the types of video being encoded.
Data Type
REG_DWORD
Valid Values
This registry setting must be set to 0 or 1. 0 indicates that the codec will not use conservative perceptual optimization; 1 indicates that it will.
Supported Codec Versions
All
Video TypeThe Video Type registry setting specifies the logic that the codec will use to detect interlaced source video.
Data Type
REG_DWORD
Valid Values
This registry setting must be set to one of the following values.
| Value | Description |
|---|
0
| The codec will use the standard frame-type detection logic.
| 1
| The codec will treat all source video frames as interlaced frames.
| 2
| The codec will treat all source video frames as fields of interlaced video.
| 3
| The codec will automatically determine whether input video frames are interlaced frames or fields of interlaced video.
| 4
| The codec will automatically determine whether input video frames are progressive frames, interlaced frames, or fields of interlaced video.
|
Supported Codec Versions
32-bit WVC1 only
Back to Top
Windows Media Video 9 Advanced Profile Codec and VC-1The Society of Motion Picture and Television Engineers (SMPTE) has established a new video codec specification called VC-1. This specification was proposed by Microsoft and is based on the technology developed for the Windows Media Video codecs. The VC-1 standard is published in SMPTE 421M-2006, "VC-1 Compressed Video Bitstream Format and Decoding Process." VC-1 has three distinct modes of operation, or profiles, that each support different features: simple profile, main profile, and advanced profile.
The Windows Media Video 9 codec is Microsoft's implementation of both the simple profile and the main profile of VC-1. The Windows Media Video 9 Advanced Profile codec is Microsoft's implementation of the advanced profile of VC-1. The new 32-bit version of the codec that uses the FOURCC "WVC1" is fully compliant with the SMPTE standard.
Back to Top
For More InformationFor general information about Windows Media technologies, see the Windows Media Web page (http://www.microsoft.com/windows/windowsmedia/).
For information about Windows Media Encoder, see Windows Media Encoder 9 Series (http://www.microsoft.com/windows/windowsmedia/forpros/encoder/default.mspx).
For information about the SMTPE VC-1 standard, see the SMPTE Web site (http://www.smpte.org)
Back to Top
|