spacer
Edit
Delete
Cleveland Ma November 27, 2012 02:16

Macroblocking in DivX and DivX Plus profiles
Edit Subject

For the maintain aspect ratio, shouldn't Divx consider using 16x16, 8x8, 4x4 multipliers (depend on the source file) rather than 4x2?

e.g. a 848x480 video file (16x16 pixels based) will generate an error of 640x480.

As the macroblock size of the modern codecs is fixed at 16x16 pixels, I think using the 16x16 multiplier would generate a better output.

When classifying the aspect ratio of the source file, Divx should also consider adding the 3:2 (DVD - 35mm film). Currently, the recommend resolution is either 720x406 or 852x480 when trying to convert a DVD (720x480).
2 people have
this question
+1
Reply
  • spacer EMPLOYEE
    spacer I’m more educated!
    Edit
    Delete
    Remove
    Official
    Fork
    Krista (Official Rep) November 29, 2012 19:18
    Cleveland--thanks so much for sharing your ideas about macroblocking in the DivX codecs here. Those are some really good questions and we had to do some asking around to find out more details about this. We've asked for some input from our engineers and they've shared some feedback about what we do and why we do it.


    Currently, the DivX profiles (MPEG-4 Part 2 ASP/.DIVX files) require that the video width is a multiple of 4 and height a multiple of 2. DivX Plus profile (MPEG-4 Part 10 AVC/.MKV files) requires that height and width each be a multiple of 8.


    Macroblock sizes for MPEG-4 Parts 2 and 10 is 16x16 but the block size for motion estimation and compensation can be small, all the way down to 4x4. Limiting the height and width to multiples of 8 allows for ease of computation.


    Below are a few more direct comments to your questions.


    For the maintain aspect ratio, shouldn't Divx consider using 16x16, 8x8, 4x4 multipliers (depend on the source file) rather than 4x2?

    Actually, 4x2 allows for better control in preserving aspect ratio and provides more options for custom resolutions. Resolutions can more closely match the aspect ratio of the source file.



    e.g. a 848x480 video file (16x16 pixels based) will generate an error of 640x480.

    The resolution 848x480 is close to a 16:9 aspect ratio and 640x480 is a 4:3 aspect ratio. Although we do not know the tool being used, if an option to "maintain aspect ratio" is selected when resizing from 848x480 to 640x480 then the error would be valid.



    As the macroblock size of the modern codecs is fixed at 16x16 pixels, I think using the 16x16 multiplier would generate a better output.

    If the final height and width are not a multiple of 16, the encoder pads additional pixels to make it a multiple of 16 and the decoder discards these padded pixels.



    When classifying the aspect ratio of the source file, Divx should also consider adding the 3:2 (DVD - 35mm film).

    The 3:2 aspect ratio is used for still images using the 35mm film format, not for video. Depending on the format of the video, the same 35mm film is used to capture video at various aspect ratios. There is some more information available on how this works in this Wiki article.



    Currently, the recommend resolution is either 720x406 or 852x480 when trying to convert a DVD (720x480).

    Although the resolution of the DVD is 720x480, the Display Aspect Ratio is most likely 16:9. Most DVDs use non-square pixels, making it unreliable to calculate the aspect ratio from the resolution alone. Both resolution and the Pixel Aspect Ratio should be considered for calculating the Display Aspect Ratio. In this case, if the DVD being used does in fact have an aspect ratio of 16:9, this is likely why the recommended resolutions are 720x406 and 852x480 (using square pixels). Both of these resolutions in square pixels result in an aspect ratio of 16:9.



    I hope that helps clear up any confusion!


    P.S. I've updated the subject of your Topic for a little more clarity.
    Comment
    good answer! good answer! (undo)
  • (some HTML allowed)