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

feat: add PreprocessingConfig.deinterlace #3664

Merged
merged 3 commits into from
Dec 6, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,22 @@ message SpriteSheet {
// source aspect ratio, set the [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] field or
// the [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] field, but not both (the API will
// automatically calculate the missing field).
//
// For portrait videos that contain horizontal ASR and rotation metadata,
// provide the width, in pixels, per the horizontal ASR. The API calculates
// the height per the horizontal ASR. The API detects any rotation metadata
// and swaps the requested height and width for the output.
int32 sprite_width_pixels = 3 [(google.api.field_behavior) = REQUIRED];

// Required. The height of sprite in pixels. Must be an even integer. To preserve the
// source aspect ratio, set the [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] field or
// the [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] field, but not both (the API will
// automatically calculate the missing field).
//
// For portrait videos that contain horizontal ASR and rotation metadata,
// provide the height, in pixels, per the horizontal ASR. The API calculates
// the width per the horizontal ASR. The API detects any rotation metadata
// and swaps the requested height and width for the output.
int32 sprite_height_pixels = 4 [(google.api.field_behavior) = REQUIRED];

// The maximum number of sprites per row in a sprite sheet. The default is 0,
Expand Down Expand Up @@ -594,6 +604,70 @@ message PreprocessingConfig {
int32 right_pixels = 4;
}

// Deinterlace configuration for input video.
message Deinterlace {
// Yet Another Deinterlacing Filter Configuration.
message YadifConfig {
// Specifies the deinterlacing mode to adopt.
// The default is `send_frame`.
// Supported values:
//
// - `send_frame`: Output one frame for each frame
// - `send_field`: Output one frame for each field
string mode = 1;

// Disable spacial interlacing.
// The default is `false`.
bool disable_spatial_interlacing = 2;

// The picture field parity assumed for the input interlaced video.
// The default is `auto`.
// Supported values:
//
// - `tff`: Assume the top field is first
// - `bff`: Assume the bottom field is first
// - `auto`: Enable automatic detection of field parity
string parity = 3;

// Deinterlace all frames rather than just the frames identified as
// interlaced. The default is `false`.
bool deinterlace_all_frames = 4;
}

// Bob Weaver Deinterlacing Filter Configuration.
message BwdifConfig {
// Specifies the deinterlacing mode to adopt.
// The default is `send_frame`.
// Supported values:
//
// - `send_frame`: Output one frame for each frame
// - `send_field`: Output one frame for each field
string mode = 1;

// The picture field parity assumed for the input interlaced video.
// The default is `auto`.
// Supported values:
//
// - `tff`: Assume the top field is first
// - `bff`: Assume the bottom field is first
// - `auto`: Enable automatic detection of field parity
string parity = 2;

// Deinterlace all frames rather than just the frames identified as
// interlaced. The default is `false`.
bool deinterlace_all_frames = 3;
}

// Specify the video deinterlacing filter. The default is `yadif`.
oneof deinterlacing_filter {
// Specifies the Yet Another Deinterlacing Filter Configuration.
YadifConfig yadif = 1;

// Specifies the Bob Weaver Deinterlacing Filter Configuration.
BwdifConfig bwdif = 2;
}
}

// Color preprocessing configuration.
Color color = 1;

Expand All @@ -611,6 +685,9 @@ message PreprocessingConfig {

// Specify the video pad filter configuration.
Pad pad = 6;

// Specify the video deinterlace configuration.
Deinterlace deinterlace = 7;
}

// Video stream resource.
Expand All @@ -620,11 +697,21 @@ message VideoStream {
// The width of the video in pixels. Must be an even integer.
// When not specified, the width is adjusted to match the specified height
// and input aspect ratio. If both are omitted, the input width is used.
//
// For portrait videos that contain horizontal ASR and rotation metadata,
// provide the width, in pixels, per the horizontal ASR. The API calculates
// the height per the horizontal ASR. The API detects any rotation metadata
// and swaps the requested height and width for the output.
int32 width_pixels = 1;

// The height of the video in pixels. Must be an even integer.
// When not specified, the height is adjusted to match the specified width
// and input aspect ratio. If both are omitted, the input height is used.
//
// For portrait videos that contain horizontal ASR and rotation metadata,
// provide the height, in pixels, per the horizontal ASR. The API calculates
// the width per the horizontal ASR. The API detects any rotation metadata
// and swaps the requested height and width for the output.
int32 height_pixels = 2;

// Required. The target video frame rate in frames per second (FPS). Must be less than
Expand Down Expand Up @@ -755,11 +842,21 @@ message VideoStream {
// The width of the video in pixels. Must be an even integer.
// When not specified, the width is adjusted to match the specified height
// and input aspect ratio. If both are omitted, the input width is used.
//
// For portrait videos that contain horizontal ASR and rotation metadata,
// provide the width, in pixels, per the horizontal ASR. The API calculates
// the height per the horizontal ASR. The API detects any rotation metadata
// and swaps the requested height and width for the output.
int32 width_pixels = 1;

// The height of the video in pixels. Must be an even integer.
// When not specified, the height is adjusted to match the specified width
// and input aspect ratio. If both are omitted, the input height is used.
//
// For portrait videos that contain horizontal ASR and rotation metadata,
// provide the height, in pixels, per the horizontal ASR. The API calculates
// the width per the horizontal ASR. The API detects any rotation metadata
// and swaps the requested height and width for the output.
int32 height_pixels = 2;

// Required. The target video frame rate in frames per second (FPS). Must be less than
Expand Down Expand Up @@ -897,11 +994,21 @@ message VideoStream {
// The width of the video in pixels. Must be an even integer.
// When not specified, the width is adjusted to match the specified height
// and input aspect ratio. If both are omitted, the input width is used.
//
// For portrait videos that contain horizontal ASR and rotation metadata,
// provide the width, in pixels, per the horizontal ASR. The API calculates
// the height per the horizontal ASR. The API detects any rotation metadata
// and swaps the requested height and width for the output.
int32 width_pixels = 1;

// The height of the video in pixels. Must be an even integer.
// When not specified, the height is adjusted to match the specified width
// and input aspect ratio. If both are omitted, the input height is used.
//
// For portrait videos that contain horizontal ASR and rotation metadata,
// provide the height, in pixels, per the horizontal ASR. The API calculates
// the width per the horizontal ASR. The API detects any rotation metadata
// and swaps the requested height and width for the output.
int32 height_pixels = 2;

// Required. The target video frame rate in frames per second (FPS). Must be less than
Expand Down
Loading