filter_picture: pass only the chroma to GetPackedRgbIndexes()

We don't need anything else anymore.
This commit is contained in:
Steve Lhomme 2023-09-08 11:59:33 +02:00 committed by Rémi Denis-Courmont
parent 0a473bd411
commit a6caa96f1d
3 changed files with 4 additions and 4 deletions

View File

@ -267,7 +267,7 @@ class CPictureRGBX : public CPicture {
public:
CPictureRGBX(const CPicture &cfg) : CPicture(cfg)
{
if (GetPackedRgbIndexes(fmt, &offset_r, &offset_g, &offset_b, &offset_a) != VLC_SUCCESS) {
if (GetPackedRgbIndexes(fmt->i_chroma, &offset_r, &offset_g, &offset_b, &offset_a) != VLC_SUCCESS) {
/* at least init to something on error to silence compiler warnings */
offset_r = 0;
offset_g = 1;

View File

@ -90,10 +90,10 @@ static inline int GetPackedYuvOffsets( vlc_fourcc_t i_chroma,
}
}
static inline int GetPackedRgbIndexes( const video_format_t *p_fmt, int *i_r_index,
static inline int GetPackedRgbIndexes( vlc_fourcc_t fcc, int *i_r_index,
int *i_g_index, int *i_b_index, int *i_a_index )
{
switch(p_fmt->i_chroma)
switch(fcc)
{
case VLC_CODEC_RGBA:
*i_r_index = 0;

View File

@ -410,7 +410,7 @@ static void RVSepia( picture_t *p_pic, picture_t *p_outpic, int i_intensity )
p_pic->format.i_chroma != VLC_CODEC_BGR24;
int i_rindex = 0, i_gindex = 1, i_bindex = 2, i_aindex = -1;
GetPackedRgbIndexes( &p_outpic->format, &i_rindex, &i_gindex, &i_bindex, &i_aindex );
GetPackedRgbIndexes( p_outpic->format.i_chroma, &i_rindex, &i_gindex, &i_bindex, &i_aindex );
p_in = p_pic->p[0].p_pixels;
p_in_end = p_in + p_pic->p[0].i_visible_lines