diff --git a/pyav_by8 b/pyav_by8 new file mode 100644 index 0000000..c1e9987 --- /dev/null +++ b/pyav_by8 @@ -0,0 +1,13 @@ +try to create an image with a custom buffer, format rbga +image is 278x57 +got 63384 bytes, need 63840 bytes +63384=278*57*4, checks out. why 63840? +factor 63384=2*2*2*3*19*139 +factor 63840=2*2*2*2*2*3*5*7*19 +factor 278=2*139 +factor 57=3*19 +factor 4=2*2 +63840 doesn't have 139 as a factor... if we divide by the other two we get 2*2*2*5*7=280 +is it padding an extra pixel on each side? no, reducing video frame width to 276 still demands 63840 bytes. +does stretching image to 280 work? yes! so it has to be a multiple of 5... or 10, or 20. and larger than the requested dimension. +after some further fiddling, it's 8.