Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upipe-av: add support for p010le pixel format #975

Merged
merged 1 commit into from
Feb 19, 2024
Merged
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 @@ -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