Regarding buffer size, what if the buffer was a multiple of frame size? Wouldn't this give optimal performance, as you would always be sending x264 exactly what it needs to encode an entire frame? Since avs2yuv is outputting raw data, we can calculate this from the resolution.
|