From: Burkhard P. <bur...@ig...> - 2013-12-06 17:26:07
|
Am 28.11.2013 16:06, schrieb Erik Johansson: > Two patches for color model handling: The first adds support for > conversions from BC_YUVJ420P to BC_YUVJ422P. Applied > The second changes the > way the function get_conversion_price() calculates the price. > > The initial issue I had with the latter was that when converting for > example YUV420P to either YUV422P or YUV444P they were assigned the > same score. I would prefer a preference for 422 over 444 because that > adds less extra information in the conversion. Good to see that someone works on that code :) Some remarks: - colormodel_is_legal_range() is a misleading name. Are there illegal ranges too? I'd call it lqt_colormodel_is_video_range(). Maybe it can even be made public. - The approach for calculating the price for different chroma subsampling is much better, but not optimal yet. With your approach, converting 4:4:4 to 4:2:2 has the same price as 4:4:4 to 4:1:1. Could we think about something like: if(input_sub_h < output_sub_h) price += some_constant * (output_sub_h - input_sub_h); - The subsampling should also take RGB formats into account (with sub_h = 1 and sub_v = 1). BC_RGB888 -> BC_YUV420P should be worse than BC_RGB888 -> BC_YUV444P, or not? Burkhard |