On 2016-01-19 17:24, Vittorio Giovara wrote:
> On Fri, Jan 15, 2016 at 2:35 PM, James Darnley <james.darn...@gmail.com> 
> wrote:
>> The sample factor must be the same for both 8- and 10-bit functions chosen
>> otherwise the output will be incorrect.
> 
> Thanks for the set, can you explain in more detail why this
> requirement is necessary?
> 

Before I wrote the 10-bit encoder (and the tests for it) the init
function could have chosen avx for 10-bit and avx2 and sample_factor 2
for 8-bit.  At that time it didn't matter that they were different
because the two depths were on quite different code paths.  The 10-bit
branch wasn't yet changed to use sample_factor.

Now that sample_factor exists and is used on both branches it must be
the same for the two functions chosen.  If it isn't then one depth will
end up doing too few pixels, run into the padding, mess up the
width/stride.  I think I saw all three of these while working on it.

In the future someone may add a new simd function on some other platform
for one depth.  Neon maybe.  Maybe AVX512 will only be worth it on one
depth and not the other.

I am will admit that my logic may be wrong regarding this but I thought
it worth while to note the limitation (as I saw it) to perhaps save
someone time debugging in the future.


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to