Re: [FFmpeg-devel] [PATCH v2] avcodec/startcode: Avoid unaligned accesses

2022-10-17 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Up until now, ff_startcode_find_candidate_c() simply casts > an uint8_t* to uint64_t*/uint32_t* to read 64/32 bits at a time > in case HAVE_FAST_UNALIGNED is true. Yet this ignores the > alignment requirement of these types as well as effective type > rules of the C standard.

Re: [FFmpeg-devel] [PATCH v2] avcodec/startcode: Avoid unaligned accesses

2022-10-14 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Up until now, ff_startcode_find_candidate_c() simply casts > an uint8_t* to uint64_t*/uint32_t* to read 64/32 bits at a time > in case HAVE_FAST_UNALIGNED is true. Yet this ignores the > alignment requirement of these types as well as effective type > rules of the C standard.

Re: [FFmpeg-devel] [PATCH v2] avcodec/startcode: Avoid unaligned accesses

2022-10-14 Thread Andreas Rheinhardt
Anton Khirnov: > Quoting Andreas Rheinhardt (2022-10-12 00:20:23) >> Up until now, ff_startcode_find_candidate_c() simply casts >> an uint8_t* to uint64_t*/uint32_t* to read 64/32 bits at a time >> in case HAVE_FAST_UNALIGNED is true. Yet this ignores the >> alignment requirement of these types as

Re: [FFmpeg-devel] [PATCH v2] avcodec/startcode: Avoid unaligned accesses

2022-10-13 Thread Anton Khirnov
Quoting Andreas Rheinhardt (2022-10-12 00:20:23) > Up until now, ff_startcode_find_candidate_c() simply casts > an uint8_t* to uint64_t*/uint32_t* to read 64/32 bits at a time > in case HAVE_FAST_UNALIGNED is true. Yet this ignores the > alignment requirement of these types as well as effective typ

[FFmpeg-devel] [PATCH v2] avcodec/startcode: Avoid unaligned accesses

2022-10-11 Thread Andreas Rheinhardt
Up until now, ff_startcode_find_candidate_c() simply casts an uint8_t* to uint64_t*/uint32_t* to read 64/32 bits at a time in case HAVE_FAST_UNALIGNED is true. Yet this ignores the alignment requirement of these types as well as effective type rules of the C standard. This commit therefore replaces