You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/v210dec: do not use accelerated code for the last pixels of a row
ASM code tends to overwrite the buffers by 2-4 bytes and it can cause issues with slice threads. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
@@ -54,7 +54,7 @@ static void decode_row(const uint32_t *src, uint16_t *y, uint16_t *u, uint16_t *
|
|||||||
void (*unpack_frame)(const uint32_t *src, uint16_t *y, uint16_t *u, uint16_t *v, int width))
|
void (*unpack_frame)(const uint32_t *src, uint16_t *y, uint16_t *u, uint16_t *v, int width))
|
||||||
{
|
{
|
||||||
uint32_t val;
|
uint32_t val;
|
||||||
int w = (width / 12) * 12;
|
int w = (FFMAX(0, width - 12) / 12) * 12;
|
||||||
|
|
||||||
unpack_frame(src, y, u, v, w);
|
unpack_frame(src, y, u, v, w);
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ static void decode_row(const uint32_t *src, uint16_t *y, uint16_t *u, uint16_t *
|
|||||||
v += w >> 1;
|
v += w >> 1;
|
||||||
src += (w << 1) / 3;
|
src += (w << 1) / 3;
|
||||||
|
|
||||||
if (w < width - 5) {
|
while (w < width - 5) {
|
||||||
READ_PIXELS(u, y, v);
|
READ_PIXELS(u, y, v);
|
||||||
READ_PIXELS(y, u, y);
|
READ_PIXELS(y, u, y);
|
||||||
READ_PIXELS(v, y, u);
|
READ_PIXELS(v, y, u);
|
||||||
|
Reference in New Issue
Block a user