Skip to content

Commit

Permalink
upipe-av: add support for p010le pixel format
Browse files Browse the repository at this point in the history
  • Loading branch information
nto authored and cmassiot committed Feb 19, 2024
1 parent 25e1991 commit b81f6af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
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 @@ -157,6 +157,8 @@ upipe_av_pixfmt_to_format(enum AVPixelFormat pix_fmt)
#endif
case AV_PIX_FMT_GBRP:
return &uref_pic_flow_format_gbrp;
case AV_PIX_FMT_P010LE:
return &uref_pic_flow_format_p010le;
default:
break;
}
Expand Down Expand Up @@ -247,6 +249,7 @@ static inline enum AVPixelFormat
AV_PIX_FMT_NV24,
#endif
AV_PIX_FMT_GBRP,
AV_PIX_FMT_P010LE,
-1
};

Expand Down
6 changes: 6 additions & 0 deletions include/upipe/uref_pic_flow_formats.h
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,11 @@ UREF_PIC_FLOW_FORMAT(gbrp, 1,
{ 1, 1, 1, "b8", 8 },
{ 1, 1, 1, "r8", 8 });

/** @This is the description of the p010le format. */
UREF_PIC_FLOW_FORMAT(p010le, 1,
{ 1, 1, 2, "y10l", 10 },
{ 2, 2, 4, "u10v10l", 20 });

#define UREF_PIC_FLOW_FORMAT_FOREACH(Do, ...) \
Do(yuva420p, ## __VA_ARGS__) \
Do(yuva422p, ## __VA_ARGS__) \
Expand Down Expand Up @@ -508,6 +513,7 @@ UREF_PIC_FLOW_FORMAT(gbrp, 1,
Do(nv16, ## __VA_ARGS__) \
Do(nv24, ## __VA_ARGS__) \
Do(gbrp, ## __VA_ARGS__) \
Do(p010le, ## __VA_ARGS__) \

/** @This defines a helper functions to deal with a specified format.
*
Expand Down

0 comments on commit b81f6af

Please sign in to comment.