Skip to content

Commit

Permalink
feat: add PreprocessingConfig.deinterlace (#3664)
Browse files Browse the repository at this point in the history
* feat: add PreprocessingConfig.deinterlace
docs: minor documentation changes

PiperOrigin-RevId: 489233360

Source-Link: googleapis/googleapis@a186468

Source-Link: googleapis/googleapis-gen@556536f
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZpZGVvLXRyYW5zY29kZXIvLk93bEJvdC55YW1sIiwiaCI6IjU1NjUzNmZiNDU4YTU0ZDk1ZWIzMzM1OGNhNTcwMjcyYzQzMmQyZjQifQ==

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 6, 2022
1 parent 633495c commit a63a526
Show file tree
Hide file tree
Showing 4 changed files with 1,321 additions and 0 deletions.
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

0 comments on commit a63a526

Please sign in to comment.