aws / dcv-color-primitives

DCV Color Primitives Library
MIT No Attribution
30 stars 22 forks source link

InvalidValue for odd height with i420? #69

Closed jbis9051 closed 2 years ago

jbis9051 commented 2 years ago
   let width = 264;
   let height = 263;
   let dst_format = ImageFormat {
        pixel_format: PixelFormat::I420,
        color_space: ColorSpace::Bt601,
        num_planes: 3,
    };

    let sizes: &mut [usize] = &mut [0usize; 3];

    get_buffers_size(width, height, &dst_format, None, sizes)?; // unable to convert image: InvalidValue

After running a debugger it appears this line is failing:

        | (height & get_pf_height(spec))

which is

| 263 & (14 >> 3)

or

| 263 & 1

is this implying i420 only supports even width and heights?

jbis9051 commented 2 years ago

Closed in favor of #65