- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Do the UMC video codec APIs provide a way to preserve aspect ratios and add border bands when transcoding video between picture sizes that have different aspect ratios?
For example, I'd like to transcode H.263 4CIF (704x576), which as aspect ratio of 1.222... to picture sizes that are shorter but have a wider aspect ratio such as 525 SD (720 x 480, aspect ratio 1.5) or 768 x 448 (aspect ratio 1.714).
The default resizing simply scales the picture to fit the target size, thereby resulting in an image that's stretched a bit wide.
How would I go about resizing such that the original image's aspect ratio is preserved and black border bands are added to the left and right of the image to pad it out to the target width?
Any suggestionswouldbereallyappreciated.
I searched the UMC manual and the forum before posting this question. My apologies if this indeed has been discussed.
Thanks,
Steve
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Steve,
I think it needs a bit change to the code:
1) First call the resize function according to the aspect ratios
2) then, use ippiCopyConstBorder_ function to fill in the black value in the left and right of the image
Thanks,
Chao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve,
As I know one function is there in UMC, SetAspectRatio, this will set the pixel aspect ratio characteristics for the video frame.
Regards,
Naveen Gv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks,
Steve

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page