Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/upipe-av/upipe_av_pixfmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ upipe_av_pixfmt_to_format(enum AVPixelFormat pix_fmt)
return &uref_pic_flow_format_nv12;
case AV_PIX_FMT_NV16:
return &uref_pic_flow_format_nv16;
case AV_PIX_FMT_NV20LE:
return &uref_pic_flow_format_nv20le;
#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(56, 27, 100)
case AV_PIX_FMT_NV24:
return &uref_pic_flow_format_nv24;
Expand Down Expand Up @@ -228,6 +230,7 @@ static inline enum AVPixelFormat
AV_PIX_FMT_RGBA64BE,
AV_PIX_FMT_NV12,
AV_PIX_FMT_NV16,
AV_PIX_FMT_NV20LE,
#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(56, 27, 100)
AV_PIX_FMT_NV24,
#endif
Expand Down
7 changes: 7 additions & 0 deletions include/upipe/uref_pic_flow_formats.h
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,12 @@ UREF_PIC_FLOW_FORMAT(nv16, 1,
{ 1, 1, 1, "y8", 8 },
{ 2, 1, 2, "u8v8", 16 });

/** @This is the description of the nv20le format: 10 bit samples in the low
* bits of little-endian 16 bit words, u and v interleaved. */
UREF_PIC_FLOW_FORMAT(nv20le, 1,
{ 1, 1, 2, "y10l", 10 },
{ 2, 1, 4, "u10v10l", 20 });

/** @This is the description of the nv24 format. */
UREF_PIC_FLOW_FORMAT(nv24, 1,
{ 1, 1, 1, "y8", 8 },
Expand Down Expand Up @@ -494,6 +500,7 @@ UREF_PIC_FLOW_FORMAT(p010le, 1,
Do(rgba64be, ## __VA_ARGS__) \
Do(nv12, ## __VA_ARGS__) \
Do(nv16, ## __VA_ARGS__) \
Do(nv20le, ## __VA_ARGS__) \
Do(nv24, ## __VA_ARGS__) \
Do(gbrp, ## __VA_ARGS__) \
Do(p010le, ## __VA_ARGS__) \
Expand Down
6 changes: 3 additions & 3 deletions lib/upipe-filters/upipe_audio_bar.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ static void copy_color10(uint8_t **dst, const size_t *strides,

if (dst[4] != NULL) { // u10v10l
uint16_t *d = (uint16_t*)&dst[4][(row / vsubs[4]) * strides[4] +
2 * col / hsubs[4]];
4 * col / hsubs[4]];

for (int i = 0; i < w / hsubs[4]; i++) {
d[i * 2] = color[1];
d[i * 2 + 1] = color[2];
d[i * 2] = color[1] << 2;
d[i * 2 + 1] = color[2] << 2;
}
}
}
Expand Down
Loading