diff options
Diffstat (limited to 'media/libaom/src/aom_scale/yv12config.h')
-rw-r--r-- | media/libaom/src/aom_scale/yv12config.h | 50 |
1 files changed, 33 insertions, 17 deletions
diff --git a/media/libaom/src/aom_scale/yv12config.h b/media/libaom/src/aom_scale/yv12config.h index 2fb81acd7..3642bb7f3 100644 --- a/media/libaom/src/aom_scale/yv12config.h +++ b/media/libaom/src/aom_scale/yv12config.h @@ -21,35 +21,28 @@ extern "C" { #include "aom/aom_codec.h" #include "aom/aom_frame_buffer.h" #include "aom/aom_integer.h" +#include "aom/internal/aom_image_internal.h" #define AOMINNERBORDERINPIXELS 160 #define AOM_INTERP_EXTEND 4 - -// TODO(jingning): Use unified inter predictor for encoder and -// decoder during the development process. Revisit the frame border -// to improve the decoder performance. -#if CONFIG_REDUCED_ENCODER_BORDER -#define AOM_BORDER_IN_PIXELS 160 -#else #define AOM_BORDER_IN_PIXELS 288 -#endif // CONFIG_REDUCED_ENCODER_BORDER +#define AOM_ENC_NO_SCALE_BORDER 160 +#define AOM_DEC_BORDER_IN_PIXELS 64 typedef struct yv12_buffer_config { union { struct { int y_width; int uv_width; - int alpha_width; }; - int widths[3]; + int widths[2]; }; union { struct { int y_height; int uv_height; - int alpha_height; }; - int heights[3]; + int heights[2]; }; union { struct { @@ -69,18 +62,16 @@ typedef struct yv12_buffer_config { struct { int y_stride; int uv_stride; - int alpha_stride; }; - int strides[3]; + int strides[2]; }; union { struct { uint8_t *y_buffer; uint8_t *u_buffer; uint8_t *v_buffer; - uint8_t *alpha_buffer; }; - uint8_t *buffers[4]; + uint8_t *buffers[3]; }; // Indicate whether y_buffer, u_buffer, and v_buffer points to the internally @@ -106,7 +97,7 @@ typedef struct yv12_buffer_config { aom_color_primaries_t color_primaries; aom_transfer_characteristics_t transfer_characteristics; aom_matrix_coefficients_t matrix_coefficients; - int monochrome; + uint8_t monochrome; aom_chroma_sample_position_t chroma_sample_position; aom_color_range_t color_range; int render_width; @@ -114,6 +105,7 @@ typedef struct yv12_buffer_config { int corrupted; int flags; + aom_metadata_array_t *metadata; } YV12_BUFFER_CONFIG; #define YV12_FLAG_HIGHBITDEPTH 8 @@ -134,8 +126,32 @@ int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, int border, int byte_alignment, aom_codec_frame_buffer_t *fb, aom_get_frame_buffer_cb_fn_t cb, void *cb_priv); + int aom_free_frame_buffer(YV12_BUFFER_CONFIG *ybf); +/*!\brief Removes metadata from YUV_BUFFER_CONFIG struct. + * + * Frees metadata in frame buffer. + * Frame buffer metadata pointer will be set to NULL. + * + * \param[in] ybf Frame buffer struct pointer + */ +void aom_remove_metadata_from_frame_buffer(YV12_BUFFER_CONFIG *ybf); + +/*!\brief Copy metadata to YUV_BUFFER_CONFIG struct. + * + * Copies metadata in frame buffer. + * Frame buffer will clear any previous metadata and will reallocate the + * metadata array to the new metadata size. Then, it will copy the new metadata + * array into it. + * Returns 0 on success or -1 on failure. + * + * \param[in] ybf Frame buffer struct pointer + * \param[in] arr Metadata array struct pointer + */ +int aom_copy_metadata_to_frame_buffer(YV12_BUFFER_CONFIG *ybf, + const aom_metadata_array_t *arr); + #ifdef __cplusplus } #endif |