Skip to content
Snippets Groups Projects
Commit 5662d54d authored by Nicolas Dufresne's avatar Nicolas Dufresne
Browse files

media: v4l2-h264: Sort long refs by pic_num not frame_num


This is a very minor fix to make the code follow the spec. Most of the
streams I have in hand have pic_num == frame_num and otherwise the
order is the same. This also have no impact on the fluster score for
both Hantro and RKVDec drivers.

Signed-off-by: default avatarNicolas Dufresne <nicolas.dufresne@collabora.com>
parent 988fffca
No related branches found
No related tags found
No related merge requests found
......@@ -108,8 +108,8 @@ static int v4l2_h264_p_ref_list_cmp(const void *ptra, const void *ptrb,
* ascending order.
*/
if (!builder->refs[idxa].longterm)
return builder->refs[idxb].frame_num <
builder->refs[idxa].frame_num ?
return builder->refs[idxb].pic_num <
builder->refs[idxa].pic_num ?
-1 : 1;
return builder->refs[idxa].pic_num < builder->refs[idxb].pic_num ?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment