X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmisc%2Fes_format.c;h=9864a0fb1a96055f9d855718b9ce886f9bf1354e;hb=37bef1d6d63314e01af86fe2080d188719f61152;hp=6885c410ed94bd89d0b0d1a88e5cb4185723b9b8;hpb=d466fd4185ffd791413658e948205e2676d2f470;p=vlc diff --git a/src/misc/es_format.c b/src/misc/es_format.c index 6885c410ed..9864a0fb1a 100644 --- a/src/misc/es_format.c +++ b/src/misc/es_format.c @@ -170,6 +170,7 @@ void video_format_Setup( video_format_t *p_fmt, vlc_fourcc_t i_chroma, case VLC_CODEC_J420: p_fmt->i_bits_per_pixel = 12; break; + case VLC_CODEC_YV9: case VLC_CODEC_I410: p_fmt->i_bits_per_pixel = 9; break; @@ -218,6 +219,8 @@ bool video_format_IsSimilar( const video_format_t *p_fmt1, const video_format_t v1.i_visible_height != v2.i_visible_height || v1.i_x_offset != v2.i_x_offset || v1.i_y_offset != v2.i_y_offset ) return false; + if( v1.i_sar_num * v2.i_sar_den != v2.i_sar_num * v1.i_sar_den ) + return false; if( v1.i_chroma == VLC_CODEC_RGB15 || v1.i_chroma == VLC_CODEC_RGB16 || @@ -234,6 +237,18 @@ bool video_format_IsSimilar( const video_format_t *p_fmt1, const video_format_t } return true; } +void video_format_Print( vlc_object_t *p_this, + const char *psz_text, const video_format_t *fmt ) +{ + msg_Dbg( p_this, + "%s sz %ix%i, of (%i,%i), vsz %ix%i, 4cc %4.4s, sar %i:%i, msk r0x%x g0x%x b0x%x", + psz_text, + fmt->i_width, fmt->i_height, fmt->i_x_offset, fmt->i_y_offset, + fmt->i_visible_width, fmt->i_visible_height, + (char*)&fmt->i_chroma, + fmt->i_sar_num, fmt->i_sar_den, + fmt->i_rmask, fmt->i_gmask, fmt->i_bmask ); +} void es_format_Init( es_format_t *fmt, int i_cat, vlc_fourcc_t i_codec ) @@ -241,6 +256,8 @@ void es_format_Init( es_format_t *fmt, fmt->i_cat = i_cat; fmt->i_codec = i_codec; fmt->i_original_fourcc = 0; + fmt->i_profile = -1; + fmt->i_level = -1; fmt->i_id = -1; fmt->i_group = 0; fmt->i_priority = 0;