Changes between Version 2 and Version 3 of Postprocessing


Ignore:
Timestamp:
Jan 17, 2015, 10:32:52 PM (3 years ago)
Author:
arwa
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Postprocessing

    v2 v3  
    11Post-processing filters are used in videos for quality-improvement. These filters are intended for recovering quality of videos ripped from DVD, VideoCD or after decompressing. 
    22 
    3 Following sections contain various post-processing filters which are part of the FFmpeg project. 
     3Following are the post-processing filters which are part of the FFmpeg project: 
    44 
    5 == '''SPP - Simple Postprocessing''' == 
     51. SPP - Simple Postprocessing 
     62. USPP - Ultra Simple or Slow Postprocessing 
     73. FSPP - Fast Simple Postprocessing 
     84. PP7 - Postprocessing 7 
    69 
    7 Simple Post-proceesing filter compresses and decompresses the image at several (or - in the case of quality level 6 - all) shifts and average the results. The options available are -  
     10These filters basically smooth away blocking and other artifacts from low quality sources. The further you increment the value of QP, the more intensely it smooths away detail. In particular, the quantization parameter QP regulates how much spatial detail is saved. When QP is very small, almost all that detail is retained. As QP is increased, some of that detail is aggregated so that the bit rate drops – but at the price of some increase in distortion and some loss of quality. So, if you want to lower bit rate, you can do so by lowering QP at a cost of increased distortion. 
    811 
    9 === Quality === 
     12USPP and PP7 use encoders, hence, should be used only when one has a powerful CPU. Also, USPP is very slow as compared to other filters. Therefore, for processing large amount of data, FSPP is a good option (It gives good results if parameters are chosen wisely). 
    1013 
    11 This option defines the number of levels for averaging. It accepts an integer in the range 0-6. If set to 0, the filter will have no effect. A value of 6 represents highest quality. For each increment of that value the speed drops by a factor of approximately 2. Default value is 3. 
     14Let's consider the example of 
    1215 
    13 The filter basically smooths away blocking and other artifacts from low quality sources. The further you increment the value of quality, the more intensely it smooths away detail. 
     161. Test sequence called "Foreman"(frame 155, compressed using Xvid with bitrate option 50, 75, 100kbs): 
    1417 
    15 === QP === 
     18|| ||= Query Image =|| || 
     19|| || [[Image(0.jpg)]] || || 
     20||= spp=4:10 =||= spp=6:20 =||= spp=6:44:1 =|| 
     21|| [[Image(13.jpg)]] || [[Image(14.jpg)]] || [[Image(11.jpg)]] || 
     22||= fspp=4:10 =||= fspp=4:10:5 =||= fspp=5:44:10 =|| 
     23|| [[Image(34.jpg)]] || [[Image(33.jpg)]] || [[Image(31.jpg)]] || 
     24||= pp7=10:0 =||= pp7=20:1 =||= pp7=42 =|| 
     25|| [[Image(43.jpg)]] || [[Image(44.jpg)]] || [[Image(41.jpg)]] || 
    1626 
    17 Force a constant quantization parameter. It accepts an integer in range 0-63. If not set, the filter will use the QP from the video stream (if available). 
     272. The standard lena 256×256 image which is saved by gimp to 10% quality. 
    1828 
    19 In particular, the quantization parameter QP regulates how much spatial detail is saved. When QP is very small, almost all that detail is retained. As QP is increased, some of that detail is aggregated so that the bit rate drops – but at the price of some increase in distortion and some loss of quality. So, if you want to lower bit rate, you can do so by lowering QP at a cost of increased distortion. 
    20  
    21 === Mode === 
    22  
    23 To set the thresholding mode. Available modes are: 
    24  
    25 ==== ‘hard’ ==== 
    26 For hard thresholding - default. 
    27  
    28 ==== ‘soft’ ==== 
    29 For soft thresholding - better de-ringing effect but the results are blurrier when compared to the default mode. 
    30  
    31  
    32 === use_bframe_qp === 
    33 Enable the use of the QP from the B-Frames if set to 1. Using this option may cause flicker since the B-Frames have often larger QP. Default is 0 (not enabled). 
    34  
    35 Let's consider the example of test sequence called "Foreman"(frame 155, compressed using Xvid with bitrate option 50, 75, 100kbs): 
    36  
    37 [[Image(spp.jpg, nolink)]] 
    38  
    39  
    40 == '''USPP - Ultra Simple/Slow Postprocessing''' == 
    41  
    42 Ultra slow/simple postprocessing filter compresses and decompresses the image at several (or - in the case of quality level 8 - all) shifts and average the results. 
    43  
    44 The way this differs from the behavior of spp is that uspp actually encodes & decodes each case with libavcodec Snow, whereas spp uses a simplified intra only 8x8 DCT similar to MJPEG. So, you should use USPP if and only if your CPU is powerful. 
    45  
    46 The filter accepts the following options: 
    47  
    48 === Quality === 
    49  
    50 This option defines the number of levels for averaging. It accepts an integer in the range 0-8. If set to 0, the filter will have no effect. A value of 8 represents highest quality. For each increment of that value the speed drops by a factor of approximately 2. Default value is 3. 
    51  
    52 The filter basically smooths away blocking and other artifacts from low quality sources. The further you increment the value of quality, the more intensely it smooths away detail. 
    53  
    54 === QP === 
    55  
    56 Force a constant quantization parameter. It accepts an integer in range 0-63. If not set, the filter will use the QP from the video stream (if available). 
    57  
    58 In particular, the quantization parameter QP regulates how much spatial detail is saved. When QP is very small, almost all that detail is retained. As QP is increased, some of that detail is aggregated so that the bit rate drops – but at the price of some increase in distortion and some loss of quality. So, if you want to lower bit rate, you can do so by lowering QP at a cost of increased distortion. 
    59  
    60  
    61 --------------------------Images------------------------- 
    62  
    63  
    64 == '''FSPP - Fast Simple Postprocessing''' == 
    65  
    66 FSPP is a faster version of SPP. The processing is performed on groups of pixels, instead of individual pixels, making computation faster. The filter accepts the following options: 
    67  
    68 === Quality === 
    69  
    70 This option defines the number of levels for averaging. It accepts an integer in the range 4-5. Default value is 4. 
    71  
    72 The filter basically smooths away blocking and other artifacts from low quality sources. The further you increment the value of quality, the more intensely it smooths away detail. 
    73  
    74 === QP === 
    75  
    76 Force a constant quantization parameter. It accepts an integer in range 0-63. If not set, the filter will use the QP from the video stream (if available). 
    77  
    78 In particular, the quantization parameter QP regulates how much spatial detail is saved. When QP is very small, almost all that detail is retained. As QP is increased, some of that detail is aggregated so that the bit rate drops – but at the price of some increase in distortion and some loss of quality. So, if you want to lower bit rate, you can do so by lowering QP at a cost of increased distortion. 
    79  
    80  
    81 === Strength === 
    82  
    83 To set the filter strength. It accepts an integer in range -15 to 32. Lower values mean more details but also more artifacts, while higher values make the image smoother but also blurrier. Default value is 0 (PSNR optimal). 
    84  
    85 === use_bframe_qp === 
    86  
    87 Enable the use of the QP from the B-Frames if set to 1. Using this option may cause flicker since the B-Frames have often larger QP. Default is 0 (not enabled). 
    88  
    89 Let's consider the example of test sequence called "Foreman"(frame 155, compressed using Xvid with bitrate option 50, 75, 100kbs): 
    90  
    91 [[Image(fspp.jpg, nolink)]] 
     29|| ||= Query Image =|| || 
     30|| || [[Image(lena.jpg)]] || || 
     31||= spp=5:10:0:1 =||= spp=5:20 =||= spp=5:40:0:1 =|| 
     32|| [[Image(lena_11.jpg)]] || [[Image(lena_12.jpg)]] || [[Image(lena_13.jpg)]] || 
     33||= fspp=4:10 =||= fspp=4:10:10 =||= fspp=5:20 =|| 
     34|| [[Image(lena_32.jpg)]] || [[Image(lena_31.jpg)]] || [[Image(lena_33.jpg)]] || 
     35||= pp7=10:0 =||= pp7=10:1 =||= pp7=20 =|| 
     36|| [[Image(lena_41.jpg)]] || [[Image(lena_42.jpg)]] || [[Image(lena_43.jpg)]] || 
    9237 
    9338 
    9439 
    95 == '''PP7 - Postprocessing 7''' == 
    9640 
    97 PP7 is variant of the SPP filter. It is similar to SPP = 6 with 7 point DCT, where only the center sample is used after IDCT. 
    9841 
    99 The filter accepts the following options: 
    100  
    101 === QP === 
    102  
    103 Force a constant quantization parameter. It accepts an integer in range 0-63. If not set, the filter will use the QP from the video stream (if available). 
    104  
    105 In particular, the quantization parameter QP regulates how much spatial detail is saved. When QP is very small, almost all that detail is retained. As QP is increased, some of that detail is aggregated so that the bit rate drops – but at the price of some increase in distortion and some loss of quality. So, if you want to lower bit rate, you can do so by lowering QP at a cost of increased distortion. 
    106  
    107 === Mode === 
    108  
    109 To set the thresholding mode. Available modes are: 
    110  
    111 ==== ‘hard’ ==== 
    112 For hard thresholding. 
    113  
    114 ==== ‘soft’ ==== 
    115 For soft thresholding - better de-ringing effect but the results are blurrier when compared to the default mode. 
    116  
    117 ==== ‘medium' ==== 
    118 For medium thresholding. Gives good results. This is the default mode. 
    119  
    120 Let's consider the example of test sequence called "Foreman"(frame 155, compressed using Xvid with bitrate option 50, 75, 100kbs): 
    121  
    122 [[Image(pp7.jpg, nolink)]]